How to use the ArrowHelper function from three
Find comprehensive JavaScript three.ArrowHelper code examples handpicked from public code repositorys.
924 925 926 927 928 929 930 931 932 933
axesCamera.up = this.camera.up; // important! this.axesCamera = axesCamera; const axesScene = new THREE.Scene(); const axesPos = new THREE.Vector3( 0,0,0 ); axesScene.add( new THREE.ArrowHelper( new THREE.Vector3( 1,0,0 ), axesPos, 60, 0xFF0000, 20, 10 ) ); axesScene.add( new THREE.ArrowHelper( new THREE.Vector3( 0,1,0 ), axesPos, 60, 0x00FF00, 20, 10 ) ); axesScene.add( new THREE.ArrowHelper( new THREE.Vector3( 0,0,1 ), axesPos, 60, 0x0000FF, 20, 10 ) ); this.axesScene = axesScene; }
7
21
7
+ 11 other calls in file
GitHub: juanuys/boids
123 124 125 126 127 128 129 130 131 132
var globalVertex = localVertex.applyMatrix4(this.mesh.matrix); var directionVector = globalVertex.sub(this.mesh.position); var raycaster = new THREE.Raycaster(originPoint, directionVector.clone().normalize(), 0, visionRange); if (this.debug) { const arrow = new THREE.ArrowHelper(raycaster.ray.direction, raycaster.ray.origin, 50, 0xff0000) if (this.counter % 50 === 0) { arrow.name = Math.random().toString(36).substring(2, 15) this.arrows.push(arrow) this.scene.add(arrow);
2
5
0
+ 3 other calls in file
69 70 71 72 73 74 75 76 77 78
const setupWindHelpers = () => { const step = 5; for (let x = WORLD_SIZE / -2; x <= WORLD_SIZE / 2; x += step) { for (let y = WORLD_SIZE / -2; y <= WORLD_SIZE / 2; y += step) { for (let z = WORLD_SIZE / -2; z <= WORLD_SIZE / 2; z += step) { const arrow = new THREE.ArrowHelper( new THREE.Vector3(0,0,0), new THREE.Vector3(x,y,z), 1, 0x00ff00,
1
0
0
GitHub: Troveup/HEMesh
39 40 41 42 43 44 45 46 47 48
var parallelOffset = sideVectors[i].clone(); var perpendicularOffset = sideVectors[(i+sideVectors.length-1)%sideVectors.length].clone(); var offset = new THREE.Vector3().subVectors(parallelOffset, perpendicularOffset).multiplyScalar(0.1); origin.add(offset) arrows.push( new THREE.ArrowHelper( dir, origin, len *.4, edgeColors.interior )); } i = 0; this.edge.loopEdges(function(edge){
0
1
0
GitHub: ARizeDevs/tf-handposefinal
270 271 272 273 274 275 276 277 278 279
function visVecDir(handOrientation, scene, color=0xffff00) { const dir = handOrientation; // dir.normalize(); // const origin = plane.position; // const length = 1; // const arrowHelper = new THREE.ArrowHelper(dir, origin, length, color); // scene.add(arrowHelper); // plane.lookAt(arrowHelper.position);
0
0
0
three.Vector3 is the most popular function in three (22341 examples)