5
5

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のヘルパー解説集】 ①ArrowHelperの使い方

Last updated at Posted at 2016-07-12

ArrowHelper

継承:THREE.Object3D
解説:3Dの矢印オブジェクトです。このArrowHelperを使うことで__ベクトルを可視化できるため、開発時やバグの検証時に役に立ちます__。

デモ

Untitled.gif

実装例

javascript
var dir = new THREE.Vector3( 1, 0, 0 );
var origin = new THREE.Vector3( 0, 0, 0 );
var length = 1;
var hex = 0xffff00;

var arrowHelper = new THREE.ArrowHelper( dir, origin, length, hex );
scene.add( arrowHelper );

ArrowHelper(dir, origin, length, hex, headLength, headWidth )

  • dir:THREE.Vector3 矢印の向きを表すベクトル
  • origin:THREE.Vector3 矢印の始点となるベクトル
  • length:矢印の長さ
  • hex:矢印の色
  • headLength:矢印の頭の長さ
  • headWidth:矢印の頭の太さ
5
5
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
5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?