Skip to content

r3f-xr-widgets / ResizableWindowProps

Interface: ResizableWindowProps ​

Defined in: src/components/ResizableWindow.tsx:14

Props for the ResizableWindow component

Properties ​

aspectRatio? ​

optional aspectRatio: number

Defined in: src/components/ResizableWindow.tsx:32

Aspect ratio (width/height) of the window. Defaults to 16/9


autoRotateToCamera? ​

optional autoRotateToCamera: boolean

Defined in: src/components/ResizableWindow.tsx:24

Continuously rotate window to face camera. Defaults to false


baseScale? ​

optional baseScale: number

Defined in: src/components/ResizableWindow.tsx:34

Base size of the window in meters. Defaults to 0.3


children? ​

optional children: ReactNode

Defined in: src/components/ResizableWindow.tsx:16

React children to render inside the window


handleColor? ​

optional handleColor: string | number

Defined in: src/components/ResizableWindow.tsx:36

Color of the drag and resize handles. Defaults to 'grey'


initiallyRotateTowardsCamera? ​

optional initiallyRotateTowardsCamera: boolean

Defined in: src/components/ResizableWindow.tsx:22

Rotate window to face camera on mount. Defaults to true


onPositionChange()? ​

optional onPositionChange: (position) => void

Defined in: src/components/ResizableWindow.tsx:28

Callback when window position changes

Parameters ​

position ​

Vector3

Returns ​

void


onScaleChange()? ​

optional onScaleChange: (scale) => void

Defined in: src/components/ResizableWindow.tsx:30

Callback when window scale changes

Parameters ​

scale ​

Vector3

Returns ​

void


position? ​

optional position: [number, number, number]

Defined in: src/components/ResizableWindow.tsx:18

Initial position in 3D space [x, y, z]. Defaults to [0, 0, -0.4]


rotateOnDrag? ​

optional rotateOnDrag: boolean

Defined in: src/components/ResizableWindow.tsx:26

Rotate window to face camera while dragging. Defaults to true


scale? ​

optional scale: [number, number, number]

Defined in: src/components/ResizableWindow.tsx:20

Initial scale [x, y, z]. Not commonly used - use baseScale instead

Released under the MIT License.