大约有 236 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0045 秒)
Laya_社区(91) Laya_示例(47) Laya2.0_示例(39) Laya2.0_文档(34) Laya3.0_api(20) laya_api(2) Laya2.0_api(2) Laya3.0_文档(1)
...LE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(apePath, Laya.Handler.create(this, this.setup)); } setup() { this.createApe(); this.applayFilter(); } createApe() { const Sprite = Laya.Sprite; this.ape = new Sprite(); Laya.stage.addChild(this.ape); let texture = Laya.loader.getRes(apePat...
来源: Laya2.0_示例 发布时间: 20241117
... = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMo...
来源: Laya2.0_示例 发布时间: 20241117
...ture = Laya.Texture; var Browser = Laya.Browser; var Ease = Laya.Ease; var Handler = Laya.Handler; var Tween = Laya.Tween; var WebGL = Laya.WebGL; const HOLD_TRIGGER_TIME = 1000; const apePath = "../../res/apes/monkey2.png"; //触发hold事件时间为1秒 var ape, isApeHold; (function() { // 不支...
来源: Laya_示例 发布时间: 20241117
...LABEL, this, this.onEvent); mArmature.on(Event.STOPPED, this, this.completeHandler); this.play(); } completeHandler() { this.play(); } play() { mCurrIndex++; let aniNum = mArmature.getAnimNum(); if (mCurrIndex >= aniNum) { mCurrIndex = 0; } mArmature.play(mCurrIndex, false); } onEvent(e) { const Twe...
来源: Laya2.0_示例 发布时间: 20241117
... = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.st...
来源: Laya2.0_示例 发布时间: 20241117
...mport laya.display.Sprite; import laya.resource.Texture; import laya.utils.Handler; public class MaskDemo { private var Res:String; private var img:Sprite; public function MaskDemo() { Laya.init(1136,640); //设置舞台背景色 Laya.stage.bgColor = "#ffffff" //资源路径 Res = "res/img/monkey1.p...
来源: Laya2.0_文档 发布时间: 20210714
...ya.net.LoaderManager中的load()方法和getRes()方法,以及laya.utils.Handler中的create()方法,各方法的参数图3、图4、图5、图6所示: ![图3](img/3.png) (图3) ![图4](img/4.png) (图4) ![图2](img/5.png) (图5) ![图2](img/6.png) (图6) ### 2.2 用drawTexture 加载显示图...
来源: Laya2.0_文档 发布时间: 20210715
...LE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(apePath, Laya.Handler.create(this, this.setup)); } setup() { this.createApe(); this.applayFilter(); } createApe() { const Sprite = Laya.Sprite; this.ape = new Sprite(); Laya.stage.addChild(this.ape); let texture = Laya.loader.getRes(apePat...
来源: Laya2.0_示例 发布时间: 20241117
...y1Path); // 方法2:使用drawTexture Laya.loader.load(monkey2Path, Laya.Handler.create(this, function () { let monkey2 = Laya.loader.getRes(monkey2Path); let ape2 = new Laya.Sprite(); Laya.stage.addChild(ape2); ape2.graphics.drawTexture(monkey2, 100, 0); })); } } new Sprite_DisplayImage();module ...
来源: Laya2.0_示例 发布时间: 20241117
... = Laya.Stage; var Texture = Laya.Texture; var Browser = Laya.Browser; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var texture1 = "../../res/apes/monkey2.png"; var texture2 = "../../res/apes/monkey3.png"; var flag = false; var ape; (function() { // 不支持WebGL时自动切换至Canvas Laya...
来源: Laya_示例 发布时间: 20241117