Richard Davey
e2a0a4a5a7
Start of getBounds
2018-04-11 13:17:35 +01:00
Richard Davey
2c37ce106d
Added default TMs
2018-04-11 13:17:26 +01:00
Richard Davey
e135f132d9
Added missing properties needed for input to work
2018-04-11 11:25:11 +01:00
Sean Bohan
b6480a0db7
Fix animationcomplete event name typo
2018-04-11 04:51:34 +08:00
Felipe Alfonso
14a651e509
Fixed inverted rotation on TransformMatrix
2018-04-10 14:13:23 -03:00
Richard Davey
1fa909081c
eslint fixes
2018-04-10 17:35:14 +01:00
Felipe Alfonso
1eaee870c7
Set rotation of container to be negative at render time. Removed unnecessary call to multiply on TransformMatrix rotate
2018-04-10 13:25:13 -03:00
Richard Davey
be7b52b1b9
No longer extends List, but implements its own methods directly.
2018-04-10 15:21:46 +01:00
Richard Davey
68ef6f8630
Removed parentContainer reference
2018-04-10 15:21:04 +01:00
Richard Davey
bf81a7dd06
TransformMatrix.destroy is a new method that will clear out the array and object used by a Matrix internally.
2018-04-10 15:20:50 +01:00
Richard Davey
cdfe2e0ea2
Fixed references
2018-04-10 04:13:38 +01:00
Richard Davey
3c5d3db267
Testing exclusive setting
2018-04-09 17:33:55 +01:00
Richard Davey
ca2a575726
Added jsdocs
2018-04-09 16:46:03 +01:00
Richard Davey
12b6b26838
Merge branch 'master' of https://github.com/photonstorm/phaser
2018-04-09 16:43:37 +01:00
Richard Davey
5c69bd054e
Added property getters
2018-04-09 16:42:33 +01:00
Felipe Alfonso
9d39bd7b45
Container alpha added
2018-04-09 12:32:08 -03:00
Richard Davey
381963c014
Removed localToWorld (no longer needed)
2018-04-09 16:01:16 +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
70bedbdce0
Check if animation exists
2018-04-08 17:01:43 +01:00
Richard Davey
cc1dba4ba9
Merge pull request #3511 from hexus/fix/graphics-generate-texture
...
Fixed renderCanvas() call in Graphics.generateTexture()
2018-04-07 16:09:32 +01:00
Richard Davey
d1788d8a4c
Updated jsdocs
2018-04-07 15:58:08 +01:00
Richard Davey
777325c046
Removed callbacks, added events and added new stop methods
2018-04-07 12:36:35 +01:00
Richard Davey
e0dc28e4ba
Fixed lint errors and added jsdocs
2018-04-06 11:15:15 +01:00
Chris Andrew
f70f92b038
Fixed explicit check for undefined GraphicsCanvasRenderer's parentMatrix, which meant null could not be passed as an argument.
2018-04-05 21:07:45 +01:00
Chris Andrew
9293891c82
Fixed renderCanvas() call in Graphics.generateTexture().
...
Introduced by altering the signature of the Canvas renderers (c232642a
).
2018-04-05 19:08:54 +01:00
Felipe Alfonso
0e401bb6fe
Fixed order on getWorldTransformMatrix
2018-04-05 14:11:48 -03:00
Richard Davey
eb0f3c3ec1
Added missing Container components
2018-04-05 16:53:40 +01:00
Richard Davey
da6db3f29e
Added transform methods
2018-04-05 16:50:37 +01:00
Richard Davey
c3ba80c4e5
Added jsdocs
2018-04-05 16:50:21 +01:00
Richard Davey
7e64b4d624
Automatically remove from display list
2018-04-05 15:28:34 +01:00
Richard Davey
fb04cd4869
Containers are now exclusive
2018-04-05 14:59:57 +01:00
Richard Davey
183896f8ff
Added parentContainer
property
2018-04-05 14:56:43 +01:00
Richard Davey
13df64c01f
Extends List
2018-04-05 13:52:42 +01:00
Richard Davey
6ccb0f2dc4
Accepts optional children array
2018-04-05 13:52:24 +01:00
Richard Davey
e0f95bb3fa
Now using proper array
2018-04-05 13:52:11 +01:00
Richard Davey
ba4693d140
jsdoc fix
2018-04-05 13:51:37 +01:00
Richard Davey
85671883e8
Tidying up
2018-04-05 11:25:22 +01:00
Richard Davey
c1517d60ed
eslint fixes
2018-04-05 09:28:04 +01:00
Richard Davey
054ceafae0
Added jsdocs to Container and made add
support arrays
2018-04-05 09:23:29 +01:00
Richard Davey
4f6239dadb
jsdoc and eslint fixes
2018-04-05 09:02:36 +01:00
Felipe Alfonso
e02efcfeb3
Merge branch 'master' into containers
2018-04-04 14:06:24 -03:00
Felipe Alfonso
c232642a52
Parent matrix is applied to canvas context on each draw function
2018-04-04 14:05:59 -03:00
Richard Davey
9f9c7dea61
Added setProgress
2018-04-04 17:19:02 +01:00
Felipe Alfonso
eafb488e25
Merge branch 'master' into containers
2018-04-04 13:15:42 -03:00
Felipe Alfonso
96b8db4685
Added parentMatrix to all canvas rendering functions
2018-04-04 13:14:55 -03:00
Felipe Alfonso
7b275e2c62
DrawImage works with parent matrix
2018-04-04 12:31:45 -03:00
Richard Davey
fa2320238e
More jsdocs fixes and staggerPlay fix
2018-04-04 16:27:33 +01:00
Felipe Alfonso
5026566084
Container Canvas Rendering function
2018-04-04 12:22:10 -03:00
Richard Davey
e734e7ef6b
Extensive Animation API changes to use milliseconds, improve docs and access to properties
2018-04-04 16:13:45 +01:00
Felipe Alfonso
bea7ca36ad
Merge branch 'master' into containers
...
# Conflicts:
# src/renderer/webgl/pipelines/TextureTintPipeline.js
2018-04-04 12:07:41 -03:00
Richard Davey
552cfe3c5e
Animation Component overhaul
2018-04-04 14:44:09 +01:00
Richard Davey
c251eceaf6
jsdoc fixes
2018-04-04 14:43:53 +01:00
Richard Davey
51d29b818d
Animation.updateFrame will now call setSizeToFrame
on the Game Object, which will adjust the Game Objects width
and height
properties to match the frame size. Fix #3473
2018-04-04 13:14:41 +01:00
Richard Davey
96507beda1
Added setLetterSpacing
method and exported value in toJSON
( #3480 )
2018-04-04 11:34:39 +01:00
Richard Davey
af12eaac77
Merge branch 'master' into FR3472
2018-04-04 11:28:58 +01:00
Richard Davey
dac030dd3e
Graphics.slice allows you to easily draw a Pacman, or slice of pie shape to a Graphics object.
2018-04-04 11:13:19 +01:00
Felipe Alfonso
198180fec6
Fixed issue https://github.com/photonstorm/phaser/issues/3475
2018-04-03 12:03:02 -03:00
Travis O'Neal
2ec70cac48
Added a letterSpacing property to BitmapText
2018-04-02 09:42:24 -04:00
Travis O'Neal
43ea5f239c
Updated @since to the appropriate version
2018-03-30 14:07:28 -04:00
Travis O'Neal
d6265a59dd
Initial Commit
2018-03-30 13:46:44 -04:00
Felipe Alfonso
749a69c387
Merge branch 'master' into containers
2018-03-30 11:50:54 -03:00
Antriel
630732f9fc
jsdoc generics fix
2018-03-30 14:43:58 +02:00
Felipe Alfonso
4f8ddd73bb
Merge branch 'master' into containers
2018-03-29 12:35:40 -03:00
Felipe Alfonso
0186e122a6
If a container is nested the parentContainer property is setted
2018-03-29 12:34:23 -03:00
Richard Davey
37589ffe00
jsdoc updates
2018-03-29 15:12:32 +01:00
Richard Davey
cef9050627
jsdoc fixes
2018-03-29 14:53:06 +01:00
Richard Davey
e7191e9d8e
jsdoc updates
2018-03-29 13:48:14 +01:00
Richard Davey
91008232ad
jsdoc fixes
2018-03-29 13:12:07 +01:00
Richard Davey
562344fed0
The ComputedSize Component now has setSize
and setDisplaySize
methods. This component is used for Game Objects that have a non-texture based size.
2018-03-29 12:55:28 +01:00
Richard Davey
fba8183d94
Fixed docs order
2018-03-29 12:54:33 +01:00
Richard Davey
aec64c635e
Removed floats
2018-03-29 12:54:12 +01:00
Felipe Alfonso
e0f678d1ff
Merge branch 'master' into containers
2018-03-28 20:49:00 -03:00
Felipe Alfonso
88ed9bd3b8
transform to container space
2018-03-28 20:47:57 -03:00
Richard Davey
747f09af86
jsdoc fixes
2018-03-28 15:04:09 +01:00
Richard Davey
15c4334dc7
jsdoc fixes
2018-03-28 14:11:46 +01:00
Richard Davey
f10efda8f0
font
is non-optional, so removed coordinates as optional
2018-03-28 12:05:03 +01:00
Felipe Alfonso
b23ad3b130
Fixed issue with creating containers and graphics with scene.make.
2018-03-27 17:32:33 -03:00
Felipe Alfonso
d544701495
parentMatrix added to individual game object render function
2018-03-27 14:49:09 -03:00
orblazer
ae0b3b841b
Fix types on GameObjects
2018-03-27 14:52:58 +02:00
Felipe Alfonso
9a2ec4225a
Merge branch 'master' into containers
2018-03-26 21:17:07 -03:00
Richard Davey
1f44366bc7
Merge branch 'master' of https://github.com/photonstorm/phaser
2018-03-27 01:09:34 +01:00
Richard Davey
933e193ccf
Group.destroy has a new optional argument destroyChildren
which will automatically call destroy
on all children of a Group if set to true (the default is false, hence it doesn't change the public API). Fix #3246
2018-03-27 01:09:30 +01:00
Richard Davey
25cbb320a5
Merge pull request #3453 from orblazer/genericTypes
...
Change structs for generic types
2018-03-27 00:37:34 +01:00
Felipe Alfonso
f6eef58608
Merge branch 'master' into containers
2018-03-26 19:57:11 -03:00
Felipe Alfonso
eac2b8338e
parentTransformMatrix argument added to texture pipeline
2018-03-26 17:23:18 -03:00
Samid\Sami
20b9930335
Fix calling non existing start() instead of startFollow() in setPath(config)
2018-03-25 10:44:24 +02:00
Felipe Alfonso
5bcd12fcb7
Base container rendering + sprite batching with parent matrix
2018-03-23 14:15:52 -03:00
orblazer
f42f1bf132
Change structs for generic types
2018-03-23 16:54:12 +01:00
Richard Davey
2cd7da0126
The RenderTexture now uses the ComputedSize component instead of Size (which requires a frame), allowing calls to getBounds to work. Fix #3451
2018-03-23 10:00:25 +00:00
Richard Davey
04b5985724
Merge pull request #3445 from delftswa2018/3385-Rendertexture-alpha-not-changing-in-WEBGL-mode
...
Fix changing alpha in RenderTextureWebGLRenderer
2018-03-22 14:52:14 +00:00
Gerard van Alphen
78c1e86021
Fix changing alpha in RenderTextureWebGLRenderer
2018-03-22 14:58:41 +01:00
Richard Davey
5816b863fa
Removed TransformNode so it doesn't break the 3.3 CI build
2018-03-22 13:19:52 +00:00
Richard Davey
0ef92e1172
Merge branch 'pr/3439'
2018-03-21 16:06:56 +00:00
Richard Davey
8e7944a1b4
Updated EventEmitter reference
2018-03-21 14:09:58 +00:00
Richard Davey
3f0ee709f0
Renamed methods to avoid confliction with Animation component
2018-03-21 14:09:30 +00:00
orblazer
439df07fd5
Fix "object" type on GameObjects and Input
2018-03-21 12:19:31 +01:00
Richard Davey
db613c793a
Merge branch 'master' of https://github.com/photonstorm/phaser
2018-03-21 03:17:00 +00:00
Richard Davey
786d181a91
Sorted the components
2018-03-21 03:16:49 +00:00
orblazer
4f7f2b8981
Fix RemoveCallback call on Group
2018-03-21 00:32:13 +01:00
orblazer
5a518f2e5f
Fix "object" types on Camera and GameObjecs
2018-03-20 23:28:26 +01:00
Richard Davey
d329724ae5
Added the ComputedSize component to the Text Game Object, which allows Text.getBounds, and related methods, to work again instead of returning NaN.
2018-03-20 19:00:48 +00:00
Richard Davey
28206e872f
Merge pull request #3433 from orblazer/fix-types
...
Fix "any" types
2018-03-20 16:28:43 +00:00
orblazer
7fba122321
Fix "any" types
2018-03-20 17:15:49 +01:00
Richard Davey
31bf979eb2
Merge pull request #3432 from orblazer/fix-types
...
Fix nullable and multiple types
2018-03-20 15:31:17 +00:00
Felipe Alfonso
701d43b3c3
TransformNode Implemented for nested transformations
2018-03-20 12:15:14 -03:00
orblazer
87633fdfad
Fix multiple types on GameObjects
2018-03-20 15:56:31 +01:00
orblazer
4cff464555
Fix nullable types
2018-03-20 15:36:03 +01:00
Richard Davey
b6f2c80ae6
Groups will now listen for a destroy
event from any Game Object added to them, and if received will automatically remove that GameObject from the Group. Fix #3418
2018-03-20 01:08:45 +00:00
Richard Davey
cb5b12e9d3
The GameObject destroy
event is now emitted at the start of the destroy process, before things like the body or input managers have been removed, so you're able to use the event handler to extract any information you require from the GameObject before it's actually disposed of. Previously, the event was dispatched at the very end of the process.
2018-03-20 01:05:53 +00:00
Richard Davey
3591edcb73
Merge pull request #3417 from rexrainbow/master
...
Bug fix: font might not sync to context
2018-03-20 00:34:51 +00:00
orblazer
b4a30b8e43
Add callbacks on GameObjects
2018-03-19 22:27:16 +01:00
orblazer
bf630f7d57
Fix types in JSDocs
2018-03-19 19:49:14 +01:00
Richard Davey
620bcc6ae5
jsdoc fixes and additions
2018-03-19 13:45:00 +00:00
orblazer
87d6cdaff8
Update JSDoc on GameObjects
2018-03-19 13:50:32 +01:00
orblazer
90def456f2
Update JSDoc on GameObjects
2018-03-19 12:54:31 +01:00
Rex
4125e74550
Bug fix: font might not sync to context
...
Sync font before runWordWrap
2018-03-18 22:53:02 +08:00
Richard Davey
cc0998660e
Updated jsdocs
2018-03-18 13:43:37 +00:00
Richard Davey
a8886a60d3
Actually round the value.
2018-03-17 17:03:30 +00:00
Richard Davey
05a4385cd7
jsdoc fixes
2018-03-16 17:29:39 +00:00
Richard Davey
24eec0ccd0
Merge pull request #3365 from samme/feature/tilesprite-settileposition
...
Add Phaser.GameObjects.TileSprite#setTilePosition
2018-03-16 12:55:03 +00:00
Richard Davey
19ea528c99
Merge pull request #3392 from samme/feature/group-create-active
...
Add `active` to Group create methods
2018-03-16 12:51:21 +00:00
Richard Davey
1fea31bac8
Fixed package names
2018-03-16 00:46:39 +00:00
Richard Davey
19a17bcf63
Updating docs
2018-03-15 17:27:30 +00:00
samme
731b006ec3
Add active
to Group create methods
...
- Adds `active=true` argument to Group#create
- Adds `active=true` config value to Group#createMultiple etc.
2018-03-14 12:22:08 -07:00
Richard Davey
1d23aad976
TextStyle has two new properties: baselineX
and baselineY
which allow you to customize the 'magic' value used in calculating the text metrics.
2018-03-13 13:21:51 +00:00
Richard Davey
247e8b9337
Text.setFixedSize was incorrectly setting the text
property instead of the parent
property. Fix #3375
2018-03-12 16:34:21 +00:00
Richard Davey
1ebf639de3
Merge branch 'master' of https://github.com/photonstorm/phaser
2018-03-12 16:30:16 +00:00
Felipe Alfonso
be81ddfd51
Fixed issue on RenderTexture canvas clear. The clearRect was affected by previous transformations
2018-03-12 13:30:05 -03:00
Richard Davey
267e8b4b84
Merge branch 'master' of https://github.com/photonstorm/phaser
2018-03-12 16:27:49 +00:00
Felipe Alfonso
9585a1c78b
Fixed issue of render texture only rendering the first frame. It should've read the cut properties
2018-03-12 13:27:32 -03:00
Felipe Alfonso
e0a4577938
Fixed issue of TileSprite rendering pattern based on the power of 2 dimension on canvas.
2018-03-12 13:18:38 -03:00
Richard Davey
70d9c7d728
Always return the parent Text object, no matter the flow
2018-03-12 16:13:42 +00:00
Richard Davey
e2ad743b92
_this fix
2018-03-12 14:52:35 +00:00
Richard Davey
0368473b95
The SetFrame method now has two optional arguments: updateSize
and updateOrigin
(both true by default) which will update the size and origin of the Game Object respectively. Fix #3339
2018-03-12 14:45:18 +00:00
samme
f4e843038c
Expect v3.3.0
2018-03-12 07:23:20 -07:00
Richard Davey
edf1aa7cc1
The onContextRestored
callback won't be defined any more unless the WebGL Renderer is in use in the following objects: BitmapMask, Static Tilemap, TileSprite and Text. This should allow those objects to now work in HEADLESS mode. Fix #3368
2018-03-12 13:37:13 +00:00
samme
aebce8a695
Add Phaser.GameObjects.TileSprite#setTilePosition
...
Both arguments are optional.
2018-03-10 11:41:22 -08:00
Richard Davey
935a89342d
Calling setText
on a BitmapText object will now recalculate its display origin values. Fix #3350
2018-03-09 17:08:12 +00:00
Richard Davey
87f2d0f831
Merge pull request #3335 from iamchristopher/fix-group-clear-from-scene
...
Fixed Group doesn't remove children from Scene when cleared
2018-03-09 15:54:44 +00:00
Richard Davey
3ed077a6d7
Merge pull request #3358 from delftswa2018/3231-CANVAS-tilesprite-rotation-flip-scaling
...
Added rotation, scaling and flipping to TileSpriteCanvasRenderer
2018-03-09 15:51:35 +00:00
Richard Davey
2ee4f581f5
Merge pull request #3355 from rexrainbow/master
...
Add reference of GameObject class
2018-03-09 15:45:46 +00:00
Tom Catshoek
74b18921e8
Added rotation, scaling and flipping to TileSpriteCanvasRenderer
2018-03-09 15:16:34 +01:00
Hua
4719589382
Add reference of BuildGameObject, BuildGameObjectAnimation
2018-03-09 15:13:42 +08:00
Hua
cf8d4703b3
Add reference of GameObject class
2018-03-09 12:31:37 +08:00
Felipe Alfonso
9a21b4c7f4
Fixed issue with render texture tint
2018-03-06 15:56:33 -03:00
iamchristopher
1d402a732e
Fixed Group doesn't remove children from Scene when cleared
2018-03-05 19:04:01 -05:00
Richard Davey
a712dea197
eslint fix
2018-03-05 22:25:55 +00:00
Richard Davey
9ad7aeef1d
Merge pull request #3304 from rexrainbow/master
...
Add destroy event of gameobject
2018-03-05 21:56:07 +00:00
Richard Davey
c2f25b3742
Merge pull request #3240 from Twilrom/arc-fix
...
Update WebGL Graphics.arc to work more like on Canvas
2018-03-05 21:54:46 +00:00
Richard Davey
bfabe35cdf
eslint fixes
2018-03-05 21:49:08 +00:00
Felipe Alfonso
ddc85cfdc7
Added support for tint and alpha to RenderTexture
2018-03-05 16:57:41 -03:00
Lukas Jakob Hafner
97bfe2e752
Quick fix for missing lineSpacing
...
Reads lineSpacing if passed as attribute to `style` within text config.
2018-03-05 16:35:42 +02:00
Richard Davey
8d85a9bc72
Added jsdocs
2018-03-05 14:19:53 +00:00
Richard Davey
4c59d9a35d
Added jsdocs
2018-03-05 02:24:47 +00:00
Richard Davey
4d16b0c00a
eslint fixes
2018-03-05 01:45:28 +00:00
Richard Davey
ef3df149c6
Fixed RenderTexture flipY
2018-03-05 01:42:37 +00:00
Richard Davey
ae1c91cf6a
eslint fixes
2018-03-05 01:40:11 +00:00
Richard Davey
7341d7a6cf
Merge branch 'master' of https://github.com/photonstorm/phaser
2018-03-02 17:49:01 +00:00
Richard Davey
4de9690f98
The setFrame
method of the Texture component has been updated so that it will now automatically reset the width
and height
of a Game Object to match that of the new Frame. Related, it will also adjust the display origin values, because they are size based. If the Frame has a custom pivot it will set the origin to match the custom pivot instead.
2018-03-02 16:23:43 +00:00
Felipe Alfonso
865f0a604e
Small fix on the MatrixStack rotation function
2018-03-02 11:29:04 -03:00
Hua
baeca90ae8
Add destroy event
...
Add destroy event of gameobject, also add a checking to prevent re-enter this destroy function.
2018-03-02 10:50:20 +08:00
Richard Davey
acc4922027
Fixes to the InputPlugin re: drop zones and addition of setInteractive argument.
2018-03-01 02:46:17 +00:00
Richard Davey
9a561ff385
Added roundPixels support to BitmapText canvas
2018-02-28 23:07:30 +00:00
Richard Davey
fdc1f3cab3
Added canvas roundPixels support for Text, Particles and TileSprites
2018-02-28 22:40:08 +00: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
Felipe Alfonso
14399d6910
TileSprite can now set frame of the pattern texture
2018-02-28 17:04:57 -03:00
Richard Davey
8ae3493296
setText updates
...
BitmapText.setText will check if the value given is falsey but not a zero and set to an empty string if so.
BitmapText.setText will now cast the given value to a string before setting.
BitmapText.setText will not change the text via `setText` unless the new text is different to the old one.
2018-02-27 15:14:03 +00:00
Richard Davey
b447665533
Text.setText will check if the value given is falsey but not a zero and set to an empty string if so.
2018-02-27 15:13:39 +00:00
Richard Davey
34e5a282d2
AnimationComponent.play now calls setSizeToFrame()
and updateDisplayOrigin()
on the parent Game Object in order to catch situations where you've started playing an animation on a Game Object that uses a different size to the previously set frame.
2018-02-27 01:09:09 +00:00
Felipe Alfonso
7c96e93c47
Canvas RenderTexture rendering added
2018-02-23 21:05:15 -03:00
Felipe Alfonso
9dbb4db4c6
Added inverted alpha to bitmap mask
2018-02-23 14:09:27 -03:00
Felipe Alfonso
ef8e92dc01
RenderTexture base webgl implementation
2018-02-23 00:44:22 -03:00
Richard Davey
fe5bd7e6bb
Fixed jsdoc errors
2018-02-21 22:51:05 +00:00
Felipe Alfonso
4b9b4c91a3
Dynamic BitmapText's origin is used on rendering the text
2018-02-19 18:20:30 -03:00
Felipe Alfonso
41bcaba43a
Dynamic BitmapText now uses origin component to render the text.
2018-02-19 18:16:57 -03:00
Richard Davey
3c65121cb3
eslint fixes
2018-02-16 19:17:49 +00:00
Richard Davey
50dac412be
eslint fixes and console removal
2018-02-16 19:08:50 +00:00
Richard Davey
d745b70330
The Mesh Game Object Factory entry had incorrect arguments passed to Mesh constructor.
2018-02-16 19:07:58 +00:00
Richard Davey
5b4b5de075
TileSprite was missing a gl reference, causing it to fail during a context loss and restore.
2018-02-16 18:54:33 +00:00
Richard Davey
86f00eeb52
eslint fixes
2018-02-16 18:17:51 +00:00
Twilrom
d45784f3c9
Remove some unnecessary calls to closePath.
2018-02-16 16:13:48 +01:00
Richard Davey
79520bfdc4
Added jsdoc
2018-02-15 14:33:36 +00:00
Richard Davey
d72c7d501a
Destroying a Game Object will now call destroy on its physics body.
2018-02-14 19:33:13 +00:00
Richard Davey
c80e2fde2c
Fixed use of List structure for the Blitter game object.
2018-02-14 12:25:17 +00:00
Richard Davey
2892f20e5c
Depth component added to the Zone Game Object. Fix #3213
2018-02-13 22:19:44 +00:00
Richard Davey
353dba4d5e
Added missing Target camera back, fixing Graphics.generateTexture in the process.
2018-02-13 08:08:48 +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
275f6e40b2
Moved to sub-folder.
2018-02-12 22:16:27 +00:00
Richard Davey
ef87b33a10
Added jsdocs
2018-02-12 21:54:51 +00:00
Felipe Alfonso
9b2741387b
Resolution affecting camera display
2018-02-12 16:03:13 -03:00
Richard Davey
8bce7ea7c9
Added jsdocs.
2018-02-12 17:21:06 +00:00
Richard Davey
3493e272d6
Added jsdocs
2018-02-12 17:03:53 +00:00
Richard Davey
b6b8f70550
DisplayList now just extends List and removed the Plugin, as it acts as its own plugin now.
2018-02-12 16:59:57 +00:00
Richard Davey
d578e89828
Moved Mesh out of core and into its own Graphics extension.
2018-02-12 16:59:27 +00:00
Richard Davey
d1f5f8a82b
Added jsdocs
2018-02-12 16:01:21 +00:00
Richard Davey
d67daa998e
If no value given, set to empty string.
2018-02-12 13:48:51 +00:00
Richard Davey
38b6d2834b
Added jsdocs
2018-02-10 17:11:36 +00:00
Richard Davey
2ece55c28e
Renamed folder to match namespace
2018-02-10 14:56:08 +00:00
Richard Davey
a71998d682
Updated origin call.
2018-02-09 15:23:26 +00:00
Richard Davey
5085ed5c9f
Added setOriginFromFrame.
2018-02-09 15:21:49 +00:00
Richard Davey
3422569a4a
setFrame will use a custom pivot, if set.
2018-02-09 15:21:39 +00:00
Richard Davey
e0899bfa00
Added jsdocs
2018-02-09 03:44:23 +00:00
Richard Davey
10193c181a
Fixed require paths.
2018-02-07 17:10:01 +00:00
Richard Davey
89fe7123e1
Moved to its own top-level folder.
2018-02-07 16:29:48 +00:00
Richard Davey
3c8470863a
Fixed undef error.
2018-02-07 16:16:26 +00:00
Richard Davey
40689d1e35
Updated jsdocs.
2018-02-07 15:27:21 +00:00
Richard Davey
8ae958037e
Added jsdocs
2018-02-07 02:46:11 +00:00
Richard Davey
33c9f39b9d
Merge branch 'master' of https://github.com/photonstorm/phaser
2018-02-07 00:19:15 +00:00
Richard Davey
650ae3cf5a
Added jsdocs
2018-02-07 00:18:22 +00:00
Michael Hadley
50434227ac
Tile's flip/rotation is now only set by the flipX, flipY and rotation props
2018-02-06 18:17:15 -06:00
Richard Davey
5c0872485c
Added jsdocs
2018-02-06 22:56:27 +00:00
Richard Davey
645f1e618e
Added jsdocs
2018-02-06 22:37:56 +00:00
Richard Davey
2d4b7b5398
Merge branch 'master' of https://github.com/photonstorm/phaser
2018-02-06 22:25:26 +00:00
Richard Davey
6efb94cce9
Added jsdocs
2018-02-06 22:25:23 +00:00
Felipe Alfonso
cff54d8511
Added tile rotation and fixed undefined resolution on webgl renderer config
2018-02-06 18:47:42 -03:00
Felipe Alfonso
cffc40b834
Fixed flip on blitter game object. Added camera scrollFactor to blitter canvas renderer
2018-02-06 17:19:11 -03:00
Richard Davey
8cd5e772d8
Added jsdocs
2018-02-06 19:22:20 +00:00
Richard Davey
0ebe23e396
Added jsdocs
2018-02-06 19:10:44 +00:00
Richard Davey
039d63b17d
Added jsdocs
2018-02-06 17:17:34 +00:00
Richard Davey
a42d1a3f3e
Added jsdocs
2018-02-06 16:37:35 +00:00
Richard Davey
b0bb397369
Added jsdocs
2018-02-06 16:15:22 +00:00
Richard Davey
26a496ac3f
Added jsdocs
2018-02-06 15:04:20 +00:00
Richard Davey
a4381d65aa
Added jsdocs
2018-02-06 14:13:30 +00:00
Richard Davey
36229eee79
Added jsdocs
2018-02-06 01:08:43 +00:00
Richard Davey
d838f4cfcd
Added jsdocs
2018-02-06 00:56:09 +00:00
Richard Davey
a8eae2bab7
Added jsdocs
2018-02-05 23:59:51 +00:00
Richard Davey
6df51372d5
Merge branch 'master' of https://github.com/photonstorm/phaser
2018-02-05 22:08:52 +00:00
Richard Davey
45bda0b6ab
Added jsdocs
2018-02-05 22:08:48 +00:00
Felipe Alfonso
7b1ad0b307
transparent, clearBeforeRender and roundPixels now affect the rendering result
2018-02-05 19:06:02 -03:00
Richard Davey
b889a39bfb
Removed extra docs output line
2018-02-05 02:34:42 +00:00
Richard Davey
99913b9da4
More jsdoc updates
2018-02-01 05:48:56 +00:00
Richard Davey
9e8ee078e8
Fixed mixin jsdoc defs
2018-02-01 01:36:52 +00:00
Richard Davey
6611685640
Added jsdocs
2018-02-01 01:20:11 +00:00
Richard Davey
a506fcc3ac
Added jsdocs
2018-02-01 01:09:34 +00:00
Richard Davey
d457373287
Added Depth component and tidied up redundant parts of Transform
2018-02-01 00:50:15 +00:00
Richard Davey
c254cb2991
Added jsdocs
2018-02-01 00:25:33 +00:00
Richard Davey
950a125d71
Added jsdocs
2018-02-01 00:04:45 +00:00
Felipe Alfonso
4d03853935
Added cleanup routine for all webgl content on WebGLRenderer destroy function
2018-01-31 14:36:00 -03:00
Richard Davey
d8b2b6e340
jsdoc tweaks
2018-01-31 16:53:48 +00:00
Richard Davey
2a86400a28
Added in jsdocs
2018-01-31 13:54:44 +00:00
Felipe Alfonso
f294a17a79
Fixed light culling
2018-01-30 22:27:11 -03:00
Felipe Alfonso
0648161ca5
Added simple light culling
2018-01-30 22:11:51 -03:00
Felipe Alfonso
d9b04ef2e9
Light2D Plugin added to scene
2018-01-30 19:46:43 -03:00
Felipe Alfonso
de4b308fbd
Light2D update
2018-01-30 00:38:31 -03: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
Michael Hadley
65beefce29
Fix #3169 : add optional param to Tile#setCollision & Tile.resetCollision to recalc faces
2018-01-29 16:51:08 -06:00
Michael Hadley
b537ebd966
Made CalculateFacesAt accessible as part of the tilemap API
...
This is used internally, but may be useful for some devs
2018-01-29 16:31:14 -06:00
Felipe Alfonso
71a6360a7b
Pipeline components added
2018-01-29 18:46:48 -03:00
Michael Hadley
dfab17fb7a
Tilemap helper methods for accessing objects from object layers
2018-01-27 10:27:12 -06:00
Michael Hadley
7acd9b0381
Tiled object parser: store points as xy objects instead of arrays
...
V2 used arrays, but other places in the codebase (and users) will expect an object with XY props over an array.
2018-01-27 08:34:11 -06:00
Michael Hadley
901b5f8ba9
Upgraded Tilemap object layer parser from v2
...
- Added ObjectLayer class to make the structure of an object layer clear
- Tilemap.objects is now an array of objects. This allows object layer properties to be parsed.
2018-01-27 08:27:56 -06:00
Michael Hadley
c7c94cdea8
Remove unnecessary v2 code: tilemap.collision
2018-01-27 08:05:45 -06:00
Michael Hadley
63123250d1
Add clairifying note to fix #3193
2018-01-26 15:34:03 -06:00
Richard Davey
79de1b860a
Added jsdocs
2018-01-26 15:37:42 +00:00
Richard Davey
feee8e34e8
Moved Container out of prod for now.
2018-01-26 05:25:30 +00:00
Richard Davey
50318435b6
Commented out physics destroy call.
2018-01-25 23:19:37 +00:00
Felipe Alfonso
c94810ad43
Merge branch 'master' into rendering-cleanup
2018-01-25 19:21:34 -03:00
Felipe Alfonso
7c4c439aa4
Diffuse lighting shaders. Also made light layer rendering pass through
2018-01-25 19:20:36 -03:00
Michael Hadley
05688ac598
Tile.GetBounds
2018-01-25 13:48:22 -06:00
Felipe Alfonso
d4f0d02745
Merge branch 'master' into rendering-cleanup
2018-01-25 15:45:15 -03:00
Michael Hadley
91f18d9c94
Added convenience method Tile.getTileData
2018-01-25 07:46:08 -06:00
Michael Hadley
a601c57163
Renamed TilemapLayer.map -> TilemapLayer.tilemap for consistency
2018-01-25 07:29:43 -06:00
Michael Hadley
13349145cb
Added Tile.tilemap convenience getter
2018-01-25 07:25:14 -06:00
Felipe Alfonso
7b3c2c6b1c
Removed old code
2018-01-25 02:27:30 -03:00
Felipe Alfonso
bd8e9b2003
Static Tilemap Layer rendering
2018-01-25 02:26:14 -03:00
Felipe Alfonso
80d9ef42b3
ParticleEmitterManager webgl rendering added
2018-01-24 22:10:30 -03:00
Felipe Alfonso
42482ecb26
TileSprite webgl rendering
2018-01-24 21:15:51 -03:00
Felipe Alfonso
195a59d3ba
Dynamic Tilemap rendering
2018-01-24 19:29:57 -03:00
Felipe Alfonso
06fa0afcc8
Dynamic Bitmap Text webgl rendering
2018-01-24 15:55:23 -03:00
Felipe Alfonso
69c56fc920
Merge branch 'master' into rendering-cleanup
2018-01-24 00:58:53 -03:00
Felipe Alfonso
5170784338
Graphics WebGL Rendering
2018-01-24 00:03:43 -03:00
Michael Hadley
e564a6cbe7
Tile helper methods for getting actual world bounds of a tile
2018-01-23 19:16:56 -06:00
Felipe Alfonso
ca465c8139
Fixed Quad
2018-01-23 21:58:37 -03:00
Felipe Alfonso
99d850346f
Text rendering added
2018-01-23 21:40:20 -03:00
Felipe Alfonso
502ce8ddea
Static BitmapText rendering. Added rect culling to TextureTintPipeline
2018-01-23 20:36:49 -03:00
Felipe Alfonso
dd9cef61cf
Image WebGL rendering
2018-01-23 17:32:20 -03:00
Felipe Alfonso
070d946dca
Mesh and Sprite rendering
2018-01-23 16:29:47 -03:00
Felipe Alfonso
336cc4e3fe
Merge branch 'master' into rendering-cleanup
2018-01-23 13:39:33 -03:00
Michael Hadley
ebabf97ce3
Comment clarification
2018-01-23 09:41:29 -06:00
Michael Hadley
4abf0df119
Added setCollisionFromCollisionGroup for easily setting collision from Tiled collision editor
2018-01-23 09:40:59 -06:00
Michael Hadley
2cabd15684
Added SetCollisionByProperty to Tilemap API
2018-01-23 09:05:37 -06:00
Michael Hadley
e31ea73ad4
Typo fix: Tilset -> Tileset
2018-01-23 08:38:43 -06:00
Michael Hadley
629ead9a37
Making Tileset comments more specific - better explains Tiled structure
2018-01-23 07:55:43 -06:00
Michael Hadley
b8b0f42153
getTileProperty -> getTileProperties
...
A tile can have multiple properties, so it makes more sense as a plural method name
2018-01-23 07:54:03 -06:00
Michael Hadley
c7a471e29a
Convenience for getting Tileset collision group from Tile
2018-01-23 07:52:53 -06:00
Michael Hadley
ab29015742
Convenience tile getters for looking up tileset & tilemap layer
2018-01-23 07:48:59 -06:00
Felipe Alfonso
0f0b422fd7
FlatTint Pipeline progress
2018-01-22 19:51:15 -03:00
Felipe Alfonso
2b043fff65
Removed RenderTarget and Shader from components
2018-01-22 18:53:15 -03:00
Felipe Alfonso
961f00ac11
BlitterPipeline added
2018-01-22 18:21:47 -03:00
Felipe Alfonso
e8610734b7
Merge branch 'master' into rendering-cleanup
2018-01-22 12:18:38 -03:00
Richard Davey
75e9349b3c
Text canvas width cannot drop below 1x1 pixels.
2018-01-22 12:21:42 +00:00
Michael Hadley
348da8c81e
MatterTileBody: wrapper around a Tile that provides access to a matter body
2018-01-21 12:53:27 -06:00
Felipe Alfonso
a4e79875d4
Merge branch 'master' into rendering-cleanup
...
# Conflicts:
# src/gameobjects/blitter/BlitterWebGLRenderer.js
2018-01-21 11:14:27 -03:00
Richard Davey
a8c0ee8839
Allow to pass a Frame object directly to a Bob
2018-01-20 17:45:01 +00:00
Richard Davey
d7611afaab
Fixed issue with setting Bob frame
2018-01-20 17:05:53 +00:00
Richard Davey
2fb3641824
Should be a string, not a Frame object
2018-01-20 16:35:47 +00:00
Richard Davey
a5a112114b
Added blitter coordinates to bob output
2018-01-20 16:21:59 +00:00
Richard Davey
d220634fb6
Added helper methods for flip, visible and alpha
2018-01-20 16:21:42 +00:00
Richard Davey
b951809791
Fixed children reference
2018-01-20 16:21:28 +00:00
Richard Davey
134c67a51b
Split into base class and plugin extension so other classes can use them too
2018-01-20 16:21:12 +00:00
Felipe Alfonso
f388391c25
Merge branch 'master' into rendering-cleanup
2018-01-18 14:28:02 -03:00
Richard Davey
d46662cd46
Swapped to using Number.MAX_VALUE
so repeat -1 now works properly in IE11 and below.
2018-01-18 14:59:32 +00:00
Richard Davey
2deb9edc9e
Plugins now check to see if the Scene is already booted and adapt accordingly.
2018-01-18 14:00:31 +00:00
Richard Davey
5a333bc2fd
Updated to new Plugin format, removed injection and mapping
2018-01-18 05:18:09 +00:00
Michael Hadley
821eae6eee
Bug fix: weltmeister parser
2018-01-17 18:38:55 -06:00
Michael Hadley
2e68f2507d
Added Weltmeister support to Loader & Tilemap API
2018-01-17 18:34:00 -06:00
Michael Hadley
72a14df466
Shortened Tilemap format names
2018-01-17 18:34:00 -06:00
Felipe Alfonso
4983b393e3
Merge with master
2018-01-17 18:30:39 -03:00
Felipe Alfonso
cfe07706e6
Cleaning up WebGLRenderer
2018-01-17 18:25:43 -03:00
Richard Davey
bae63901d7
fillPoint draws the rect in the center of the x/y coordinates instead of the top-left
2018-01-17 15:01:24 +00:00
Antriel
3348f5bd16
Added support for drawing filled ellipse to Graphics.
2018-01-17 11:36:28 +01:00
Michael Hadley
e9ab1725f3
Make tileset the source of truth for texture in both tilemap layers
2018-01-16 19:48:17 -06:00
Richard Davey
d1cd5cbc1d
Tidied up destroy
2018-01-17 00:29:23 +00:00
Richard Davey
ad49a01271
Fixed rogue input reference and hitTest signature
2018-01-16 23:50:01 +00:00
Richard Davey
f9a7939812
Lots of work migrating to the new plugin system, fixing references and exposing on the namespace
2018-01-16 22:28:29 +00:00
Richard Davey
8e07320596
Migrating to plugins
2018-01-16 19:49:13 +00:00
Felipe Alfonso
fd4f441146
DynamicBitmapText WebGL renderer updated
2018-01-16 16:32:27 -03:00
Richard Davey
674c1b5ba8
Moving plugins to their own locations
2018-01-16 18:34:37 +00:00
Felipe Alfonso
5c782c8f7d
Merge branch 'master' into rendering-cleanup
2018-01-16 13:17:39 -03:00
Richard Davey
89c04fc193
Merged Animation component.
2018-01-16 15:39:18 +00:00
Richard Davey
be756ed7fc
Renamed folder camera
to cameras
and split up the contents into proper namespaces. Merged inc files back into classes.
2018-01-16 15:07:04 +00:00
Felipe Alfonso
77d4493f43
Merge branch 'master' into rendering-cleanup
2018-01-15 21:44:47 -03:00
Michael Hadley
f86298b8d2
Tilemap layers now initialize their alpha from LayerData
...
This makes it easy to import layer alphas from Tiled
2018-01-14 16:16:47 -06:00
Felipe Alfonso
ad1701d0ed
Changed Image gl pipeline
2018-01-12 21:20:41 -03:00
Felipe Alfonso
8bb9b1309f
SpriteBatch pipeline re-implementation
2018-01-12 21:13:41 -03:00
Felipe Alfonso
3282ead8a7
Merge branch 'master' into rendering-cleanup
2018-01-12 14:11:18 -03:00
Richard Davey
c625b8735b
Updated to using Event Emitter for all key managers and game objects. Events are now dispatched directly using arguments instead of Event objects, all managers updated to emit directly.
2018-01-12 17:09:21 +00:00
Felipe Alfonso
40262eb0cb
Merge branch 'master' into rendering-cleanup
2018-01-12 12:42:45 -03:00
Richard Davey
718859b02e
Moved the depth sorting functions into the DisplayList class, as it's really the one responsible for it, not System.
2018-01-11 13:59:06 +00:00
Michael Hadley
fdc1af0cd2
Install isTilemap prop used by physics system for fast type checking
2018-01-10 20:45:28 -06:00
Felipe Alfonso
8e66cf9f98
Merge branch 'master' into rendering-cleanup
2018-01-10 17:05:32 -03:00
Felipe Alfonso
54274b782a
BlitterBatch pipeline working
2018-01-10 17:03:01 -03:00
Hal Helms
89e4289c9d
Fix WeightedRandomize.js
2018-01-09 22:26:02 -08:00
Hal Helms
42ad0ac399
Add semicolons to WeightedRandomize
2018-01-09 22:24:56 -08:00
Hal Helms
302eba15d9
Update WeightedRandomize docs for index arrays
2018-01-09 22:09:28 -08:00
Hal Helms
e128733f02
Update WeightedRandomize() to support index arrays
2018-01-09 22:05:34 -08:00
Richard Davey
d8f1ba03e9
Moved repository location
2018-01-09 21:43:56 +00:00
Richard Davey
0d90f75b5f
Splitting the dev branch up into versions.
2016-11-22 01:36:56 +00:00
Richard Davey
7a155f66fe
Added Tilemap back in and tested with Blitter object, and it works really fast.
2016-11-15 03:11:21 +00:00
Richard Davey
346fbc2cbd
Blitter + Bob now rendering and updating fully.
2016-11-15 01:57:42 +00:00
Richard Davey
e150efea1f
Added Blitter Game Object, for fast drawing of texture frames, with single level transforms.
2016-11-14 23:38:41 +00:00
photonstorm
fa3905c8c7
Containers added themselves to States properly.
2016-11-10 17:04:29 +00:00
photonstorm
38868d6ecf
Fixed Pixel Field.
2016-11-09 15:33:42 +00:00
photonstorm
7a35f68ddc
MainLoop rendering interpolation done.
2016-11-09 12:25:26 +00:00
Richard Davey
48f90fec34
Implemented a State based MainLoop system, with fully split logic / render cycles and frame rate. Each State can now set its own frame rate. Added in more Camera commands, moved the Tween Manager into the State Systems, and started work on the new heavily reduced Game object.
2016-11-08 01:50:57 +00:00
Richard Davey
4b42972a9b
Comment out some parts that don't work yet.
2016-11-07 00:33:42 +00:00
Richard Davey
d568d2bede
Moved _sys to a StateSystems class to keep things much cleaner, and avoid setter inheritance mess.
2016-11-06 12:18:08 +00:00
Richard Davey
268e40ea7e
Add to 'state' by default now.
2016-11-03 22:26:39 +00:00
Richard Davey
a15747203e
Moved boot into Game, and added State property.
2016-11-03 22:26:16 +00:00
Richard Davey
6e284cf4f9
Removed test code.
2016-11-01 01:19:32 +00:00
Richard Davey
03b651f79f
Loads of tweaks re: Transform inheritance.
2016-11-01 00:31:45 +00:00
Richard Davey
8e2c5b7669
Removed dead code.
2016-10-31 00:03:57 +00:00
Richard Davey
c27b2f9fca
Changed batch limits. Currently running 20,000 pixels in 1 draw call.
2016-10-30 23:59:47 +00:00
Richard Davey
c4a79bfadc
Pixel Batch rendering working, and passing through properly.
2016-10-30 23:40:18 +00:00
Richard Davey
bd80999b33
Refined the Image and WebGL Renderers.
2016-10-30 22:58:14 +00:00
Richard Davey
a55df3f143
Added in the Pixel Field batch processor and start of the Game Object.
2016-10-30 22:57:50 +00:00
Richard Davey
577b81580a
New batch system working.
2016-10-30 14:57:38 +00:00
Richard Davey
f1760f961d
Working through splitting the Batch shader out of the manager, and into its own class. Got multi-shader swapping working.
2016-10-28 02:42:58 +01:00
Richard Davey
2b850ad4e8
Setting the anchor dirties the Transform.
2016-10-27 15:14:09 +01:00
photonstorm
fd3898742f
Added ability to toggle multi-texture support at run-time.
2016-10-25 16:44:23 +01:00
photonstorm
8de992175e
Renamed Renderer spriteBatch to just batch.
2016-10-25 14:30:29 +01:00
Richard Davey
120b6eb2bd
Blend Modes work. More optimisations in the batch manager.
2016-10-25 03:57:34 +01:00
Richard Davey
4c6691863c
Fixed Multi Texture support in the new batch manager.
2016-10-25 00:41:45 +01:00
photonstorm
2af81bdfba
Masses of refactoring in BatchManager, making it as compact and fast as possible.
2016-10-24 17:14:10 +01:00
Richard Davey
3cb806c86e
New addVerts method working.
2016-10-23 11:25:44 +01:00
photonstorm
64cd88f7b4
Trying out flash effect.
2016-10-19 17:17:26 +01:00
photonstorm
f1e8396b6f
Tidying up.
2016-10-19 14:30:43 +01:00
photonstorm
0a659bcf67
No longer needed.
2016-10-19 14:29:38 +01:00
photonstorm
fb3bb4b32f
Refactored into new Base Game Object class, that Image and Sprite (and everything else) will now extend. Much more versatile, and a lot less code duplication.
2016-10-19 11:54:00 +01:00
Richard Davey
5273799912
Added Color component to Stage and Image.
...
Added tint support into the Batch Manager.
2016-10-19 02:21:20 +01:00
photonstorm
18b12dfc3e
Huge amount of work getting the WebGL renderer sorted out, tidied up and merged with the latest Texture and Transform components.
2016-10-18 17:03:25 +01:00
photonstorm
3020e3b8cf
Updating core objects.
2016-10-14 08:59:24 +01:00
photonstorm
bfd391b251
Using Color component.
2016-10-14 08:58:26 +01:00
photonstorm
f9ffe098c3
Check the worldAlpha when rendering.
2016-10-14 06:32:03 +01:00
photonstorm
386e22b0fd
Commented out all the bg color stuff. It now just changes the canvas CSS.
2016-10-14 06:31:26 +01:00
photonstorm
9961eeee6b
Added worldAlpha property.
2016-10-14 06:31:01 +01:00
photonstorm
582d705b1f
Updated base game objects.
2016-10-14 04:09:22 +01:00
photonstorm
ff2caeeb1c
Some quick Image tests (will need to move to Sprite soon)
2016-10-14 02:21:21 +01:00
photonstorm
c5088d4ba6
Updated Factory to add to parent.
2016-10-14 02:21:04 +01:00
photonstorm
f6903df104
Stage now extends Container.
2016-10-14 02:20:01 +01:00
photonstorm
680ce51842
Updated Container methods, renamed renderers, added Factory.
2016-10-14 02:19:35 +01:00
Richard Davey
483c3eb34b
Updated to work with new Image properties.
2016-10-13 01:54:40 +01:00
Richard Davey
559126d7b5
Moved to using new Transform component, and adjusted other properties.
2016-10-13 01:54:18 +01:00
Richard Davey
72ee3c7a84
Updating Image game object to use the new Transform component.
2016-10-13 00:08:26 +01:00
photonstorm
9ed542781b
Added the new Data Component.
2016-10-12 15:19:04 +01:00
photonstorm
ce3308ea1d
Hooking the Loader and Cache into the new Texture Manager.
2016-10-11 14:52:17 +01:00
Richard Davey
3ac8c4fcc5
Tidied up the Children component.
2016-10-09 23:39:27 +01:00
Richard Davey
0af16817a5
Refactored GameObjects
to GameObject
.
2016-10-09 22:27:58 +01:00
Richard Davey
fb13151959
Start of the container.
2016-10-08 17:19:55 +01:00
Richard Davey
d137d3e989
Swapped over to using the new Factory.
2016-10-08 16:31:08 +01:00
Richard Davey
380e717e52
Finished off missing factories. Moved over the docs. Changed rogue @returns to @return everywhere.
2016-10-08 16:17:46 +01:00
Richard Davey
6d0dc5e003
Added BitmapText Factory.
2016-10-08 13:18:35 +01:00
Richard Davey
729020477a
New Game Objects structure in place, and starting to take shape.
...
Moved BitmapData and RenderTexture into the textures folder for now.
All Game Objects now have their own sub-folder, with their Factory and renderer functions alongside them, plus any other files they need.
New Factory class added. Currently hooked into `game.factory` for testing, but will swap to `game.add` when complete.
2016-10-08 03:05:42 +01:00
Richard Davey
f9fe6a3e94
Fixed canvas SpriteBatch and removed duplicate render functions.
2016-10-07 03:41:48 +01:00
Richard Davey
5b4280d694
Removed the matrix.
2016-10-07 03:34:42 +01:00
Richard Davey
35fd29a45a
Removed Pixi globals, and moved constructors above the prototype.
2016-10-07 03:32:37 +01:00
Richard Davey
0abf9d958d
Updated scaleMode global.
2016-10-07 03:22:59 +01:00
Richard Davey
3fab1ce385
Working through the Pixi globals and removing them.
2016-10-07 03:21:39 +01:00
Richard Davey
f6047763fa
Fixed Graphics rendering.
2016-10-07 02:53:34 +01:00
Richard Davey
ea9c9ae7b3
Removed gl texture ID.
2016-10-07 00:59:10 +01:00
Richard Davey
4cd0e833d5
Sorted out the mixin needed for the Canvas renderer.
2016-10-05 01:09:23 +01:00
Richard Davey
047a994334
Canvas and WebGL rendering Text again.
2016-10-04 22:47:05 +01:00
Richard Davey
28eb7a5f40
Adding in more renderer game objects.
2016-10-04 22:36:07 +01:00
Richard Davey
d55cc215ee
Moving more rendering functionality over.
2016-10-04 00:58:52 +01:00
photonstorm
1da95994a5
First pass of the newly re-structured Canvas Renderer (still using old texture system though).
2016-10-03 12:44:54 +01:00
Richard Davey
0aa6650422
Re-arranged methods and added parent.
2016-09-29 03:10:16 +01:00
Richard Davey
5cb7cc8e92
Start of the new Children component.
2016-09-29 02:29:56 +01:00
Richard Davey
6ce28658f6
PIXI.Float32Array, PIXI.Uint16Array, PIXI.Uint32Array and PIXI.ArrayBuffer have all been removed, and replaced with their own proper native versions. The polyfill now captures any instances where the browser needs to fall back to an Array instead.
2016-09-28 19:02:59 +01:00
photonstorm
c836d4bfbd
PIXI.PI_2, PIXI.RAD_TO_DEG and PIXI.DEG_TO_RAD have all been removed, as they are no longer used internally, and are all available under Phaser.Math.
...
PIXI.VERSION has been removed, as it's no longer relevant and misleading.
2016-09-28 16:57:08 +01:00
photonstorm
f9a2c2a79e
PIXI.Graphics and PIXI.GraphicsData have been removed, and all functionality merged in to Phaser.Graphics, to cut down on the number of internal classes and inheritance going on.
...
WebGLGraphics and CanvasGraphics have been updated so that it checks for Phaser Geometry shape types internally.
2016-09-28 16:42:33 +01:00
photonstorm
69db3632d6
PIXI.Rope and PIXI.Strip have been removed, and all functionality merged in to Phaser.Rope, to cut down on the number of internal classes and inheritance going on.
2016-09-28 15:10:43 +01:00
photonstorm
879bcffc88
Removed PIXI.Utils and remapped functions to their new locations.
2016-09-28 14:02:02 +01:00
photonstorm
1e15012a91
PIXI.CanvasPool has been moved into the Phaser utils
folder, and renamed to Phaser.CanvasPool
. All references to PIXI.CanvasPool have been updated to match the new namespace.
2016-09-28 12:53:04 +01:00
photonstorm
508e5ae723
PIXI.TilingSprite has been removed, and all functionality merged in to Phaser.TileSprite, to cut down on the number of internal classes and inheritance going on.
2016-09-28 11:57:11 +01:00
Richard Davey
2005c9d86d
PIXI.RenderTexture has been removed, and all functionality merged in to Phaser.RenderTexture, to cut down on the number of internal classes and inheritance going on.
2016-09-28 01:40:29 +01:00
Richard Davey
1d7b54b7d4
Merged Sprite Batch updates.
2016-09-27 23:22:26 +01:00
Richard Davey
41ad0873d4
Fixing the Sprite Batch.
2016-09-27 23:20:38 +01:00
Richard Davey
2bc9c73838
The Video.playing property didn't check to see if the Video existed, and would throw the error Uncaught TypeError: Cannot read property 'paused' of null
if you called it after destroying the video (thanks @Tetley #2740 )
2016-09-26 23:35:41 +01:00
Richard Davey
0692bf01b5
If you called Video.changeSource, and then immediately called Video.play after it, it would fire the onComplete
event twice (thanks @jaraiza #2543 )
2016-09-26 23:28:41 +01:00
Richard Davey
f331697fee
Text.splitRegExp is a new property that allows you to control the regular expression that is used to split the text into multiple lines (@dai-shi #1403 )
2016-09-26 22:35:54 +01:00
Richard Davey
feb1b980c0
Text.width and Text.height now divide the result by the Text.resolution, to avoid incorrect dimensions on High DPI devices (thanks @mattahj #2146 )
2016-09-26 22:22:31 +01:00
Richard Davey
3f4decd59e
First pass at adding rotated atlas frame support in to the Canvas renderer.
2016-09-20 00:53:00 +01:00
photonstorm
a84021679b
Tidied up how crop destroys itself.
2016-08-25 16:41:26 +01:00
photonstorm
94a0dbe547
Text.updateText now sets Text.dirty = false
, which stops Text objects from having updateText
called twice on them after creation.
2016-08-25 14:16:48 +01:00
Richard Davey
d8cb40aa5e
Merge pull request #2700 from kjav/patch-2
...
Fixed typo in TileSprite.js comment
2016-08-25 13:04:31 +01:00
photonstorm
cbef6d6648
Formatting fix.
2016-08-22 18:38:40 +01:00
photonstorm
4382944a2e
A tinted Texture in Canvas mode wouldn't be updated properly if it was also cropped, beyond the initial crop. Now a cropped texture will re-tint itself every time the crop is updated, and has changed (thanks @phoenixyjll #2688 )
2016-08-18 15:55:13 +01:00
kjav
314b088975
Fixed typo in TileSprite.js comment
...
Changed typo 'etch' in TileSprite.js to 'etc'. Related to pull request #2699
2016-08-18 15:40:19 +01:00
Richard Davey
a4de55c419
Merge pull request #2685 from valent-novem/dev
...
Fix rendering text with bounds and resolution
2016-08-16 21:12:57 +01:00
Richard Davey
49e40fc2d4
Typo
2016-08-16 20:59:59 +01:00
Sergey Z
68fe8b8058
Fix rendering text with bounds and resolution
2016-08-08 16:51:07 +03:00
Richard Davey
a0c6ae6c51
Phaser.Image now has the ScaleMinMax component.
2016-08-03 05:00:09 +01:00
Richard Davey
ce764e098d
As a result of changes in #2573 Graphics objects were calling updateLocalBounds
on any shape change, which could cause dramatic performances drops in Graphics heavy situations ( #2618 ). Graphics objects now have a new flag _boundsDirty
which is used to detect if the bounds have been invalidated, i.e. by a Graphics being cleared or drawn to. If this is set to true then updateLocalBounds
is called once in the postUpdate
method (thanks @pengchuan #2618 )
2016-07-23 12:52:35 +01:00
Richard Davey
b405570833
Docs fix #2624
2016-07-17 11:26:09 +01:00
Tomáš Blatný
2b90f2cb3b
BitmapData.js: fixed fluent interface
2016-07-15 20:16:35 +02:00
Richard Davey
4548d70369
Experimenting with new MainLoop + position interpolation. (reverted from commit e49d45e278
)
2016-07-13 02:44:35 +01:00
Richard Davey
e49d45e278
Experimenting with new MainLoop + position interpolation.
2016-07-12 03:05:29 +01:00
photonstorm
ee202667ed
Huge docs update for all of the Game Object events.
2016-07-08 11:28:30 +01:00
Richard Davey
0014201917
Groups now have the following properties, which are getters and setters: centerX
, centerY
, left
, right
, top
and bottom
. These calculate the bounds of the Group, based on all visible children, and then allow you to apply positioning based on that. This means you can, for example, now get the horizontal center of a Group by called Group.centerX
. These properties are also setters, so you can position the Groups, and it will take scale and rotation into consideration.
...
Groups have a new method `alignIn`. It allows you to align the Group within another Game Object, or a Rectangle. You can specify one of 9 positions which are the new position constants such as: `Phaser.TOP_LEFT` or `Phaser.CENTER` (see docs for the complete list). The Groups are positioned based on their child bounds, which takes rotation and scaling into consideration. You can easily place Groups into the corners of the screen, or game world, or align them within other Sprites, using this method.
Groups have a new method `alignTo`. It allows you to align a Group to the side of another Game Object, or a Rectangle. You can specify one of 11 positions which are the new position constants such as: `Phaser.TOP_LEFT` or `Phaser.LEFT_BOTTOM` (see docs for the complete list). The Groups are positioned based on their child bounds, which takes rotation and scaling into consideration. You can easily align Groups next to other Sprites using this method.
2016-07-08 01:33:42 +01:00
Richard Davey
c4d7870a31
* PIXI.Texture.fromImage, PIXI.BaseTexture.fromImage and PIXI.Sprite.fromImage have all been removed. They should never have actually been used, as they bypass the Phaser Loader, and don't factor in CORs or any other advanced loader settings.
...
* The PIXI.BaseTexture.imageUrl property has been removed, as it was never actually populated.
* The PIXI.BaseTexture._UID property has been removed, as it was never actually used internally.
* All references to PIXI.BaseTextureCache have been removed (primarily from BaseTexture.destroy and Texture.destroy), as the BaseTextureCache was never used internally by Phaser, or by our custom version of Pixi.
* PIXI.TextureCache has been removed. It was only ever used by the __default and __missing images that Phaser generates on start-up. It wasn't used internally by Phaser anywhere else, and the only references Pixi has to it have all been removed. If you need it in your own game, please refactor it to avoid it, or re-create the object on the PIXI global object.
* Canvases created by `BaseTexture.fromCanvas` no longer have the `_pixiId` property attached to them, as this was never used internally by Phaser or Pixi.
* PIXI.BaseTexture.updateSourceImage is now deprecated. Please use `Sprite.loadTexture` instead.
* The property PIXI.BaseTextureCacheIdGenerator has been removed, as it is no longer used internally by Phaser or Pixi.
* PIXI.Texture.addTextureToCache has been removed. The PIXI Texture Cache was never actually used by Phaser, and was leading to complications internally.
* PIXI.Texture.removeTextureFromCache has been removed. The PIXI Texture Cache was never actually used by Phaser, and was leading to complications internally.
* PIXI.Texture.fromFrame and PIXI.Sprite.fromFrame have been removed. They relied on the PIXI Texture Cache, which was never actually used by Phaser, and was never used internally by Pixi either.
* The property PIXI.TextureCacheIdGenerator has been removed, as it was not used internally.
* The property PIXI.FrameCache has been removed, as it was not used internally.
2016-07-06 21:47:27 +01:00
Richard Davey
33150018ad
Text.fontPropertiesCanvas no longer uses a CanvasPool entry.
2016-07-06 20:59:28 +01:00
photonstorm
0036bf747f
BitmapData has a new, optional, fifth argument: skipPool
. By default BitmapData objects will ask for the first free canvas found in the CanvasPool, but this behavior can now be customized on a per object basis.
2016-07-04 12:57:08 +01:00
photonstorm
32bec66031
Docs update.
2016-06-29 16:18:54 +01:00
Richard Davey
a0c771d47e
Text.setText has a new optional argument immediate
which will re-create the texture immediately upon call, rather than wait for the next render pass to do so (thanks @Scraft #2594 )
2016-06-27 22:42:01 +01:00
Richard Davey
8c5cea066a
Updated docs.
2016-06-23 00:45:24 +01:00
photonstorm
bd30181a2a
Docs update.
2016-06-20 12:18:39 +01:00
photonstorm
47f0224a40
Phaser 2.4.9 release.
2016-06-17 01:11:24 +01:00
photonstorm
9dd745167c
Docs fix.
2016-06-16 17:18:49 +01:00
photonstorm
4da3b15ae2
Renamed alignTo to alignIn, and added the new method alignTo, to allow for Sprite to Sprite alignment. Updated all of the Bounds and TS defs.
2016-06-16 17:01:51 +01:00
photonstorm
5bcf84f5a4
Added offsetX and offsetY arguments to Bounds.alignTo.
2016-06-16 15:51:12 +01:00
Richard Davey
ed8fbd9a6c
All Game Objects with the Bounds component; which includes Sprites, Images, Text, BitmapText, TileSprites and anything that extend these, now have a new method alignTo
. It allows you to align the Game Object to another Game Object, or a Rectangle. You can specify one of 9 positions which are the new constants: Phaser.TOP_LEFT
, Phaser.TOP_CENTER
and so on (see above for the complete list). The Game Objects are positioned based on their Bounds, which takes rotation, scaling and anchor into consideration. You can easily place Sprites into the corners or the screen or game world, or align them against other Sprites, using this method.
2016-06-16 02:00:46 +01:00
Richard Davey
0efcf68b21
The Game Object Bounds component has been updated to include two new properties: centerX
and centerY
. This means you can, for example, now get the horizontal center of a Sprite by called Sprite.centerX
. These properties are also setters, so you can position the Game Objects, and it will take scale and anchor into consideration.
2016-06-16 01:00:11 +01:00
Richard Davey
123e61c018
The Game Object Bounds component has been updated so that it now provides setters for all of the properties, as well as getters. Previously Sprite.left
, Sprite.right
, Sprite.top
and Sprite.bottom
were read-only, but they are now available to be set as well, and take into consideration the anchor and scale of the Game Objects.
2016-06-16 00:33:48 +01:00
photonstorm
bc00c900e9
BitmapData.smoothProperty is a new property that holds the string based prefix needed to set image scaling on the BitmapData context.
...
BitmapData.copyTransform allows you to draw a Game Object to the BitmapData, using its `worldTransform` property to control the location, scaling and rotation of the object. You can optionally provide
BitmapData.drawGroup now uses the new `copyTransform` method, to provide for far more accurate results. Previously nested Game Objects wouldn't render correctly, nor would Sprites added via `addChild` to another Sprite. BitmapText objects also rendered without rotation taken into account, and the Sprites smoothing property was ignored. All of these things are now covered by the new drawGroup method, which also handles full deep iteration down the display list.
2016-06-14 15:29:56 +01:00
photonstorm
fb3f7721cb
Working through updating BitmapData.copy to use the source matrix instead, so it retains the correct draw sequence order.
2016-06-13 17:01:33 +01:00
Richard Davey
a180882d27
Fixed the data object not being created.
2016-06-06 00:31:46 +01:00
photonstorm
96711f4db9
Added the Weapon Plugin and worked lots on its docs.
2016-06-03 15:09:43 +01:00
Richard Davey
097add1aa6
Game Objects including Sprite, Image, Particle, TilemapLayer, Text, BitmapText and TileSprite have a new property called data
. This is an empty Object that Phaser will never touch internally, but your own code, or Phaser Plugins, can store Game Object specific data within it. This allows you to associate data with a Game Object without having to pollute or change its class shape.
2016-06-03 01:08:32 +01:00
photonstorm
a81fe3cf02
jshint fixes.
2016-06-02 15:38:05 +01:00
photonstorm
21b5492e98
Video.onComplete wouldn't fire on iOS if the user hit the 'Done' button before the video had finished playing. It now uses the webkitendfullscreen
event to detect this, and dispatches the onComplete
signal should that event fire (thanks @kelu-smiley #2498 )
2016-06-02 15:26:11 +01:00
Richard Davey
56cc7dc155
Merge pull request #2519 from TadejZupancic/patch-1
...
Fixing measurement of text width that produced too narrow canvas
2016-06-02 14:53:17 +01:00
TadejZupancic
317c85db90
Fixing measurement of text width that produced too narrow canvas
...
When using a style on characters (e.g. addColor), the length of the whole line with default style was measured ignoring the different width of the characters with added style.
I've included the measureLine function, which does the same measurements as updateLine, but it does not render the line to canvas - it only returns the line length.
Now this function is used for measuring line of text if some style is added to it.
2016-06-02 11:10:40 +02:00
kevinleedrum
c1a2970488
Fixing issue #2496 : Wrapped BitmapText not centering
2016-05-24 09:09:38 -04:00
photonstorm
a6a2c61240
Sprites that had a tint on them, that then had their frame changed via either Sprite.frame
or Sprite.frameName
wouldn't re-tint the new frame, and would become stuck on the old frame in Canvas mode (thaks @spayton #2453 )
2016-05-17 21:04:40 +01:00
photonstorm
4fd2524c61
Text.setStyle has a new argument update
which will optionally automatically call updateText
after setting the new style (thanks @staff0rd #2478 )
2016-05-16 12:55:27 +01:00
photonstorm
f34b567295
BitmapData.copy, and by extension any method that uses it, including BitmapData.draw, drawGroup and drawFull, now all support drawing RenderTexture objects. These can either be passed directly, or be the textures of Sprites, such as from a call to generateTexture.
2016-05-12 03:48:14 +01:00
photonstorm
1d18c70371
BitmapData.drawGroupProxy is now capable of iterating through Sprites that have children, and also now uses the world positions for drawing instead.
2016-05-11 16:38:42 +01:00
photonstorm
1adece490a
Docs update.
2016-05-04 02:02:13 +01:00
Lewis Pollard
719b4bb7f6
Alter BitmapText to use toString on text parameter in constructor
...
The BitmapText property accessor for the text property uses toString on the value passed in, meaning Numbers can be passed in as the text value with no problem. However, passing a Number into the constructor results in the following exception as it isn't implicitly converted to a string in a similar manner.
phaser.js:71890 TypeError: text.substr is not a function
at Phaser.BitmapText.updateText (http://localhost/phaser/build/phaser.js:56283:21 )
at new Phaser.BitmapText (http://localhost/phaser/build/phaser.js:56034:10 )
at Phaser.GameObjectFactory.bitmapText (http://localhost/phaser/build/phaser.js:46318:26 )
at Object.Boot.create (http://localhost/phaser/:46:34 )
at Phaser.StateManager.loadComplete (http://localhost/phaser/build/phaser.js:29240:35 )
at Phaser.Loader.finishedLoading (http://localhost/phaser/build/phaser.js:71446:25 )
at Phaser.Loader.processLoadQueue (http://localhost/phaser/build/phaser.js:71403:18 )
at Phaser.Loader.asyncComplete (http://localhost/phaser/build/phaser.js:71476:14 )
at Phaser.Loader.xmlLoadComplete (http://localhost/phaser/build/phaser.js:72413:14 )
at .<anonymous> (http://localhost/phaser/build/phaser.js:72236:34 )
This simply mimics the logic in the property accessor by running toString on the text value and using an empty string if null to allow Numbers to be passed into the constructor.
2016-04-13 15:24:29 +01:00
photonstorm
b9f62e77e6
You can now pass a TilemapLayer as a Texture to a TileSprite. A limitation of this is that if you pass it to a TileSprite it will make a fill pattern from the TilemapLayer at that instant it's passed, and it won't keep track of the layer in future should it update (thanks @jdnichollsc #1989 )
2016-04-07 03:45:21 +01:00
photonstorm
fc7b5c79e3
Graphics objects can now have a Physics Body directly attached to them, where-as before it would throw an error due to a lack of anchor property (thanks @NLilley #2400 )
2016-04-07 00:14:41 +01:00
photonstorm
0945083a4b
Removed further mentions of RenderTexture re: TileSprite.
2016-04-06 23:58:34 +01:00
photonstorm
b3757ed862
jsdocs update #2384
2016-04-06 02:33:29 +01:00
Richard Davey
71056ccb69
Merge pull request #2371 from stoneman1/dev
...
Fixed video for future
2016-04-06 01:08:22 +01:00
photonstorm
4d69b13977
Passing a BitmapData to a TileSprite as a texture would fail if the BitmapData had not been previously added to the cache. It now uses the new frameData property (thanks @mzamateo @lucap86 #2380 )
2016-04-06 00:44:55 +01:00
photonstorm
c33b53fa95
BitmapData has a new property frameData
which is a Phaser.FrameData container instance. It contains a single Frame by default, matching the dimensions of the entire BitmapData, but can be populated with additional frames should you wish to create animations from dynamic BitmapData textures.
2016-04-06 00:43:21 +01:00
photonstorm
f9949166be
Text that used fonts which had numbers in their names wouldn't be correctly rendered unless you explicitly set the font property after creation. You can now pass font names with numbers in them as the font style object correctly (thanks @And-0 #2390 )
2016-04-04 23:20:04 +01:00
photonstorm
bc4b828b51
BitmapData.copy, and by extension draw, drawFull, drawGroup, etc, would incorrectly handle drawing a tinted Sprite if it was using a frame from a texture atlas (thanks @PhaserDebugger #2405 )
2016-04-04 22:53:13 +01:00
photonstorm
f40cfbe2ae
2015 - 2016.
2016-04-04 22:16:16 +01:00
photonstorm
12f3bd6cc5
The Destroy component will now call TweenManager.removeFrom, removing any active tweens from the TweenManager upon the Game Objects destructions (thanks @PokemonAshLovesMyTurkeyAndILikeYouTwo #2408 )
...
Tween.update will now return `false` (flagging the Tween for destruction) should the Tween.target property every become falsey. This can happen if the object the Tween was tracking is destroyed, nulled or generally removed..
2016-04-04 22:06:16 +01:00
Richard Davey
8e880eddee
Merge pull request #2402 from jakewilson/dev
...
Added ability to kill a Game Object when it leaves camera bounds.
2016-04-04 21:52:30 +01:00
photonstorm
63b3b3e887
Negative lineSpacing in Text objects will no longer crop the bottom pixels off lines of text (thanks @gaelenh #2379 #2374 )
2016-04-04 21:36:37 +01:00
photonstorm
f9ff892510
Formatting.
2016-04-04 21:25:21 +01:00
slash
fbdf8073ad
Add "maxLines" style attribute to Text object, maximum number of lines
...
to be shown for wrapped text or 0 for no limit. (default).
2016-04-03 10:08:35 -05:00
Jake Wilson
ae663f97aa
Added ability to kill a Game Object when it leaves camera bounds.
2016-03-28 20:34:00 -04:00
Stoneman1
ee335fe466
Fixed backwards compatibility issue.
2016-03-02 13:28:44 +02:00
Stoneman1
5bdc1c05b4
MediaStream.stop() deprecated. Using MediaStreamTrack.stop() instead.
2016-03-02 12:34:28 +02:00
photonstorm
17071b578c
BaseTexture.destroy wasn't correctly removing the texture from the BaseTextureCache if it was a cached CanvasPool entry (such as Text objects use), causing drawImage errors in Canvas mode, and just blank textures in WebGL (thanks @civet #2339 )
2016-02-18 12:59:40 +00:00
Richard Davey
b629539176
SpriteBatch incorrectly applied the PIXI SpriteBatch prototype over the top of Phaser.Group meaning that Sprites with animations wouldn't render correctly (thanks @qdrj #1951 )
2016-02-17 03:23:56 +00:00
Richard Davey
0c52b9316a
Text with lineSpacing set wouldn't apply the lineSpacing to the final line of text in the Text string, or to text with just single lines. This could lead to incorrect height calculations for further layout and unwanted padding at the bottom of Text objects (thanks @Lopdo #2137 )
2016-02-17 03:14:51 +00:00
photonstorm
5bcfa08af6
Text.useAdvancedWrap allows you to swap between the Basic and the Advanced word wrapping functions. In Advanced it will wrap long-words and condense and trim excess white space (thanks @soldoutactivist #1811 )
2016-02-04 16:00:21 +00:00
Richard Davey
a4c5fb9660
BitmapData.drawGroup can now handle drawing Emitters and BitmapText objects that are part of the Group.
2016-02-03 23:08:54 +00:00
Richard Davey
10209dc8f5
GameObject.revive used to add the health amount given to the Game Object (via heal
) instead of setting it as the new health amount. It now calls setHealth
instead, giving it the exact amount (thanks @netgfx #2231 )
...
GameObject.revive will now set the health amount to 100 instead of 1, bringing it in-line with the `maxHealth` default value.
2016-02-03 21:44:06 +00:00
Richard Davey
034428e92c
Sprite (and all Game Objects) have a new argument in their destroy method: destroyTexture
. This boolean (which is false by default) controls if the BaseTexture of the Game Object should be destroyed or not. This is extremely useful in situations where you've got a lot of dynamic assets you no longer need, such as textures created from BitmapDatas. You must set the destroyTexture
argument yourself. This can be done in a custom Game Object destroy method or as part of your state shutdown ( #2261 )
2016-02-03 11:41:37 +00:00
Richard Davey
8043d29aa6
BitmapData would always create a private _swapCanvas
which was a clone of its main canvas used for advanced movement operations. This no longer happens. The swap canvas is created only as needed, by those functions that use it (specifically moveH
and moveV
), meaning a BitmapData will now use half the amount of memory it used to, and you'll have half the amount of canvas DOM elements created (unless you make heavy use of the move functions).
2016-02-03 11:41:37 +00:00
Richard Davey
75d6bbb251
Updated defs and improved jsdocs for #2277
2016-02-02 23:37:08 +00:00
Richard Davey
d4edbe6619
Merge pull request #2277 from slashman/exposeWrappedLinesOnText
...
Alow precalculating the results of text wrapping.
2016-02-03 01:32:49 +02:00
Richard Davey
88f1ea95d2
Fixed BitmapText.cleanText so it works properly with new-lines within the text.
...
BitmapText would crash if it tried to render a character that didn't exist in the font set. Any character that doesn't exist in the font set now renders a space character instead.
BitmapText would load and parse the kerning data from the font, but would never use it when rendering. The kerning values are now applied on rendering as well (thanks @veu #2165 )
2016-02-02 22:54:01 +00:00
Richard Davey
bceca55c8f
Merge pull request #2222 from FracturedShader/patch-2
...
Update BitmapData.shiftHSL, limitValue -> clamp
2016-02-02 02:31:54 +02:00
Richard Davey
5893224f10
The Style object passed in to Phaser.Text is now cloned instead of referenced. This means you can adjust single Text instances without invaliding other Text objects using the same style object (thanks @asyncanup #2267 )
2016-02-02 00:29:46 +00:00
Richard Davey
34aff350eb
The Video game object used an anonymous bound function for both the 'ended' and 'playing' event listeners, meaning that they were never removed properly (thanks @ramalhovfc #2303 )
2016-02-02 00:18:50 +00:00
Richard Davey
1d2d707b32
Merge pull request #2168 from nlotz/dev
...
fix typos in API docs
2016-02-01 19:01:58 +02:00
Richard Davey
e551254b52
Merge pull request #2209 from FracturedShader/patch-1
...
Update BitmapData.setHSL to accept 0
2016-02-01 18:57:29 +02:00
Richard Davey
76e2dc66ee
Fixed docs ( #2216 )
2016-02-01 16:42:03 +00:00
Richard Davey
37d9b3402d
Merge pull request #2226 from milkey-mouse/fix-retrofont-smoothed
...
Change RetroFont.smoothed from string to boolean
2016-02-01 18:32:22 +02:00
photonstorm
d7b6d4e784
jshint fix (missing semi-colon)
2016-01-13 16:15:46 +00:00
photonstorm
70437a0bdd
Clean text automatically on creation.
2016-01-13 15:18:42 +00:00
photonstorm
6a868cba5e
BitmapText.cleanText is a new method that will scan the given text and either remove or replace all characters that are not present in the font data. It is called automatically by BitmapText.updateText
.
2016-01-13 15:15:51 +00:00
photonstorm
36d9c8d673
Changed from a space to '' and added 'replace' argument.
2016-01-13 15:14:14 +00:00
slash
5cc6b5962b
Add missing assignations required for wrapping calculations to work
...
correctly
2016-01-03 16:54:27 -05:00
slash
ef7c2c6275
Alow precalculating the results of text wrapping. This may be useful for
...
example if the developer wants to control pagination, in which case
he may know in advance the total number of lines the text will wrap to,
and then set it on batches.
2016-01-03 16:33:33 -05:00
Robert Plante
8f1450ecca
Update to BitmapData.setHSL to follow conventions
2015-11-23 12:46:12 -05:00
Milkey Mouse
19845eb691
Changed RetroFont.smoothed from string to boolean
2015-11-22 21:37:28 -08:00
Robert Plante
45195848bc
Update BitmapData.shiftHSL, limitValue -> clamp
...
`math.limitValue` does not exist so it was changed to `math.clamp` which provides the desired functionality.
2015-11-17 15:34:42 -05:00
Robert Plante
e236cac1e6
Update setHSL
...
Checking `if (h)` yields `false` when `h = 0`, but 0 is an acceptable value here. Had to decide between caching HSL verification and doing `typeof` 3x/pixel and opted for the temporary variables.
2015-11-17 14:15:26 -05:00
photonstorm
609b38c6e1
BitmapData.update causes a snowballing memory leak under WebGL due to a Context.getImageData call. BitmapData.clear used to call update automatically but no longer does. This resolves the issue of the Debug class causing excessive memory build-up in Chrome. Firefox and IE were unaffected (thanks @kingjerod #2208 )
2015-11-17 14:07:56 +00:00
photonstorm
1c169ef571
Video jsdoc fixes.
2015-11-02 11:51:15 +00:00
Richard Davey
799efa3079
You can use the new const Phaser.PENDING_ATLAS
as the texture key for any sprite. Doing this then sets the key to be the frame
argument (the frame is set to zero). This allows you to create sprites using load.image
during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.
2015-10-31 01:04:14 +00:00
nlotz
da45d04a70
fix typos in API docs
2015-10-27 09:10:14 +01:00
photonstorm
efc69ff463
Buttons (or any Sprites) that don't have a texture, but have children, would incorrectly render the children under WebGL due to the baseTexture.skipRender property (thanks @puzzud #2141 )
2015-10-16 16:44:51 +01:00
photonstorm
45d92d4217
ScaleMin and ScaleMax stopped working in Phaser 2.3.0 due to an incorrect transform callback scope (thanks @brianbunch #2132 )
2015-10-13 13:32:55 +01:00
photonstorm
84373dc478
Removed use of the tilePosition
property in the Phaser.Rope class as it isn't implemented and caused calls to Rope.reset
to crash (thanks @spayton #2135 )
2015-10-13 12:20:02 +01:00
Richard Davey
e097a1227e
Merge pull request #2052 from nickryall/fix-for-text-centered-on-sprite
...
adjust wrapped text that is centered to sprite via anchor
2015-10-13 13:50:11 +03:00
photonstorm
e01a754732
Removed the FrameDebugger and moved to its own branch.
2015-10-12 11:10:37 +01:00
Richard Davey
8899eddd9a
BitmapData.clear now automatically calls BitmapData.update at the end of it.
2015-09-29 14:02:26 +01:00
Richard Davey
5a275f14a8
Removing dead code.
2015-09-28 03:26:27 +01:00
photonstorm
de5283b989
The default Button.onOverMouseOnly value has changed from false
to true
. If you used this in your touch enabled games then please be aware of this change ( #2083 )
2015-09-22 15:24:52 +01:00
Richard Davey
9f08442304
Merge pull request #2103 from pnstickne/wip-2062
...
Fixes #2062 and forward-support for pointer modes
2015-09-22 17:14:32 +03:00
Paul
31e5202eff
Fixes #2062 and forward-support for pointer modes
...
Impact:
- *none for touch devices*
- *low* / 'expected behavior' for mouse devices
Adds a PointerMode enumeration value for better simple input
discrimination in the future.
The added Button#justReleasedPreventsOver controls if a just-release event
on a pointer prevents it from being able to trigger an over event.
The default value is PointerMode.CONTACT which means this 'release guard'
applies only to touch inputs.
It should fix #2062 as Mouse (PointerMode.CURSOR) input is not caught in the default.
Also expands Button#forceOut to accept a PointerMode value such that it
can be controlled per-input mode.
This is a configurable partial revert of a possibly rogue commit in 2.1.3
and the behavior persists through 2.4.3.
2015-09-22 01:12:43 -07:00
Richard Davey
61edd1b458
FrameDebugger can now handle Text and BitmapText.
2015-09-16 03:18:15 +01:00
photonstorm
8db23545da
jsdoc updates.
2015-09-10 15:57:55 +01:00
Richard Davey
d7a42370a4
BitmapData.move, moveH and moveV have a new optional wrap
argument allowing you to control if the contents of the BitmapData are wrapped around the edges (true) or simply scrolled off (false).
2015-09-07 01:16:43 +01:00
photonstorm
8833a509eb
jsdoc fix.
2015-09-02 16:16:52 +01:00
nickryall
ca795af457
adjust wrapped text that is centered to sprite via anchor
2015-09-02 10:50:03 +12:00
Richard Davey
41906c5ac1
When the Text width was being calculated it would add the strokeThickness
value twice, causing an alignment offset (thanks @nickryall #2039 )
2015-08-31 11:33:18 +01:00
Paul
26a6338072
Change splice.call(arguments, ..) to use slice
...
- Bypasses issue of usage incorrectly omitting 2nd argument to `splice`
- More clear of intent; `slice` does not modifify `arguments`
- `slice` is faster across all desktop browsers, by varying degrees
- Probably due to parameter-aliasing and de-opts when modified.
- Both `slice` and `splice` create a new Array object
2015-08-26 23:50:16 -07:00
Ben Sparks
b7efb93698
utilize the heal method instead of just adding to health when reviving, so that maxHealth is respected
2015-08-25 14:42:02 -07:00
photonstorm
4fa1ffb4cf
JSDocs update.
2015-08-20 12:47:59 +01:00
Richard Davey
994a7dae73
jsdoc fix #2013
2015-08-19 22:19:55 +01:00
photonstorm
103c37cd42
BitmapData.drawFull draws the given Game Object or Group to a BitmapData and then recursively iterates through all of its children, including children of Game Objects and Groups. It can draw Text, BitmapText, Sprites, Images, Emitters and Graphics objects. It's perfectly valid to pass in game.world
as the parent object, and it will iterate through the entire display list.
2015-08-19 14:19:26 +01:00
photonstorm
176289f514
Video.stop now removes the 'playing' event listener, which stop Videos set to loop from throwing errors after being destroyed.
2015-08-18 16:04:10 +01:00
photonstorm
b1a05a6f52
BitmapText.font failed to pull the new font from the Phaser Cache, stopping it from updating properly (thanks @AbrahamAlcaina #2001 )
2015-08-18 13:48:08 +01:00
Richard Davey
7fbeb1c062
BitmapData.line draws a line to the BitmapData in the color and thickness specified.
...
Lots of BitmapData updates to use local vars and 'op' property, cutting down code size.
2015-08-07 02:48:00 +01:00
Richard Davey
62c87052cb
Merge pull request #1985 from yahiko00/master
...
Extra documentation and TypeScript definition file update
2015-08-06 14:20:26 +01:00
Yahiko Uzumaki
0416c6a9ee
Update BitmapData.js
...
Fix explanation.
2015-08-06 13:57:43 +02:00
yahiko
d412431947
Add extra information for the imageData property.
2015-08-06 13:49:51 +02:00
photonstorm
9a0b6c24a4
Text can now accept undefined
or null
as the text
argument in the constructor and will cast it as an empty string.
2015-08-06 10:28:49 +01:00
Richard Davey
7fc23c9abe
Text.setTextBounds didn't add the x and y values to the width and height offsets.
2015-08-04 23:06:07 +01:00
photonstorm
1fed360659
VideoStream.active = false is used if the browser supports it, otherwise it falls back to VideoStream.stop.
2015-08-04 15:48:43 +01:00
photonstorm
e901fb80f6
Merging in the CanvasPool changes to the core.
2015-08-03 14:46:55 +01:00
photonstorm
50516e3d34
Testing CanvasPool.
2015-08-03 14:33:12 +01:00
photonstorm
4e857f19f6
BitmapText with tints applied wouldn't update properly in Canvas mode (thanks @Pajamaman #1969 )
2015-08-03 11:51:04 +01:00
Richard Davey
9362a2b1f4
Text with tints applied wouldn't update properly in Canvas mode.
2015-07-31 19:09:49 +01:00
Richard Davey
cbc68ab4c9
Merge pull request #1950 from jdnichollsc/dev
...
Added Text.addFontStyle and Text.addFontWeight
2015-07-31 16:00:47 +01:00
photonstorm
d23e5d6eba
BitmapText.smoothed is a new boolean property that allows you to set texture smoothing on a bitmap font or not. By default smoothing is always on, but you can turn it off which helps for bitmap fonts created from pixel art style character sets.
2015-07-31 15:58:00 +01:00
photonstorm
4b22f48c75
2.4.2 release.
2015-07-29 15:01:04 +01:00
Juan David Nicholls Cardona
655013da1b
Added Text.addFontStyle and Text.addFontWeight allows you to set styles and weights font within the Text.
2015-07-28 02:05:08 -05:00
photonstorm
9a83ddcab9
Updated to latest Creature runtimes, added to GameObjectFactory.
2015-07-23 13:25:08 +01:00
photonstorm
858ad51610
Phaser 2.4 release.
2015-07-22 15:31:30 +01:00
photonstorm
ffaa7d711f
Removed BaseTextureCache requirement from BitmapData.
...
Fixed jshint.
Updated TS defs.
2015-07-22 13:23:40 +01:00
photonstorm
915a757f96
Text.updateText will now check the width and height values of the Text canvas and if either are zero it sets Text.renderable = false
to avoid throwing WebGL texture binding errors.
2015-07-22 12:43:43 +01:00
photonstorm
f15fe6706c
All undefined argument checks were changed from if (typeof x === 'undefined')
to if (x === undefined)
removing the typeof check and saving some bytes across the codebase in the process.
2015-07-22 10:37:15 +01:00
photonstorm
7144b10ad5
TileSprites fixed for WebGL.
2015-07-21 13:24:12 +01:00
Richard Davey
2d3b1ee383
Merge pull request #1911 from mthurlin/patch-1
...
game.make.group() did not setup parent correctly
2015-07-16 15:40:10 +01:00
Charlo
795a7c80a8
Improving JSON BitmapText implementation
2015-07-16 13:30:55 +02:00
Richard Davey
9c588d94e8
PIXI.BitmapText has been removed as a global array, as it is no longer used.
2015-07-16 01:29:32 +01:00
Richard Davey
3c7293ab57
Updated AnimationParser and fixed LoadTexture calls.
2015-07-16 01:02:59 +01:00
Richard Davey
bab50d7c88
* The Cache has been internally refactored considerably. Image data is now all stored in the same object, rather than being split across the PIXI global caches (such as PIXI.TextureCache and PIXI.BaseTextureCache), which are no longer used by Phaser.
...
* Internally the Cache now uses a single _cache object, which is partitioned to store the various different object types. Before the cache used lots of private objects, one per data type, but it's now a lot cleaner and we've managed to cut out hundreds of lines of duplicate code in the process.
* Cache.getImage has a new argument which lets you return either just the HTML Image element or the entire image cache object, which includes the baseTexture and frame data.
* Cache.getImage will return a __default image if the key isn't given, or a __missing image if the key is given but not found in the cache. This means it will always return a valid image and no longer cause Phaser to throw runtime errors deeper down with invalid image objects.
2015-07-16 00:46:28 +01:00
photonstorm
f52b553eaf
Loads more Cache optimisations and tweaks.
2015-07-15 17:06:29 +01:00
photonstorm
81b553d8ee
Ok let's start removing these 'typeof' checks.
2015-07-15 16:33:26 +01:00
photonstorm
d663d290c2
hasFrameData added and some LoadTexture updates.
2015-07-15 16:33:01 +01:00
Markus Thurlin
d360384f4a
game.make.group() did not setup parent correctly
2015-07-15 14:30:28 +02:00
Richard Davey
4dec046c40
Added pendingDestroy to Groups.
2015-07-12 11:33:30 +01:00
photonstorm
5ad3698703
BitmapData.clear has 4 new optional parameters: x, y, width and height, that define the area to be cleared. If left undefined it works exactly the same as before and clears the entire canvas.
2015-07-09 11:44:21 +01:00
Richard Davey
d027bf8ba7
BitmapData.generateTexture will take a snapshot of the BitmapDatas canvas at that moment in time and convert it into an Image, which is then stored in the Phaser image Cache based on the key given. You can then use the new texture for any future sprites or texture based objects.
2015-07-09 00:19:07 +01:00
Richard Davey
7253ac368d
jsdoc update.
2015-07-08 19:11:41 +01:00
Richard Davey
3590272c51
All Game Objects have a new boolean property called pendingDestroy
. If you set this to true
then the object will automatically destroy itself in the *next* logic update, rather than immediately. This is useful for cases when you wish to destroy an object from within one of its own callbacks, such as with buttons or other input events (thanks @alamboley #1748 )
2015-07-08 18:52:01 +01:00
photonstorm
64b1794d67
Rope.segments used the wrong vertices property, causing a runtime error.
...
Debug.ropeSegments didn't take the scale of the Rope object into consideration, causing incorrect debug rendering.
2015-07-08 16:40:26 +01:00
photonstorm
47e1d16a6d
jshint fix.
2015-07-08 16:00:03 +01:00
photonstorm
3012e49937
Text.addColor would incorrectly color the text stroke if set (thanks @llevkin #1893
...
Text.addStrokeColor works in the same way as `Text.addColor` but allows you to define a color stop for the stroke color instead of the fill color.
2015-07-08 12:52:39 +01:00
Richard Davey
86cac2085c
BitmapData.move(x, y) allows you to shift the contents of the BitmapData horizontally and vertically by the given amounts. The image wraps-around the edges of the BitmapData.
...
BitmapData.moveH(distance) allows you to horizontally shift the BitmapData with wrap-around the edges.
BitmapData.moveV(distance) allows you to vertically shift the BitmapData with wrap-around the edges.
2015-07-08 04:26:28 +01:00
Richard Davey
a7e18137d1
Text has a new style property: tabs. This allows you to specify a pixel value (or values) that allows you to space out text that contains tab characters within it. Text.tabs
can be either an integer, in which case all tabs share the same spacing, or an array of pixel values corresponding exactly to the number of tabs per line of text. This allows you to easily align columns of data in a single Text object.
2015-07-08 01:15:31 +01:00
Richard Davey
3066f60f11
parseList support added.
2015-07-08 00:03:03 +01:00
Richard Davey
2e447ec01d
Tidied up tab handling a little.
2015-07-07 23:41:37 +01:00
Richard Davey
ae08b9ac02
Text tab support working. Now to add varying tab sizing.
2015-07-07 23:31:44 +01:00
Richard Davey
b8cc4d9d53
Updated Text resolution handling.
2015-07-07 20:48:00 +01:00
photonstorm
9548fb9856
Final textBounds updates.
2015-07-07 15:16:23 +01:00
photonstorm
a89d48b9a6
Text.autoRound allows you to control if the text is allowed to render at sub-pixel coordinates or not. Set to true
to round the coordinates, often eliminating anti-aliasing from certain font types ( #1867 )
2015-07-02 13:39:59 +01:00
Richard Davey
2b7666e22d
Added toString to the constructor parameter.
2015-07-01 23:37:48 +01:00
photonstorm
8356aacaa8
Trying out new Text pivot and mute handling.
2015-06-24 19:57:40 +01:00
photonstorm
a69c156526
The Text Bounds is a rectangular region that allows you to align your text within it, regardless of the number of lines of text or position within the world. For example in an 800x600 sized game if you set the textBounds to be 0,0,800,600 and text alignment to 'left' and vertical alignment to 'bottom' then the text will render in the bottom-right hand corner of the game, regardless of the size of font you're using or the number of lines in the text itself.
...
Set the Style properties `boundsAlignH` and `boundsAlignV` or adjust them via the Text setters to change the alignment.
It works by calculating the final position based on the Text.canvas size, which is modified as the text is updated. Some fonts have additional padding around them which you can mitigate by tweaking the Text.padding property.
Setting a textBounds _doesn't_ update the wordWrapWidth, so be aware of the relationship between the two.
Call this method with nothing defined for any of the parameters to reset an existing textBounds.
#1824
2015-06-17 17:18:04 +01:00
photonstorm
0258245f12
Phaser.Text no longer extends PIXI.Text but replaces it entirely. Phaser.Text now natively extends a Phaser Sprite, meaning it can be enabled for physics, damaged, etc.
2015-06-17 13:21:28 +01:00
photonstorm
102c74e121
Deprecated the following:
...
* Camera.screenView
* ScaleManager.maxIterations
* ScaleManager.enterPortrait (see onOrientationChange)
* ScaleManager.enterLandscape (see onOrientationChange)
* ScaleManager.enterFullScreen (see onFullScreenChange)
* ScaleManager.leaveFullScreen (see onFullScreenChange)
* ScaleManager.fullScreenFailed (see onFullScreenError)
* ScaleManager.checkResize
* ScaleManager.checkOrientation
* ScaleManager.setScreenSize (see updateLayout)
* ScaleManager.setSize (see reflowCanvas)
* ScaleManager.checkOrientationState (see reflowCanvas)
* ScaleManager.orientation (see screenOrientation)
* Gamepad.disabled (see enabled)
* Input.currentPointers (see totalActivePointers)
* Input.disabled (see enabled)
* Keyboard.disabled (see enabled)
* Mouse.disabled (see enabled)
* Mouse.mouseMoveCallback (see Input.addMoveCallback)
* MSPointer.disabled (see enabled)
* Touch.disabled (see enabled)
* Cache.getUrl (see getURL)
* Math.truncate (see Math.trunc)
* Math.snapToInArray (see Phaser.ArrayUtils.findClosest)
* Math.interpolateFloat (see Math.linear)
* Math.normalizeLatitude (use Phaser.Math.clamp(lat, -90, 90))
* Math.normalizeLongitude (use Phaser.Math.wrap(lng, -180, 180))
* Math.chanceRoll (use Phaser.Utils.chanceRoll)
* Math.numberArray (use Phaser.ArrayUtils.numberArray)
* Math.numberArrayStep (use Phaser.ArrayUtils.numberArrayStep)
* Math.limitValue (use Phaser.Math.clamp)
* Math.randomSign (use Phaser.Utils.randomChoice(-1, 1))
* Math.angleLimit (use Phaser.Math.clamp)
* Math.getRandom (use Phaser.ArrayUtils.getRandomItem)
* Math.removeRandom (use Phaser.ArrayUtils.removeRandomItem)
* Math.floor (use Math.trunc)
* Math.ceil (use Phaser.Math.roundAwayFromZero)
* Math.shift (use Phaser.ArrayUtils.rotate)
* Math.shuffleArray (use Phaser.ArrayUtils.shuffle)
* Math.distanceRounded (do the rounding locally)
* Canvas.getOffset (see Phaser.DOM.getOffset)
* Canvas.getAspectRatio (see Phaser.DOM.getAspectRatio)
* TilemapLayer.tileColor (use TilemapLayer.debugSettings.missingImageFill)
* Phaser.ArrayList alias removed, now use Phaser.ArraySet
* Utils.transposeArray (see Phaser.ArrayUtils.transposeMatrix)
* Utils.rotateArray (see Phaser.ArrayUtils.rotateMatrix)
* Utils.shuffle (see Phaser.ArrayUtils.shuffle)
2015-06-17 03:14:31 +01:00
photonstorm
8cf28fede7
maxHealth is a new property that Game Objects with the Health component receive and works in combination with the heal
method to ensure a health limit cap.
2015-06-17 02:00:04 +01:00
photonstorm
b725c25702
Button game objects now have Input.useHandCursor
set to true
by default.
2015-06-17 01:55:36 +01:00
Richard Davey
0b82a68717
Merge pull request #1794 from stephandesouza/patch-1
...
Add a Heal Method to Phaser.Components.Health
2015-06-17 01:54:14 +01:00
Richard Davey
a7a74550a5
Merge pull request #1837 from Feenposhleen/dev
...
JSON support for BitmapFont atlases
2015-06-17 01:49:23 +01:00
photonstorm
40802314dd
TileSprite now fully supports animation again, having been broken for several versions due to a Pixi upgrade. We've updated the way TileSprites generate their textures internally considerably and animation support is back across both Canvas and WebGL as a result ( #1653 )
2015-06-17 01:25:56 +01:00
photonstorm
d931cedb69
Fixed issue with long text dropping to be shorter again.
2015-06-16 12:45:26 +01:00
photonstorm
70cf7a32bc
Fixed jshint errors.
2015-06-13 02:31:21 +01:00
photonstorm
f216313582
jsdoc and debug removal.
2015-06-12 19:21:06 +01:00
photonstorm
fa469b85e1
Added GameObjectFactory.video url parameter.
2015-06-12 19:20:50 +01:00
photonstorm
10a3df1ef5
Set the Video baseTexture to __default until the stream starts.
2015-06-10 14:21:58 +01:00
photonstorm
5458097006
Renamed createVideoStream to startMediaStream.
...
Refactored Video constructor significantly - you can no longer create a webcam stream from the constructor, as it doesn't give you time to respond to onAccess and onError signals in Firefox. Instead call startMediaStream directly having set-up your signal listeners first.
startMediaStream now has a chance to dispatch the onError signal if the webcam has been blocked entirely by the browser (auto-block or remembered block). autoPlay attribute removed to stop Firefox throwing a "Invalid URI. Load of media resource failed" error.
Tidied up Video.destroy to properly remove video element from the DOM.
2015-06-10 00:59:24 +01:00
Charlo
17a8116382
Added JSON support for BitmapFont
2015-06-06 12:35:08 +02:00
photonstorm
2b0abb67dd
onDragUpdate is a new signal that is dispatched whenever a Game object enabled for input and drag is moved by a pointer (i.e. during a drag event). See the Phaser.InputHandler.enableDrag
docs for parameter details and the new Phaser Example.
2015-06-04 20:58:00 +01:00
photonstorm
a971928bbc
jshint fixes.
2015-06-03 13:22:29 +01:00
photonstorm
560fed484f
Added BitmapText.purgeGlyphs method.
2015-06-03 05:28:24 +01:00
photonstorm
03a7b6a708
Updated Destroy component to deal with BitmapText glyphs pool.
2015-06-03 05:28:24 +01:00
photonstorm
5e265bbe86
Re-ordered carriage-return detection.
2015-06-03 05:28:24 +01:00
photonstorm
90d08fbf24
Updated jsdocs and added align parameter to method call.
2015-06-03 05:28:24 +01:00
photonstorm
fa7259fd75
Removed debug calls.
2015-06-03 05:28:24 +01:00
photonstorm
2484ced06d
Typo.
2015-06-03 05:28:24 +01:00
photonstorm
cf5238c749
Removed use of PIXI.BitmapText entirely. Moved all update and support functions to Phaser.
2015-06-03 05:28:23 +01:00
photonstorm
5054344668
The LoadTexture component has a new property: customRender which is checked for in the Core postUpdate to know when to render custom elements like Videos.
2015-05-21 15:24:39 +01:00
Gionatan Iasio
1bbb3bb903
Fix Rope.js
...
Rope creation key parameter didn't work, because PIXI.Rope requires a texture, not string.
Changed it like Sprite.
2015-05-16 19:59:12 +02:00
photonstorm
f78a4cb337
jshint fixes.
2015-05-15 01:35:20 +01:00
photonstorm
f725ac48ae
Removed all the debug information.
2015-05-15 01:27:42 +01:00
photonstorm
f2e2039009
Invalidate the texture while we wait for the new one to load (crashes IE11 otherwise)
2015-05-15 01:17:44 +01:00
photonstorm
ce27da362b
Stacks of fixes to the video stream support to get it working in Firefox.
2015-05-14 23:23:38 +01:00
photonstorm
aabeccbdac
Working but needs refining.
2015-05-14 19:10:36 +01:00
photonstorm
63887faffe
Loads of changes to deal with invalid textures and videos pending playback (i.e. Firefox)
2015-05-14 16:52:09 +01:00
photonstorm
ad4cf34d05
LoadTexture remembers texture valid state.
2015-05-14 16:52:09 +01:00
Stephan de Souza
cb89b9c293
Missed comma
2015-05-14 10:04:37 -03:00
Stephan de Souza
7fb555e70e
Adds Heal Method to Phaser.Components.Health
...
Ideal when used in games with health packs, bonus items, or healing sprites.
In fact: Doing a negative damage causes the same effect, but as a new method is better for documentation.
2015-05-13 16:55:17 -03:00
photonstorm
e6f71e959a
Graphics constructor now sets x/y parameters to zero if undefined. Before it would set them to undefined as the type check wasn't strict.
2015-05-12 13:03:26 +01:00
photonstorm
4aa22e22a1
Check texture property.
2015-05-12 13:03:26 +01:00
photonstorm
a1102d4d4d
Added re-tint reset.
2015-05-08 04:12:20 +01:00
photonstorm
2cd59bbf32
Tidying up docs and formatting.
2015-05-08 04:12:07 +01:00
photonstorm
6f351ff0c1
Texture.requiresReTint is a new property that controls if a texture requires the display object to be re-tinted having been updated internally. The LoadTexture component now sets this.
2015-05-08 04:11:48 +01:00
photonstorm
164039d7e7
Sets the re-tint state to true.
...
Removed un-needed clear call.
2015-05-08 04:10:39 +01:00
photonstorm
326cb759cf
Docs fixes.
2015-05-08 02:28:46 +01:00
photonstorm
855831e4c2
BitmapData.update now validates the width
and height
values to ensure they aren't lower than 1, which would previously cause a context error.
2015-05-08 01:49:59 +01:00
photonstorm
d2b9bfe7b8
RetroFont has been updated to use RenderTexture.renderXY, removing the need for creating a Point object each update.
...
RetroFont no longer puts any entries into the TextureCache or generates any UUIDs on instantiation, speeding up creation and lowering memory use.
2015-05-08 01:49:11 +01:00
photonstorm
e3b8fe3401
Proper setFrame call.
2015-05-07 02:45:33 +01:00
photonstorm
67704d0136
Updated Frame handling for Videos so sprites have their own frames, not a reference to the Videos frame.
2015-05-07 02:44:48 +01:00
photonstorm
af66b49f31
If a BitmapData is created with a width or height set to zero then the width and/or height are set to a default value (256) instead to avoid getContext errors.
2015-05-06 16:50:10 +01:00
photonstorm
303929a3ce
Added Video.snapshot and Video.grab support.
2015-05-06 16:47:46 +01:00
photonstorm
7cd89eedd6
jshint fixes.
2015-05-06 08:13:55 +01:00
photonstorm
7f89a3de60
Fixed video event.
2015-05-06 07:57:52 +01:00
photonstorm
d14d9f4f64
Added onAccess and onError signals and tidied up the stream handling.
2015-05-06 07:25:34 +01:00
photonstorm
a24a22742a
Enabled Stream stopping.
2015-05-06 06:11:09 +01:00
photonstorm
37304c7cc7
Added Video.createVideoStream support.
2015-05-06 06:06:02 +01:00
photonstorm
535b56bc4a
Got changeSource working properly on iOS and tidied up lots of docs.
2015-05-06 01:12:02 +01:00
photonstorm
927c14536d
Destroy will remove the listener from Video.onChangeSource.
2015-05-06 00:42:01 +01:00
photonstorm
bf25e67f5a
LoadTexture.resizeFrame lets you resize the Frame dimensions that the Game Object uses for rendering. You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData it can be useful to adjust the dimensions directly in this way.
2015-05-06 00:41:40 +01:00
photonstorm
9a563f20b9
Updated video locked status.
2015-05-05 17:03:39 +01:00
photonstorm
0cde8f874d
Mobile touch lock support done.
2015-05-05 16:25:51 +01:00
photonstorm
cc1c90d782
Removed videoSprite placeholder.
2015-05-05 14:01:47 +01:00
photonstorm
2e2d1c6bc2
Lots of updates to the Phaser.Video object.
2015-05-05 14:00:59 +01:00
photonstorm
f33082caf2
Support for Video texture updates.
2015-05-05 14:00:18 +01:00
photonstorm
90a7a3e15c
Create video + added Video to config.
2015-05-04 03:00:45 +01:00
photonstorm
8a9e0c266a
Added currentTime and duration getters.
2015-05-04 03:00:22 +01:00
photonstorm
c1ab5a3345
The first pass at the new Phaser.Video object.
2015-05-03 13:53:03 +01:00
photonstorm
f092101531
Added in support for Phaser.Video to LoadTexture component.
2015-05-03 13:53:03 +01:00
photonstorm
3578cd097c
jsdocs fix.
2015-05-03 13:53:02 +01:00
photonstorm
8290e8c371
Text.setShadow has two new optional parameters: shadowStroke
and shadowFill
. These allow you to set if the drop shadow is applied to the Text stroke, the Text fill or both of them (thanks @qdrj #1766 )
...
Text.shadowStroke and Text.shadowFill allow you to toggle if the drop shadow is applied to the Text stroke or fill independently.
2015-04-27 16:22:36 +01:00
photonstorm
cc46212d5b
Refreshes a tiling texture on change of frame.
2015-04-21 15:55:58 +01:00
photonstorm
12f8454d62
close #1755
2015-04-19 01:35:15 +01:00
photonstorm
3a61fa35f0
RenderTexture.render now takes a Matrix as its second parameter, not a Point object. This brings it in line with Pixi and allows you to perform much more complex transformations on the object being rendered. If you need to replicate the old behavior please use RenderTexture.renderXY(sprite, point.x, point.y) instead.
...
RenderTexture.render and `renderXY` would ignore the Sprites rotation or scale. The full Sprite transform is now used correctly when the Sprite is drawn to the texture. If you wish to replicate the old behavior please use `RenderTexture.renderRawXY` instead.
RenderTexture.matrix has been removed as it's no longer used.
Fixed bug in Pixi where RenderTexture.render would ignore the given matrix.
Fixed a bug in Pixi where drawing a Sprite to a RenderTexture would reset the Sprites transform to an identity Matrix.
2015-04-17 03:22:07 +01:00
photonstorm
b0e1b8facb
jsdoc fixes.
2015-04-15 01:36:25 +01:00
photonstorm
8f06991527
Added support for the [Creature Automated Animation Tool]( http://www.kestrelmoon.com/creature/ ). You can now create a Phaser.Creature object which uses json data and a texture atlas for the animations. Creature is a powerful animation tool, similar to Spriter or Spine. It is currently limited to WebGL games only, but the new libs should prove a solid starting point for anyone wanting to incorporate Creature animations into their games.
2015-04-13 23:16:29 +01:00
photonstorm
0aaa77a84d
Strict check.
2015-04-13 11:58:45 +01:00
photonstorm
0ccb3515d5
Removed dirty flag.
2015-04-13 11:58:44 +01:00
photonstorm
36c064511c
Added guards around context.getImageData
calls in BitmapData, Text and Canvas Tinting classes to avoid crashing restricted browsers like Epic Browser. Please understand that several Phaser features won't work correctly with this browser (thanks @Erik3000 #1714 )
2015-04-02 14:47:44 +01:00
photonstorm
645723f939
Sprite was missing the Health and InCamera components.
2015-03-30 13:51:47 +01:00
photonstorm
5fb1130175
The LoadTexture component has had a redundant dirty
call removed from it.
...
TileSprites were missing a `physicsType` property, causing them to not collide with anything (thanks @numbofathma #1702 )
2015-03-28 00:56:02 +00:00
photonstorm
57474c0d44
Trying out removal of dirty flag.
2015-03-27 10:47:45 +00:00
photonstorm
83adc51698
Fixed the FixedToCamera :)
2015-03-24 21:35:09 +00:00
photonstorm
12fc424305
Huge amount of jsdoc updates.
2015-03-23 23:46:09 +00:00
photonstorm
08c9513f98
Improving the Component documentation.
2015-03-23 19:56:23 +00:00
photonstorm
85c8f60d7c
Removed 'global' component arrays.
2015-03-23 19:19:07 +00:00
photonstorm
b7b622a556
Text style has a new optional property: backgroundColor
which is a Canvas fill style that is set behind all Text in the Text object. It allows you to set a background color without having to use an additional Graphics object.
...
Text.lineSpacing can now accept negative values without cutting the bottom of the Text object off. The value can never be less than the height of a single line of text.
Text.lineSpacing is no longer applied to the first line of Text, which prevents text from being cut off further down the Text object.
2015-03-23 16:12:23 +00:00
photonstorm
1486e166bd
Added physicsType property.
2015-03-23 15:04:27 +00:00
photonstorm
55048a4b25
BitmapText objects now have an anchor
property. This works in a similar way to Sprite.anchor except that it offsets the position of each letter of the BitmapText by the given amount, based on the overall BitmapText width - whereas Sprite.anchor offsets the position the texture is drawn at.
2015-03-23 15:03:53 +00:00
photonstorm
cb9ef4f12e
Text.padding specifies a padding value which is added to the line width and height when calculating the Text size. ALlows you to add extra spacing if Phaser is unable to accurately determine the true font dimensions ( #1561 #1518 )
2015-03-19 01:54:14 +00:00
breakosaur
bb600b4319
Fixed a few documentation typos.
2015-03-18 21:07:36 +00:00
photonstorm
165e5935c2
JSDoc fixes.
2015-03-18 19:14:58 +00:00
photonstorm
6cf982a4a0
Fixed to Destroy component if still in render loop.
2015-03-11 01:44:46 +00:00
photonstorm
0516167c3d
Finally tracked down the rogue bug causing Graphics objects to not work with various components ( fix #1654 )
2015-03-10 14:23:49 +00:00
photonstorm
ed3afed2ff
Fixed spelling mistake.
2015-03-05 14:00:57 +00:00
Richard Davey
7eb73e99a8
Merge pull request #1648 from pnstickne/wip-components-docs
...
Component documentation
2015-03-01 10:46:55 +00:00
Paul
4de95c09b5
Component documentation
...
- Required changes for documentation to show up correctly
- Uses multiple @extends, which currently [mostly] works in jsdoc
and like closure compiler
2015-02-28 23:00:17 -08:00
Paul
ee34327c93
Components: bug fixes
...
- Use property check ('in') to avoid property access
- Promoted 'body' property for physics
2015-02-28 17:49:45 -08:00
Paul
0e5272b217
Merge remote-tracking branch 'upstream/dev' into wip-components-toproto
...
Conflicts:
src/gameobjects/Image.js
src/gameobjects/Rope.js
src/gameobjects/Sprite.js
src/gameobjects/Text.js
src/gameobjects/TileSprite.js
src/gameobjects/components/Core.js
2015-02-28 15:51:47 -08:00
photonstorm
a69e53f901
Copyright date change.
2015-02-25 03:36:23 +00:00
photonstorm
ae7a1fda05
Optimised preUpdate callbacks.
2015-02-25 02:49:50 +00:00
photonstorm
72530d963b
Default exists should be true!
2015-02-25 02:49:19 +00:00
photonstorm
c799dfe7da
Fixed physics postUpdate issue causing particles and all kinds of things to go awry.
2015-02-25 02:18:05 +00:00
photonstorm
ec19abb91c
Component preUpdate changes.
2015-02-25 00:59:27 +00:00
photonstorm
c9939f8691
Tilemap fix #1635
2015-02-24 22:57:59 +00:00
Paul
4f747a1c00
Components - moving install to prototype
...
- This ensures the components are regsitered once per type
instead of once per instance (which is duplicate work)
2015-02-22 20:44:11 -08:00
photonstorm
8b7085e20a
RenderTexture guards.
2015-02-22 19:30:43 +00:00
photonstorm
3d0bc682f0
Moved Events.
2015-02-19 05:00:55 +00:00
photonstorm
88f10f7f89
Updated fixedToCamera docs to reflect non-nesting ( #1596 )
2015-02-18 22:58:48 +00:00
photonstorm
58d37b51fe
Fixed canvas destroy if undefined.
2015-02-18 14:54:11 +00:00
photonstorm
f59d7e3430
Working through Graphics class updates.
2015-02-17 16:40:41 +00:00
photonstorm
77a3bfea23
loadTexture guard.
2015-02-17 15:48:54 +00:00
photonstorm
5b0c751647
Animation component guard.
2015-02-17 15:48:43 +00:00
photonstorm
167bbde8d4
Game Objects all now using the new Components mixins.
2015-02-17 06:00:41 +00:00