大约有 32 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0041 秒)
UI相关问题 LayaAir引擎 Uncaught TypeError: tex.once is not a function 不知道有没有和我遇到一样的问题 附件 : --> 2018-05-10 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 4 个回复 Laya_Aaron 赞同...
来源: Laya_社区 发布时间: 20180510
纹理加载时,drawTexture方法报错 if (!tex.loaded){ tex.once(/*laya.events.Event.LOADED*/"loaded",this,this._textureLoaded,[tex,args]); }drawTexture方法最下方有上面这一段代码,作用大概是第一加载失败时,再重新加载一遍。本来是挺好的,但是tex.once却...
来源: Laya_社区 发布时间: 20180724
使用fairygui加载网络图片资源时,laya.core.js中的drawTexture会报错 异常栈如上图,因为fairygui依赖laya.core.js,所以最后会调用到laya.core.js中, if (!tex.loaded){ tex.once(/*laya.events.Event.LOADED*/"loaded",this,this._textureLoaded,[tex,args]); }执行到这段...
来源: Laya_社区 发布时间: 20180724
微信头像显示错误 Uncaught TypeError: tex.once is not a function at Graphics.__proto.drawTexture (GameStart.max.js:9996) at Image.__proto.rebuild (GameStart.max.js:36588) at TimerHandler.__proto.run (GameStart.max.js:18041) at Timer.__proto._update (GameStart.max.js:17798) at Stage.__proto.r...
来源: Laya_社区 发布时间: 20180114
...s.btn.label = Math.random().toString(); // console.log(Math.random()); let tex:Laya.Texture = Laya.Loader.getRes(this.bUrl); let x:number = this._testStatus == true ? 0:50;//Math.random()>0.5 ? 50 : 0; this._testStatus = !this._testStatus; // let canvasInfo = this.getCanvasWidthHeight(); let ctx ...
来源: Laya_社区 发布时间: 20230328
...创建,console给出的错误提示为: Uncaught TypeError: tex.once is not a function at Graphics.__proto.drawTexture (laya.core.js:1438) at onloaded (laya.core.js:1737) at Graphics.__proto.loadImage (laya.core.js:1733) at Functi...
来源: Laya_社区 发布时间: 20171015
... var planeMat = new Laya.BlinnPhongMaterial(); Laya.Texture2D.load("res/grass.png", Laya.Handler.create(this, function (tex: Laya.Texture2D): void { planeMat.albedoTexture = tex; })); //设置纹理平铺和偏移...
来源: Laya_社区 发布时间: 20201120
Laya.Loader.getRes("xxx.png")取出来的资源为什么是Texture2D,不是Texture 两张图片,一张取出来是Texture。 另一张却是Texture2D 版本 Laya 2.4.0.1600 这是一个图集动画,第一次加载显示没问题,是在第二次的时候出了问题。 播放流程:第...
来源: Laya_社区 发布时间: 20200417
...,大的可以,小的图集能清除掉么? private function onLoad(tex:Texture):void { var g:Graphics = new Graphics(); g.drawTexture(tex, 0, 0); _s.graphics = g; Laya.timer.once(2000, this, onClear); } private function onClear():void { _s.graphics.clear(); _s.destroy(tr...
来源: Laya_社区 发布时间: 20170222
...教程代码出错 package { import laya.display.Text; import laya.display.Sprite; import laya.utils.Handler; import laya.resource.Texture; public class LayaSample { private var img:Sprite ; private var index:i...
来源: Laya_社区 发布时间: 20170918