UNPKG

prendy

Version:

Make games with prerendered backdrops using babylonjs and repond

29 lines (28 loc) 960 B
import { getRefs, getState, setState } from "repond"; // export each of the rule makers stuff from here :) export function getUsefulStoryStuff() { const storyState = getState().story.main; const storyRefs = getRefs().story.main; const globalState = getState().global.main; const { nowPlaceName, nowSegmentName } = globalState; const { nowCamName } = globalState; const placesRefs = getRefs().places; const placeRefs = placesRefs[nowPlaceName]; const { camsRefs } = placesRefs[nowPlaceName]; const camRefs = camsRefs[nowCamName]; return { storyState, storyRefs, globalState, nowSegmentName: nowSegmentName, nowPlaceName: nowPlaceName, nowCamName: nowCamName, placesRefs: placesRefs, placeRefs: placeRefs, camsRefs: camsRefs, camRefs: camRefs, }; } export function setStoryState(newState) { setState({ story: { main: newState } }); }