DataUtils.html 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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">A class containing utility functions for data.</p>
  12. <h2>Methods</h2>
  13. <h3>[method:Number toHalfFloat]( [param:Number val] )</h3>
  14. <p>
  15. val -- A single precision floating point value.<br /><br />
  16. Returns a half precision floating point value from the given single
  17. precision floating point value.
  18. </p>
  19. <h3>[method:Number fromHalfFloat]( [param:Number val] )</h3>
  20. <p>
  21. val -- A half precision floating point value.<br /><br />
  22. Returns a single precision floating point value from the given half
  23. precision floating point value.
  24. </p>
  25. <h3>[method:Uint32Array toRGB9E5]( [param:Number r], [param:Number g], [param:Number b], [param:Uint32Array target] )</h3>
  26. <p>
  27. r -- A float representing the R channel.<br />
  28. g -- A float representing the G channel.<br />
  29. b -- A float representing the B channel.<br />
  30. target -- An instance of `Uint32Array` with length `1`.<br /><br />
  31. This method packs three floats into a single Uint32 value which is required for the `RGB9E5` texture format.
  32. </p>
  33. <h3>[method:Array fromRGB9E5]( [param:Uint32Array val], [param:Array target] )</h3>
  34. <p>
  35. val -- An instance of `Uint32Array` with length `1`.<br />
  36. target -- An array holding the three unpacked floats.<br /><br />
  37. This method unpacks three floats from a single Uint32 value holding a `RGB9E5` texel.
  38. </p>
  39. <h2>Source</h2>
  40. <p>
  41. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  42. </p>
  43. </body>
  44. </html>