melonjs-math SKILL.md skillA
melonjs-math from melonjs/melonjs is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add melonjs/melonjs/melonjs-math@git:20261106.62cc59fPins git:20261106.62cc59f in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- melonjs/melonjs
- Path
packages/melonjs/skills/melonjs-math/SKILL.md- Versions recorded
- 4
- Latest version
- git:20261106.62cc59f, committed Nov 6, 2026
- First version recorded
- Oct 16, 2026
- Size
- 14,562 bytes
- Repository stars
- 6,441
- License
- MIT
Use this skill for vector and matrix maths in melonJS — Vector2d, Vector3d, their observable variants, Matrix2d, Matrix3d, and the math utility functions. Covers which methods mutate and which allocate, the vector pool and when clone() is the wrong tool, interpolation with lerp, slerp, damp and moveTowards, and the argument defaults that silently drop a component. Triggers on: Vector2d, Vector3d, ObservableVector2d, ObservableVector3d, Matrix2d, Matrix3d, vector, vector maths, dot, cross…
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Vectors, matrices and maths ## The one rule that explains most surprises **Methods mutate `this` and return it. They do not return a new vector.** ```js const a = new Vector3d(1, 0, 0); const b = new Vector3d(0, 1, 0); a.cross(b); // a IS NOW the cross product; the original a is gone a.add(b).normalize().scale(3, 3, 3); // chains, all in place ``` That is what makes the API allocation-free, and it is the opposite of what a functional style expects. If you need to keep the original, copy into something you own first: ```js out.copy(a).cross(b); // a untouched, nothing allocated ``` **The exceptions are named.** A handful of methods return a NEW vector, and each has a `*Self` sibling that does not: | allocates a new vector | mutates in place | |---|---| | `negate()` | `negateSelf()` | | `floor()` | `floorSelf()` | | `ceil()` | `ceilSelf()` | | `clamp(low, high)` | `clampSelf(low, high)` | | `clone()` | `copy(v)` | So `v.negate()` in a per-frame loop allocates every frame and `v.negateSelf()` does not. The names are the only clue; nothing in the call site shows it. ## `clone()` comes from a pool, and only pays off if you give it back …
Read the whole file at its exact version.
How to install
mdr add melonjs/melonjs/melonjs-math@sha256:259ebe43461602bdThe line at the top of this page pins the label git:20261106.62cc59f, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_dzf5djbmcrayxbfm)
1 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 4 versions of this file, between Oct 16, 2026 and Nov 6, 2026, about one every 7 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20261106.62cc59f latest | 2026-11-06 | 62cc59f | 14,562 B | A | view · diff |
| git:20261024.d7db994 | 2026-10-24 | d7db994 | 13,549 B | A | view · diff |
| git:20261017.9069487 | 2026-10-17 | 9069487 | 12,606 B | A | view · diff |
| git:20261016.5dd8688 | 2026-10-16 | 5dd8688 | 8,221 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (14562 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
melonjs/melonjs · 6,441 stars · license MIT · pushed 2026-11-06 · branch master
API
GET https://markdownregistry.com/api/v1/artifacts/art_dzf5djbmcrayxbfm GET https://markdownregistry.com/api/v1/resolve?ref=melonjs/melonjs/melonjs-math GET https://markdownregistry.com/api/v1/blob/259ebe43461602bd4ea147d6bb4343ac14f727fb3e904b09c5a2bcb3100185f0
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.