Engine API Reference - v2.7.3
    Preparing search index...

    Class DomeGeometry

    A procedural dome-shaped geometry.

    Typically, you would:

    1. Create a DomeGeometry instance.
    2. Generate a Mesh from the geometry.
    3. Create a MeshInstance referencing the mesh.
    4. Create an Entity with a RenderComponent and assign the MeshInstance to it.
    5. Add the entity to the Scene.
    // Create a mesh instance
    const geometry = new pc.DomeGeometry();
    const mesh = pc.Mesh.fromGeometry(app.graphicsDevice, geometry);
    const material = new pc.StandardMaterial();
    const meshInstance = new pc.MeshInstance(mesh, material);

    // Create an entity
    const entity = new pc.Entity();
    entity.addComponent('render', {
    meshInstances: [meshInstance]
    });

    // Add the entity to the scene hierarchy
    app.scene.root.addChild(entity);

    Hierarchy (View Summary)

    Index

    Constructors

    • Create a new DomeGeometry instance.

      By default, the constructor creates a dome with a radius of 0.5, 16 latitude bands and 16 longitude bands. The dome is created with UVs in the range of 0 to 1.

      Parameters

      • Optionalopts: { latitudeBands?: number; longitudeBands?: number } = {}

        Options object.

        • OptionallatitudeBands?: number

          The number of divisions along the latitudinal axis of the sphere. Defaults to 16.

        • OptionallongitudeBands?: number

          The number of divisions along the longitudinal axis of the sphere. Defaults to 16.

      Returns DomeGeometry

      const geometry = new pc.DomeGeometry({
      latitudeBands: 32,
      longitudeBands: 32
      });

    Properties

    blendIndices: undefined | number[]

    Blend indices.

    blendWeights: undefined | number[]

    Blend weights.

    colors: undefined | number[]

    Colors.

    Methods