Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hexus/phaser-slopes
:triangular_ruler: A Phaser 3 Plugin that smooths out MatterJS Tilemap Layer collisions
https://github.com/hexus/phaser-slopes
Last synced: 2 months ago
JSON representation
:triangular_ruler: A Phaser 3 Plugin that smooths out MatterJS Tilemap Layer collisions
- Host: GitHub
- URL: https://github.com/hexus/phaser-slopes
- Owner: hexus
- License: isc
- Created: 2018-08-15T14:14:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-07T15:12:12.000Z (almost 2 years ago)
- Last Synced: 2024-10-11T15:15:20.045Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.02 MB
- Stars: 34
- Watchers: 8
- Forks: 5
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Phaser 3 Slopes Plugin
A [Phaser 3](https://github.com/photonstorm/phaser) Plugin that smooths out MatterJS Tilemap Layer collisions.
:hammer_and_wrench: This plugin is under development. Feel free to
[report any issues](https://github.com/hexus/phaser-slopes/issues/new) that you find.---
Looking for a [Phaser CE](https://github.com/photonstorm/phaser-ce) plugin?
Check out [Phaser Arcade Slopes](https://github.com/hexus/phaser-arcade-slopes).## Compatibility
| Phaser | Phaser Slopes |
|----------------------|---------------|
| 3.12.0-beta - 3.55.x | ^0.1.0 |
| 3.60.0-beta.4+ | ^0.2.0-beta |## Usage
Install the plugin as a dependency of your project using [npm](https://www.npmjs.com/).
```bash
npm install phaser-slopes
```Load the plugin into your Scene.
```js
import Slopes from 'phaser-slopes';class GameScene extends Phaser.Scene
{
preload() {
this.load.scenePlugin('Slopes', Slopes);
}
}
```You can use Phaser to load the plugin as a script if you're not using [npm](https://www.npmjs.com/) for dependency
management.```js
class GameScene extends Phaser.Scene
{
preload() {
this.load.scenePlugin('Slopes', 'phaser-slopes.min.js');
}
}
```Any MatterJS Tilemap Layers you create within the Scene will automatically collide smoothly with other physics bodies.