大约有 19 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0023 秒)
... 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, 100, 78, 0, 97, -100, 117, 0, 136, ...
来源: Laya2.0_示例 发布时间: 20251130
...ue为2 //复杂复制,可以通知某个属性,比如:label:{color:"#ff0000",text:"Hello LayaAir"} this.box.dataSource = {slider: 50, scroll: 80, progress: 0.2, input: "This is a input", label: {color: "#ff0000", text: "Hello LayaAir"}}; //list赋值,先获得一个数据源数组 var arr = ...
来源: Laya2.0_示例 发布时间: 20200319
...= "center"; txt.fontSize = 40; txt.font = "Microsoft YaHei"; txt.color = "#ff0000"; txt.bold = true; txt.leading = 5; //设置描边属性 txt.stroke = 2; txt.strokeColor = "#ffffff"; txt.borderColor = "#00ff00"; txt.x = (Laya.stage.width - txt.textWidth) / 2; txt.y = (Laya.stage.height - txt.textHe...
来源: Laya2.0_示例 发布时间: 20251130
...vas.graphics.drawPoly(Laya.stage.width / 2, Laya.stage.height / 2, path, "#FF7F50"); } } new Sprite_DrawPath();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Sprite_DrawPath { constructor() { // 不支持We...
来源: Laya2.0_示例 发布时间: 20251130
...andler; let colorPicker = new ColorPicker(); colorPicker.selectedColor = "#ff0033"; colorPicker.skin = skin; colorPicker.pos(100, 100); colorPicker.changeHandler = new Handler(this, this.onChangeColor, [colorPicker]); Laya.stage.addChild(colorPicker); this.onChangeColor(colorPicker); } onChangeColor...
来源: Laya2.0_示例 发布时间: 20251130
...ya.stage.bgColor = "#232628"; this.setup(); } setup() { this.createLabel("#FFFFFF", null).pos(30, 50); this.createLabel("#00FFFF", null).pos(290, 50); this.createLabel("#FFFF00", "#FFFFFF").pos(30, 100); this.createLabel("#000000", "#FFFFFF").pos(290, 100); this.createLabel("#FFFFFF", "#00FFFF").pos...
来源: Laya2.0_示例 发布时间: 20251130
...) { this.createText('left', null, 100, 10); this.createText('center', "#00BFFF", 155, 150); this.createText('right', "#FF7F50", 210, 290); } createText(align, underlineColor, x, y) { const Text = Laya.Text; let txt = new Text(); Laya.stage.addChild(txt); txt.text = "Layabox\n是HTML5引擎技术提...
来源: Laya2.0_示例 发布时间: 20251130
... = null; // 不支持WebGL时自动切换至Canvas Config.preserveDrawingBuffer =true; Laya.init(Browser.clientWidth, Browser.clientHeight); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_FIXED_AUTO; Laya.stage.bgColor = "#232628"; ...
来源: Laya2.0_示例 发布时间: 20251130
...r radiusY = Math.tan(180 / Math.PI * 30) * radiusX; // 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, radius...
来源: Laya2.0_示例 发布时间: 20251130
...a.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("res/sounds/btn.mp3", 1, new Lay...
来源: Laya2.0_示例 发布时间: 20251130