mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-09 18:02:50 +01:00
improve default handling color
This commit is contained in:
parent
baadd79d79
commit
ffa7121bb5
2 changed files with 9 additions and 5 deletions
|
|
@ -80,7 +80,7 @@ TCAD.utils.createLine = function (a, b, color) {
|
|||
TCAD.utils.createSolidMesh = function(faces) {
|
||||
var material = new THREE.MeshPhongMaterial({
|
||||
vertexColors: THREE.FaceColors,
|
||||
color: '#B0C4DE',
|
||||
color: TCAD.view.FACE_COLOR,
|
||||
shininess: 0
|
||||
});
|
||||
var geometry = new TCAD.Solid(faces, material);
|
||||
|
|
@ -165,7 +165,7 @@ TCAD.utils.isPointInsidePolygon = function( inPt, inPolygon ) {
|
|||
}
|
||||
|
||||
return inside;
|
||||
}
|
||||
};
|
||||
|
||||
TCAD.utils.sketchToPolygons = function(geom) {
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,14 @@ TCAD.view = {};
|
|||
TCAD.view.setFaceColor = function(polyFace, color) {
|
||||
for (var i = 0; i < polyFace.faces.length; ++i) {
|
||||
var face = polyFace.faces[i];
|
||||
face.color.set( color );
|
||||
if (color == null) {
|
||||
face.color = new THREE.Color();
|
||||
} else {
|
||||
face.color.set( color );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
TCAD.view.FACE_COLOR = 0xB0C4DE;
|
||||
TCAD.Viewer = function() {
|
||||
|
||||
function aspect() {
|
||||
|
|
@ -79,7 +83,7 @@ TCAD.Viewer = function() {
|
|||
**/
|
||||
|
||||
|
||||
this.selectionMgr = new TCAD.FaceSelectionManager( 0xFAFAD2, 0xB0C4DE);
|
||||
this.selectionMgr = new TCAD.FaceSelectionManager( 0xFAFAD2, null);
|
||||
|
||||
var projector = new THREE.Projector();
|
||||
var raycaster = new THREE.Raycaster();
|
||||
|
|
|
|||
Loading…
Reference in a new issue