Version 1.0.30
This update revamps the Menu GameObject to improve the way users interact with menus. It also fixes several critical bugs caused by webworker implementation in the rendering process.
Core Changes
- Replaced menu
optionsarray in config with anitemsarray. Which should be passed instances ofMenu.Item. - Added
Button,Slider, andTogglemenu items.
Additional Changes
- The
Animatebehavior can now automatically overwrite its parentGameObject'srenderableproperty. Simply set the behavior'sconfig.overwriteObjectRenderablevalue totrue. You can runAnimate.resetObjectRenderable()to undo this and restore normal function to the object'srenderableproperty. - Removed requirement for the current
sceneto be passed to behaviors. - Added
positionOnScreenproperty to theGameObjectclass, to quickly get its coordinates on the screen, adjusted for parallax and camera position. - Replaced
RendererdrawFramemethod withdrawFramesmethod. - Added/updated several examples.
- Improved web worker implementation in frame generation to fix issue caused by multi-layer web worker rendering.
- Fixed various other bugs.
- Updated documentation to reflect these changes.
Migration
- Replace
Menuconstructorconfig.optionsandconfig.callbackproperties with a singleconfig.itemsproperty. To replace the original functionality, you can pass constructedMenu.Buttons to thisitemsarray. EachButtoncan be configured with a label, and a callback that triggers what occurs when the option is selected.
Full Changelog: v1.0.29...v1.0.30