From 400b55bf09eddc3586caa1217469fda3a95f60ab Mon Sep 17 00:00:00 2001 From: Aria Minaei Date: Sun, 5 Sep 2021 17:45:51 +0200 Subject: [PATCH] Bugfix --- .../playground/src/space-exploration/App.tsx | 26 +------------------ .../components/useSnapshotEditorCamera.tsx | 2 +- packages/plugin-r3f/src/setupPlugin.ts | 4 --- theatre/studio/src/TheatreStudio.ts | 3 +-- 4 files changed, 3 insertions(+), 32 deletions(-) diff --git a/packages/playground/src/space-exploration/App.tsx b/packages/playground/src/space-exploration/App.tsx index 6660425..59bcfe6 100644 --- a/packages/playground/src/space-exploration/App.tsx +++ b/packages/playground/src/space-exploration/App.tsx @@ -55,31 +55,7 @@ function App() { return (
setBgIndex((bgIndex) => (bgIndex + 1) % bgs.length)}> - - getProject('Space', { - state: { - sheetsById: { - 'R3F-Canvas': { - staticOverrides: { - byObject: { - 'Light 1': { - position: { - x: -60, - y: -63, - z: -79, - }, - }, - }, - }, - }, - }, - definitionVersion: '0.3.0-dev', - revisionHistory: ['1__HCrX_ol8j4wK3-Pi'], - }, - }).sheet('Scene') - } - > + getProject('Space').sheet('Scene')}> diff --git a/packages/plugin-r3f/src/components/useSnapshotEditorCamera.tsx b/packages/plugin-r3f/src/components/useSnapshotEditorCamera.tsx index 5482093..0ecefab 100644 --- a/packages/plugin-r3f/src/components/useSnapshotEditorCamera.tsx +++ b/packages/plugin-r3f/src/components/useSnapshotEditorCamera.tsx @@ -4,7 +4,7 @@ import type {MutableRefObject} from 'react' import {useLayoutEffect, useRef} from 'react' import React from 'react' import useRefAndState from './useRefAndState' -import {studio} from '@theatre/studio' +import studio from '@theatre/studio' import type {PerspectiveCamera as PerspectiveCameraImpl} from 'three' import type {ISheet} from '@theatre/core' import {types} from '@theatre/core' diff --git a/packages/plugin-r3f/src/setupPlugin.ts b/packages/plugin-r3f/src/setupPlugin.ts index 29850b1..54437bd 100644 --- a/packages/plugin-r3f/src/setupPlugin.ts +++ b/packages/plugin-r3f/src/setupPlugin.ts @@ -1,7 +1,6 @@ import SnapshotEditor from './components/SnapshotEditor' import studio from '@theatre/studio' import Toolbar from './components/Toolbar/Toolbar' -import {types} from '@theatre/core' export default function setupPlugin() { studio.extend({ @@ -12,9 +11,6 @@ export default function setupPlugin() { panes: [ { class: 'snapshotEditor', - dataType: types.compound({ - grosse: types.number(20), - }), component: SnapshotEditor, }, ], diff --git a/theatre/studio/src/TheatreStudio.ts b/theatre/studio/src/TheatreStudio.ts index a3c0bab..1955de1 100644 --- a/theatre/studio/src/TheatreStudio.ts +++ b/theatre/studio/src/TheatreStudio.ts @@ -30,7 +30,6 @@ export interface PaneClassDefinition< DataType extends PropTypeConfig_Compound<{}>, > { class: string - dataType: DataType component: React.ComponentType<{ paneId: string }> @@ -237,7 +236,7 @@ export default class TheatreStudio implements IStudio { return this._getSelectionDerivation().tapImmediate(studioTicker, fn) } - get selection(): (ISheetObject | ISheet)[] { + get selection(): Array { return this._getSelection() }