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

大约有 1,052 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0060 秒)

1021. 自动图集配置 · LayaAir3.3 · 引擎文档 · LAYABOX [ 37%]

...如下: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { declare owner: Laya.Image; //组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { //需要先加载图集再使用,注意,图集要放到resources目录下或者在...

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

1022. 2.0 beta3 物理 DestroyJoint 报错 [ 36%]

...ir2-cmd 编译报错 真机调试报错:LayaPlayer不支持的标签</SCRIPT> 自定义场景类导出layaMaxUI.ts有前缀导致报错 小游戏项目 加载有中文的json文件 报错 本地调试加载本地图片都报错 runtime运行报错! 用了ByteArray的zlib.min.js后报错 ...

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

1023. 压缩纹理 · LayaAir3.3 · 引擎文档 · LAYABOX [ 36%]

... { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { onAwake(): void { let img = new Laya.Image; Laya.stage.addChild(img); img.pos(500,100); img.skin = "resources/layabox.png"; //纹理压缩的图片的路径 } onStart() { Laya.Stat.show(0, 0); //性能面板 } } 发...

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

1024. 2D光遮挡器与阴影 · LayaAir3.3 · 引擎文档 · LAYABOX [ 36%]

...ss, property } = Laya; @regClass() export class LightOccluder extends Laya.Script { private spotLight: Laya.Sprite = new Laya.Sprite(); private background: Laya.Sprite = new Laya.Sprite(); private lightOccluder: Laya.Sprite = new Laya.Sprite(); private backgroundTexture: string = "resources/bg2.png"...

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

1025. 精灵 · LayaAir3.3 · 引擎文档 · LAYABOX [ 36%]

...代码: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Sprite }) public sprite1: Laya.Sprite; @property({ type: Laya.Sprite }) public sprite2: Laya.Sprite; constructor() { super(); } /** * 组件...

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

1026. 使用3D UI · LayaAir3.3 · 引擎文档 · LAYABOX [ 35%]

... { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { // 设置单例 static instance: Main; constructor() { super(); Main.instance = this; } @property({type:Laya.Sprite3D}) private target: Laya.Sprite3D; @property({type:Laya.UI3D}) private ui3d: Laya.UI3D; public anima...

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

1027. 性能分析插件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 35%]

...工具。 const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property(Number) public projectId: number = 23; private perfMain: LayaPerf = new LayaPerf(); onEnable(): void { this.perfMain.init(this.projectId); } } projectId使用后端给项目分配的项...

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

1028. 加载.lh文件 运行后黑屏 无法显示 [ 35%]

...e_JJF/Conventional/JJF.lh");         layaMonkey.addComponent(MonkeyScript);         camera.transform.lookAt(layaMonkey.transform.position, new Laya.Vector3(0, 1, 0));                 //设置文本显示框位置                 this.text.x = Laya.stag...

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

1029. (实现手指控制模型的缩放旋转)触控可以识别 但是导入的模型没有根据触控反应 [ 35%]

...精灵添加组件(脚本)         monkey.addComponent(MonkeyScript);         scene.addChild(monkey);         //设置相机的观察目标为小猴子         camera.transform.lookAt(monkey.transform.position, new Laya.Vector3(0, 1, 0));         this.text...

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

1030. 2D拖尾渲染器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 34%]

...** * 在节点上添加2D拖尾渲染器的示例代码 */ export class NewScript extends Laya.Script { declare owner: Laya.Sprite; private _trail2D: Laya.Trail2DRender; //从场景文件中获取到的宽度曲线数据 private _widthCurve: any[]; //从场景文件中获取到的颜色渐变数据 ...

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