Commit graph

54 commits

Author SHA1 Message Date
Richard Davey
8a9cfdf83b Added properties and methods to Scale Manager ready for integration 2018-08-07 16:25:45 +01:00
Richard Davey
73524df816 The Game boot event flow has changed slightly. The Game will now listen for a texturesready event, which is dispatched by the Texture Manager when the default textures have finished processing. Upon receiving this, the Game will emit the ready event, which all the other systems listen for and respond to. The difference is that the Renderer uses the texturesready event to ensure that it is the first thing to be activated, before any other system. 2018-08-01 13:18:28 +01:00
Richard Davey
7e73024d83 Added new noReturn destroy boolean for when you absolutely want to nuke the site from orbit. 2018-07-31 10:29:11 +01:00
Richard Davey
c65e3c7428 Added FB Instant Games Plugin to core (will prepare for moving to unique build once feature complete) 2018-07-27 08:33:51 +01:00
Richard Davey
c741469894 Added optional DOM Container parent and config values 2018-07-18 17:22:52 +01:00
Richard Davey
e6e33f5e21 Added Game.isOver and mouseover and mouseout events. 2018-06-11 12:32:25 +01:00
Richard Davey
56888fd5db Game will now auto-focus and prevent focus loss for the keyboard when clicking away and back again
* Game has a new property `hasFocus` which is a read-only boolean that lets you know if the window the game is embedded in (including in an iframe) currently has focus or not.
* Game.Config has a new property `autoFocus`, which is `true` by default, and will automatically call `window.focus()` when the game starts.
* Clicking on the canvas will automatically call `window.focus`. This means in games that use keyboard controls if you tab or click away from the game, then click back on it again, the keys will carry on working (where-as before they would remain unfocused)
2018-05-18 17:37:45 +01:00
Richard Davey
32818ee9cd jsdoc fixes 2018-05-17 15:10:23 +01:00
Richard Davey
6d1166a9c2 lint fixes 2018-05-15 14:28:27 +01:00
Richard Davey
350cb037b7 All systems now register themselves with the new PluginCache 2018-05-15 12:51:50 +01:00
Richard Davey
4741ee02b1 Updated docs and lint fixes 2018-05-11 18:55:44 +01:00
Richard Davey
ade37dd35e Game.step now uses more events and less direct calls. 2018-05-11 01:50:16 +01:00
Richard Davey
be330e609e Moved PluginManager to new location 2018-05-10 17:14:33 +01:00
Richard Davey
cc9d3160b1 Update type 2018-05-10 13:07:49 +01:00
Richard Davey
7a4b29872e Allow for custom canvas and context game config options. Game.context now set in WebGL mode. Allows WebGL2 contexts to be passed in. Fix #3653 2018-05-10 12:25:33 +01:00
Richard Davey
8f54932f93 Remove canvas from parent node. 2018-04-19 14:23:55 +01:00
Richard Davey
5ccac599a6 Updated docs and destroy properties 2018-04-16 17:14:12 +01:00
Richard Davey
b28a7276f4 Fixed Game.destroy 2018-04-16 17:02:32 +01:00
Evan Cobb
4270660c31 adding documentation to some files with only one [description] tag 2018-04-08 14:13:02 -05:00
Richard Davey
d838097763 Game.destroy now checks to see if the renderer exists before calling destroy on it. Fix #3498 2018-04-03 15:41:02 +01:00
Richard Davey
91008232ad jsdoc fixes 2018-03-29 13:12:07 +01:00
Richard Davey
747f09af86 jsdoc fixes 2018-03-28 15:04:09 +01:00
orblazer
0d58832e5f Fix types on Animations and Boot 2018-03-27 13:30:00 +02:00
Richard Davey
f500f5509b Added DeviceConf def 2018-03-21 14:40:30 +00:00
orblazer
37b6fc5862 Fix many multiple types 2018-03-20 15:58:02 +01:00
orblazer
33e49a4416 Add callbacks on Boot, Actions and Create 2018-03-19 22:37:47 +01:00
Richard Davey
cc0998660e Updated jsdocs 2018-03-18 13:43:37 +00:00
Rafael Barbosa Lopes
61fbbdacd9 Removed a few blank lines along the way. 2018-03-05 13:15:16 -03:00
Rafael Barbosa Lopes
20e3825e1f Pass game instance as boot callback arguments.
It may be useful to run some operations while the game is booting.
However, if a living instance of the game is necessary during this
process, only way possible is using a global variable at the moment.

This commit aims to amend that so whenever needed the game instance
reference is passed down and can be used inside the {pre,post}Boot
callbacks.
2018-03-05 13:09:12 -03:00
Richard Davey
252a76f416 The Headless render mode has been implemented. You can now set HEADLESS as the renderType in the Game Config and it will run a special game step that skips rendering. It will still create a Canvas element, as lots of internal systems (like input) rely on it, but it will not draw anything to it. Fix #3256 2018-02-28 21:57:32 +00:00
Richard Davey
cf01056913 Game.resize now resizes the SceneManager and emits an event. 2018-02-28 17:18:25 +00:00
Richard Davey
d4d2b21d6c Added Game.resize to help with resizing the game config, renderer and input in one 2018-02-28 14:26:24 +00:00
Richard Davey
8425629165 jsdoc fixes. 2018-02-12 23:51:47 +00:00
Richard Davey
e607d14171 Added jsdocs. 2018-02-12 23:13:16 +00:00
Richard Davey
2813ac8162 Moved PluginManager and merged configs into single root file for easier changing. 2018-02-12 23:03:48 +00:00
Richard Davey
d1f5f8a82b Added jsdocs 2018-02-12 16:01:21 +00:00
Richard Davey
fd9cf6c1f7 Added jsdocs 2018-02-12 15:18:31 +00:00
Richard Davey
40689d1e35 Updated jsdocs. 2018-02-07 15:27:21 +00:00
Richard Davey
a802914243 Added in destroy methods for all managers and invoked them from Game 2018-01-31 03:38:10 +00:00
Richard Davey
4ec30b8db8 Recoded the Data component
Added is back in as DataManager, which Game Objects can have an instance of. Plus exposed as DataManagerPlugin available to Scenes. Removed callback based system and implemented events and fixed the destroy method.
2018-01-30 00:55:27 +00:00
Richard Davey
cb2891db8a Added jsdocs to the Device inspector, removed out-dated properties and changed case of Device access 2018-01-25 17:03:35 +00:00
Richard Davey
897d3f2b70 Added jsdocs 2018-01-25 00:48:48 +00:00
Richard Davey
f676fc2bbd Recoded the SceneManage
The Scene Manager no longer tries to maintain an 'active' list and instead just iterates the scenes in order, skipping those that aren't awake. Scene array changing events like moveUp etc are queued if the list is being processed and the ScenePlugin has been vastly updated to take care of this. You can now happily move scenes around the list, block scene input, consume input events, switch scenes around and more.
2018-01-20 04:47:03 +00:00
Richard Davey
86fe054c63 Game boot sequence is now split-up to allow time for non-blocking, but time sensitive plugins (like the Texture Manager) to complete starting up before the main loop begins. Texture Manager now checks on state of default images before telling Game it is ready. 2018-01-18 14:01:29 +00:00
Richard Davey
e017a71f32 Game emits a boot event, which its managers listen for 2018-01-18 05:16:52 +00:00
Richard Davey
570cbde7da Renamed SceneManager. 2018-01-16 16:33:30 +00:00
Richard Davey
d6a1abcd2a Renamed to CacheManager. 2018-01-16 16:30:11 +00:00
Richard Davey
26fd3ee661 Renamed input manager files and refs. 2018-01-16 16:14:21 +00:00
Richard Davey
08f3e70b6d Merged Input Manager source and updated paths. 2018-01-16 16:00:37 +00:00
Richard Davey
c77c412183 Updated paths. 2018-01-16 13:04:35 +00:00