@makefully/platypus 4.1.4 → 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
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
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
+
10
20
  ## [4.1.4] - 2026-06-10
11
21
 
12
22
  ### Changed
package/README.md CHANGED
@@ -17,7 +17,7 @@ Platypus uses:
17
17
  npm install @makefully/platypus
18
18
  ```
19
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):
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
21
 
22
22
  | Package | Notes |
23
23
  |---------|--------|
@@ -30,7 +30,9 @@ The npm package ships a **Webpack 5 UMD build** in `lib/` (not `src/`). Your gam
30
30
 
31
31
  Optional: `box2d3-wasm`, `jsmediatags`, `poly-decomp` (see `optionalDependencies` in [package.json](package.json)).
32
32
 
33
- Entry point: `lib/platypus.js` (plus any worker chunks emitted alongside it in `lib/`).
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.
34
36
 
35
37
  Include the engine stylesheet in your game's CSS (canvas layout, captions, debug overlay):
36
38
 
@@ -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)};