Skip to content

Define the environmentMapReady promise lifecycle #183

Open

Description

@cabanier

The draft exposes readonly attribute Promise<undefined> environmentMapReady and currently says:

The environmentMapReady Promise resolves when an environment map resource has been loaded, or is rejected if the resource is unable to be loaded.

This describes the intent, but does not fully define the promise's lifecycle. We should specify:

  • Readiness: Does resolution mean the resource has been downloaded, decoded and prepared for rendering, or applied to the model? Can it resolve before the model itself is ready or while the element is not visible?
  • Initial and default-map state: What promise is returned when no author-provided map exists, or when the user agent supplies a default map? What happens when environmentMap is cleared or removed?
  • Replacement and cancellation: When a different map is selected, is a new promise created, and how is an old pending promise rejected? Does assigning the same resolved URL preserve the current promise? Completion of an obsolete load must not settle a newer load's promise.
  • Model reloads and failures: Does changing the model resource affect an unchanged environment map's promise? What rejection applies to decoding or preparation failures and cancellation?

The existing Fetch/CORS/CSP and secure-context failure rules should be reused when defining this lifecycle.

Related: #75 established readiness signaling, #164 discusses readiness requirements for immersive entry, and #152 discusses default environment maps. This issue focuses on the environmentMapReady promise's ownership, settlement, and replacement rules.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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