diff --git a/src/Editor/MaterialEditor.ts b/src/Editor/MaterialEditor.ts index 6a0093ba6..af1227c28 100644 --- a/src/Editor/MaterialEditor.ts +++ b/src/Editor/MaterialEditor.ts @@ -59,6 +59,7 @@ export class MaterialEditor initViewer() { this.m_Viewer = new Viewer(this.m_Canvas); + this.m_Viewer.m_PreViewer.Cursor.CursorObject.visible = false; this.m_Viewer.m_CameraCtrl.SwitchCamera(); this.m_Viewer.m_bUsePass = false; } @@ -77,6 +78,7 @@ export class MaterialEditor let geo = this.m_Geometrys.get(this.m_CurGeometryName); this.m_ShowMesh = new THREE.Mesh(geo); + this.m_ShowMesh.scale.set(1000, 1000, 1000); this.m_ShowObject.add(this.m_ShowMesh); scene.add(this.m_ShowObject); @@ -101,8 +103,8 @@ export class MaterialEditor //Pontual light 点光源 var point = new THREE.PointLight(0x999999); - point.intensity = 2.5; - point.position.set(-0.5, 1, 1.5); + point.intensity = 2.5 * 1000; + point.position.set(-0.5, 1, 1.5).multiplyScalar(1000); scene.add(point); } diff --git a/src/UI/MaterialEditor/MaterialComponen.tsx b/src/UI/MaterialEditor/MaterialComponen.tsx index 31797c7bc..d4955544c 100644 --- a/src/UI/MaterialEditor/MaterialComponen.tsx +++ b/src/UI/MaterialEditor/MaterialComponen.tsx @@ -206,36 +206,32 @@ export class Color extends React.Component{ render() { const styles = - { - color: { - width: '36px', - height: '14px', - borderRadius: '2px', - }, - swatch: { - padding: '5px', - background: '#fff', - borderRadius: '1px', - boxShadow: '0 0 0 1px rgba(0,0,0,.1)', - display: 'inline-block', - cursor: 'pointer', - }, - popover: { - position: 'absolute', - zIndex: '2', - }, - cover: { - position: 'fixed', - top: '0px', - right: '0px', - bottom: '0px', - left: '0px', - }, - }; - const popover = { - position: 'absolute', - zIndex: '2', - } + { + color: { + width: '36px', + height: '14px', + borderRadius: '2px', + }, + swatch: { + padding: '5px', + background: '#fff', + borderRadius: '1px', + boxShadow: '0 0 0 1px rgba(0,0,0,.1)', + display: 'inline-block', + cursor: 'pointer', + }, + popover: { + position: 'absolute', + zIndex: '2', + }, + cover: { + position: 'fixed', + top: '0px', + right: '0px', + bottom: '0px', + left: '0px', + }, + }; let typeData = this.props.data; let obj = this.props.obj; let v = obj[typeData.key]; @@ -347,7 +343,7 @@ export class TextureComponent extends React.Component{ { this.texture.repeatX = Number(v.target.value) @@ -357,7 +353,7 @@ export class TextureComponent extends React.Component{ { this.texture.repeatY = Number(v.target.value)