Skip to main content

Interface: ImageMobjectOptions

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

Options for creating an ImageMobject

Properties

center?

optional center: Vector3Tuple

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

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


doubleSided?

optional doubleSided: boolean

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

Whether to render both sides. Default: false


filters?

optional filters: ImageFilterOptions

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

Image filter options


height?

optional height: number

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

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


opacity?

optional opacity: number

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

Opacity from 0 to 1. Default: 1


pixelData?

optional pixelData: number[][]

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

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:32

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:24

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


width?

optional width: number

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

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