Skip to main content

Interface: Mobject2DOptions

Defined in: mobjects/point/Mobject2D.ts:13

Options for creating a Mobject2D

Properties

center?

optional center: Vector3Tuple

Defined in: mobjects/point/Mobject2D.ts:15

Center of the region [x, y, z]. Default: [0, 0, 0]


color?

optional color: string

Defined in: mobjects/point/Mobject2D.ts:29

Color as CSS color string. Default: white (#FFFFFF)


density?

optional density: number

Defined in: mobjects/point/Mobject2D.ts:25

Alternative to numPoints: density (points per unit area for random, per unit length for grid).


distribution?

optional distribution: Distribution2D

Defined in: mobjects/point/Mobject2D.ts:27

Distribution pattern: 'grid' or 'random'. Default: 'grid'


height?

optional height: number

Defined in: mobjects/point/Mobject2D.ts:19

Height of the region (along y-axis). Default: 2


numPointsX?

optional numPointsX: number

Defined in: mobjects/point/Mobject2D.ts:21

Number of points along width for grid, or total points for random. Default: 10


numPointsY?

optional numPointsY: number

Defined in: mobjects/point/Mobject2D.ts:23

Number of points along height for grid. Default: 10


opacity?

optional opacity: number

Defined in: mobjects/point/Mobject2D.ts:31

Opacity from 0 to 1. Default: 1


pointSize?

optional pointSize: number

Defined in: mobjects/point/Mobject2D.ts:33

Size of each point in pixels. Default: 6


width?

optional width: number

Defined in: mobjects/point/Mobject2D.ts:17

Width of the region (along x-axis). Default: 2