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

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

1. BlinnPhong材质详解(ActionScript-3D基础(AS3)-模型材质详解) [ 100%]

... material:BlinnPhongMaterial = new BlinnPhongMaterial(); //漫反射贴图 Texture2D.load("res/threeDimen/texture/earth.png", Handler.create(this, function(texture:Texture2D):void { //设置材质纹理 material.albedoTexture = texture; })); //material.albedoTexture earth2.meshRenderer.material = ma...

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

2. RenderTexture的像素读取(ActionScript-3D基础(AS3)-LayaAir3D之纹理) [ 94%]

....material as BlinnPhongMaterial; //获取BlinnPhong材质的纹理 var tex:Texture2D = boxMaterial.albedoTexture as Texture2D; //获取相机渲染目标的像素数据,默认renderTarget的颜色为RGBA var out:Uint8Array = new Uint8Array(2048*2048*4); renderTargetCamera.renderTarget.getData(0, 0, ...

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

3. BlinnPhong材质详解(JavaScript-3D基础(JS)-模型材质详解) [ 91%]

...cript var material = new Laya.BlinnPhongMaterial(); //漫反射贴图 Laya.Texture2D.load("res/threeDimen/texture/earth.png", Laya.Handler.create(this, function(texture) { //设置材质纹理 material.albedoTexture = texture; })); earth2.meshRenderer.material = material; ``` ![](img/4.png)(图4) ##...

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

4. BlinnPhong材质详解(TypeScript-3D基础(TS)-模型材质详解) [ 91%]

...cript var material = new Laya.BlinnPhongMaterial(); //漫反射贴图 Laya.Texture2D.load("res/threeDimen/texture/earth.png", Laya.Handler.create(this, function(texture) { //设置材质纹理 material.albedoTexture = texture; })); earth2.meshRenderer.material = material; ``` ![](img/4.png)(图4) ##...

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

5. 寻路系统(ActionScript-3D基础(AS3)-LayaAir3D之高级应用) [ 89%]

... { .......//前面摄影机,猴子精灵相关操作忽略 var heightMap:Texture2D = Loader.getRes("res/threeDimen/scene/TerrainScene/Assets/HeightMap.png") as Texture2D; //初始化MeshTerrainSprite3D terrainSprite = MeshTerrainSprite3D.createFromMeshAndHeightMap(meshSprite3D.meshFilter.sharedMes...

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

6. 动画挂点(ActionScript-3D基础(AS3)-LayaAir3D之Animator动画) [ 85%]

...eBox(1,1,1)); var material: BlinnPhongMaterial = new BlinnPhongMaterial(); Texture2D.load("res/layabox.png", Handler.create(this, function(tex:Texture2D):void { material.albedoTexture = tex; })); box.meshRenderer.material = material; var monkey:Sprite3D = res.getChildByName("LayaMonkey") as Sprite3D...

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

7. RenderTexture的像素读取(TypeScript-3D基础(TS)-LayaAir3D之纹理) [ 80%]

...取BlinnPhong材质的纹理 var tex = boxMaterial.albedoTexture as Laya.Texture2D; //获取相机渲染目标的像素数据,默认renderTarget的颜色为RGBA var out = new Uint8Array(2048*2048*4); renderTargetCamera.renderTarget.getData(0, 0, 2048, 2048, out); //设置纹理的填充像素像素 ...

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

8. 关联shader的uniform(JavaScript-3D基础(JS)-LayaAir3D之shader) [ 71%]

...e; void main() { vec4 albedoTextureColor = vec4(1.0); albedoTextureColor = texture2D(u_AlbedoTexture, v_Texcoord0); gl_FragColor=albedoTextureColor; } ``` ### 1.定义自定义属性 **Material** 是所有的材质的基类。Material的_shaderValues:ShaderData 就是材质的属性。ShaderData是...

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

9. 关联shader的uniform(TypeScript-3D基础(TS)-LayaAir3D之Shader) [ 71%]

...e; void main() { vec4 albedoTextureColor = vec4(1.0); albedoTextureColor = texture2D(u_AlbedoTexture, v_Texcoord0); gl_FragColor=albedoTextureColor; } ``` ### 1.定义自定义属性 **Material** 是所有的材质的基类。Material的_shaderValues:ShaderData 就是材质的属性。ShaderData是...

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

10. 关联shader的uniform(ActionScript-3D基础(AS3)-LayaAir3D之shader) [ 70%]

...e; void main() { vec4 albedoTextureColor = vec4(1.0); albedoTextureColor = texture2D(u_AlbedoTexture, v_Texcoord0); gl_FragColor=albedoTextureColor; } ``` ### 1.定义自定义属性 **Material** 是所有的材质的基类。Material的_shaderValues:ShaderData 就是材质的属性。ShaderData是...

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