大约有 7 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0045 秒)
...景内 Laya.loader.load("girl/girl.lh").then(res => { let girl : Laya.Sprite3D = res.create(); this.scene3D.addChild(girl); //获得Animator this._animator = girl.getComponent<Laya.Animator>(Laya.Animator); }); this.on( Laya.Event.MOUSE_DOWN, this, this.switchAni ); } switchAni(): void { if...
来源: Laya3.0_文档 发布时间: 20251010
...lass() export class Animation extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Animation }) //在IDE面板中显示属性 ani: Laya.Animation; constructor() { super(); } //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次...
来源: Laya3.0_文档 发布时间: 20251010
...)类是所有可加入显示列表对象的基类。2D 的基础精灵 Sprite 和 3D 的基础精灵 Sprite3D 都继承自 Node。不仅如此,所有继承自 Node 的子类或孙类对象,统称为“节点”,如:Sprite 节点、Image 节点等。 只有继承自 Node 的对象,才具...
来源: Laya3.0_文档 发布时间: 20251010
...贴图文件,只能用在材质球上。 精灵纹理:图片作为2D的Sprite对象的图片纹理格式,通常在2D开发中使用。此属性在图片资源按照官方的命名规则去命名的时候自动为精灵纹理,否则就是默认值,会导致资源显示异常。 在不改变...
来源: Laya3.0_文档 发布时间: 20251010
...egClass() export class Script extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Scene3D }) scene3d: Laya.Scene3D; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { //...
来源: Laya3.0_文档 发布时间: 20251010
...url, Laya.Loader.IMAGE).then((res: Laya.Texture) => { let sp = new Laya.Sprite(); sp.texture = res; this.owner.addChild(sp); }); } } 常用类型如下: 引擎全局变量 类型标识字符串 类型说明 Laya.Loader.TEXT text 文本类型 Laya.Loader.JSON json JSON类型 Laya.Loader.XML xml ...
来源: Laya3.0_文档 发布时间: 20251010
...regClass() export class Script1 extends Laya.Script { declare owner : Laya.Sprite3D; } //TestCustomEditor.ts @IEditorEnv.customEditor(Script1) export class TestCustomEditor extends IEditorEnv.CustomEditor { declare owner: Laya.Sprite3D; onSceneGUI(): void { IEditorEnv.Handles.drawHemiSphere(this.own...
来源: Laya3.0_文档 发布时间: 20251010