diff --git a/packages/plugin-r3f/package.json b/packages/plugin-r3f/package.json index e37c518..f85dde9 100644 --- a/packages/plugin-r3f/package.json +++ b/packages/plugin-r3f/package.json @@ -1,6 +1,6 @@ { "name": "@theatre/plugin-r3f", - "version": "1.0.0-dev", + "version": "1.0.0-dev.1", "license": "Apache-2.0", "authors": [ { @@ -30,7 +30,6 @@ "build": "tsc --build ./tsconfig.json" }, "devDependencies": { - "@types/file-saver": "^2.0.2", "@types/jest": "^26.0.23", "@types/lodash-es": "^4.17.4", "@types/node": "^15.6.2", @@ -43,7 +42,6 @@ "@theatre/core": "workspace:*", "@theatre/studio": "workspace:*", "fast-deep-equal": "^3.1.3", - "file-saver": "^2.0.5", "lodash-es": "^4.17.21", "prism-react-renderer": "1.2.1", "react": "^17.0.2", diff --git a/packages/plugin-r3f/src/components/UI.tsx b/packages/plugin-r3f/src/components/UI.tsx index 975b6d1..9eea2a6 100644 --- a/packages/plugin-r3f/src/components/UI.tsx +++ b/packages/plugin-r3f/src/components/UI.tsx @@ -4,7 +4,6 @@ import TransformControlsModeSelect from './TransformControlsModeSelect' import {useEditorStore} from '../store' import shallow from 'zustand/shallow' import ReferenceWindow from './ReferenceWindow' -import {saveAs} from 'file-saver' import TransformControlsSpaceSelect from './TransformControlsSpaceSelect' import ViewportShadingSelect from './ViewportShadingSelect' import {AiFillEye, GiPocketBow, RiFocus3Line} from 'react-icons/all' @@ -68,14 +67,15 @@ const UI: VFC = () => { label="Focus on selected" icon={} onClick={() => { - const orbitControls = useEditorStore.getState() - .orbitControlsRef?.current + const orbitControls = + useEditorStore.getState().orbitControlsRef?.current const selected = useEditorStore.getState().selected let focusObject if (selected) { - focusObject = useEditorStore.getState() - .editablesSnapshot![selected].proxyObject + focusObject = + useEditorStore.getState().editablesSnapshot![selected] + .proxyObject } if (orbitControls && focusObject) { @@ -92,15 +92,18 @@ const UI: VFC = () => { label="Align object to view" icon={} onClick={() => { - const camera = (useEditorStore.getState().orbitControlsRef - ?.current as $FixMe)?.object + const camera = ( + useEditorStore.getState().orbitControlsRef + ?.current as $FixMe + )?.object const selected = useEditorStore.getState().selected let proxyObject if (selected) { - proxyObject = useEditorStore.getState() - .editablesSnapshot![selected].proxyObject + proxyObject = + useEditorStore.getState().editablesSnapshot![selected] + .proxyObject if (proxyObject && camera) { const direction = new Vector3() @@ -142,20 +145,6 @@ const UI: VFC = () => { > Close - - {/* Bottom-right corner */} -