Sign in to see your models

Save models to your account and pick up where you left off on any device.

Sign-in is temporarily unavailable. Please try again later.

Documentation

Open-source core

The MathPets language, compiler, deterministic runtime and VS Code extension are developed in public under the Apache-2.0 licence. The hosted studio is a separate product built on that core.

Project boundary

A reusable toolchain, without the website

The public repository contains what you need to parse, compile and run a MathPets model in another host. It does not include this website, account integrations, hosted APIs or private product data.

That boundary keeps the core useful on its own: model files remain portable, compiler behavior is testable outside the Studio, and hosts can build their own interfaces around the same deterministic runtime.

Read the language reference here, or browse the public source on GitHub.

dependency direction

source.pet    │    ▼language / compiler    │    ▼model API    │    ▼engine / runtime    ▲    │host applications

Portable format

One model, four files

Executable rules live in source.pet. The three companions are ordinary YAML, so catalog copy, presentation and parameter presets stay separate from simulation behaviour. MathPets Studio checks the four files together and catches broken state, field, monitor and parameter references before the model runs.

my-model/  source.pet             executable model  definition.petmeta     title, description, topics, learning goal  styles.petstyle        colors, shapes, scales, transitions  presets.petpreset      named parameter configurations

Packages

What is in the core

Local workflow

Test, compile and package

npm test regenerates the parser, builds the compiler bundle and runs the compiler and extension tests.

scripts/compile-model.mjs prints the compiled model: an ES module that exports createModel and imports the model API and engine packages. A host can create the model, set its seed, run setup and advance ticks without the studio.

core commands

npm installnpm test node scripts/compile-model.mjs path/to/model.pet > model.js npm run package:extension

Repository guides

Build with the core