大约有 1,138 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0055 秒)
Laya_社区(821) Laya2.0_文档(173) Laya_示例(51) Laya2.0_示例(43) Laya3.0_api(23) Laya3.0_文档(20) Laya2.0_api(4) laya_api(3)
...64格式 如题。一直转换没成功。 Laya.loader.load("hall/111.png",Handler.create(this,function():void { var img:Texture = Laya.loader.getRes("hall/111.png"); var encode:String = Base64ImageTool.getBase64Pic(img); } 2017-06-13 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找...
来源: Laya_社区 发布时间: 20170613
...4; constructor() { super(); Laya.loader.load("res/images/map_01.png", Laya.Handler.create(this, this.bgLoaded)); } bgLoaded(): void { let t: Laya.Texture = Laya.loader.getRes("res/images/map_01.png"); this.width = 1000; this.height = 500; this.graphics.fillTexture(t, 0, 0); this.zOrder = -1; } } 201...
来源: Laya_社区 发布时间: 20170714
...rite(); Laya.stage.addChild(ape); ape.loadImage(img,360, 300, 60, 60, Laya.Handler.create(this, function(){ ape.on(Laya.Event.CLICK, this, function(){ console.log(111) }) }));使用这段代码加载了一个60x60大小的图片(下图中骑马的那个人物),并...
来源: Laya_社区 发布时间: 20180609
...ion;Laya.Tween.to(box.potOld,{ x:1 ,y:2 ,update:new Laya.Handler(box,function(){ this.transform.position = this.potOld; }) }, ConstValue.animationTime,Laya.Ease.elasticOut,Laya.Handler.create(this, function(){ console.log("complete"); }),ConstValue.animation...
来源: Laya_社区 发布时间: 20170630
...var sp=new Laya.Sprite(); sp.loadImage("res/apes/monkey2.png",0,0,0,0,Laya.Handler.create(this,function() { console.log(sp.width,sp.height); })); Laya.stage.addChild(sp); ``` loadImage在加载完成的回调函数触发之后才可以正确获取宽高。 1. **直接调用size设置:** ```typescr...
来源: Laya2.0_文档 发布时间: 20210714
...; //预加载角色动画资源 Laya.loader.create("monkey/monkey.ls",Laya.Handler.create(this,this.onSceneOK)); } onSceneOK() { //添加3D场景 var scene = Laya.loader.getRes("monkey/monkey.ls"); Laya.stage.addChild(scene); //从场景中获取摄像机 var camera = scene.getChildByName("Main Came...
来源: Laya2.0_文档 发布时间: 20210715
... at http://127.0.0.1:53462/game/code.js:97630:17 at Laya.loader.load.Handler.create (http://127.0.0.1:53462/game/code.js:102231:13) at Handler.__proto.runWith (http://127.0.0.1:53462/game/code.js:711:59) 查看了应该是微信自带的浏览器内核不支持Function.apply 2018-03-0...
来源: Laya_社区 发布时间: 20180302
...全显示但没有回调 this.downImg.loadImage( `${asset}/${images[1]}`, Handler.create(this, this._onImgLoaded) ); 附件 : --> 2021-01-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_XS 赞同来自...
来源: Laya_社区 发布时间: 20210120
...); ani.pos(300,300); Laya.stage.addChild(ani); ani.loadAnimation("AAA.ani",Handler.create(this,onLoadedAni,[ani])); } private function onLoadedAni(ani:Animation):void { ani.play(0,true); trace(ani.frames); }在加载完成之后去获取! 2017-08-03 0 0 分享 微博 QZONE 微信 为什么被折...
来源: Laya_社区 发布时间: 20170803
...同来自: kkLL 我测试你的代码没什么大问题,就是handler写成了handle,少了一个r,你看下是不是这个问题,建议你用fb调试并开启debugger模式,这样有助于你代码错误报错提示,可以减少语法层面的错误! 2017-03-31 1 1 分享 ...
来源: Laya_社区 发布时间: 20170331