A scene is the createScene(root, surface, options) function that a scene file exports. It returns an object with the scene’s frame and an optional destroy. Hosting a scene takes a device, error listeners, a surface and a scheduled loop. The host frees what it owns, in order. web.host does all of this on the web and useScene on React Native, with the same scene file.
On the web, web.host(createScene, options, hosting) runs a scene on a canvas. createScene receives options as its third argument. hosting holds the canvas and the host’s own options, such as the page’s onFrame and onError:
Runs a scene on a canvas with a root, surface, frame loop and animation. destroy tears them
down in order. Use send to control the scene or onFrame to read it. If scene options are
optional, call host(createScene, { canvas }). Throws if both device and root are supplied.
@param ― createScene the scene file's createScene
@param ― options the scene's third argument
@param ― hosting the canvas, the device or root, and what the page runs beside the scene
@returns ― a hosted scene you send closures to and destroy
Receives the first scene error, from createScene, a frame, onFrame, ready or the device,
which stops the frames. Also receives each error a sent closure throws, which leaves the
frames running. Default console.error.
The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
The offsetX read-only property of the MouseEvent interface provides the offset in the X coordinate of the mouse pointer between that event and the padding edge of the target node.
The offsetY read-only property of the MouseEvent interface provides the offset in the Y coordinate of the mouse pointer between that event and the padding edge of the target node.
Runs fn with the value on its runtime, after earlier sent calls. Any runtime can call it, so
a gesture on the UI runtime can control a scene on a worker. Worklets copies args and caches
objects by identity. If you change an object in place and send it again, the runtime receives
the first copy. Send a new object after a change. If fn returns a promise, a rejection
goes to onError.
send(({
scene: Game
Holds the scene the host created.
scene})=>
scene: Game
Holds the scene the host created.
scene.
Game.point(x: number, y: number): void
point(
offsetX: number
The offsetX read-only property of the MouseEvent interface provides the offset in the X coordinate of the mouse pointer between that event and the padding edge of the target node.
The offsetY read-only property of the MouseEvent interface provides the offset in the Y coordinate of the mouse pointer between that event and the padding edge of the target node.
The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
Calls destroy on the value's runtime after earlier sent calls, then releases the value
without waiting for their promises. A run still in flight meets destroyed resources. Drops
calls sent after it. Safe to call twice.
Sendingsend(fn, ...args) waits until the host has set up the stage. It calls fn with { scene, root, surface, loop, ready } as its first argument, followed by args.
Page framesonFrame(stage, frame) runs after the scene’s frame in every frame, for page code such as a HUD.
Attachingattach runs once the scene is up, with the stage. attach can return a cleanup function or an object with destroy(). The host frees it before destroying the scene. For example, attach: ({ scene }) => web.orbitControls(scene.view, canvas) ties the controls to the scene. The host also accepts undefined from attach and throws for any other return value.
Loadingstage.ready stays false while the scene’s ready promise is pending. Keep the loading screen visible until it resolves. A rejection reports a scene error.
Synchronous The scene’s frame and onFrame are synchronous, since the host submits when they return. One that returns a promise, such as an async function, is a scene error, and its frame is never submitted. Load and compile in createScene, or behind ready.
Scene errors Setup errors from createScene or attach go to onError. The first error from a frame, onFrame, a rejected ready, an uncaptured device error or an unexpected device loss stops the frame loop and goes to onError once.
Sent errors A sent closure that throws goes to onError each time and leaves the frames running, as an event handler’s error leaves requestAnimationFrame running.
The stage To reach the stage directly from page code, take it once with const stage = await hosted.run((s) => s).
Pausingpause() and resume() wait until the scene is created, as send does.
Your devicedevice takes a device of your own, which the host leaves alive. A test passes a recording root’s.
Profiling To time each pass of the scene, install the GPU debug panel before calling host.
Teardowndestroy() releases everything in order, even while the scene is starting. It does not wait for work still running, so a run still in flight can find its resources destroyed. Calls sent after destroy are dropped, and run rejects once the scene is gone. Call it on pagehide, and from Vite’s import.meta.hot.dispose.
No options Omit scene options when they are optional, as in web.host(createScene, { canvas }).
In a React component, start the host in an effect and destroy it in the effect’s cleanup:
Runs a scene on a canvas with a root, surface, frame loop and animation. destroy tears them
down in order. Use send to control the scene or onFrame to read it. If scene options are
optional, call host(createScene, { canvas }). Throws if both device and root are supplied.
@param ― createScene the scene file's createScene
@param ― options the scene's third argument
@param ― hosting the canvas, the device or root, and what the page runs beside the scene
@returns ― a hosted scene you send closures to and destroy
Connects pointer input to an orbit camera's goal. Drag to orbit and use the wheel or pinch to
zoom. With pan, drag the other button to move the target. update eases the camera towards
the goal. Throws if pan is enabled but the goal has no target.
@param ― orbit an orbit camera, whose goal it writes
@param ― element what takes the drag, the wheel and the pinch
@returns ― the controls, which you destroy to remove the listeners
Calls destroy on the value's runtime after earlier sent calls, then releases the value
without waiting for their promises. A run still in flight meets destroyed resources. Drops
calls sent after it. Safe to call twice.
By default each host makes its own device. A page with several canvases can share one root between its scenes instead. Pass a root you made as root, and the host leaves it alive. schedule replaces requestAnimationFrame. With schedule: false the host runs no frames, and the page runs them through each stage’s loop, for example to draw only the canvases on screen:
Runs a scene on a canvas with a root, surface, frame loop and animation. destroy tears them
down in order. Use send to control the scene or onFrame to read it. If scene options are
optional, call host(createScene, { canvas }). Throws if both device and root are supplied.
@param ― createScene the scene file's createScene
@param ― options the scene's third argument
@param ― hosting the canvas, the device or root, and what the page runs beside the scene
@returns ― a hosted scene you send closures to and destroy
Supplies a root that the host keeps alive, so scenes can share it. On React Native, requires
on: 'js'. Default a root that the host creates on device and destroys with the scene.
Supplies animation frames. With false, call stage.loop.run(seconds) to draw on demand.
Default requestAnimationFrame, or display vsync on a React Native worker.
Holds the frame loop that records the scene. A run that throws reports the error as a
scene error, then rethrows it. After the first scene error, run returns false.
loop}of
conststages:web.Stage<{
frame(f:Frame):void;
destroy():void;
}>[]
stages)
constloop:Frames
Holds the frame loop that records the scene. A run that throws reports the error as a
scene error, then rethrows it. After the first scene error, run returns false.
loop.
Frames.run(seconds: number): boolean
Records and submits one frame with a fresh Frame and encoder. Requires finite, nondecreasing
seconds. Throws for an invalid time, a nested frame or an asynchronous recorder. Returns
false if the loop is destroyed before or during recording. Runs all after-submit callbacks. If
any throw, the frame still counts and run rethrows their errors.
Each host watches the device. WebGPU doesn’t say which scene caused an error, so the first uncaptured error or unexpected device loss reaches every running scene’s onError.
Without a schedule, the first error still stops the frames. A loop.run that throws reports the error to onError and rethrows it to you. Every later run returns false.
@typegpu/kit/hosting is what web.host and React Native’s useScene are built from. It imports nothing from React Native.
Stagingstage(root, surface, createScene, options, { schedule?, onError, watch?, onFrame?, attach?, release? }) creates a scene and scheduled frame loop. schedule: false disables automatic frames. The first error from a frame, onFrame, ready or the watch device stops the frames and reaches onError once. A frame you run yourself also rethrows its error. The stage’s destroy() calls release last, to free host resources. If one of its steps throws, the rest still run. destroy then rethrows that error, or, if several threw, an AggregateError of all of them with the first one’s message.
Watchingwatch(device, onError) calls onError once for the first uncaptured error or unexpected device loss. It ignores deliberate device destruction. Dispose the watch to stop listening early.
Local valueslocal(create) keeps a value on the calling thread and gives it send and run, the same handle runtimes.own gives on a worker. Use it in a test or on a web page.
TypesScene has frame, an optional destroy and an optional ready. Hosts call destroy when the scene provides it. CreateScene creates it from (root, surface, options), and Stage holds it with host resources. HostOptions describes the options web.host and the React Native host share.
A view that draws only when asked, such as a model viewer, stages its scene on a shared root without a schedule, and runs a frame when the view moves:
Creates a scene on the host's root and surface, then creates its frames and animation. Destroys
them in reverse order. Owns the rule every host follows: the first error from a frame,
onFrame, ready or the watched device stops the frames and reaches onError once. A frame
you run yourself with loop.run also rethrows its error to you. If setup fails after scene
creation, destroys those resources and rethrows the error. The host keeps its root and surface
and destroys them in release.
@param ― surface the surface the scene draws into, which the host keeps
@param ― createScene the scene file's createScene
@param ― options the scene's third argument
@param ― hosting where frames come from, what takes their errors and what the host runs beside
@returns ― the stage, which you destroy before the root and the surface
Controls canvas transparency. With premultiplied, alpha below 1 reveals what is behind the
canvas, and colours must be premultiplied by alpha. Default opaque.
Creates a scene on the host's root and surface, then creates its frames and animation. Destroys
them in reverse order. Owns the rule every host follows: the first error from a frame,
onFrame, ready or the watched device stops the frames and reaches onError once. A frame
you run yourself with loop.run also rethrows its error to you. If setup fails after scene
creation, destroys those resources and rethrows the error. The host keeps its root and surface
and destroys them in release.
@param ― surface the surface the scene draws into, which the host keeps
@param ― createScene the scene file's createScene
@param ― options the scene's third argument
@param ― hosting where frames come from, what takes their errors and what the host runs beside
@returns ― the stage, which you destroy before the root and the surface
Watches the device from scene creation until destroy, and fails the stage on its first
uncaptured error or unexpected loss. Device events reach only the React Native JS thread, so
pass it there or on the web. Default none.
Receives the first scene error once, after the frames stop: from a frame, onFrame, a
rejected ready, the watched device or staged.fail. stage rethrows what createScene
throws instead.
Releases host resources, such as the surface and the root, at the end of destroy, also when
a cleanup throws. Does not run if stage throws. Default none.
@cpu
release:()=>
constsurface:web.Surface
surface.
Surface.destroy(): void
Releases the drawing destination. Canvas surfaces unconfigure their contexts. Web surfaces
also stop observing the canvas. Also [Symbol.dispose].
destroy()},
);
new
var ResizeObserver:new(callback:ResizeObserverCallback)=>ResizeObserver
The ResizeObserver interface reports changes to the dimensions of an Element's content or border box, or the bounding box of an SVGElement.
Holds the frame loop that records the scene. A run that throws reports the error as a
scene error, then rethrows it. After the first scene error, run returns false.
loop.
Frames.run(seconds: number): boolean
Records and submits one frame with a fresh Frame and encoder. Requires finite, nondecreasing
seconds. Throws for an invalid time, a nested frame or an asynchronous recorder. Returns
false if the loop is destroyed before or during recording. Runs all after-submit callbacks. If
any throw, the frame still counts and run rethrows their errors.
The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
Stops the frames, frees what attach returned, destroys the loop and the scene, then runs
release. When one of them throws, runs the rest, then rethrows the error, or an
AggregateError of all of them in order, with the first one's message. Also
[Symbol.dispose].
Scene frames, app UI and sent closures on three runtimes
on
Try Raise the scene frame above 8.33 ms, one vsync at 120 Hz. On 'ui' the app drops frames. On a worker the UI keeps running, and missed() counts the frames the scene missed. Press send to run a closure when the scene runtime is free.
host, from @typegpu/kit/native/host, takes the same createScene(root, surface, options) function as web.host and runs it on a React Native canvas. It runs on a worker by default. You can also use the UI or the JS thread. The host owns the canvas configuration, the scene and any root or worker it creates. It schedules worker frames at display vsync by default. @typegpu/kit/native/runtimes provides the same runtime controls for code outside a kit scene. useScene wraps the host for a React Native canvas.
import
import { useScene } from '@typegpu/kit/native/react'
Blockfall’s scene.ts runs unchanged on the web and on React Native. The screen passes blockfall, a that calls createScene through a named import. That import makes worklets load scene.ts on the scene’s runtime, with its shaders and . A 'worklet' line in createScene itself would copy the shaders it captures instead. If createScene isn’t a worklet, the ’s error shows the line to write.
What the hook does for you:
Worker A worker runs the scene by default, paced by vsync, with the timer floor set by runtimes.worker. Each component reuses one worker named after createScene, because worklets can’t destroy runtimes.
Device The hook uses the nearest <GPUDeviceProvider>’s device. Without a provider, it requests a device with the optionalFeatures the adapter has and destroys that device after releasing the scene.
Device errors The hook listens for uncaptured errors and device.lost on the JS thread with hosting.watch. The first error or loss releases the scene and sets error. Deliberate device destruction doesn’t count as loss. On a shared device, the error stops every scene because WebGPU doesn’t identify its source scene.
Restarting Remount the component with a different key to restart. A new <Canvas> under the same hook, such as one inside a remounted parent, restarts the scene on it. If a provider’s device is lost, remount the provider too.
Resizing Canvas layout changes resize the surface. AppState pauses and resumes it. Use paused to stop a canvas scrolled out of view. A paused scene on a worker asks the display for no frames.
Thrown errors Scheduled work catches errors and the hook stores the first one in error. A scene error stops the frames. A sent closure or a failure to schedule it can report an error while the scene keeps running.
Callbacks The hook wraps each plain function at the top level of the scene’s options, so every call reaches the latest render’s function. Off the JS thread, the host runs that wrapper on the JS thread through post. An inline arrow doesn’t restart the scene.
Options Initial options come from the render that starts the scene. Send changes from an effect, as in useEffect(() => send?.(setWeather, weather), [send, weather]). Restarting the scene creates another send, so the effect resends the value.
Frame callbackonFrame runs after each frame on the scene’s runtime, as host’s does, such as to count the frames drawn before you remove a loading cover. Off the JS thread it must be a worklet. The hook reads it when the scene starts.
Teardown Teardown runs on the scene’s runtime after any frame in flight and unconfigures the canvas. The same component starts again only after it, on a StrictMode remount or a new canvas. A remount under a new key starts at once on its own canvas.
The on option, in the hook’s third argument, takes 'worker', 'ui', 'js' or a runtime of your own. The card lists the other options there. The scene code is the same on every runtime:
'worker' keeps scene work off the UI runtime. Pass a runtime as on to share one worker between components.
'ui' shares the UI runtime with Reanimated. Long scene frames delay the app’s UI. Use it when Reanimated must read shared values in the same frame.
'js' runs at most 60 Hz and needs no worklet wrapper. React Native DevTools can debug this runtime. Use it to debug a scene that normally runs on a worker.
send runs a closure on the scene’s runtime with the stage, which holds the scene, root, surface and loop. A closure reaches anything there, so the scene needs no message schema. run does the same and returns the result to React Native as a promise.
Call host directly in an app with its own lifecycle. Pass the device, the canvas’s context, its layout size and the pixel ratio, and call resize, pause, resume and destroy yourself.
Options It accepts web.host’s schedule, onFrame, attach and onError options. It also accepts canvas format, alphaMode, usage, colorSpace, toneMapping and a fixed size. Off the JS thread, onFrame and attach must be worklets. The host throws an error naming a callback that isn’t one.
A root Pass a root in place of a device only with on: 'js', because a root must stay on the thread that created it.
Scheduleschedule replaces display vsync. With false, no frames run automatically. Call run(({ loop }) => loop.run(seconds)) yourself. A frame’s error reaches onError and rejects that promise. Running the frame through send instead would report the error to onError twice.
Device errors The device’s errors reach only the JS thread. With on: 'js' the host watches the device; elsewhere, listen with hosting.watch(device, onError), as useScene does.
For a scene with two canvases or none, start it with the runtime pieces below.
Runs the loop on each scheduled frame. Time advances by at most maxDt per frame, never steps
back, and stops while the surface is paused. Destroying the animation keeps the loop alive.
Another animation on the same loop continues from its recorded time. A frame error, or a run
that returns false because the loop was destroyed, stops the animation.
@param ― loop the loop to run on each unpaused frame. Continues from its seconds if it ran before
@returns ― an animation you destroy to stop the frames
Creates a react-native-webgpu canvas surface for presentation on the JS thread. Throws if the
canvas has no WebGPU context or the fixed size is invalid.
@param ― canvas the CanvasRef from a <Canvas ref>; its context's canvas holds the size
@param ― options.pixelRatio PixelRatio.get()
@returns ― a surface you resize, pause, resume and destroy
Creates a react-native-webgpu canvas surface for presentation on the JS thread. Throws if the
canvas has no WebGPU context or the fixed size is invalid.
@param ― canvas the CanvasRef from a <Canvas ref>; its context's canvas holds the size
@param ― options.pixelRatio PixelRatio.get()
@returns ― a surface you resize, pause, resume and destroy
Relays display-linked frames from the UI runtime to a worker. A worker's own
requestAnimationFrame uses a 16 ms timer. Sends one frame at a time, skipping and counting
display frames that arrive while it runs. Asks the display for no frames while nothing requests
one. Pass it as schedule to frames.animate on that runtime.
@param ― runtime the only runtime allowed to request these frames
@returns ― a schedule you destroy to stop the relay
vsync(
constworker:runtimes.WorkerRuntime
worker);
exportinterface
interfaceStart
Start{
readonly
Start.device: GPUDevice
device:
interfaceGPUDevice
The GPUDevice interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed.
Available only in secure contexts.
The GPUCanvasContext interface of the WebGPU API represents the WebGPU rendering context of a element, returned via an HTMLCanvasElement.getContext() call with a contextType of "webgpu".
Available only in secure contexts.
Calls fn on the React Native JS thread from any runtime. Copies arguments first, because
worklets caches sent objects by identity. Otherwise, changing an object in place and sending it
again delivers its first copy. Release builds omit the warning for this case.
Creates and keeps a value on runtime. create must be a worklet and may be asynchronous.
Calls sent before it resolves wait in order. A worklets Shareable holds the value on that
runtime. Nothing registers or looks it up by name.
@param ― runtime where the value lives
@param ― create a worklet that makes the value, there
@returns ― a handle you send closures to and destroy
Creates a react-native-webgpu canvas surface for presentation on the JS thread. Throws if the
canvas has no WebGPU context or the fixed size is invalid.
@param ― canvas the CanvasRef from a <Canvas ref>; its context's canvas holds the size
@param ― options.pixelRatio PixelRatio.get()
@returns ― a surface you resize, pause, resume and destroy
Runs the loop on each scheduled frame. Time advances by at most maxDt per frame, never steps
back, and stops while the surface is paused. Destroying the animation keeps the loop alive.
Another animation on the same loop continues from its recorded time. A frame error, or a run
that returns false because the loop was destroyed, stops the animation.
@param ― loop the loop to run on each unpaused frame. Continues from its seconds if it ran before
@returns ― an animation you destroy to stop the frames
animate(
constloop:Frames
loop,{
AnimateOptions.surface?:{
readonly paused: boolean;
}|undefined
Stops frames and elapsed time while paused is true. The first frame after resume() has a
dt of 0. On React Native, pass the canvas surface and pause it from AppState. On the web,
pause it from an IntersectionObserver or a pause menu. Without a surface, frames run until
the animation is destroyed. Default none.
Supplies animation frames. Use runtimes.vsync(worker) on a React Native worker runtime, or a
schedule you step by hand in a test. Default requestAnimationFrame.
Receives a frame error after the animation stops. Without a handler, the animation frame
callback throws the error. Default none.
@cpu
onError:
var console:Console
console.
Console.error(...data: any[]): void(+1 overload)
The console.error() static method outputs a message to the console at the "error" log level. The message is only displayed to the user if the console is configured to display error output. In most cases, the log level is configured within the console UI. The message may be formatted as an error, with red colors and call stack information.
Receives errors from create, sent closures and calls that worklets cannot schedule. An
uncaught error in a worklet otherwise aborts a release build. Default console.error on the
runtime that owns the value.
@cpu
onError:
var console:Console
console.
Console.error(...data: any[]): void(+1 overload)
The console.error() static method outputs a message to the console at the "error" log level. The message is only displayed to the user if the console is configured to display error output. In most cases, the log level is configured within the console UI. The message may be formatted as an error, with red colors and call stack information.
Any valueown keeps any value returned by create. The callback can use the same setup code as a web page.
Named imports Named imports let worklets load createScene, createFrames, animate and tgpu on the worker, including their shaders. Namespace imports such as import * as frames copy the namespace instead. Its functions can’t be called on that runtime, so the worklet above uses no namespace imports.
Early sends Calls to send made while create runs wait for it. send is a worklet itself, so a Gesture Handler callback on the UI runtime sends straight to the worker.
Async closures A promise can’t cross runtimes, so run awaits an async closure on the value’s runtime.
Cached copiessend reuses cached argument copies. If you mutate an object and resend it, the receiver gets its first copy. Send another object to transfer changed values.
Errors Errors from create, sent closures or scheduling send reach onError.
vsync(worker) relays the UI runtime’s display link. A worker requests a frame and the next vsync schedules it there. If the previous frame is still running, the relay skips that vsync, which missed() counts. A relayed vsync runs only the request it was sent for. If you cancel or replace that request, the relayed frame is dropped and a replacement waits for a later vsync. destroy stops delivery. Once no frame is requested and the last one has run, the relay stops asking the display for frames. Pass the relay to animate as schedule, which defaults to requestAnimationFrame. A test passes a schedule it steps by hand.
// the scene's frame, on the worker; `here` is an object the scene made once
pointer.read(here);
A cell is one fixed-type synchronizable per field, so a read takes no lock and allocates nothing. Fields are read one at a time, so one read can return fields from two different writes.
It holds the latest value only. Send events that mustn’t be lost, like a tap or a key, through send, which queues them in order.
post(fn) calls React Native code with copied arguments. A reused object arrives with its values at the time of each call.
Worklet callbacks run on the calling runtime. Other callbacks run on React Native with copied arguments.
A renderer of your own.own(worker, createRenderer) holds it, and vsync paces it. Nothing needs frames or a TypeGPU Kit scene.
@typegpu/react. The resources it transfers keep working; runtimes registers no serializer of its own.
Reanimated and Gesture Handler. Gesture worklets write cells or call send. A shared value can go in a scene’s options, but reading one on a worker waits for the UI thread.
A runtime someone else made.own and vsync take any runtime.
Compiling off the frame’s runtime.own(worker, warm) compiles pipelines while the UI runtime draws. Dawn shares its pipeline cache across runtimes.
the device, device.lost, React state, the hook, assets
UI runtime
the display link and its relay, Gesture Handler’s callbacks, Reanimated
the scene’s runtime
the root, the modules, recording, submit, present and maps
Use one runtime to record into a canvas and its encoders. Other runtimes may share the device with implicit-device-synchronization, which react-native-webgpu requests by default. They must not share that canvas or those encoders. A host that runs its scene off the JS thread checks for the feature before it starts the scene and throws for a device without it. useScene shows that error as its error.
Bundle Mode Bundle Mode with importForwarding and worklets’ patch to Metro. Setting up a project has the configs.
A worklet A one-line worklet that calls createScene off the JS thread, and named imports inside worklets.
The relay The relay’s callback on the UI runtime at every display frame while the scene animates. It stops asking the display for frames while the scene is paused.
Live runtimes Worklets can’t destroy runtimes. destroy releases the scene while its runtime stays alive.
Timer floor A worker created by runtimes.worker delays zero-delay setTimeout calls by 2 ms. Set worker({ timerFloor: 0 }) to disable this floor. The worker’s destroy() gives the runtime back its own setTimeout. host and useScene destroy the workers they create once their scenes are released.
Your worklets Your own scheduled worklets still abort a Release build when they throw. Code sent through send is guarded.
Only functions at the top level of a scene’s options run on React Native by themselves. A callback nested deeper needs runtimes.post by hand.
A cell has no version a reader can check, so a read can’t tell that it mixed two writes. A cell suits pointers and sticks, not a value that must stay whole, such as a transform.
No host runs a scene in a web worker.
frameA frame is one turn of the loop, and the object your function gets for it, which holds the encoder, the time and the time since the last frame.You own the frame →
runtimeA runtime is one JavaScript thread with its own memory, such as the page, a worker or a React Native worklet thread.Words →
workletA worklet is a function that react-native-worklets can run on a thread other than the main JavaScript thread.Words →
moduleA module is one piece of GPU work, made by a factory that borrows your root and returns resources, shader functions and methods that record into your frame.A module borrows →
hookA hook is a placeholder that each pipeline fills with its own choice, such as the camera it draws through.Members and placeholders →
threadA thread is one run of a kernel, and the GPU starts many at once, each with its own number.Slime mould →
readbackA readback copies a buffer during a frame and hands it to the CPU a frame or two later, without making the frame wait.Results back →
a root on the device it is given unless it was given a root ·the canvas's configuration ·a worker runtime unless it is given one ·the scene's stage and what its attach returned
Runs after the scene's frame each frame on the scene runtime, as host's onFrame does, such as to count the frames drawn before a loading screen lifts.Default none.