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

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

1. 分享:Graphics下cmds命令流的使用! [ 100%]

...纹理 var box:Sprite=new Sprite(); Laya.stage.addChild(box); box.graphics.drawTexture(texture1,50,50,0,0,new Matrix(),0.5); box.graphics.drawTexture(texture2,200,50,0,0,new Matrix(),0.5); box.graphics.drawTexture(texture3,350,50,0,0,new Matrix(),0.5); box.graphics.drawTexture(texture4,500,50,0,0,ne...

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

2. graphics使用matrix的异常情况 [ 97%]

...getRes("../../res/apes/monkey2.png"); var ape = new Sprite(); ape.graphics.drawTexture(t, 0, 0); ape.graphics.scale(1.01, 1) Laya.stage.addChild(ape); ape.pos(200, 0); })); 上面这段代码并没有得到图片缩放的效果,看到的现象是图片一直在往左移动 2017-06-09 添加评论 ...

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

3. 图层叠加的实现 [ 93%]

...w Sprite(); var t:Texture = Laya.loader.getRes("res/bg.png"); ape.graphics.drawTexture(t,0,0); var t1:Texture = Laya.loader.getRes("res/wzq.png"); ape.graphics.drawTexture(t1,0,0); var t2:Texture = Laya.loader.getRes("res/rkfb.png"); ape.graphics.drawTexture(t2,0,0); var t3:Texture = Laya.loader.get...

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

4. 关于Laya.loader.load和getRes的问题 [ 93%]

... 以下是原文的代码,也是我疑问的地方:// 方法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

5. getimagedata直接调用无法获取有效像素问题 [ 87%]

...Browser.canvas.size(width,height); Browser.canvas.clear(); Browser.context.drawTexture(this,-x,-y,this.width,this.height,0,0); var info=Browser.context.getImageData(0,0,width,height); } return info.data; }上面是 getpixels 的实现, 问题1: 为什么直接调用 Browser.context.getImageData ...

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

6. graphics 问题 [ 86%]

...微博 QZONE 微信 cuixueying 赞同来自: 你把drawImage改成graphics.drawTexture吧 1、drawImage不确定是什么时候加载完成 2、transform的设置必须在绘图命令之前 所以,会出现save后,显示对象的transform设置无效,改成texture就OK了! 2017-06-12 0 0 分...

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

7. hBox使用问题 [ 85%]

...500,Ease.sineOut); var bl:Number=texture.width/texture.height ape.graphics.drawTexture(texture,0,0,stageWidth/4,stageWidth/4/bl); apesCtn.addChild(ape); } } 这种方法HBox布局不管用,是不是不能用graphics.drawTexture方法,如果用addChild方法加载Loader.getRes(picAy[i])这个数...

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

8. Panel中添加图片无法显示,文本可以 [ 85%]

..."comp/image.png");     var ape1 = new Laya.Sprite();     ape1.graphics.drawTexture(t, 0, 0);     Laya.stage.addChild(ape1);     //面板     var panel = new laya.ui.Panel();     panel.width = 500;     panel.height = 500;     panel.x = 200;     var label = new laya.ui.Label();    ...

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

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

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

10. 图片遮罩大小跟设置不一致 [ 80%]

...hild(ape); ape.loadImage("../../res/apes/monkey3.png"); // 方法2:使用drawTexture Laya.loader.load("https://s2.d2scdn.com/2017/12/ ... ot%3B, Handler.create(this, function() { var t = Laya.loader.getRes("https://s2.d2scdn.com/2017/12/ ... 6quot;); var ape = new Sprite(); ape.scaleX = 0.5 ape.sc...

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