If the `dataFormat` field is absent, fall back on the older `assetType`
field. That can at least help us tell if something is a vector or bitmap
image, though it doesn't tell us which kind of bitmap.
Rather than assuming that the storage instance will be attached to a VM,
just return it. Callers may attach it to a `VM` or (in the case of
`import_sb2.js`) to a `Runtime`.
This new test verifies that clones and their associated threads are
cleaned up properly by the `delete this clone` block. The clones run two
stacks each: one which waits and then deletes the clone, and another
which includes a `forever` loop: this is to verify that the thread
running the `forever` loop is ended when the clone itself is deleted.
The project does this with two batches of clones to ensure there are no
problems with reusing array indices previously occupied by now-removed
threads or clones.
The `dispose()` method on `RenderedTarget` now:
- informs the runtime that it should end any threads corresponding the
target being disposed, and
- removes the clone from its sprite.
Reverts #551
Pinning to `^0.1.0.prerelease.0` is not equivalent to `latest`, since has the effect of not installing the latest version on `npm install`, you have to also do `npm update`. This hurts us ergonomically on `npm install`, and doesn't help us since we already are releasing breaking changes on `prerelease`.
When importing a project we know the file extension for each asset to be
loaded. This change provides that information to the storage system so
that we can load assets which don't use the default. For example, this
allows loading JPG-format backdrops.
In support of this change, there's a new function on `StringUtil` called
`splitFirst`, which splits a string on the first instance of a separator
character. This change includes unit tests for this new function.