fix build volume z for cnc, laser. try new lighting points
This commit is contained in:
parent
a579fa5677
commit
7c4d113f13
2 changed files with 9 additions and 6 deletions
|
|
@ -438,6 +438,7 @@ const conf = exports({
|
||||||
bedWidth: 300,
|
bedWidth: 300,
|
||||||
bedDepth: 175,
|
bedDepth: 175,
|
||||||
bedHeight: 2.5,
|
bedHeight: 2.5,
|
||||||
|
maxHeight: 300,
|
||||||
originCenter: false,
|
originCenter: false,
|
||||||
spindleMax: 0,
|
spindleMax: 0,
|
||||||
gcodePre: [],
|
gcodePre: [],
|
||||||
|
|
@ -560,6 +561,7 @@ const conf = exports({
|
||||||
bedWidth: 300,
|
bedWidth: 300,
|
||||||
bedDepth: 175,
|
bedDepth: 175,
|
||||||
bedHeight: 2.5,
|
bedHeight: 2.5,
|
||||||
|
maxHeight: 300,
|
||||||
gcodePre: [],
|
gcodePre: [],
|
||||||
gcodePost: [],
|
gcodePost: [],
|
||||||
gcodeFExt: "",
|
gcodeFExt: "",
|
||||||
|
|
|
||||||
|
|
@ -243,8 +243,8 @@ gapp.register("moto.space", [], (root, exports) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function addLight(x,y,z,i) {
|
function addLight(x, y, z, i, color = 0xffffff) {
|
||||||
let l = new THREE.DirectionalLight(0xffffff, i, 0);
|
let l = new THREE.DirectionalLight(color, i, 0);
|
||||||
l.position.set(x,z,y);
|
l.position.set(x,z,y);
|
||||||
// let b; l.add(b = new THREE.Mesh(
|
// let b; l.add(b = new THREE.Mesh(
|
||||||
// new THREE.BoxGeometry(1,1,1),
|
// new THREE.BoxGeometry(1,1,1),
|
||||||
|
|
@ -260,19 +260,20 @@ gapp.register("moto.space", [], (root, exports) => {
|
||||||
for (let l of lights || []) {
|
for (let l of lights || []) {
|
||||||
SCENE.remove(l);
|
SCENE.remove(l);
|
||||||
}
|
}
|
||||||
// override
|
// override Z
|
||||||
x *= 4; y *= 4; z *= 4;
|
z = Math.max(x,y,z);
|
||||||
// add new
|
// add new
|
||||||
let x0 = -x/2, y0 = -y/2, z0 = 0;
|
let x0 = -x/2, y0 = -y/2, z0 = 0;
|
||||||
let x1 = x/2, y1 = y/2, z1 = z / 2, z2 = z;
|
let x1 = x/2, y1 = y/2, z1 = z / 2, z2 = z;
|
||||||
|
|
||||||
lights = [
|
lights = [
|
||||||
// over
|
// over
|
||||||
addLight( 0, 0, z2, lightIntensity * 1.2),
|
addLight( 0, 0, z2, lightIntensity * 1.2),
|
||||||
addLight( x0, y0, z1, lightIntensity * 2.5),
|
addLight( x0, y0, z1, lightIntensity * 2.5, 0xeeeeee),
|
||||||
addLight( x1, y1, z1, lightIntensity * 2.5),
|
addLight( x1, y1, z1, lightIntensity * 2.5),
|
||||||
// under
|
// under
|
||||||
addLight( x0, y1, -z1, lightIntensity * 0.5),
|
addLight( x0, y1, -z1, lightIntensity * 0.5),
|
||||||
addLight( x1, y0, -z1, lightIntensity * 0.5),
|
addLight( x1, y0, -z1, lightIntensity * 0.5, 0xeeeeee),
|
||||||
addLight( 0, 0, -z2, lightIntensity * 0.8),
|
addLight( 0, 0, -z2, lightIntensity * 0.8),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue