miniSphere 5.5.0
miniSphere 5.5.0 is the sixth release in the 5.0 series. This release adds support for TrueType fonts, npm module support in Cell, Node.js-like module type detection, depth buffers, a a few other enhancements. The asynchronous .fromFile() APIs have also been canonized; equivalent constructors such as new Texture('foo.png') should be considered deprecated and will be disabled in the next API level bump.
important note:
the .tar.gz tarball no longer includes ChakraCore binaries. to get these, first check if your distribution has a ChakraCore dev package available and install it if so; if not, then run sudo make deps from the miniSphere source directory to download the binaries from Microsoft and install them. you should only need to do this once.
What's New?
-
Texture.fromFile()and other.fromFile()functions have been canonized. Calling the equivalent constructors in a game targeting API 3 will produce a deprecation warning in the engine's terminal output; these constructors will be completely disabled in API 4 in order to pave the way for full cross-compatibility with Oozaru. -
miniSphere can now load TrueType fonts. To this end,
Font.fromFile()will accept an additional parameter specifying the size of the font. -
When importing modules from folders,
package.jsonhandling has been updated to be more consistent with Node.js behavior. In particular, the engine now honors the"type"field, enabling it to load ES Module packages. -
There is now experimental support for depth buffering when rendering to surfaces, including the backbuffer. The depth test can be customized by setting
Surface#depthOpto the desired value. See the API documentation for more. -
It is now possible to import or
require()modules installed usingnpmwithin Cellscript code. -
When importing Sphere Runtime modules, you can now refer to them as using a virtual path, e.g.
/lib/sphere-runtime.js. This will improve your game's Oozaru compatibility, since browsers don't yet support import maps. Keep in mind, however, that this feature is experimental and may be subject to breaking changes in future releases.
Full Changelog
- Adds support for loading TrueType fonts using the
Fontclass. - Adds support for Node.js-like automatic module type detection for
.jsfiles. - Adds support for importing npm modules in Cell code.
- Adds support for seeing the types of variables while debugging with SSj.
- Adds depth buffer support for surfaces.
- Adds a new API,
Surface#clear(), for clearing the entire contents of a surface including its depth buffer. - Adds support for Oozaru-compatible
/lib/foo.jsspecifier format for loading Sphere Runtime modules. - Canonizes the
.fromFile()APIs, as well as a few other functions, increasing the API level to 3. - Fixes a bug where
Key.Tildeisn't recognized on macOS. - Fixes a bug where trying to load something other than an RFN file using the font API can cause the engine to segfault.