Skip to content

Instantly share code, notes, and snippets.

GoToLoop GoToLoop

  • Brazil
Block or report user

Report or block GoToLoop

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@GoToLoop
GoToLoop / .block
Last active Aug 28, 2019
Ramer–Douglas–Peucker Algorithm
View .block
height: 600
scrolling: no
border: yes
license: cc-by-4.0
View windowResized.global.js
function windowResized() {
const css = getComputedStyle(canvas.parentElement),
mw = float(css.marginLeft) + float(css.marginRight),
mh = float(css.marginTop) + float(css.marginBottom),
ww = float(css.width) || windowWidth,
wh = float(css.height) || windowHeight,
w = round(ww - mw), h = round(wh - mh);
resizeCanvas(w, h, true);
}
@GoToLoop
GoToLoop / CanvasResizeWatcher.java
Last active Mar 26, 2019
Canvas Resize Watcher
View CanvasResizeWatcher.java
/**
* Canvas Resize Watcher (v1.0)
* GoToLoop (2018/May/04)
* Developed on P3 (v3.3.5)
*
* https://Discourse.Processing.org/t/event-called-when-canvas-is-resized/6643/8
* https://Gist.GitHub.com/GoToLoop/1d1eb18f468a7d5758469707276b6ea1
*/
package gotoloop.listener;
@GoToLoop
GoToLoop / adjustFrame.js
Last active Jun 6, 2019
Expands Current iFrame Element to Fit Body's Size
View adjustFrame.js
'use strict';
function adjustFrameSize() {
if (frameElement) {
frameElement.height = frameElement.frameBorder = 0;
frameElement.height = getDocHeight() + 'px';
frameElement.width = getDocWidth() + 'px';
}
}
@GoToLoop
GoToLoop / CountdownClass2.pyde
Last active Apr 13, 2018
Countdown Class II (Python)
View CountdownClass2.pyde
"""
Countdown Class II (v1.2.5)
GoToLoop (2017/Aug/30)
Forum.Processing.org/two/discussion/27733/
countdown-class-library-for-java-js-python#Item_3
Forum.Processing.org/two/discussion/23846/
time-delay-in-python-mode#Item_17
@GoToLoop
GoToLoop / CountdownClass.pyde
Last active Apr 13, 2018
Countdown Class (Python)
View CountdownClass.pyde
"""
Countdown Class (v1.2.5)
GoToLoop (2017/Aug/28)
Forum.Processing.org/two/discussion/27733/
countdown-class-library-for-java-js-python#Item_2
Forum.Processing.org/two/discussion/23846/
time-delay-in-python-mode#Item_14
@GoToLoop
GoToLoop / Countdown.java
Last active Apr 13, 2018
Countdown Class (Java)
View Countdown.java
/**
* Countdown Class (v1.2.5)
* GoToLoop (2017/Aug/26)
*
* https://Forum.Processing.org/two/discussion/27733/
* countdown-class-library-for-java-js-python
*
* https://Forum.Processing.org/two/discussion/23846/
* time-delay-in-python-mode#Item_11
*
@GoToLoop
GoToLoop / CircleMutualAttraction.pyde
Last active Mar 30, 2018 — forked from Speykious/CircleMutualAttraction
This is an example for the library Fisica for Processing in Python.
View CircleMutualAttraction.pyde
"""
CircleMutualAttraction (v2.3.8)
by Speykious (2017-Jun-27)
mod GoToLoop (2017-Jun-29)
https://Forum.Processing.org/two/discussion/23226/
new-python-example-for-the-fisica-library#Item_2
https://Gist.GitHub.com/GoToLoop/1861619991354ed7d063026658270689
"""
@GoToLoop
GoToLoop / resizeNN.js
Last active Apr 10, 2019 — forked from gncgnc/resizeNN.js
Extends p5.Image to handle nearest neighbor resizing for scaling images w/o blurring.
View resizeNN.js
/**
* Resize the image to a new width and height using nearest neigbor algorithm.
* To make the image scale proportionally, use 0 as the value for the wide or high parameters.
* For instance, to make the width of an image 150 pixels,
* and change the height using the same proportion, use resize(150, 0).
* Otherwise same usage as the regular resize().
*
* Note: Disproportionate resizing squashes the "pixels" from squares to rectangles.
* This works about 10 times slower than the regular resize.
* Any suggestions for performance increase are welcome.
View Inputs.java
/**
* Keyboard Input Library
* Andrew Errity v0.2 (2015-Oct-01)
* GoToLoop v1.0.4 (2015-Oct-22)
*
* https://Forum.Processing.org/two/discussion/13175/
* do-whille-is-not-working-how-it-suppose-to#Item_12
*
* https://GitHub.com/aerrity/Inputs/blob/master/src/Inputs.java
* https://Gist.GitHub.com/GoToLoop/bba0c288aaeeb5ef9bb1
You can’t perform that action at this time.