runp5

    0.0.19 • Public • Published

    runp5: command line tool for serving p5 projects

    Installation

    npm install -g git+ssh:git@github.com:horizons-school-of-technology/runp5.git

    Usage

    runp5 main.js

    where main.js is the root file of your p5 program

    Programming environment

    runp5 uses p5.js's instance mode, with the instance named game. You should call p5 functions using game.fill() etc:

    game.fill(0, 0, 255);
    game.ellipse(50, 50, 100, 100);
    
    

    Game loop:

    runp5 allows you to create a game loop in one of two ways:

    1. By setting the game.draw function: game.draw = function() { };

    2. By creating a while(true) loop and calling await frame(); in each iteration of the loop to advance the frame counter

    Keywords

    none

    Install

    npm i runp5

    DownloadsWeekly Downloads

    0

    Version

    0.0.19

    License

    MIT

    Unpacked Size

    2.95 MB

    Total Files

    14

    Last publish

    Collaborators

    • avatar