大约有 176 项符合查询结果, 库内数据总量为 30,935 项。 (搜索耗时: 0.0041 秒)
Laya_社区(90) Laya3.0_api(61) Laya2.0_文档(7) Laya2.0_示例(6) Laya_示例(5) Laya3.0_文档(5) laya_api(1) Laya2.0_api(1)
...amp;& (i = 0); //清除sp节点的所有绘图(不含子节点) sp.graphics.clear(); //在sp节点上重绘纹理 sp.graphics.drawTexture(res[i]); i++; }); }); } } 2.2 可带类型的多资源加载方式 假如,多数资源不需要带类型,有的资源又需要用类型区别,该如...
来源: Laya3.0_文档 发布时间: 20240910
... 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
...游戏开发基础,本篇从API到示例分别介绍Sprite.loadImage与Graphics.drawTexture两种显示图片的方法。 ## 1、用loadImage方法显示与切换图片 ### 1.1 loadImage API概述 在API文档中搜索laya.display.Sprite,可以找到loadImage()方法,如图1所示,我们先...
来源: Laya2.0_文档 发布时间: 20210715
...游戏开发基础,本篇从API到示例分别介绍Sprite.loadImage与Graphics.drawTexture两种显示图片的方法。 ## 1、用loadImage方法显示与切换图片 ### 1.1 loadImage API概述 在API文档中搜索laya.display.Sprite,可以找到loadImage()方法,如图1所示,我们先...
来源: Laya2.0_文档 发布时间: 20210715
...rivate function 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:Sprit...
来源: Laya_社区 发布时间: 20170628
...prite(); this.bar = new Sprite(); this.bar.x = 15; this.bar.y = 2; this.bg.graphics.drawTexture(texture1, 0, 0, 180, 21); this.bar.graphics.drawTexture(texture2, 0, 0, 155, 12); this.addChild(this.bg); this.addChild(this.bar); } /** * 修改当前状态 */ _proto.changeValue = function(value){ this....
来源: Laya_社区 发布时间: 20160803
...通过手指的移动去绘制线条 下面是部分代码 this.cutLayer.graphics.clear(); for(i = this.lines.length - 1; i >= 0; i--){ var line = this.lines[i]; line.state++; if(line.state > 7){ this.lines.splice(i, 1); } this.cutLayer.graphics.drawLine(line.x1, line.y1, line.x2, line.y2, "#f...
来源: Laya_社区 发布时间: 20180411
layaAir真的没办法做涂鸦板? 我用sp.graphics.drawLines方法做了个鼠标画线,确实是连续画的时间长了,就会很卡,在平板上尤其明显,画两三条线之后就不行了,没办法解决吗?用JS原生的画线方法怎么能加载我的内容上呢,我是...
来源: Laya_社区 发布时间: 20180510
...testSp = new Laya.Sprite(); testSp.width = 200; testSp.height = 50; testSp.graphics.clear(); testSp.graphics.drawRect(0, 0, testSp.width, testSp.height,'#FF0000'); let tmpMask = new Laya.Sprite(); tmpMask.width = testSp.width; tmpMask.height = testSp.height; tmpMask.graphics.clear(); tmpMask.graphic...
来源: Laya_社区 发布时间: 20200421
...问题 private label_image:Laya.Sprite=new Laya.Sprite(); this.label_image.graphics.fillText(xxx, xxx,"15px Arial","#000000","center"); this.label_image.pos(0,0) Laya.stage.addChild(this.label_image); 这样写为什么CurMem会增加接近16M,这不就是在精灵上绘制嘛,简单来说就...
来源: Laya_社区 发布时间: 20180425