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

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

261. Sprite-显示图片 [ 74%]

...a.loader.getRes("../../res/apes/monkey2.png"); var ape = new Sprite(); ape.graphics.drawTexture(t, 0, 0); Laya.stage.addChild(ape); ape.pos(200, 0); })); } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Texture = Laya.Texture; import Browser = Laya.Browser; import ...

来源: Laya_示例 发布时间: 20251209

262. 在 move 的时候绘制线,但每次只存在一条 [ 74%]

...;绘制图形以后,怎么删除释放资源? 怎么检测点是否在 graphics所绘制的区域内 如何获取Sprite上用graphics.drawTexture绘制的texture? 小游戏开放数据域下使用Laya.List绘制了排行榜,但是触摸没有滚动响应 使用滤镜、遮罩、或者绘制...

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

263. 关于WebGL矢量图的遮罩问题 [ 74%]

...Sprite() sprite.mask = mask Laya.stage.addChild(sprite) //正方形 sprite.graphics.drawPoly(0, 0, [100, 100, 100, 200, 200, 200, 200, 100], "#ffffff") //一挑粗直线 遮挡正方形的左半部分 mask.graphics.drawLines(0, 0, [100, 150, 150, 150], "#ff0000", 200) // drawPoly在WebGl下遮罩又...

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

264. 鼠标画线的问题 [ 74%]

... 2018-01-09 0 0 分享 微博 QZONE 微信 qian 赞同来自: 可以使用graphics绘制线条试一下 2018-01-09 0 0 分享 微博 QZONE 微信 fool_tiger 赞同来自: 我是用的graphics这个绘制,刚才说的鼠标位置问题也解决了,现在还剩下鼠标画线动作与panel组件...

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

265. 图片显示好奇怪 [ 74%]

... texture:Texture=Loader.getRes('logo.png'); var sp:Sprite=new Sprite(); sp.graphics.clear();//把上次的绘制清除 sp.graphics.drawTexture(texture); Laya.stage.addChild(sp); } 2017-05-05 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人...

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

266. 输入设备-贪吃蛇(重力感应) [ 74%]

... height) { 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 + Ma...

来源: Laya_示例 发布时间: 20251209

267. laya.display.Animation_API3.0 [ 74%]

...nu Globals "laya/display/Animation" Animation Class Animation Animation 是Graphics动画类。实现了基于Graphics的动画创建、播放、控制接口。 本类使用了动画模版缓存池,它以一定的内存开销来节省CPU开销,当相同的动画模版被多次使用时,相比...

来源: Laya3.0_api 发布时间: 20231115

268. 关于Matter的初始化问题 [ 74%]

...ainer(render) { var con = render.container; spriteCon = new Laya.Sprite(); graphicsCon = new Laya.Sprite(); render.spriteContainer = spriteCon; render.graphicsContainer = graphicsCon; con.addChild(spriteCon); con.addChild(graphicsCon); graphics = graphicsCon.graphics; } 现在con这个是undefined...

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

269. 想用camera做一个类似照相机的功能 [ 74%]

...     this.imgSp = new Sprite();             this.imgSp.graphics.clear();             this.imgSp.cacheAs = "bitmap";             Laya.stage.addChild(this.imgSp);             this.imgSp.graphics.drawTexture(rtex); 2020-06-02 0 0 分享 微博 Q...

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

270. 关于webGL下遮罩效率问题 [ 74%]

...试试下面的例子 代码如下: var spr:Sprite = new Sprite(); spr.graphics.drawCircle(0,0,100,"#ff0000"); spr.mask = new Sprite(); Laya.stage.frameLoop(1, null, drawMask); var index:int = 0; function drawMask():void { index++; if(index > 72) index = index-72; var angle:int = index*5; spr.m...

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