ZJs Surface View
JavaScript implementation of ZSurfaceView for WebGPU rendering.
This class provides a surface view that automatically handles canvas resizing using ResizeObserver and maintains proper aspect ratio and device pixel ratio.
Parameters
canvas
The HTML canvas element to render to
See also
Properties
Link copied to clipboard
Link copied to clipboard
Event handler for surface view events (ready, resize, render). When set, automatically calls onReady() to initialize the surface.
Link copied to clipboard
Event queue that accumulates user input events for synchronous processing during the game loop frame update phase. When set, the manager will enqueue all input events to this queue.
Link copied to clipboard
Current surface height in pixels
Link copied to clipboard
Current surface width in pixels