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

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

1. 为模型指定地形材质报错 [ 100%]

...aterial = new Laya.TerrainMaterial(); terMaterial.diffuseTexture1=new Laya.Texture2D.load("map2.png"); terMaterial.diffuseTexture2=new Laya.Texture2D.load("map2.png"); terMaterial.diffuseTexture3=new Laya.Texture2D.load("map2.png"); terMaterial.diffuseTexture4=new Laya.Texture2D.load("map2.png"); te...

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

2. Laya.Loader.getRes("xxx.png")取出来的资源为什么是Texture2D,不是Texture [ 94%]

Laya.Loader.getRes("xxx.png")取出来的资源为什么是Texture2D,不是Texture 两张图片,一张取出来是Texture。 另一张却是Texture2D 版本 Laya 2.4.0.1600   这是一个图集动画,第一次加载显示没问题,是在第二次的时候出了问题。   播放流程:第...

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

3. texture2D的setPixel纹理rgba数据之后会随着窗口的缩放,渐变成黑色 [ 94%]

texture2D的setPixel纹理rgba数据之后会随着窗口的缩放,渐变成黑色 export class Texture2dTest { private sprite3D:Laya.Sprite3D; private readonly AllPng:string[] = ["pic-001.png","output-06.png"]; private texture:Laya.Texture2D; private box; constructor(){ Laya3D.init(0, 0); Laya.s...

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

4. 二进制文件打包后,读取不到zip包内的文件 [ 93%]

...     console.log('res,', (typeof res))             Laya.Texture2D.load("res/layabox.png", Laya.Handler.create(null, function (tex: Laya.Texture2D) {                 material.albedoTexture = tex;                 let item = 'res/layabox.png'...

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

5. 怎么给从模型生成的地形TerrainMaterial材质??? [ 92%]

...aterial = new Laya.TerrainMaterial(); terMaterial.diffuseTexture1=new Laya.Texture2D.load("map2.png"); terMaterial.diffuseTexture2=new Laya.Texture2D.load("map2.png"); terMaterial.diffuseTexture3=new Laya.Texture2D.load("map2.png"); terMaterial.diffuseTexture4=new Laya.Texture2D.load("map2.png"); te...

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

6. 写了个边缘光的自定义shader,有很多问题,帮忙看一下 [ 92%]

...seTexture为什么不起作用?? customMaterial.setDiffuseTexture(Laya.Texture2D.load("qiu/Texture2.png")); @asanwu 2017-05-25 0 0 分享 微博 QZONE 微信 183*****755 赞同来自: 1.fbx暂时停止维护,现在全部的精力投入unity研究开发; 2.可以打开球的材质文件,查...

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

7. 求个arraybuffer转texture2D [ 89%]

求个arraybuffer转texture2D HTMLImage create之后找不到onload方法,请问有什么方法 2018-10-31 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_Aaron 赞同来自: 没有 2018-11-19 0 0 分享 ...

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

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

...erial6=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.foamTexture=new L...

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

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

...理 var texture1:Texture=Loader.getRes('apes/monkey0.png') as Texture; var texture2:Texture=Loader.getRes('apes/monkey1.png') as Texture; var texture3:Texture=Loader.getRes('apes/monkey2.png') as Texture; var texture4:Texture=Loader.getRes('apes/monkey3.png') as Texture; //绘制纹理 var box:Sprit...

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

10. Unity导出的光照贴图带有Alpha但Shader中没有使用,Laya是否在加载PNG的时候有预乘Alpha? [ 87%]

... 例如Mesh-BlinnPhong.ps这个文件中: #ifdef LIGHTMAP finalDiffuse=texture2D(u_LightMap, v_LightMapUV).rgb*2.0; //float exponent = texture2D(u_LightMap, v_LightMapUV).a; //finalDiffuse = texture2D(u_LightMap, v_LightMapUV).rgb; //float ratio = pow(2.0, exponent * 255.0 - (128.0 + 8.0)); //fina...

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