大约有 1,142 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0055 秒)
Laya_社区(993) Laya3.0_api(66) Laya_示例(33) Laya2.0_示例(32) Laya2.0_文档(6) laya_api(4) Laya3.0_文档(4) Laya2.0_api(4)
...sprite添加click监听事件反应迟钝 代码如下,如果用drawyuan.graphics.drawCircle(0,0,50,"#232628");则会点击反应非常迟钝,如果用loadimg的话,反应很快; function drawCirle() { var drawyuan = new Laya.Sprite(); // drawyuan.graphics.drawCircle(0,0,50,"#232628");//反...
来源: Laya_社区 发布时间: 20170905
...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
...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_示例 发布时间: 20251209
...图集能清除掉么? private function onLoad(tex:Texture):void { var g:Graphics = new Graphics(); g.drawTexture(tex, 0, 0); _s.graphics = g; Laya.timer.once(2000, this, onClear); } private function onClear():void { _s.graphics.clear(); _s.destroy(true); _s.removeSelf(); _s...
来源: Laya_社区 发布时间: 20170222
...= 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_示例 发布时间: 20251209
...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
...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_示例 发布时间: 20251209
...nt.MOUSE_MOVE, this, mousemove); function mousemove(e) { drawLayer.graphics.drawCircle(e.target.mouseX,e.target.mouseY,20,"#ffffff") drawLayer.cacheAsBitmap; } 我的思路是每一次move都把对应的圆形区域绘制到一个容器上,这样一来drawcall就不会一直增加...
来源: Laya_社区 发布时间: 20160725
... = 0 Laya.timer.loop(100, this, () => { if (r >= 360) r = 0; r++; sp.graphics.clear(true); sp.graphics.drawPie(0, 0, 50, 0, r, "#00ff1e"); sp2.graphics.clear(true); sp2.graphics.drawPie(0, 0, 50, 0, r, "#00ff1e"); }) 附件 : --> test.zip 2019-07-01 添加评论 免费帖 --> 分享 微博 QZO...
来源: Laya_社区 发布时间: 20190701
... 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_示例 发布时间: 20251209