PassTargets
Interface in Runtime
A render pass's attachments: textures, or a canvas context the host configured, each with what it is cleared to.
import type { PassTargets } from 'typeshade/runtime'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
interface PassTargets { readonly color?: readonly ( | Texture | object | { readonly target: Texture | object; readonly clear?: readonly [number, number, number, number]; readonly load?: 'clear' | 'load'; } )[]; readonly depth?: | Texture | { readonly target: Texture; readonly clear?: number; readonly load?: 'clear' | 'load' };}Description
A colour target is a Texture, a context, or { target, clear, load }:
load defaults to 'clear' and clear to transparent black, [0, 0, 0, 0]. The depth
target is a Texture or { target, clear, load }: clear defaults to 1, which a reversed
projection sets to 0, and load to 'clear'. Every attachment is stored.
Instance properties
coloroptionalread onlyreadonly ( | Texture | object | { readonly target: Texture | object; readonly clear?: readonly [number, number, number, number]; readonly load?: 'clear' | 'load'; } )[]depthoptionalread only| Texture | { readonly target: Texture; readonly clear?: number; readonly load?: 'clear' | 'load' }
Source
src/runtime/runtime.ts, line 77, at commit 26de7be8