# moSHion Licensing

moSHion is an original engine written for this course, inspired by q5play.
It contains no q5play source code. The sections below cover each file in
this repository. (shCode copies this file and the files it covers, and serves
them under `/moshion/`; the paths below are this repository's.)

## 1. moshion.js, moshion.d.ts, runner.html, assets/ — MIT

> `textures/` is **not** covered by this section — it is third-party CC0 art.
> See section 5.

The moSHion engine facade, its type declarations, the sandbox host and the
example sprite sheets are original work written for this course and released
under the MIT license:

```
MIT License

Copyright (c) 2026 Steven Huff

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

## 2. planck.min.js — MIT (upstream)

`planck.min.js` is planck.js v1.5.0, vendored unmodified. Its license header
(kept intact in the file) reads:

```
Planck.js v1.5.0
@license The MIT license
@copyright Copyright (c) 2026 Erin Catto, Ali Shakiba

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

## 3. Design attribution

moSHion is inspired by [q5play][] (created by Quinton Ashley), which this
course previously used. The engine is an original implementation over
planck.js: it contains no q5play source code and is not subject to the
q5play Creator License or its CS-education restriction.

[q5play]: https://q5play.org

## 4. A note on `assets/`

Until 2026-08-25 this directory held six files that were **byte-identical**
to the example art shipped with q5play, while section 1 above described them
as original work for this course. That was not correct.

They were replaced with art generated by `scripts/make-moshion-assets.py`,
which draws every pixel from primitives and reads no source image. The sheet
geometry is unchanged, because the lessons that load them slice by frame
count: `asterisk_explode.avif` 11 frames, `ghost_idle.avif` 7,
`ghost_fly.avif` 4, and `star.webp` a single static image.

`monster.webp` and `questKid.webp` were deleted rather than redrawn -- no
lesson, doc or example referenced either one.

Re-run the script to regenerate the sheets; it is deterministic.

## 5. `textures/` — CC0 (Kenney)

`textures/` is the catalog behind `sprite.texture = 'coin'`. It is **not**
original work for this course, and section 1 does not cover it.

| | |
| --- | --- |
| Pack | Kenney, *Platformer Art: Pixel Redux*, created 2020-04-22 |
| Author | Kenney (kenney.nl) |
| License | **CC0 1.0 Universal** — public domain dedication |
| Source | `github.com/ETdoFresh/kenney.nl`, `platformerart_pixelredux_2` |
| Sheet | `Tilemap/tilemap_packed.png`, sha256 `883071fc…99bdc78`, 630×630 |

The pack's own `License.txt` reads: *"This content is free to use in
personal, educational and commercial projects."* CC0 requires no attribution;
crediting Kenney is optional and encouraged. That license file is vendored
twice on purpose — beside the source sheet in
`scripts/assets/kenney-pixel-redux/`, and beside the sliced output in
`textures/LICENSE.txt` — so the provenance travels with the bytes in either
direction.

Each Kenney tile is an **exact 21×21 crop** of that sheet. Nothing is
redrawn, recoloured or modified. `scripts/make-textures.py` holds the
name → tile-index table and is deterministic: re-running it reproduces every
file. Adding a texture means adding a row to that table and re-running, never
dropping a PNG into the directory by hand — `scripts/check-textures.mjs`
fails on a file the manifest does not name.

### Why this section reads the way section 4 does

Section 4 exists because `assets/` once held art byte-identical to q5play's
while section 1 called it original work. This section is written to make that
mistake harder to repeat: the pack, the author, the license, the upstream repo
and the hash of the exact file are all recorded here, and the slicing script
reads a vendored copy of that file rather than downloading one. If a future
texture comes from somewhere else, it needs its own row and its own section —
not a quiet addition to this one.

### Student-saved textures

`saveTexture(name, dataUrl)` stores art a student drew, in that student's own
browser storage. It never touches this directory, is never committed, and
carries no license claim by this project.

## 6. Original art in `assets/` and `textures/`

`textures/runner.png`, `textures/runnerJump.png`, `assets/ground_tile.png` and
`assets/grass_tile.png` are original work, drawn pixel by pixel from
`scripts/make-runner-sheet.py` and `scripts/make-ground-tiles.py` (both
deterministic, neither reads a source image), and are MIT like section 1.
They sit in the `textures/` catalog beside the Kenney crops but are not
covered by section 5; `make-textures.py` lists them separately as `ORIGINAL`.
The `*Walk`, `*Fly`, `*Swim` and `*Crawl` strips are Kenney tiles placed
side by side, still exact crops with nothing redrawn.

The 21 animated sheets drawn by `scripts/make-anim-sheets.py` (`coinSpin`,
`heartBlink`, `heartLose`, the `*Sparkle` gems, `starTwinkle`, the `*Jump`
players, the `*Wave` flags, `torchFlicker`, `boom`) are different: each one
starts from a Kenney tile that `make-textures.py` cut out and MOVES it
(squash and stretch, a narrower copy for a coin's edge, a white flash, a
column-by-column wave). No other image is read. CC0 allows changing the art,
so they stay under section 5's CC0, but they are not exact crops;
`make-textures.py` lists them in `ORIGINAL` with their frame counts.
