Commit graph

5077 commits

Author SHA1 Message Date
photonstorm
bfb12d9dba Fixed code formatting. 2016-08-17 11:28:08 +01:00
Richard Davey
129a652f07 Docs update. 2016-08-17 00:38:52 +01:00
Richard Davey
8d69d0e2e8 Docs update. 2016-08-17 00:38:52 +01:00
Richard Davey
a12157d77e Merge pull request #2691 from hexus/dev
Fixed widthInPixels/heightInPixels for JSON tilemaps and TilemapLayerGL display width/height
2016-08-16 21:17:08 +01:00
Richard Davey
b59d83253c Merge pull request #2687 from AleBles/patch-1
Updated tutorial to fix #2642
2016-08-16 21:14:38 +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
435ff9a420 Merge pull request #2664 from jayrobin/fix-fractional-anim-speed
Allow animation speed greater than 0
2016-08-16 21:10:49 +01:00
Richard Davey
63ce6ae6c4 Defs update #2689 2016-08-16 21:01:41 +01:00
Richard Davey
49e40fc2d4 Typo 2016-08-16 20:59:59 +01:00
Chris Andrew
50fc2cf0c3 Fixed TilemapLayerGL bugs regarding display width and height. 2016-08-15 14:56:07 +01:00
Chris Andrew
e30ade0a67 Fixed incorrectly parsing widthInPixels/heightInPixels for JSON tilemaps. 2016-08-15 14:46:05 +01:00
Ale Bles
7afd442bce Updated tutorial to fix #2642
Tutorial was missing a tiny piece of code that was found in the parts
2016-08-09 10:11:39 +02:00
Sergey Z
68fe8b8058 Fix rendering text with bounds and resolution 2016-08-08 16:51:07 +03:00
pjbaron
906e00cec1 Minor optimisation and clean up. 2016-08-08 11:14:57 +12:00
Richard Davey
a41f62a37a Merge pull request #2671 from fmflame/display-object-container-dimensions-fix
Fix for DisplayObject/DisplayObjectContainer - getting dimensions or bounds do NOT retrieve proper values
2016-08-03 12:38:07 +01:00
Richard Davey
a0c6ae6c51 Phaser.Image now has the ScaleMinMax component. 2016-08-03 05:00:09 +01:00
Richard Davey
e955cf4222 Sound.play would throw the error "Uncaught DOMException: Failed to execute 'disconnect' on 'AudioNode': the given destination is not connected." in Chrome, if you tried to play an audio marker that didn't exist, while a valid marker was already playing. 2016-08-03 04:04:22 +01:00
Filip Nedyalkov
64a02ddef4 fixed top, bottom, left, right, centerX and centerY to use the updated getBounds and compute their values depending on the parent local coordinate space. I think this is better than using the global getBounds and a lot more convenient because it makes total sense x and centerX for example to be from the same coordinate space and also with this change now these values would be working when the group is a top level display object and also when it is parented by something else. So this loosens the global only getBounds restriction. Also it doesn't really makes sense to align objects with totally different parents but if that is the case separate calculations could be made. 2016-08-02 17:47:35 +03:00
Filip Nedyalkov
aad2ab398a fixed a typo; 2016-07-29 20:06:06 +03:00
Richard Davey
a532f7b2c4 Optimised Math.getShortestAngle. 2016-07-29 03:58:25 +01:00
Richard Davey
688752c5de Math.getShortestAngle will return the shortest angle between the two given angles. Angles are in the range -180 to 180, which is what Sprite.angle uses. So you can happily feed this method two sprite angles, and get the shortest angle back between them (#2494) 2016-07-29 03:39:51 +01:00
Richard Davey
3c3d09e46a Docs update. 2016-07-29 03:39:51 +01:00
Richard Davey
fb5ba0aa62 Bail out if no parent. 2016-07-29 03:39:51 +01:00
Richard Davey
24368ef8d7 Docs update. 2016-07-29 03:39:51 +01:00
Filip Nedyalkov
a3502ebb4f updated the comment for getLocalBounds() in the typescript definitions. 2016-07-28 21:47:21 +03:00
Filip Nedyalkov
7b4d6a65ca fixed getLocalBounds() to return the bounds of the DisplayObject without transformations and adjusted width and height to work the way they did before to be compatible with how PIXI used to work. 2016-07-28 21:41:34 +03:00
Felipe Alfonso
f68f454620 Fix Tiling Sprite mask and filter 2016-07-27 12:49:42 -04:00
Felipe Alfonso
1711266ff8 Fixed multi texture support on tiling sprite. 2016-07-27 00:36:20 -04:00
photonstorm
e15d98e34b Removed Polyk. 2016-07-26 17:07:16 +01:00
photonstorm
1e730e008d Removed PolyK 2016-07-26 16:59:41 +01:00
Felipe Alfonso
6e35817675 Fixed issue with multiple "texture not bound to unit X" webgl warning 2016-07-26 11:49:21 -04:00
photonstorm
3e1595ffaf Removed debugger calls. 2016-07-26 14:57:48 +01:00
photonstorm
f246c276cb Multi-Texture support has now been built into our version of Pixi. This can offer dramatic performance increases in WebGL games on GPUs that support multiple texture bindings (which is most of them these days).
WebGLRenderer.setTexturePriority is the method used to set the priority of textures when the GPU supports multi-texture batching.

Rope has two new properties `textureIndices` and `textureIndex` to handle multi-texture support.

Strip has two new properties `textureIndices` and `textureIndex` to handle multi-texture support.

The following shaders have all been updated to support multi-textures: `ComplexPrimitiveShader`, `PixiFastShader`, `PixiShader`, `PrimitiveShader`, `StripShader`.

WebGLFastSpriteBatch.vertSize was increased from 10 to 11.

BaseTexture.textureIndex is a new property that controls the index of the texture within the GPU texture cache. Usually you don't change this yourself, and use `renderer.setTexturePriority` instead, but the property is public and available for more advanced use-cases.

CanvasRenderer.setTexturePriority is an empty function, but included to allow you to simply call `game.renderer.setTexturePriority` without first having to wrap that in a WebGL check.
2016-07-26 14:56:12 +01:00
photonstorm
dfaf0b99dd Merge branch 'multitexture-gl' into dev 2016-07-26 14:47:26 +01:00
photonstorm
2318fec65c Start of a Particle base class. 2016-07-26 14:31:36 +01:00
photonstorm
86affde81b The file pixi/utils/Polyk.js has been removed, as it was no longer used with Pixi or Phaser (we replaced it with EarCut a while ago) 2016-07-26 14:30:06 +01:00
Richard Davey
cf9aeae727 Merge pull request #2665 from fmflame/display-object-container-dimensions-fix
Fix for DisplayObject/DisplayObjectContainer - getting dimensions or bounds do NOT retrieve proper values
2016-07-26 12:44:31 +01:00
Filip Nedyalkov
566c781f26 Merge remote-tracking branch 'refs/remotes/photonstorm/dev' into display-object-container-dimensions-fix 2016-07-26 14:10:15 +03:00
Filip Nedyalkov
c56bc766cc Overrided getLocalBounds() for PIXI Sprite, Strip and Graphics
Since they override the getBounds of the DisplayObjectContainer, the
getLocalBounds should also be overriden for them to properly work.
2016-07-26 14:01:35 +03:00
James Robinson
118d2057c0 Allow animation speed greater than 0 2016-07-25 19:43:19 -07:00
Felipe Alfonso
4d09b31560 Merge branch 'dev' into multitexture-gl 2016-07-25 15:50:57 -04:00
Richard Davey
9654a4b3c5 Consolidating Layers into View class. 2016-07-25 01:39:46 +01:00
Richard Davey
19e609185a Math.rotateToAngle takes two angles (in radians), and an interpolation value, and returns a new angle, based on the shortest rotational distance between the two. 2016-07-25 00:39:38 +01:00
Richard Davey
8d4a72c9d7 Phaser 2.7.0 Beta 3 2016-07-23 15:05:52 +01:00
Richard Davey
b69cae4206 The methods setStageReference and removeStageReference have been removed from all Pixi classes. Objects no longer have stage properties, or references to the Stage object. This is because no reference to the Stage is required for any calculations, and Phaser can only have 1 Stage, so adding and removing references to it were superfluous actions. 2016-07-23 14:31:17 +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
3d2cb3f8b3 Docs update. 2016-07-23 12:28:16 +01:00
Richard Davey
fb1a7f13cb Merge pull request #2639 from fmflame/display-object-container-dimensions-fix
Fix for DisplayObject/DisplayObjectContainer - getting dimensions or bounds do NOT retrieve proper values
2016-07-23 12:18:06 +01:00
Richard Davey
02d078500c Merge pull request #2656 from leopoldobrines7/documentHidden-compatibility
Check if hidden is available first
2016-07-23 12:09:00 +01:00
Richard Davey
75272974e9 The Emitter.makeParticles collide argument didn't work, as a result of #2661, but is now properly respected thanks to that change (thanks @samme #2662) 2016-07-23 10:08:34 +01:00