Skip to content

Should XRRenderState layers be optional? #297

Open
@rgerd

Description

@rgerd

Reading the spec, I see the following:

11.1. XRRenderState changes
This module extends the XRRenderStateInit and XRRenderState interfaces with a new optional array layers containing instances of XRLayer.

11.2. updateRenderState changes
"If newState’s baseLayer is set ... Set session’s pending render state's layers to null."

But then the IDL for XRRenderState is specified with a non-optional layers array:

[SecureContext, Exposed=Window] partial interface XRRenderState {
  readonly attribute FrozenArray<XRLayer> layers;
};

Seems like the layers array should either be defined as optional or the algorithm should recommend clearing the layers array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions