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

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

101. laya2.0 截图功能分享,直接截取屏幕上所有对象 [ 84%]

...戏正常可用 private static _sp: Laya.Sprite = null; private static tempTexture2D: Laya.Texture2D; private static tempTexture: Laya.Texture; /**截图 */ public static drawScreenshot(width, height, x, y) { if (!SwitchHelper.screenDraw) { return null; }  if (!this.tempTexture2D) { this.tempTextur...

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

102. Sprite-屏幕截图 [ 84%]

...; this.aimSp = null; this.drawImage = null; this.drawSp = null; this.monkeyTexture = null; // 不支持WebGL时自动切换至Canvas Config.preserveDrawingBuffer =true; Laya.init(Browser.clientWidth, Browser.clientHeight); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTE...

来源: Laya2.0_示例 发布时间: 20260106

103. Sprite中的width,height和size(width,height)感觉没作用啊 [ 84%]

...变加载图片的大小是无效的,不过你可以通过先clear在drawTexture的方法设置下,代码如下: var sprite = new laya.display.Sprite(); sprite.loadImage("comp/bg.png",0,0,0,0,Handler.create(this,function(texture:laya.resource.Texture){         sprite.graphics.clear();  ...

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

104. 3D+2D场景截屏,在不同浏览器显示效果不一致 [ 84%]

...如图三),代码如下: public drawScreenshot(): void { if (!this.tempTexture2D) { this.tempTexture2D = new Laya.Texture2D(1280,720); } if (!this.tempTexture) { this.tempTexture = new Laya.Texture(this.tempTexture2D); } // Laya.timer.once(110, this, function(){ let cans = Laya.Browser.document....

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

105. CPU优化方式(ActionScript-2D进阶篇(AS3)-性能优化) [ 84%]

...d("res/apes/monkey2.png", Handler.create(this, function() {     var texture:Texture = Laya.loader.getRes("res/apes/monkey2.png");     var sp:Spirte = new Sprite();     sp.graphics.drawTexture(texture, 0, 0);     sp.size(texture.width, texture.height);     Laya.stage.a...

来源: Laya2.0_文档 发布时间: 20210715

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

在开启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

107. 发布ios,sprite无法设置宽高 [ 84%]

...构建app,native:2.0.3),三,创建一个sprite,设置默认的texture,修改texture后,新建一个sprite,获取全部属性,包括资源路径,但是显示的始终是默认的texture(可提供deme,是项目中遇到的,可以私发) Laya_Aaron • 2019-04-02 21:08 新...

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

108. 请问物理引擎为什么设置body的透明度无效 [ 84%]

...透明度,但是设置无效? 2 在body的render属性下有个sprite有个texture是设置纹理,但是在初始化后无法重置为其他图片纹理? 2018-06-11 添加评论 已悬赏5元 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 3 个回...

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

109. laya2.3图集含空白裁切后,锚点旋转bug,demo重现 [ 84%]

...相关的链接 提交 3 个回复 18857358473 赞同来自: var tx3:Laya.Texture = Laya.loader.getRes("test2.png");         var sp3:Laya.Sprite = new Laya.Sprite();         sp3.texture = Laya.Texture.create(tx3,0,0,315,315,134,134,582,582);          sp3.pivot(315/2,315/2);//...

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

110. 在父sprite中添加子sprite ,移动父Spritesprite为什么不动? [ 84%]

... // 图片加载 var t = Laya.loader.getRes("res/island.png"); var tBall = Texture.create(t,866,190,548,305); var tTower = Texture.create(t,data.tower[towerLel].x,data.tower[towerLel].y,data.tower[towerLel].w,data.tower[towerLel].h); var tAeroboat = Texture.create(t,data.aeroboat[aeroboatLel].x , da...

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