GithubHelp home page GithubHelp logo

troysandal / p5js-typescript-fusebox Goto Github PK

View Code? Open in Web Editor NEW
28.0 4.0 12.0 988 KB

Template for p5Js projects that uses Typescript and Fusebox.

License: MIT License

TypeScript 57.22% Dockerfile 28.68% HTML 14.10%
p5js fuse-box typescript processing fusebox typescript-fusebox

p5js-typescript-fusebox's Introduction

p5Js + Typescript + Fusebox

Template for p5Js projects that uses Typescript and Fusebox for fast, iterative development. I created this to help port a legacy Processing Java application to p5Js. Porting it to Typescript with Fusebox meant I had little dependency overhead to worry about (see package.json).

Getting Started

  • I highly recommend n or nvm for installing Node - I used Node 14.x & npm 6.x.
  • Clone this project
  • npm i
  • Run npm run sketch
  • Open http://localhost:4444
  • Modify src/sketch.ts, save it, watch sketch auto-reload in browser.
  • Have fun!

Publishing to Open Processing [Experimental]

You can publish your sketch to Open Processing. This repo is posted for you as an example.

  • Run npm run dist
  • Copy/Paste the contents of ./dist/app.js to your sketch.
  • Add the mp3 from dist/resources to the sketch Files tab.
  • Turn on p5.Sound in your Sketch

Random

  • Source Maps are turned on by default which means you can set breakpoints in the browser or in Visual Studio Code (use Chrome Debugging extension).
  • Fusebox vs Webpack - Fusebox has incredibly fast hot module reloading and native Typescript support. QED for me.
    • UPDATE - The upgrade from Fusebox 3 to 4 was way harder than it needed to be. The hardest part is there was absolutely zero migration guide. This made it hard but then some of the powerful things such as bundle instructions were replced with, well, magic. It's still very fast but the lack of any real documenation means I will move to either Parcel or Webpack at some point.

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.