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

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

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

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

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

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

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

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

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

...         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

974. 复选框组件 · 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

975. 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

976. 显示与切换图片(ActionScript-LayaAir基础篇(AS3)-位图) [ 39%]

...换纹理绘制 img.on("click",this,switchImg); //设置图片坐标 img.pos(100,50); } private function switchImg(e:*=null):void { //清空绘制 img.graphics.clear(); //获得要切换的图片资源路径 var imgUrl:String = (flag = !flag)? monkey2:monkey1; //获取图片资源 var texture:Textur...

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

977. 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

978. 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

979. 请问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

980. laya.media.SoundNode [ 38%]

...e(htmlCanvas);//使用htmlCanvas创建Texture var sp:Sprite = new Sprite().pos(0, 200);//创建精灵并把它放倒200位置 sp.graphics.drawTexture(texture);//把截图绘制到精灵上 Laya.stage.addChild(sp);//把精灵显示到舞台 也可以获取原始图片数据,分享到网上,从而...

来源: laya_api 发布时间: 20170422