How to use the TorusKnotGeometry function from three
Find comprehensive JavaScript three.TorusKnotGeometry code examples handpicked from public code repositorys.
44 45 46 47 48 49 50 51 52 53
}), )); updateGroupGeometry( object, new THREE.TorusKnotGeometry( config.radius, config.tube, 64, config.knotsNumber,
5
14
0
35 36 37 38 39 40 41 42 43 44
var mat = new THREE.MeshBasicMaterial({ side: THREE.DoubleSide, }) var sphere = new THREE.Mesh(geo, mat) var itemGeo = new THREE.TorusKnotGeometry(0.02, 0.008, 128, 128) var itemMat = new THREE.MeshPhongMaterial({ // transparent: true, // shininess: 20, // metal: true,
3
3
23
GitHub: skizi/js_study
91 92 93 94 95 96 97 98 99 100
rectLightMesh.scale.y = this.rectLight.height; this.rectLight.add( rectLightMesh ); const meshKnot = new THREE.Mesh( new THREE.TorusKnotGeometry( 0.2, 0.06, 100, 16), m ); meshKnot.position.set(0, 0.5, 0); meshKnot.castShadow = true;
0
0
0
GitHub: Neticon/webgl-tests
75 76 77 78 79 80 81 82 83 84
"}" ].join("\n") const sphereGeo = new THREE.SphereGeometry(1, 64, 64) // const sphereGeo = new THREE.TorusKnotGeometry(.7,.2,64,64) const sphereMat = new THREE.ShaderMaterial({ vertexShader: shader.vertexShader, fragmentShader, uniforms,
0
0
4
three.Vector3 is the most popular function in three (22341 examples)