UNPKG

arx-level-generator

Version:
15 lines 611 B
import { Object3D } from 'three'; import { applyTransformations } from '../../helpers.js'; // the generic syntax will make sure that if we get a Group as input, which is a descendant of Object3D // then we'll get the same type returned. Overloads or union types will return strictly from the given types export const toArxCoordinateSystem = (threeJsObj) => { if (threeJsObj instanceof Object3D) { threeJsObj.scale.y *= -1; applyTransformations(threeJsObj); } else { threeJsObj.scale(1, -1, 1); } return threeJsObj; }; //# sourceMappingURL=toArxCoordinateSystem.js.map