Skip to main content

<pc-scene>

The <pc-scene> tag is used to define the scene.

Usage
  • It must be a direct child of <pc-app>.

Attributes

AttributeTypeDefaultDescription
fogEnum"none"Fog type: "none" | "linear" | "exp" | "exp2"
fog-colorColor"1 1 1"Fog color as space-separated RGB values, hex code, or named color
fog-densityNumber"0"Fog density for exponential fog types
fog-endNumber"1000"End distance for linear fog
fog-startNumber"0"Start distance for linear fog
gravityVector3"0 -9.81 0"Gravity applied to rigid bodies as "X Y Z" values

Example

<pc-app>
<pc-scene>
<!-- define pc-entity tags here -->
</pc-scene>
</pc-app>

JavaScript Interface

You can programmatically create and manipulate <pc-scene> elements using the SceneElement API.