api
api copied to clipboard
Introduce `Scene` class
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).
New proposed properties for Scenes:
ambientLight- a JSON object withtypeofLightthat 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.
Look at existing vocabularies and assess relevance (e.g. for behaviors).