MeshToonMaterial.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. [page:Material] &rarr; [page:MeshPhongMaterial] &rarr;
  12. <h1>[name]</h1>
  13. <div class="desc">An extension of the [page:MeshPhongMaterial] with toon shading.</div>
  14. <iframe id="scene" src="scenes/material-browser.html#MeshToonMaterial"></iframe>
  15. <script>
  16. // iOS iframe auto-resize workaround
  17. if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
  18. var scene = document.getElementById( 'scene' );
  19. scene.style.width = getComputedStyle( scene ).width;
  20. scene.style.height = getComputedStyle( scene ).height;
  21. scene.setAttribute( 'scrolling', 'no' );
  22. }
  23. </script>
  24. <h2>Examples</h2>
  25. [example:webgl_materials_variations_toon materials / variations / toon]<br />
  26. <h2>Constructor</h2>
  27. <h3>[name]( [param:Object parameters] )</h3>
  28. <p>
  29. [page:Object parameters] - (optional) an object with one or more properties defining the material's appearance.
  30. Any property of the material (including any property inherited from [page:Material] and [page:MeshStandardMaterial]) can be passed in here.<br /><br />
  31. The exception is the property [page:Hexadecimal color], which can be passed in as a hexadecimal
  32. string and is *0xffffff* (white) by default. [page:Color.set]( color ) is called internally.
  33. </p>
  34. <h2>Properties</h2>
  35. <p>See the base [page:Material] and [page:MeshPhongMaterial] classes for common properties.</p>
  36. <h3>[property:Texture gradientMap]</h3>
  37. <p>Gradient map for the toon shading. Default is *null*.</p>
  38. <h3>[property:Boolean isMeshToonMaterial]</h3>
  39. <p>
  40. Used to check whether this or derived classes are mesh toon materials. Default is *true*.<br /><br />
  41. You should not change this, as it used internally for optimisation.
  42. </p>
  43. <h3>[property:Object defines]</h3>
  44. <p>An object of the form:
  45. <code>
  46. { 'TOON': '' };
  47. </code>
  48. This is used by the [page:WebGLRenderer] for selecting shaders.
  49. </p>
  50. <h2>Methods</h2>
  51. <p>See the base [page:Material] and [page:MeshPhongMaterial] classes for common methods.</p>
  52. <h2>Source</h2>
  53. <p>
  54. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  55. </p>
  56. </body>
  57. </html>