Skip to content

modlumi

Type declarations for the Modlumi scripting API.

Modlumi runs JavaScript (ES2023) in an embedded QuickJS engine. Write scripts in TypeScript, compile them with tsc against this file, and run the emitted .js file from the script editor, with File → Run Script… or with modlumi --run-script script.js. The script console runs JavaScript directly. Everything lives on the global modlumi namespace; nothing needs to be imported.

Lengths are meters, face areas square meters and angles radians. Entities, collections and the model borrow the open document: they stop working once the document is replaced.