|
@@ -12,27 +12,97 @@
|
|
|
|
|
|
<h1>即时渲染对象([name])</h1>
|
|
<h1>即时渲染对象([name])</h1>
|
|
|
|
|
|
- <p class="desc">即时渲染对象的基类。</p>
|
|
|
|
|
|
+ <p class="desc">
|
|
|
|
+ This experimental class provides a fast code path for rendering meshes. When the renderer
|
|
|
|
+ encounters an instance of [name], it only takes care about the most primitive rendering
|
|
|
|
+ operations (e.g. binding vertex attributes, determining correct shader program or perfoming the
|
|
|
|
+ actual draw call). Features like view frustum culling, wireframe rendering or using multiple
|
|
|
|
+ materials are not supported. Besides [name] can only be used to render triangles.
|
|
|
|
+ </p>
|
|
|
|
+
|
|
|
|
+ <p class="desc">
|
|
|
|
+ [name] does not work with instances of [page:BufferGeometry] or [page:Geometry]. The
|
|
|
|
+ raw geometry data have to be maintained as properties of the [name].
|
|
|
|
+ </p>
|
|
|
|
|
|
|
|
+ <h2>例子</h2>
|
|
|
|
+ <p>
|
|
|
|
+ [example:webgl_marchingcubes Marching Cubes]
|
|
|
|
+ </p>
|
|
|
|
|
|
<h2>构造函数(Constructor)</h2>
|
|
<h2>构造函数(Constructor)</h2>
|
|
|
|
|
|
|
|
+ <h3>[name]( [param:Material material] )</h3>
|
|
|
|
+ <p>
|
|
|
|
+ [page:Material material] — The material of the [name].
|
|
|
|
+ </p>
|
|
|
|
+
|
|
|
|
+ <h2>Properties</h2>
|
|
|
|
+ <p>See the base [page:Object3D] class for common properties.</p>
|
|
|
|
+
|
|
|
|
+ <h3>[property:Boolean material]</h3>
|
|
|
|
+ <p>
|
|
|
|
+ The material of the [name]. Assigning multiple materials is not supported.
|
|
|
|
+ </p>
|
|
|
|
+
|
|
|
|
+ <h3>[property:Boolean hasPositions]</h3>
|
|
|
|
+ <p>
|
|
|
|
+ Whether position data are defined or not. Default is *false*.
|
|
|
|
+ </p>
|
|
|
|
+
|
|
|
|
+ <h3>[property:Boolean hasNormals]</h3>
|
|
|
|
+ <p>
|
|
|
|
+ Whether normal data are defined or not. Default is *false*.
|
|
|
|
+ </p>
|
|
|
|
+
|
|
|
|
+ <h3>[property:Boolean hasColors]</h3>
|
|
|
|
+ <p>
|
|
|
|
+ Whether color data are defined or not. Default is *false*.
|
|
|
|
+ </p>
|
|
|
|
+
|
|
|
|
+ <h3>[property:Boolean hasUvs]</h3>
|
|
|
|
+ <p>
|
|
|
|
+ Whether texture coordinates are defined or not. Default is *false*.
|
|
|
|
+ </p>
|
|
|
|
+
|
|
|
|
+ <h3>[property:Float32Array positionArray]</h3>
|
|
|
|
+ <p>
|
|
|
|
+ The buffer holding position data. Default is *null*.
|
|
|
|
+ </p>
|
|
|
|
|
|
- <h3>[name]()</h3>
|
|
|
|
|
|
+ <h3>[property:Float32Array normalArray]</h3>
|
|
<p>
|
|
<p>
|
|
- 这会创建一个新的 [name]。
|
|
|
|
|
|
+ The buffer holding normal data. Default is *null*.
|
|
</p>
|
|
</p>
|
|
|
|
|
|
|
|
+ <h3>[property:Float32Array colorArray]</h3>
|
|
|
|
+ <p>
|
|
|
|
+ The buffer holding color data. Default is *null*.
|
|
|
|
+ </p>
|
|
|
|
+
|
|
|
|
+ <h3>[property:Float32Array uvArray]</h3>
|
|
|
|
+ <p>
|
|
|
|
+ The buffer holding texture coordinates. Default is *null*.
|
|
|
|
+ </p>
|
|
|
|
+
|
|
|
|
+ <h3>[property:Integer count]</h3>
|
|
|
|
+ <p>
|
|
|
|
+ The number of primitives to be rendered. Default is *0*.
|
|
|
|
+ This property will be set to *0* after each rendering so you usually
|
|
|
|
+ set it in the implementatio of [page:.render]().
|
|
|
|
+ </p>
|
|
|
|
|
|
<h2>方法(Methods)</h2>
|
|
<h2>方法(Methods)</h2>
|
|
|
|
|
|
|
|
+ <p>See the base [page:Object3D] class for common methods.</p>
|
|
|
|
|
|
<h3>[method:null render]([param:Function renderCallback])</h3>
|
|
<h3>[method:null render]([param:Function renderCallback])</h3>
|
|
<p>
|
|
<p>
|
|
- renderCallback -- 生成对象的渲染函数。
|
|
|
|
|
|
+ renderCallback -- A function to render the generated geometry data.
|
|
</p>
|
|
</p>
|
|
<p>
|
|
<p>
|
|
- 需要重写此函数以开始创建对象,并在完成时调用renderCallback。
|
|
|
|
|
|
+ This method needs to be implemented by the deriving class of [name]. You normally want to implement the
|
|
|
|
+ vertex buffer update logic and execute *renderCallback* at the end of your implementation.
|
|
</p>
|
|
</p>
|
|
|
|
|
|
<h2>源码(Source)</h2>
|
|
<h2>源码(Source)</h2>
|