@afjk/loomlet
v0.1.2
Published
A small reactive DSL and node graph toolkit for interactive scenes.
Maintainers
Readme
Loomlet
A small reactive DSL and node graph toolkit for interactive scenes.
Loomlet provides:
- a
.loomDSL - a core JavaScript library
- a CLI
- a VS Code extension
- a Web Node Editor
Status: experimental. APIs, graph format, and DSL syntax may change.
Try it
- Web Node Editor: https://afjk.github.io/loomlet/node-editor/
- Examples: examples/README.md
Install
npm install @afjk/loomletCLI
Create a small .loom file:
echo 'x = 1' > hello.loomCompile it:
npx -p @afjk/loomlet loomlet compile hello.loomFor global install:
npm install -g @afjk/loomlet
loomlet --helpTo load a trusted local package:
loomlet run ./file.loom --package ./examples/packages/demo/index.js --get x.outSee Package System docs for details.
Library usage
import { parseDSLToAST, compileToGraph } from "@afjk/loomlet";
const source = `x = 1`;
const { ast, errors: parseErrors } = parseDSLToAST(source);
if (parseErrors.length) {
console.error(parseErrors);
}
const { graph, errors: compileErrors } = compileToGraph(ast);
if (compileErrors.length) {
console.error(compileErrors);
}
console.log(graph);VS Code extension
The Loomlet VS Code extension provides:
- syntax highlighting
- completion
- diagnostics
- preview support
Search for Loomlet in the VS Code Marketplace.
Documentation
- Language guide
- CLI guide
- VS Code extension
- Concepts and design notes
- Terminology
- Stabilization roadmap
- 設計ノート(日本語)
- Scene Sync integration
- Release and maintainer notes
- Standard library reference
- Runtime node registration
- Runtime parity fixtures
- Unity runtime compatibility
Generated metadata and reference docs can be refreshed with npm run generate:metadata.
License
MIT
