大约有 2,310 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0057 秒)
Laya_社区(1513) Laya2.0_文档(259) Laya_示例(138) Laya2.0_示例(101) Laya3.0_api(80) Laya3.0_文档(75) Laya2.0_api(74) laya_api(70)
...ff00"); _shape=new Sprite(); _shape.graphics.drawCircle(0,0,20,"#ff0000"); addChild(_shape); //加上这句正常,反之则异常 //_shape.cacheAsBitmap=true; pos(300,300); Tween.to(this,{rotation:360},3000); } override public function get width():Number{ return _shape.width; } override public fun...
来源: Laya_社区 发布时间: 20170124
...i/BG/play-bg.png", 0, 0, 720, 5120); //把背景图显示在容器内 this.addChild(this.bg1); //创建背景2 this.bg2 = new Laya.Sprite(); //加载并显示背景图 this.bg2.loadImage("ui/BG/play-bg.png", 0, 0, 720, 5120); //更改背景2的位置,放在背景1的上边 this.bg1.pos(0, -3840); ...
来源: Laya_社区 发布时间: 20181105
....skin = url; //ui组件直接设置skin也可以 img.pos(x, y); this.owner.addChild(img); }); } } 1.2 带类型的加载方式 有的时候,网络资源没有后缀名,又或者,图片xxx.png并非是当成Texture使用,需要被定义为TextureCube。所以,这些时候需要通过类型...
来源: Laya3.0_文档 发布时间: 20251010
...xt.color = "#ff0000"; text.text = "你好"; text.pos(100, 100); Laya.stage.addChild(text); text = new Text(); text.fontSize = 30; text.color = "#ff0000"; text.text = "你好"; text.font = "remember"; text.pos(100, 200); Laya.stage.addChild(text); } } } 或者在config.js var assetFontData...
来源: Laya_社区 发布时间: 20191211
... Game(){ Laya.init(600,800); this.bg = new window.Background(); Laya.stage.addChild(this.bg); })(); })();Background.js var Background = (function(_super){ function Background(){ Background.super(this); this.bg1 = new Laya.Sprite(); this.bg1.loadImage("res/background.png"); this.addChild(this.bg1); }...
来源: Laya_社区 发布时间: 20170420
...ion onLoaded():void { img=new Image(); img.skin="res/logo.png"; Laya.stage.addChild(img); Laya.timer.once(500,this,onClick); //Laya.stage.on(Event.CLICK,this,onClick); } private function onClick():void { var htmlCanvas:HTMLCanvas=img.drawToCanvas(100,100,0,0) as HTMLCanvas; var texture:Texture=new T...
来源: Laya_社区 发布时间: 20170704
...接 提交 3 个回复 Laya_Xq 赞同来自: B型血人 layaMonkey = scene.addChild(Loader.getRes("res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh")) as Sprite3D; //克隆sprite3d layaMonkey_clone1 = Sprite3D.instantiate(layaMonkey, scene, false, new Vector3(0.6, 0, 0)); //克隆sprite3d layaMonke...
来源: Laya_社区 发布时间: 20181017
...ya.Event; this.ape = new Sprite(); this.ape.loadImage(ApePath); Laya.stage.addChild(this.ape); let texture = Laya.loader.getRes(ApePath); this.ape.pivot(texture.width / 2, texture.height / 2); this.ape.x = Laya.stage.width / 2; this.ape.y = Laya.stage.height / 2; this.ape.on(Event.MOUSE_DOWN, this, ...
来源: Laya2.0_示例 发布时间: 20251219
...一直保持初始值不变,无法获得旋转之后的宽高 Component.addChild(child)添加多个对象,旋转之后宽和高一直保持初始值不变,无法获得旋转之后的宽高 2016-12-16 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与...
来源: Laya_社区 发布时间: 20161216
...12 17:22 var btns = new Array; this.btnBox = new Laya.Sprite(); Laya.stage.addChild(this.btnBox); for(var i = 0; i < 5; i++){ var btn = new Laya.Sprite(); btn.loadImage("Key.jpg",i*100,800,100,60); btn.id= i; btns.push(btn); this.btnBox.addChild(btn); console.log(btn.id); } for(var i = ...
来源: Laya_社区 发布时间: 20180817