diff --git a/src/DatabaseServices/Entity/EntityFbx.ts b/src/DatabaseServices/Entity/EntityFbx.ts index d456ccb4f..ad7102c2e 100644 --- a/src/DatabaseServices/Entity/EntityFbx.ts +++ b/src/DatabaseServices/Entity/EntityFbx.ts @@ -231,9 +231,7 @@ export class EntityFbx extends Entity //缩放尺寸(如果用户指定了这个缩放 我们就缩放它) if (this._ScaleSize.x) - this.newObject.scale.copy(this._ScaleSize).divide(this._Size).multiplyScalar(10); - else - this.newObject.scale.set(10, 10, 10);//UE4缩放10 如果按米为单位的缩放1000 + this.newObject.scale.copy(this._ScaleSize).divide(this._Size); dObj.add(this.newObject); @@ -330,9 +328,7 @@ export class EntityFbx extends Entity //缩放尺寸(如果用户指定了这个缩放 我们就缩放它) if (this._ScaleSize.x) - this.newObject.scale.copy(this._ScaleSize).divide(this._Size).multiplyScalar(10); - else - this.newObject.scale.set(10, 10, 10);//UE4缩放10 如果按米为单位的缩放1000 + this.newObject.scale.copy(this._ScaleSize).divide(this._Size); this.newObject.updateMatrix();//保证更新缩放 this.newObject.updateMatrixWorld(false);//保证更新位置 diff --git a/src/UI/Components/ToolBar/ModifyModel/ModelCommon.tsx b/src/UI/Components/ToolBar/ModifyModel/ModelCommon.tsx index 3ef67cec2..2c332a6f9 100644 --- a/src/UI/Components/ToolBar/ModifyModel/ModelCommon.tsx +++ b/src/UI/Components/ToolBar/ModifyModel/ModelCommon.tsx @@ -4,12 +4,12 @@ import { observer } from "mobx-react"; import React from "react"; import { MathUtils, Matrix4, Vector3 } from "three"; import { app } from "../../../../ApplicationServices/Application"; -import { safeEval } from "../../../../Common/eval"; import { KeyBoard } from "../../../../Common/KeyEnum"; import { MakeRotateMatrix4 } from "../../../../Common/Matrix4Utils"; import { FixedNotZero } from "../../../../Common/Utils"; +import { safeEval } from "../../../../Common/eval"; import { Entity } from "../../../../DatabaseServices/Entity/Entity"; -import { commandMachine, CommandWrap } from "../../../../Editor/CommandMachine"; +import { CommandWrap, commandMachine } from "../../../../Editor/CommandMachine"; import { CommandState } from "../../../../Editor/CommandState"; import { AxisType } from "../../../../Editor/TranstrolControl/CoorAxes"; import { AppToaster } from "../../Toaster"; @@ -33,7 +33,7 @@ export class SizeComponent extends React.Component this.disposeAutorun = autorun(() => { if (this.sizeRef.current) - this.sizeRef.current.inputElement.value = this.props.store[this.props.sizeKey].toFixed(0); + this.sizeRef.current.inputElement.value = this.props.store[this.props.sizeKey].toFixed(3); }); } @@ -51,7 +51,7 @@ export class SizeComponent extends React.Component let value = safeEval(this.sizeRef.current.inputElement.value); if (isNaN(value) && this.sizeRef.current) { - this.sizeRef.current.inputElement.value = store[this.props.sizeKey].toFixed(0); + this.sizeRef.current.inputElement.value = store[this.props.sizeKey].toFixed(3); return; } @@ -110,7 +110,7 @@ export class SizeComponent extends React.Component }} /> { @@ -121,7 +121,7 @@ export class SizeComponent extends React.Component } if (e.keyCode === KeyBoard.Escape) { - this.sizeRef.current.inputElement.value = store[this.props.sizeKey].toFixed(0); + this.sizeRef.current.inputElement.value = store[this.props.sizeKey].toFixed(3); } }} onBlur={() => { this.ChangeModuleSize(); }}