@makefully/platypus 4.1.1 → 4.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,86 +1,122 @@
1
- # Changelog
2
-
3
- All notable changes to this project are documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [Unreleased]
9
-
10
- ## [4.1.1] - 2026-06-04
11
-
12
- ### Added
13
-
14
- - GitHub Actions [release workflow](.github/workflows/release.yml): when `package.json` version changes on `main`, builds `lib/*.js` and publishes a GitHub release from [CHANGELOG.md](CHANGELOG.md).
15
- - `scripts/extract-changelog.mjs` for release note extraction.
16
- - Vitest tests for `ControllerInput`.
17
-
18
- ### Changed
19
-
20
- - Docs CI ([docs workflow](.github/workflows/docs.yml)) deploys with `GITHUB_TOKEN` instead of an SSH deploy key.
21
- - `npm run docs` copies `assets/` into `docs/api/` so the README header image works on GitHub Pages.
22
- - `ControllerInput` JSDoc corrected (was incorrectly documented as `CollectiblesManager`).
23
-
24
- ### Fixed
25
-
26
- - `ControllerInput#unattachControls` now removes the bound pointer listeners registered at setup.
27
-
28
- ## [4.1.0] - 2026-06-03
29
-
30
- ### Added
31
-
32
- - npm package published as [`@makefully/platypus`](https://www.npmjs.com/package/@makefully/platypus) (UMD build in `lib/` only; `prepack` runs the release build).
33
- - Webpack 5 build pipeline (`webpack serve`, production and development modes).
34
- - API documentation tooling: `npm run docs`, `npm run docs:publish`, and [docs/README.md](docs/README.md).
35
- - Vitest unit tests for core types and components (including `RenderDebug`, `StateMap`, `AABB`, and others).
36
- - TiledLoader compatibility assessment (`npm run assess:tiled`, [test/tiled/README.md](test/tiled/README.md)).
37
- - `StateMap#toJSON` (boolean key/value object) and `StateMap#toString` (comma/`!` format compatible with `updateFromString`).
38
- - `StateMap` constructor support for copying from another `StateMap`.
39
-
40
- ### Changed
41
-
42
- - Package name scoped to `@makefully/platypus`; repository and homepage point at [Makefully-Studios/platypus](https://github.com/Makefully-Studios/platypus).
43
- - `lib/` is a build artifact (gitignored); clone builds via `npm run build:release`.
44
- - Upgraded from Webpack 4 to Webpack 5; removed Babel, `worker-loader`, and OpenSSL legacy provider workarounds.
45
- - `TickerClient` uses native `new Worker(new URL(..., import.meta.url))` again.
46
- - Internal imports no longer use `import 'platypus'` (relative modules / globals instead).
47
- - `StateMap` coerces stored values to booleans.
48
- - README and contributor docs updated for install, development, peers, and publishing.
49
- - Legacy JSDoc type expressions updated for current JSDoc parsing.
50
-
51
- ### Fixed
52
-
53
- - `RenderDebug` draws each `CollisionBasic` shape from its own `aABB` instead of the combined AABB dimensions.
54
- - `CollisionGroup` collision grid not updated for non-moving entities with a collision group.
55
- - `package.json` `engines` field corrected to `engines` (Node `>=20`).
56
-
57
- ## [4.0.3] - 2026-06-03
58
-
59
- ### Added
60
-
61
- - Vitest test suite and coverage reporting.
62
- - Tiled format spec catalog and coverage assessment scripts.
63
-
64
- ### Changed
65
-
66
- - Removed legacy `Camera` component; use `HandlerCamera` / `EntityCamera` instead.
67
-
68
- ### Fixed
69
-
70
- - `TimeEvent` scheduling edge case.
71
- - Test and base-class coverage gaps addressed in core utilities.
72
-
73
- ## [4.0.1] - 2026-05-28
74
-
75
- ### Added
76
-
77
- - Rotated one-way (`jumpThrough`) collision support on `CollisionShape` / `CollisionBasic`.
78
-
79
- ### Fixed
80
-
81
- - Collision handling when entities have multiple `CollisionBasic` components (`CollisionGroup`).
82
- - `HandlerCollision` grid updates for grouped, non-moving entities.
83
-
84
- ## Earlier versions
85
-
86
- Tags and history for releases prior to 4.0.x (for example `v2.0.2`) are available in [GitHub releases](https://github.com/Makefully-Studios/platypus/releases) and `git tag`.
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [4.1.5] - 2026-06-10
11
+
12
+ ### Added
13
+
14
+ - ESM build (`lib/platypus.mjs`) as the `import` entry in `package.json` exports; UMD (`lib/platypus.js`) remains the `require` entry.
15
+
16
+ ### Fixed
17
+
18
+ - Pixi `collectRenderablesWithEffects` crash (`Cannot read properties of undefined (reading 'push')`) when consuming the npm package instead of `/src`: the prebuilt UMD hid Platypus's `pixi.js` sub-imports, so bundlers could omit mask/render pipes that masked sprites need. The ESM entry preserves those imports in the consumer's module graph.
19
+
20
+ ## [4.1.4] - 2026-06-10
21
+
22
+ ### Changed
23
+
24
+ - Release workflow publishes to npm via trusted publishing (OIDC) instead of `NPM_TOKEN`, avoiding `EOTP` failures when npm 2FA is enabled.
25
+
26
+ ## [4.1.3] - 2026-06-10
27
+
28
+ ### Added
29
+
30
+ - Release workflow publishes `@makefully/platypus` to npm when `package.json` version changes on `main`.
31
+
32
+ ### Changed
33
+
34
+ - GitHub Actions workflows use Node.js 24 and action versions with a Node 24 runtime (`actions/checkout@v6`, `actions/setup-node@v6`, `softprops/action-gh-release@v3`, `peaceiris/actions-gh-pages@v4.1.0`).
35
+
36
+ ## [4.1.2] - 2026-06-10
37
+
38
+ ### Added
39
+
40
+ - `platypus.css` shipped in the npm tarball under `lib/` and exposed as `@makefully/platypus/platypus.css` (release build copies `src/platypus.css`).
41
+
42
+ ### Changed
43
+
44
+ - README documents the supported CSS import path for npm consumers (replaces v3 `src/platypus.css` imports).
45
+
46
+ ## [4.1.1] - 2026-06-04
47
+
48
+ ### Added
49
+
50
+ - GitHub Actions [release workflow](.github/workflows/release.yml): when `package.json` version changes on `main`, builds `lib/*.js` and publishes a GitHub release from [CHANGELOG.md](CHANGELOG.md).
51
+ - `scripts/extract-changelog.mjs` for release note extraction.
52
+ - Vitest tests for `ControllerInput`.
53
+
54
+ ### Changed
55
+
56
+ - Docs CI ([docs workflow](.github/workflows/docs.yml)) deploys with `GITHUB_TOKEN` instead of an SSH deploy key.
57
+ - `npm run docs` copies `assets/` into `docs/api/` so the README header image works on GitHub Pages.
58
+ - `ControllerInput` JSDoc corrected (was incorrectly documented as `CollectiblesManager`).
59
+
60
+ ### Fixed
61
+
62
+ - `ControllerInput#unattachControls` now removes the bound pointer listeners registered at setup.
63
+
64
+ ## [4.1.0] - 2026-06-03
65
+
66
+ ### Added
67
+
68
+ - npm package published as [`@makefully/platypus`](https://www.npmjs.com/package/@makefully/platypus) (UMD build in `lib/` only; `prepack` runs the release build).
69
+ - Webpack 5 build pipeline (`webpack serve`, production and development modes).
70
+ - API documentation tooling: `npm run docs`, `npm run docs:publish`, and [docs/README.md](docs/README.md).
71
+ - Vitest unit tests for core types and components (including `RenderDebug`, `StateMap`, `AABB`, and others).
72
+ - TiledLoader compatibility assessment (`npm run assess:tiled`, [test/tiled/README.md](test/tiled/README.md)).
73
+ - `StateMap#toJSON` (boolean key/value object) and `StateMap#toString` (comma/`!` format compatible with `updateFromString`).
74
+ - `StateMap` constructor support for copying from another `StateMap`.
75
+
76
+ ### Changed
77
+
78
+ - Package name scoped to `@makefully/platypus`; repository and homepage point at [Makefully-Studios/platypus](https://github.com/Makefully-Studios/platypus).
79
+ - `lib/` is a build artifact (gitignored); clone builds via `npm run build:release`.
80
+ - Upgraded from Webpack 4 to Webpack 5; removed Babel, `worker-loader`, and OpenSSL legacy provider workarounds.
81
+ - `TickerClient` uses native `new Worker(new URL(..., import.meta.url))` again.
82
+ - Internal imports no longer use `import 'platypus'` (relative modules / globals instead).
83
+ - `StateMap` coerces stored values to booleans.
84
+ - README and contributor docs updated for install, development, peers, and publishing.
85
+ - Legacy JSDoc type expressions updated for current JSDoc parsing.
86
+
87
+ ### Fixed
88
+
89
+ - `RenderDebug` draws each `CollisionBasic` shape from its own `aABB` instead of the combined AABB dimensions.
90
+ - `CollisionGroup` collision grid not updated for non-moving entities with a collision group.
91
+ - `package.json` `engines` field corrected to `engines` (Node `>=20`).
92
+
93
+ ## [4.0.3] - 2026-06-03
94
+
95
+ ### Added
96
+
97
+ - Vitest test suite and coverage reporting.
98
+ - Tiled format spec catalog and coverage assessment scripts.
99
+
100
+ ### Changed
101
+
102
+ - Removed legacy `Camera` component; use `HandlerCamera` / `EntityCamera` instead.
103
+
104
+ ### Fixed
105
+
106
+ - `TimeEvent` scheduling edge case.
107
+ - Test and base-class coverage gaps addressed in core utilities.
108
+
109
+ ## [4.0.1] - 2026-05-28
110
+
111
+ ### Added
112
+
113
+ - Rotated one-way (`jumpThrough`) collision support on `CollisionShape` / `CollisionBasic`.
114
+
115
+ ### Fixed
116
+
117
+ - Collision handling when entities have multiple `CollisionBasic` components (`CollisionGroup`).
118
+ - `HandlerCollision` grid updates for grouped, non-moving entities.
119
+
120
+ ## Earlier versions
121
+
122
+ Tags and history for releases prior to 4.0.x (for example `v2.0.2`) are available in [GitHub releases](https://github.com/Makefully-Studios/platypus/releases) and `git tag`.
package/CONTRIBUTORS.md CHANGED
@@ -1,10 +1,10 @@
1
- # Contributors
2
-
3
- ## Maintainers
4
-
5
- - [Derek Detweiler](https://github.com/probityrules)
6
- - [Todd Lewis](https://github.com/GopherwoodTodd)
7
-
8
- ## History
9
-
10
- Platypus was originally developed by [PBS KIDS](https://pbskids.org/) and [Gopherwood Studios](https://gopherwoodstudios.com/). Many others have contributed over the years; see `git log` and [GitHub contributors](https://github.com/Makefully-Studios/platypus/graphs/contributors) for the full list.
1
+ # Contributors
2
+
3
+ ## Maintainers
4
+
5
+ - [Derek Detweiler](https://github.com/probityrules)
6
+ - [Todd Lewis](https://github.com/GopherwoodTodd)
7
+
8
+ ## History
9
+
10
+ Platypus was originally developed by [PBS KIDS](https://pbskids.org/) and [Gopherwood Studios](https://gopherwoodstudios.com/). Many others have contributed over the years; see `git log` and [GitHub contributors](https://github.com/Makefully-Studios/platypus/graphs/contributors) for the full list.
package/README.md CHANGED
@@ -1,77 +1,85 @@
1
- [![Platypus](./assets/platypus-title.png)](https://github.com/Makefully-Studios/platypus)
2
- ========
3
-
4
- 2D tile based game framework in HTML5
5
-
6
- The Platypus Engine allows rapid development of 2D orthogonal tile based games for deployment in HTML5 compatible browsers. The engine uses a component based model, and includes many ready to use components to allow users to start adding assets and editing levels right away. The component based model lends itself to community members adding new functionality, we hope you'll share what you've done!
7
-
8
- Platypus uses:
9
-
10
- * The [Tiled](https://www.mapeditor.org/) map editor for level creation.
11
- * [SpringRoll (v2)](https://springroll.io) for application management.
12
- * [Pixi.js](https://pixijs.com/) for rendering visuals.
13
-
14
- ## Install
15
-
16
- ```bash
17
- npm install @makefully/platypus
18
- ```
19
-
20
- The npm package ships a **Webpack 5 UMD build** in `lib/` (not `src/`). Your game must also install peer dependencies and expose them to the bundle (same as a classic script-tag setup):
21
-
22
- | Package | Notes |
23
- |---------|--------|
24
- | `pixi.js` (^8.1.5) | Rendering |
25
- | `springroll` (^2.6.0) | Application shell |
26
- | `@tweenjs/tween.js` | Tweens |
27
- | `@pixi/sound` | Audio (Makefully fork; see `package.json`) |
28
- | `@esotericsoftware/spine-pixi-v8` | Spine animations (`RenderSpine`) |
29
- | `pako` | Compression helpers where used |
30
-
31
- Optional: `box2d3-wasm`, `jsmediatags`, `poly-decomp` (see `optionalDependencies` in [package.json](package.json)).
32
-
33
- Entry point: `lib/platypus.js` (plus any worker chunks emitted alongside it in `lib/`).
34
-
35
- ## Development
36
-
37
- Requires **Node.js 20+**.
38
-
39
- ```bash
40
- npm install
41
- npm run build:release # production bundle → lib/ (gitignored)
42
- npm run test:run # unit tests (Vitest)
43
- npm run docs # API reference → docs/api/ (gitignored)
44
- ```
45
-
46
- | Script | Purpose |
47
- |--------|---------|
48
- | `npm start` | Webpack dev server (`src/`, development mode) |
49
- | `npm run build:debug` | Development bundle with source maps |
50
- | `npm run pack:check` | Preview the npm tarball contents |
51
- | `npm run assess:tiled` | TiledLoader vs Tiled spec report ([test/tiled/README.md](test/tiled/README.md)) |
52
-
53
- Contributor workflow, API docs publishing, and `npm publish` are described in [docs/README.md](docs/README.md).
54
-
55
- When `package.json` **version** changes on `main`, [.github/workflows/release.yml](.github/workflows/release.yml) builds `lib/*.js`, reads the matching [CHANGELOG.md](CHANGELOG.md) section, and publishes a GitHub release (skips if that tag already exists).
56
-
57
- ## Key Features
58
-
59
- * Deploy on any HTML5 platform supported by SpringRoll v2
60
- * Multi-platform support
61
- * Automatic scaling
62
- * Touch and keyboard input
63
- * Component-based development model
64
- * [Documentation](https://makefully-studios.github.io/platypus/) — generated from JSDoc in `src/`
65
-
66
- ## Platypus in action
67
-
68
- * Ready Jet GO! [Mission Earth](https://pbskids.org/readyjetgo/games/mission/index.html)
69
- * Wild Kratts [Monkey Mayhem](https://pbskids.org/wildkratts/games/monkey-mayhem/)
70
-
71
- ***
72
-
73
- [Code](https://github.com/Makefully-Studios/platypus) · [Docs](https://makefully-studios.github.io/platypus/) · [npm](https://www.npmjs.com/package/@makefully/platypus) · [Changelog](CHANGELOG.md)
74
-
75
- Maintained by **Derek Detweiler** and **Todd Lewis** ([CONTRIBUTORS.md](CONTRIBUTORS.md)).
76
-
77
- Platypus was originally developed by PBS KIDS and [Gopherwood Studios](https://gopherwoodstudios.com/). It is free to use (see [licenses.txt](licenses.txt)); assets in the example games are © Gopherwood Studios and/or © PBS KIDS.
1
+ [![Platypus](./assets/platypus-title.png)](https://github.com/Makefully-Studios/platypus)
2
+ ========
3
+
4
+ 2D tile based game framework in HTML5
5
+
6
+ The Platypus Engine allows rapid development of 2D orthogonal tile based games for deployment in HTML5 compatible browsers. The engine uses a component based model, and includes many ready to use components to allow users to start adding assets and editing levels right away. The component based model lends itself to community members adding new functionality, we hope you'll share what you've done!
7
+
8
+ Platypus uses:
9
+
10
+ * The [Tiled](https://www.mapeditor.org/) map editor for level creation.
11
+ * [SpringRoll (v2)](https://springroll.io) for application management.
12
+ * [Pixi.js](https://pixijs.com/) for rendering visuals.
13
+
14
+ ## Install
15
+
16
+ ```bash
17
+ npm install @makefully/platypus
18
+ ```
19
+
20
+ The npm package ships **Webpack 5 builds** in `lib/` (not `src/`): `platypus.mjs` for `import` (recommended) and `platypus.js` (UMD) for `require` or script tags. Your game must also install peer dependencies:
21
+
22
+ | Package | Notes |
23
+ |---------|--------|
24
+ | `pixi.js` (^8.1.5) | Rendering |
25
+ | `springroll` (^2.6.0) | Application shell |
26
+ | `@tweenjs/tween.js` | Tweens |
27
+ | `@pixi/sound` | Audio (Makefully fork; see `package.json`) |
28
+ | `@esotericsoftware/spine-pixi-v8` | Spine animations (`RenderSpine`) |
29
+ | `pako` | Compression helpers where used |
30
+
31
+ Optional: `box2d3-wasm`, `jsmediatags`, `poly-decomp` (see `optionalDependencies` in [package.json](package.json)).
32
+
33
+ Entry points: `lib/platypus.mjs` (`import`) or `lib/platypus.js` (`require`/script tag), plus worker chunks alongside them in `lib/`.
34
+
35
+ If you see a Pixi error like `Cannot read properties of undefined (reading 'push')` in `collectRenderablesMixin` when using the UMD build, switch to the ESM entry (`import platypus from '@makefully/platypus'`). The ESM build keeps Platypus's `pixi.js` imports visible to your bundler so mask and render pipes are initialized. Using `/src` directly worked because your bundler already walked those imports.
36
+
37
+ Include the engine stylesheet in your game's CSS (canvas layout, captions, debug overlay):
38
+
39
+ ```css
40
+ @import '@makefully/platypus/platypus.css';
41
+ ```
42
+
43
+ ## Development
44
+
45
+ Requires **Node.js 20+**.
46
+
47
+ ```bash
48
+ npm install
49
+ npm run build:release # production bundle → lib/ (gitignored)
50
+ npm run test:run # unit tests (Vitest)
51
+ npm run docs # API reference → docs/api/ (gitignored)
52
+ ```
53
+
54
+ | Script | Purpose |
55
+ |--------|---------|
56
+ | `npm start` | Webpack dev server (`src/`, development mode) |
57
+ | `npm run build:debug` | Development bundle with source maps |
58
+ | `npm run pack:check` | Preview the npm tarball contents |
59
+ | `npm run assess:tiled` | TiledLoader vs Tiled spec report ([test/tiled/README.md](test/tiled/README.md)) |
60
+
61
+ Contributor workflow, API docs publishing, and `npm publish` are described in [docs/README.md](docs/README.md).
62
+
63
+ When `package.json` **version** changes on `main`, [.github/workflows/release.yml](.github/workflows/release.yml) builds `lib/`, publishes to [npm](https://www.npmjs.com/package/@makefully/platypus), and creates a GitHub release from the matching [CHANGELOG.md](CHANGELOG.md) section (skips each step if that version already exists).
64
+
65
+ ## Key Features
66
+
67
+ * Deploy on any HTML5 platform supported by SpringRoll v2
68
+ * Multi-platform support
69
+ * Automatic scaling
70
+ * Touch and keyboard input
71
+ * Component-based development model
72
+ * [Documentation](https://makefully-studios.github.io/platypus/) — generated from JSDoc in `src/`
73
+
74
+ ## Platypus in action
75
+
76
+ * Ready Jet GO! [Mission Earth](https://pbskids.org/readyjetgo/games/mission/index.html)
77
+ * Wild Kratts [Monkey Mayhem](https://pbskids.org/wildkratts/games/monkey-mayhem/)
78
+
79
+ ***
80
+
81
+ [Code](https://github.com/Makefully-Studios/platypus) · [Docs](https://makefully-studios.github.io/platypus/) · [npm](https://www.npmjs.com/package/@makefully/platypus) · [Changelog](CHANGELOG.md)
82
+
83
+ Maintained by **Derek Detweiler** and **Todd Lewis** ([CONTRIBUTORS.md](CONTRIBUTORS.md)).
84
+
85
+ Platypus was originally developed by PBS KIDS and [Gopherwood Studios](https://gopherwoodstudios.com/). It is free to use (see [licenses.txt](licenses.txt)); assets in the example games are © Gopherwood Studios and/or © PBS KIDS.
@@ -0,0 +1 @@
1
+ self.onmessage=({data:e})=>{let a=0;if(e.begin){let t=performance.now();clearInterval(a),a=setInterval(()=>{const e=performance.now();self.postMessage({deltaTime:e-t}),t=e},e.begin.delta)}e.stop&&clearInterval(a)};
@@ -0,0 +1,68 @@
1
+ div#captions {
2
+ user-select: none;
3
+ -moz-user-select: none;
4
+ -webkit-user-select: none;
5
+ -ms-user-select: none;
6
+ -webkit-touch-callout: none;
7
+ }
8
+
9
+ canvas.platypus-canvas {
10
+ height: 100%;
11
+ position: relative;
12
+ width: 100%;
13
+
14
+ user-select: none;
15
+ -moz-user-select: none;
16
+ -webkit-user-select: none;
17
+ -ms-user-select: none;
18
+ -webkit-touch-callout: none;
19
+ }
20
+
21
+ .platypus-debugging {
22
+ position: fixed;
23
+ pointer-events: none;
24
+ color: #fff;
25
+ font-size: 12px;
26
+ padding: 5px;
27
+ background: rgba(0, 0, 0, 0.4);
28
+ z-index: 2;
29
+ font-family: "Lucida Console", Monaco, monospace;
30
+ -webkit-touch-callout: none;
31
+ user-select: none;
32
+ cursor: default;
33
+ margin: 0;
34
+ line-height: 1.5em;
35
+ }
36
+
37
+ #framerate {
38
+ top: 0;
39
+ left: 0;
40
+ }
41
+
42
+ #platypus-logging {
43
+ top: 0;
44
+ right: 0;
45
+ max-width: 40%;
46
+ max-height: 40%;
47
+ overflow-x: auto;
48
+ }
49
+
50
+ #platypus-logging .general {color: lightgreen;}
51
+ #platypus-logging .log {color: white;}
52
+ #platypus-logging .warn {color: yellow;}
53
+ #platypus-logging .debug {color: lightblue;}
54
+ #platypus-logging .error {color: lightcoral;}
55
+ #platypus-logging span {padding-right: 1.5em;}
56
+
57
+ #toggle-platypus-debugging {
58
+ position: fixed;
59
+ top: 0;
60
+ right: 0;
61
+ font-size: 12px;
62
+ padding: 5px;
63
+ background: rgba(0, 0, 0, 0.4);
64
+ font-family: "Lucida Console", Monaco, monospace;
65
+ border: none;
66
+ color: white;
67
+ z-index: 3;
68
+ }