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

大约有 303 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0045 秒)

21. 分享:改变图片皮肤,保持图片原样宽高显示 [ 84%]

...nction onClick():void { image.skin="bg.jpg"; } } }方法2:使用graphics.drawTexture的方式】 package { import laya.display.Sprite; import laya.events.Event; import laya.net.Loader; import laya.resource.Texture; import laya.utils.Handler; public class LayaAirDemo { private var sp:Sprite; public...

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

22. 关于Laya.loader.load和getRes的问题 [ 83%]

... 以下是原文的代码,也是我疑问的地方:// 方法2:使用drawTexture Laya.loader.load("../../../../res/apes/monkey2.png", Handler.create(this, function():void { var t:Texture = Laya.loader.getRes("../../../../res/apes/monkey2.png"); var ape:Sprite = new Sprite(); ape.graphics.drawTe...

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

23. 在父sprite中添加子sprite ,移动父Sprite 子sprite为什么动? [ 83%]

...l].y, data.angel[angelLel].w , data.angel[angelLel].h); this.ball.graphics.drawTexture(tBall, 0,0,548,305); this.tower.graphics.drawTexture(tTower, 0, 0, data.tower[towerLel].w , data.tower[towerLel].h); this.aeroboat.graphics.drawTexture(tAeroboat,0,0, data.aeroboat.w, data.aeroboat.h); this.mounta...

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

24. drawTexture能否支持自定义滤镜,或者发光、颜色滤镜 [ 82%]

drawTexture能否支持自定义滤镜,或者发光、颜色滤镜 目前,laya.display.Sprite.graphics的函数drawTexture函数,支持滤镜,能否开发支持?如果可以支持自定义滤镜就更好,当然如果没办法的话,那可以支持常用滤镜,发光滤镜,颜...

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

25. laya.display.Graphics [ 82%]

...lineColor:* = null, lineWidth:Number = 1):void 绘制矩形。 Graphics  drawTexture(tex:Texture, x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0, m:Matrix = null, alpha:Number = 1):Array 绘制纹理。 Graphics  drawTextures(tex:Texture, pos:Array):void 批量绘制同样纹理...

来源: laya_api 发布时间: 20170929

26. 新人求教!!! [ 82%]

...xture = Laya.loader.getRes(imgUrl);   //绘制纹理   this.img.graphics.drawTexture(texture);   //设置纹理宽高   this.img.size(texture.width, texture.height); <!--  我想把加粗部分换成  this.img.graphics.drawTexture(Laya.loader.getRes(imgUrl),100,50,60,60);   为什么就...

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

27. Sprite-切换纹理 [ 81%]

...aphics.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 Stage = Laya.Stage; import Texture = Laya.Texture; import Handler = Laya.Hand...

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

28. 图片已加载,却无法显示图片, [ 81%]

...法显示图片, 使用loadIMage可以显示图片,但使用graphics.drawTexture()却无法显示图片(图片已经预加载了),求解,是最新的layaair引擎支持graphics.drawTexture()的方法了? 2017-01-17 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到...

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

29. drawTexture时,Matrix对象,a=-1,无法实现水平翻转 [ 80%]

drawTexture时,Matrix对象,a=-1,无法实现水平翻转 g.drawTexture(texture,100, 100, texture.width, texture.height, new laya.maths.Matrix(-1)); 为何无法实现水平翻转? 绘制的图片直接看见了,如果设置matrix.a = -1就会出现。 2017-02-21 添加评论 免...

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

30. 使用graphsics.drawTexture画出来的图片与使用button创建同样宽高图形竟然重合?? [ 80%]

使用graphsics.drawTexture画出来的图片与使用button创建同样宽高图形竟然重合?? 我使用一个Button创建的按钮,和使用 this.sprite_show = new Laya.Sprite(); this.sprite_show.graphics.drawTexture(Laya.loader.getRes(this.resStr), 0, 0, this.width, this.height); 画...

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