大约有 1,616 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0056 秒)
Laya_社区(986) Laya2.0_文档(192) Laya_示例(138) Laya2.0_示例(101) Laya3.0_api(61) Laya2.0_api(57) laya_api(53) Laya3.0_文档(28)
...Sprite = new Laya.Sprite(); sp.loadImage(data, 0, 0, 200, 200); Laya.stage.addChild(sp); } } new LayaUISample; ``` 通过data来当做url传递给loadImage这个方法引擎就会帮我们加载并解码显示出来。loadImage这个方法中的参数不仅仅有接收地址的url还接收base64和s...
来源: Laya2.0_文档 发布时间: 20210715
...3"); sp.on(Event.CLICK,this, onsp); Laya.stage.addChild(sp); } private function onsp(e:Event){ console.log("监听到按钮"+e.target); console.log((e.target.getChildAt(0) as Sprite).name); console.log(e.t...
来源: Laya_社区 发布时间: 20170330
...aded)); function onLoaded(){ var aa = new Sprite(); Laya.stage.addChild(aa); var texture = new Laya.Texture(); texture.load('comp/zzw.png' ); setTimeout( function(){ aa.graphics.drawTexture(texture,0,0); }, 1000 ) } 3Q 2017-12-26 添加评论 免费...
来源: Laya_社区 发布时间: 20171226
...HTML = "<img src='res/test1.png'/>"; html.pos(150, 100); Laya.stage.addChild(img); Laya.stage.addChild(html); 按照这个顺序,图片test1.png加载不出来 2018-12-19 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提...
来源: Laya_社区 发布时间: 20181219
...I页面怎么移除 我在login.ui里面一个按钮事件触发Laya.stage.addChild(new game());然后这个是动态事件,怎么样在login.ui函数里面先移除这个game.ui页面后再addChild进来呢。因为多次事件触发后就相当于NEW了很多进来。尝试login.remoeChild(game)...
来源: Laya_社区 发布时间: 20170819
...de播放视频没有控制器 let video = new Laya.VideoNode; Laya.stage.addChild(video); video.size(600,480); video.options.controls = true; video.options.objectFit = "contain";播放后并没有出现进度条、播放、暂停等组件。 适配选contain、fill都不起作用。 2025-08-18 添...
来源: Laya_社区 发布时间: 20250818
...esize); } function initMatter() { var gameWorld = new Sprite(); Laya.stage.addChild(gameWorld); // 初始化物理引擎 engine = Matter.Engine.create( { enableSleeping: true }); Matter.Engine.run(engine); var render = LayaRender.create( { engine: engine, width: 800, height: 600, options: { backgrou...
来源: Laya_示例 发布时间: 20251209
..."#ff0000"); this.nsp.mouseThrough=true; Laya.stage.addChild(this.nsp); this.nsp.on(Laya.Event.CLICK,this,this.drawImg,null) } drawImg(e:Event=null):void{ var copySpr:Laya.Sprite=new Laya.Sprite(); copySpr.texture=this.nsp.drawTo...
来源: Laya_社区 发布时间: 20220809
...rite=new Sprite(); sp.graphics.drawRect(0,0,100,100,"#FF0000"); Laya.stage.addChild(sp); Tween.to(sp,{x:300,y:300,alpha:0.5},1000,null,Handler.create(this,function():void { sp.destroy(); })); Complete事件你没写错,就是那么写的 2017-06-08 0 0 分享 微博 QZONE 微信 ohkei - as3...
来源: Laya_社区 发布时间: 20170608
... ani.getGraphicBounds(); ani.scale(80/bounds.width ,80/bounds.height) this.addChild(ani) } } Laya.class(Item1, "Item1", Box); var List = Laya.List; function setup(effList) { var list = new List(); list.itemRender = Item1; list.repeatX = 3; list.repeatY = 4; list.x = (Laya.stage.width - WID * list.re...
来源: Laya_社区 发布时间: 20170627