4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【three.jsのヘルパー解説集】 ⑩ VertexNormalsHelperの使い方

Posted at

VertexNormalsHelper

継承:THREE.Line
解説:頂点法線を確認できるヘルパーです。blenderなどからモデルを出力した時の確認として使用すると便利です。

デモ

Untitled.gif

実装例

javascript
var geometry = new THREE.BoxGeometry(2, 2, 2, 2, 2, 2);
var material = new THREE.MeshBasicMaterial({
  color: 0xff0000,
  wireframe: true
});
var object = new THREE.Mesh(geometry, material);
scene.add(object);

var edges = new THREE.VertexNormalsHelper(object, 0.5, 0x00ff00, 1);
scene.add(edges);

VertexNormalsHelper(object, size, color, linewidth)

  • object:頂点法線を確認したいオブジェクト
  • size:法線の長さ
  • color:法線の色
  • linewidth:先の太さ
4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?