大约有 18 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0021 秒)
...ction 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); coralRect.on(Even...
来源: 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
...7, -100, 117, 0, 136, 100, 156, 0], "#ff0000", 5); //画矩形 sp.graphics.drawRect(10, 166, 166, 90, "#ffff00"); //画多边形 sp.graphics.drawPoly(264, 166, [0, 0, 60, 0, 78.48, 57, 30, 93.48, -18.48, 57], "#ffff00"); //画三角形 sp.graphics.drawPoly(400, 166, [0, 100, 50, 0, 100, 100], "#ffff...
来源: Laya_示例 发布时间: 20241118
...); })(); 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 = Laya.Sprite;...
来源: Laya_示例 发布时间: 20241118
...); })(); 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 = Laya.Sprite;...
来源: Laya_示例 发布时间: 20241118
...); })(); 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 = Laya.Sprite;...
来源: Laya_示例 发布时间: 20241118
...); })(); 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 = Laya.Sprite;...
来源: Laya_示例 发布时间: 20241118
...{ Segment.super(this); Segment.prototype.init = function() { this.graphics.drawRect(-height / 2, -height / 2, width + height, height, "#FF7F50"); } // 获取关节另一头位置 Segment.prototype.getPinPosition = function() { var radian = this.rotation * Math.PI / 180; var tx = this.x + Math.cos(ra...
来源: Laya_示例 发布时间: 20241118
... 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("播放音乐"); SoundManager...
来源: Laya_示例 发布时间: 20241118
...ce); reference.pos(100, 100); reference.size(600, 400); reference.graphics.drawRect(0, 0, reference.width, reference.height, "#CCCCCC"); // 每次舞台尺寸变更时,都会调用Utils.fitDOMElementInArea设置Video的位置,对齐的位置和refence重合 Laya.stage.on(Laya.Event.RESIZE, this,...
来源: Laya_示例 发布时间: 20241118