大约有 32 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0024 秒)
...thing() { let sp = new Laya.Sprite(); Laya.stage.addChild(sp); //画线 sp.graphics.drawLine(10, 58, 146, 58, "#ff0000", 3); //画连续直线 sp.graphics.drawLines(176, 58, [0, 0, 39, -50, 78, 0, 117, 50, 156, 0], "#ff0000", 5); //画曲线 sp.graphics.drawCurves(352, 58, [0, 0, 19, -100, 39, 0, 58...
来源: Laya2.0_示例 发布时间: 20241118
...C779A"], colorCount = 0, isDown = false, path = [], color = colors[0], liveGraphics, canvasGraphics; class PIXI_Example_21 { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler, Loader = Laya.Loader; // 不支持WebGL时自...
来源: Laya2.0_示例 发布时间: 20241118
...ld(directionIndicator); directionIndicator.alpha = 0.8; directionIndicator.graphics.drawCircle(0, 0, 70, "#343434"); directionIndicator.graphics.drawLine(-40, 0, 40, 0, "#FFFFFF", 3); directionIndicator.graphics.drawLine(0, -40, 0, 40, "#FFFFFF", 3); directionIndicator.x = compassImg.x; directionInd...
来源: Laya2.0_示例 发布时间: 20241118
... 14.37 var color = "#FF7F50"; this.sprite = new Laya.Sprite(); this.sprite.graphics.drawLine(0, 0, -radiusX, radiusY, color); this.sprite.graphics.drawLine(0, 0, radiusX, radiusY, color); this.sprite.graphics.drawLine(-radiusX, radiusY, 0, radiusY * 2, color); this.sprite.graphics.drawLine(radiusX, ...
来源: Laya2.0_示例 发布时间: 20241118
...prite(); guideContainer.addChild(maskArea); maskArea.alpha = 0.5; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000"); // 绘制一个圆形区域,利用叠加模式,从遮罩区域抠出可交互区 interactionArea = new Sprite(); guideContainer.addChild(interactionAre...
来源: Laya2.0_示例 发布时间: 20241118
...dth/2,Browser.clientHeight/2); Laya.stage.addChild(this.aimSp); this.aimSp.graphics.drawRect(0,0,this.aimSp.width,this.aimSp.height,"#333333"); this.monkeyTexture = Laya.loader.getRes("res/apes/monkey3.png"); this.aimSp.graphics.drawTexture(this.monkeyTexture,0,0,this.monkeyTexture.width,this.monkey...
来源: Laya2.0_示例 发布时间: 20241118
...= Laya.Sprite, Event = Laya.Event; let coralRect = new Sprite(); coralRect.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height / 2, "#FF7F50"); //设置名称 coralRect.name = "珊瑚色容器"; coralRect.size(Laya.stage.width, Laya.stage.height / 2); Laya.stage.addChild(coralRect); coralRec...
来源: Laya2.0_示例 发布时间: 20241118
... let monkey = (this.flag = !this.flag) ? monkey1Res : monkey2Res; this.ape.graphics.clear(); this.ape.graphics.drawTexture(monkey, 0, 0); this.ape.size(monkey.width, monkey.height); } } new Sprite_SwitchTexture();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Texture = ...
来源: Laya2.0_示例 发布时间: 20241118
...ite; 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("播放音效"); Laya.SoundManager.playSound(...
来源: Laya2.0_示例 发布时间: 20241118
...00, h = 60; let button = new Sprite(); Laya.stage.addChild(button); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.size(w, h); button.graphics.fillText(label, w / 2, 17, "20px simHei", "#ffffff", "center"); return button; } onDecreaseAlpha1(e) { const Event = Laya.Event; //移除鼠标单...
来源: Laya2.0_示例 发布时间: 20241118