Phaser Raycaster Versions Save

Raycasting plugin for Phaser 3. Documentation:

v0.10.10

4 months ago

v0.10.10

  • npm run build-typings command now add module declaration to types.d.ts file automatically.
  • Bugfix: Map.updateMap method for containers doesn't check if child object's points array is empty while assigning neighbour points to last point.

v0.10.9

9 months ago

v0.10.9

  • Rework of Map.updateMap method for matter objects.
  • Map.updateMap method for matter objects now ignores internal segments in concave bodies.
  • Bugfix: Ray.cast method won't test mapped object when ray is inside of mapped object and hit another mapped object within / overlap the first one.
  • Bugfix: Map.updateMap method for matter objects don't map properly non enclosed concave bodies.

v0.10.8

9 months ago

v0.10.8

  • Bugfix: Typo in Map.update method for polygons.
  • Bugfix: Typo in Map.update method for containers.
  • Bugfix: Fixed code changes caused by faulty linter.

v0.10.7

9 months ago

v0.10.7

  • Map.update method now add array of neighbours to points in Map.points.
  • Optimisation of Map.update method for tilemaps.
  • Ray.castCircle and Ray.castCone methods now checks if ray is "glancing" mapped objects.
  • Ray.cast method now won't test mapped object if current closest intersection is closer to ray than it's bounding box.
  • Bugfix: Raycaster.removeMappedObjects method isn't checking if passed objects are mapped.
  • Bugfix: Map.destroy method doesn't work properly for Arcade and Matter bodies (fixed by @dreasgrech).
  • Fixed docs typos

v0.10.6

1 year ago

v0.10.6

  • Added Raycaster.dynamicMappedObjects to store dynamic maps.
  • Raycaster.update method now traverse through Raycaster.dynamicMappedObjects to update maps.
  • Setting Raycaster.Map.dynamic now updates Raycaster.dynamicMappedObjects and Ratcaster._stats.
  • Bugfix: Raycaster.drawDebug method isn't checking if mapped object has defined data property.
  • Bugfix: Raycaster.destroy method isn't destroying Raycaster.graphics object used for debug.
  • Bugfix: Raycaster.destroy method isn't removing scene's update event listener.
  • Bugfix: Ray.destroy method isn't destroying Ray.graphics object used for debug.

v0.10.5

1 year ago

v0.10.5

  • Added TypeScript typings.
  • Updated PhaserRaycaster plugin class.
  • Fixed doc typos.

v0.10.4

1 year ago

v0.10.4

  • Raycaster.mapGameObjects method now checks if mapped object is supported.
  • Map.updateMap method for container objects now checks if mapped children objects are supported.

v0.10.3

1 year ago

v0.10.3

  • Added Ray.destroy method.
  • Added Map.destroy method.
  • Added Raycaster.destroy method.
  • Added mapChild option to Map.config parameters.
  • Raycaster.removeMappedObjects method now also destroys Map objects.
  • Container's Map now allows to choose single child element which will be mapped, by passing it as mapChild option to Map.config parameters.
  • Container's Map now allows to use circle map children with Map.segmentCount set to 0. Transformed children circles are stored in Map._circles property.
  • Updated NPM dev dependencies.

v0.10.2

2 years ago

v0.10.2

  • BUGFIX: Ray.overlap method is using deprecated method Ray.testOverlap instead of Ray.testArcadeOverlap to test Arcade body.

v0.10.1

2 years ago

v0.10.1

  • BUGFIX: Raycaster.update - typo in code.
  • BUGFIX: Ray.cast, Ray.castCircle and Ray.castCone methods after optimization in fringe cases when ray "glanced" object's border box corner didn't detect hit properly.