大约有 33 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0022 秒)
... drawSomething() { sp = new 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...
来源: Laya_示例 发布时间: 20241118
...种开发语言、LayaAirIDE让项目开发更高效。(function() { var Graphics = Laya.Graphics; var Sprite = Laya.Sprite; var Browser = Laya.Browser; var WebGL = Laya.WebGL; var colors = ["#5D0776", "#EC8A49", "#AF3666", "#F6C84C", "#4C779A"]; var colorCount = 0; var isDown = false; var path = []...
来源: Laya_示例 发布时间: 20241118
... drawUI() { var canvas = new Sprite(); Laya.stage.addChild(canvas); canvas.graphics.drawLine(compassImg.x, 50, compassImg.x, 182, "#FFFFFF", 3); canvas.graphics.drawLine(-140 + compassImg.x, compassImg.y, 140 + compassImg.x, compassImg.y, "#AAAAAA", 1); canvas.graphics.drawLine(compassImg.x, -140 + ...
来源: Laya_示例 发布时间: 20241118
...h.PI * 30) * radiusX; var color = "#FF7F50"; sprite = new Sprite(); sprite.graphics.drawLine(0, 0, -radiusX, radiusY, color); sprite.graphics.drawLine(0, 0, radiusX, radiusY, color); sprite.graphics.drawLine(-radiusX, radiusY, 0, radiusY * 2, color); sprite.graphics.drawLine(radiusX, radiusY, 0, rad...
来源: Laya_示例 发布时间: 20241118
...游戏背景 var maskArea = new Sprite(); maskArea.alpha = 0.5; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); guideContainer.addChild(maskArea); //绘制一个圆形区域,利用叠加模式,从遮罩区域抠出可交互区 interactionArea = new Sprite(); //...
来源: Laya_示例 发布时间: 20241118
...n); } function createCoralRect() { var 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...
来源: Laya_示例 发布时间: 20241118
...var textureUrl = (flag = !flag) ? texture1 : texture2; // 更换纹理 ape.graphics.clear(); var texture = Laya.loader.getRes(textureUrl); ape.graphics.drawTexture(texture, 0, 0); // 设置交互区域 ape.size(texture.width, texture.height); } })();module laya { import Sprite = Laya.Sprite; import ...
来源: Laya_示例 发布时间: 20241118
... w = 110; var h = 40; var button = new Sprite(); button.size(w, h); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.graphics.fillText(label, w / 2, 8, "25px SimHei", "#FFFFFF", "center"); Laya.stage.addChild(button); return button; } function onPlayMusic(e) { console.log("播放音乐"); Sou...
来源: Laya_示例 发布时间: 20241118
...lSprite); mLabelSprite.x = mStartX; mLabelSprite.y = mStartY; mLabelSprite.graphics.clear(); mLabelSprite.graphics.fillText(tEventData.name, 0, 0, "20px Arial", "#ff0000", "center"); Tween.to(mLabelSprite, { y:mStartY - 200 }, 1000, null,Handler.create(this,playEnd)) } function playEnd() { mLabelSpr...
来源: Laya_示例 发布时间: 20241118
...tralRect(); })(); function createCantralRect() { rect = new Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); updateRectPos(); } function updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();module laya { import Sprite = Lay...
来源: Laya_示例 发布时间: 20241118