All Projects → hexus → phaser-slopes

hexus / phaser-slopes

Licence: ISC license
📐 A Phaser 3 Plugin that smooths out MatterJS Tilemap Layer collisions

Programming Languages

javascript
184084 projects - #8 most used programming language

Phaser 3 Slopes Plugin

A Phaser 3 Plugin that smooths out MatterJS Tilemap Layer collisions.

🛠️ This plugin is under development. Feel free to report any issues that you find.


Looking for a Phaser CE plugin? Check out 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.

npm install phaser-slopes

Load the plugin into your Scene.

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 for dependency management.

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].