Skip to content

voidproc/phina-pixelated-scene

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phina-pixelated-scene

Crisp pixelart style appearance in phina.js product.

Description

See pixelated-scene.js .

Use PixelatedScene instead of DisplayScene .

Example

Live example (Runstant.com)

example

phina.define('MainScene', {
    superClass: 'PixelatedScene',

    init: function(option) {
        this.superInit({
            width: WIDTH, height: HEIGHT, scale: SCALE, backgroundColor: 'black'
        });

        this.rect = RectangleShape({
            width: 40, height: 40, stroke: 'transparent', fill: 'red'
        });
        this.rect
            .addChildTo(this)
            .setPosition(this.gridX.center(), this.gridY.center());
    },

    update: function() {
        this.rect.rotation += 0.5;
    }
});

phina.main(function () {
  var app = GameApp({
    startLabel: 'main',
    width: 100 * 4,
    height: 100 * 4,
    fit: false,
  });
  app.run();
});

Example app usage

Live example

example2

Install npm packages

$ npm install

or yarn available.

Start server in development mode

$ npm run dev

🐳 with Docker

$ docker-compose build
$ docker-compose run app npm install
$ docker-compose up

About

Crisp pixelart style appearance in phina.js product.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published