1
0

Source.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <!DOCTYPE html>
  2. <html lang="en">
  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">Represents the data source of a texture.</p>
  12. <h2>Constructor</h2>
  13. <h3>[name]( [param:Any data] )</h3>
  14. <p>
  15. [page:Any data] -- The data definition of a texture. Default is `null`.
  16. </p>
  17. <h2>Properties</h2>
  18. <h3>[property:Any data]</h3>
  19. <p>
  20. The actual data of a texture. The type of this property depends on the
  21. texture that uses this instance.
  22. </p>
  23. <h3>[property:Boolean isSource]</h3>
  24. <p>Read-only flag to check if a given object is of type [name].</p>
  25. <h3>[property:Boolean needsUpdate]</h3>
  26. <p>
  27. 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.
  28. </p>
  29. <h3>[property:Boolean dataReady]</h3>
  30. <p>
  31. This property is only relevant when [page:.needUpdate] is set to `true` and provides more control on how texture data should be processed.
  32. 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`.
  33. </p>
  34. <h3>[property:String uuid]</h3>
  35. <p>
  36. [link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID] of
  37. this object instance. This gets automatically assigned, so this shouldn't
  38. be edited.
  39. </p>
  40. <h3>[property:Integer version]</h3>
  41. <p>
  42. This starts at `0` and counts how many times [page:Source.needsUpdate .needsUpdate] is set to `true`.
  43. </p>
  44. <h2>Methods</h2>
  45. <h3>[method:Object toJSON]( [param:Object meta] )</h3>
  46. <p>
  47. meta -- optional object containing metadata.<br />
  48. Convert the data source to three.js
  49. [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format].
  50. </p>
  51. <h2>Source</h2>
  52. <p>
  53. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  54. </p>
  55. </body>
  56. </html>