未验证 提交 c76b2961 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #15487 from Mugen87/dev11

Docs: Change place of customDepthMaterial and customDistanceMaterial.
...@@ -36,6 +36,19 @@ ...@@ -36,6 +36,19 @@
<h3>[property:Object3D children]</h3> <h3>[property:Object3D children]</h3>
<p>Array with object's children. See [page:Group] for info on manually grouping objects.</p> <p>Array with object's children. See [page:Group] for info on manually grouping objects.</p>
<h3>[property:Material customDepthMaterial]</h3>
<p>
Custom depth material to be used when rendering to the depth map. Can only be used in context of meshes.
When shadow-casting with a [page:DirectionalLight] or [page:SpotLight], if you are (a) modifying vertex positions in the vertex shader,
(b) using a displacement map, (c) using an alpha map with alphaTest, or (d) using a transparent texture with alphaTest,
you must specify a customDepthMaterial for proper shadows. Default is *undefined*.
</p>
<h3>[property:Material customDistanceMaterial]</h3>
<p>
Same as customDepthMaterial, but used with [page:PointLight]. Default is *undefined*.
</p>
<h3>[property:Boolean frustumCulled]</h3> <h3>[property:Boolean frustumCulled]</h3>
<p> <p>
When this is set, it checks every frame if the object is in the frustum of the camera before rendering the object. When this is set, it checks every frame if the object is in the frustum of the camera before rendering the object.
......
...@@ -101,19 +101,6 @@ ...@@ -101,19 +101,6 @@
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*. 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*.
</p> </p>
<h3>[property:Material customDepthMaterial]</h3>
<p>
Custom depth material to be used by this material when rendering to the depth map.
When shadow-casting with a [page:DirectionalLight] or [page:SpotLight], if you are (a) modifying vertex positions in the vertex shader,
(b) using a displacement map, (c) using an alpha map with alphaTest, or (d) using a transparent texture with alphaTest,
you must specify a customDepthMaterial for proper shadows. Default is *undefined*.
</p>
<h3>[property:Material customDistanceMaterial]</h3>
<p>
Same as customDepthMaterial, but used with [page:PointLight]. Default is *undefined*.
</p>
<h3>[property:Object defines]</h3> <h3>[property:Object defines]</h3>
<p> <p>
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*. 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*.
......
...@@ -36,6 +36,17 @@ ...@@ -36,6 +36,17 @@
<h3>[property:Object3D children]</h3> <h3>[property:Object3D children]</h3>
<p>含有对象的子级的数组。请参阅[page:Group]来了解将手动对象进行分组的相关信息。</p> <p>含有对象的子级的数组。请参阅[page:Group]来了解将手动对象进行分组的相关信息。</p>
<h3>[property:Material customDepthMaterial]</h3>
<p>渲染到深度贴图时此材质要使用的自定义深度材质。
当使用[page:DirectionalLight]或[page:SpotLight]进行阴影投射时,如果您正在(a)修改顶点着色器中的顶点位置,
(b)使用位移贴图,(c)alphaTest中使用alpha贴图,或(d)alphaTest中使用透明纹理,
您必须指定customDepthMaterial以得到合适的阴影。默认值*undefined*。
</p>
<h3>[property:Material customDistanceMaterial]</h3>
<p>与customDepthMaterial相同,但与[page:PointLight]一起使用。默认值为*undefined*。
</p>
<h3>[property:Boolean frustumCulled]</h3> <h3>[property:Boolean frustumCulled]</h3>
<p> <p>
当这个属性被设置的时候,它将在渲染物体之前,检查每一帧的物体是否在摄像机的视锥体中。 当这个属性被设置的时候,它将在渲染物体之前,检查每一帧的物体是否在摄像机的视锥体中。
...@@ -334,7 +345,7 @@ ...@@ -334,7 +345,7 @@
<h3>[method:null setRotationFromMatrix]( [param:Matrix4 m] )</h3> <h3>[method:null setRotationFromMatrix]( [param:Matrix4 m] )</h3>
<p> <p>
m -- 通过该矩阵中的旋转分量来旋转四元数。<br /> m -- 通过该矩阵中的旋转分量来旋转四元数。<br />
调用[page:.quaternion]中的[page:Quaternion.setFromRotationMatrix setFromRotationMatrix]( [page:Matrix4 m])。 调用[page:.quaternion]中的[page:Quaternion.setFromRotationMatrix setFromRotationMatrix]( [page:Matrix4 m])。
<br /><br /> <br /><br />
...@@ -411,4 +422,4 @@ ...@@ -411,4 +422,4 @@
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -83,17 +83,6 @@ ...@@ -83,17 +83,6 @@
这可以与网格的[page:Integer renderOrder]属性结合使用,以创建遮挡其他对象的不可见对象。默认值为*true*。 这可以与网格的[page:Integer renderOrder]属性结合使用,以创建遮挡其他对象的不可见对象。默认值为*true*。
</p> </p>
<h3>[property:Material customDepthMaterial]</h3>
<p>渲染到深度贴图时此材质要使用的自定义深度材质。
当使用[page:DirectionalLight]或[page:SpotLight]进行阴影投射时,如果您正在(a)修改顶点着色器中的顶点位置,
(b)使用位移贴图,(c)alphaTest中使用alpha贴图,或(d)alphaTest中使用透明纹理,
您必须指定customDepthMaterial以得到合适的阴影。默认值*undefined*。
</p>
<h3>[property:Material customDistanceMaterial]</h3>
<p>与customDepthMaterial相同,但与[page:PointLight]一起使用。默认值为*undefined*。
</p>
<h3>[property:Object defines]</h3> <h3>[property:Object defines]</h3>
<p> 注入shader的自定义对象。 以键值对形式的对象传递,{ MY_CUSTOM_DEFINE: '' , PI2: Math.PI * 2 }。 <p> 注入shader的自定义对象。 以键值对形式的对象传递,{ MY_CUSTOM_DEFINE: '' , PI2: Math.PI * 2 }。
这些键值对在顶点和片元着色器中定义。默认值为*undefined*。 这些键值对在顶点和片元着色器中定义。默认值为*undefined*。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册