fix(falukant): space overview character from house
All checks were successful
Deploy to production / deploy (push) Successful in 2m1s
All checks were successful
Deploy to production / deploy (push) Successful in 2m1s
This commit is contained in:
@@ -204,12 +204,14 @@ export default {
|
||||
}
|
||||
|
||||
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 center = scaledBox.getCenter(new modelRuntime.Vector3());
|
||||
// The house model is centered at z=0. Place the figure a little in
|
||||
// front of it, rather than overlaying an unrelated canvas.
|
||||
this.renderedCharacter.position.set(-center.x, -scaledBox.min.y, 0.62 - center.z);
|
||||
// The house model is centered at z=0. Keep the figure to one side and
|
||||
// clearly in front of it, instead of letting the meshes visually merge.
|
||||
this.renderedCharacter.position.set(0.72 - center.x, -scaledBox.min.y, 0.85 - center.z);
|
||||
this.scene.add(this.renderedCharacter);
|
||||
},
|
||||
render() {
|
||||
|
||||
Reference in New Issue
Block a user