Coder Social home page Coder Social logo

ourcade / phaser3-typescript-spine Goto Github PK

View Code? Open in Web Editor NEW
16.0 2.0 7.0 3.65 MB

Example project for Spine animations in Phaser 3 with TypeScript plus SpinePlugin typing files! ๐ŸŒŸ

License: MIT License

HTML 5.15% TypeScript 94.85%
phaser phaser3 spine typescript-definitions typescript parcel

phaser3-typescript-spine's Introduction

parcel3-typescript-spine

Phaser 3 + TypeScript + Spine

Example project for Spine animations in Phaser 3 with TypeScript plus SpinePlugin typing files! ๐ŸŒŸ

License

In-depth Guide

You can find a guide explaining this project here.

Demo

https://ourcade.github.io/phaser3-typescript-spine/

Prerequisites

This example project uses the phaser3-parcel-template and requires Parcel.

Getting Started

Clone this repository to your local machine (or download from Github or use a tool like Degit):

git clone https://github.com/ourcade/phaser3-typescript-spine.git my-project-folder

Go into your project folder and install dependencies:

cd my-project-folder
npm install

Start development server:

npm run start

You'll see Spine Boy in his idle animation. Press the left and right arrow keys to cycle through his other animations. ๐ŸŽ‰

Spine Boy

Demo: https://ourcade.github.io/phaser3-typescript-spine/

Project Structure

    โ”œโ”€โ”€ ...
    โ”œโ”€โ”€ public
    โ”‚   โ”œโ”€โ”€ assets
    โ”‚   โ”‚   โ”œโ”€โ”€ spine
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ spineboy.atlas
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ spineboy.json
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ spineboy.png
    โ”œโ”€โ”€ src
    โ”‚   โ”œโ”€โ”€ scenes
    โ”‚   โ”‚   โ”œโ”€โ”€ SpineDemo.ts
    โ”‚   โ”œโ”€โ”€ types
    โ”‚   โ”‚   โ”œโ”€โ”€ globals.d.ts
    โ”‚   โ”œโ”€โ”€ index.html
    โ”‚   โ”œโ”€โ”€ main.ts

The Spine Boy assets exported from Spine is in public/assets/spine. These files are loaded in the preload() method of SpineDemo.ts.

The Phaser 3 SpinePlugin is loaded in main.ts.

License

MIT License

phaser3-typescript-spine's People

Contributors

supertommy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

phaser3-typescript-spine's Issues

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.