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
options
array in config with anitems
array. Which should be passed instances ofMenu.Item
. - Added
Button
,Slider
, andToggle
menu items.
Additional Changes
- The
Animate
behavior can now automatically overwrite its parentGameObject
'srenderable
property. Simply set the behavior'sconfig.overwriteObjectRenderable
value totrue
. You can runAnimate.resetObjectRenderable()
to undo this and restore normal function to the object'srenderable
property. - Removed requirement for the current
scene
to be passed to behaviors. - Added
positionOnScreen
property to theGameObject
class, to quickly get its coordinates on the screen, adjusted for parallax and camera position. - Replaced
Renderer
drawFrame
method withdrawFrames
method. - 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
Menu
constructorconfig.options
andconfig.callback
properties with a singleconfig.items
property. To replace the original functionality, you can pass constructedMenu.Button
s to thisitems
array. EachButton
can 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