Parameters used to create a Plane

interface PlaneParams {
    widthSegments?: number;
    heightSegments?: number;
    autoRender?: boolean;
    visible?: boolean;
    renderOrder?: number;
    outputTarget?: RenderTarget;
    additionalOutputTargets?: RenderTarget[];
    useCustomScenePassEntry?: RenderPassEntry;
    texturesOptions?: SceneObjectTextureOptions;
    targets?: Partial<GPUColorTargetState>[];
    renderBundle?: RenderBundle;
    autoloadSources?: boolean;
    watchScroll?: boolean;
    domTextures: DOMTexture[];
    geometry?: PlaneGeometry;
    uniforms?: ReadOnlyInputBindings;
    storages?: ReadWriteInputBindings;
    bindings?: BindGroupBindingElement[];
    instancesCount?: number;
    topology?: GPUPrimitiveTopology;
    vertexBuffers?: VertexBufferParams[];
    mapBuffersAtCreation?: boolean;
    label?: string;
    shaders?: MaterialShaders;
    useAsyncPipeline?: boolean;
    bindGroups?: BindGroup[];
    samplers?: Sampler[];
    textures?: MaterialTexture[];
    useProjection?: boolean;
    transparent?: boolean;
    depth?: boolean;
    depthWriteEnabled?: boolean;
    depthCompare?: GPUCompareFunction;
    depthFormat?: GPUTextureFormat;
    cullMode?: GPUCullMode;
    sampleCount?: number;
}

Hierarchy (View Summary)

Properties

widthSegments?: number

Number of segments along the X axis

heightSegments?: number

Number of segments along the Y axis

autoRender?: boolean

Whether we should add this Mesh to our Scene to let it handle the rendering process automatically.

visible?: boolean

Flag indicating whether to draw this Mesh or not.

renderOrder?: number

Controls the order in which this Mesh should be rendered by our Scene.

outputTarget?: RenderTarget

Optional RenderTarget to render this Mesh to instead of the canvas context.

additionalOutputTargets?: RenderTarget[]

Additional output RenderTarget onto which render this Mesh, besides the main outputTarget or screen. Useful for some effects that might need to render the same Mesh twice or more. Beware tho that the Mesh pipeline has to exactly fit the provided RenderTarget render passes descriptors as no checks will be performed here.

useCustomScenePassEntry?: RenderPassEntry

Whether to render this Mesh into a custom Scene custom screen pass entry instead of the default one.

texturesOptions?: SceneObjectTextureOptions

Parameters used by this Mesh to create a MediaTexture.

targets?: Partial<GPUColorTargetState>[]

Optional ().targets | targets properties.

renderBundle?: RenderBundle

Optional RenderBundle into which this Mesh should be added.

autoloadSources?: boolean

Whether to automatically create a DOMTexture for all HTMLImageElement, HTMLVideoElement and HTMLCanvasElement child of the specified DOMMesh HTMLElement

watchScroll?: boolean

Whether to automatically update the DOMMesh position on scroll

domTextures: DOMTexture[]

Array of already created DOMTexture to add to this DOMMesh.

geometry?: PlaneGeometry

Optional PlaneGeometry to use

Uniforms input to pass to a BindGroup.

Read only or read/write storages input to pass to a BindGroup.

Array of already created bindings (buffers, texture, etc.) to pass to this BindGroup.

instancesCount?: number

Number of geometry instances to draw

topology?: GPUPrimitiveTopology

Topology to use with this Geometry, sent to the render pipeline. Whether to draw triangles, lines or points (see https://www.w3.org/TR/webgpu/#enumdef-gpuprimitivetopology)

vertexBuffers?: VertexBufferParams[]

Array of VertexBufferParams used to create VertexBuffer on geometry creation

mapBuffersAtCreation?: boolean

Whether to map the vertex buffers at creation.

label?: string

The label of the Material, sent to various GPU objects for debugging purpose.

shaders?: MaterialShaders

Shaders to use with this Material.

useAsyncPipeline?: boolean

Whether to compile the Material GPURenderPipeline or GPUComputePipeline asynchronously or not.

bindGroups?: BindGroup[]

Array of already created bind groups to be used by this Material.

samplers?: Sampler[]

Array of already created samplers to be used by this Material.

textures?: MaterialTexture[]

Array of already created Texture or MediaTexture to be used by this Material.

useProjection?: boolean

Whether this RenderMaterial should implicitly use the renderer camera and lights bind group.

transparent?: boolean

Whether this RenderMaterial should be treated as transparent. Impacts the render pipeline blend property.

depth?: boolean

Whether this RenderMaterial should write to the depth buffer.

depthWriteEnabled?: boolean

Whether this RenderMaterial should enable depth write.

depthCompare?: GPUCompareFunction

Depth function to use with this RenderMaterial.

depthFormat?: GPUTextureFormat

Format of the depth texture to use with this RenderMateria.l

cullMode?: GPUCullMode

Cull mode to use with this RenderMaterial.

sampleCount?: number

The sampleCount of the RenderPass onto which we'll be drawing. Set internally.