Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Creates a particle trail effect following the mouse pointer.
import Phaser from 'phaser';
class TrailScene extends Phaser.Scene {
preload() {
this.load.image('dot', 'assets/dot.png');
}
create() {
this.input.on('pointermove', pointer => {
this.add.image(pointer.x, pointer.y, 'dot').setScale(0.2);
});
}
}
new Phaser.Game({ type: Phaser.AUTO, width: 800, height: 600, scene: [TrailScene] });Phaser is a fast, open-source 2D HTML5 game framework used to create browser-based games for desktop and mobile, using JavaScript or TypeScript with WebGL/Canvas rendering.
Origin & Creator
Phaser was created by Richard Davey (Photon Storm) to provide a powerful, accessible, open-source framework for modern HTML5 game creation.
Industrial Note
Phaser dominates the HTML5 gaming market, especially in educational games, advergames, casino & gambling front-ends, interactive marketing campaigns, and lightweight browser-based entertainment.