How to use the TubeBufferGeometry function from three
Find comprehensive JavaScript three.TubeBufferGeometry code examples handpicked from public code repositorys.
81 82 83 84 85 86 87 88 89 90
0, Math.PI, false, 0 ); this._addObjectFromGeometry( new three.TubeBufferGeometry(curve, null, penAttributes.diameter / 2), position, rotation, penAttributes.color4f );
304
0
10
+ 7 other calls in file
GitHub: gracexu94/FinalProject
107 108 109 110 111 112 113 114 115 116 117 118
} } function animateCamera(framework, scale, pipeSpline) { var splineCamera = framework.camera; var tubeGeometry = new THREE.TubeBufferGeometry(pipeSpline, 100, 2, 3, true); var binormal = new THREE.Vector3(); var normal = new THREE.Vector3(); // animate camera along spline
14
4
0
+ 5 other calls in file
GitHub: dzhurley/codevember
22 23 24 25 26 27 28 29 30 31
for (let i = -5; i < 5; i += 1) { points.push(new THREE.Vector3(0, -Math.pow(i * 1.5, 2), 25 * i)); } const curve = new THREE.CatmullRomCurve3(points); const geometry = new THREE.TubeBufferGeometry(curve, 100, 14, 100, false); const material = new THREE.MeshStandardMaterial({ color: 'lightblue', side: THREE.DoubleSide, });
0
0
0
58 59 60 61 62 63 64 65 66 67
new THREE.Vector3(20, 0, 0), new THREE.Vector3(30, 0, 10), new THREE.Vector3(30, 0, 20), new THREE.Vector3(20, 0, 30), new THREE.Vector3(10, 0, 0), new THREE.Vector3(10, 20, 0) ]) let geometry = new THREE.TubeBufferGeometry(pointsUpperBody, 16, 0.5, 8, false), material = new THREE.MeshBasicMaterial({ color: 0x000000, transparent: true }), mesh = new THREE.Mesh(geometry, material) mesh.geometry.parameters.path.needsUpdate = true mesh.name = `curvedSkeleton.${skel}.upperBody`
0
0
3
+ 5 other calls in file
three.Vector3 is the most popular function in three (22341 examples)