|
@@ -7,12 +7,12 @@
|
|
|
<link type="text/css" rel="stylesheet" href="page.css" />
|
|
|
</head>
|
|
|
<body>
|
|
|
- [page:Object3D] → [page:Line] →
|
|
|
+ [page:Object3D] → [page:Line] → [page:LineSegments] →
|
|
|
|
|
|
<h1>[name]</h1>
|
|
|
|
|
|
<p class="desc">
|
|
|
- Renders [page:ArrowHelper arrows] to visualize an object's vertex normal vectors.
|
|
|
+ Visualizes an object's vertex normals.
|
|
|
Requires that normals have been specified in a [page:BufferAttribute custom attribute] or
|
|
|
have been calculated using [page:BufferGeometry.computeVertexNormals computeVertexNormals].<br /><br />
|
|
|
</p>
|
|
@@ -21,12 +21,12 @@
|
|
|
|
|
|
<code>
|
|
|
const geometry = new THREE.BoxGeometry( 10, 10, 10, 2, 2, 2 );
|
|
|
- const material = new THREE.MeshBasicMaterial( { color: 0xff0000 } );
|
|
|
- const box = new THREE.Mesh( geometry, material );
|
|
|
+ const material = new THREE.MeshStandardMaterial();
|
|
|
+ const mesh = new THREE.Mesh( geometry, material );
|
|
|
|
|
|
- const helper = new VertexNormalsHelper( box, 2, 0x00ff00, 1 );
|
|
|
+ const helper = new VertexNormalsHelper( mesh, 1, 0xff0000 );
|
|
|
|
|
|
- scene.add( box );
|
|
|
+ scene.add( mesh );
|
|
|
scene.add( helper );
|
|
|
</code>
|
|
|
|
|
@@ -38,12 +38,11 @@
|
|
|
<h2>Constructor</h2>
|
|
|
|
|
|
|
|
|
- <h3>[name]( [param:Object3D object], [param:Number size], [param:Hex color], [param:Number linewidth] )</h3>
|
|
|
+ <h3>[name]( [param:Object3D object], [param:Number size], [param:Hex color] )</h3>
|
|
|
<p>
|
|
|
[page:Object3D object] -- object for which to render vertex normals.<br />
|
|
|
- [page:Number size] -- (optional) length of the arrows. Default is 1.<br />
|
|
|
- [page:Hex color] -- hex color of the arrows. Default is 0xff0000.<br />
|
|
|
- [page:Number linewidth] -- (optional) width of the arrow lines. Default is 1.
|
|
|
+ [page:Number size] -- (optional) length of the arrows. Default is *1*.<br />
|
|
|
+ [page:Hex color] -- (optional) hex color of the arrows. Default is *0xff0000*.
|
|
|
</p>
|
|
|
|
|
|
|
|
@@ -68,8 +67,12 @@
|
|
|
|
|
|
|
|
|
<h3>[method:undefined update]()</h3>
|
|
|
- <p>Updates the vertex normal preview based on movement of the object.</p>
|
|
|
+ <p>Updates the vertex tangents preview based on the object's world transform.</p>
|
|
|
|
|
|
+ <h3>[method:undefined dispose]()</h3>
|
|
|
+ <p>
|
|
|
+ Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app.
|
|
|
+ </p>
|
|
|
|
|
|
<h2>Source</h2>
|
|
|
|