api icon indicating copy to clipboard operation
api copied to clipboard

Introduce `Scene` class

Open tomcrane opened this issue 2 years ago • 2 comments

Add a new class to the specification, Scene, to model 3D space (and also 3D space with a duration).

We need a new class, rather than adding a dimension (and new properties) to the existing Canvas class, because:

  • 3D on the web uses an origin at the center of the world, extending infinitely in all directions: the coordinate space is not bounded, unlike the Canvas.
  • 3D on the web uses floating point coordinates, not integers.
  • The user’s viewpoint (mediated by the Presentation API and rendered by a client, typically in a browser) is in the Scene, whereas the user looks at the Canvas. This is so fundamentally different at the Presentation level that we need a new class.

The items property of a Manifest therefore can contain Canvases and/or Scenes.

A Scene has the same properties as a Canvas, except for height and width. (Therefore a Scene may have duration).

tomcrane avatar Jul 14 '23 15:07 tomcrane

New proposed properties for Scenes:

  • ambientLight - a JSON object with type of Light that specifies color and intensity. Default of 1.0 white if not specified (meaning you need to turn it off if you don't want ambient light)
  • backgroundColor - a color reference for the background color. Default of black.

azaroth42 avatar Oct 26 '23 09:10 azaroth42

Look at existing vocabularies and assess relevance (e.g. for behaviors).

azaroth42 avatar Jan 30 '24 23:01 azaroth42