File: ScreenNode.md | Updated: 11/15/2025
This node provides a collection of screen related metrics. Depending on ScreenNode#scope, the nodes can represent resolution or viewport data as well as fragment or uv coordinates.
Constructs a new screen node.
scope | The node's scope.
---|---
This flag can be used for type testing.
Default is true.
The node represents different metric depending on which scope is selected.
ScreenNode.COORDINATE: Window-relative coordinates of the current fragment according to WebGPU standards.ScreenNode.VIEWPORT: The current viewport defined as a four-dimensional vector.ScreenNode.SIZE: The dimensions of the current bound framebuffer.ScreenNode.UV: Normalized coordinates.ScreenNode.DPR: Device pixel ratio.This method is overwritten since the node type depends on the selected scope.
Overrides: Node#getNodeType
Returns: The node type.
This method is overwritten since the node's update type depends on the selected scope.
Overrides: Node#getUpdateType
Returns: The update type.
ScreenNode implements Node#update to retrieve viewport and size information from the current renderer.
frame | A reference to the current node frame.
---|---
Overrides: Node#update