Configuration options for the 3D renderer plugin.
Supports two modes:
ecs.initialize()
This plugin includes 3D transform propagation automatically.
const renderer = new WebGLRenderer({ antialias: true });const scene = new Scene();const camera = new PerspectiveCamera(75, w / h, 0.1, 1000);const ecs = ECSpresso.create() .withPlugin(createRenderer3DPlugin({ renderer, scene, camera })) .build(); Copy
const renderer = new WebGLRenderer({ antialias: true });const scene = new Scene();const camera = new PerspectiveCamera(75, w / h, 0.1, 1000);const ecs = ECSpresso.create() .withPlugin(createRenderer3DPlugin({ renderer, scene, camera })) .build();
const ecs = ECSpresso.create() .withPlugin(createRenderer3DPlugin({ container: '#game', background: 0x1099bb, antialias: true, cameraOptions: { fov: 75, position: { x: 0, y: 5, z: 10 } }, })) .build();await ecs.initialize(); Copy
const ecs = ECSpresso.create() .withPlugin(createRenderer3DPlugin({ container: '#game', background: 0x1099bb, antialias: true, cameraOptions: { fov: 75, position: { x: 0, y: 5, z: 10 } }, })) .build();await ecs.initialize();
Configuration options for the 3D renderer plugin.
Supports two modes:
ecs.initialize()This plugin includes 3D transform propagation automatically.