mirror of
https://github.com/photonstorm/phaser
synced 2024-12-23 11:33:28 +00:00
Merge pull request #2 from photonstorm/master
keeping up with master #2
This commit is contained in:
commit
eb90fc2ab4
1487 changed files with 52165 additions and 35127 deletions
230
CHANGELOG.md
230
CHANGELOG.md
|
@ -1,49 +1,87 @@
|
||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
## Version 3.22 - Senku - in development
|
## Version 3.23 - Ginro - in development
|
||||||
|
|
||||||
### Matter Physics Updates
|
### New Features
|
||||||
|
|
||||||
|
### Updates
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* The conditional checking if the `PathFollower` was at the end of the path or not was incorrect (thanks @samme)
|
||||||
|
|
||||||
|
### Examples, Documentation and TypeScript
|
||||||
|
|
||||||
|
My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Version 3.22 - Kohaku - January 15th 2020
|
||||||
|
|
||||||
|
### Matter Physics
|
||||||
|
|
||||||
|
All of the following are specific to the Matter Physics implementation used by Phaser:
|
||||||
|
|
||||||
|
#### Matter Physics New Features
|
||||||
|
|
||||||
|
* Matter Physics now has 100% JSDoc coverage! Woohoo :)
|
||||||
|
* Matter Physics now has brand new TypeScript defs included in the `types` folder :)
|
||||||
* `MatterDebugConfig` is a new configuration object that contains all of the following new Matter debug settings:
|
* `MatterDebugConfig` is a new configuration object that contains all of the following new Matter debug settings:
|
||||||
* `showBody` - Render the dynamic bodies in the world to the Graphics object?
|
* `showAxes`- Render all of the body axes?
|
||||||
* `showStaticBody` - Render the static bodies in the world to the Graphics object?
|
* `showAngleIndicator`- Render just a single body axis?
|
||||||
* `showSleeping` - Render any sleeping bodies (dynamic or static) in the world to the Graphics object?
|
* `angleColor`- The color of the body angle / axes lines.
|
||||||
* `showJoint` - Render all world constraints to the Graphics object?
|
* `showBroadphase`- Render the broadphase grid?
|
||||||
* `showInternalEdges` - When rendering bodies, render the internal edges as well?
|
* `broadphaseColor`- The color of the broadphase grid.
|
||||||
* `showConvexHulls` - When rendering polygon bodies, render the convex hull as well?
|
* `showBounds`- Render the bounds of the bodies in the world?
|
||||||
* `renderFill` - Render the bodies using a fill color.
|
* `boundsColor`- The color of the body bounds.
|
||||||
|
* `showVelocity`- Render the velocity of the bodies in the world?
|
||||||
|
* `velocityColor`- The color of the body velocity line.
|
||||||
|
* `showCollisions`- Render the collision points and normals for colliding pairs.
|
||||||
|
* `collisionColor`- The color of the collision points.
|
||||||
|
* `showSeparation`- Render lines showing the separation between bodies.
|
||||||
|
* `separationColor`- The color of the body separation line.
|
||||||
|
* `showBody`- Render the dynamic bodies in the world to the Graphics object?
|
||||||
|
* `showStaticBody`- Render the static bodies in the world to the Graphics object?
|
||||||
|
* `showInternalEdges`- When rendering bodies, render the internal edges as well?
|
||||||
|
* `renderFill`- Render the bodies using a fill color.
|
||||||
* `renderLine`- Render the bodies using a line stroke.
|
* `renderLine`- Render the bodies using a line stroke.
|
||||||
* `fillColor` - The color value of the fill when rendering dynamic bodies.
|
* `fillColor`- The color value of the fill when rendering dynamic bodies.
|
||||||
* `fillOpacity` - The opacity of the fill when rendering dynamic bodies, a value between 0 and 1.
|
* `fillOpacity`- The opacity of the fill when rendering dynamic bodies, a value between 0 and 1.
|
||||||
* `lineColor` - The color value of the line stroke when rendering dynamic bodies.
|
* `lineColor`- The color value of the line stroke when rendering dynamic bodies.
|
||||||
* `lineOpacity` - The opacity of the line when rendering dynamic bodies, a value between 0 and 1.
|
* `lineOpacity`- The opacity of the line when rendering dynamic bodies, a value between 0 and 1.
|
||||||
* `lineThickness` - If rendering lines, the thickness of the line.
|
* `lineThickness`- If rendering lines, the thickness of the line.
|
||||||
* `staticFillColor` - The color value of the fill when rendering static bodies.
|
* `staticFillColor`- The color value of the fill when rendering static bodies.
|
||||||
* `staticLineColor` - The color value of the line stroke when rendering static bodies.
|
* `staticLineColor`- The color value of the line stroke when rendering static bodies.
|
||||||
* `staticBodySleepOpacity` - The amount to multiply the opacity of sleeping static bodies by.
|
* `showSleeping`- Render any sleeping bodies (dynamic or static) in the world to the Graphics object?
|
||||||
* `sleepFillColor` - The color value of the fill when rendering sleeping dynamic bodies.
|
* `staticBodySleepOpacity`] - The amount to multiply the opacity of sleeping static bodies by.
|
||||||
* `sleepLineColor` - The color value of the line stroke when rendering sleeping dynamic bodies.
|
* `sleepFillColor`- The color value of the fill when rendering sleeping dynamic bodies.
|
||||||
* `jointColor` - The color value of joints when `showJoint` is set.
|
* `sleepLineColor`- The color value of the line stroke when rendering sleeping dynamic bodies.
|
||||||
* `jointLineOpacity` - The line opacity when rendering joints, a value between 0 and 1.
|
* `showSensors`- Render bodies or body parts that are flagged as being a sensor?
|
||||||
* `jointLineThickness` - The line thickness when rendering joints.
|
* `sensorFillColor`- The fill color when rendering body sensors.
|
||||||
* `pinSize` - The size of the circles drawn when rendering pin constraints.
|
* `sensorLineColor`- The line color when rendering body sensors.
|
||||||
* `pinColor` - The color value of the circles drawn when rendering pin constraints.
|
* `showPositions`- Render the position of non-static bodies?
|
||||||
* `springColor` - The color value of spring constraints.
|
* `positionSize`- The size of the rectangle drawn when rendering the body position.
|
||||||
* `anchorColor` - The color value of constraint anchors.
|
* `positionColor`- The color value of the rectangle drawn when rendering the body position.
|
||||||
* `anchorSize` - The size of the circles drawn as the constraint anchors.
|
* `showJoint`- Render all world constraints to the Graphics object?
|
||||||
* `hullColor` - The color value of hulls when `showConvexHulls` is set.
|
* `jointColor`- The color value of joints when `showJoint` is set.
|
||||||
* The `debug` property in the Matter World Config is now a `MatterDebugConfig` option instead of a boolean. However, if a boolean is given, it will use the default debug config values.
|
* `jointLineOpacity`- The line opacity when rendering joints, a value between 0 and 1.
|
||||||
* The following `MatterWorldConfig` options have now been removed: `debugShowBody`, `debugShowStaticBody`, `debugBodyColor`, `debugBodyFillColor`, `debugStaticBodyColor`, `debugShowJoint`, `debugJointColor`, `debugWireframes`, `debugShowInternalEdges`, `debugShowConvexHulls`, `debugConvexHullColor` and `debugShowSleeping`. These can all be set via the new `MatterDebugConfig` object instead.
|
* `jointLineThickness`- The line thickness when rendering joints.
|
||||||
* The object `World.defaults` has been removed. Defaults are now access via `World.debugDefaults`.
|
* `pinSize`- The size of the circles drawn when rendering pin constraints.
|
||||||
|
* `pinColor`- The color value of the circles drawn when rendering pin constraints.
|
||||||
|
* `springColor`- The color value of spring constraints.
|
||||||
|
* `anchorColor`- The color value of constraint anchors.
|
||||||
|
* `anchorSize`- The size of the circles drawn as the constraint anchors.
|
||||||
|
* `showConvexHulls`- When rendering polygon bodies, render the convex hull as well?
|
||||||
|
* `hullColor`- The color value of hulls when `showConvexHulls` is set.
|
||||||
* `World.renderBody` is a new method that will render a single Matter Body to the given Graphics object. This is used internally during debug rendering but is also public. This allows you to control which bodies are rendered and to which Graphics object, should you wish to use them in-game and not just during debugging.
|
* `World.renderBody` is a new method that will render a single Matter Body to the given Graphics object. This is used internally during debug rendering but is also public. This allows you to control which bodies are rendered and to which Graphics object, should you wish to use them in-game and not just during debugging.
|
||||||
* `World.renderConstraint` is a new method that will render a single Matter Constraint, such as a pin or a spring, to the given Graphics object. This is used internally during debug rendering but is also public. This allows you to control which constraints are rendered and to which Graphics object, should you wish to use them in-game and not just during debugging.
|
* `World.renderConstraint` is a new method that will render a single Matter Constraint, such as a pin or a spring, to the given Graphics object. This is used internally during debug rendering but is also public. This allows you to control which constraints are rendered and to which Graphics object, should you wish to use them in-game and not just during debugging.
|
||||||
* `World.renderConvexHull` is a new method that will render the convex hull of a single Matter Body, to the given Graphics object. This is used internally during debug rendering but is also public. This allows you to control which hulls are rendered and to which Graphics object, should you wish to use them in-game and not just during debugging.
|
* `World.renderConvexHull` is a new method that will render the convex hull of a single Matter Body, to the given Graphics object. This is used internally during debug rendering but is also public. This allows you to control which hulls are rendered and to which Graphics object, should you wish to use them in-game and not just during debugging.
|
||||||
* `World.renderBodies` has been rewritten to cache commonly-used values and avoid a situation when a single body would be rendered twice.
|
* `World.renderGrid` is a new method that will render the broadphase Grid to the given graphics instance.
|
||||||
* The private method `World.renderConvexHulls` has been removed as it's no longer used internally.
|
* `World.renderBodyBounds` is a new method that will render the bounds of all the given bodies to the given graphics instance.
|
||||||
* The private method `World.renderWireframes` has been removed as it's no longer used internally.
|
* `World.renderBodyAxes` is a new method that will render the axes of all the given bodies to the given graphics instance.
|
||||||
* Due to the rewrite of the debug rendering, it is now possible to render _just_ constraints, where-as before this was only possible if bodies were being rendered as well. Fix #4880 (thanks @roberto257)
|
* `World.renderBodyVelocity` is a new method that will render a velocity line for all the given bodies to the given graphics instance.
|
||||||
* The method `World.fromPath` has been removed. This was never used internally and you can get the same results by calling `Vertices.fromPath`.
|
* `World.renderSeparations` is a new method that will render the separations in the current pairs list to the given graphics instance.
|
||||||
* The `World.setBounds` argument `thickness` now defaults to 64, not 128, to keep it matching the Matter World Config.
|
* `World.renderCollisions` is a new method that will render the collision points and normals in the current pairs list to the given graphics instance.
|
||||||
* `World.getAllBodies` is a new method that will return all bodies in the Matter World.
|
* `World.getAllBodies` is a new method that will return all bodies in the Matter World.
|
||||||
* `World.getAllConstraints` is a new method that will return all constraints in the Matter World.
|
* `World.getAllConstraints` is a new method that will return all constraints in the Matter World.
|
||||||
* `World.getAllComposites` is a new method that will return all composites in the Matter World.
|
* `World.getAllComposites` is a new method that will return all composites in the Matter World.
|
||||||
|
@ -66,8 +104,6 @@
|
||||||
* `AFTER_ADD` is a new Event dispatched by `Matter.World` when a Body or Constraint has been added to the World.
|
* `AFTER_ADD` is a new Event dispatched by `Matter.World` when a Body or Constraint has been added to the World.
|
||||||
* `BEFORE_REMOVE` is a new Event dispatched by `Matter.World` when a Body or Constraint is about to be removed from the World.
|
* `BEFORE_REMOVE` is a new Event dispatched by `Matter.World` when a Body or Constraint is about to be removed from the World.
|
||||||
* `AFTER_REMOVE` is a new Event dispatched by `Matter.World` when a Body or Constraint has been removed from the World.
|
* `AFTER_REMOVE` is a new Event dispatched by `Matter.World` when a Body or Constraint has been removed from the World.
|
||||||
* The `Body.render.fillStyle` property that existed on the Matter Body object has been removed and replaced with `fillColor`.
|
|
||||||
* The `Body.render.strokeStyle` property that existed on the Matter Body object has been removed and replaced with `lineColor`.
|
|
||||||
* `Body.render.lineOpacity` is a new property on the Matter Body object that allows for custom debug rendering.
|
* `Body.render.lineOpacity` is a new property on the Matter Body object that allows for custom debug rendering.
|
||||||
* `Body.render.lineThickness` is a new property on the Matter Body object that allows for custom debug rendering.
|
* `Body.render.lineThickness` is a new property on the Matter Body object that allows for custom debug rendering.
|
||||||
* `Body.render.fillOpacity` is a new property on the Matter Body object that allows for custom debug rendering.
|
* `Body.render.fillOpacity` is a new property on the Matter Body object that allows for custom debug rendering.
|
||||||
|
@ -88,24 +124,13 @@
|
||||||
* `MatterPhysics.setCollisionCategory` is a new method that will set the collision filter category to the value given, on all of the bodies given. This allows you to easily set the category on bodies that don't have a Phaser Matter Collision component.
|
* `MatterPhysics.setCollisionCategory` is a new method that will set the collision filter category to the value given, on all of the bodies given. This allows you to easily set the category on bodies that don't have a Phaser Matter Collision component.
|
||||||
* `MatterPhysics.setCollisionGroup` is a new method that will set the collision filter group to the value given, on all of the bodies given. This allows you to easily set the group on bodies that don't have a Phaser Matter Collision component.
|
* `MatterPhysics.setCollisionGroup` is a new method that will set the collision filter group to the value given, on all of the bodies given. This allows you to easily set the group on bodies that don't have a Phaser Matter Collision component.
|
||||||
* `MatterPhysics.setCollidesWith` is a new method that will set the collision filter mask to the value given, on all of the bodies given. This allows you to easily set the filter mask on bodies that don't have a Phaser Matter Collision component.
|
* `MatterPhysics.setCollidesWith` is a new method that will set the collision filter mask to the value given, on all of the bodies given. This allows you to easily set the filter mask on bodies that don't have a Phaser Matter Collision component.
|
||||||
* `Matter.Body.centerOfMass` is a new property added to the Matter Body object that retains the center of mass coordinates when the Body is first created.
|
* `Matter.Body.centerOfMass` is a new vec2 property added to the Matter Body object that retains the center of mass coordinates when the Body is first created, or has parts added to it. These are float values, derived from the body position and bounds.
|
||||||
* `Matter.Body.render.sprite.xOffset` and `yOffset` are no longer set to anything when a Body is created. They are left as zero, or you can override them in the Body config, in which case the value is added to the sprite origin offset.
|
* `Matter.Body.centerOffset` is a new vec2 property added to the Matter Body object that retains the center offset coordinates when the Body is first created, or has parts added to it. These are pixel values.
|
||||||
* `Matter.Transform.centerOffsetX` is a new read-only property available on all Matter Game Objects that returns the horizontal offset between the center of the frame and the center of mass. This can be used to allow for accurately mapping texture centers to the body center.
|
|
||||||
* `Matter.Transform.centerOffsetY` is a new read-only property available on all Matter Game Objects that returns the vertical offset between the center of the frame and the center of mass. This can be used to allow for accurately mapping texture centers to the body center.
|
|
||||||
* The `Matter.Mass.centerOfMass` component property now returns the pre-calculated Body `centerOfMass` property, which is much more accurate than the previous bounds offset value.
|
|
||||||
* `Matter.setExistingBody`, which is called interally whenever a Body is set on a Game Object, now uses the new `centerOffset` values to ensure that the texture frame is correctly centered based on the center of mass, not the Body bounds, allowing for much more accurate body to texture mapping with complex multi-part compound bodies.
|
|
||||||
* The `Matter.PhysicsEditorParser` has been updated so it no longer needs to set the render offsets, and instead uses the center of mass values.
|
|
||||||
* If the `Matter.Body` config doesn't contain a `position` property, it will now default to using `Vertices.centre(body.vertices)` as the position. In most cases, this is what you need, so it saves having to pass it in the config object.
|
|
||||||
* `Constraint.pointAWorld` is a new method added to Matter that returns the world-space position of `constraint.pointA`, accounting for `constraint.bodyA`.
|
* `Constraint.pointAWorld` is a new method added to Matter that returns the world-space position of `constraint.pointA`, accounting for `constraint.bodyA`.
|
||||||
* `Constraint.pointBWorld` is a new method added to Matter that returns the world-space position of `constraint.pointB`, accounting for `constraint.bodyB`.
|
* `Constraint.pointBWorld` is a new method added to Matter that returns the world-space position of `constraint.pointB`, accounting for `constraint.bodyB`.
|
||||||
* `Body.setCentre` is a new method added to Matter that allows you to set the center of mass of a Body (please note the English spelling of this function.)
|
* `Body.setCentre` is a new method added to Matter that allows you to set the center of mass of a Body (please note the English spelling of this function.)
|
||||||
* Bumped Matter Plugin versions to avoid console logs from Common.info and Common.warn.
|
* `Body.scale` is a new read-only vector that holds the most recent scale values as passed to `Body.scale`.
|
||||||
* `Body.scale` is a new vector that holds the most recent scale values as passed to `Body.scale`.
|
|
||||||
* `Matter.Bodies.flagCoincidentParts` is a new function that will flags all internal edges (coincident parts) on an array of body parts. This was previously part of the `fromVertices` function, but has been made external for outside use.
|
* `Matter.Bodies.flagCoincidentParts` is a new function that will flags all internal edges (coincident parts) on an array of body parts. This was previously part of the `fromVertices` function, but has been made external for outside use.
|
||||||
* `PhysicsEditorParser.parseVertices` now uses `Bodies.flagCoincidentParts` to avoid duplicating code.
|
|
||||||
* `MatterGameObject` has a new optional boolean parameter `addToWorld` which lets you control if the Body should be added to the world or not. Useful for toggling off should you be merging pre-existing bodies with Game Objects.
|
|
||||||
* The `Matter.SetBody.setExistingBody` function, which all Matter Game Objects have, has a new parameter `addToWorld` which allows you to control when the body is added to the Matter world should you not require it immediately. It will also only add the body to the world if it doesn't already exist within it, or any of its composites.
|
|
||||||
* `PointerConstraint` has been recoded so that when pressed down, it only polls the World for a body hit test during the next game update. This stops it coming out of sync with the state of the world. Useage of the constraint remains the same as before.
|
|
||||||
* `Matter.getMatterBodies` is a new function that will return an array of Matter JS Bodies from the given input array, which can be Matter Game Objects, or any class that extends them.
|
* `Matter.getMatterBodies` is a new function that will return an array of Matter JS Bodies from the given input array, which can be Matter Game Objects, or any class that extends them.
|
||||||
* `Matter.World.has` is a new method that will take a Matter Body, or Game Object, and search the world for it. If found, it will return `true`.
|
* `Matter.World.has` is a new method that will take a Matter Body, or Game Object, and search the world for it. If found, it will return `true`.
|
||||||
* Matter now has the option to use the Runner that it ships with. The Matter Runner operates in two modes: fixed and variable. In the fixed mode, the Matter Engine updates at a fixed delta value every frame (which is what Phaser has used since the first version). In variable mode, the delta will be smoothed and capped each frame to keep the simulation constant, but at the cost of determininism. You can configure the runner by setting the `runner` property in the Matter Config object, both of which are fully covered with JSDocs. As of 3.22 the runner is now used by default in variable (non-fixed) mode. If you wish to return to the previous behavior, set `runner: { isFixed: true }`.
|
* Matter now has the option to use the Runner that it ships with. The Matter Runner operates in two modes: fixed and variable. In the fixed mode, the Matter Engine updates at a fixed delta value every frame (which is what Phaser has used since the first version). In variable mode, the delta will be smoothed and capped each frame to keep the simulation constant, but at the cost of determininism. You can configure the runner by setting the `runner` property in the Matter Config object, both of which are fully covered with JSDocs. As of 3.22 the runner is now used by default in variable (non-fixed) mode. If you wish to return to the previous behavior, set `runner: { isFixed: true }`.
|
||||||
|
@ -117,10 +142,83 @@
|
||||||
* `MatterGameObject.setOnCollideEnd` is a new method available on any Matter Game Object, that sets a callback that is invoked when the body stops colliding.
|
* `MatterGameObject.setOnCollideEnd` is a new method available on any Matter Game Object, that sets a callback that is invoked when the body stops colliding.
|
||||||
* `MatterGameObject.setOnCollideActive` is a new method available on any Matter Game Object, that sets a callback which is invoked for the duration of the bodies collision with another.
|
* `MatterGameObject.setOnCollideActive` is a new method available on any Matter Game Object, that sets a callback which is invoked for the duration of the bodies collision with another.
|
||||||
* `MatterGameObject.setOnCollideWith` is a new method available on any Matter Game Object, that allows you to set a callback to be invoked whenever the body collides with another specific body, or array of bodies.
|
* `MatterGameObject.setOnCollideWith` is a new method available on any Matter Game Object, that allows you to set a callback to be invoked whenever the body collides with another specific body, or array of bodies.
|
||||||
|
* `Body.gravityScale` is a new vector property that allows you to scale the effect of world gravity on a specific Body.
|
||||||
|
* `MatterPhysics._tempVec2` is a new private internal vector used for velocity and force calculations.
|
||||||
|
* `MatterPhysics.setVelocity` is a new method that will set both the horizontal and vertical linear velocity of the given physics bodies. This can be used on all Matter bodies, not just those created via the factory.
|
||||||
|
* `MatterPhysics.setVelocityX` is a new method that will set the horizontal linear velocity of the given physics bodies. This can be used on all Matter bodies, not just those created via the factory.
|
||||||
|
* `MatterPhysics.setVelocityY` is a new method that will set the vertical linear velocity of the given physics bodies. This can be used on all Matter bodies, not just those created via the factory.
|
||||||
|
* `MatterPhysics.setAngularVelocity` is a new method that will set the angular velocity of the given physics bodies. This can be used on all Matter bodies, not just those created via the factory.
|
||||||
|
* `MatterPhysics.applyForce` is a new method that applies a force to a body, at the bodies current position, including resulting torque. This can be used on all Matter bodies, not just those created via the factory.
|
||||||
|
* `MatterPhysics.applyForceFromPosition` is a new method that applies a force to a body from the given world position, including resulting torque. If no angle is given, the current body angle is used. This can be used on all Matter bodies, not just those created via the factory.
|
||||||
|
* `MatterPhysics.fromSVG` is a new method that allows you to create a Body from the given SVG path data.
|
||||||
|
* The `Matter.Factory.velocity` method has been removed. Please now use `MatterPhysics.setVelocity` instead.
|
||||||
|
* The `Matter.Factory.angularVelocity` method has been removed. Please now use `MatterPhysics.setAngularVelocity` instead.
|
||||||
|
* The `Matter.Factory.force` method has been removed. Please now use `MatterPhysics.applyForce` instead.
|
||||||
|
* `MatterBodyConfig` is a new type def that contains all of the Body configuration properties. This is now used through-out the JSDocs to aid in code-completion.
|
||||||
|
* `MatterBodyRenderConfig` is a new type def that contains all of the Body debug rendering configuration properties. This is now used through-out the JSDocs to aid in code-completion.
|
||||||
|
* `MatterChamferConfig` is a new type def that contains all of the chamfer configuration properties. This is now used through-out the JSDocs to aid in code-completion.
|
||||||
|
* `MatterCollisionFilter` is a new type def that contains all of the collision configuration properties. This is now used through-out the JSDocs to aid in code-completion.
|
||||||
|
* `MatterConstraintConfig` is a new type def that contains all of the constraint configuration properties. This is now used through-out the JSDocs to aid in code-completion.
|
||||||
|
* `MatterConstraintRenderConfig` is a new type def that contains all of the Constraint debug rendering configuration properties. This is now used through-out the JSDocs to aid in code-completion.
|
||||||
|
* `MatterSetBodyConfig` is a new type def that contains all of the Constraint debug rendering configuration properties. This is now used through-out the JSDocs to aid in code-completion.
|
||||||
|
* `MatterPhysics.getConstraintLength` is a new method that will return the length of the given constraint, as this is something you cannot get from the constraint properties directly.
|
||||||
|
* `MatterPhysics.alignBody` is a new method that will align a Body, or Matter Game Object, against the given coordinates, using the given alignment constant. For example, this allows you to easily position a body to the `BOTTOM_LEFT`, or `TOP_CENTER`, or a coordinate. Alignment is based on the body bounds.
|
||||||
|
* `Phaser.Types.Physics.Matter.MatterBody` is a new type def that contains all of the valid Matter Body objects. This is now used through-out the JSDocs to aid in code-completion.
|
||||||
|
* `Matter.BodyBounds` is a new class that contains methods to help you extract world coordinates from various points around the bounds of a Matter Body. Because Matter bodies are positioned based on their center of mass, and not a dimension based center, you often need to get the bounds coordinates in order to properly align them in the world. You can access this new class via `this.matter.bodyBounds`.
|
||||||
|
* The method signature for `Matter.PhysicsEditorParser.parseBody` has changed. It now takes `(x, y, config, options)` and no longer has `width` and `height` parameters. Please see the updated documentation for more details if you were calling this method directly.
|
||||||
|
* `MatterPhysics.fromPhysicsEditor` is a new method that allows you to create a Matter Body based on the given PhysicsEditor shape data. Previously, you could only using PhysicsEditor data with a Matter Game Object, but now you can create a body directly using it.
|
||||||
|
* `Matter.PhysicsJSONParser` is a new parser that will create Matter bodies from JSON physics data files. Currently onto the Phaser Physics Tracer app exports in this format, but details are published in the JSDocs, so any app can do so.
|
||||||
|
* `Matter.Factory.fromJSON` is a new method that will create a body from a JSON physics data file.
|
||||||
|
* The `SetBody` Matter component can now automatically use shapes created in the Phaser Physics Tracer App in the JSON data format.
|
||||||
|
* `Matter.Components.Sleep.setToSleep` is a new method available on any Matter Game Object that will send the body to sleep, if Engine sleeping has been enabled.
|
||||||
|
* `Matter.Components.Sleep.setAwake` is a new method available on any Matter Game Object that will awake a body from sleep, if Engine sleeping has been enabled.
|
||||||
|
|
||||||
|
#### Matter Physics Updates
|
||||||
|
|
||||||
|
* The `debug` property in the Matter World Config is now a `MatterDebugConfig` option instead of a boolean. However, if a boolean is given, it will use the default debug config values.
|
||||||
|
* The following `MatterWorldConfig` options have now been removed: `debugShowBody`, `debugShowStaticBody`, `debugBodyColor`, `debugBodyFillColor`, `debugStaticBodyColor`, `debugShowJoint`, `debugJointColor`, `debugWireframes`, `debugShowInternalEdges`, `debugShowConvexHulls`, `debugConvexHullColor` and `debugShowSleeping`. These can all be set via the new `MatterDebugConfig` object instead.
|
||||||
|
* The object `World.defaults` has been removed. Defaults are now access via `World.debugDefaults`.
|
||||||
|
* `World.renderBodies` has been rewritten to cache commonly-used values and avoid a situation when a single body would be rendered twice.
|
||||||
|
* The private method `World.renderConvexHulls` has been removed as it's no longer used internally.
|
||||||
|
* The private method `World.renderWireframes` has been removed as it's no longer used internally.
|
||||||
|
* The method `World.fromPath` has been removed. This was never used internally and you can get the same results by calling `Vertices.fromPath`.
|
||||||
|
* The `World.setBounds` argument `thickness` now defaults to 64, not 128, to keep it matching the Matter World Config.
|
||||||
|
* The `Body.render.fillStyle` property that existed on the Matter Body object has been removed and replaced with `fillColor`.
|
||||||
|
* The `Body.render.strokeStyle` property that existed on the Matter Body object has been removed and replaced with `lineColor`.
|
||||||
|
* `Matter.Body.render.sprite.xOffset` and `yOffset` are no longer set to anything when a Body is created. They are left as zero, or you can override them in the Body config, in which case the value is added to the sprite origin offset during a call to `setExistingBody`.
|
||||||
|
* The `Matter.Mass.centerOfMass` component property now returns the pre-calculated Body `centerOfMass` property, which is much more accurate than the previous bounds offset value.
|
||||||
|
* `Matter.setExistingBody`, which is called interally whenever a Body is set on a Game Object, now uses the new `centerOffset` values to ensure that the texture frame is correctly centered based on the center of mass, not the Body bounds, allowing for much more accurate body to texture mapping with complex multi-part compound bodies.
|
||||||
|
* The `Matter.PhysicsEditorParser` has been updated so it no longer needs to set the render offsets, and instead uses the center of mass values.
|
||||||
|
* If the `Matter.Body` config doesn't contain a `position` property, it will now default to using `Vertices.centre(body.vertices)` as the position. In most cases, this is what you need, so it saves having to pass it in the config object.
|
||||||
|
* Bumped Matter Plugin versions to avoid console logs from Common.info and Common.warn.
|
||||||
|
* `PhysicsEditorParser.parseVertices` now uses `Bodies.flagCoincidentParts` to avoid duplicating code.
|
||||||
|
* `MatterGameObject` has a new optional boolean constructor parameter `addToWorld` which lets you control if the Body should be added to the world or not. Useful for toggling off should you be merging pre-existing bodies with Game Objects.
|
||||||
|
* The `Matter.SetBody.setExistingBody` function, which all Matter Game Objects have, has a new parameter `addToWorld` which allows you to control when the body is added to the Matter world should you not require it immediately. It will also only add the body to the world if it doesn't already exist within it, or any of its composites.
|
||||||
|
* `PointerConstraint` has been recoded so that when pressed down, it only polls the World for a body hit test during the next game update. This stops it coming out of sync with the state of the world. Use of the constraint remains the same as before.
|
||||||
|
* You can now set `gravity: false` in your Matter Config and it will reset gravity from the defaults to zero.
|
||||||
|
* The internal Matter `Composite.setModified` function will now emit a `compositeModified` event, which the Matter World listens for, if debug draw is enabled, so it can update the composite children render styles.
|
||||||
|
* `Matter.PhysicsEditorParser.parseBody` can now accept a MatterBodyConfig file as a 4th parameter. This allows you to set Body properties when the body is created, overriding whatever values may have been set in the PhysicsEditor JSON.
|
||||||
|
|
||||||
|
#### Matter Physics Bug Fixes
|
||||||
|
|
||||||
|
* Due to the rewrite of the debug rendering, it is now possible to render _just_ constraints, where-as before this was only possible if bodies were being rendered as well. Fix #4880 (thanks @roberto257)
|
||||||
|
* `Matter.PhysicsEditorParser` had a bug where it would allow fixtures with non-clockwise sorted vertices through, which would break pointer constraint interaction with these bodies. The parser now sorts the vertices properly. Fix #4261 (thanks @Sanchez3)
|
||||||
|
|
||||||
### New Features
|
### New Features
|
||||||
|
|
||||||
* `TimeStep.smoothStep` is a new boolean property that controls if any delta smoothing takes place during the game step. Delta smoothing has been enabled in Phaser since the first version and helps avoid delta spikes and dips, especially after loss of focus. However, you can now easily toggle if this happens via this property and the corresponding `FPSConfig` property.
|
* `TimeStep.smoothStep` is a new boolean property that controls if any delta smoothing takes place during the game step. Delta smoothing has been enabled in Phaser since the first version and helps avoid delta spikes and dips, especially after loss of focus. However, you can now easily toggle if this happens via this property and the corresponding `FPSConfig` property.
|
||||||
|
* `Phaser.Math.Distance.BetweenPoints` is a new function that will return the distance between two Vector2-like objects (thanks @samme)
|
||||||
|
* `Phaser.Math.Distance.BetweenPointsSquared` is a new function that will return the squared distance between two Vector2-like objects (thanks @samme)
|
||||||
|
* `Phaser.Math.Distance.Chebyshev` is a new function that will return the Chebyshev (or chessboard) distance between two Vector2-like objects (thanks @samme)
|
||||||
|
* `Phaser.Math.Distance.Snake` is a new function that will return the rectilinear distance between two Vector2-like objects (thanks @samme)
|
||||||
|
* `ParticleEmitter.setTint` is a new method that will set the tint of emitted particles for the given Emitter only (thanks @samme)
|
||||||
|
* `ParticleEmitter.remove` is a new method that will remove the Emitter from its Emitter Manager (thanks @samme)
|
||||||
|
* `ParticleEmitterManager.removeEmitter` is a new method that will remove the given emitter from the manager, if the emitter belongs to it (thanks @samme)
|
||||||
|
* `AlphaSingle` is a new Game Object Component that allows a Game Object to set its alpha values, but only as a single uniform value, not on a per-quad basis.
|
||||||
|
* `Actions.AlignTo` (in combination with the new `Display.Align.To.QuickSet` function) allows you to align an array of Game Objects so they sit next to each other, one at a time. The first item isn't moved, the second is moved to sit next to the first, and so on. You can align them using any of the alignment constants (thanks @samme)
|
||||||
|
* `Scene.Systems.getData` is a new method that will return any data that was sent to the Scene by another Scene, i.e. during a `run` or `launch` command. You can access it via `this.sys.getData()` from within your Scene.
|
||||||
|
* `Group.internalCreateCallback` is a new optional callback that is invoked whenever a child is added to a Group. This is the same as `createCallback` except it's only for use by the parent class, allowing a parent to invoke a creation callback and for you to still provide one via the Group config.
|
||||||
|
* `Group.internalRemoveCallback` is a new optional callback that is invoked whenever a child is removed from a Group. This is the same as `removeCallback` except it's only for use by the parent class, allowing a parent to invoke a callback and for you to still provide one via the Group config.
|
||||||
|
|
||||||
### Updates
|
### Updates
|
||||||
|
|
||||||
|
@ -130,6 +228,18 @@
|
||||||
* `Body._ty` is a new internal private var, holding the Arcade Physics Body combined total delta y value.
|
* `Body._ty` is a new internal private var, holding the Arcade Physics Body combined total delta y value.
|
||||||
* `LineCurve.getUtoTmapping` has been updated to return `u` directly to avoid calculations as it's identical to `t` in a Line (thanks @rexrainbow)
|
* `LineCurve.getUtoTmapping` has been updated to return `u` directly to avoid calculations as it's identical to `t` in a Line (thanks @rexrainbow)
|
||||||
* `Curve.getSpacedPoints` will now take an optional array as the 3rd parameter to store the points results in (thanks @rexrainbow)
|
* `Curve.getSpacedPoints` will now take an optional array as the 3rd parameter to store the points results in (thanks @rexrainbow)
|
||||||
|
* Trying to play or resume an audio file with an incorrect key will now throw a runtime error, instead of a console warning (thanks @samme)
|
||||||
|
* The `Shape` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the shape, rather than a quad alpha, which never worked for Shape objects.
|
||||||
|
* The `Container` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the container, rather than a quad alpha, which never worked consistently across Container children. Fix #4916 (thanks @laineus)
|
||||||
|
* The `DOMElement` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the element, rather than a quad alpha, which never worked for these objects.
|
||||||
|
* The `Graphics` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the element, rather than a quad alpha, which never worked for these objects.
|
||||||
|
* `TweenData` has a new property called `previous` which holds the eased property value prior to the update.
|
||||||
|
* The `TWEEN_UPDATE` event now sends two new parameters to the handler: `current` and `previous` which contain the current and previous property values.
|
||||||
|
* During `collideSpriteVsGroup` checks it will now skip bodies that are disabled to save doing a `contains` test (thanks @samme)
|
||||||
|
* `Display.Align.In.QuickSet` now accepts `LEFT_BOTTOM` as `BOTTOM_LEFT`, `LEFT_TOP` as `TOP_LEFT`, `RIGHT_BOTTOM` as `BOTTOM_RIGHT` and `RIGHT_TOP` as `TOP_RIGHT`. Fix #4927 (thanks @zaniar)
|
||||||
|
* `PhysicsGroup` now uses the new `internalCreateCallback` and `internalRemoveCallback` to handle its body creation and destruction, allowing you to use your own `createCallback` and `removeCallback` as defined in the Group config. Fix #4420 #4657 #4822 (thanks @S4n60w3n @kendistiller @scrubperson)
|
||||||
|
* `DOMElement` has a new private method `handleSceneEvent` which will handle toggling the display setting of the element when a Scene sleeps and wakes. A DOM Element will now listen for the Scene sleep and wake events. These event listeners are removed in the `preDestroy` method.
|
||||||
|
* A `DOMElement` will now set the display mode to 'none' during its render if the Scene in which it belongs is no longer visible.
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
|
@ -138,13 +248,25 @@
|
||||||
* When `Game.destroy` is running, Scenes are now destroyed _before_ plugins, avoiding bugs when closing down plugins and deleting Render Textures. Fix #4849 #4876 (thanks @rexrainbow @siyuanqiao)
|
* When `Game.destroy` is running, Scenes are now destroyed _before_ plugins, avoiding bugs when closing down plugins and deleting Render Textures. Fix #4849 #4876 (thanks @rexrainbow @siyuanqiao)
|
||||||
* The `Mesh` and `Quad` Game Objects have had the `GetBounds` component removed as it cannot operate on a Mesh as they don't have origins. Fix #4902 (thanks @samme)
|
* The `Mesh` and `Quad` Game Objects have had the `GetBounds` component removed as it cannot operate on a Mesh as they don't have origins. Fix #4902 (thanks @samme)
|
||||||
* Setting `lineSpacing` in the Text Game Object style config would set the value but not apply it to the Text, leaving you to call `updateText` yourself. If set, it's now applied on instantiation. Fix #4901 (thanks @FantaZZ)
|
* Setting `lineSpacing` in the Text Game Object style config would set the value but not apply it to the Text, leaving you to call `updateText` yourself. If set, it's now applied on instantiation. Fix #4901 (thanks @FantaZZ)
|
||||||
|
* External calls to the Fullscreen API using `element.requestFullscreen()` would be blocked by the Scale Manager. The Scale Manager will no longer call `stopFullScreen` should it be triggered outside of Phaser (thanks @AdamXA)
|
||||||
|
* The `Tilemaps.Tile.tint` property wasn't working correctly as it expected the colors in the wrong order (BGR instead of RGB). It will now expect them in the correct RGB order (thanks @Aedalus @plissken2013es)
|
||||||
|
* The `ScaleManager.destroy` method wasn't being called when the Game `DESTROY` event was dispatched, causing minor gc to build up. The destroy method will now be called properly on game destruction. Fix #4944 (thanks @sunshineuoow)
|
||||||
|
* `FacebookInstantGamesPlugin.showAd` and `showVideo` will now break out of the ad iteration search once a valid ad has been found and called. Previously, it would carry on interating if the async didn't complete quickly. Fix #4888 (thanks @east62687)
|
||||||
|
* When playing an Animation, if you were to play another, then pause it, then play another the internal `_paused` wouldn't get reset, preventing you from them pausing the animations from that point on. You can now play and pause animations at will. Fix #4835 (thanks @murteira)
|
||||||
|
* In `Actions.GridAlign` if you set `width` to -1 it would align the items vertically, instead of horizontally. It now aligns them horizontally if `width` is set, or vertically if `height` is set. Fix #4899 (thanks @BenjaVR)
|
||||||
|
* A `PathFollower` with a very short duration would often not end in the correct place, which is the very end of the Path, due to the tween handling the movement not running one final update when the tween was complete. It will now always end at the final point of the path, no matter how short the duration. Fix #4950 (thanks @bramp)
|
||||||
|
* A `DOMElement` would still remain visible even if the Scene in which it belongs to was sent to sleep. A sleeping Scene shouldn't render anything. DOM Elements will now respond to sleep and wake events from their parent Scene. Fix #4870 (thanks @peonmodel)
|
||||||
|
* If a config object was passed to `MultiAtlasFile` it expected the atlas URL to be in the `url` property, however the docs and file config expected it in `atlasURL`. You can now use either of these properties to declare the url. Fix #4815 (thanks @xense)
|
||||||
|
|
||||||
### Examples, Documentation and TypeScript
|
### Examples, Documentation and TypeScript
|
||||||
|
|
||||||
My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs:
|
My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs:
|
||||||
|
|
||||||
@fselcukcan Bambosh @louisth @hexus @javigaralva @samme @BeLi4L
|
@fselcukcan Bambosh @louisth @hexus @javigaralva @samme @BeLi4L @jcyuan @javigaralva @T-Grave @bramp @Chnapy @dranitski @RollinSafary @xense
|
||||||
|
|
||||||
|
The Matter TypeScript defs have been updated to include lots of missing classes, removed some redundant elements and general fixes. The Phaser TypeScript defs now reference the Matter defs directly and no longer try to parse them from the JSDocs. This allows the `MatterJS` namespace to work in TypeScript projects without any compilation warnings.
|
||||||
|
|
||||||
|
The Spine Plugin now has new TypeScript defs in the `types` folder thanks to @supertommy
|
||||||
|
|
||||||
## Version 3.21.0 - Senku - 22nd November 2019
|
## Version 3.21.0 - Senku - 22nd November 2019
|
||||||
|
|
||||||
|
|
343
README.md
343
README.md
|
@ -12,7 +12,7 @@ Thousands of developers from indie and multi-national digital agencies, and univ
|
||||||
**Learn:** [API Docs](https://photonstorm.github.io/phaser3-docs/index.html), [Support Forum][forum] and [StackOverflow](https://stackoverflow.com/questions/tagged/phaser-framework)<br />
|
**Learn:** [API Docs](https://photonstorm.github.io/phaser3-docs/index.html), [Support Forum][forum] and [StackOverflow](https://stackoverflow.com/questions/tagged/phaser-framework)<br />
|
||||||
**Code:** 1700+ [Examples](https://phaser.io/examples) (source available in this [repo][examples])<br />
|
**Code:** 1700+ [Examples](https://phaser.io/examples) (source available in this [repo][examples])<br />
|
||||||
**Read:** The [Phaser World](#newsletter) Newsletter<br />
|
**Read:** The [Phaser World](#newsletter) Newsletter<br />
|
||||||
**Chat:** [Slack](https://phaser.io/community/slack) and [Discord](https://phaser.io/community/discord)<br />
|
**Chat:** [Discord](https://phaser.io/community/discord) and [Slack](https://phaser.io/community/slack)<br />
|
||||||
**Extend:** With [Phaser Plugins](https://phaser.io/shop/plugins)<br />
|
**Extend:** With [Phaser Plugins](https://phaser.io/shop/plugins)<br />
|
||||||
**Be awesome:** [Support](#support) the future of Phaser<br />
|
**Be awesome:** [Support](#support) the future of Phaser<br />
|
||||||
|
|
||||||
|
@ -22,23 +22,21 @@ Grab the source and join the fun!
|
||||||
|
|
||||||
<div align="center"><img src="https://phaser.io/images/github/news.jpg"></div>
|
<div align="center"><img src="https://phaser.io/images/github/news.jpg"></div>
|
||||||
|
|
||||||
> 22nd November 2019
|
> 15th January 2020
|
||||||
|
|
||||||
Welcome to the release of Phaser 3.21. This version continues our efforts to keep Phaser 3 updated and enhanced, including lots of great new features, updates and bug fixes. New in 3.21 is the ability for you to directly set the mipmap filter levels the WebGL Renderer uses when creating textures. Any valid WebGL1 filter is allowed and you can set the filter in your game config, or at runtime, as needed. This gives you far more control over the quality of highly scaled textures.
|
We're excited to announce the release of Phaser 3.22, the first of many in the year 2020. The main focus of 3.22 is all the work we've done on Matter Physics integration. Matter has been supported in Phaser since the first release, yet there were lots of things we wanted to do with it to make development life easier. 3.22 brings all of these to the front, including powerful new visual debugging options such as rendering contacts, velocity, the broadphase grid, sensors, joints and more. Matter also now has 100% JSDoc and TypeScripy coverage and I spent a long time rebuilding the TypeScript defs by hand, in order to make them as accurate as possible.
|
||||||
|
|
||||||
Also new in 3.21 is the ability to soft-wrap BitmapText objects, based on a fixed pixel width. You can also define the wrapping character to be used. Arcade Physics has updates including `overlapCirc` which allows you to return all bodies (both dynamic and static) that intersect the given circular region. The Tilemap system has been updated to support Group Layers, which were introduced in a recent update of the Tiled Map Editor. These, along with Infinite Tilemaps, are now parsed correctly.
|
As well as docs and defs there are stacks of handy new methods, including intersection tests such as `intersectPoint`, `intersectRay`, `overlap` and more. New Body level collision callbacks allow you to filter collided pairs a lot more quickly now, combined with new collision events and data type defs to give you all the information you need when resolving. There are now functions to create bodies from SVG data, JSON data or Physics Editor data directly, new Body alignment features and of course bug fixes.
|
||||||
|
|
||||||
As usual, there's more: Including lots of new Group features, several new Actions for setting scroll factors, the ability to run at a fixed frame rate under setTimeout, a new method that lets you rebind the Web Audio Context (handy for PWA environments), fixes for drag distances and we even fixed a few IE9 (yes, really!) compatibility issues.
|
It's not all about Matter Physics, though. Thanks to the community, there are new Math Distance functions such as Chebyshev, Snake and Squared Points. You can now tint particles as they're emitted, Physics Groups finally let you use your own creation and removal callbacks and plenty more besides. There are, of course, lots of bug fixes too and I've done my best to address some of the most important ones. The documentation has improved yet again and with every release the TypeScript defs get stronger and stronger. So, as usual, please do spend some time digging through the [Change Log](#changelog). I assure you, it's worth while :)
|
||||||
|
|
||||||
As usual, it doesn't end here. There are plenty more fixes, features and updates across the API. You'll find loads more great new features, updates and fixes. So, as usual, please do spend some time digging through the [Change Log](#changelog). I assure you, it's worth while :)
|
With 3.22 released I will now be taking some time to carry on with Phaser 4 development, while planning out the 3.23 release as well. Even though Phaser 4 is in build I will fully support Phaser 3 for the foreseeable future. You can follow the development progress of both versions on the Phaser Patreon.
|
||||||
|
|
||||||
It was really great to receive a bunch of quality Pull Requests from the Phaser community, many of which found their way into 3.21. The past few versions have seen a lot of significant improvements, from comprehensive Spine support, to full Video playback, it's been an exciting few months. Things traditionally get a little more quiet around this time of the year but we're planning out 3.22 already and continuing to work through the issues list. During this time, we're also working hard on Phaser 4. You can follow development progress of both on the Phaser Patreon.
|
|
||||||
|
|
||||||
As usual, I'd like to send a massive thank-you to everyone who supports Phaser on Patreon (and now even GitHub Sponsors, too!) Your continued backing keeps allowing me to work on Phaser full-time and this great new releases is the very real result of that. If you've ever considered becoming a backer, now is the perfect time!
|
As usual, I'd like to send a massive thank-you to everyone who supports Phaser on Patreon (and now even GitHub Sponsors, too!) Your continued backing keeps allowing me to work on Phaser full-time and this great new releases is the very real result of that. If you've ever considered becoming a backer, now is the perfect time!
|
||||||
|
|
||||||
If you'd like to stay abreast of developments then I publish my [Developer Logs](https://phaser.io/phaser3/devlog) in the [Phaser World](https://phaser.io/community/newsletter) newsletter. Subscribe to stay in touch and get all the latest news from the core team and the wider community.
|
If you'd like to stay abreast of developments then I publish my [Developer Logs](https://phaser.io/phaser3/devlog) in the [Phaser World](https://phaser.io/community/newsletter) newsletter. Subscribe to stay in touch and get all the latest news from the core team and the wider community.
|
||||||
|
|
||||||
You can also follow Phaser on [Twitter](https://twitter.com/phaser_) and chat with fellow Phaser devs in our [Slack](https://phaser.io/community/slack) and [Discord](https://phaser.io/community/discord) channels.
|
You can also follow Phaser on [Twitter](https://twitter.com/phaser_) and chat with fellow Phaser devs in our [Discord](https://phaser.io/community/discord) and [Slack](https://phaser.io/community/slack) channels.
|
||||||
|
|
||||||
Phaser 3 wouldn't have been possible without the fantastic support of the community and Patreon. Thank you to everyone who supports our work, who shares our belief in the future of HTML5 gaming, and Phaser's role in that.
|
Phaser 3 wouldn't have been possible without the fantastic support of the community and Patreon. Thank you to everyone who supports our work, who shares our belief in the future of HTML5 gaming, and Phaser's role in that.
|
||||||
|
|
||||||
|
@ -111,13 +109,13 @@ npm install phaser
|
||||||
[Phaser is on jsDelivr](https://www.jsdelivr.com/projects/phaser) which is a "super-fast CDN for developers". Include the following in your html:
|
[Phaser is on jsDelivr](https://www.jsdelivr.com/projects/phaser) which is a "super-fast CDN for developers". Include the following in your html:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="//cdn.jsdelivr.net/npm/phaser@3.21.0/dist/phaser.js"></script>
|
<script src="//cdn.jsdelivr.net/npm/phaser@3.22.0/dist/phaser.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
or the minified version:
|
or the minified version:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="//cdn.jsdelivr.net/npm/phaser@3.21.0/dist/phaser.min.js"></script>
|
<script src="//cdn.jsdelivr.net/npm/phaser@3.22.0/dist/phaser.min.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
### API Documentation
|
### API Documentation
|
||||||
|
@ -200,13 +198,13 @@ We've 3 tutorials related to Facebook Instant Games and Phaser:
|
||||||
A special build of Phaser with the Facebook Instant Games Plugin ready-enabled is [available on jsDelivr](https://www.jsdelivr.com/projects/phaser). Include the following in your html:
|
A special build of Phaser with the Facebook Instant Games Plugin ready-enabled is [available on jsDelivr](https://www.jsdelivr.com/projects/phaser). Include the following in your html:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="//cdn.jsdelivr.net/npm/phaser@3.21.0/dist/phaser-facebook-instant-games.js"></script>
|
<script src="//cdn.jsdelivr.net/npm/phaser@3.22.0/dist/phaser-facebook-instant-games.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
or the minified version:
|
or the minified version:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="//cdn.jsdelivr.net/npm/phaser@3.21.0/dist/phaser-facebook-instant-games.min.js"></script>
|
<script src="//cdn.jsdelivr.net/npm/phaser@3.22.0/dist/phaser-facebook-instant-games.min.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
The build files are in the git repository in the `dist` folder, and you can also include the plugin in custom builds.
|
The build files are in the git repository in the `dist` folder, and you can also include the plugin in custom builds.
|
||||||
|
@ -223,7 +221,7 @@ Create an `index.html` page locally and paste the following code into it:
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/phaser@3.21.0/dist/phaser-arcade-physics.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/phaser@3.22.0/dist/phaser-arcade-physics.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
@ -334,96 +332,257 @@ You can then run `webpack` to create a development build in the `build` folder w
|
||||||
|
|
||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
## Version 3.21.0 - Senku - 22nd November 2019
|
## Version 3.22 - Kohaku - January 15th 2020
|
||||||
|
|
||||||
|
### Matter Physics
|
||||||
|
|
||||||
|
All of the following are specific to the Matter Physics implementation used by Phaser:
|
||||||
|
|
||||||
|
#### Matter Physics New Features
|
||||||
|
|
||||||
|
* Matter Physics now has 100% JSDoc coverage! Woohoo :)
|
||||||
|
* Matter Physics now has brand new TypeScript defs included in the `types` folder :)
|
||||||
|
* `MatterDebugConfig` is a new configuration object that contains all of the following new Matter debug settings:
|
||||||
|
* `showAxes`- Render all of the body axes?
|
||||||
|
* `showAngleIndicator`- Render just a single body axis?
|
||||||
|
* `angleColor`- The color of the body angle / axes lines.
|
||||||
|
* `showBroadphase`- Render the broadphase grid?
|
||||||
|
* `broadphaseColor`- The color of the broadphase grid.
|
||||||
|
* `showBounds`- Render the bounds of the bodies in the world?
|
||||||
|
* `boundsColor`- The color of the body bounds.
|
||||||
|
* `showVelocity`- Render the velocity of the bodies in the world?
|
||||||
|
* `velocityColor`- The color of the body velocity line.
|
||||||
|
* `showCollisions`- Render the collision points and normals for colliding pairs.
|
||||||
|
* `collisionColor`- The color of the collision points.
|
||||||
|
* `showSeparation`- Render lines showing the separation between bodies.
|
||||||
|
* `separationColor`- The color of the body separation line.
|
||||||
|
* `showBody`- Render the dynamic bodies in the world to the Graphics object?
|
||||||
|
* `showStaticBody`- Render the static bodies in the world to the Graphics object?
|
||||||
|
* `showInternalEdges`- When rendering bodies, render the internal edges as well?
|
||||||
|
* `renderFill`- Render the bodies using a fill color.
|
||||||
|
* `renderLine`- Render the bodies using a line stroke.
|
||||||
|
* `fillColor`- The color value of the fill when rendering dynamic bodies.
|
||||||
|
* `fillOpacity`- The opacity of the fill when rendering dynamic bodies, a value between 0 and 1.
|
||||||
|
* `lineColor`- The color value of the line stroke when rendering dynamic bodies.
|
||||||
|
* `lineOpacity`- The opacity of the line when rendering dynamic bodies, a value between 0 and 1.
|
||||||
|
* `lineThickness`- If rendering lines, the thickness of the line.
|
||||||
|
* `staticFillColor`- The color value of the fill when rendering static bodies.
|
||||||
|
* `staticLineColor`- The color value of the line stroke when rendering static bodies.
|
||||||
|
* `showSleeping`- Render any sleeping bodies (dynamic or static) in the world to the Graphics object?
|
||||||
|
* `staticBodySleepOpacity`] - The amount to multiply the opacity of sleeping static bodies by.
|
||||||
|
* `sleepFillColor`- The color value of the fill when rendering sleeping dynamic bodies.
|
||||||
|
* `sleepLineColor`- The color value of the line stroke when rendering sleeping dynamic bodies.
|
||||||
|
* `showSensors`- Render bodies or body parts that are flagged as being a sensor?
|
||||||
|
* `sensorFillColor`- The fill color when rendering body sensors.
|
||||||
|
* `sensorLineColor`- The line color when rendering body sensors.
|
||||||
|
* `showPositions`- Render the position of non-static bodies?
|
||||||
|
* `positionSize`- The size of the rectangle drawn when rendering the body position.
|
||||||
|
* `positionColor`- The color value of the rectangle drawn when rendering the body position.
|
||||||
|
* `showJoint`- Render all world constraints to the Graphics object?
|
||||||
|
* `jointColor`- The color value of joints when `showJoint` is set.
|
||||||
|
* `jointLineOpacity`- The line opacity when rendering joints, a value between 0 and 1.
|
||||||
|
* `jointLineThickness`- The line thickness when rendering joints.
|
||||||
|
* `pinSize`- The size of the circles drawn when rendering pin constraints.
|
||||||
|
* `pinColor`- The color value of the circles drawn when rendering pin constraints.
|
||||||
|
* `springColor`- The color value of spring constraints.
|
||||||
|
* `anchorColor`- The color value of constraint anchors.
|
||||||
|
* `anchorSize`- The size of the circles drawn as the constraint anchors.
|
||||||
|
* `showConvexHulls`- When rendering polygon bodies, render the convex hull as well?
|
||||||
|
* `hullColor`- The color value of hulls when `showConvexHulls` is set.
|
||||||
|
* `World.renderBody` is a new method that will render a single Matter Body to the given Graphics object. This is used internally during debug rendering but is also public. This allows you to control which bodies are rendered and to which Graphics object, should you wish to use them in-game and not just during debugging.
|
||||||
|
* `World.renderConstraint` is a new method that will render a single Matter Constraint, such as a pin or a spring, to the given Graphics object. This is used internally during debug rendering but is also public. This allows you to control which constraints are rendered and to which Graphics object, should you wish to use them in-game and not just during debugging.
|
||||||
|
* `World.renderConvexHull` is a new method that will render the convex hull of a single Matter Body, to the given Graphics object. This is used internally during debug rendering but is also public. This allows you to control which hulls are rendered and to which Graphics object, should you wish to use them in-game and not just during debugging.
|
||||||
|
* `World.renderGrid` is a new method that will render the broadphase Grid to the given graphics instance.
|
||||||
|
* `World.renderBodyBounds` is a new method that will render the bounds of all the given bodies to the given graphics instance.
|
||||||
|
* `World.renderBodyAxes` is a new method that will render the axes of all the given bodies to the given graphics instance.
|
||||||
|
* `World.renderBodyVelocity` is a new method that will render a velocity line for all the given bodies to the given graphics instance.
|
||||||
|
* `World.renderSeparations` is a new method that will render the separations in the current pairs list to the given graphics instance.
|
||||||
|
* `World.renderCollisions` is a new method that will render the collision points and normals in the current pairs list to the given graphics instance.
|
||||||
|
* `World.getAllBodies` is a new method that will return all bodies in the Matter World.
|
||||||
|
* `World.getAllConstraints` is a new method that will return all constraints in the Matter World.
|
||||||
|
* `World.getAllComposites` is a new method that will return all composites in the Matter World.
|
||||||
|
* `MatterPhysics.composite` is a new reference to the `Matter.Composite` module for easy access from within a Scene.
|
||||||
|
* `MatterPhysics.detector` is a new reference to the `Matter.Dectector` module for easy access from within a Scene.
|
||||||
|
* `MatterPhysics.grid` is a new reference to the `Matter.Grid` module for easy access from within a Scene.
|
||||||
|
* `MatterPhysics.pair` is a new reference to the `Matter.Pair` module for easy access from within a Scene.
|
||||||
|
* `MatterPhysics.pairs` is a new reference to the `Matter.Pairs` module for easy access from within a Scene.
|
||||||
|
* `MatterPhysics.query` is a new reference to the `Matter.Query` module for easy access from within a Scene.
|
||||||
|
* `MatterPhysics.resolver` is a new reference to the `Matter.Resolver` module for easy access from within a Scene.
|
||||||
|
* `MatterPhysics.sat` is a new reference to the `Matter.SAT` module for easy access from within a Scene.
|
||||||
|
* `MatterPhysics.constraint` is a new reference to the `Matter.Constraint` module for easy access from within a Scene.
|
||||||
|
* `MatterPhysics.composites` is a new reference to the `Matter.Composites` module for easy access from within a Scene.
|
||||||
|
* `MatterPhysics.axes` is a new reference to the `Matter.Axes` module for easy access from within a Scene.
|
||||||
|
* `MatterPhysics.bounds` is a new reference to the `Matter.Bounds` module for easy access from within a Scene.
|
||||||
|
* `MatterPhysics.svg` is a new reference to the `Matter.Svg` module for easy access from within a Scene.
|
||||||
|
* `MatterPhysics.vector` is a new reference to the `Matter.Vector` module for easy access from within a Scene.
|
||||||
|
* `MatterPhysics.vertices` is a new reference to the `Matter.Vertices` module for easy access from within a Scene.
|
||||||
|
* `BEFORE_ADD` is a new Event dispatched by `Matter.World` when a Body or Constraint is about to be added to the World.
|
||||||
|
* `AFTER_ADD` is a new Event dispatched by `Matter.World` when a Body or Constraint has been added to the World.
|
||||||
|
* `BEFORE_REMOVE` is a new Event dispatched by `Matter.World` when a Body or Constraint is about to be removed from the World.
|
||||||
|
* `AFTER_REMOVE` is a new Event dispatched by `Matter.World` when a Body or Constraint has been removed from the World.
|
||||||
|
* `Body.render.lineOpacity` is a new property on the Matter Body object that allows for custom debug rendering.
|
||||||
|
* `Body.render.lineThickness` is a new property on the Matter Body object that allows for custom debug rendering.
|
||||||
|
* `Body.render.fillOpacity` is a new property on the Matter Body object that allows for custom debug rendering.
|
||||||
|
* `World.setCompositeRenderStyle` is a new method that lets you quickly set the render style values on the children of the given compposite.
|
||||||
|
* `World.setBodyRenderStyle` is a new method that lets you quickly set the render style values on the given Body.
|
||||||
|
* `World.setConstraintRenderStyle` is a new method that lets you quickly set the render style values on the given Constraint.
|
||||||
|
* You can now set `restingThresh` in the Matter Configuration file to adjust the Resolver property.
|
||||||
|
* You can now set `restingThreshTangent` in the Matter Configuration file to adjust the Resolver property.
|
||||||
|
* You can now set `positionDampen` in the Matter Configuration file to adjust the Resolver property.
|
||||||
|
* You can now set `positionWarming` in the Matter Configuration file to adjust the Resolver property.
|
||||||
|
* You can now set `frictionNormalMultiplier` in the Matter Configuration file to adjust the Resolver property.
|
||||||
|
* `MatterPhysics.containsPoint` is a new method that returns a boolean if any of the given bodies intersect with the given point.
|
||||||
|
* `MatterPhysics.intersectPoint` is a new method that checks which bodies intersect with the given point and returns them.
|
||||||
|
* `MatterPhysics.intersectRect` is a new method that checks which bodies intersect with the given rectangular area, and returns them. Optionally, it can check which bodies are outside of the area.
|
||||||
|
* `MatterPhysics.intersectRay` is a new method that checks which bodies intersect with the given ray segment and returns them. Optionally, you can set the width of the ray.
|
||||||
|
* `MatterPhysics.intersectBody` is a new method that checks which bodies intersect with the given body and returns them. If the bodies are set to not collide this can be used as an overlaps check.
|
||||||
|
* `MatterPhysics.overlap` is a new method that takes a target body and checks to see if it overlaps with any of the bodies given. If they do, optional `process` and `overlap` callbacks are invoked, passing the overlapping bodies to them, along with additional collision data.
|
||||||
|
* `MatterPhysics.setCollisionCategory` is a new method that will set the collision filter category to the value given, on all of the bodies given. This allows you to easily set the category on bodies that don't have a Phaser Matter Collision component.
|
||||||
|
* `MatterPhysics.setCollisionGroup` is a new method that will set the collision filter group to the value given, on all of the bodies given. This allows you to easily set the group on bodies that don't have a Phaser Matter Collision component.
|
||||||
|
* `MatterPhysics.setCollidesWith` is a new method that will set the collision filter mask to the value given, on all of the bodies given. This allows you to easily set the filter mask on bodies that don't have a Phaser Matter Collision component.
|
||||||
|
* `Matter.Body.centerOfMass` is a new vec2 property added to the Matter Body object that retains the center of mass coordinates when the Body is first created, or has parts added to it. These are float values, derived from the body position and bounds.
|
||||||
|
* `Matter.Body.centerOffset` is a new vec2 property added to the Matter Body object that retains the center offset coordinates when the Body is first created, or has parts added to it. These are pixel values.
|
||||||
|
* `Constraint.pointAWorld` is a new method added to Matter that returns the world-space position of `constraint.pointA`, accounting for `constraint.bodyA`.
|
||||||
|
* `Constraint.pointBWorld` is a new method added to Matter that returns the world-space position of `constraint.pointB`, accounting for `constraint.bodyB`.
|
||||||
|
* `Body.setCentre` is a new method added to Matter that allows you to set the center of mass of a Body (please note the English spelling of this function.)
|
||||||
|
* `Body.scale` is a new read-only vector that holds the most recent scale values as passed to `Body.scale`.
|
||||||
|
* `Matter.Bodies.flagCoincidentParts` is a new function that will flags all internal edges (coincident parts) on an array of body parts. This was previously part of the `fromVertices` function, but has been made external for outside use.
|
||||||
|
* `Matter.getMatterBodies` is a new function that will return an array of Matter JS Bodies from the given input array, which can be Matter Game Objects, or any class that extends them.
|
||||||
|
* `Matter.World.has` is a new method that will take a Matter Body, or Game Object, and search the world for it. If found, it will return `true`.
|
||||||
|
* Matter now has the option to use the Runner that it ships with. The Matter Runner operates in two modes: fixed and variable. In the fixed mode, the Matter Engine updates at a fixed delta value every frame (which is what Phaser has used since the first version). In variable mode, the delta will be smoothed and capped each frame to keep the simulation constant, but at the cost of determininism. You can configure the runner by setting the `runner` property in the Matter Config object, both of which are fully covered with JSDocs. As of 3.22 the runner is now used by default in variable (non-fixed) mode. If you wish to return to the previous behavior, set `runner: { isFixed: true }`.
|
||||||
|
* `Body.onCollideCallback` is a new Matter Body property that can point to a callback to invoke when the body starts colliding.
|
||||||
|
* `Body.onCollideEndCallback` is a new Matter Body property that can point to a callback to invoke when the body stops colliding.
|
||||||
|
* `Body.onCollideActiveCallback` is a new Matter Body property that can point to a callback to invoke for the duration the body is colliding.
|
||||||
|
* `Body.onCollideWith` is a new Matter Body property that holds a mapping between bodies and collision callbacks.
|
||||||
|
* `MatterGameObject.setOnCollide` is a new method available on any Matter Game Object, that sets a callback that is invoked when the body collides with another.
|
||||||
|
* `MatterGameObject.setOnCollideEnd` is a new method available on any Matter Game Object, that sets a callback that is invoked when the body stops colliding.
|
||||||
|
* `MatterGameObject.setOnCollideActive` is a new method available on any Matter Game Object, that sets a callback which is invoked for the duration of the bodies collision with another.
|
||||||
|
* `MatterGameObject.setOnCollideWith` is a new method available on any Matter Game Object, that allows you to set a callback to be invoked whenever the body collides with another specific body, or array of bodies.
|
||||||
|
* `Body.gravityScale` is a new vector property that allows you to scale the effect of world gravity on a specific Body.
|
||||||
|
* `MatterPhysics._tempVec2` is a new private internal vector used for velocity and force calculations.
|
||||||
|
* `MatterPhysics.setVelocity` is a new method that will set both the horizontal and vertical linear velocity of the given physics bodies. This can be used on all Matter bodies, not just those created via the factory.
|
||||||
|
* `MatterPhysics.setVelocityX` is a new method that will set the horizontal linear velocity of the given physics bodies. This can be used on all Matter bodies, not just those created via the factory.
|
||||||
|
* `MatterPhysics.setVelocityY` is a new method that will set the vertical linear velocity of the given physics bodies. This can be used on all Matter bodies, not just those created via the factory.
|
||||||
|
* `MatterPhysics.setAngularVelocity` is a new method that will set the angular velocity of the given physics bodies. This can be used on all Matter bodies, not just those created via the factory.
|
||||||
|
* `MatterPhysics.applyForce` is a new method that applies a force to a body, at the bodies current position, including resulting torque. This can be used on all Matter bodies, not just those created via the factory.
|
||||||
|
* `MatterPhysics.applyForceFromPosition` is a new method that applies a force to a body from the given world position, including resulting torque. If no angle is given, the current body angle is used. This can be used on all Matter bodies, not just those created via the factory.
|
||||||
|
* `MatterPhysics.fromSVG` is a new method that allows you to create a Body from the given SVG path data.
|
||||||
|
* The `Matter.Factory.velocity` method has been removed. Please now use `MatterPhysics.setVelocity` instead.
|
||||||
|
* The `Matter.Factory.angularVelocity` method has been removed. Please now use `MatterPhysics.setAngularVelocity` instead.
|
||||||
|
* The `Matter.Factory.force` method has been removed. Please now use `MatterPhysics.applyForce` instead.
|
||||||
|
* `MatterBodyConfig` is a new type def that contains all of the Body configuration properties. This is now used through-out the JSDocs to aid in code-completion.
|
||||||
|
* `MatterBodyRenderConfig` is a new type def that contains all of the Body debug rendering configuration properties. This is now used through-out the JSDocs to aid in code-completion.
|
||||||
|
* `MatterChamferConfig` is a new type def that contains all of the chamfer configuration properties. This is now used through-out the JSDocs to aid in code-completion.
|
||||||
|
* `MatterCollisionFilter` is a new type def that contains all of the collision configuration properties. This is now used through-out the JSDocs to aid in code-completion.
|
||||||
|
* `MatterConstraintConfig` is a new type def that contains all of the constraint configuration properties. This is now used through-out the JSDocs to aid in code-completion.
|
||||||
|
* `MatterConstraintRenderConfig` is a new type def that contains all of the Constraint debug rendering configuration properties. This is now used through-out the JSDocs to aid in code-completion.
|
||||||
|
* `MatterSetBodyConfig` is a new type def that contains all of the Constraint debug rendering configuration properties. This is now used through-out the JSDocs to aid in code-completion.
|
||||||
|
* `MatterPhysics.getConstraintLength` is a new method that will return the length of the given constraint, as this is something you cannot get from the constraint properties directly.
|
||||||
|
* `MatterPhysics.alignBody` is a new method that will align a Body, or Matter Game Object, against the given coordinates, using the given alignment constant. For example, this allows you to easily position a body to the `BOTTOM_LEFT`, or `TOP_CENTER`, or a coordinate. Alignment is based on the body bounds.
|
||||||
|
* `Phaser.Types.Physics.Matter.MatterBody` is a new type def that contains all of the valid Matter Body objects. This is now used through-out the JSDocs to aid in code-completion.
|
||||||
|
* `Matter.BodyBounds` is a new class that contains methods to help you extract world coordinates from various points around the bounds of a Matter Body. Because Matter bodies are positioned based on their center of mass, and not a dimension based center, you often need to get the bounds coordinates in order to properly align them in the world. You can access this new class via `this.matter.bodyBounds`.
|
||||||
|
* The method signature for `Matter.PhysicsEditorParser.parseBody` has changed. It now takes `(x, y, config, options)` and no longer has `width` and `height` parameters. Please see the updated documentation for more details if you were calling this method directly.
|
||||||
|
* `MatterPhysics.fromPhysicsEditor` is a new method that allows you to create a Matter Body based on the given PhysicsEditor shape data. Previously, you could only using PhysicsEditor data with a Matter Game Object, but now you can create a body directly using it.
|
||||||
|
* `Matter.PhysicsJSONParser` is a new parser that will create Matter bodies from JSON physics data files. Currently onto the Phaser Physics Tracer app exports in this format, but details are published in the JSDocs, so any app can do so.
|
||||||
|
* `Matter.Factory.fromJSON` is a new method that will create a body from a JSON physics data file.
|
||||||
|
* The `SetBody` Matter component can now automatically use shapes created in the Phaser Physics Tracer App in the JSON data format.
|
||||||
|
* `Matter.Components.Sleep.setToSleep` is a new method available on any Matter Game Object that will send the body to sleep, if Engine sleeping has been enabled.
|
||||||
|
* `Matter.Components.Sleep.setAwake` is a new method available on any Matter Game Object that will awake a body from sleep, if Engine sleeping has been enabled.
|
||||||
|
|
||||||
|
#### Matter Physics Updates
|
||||||
|
|
||||||
|
* The `debug` property in the Matter World Config is now a `MatterDebugConfig` option instead of a boolean. However, if a boolean is given, it will use the default debug config values.
|
||||||
|
* The following `MatterWorldConfig` options have now been removed: `debugShowBody`, `debugShowStaticBody`, `debugBodyColor`, `debugBodyFillColor`, `debugStaticBodyColor`, `debugShowJoint`, `debugJointColor`, `debugWireframes`, `debugShowInternalEdges`, `debugShowConvexHulls`, `debugConvexHullColor` and `debugShowSleeping`. These can all be set via the new `MatterDebugConfig` object instead.
|
||||||
|
* The object `World.defaults` has been removed. Defaults are now access via `World.debugDefaults`.
|
||||||
|
* `World.renderBodies` has been rewritten to cache commonly-used values and avoid a situation when a single body would be rendered twice.
|
||||||
|
* The private method `World.renderConvexHulls` has been removed as it's no longer used internally.
|
||||||
|
* The private method `World.renderWireframes` has been removed as it's no longer used internally.
|
||||||
|
* The method `World.fromPath` has been removed. This was never used internally and you can get the same results by calling `Vertices.fromPath`.
|
||||||
|
* The `World.setBounds` argument `thickness` now defaults to 64, not 128, to keep it matching the Matter World Config.
|
||||||
|
* The `Body.render.fillStyle` property that existed on the Matter Body object has been removed and replaced with `fillColor`.
|
||||||
|
* The `Body.render.strokeStyle` property that existed on the Matter Body object has been removed and replaced with `lineColor`.
|
||||||
|
* `Matter.Body.render.sprite.xOffset` and `yOffset` are no longer set to anything when a Body is created. They are left as zero, or you can override them in the Body config, in which case the value is added to the sprite origin offset during a call to `setExistingBody`.
|
||||||
|
* The `Matter.Mass.centerOfMass` component property now returns the pre-calculated Body `centerOfMass` property, which is much more accurate than the previous bounds offset value.
|
||||||
|
* `Matter.setExistingBody`, which is called interally whenever a Body is set on a Game Object, now uses the new `centerOffset` values to ensure that the texture frame is correctly centered based on the center of mass, not the Body bounds, allowing for much more accurate body to texture mapping with complex multi-part compound bodies.
|
||||||
|
* The `Matter.PhysicsEditorParser` has been updated so it no longer needs to set the render offsets, and instead uses the center of mass values.
|
||||||
|
* If the `Matter.Body` config doesn't contain a `position` property, it will now default to using `Vertices.centre(body.vertices)` as the position. In most cases, this is what you need, so it saves having to pass it in the config object.
|
||||||
|
* Bumped Matter Plugin versions to avoid console logs from Common.info and Common.warn.
|
||||||
|
* `PhysicsEditorParser.parseVertices` now uses `Bodies.flagCoincidentParts` to avoid duplicating code.
|
||||||
|
* `MatterGameObject` has a new optional boolean constructor parameter `addToWorld` which lets you control if the Body should be added to the world or not. Useful for toggling off should you be merging pre-existing bodies with Game Objects.
|
||||||
|
* The `Matter.SetBody.setExistingBody` function, which all Matter Game Objects have, has a new parameter `addToWorld` which allows you to control when the body is added to the Matter world should you not require it immediately. It will also only add the body to the world if it doesn't already exist within it, or any of its composites.
|
||||||
|
* `PointerConstraint` has been recoded so that when pressed down, it only polls the World for a body hit test during the next game update. This stops it coming out of sync with the state of the world. Use of the constraint remains the same as before.
|
||||||
|
* You can now set `gravity: false` in your Matter Config and it will reset gravity from the defaults to zero.
|
||||||
|
* The internal Matter `Composite.setModified` function will now emit a `compositeModified` event, which the Matter World listens for, if debug draw is enabled, so it can update the composite children render styles.
|
||||||
|
* `Matter.PhysicsEditorParser.parseBody` can now accept a MatterBodyConfig file as a 4th parameter. This allows you to set Body properties when the body is created, overriding whatever values may have been set in the PhysicsEditor JSON.
|
||||||
|
|
||||||
|
#### Matter Physics Bug Fixes
|
||||||
|
|
||||||
|
* Due to the rewrite of the debug rendering, it is now possible to render _just_ constraints, where-as before this was only possible if bodies were being rendered as well. Fix #4880 (thanks @roberto257)
|
||||||
|
* `Matter.PhysicsEditorParser` had a bug where it would allow fixtures with non-clockwise sorted vertices through, which would break pointer constraint interaction with these bodies. The parser now sorts the vertices properly. Fix #4261 (thanks @Sanchez3)
|
||||||
|
|
||||||
### New Features
|
### New Features
|
||||||
|
|
||||||
* You can now specify the mipmap filter level to be used when creating WebGL textures. This can be set in the Game Config using the new `mipmapFilter` property, which is a string, such as 'NEAREST_MIPMAP_NEAREST'. Or, you can set the new `WebGLRenderer.mipmapFilter` property to a valid GLenum. If you set it on the renderer, it will only impact any textures loaded _after_ it has been set, so do so in your Scene `init` method if you want it to be used for textures you're about to load. By changing the mipmap level you can drastically improve the quality when reducing large textures. Please note, due to WebGL1 limitations, this only works on power-of-two sized textures. It also works on textures created from Canvas, Videos or RenderTextures.
|
* `TimeStep.smoothStep` is a new boolean property that controls if any delta smoothing takes place during the game step. Delta smoothing has been enabled in Phaser since the first version and helps avoid delta spikes and dips, especially after loss of focus. However, you can now easily toggle if this happens via this property and the corresponding `FPSConfig` property.
|
||||||
* `BitmapText.setMaxWidth` is a new method that allows you to set a maximum width (in pixels) for the BitmapText to take up when rendering. Lines of text longer than `maxWidth` will be wrapped, based on whitespace, to the next line. This allows you to do word-wrapping on BitmapText objects, something only previously possible on Text objects.
|
* `Phaser.Math.Distance.BetweenPoints` is a new function that will return the distance between two Vector2-like objects (thanks @samme)
|
||||||
* `BitmapText.wordWrapCharCode` is a new property that works with `setMaxWidth` that allows you to control which character code causes a line-wrap. By default it is 32 (a space character).
|
* `Phaser.Math.Distance.BetweenPointsSquared` is a new function that will return the squared distance between two Vector2-like objects (thanks @samme)
|
||||||
* `ArcadePhysics.closest` now has an optional `targets` argument. The targets can be any Arcade Physics Game Object, Body or Static Body and it will return only the closet target from those given (thanks @samme)
|
* `Phaser.Math.Distance.Chebyshev` is a new function that will return the Chebyshev (or chessboard) distance between two Vector2-like objects (thanks @samme)
|
||||||
* `ArcadePhysics.furthest` now has an optional `targets` argument. The targets can be any Arcade Physics Game Object, Body or Static Body and it will return only the furthest target from those given (thanks @samme)
|
* `Phaser.Math.Distance.Snake` is a new function that will return the rectilinear distance between two Vector2-like objects (thanks @samme)
|
||||||
* `Tilemaps.Parsers.Tiled.CreateGroupLayer` is a new function that parses a Tiled group layer and adds in support for Tiled layer groups (introduced in Tiled 1.2.0). Feature #4099 (thanks @Babeetlebum @Olliebrown)
|
* `ParticleEmitter.setTint` is a new method that will set the tint of emitted particles for the given Emitter only (thanks @samme)
|
||||||
* The Tilemap system now supports infinite Tilemaps from the Tiled map editor (thanks @Olliebrown)
|
* `ParticleEmitter.remove` is a new method that will remove the Emitter from its Emitter Manager (thanks @samme)
|
||||||
* `Tilemap.getImageLayerNames` is a new method that returns a list of all valid imagelayer names loaded in the Tilemap (thanks @Olliebrown)
|
* `ParticleEmitterManager.removeEmitter` is a new method that will remove the given emitter from the manager, if the emitter belongs to it (thanks @samme)
|
||||||
* `Tilemap.getObjectLayerNames` is a new method that returns a list of all valid objectgroup names loaded in the Tilemap (thanks @Olliebrown)
|
* `AlphaSingle` is a new Game Object Component that allows a Game Object to set its alpha values, but only as a single uniform value, not on a per-quad basis.
|
||||||
* `Tilemap.getTileLayerNames` is a new method that returns a list of all valid tilelayer names loaded in the Tilemap (thanks @Olliebrown)
|
* `Actions.AlignTo` (in combination with the new `Display.Align.To.QuickSet` function) allows you to align an array of Game Objects so they sit next to each other, one at a time. The first item isn't moved, the second is moved to sit next to the first, and so on. You can align them using any of the alignment constants (thanks @samme)
|
||||||
* When `forceSetTimeOut` is set to `true` in the Game Config, you can now set the target frame rate by setting the `fps.target` value (thanks @pavels)
|
* `Scene.Systems.getData` is a new method that will return any data that was sent to the Scene by another Scene, i.e. during a `run` or `launch` command. You can access it via `this.sys.getData()` from within your Scene.
|
||||||
* Videos can now be loaded from a data URI, allowing for base64 encoded videos to be used in the Loader instead of file based ones. Although, as with all base64 encoded data, we strongly recommend against this (thanks @apasov)
|
* `Group.internalCreateCallback` is a new optional callback that is invoked whenever a child is added to a Group. This is the same as `createCallback` except it's only for use by the parent class, allowing a parent to invoke a creation callback and for you to still provide one via the Group config.
|
||||||
* `Math.MIN_SAFE_INTEGER` is a new math const that stores the minimum safe integer for browsers that don't provide this, such as IE (thanks @jronn)
|
* `Group.internalRemoveCallback` is a new optional callback that is invoked whenever a child is removed from a Group. This is the same as `removeCallback` except it's only for use by the parent class, allowing a parent to invoke a callback and for you to still provide one via the Group config.
|
||||||
* `Math.MAX_SAFE_INTEGER` is a new math const that stores the maximum safe integer for browsers that don't provide this, such as IE (thanks @jronn)
|
|
||||||
* `KeyCodes.NUMPAD_ADD` has been added to the keycodes list (thanks @Martin-Antonov)
|
|
||||||
* `KeyCodes.NUMPAD_SUBTRACT` has been added to the keycodes list (thanks @Martin-Antonov)
|
|
||||||
* `Video.removeVideoElementOnDestroy` is a new boolean property that allows you to control if the Video element is removed from the DOM when the Video Game Object is destroyed.
|
|
||||||
* `Actions.SetScrollFactor` is a new Action that will set the scroll factor on an array of Game Objects, including stepped incremental changes per item (thanks @rexrainbow)
|
|
||||||
* `Actions.SetScrollFactorX` is a new Action that will set the horizontal scroll factor on an array of Game Objects, including stepped incremental changes per item (thanks @rexrainbow)
|
|
||||||
* `Actions.SetScrollFactorY` is a new Action that will set the horizontal scroll factor on an array of Game Objects, including stepped incremental changes per item (thanks @rexrainbow)
|
|
||||||
* The `Group` config object now supports use of the `setScrollFactor` property to set the value on each child of the Group (thanks @rexrainbow)
|
|
||||||
* `Group.propertyValueSet` is a new method that sets a given property on each Group member (thanks @rexrainbow)
|
|
||||||
* `Group.propertyValueInc` is a new method that adds an amount to a given property on each Group member (thanks @rexrainbow)
|
|
||||||
* `Group.setX` is a new method that sets the x coordinate on each Group member (thanks @rexrainbow)
|
|
||||||
* `Group.setY` is a new method that sets the y coordinate on each Group member (thanks @rexrainbow)
|
|
||||||
* `Group.setXY` is a new method that sets the x and y coordinate on each Group member (thanks @rexrainbow)
|
|
||||||
* `Group.incX` is a new method that increments the x coordinate on each Group member (thanks @rexrainbow)
|
|
||||||
* `Group.incY` is a new method that increments the y coordinate on each Group member (thanks @rexrainbow)
|
|
||||||
* `Group.incXY` is a new method that increments the x and y coordinate on each Group member (thanks @rexrainbow)
|
|
||||||
* `Group.shiftPosition` is a new method that iterates the Group members and shifts the position of each to the previous members position (thanks @rexrainbow)
|
|
||||||
* `Group.angle` is a new method that sets the angle property on each Group member (thanks @rexrainbow)
|
|
||||||
* `Group.rotate` is a new method that sets the rotation property on each Group member (thanks @rexrainbow)
|
|
||||||
* `Group.rotateAround` is a new method that rotates each Group member around the given point, by the given angle (thanks @rexrainbow)
|
|
||||||
* `Group.rotateAroundDistance` is a new method that rotates each Group member around the given point, by the given angle and distance (thanks @rexrainbow)
|
|
||||||
* `Group.setAlpha` is a new method that sets the alpha property on each Group member (thanks @rexrainbow)
|
|
||||||
* `Group.setTint` is a new method that sets the tint property on each Group member (thanks @rexrainbow)
|
|
||||||
* `Group.setOrigin` is a new method that sets the origin property on each Group member (thanks @rexrainbow)
|
|
||||||
* `Group.scaleX` is a new method that sets the x scale on each Group member (thanks @rexrainbow)
|
|
||||||
* `Group.scaleY` is a new method that sets the y scale on each Group member (thanks @rexrainbow)
|
|
||||||
* `Group.scaleXY` is a new method that sets the x and y scale on each Group member (thanks @rexrainbow)
|
|
||||||
* `Group.setBlendMode` is a new method that sets the blend mode on each Group member (thanks @rexrainbow)
|
|
||||||
* `Group.setHitArea` is a new method that passes all Group members to the Input Plugin to enable them for input (thanks @rexrainbow)
|
|
||||||
* `Group.shuffle` is a new method that shuffles all of the Group members in place (thanks @rexrainbow)
|
|
||||||
* `Group.setVisible` is a new method that sets the visible state on each Group member (thanks @rexrainbow)
|
|
||||||
* `WebAudioSoundManager.setAudioContext` is a new method that allows you to set the Sound Manager Audio Context to a different context instance. It will also disconnect and re-create the gain nodes on the new context.
|
|
||||||
* `Group.type` is a new property that holds a string-based name of the Game Object type, as with other GO's (thanks @samme)
|
|
||||||
* `Arade.Group.type` is a new property that holds a string-based name of the Game Object type, as with other GO's (thanks @samme)
|
|
||||||
* `Arcade.StaticGroup.type` is a new property that holds a string-based name of the Game Object type, as with other GO's (thanks @samme)
|
|
||||||
* `ArcadePhysics.overlapCirc` is a new method that allows you to return an array of all Arcade Physics bodies that overlap with the given circular area of the world. It can return either dynamic or static bodies, or a mixture of both (thanks @samme)
|
|
||||||
|
|
||||||
### Updates
|
### Updates
|
||||||
|
|
||||||
* `Curve.getPoints` can now take an optional array as the 3rd parameter in which to store the points results (thanks @rexrainbow)
|
* `Body.deltaXFinal` is a new method on Arcade Physics Bodies that will return the final change in the horizontal position of the body, as based on all the steps that took place this frame. This property is calculated during the `postUpdate` phase, so must be listened for accordingly (thanks Bambosh)
|
||||||
* `Line.arcLengthDivisions` now overrides the default Curve value and is set to 1 to optimize the amount of points returned for a Line curve (thanks @rexrainbow)
|
* `Body.deltaYFinal` is a new method on Arcade Physics Bodies that will return the final change in the vertical position of the body, as based on all the steps that took place this frame. This property is calculated during the `postUpdate` phase, so must be listened for accordingly (thanks Bambosh)
|
||||||
* `ArcadePhysics.closest` will now no longer ever return the source in the target results (thanks @samme)
|
* `Body._tx` is a new internal private var, holding the Arcade Physics Body combined total delta x value.
|
||||||
* `ArcadePhysics.furthest` will now no longer ever return the source in the target results (thanks @samme)
|
* `Body._ty` is a new internal private var, holding the Arcade Physics Body combined total delta y value.
|
||||||
* `RequestAnimationFrame.target` is a new property that controls the fps rate (in ms) when setTimeout is used (thanks @pavels)
|
* `LineCurve.getUtoTmapping` has been updated to return `u` directly to avoid calculations as it's identical to `t` in a Line (thanks @rexrainbow)
|
||||||
* The `WebAudioSoundManager.unlock` method will now listen for `keydown` events in order to unlock the Audio Context, as well as touch and pointer events, making it more accessible (thanks Nick Tipping)
|
* `Curve.getSpacedPoints` will now take an optional array as the 3rd parameter to store the points results in (thanks @rexrainbow)
|
||||||
* The `requestAnimationFrame` polyfill no longer expects a Browserify environment and uses `window` through-out, it also no longer adds in the same as performance.now does.
|
* Trying to play or resume an audio file with an incorrect key will now throw a runtime error, instead of a console warning (thanks @samme)
|
||||||
* `BitmapText.getTextBounds` didn't reset the dirty flag, causing the `GetBitmapTextSize` function to be called every time the Bitmap Text was rendered. With enough text objects on-screen this could negatively impact performance. The flag is now reset every time the bounds are recalculated.
|
* The `Shape` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the shape, rather than a quad alpha, which never worked for Shape objects.
|
||||||
|
* The `Container` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the container, rather than a quad alpha, which never worked consistently across Container children. Fix #4916 (thanks @laineus)
|
||||||
|
* The `DOMElement` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the element, rather than a quad alpha, which never worked for these objects.
|
||||||
|
* The `Graphics` Game Object now uses the AlphaSingle component, allowing you to uniformly set the alpha of the element, rather than a quad alpha, which never worked for these objects.
|
||||||
|
* `TweenData` has a new property called `previous` which holds the eased property value prior to the update.
|
||||||
|
* The `TWEEN_UPDATE` event now sends two new parameters to the handler: `current` and `previous` which contain the current and previous property values.
|
||||||
|
* During `collideSpriteVsGroup` checks it will now skip bodies that are disabled to save doing a `contains` test (thanks @samme)
|
||||||
|
* `Display.Align.In.QuickSet` now accepts `LEFT_BOTTOM` as `BOTTOM_LEFT`, `LEFT_TOP` as `TOP_LEFT`, `RIGHT_BOTTOM` as `BOTTOM_RIGHT` and `RIGHT_TOP` as `TOP_RIGHT`. Fix #4927 (thanks @zaniar)
|
||||||
|
* `PhysicsGroup` now uses the new `internalCreateCallback` and `internalRemoveCallback` to handle its body creation and destruction, allowing you to use your own `createCallback` and `removeCallback` as defined in the Group config. Fix #4420 #4657 #4822 (thanks @S4n60w3n @kendistiller @scrubperson)
|
||||||
|
* `DOMElement` has a new private method `handleSceneEvent` which will handle toggling the display setting of the element when a Scene sleeps and wakes. A DOM Element will now listen for the Scene sleep and wake events. These event listeners are removed in the `preDestroy` method.
|
||||||
|
* A `DOMElement` will now set the display mode to 'none' during its render if the Scene in which it belongs is no longer visible.
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
* The Spine Plugin was not clearing down the resize event listener in WebGL, causing it to still fire even if the Scene was closed. Fix #4808 (thanks @RollinSafary)
|
* BitmapText with a `maxWidth` set wouldn't update the text correctly if it was modified post-creation. You can now update the text and/or width independantly and it'll update correctly. Fix #4881 (thanks @oxguy3)
|
||||||
* When a game is created with the HEADLESS renderer, `Game.destroy()` had no effect and the game kept on running. Now it destroys itself properly. Fix #4804 (thanks @samme)
|
* Text objects will no longer add any white-space when word-wrapping if the last line is only one word long. Fix #4867 (thanks @gaamoo @rexrainbow)
|
||||||
* `DOM.GetScreenOrientation` was returning the wrong consts from the Scale Manager (thanks @jcyuan)
|
* When `Game.destroy` is running, Scenes are now destroyed _before_ plugins, avoiding bugs when closing down plugins and deleting Render Textures. Fix #4849 #4876 (thanks @rexrainbow @siyuanqiao)
|
||||||
* When using `Input.enableDebug` on Game Objects it would not render the debug graphic correctly if the hit area had been offset. It now adjusts the debug correctly for all common hit-area geometry types. Fix #4722 (thanks @HaoboZ @Olliebrown)
|
* The `Mesh` and `Quad` Game Objects have had the `GetBounds` component removed as it cannot operate on a Mesh as they don't have origins. Fix #4902 (thanks @samme)
|
||||||
* Light2D was not properly working for DynamicTilemapLayers due to a change in the way tilesets were stored, throwing an Uncaught TypeError at runtime. This is now handled correctly. Fix #4167 #4079 (thanks @koljakutschera @blackjack26 @kainage)
|
* Setting `lineSpacing` in the Text Game Object style config would set the value but not apply it to the Text, leaving you to call `updateText` yourself. If set, it's now applied on instantiation. Fix #4901 (thanks @FantaZZ)
|
||||||
* `Input.dragDistanceThreshold` was not working correctly since 3.18, snapping to the wrong drag state unless the time threshold was also set. Fix #4667 (thanks @muliawanw @Olliebrown)
|
* External calls to the Fullscreen API using `element.requestFullscreen()` would be blocked by the Scale Manager. The Scale Manager will no longer call `stopFullScreen` should it be triggered outside of Phaser (thanks @AdamXA)
|
||||||
* `Tilemap.convertLayerToStatic` would throw an error when used multiple times, due to an error with the layer index count. Fix #4737 (thanks @Olliebrown @Vegita2)
|
* The `Tilemaps.Tile.tint` property wasn't working correctly as it expected the colors in the wrong order (BGR instead of RGB). It will now expect them in the correct RGB order (thanks @Aedalus @plissken2013es)
|
||||||
* The `Tween` class now uses a cached MAX_SAFE_INTEGER making it compatible with Internet Explorer (thanks @jronn)
|
* The `ScaleManager.destroy` method wasn't being called when the Game `DESTROY` event was dispatched, causing minor gc to build up. The destroy method will now be called properly on game destruction. Fix #4944 (thanks @sunshineuoow)
|
||||||
* The `StaggerBuilder` class now uses a cached MAX_SAFE_INTEGER making it compatible with Internet Explorer (thanks @jronn)
|
* `FacebookInstantGamesPlugin.showAd` and `showVideo` will now break out of the ad iteration search once a valid ad has been found and called. Previously, it would carry on interating if the async didn't complete quickly. Fix #4888 (thanks @east62687)
|
||||||
* The `Rectangle.FromPoints` function now uses a cached MIN_SAFE_INTEGER making it compatible with Internet Explorer (thanks @jronn)
|
* When playing an Animation, if you were to play another, then pause it, then play another the internal `_paused` wouldn't get reset, preventing you from them pausing the animations from that point on. You can now play and pause animations at will. Fix #4835 (thanks @murteira)
|
||||||
* The `Video` class now uses a cached MIN_SAFE_INTEGER making it compatible with Internet Explorer (thanks @jronn)
|
* In `Actions.GridAlign` if you set `width` to -1 it would align the items vertically, instead of horizontally. It now aligns them horizontally if `width` is set, or vertically if `height` is set. Fix #4899 (thanks @BenjaVR)
|
||||||
* The `Path` class now uses a cached MIN_SAFE_INTEGER making it compatible with Internet Explorer (thanks @jronn)
|
* A `PathFollower` with a very short duration would often not end in the correct place, which is the very end of the Path, due to the tween handling the movement not running one final update when the tween was complete. It will now always end at the final point of the path, no matter how short the duration. Fix #4950 (thanks @bramp)
|
||||||
* `Video.destroy` has been renamed to `Video.preDestroy`, so that it now destroys properly like all other Game Objects. Fix #4821 (thanks @rexrainbow)
|
* A `DOMElement` would still remain visible even if the Scene in which it belongs to was sent to sleep. A sleeping Scene shouldn't render anything. DOM Elements will now respond to sleep and wake events from their parent Scene. Fix #4870 (thanks @peonmodel)
|
||||||
* The Video Game Object will now check to see if the browser supports the `HTMLVideoElement` before creating one (thanks @jcyuan)
|
* If a config object was passed to `MultiAtlasFile` it expected the atlas URL to be in the `url` property, however the docs and file config expected it in `atlasURL`. You can now use either of these properties to declare the url. Fix #4815 (thanks @xense)
|
||||||
* The `DOM.GetScreenOrientation` functions would return out-dated consts (thanks @jcyuan)
|
|
||||||
* When calling `TileSprite.setTexture` or `setFrame`, if the new frame size didn't match the old one, the new fill pattern would become distorted and the `potWidth` and `potHeight` values would be incorrect.
|
|
||||||
* Timeline callbacks with extra parameters like `onStart` would miss the first parameter when the callback was invoked. Fix #4810 (thanks @samme)
|
|
||||||
|
|
||||||
### Examples, Documentation and TypeScript
|
### Examples, Documentation and TypeScript
|
||||||
|
|
||||||
My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs:
|
My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs:
|
||||||
|
|
||||||
@samme (for contributing loads of new Arcade Physics examples) @dranitski @jcyuan @RollinSafary @ilyaryabchinski @jsoref @jcyuan @ghclark2
|
@fselcukcan Bambosh @louisth @hexus @javigaralva @samme @BeLi4L @jcyuan @javigaralva @T-Grave @bramp @Chnapy @dranitski @RollinSafary @xense
|
||||||
|
|
||||||
|
The Matter TypeScript defs have been updated to include lots of missing classes, removed some redundant elements and general fixes. The Phaser TypeScript defs now reference the Matter defs directly and no longer try to parse them from the JSDocs. This allows the `MatterJS` namespace to work in TypeScript projects without any compilation warnings.
|
||||||
|
|
||||||
|
The Spine Plugin now has new TypeScript defs in the `types` folder thanks to @supertommy
|
||||||
|
|
||||||
Please see the complete [Change Log](https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md) for previous releases.
|
Please see the complete [Change Log](https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md) for previous releases.
|
||||||
|
|
||||||
|
@ -454,8 +613,8 @@ All rights reserved.
|
||||||
|
|
||||||
"Above all, video games are meant to be just one thing: fun. Fun for everyone." - Satoru Iwata
|
"Above all, video games are meant to be just one thing: fun. Fun for everyone." - Satoru Iwata
|
||||||
|
|
||||||
[get-js]: https://github.com/photonstorm/phaser/releases/download/v3.21.0/phaser.js
|
[get-js]: https://github.com/photonstorm/phaser/releases/download/v3.22.0/phaser.js
|
||||||
[get-minjs]: https://github.com/photonstorm/phaser/releases/download/v3.21.0/phaser.min.js
|
[get-minjs]: https://github.com/photonstorm/phaser/releases/download/v3.22.0/phaser.min.js
|
||||||
[clone-http]: https://github.com/photonstorm/phaser.git
|
[clone-http]: https://github.com/photonstorm/phaser.git
|
||||||
[clone-ssh]: git@github.com:photonstorm/phaser.git
|
[clone-ssh]: git@github.com:photonstorm/phaser.git
|
||||||
[clone-ghwin]: github-windows://openRepo/https://github.com/photonstorm/phaser
|
[clone-ghwin]: github-windows://openRepo/https://github.com/photonstorm/phaser
|
||||||
|
|
12996
dist/phaser-arcade-physics.js
vendored
12996
dist/phaser-arcade-physics.js
vendored
File diff suppressed because it is too large
Load diff
2
dist/phaser-arcade-physics.min.js
vendored
2
dist/phaser-arcade-physics.min.js
vendored
File diff suppressed because one or more lines are too long
26995
dist/phaser-facebook-instant-games.js
vendored
26995
dist/phaser-facebook-instant-games.js
vendored
File diff suppressed because it is too large
Load diff
2
dist/phaser-facebook-instant-games.min.js
vendored
2
dist/phaser-facebook-instant-games.min.js
vendored
File diff suppressed because one or more lines are too long
26123
dist/phaser.js
vendored
26123
dist/phaser.js
vendored
File diff suppressed because it is too large
Load diff
2
dist/phaser.min.js
vendored
2
dist/phaser.min.js
vendored
File diff suppressed because one or more lines are too long
1070
package-lock.json
generated
1070
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "phaser",
|
"name": "phaser",
|
||||||
"version": "3.22.0",
|
"version": "3.23.0-beta1",
|
||||||
"release": "Senku",
|
"release": "Ginro",
|
||||||
"description": "A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.",
|
"description": "A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.",
|
||||||
"author": "Richard Davey <rich@photonstorm.com> (http://www.photonstorm.com)",
|
"author": "Richard Davey <rich@photonstorm.com> (http://www.photonstorm.com)",
|
||||||
"homepage": "http://phaser.io",
|
"homepage": "http://phaser.io",
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"clean-webpack-plugin": "^0.1.19",
|
"clean-webpack-plugin": "^0.1.19",
|
||||||
"dts-dom": "^3.2.0",
|
"dts-dom": "^3.3.0",
|
||||||
"eslint": "^4.19.1",
|
"eslint": "^4.19.1",
|
||||||
"eslint-plugin-es5": "^1.3.1",
|
"eslint-plugin-es5": "^1.3.1",
|
||||||
"fs-extra": "^6.0.1",
|
"fs-extra": "^6.0.1",
|
||||||
|
|
|
@ -2148,6 +2148,8 @@ var FacebookInstantGamesPlugin = new Class({
|
||||||
|
|
||||||
_this.emit('adshowerror', e, ad);
|
_this.emit('adshowerror', e, ad);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2197,6 +2199,8 @@ var FacebookInstantGamesPlugin = new Class({
|
||||||
|
|
||||||
_this.emit('adshowerror', e, ad);
|
_this.emit('adshowerror', e, ad);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,15 +24,10 @@ class Parser {
|
||||||
}
|
}
|
||||||
emit() {
|
emit() {
|
||||||
let ignored = [];
|
let ignored = [];
|
||||||
let result = this.topLevel.reduce((out, obj) => {
|
let result = '/// <reference types="./matter" />\n\n';
|
||||||
// TODO: remove once stable
|
result = result.concat(this.topLevel.reduce((out, obj) => {
|
||||||
// if (<string>obj.kind === 'property') {
|
|
||||||
// ignored.push((<any>obj).name);
|
|
||||||
// return out;
|
|
||||||
// }
|
|
||||||
//////////////////////////
|
|
||||||
return out + dom.emit(obj);
|
return out + dom.emit(obj);
|
||||||
}, '');
|
}, ''));
|
||||||
if (ignored.length > 0) {
|
if (ignored.length > 0) {
|
||||||
console.log('ignored top level properties:');
|
console.log('ignored top level properties:');
|
||||||
console.log(ignored);
|
console.log(ignored);
|
||||||
|
@ -45,6 +40,7 @@ class Parser {
|
||||||
// TODO: Custom temporary rules
|
// TODO: Custom temporary rules
|
||||||
switch (doclet.longname) {
|
switch (doclet.longname) {
|
||||||
case 'Phaser.GameObjects.Components.Alpha':
|
case 'Phaser.GameObjects.Components.Alpha':
|
||||||
|
case 'Phaser.GameObjects.Components.AlphaSingle':
|
||||||
case 'Phaser.GameObjects.Components.Animation':
|
case 'Phaser.GameObjects.Components.Animation':
|
||||||
case 'Phaser.GameObjects.Components.BlendMode':
|
case 'Phaser.GameObjects.Components.BlendMode':
|
||||||
case 'Phaser.GameObjects.Components.ComputedSize':
|
case 'Phaser.GameObjects.Components.ComputedSize':
|
||||||
|
@ -468,10 +464,21 @@ class Parser {
|
||||||
if (doclet.tags)
|
if (doclet.tags)
|
||||||
for (let tag of doclet.tags) {
|
for (let tag of doclet.tags) {
|
||||||
if (tag.originalTitle === 'generic') {
|
if (tag.originalTitle === 'generic') {
|
||||||
let matches = tag.value.match(/(?:(?:{)([^}]+)(?:}))?\s?([^\s]+)(?:\s?-\s?(?:\[)(.+)(?:\]))?/);
|
/**
|
||||||
let typeParam = dom.create.typeParameter(matches[2], matches[1] == null ? null : dom.create.typeParameter(matches[1]));
|
* {string} K - [key]
|
||||||
|
* 1 = string | 2 = null | 3 = K | 4 = key
|
||||||
|
*
|
||||||
|
* {string=string} K - [key]
|
||||||
|
* 1 = string | 2 = string | 3 = K | 4 = key
|
||||||
|
*/
|
||||||
|
const matches = tag.value.match(/(?:(?:{)([^}=]+)(?:=)?([^}=]+)?(?:}))?\s?([^\s]+)(?:\s?-\s?(?:\[)(.+)(?:\]))?/);
|
||||||
|
const [_, _type, _defaultType, _name, _paramsNames] = matches;
|
||||||
|
const typeParam = dom.create.typeParameter(_name, _type == null ? null : dom.create.typeParameter(_type));
|
||||||
|
if (_defaultType != null) {
|
||||||
|
typeParam.defaultType = dom.create.typeParameter(_defaultType);
|
||||||
|
}
|
||||||
obj.typeParameters.push(typeParam);
|
obj.typeParameters.push(typeParam);
|
||||||
handleOverrides(matches[3], matches[2]);
|
handleOverrides(_paramsNames, _name);
|
||||||
}
|
}
|
||||||
else if (tag.originalTitle === 'genericUse') {
|
else if (tag.originalTitle === 'genericUse') {
|
||||||
let matches = tag.value.match(/(?:(?:{)([^}]+)(?:}))(?:\s?-\s?(?:\[)(.+)(?:\]))?/);
|
let matches = tag.value.match(/(?:(?:{)([^}]+)(?:}))(?:\s?-\s?(?:\[)(.+)(?:\]))?/);
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -36,16 +36,14 @@ export class Parser {
|
||||||
}
|
}
|
||||||
|
|
||||||
emit() {
|
emit() {
|
||||||
|
|
||||||
let ignored = [];
|
let ignored = [];
|
||||||
let result = this.topLevel.reduce((out: string, obj: dom.TopLevelDeclaration) => {
|
|
||||||
// TODO: remove once stable
|
let result = '/// <reference types="./matter" />\n\n';
|
||||||
// if (<string>obj.kind === 'property') {
|
|
||||||
// ignored.push((<any>obj).name);
|
result = result.concat(this.topLevel.reduce((out: string, obj: dom.TopLevelDeclaration) => {
|
||||||
// return out;
|
|
||||||
// }
|
|
||||||
//////////////////////////
|
|
||||||
return out + dom.emit(obj);
|
return out + dom.emit(obj);
|
||||||
}, '');
|
}, ''));
|
||||||
|
|
||||||
if (ignored.length > 0)
|
if (ignored.length > 0)
|
||||||
{
|
{
|
||||||
|
@ -65,6 +63,7 @@ export class Parser {
|
||||||
switch (doclet.longname)
|
switch (doclet.longname)
|
||||||
{
|
{
|
||||||
case 'Phaser.GameObjects.Components.Alpha':
|
case 'Phaser.GameObjects.Components.Alpha':
|
||||||
|
case 'Phaser.GameObjects.Components.AlphaSingle':
|
||||||
case 'Phaser.GameObjects.Components.Animation':
|
case 'Phaser.GameObjects.Components.Animation':
|
||||||
case 'Phaser.GameObjects.Components.BlendMode':
|
case 'Phaser.GameObjects.Components.BlendMode':
|
||||||
case 'Phaser.GameObjects.Components.ComputedSize':
|
case 'Phaser.GameObjects.Components.ComputedSize':
|
||||||
|
@ -554,10 +553,29 @@ export class Parser {
|
||||||
if (doclet.tags)
|
if (doclet.tags)
|
||||||
for (let tag of doclet.tags) {
|
for (let tag of doclet.tags) {
|
||||||
if (tag.originalTitle === 'generic') {
|
if (tag.originalTitle === 'generic') {
|
||||||
let matches = (<string>tag.value).match(/(?:(?:{)([^}]+)(?:}))?\s?([^\s]+)(?:\s?-\s?(?:\[)(.+)(?:\]))?/);
|
|
||||||
let typeParam = dom.create.typeParameter(matches[2], matches[1] == null ? null : dom.create.typeParameter(matches[1]));
|
/**
|
||||||
|
* {string} K - [key]
|
||||||
|
* 1 = string | 2 = null | 3 = K | 4 = key
|
||||||
|
*
|
||||||
|
* {string=string} K - [key]
|
||||||
|
* 1 = string | 2 = string | 3 = K | 4 = key
|
||||||
|
*/
|
||||||
|
const matches = (<string>tag.value).match(/(?:(?:{)([^}=]+)(?:=)?([^}=]+)?(?:}))?\s?([^\s]+)(?:\s?-\s?(?:\[)(.+)(?:\]))?/);
|
||||||
|
const [_, _type, _defaultType, _name, _paramsNames] = matches;
|
||||||
|
|
||||||
|
const typeParam = dom.create.typeParameter(
|
||||||
|
_name,
|
||||||
|
_type == null ? null : dom.create.typeParameter(_type)
|
||||||
|
);
|
||||||
|
|
||||||
|
if(_defaultType != null) {
|
||||||
|
typeParam.defaultType = dom.create.typeParameter(_defaultType);
|
||||||
|
}
|
||||||
|
|
||||||
(<dom.ClassDeclaration | dom.FunctionDeclaration | dom.TypeAliasDeclaration>obj).typeParameters.push(typeParam);
|
(<dom.ClassDeclaration | dom.FunctionDeclaration | dom.TypeAliasDeclaration>obj).typeParameters.push(typeParam);
|
||||||
handleOverrides(matches[3], matches[2]);
|
handleOverrides(_paramsNames, _name);
|
||||||
|
|
||||||
} else if (tag.originalTitle === 'genericUse') {
|
} else if (tag.originalTitle === 'genericUse') {
|
||||||
let matches = (<string>tag.value).match(/(?:(?:{)([^}]+)(?:}))(?:\s?-\s?(?:\[)(.+)(?:\]))?/);
|
let matches = (<string>tag.value).match(/(?:(?:{)([^}]+)(?:}))(?:\s?-\s?(?:\[)(.+)(?:\]))?/);
|
||||||
let overrideType: string = this.prepareTypeName(matches[1]);
|
let overrideType: string = this.prepareTypeName(matches[1]);
|
||||||
|
|
42
src/actions/AlignTo.js
Normal file
42
src/actions/AlignTo.js
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
/**
|
||||||
|
* @author samme
|
||||||
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
|
*/
|
||||||
|
|
||||||
|
var QuickSet = require('../display/align/to/QuickSet');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Takes an array of Game Objects, or any objects that have public `x` and `y` properties, and aligns them next to each other.
|
||||||
|
*
|
||||||
|
* The first item isn't moved. The second item is aligned next to the first, then the third next to the second, and so on.
|
||||||
|
*
|
||||||
|
* @function Phaser.Actions.AlignTo
|
||||||
|
* @since 3.22.0
|
||||||
|
*
|
||||||
|
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
|
||||||
|
*
|
||||||
|
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
|
||||||
|
* @param {integer} position - The position to align the items with. This is an align constant, such as `Phaser.Display.Align.LEFT_CENTER`.
|
||||||
|
* @param {number} [offsetX=0] - Optional horizontal offset from the position.
|
||||||
|
* @param {number} [offsetY=0] - Optional vertical offset from the position.
|
||||||
|
*
|
||||||
|
* @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
|
||||||
|
*/
|
||||||
|
var AlignTo = function (items, position, offsetX, offsetY)
|
||||||
|
{
|
||||||
|
var target = items[0];
|
||||||
|
|
||||||
|
for (var i = 1; i < items.length; i++)
|
||||||
|
{
|
||||||
|
var item = items[i];
|
||||||
|
|
||||||
|
QuickSet(item, target, position, offsetX, offsetY);
|
||||||
|
|
||||||
|
target = item;
|
||||||
|
}
|
||||||
|
|
||||||
|
return items;
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = AlignTo;
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -30,10 +30,15 @@ var GridAlign = function (items, options)
|
||||||
{
|
{
|
||||||
if (options === undefined) { options = {}; }
|
if (options === undefined) { options = {}; }
|
||||||
|
|
||||||
|
var widthSet = options.hasOwnProperty('width');
|
||||||
|
var heightSet = options.hasOwnProperty('height');
|
||||||
|
|
||||||
var width = GetFastValue(options, 'width', -1);
|
var width = GetFastValue(options, 'width', -1);
|
||||||
var height = GetFastValue(options, 'height', -1);
|
var height = GetFastValue(options, 'height', -1);
|
||||||
|
|
||||||
var cellWidth = GetFastValue(options, 'cellWidth', 1);
|
var cellWidth = GetFastValue(options, 'cellWidth', 1);
|
||||||
var cellHeight = GetFastValue(options, 'cellHeight', cellWidth);
|
var cellHeight = GetFastValue(options, 'cellHeight', cellWidth);
|
||||||
|
|
||||||
var position = GetFastValue(options, 'position', CONST.TOP_LEFT);
|
var position = GetFastValue(options, 'position', CONST.TOP_LEFT);
|
||||||
var x = GetFastValue(options, 'x', 0);
|
var x = GetFastValue(options, 'x', 0);
|
||||||
var y = GetFastValue(options, 'y', 0);
|
var y = GetFastValue(options, 'y', 0);
|
||||||
|
@ -50,32 +55,16 @@ var GridAlign = function (items, options)
|
||||||
{
|
{
|
||||||
AlignIn(items[i], tempZone, position);
|
AlignIn(items[i], tempZone, position);
|
||||||
|
|
||||||
if (width === -1)
|
if (widthSet && width === -1)
|
||||||
{
|
{
|
||||||
// We keep laying them out horizontally until we've done them all
|
// We keep laying them out horizontally until we've done them all
|
||||||
cy += cellHeight;
|
|
||||||
tempZone.y += cellHeight;
|
|
||||||
|
|
||||||
if (cy === h)
|
|
||||||
{
|
|
||||||
cy = 0;
|
|
||||||
tempZone.x += cellWidth;
|
tempZone.x += cellWidth;
|
||||||
tempZone.y = y;
|
|
||||||
}
|
}
|
||||||
}
|
else if (heightSet && height === -1)
|
||||||
else if (height === -1)
|
|
||||||
{
|
{
|
||||||
// We keep laying them out vertically until we've done them all
|
// We keep laying them out vertically until we've done them all
|
||||||
cx += cellWidth;
|
|
||||||
tempZone.x += cellWidth;
|
|
||||||
|
|
||||||
if (cx === w)
|
|
||||||
{
|
|
||||||
cx = 0;
|
|
||||||
tempZone.x = x;
|
|
||||||
tempZone.y += cellHeight;
|
tempZone.y += cellHeight;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// We keep laying them out until we hit the column limit
|
// We keep laying them out until we hit the column limit
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @author samme <samme.npm@gmail.com>
|
* @author samme <samme.npm@gmail.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
||||||
|
AlignTo: require('./AlignTo'),
|
||||||
Angle: require('./Angle'),
|
Angle: require('./Angle'),
|
||||||
Call: require('./Call'),
|
Call: require('./Call'),
|
||||||
GetFirst: require('./GetFirst'),
|
GetFirst: require('./GetFirst'),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -8,5 +8,5 @@
|
||||||
* @property {string} [suffix=''] - The string to append to every resulting frame name if using a range or an array of `frames`.
|
* @property {string} [suffix=''] - The string to append to every resulting frame name if using a range or an array of `frames`.
|
||||||
* @property {integer} [zeroPad=0] - The minimum expected lengths of each resulting frame's number. Numbers will be left-padded with zeroes until they are this long, then prepended and appended to create the resulting frame name.
|
* @property {integer} [zeroPad=0] - The minimum expected lengths of each resulting frame's number. Numbers will be left-padded with zeroes until they are this long, then prepended and appended to create the resulting frame name.
|
||||||
* @property {Phaser.Types.Animations.AnimationFrame[]} [outputArray=[]] - The array to append the created configuration objects to.
|
* @property {Phaser.Types.Animations.AnimationFrame[]} [outputArray=[]] - The array to append the created configuration objects to.
|
||||||
* @property {boolean} [frames=false] - If provided as an array, the range defined by `start` and `end` will be ignored and these frame numbers will be used.
|
* @property {(boolean|integer[])} [frames=false] - If provided as an array, the range defined by `start` and `end` will be ignored and these frame numbers will be used.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
2
src/cache/BaseCache.js
vendored
2
src/cache/BaseCache.js
vendored
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
2
src/cache/CacheManager.js
vendored
2
src/cache/CacheManager.js
vendored
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
2
src/cache/events/ADD_EVENT.js
vendored
2
src/cache/events/ADD_EVENT.js
vendored
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
2
src/cache/events/REMOVE_EVENT.js
vendored
2
src/cache/events/REMOVE_EVENT.js
vendored
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
2
src/cache/events/index.js
vendored
2
src/cache/events/index.js
vendored
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
2
src/cache/index.js
vendored
2
src/cache/index.js
vendored
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @author Richard Davey <rich@photonstorm.com>
|
* @author Richard Davey <rich@photonstorm.com>
|
||||||
* @copyright 2019 Photon Storm Ltd.
|
* @copyright 2020 Photon Storm Ltd.
|
||||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue