Code Monkey home page Code Monkey logo

pixijs-ts-boilerplate's Introduction

pixijs-ts-boilerplate

Just another PixiJS Typescript Boilerplate

Getting Started

Another boilerplate to speed up project setup for developing typescript apps with PixiJS. Ready to compile code for dev and production env. Provides a helper class (PixiAppWrapper) to manage resizing (full size, keeping aspect ratio or no resize at all), device orientation, alignment of the stage within the canvas view, toggle fullscreen, display some media info and a fps-meter, and some classes to assist with assets loading.

Versions:

Note: Starting from v2 non-dev dependencies are kept inside the src/scripts/vendor folder (impl) and src/types (definitions). This means that those deps will have to be manually managed. Some companies do not want to heavily rely on npm repos. Going back to npm dependencies should be fairly simple.

Included PixiJS plugins

*** PLEASE NOTE THAT IN ORDER TO USE THE SPINE RUNTIME YOU MUST OWN A VALID SPINE LICENSE.

Other 3rd party libs

Prerequisites

Install Node & NPM from here or using NVM

Installing

Choose one of the following options:

  • Export the project with svn
svn export https://github.com/dacaher/pixijs-ts-boilerplate/trunk/
  • Download it as ZIP

  • Clone the git repo โ€” git clone https://github.com/dacaher/pixijs-ts-boilerplate.git and checkout the tagged release you'd like to use.

Edit package.json to change project details.

Install NPM dependencies by running.

npm install

Initial Steps

npm run build && npm run serve

You should see a sample app with a fps-meter and a div containing some display info.

  • See src/scripts/app for a showcase.
  • Edit src/html/index.html, src/scripts/index.ts and src/styles/style.css as desired. Index.ts is the entry point for bundling the application.
  • Instantiate App with parameters width, height, align, resize and a canvas view container if desired.
  • Optionally add/remove custom linter rules from tslint.json.
  • Finally remove folder src/scripts/app and assets/gfx/* when not needed.

Note that pixi.js is kept as a external dependency and it is not bundled within the application.

NPM scripts

  • clean - removes dev, dist and doc dirs
  • build - compiles and copy all the assets to dev dir
  • build:release - compiles and uglifies to dist dir
  • rebuild:all - cleans and rebuilds dev, dist and doc.
  • serve - serves (0.0.0.0:9000) dev dir with Hot Module Replacement enabled through webpack-dev-server
  • serve:release - serves (0.0.0.0:9999) dist dir through http-server to test production bundle
  • test - does nothing right now
  • doc - generate app doc with typedoc
  • start - runs build & serve

Contributing

As a fairly new developer with Typescript (and javascript ecosystems in general) any suggestion, bug report or improvement submitted would be very much appreciated.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • David C. - Initial work - dacaher

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

pixijs-ts-boilerplate's People

Contributors

dacaher avatar soimy avatar

Watchers

Pedro Marques da Silva avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.