| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>MeshNormalMaterial - Three.js Docs</title>
- <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
- <script src="../scripts/highlight.min.js"></script>
- <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
- <link type="text/css" rel="stylesheet" href="../styles/page.css">
- </head>
- <body>
- <p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Material.html">Material</a> → </p>
- <h1 translate="no">MeshNormalMaterial</h1>
- <section>
- <header>
- <div class="class-description"><p>A material that maps the normal vectors to RGB colors.</p></div>
- <iframe id="viewer" src="../scenes/material-browser.html#MeshNormalMaterial"></iframe>
- </header>
- <article>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="MeshNormalMaterial" translate="no">new <a href="#MeshNormalMaterial">MeshNormalMaterial</a><span class="signature">( parameters : <span class="param-type">Object</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new mesh normal material.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>parameters</strong>
- </td>
- <td class="description last">
- <p>An object with one or more properties
- defining the material's appearance. Any property of the material
- (including any property from inherited materials) can be passed
- in here. Color values can be passed any type of value accepted
- by <a href="Color.html#set">Color#set</a>.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <h2 class="subsection-title">Properties</h2>
- <div class="member">
- <h3 class="name" id="bumpMap" translate="no">.<a href="#bumpMap">bumpMap</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
- <div class="description">
- <p>The texture to create a bump map. The black and white values map to the
- perceived depth in relation to the lights. Bump doesn't actually affect
- the geometry of the object, only the lighting. If a normal map is defined
- this will be ignored.</p>
- <p>Default is <code>null</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="bumpScale" translate="no">.<a href="#bumpScale">bumpScale</a><span class="type-signature"> : number</span> </h3>
- <div class="description">
- <p>How much the bump map affects the material. Typical range is <code>[0,1]</code>.</p>
- <p>Default is <code>1</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="displacementBias" translate="no">.<a href="#displacementBias">displacementBias</a><span class="type-signature"> : number</span> </h3>
- <div class="description">
- <p>The offset of the displacement map's values on the mesh's vertices.
- The bias is added to the scaled sample of the displacement map.
- Without a displacement map set, this value is not applied.</p>
- <p>Default is <code>0</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="displacementMap" translate="no">.<a href="#displacementMap">displacementMap</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
- <div class="description">
- <p>The displacement map affects the position of the mesh's vertices. Unlike
- other maps which only affect the light and shade of the material the
- displaced vertices can cast shadows, block other objects, and otherwise
- act as real geometry. The displacement texture is an image where the value
- of each pixel (white being the highest) is mapped against, and
- repositions, the vertices of the mesh.</p>
- <p>Default is <code>null</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="displacementScale" translate="no">.<a href="#displacementScale">displacementScale</a><span class="type-signature"> : number</span> </h3>
- <div class="description">
- <p>How much the displacement map affects the mesh (where black is no
- displacement, and white is maximum displacement). Without a displacement
- map set, this value is not applied.</p>
- <p>Default is <code>0</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="flatShading" translate="no">.<a href="#flatShading">flatShading</a><span class="type-signature"> : boolean</span> </h3>
- <div class="description">
- <p>Whether the material is rendered with flat shading or not.</p>
- <p>Default is <code>false</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="isMeshNormalMaterial" translate="no">.<a href="#isMeshNormalMaterial">isMeshNormalMaterial</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
- <div class="description">
- <p>This flag can be used for type testing.</p>
- <p>Default is <code>true</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="normalMap" translate="no">.<a href="#normalMap">normalMap</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
- <div class="description">
- <p>The texture to create a normal map. The RGB values affect the surface
- normal for each pixel fragment and change the way the color is lit. Normal
- maps do not change the actual shape of the surface, only the lighting. In
- case the material has a normal map authored using the left handed
- convention, the <code>y</code> component of <code>normalScale</code> should be negated to compensate
- for the different handedness.</p>
- <p>Default is <code>null</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="normalMapType" translate="no">.<a href="#normalMapType">normalMapType</a><span class="type-signature"> : <a href="global.html#TangentSpaceNormalMap">TangentSpaceNormalMap</a> | <a href="global.html#ObjectSpaceNormalMap">ObjectSpaceNormalMap</a></span> </h3>
- <div class="description">
- <p>The type of normal map.</p>
- <p>Default is <code>TangentSpaceNormalMap</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="normalScale" translate="no">.<a href="#normalScale">normalScale</a><span class="type-signature"> : <a href="Vector2.html">Vector2</a></span> </h3>
- <div class="description">
- <p>How much the normal map affects the material. Typical value range is <code>[0,1]</code>.</p>
- <p>Default is <code>(1,1)</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="wireframe" translate="no">.<a href="#wireframe">wireframe</a><span class="type-signature"> : boolean</span> </h3>
- <div class="description">
- <p>Renders the geometry as a wireframe.</p>
- <p>Default is <code>false</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="wireframeLinewidth" translate="no">.<a href="#wireframeLinewidth">wireframeLinewidth</a><span class="type-signature"> : number</span> </h3>
- <div class="description">
- <p>Controls the thickness of the wireframe.</p>
- <p>WebGL and WebGPU ignore this property and always render
- 1 pixel wide lines.</p>
- <p>Default is <code>1</code>.</p>
- </div>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/src/materials/MeshNormalMaterial.js" translate="no" target="_blank" rel="noopener">src/materials/MeshNormalMaterial.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|