Skip to content
This repository was archived by the owner on Aug 1, 2026. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Warning

This repository uses an outdated phina.js environment and is no longer maintained. Its dependencies may contain known security vulnerabilities.

phina-pixelated-scene

Crisp pixelart style appearance in phina.js product.

Description

See pixelated-scene.js .

Use PixelatedScene instead of DisplayScene .

Example

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

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages