Plane

Procedural subdivided plane mesh with UVs, for use as ground or grid.

Plane

Plane(subdivisions=(1,1), mode='triangle', **kwargs)

Located in ursina/models/procedural/plane.py

Overview

Creates a flat grid of quads or triangles:

  • subdivisions: tuple (xSegments, ySegments)
  • mode: 'triangle' (two triangles per cell) or 'ngon' (filled polygon)

Fields

NameDescription
.verticesList of vertex positions.
.trianglesList of index triplets.
.uvsList of UV coordinates per vertex.

Example

from ursina import *

app = Ursina()
# 3×6 subdivided plane as floor
floor = Entity(model=Plane(subdivisions=(3,6)), texture='brick', rotation_x=-90)
EditorCamera()
app.run()