mirror of
https://github.com/xibyte/jsketcher
synced 2026-02-19 22:01:18 +01:00
fix scale factor calculation
This commit is contained in:
parent
a1da0a4b96
commit
3cdd4b09f0
1 changed files with 2 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ import {
|
|||
import {AXIS} from '../../../math/l3space';
|
||||
import {MeshArrow} from 'scene/objects/auxiliary';
|
||||
import {OnTopOfAll} from 'scene/materialMixins';
|
||||
import DPR from 'dpr';
|
||||
|
||||
export default class CSysObject3D extends Object3D {
|
||||
|
||||
|
|
@ -58,7 +59,7 @@ export default class CSysObject3D extends Object3D {
|
|||
let camera = this.sceneSetup.camera;
|
||||
|
||||
if (camera.isOrthographicCamera) {
|
||||
return viewHeight / (camera.top - camera.bottom) / camera.zoom * 2;
|
||||
return viewHeight / (camera.top - camera.bottom) / camera.zoom * 2 * DPR * SIZE_PX / CSYS_SIZE_MODEL;
|
||||
} else {
|
||||
let p = new Vector3().copy(this.csys.origin);
|
||||
let cp = new Vector3().copy(camera.position);
|
||||
|
|
|
|||
Loading…
Reference in a new issue