36 lines
919 B
JavaScript
36 lines
919 B
JavaScript
"use strict";
|
|
|
|
const StairMaterialDebug = (function(){
|
|
|
|
const StairMaterialDebug = function(){
|
|
|
|
let landing_mat = null,
|
|
ramp_mat = null;
|
|
|
|
this.get_landing = () => landing_mat || (landing_mat = new THREE.MeshBasicMaterial({
|
|
color : 0x2e7d32, // Verde oscuro / esmeralda
|
|
transparent : true,
|
|
opacity : 0.85
|
|
}));
|
|
|
|
this.get_ramp = () => ramp_mat || (ramp_mat = new THREE.MeshBasicMaterial({
|
|
color : 0x4caf50, // Verde lima
|
|
transparent : true,
|
|
opacity : 0.70
|
|
}));
|
|
|
|
this.reset = () => {
|
|
if(landing_mat){
|
|
landing_mat.dispose();
|
|
landing_mat = null;
|
|
}
|
|
if(ramp_mat){
|
|
ramp_mat.dispose();
|
|
ramp_mat = null;
|
|
}
|
|
};
|
|
|
|
};
|
|
|
|
return StairMaterialDebug;
|
|
})(); |