Richard Davey
3d0d2b4d94
The GameObject#setFrame
method can now accept a Frame
instance as its parameter, which will also automatically update the Texture the Game Object is using.
2022-09-26 17:15:34 +01:00
Richard Davey
25ab9f329d
TextureManager.parseFrame
is a new method that will return a Texture Frame instance from the given argument, which can be a string, array, object or Texture instance.
2022-09-26 15:28:41 +01:00
Richard Davey
5320402a07
The endFrame
and startFrame
properties of the SpriteSheet
parser wouldn't correctly apply themselves, the Texture would still end up with all of the frames. It will now start at the given startFrame
so that is frame zero and end at endFrame
, regardless how many other frames are in the sheet.
2022-09-24 21:35:58 +01:00
Richard Davey
ab04cb6c05
Lots of LightPipeline improvements
...
* The Light Pipeline no longer creates up to `maxLights` copies of the Light shader on boot. Previously it would then pick which shader to use, based on the number of visible lights in the Scene. Now, the number of lights is passed to the shader and branches accordingly. This means rather than compiling _n_ shaders on boot, it now only ever needs to create one.
* You can now have no lights in a Scene, but the Scene will still be impacted by the ambient light. Previously, you always needed at least 1 light to trigger ambient light (thanks jstnldrs)
* The `Light.frag` shader now uses a new `uLightCount` uniform to know when to stop iterating through the max lights.
* The `LightPipeline.LIGHT_COUNT` constant has been removed as it's not used internally.
* The `LightPipeline` previous created a global level temporary vec2 for calculations. This is now part of the class as the new `tempVec2` property.
2022-09-23 00:42:04 +01:00
Richard Davey
a135271f19
Use new uLightCount uniform
2022-09-23 00:41:47 +01:00
Richard Davey
b789742636
Update Utils.js
2022-09-22 14:55:29 +01:00
Richard Davey
9d43583a63
This shader is just better. More crappy iOS testing needed though.
2022-09-21 23:13:04 +01:00
Richard Davey
023343c789
All events have a type of string. Fix #6136
2022-09-21 22:01:03 +01:00
Richard Davey
10fe5db0a6
Fixed jsdocs
...
Fix #6195
2022-09-21 21:10:52 +01:00
Richard Davey
71703ff19c
GameConfig.stableSort
is a new optional property that will control if the internal depth sorting routine uses our own StableSort function, or the built-in browser Array.sort one. Only modern browsers have a _stable_ Array.sort implementation, which Phaser requires. Older ones need to use our function instead. Set to 1 to use the legacy version, 0 to use the ES2019 version or -1 to have Phaser try and detect which is best for the browser
...
Ref #6217
2022-09-21 17:52:57 +01:00
Richard Davey
cf397b7c13
Added missing safariVersion and new es2019 test
2022-09-21 17:35:47 +01:00
Richard Davey
7c9d6a180b
Testing native stable sort
2022-09-21 16:34:08 +01:00
Richard Davey
17415902ab
The Texture.destroy
method will only destroy sources, dataSources and frames if they exist, protecting against previously destroyed instances.
2022-09-21 14:06:58 +01:00
Richard Davey
4dcf3b1622
Getting ready for Beta 11
2022-09-20 23:23:26 +01:00
Richard Davey
6fe41a4845
Fix path
2022-09-20 22:24:27 +01:00
Richard Davey
06b1adca14
Lint fix
2022-09-20 22:23:09 +01:00
Richard Davey
6c70869ea4
Lots of jsdoc / TS fixes
2022-09-20 22:17:21 +01:00
Richard Davey
c5610630a1
Lots of jsdoc fixes and Tween State updates
2022-09-20 18:44:44 +01:00
Richard Davey
2834dba8d0
jsdoc fixes
2022-09-20 17:36:31 +01:00
Richard Davey
a4d7c6d680
Fixed destroy
2022-09-20 16:39:01 +01:00
Richard Davey
ded399e727
Call addFrame
2022-09-20 13:09:01 +01:00
Richard Davey
e42c814af8
Corrected jsdocs
2022-09-20 13:08:53 +01:00
Richard Davey
009ad199bf
Updated to use the new BaseTweenData to avoid duplicate props and methods
2022-09-20 12:40:28 +01:00
Richard Davey
e2389927ea
Create BaseTweenData.js
2022-09-20 12:40:15 +01:00
Richard Davey
6e0566ced4
Fixed target getting bug
2022-09-19 23:24:23 +01:00
Richard Davey
c6338aab5f
Merge branch 'master' of https://github.com/photonstorm/phaser
2022-09-19 22:52:44 +01:00
Richard Davey
09b7901380
Supports making TweenFrameData
2022-09-19 22:52:39 +01:00
Richard Davey
9b70d1c998
Added addFrameData
method
2022-09-19 22:52:26 +01:00
Richard Davey
ff8d86c516
Force yoyo for repeat (or it all looks wrong)
2022-09-19 22:52:15 +01:00
samme
cfb92c6957
Give TilemapLayer origin (0, 0)
2022-09-19 08:33:33 -07:00
Richard Davey
ef5f40c1b8
Support TweenFrameData
2022-09-16 18:53:47 +01:00
Richard Davey
4e40a6941a
Create TweenFrameData.js
2022-09-16 18:53:35 +01:00
Richard Davey
f7583926cc
t1 and t2 don't need to be properties
2022-09-16 18:53:30 +01:00
Richard Davey
d42122d05b
Added completeAfterLoop method
2022-09-16 17:50:18 +01:00
Richard Davey
618891bcda
The TextureManager.addSpriteSheet
method will now allow you to pass in a Phaser Texture as the 2nd parameter. This allows you to add sprite sheet data to textures that came from external sources, such as SVG files or canvas elements.
2022-09-15 22:30:59 +01:00
Richard Davey
0b14cc4898
Update BaseTween.js
2022-09-14 23:22:34 +01:00
Richard Davey
20e8c183c2
Fixed
2022-09-14 22:34:08 +01:00
Richard Davey
fc231a23b2
Fixed path
2022-09-14 14:16:44 +01:00
Richard Davey
de8614356d
All method and property jsdocs done
2022-09-13 23:34:19 +01:00
Richard Davey
b419f79b6a
Added remove method
2022-09-13 23:34:09 +01:00
Richard Davey
673a7251d4
Make the creation methods a lot more flexible
2022-09-13 22:54:18 +01:00
Richard Davey
94b3e19c75
Remove un-used method
2022-09-13 22:54:02 +01:00
Richard Davey
3429946b13
Update TweenChainBuilder.js
2022-09-13 22:53:51 +01:00
Richard Davey
c05d8d6c6c
All method and property docs done. Fixed init, restart and others.
2022-09-13 22:53:45 +01:00
Richard Davey
b8a3cf9232
Extends BaseTween and start delay and lots of other fixes
2022-09-13 18:47:12 +01:00
Richard Davey
a2b349d745
Extends BaseTween
2022-09-13 18:46:57 +01:00
Richard Davey
c6250fe62c
Update TweenBuilderConfig.js
2022-09-13 18:46:46 +01:00
Richard Davey
20ff1c99ec
add
can now take Tween instances and chain
uses the new TweenChainBuilder
2022-09-13 18:46:41 +01:00
Richard Davey
de53735e93
Added START_DELAY const
2022-09-13 18:45:20 +01:00
Richard Davey
2c5cdf7023
Removed non-BaseTween methods
2022-09-13 18:45:11 +01:00