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

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

1. 在开启webgl模式下,每次运行texture类的getPixels方法内存都会增加 [ 100%]

在开启webgl模式下,每次运行texture类的getPixels方法内存都会增加 我使用的版本是1.7.12 测试代码如下:module Main { import Sprite = Laya.Sprite import Texture = Laya.Texture import Handler = Laya.Handler export class MaskDemo { private Res: string; private img: Laya....

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

2. 动态创建img 或 sprite [ 99%]

...擎 动态创建img 或 sprite let dd = new Laya.Sprite(); dd.graphics.drawTexture(this.img.texture, 0, 0, 750, 1334); dd.x = 50; dd.y = 50; this.addChild(dd);   this.img 绝对不为空,我想用一个sprite来画它,请问什么画(不是拷贝)?   2018-01-24 添加评论 免费帖 -->...

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

3. 新人求教!!! [ 99%]

...g = !this.flag)? this.monkey2:this.monkey1;   //获取图片资源   var texture:Laya.Texture = Laya.loader.getRes(imgUrl);   //绘制纹理   this.img.graphics.drawTexture(texture);   //设置纹理宽高   this.img.size(texture.width, texture.height); <!--  我想把加粗部分换成  ...

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

4. drawTexture 画出来的数据会有以前的数据 [ 99%]

drawTexture 画出来的数据会有以前的数据 private var iconSpr:Sprite; private var htmlCanvas:HTMLCanvas; private var texture:Texture; private var xNum:int = 0; private var yNum:int = 0; private var img:Image; public function TestView() { img = new Image("comp/lhjicon_5.png"); img.x = 640;...

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

5. 请问graphics.drawTexture(texture)中如何增加一个matrix,只显示图中的一个圆形区域 [ 98%]

请问graphics.drawTexture(texture)中如何增加一个matrix,只显示图中的一个圆形区域 请问graphics.drawTexture(texture)中如何增加一个matrix,只显示图中的一个圆形区域 我可以另外建一个圆形比如 var mapMask = new Laya.Sprite(); mapMask.size(100,100); ma...

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

6. drawToTexture 绘制函数不工作呢 [ 97%]

drawToTexture 绘制函数不工作呢           let top_rect: Laya.Sprite = new Laya.Sprite();         top_rect.x = 0;         top_rect.y = 0;         top_rect.size(100, 100);         top_rect.graphics.drawRect(0, 0, 100, 100, "#0000FF", "#000000", 1);   ...

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

7. image.drawToCanvas方法获取的一直是空的png [ 93%]

... laya.display.Stage; import laya.resource.HTMLCanvas; import laya.resource.Texture; import laya.ui.Image; import laya.utils.Handler; import laya.webgl.WebGL; public class LayaAirDemo { private var img:Image; public function LayaAirDemo() { Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_...

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

8. Laya.loader.load 教程代码出错 [ 92%]

...ay.Sprite;     import laya.utils.Handler;     import laya.resource.Texture;     public class LayaSample {         private var img:Sprite ;         private var index:int ;         public function LayaSample() {             //初始化引擎       ...

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

9. Image [ 92%]

...age var img___=new Image(); html的 image标签 怎么才能转换成 laya.texture     var img___=new Image();         img___.src="res/card/select_main_card_bg.png"         img___.onload = function(){             var image = new Laya.Image()             image.source = img___  ...

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

10. 图片如何切割 AS3 [ 91%]

...法调用顺序错了 正确顺序: var img:Image = new Image();  var t:Texture = Laya.loader.getRes(_resUrl); img.graphics.save();//必须要调用 否则报错  img.graphics.clipRect(100,100,200,200);  img.graphics.drawTexture(t);  img.graphics.restore();  this.addChild(img); 2019-01-11 0 0 ...

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