d9fbecf5a7
Move audio scrub/volume and brush drafts off root React ticks, coalesce overlay layout IPC, cache machine fingerprint and asset URLs, share one scene overlay host, and stop idle Pixi ticker. Also harden console against EPIPE on window load failures. Co-authored-by: Cursor <cursoragent@cursor.com>
13 lines
416 B
TypeScript
13 lines
416 B
TypeScript
import React, { createContext, useContext } from 'react';
|
|
|
|
export type SceneOverlayViewContextValue = {
|
|
rootRef: React.RefObject<HTMLDivElement | null>;
|
|
view: { w: number; h: number };
|
|
};
|
|
|
|
export const SceneOverlayViewContext = createContext<SceneOverlayViewContextValue | null>(null);
|
|
|
|
export function useSceneOverlayView(): SceneOverlayViewContextValue | null {
|
|
return useContext(SceneOverlayViewContext);
|
|
}
|