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

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

1. 陀螺仪与加速计 · LayaAir3.3 · 引擎文档 · LAYABOX [ 100%]

...e.height); Laya.stage.addChild(this.info); Laya.Gyroscope.instance.on(Laya.Event.CHANGE, this, this.onDeviceorientation); } private onDeviceorientation(absolute: Boolean, rotationInfo: Laya.RotationInfo): void { this.info.text = "alpha:" + Math.floor(rotationInfo.alpha) + '\n' + "beta :" + Math.floo...

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

2. 控制器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 54%]

... aWidget.setPage("c1", 1); 控制器改变时有通知事件: c1.on(Laya.Event.CHANGED, ()=> { console.log(c1.selectedIndex); }); Copyright ©Layabox 2025 all right reserved,powered by LayaAir Engine更新时间: 2025-10-10 18:58:09 img{cursor:pointer}

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

3. 2D性能优化 · LayaAir3.3 · 引擎文档 · LAYABOX [ 33%]

....drawCircle(0,0,20,"#990000"); Laya.stage.addChild(sp); Laya.stage.on(Laya.Event.MOUSE_MOVE,this,function() { sp.pos(Laya.stage.mouseX,Laya.stage.mouseY); }); (图3-1) 此时FPS显示30,并且在鼠标移动时,可以感觉到圆球位置的更新不连贯。设置Stage.frameRate为Stage.FRA...

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

4. 插件开发说明 · LayaAir3.3 · 引擎文档 · LAYABOX [ 18%]

...ions", inspector: "Buttons", options : { buttons : [ { caption : "点我", event: "my_click" } ] } } ] } ]); this._panel.allowUndo = true; //根据需要设置 //如果不需要undo功能,也可以直接this._data = {}; this._data = IEditor.DataWatcher.watch({}); //inspect可以多次调用,将...

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