mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-26 15:34:57 +01:00
96 lines
2.2 KiB
HTML
96 lines
2.2 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<meta charset="utf-8" />
|
||
|
<script src="../../../list.js"></script>
|
||
|
<script src="../../../page.js"></script>
|
||
|
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||
|
</head>
|
||
|
<body>
|
||
|
[page:Object3D] →
|
||
|
|
||
|
<h1>[name]</h1>
|
||
|
|
||
|
<div class="desc">An 3D arrow Object.</div>
|
||
|
|
||
|
|
||
|
<h2>Example</h2>
|
||
|
|
||
|
<code>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 );
|
||
|
</code>
|
||
|
|
||
|
|
||
|
|
||
|
<h2>Constructor</h2>
|
||
|
|
||
|
|
||
|
<h3>[name]([page:Vector3 dir], [page:Vector3 origin], [page:Number length], [page:Number hex], [page:Number headLength], [page:Number headWidth] )</h3>
|
||
|
<div>
|
||
|
dir -- Vector3 -- direction from origin. Must be a unit vector. <br />
|
||
|
origin -- Vector3 <br />
|
||
|
length -- scalar <br />
|
||
|
hex -- hexadecimal value to define color ex:0xffff00<br />
|
||
|
headLength -- The length of the head of the arrow<br />
|
||
|
headWidth -- The length of the width of the arrow
|
||
|
</div>
|
||
|
<div>
|
||
|
This creates an arrow starting in origin in the direction dir for a certain length. It is also possible to change color.
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<h2>Properties</h2>
|
||
|
|
||
|
|
||
|
|
||
|
<h3>[property:Line line]</h3>
|
||
|
<div>
|
||
|
Contains the line part of the arrowHelper.
|
||
|
</div>
|
||
|
|
||
|
<h3>[property:Mesh cone]</h3>
|
||
|
<div>
|
||
|
Contains the cone part of the arrowHelper.
|
||
|
</div>
|
||
|
|
||
|
<h2>Methods</h2>
|
||
|
|
||
|
|
||
|
|
||
|
<h3>[method:null setColor]([page:Number hex])</h3>
|
||
|
<div>
|
||
|
hex -- The hexadicmal value of the color
|
||
|
</div>
|
||
|
<div>
|
||
|
Sets the color of the arrowHelper.
|
||
|
</div>
|
||
|
|
||
|
<h3>[method:null setLength]([page:Number length], [page:Number headLength], [page:Number headWidth])</h3>
|
||
|
<div>
|
||
|
length -- The desired length<br />
|
||
|
headLength -- The length of the head of the arrow<br />
|
||
|
headWidth -- The length of the width of the arrow
|
||
|
</div>
|
||
|
<div>
|
||
|
Sets the length of the arrowhelper.
|
||
|
</div>
|
||
|
|
||
|
<h3>[method:null setDirection]([page:Vector3 dir])</h3>
|
||
|
<div>
|
||
|
dir -- The desired direction. Must be a unit vector.
|
||
|
</div>
|
||
|
<div>
|
||
|
Sets the direction of the arrowhelper.
|
||
|
</div>
|
||
|
|
||
|
<h2>Source</h2>
|
||
|
|
||
|
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||
|
</body>
|
||
|
</html>
|