Skip to content

Commit

Permalink
imports restructured
Browse files Browse the repository at this point in the history
  • Loading branch information
framefactory committed May 4, 2019
1 parent c63b092 commit b3d06f1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions source/client/components/CVModel2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import CObject3D from "@ff/scene/components/CObject3D";
import * as helpers from "@ff/three/helpers";

import { IDocument, INode } from "client/schema/document";
import { IModel, EUnitType, EDerivativeUsage, EDerivativeQuality } from "client/schema/model";
import { EDerivativeQuality, EDerivativeUsage, EUnitType, IModel } from "client/schema/model";

import unitScaleFactor from "../utils/unitScaleFactor";
import UberPBRMaterial, { EShaderMode } from "../shaders/UberPBRMaterial";
Expand All @@ -39,11 +39,9 @@ import CRenderer from "@ff/scene/components/CRenderer";

const _vec3a = new THREE.Vector3();
const _vec3b = new THREE.Vector3();
const _vec3c = new THREE.Vector3();
const _quat = new THREE.Quaternion();
const _box = new THREE.Box3();


/**
* Graph component rendering a model or model part.
*
Expand Down Expand Up @@ -241,7 +239,8 @@ export default class CVModel2 extends CObject3D

const data = document.models[node.model];

ins.localUnits.setValue(EUnitType[data.units || "cm"] || EUnitType.cm);
const units = EUnitType[data.units || "cm"];
ins.localUnits.setValue(isFinite(units) ? units : EUnitType.cm);

ins.position.reset();
ins.rotation.reset();
Expand Down

0 comments on commit b3d06f1

Please sign in to comment.