Richard Davey
b7d520b8cc
Merging in ScaleManager
2018-10-08 15:23:10 +01:00
Richard Davey
143957d24a
You can now set the maxLights
value in the Game Config, which controls the total number of lights the Light2D shader can render in a single pass. The default is 10. Be careful about pushing this too far. More lights = less performance. Close #4081
2018-10-02 11:09:58 +01:00
samme
ced7c82c42
Fix null game.context after WebGLRenderer init
2018-09-30 12:45:26 -07:00
samme
eaec923245
GameConfig docs
2018-09-27 15:37:54 -07:00
Richard Davey
82ddc031c7
Added new batch of jsdocs
2018-09-27 15:29:32 +01:00
Richard Davey
89b9f42f3e
Adding jsdocs
2018-09-24 23:20:43 +01:00
Richard Davey
41956c4625
Added FB plugin conditional
2018-09-20 14:14:29 +01:00
Richard Davey
22e6c15de9
Display use of FB plugin
2018-09-20 14:14:09 +01:00
Richard Davey
d6ff9cfa5a
FB Plugin moved to its own build file
2018-09-20 11:50:09 +01:00
Richard Davey
c36a3b4057
Hopefully fix annoying TS error
2018-09-20 11:49:52 +01:00
Richard Davey
5fe6dbbe0c
Added more jsdocs
2018-09-13 08:09:44 +01:00
Richard Davey
252ebe74fb
TS defs error
2018-09-11 13:51:09 +01:00
Richard Davey
ef558fea3c
Type definition fixes
2018-09-07 17:19:19 +01:00
Richard Davey
a103b0e6a6
Fixed FB Plugin paths to avoid build errors if plugin is enabled.
2018-09-04 12:35:23 +01:00
Richard Davey
b317dc3d30
Set autoResize to true for now. Fix #3928
2018-08-31 18:19:25 +01:00
Richard Davey
7765496b19
Moved FB plugin behind build flag
2018-08-23 18:10:20 +01:00
Richard Davey
144cfaff8f
Previously the Input Manager would create a Touch handler unless the Game Config had input.touch
set to false
(the default was true). If no such property is set, it no longer defaults to true
and instead is set to whatever Device.input.touch
returns. On non-touchscreen desktops this means it will now only create one single Pointer, rather than two.
2018-08-22 17:01:21 +01:00
Eirik S Korsnes
fe748e9dc7
- wrote dot-notated config properties as seperate typedefs
...
- add some missing properties
2018-08-12 12:19:48 +02:00
Christian Freitag
1909d73a0e
- Added initial type definitions for plugins property within game object
2018-08-07 21:38:28 +02:00
Richard Davey
8a9cfdf83b
Added properties and methods to Scale Manager ready for integration
2018-08-07 16:25:45 +01:00
Richard Davey
51163e6d4e
If you set window.FORCE_WEBGL
or window.FORCE_CANVAS
in the window in which the Phaser game is loaded it will over-ride the renderer type setting in your game config, and force either WebGL or Canvas. This is handy for quickly testing the differences between renderers without having to do a new build each time.
2018-08-02 15:58:36 +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
a29aba0a11
Merge pull request #3859 from samme/feature/plugin-data
...
Pass `data` value to global plugins
2018-07-31 11:39:36 +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
samme
4c23359fd8
Pass data
value to global plugins
2018-07-23 10:51:00 -07:00
Richard Davey
46af5cb24e
Fixed style join
2018-07-19 16:22:51 +01:00
Richard Davey
0ac877be0b
Removed z-index and tidied up style
2018-07-19 13:19:14 +01:00
Richard Davey
ceb466748a
Updated DOM Element to fix transforms
2018-07-19 00:22:38 +01:00
Richard Davey
c741469894
Added optional DOM Container parent and config values
2018-07-18 17:22:52 +01:00
Richard Davey
e0fdc33928
SM mock
2018-07-17 22:44:21 +01:00
Richard Davey
6ddd1644f2
Canvas now uses game config resolution
2018-07-17 22:43:52 +01:00
Richard Davey
fe61cfe2d1
You can now set the WebGL batch size in the Game Config via the property batchSize
. The default is 2000 before the batch will flush, which is a happy average between desktop and mobile. If targeting desktop specifically, you may wish to increase this value to reduce draw calls.
2018-07-02 12:33:46 +01:00
Richard Davey
8c312090da
Solidified use of pixelArt mode
2018-06-27 15:27:16 +01:00
Richard Davey
7a23378015
Unified use of roundPixels, antialias and pixelArt modes
2018-06-27 15:15:00 +01:00
Richard Davey
15b544fc46
jsdoc fixes
2018-06-13 08:37:40 +01:00
Richard Davey
e6e33f5e21
Added Game.isOver and mouseover and mouseout events.
2018-06-11 12:32:25 +01:00
Richard Davey
fa2e274f8d
New gamepad target config property
2018-06-06 23:03:27 +01:00
Richard Davey
a0e4a07920
In TimeStep.step
the rawDelta
and delta
values are checked to make sure they are non-negative, which can happen in Chrome when the delta is reset and out of sync with the value passed to Request Animation Frame. Fix #3088
2018-06-04 22:29:58 +01:00
Richard Davey
521ea10db9
Moved active pointers total to game config
2018-05-30 00:33:01 +01:00
Richard Davey
cad3271164
lint fix
2018-05-18 17:43:12 +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
4f2ef3f3ca
Fixed overwrite and split plugin types.
2018-05-11 16:01:11 +01:00
Richard Davey
e431cc33f9
Moved plugins file to DefaultPlugins and changed the namespace
2018-05-11 14:06:13 +01:00
Richard Davey
0a46c13f4c
Working through new plugin structure
2018-05-11 01:50:37 +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
8ca79cdda4
Working on the plugin config setup
2018-05-10 17:15:25 +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
d19a1f9a4f
Fixed config object
2018-05-10 12:42:08 +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
Basile Desloges
fe03667ee5
Update JSDocs
...
- Update GameConfig to explicit the `render` subobject
- GameConfig#render.powerPreference is documented as string instead of boolean
- Add comments to the members of the `Config` object
2018-05-08 16:28:36 +02:00
Richard Davey
8b574f271f
Loader.enableParallel has been removed. If you don't want parallel file loads then set the maximum parallel limit to 1. Related to this, the Game Config loaderEnableParallel
property has been removed.
2018-05-04 17:13:27 +01:00
Richard Davey
8c51107718
Max Parallel Files limit raised from 4 to 32
2018-05-02 17:23:51 +01:00
Richard Davey
6299019838
Updated to use typeof DefinePlugin check.
2018-04-20 00:23:24 +01:00
Richard Davey
8f54932f93
Remove canvas from parent node.
2018-04-19 14:23:55 +01:00
Richard Davey
32ce8d7947
jsdoc fixes and removed un-used ResetKey file.
2018-04-19 12:30:38 +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
Richard Davey
18585de81d
Lots of jsdoc fixes
2018-04-16 14:43:24 +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
b3a20d475a
Removed null and updated log
2018-04-07 16:18:48 +01:00
Mark
e54e30ee0b
Added missing physics property to GameConfig
...
The typescript typings for GameConfig are missing the physics property, so I added it.
2018-04-05 17:26:08 -04: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
Dirk
d32af81411
UPDATED: JSdoc, changed properties marked with [?...] to just be [...]
2018-04-02 21:03:05 +10: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
Richard Davey
8e7944a1b4
Updated EventEmitter reference
2018-03-21 14:09:58 +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
orblazer
45158c2fbd
Update JSDoc on Animations and Boot
2018-03-19 18:13:33 +01:00
Richard Davey
cc0998660e
Updated jsdocs
2018-03-18 13:43:37 +00:00
Richard Davey
fbec8f978c
You can now specify all of the renderer config options within a render
object in the config. If no render
object is found, it will scan the config object directly for the properties.
2018-03-16 13:22:52 +00:00
Richard Davey
1304e0066c
Correct config property
2018-03-16 13:10:41 +00:00
Richard Davey
66c40dda69
eslint fix
2018-03-16 12:30:39 +00:00
Richard Davey
dd4e00007f
Added antialias config value
2018-03-16 00:52:21 +00:00
Felipe Alfonso
2238a132e2
Context Creationg Config attributes are default to Khronos spec for webgl context creation
2018-03-15 19:55:52 -03:00
Richard Davey
36f5ca47a9
Added new config values
...
* Game.Config.preserveDrawingBuffer is now passed to the WebGL Renderer (default `false`).
* Game.Config.failIfMajorPerformanceCaveat is now passed to the WebGL Renderer (default `false`).
* Game.Config.powerPreference is now passed to the WebGL Renderer (default `default`).
* Game.Config.pixelArt is now passed to the WebGL Renderer as the antialias context property (default `false`).
2018-03-15 21:15:12 +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
3a1a9ea700
If you set transparent
in the Game Config but didn't provide a backgroundColor
then it would render as black. It will now be properly transparent. If you do provide a color value then it must include an alpha component.
2018-02-28 21:15:18 +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
c9d3c1a279
Added missing autoResize property to Game.Config
2018-02-28 17:17:37 +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
0144badd94
Added roundPixels
boolean to config
2018-02-28 14:26:02 +00:00
Richard Davey
26f0578261
jsdoc fixes
2018-02-22 01:07:30 +00:00
Richard Davey
5a7a6c20a9
Removed checksum.
2018-02-13 03:23:29 +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