How to use the MeshToonMaterial function from three

Find comprehensive JavaScript three.MeshToonMaterial code examples handpicked from public code repositorys.

34
35
36
37
38
39
40
41
42
43
  'teen-male': 1.6,
  'adult-female': 1.65,
  'teen-female': 1.6
}

const toonMaterial = new THREE.MeshToonMaterial({
  color: 0xffffff,
  emissive: 0x0,
  specular: 0x0,
  skinning: true,
fork icon263
star icon0
watch icon2

+ 5 other calls in file

374
375
376
377
378
379
380
381
382
383

// Save a reference to the loaded android model.
this.android = object;

// Make materials here in three.js.
const bodyMaterial = new THREE.MeshToonMaterial({
  color: new THREE.Color(0xa4ca39),
  shading: THREE.SmoothShading,
  shininess: 15,
});
fork icon1
star icon11
watch icon1

+ 3 other calls in file

100
101
102
103
104
105
106
107
108
  depth: h / scale,
  bevelEnabled: false,
  uvGenerator: BoundingUVGenerator
}

var materialWall = new THREE.MeshToonMaterial({map: textures.wall, side: THREE.FrontSide})
materialWall.depthTest = true
materialWall.transparent = false
materialWall.userData.outlineParameters = { thickness: 0, alpha: 0.0 }
fork icon263
star icon0
watch icon2

+ 7 other calls in file

14
15
16
17
18
19
20
21
22
23
const gltfLoader = new THREE.GLTFLoader(loadingManager)
const imageLoader = new THREE.ImageLoader(loadingManager)

objLoader.setLogging(false, false)

const materialFactory = () => new THREE.MeshToonMaterial({
  color: 0xffffff,
  emissive: 0x0,
  specular: 0x0,
  skinning: true,
fork icon263
star icon0
watch icon2

+ 3 other calls in file

81
82
83
84
85
86
87
88
89
90
		this.dimension.width / 2,
		this.dimension.height / 2,
		this.dimension.depth / 2
	)
);
this.material = new THREE.MeshToonMaterial({
	color: this.color,
	shading: THREE.FlatShading
});
this.mesh = new THREE.Mesh(geometry, this.material);
fork icon147
star icon53
watch icon0

28
29
30
31
32
33
34
35
36
37
    var plane = new THREE.Mesh(geometry, material);
    scene.add(plane);
}

function loadSTL(path, color, wireframe) {
    const material = new THREE.MeshToonMaterial({
        color: color,
        wireframe: wireframe,
        transparent: true,
        opacity: 0.95
fork icon1
star icon9
watch icon1

408
409
410
411
412
413
414
415
416
417
418
    return new THREE.TetrahedromBufferGeometry(1);
}


export function baseMaterial (nuc, type) {
    //var material = new THREE.MeshLambertMaterial({color: 0x554444 });
    var material = new THREE.MeshToonMaterial({color: 0x554444 });
    if (nuc == 'A') {
        material.color = new THREE.Color(nucleotideColors.A);
    } else if (nuc == 'C') {
        material.color = new THREE.Color(nucleotideColors.C);
fork icon0
star icon0
watch icon0

+ 2 other calls in file

97
98
99
100
101
102
103
104
105
106
            this.state[key] = false;
        }
        this.state["active"] = true;
    }
    var geometry = new THREE.BoxGeometry(this.dimension["width"], this.dimension["height"], this.dimension["depth"]);
    this.material = new THREE.MeshToonMaterial({ color: this.color });
    this.mesh = new THREE.Mesh(geometry, this.material);
    this.mesh.position.set(this.position["x"], this.position["y"], this.position["z"]);
    return this;
}
fork icon0
star icon0
watch icon0

Other functions in three

Sorted by popularity

function icon

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