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

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

921. CPU优化方式(ActionScript-2D进阶篇(AS3)-性能优化) [ 40%]

...eLoop(1, this, animateFrameRateBased); Laya.stage.on("click", this, dispose); private function dispose():void  {     Laya.timer.clear(this, animateFrameRateBased); } ``` ​ 当一个对象的生命周期结束时,记得清除其内部的Timer: ### **三、获取显示对象边界的...

来源: Laya2.0_文档 发布时间: 20210715

922. CPU优化方式(JavaScript-2D进阶篇(JS)-性能优化) [ 40%]

...frameLoop(1, this, animateFrameRateBased); Laya.stage.on("click", this, dispose); function dispose() { Laya.timer.clear(this, animateFrameRateBased); } ``` 当一个对象的生命周期结束时,记得清除其内部的Timer: ### **三、获取显示对象边界的做法** 在相对布局中,...

来源: Laya2.0_文档 发布时间: 20210715

923. [0]Spine3.8.75报错:Error: Unsupported skeleton data, please export with a newer version of Spine. [ 40%]

...         Laya.stage.addChild(this.skeleton);         this.skeleton.pos(laya_width/2,laya_height/2);         this.skeleton.scale(0.5, 0.5);         this.skeleton.on(Event.STOPPED, this, this.play);         this.play();     }     onError() {         console.log("parse error...

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

924. 设置遮罩(TypeScript-LayaAir基础篇(TS)-位图) [ 40%]

...s.drawCircle(80,80,50,"#ff0000"); //圆形所在的位置坐标 this.cMask.pos(120,50); //实现img显示对象的遮罩效果 this.img.mask = this.cMask; } } new MaskDemo(); ``` 运行效果如图3所示: ![图3](img/3.jpg) (图3) 通过对比代码我们发现,实现遮罩很简单,把...

来源: Laya2.0_文档 发布时间: 20210715

925. 复选框组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 39%]

...已创建完毕,此方法只执行一次 onAwake(): void { this.checkbox.pos(300, 300); // this.checkbox.selected = true; this.checkbox.label = "多选框"; this.checkbox.labelBold = true; this.checkbox.labelSize = 30; this.checkbox.labelColors = "#0100ff, #16fa0e, #ff0000"; //各状态下的文...

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

926. ENOENT: no such file or directory, open 'D:\layaidehello eleasewxgameLayaSample.js.map [ 39%]

...置为粗体 txt.bold = true; //设置文本的显示起点位置X,Y txt.pos(60, 100); //设置舞台背景色 Laya.stage.bgColor = '#23238E'; //将文本内容添加到舞台 Laya.stage.addChild(txt); } } new GameMain(); 海货 • 2018-07-15 16:17 上边是代码 wq • 2018-08-01 14:00 那不是...

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

927. laya.display.Graphics_API3.0 [ 38%]

... Returns DrawTextureCmd | null drawTextures drawTextures(texture: Texture, pos: any[], colors?: number[]): DrawTexturesCmd | null Defined in laya/display/Graphics.ts:255 批量绘制同样纹理。 Parameters texture: Texture 纹理。 pos: any[] 绘制次数和坐标。 Optional colors: number[] ...

来源: Laya3.0_api 发布时间: 20231115

928. js环境下使用Loader加载图片在Sprite对象的.on函数无效 [ 38%]

...meshSprite添加阴影属性无效 合并小图片 Text类中竟然没有pos函数的api~ laya怎么跨域加载图片 问题状态 最新活动: 2017-11-08 17:39 浏览: 929 关注: 2 人 Monica • 2017-11-08 20:17 sprite默认是没有宽高的,需要手动设置宽高,你可以先断点看...

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

929. 请问object层中添加的sprite怎么添加点击事件 [ 38%]

...= new Sprite(); flower.loadImage("res/ui/npc/budai/stand_ld1.png"); flower.pos(budai.x, budai.y); flower.alpha=1; flower.pivotX=25; flower.pivotY=80; flower.zOrder = budai.y; flower.autoSize = true; flower.height = 100; flower.width = 100; flower.size(100,100); flower.on(Laya.Event.CLICK,this,functi...

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

930. CPU优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 38%]

...1, this, this.animateFrameRateBased); Laya.stage.on("click", this, this.dispose); dispose() { Laya.timer.clear(this, this.animateFrameRateBased); } ``` 当一个对象的生命周期结束时,记得清除其内部的Timer: ### **三、获取显示对象边界的做法** 在相对布局中,很...

来源: Laya2.0_文档 发布时间: 20210714