Skip to main content

Interface: ImageMobjectOptions

Defined in: mobjects/image/index.ts:21

Options for creating an ImageMobject

Properties

center?

optional center: Vector3Tuple

Defined in: mobjects/image/index.ts:33

Center position [x, y, z]. Default: [0, 0, 0]


doubleSided?

optional doubleSided: boolean

Defined in: mobjects/image/index.ts:39

Whether to render both sides. Default: false


filters?

optional filters: ImageFilterOptions

Defined in: mobjects/image/index.ts:37

Image filter options


height?

optional height: number

Defined in: mobjects/image/index.ts:29

Height of the image in scene units. Default: auto-calculated from aspect ratio


opacity?

optional opacity: number

Defined in: mobjects/image/index.ts:35

Opacity from 0 to 1. Default: 1


pixelData?

optional pixelData: number[][]

Defined in: mobjects/image/index.ts:25

2D grayscale pixel array (values 0-255). Each inner array is a row. Either source or pixelData is required.


scaleToFit?

optional scaleToFit: boolean

Defined in: mobjects/image/index.ts:31

If both width and height specified, whether to scale to fit within bounds preserving aspect ratio. Default: true


source?

optional source: string

Defined in: mobjects/image/index.ts:23

Image source: URL or base64 data URI. Either source or pixelData is required.


width?

optional width: number

Defined in: mobjects/image/index.ts:27

Width of the image in scene units. Default: auto-calculated from aspect ratio