mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 16:33:15 +01:00
removed orientation indicator replaced by view cube.
This commit is contained in:
parent
9250ccf55a
commit
817b3fe300
3 changed files with 2 additions and 44 deletions
|
|
@ -1,10 +0,0 @@
|
|||
@size: 80px;
|
||||
|
||||
.cameraControl {
|
||||
top: -@size;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
width: @size;
|
||||
height: @size;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
import React, {useContext, useEffect} from 'react';
|
||||
import ls from './CameraControl.less';
|
||||
import cameraControlRenderer from 'scene/cameraControlRenderer';
|
||||
import {ReactApplicationContext} from "cad/dom/ReactApplicationContext";
|
||||
|
||||
export default function CameraControl() {
|
||||
|
||||
const ctx = useContext(ReactApplicationContext);
|
||||
|
||||
const domRef = React.useRef(null);
|
||||
|
||||
useEffect(() => {
|
||||
if (!ctx.viewer || !domRef.current) {
|
||||
return;
|
||||
}
|
||||
const container = domRef.current;
|
||||
const renderer = cameraControlRenderer(container);
|
||||
const detacher = ctx.viewer.sceneSetup.sceneRendered$.attach(() => {
|
||||
const camera = ctx.viewer.sceneSetup.camera;
|
||||
renderer.render(camera)
|
||||
});
|
||||
|
||||
return () => {
|
||||
detacher();
|
||||
renderer.dispose();
|
||||
}
|
||||
}, [domRef.current, ctx.viewer]);
|
||||
|
||||
return <div ref={domRef} className={ls.cameraControl} />
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -6,7 +6,7 @@ import WizardManager from '../../craft/wizard/components/WizardManager';
|
|||
import FloatView from './FloatView';
|
||||
import HistoryTimeline from '../../craft/ui/HistoryTimeline';
|
||||
import SelectedModificationInfo from '../../craft/ui/SelectedModificationInfo';
|
||||
import CameraControl from './CameraControl';
|
||||
//import CameraControl from './CameraControl';
|
||||
import HeadsUpHelper from './HeadsUpHelper';
|
||||
import {HeadsUpToolbar} from './HeadsUpToolbar';
|
||||
import {SketchObjectExplorer} from '../../../sketcher/components/SketchObjectExplorer';
|
||||
|
|
@ -69,7 +69,7 @@ export default class View3d extends React.Component {
|
|||
</div>
|
||||
|
||||
<div className={ls.bottomStack}>
|
||||
<CameraControl />
|
||||
|
||||
<HistoryTimeline />
|
||||
<PlugableControlBar/>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue