Commit graph

1989 commits

Author SHA1 Message Date
Richard Davey
ea75c5ca9a Updated quad alpha checks 2019-10-02 10:11:07 +01:00
Richard Davey
a7a15bcb4d
Merge pull request #4715 from MrcSnm/master
Container now can apply alpha quads
2019-10-02 09:55:59 +01:00
Marcelo Silva Nascimento Mancini
b7166bba3b
ESLint correction 2019-10-01 16:11:29 -03:00
Richard Davey
be02c80be9 Origin and canvas renderer work again now. Fix #4108 2019-10-01 17:43:47 +01:00
Richard Davey
1a42c54398 Set image smoothing based on renderer or scale mode. 2019-10-01 16:10:50 +01:00
Richard Davey
d405bab92c Set image smoothing based on renderer or scale mode. 2019-10-01 16:10:46 +01:00
FengLi
217d1daa2f add an optional textureData when initialize shader 2019-10-01 22:52:35 +08:00
Richard Davey
b1b95c066b The BuildGameObject function will no longer set scaleMode because it's not a valid Game Object property. 2019-10-01 14:54:52 +01:00
Richard Davey
55c73d399b GameObject.ToJSON will no longer output the scaleMode in the json because it's not a valid Game Object property. 2019-10-01 14:41:58 +01:00
Richard Davey
ea7691518b Use public property for blend mode check #4771 2019-10-01 14:08:13 +01:00
Richard Davey
5b6d9895be TileSprites will now throw a console warning if you try to use a RenderTexture or GLTexture as their frame source. Fix #4719 2019-10-01 13:37:37 +01:00
Hua
8a9e74ffe9 Add tint feature of bob 2019-10-01 10:17:14 +08:00
Richard Davey
487ec88529 RenderTexture.fill wasn't setting the camera up before drawing the fill rect, causing it to appear in the wrong place and the wrong size. Fix #4390 2019-09-30 15:08:53 +01:00
Richard Davey
cde1210523 The Container WebGLRenderer will now handle child new type switching, allowing you to carry on with a batch of same-type Game Objects even if they're nested within Containers. Fix #4710 2019-09-27 15:41:51 +01:00
Richard Davey
f3e18000f2
Merge pull request #4760 from rexrainbow/blitter-enhancement
Set dirty flag only when render state of bob is changed
2019-09-26 12:32:34 +01:00
Rex
6deec2c44b Also resize hit-area when resizing 2019-09-21 20:24:26 +08:00
Rex
08a2082d46 Update display-origin when resizing 2019-09-21 20:21:09 +08:00
Rex
7795713ab5 Set dirty flag only when render state of bob is changed 2019-09-21 20:15:56 +08:00
Richard Davey
5c04e20b20 The private Shader._savedKey property has been removed as it wasn't used anywhere internally. 2019-09-20 14:48:41 +01:00
Richard Davey
bc5c7cf7ab When calling Shader.setRenderToTexture() it will now draw the shader just once, immediately to the texture, to avoid the texture being blank for a single frame (thanks Kyle) 2019-09-19 23:32:40 +01:00
Nicolas Ferrero
18060a841e RenderTexture would not update texture size on resize 2019-09-10 17:03:52 +03:00
Richard Davey
fc5630cb72 The displayWidth and height should never be negative. 2019-08-30 19:35:52 +01:00
Richard Davey
6887e7b4f0 JSDoc fix 2019-08-28 12:00:19 +01:00
=
e7cce944dd Container now can apply alpha quads 2019-08-19 13:26:14 -03:00
Richard Davey
7d2eaae693 The Container renderer functions will now read the childs alpha property, instead of _alpha, allowing it to work with more variety of custom children. 2019-08-08 14:03:23 +01:00
Richard Davey
717258e3f1 Docs update 2019-08-05 14:07:36 +01:00
Richard Davey
9f15b5a96b Removed scale abs, as deeper effects unknown 2019-08-03 11:08:22 +01:00
Richard Davey
cc85ec1d35 Fixed scaleX and scaleY 2019-08-02 17:28:46 +01:00
Richard Davey
c1767e404f Fixed scaleX and scaleY to handle negative scales and added rotation fix 2019-08-02 01:50:02 +01:00
Richard Davey
6e2d22e5cb jsdoc update 2019-08-01 17:44:20 +01:00
Richard Davey
718f75b797 TransformMatrix.rotation now returns the properly normalized rotation value 2019-07-26 14:20:38 +01:00
Richard Davey
14faabcadf Updated docs 2019-07-26 14:19:44 +01:00
Richard Davey
f4002471d7 Updated context lost / restored handlers 2019-07-17 16:38:00 +01:00
Richard Davey
80c0f59b09 GameObjectCreator.remove is a new static function that will remove a custom Game Object creator type. 2019-07-17 14:36:10 +01:00
Richard Davey
4887696bfa GameObjectFactory.remove is a new static function that will remove a custom Game Object factory type. 2019-07-17 14:36:02 +01:00
Richard Davey
907d0dd4f2 Render Texture snapshot methods now work across WebGL and Canvas 2019-07-15 17:03:04 +01:00
Richard Davey
41d007fe67 Origin.updateDisplayOrigin no longer applies a Math.floor to the display origins, allowing you to have a 0.x origin for a Game Object that only has a width or height of 1. This fixes issues with things like 1x1 rectangles displaying incorrectly during rendering. 2019-07-15 16:30:08 +01:00
Richard Davey
15d7b9c6ef Fixed jsdoc typos and added single pixel support 2019-07-14 13:56:44 +01:00
Richard Davey
4d61aa8556 Added the new methods snapshot, snapshotArea and snapshotPixel 2019-07-13 15:21:13 +01:00
Hua
7134a1ef7b Remove event hook of children when destroyChildren is false 2019-07-10 15:59:25 +08:00
Richard Davey
f71920646c Shader.uniforms now uses Extend instead of Clone to perform a deep object copy, instead of a shallow one, avoiding multiple instances of the same shader sharing uniforms. Fix #4641 2019-07-08 13:03:39 +01:00
Richard Davey
5416deaa54 The UpdateList.remove method wouldn't flag the Game Object for removal properly if it was active. It now checks that the Game Object is in the current update list and hasn't already been inserted into the 'pending removal' list before flagging it. Fix #4544 2019-07-03 15:47:40 +01:00
Richard Davey
deca3c95a3 Calling Animation.setRepeat() wouldn't reset the repeatCounter properly, causing Sprite bound animation instances to fail to change their repeat rate. Fix #4553 2019-07-03 15:33:13 +01:00
Richard Davey
83e54cfb16 The Animation component will no longer start an animation on a Sprite if the animation doesn't exist. Previously it would throw an error saying "Unable to read the property getFirstTick of null". 2019-07-03 12:02:56 +01:00
Richard Davey
0d8a9bb7ae Fixed TextSyle typo. Fix #4630 2019-07-02 12:32:29 +01:00
Rex
fa6eb360dc Fix render offset issue
- Fix render offset issue
- Fix size issue when setting radius
2019-06-29 00:03:08 +08:00
Richard Davey
f792f13d7a Added new quantity property to GroupCreateConfig 2019-06-28 11:14:59 +01:00
Richard Davey
a79da485c3 Added glTexture property 2019-06-26 00:36:40 +01:00
Richard Davey
fc3c93b578 Added flipY argument 2019-06-26 00:35:42 +01:00
Richard Davey
356c57c07b The Shader will no longer set uniforms if the values are null, saving on GL ops. 2019-06-25 22:49:30 +01:00
Richard Davey
280e0e2744 Abort filter checks if renderToTexture 2019-06-25 10:10:00 +01:00
Richard Davey
63ac456c45 Flag swap 2019-06-24 14:42:34 +01:00
Richard Davey
a3763d1468 Added setSampler2DBuffer method and willRender override. 2019-06-24 12:31:47 +01:00
Richard Davey
33e15dca48 Marked argument as optional. Fix #4607 2019-06-22 11:38:24 +01:00
Richard Davey
96f96a7258 Opps! Clear the texture :) 2019-06-21 17:20:15 +01:00
Richard Davey
9d94e35e91 If a GLTexture is given as a sampler2D it will extract the textureData from it correctly 2019-06-21 16:35:31 +01:00
Richard Davey
ba0c380109 Support rendering a shader to a texture instead of the display list 2019-06-21 16:08:29 +01:00
Richard Davey
22b107b903 Added setRenderToTexture method and supporting properties 2019-06-21 16:08:14 +01:00
Richard Davey
9a6fe49000 Typo 2019-06-21 12:25:08 +01:00
Richard Davey
5fa4264219 Added new Transform.getParentRotation method 2019-06-19 10:40:47 +01:00
Richard Davey
f5cae5a48b Added in Text justification feature. Fix #4291 2019-06-19 09:46:32 +01:00
Richard Davey
2e64f4c5cc
Merge pull request #4588 from rexrainbow/master
Update displayOriginX, displayOriginY after size changed
2019-06-19 09:25:38 +01:00
Richard Davey
aa7f4da0d9
Merge pull request #4587 from samme/fix/emitter-op-random
Fix EmitterOp config with { random: false }
2019-06-19 09:24:20 +01:00
Richard Davey
a786298c66 Updated Line docs. #4590 2019-06-12 23:20:22 +01:00
Hua
da617f364d Update displayOriginX, displayOriginY after size changed 2019-06-12 13:54:27 +08:00
samme
df3953e604 Require truthy random value for randomness 2019-06-11 11:38:29 -07:00
Richard Davey
13180b9a9a If you had a Graphics object in the display list immediately after an object with a Bitmap Mask it would throw an error Uncaught TypeError: Cannot set property 'TL' of undefined. Fix #4581 2019-06-11 17:58:57 +01:00
Richard Davey
423a9e5003 Implent Grid canvas rendering! Fix #4585 2019-06-11 16:45:13 +01:00
Richard Davey
eb73b51cd8 Allow for color and alpha overrides 2019-06-11 16:44:55 +01:00
Hua
382afd6945 Set (width,height) of arc/cicle to (diameter,diameter)
Set (width,height) of arc/cicle to (diameter,diameter), not (radius,radius).
2019-06-11 12:38:26 +08:00
samme
c55ee432ce Docs for easedValueEmit() 2019-06-07 13:32:12 -07:00
samme
cf627a07e1 Correct emitOnly values for angle, lifespan, x, y 2019-06-07 13:31:01 -07:00
Richard Davey
0dfc9806cc Fixed lots of jsdos and moved the frame.cutX/Y addition into each function, allowing the x/y defaults to work again. Fix #4528 2019-06-06 17:45:18 +01:00
Richard Davey
2c8a5d3446 Renamed translate, rotate and scale to make them more explicit 2019-06-06 17:41:42 +01:00
Richard Davey
11d845a77e Specifically state this is a render flag only #4574 2019-06-06 09:52:19 +01:00
Richard Davey
2cdb672d36 Added new Text Padding typedef 2019-06-05 23:40:27 +01:00
Richard Davey
2446e2f3fc Setting padding in a Text style configuration object would cause an error about calling split on undefined. Padding can now be applied both in the config and via setPadding 2019-06-05 23:40:10 +01:00
Richard Davey
458c592596 Changing the radius of an Arc Game Object wouldn't update the size, causing origin issues. It now updates the size and origin correctly in WebGL. Fix #4542 2019-06-05 23:02:59 +01:00
Richard Davey
515adc737d Fixed typo 2019-06-05 22:48:22 +01:00
Richard Davey
ab17888c18
Merge pull request #4577 from samme/feature/group-name
Add Group#name
2019-06-05 22:45:58 +01:00
Richard Davey
8968b2179c Added GameObject.scale transform property for a unified scale setter 2019-06-05 15:30:23 +01:00
samme
04384f78a6 Add Group#name 2019-06-04 09:33:08 -07:00
Richard Davey
558f6aea55 JSDoc fixes 2019-06-04 16:01:37 +01:00
samme
d3407c5e44 Add EmitterOpOnEmitType and EmitterOpOnUpdateType
Also some corrections in ParticleEmitterConfig docs
2019-06-01 13:33:06 -07:00
Richard Davey
278bde236b lint fix 2019-05-30 23:05:06 +01:00
Richard Davey
ec6bbdeebd Added typedefs for the Text Game Object. Fix #4551 2019-05-30 23:01:53 +01:00
Richard Davey
114b7b570d
Merge pull request #4552 from rexrainbow/master
Set canvas size equal to text object size
2019-05-30 22:24:51 +01:00
Richard Davey
897de33a64
Merge pull request #4554 from samme/types/group-classType
Remove GroupClassTypeConstructor type
2019-05-30 22:05:55 +01:00
Richard Davey
90e04c7e90
Merge pull request #4563 from samme/types/tween-configs
Add types for tween configs
2019-05-30 22:00:37 +01:00
Richard Davey
df0b474638 Added getTopCenter, getBottomCenter, getLeftCenter and getRightCenter 2019-05-29 16:27:31 +01:00
samme
777f436aa3 Add NumberTweenBuilderConfig to path configs 2019-05-28 14:11:28 -07:00
samme
7125334677 Duration is optional 2019-05-28 14:08:03 -07:00
samme
c3c11652ef Merge branch 'master' of https://github.com/photonstorm/phaser into types/group-classType 2019-05-28 09:16:27 -07:00
samme
84e476762a Docs description for GroupCreateConfig 2019-05-27 09:05:16 -07:00
samme
e879ec7703 Correct types for GroupCreateConfig.key, GroupCreateConfig.frame 2019-05-27 09:03:28 -07:00
Rex
9a958631fc Don't draw text only when width or height is 0
It can fix this issue:
Text is empty string '', but have fixedWidth and fixedHeight, with backgroundColor setting.
2019-05-26 20:58:40 +08:00
samme
8e717d5588 Remove GroupClassTypeConstructor type 2019-05-23 15:10:40 -07:00
Hua
cc7870906b Fix coding style 2019-05-23 17:30:04 +08:00
Hua
d1b31649ec Fix text align to right/center issue
Calculate text-width in fixedWidth mode
2019-05-23 17:22:51 +08:00
Hua
97b60efa21 Set canvas size equal to text object size
Canvas size might less than text object size, when `fixedWidth` and `fixedHeight` is set.
2019-05-23 16:54:32 +08:00