jsplumb / jsbezier Goto Github PK
View Code? Open in Web Editor NEWBezier curve helper functions for JavaScript. Used by jsPlumb; perhaps useful for others.
License: MIT License
Bezier curve helper functions for JavaScript. Used by jsPlumb; perhaps useful for others.
License: MIT License
Hi, I think that Bezier curve calculations should automatically reduce its curviness factor per distance between points. Let’s say to set the curviness to 150 if the distance between the two points is far enough that’s fine but while points gets close the curviness for the active curve should be reduce automatically to see this nice less curved short line between the two points.
Add please bower.json
Hey,
I get this error:
Uncaught TypeError: Cannot read property '0' of undefined
when I pass in this data:
var data = [{x:892,y:55}, {x:915,y:56},{x:972,y:57},{x:1024,y:63},{x:1079,y:82},{x:1112,y:103},{x:1149,y:127},{x:1187,y:148},{x:1240,y:166},{x:1285,y:171},{x:1323,y:177},{x:1346,y:180},{x:1406,y:186},{x:1447,y:189},{x:1502,y:178},{x:1546,y:168},{x:1596,y:160},{x:1668,y:150},{x:1743,y:143},{x:1807,y:138},{x:1869,y:137},{x:1921,y:148},{x:1991,y:158},{x:2080,y:168},{x:2143,y:169},{x:2220,y:162},{x:2299,y:158},{x:2377,y:154},{x:2451,y:154},{x:2554,y:153},{x:2669,y:152},{x:2771,y:151},{x:2861,y:154},{x:2983,y:155},{x:3158,y:157},{x:3275,y:146},{x:3375,y:141},{x:3552,y:137},{x:3690,y:137},{x:3826,y:141},{x:3957,y:167},{x:4061,y:224},{x:4167,y:283},{x:4209,y:321},{x:4302,y:402},{x:4363,y:444},{x:4420,y:465},{x:4506,y:469},{x:4575,y:476},{x:4676,y:497},{x:4709,y:516},{x:4746,y:548},{x:4782,y:579},{x:4820,y:613},{x:4844,y:628},{x:4870,y:636},{x:4895,y:635} ];
From what I can tell, its's because the z
array isn't large enough as it only contains 3 lists. I'm going to have a look to see if I can fix it.
Chances are I am doing something wrong... Do you have any example code I could look at?
Cheers,
John
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.