paper.js
Scrawl-canvas
paper.js | Scrawl-canvas | |
---|---|---|
23 | 38 | |
14,259 | 313 | |
0.6% | - | |
3.7 | 8.5 | |
about 1 month ago | 9 days ago | |
JavaScript | JavaScript | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
paper.js
-
How Framer/Figma is built?
I started with angular and paper.js: http://paperjs.org/
-
Polygon JS libraries
In a thread in the Processing forum, Boolean operations in polygons , user ErraticGenerator suggests using g.js or Paper.js.
-
Looking for a javascript library with good wrapping support
It is likely that paper.js provides the functionality needed. I will probably investigate it at some point since it appears to be the more popular library Compare paper.js & bezier.js.
-
Making YouTube video with React
To solve that issue, I searched for some solutions using canvas. I didn’t want to work with pure canvas so after doing some research, I settled with paper.js.
-
The Continuity of Splines – Video Essay by Freya Holmér
Ooh, the Chebyshev basis is neat. I hadn't seen exactly that before. It reminds me a lot of the "shape control" technique[1] which is also similar to a basis function approach but has a bit of linear solving. Essentially, you get one point (usually at t = 0.5), and also the direction but not magnitudes of the tangents at the endpoints (G1, not C1). This is one of the better-performing existing techniques for offset curve, though does have stability problems (in particular, nasty behavior for a symmetric "S" curve).
Regarding collaboration with Freya, if she is open to it, please get in touch. I do have some ideas.
[1]: A New Shape Control and Classification for Cubic Bézier Curves, Yang and Huang, 1993, PDF cache: https://github.com/paperjs/paper.js/files/752955/A.New.Shape...
-
which technology or framework is used to create geometry-draggable canvas like this?
Paper.js - example (not interactive, just code)
-
Animating an svg
Just remember you can do some SVG displacement with Paper.JS
-
Writing HTML sucks and No-code doesn't help
> <p>Oh yeah, you reminded me of the template fatigue that was paper.js and it trying to reinvent scripting on the client side with <script type="text/paperscript"> templates that could use templates that could use templates... and so on. [0] I was wondering why people would go to such great lengths just to avoid having to script in the browser.<p>The way I saw it at the time was that I've rediscovered the same mistakes that PHP did back in the days. All the recurs(iv)ed templating problems, all the OOP fatigue that never worked out (magento and zend, anyone?), and all the inheritance based "reinventions" of existing web technologies like OOCSS [1].<p>I mean, at some point every engineer should be wise enough to give up on trying to predict the future. Especially in projects they cannot predict what features are going to be implemented, so I'd naturally assume that modularity and compositional or entity/component aspects will win in later revisions or refactor decisions. But I was wrong with that assumption, I guess :S<p>I also can kinda understand the general bias towards closure among functional folks. I guess that lots of people at the time (or nowadays) had high hopes for it allowing to go more "functional" in its approach, allowing compositional patterns to be useful on the web. But, honestly, JS itself is so flexible and can be used in all kinds of architectural patterns that I think closure's purpose is kind of void by its own concept.<p>When comparing closure with, say, typescript (which I also don't agree with, because "string" and "String" and "any" are pointless from any language design perspective): Typescript at least has the benefit of typed API docs and good IDE integrations (due to LSP) that can be used in large teams to reduce the overhead of getting started with working on foreignly-owned code - whereas closure doesn't have any unique selling point in my opinion. I mean, even scala.js has a unique selling point when being judged like that.<p>[0] <a href="https://github.com/paperjs/paper.js" rel="nofollow">https://github.com/paperjs/paper.js</a><p>[1] <a href="http://oocss.org/" rel="nofollow">http://oocss.org/</a>
-
Diagnosing RangeError: Maximum call stack size exceeded in React KeyEscapeUtils
Our webapp is written with React and Redux using the official react-redux bindings. Another primary library used in this web app is PaperJS. We recently transitioned this to being a Redux app, though it has used React for a while.
-
How to upload image into HTML5 canvas
I am currently using http://paperjs.org to create an HTML5 canvas drawing app. I want to let users upload images into the canvas. I know I need to make a login and signup but is there an easier way? I have seen the HTML5 drag and drop upload.
Scrawl-canvas
-
Figma's Journey to TypeScript
I don't like Typescript because it forces me to think about types and data structures and stuff. Which is a Good Thing because I absolutely have to think about that stuff when working on large codebases with a team of colleagues: without the inline documentation and text editor help TS gives me when working on those codebases I'd be (at least!) 10x slower when refactoring old code or adding new code. And nobody wants to pay a slow developer!
However ... the one place I refuse to use Typescript is in my side project - a JS canvas library. I can justify this because: 1. it's a big codebase, but I know every line of it intimately having spent the last 10 years (re-)writing it; 2. nobody else contributes (and I kinda like it that way); and 3. I keep a close eye on competing canvas libraries and I've watched several of them go through the immense (frustrating!) work of converting their codebases to TS over the past few years and, seriously, I don't need that pain in my not-paid-for life.
Even so, I do maintain a .d.ts file for the library's 'API' (the functions devs would use when building a canvas using my library) because the testing, documentation and autocompletion help it offers is too useful to ignore. It is additional work, but it's just one file[1] and I can live with that.
[1] https://github.com/KaliedaRik/Scrawl-canvas/blob/v8/source/s...
-
Show HN: Dropflow, a CSS layout engine for node or <canvas>
> working with glyphs and iterating them in reverse for RTL is brain-breaking. And line wrapping gets really complicated. It's also the most obscure because nobody has written down everything you need to know in one place
I can confirm this. I've been working on a (much simpler!) text layout engine for my canvas library over the past couple of months and the amount of complexity associated with just stamping some glyphs onto a canvas has left me screaming at my laptop on an almost daily basis. Getting a decent underline was a proud moment!
Question: did you ever find out what algorithm the various browsers are using to calculate how many words can fit on a given line? I'm almost there, except words will occasionally jump between lines when I scale the text. Really annoying!
The PR's still a work in progress, but I've got all the functionality I want in there (shaping lines to fit in non-rectangular containers, styling text, text along a non-straight line, dynamic updates, etc). Just need to test and document it all now ... https://github.com/KaliedaRik/Scrawl-canvas/pull/75
-
Ask HN: What are you working on this year?
I've got myself organised and prepared a List Of Things To Do[1] to make my 2D Javascript library even better than it already is. Given that I've been working on the library for over 10 years now, and have never before set out such a list, I call this Progress!
[1] https://github.com/KaliedaRik/Scrawl-canvas/discussions/cate...
-
Pixelating Live with SVG
'Kay, I don't know if this anywhere close to what the OP wants, but this sort of live browser tab manipulation is possible to do using a mix of a a canvas element and the browser's Screen Capture API[1] (plus my JS canvas library, once I merge and publish the changes into its next release[2]).
This solution[3] shows the modified browser tab in a separate browser tab. I've got no idea whether it's possible to do the same sort of trick in the same tab (but probably not). I also have no idea how secure the Screen Capture API is - I'd get very nervous about doing this sort of thing when looking at my bank's online portal!
[1] https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capt...
[2] https://github.com/KaliedaRik/Scrawl-canvas/pull/57
[3] Youtube video of the effect: https://www.youtube.com/watch?v=hCi6LmKMAo0
- Scrawl-canvas 2D canvas library – proposed roadmap
- Scrawl-canvas - a Javascript library for working with the HTML5 <canvas> element
-
Motion Canvas – Visualize complex ideas programmatically
My canvas library's README[1] has a video embedded in it. FWIW I'm not convinced it adds anything to the library's sales pitch.
[1] https://github.com/KaliedaRik/Scrawl-canvas
-
Egui commit: Implement accessibility APIs via AccessKit
> And I’m just mentioning some of the unfixable problems with this approach
I agree that using a canvas instead of leveraging existing accessibility supplied by HTML/CSS/JS and the DOM is an accessibility nightmare.
However, I disagree that canvas accessibility issues are "unfixable". Difficult? Yes. But not unfixable. In my view, the element works best in partnership with its wider environment (HTML/CSS/JS and the DOM), not as a replacement for it. With that in mind, we can start to tackle the accessibility issues you raise - fonts, links, interactions, etc.[1][2]
I have an ambition to one day become intelligent enough to understand/code in Rust, and I'm really glad to see that people are thinking about accessibility as a fundamental part of UIs being developed in Rust.
[1] - Which is what my JS 2d canvas library tries to do: https://scrawl-v8.rikweb.org.uk/
[2] - My thoughts on accessibility, and how I try to fix them using my library: https://scrawl-v8.rikweb.org.uk/learn/eleventh-lesson/
-
[AskJS] Why do my coworkers not see the value in frameworks?
If, however, your company is set on this course, I very strongly suggest you use a canvas library - if only for the MVP. Here's my canvas library (spam alert!) ... even if you don't use it in your product, the library might help give you some ideas on how to overcome some of the responsive, interactive and accessibility issues you'll be facing.
-
which technology or framework is used to create geometry-draggable canvas like this?
Scrawl-canvas - example and another example (links to code at bottom of each page)
What are some alternatives?
fabric.js - Javascript Canvas Library, SVG-to-Canvas (& canvas-to-SVG) Parser
tsParticles - tsParticles - Easily create highly customizable JavaScript particles effects, confetti explosions and fireworks animations and use them as animated backgrounds for your website. Ready to use components available for React.js, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Inferno, Solid, Riot and Web Components.
p5.js - p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
particles-bg - React particles animation background component
two.js - A renderer agnostic two-dimensional drawing api for the web.
d3 - Bring data to life with SVG, Canvas and HTML. :bar_chart::chart_with_upwards_trend::tada:
Mo.js - The motion graphics toolbelt for the web
three.js - JavaScript 3D Library.
particles.js - A lightweight JavaScript library for creating particles
Konva - Konva.js is an HTML5 Canvas JavaScript framework that extends the 2d context by enabling canvas interactivity for desktop and mobile applications.
GreenSock-JS - GSAP (GreenSock Animation Platform), a JavaScript animation library for the modern web