phaser-raycaster

Raycasting plugin for Phaser 3. Documentation:

MIT License

Downloads
143
Stars
90
Committers
3

Bot releases are hidden (Show)

phaser-raycaster - v0.10.10 Latest Release

Published by wiserim 10 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.
phaser-raycaster - v0.10.9

Published by wiserim about 1 year 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.
phaser-raycaster - v0.10.8

Published by wiserim about 1 year 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.
phaser-raycaster - v0.10.7

Published by wiserim about 1 year 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
phaser-raycaster - v0.10.6

Published by wiserim over 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.
phaser-raycaster - v0.10.5

Published by wiserim almost 2 years ago

v0.10.5

  • Added TypeScript typings.
  • Updated PhaserRaycaster plugin class.
  • Fixed doc typos.
phaser-raycaster - v0.10.4

Published by wiserim over 2 years 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.
phaser-raycaster - v0.10.3

Published by wiserim over 2 years 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.
phaser-raycaster - v0.10.2

Published by wiserim almost 3 years ago

v0.10.2

  • BUGFIX: Ray.overlap method is using deprecated method Ray.testOverlap instead of Ray.testArcadeOverlap to test Arcade body.
phaser-raycaster - v0.10.1

Published by wiserim almost 3 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.
phaser-raycaster - v0.10.0

Published by wiserim almost 3 years ago

v0.10.0

  • Added debug mode.
  • Added statistics.
  • Added additional intersection data. Each point contains reference to hit mapped object and it's segment if available.
  • Ray.cast, Ray.castCircle and Ray.castCone methods optimization.
phaser-raycaster - v0.9.4

Published by wiserim about 3 years ago

v0.9.4

  • BUGFIX: Map.config doesn't add Map.getBoundingBox method to containers map.
  • BUGFIX: Raycaster.mapGameObjects doesn't add map to data attribute if it's already enabled.
phaser-raycaster - v0.9.3

Published by wiserim over 3 years ago

v0.9.3

  • Ray.cast, Ray.castCircle and Ray.castCone methods return additionally hit mapped objects and segments.
phaser-raycaster - v0.9.2

Published by wiserim over 3 years ago

v0.9.2

  • Bugfix: Tilemaps are not mapped properly in Phaser 3.50.0
phaser-raycaster - v0.9.1

Published by wiserim almost 4 years ago

v0.9.1

  • Added matter physics game objects collision methods to Ray
  • Added Ray.setCollidesWith() method
  • Added Ray.setCollisionCategory() method
  • Added Ray.setCollisionGroup() method
  • Added Ray.setOnCollideWith() method
  • Added Ray.setOnCollide() method
  • Added Ray.setOnCollideEnd() method
  • Added Ray.setOnCollideActive() method
phaser-raycaster - v0.9.0

Published by wiserim almost 4 years ago

v0.9.0

  • added matter physics support
  • added matter bodies mapping
  • added Map.getBoundingBox() method
  • added Map.forceConvex param
  • added Map.forceVerticesMapping param
  • Ray.enableArcadeBody() is replaced by Ray.enablePhysics()
  • added Ray.bodyType param
phaser-raycaster - v0.8.1

Published by wiserim about 4 years ago

v0.8.1

  • Ray: added round parameter
  • Ray: slight raycasting optimisation
phaser-raycaster - v0.8.0

Published by wiserim over 4 years ago

v0.8.0

  • Ray: storing intersections of last casting
  • Ray: added enablePhysicsBody method
  • Ray: added autoSlice parameter. When true after casting intersections will be sliced
  • Ray: added slice method
  • Ray: added overlap method
  • Ray: can be passed to arcade physics collider / overlap
  • Ray: range parameter renamed to rayRange
  • Ray: setRange method renamed to setRayRange
phaser-raycaster - v0.7.3

Published by wiserim over 4 years ago

v0.7.3

  • Map: can now map tilemap layers
phaser-raycaster - v0.7.2

Published by wiserim over 4 years ago

v0.7.2

  • Map: added active parameter. When set to false map won't return maps points and segments and won't be updated.
  • Raycaster: added enableMaps method
  • Raycaster: added disableMaps method