Comments (4)
Ok, so I tested your updated implementation vs. the one I was suggesting: https://esbench.com/bench/5857b9b0d5686f990078bb32
My tests show that both implementations run equally fast in Firefox, and that the double atan2 implementation runs 4 times slower in Chrome (Firefox seems 10x faster on this micro-bench). So I'd say let's stick with your implementation.
from bezierjs.
angle
got simplified in v2.2.2, so the only benefit would be "angle between three points". As a bezier library, what goes in utils is mostly based on "does the library itself need it", rather than "is it useful on its own", because the latter shouldn't be in the bezier-specific utils file =)
For deciding whether to keep the current angle, or use yours, I'd be interested in seeing the perf difference. Would you be interested in seeing if you can get numbers associated with both functions?
from bezierjs.
Sure, I'll do that as soon as jsperf.com is back online :-)
jsperf/jsperf.com#289
from bezierjs.
that is not happening any time soon, jsperf is down because it could not prevent itself from getting hammered, without a solution in sight. But you don't need jsperf, writing your own timer in node/browser is pretty easy
from bezierjs.
Related Issues (20)
- Release v6.1.2 broken HOT 3
- Why get(t = 0.5) point is not the middle point of the curve? HOT 5
- Find optmal D1 - Bezier.cubicFromPoints HOT 1
- PolyBezier is not exported correct for ES Module. HOT 3
- Rational Bezier Curve Support HOT 1
- Example usage of `dist/bezier.js` HOT 4
- How to make a "strict" version of bezier.project(point)? HOT 2
- Should bezier.lineIntersects(line) work for line-line intersections? HOT 3
- intersects bug Bezier to Bezier HOT 3
- Suspicious line in `utils.compute()` HOT 2
- The intersection of the two bezier is empty HOT 10
- The intersection of two identical curves HOT 2
- Intersect line method does not always return existing intersections HOT 6
- Ability to get and estimate the centerline of a list of 3D points HOT 3
- PR for extending API to interpolate values along curve and find point on curve at distance?
- Artifact when offsetting an SVG path
- Split curves do not follow old curve. HOT 2
- Missing LICENSE file HOT 1
- How to Find Y-Coordinate for a Given X-Coordinate on a Bezier Curve HOT 3
- Q: PolyBezier surface calculation HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bezierjs.