Advertisement Β· 728 Γ— 90

Posts by Anton Lavrenov

fun canvas bug: set globalAlpha to 0, add shadows, draw text. every browser renders nothing. because alpha is zero. that's the whole point.
Safari renders the text anyway. shadows somehow bypass globalAlpha for text fills. 10+ years of canvas work and Safari still surprises me

1 week ago 0 0 0 0

html-in-canvas is so promising. Can't wait when in 15 years Safari will support it!

1 week ago 0 0 0 0

In Polotno Editor we current have two modes:
1. Plain text mode (default)
2. Rich text mode

In plain mode, a text block can't have mixed styles. While it is limited, it is very fast.

Rich mode is using svg/foreignObject approach with HTML inject to render on the canvas. Slow...

2 weeks ago 0 0 0 0
Post image

Added an accurancy benchmark with HUGE amount of test cases comparing canvas output vs svg+foreighObject render.

polotno.com/render-tag/b...

2 weeks ago 0 0 1 0
render-tag β€” HTML rich text, drawn on canvas Render HTML + CSS onto canvas with the 2D API. No SVG, no foreignObject. 10-60x faster than SVG-based approaches. Synchronous, zero dependencies.

Docs and demos: polotno.com/render-tag/
Github: github.com/polotno-proj...

2 weeks ago 0 0 1 0
Video

πŸš€ I built render-tag: the fastest way to draw HTML rich text on canvas. Pure 2D API, no SVG/foreignObject workarounds. 5x faster than the SVG approach, even more with large fonts.

Built this to solve my biggest pain point working on a web design editor. Building a canvas app? Take a look!

2 weeks ago 0 0 1 0

The release is here with the latest version 10.0.0.

7 months ago 0 0 0 0
Post image

(5) And as usual, fixing some edge cases, bugs, and general maintenance.

7 months ago 0 0 1 0
Post image

4) Added ability to hook into character render for text animations.

7 months ago 0 0 1 0
Post image

Another large update is the new Node.js render backend via skia-canvas.

From my tests, the rendering is closer to Chrome, especially in text. It's very useful to have as consistent results as possible on both client and server side renders.

7 months ago 0 0 1 0
Advertisement
Video

Native filters work a lot faster.

Here I am applying a blur filter on a 5000x5000 px image.

7 months ago 0 0 1 0
Post image

2. New: Native CSS-style filters

Native filters work much faster if supported (I hate you, Safari).

7 months ago 0 0 1 0

1. Konva is fully migrated into ESM modules. Previously I had tons of issues with delivering both CommonJS and ES, so at some point I switched to CommonJS only.

But now there is much better support for ES modules in the JS ecosystem. So I think it is time to go the modern road.

7 months ago 0 0 1 0

πŸš€ I published Konva v10 pre-release: 10.0.0-0

ESM-only, opt-in Node backends (canvas/skia), native CSS-style filters, improved text positioning, plus fixes & perf.

Install: npm i konva@next

Details + demos in the thread πŸ‘‡

7 months ago 0 0 1 0
Post image

~70% of Konva.js downloads are paired with react-konva.

Looks like native React integration plays a big role in its popularity.

11 months ago 0 0 0 0
Post image

According to npm, Konva.js is downloaded half a million times every week now. That is the top, comparing to alternatives.

Are there ways to estimate CDN usage?

11 months ago 0 0 1 0

Konva.js has way fewer open issues on GitHub than most similar libraries. I take pride in that.

11 months ago 0 0 0 0

TIL

You can load PDF as a regular image in safari.
Like really just <img src="file.pdf" />

1 year ago 1 0 0 0
Post image

It feels so good to add a good index into DB for better performance.

1 year ago 0 0 0 0

Half of the day I am fighting with text rendering issue in puppeteer (headless chrome).

Then I found the solution...

It was changing userAgent of created instances...

I love software...

1 year ago 0 0 0 0
Advertisement
Preview
Konva - JavaScript Canvas 2d Library | Konva - JavaScript Canvas 2d Library Konva is 2d Canvas JavaScript framework for drawings shapes, animations, node nesting, layering, filtering, event handling, drag and drop and much more.

Who us using konva js?

I am close to releasing a new documentation website: new.konvajs.org

Please stress test it. I need some aggressive feedback with suggestion for improvements.

1 year ago 0 0 0 0

Now I understand why we need a quantum computing chips.

To play DOM inside typescript type system at 30 FPS.

1 year ago 1 0 0 0

Seeing lots of visitors on my Polotno SDK site who really just want the free editor (I call it Polotno Studio).

I want to stay focused on B2B and avoid getting distracted by unrelated traffic. How do I filter or redirect those users, so I don't lost focus and conversions?

1 year ago 0 0 0 0

Do you save them somehow and organize? Like tons of bookmarks? A collection in codesandbox?

1 year ago 0 0 1 0

Debugging adventures with @sentry.io

Frontend: Wrestling browser quirks, rogue extensions, and device chaos.

Node.js backend: When in doubt, slap β€œretry” on it.

1 year ago 1 0 0 0

Some DNS things get down on digitalocean, so spaces are down.

My Cloud Render API gets down as well.

I decided to temporary switch to @supabase.com storage. But looks like its DNS for storage is down too!

What a wonderful day...

1 year ago 1 0 0 0

Currently, it is not very fancy under-the-hood yet. Just a simple chatGPT with a little prompt. But I have plans to attach full konva docs into it, so it gives the best practices with the last versions.

1 year ago 0 0 0 0
Preview
Kai - AI-agent to help you with grahical web | Konva - JavaScript Canvas 2d Library Kai is an AI-powered chatbot for Konva.js

Meet KAI - ai assistant to help you with konva and canvas questions: new.konvajs.org/kai

1 year ago 0 0 1 0
Advertisement
Preview
useImage hook Β· Issue #253 Β· konvajs/vue-konva I just released a new version with a little useImage hook. Usage: <template> <v-stage :config="stageSize"> <v-layer> <v-image :config="imageConfig" /> </v-layer> </v-stage> </template> <script setu...

While rebuilding new docs and writing more demos for vue.js framework, I got several use cases to improve it.
Just made a new useImage hook for it.
github.com/konvajs/vue-...
Drop me your feedback if you use vue-konva.

1 year ago 0 0 0 0
Post image

Konva docs already have tons of demos for vanilla js.

Updating these docs for react and vue versions is very time-consuming. And here I got a good use of AI and Cursor editor. So I can boostrap demos with AI and then manually review them to make sure they are good.

1 year ago 0 0 0 0