Skip to content
This repository has been archived by the owner on Jun 17, 2020. It is now read-only.

Commit

Permalink
transform -> position
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou committed Jul 11, 2019
1 parent bceb580 commit 86c7dc0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
8 changes: 4 additions & 4 deletions js/lib/src/BlockUtils/Block.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,22 +460,22 @@ class Block {
);
});

// To display surfaces like 2D planes or iso-surfaces whatever
// For displaying surfaces like 2D planes or iso-surfaces whatever
// the point of view
mesh.material.side = THREE.DoubleSide;

mesh.material.alphaTest = 0.1;

// Set wireframe status and shading
if (mesh.type !== 'LineSegments' && mesh.type !== 'Points') {
mesh.material.wireframe = this._wireframe;
mesh.material.flatShading = !this._wireframe;
} else {
mesh.material.wireframe = false;
// Why ?
// mesh.material.shading = THREE.SmoothShading;
}

// Get isoColor node
mesh.material.transform = position;
mesh.material.position = position;
mesh.material.alpha = alpha;
mesh.material.color = color;
mesh.material.build();
Expand Down
3 changes: 0 additions & 3 deletions js/lib/src/BlockUtils/DataBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ class DataBlock extends Block {
this._material._colorVaryingNodes = [];
this._material._alphaVaryingNodes = [];

// Disable backface culling (to fix display issues with planes)
this._material.side = THREE.DoubleSide;

// Initialize mesh position/rotation/scale
this._meshes.push(
new THREE.Mesh(this._bufferGeometry, this._material)
Expand Down
4 changes: 2 additions & 2 deletions js/lib/src/BlockUtils/PlugInBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,8 @@ class PlugInBlock extends Block {

let setCustomVarCall = new Nodes.FunctionCallNode(setCustomVar);

if (this._meshes[0].material.transform) {
setCustomVarCall.inputs.pos = this._meshes[0].material.transform;
if (this._meshes[0].material.position) {
setCustomVarCall.inputs.pos = this._meshes[0].material.position;
} else {
setCustomVarCall.inputs.pos = new Nodes.PositionNode();
}
Expand Down
1 change: 0 additions & 1 deletion js/lib/src/BlockUtils/PlugIns/IsoSurfaceUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class IsoSurfaceUtils {
this._Emax = undefined;

this.surfaceMaterial = block.getCurrentMaterial();
this.surfaceMaterial.side = THREE.DoubleSide;
}

_createTree (array, value = 'min') {
Expand Down

0 comments on commit 86c7dc0

Please sign in to comment.