@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / components / ImageComponent
Class: ImageComponent
Defined in: components/Image.ts:13
Renders a 2D image as a textured quad in the scene. Width/height are in world units. Texture loading is handled by the image system, which populates ImageComponent.texture and ImageComponent.object asynchronously.
Extends
Constructors
Constructor
ts
new ImageComponent(
path,
width?,
height?): ImageComponent;Defined in: components/Image.ts:25
Parameters
| Parameter | Type | Default value |
|---|---|---|
path | string | undefined |
width | number | 1 |
height | number | 1 |
Returns
ImageComponent
Overrides
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
path | string | Source URL or localasset:// path of the image file. | components/Image.ts:15 |
width | number | Width of the rendered quad in world units. | components/Image.ts:17 |
height | number | Height of the rendered quad in world units. | components/Image.ts:19 |
texture | Texture | null | Loaded texture, populated asynchronously by the image system. null until loaded. | components/Image.ts:21 |
object | Object3D<Object3DEventMap> | null | Live three.js object representing the textured quad. null until built. | components/Image.ts:23 |

