大约有 130 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0039 秒)
...回收至对象池内。 ##### ```typescript //初始化引擎 Laya.init(1136, 640, Laya.WebGL); //等比缩放 Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL; //背景颜色 Laya.stage.bgColor = "#232628"; //帧循环 Laya.timer.frameLoop(1, this, onFrame); this.createTime = 0; function onFrame() ...
来源: Laya2.0_文档 发布时间: 20210715
...rivate createTime: number = 0; constructor() { //初始化引擎 Laya.init(1136, 640, Laya.WebGL); //等比缩放 Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL; //背景颜色 Laya.stage.bgColor = "#232628"; //帧循环 Laya.timer.frameLoop(1, this, this.onFrame); } onFrame(): void { //如果创...
来源: Laya2.0_文档 发布时间: 20210715
...Map.setViewPortPivotByScale(0.1,0.5); 代码说明: 假设视口大小为1136*640 scaleX 值 0.1 表示x轴缩放中心点的坐标为113.6(1136*0.1) scaleY 值 0.5 表示y轴缩放中心点的坐标为320(640*0.5) 代码运行时以x轴113.6,y轴320为视口的中心点坐标进行缩...
来源: Laya3.0_文档 发布时间: 20251010
...createTime:int=0; public function PoolTest() { //初始化引擎 Laya.init(1136, 640,WebGL); //等比缩放 Laya.stage.scaleMode = Stage.SCALE_SHOWALL; //背景颜色 Laya.stage.bgColor = "#232628"; //帧循环 Laya.timer.frameLoop(1,this,onFrame); } private function onFrame():void { //如果创建...
来源: Laya2.0_文档 发布时间: 20210715
...8.180789+0800 layabox[3608:626634] =============onGLReady width=640,height=1136 2020-04-22 18:21:18.181206+0800 layabox[3608:626634] download thread num = 3 2020-04-22 18:21:18.583837+0800 layabox[3608:626634] createOpenALSource current num=10 2020-04-22 18:21:18.585036+0800 layabox[3608:626634] Sta...
来源: Laya_社区 发布时间: 20200422
...目,编写下面的代码: ```javascript //初始化引擎 Laya.init(1136,640); var sp = new Laya.Sprite(); var xhr = new Laya.HttpRequest(); xhr.once(Laya.Event.COMPLETE,this,completeHandler); xhr.once(Laya.Event.ERROR,this,errorHandler); xhr.send("res/monkey2.png","","get","arraybuffer"); func...
来源: Laya2.0_文档 发布时间: 20210715
...单的例子来看下用法: ```javascript //初始化引擎 Laya.init(1136,640); var xhr = new Laya.HttpRequest(); xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.on(Event.PROGRESS,this,processHandler); x...
来源: Laya2.0_文档 发布时间: 20210714
...`typescript class LayaSample { constructor() { //初始化引擎 Laya.init(1136, 640); var xhr: Laya.HttpRequest = new Laya.HttpRequest(); xhr.http.timeout = 10000;//设置超时时间; xhr.once(Laya.Event.COMPLETE, this, this.completeHandler); xhr.once(Laya.Event.ERROR, this, this.errorHandler); ...
来源: Laya2.0_文档 发布时间: 20210715
...ss LayaSample { public function LayaSample() { //初始化引擎 Laya.init(1136, 640); var xhr:HttpRequest = new HttpRequest(); xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.on(Event.PROGRESS,this,processH...
来源: Laya2.0_文档 发布时间: 20210715
...面板。 示例Demo.ts编写代码如下: //初始化舞台 Laya.init(1136, 640); //调用性能统计面板方法,(0,0)为面板位置坐标 Laya.Stat.show(0,0); Tips:要注意大小写。 2、FPS相关的介绍 2.1 FPS概述 FPS是每秒传输帧数(Frames Per Second)的缩写。假设游戏...
来源: Laya3.0_文档 发布时间: 20251010