|
@@ -10,14 +10,13 @@
|
|
<body>
|
|
<body>
|
|
[page:ShaderMaterial] →
|
|
[page:ShaderMaterial] →
|
|
|
|
|
|
- <h1>[name]</h1>
|
|
|
|
|
|
+ <h1>原始着色器材质([name])</h1>
|
|
|
|
|
|
- <p class="desc">
|
|
|
|
- This class works just like [page:ShaderMaterial], except that definitions of
|
|
|
|
- built-in uniforms and attributes are not automatically prepended to the GLSL shader code.
|
|
|
|
|
|
+ <p class="desc"> 此类的工作方式与[page:ShaderMaterial]类似,
|
|
|
|
+ 不同之处在于内置的uniforms和attributes的定义不会自动添加到GLSL着色器代码中。
|
|
</p>
|
|
</p>
|
|
|
|
|
|
- <h2>Examples</h2>
|
|
|
|
|
|
+ <h2>例子(Examples)</h2>
|
|
<p>
|
|
<p>
|
|
[example:webgl_buffergeometry_rawshader WebGL / buffergeometry / rawshader]<br />
|
|
[example:webgl_buffergeometry_rawshader WebGL / buffergeometry / rawshader]<br />
|
|
[example:webgl_buffergeometry_instancing_billboards WebGL / buffergeometry / instancing / billboards]<br />
|
|
[example:webgl_buffergeometry_instancing_billboards WebGL / buffergeometry / instancing / billboards]<br />
|
|
@@ -40,31 +39,28 @@ var material = new THREE.RawShaderMaterial( {
|
|
} );
|
|
} );
|
|
</code>
|
|
</code>
|
|
|
|
|
|
- <h2>Constructor</h2>
|
|
|
|
|
|
+ <h2>构造函数(Constructor)</h2>
|
|
|
|
|
|
<h3>[name]( [param:Object parameters] )</h3>
|
|
<h3>[name]( [param:Object parameters] )</h3>
|
|
- <p>
|
|
|
|
- [page:Object parameters] - (optional) an object with one or more properties defining the material's appearance.
|
|
|
|
- Any property of the material (including any property inherited from [page:Material] and [page:ShaderMaterial]) can be passed in here.<br /><br />
|
|
|
|
|
|
+ <p> [page:Object parameters] - (可选)用于定义材质外观的对象,具有一个或多个属性。
|
|
|
|
+ 材质的任何属性都可以从此处传入(包括从[page:Material] 和 [page:ShaderMaterial]继承的任何属性)。<br /><br />
|
|
</p>
|
|
</p>
|
|
|
|
|
|
|
|
|
|
- <h2>Properties</h2>
|
|
|
|
- <p>See the base [page:Material] and [page:ShaderMaterial] classes for common methods.</p>
|
|
|
|
|
|
+ <h2>属性(Properties)</h2>
|
|
|
|
+ <p>常用属性请参见基类[page:Material]和[page:ShaderMaterial]。</p>
|
|
|
|
|
|
<h3>[property:Boolean isRawShaderMaterial]</h3>
|
|
<h3>[property:Boolean isRawShaderMaterial]</h3>
|
|
- <p>
|
|
|
|
- Used to check whether this or derived classes are raw shader materials. Default is *true*.<br /><br />
|
|
|
|
-
|
|
|
|
- You should not change this, as it used internally for optimisation.
|
|
|
|
|
|
+ <p> 用于检查此类或派生类是否为点材质。默认值为 *true*。<br /><br />
|
|
|
|
+ 因为其通常用在内部优化,所以不应该更改该属性值。
|
|
</p>
|
|
</p>
|
|
|
|
|
|
|
|
|
|
- <h2>Methods</h2>
|
|
|
|
- <p>See the base [page:Material] and [page:ShaderMaterial] classes for common methods.</p>
|
|
|
|
|
|
+ <h2>方法(Methods)</h2>
|
|
|
|
+ <p>常用方法请参见基类[page:Material]和[page:ShaderMaterial]。</p>
|
|
|
|
|
|
|
|
|
|
- <h2>Source</h2>
|
|
|
|
|
|
+ <h2>源码(Source)</h2>
|
|
|
|
|
|
[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>
|