API

Function CreateGround

  • Creates a ground mesh

    Parameters

    • name: string

      defines the name of the mesh

    • options: {
          height?: number;
          subdivisions?: number;
          subdivisionsX?: number;
          subdivisionsY?: number;
          updatable?: boolean;
          width?: number;
      } = {}

      defines the options used to create the mesh

      • width set the width size (float, default 1)
      • height set the height size (float, default 1)
      • subdivisions sets the number of subdivision per side (default 1)
      • subdivisionsX sets the number of subdivision on the X axis (overrides subdivisions)
      • subdivisionsY sets the number of subdivision on the Y axis (overrides subdivisions)
      • updatable defines if the mesh must be flagged as updatable (default false)
    • Optionalscene: Scene

      defines the hosting scene

    Returns GroundMesh

    the ground mesh