PCDLoader.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. <h1>[name]</h1>
  12. <div class="desc">A loader for <em>PCD</em> files. Loads ascii and binary.
  13. Compressed binary files are not supported.</div>
  14. <h2>Example</h2>
  15. <code>
  16. // instantiate a loader
  17. var loader = new THREE.PCDLoader();
  18. // load a resource
  19. loader.load(
  20. // resource URL
  21. 'pointcloud.pcd' ,
  22. // Function when resource is loaded
  23. function ( mesh ) {
  24. scene.add( mesh );
  25. }
  26. );
  27. </code>
  28. [example:webgl_loader_pcd]
  29. <h2>Constructor</h2>
  30. <h3>[name]( [page:LoadingManager manager] )</h3>
  31. <div>
  32. [page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
  33. </div>
  34. <div>
  35. Creates a new [name].
  36. </div>
  37. <h2>Properties</h2>
  38. <h3>[page:Boolean littleEndian]</h3>
  39. <div>
  40. Default value is true.
  41. </div>
  42. <h2>Methods</h2>
  43. <h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
  44. <div>
  45. [page:String url] — required<br />
  46. [page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Object3D].<br />
  47. [page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.<br />
  48. [page:Function onError] — Will be called when load errors.<br />
  49. </div>
  50. <div>
  51. Begin loading from url and call onLoad with the parsed response content.
  52. </div>
  53. <h3>[method:Object3D parse]( [page:Arraybuffer data],[page:String url] )</h3>
  54. <div>
  55. [page:Arraybuffer data] — The binary structure to parse.
  56. </div>
  57. <div>
  58. [page:String url] — The file name or file url.
  59. </div>
  60. <div>
  61. Parse an <em>pcd</em> binary structure and return an [page:Object3D].<br />
  62. The object is converted to [page:Points] with a [page:BufferGeometry] and a [page:PointsMaterial].
  63. </div>
  64. <h2>Source</h2>
  65. [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/PCDLoader.js examples/js/loaders/PCDLoader.js]
  66. </body>
  67. </html>