respect camera target (#1421)
* respect camera target * make default planes scale * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -22,6 +22,7 @@ import {
|
||||
DEFAULT_PLANES,
|
||||
DefaultPlane,
|
||||
defaultPlaneColor,
|
||||
getSceneScale,
|
||||
INTERSECTION_PLANE_LAYER,
|
||||
isQuaternionVertical,
|
||||
RAYCASTABLE_PLANE,
|
||||
@ -195,11 +196,18 @@ class SceneEntities {
|
||||
this.axisGroup = new Group()
|
||||
const gridHelper = createGridHelper({ size: 100, divisions: 10 })
|
||||
gridHelper.renderOrder = -3 // is this working?
|
||||
gridHelper.name = 'gridHelper'
|
||||
const sceneScale = getSceneScale(
|
||||
sceneInfra.camera,
|
||||
sceneInfra.controls.target
|
||||
)
|
||||
gridHelper.scale.set(sceneScale, sceneScale, sceneScale)
|
||||
this.axisGroup.add(xAxisMesh, yAxisMesh, gridHelper)
|
||||
this.currentSketchQuaternion &&
|
||||
this.axisGroup.setRotationFromQuaternion(this.currentSketchQuaternion)
|
||||
|
||||
this.axisGroup.userData = { type: AXIS_GROUP }
|
||||
this.axisGroup.name = AXIS_GROUP
|
||||
this.axisGroup.layers.set(SKETCH_LAYER)
|
||||
this.axisGroup.traverse((child) => {
|
||||
child.layers.set(SKETCH_LAYER)
|
||||
|
Reference in New Issue
Block a user