大约有 490 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0091 秒)
Laya_社区(254) Laya3.0_api(62) Laya2.0_api(58) laya_api(54) Laya_示例(19) Laya2.0_示例(19) Laya2.0_文档(18) Laya3.0_文档(6)
...aphics.drawCircle(88, 86, 40, 'transparent'); var tx = new Sprite(); tx.loadImage(PATH + 'tx.jpg'); tx.scale(0.3,0.3); this.addChild(tx); tx.mask = point; 2017-09-28 0 2 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 qq408896436 相关问...
来源: Laya_社区 发布时间: 20170928
...prite = Laya.Sprite, Event = Laya.Event; this.ape = new Sprite(); this.ape.loadImage(apePath); let texture = Laya.loader.getRes(apePath); this.ape.pivot(texture.width / 2, texture.height / 2); this.ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.ape.scale(0.8, 0.8); Laya.stage.addChild(th...
来源: Laya2.0_示例 发布时间: 20251130
...oSize是不可取的。如果设置了size,autoSize将不起效。 使用loadImage后获取宽高: ```javascript 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); ``` loadImag...
来源: Laya2.0_文档 发布时间: 20210715
...yFilter(); } private createApe(): void { this.ape = new Sprite(); this.ape.loadImage(this.apePath); var texture: Texture = Laya.loader.getRes(this.apePath); this.ape.x = (Laya.stage.width - texture.width) / 2; this.ape.y = (Laya.stage.height - texture.height) / 2; Laya.stage.addChild(this.ape); } pr...
来源: Laya2.0_示例 发布时间: 20251130
...liqunyang 赞同来自: // test drawToCanvas const sp1 = new Sprite(); sp1.loadImage('bet/cheer_1_3.png'); const sp2 = new Sprite(); sp2.x = 100; sp2.loadImage('bet/cheer_1_4.png'); sp1.addChild(sp2); this.addChild(sp1); const htmlCanvas = sp1.drawToCanvas(640, 200, 0, 0); const canvas = htmlCanvas....
来源: Laya_社区 发布时间: 20171018
...r z = 0; z < letterList.length; z++){ var letter = new Sprite(); letter.loadImage("../imgs/linkup/" + letterList[z] + ".png", (bg.width / letterList.length) * z, 0, bg.width / letterList.length, bg.height / 2); Laya.stage.addChild(letter); letter.on("click", this, (function(para){ console.log("z:...
来源: Laya_社区 发布时间: 20180810
... this.target = new Sprite(); Laya.stage.addChild(this.target); this.target.loadImage("res/apes/monkey2.png"); this.target.pivot(55, 72); this.target.pos(100,100); } createTimerLine() { const TimeLine = Laya.TimeLine, Event = Laya.Event; this.timeLine = new TimeLine(); // addLabel(label:String, offse...
来源: Laya2.0_示例 发布时间: 20251130
...背景1 this.bg1 = new Laya.Sprite(); //加载并显示背景图 this.bg1.loadImage("war/bc.png"); //把背景1放在容器中 this.addChild(this.bg1); //创建游戏背景2 this.bg2 = new Laya.Sprite(); //加载并显示背景图 this.bg2.loadImage("war/bc.png"); //更改背景2,放在背景1的...
来源: Laya_社区 发布时间: 20191018
...olor = "#232628"; showApe(); })(); function showApe() { // 方法1:使用loadImage var ape = new Sprite(); Laya.stage.addChild(ape); ape.loadImage("../../res/apes/monkey3.png"); // 方法2:使用drawTexture Laya.loader.load("https://s2.d2scdn.com/2017/12/ ... ot%3B, Handler.create(this, function...
来源: Laya_社区 发布时间: 20171220
...oSize是不可取的。如果设置了size,autoSize将不起效。 使用loadImage后获取宽高: ```typescript 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); ``` loadImag...
来源: Laya2.0_文档 发布时间: 20210714