39 lines
972 B
JavaScript
39 lines
972 B
JavaScript
"use strict";
|
|
|
|
const HoleMaterialDebug = (function(){
|
|
|
|
const HoleMaterialDebug = function(){
|
|
|
|
let face_mat = null,
|
|
edge_mat = null;
|
|
|
|
this.get = () => face_mat || (face_mat = new THREE.MeshBasicMaterial({
|
|
color : 0x00bcd4,
|
|
transparent : true,
|
|
opacity : 0.25,
|
|
wireframe : false,
|
|
depthWrite : false
|
|
}));
|
|
|
|
this.get_edges = () => edge_mat || (edge_mat = new THREE.LineBasicMaterial({
|
|
color : 0x80deea, // Cian claro brillante
|
|
transparent : true,
|
|
opacity : 0.75,
|
|
depthWrite : false
|
|
}));
|
|
|
|
this.reset = () => {
|
|
if(face_mat){
|
|
face_mat.dispose();
|
|
face_mat = null;
|
|
}
|
|
if(edge_mat){
|
|
edge_mat.dispose();
|
|
edge_mat = null;
|
|
}
|
|
};
|
|
|
|
};
|
|
|
|
return HoleMaterialDebug;
|
|
})(); |