移除材质编辑器的鼠标光标,修正无法输入0.的问题

pull/195/MERGE
ChenX 6 years ago
parent 8a81cad477
commit ad766102e1

@ -59,6 +59,7 @@ export class MaterialEditor
initViewer() initViewer()
{ {
this.m_Viewer = new Viewer(this.m_Canvas); 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_CameraCtrl.SwitchCamera();
this.m_Viewer.m_bUsePass = false; this.m_Viewer.m_bUsePass = false;
} }
@ -77,6 +78,7 @@ export class MaterialEditor
let geo = this.m_Geometrys.get(this.m_CurGeometryName); let geo = this.m_Geometrys.get(this.m_CurGeometryName);
this.m_ShowMesh = new THREE.Mesh(geo); this.m_ShowMesh = new THREE.Mesh(geo);
this.m_ShowMesh.scale.set(1000, 1000, 1000);
this.m_ShowObject.add(this.m_ShowMesh); this.m_ShowObject.add(this.m_ShowMesh);
scene.add(this.m_ShowObject); scene.add(this.m_ShowObject);
@ -101,8 +103,8 @@ export class MaterialEditor
//Pontual light 点光源 //Pontual light 点光源
var point = new THREE.PointLight(0x999999); var point = new THREE.PointLight(0x999999);
point.intensity = 2.5; point.intensity = 2.5 * 1000;
point.position.set(-0.5, 1, 1.5); point.position.set(-0.5, 1, 1.5).multiplyScalar(1000);
scene.add(point); scene.add(point);
} }

@ -206,36 +206,32 @@ export class Color extends React.Component<InputData, { isFocus: Boolean }>{
render() render()
{ {
const styles = const styles =
{ {
color: { color: {
width: '36px', width: '36px',
height: '14px', height: '14px',
borderRadius: '2px', borderRadius: '2px',
}, },
swatch: { swatch: {
padding: '5px', padding: '5px',
background: '#fff', background: '#fff',
borderRadius: '1px', borderRadius: '1px',
boxShadow: '0 0 0 1px rgba(0,0,0,.1)', boxShadow: '0 0 0 1px rgba(0,0,0,.1)',
display: 'inline-block', display: 'inline-block',
cursor: 'pointer', cursor: 'pointer',
}, },
popover: { popover: {
position: 'absolute', position: 'absolute',
zIndex: '2', zIndex: '2',
}, },
cover: { cover: {
position: 'fixed', position: 'fixed',
top: '0px', top: '0px',
right: '0px', right: '0px',
bottom: '0px', bottom: '0px',
left: '0px', left: '0px',
}, },
}; };
const popover = {
position: 'absolute',
zIndex: '2',
}
let typeData = this.props.data; let typeData = this.props.data;
let obj = this.props.obj; let obj = this.props.obj;
let v = obj[typeData.key]; let v = obj[typeData.key];
@ -347,7 +343,7 @@ export class TextureComponent extends React.Component<InputData, {}>{
<input <input
type="text" type="text"
className="repinput" className="repinput"
value={this.texture.repeatX} defaultValue={this.texture.repeatX.toString()}
onChange={(v) => onChange={(v) =>
{ {
this.texture.repeatX = Number(v.target.value) this.texture.repeatX = Number(v.target.value)
@ -357,7 +353,7 @@ export class TextureComponent extends React.Component<InputData, {}>{
<input <input
type="text" type="text"
className="repinput" className="repinput"
value={this.texture.repeatY} defaultValue={this.texture.repeatY.toString()}
onChange={(v) => onChange={(v) =>
{ {
this.texture.repeatY = Number(v.target.value) this.texture.repeatY = Number(v.target.value)

Loading…
Cancel
Save