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

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

141. 粘贴的3D自定义shader示例代码,运行报找不到u_texture [ 88%]

粘贴的3D自定义shader示例代码,运行报找不到u_texture 粘贴的3D自定义shader示例代码,且添加了CustomMaterial.js,可以运行,但是运行报找不到u_texture,   http://layaair.ldc.layabox.com/demo/?D3Advance_CustomShaderAndMaterial   自定义shader示例 附...

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

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

...on 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 fun...

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

143. 截屏功能,添加Texture对象报错 [ 88%]

截屏功能,添加Texture对象报错 按照官方教程编写的截屏功能,代码如下所示。 在sp内addChild失败,(未报错,图内可以看到打印出来sp子节点为空)。添加进Stage报错Failed to execute 'bindTexture' on 'WebGL2RenderingContext': parameter 2 is not o...

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

144. 如何获取图片每个像素点的RGB? [ 87%]

... Game_Parameter.game_height, 0, 0); //把精灵绘制到canvas上面let my_texture: Texture = new Texture(my_canvas); //使用htmlCanvas创建Texture let pixels = my_texture.getPixels(700, 8, 10, 1); //得到像素点   2018-01-07 2 0 分享 微博 QZONE 微信 cuixueying 赞同来自: layaAir下...

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

145. Laya.loader.load(xx) 当地址""的时候,会报错。 [ 87%]

...rl,Laya.Handler.create(this,()=>{             let tur:Laya.Texture = Laya.loader.getRes(cg_url);             if(tur)img_cg.graphics.drawImage(tur)         }),null,Laya.Loader.IMAGE);    这段代码, 当 cg_url等于“”的时候,底层判断会走到这...

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

146. 粘贴的3D自定义shader示例代码,运行报找不到u_texture [ 87%]

粘贴的3D自定义shader示例代码,运行报找不到u_texture 粘贴的3D自定义shader示例代码,且添加了CustomMaterial.js,可以运行,但是运行报找不到u_texture,   http://layaair.ldc.layabox.com/demo/?D3Advance_CustomShaderAndMaterial   自定义shader示例 2017-...

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

147. 麻烦给一个watermaterial的示例,我自己调的没法看 [ 87%]

..., var customMaterial6=new Laya.WaterMaterial(); customMaterial6.deepColorTexture=new Laya.Texture2D.load("water/WaterSimple.jpg"); customMaterial6.detailTexture=new Laya.Texture2D.load("water/Water2.jpg"); customMaterial6.diffuseTexture=new Laya.Texture2D.load("water/Water2.jpg"); customMaterial6....

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

148. 怎么裁剪一张图片 [ 87%]

...请: 与内容相关的链接 提交 1 个回复 Laya_Aaron 赞同来自: texture类里有 create 方法    /**          * 根据指定资源和坐标、宽高、偏移量等创建 <code>Texture</code> 对象。          * @param   source 绘图资源 img 或者 Text...

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

149. 帮忙看看Texture类getPixels内存泄漏的问题。 [ 87%]

帮忙看看Texture类getPixels内存泄漏的问题。 请帮忙看看这个demo,Texture类方法getPixels导致内存泄漏。 用的引擎版本是1.7.16beta。package { import laya.display.Sprite; import laya.events.Event; import laya.maths.Point; import laya.resource.HTMLCanvas; import laya....

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

150. 图层叠加的实现 [ 87%]

图层叠加的实现 我用 var ape:Sprite = new 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.draw...

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