Core.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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>Core Constants</h1>
  11. <h2>Revision Number</h2>
  12. <code>
  13. THREE.REVISION
  14. </code>
  15. <div id="rev">
  16. The current three.js [link:https://github.com/mrdoob/three.js/releases revision number].
  17. </div>
  18. <h2>Color Spaces</h2>
  19. <code>
  20. THREE.NoColorSpace = ""
  21. THREE.SRGBColorSpace = "srgb"
  22. THREE.LinearSRGBColorSpace = "srgb-linear"
  23. </code>
  24. <p>
  25. [page:NoColorSpace] defines no specific color space. It is commonly used
  26. for textures including normal maps, roughness maps, metalness maps,
  27. ambient occlusion maps, and other non-color data.
  28. </p>
  29. <p>
  30. [page:SRGBColorSpace] (“srgb”) refers to the color space defined by the
  31. Rec. 709 primaries, D65 white point, and nonlinear sRGB transfer
  32. functions. sRGB is the default color space in CSS, and is often found in
  33. color palettes and color pickers. Colors expressed in hexadecimal or CSS
  34. notation are typically in the sRGB color space.
  35. </p>
  36. <p>
  37. [page:LinearSRGBColorSpace] (“srgb-linear”) refers to the sRGB color space
  38. (above) with linear transfer functions. Linear-sRGB is the working color
  39. space in three.js, used throughout most of the rendering process. RGB
  40. components found in three.js materials and shaders are in the Linear-sRGB
  41. color space.
  42. </p>
  43. <p>For further background and usage, see <i>Color management</i>.</p>
  44. <h2>Mouse Buttons</h2>
  45. <code>
  46. THREE.MOUSE.LEFT
  47. THREE.MOUSE.MIDDLE
  48. THREE.MOUSE.RIGHT
  49. THREE.MOUSE.ROTATE
  50. THREE.MOUSE.DOLLY
  51. THREE.MOUSE.PAN
  52. </code>
  53. <p>
  54. The constants LEFT and ROTATE have the same underlying value. The
  55. constants MIDDLE and DOLLY have the same underlying value. The constants
  56. RIGHT and PAN have the same underlying value.
  57. </p>
  58. <h2>Touch Actions</h2>
  59. <code>
  60. THREE.TOUCH.ROTATE THREE.TOUCH.PAN THREE.TOUCH.DOLLY_PAN
  61. THREE.TOUCH.DOLLY_ROTATE
  62. </code>
  63. <h2>Source</h2>
  64. <p>
  65. [link:https://github.com/mrdoob/three.js/blob/master/src/constants.js src/constants.js]
  66. </p>
  67. </body>
  68. </html>