Skip to main content

@luma.gl/engine/api

Use Engine to build and draw models on a luma.gl device. A Model brings geometry, shader inputs, and pipeline state together. Keep the model across frames and draw it into a render pass when the scene changes.

import {Model} from '@luma.gl/engine/api';
import type {Device} from '@luma.gl/core/api';

function drawFrame(device: Device, model: Model) {
const pass = device.beginRenderPass({clearColor: [0, 0, 0, 1]});
model.draw(pass);
pass.end();
device.submit();
}

The same entry point provides geometry, animation, picking, and compute utilities. Use @luma.gl/engine/scenegraph to arrange models in a hierarchy. The Engine guide shows how these pieces fit together. Import optional features such as lighting, glTF loading, and text rendering from their Engine subpaths.