HOW / EMBEDDING
Run VKF inside your page
Your page supplies source and owns the run. The compiler returns text and native scene packets; the shared renderer presents the scene.
Start with the editable programs in Syntax. The same area contains the working host-input example and the HTML and JavaScript that explain its connection. This guide keeps the integration requirements together.
Keep the runtime together.
Use matching compiler, worker, renderer, module, WASM and data files from one selected revision. Keep relative paths, native scene-label resources and third-party notices intact. Serve over HTTPS or localhost and provide the browser isolation and policy required by those assets. Get Started identifies the downloadable Node package separately from this newer browser host. A complete standalone embedding SDK is not qualified.
Separate source, viewport and console.
Source is editable input. Visual results belong in their own interactive viewport, with execution text in a separate console. The host owns its handlers and state.
Try the real host-input example and inspect the target elements.
Select one matching compiler owner.
Create one runner for the host and reuse it for later user-requested runs. Creation does not execute the program. Keep VKF source as source rather than translating its calculation into JavaScript.
Present the actual result.
Run compiles the edited VKF source. Present its output and retained native scene through the existing renderer, preserving the program’s axes, grid and shared toolbar.
Handle errors, reruns and removal.
Report actual compiler and renderer errors. An edit invalidates the pending result, cancels work and clears its scene. Removing the host also detaches listeners and awaits worker shutdown. Close the preceding owner before starting a replacement.