theatre/packages/r3f/src/main/utils.ts
Andrew Prifer 29e036638b
Normalize theatre keys in r3f (#317)
Also remove a stray console log and make makeStoreKey make more sense.
2022-10-16 16:02:35 +00:00

7 lines
336 B
TypeScript

import {editorStore} from './store'
import type {ISheetObject} from '@theatre/core'
export const refreshSnapshot = editorStore.getState().createSnapshot
export const makeStoreKey = (sheetObjectAddress: ISheetObject['address']) =>
`${sheetObjectAddress.sheetId}:${sheetObjectAddress.sheetInstanceId}:${sheetObjectAddress.objectKey}`