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

大约有 486 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0040 秒)

101. 程序蓝图 · LayaAir3.0文档 · LAYABOX [ 71%]

...lass TestBluePrint extends Laya.Script { constructor(testParams: string) { super(); } } (图12-1) 3.2 属性 在变量前使用装饰器的标识@bpProperty,在get和set前使用装饰器的标识@bpAccessor,示例代码如下所示: const { bpClass, bpAccessor, bpProperty } = BP; @bpClass...

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

102. 列表组件 · LayaAir3.0文档 · LAYABOX [ 71%]

...ya.Script { @property({ type: Laya.List }) list: Laya.List constructor() { super(); } // 组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { // 给List对象赋值 var data: Array<any> = []; for (var m: number = 0; m < 20; m++) { data.push({ m_label: "No." + m })...

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

103. 开放数据域组件 · LayaAir3.0文档 · LAYABOX [ 71%]

...aContextView }) public opendata: Laya.OpenDataContextView; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { this.opendata.pos(100,100); this.opendata.size(500,500); } } 2. 代码创建OpenDataCon...

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

104. 内嵌模式创建scene,运行时报找不到json文件 [ 70%]

...compId":3}],"loadList":["comp/label.png"],"loadList3D":[]}; constructor(){ super()} createChildren():void { super.createChildren(); this.createView(HelloUI.uiView); } } REG("ui.HelloUI",HelloUI); } 附件 : --> TestDemo.zip 2019-06-25 2 条评论 免费帖 --> 分享 微博 QZONE 微信 没有找到...

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

105. dialog的popup方法不会关闭其他弹窗 [ 70%]

...LoginView extends ui.loginUI { normalDialog: NormalDialog; constructor() { super();  this.btn_signin.on(Laya.Event.CLICK, null, () => { this.showDialog("登录成功") }); this.btn_register.on(Laya.Event.CLICK, null, () => { this.showDialog("注册功能暂未开放") });  }  showDialog(con...

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

106. 为什么自定义shader大图正常,小图就被缩小了 [ 70%]

...要重写该类的渲染处理函数 */ var myShaderSprite = (function (_super) { this.iNum = 0; function myShaderSprite() { myShaderSprite.super(this); } Laya.class(myShaderSprite, "myShaderSprite", _super); /* 初始化此类 texture纹理对象 vb顶点数组 ib顶点索引数组 */ myS...

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

107. 请问如何使我的自定义类UIDropBox继承Laya.Sprite? [ 70%]

...rite = Laya.Sprite; var Text = Laya.Text; function UIDropBox() { UIDropBox.super(this); this.txt = this.getTextFeild(); this.txt.y = 50; this.txt.text = 'aasassa'; console.log(this.addChild);//undefined console.log(this._super);//undefined this.addChild(this.txt); } Laya.class(UIDropBox, "UIDropBox"...

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

108. viewportPointToRay产生的射线始终有偏差,是为什么? [ 70%]

...3(0, 0, 0), new Vector3(0, 0, 0)); public _start(state:RenderState):void { super._start(state); this._phasorSpriter3D = new PhasorSpriter3D(); this._camera = this._owner.getChildByName("Camera") as Camera; } public _postRenderUpdate(state:RenderState):void { super._update(state); this._point.element...

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

109. 异步加载一个UI对象时的问题 [ 69%]

...函数里面去。 class MyView extends ui.view.MyViewUI { constructor() { super(); } createChildren():void { super.createChildren(); let assets = [ { url: "res/atlas/ui/shared.atlas", type: Loader.ATLAS }, { url: "res/atlas/ui/myview.atlas", type: Loader.ATLAS }, { url: "view/MyView.json", type: Lo...

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

110. HTMLDIVElement设置innerHTML时报错 [ 69%]

...ion(){ if (this._width)return this._width; return this.contextWidth; },[b]_super.prototype._$set_width[/b]);此次出问题的版本为/** *获取对象的宽 */ __getset(0,__proto,'width',function(){ if (this._width)return this._width; return this.contextWidth; },[b]function(value){ var changed=fal...

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