API

Function CreateTiledGround

  • Creates a tiled ground mesh

    Parameters

    • name: string

      defines the name of the mesh

    • options: {
          precision?: { h: number; w: number };
          subdivisions?: { h: number; w: number };
          updatable?: boolean;
          xmax: number;
          xmin: number;
          zmax: number;
          zmin: number;
      }

      defines the options used to create the mesh

      • xmin ground minimum X coordinate (float, default -1)
      • zmin ground minimum Z coordinate (float, default -1)
      • xmax ground maximum X coordinate (float, default 1)
      • zmax ground maximum Z coordinate (float, default 1)
      • subdivisions a javascript object {w: positive integer, h: positive integer} (default {w: 6, h: 6}). w and h are the numbers of subdivisions on the ground width and height. Each subdivision is called a tile
      • subdivisions.w positive integer, default 6
      • subdivisions.h positive integer, default 6
      • precision a javascript object {w: positive integer, h: positive integer} (default {w: 2, h: 2}). w and h are the numbers of subdivisions on the ground width and height of each tile
      • precision.w positive integer, default 2
      • precision.h positive integer, default 2
      • updatable boolean, default false, true if the mesh must be flagged as updatable
    • scene: Nullable<Scene> = null

      defines the hosting scene

    Returns Mesh

    the tiled ground mesh