fix(falukant): space overview character from house
All checks were successful
Deploy to production / deploy (push) Successful in 2m1s

This commit is contained in:
Torsten Schulz (local)
2026-09-30 15:52:40 +02:00
parent 73b83727f8
commit c8b177c077

View File

@@ -204,12 +204,14 @@ export default {
} }
const ageScale = requestedAge <= 3 ? 0.6 : requestedAge <= 7 ? 0.8 : requestedAge <= 12 ? 0.9 : 0.98; const ageScale = requestedAge <= 3 ? 0.6 : requestedAge <= 7 ? 0.8 : requestedAge <= 12 ? 0.9 : 0.98;
this.renderedCharacter.scale.setScalar((1.7 / maxDimension) * ageScale); // Overview figures should read as a person standing next to the house,
// rather than filling the same visual volume as the building.
this.renderedCharacter.scale.setScalar((1.15 / maxDimension) * ageScale);
const scaledBox = new modelRuntime.Box3().setFromObject(this.renderedCharacter); const scaledBox = new modelRuntime.Box3().setFromObject(this.renderedCharacter);
const center = scaledBox.getCenter(new modelRuntime.Vector3()); const center = scaledBox.getCenter(new modelRuntime.Vector3());
// The house model is centered at z=0. Place the figure a little in // The house model is centered at z=0. Keep the figure to one side and
// front of it, rather than overlaying an unrelated canvas. // clearly in front of it, instead of letting the meshes visually merge.
this.renderedCharacter.position.set(-center.x, -scaledBox.min.y, 0.62 - center.z); this.renderedCharacter.position.set(0.72 - center.x, -scaledBox.min.y, 0.85 - center.z);
this.scene.add(this.renderedCharacter); this.scene.add(this.renderedCharacter);
}, },
render() { render() {