Browser-support.html 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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. <h2>Overview</h2>
  12. <div>
  13. <p>
  14. Three.js can use WebGL to render your scenes on all modern browsers. For older browsers, especially Internet Explorer 10 and below, you may have to fallback to one of the other [link:https://github.com/mrdoob/three.js/tree/master/examples/jsm/renderers renderers] (CSS2DRenderer, CSS3DRenderer, SVGRenderer). Additionally, you may have to include some polyfills, especially if you are using files from the [link:https://github.com/mrdoob/three.js/tree/master/examples /examples] folder.
  15. </p>
  16. <p>
  17. Note: if you don't need to support these old browsers, then it is not recommended to use the other renderers as they are slower and support less features than the WebGLRenderer.
  18. </p>
  19. </div>
  20. <h2>Browsers that support WebGL</h2>
  21. <div>
  22. <p>
  23. Google Chrome 9+, Firefox 4+, Opera 15+, Safari 5.1+, Internet Explorer 11 and Microsoft Edge. You can find which browsers support WebGL at [link:https://caniuse.com/#feat=webgl Can I use WebGL].
  24. </p>
  25. </div>
  26. <h2>JavaScript Language Features or Web APIs Used in three.js</h2>
  27. <div>
  28. <p>
  29. Here are some features used in three.js. Some of them may require additional polyfills.
  30. </p>
  31. <table>
  32. <thead>
  33. <tr>
  34. <th>Feature</th>
  35. <th>Use Scope</th>
  36. <th>Modules</th>
  37. </tr>
  38. </thead>
  39. <tbody>
  40. <tr>
  41. <td>Typed Arrays</td>
  42. <td>Source</td>
  43. <td>BufferAttribute, BufferGeometry, etc.</td>
  44. </tr>
  45. <tr>
  46. <td>Web Audio API</td>
  47. <td>Source</td>
  48. <td>Audio, AudioContext, AudioListener, etc.</td>
  49. </tr>
  50. <tr>
  51. <td>WebXR Device API</td>
  52. <td>Source</td>
  53. <td>WebXRManager</td>
  54. </tr>
  55. <tr>
  56. <td>Blob</td>
  57. <td>Source</td>
  58. <td>FileLoader, etc.</td>
  59. </tr>
  60. <tr>
  61. <td>Promise</td>
  62. <td>Examples</td>
  63. <td>GLTFLoader, DRACOLoader, BasisTextureLoader, GLTFExporter, VRButton, ARButton, etc.</td>
  64. </tr>
  65. <tr>
  66. <td>Fetch</td>
  67. <td>Examples</td>
  68. <td>ImageBitmapLoader, etc.</td>
  69. </tr>
  70. <tr>
  71. <td>File API</td>
  72. <td>Examples</td>
  73. <td>GLTFExporter, etc.</td>
  74. </tr>
  75. <tr>
  76. <td>URL API</td>
  77. <td>Examples</td>
  78. <td>GLTFLoader, etc.</td>
  79. </tr>
  80. <tr>
  81. <td>Pointer Lock API</td>
  82. <td>Examples</td>
  83. <td>PointerLockControls</td>
  84. </tr>
  85. </tbody>
  86. </table>
  87. </div>
  88. <h2>Polyfills</h2>
  89. <div>
  90. <p>Just import polyfills based on your requirements. Taking IE9 as an example, you need to polyfill at least these features:</p>
  91. <ul>
  92. <li>Typed Arrays</li>
  93. <li>Blob</li>
  94. </ul>
  95. </div>
  96. <h3>Suggested polyfills</h3>
  97. <div>
  98. <ul>
  99. <li>
  100. [link:https://github.com/zloirock/core-js core-js]
  101. </li>
  102. <li>
  103. [link:https://github.com/inexorabletash/polyfill/blob/master/typedarray.js typedarray.js]
  104. </li>
  105. <li>
  106. [link:https://github.com/stefanpenner/es6-promise/ ES6-Promise]
  107. </li>
  108. <li>
  109. [link:https://github.com/eligrey/Blob.js Blob.js]
  110. </li>
  111. <li>
  112. [link:https://github.com/github/fetch fetch]
  113. </li>
  114. </ul>
  115. </div>
  116. </body>
  117. </html>