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.
Constructor
new ScreenNode(scope)| Parameter | Type | Default Value |
|---|---|---|
| scope | "size" | "coordinate" | "viewport" | "uv" | "dpr" | — |
Constructs a new screen node.
| Accessor | Type | |
|---|---|---|
| get type | string | |
Properties
| Property | Type | Default Value | |
|---|---|---|---|
| scope | "size" | "coordinate" | "viewport" | "uv" | "dpr" | — | |
| _output | null | Node | — | |
| isViewportNode | boolean | — | |
| Method | Type | |
|---|---|---|
| generateNodeType | () => "float" | "vec2" | "vec4" | |
| getUpdateType | () => { NONE: string; FRAME: string; RENDER: string; OBJECT: string; } | |
| update | ({ renderer }: NodeFrame) => void | |
| setup | () => any | |
| generate | (builder: any) => any | |
Extends
NodeTSL object that represents the current DPR.
Type
ScreenNode<float>TSL object that represents normalized screen coordinates, unitless in [0, 1].
Type
ScreenNode<vec2>TSL object that represents the screen resolution in physical pixel units.
Type
ScreenNode<vec2>TSL object that represents the current x/y pixel position on the screen in physical pixel units.
Type
ScreenNode<vec2>TSL object that represents the viewport rectangle as x, y, width and height in physical pixel units.
Type
ScreenNode<vec4>TSL object that represents the viewport resolution in physical pixel units.
Type
ScreenNode<vec2>TSL object that represents the current x/y pixel position on the viewport in physical pixel units.
Type
ScreenNode<vec2>TSL object that represents normalized viewport coordinates, unitless in [0, 1].
Type
ScreenNode<vec2>Type
any