• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 73 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0034 秒)

41. 刮刮卡效果实现 [ 71%]

...seX = ape.mouseX; } }else{ mouseX = ape.mouseX; } interactionArea.graphics.drawCircle(ape.mouseX, ape.mouseY, 20, "#000000"); } 效果如下   附件 : --> 2017-06-15 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回...

来源: Laya_社区 发布时间: 20170615

42. graphics如何实现橡皮擦效果 [ 71%]

...式,抠除上面红色区域 var circle = new Sprite(); circle.graphics.drawCircle(0, 0, 50, "#000"); circle.pos(50, 50); // 设置叠加模式 circle.blendMode = "destination-out"; box.addChild(circle);   实现了擦除red节点的内容擦除  但是无法在擦除后的位置重新绘图  ...

来源: Laya_社区 发布时间: 20170707

43. iOS环境浏览器使用mask黑屏 [ 70%]

...rite(); private _testMask() { this._sp.graphics.clear(); this._sp.graphics.drawCircle(100, 100, 50, '#ffffff'); Laya.timer.once(3000, this, () => { this.img.mask = this._sp; }) }之后编译项目 2. 使用iphone手机的safari扫码功能运行项目 3秒中之后必现黑屏 手机型号: iph...

来源: Laya_社区 发布时间: 20191215

44. 关于新手引导 [ 70%]

...Handler); } private function moveHandler():void { interactionArea.graphics.drawCircle(Laya.stage.mouseX, Laya.stage.mouseY, 30, "#ff0000"); } private function upHandler():void { trace("KouTu.upHandler()"); // box.stopDrag(); gameContainer.off(Event.MOUSE_MOVE, this, moveHandler); } private function ...

来源: Laya_社区 发布时间: 20170315

45. CPU优化方式(ActionScript-2D进阶篇(AS3)-性能优化) [ 70%]

...e = Stage.FRAME_SLOW;    var sp:Sprite = new Sprite(); sp.graphics.drawCircle(0, 0, 20, "#990000"); Laya.stage.addChild(sp);    Laya.stage.on(Event.MOUSE_MOVE, this, function() {     sp.pos(Laya.stage.mouseX, Laya.stage.mouseY); }); ``` ​ ![图片1.png](img/1.png) ​ (图1...

来源: Laya2.0_文档 发布时间: 20210715

46. 设置遮罩(TypeScript-LayaAir基础篇(TS)-位图) [ 69%]

... = new Laya.Sprite(); //画一个圆形的遮罩区域 this.cMask.graphics.drawCircle(80,80,50,"#ff0000"); //圆形所在的位置坐标 this.cMask.pos(120,50); //实现img显示对象的遮罩效果 this.img.mask = this.cMask; } } new MaskDemo(); ``` 运行效果如图3所示: ![图3](img/3.jpg) ...

来源: Laya2.0_文档 发布时间: 20210715

47. CPU优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 69%]

...age.frameRate=Laya.Stage.FRAME_SLOW; var sp=new Laya.Sprite(); sp.graphics.drawCircle(0,0,20,"#990000"); Laya.stage.addChild(sp); Laya.stage.on(Laya.Event.MOUSE_MOVE,this,function() { sp.pos(Laya.stage.mouseX,Laya.stage.mouseY); }); ``` ![图片1.png](https://official.layabox.com/laya_data/Chinese/L...

来源: Laya2.0_文档 发布时间: 20210714

48. (最新版ide和库已经测试)iOS环境浏览器使用mask黑屏 [ 69%]

...rite(); private _testMask() { this._sp.graphics.clear(); this._sp.graphics.drawCircle(100, 100, 50, '#ffffff'); Laya.timer.once(3000, this, () => { this.img.mask = this._sp; }) }之后编译项目 2. 使用iphone手机的safari扫码功能运行项目 3秒中之后必现黑屏 手机型号: iph...

来源: Laya_社区 发布时间: 20191216

49. CPU优化方式(JavaScript-2D进阶篇(JS)-性能优化) [ 68%]

...ya.stage.frameRate=Stage.FRAME_SLOW; var sp=new Laya.Sprite(); sp.graphics.drawCircle(0,0,20,"#990000"); Laya.stage.addChild(sp); Laya.stage.on(Event.MOUSE_MOVE,this,function() { sp.pos(Laya.stage.mouseX,Laya.stage.mouseY); }); ``` ![图片1.png](https://official.layabox.com/laya_data/Chinese/LayaAi...

来源: Laya2.0_文档 发布时间: 20210715

50. WebGL模式下用遮罩实现圆形头像会有警告出现 [ 68%]

...; this.img.loadImage("url"); const mask = new Laya.Sprite(); mask.graphics.drawCircle(75, 75, 75, "#ffffff"); this.img.mask = mask; this.img.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.stage.addChild(this.img); 附件 : --> 2017-01-06 添加评论 免费帖 --> 分享 微博 QZONE 微信 ...

来源: Laya_社区 发布时间: 20170106