Intermact API Reference / @intermact/react / useIntermactPlayer
Function: useIntermactPlayer()
useIntermactPlayer(
program,options?):BuiltProgram|null
Defined in: react/src/hooks/useIntermactPlayer.ts:37
Run a program's build pass and return the resulting BuiltProgram (player + scene + viewports), or null while the async build is in flight. Disposes the previous built program when program changes or on unmount.
React StrictMode runs effects twice in dev; we avoid clearing built or disposing the player on the first effect's cleanup so slow builds (LaTeX, fonts) are not stuck on "Building…".
Parameters
program
IntermactProgram
options?
Returns
BuiltProgram | null