spoint
Installation
SKILL.md
Spoint App Development Reference
Setup:
npx spoint scaffold # first time — copies default apps/ into cwd
npx spoint # start server (localhost:3001)
npx spoint-create-app my-app
npx spoint-create-app --template physics my-crate
Project structure: apps/world/index.js (world config) + apps/<name>/index.js (apps). Engine is from npm — never in user project.
App design principle: apps are config, engine is code.
- No
clientblock unless your app renders custom UI (ui:field in render return). The snapshot carries position/rotation/custom automatically. - No
onEditorUpdate— the engine applies position/rotation/scale/custom changes from the editor automatically. - Use
ctx.physics.addColliderFromConfig(cfg)instead of separate setStatic/setDynamic + addBoxCollider calls. - Use
ctx.world.spawnChild(id, cfg)instead ofspawn+ manualteardownloop — children are auto-destroyed. - Keep helper functions outside the
export default {}block (hoisted by evaluateAppModule).