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

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

41. ShaderPass介绍(JavaScript-3D基础(JS)-LayaAir3D之shader) [ 68%]

...e; void main() { vec4 albedoTextureColor = vec4(1.0); albedoTextureColor = texture2D(u_AlbedoTexture, v_Texcoord0); gl_FragColor=albedoTextureColor; } ``` ##### 初始化自定义Shader > 导入着色器代码 ```javascript let OutlineVS = ` attribute vec4 a_Position; attribute vec3 a_Normal; unifor...

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

42. 物体穿过平面后3d场景消失变黑屏 [ 68%]

...接在unity添加相同材质显然不会出现这种情况)     Laya.Texture2D.load("res/skin/2.jpg",new Laya.Handler(this,this.loadfinish));//加载贴图 loadfinish(tex){ var mat=new Laya.UnlitMaterial();//创建材质 mat.albedoTexture=tex;//给材质添加贴图 //mat.albedoColorA = 0.5; //...

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

43. 物理碰撞器(JavaScript-3D基础(JS)-LayaAir3D之物理系统) [ 67%]

..., 10))); //新建材质 var planeMat = new Laya.BlinnPhongMaterial(); Laya.Texture2D.load("res/threeDimen/Physics/grass.png", Laya.Handler.create(this, function(tex) { planeMat.albedoTexture = tex; })); //设置纹理平铺和偏移 planeMat.tilingOffset = new Laya.Vector4(10, 10, 0, 0); //设置材...

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

44. 3D网格添加刚体后设置欧拉角出现位置错误 [ 67%]

...a.BlinnPhongMaterial;         //添加漫反射贴图         Laya.Texture2D.load("res/threeDimen/Physics/rocks.jpg", Laya.Handler.create(this, function (tex) {             this.mat1.albedoTexture = tex;         }));         //平面加载         let plane = this.scene.add...

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

45. 显存优化:纹理压缩的使用(TypeScript-2D进阶篇(TS)-性能优化) [ 67%]

...3D纹理的使用 3D的png或者jpg格式纹理加载,是使用的`Laya.Texture2D.load()`来加载纹理资源,如果要使用纹理压缩格式,则需要使用`Laya.loader.load()`来加载纹理资源。 示例代码如下所示: ```typescript //检测安卓平台 if (Laya.Browser.onAndroid...

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

46. ShaderPass介绍(TypeScript-3D基础(TS)-LayaAir3D之Shader) [ 66%]

...e; void main() { vec4 albedoTextureColor = vec4(1.0); albedoTextureColor = texture2D(u_AlbedoTexture, v_Texcoord0); gl_FragColor=albedoTextureColor; } ``` ##### 初始化自定义Shader > 导入着色器代码 ```javascript import OutlineFS from "../customShader/outline.fs"; import OutlineVS from "....

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

47. 如何将顶点信息传递给3D引擎创建3D模型? [ 66%]

... var mat:StandardMaterial = new StandardMaterial(); mat.diffuseTexture = Texture2D.load("xxx"); mat.albedo = new Vector4(x,y,z,w); xxx.meshRender.material = mat;   2017-07-08 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 hello_jay 相...

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

48. ShaderPass介绍(ActionScript-3D基础(AS3)-LayaAir3D之shader) [ 66%]

...e; void main() { vec4 albedoTextureColor = vec4(1.0); albedoTextureColor = texture2D(u_AlbedoTexture, v_Texcoord0); gl_FragColor=albedoTextureColor; } ``` ##### 初始化自定义Shader > 导入着色器代码 ```javascript var OutlineVS:String = __INCLUDESTR__("../customShader/outline.vs"); var Out...

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

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

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

50. IDE创建3D示例项目(ActionScript-3D基础(AS3)-快速开始一个LayaAir3D项目) [ 62%]

...false, false); var material:BlinnPhongMaterial = new BlinnPhongMaterial(); Texture2D.load("res/layabox.png", Handler.create(null, function(tex:Texture2D):void { material.albedoTexture = tex; })); box.meshRenderer.material = material; ``` #####

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