大约有 584 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0045 秒)
Laya_社区(419) Laya3.0_api(61) Laya2.0_示例(32) Laya_示例(31) Laya2.0_文档(30) Laya3.0_文档(8) laya_api(2) Laya2.0_api(1)
...; this.img.loadImage(this.plane1); Laya.stage.addChild(this.img); this.img.graphics.clear(); this.img.loadImage(this.plane2); Laya.stage.addChild(this.img) } } new Main(); 出来的结果是两张图合并到了一起, 于是我再尝试 constructor() { Laya.init(1000,800); this.img = new Laya.Spr...
来源: Laya_社区 发布时间: 20180406
... 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
...unction CreateBtn(xx:int,yy:int):Sprite { var btn:Sprite=new Sprite(); btn.graphics.drawRect(0,0,200,50,"#FF0000"); btn.pos(100,400); var text:Text=new Text(); text.text="Draw"; btn.addChild(text); Laya.stage.addChild(btn); btn.size(200,50); return btn; } //点击DrawToCanvas按钮,进行截屏 pr...
来源: Laya_社区 发布时间: 20170822
...ask则正常显示。 let bigMask:Laya.Sprite = new Laya.Sprite(); bigMask.graphics.drawRect(0, 0, 300, 200, "#ffffff"); this.mask = bigMask; // let imgMask:Laya.Sprite = new Laya.Sprite(); imgMask.graphics.drawRect(0, 0, 100, 300, "#ffffff"); this.img.mask = imgMask; Laya.Tween.to(this.img, {x:100}...
来源: Laya_社区 发布时间: 20190722
...Event; const w = 50; const h = 30; this.button = new Sprite(); this.button.graphics.drawRect(0, 0, w, h, "#FF7F50"); this.button.pivot(w / 2, h / 2); //设置宽高(要接收鼠标事件必须设置宽高,否则不会被命中) this.button.size(w, h); this.button.x = (Laya.stage.width - TrackL...
来源: Laya2.0_示例 发布时间: 20241118
...e.addChild(mLabelSprite); mLabelSprite.pos(mStartX, mStartY); mLabelSprite.graphics.fillText(tEventData.name, 0, 0, "20px Arial", "#ff0000", "center"); Tween.to(mLabelSprite, { y: mStartY - 200 }, 1000, null, Handler.create(this, this.playEnd)) } playEnd() { mLabelSprite.removeSelf(); } } new Skelet...
来源: Laya2.0_示例 发布时间: 20241118
...esult; } onTweenComplete() { this.evalBgColor(); } renderBg() { Laya.stage.graphics.clear(); Laya.stage.graphics.drawRect( 0, 0, phoenixWidth, phoenixHeight, this.getHexColorString()); } getHexColorString() { bgColorChannels.r = Math.floor(bgColorChannels.r); // 绿色通道使用0 bgColorChannels.g...
来源: Laya2.0_示例 发布时间: 20241118
...createSprtie() { const w = 50; const h = 30; button = new Sprite(); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.pivot(w / 2, h / 2); //设置宽高(要接收鼠标事件必须设置宽高,否则不会被命中) button.size(w, h); button.x = (Laya.stage.width - TrackLength) / 2; but...
来源: Laya_示例 发布时间: 20241118
...ask则正常显示。 let bigMask:Laya.Sprite = new Laya.Sprite(); bigMask.graphics.drawRect(0, 0, 300, 200, "#ffffff"); this.mask = bigMask; // let imgMask:Laya.Sprite = new Laya.Sprite(); imgMask.graphics.drawRect(0, 0, 100, 300, "#ffffff"); this.img.mask = imgMask; Laya.Tween.to(this.img, {x:100}...
来源: Laya_社区 发布时间: 20190722
...tion onTweenComplete() { evalBgColor(); } function renderBg() { Laya.stage.graphics.clear(); Laya.stage.graphics.drawRect( 0, 0, phoenixWidth, phoenixHeight, getHexColorString()); } function getHexColorString() { bgColorChannels.r = Math.floor(bgColorChannels.r); // 绿色通道使用0 bgColorChanne...
来源: Laya_示例 发布时间: 20241118