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

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

2951. Laya.stage报null [ 56%]

...台上面移除掉所有对象,并且置为null 莫名其妙的报错,this.getStyle()是null 打包apk之后,突然报一个错误, Cannot read property 'createTexture' of null。明明没有加载图片,为啥执行到了这里。 Error processing "launch": Error: 找不到文件: null ...

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

2952. 位图字体预加载 [ 56%]

...   bitmapFont.loadFont("../../../../res/bitmapFont/test.fnt",new Handler(this,onFontLoaded, [bitmapFont]));         }         private function onFontLoaded(bitmapFont:BitmapFont):void         {             bitmapFont.setSpaceWidth(10);             Text.registerB...

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

2953. 材质的加载(JavaScript-3D基础(JS)-LayaAir3D之Material材质) [ 56%]

...载 Laya.BaseMaterial.load("res/skyBox2/skyBox2.lmat",Laya.Handler.create(this,function(mat) { var skyRenderer = camera.skyRenderer; //创建天空盒的mesh skyRenderer.mesh = Laya.SkyBox.instance; //设置天空盒材质 skyRenderer.material = mat; })); ``` ![](img/1.png)(图1)

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

2954. 材质的加载(TypeScript-3D基础(TS)-LayaAir3D之Material材质) [ 56%]

...载 Laya.BaseMaterial.load("res/skyBox2/skyBox2.lmat",Laya.Handler.create(this,function(mat) { var skyRenderer = camera.skyRenderer; //创建天空盒的mesh skyRenderer.mesh = Laya.SkyBox.instance; //设置天空盒材质 skyRenderer.material = mat; })); ``` ![](img/1.png)(图1)

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

2955. 微信上测试加载服务器资源 [ 56%]

...p://212.xx.xx.xx/"; Laya.loader.load("res/atlas/comp.atlas",Handler.create(this,loadComplete)); loadComplete(){显示自己的ui}; 项目设置选择不校验合法域名。(我没有配置域名,用IP可以吗?) 发现comp.atlas是加载下来了,图片不行,但是没有ui。怎么搞...

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

2956. 怎么对动画进行毎帧侦听? [ 56%]

怎么对动画进行毎帧侦听? ani.on(Laya.Event.COMPLETE, this, _OnComplete);   function _OnComplete() {   var bounds = ani.getGraphicBounds();   console.log(bounds.width);   console.log(bounds.height); } 这样的话获取动画宽高  还是只会取到第一帧宽高  并没有办...

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

2957. 如果更换Sprite图片 [ 56%]

...94632691ru.png@120w.png",0,0, 60,60); statusBar.x = 20; statusBar.y = -70; this.addChild(statusBar); 如何通过动态事件更换Sprite图片? 2017-01-12 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 cuixueyi...

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

2958. 播放音效,duration为0 [ 56%]

...为0 代码如下: let sound_channel = laya.media.SoundManager.playSound(this.soundArray[soundIndex], 1) console.log(sound_channel.duration) 在H5环境下没问题,发布到微信小游戏之后,duration为0.   猜测是因为微信异步播放声音,duration延迟赋值?或者在微信...

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

2959. Laya.timer.loop 的 Laya.timer.clear 问题 [ 56%]

Laya.timer.loop 的 Laya.timer.clear 问题 Laya.timer.loop(1000, this, ()=>{ 在这里怎么停 });   这个问题一直没人回答。。我贴出来。。让有经验的人回答一下。。。 2018-11-15 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀...

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

2960. callLater延时的时间怎么设置 [ 56%]

...时的时间怎么设置 /** * 延迟执行。 * @param caller 执行域(this)。 * @param method 定时器回调函数。 * @param args 回调参数。 */ callLater(caller: any, method: Function, args?: Array<any>): void; 这个注释说这个函数延迟执行 延迟多久执行呢 参数里...

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