How to use the FrontSide function from three

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

101
102
103
104
105
106
107
108
109
110
let material = new THREE.MeshPhongMaterial({
  color: mesh.pathColor,
  transparent: true,
  depthTest: true,
  depthWrite: true,
  side: THREE.FrontSide
})
mesh.traverse((child) => {
  if (child instanceof THREE.Mesh){
    child.material = material;
fork icon4
star icon7
watch icon1

+ 7 other calls in file

669
670
671
672
673
674
675
676
677
678

}

if (materials && materials.length > 0) {
	if (json.materials[0].singleSided) {
		materials[0].side = THREE.FrontSide;
	} else if (json.materials[0].flipSided){
		materials[0].side = THREE.BackSide;
	} else {
		materials[0].side = THREE.DoubleSide;
fork icon10
star icon3
watch icon3

+ 23 other calls in file

47
48
49
50
51
52
53
54
55
56
if (options) {
  if (options.vs && options.fs) {
    let transparent = true;
    if (options.transparent)
      transparent = options.transparent;
    let side = THREE.FrontSide;
    if (options.side)
      side = options.side;
    material = new THREE.ShaderMaterial( {
      transparent,
fork icon10
star icon3
watch icon3

+ 7 other calls in file

79
80
81
82
83
84
85
86
87
88
89


ZincObject.prototype.checkAndCreateTransparentMesh = function(options) {
  if (this.isGeometry && this.morph.material && this.morph.material.transparent) {
    if (!this.secondaryMesh) {
      let secondaryMaterial = this.morph.material.clone();
      secondaryMaterial.side =  THREE.FrontSide;
      this.secondaryMesh = new THREE.Mesh(this.morph.geometry, secondaryMaterial);
      this.secondaryMesh.renderOrder = this.morph.renderOrder + 1;
      this.secondaryMesh.userData = this;
      this.secondaryMesh.name = this.groupName;
fork icon10
star icon3
watch icon3

+ 29 other calls in file

291
292
293
294
295
296
297
298
299
  vertexShader: vertexShader,
  blending: THREE.AdditiveBlending
});

material.depthWrite = false;
material.side = THREE.FrontSide;

//console.log(THREE);

fork icon3
star icon7
watch icon0

1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
            emissive: 0x000000,
            metalness: 1,
            roughness: 1,
            transparent: false,
            depthTest: true,
            side: three.FrontSide
        });
    }
    return cache['DefaultMaterial'];
}
fork icon2
star icon7
watch icon0

220
221
222
223
224
225
226
227
228
229
230
231
	this.materialsInfo = {};
	this.materials = {};
	this.materialsArray = [];
	this.nameLookup = {};


	this.side = ( this.options && this.options.side ) ? this.options.side : THREE.FrontSide;
	this.wrap = ( this.options && this.options.wrap ) ? this.options.wrap : THREE.RepeatWrapping;


};

fork icon3
star icon6
watch icon1

+ 18 other calls in file

176
177
178
179
180
181
182
183
184
185
186
187
	this.materialsInfo = {};
	this.materials = {};
	this.materialsArray = [];
	this.nameLookup = {};


	this.side = this.options && this.options.side ? this.options.side : THREE.FrontSide;
	this.wrap = this.options && this.options.wrap ? this.options.wrap : THREE.RepeatWrapping;
};


MTLLoader.MaterialCreator.prototype = {
fork icon0
star icon2
watch icon1

1048
1049
1050
1051
1052
1053
1054
1055
1056
      throw new Error("Unknown technique.states.enable: " + enable);
  }
}

if (enableCullFace) {
  materialParams.side = functions.cullFace !== undefined ? WEBGL_SIDES[functions.cullFace] : THREE.FrontSide;
} else {
  materialParams.side = THREE.DoubleSide;
}
fork icon0
star icon1
watch icon1

+ 19 other calls in file

1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
    emissive: 0x000000,
    metalness: 1,
    roughness: 1,
    transparent: false,
    depthTest: true,
    side: _three.FrontSide
  });
}

return cache['DefaultMaterial'];
fork icon0
star icon1
watch icon0

280
281
282
283
284
285
286
287
288
289
// 球面形状
mat.map = dotTexture;
mat.depthWrite = false;
mat.transparent = true;
mat.opacity = 0;
mat.side = THREE.FrontSide;
// mat.blending = THREE.AdditiveBlending
mat.blending = THREE.NormalBlending;
let n = i / 2;
mat.t_ = n * Math.PI * 2;
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)