Code Monkey home page Code Monkey logo

pcd-tokyo.github.io's Introduction

pcd-tokyo.github.io

Processing Community Day Tokyo Website

Build

required: node.js
โ€ป Under node v12.x env, the build will fail by issue with gulp v3 and node v12.x.
node v10.x is recommended.

$ cd root-of-repo
$ npm install -g gulp-cli
$ npm i
$ gulp release

gulp command

  • gulp release : build js and sass into bundle files and put them in /dist
  • gulp watch : watch js and sass files and build them when they're updated (not into /dist but into /src/assets for debug purpose)

p5 sketch

Your sketch submitting (by fork and pull request) would be welcomed and appreciated!

  1. copy template.js in src/js/P5Sketches/ and rename it

  2. write your code :)

    • can export p5 object with ECMA Script support
    module.exports = (p) => {
        p.preload = () => {
    
        }
    
        let points = [];
        p.setup = () => {
            let canvas = p.createCanvas(p.createCanvas(screen.width, screen.height)).parent('p5canvas');
        }
    
        p.draw = () => {
    
        }
    
        p.windowResized = () => {
            p.resizeCanvas(p.createCanvas(screen.width, screen.height));
        }
    
    }
  3. import your sketch in P5scketch.js in src/js/ like below

    import p5 from 'p5'
    import p5nh0 from './P5Sketches/nh0.js'
    import p5nh1 from './P5Sketches/nh1.js'
    import p5kh0 from './P5Sketches/kh0.js'
    //import mySketch from './P5Sketches/mySketch.js'
    
    let sketches = [p5nh0, p5nh1, p5kh0 /*, mySketch*/ ];
    let sketch = sketches[Math.floor(sketches.length * Math.random())];
    
    export default function initP5() {
        return new p5(sketch);
    }
  4. rebuild bundle by the command above

pcd-tokyo.github.io's People

Contributors

nama-gatsuo avatar micuat avatar r21nomi avatar croe avatar harukakajita avatar

Watchers

James Cloos 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.