Source.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. <h1>[name]</h1>
  11. <p class="desc">
  12. Represents the data source of a texture.
  13. </p>
  14. <h2>构造函数</h2>
  15. <h3>[name]( [param:Any data] )</h3>
  16. <p>
  17. [page:Any data] -- The data definition of a texture. Default is *null*.
  18. </p>
  19. <h2>属性</h2>
  20. <h3>[property:Any data]</h3>
  21. <p>
  22. The actual data of a texture. The type of this property depends on the texture that uses this instance.
  23. </p>
  24. <h3>[property:Boolean isCubeTexture]</h3>
  25. <p>
  26. Read-only flag to check if a given object is of type [name].
  27. </p>
  28. <h3>[property:Boolean needsUpdate]</h3>
  29. <p>
  30. When the property is set to `true`, the engine allocates the memory for the texture (if necessary) and triggers the actual texture upload to the GPU next time the source is used.
  31. </p>
  32. <h3>[property:Boolean dataReady]</h3>
  33. <p>
  34. This property is only relevant when [page:.needUpdate] is set to `true` and provides more control on how texture data should be processed.
  35. When `dataReady` is set to `false`, the engine performs the memory allocation (if necessary) but does not transfer the data into the GPU memory. Default is `true`.
  36. </p>
  37. <h3>[property:String uuid]</h3>
  38. <p>
  39. [link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID] of this object instance.
  40. This gets automatically assigned, so this shouldn't be edited.
  41. </p>
  42. <h3>[property:Integer version]</h3>
  43. <p>
  44. This starts at *0* and counts how many times [page:Source.needsUpdate .needsUpdate] is set to *true*.
  45. </p>
  46. <h2>方法</h2>
  47. <h3>[method:Object toJSON]( [param:Object meta] )</h3>
  48. <p>
  49. meta -- optional object containing metadata.<br />
  50. Convert the data source to three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format].
  51. </p>
  52. <h2>源代码</h2>
  53. <p>
  54. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  55. </p>
  56. </body>
  57. </html>