2
0

Polyfills.html 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. <h1>Polyfills</h1>
  12. <p class="desc">Three.js includes polyfills for the following functions and constants.</p>
  13. <h3>[page:Number.EPSILON Number.EPSILON]</h3>
  14. <p>
  15. The difference between one and the smallest value greater than one that can be represented as a Number.
  16. [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON MDN reference].
  17. </p>
  18. <h3>[page:Math.sign Math.sign]( [page:Number x] )</h3>
  19. <p>
  20. If the argument is a positive number, negative number, positive zero or negative zero,
  21. the function will return 1, -1, 0 or -0 respectively. Otherwise, NaN is returned.
  22. [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign MDN reference].
  23. </p>
  24. <h3>[page:Function.prototype.name Function.prototype.name]( [page:Number x] )</h3>
  25. <p>
  26. Returns the name of a function, or (before ES6 implementations) an empty string for anonymous functions.
  27. [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name MDN reference].
  28. </p>
  29. <h3>[page:Object.assign Object.assign]( [page:Object target], [page:Object ...sources] )</h3>
  30. <p>
  31. The Object.assign() method is used to copy the values of all enumerable own properties from one or more source objects to a target object.
  32. It will return the target object.
  33. [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign MDN reference].
  34. </p>
  35. <h2>Source</h2>
  36. [link:https://github.com/mrdoob/three.js/blob/master/src/polyfills.js src/polyfills.js]
  37. </body>
  38. </html>