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

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

1521. Animation 的createFrames 使用已经加载的图集缓存动画失败 [ 42%]

...} Animation.createFrames(url,"myFighter"); fly=new Animation(); Laya.stage.addChild(fly); fly.play(0,true,"myFighter"); } } 其他案例请参考:LayaAir开发实战-------Role.as文件也有相关使用方式,仅供参考。   2016-06-13 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个...

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

1522. unity中的模型导出后在laya中显示不正常 [ 42%]

...也可以继续在laya中对camera进行操作: var scene = Laya.stage.addChild(Laya.Scene.load("res/layaScene.ls")); scene.once(Laya.Event.HIERARCHY_LOADED, this, function (sceneTemp) { var camera = sceneTemp.getChildByName("Main Camera"); camera.transform.translate(new Laya.Vector3(0, 0, 200)); ...

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

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

...    this.skeleton = this.templet.buildArmature();         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();     }   ...

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

1524. 分享:图集资源做位图文本的工具类(知道fontclip组件的可以略过了,之前一直没注意到这个组件) [ 42%]

...ig.tips.haveNoTheChar, char); } sp.texture = tx; this.chars.push(sp); this.addChild(sp); } this.sortCharsByAlign(this._align); } /** * 水平对齐方式 */ public set align(v: string) { if (v === this._align) { return; } this._align = v; this.sortCharsByAlign(v); } public get align(): string { retu...

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

1525. 设置transform.localRotation之后,就不能再使用transform.rotate了 [ 42%]

...hildAt(0).clone(); ele.transform.position=new Laya.Vector3(0, 0, 0); scene.addChild(ele); ... ele.transform.rotate(new Laya.Vector3(10, 0, 0), true); //这里会有效 ele.transform.localRotation=new Laya.Quaternion(0, 0,0,0); //这里也还是有效的 ele.transform.rotate(new Laya.Vector3(30, 0, 0...

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

1526. UI加载完成后无法获取控件的大小——超详细版问题 [ 41%]

...d(): void { //实例UI界面 var testUI: TestUI = new TestUI(); Laya.stage.addChild(testUI); console.log("myref-onloaded", testUI.myref.getBounds()); console.log("mypan-onloaded", testUI.mypan.getBounds()); Laya.stage.event(Laya.Event.RESIZE) console.log("myref-event_resize", testUI.myref.getBounds(...

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

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

...aya.stage.bgColor = '#23238E'; //将文本内容添加到舞台 Laya.stage.addChild(txt); } } new GameMain(); 海货 • 2018-07-15 16:17 上边是代码 wq • 2018-08-01 14:00 那不是很麻烦,要全部注释忘。 nonfiction • 2018-09-04 11:33 1.7.19,新建示例项目,发布到微信...

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

1528. 用javascript如何实现游戏登录游戏前的资源加载进度,如何将图片,音乐等素材加载到界面通过加载条显示加载进度 [ 41%]

...LoadProgressBinder.bindAll) this.progressUI.UIMenu.value = 0.0; Laya.stage.addChild(this.progressUI.displayObject); Laya.timer.loop(100, this, this.updataPosition); this.loadMainDatas(); } public updataPosition() { this.progressUI.setPosition(Laya.stage.width / 2, Laya.stage.height / 2); } public lo...

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

1529. 位图字体的制作与使用(TypeScript-LayaAir基础篇(TS)-文本) [ 41%]

...ont; txt.leading = 15; //把文本添加到场景中的bf节点下 this.bf.addChild(txt); } } ``` 上面的代码运行效果如下图的蓝色框内所示: ![img](img/20.png) > 上图非蓝色框的是FontClip组件的效果,如果只是简单的单行位图文本,FontClip也可以满足,...

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

1530. drawTexture 画出来的数据会有以前的数据 [ 41%]

...conSpr = new Sprite(); iconSpr.width = 1280; iconSpr.height = 640; iconSpr.addChild(img); btn.on(Event.CLICK,this,runGame1); } private function runGame1():void { xNum = Math.random()*7 - 3; yNum = Math.random()*7 - 3; Laya.timer.loop(20,this,onRun); Laya.timer.frameLoop(10,this,refresh); } private f...

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