generative-light / p5.scribble.js Goto Github PK
View Code? Open in Web Editor NEWDraw 2D primitives in a sketchy look in p5.js
License: MIT License
Draw 2D primitives in a sketchy look in p5.js
License: MIT License
ScribbleFill for 90 degrees fill dots on the border of the figure only because the scribbleLine recieves the same to coordinates for the lines. The scribbleFill for other angles fill outside of the specified area.
Hi!
I'm trying to port your library in my project where I'm using es6 and standard js linter style.
I've found something that can be considered typos:
line 40:
cthis.sketch.urveVertex( this.getOffset( -offset, offset )+cx+rx*Math.cos( radialOffset+Math.PI*2+overlap*0.5 ),
with cthis
you mean this
?
line 366:
if (((otherSegment.getPy1()-yi)*(yi-otherSegment.getPy2()) < -0.00001) || ((y1-yi)*(yi-y2) < -000001)) {
with -000001
you mean -0.000001
?
This looks incredible!
Is there any way to run this on node.js?
What would I need to set up to make it happen?
Would you mind adding a license file allowing others to directly use or modify your code?
Help: choosealicense.com
Thanks
For some reason I can't get it to work? There are no errors in console?
<!doctype html>
<title> Scribbler </title> <script src="p5.js"></script> <script src="p5.sound.js"></script> <script src="p5.scribble.js"></script> <script>function setup() {
createCanvas(600,600);
background();
var scribble = new Scribble();
}
function draw() {
fill(255,0,0);
scribble.scribbleRect(300,300,80,80);
}
</script>I'm a beginner on Processing and P5 and would love to see some examples of how to use this lib. Many thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.