scratch-vm will not throw a EventEmitter memory leak warning.
Reason:
the max number of clones is 300, plus 1 for itself.
Then the shared skin will exceed it's limit.
Changing the number from 300 to 301 fixes this issue.
Changes:
- Removed the `createSkinFromURL` method.
- Removed `skin` property handling from `updateDrawableProperties`.
- Removed the URL-to-skin mapping cache.
- Removed `RenderConstants` items related to choosing a default skin.
- Removed `xhr` package dependency.
- `Drawable` now starts with a `null` skin instead of a default skin.
- `DrawThese` now skips any item with a `null` skin.
Fix any broken JSDoc syntax. Unfortunately there is no way to document tuples like `{[int, int]}` for a `[width, height]` array. We could possibly fix this and make the code more readable with `{width: number, height: number}` instead of tuples.
Remove single `@fileoverview` from Rectangle.js, since it was the only file with one and was weird to have that one module show up on the docs home page.
Add a `docs` script to `package.json`, run it from `npm test`, so invalid docs will cause tests to fail (eventually we may want to start using eslint-plugin-jsdoc to catch these errors with the linter alone).
- `Drawable` now removes its `Skin` on `dispose`, disconnecting events.
- Creating a new `Drawable` doesn't always create a new `Skin` any more:
now it can share an existing skin.
- Don't throw when asked to update the properties of a `Drawable` that
has already been destroyed. This seems like a VM bug but was causing
overwhelming output in the browser for some projects.
There is now a `Skin` base class along with `SVGSkin` and `BitmapSkin`
classes for vector and bitmap skin support. Loading a skin by URL is in
the process of being deprecated. In the future skin data should be
downloaded outside the renderer and supplied through new `create*Skin`
API calls.