Skip to content

Commit c76b296

Browse files
authored
Merge pull request #15487 from Mugen87/dev11
Docs: Change place of customDepthMaterial and customDistanceMaterial.
2 parents 7e77d64 + c6b8ab8 commit c76b296

File tree

4 files changed

+26
-26
lines changed

4 files changed

+26
-26
lines changed

docs/api/en/core/Object3D.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,19 @@ <h3>[property:Boolean castShadow]</h3>
3636
<h3>[property:Object3D children]</h3>
3737
<p>Array with object's children. See [page:Group] for info on manually grouping objects.</p>
3838

39+
<h3>[property:Material customDepthMaterial]</h3>
40+
<p>
41+
Custom depth material to be used when rendering to the depth map. Can only be used in context of meshes.
42+
When shadow-casting with a [page:DirectionalLight] or [page:SpotLight], if you are (a) modifying vertex positions in the vertex shader,
43+
(b) using a displacement map, (c) using an alpha map with alphaTest, or (d) using a transparent texture with alphaTest,
44+
you must specify a customDepthMaterial for proper shadows. Default is *undefined*.
45+
</p>
46+
47+
<h3>[property:Material customDistanceMaterial]</h3>
48+
<p>
49+
Same as customDepthMaterial, but used with [page:PointLight]. Default is *undefined*.
50+
</p>
51+
3952
<h3>[property:Boolean frustumCulled]</h3>
4053
<p>
4154
When this is set, it checks every frame if the object is in the frustum of the camera before rendering the object.

docs/api/en/materials/Material.html

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -101,19 +101,6 @@ <h3>[property:Boolean colorWrite]</h3>
101101
This can be used in conjunction with a mesh's [page:Integer renderOrder] property to create invisible objects that occlude other objects. Default is *true*.
102102
</p>
103103

104-
<h3>[property:Material customDepthMaterial]</h3>
105-
<p>
106-
Custom depth material to be used by this material when rendering to the depth map.
107-
When shadow-casting with a [page:DirectionalLight] or [page:SpotLight], if you are (a) modifying vertex positions in the vertex shader,
108-
(b) using a displacement map, (c) using an alpha map with alphaTest, or (d) using a transparent texture with alphaTest,
109-
you must specify a customDepthMaterial for proper shadows. Default is *undefined*.
110-
</p>
111-
112-
<h3>[property:Material customDistanceMaterial]</h3>
113-
<p>
114-
Same as customDepthMaterial, but used with [page:PointLight]. Default is *undefined*.
115-
</p>
116-
117104
<h3>[property:Object defines]</h3>
118105
<p>
119106
Custom defines to be injected into the shader. These are passed in form of an object literal, with key/value pairs. { MY_CUSTOM_DEFINE: '' , PI2: Math.PI * 2 }. The pairs are defined in both vertex and fragment shaders. Default is *undefined*.

docs/api/zh/core/Object3D.html

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,17 @@ <h3>[property:Boolean castShadow]</h3>
3636
<h3>[property:Object3D children]</h3>
3737
<p>含有对象的子级的数组。请参阅[page:Group]来了解将手动对象进行分组的相关信息。</p>
3838

39+
<h3>[property:Material customDepthMaterial]</h3>
40+
<p>渲染到深度贴图时此材质要使用的自定义深度材质。
41+
当使用[page:DirectionalLight]或[page:SpotLight]进行阴影投射时,如果您正在(a)修改顶点着色器中的顶点位置,
42+
(b)使用位移贴图,(c)alphaTest中使用alpha贴图,或(d)alphaTest中使用透明纹理,
43+
您必须指定customDepthMaterial以得到合适的阴影。默认值*undefined*。
44+
</p>
45+
46+
<h3>[property:Material customDistanceMaterial]</h3>
47+
<p>与customDepthMaterial相同,但与[page:PointLight]一起使用。默认值为*undefined*。
48+
</p>
49+
3950
<h3>[property:Boolean frustumCulled]</h3>
4051
<p>
4152
当这个属性被设置的时候,它将在渲染物体之前,检查每一帧的物体是否在摄像机的视锥体中。
@@ -334,7 +345,7 @@ <h3>[method:null setRotationFromEuler]( [param:Euler euler] )</h3>
334345
<h3>[method:null setRotationFromMatrix]( [param:Matrix4 m] )</h3>
335346
<p>
336347
m -- 通过该矩阵中的旋转分量来旋转四元数。<br />
337-
348+
338349
调用[page:.quaternion]中的[page:Quaternion.setFromRotationMatrix setFromRotationMatrix]( [page:Matrix4 m])。
339350
<br /><br />
340351

@@ -411,4 +422,4 @@ <h2>源代码</h2>
411422
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
412423
</body>
413424

414-
</html>
425+
</html>

docs/api/zh/materials/Material.html

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,6 @@ <h3>[property:Boolean colorWrite]</h3>
8383
这可以与网格的[page:Integer renderOrder]属性结合使用,以创建遮挡其他对象的不可见对象。默认值为*true*。
8484
</p>
8585

86-
<h3>[property:Material customDepthMaterial]</h3>
87-
<p>渲染到深度贴图时此材质要使用的自定义深度材质。
88-
当使用[page:DirectionalLight]或[page:SpotLight]进行阴影投射时,如果您正在(a)修改顶点着色器中的顶点位置,
89-
(b)使用位移贴图,(c)alphaTest中使用alpha贴图,或(d)alphaTest中使用透明纹理,
90-
您必须指定customDepthMaterial以得到合适的阴影。默认值*undefined*。
91-
</p>
92-
93-
<h3>[property:Material customDistanceMaterial]</h3>
94-
<p>与customDepthMaterial相同,但与[page:PointLight]一起使用。默认值为*undefined*。
95-
</p>
96-
9786
<h3>[property:Object defines]</h3>
9887
<p> 注入shader的自定义对象。 以键值对形式的对象传递,{ MY_CUSTOM_DEFINE: '' , PI2: Math.PI * 2 }。
9988
这些键值对在顶点和片元着色器中定义。默认值为*undefined*。

0 commit comments

Comments
 (0)