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

大约有 1,273 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0072 秒)

861. LayaAir和原生DOM交互(JavaScript-2D进阶篇(JS)-扩展模块) [ 56%]

...ayabox.com/"; this.qrcode.makeCode(url); Laya.stage.once("click",this,clickHandler); this.qrcodeSp = new Laya.Sprite(); Laya.stage.addChild(this.qrcodeSp); function clickHandler(){ var url = this.qrcode._oDrawing._elImage.src;//获取,注意这里是异步的,开发者可以加个延时在获取...

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

862. Laya.loader.getRes的声音资源如何用Laya.SoundManager播放? [ 56%]

... var soundData = null; Laya.loader.load("res/audio/TheSacredWar.ogg", Laya.Handler.create(Laya.stage, function () { console.log('音乐加载完成>>>-----------------|>'); soundData = Laya.loader.getRes("res/audio/somesound.ogg"); }), null, Laya.loader.SOUND);请教一下Laya.SoundManag...

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

863. drawcall优化问题 [ 56%]

... jacksing888 • 2018-01-22 23:37 Laya.loader.load( 'res/atlas/comp.json', Handler.create(this, function(){ container = new Laya.Sprite(); var x = 0,y =80; Laya.stage.addChild(container); for(var i=0;i<1200;i++){ var role = new Laya.Sprite(); x = x+0.1; y = y+0.1 role.x = x; role.y = y; role.load...

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

864. 打包APK运行,drag拖动出现问题;color="#0"程序直接崩溃 [ 56%]

...;             Laya.loader.load([GameConfig.getAssetsFile("comp")],Handler.create(this, onComplet));                          }         private var imag:Image;         private function onComplet():void         {             imag=new Image("ui/comp...

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

865. Cannot read property 'load' of null [ 56%]

...p/28.jpg", "res/img/map/29.jpg", ]; Laya.loader.load(this.skins,laya.utils.Handler.create(this, this.LoadSuccess,null,false)); } private LoadSuccess() { ViewManager.getInstance().CreateView(contant.loginId,new LoginView()); ViewManager.getInstance().ShowView(contant.loginId); } public SwictMap(index...

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

866. native2.0压缩纹理如何使用 [ 56%]

...微博 QZONE 微信 xiaoman122 赞同来自: Laya.loader.load("res/1.pkm", Handler.create(null, function():void {     var spr:Sprite = new Sprite();     spr.loadImage("res/1.pkm");     spr.pos(100, 100);     Laya.stage.addChild(spr); }), null, Loader.IMAGE); 附件就是tp转的图片,这...

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

867. exception info:[TypeError:undefined is not an object(evaluating'tInfo[0].attributes')] at line 764 [ 56%]

...a.BitmapFont();         blueFnt.loadFont("common/number_blue.fnt", new Handler(this, () => {             Laya.Text.registerBitmapFont("number_blue", blueFnt);         })); 但具体原因不清楚 能否请官方测试下bmfont在iphone上运行情况     2017-05-23 0 0 分享 微...

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

868. 加载一个txt文件 getRes出来类型为string 能转换成数组吗 [ 56%]

...来类型为string 能转换成数组吗 Laya.loader.load("res/text.txt", Handler.create(this, onAssetLoaded1), null, Loader.TEXT); var pic1 = Loader.getRes("res/2D特效/text.txt"); console.log(typeof pic1); 输出的类型为string 2017-06-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 ...

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

869. js中使用sharedMesh报错 [ 56%]

...plete (file:///E:/LayaWorkspace/javaScriptLaya/src/warehouse.js:129:52) at Handler.__proto.run (file:///E:/LayaWorkspace/javaScriptLaya/bin/libs/laya.core.js:693:26) at ResInfo.onLoaded (file:///E:/LayaWorkspace/javaScriptLaya/bin/libs/laya.core.js:12657:28) at EventHandler.__proto.runWith (file:///...

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

870. 求教 JS项目的Promise如何使用 [ 56%]

...调方法绘制图片并添加到舞台 Laya.loader.load(this.monkey2,Laya.Handler.create(this,graphicsImg)); function graphicsImg(){ var img = new Laya.Sprite(); //获取图片资源,绘制到画布 img.graphics.drawTexture(Laya.loader.getRes(this.monkey2),100,50); //添加到舞台 Laya.stage.ad...

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