大约有 1,470 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0055 秒)
Laya_社区(905) Laya2.0_文档(193) Laya_示例(125) Laya2.0_示例(101) Laya3.0_api(79) Laya3.0_文档(63) laya_api(2) Laya2.0_api(2)
...容器用于装载4张猩猩图片 this.apesCon = new Sprite(); Laya.stage.addChild(this.apesCon); // 添加4张猩猩图片 let ape; for (let i = 0; i < 4; i++) { ape = new Sprite(); this.apesCon.addChild(ape); ape.loadImage(`res/apes/monkey${i}.png`); ape.pivot(55, 72).pos( Math.cos(radianUnit * i...
来源: Laya2.0_示例 发布时间: 20241118
... const Sprite = Laya.Sprite; let graphicsCanvas = new Sprite(); Laya.stage.addChild(graphicsCanvas); let liveGraphicsCanvas = new Sprite(); Laya.stage.addChild(liveGraphicsCanvas); liveGraphics = liveGraphicsCanvas.graphics; canvasGraphics = graphicsCanvas.graphics; } onMouseDown() { isDown = true; ...
来源: Laya2.0_示例 发布时间: 20241118
...p() { var bg = new Sprite(); bg.loadImage("../../res/bg2.png"); Laya.stage.addChild(bg); bg2 = new Sprite(); bg2.loadImage("../../res/bg2.png"); Laya.stage.addChild(bg2); bg2.scale(3, 3); //创建mask maskSp = new Sprite(); maskSp.loadImage("../../res/mask.png"); maskSp.pivot(50, 50); //设置mask b...
来源: Laya_示例 发布时间: 20241118
...猩在舞台上,另一只被添加成第一只猩猩的子级 Laya.stage.addChild(ape1); ape1.addChild(ape2); Laya.timer.frameLoop(1, this, animate); } function animate(e) { ape1.rotation += 2; ape2.rotation -= 4; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import ...
来源: Laya_示例 发布时间: 20241118
... this.scene = new Laya.Scene(); this.pos = new Laya.Sprite3D(); this.scene.addChild(this.pos); this.camera = new Laya.Camera(); this.pos.addChild(this.camera); this.camera.transform.translate(this.cameraTrans, false); this.camera.transform.rotate(this.cameraRotate,false,false); this.role3d = Laya.lo...
来源: Laya_社区 发布时间: 20180125
... maskRes = Laya.loader.getRes(maskPath); let bg = new Sprite(); Laya.stage.addChild(bg); bg.graphics.drawTexture(bgRes); let bg2 = new Sprite(); Laya.stage.addChild(bg2); bg2.graphics.drawTexture(bgRes); bg2.scale(3, 3); // 创建mask let maskSp = new Sprite(); maskSp.graphics.drawTexture(maskRes); ...
来源: Laya2.0_示例 发布时间: 20241118
...wnd/market_item_bg.png"; bg_image.pos(0, 0); bg_image.size(312, 462); this.addChild(bg_image); // 金豆数 this._goldLabel = new Laya.Label(); this._goldLabel.color = "#FFBA00"; var font = GameUI.GetFont("$font.marketdlg.default"); this._goldLabel.font = font.family; this._goldLabel.bold = (parseIn...
来源: Laya_社区 发布时间: 20170422
....Stage.SCREEN_NONE; Laya.Stat.show(); var scene: Laya.Scene = Laya.stage.addChild(new Laya.Scene()) as Laya.Scene; this._outHitAllInfo = new Array<Laya.RaycastHit>(); //初始化照相机 this.camera = scene.addChild(new Laya.Camera(0, 0.1, 100)) as Laya.Camera; this.camera.transform.tra...
来源: Laya_社区 发布时间: 20180820
...10, h = 40; const Sprite = Laya.Sprite; let btn = new Sprite(); Laya.stage.addChild(btn); btn.size(w, h); btn.graphics.drawRect(0, 0, w, h, "#FF7F50"); btn.graphics.fillText(labelText, w / 2, 8, "24px SimHei", "#FFFFFF", "center"); return btn; } // 播放音效 onPlaySound() { console.log("播放音...
来源: Laya2.0_示例 发布时间: 20241118
...h)); function onLoadFinish() { //初始化3D场景 this.scene = Laya.stage.addChild(Laya.Scene.load("../../res/threeDimen/scene/TerrainScene/XunLongShi.ls")); //删除原始资源中包含的默认相机 var camera = this.scene.getChildByName("Scenes").getChildByName("Main Camera"); camera.removeSel...
来源: Laya_示例 发布时间: 20241118