|
@@ -11,9 +11,9 @@
|
|
|
|
|
|
<h1>[name]</h1>
|
|
|
|
|
|
- <p class="desc">A loader for loading a <em>.pcd</em> resource. <br />
|
|
|
- Point Cloud Data is a file format for <a href="https://en.wikipedia.org/wiki/Point_Cloud_Library">Point Cloud Library</a>. <br />
|
|
|
- Loader support ascii and (compressed) binary.
|
|
|
+ <p class="desc">用于加载 <em>.pcd</em> 资源的加载器。<br />
|
|
|
+ 点云数据是 <a href="https://en.wikipedia.org/wiki/Point_Cloud_Library">点云库</a> 的文件格式。 <br />
|
|
|
+ 加载器支持 ascii 和 (压缩) 二进制编码。
|
|
|
</p>
|
|
|
|
|
|
<h2>代码示例</h2>
|
|
@@ -53,51 +53,51 @@
|
|
|
[example:webgl_loader_pcd]
|
|
|
</p>
|
|
|
|
|
|
- <h2>Constructor</h2>
|
|
|
+ <h2>构造器</h2>
|
|
|
|
|
|
<h3>[name]( [param:LoadingManager manager] )</h3>
|
|
|
<p>
|
|
|
- [page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
|
|
|
+ [page:LoadingManager manager] — 加载器使用的 [page:LoadingManager loadingManager] (加载管理器),默认值是 [page:LoadingManager THREE.DefaultLoadingManager]。
|
|
|
</p>
|
|
|
<p>
|
|
|
- Creates a new [name].
|
|
|
+ 创建一个新的 [name]。
|
|
|
</p>
|
|
|
|
|
|
- <h2>Properties</h2>
|
|
|
- <p>See the base [page:Loader] class for common properties.</p>
|
|
|
+ <h2>属性</h2>
|
|
|
+ <p>共有属性请参见其基类 [page:Loader]。</p>
|
|
|
|
|
|
<h3>[page:Boolean littleEndian]</h3>
|
|
|
<p>
|
|
|
- Default value is true.
|
|
|
+ 在加载器内部调用 DataView.prototype.getFloat32() 时,表示这个32位浮点数是否以 小字节序(little-endian) 格式存储,默认值为 true。
|
|
|
</p>
|
|
|
|
|
|
- <h2>Methods</h2>
|
|
|
- <p>See the base [page:Loader] class for common methods.</p>
|
|
|
+ <h2>方法</h2>
|
|
|
+ <p>共有方法请参考其基类 [page:Loader]。</p>
|
|
|
|
|
|
<h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
|
|
|
<p>
|
|
|
- [page:String url] — A string containing the path/URL of the <em>.pcd</em> file.<br />
|
|
|
- [page:Function onLoad] — (optional) A function to be called after loading is successfully completed. The function receives loaded [page:Object3D] as an argument.<br />
|
|
|
- [page:Function onProgress] — (optional) A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, which contains [page:Integer total] and [page:Integer loaded] bytes.<br />
|
|
|
- [page:Function onError] — (optional) A function to be called if an error occurs during loading. The function receives the error as an argument.<br />
|
|
|
+ [page:String url] — 一个包含有 <em>.pcd</em> 文件的路径或URL的字符串。<br />
|
|
|
+ [page:Function onLoad] — (可选参数) 当加载过程成功完成后将被调用的函数。 其参数是一个 [page:Object3D] 实例。<br />
|
|
|
+ [page:Function onProgress] — (可选参数) 加载正在进行过程中会被调用的函数。 其参数是一个 XMLHttpRequest 实例,包含有总字节数 [page:Integer total] 和已加载的字节数 [page:Integer loaded]。<br />
|
|
|
+ [page:Function onError] — (可选参数) 若在加载过程中发生错误,将被调用的函数。 其参数是一个 error 实例。<br />
|
|
|
</p>
|
|
|
<p>
|
|
|
- Begin loading from url and call onLoad with the parsed response content.
|
|
|
+ 开始从路径或url加载,并使用解析过的响应内容调用回调函数。
|
|
|
</p>
|
|
|
|
|
|
<h3>[method:Object3D parse]( [param:Arraybuffer data],[param:String url] )</h3>
|
|
|
<p>
|
|
|
- [page:Arraybuffer data] — The binary structure to parse.
|
|
|
+ [page:Arraybuffer data] — 要分析的二进制数据结构
|
|
|
</p>
|
|
|
<p>
|
|
|
- [page:String url] — The file name or file url.
|
|
|
+ [page:String url] — 文件名或文件url。
|
|
|
</p>
|
|
|
<p>
|
|
|
- Parse an <em>pcd</em> binary structure and return an [page:Object3D].<br />
|
|
|
- The object is converted to [page:Points] with a [page:BufferGeometry] and a [page:PointsMaterial].
|
|
|
+ 分析 <em>pcd</em> 二进制结构并返回一个 [page:Object3D] 实例。<br />
|
|
|
+ 该 Object3D 实例实际类型为 [page:Points],由一个 [page:BufferGeometry] 实例和一个 [page:PointsMaterial] 实例作为参数构造而成。
|
|
|
</p>
|
|
|
|
|
|
- <h2>Source</h2>
|
|
|
+ <h2>源码</h2>
|
|
|
|
|
|
<p>
|
|
|
[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/PCDLoader.js examples/jsm/loaders/PCDLoader.js]
|