{"repo":"wiserim/phaser-raycaster","free":true,"listed":false,"github":"https://github.com/wiserim/phaser-raycaster","clone":"git clone https://github.com/wiserim/phaser-raycaster.git","description":"Raycasting plugin for Phaser 3 and 4.","language":"JavaScript","stars":102,"topics":["phaser","phaser3","phaser-plugin","raycasting","phaser-framework","phaserjs"],"license":"MIT","category":"game-templates","readme_excerpt":"Phaser Raycaster Raycasting plugin for Phaser 3 and 4. Phaser Raycaster is a Phaser 3 and 4 plugin which provide raycasting for geometric game objects, sprites, Arcade Physics and Matter.js bodies. Documentation: https://wiserim.github.io/phaser-raycaster/ Code examples are available on CodePen: LINK Old examples for Phaser 3: LINK Features: compatible with arcade and matter physics, raycasting in a single direction, 360 degrees circle or in a cone, visibility detection (collision detection with game objects), test rays on mapped game objects (containers, lines, rectangles, polygons, circles, sprites, tilemaps and matter bodies), provides closest intersection points between rays and tested objects, tests can be made on all mapped objects, selected ones or only ones within detection range, static and dynamic mapping for individual objects, mapped objects intersections detection, debug mode. NPM CDN https://www.jsdelivr.com/package/npm/phaser-raycaster Getting started 1. Include plugin in your project: 2. Enable plugin in your Game config: 3. Create new raycaster in your scene: If you're using TypeScript, you need to add to scene plugin class: 4. Create new ray 5. Map game objects which will be tested by rays 6. Cast ray 7. Raycaster bounding box By default Raycaster is setting it's bounding box based on Arcade Physics / Matter physics world bounds. If world size will change after creation of Raycaster, bounding box needs to be updated. 8. Collisions (arcade physics) 9. Collisi","default_branch":null,"files":null,"tree":[],"storefront":"/r/wiserim","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/wiserim/phaser-raycaster/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}