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,
fork icon5
star icon14
watch icon0

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,
fork icon3
star icon3
watch icon23

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;
fork icon0
star icon0
watch icon0

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,
fork icon0
star icon0
watch icon4

Other functions in three

Sorted by popularity

function icon

three.Vector3 is the most popular function in three (22341 examples)