Image
A flat textured plane that auto-sizes to the loaded image's aspect ratio. Useful for billboards, UI quads, or photo planes.
ts
import { Behaviour } from "@relu-interactives/spatial-ecs";
export default class SpawnPoster extends Behaviour {
init() {
const objects = this.world.getObjectManagementSystem();
objects?.requestCreate("image", {
name: "Poster",
path: "/assets/images/poster.png",
transform: { position: { x: 0, y: 1.5, z: -2 } },
});
}
}Payload
| Field | Type | Default | Description |
|---|---|---|---|
name | string | "Image" | Display name. |
path | string | "" | URL or local-asset path to the image (PNG / JPG). |
transform | TransformData | identity | Position / rotation / scale. |
parentId | EntityId | null | null | Optional parent entity. |
The plane is created at 1×1 and rescaled in X by width / height once the texture loads.
Components attached
Transform, Object3DRef, Name, EntityType, ParentId, Selectable, Image.

