This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PVector lineStart, lineEnd, point; | |
| void setup() { | |
| size(600, 600); | |
| updatePoints(); | |
| } | |
| void draw() { | |
| background(0); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PVector[] points; | |
| int pointCount = 0; | |
| int lastPointCount = 0; | |
| void setup() { | |
| size(600, 600, P3D); | |
| colorMode(HSB); | |
| } | |
| void draw() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>DOM Augmented Canvas - ES2015</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.6/p5.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.6/addons/p5.dom.min.js"></script> | |
| <style> | |
| html, | |
| body { | |
| margin: 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const tmi = require('tmi.js'), | |
| request = require('request'), | |
| countdown = require('countdown'), | |
| kraken = request.defaults({ | |
| baseUrl: 'https://api.twitch.tv/kraken/', | |
| json: true, | |
| headers: { | |
| 'Client-ID': '', | |
| Accept: 'application/vnd.twitchtv.v3+json' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Entity { | |
| PVector size = new PVector(entitySize, entitySize); | |
| PVector pos = new PVector(0, 0); | |
| PVector vel = new PVector(0, 0); | |
| PVector acc = new PVector(0, 0); | |
| color c; | |
| boolean bounced = false; | |
| int life = 0; | |
| int lifeSpan = 200; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //... | |
| client.on('message', (channel, user, message, fromSelf) => { | |
| // Ignore bot's messages. | |
| if(fromSelf) { | |
| return false; | |
| } | |
| // The name of the user. (Will default to the lower case if the display name | |
| // is missing from the user object.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Ascii colors in console | |
| function colorize(id, ...text) { | |
| return `\u001b[${id}m${text.join()}\u001b[39m`; | |
| } | |
| // The brightest white text | |
| function whiteBright(...text) { | |
| return colorize(97, ...text); | |
| } | |
| // The brightest white text | |
| function blackBright(...text) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| const _ = require('lodash'), // Just to handle a couple of things more easily | |
| tmi = require('tmi.js'), | |
| channel = ''; // Your channel | |
| let mainConfig = { | |
| options: { | |
| debug: true // Debug to console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| const tmi = require('tmi.js'), | |
| timerMessages = [], | |
| config = { | |
| identity: { | |
| username: '', | |
| password: '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const _request = require('request'), | |
| _ = require('lodash'), | |
| tmi = require('tmi.js'), | |
| clc = require('cli-color'), | |
| config = require('./config.json'), | |
| yourChannel = config.yourChannel || '', | |
| identity = config.identity || {}, |