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

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

1131. 为什么 Event 事件触发不了? [ 60%]

...发不了? 这是我的代码:  var Block = new Sprite(); Laya.stage.addChild(Block); Block.graphics.drawRect(300, 200, 50, 50, "#000"); Block.pos(300, 100); Block.on(Event.MOUSE_DOWN, this, function() {     console.log(1); });   点击无效,但我给用 Laya.stage.on(Event.MOUSE_DOWN); ...

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

1132. JS进度条加载问题 [ 60%]

...dler(this,onChange); //当progressBar的value值改变时触发 Laya.stage.addChild(progressBar); onchange(); } function onChange(value) { trace("进度: "+Math.floor(value*100)+"%"); } function onProgress(pro) { trace("加载了总文件的:"+pro+"%") progressBar.value=pro; if(progressBar.value==1)...

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

1133. 多光源渲染(ActionScript-3D基础(AS3)-LayaAir3D之灯光) [ 60%]

...reate(this, function (scene: Scene3D): void { //添加到场景 Laya.stage.addChild(scene); var camera: Camera = scene.getChildByName("Main Camera") as Camera; camera.addComponent(CameraMoveScript); camera.transform.localPosition = new Vector3(8.937199060699333, 61.364798067809126, -66.7783608647265...

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

1134. video在安卓手机上,怎么设置同层播放,还有怎么设置隐藏控制播放按钮 [ 60%]

...播放 // 设置画布上的对齐参照物 reference = new Sprite(); this.addChild(reference); reference.pos(0, 0); reference.size(GoldConsts.contextWidth, GoldConsts.contextHeight); reference.graphics.drawRect(0, 0, reference.width, reference.height, "#cccccc"); // 每次舞台尺寸变更时,...

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

1135. 渲染优化原则(TypeScript-2D进阶篇(TS)-性能优化) [ 60%]

...以直接跳过排版。 ```typescript this.text.text="text"; Laya.stage.addChild(this.text); //后面只是更新文字内容,使用changeText能提高性能 this.text.changeText("text changed."); ``` Text.changeText会直接修改绘图指令中该文本绘制的最后一条指令,这种前面...

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

1136. 请问 tilemap加入大量的sprite性能会很低吗 [ 60%]

...ap.getLayerByName(layerName); if (itemlevel == null) { return; } itemlevel.addChild(); 2019-06-12 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 0 个回复 为什么被折叠? 0 个回复被折叠 要回复问题请先登录...

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

1137. 初学者问题 Dialog的popup()方法没有起到效果 [ 60%]

...= new MyDialog("注册功能暂未开通!"); dlg.popup(true); Laya.stage.addChild(dlg); });   2018-03-05 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 qian 赞同来自: 不能添加到stage上 2018-03-05 0 0 ...

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

1138. 如何旋转2d的物理系统的矩形 [ 60%]

... 1 个回复 李伟 赞同来自: var Wall_TL = new Sprite(); Laya.stage.addChild(Wall_TL); Wall_TL.graphics.drawRect(0, 0, 400, 32, "#ffff00"); Wall_TL.pivot(200, 16);   var Collision_Wall_TL:any = Matter.Bodies.rectangle(200, 400, 400, 32, { layaSprite:Wall_TL,isStatic: true })  Matter.World.add...

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

1139. 3D场景环境设置 · LayaAir3.3 · 引擎文档 · LAYABOX [ 60%]

...('scene/Game.ls', Laya.Handler.create(null, function (res:any){ Laya.stage.addChild(res); })); //用Laya.loader的方式加载,加载后根节点是Scene2D Laya.loader.load('scene/Game.ls', Laya.Handler.create(this, this.onLoaded), Laya.Handler.create(this, this.onLoading)).then( (res)=>{ let s...

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

1140. 使用对象池重复使用skeleton报错,请问有解决方案吗?谢谢 [ 60%]

...(0.5, 0.5); mArmature.on(Event.STOPPED, this, completeHandler); Laya.stage.addChild(mArmature);   play(); }); }   function completeHandler() { mArmature.stop();         mArmature.removeSelf();         mArmature.removeChildren();         mArmature.destroy(true);           Laya.Pool...

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