• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 3,124 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0097 秒)

141. 关于TS环境下的第三方库导入的疑问 [ 67%]

...s 目录中 也就是把上边的  /// <reference types="when" />  export = autobahn;   删掉 这样就和Laya库的格式比较像 只是多了个命名空间declare namespace autobahn { export class Session { id: number; realm: string; isOpen: boolean; features: any; .......................

来源: Laya_社区 发布时间: 20180805

142. [LayaAir3]3.3.2与设置组件灰显相关的 Bug 和 Crash [ 66%]

...D; } /** * 继承自AnimatorStateScript(动画状态脚本) */ @regClass() export class AnimationScript2D extends Laya.AnimatorState2DScript { /**动画的状态信息 */ playStateInfo: AnimatorPlayScriptInfo = { animator: null, layerindex: -1, playState: null }; setPlayScriptInfo(animator: Laya.Ani...

来源: Laya_社区 发布时间: 20251010

143. 类似古文显示方式脚本,文字垂直显示,可以控制显示速度出现打字效果等 [ 66%]

...示,可以控制显示速度出现打字效果等  /**古文脚本 */ export default class TextAncient extends Laya.Script { /** @prop {name:text, tips:"显示文本", type:String, default:"hello world"}*/ public text: string = "hello world"; /** @prop {name:color, tips:"字符串类型示例", t...

来源: Laya_社区 发布时间: 20191103

144. 进度条组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 66%]

...如下的示例代码: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.ProgressBar }) public progressBar: Laya.ProgressBar; @property({ type: Laya.Text }) public loadText: Laya.Text; //组件被激活后执行,此时所有节...

来源: Laya3.0_文档 发布时间: 20251010

145. 微信小游戏想使用截图功能是使用canvasToTempFilePath()吗 [ 66%]

...的内容导出生成指定大小的图片,并返回文件路径。 */ export function canvasToTempFilePath( this: string, object: _canvasToTempFilePathObject ): void; 这是wx.d.ts里写的 我看文档说用这个获取分享用 再问下 微信中的Canvas在laya中如何获取啊 ? A • 201...

来源: Laya_社区 发布时间: 20181122

146. List组件拖动浏览时item会出现重叠的现象 [ 66%]

...出现重叠的现象 module list.datasource { import List = laya.ui.List; export class ListDataSourceMediator { constructor() { } public setUp():void { var list: List = new List(); // 渲染的item list.itemRender = ListDataSourceItem; // 设置行列显示的item个数 list.repeatX = 1; list.repea...

来源: Laya_社区 发布时间: 20180410

147. 列表组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 65%]

...t组件设置数据源。 const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { @property({ type: Laya.List }) list: Laya.List constructor() { super(); } // 组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { // 给List对象赋值 var...

来源: Laya3.0_文档 发布时间: 20251010

148. 组件属性的代码使用 · LayaAir3.4 · 引擎文档 · LAYABOX [ 65%]

...例代码如下所示: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type : Laya.Sprite}) public spr: Laya.Sprite; onAwake(): void { this.spr.size(512, 313); //设置Sprite大小 this.spr.loadImage("atlas/comp/image.png"); //添加纹理 ...

来源: Laya3.0_文档 发布时间: 20251010

149. 项目启动入口说明 · LayaAir3.4 · 引擎文档 · LAYABOX [ 65%]

...写到main函数内即可。 创建一个Entry.ts,示例代码如下: export async function main() { console.log("Hello LayaAir!"); //加载场景并打开场景 Laya.Scene.open('Scene.ls'); } 然后,我们在项目设置的脚本编译栏中,找到脚本编译选项分类下的启动脚本...

来源: Laya3.0_文档 发布时间: 20251216

150. 关于laya图片资源缓存的问题 增量更新文件缓存 [ 64%]

...rd/card_item_bg.png"), type: Laya.Loader.IMAGE }] /** 添加文件hash */ export const setStaticPrefix = (url:string) :string => { if (staticHash[`images/${url}`]) { return staticHash[`images/${url}`] } return `images/${url}` }然后资源导出的时候使用gulp生成文件hash 这样增量更...

来源: Laya_社区 发布时间: 20180412