HTML5 canvas - how to initially control scaling
So there I was, trying to place a new canvas element exactly over a Konva stage, which worked but the scaling was all wrong compared to the Konva output - what gives ?
A tech blog giving usable explainers, advice, tools, tricks and techniques for the Konva JavaScript canvas library, the HTML5 canvas, and related subjects.
So there I was, trying to place a new canvas element exactly over a Konva stage, which worked but the scaling was all wrong compared to the Konva output - what gives ?
In this post I'll look at how to rotate and scale a rectangle so that it entirely covers the space it occupied before rotation. This is useful if you ever have to rotate an image without leaving gappy corners.
ClearScript is the C# scripting engine that can execute JavaScript inside a C# context. It's way smarter than that description suggests. But it does not provide a require (think 'code module loader') capability. So how about we make one...
When trying to squeeze every last morsel of optimisation out of a canvas app, we need to be concerned about avoiding drawing anything we don't need to. This means anything that the user cannot possibly see should not be drawn. Lets take a look...
If you are used to using CSS selectors to work on the HTML DOM and wondering if there is anything similar in Konva? You might have looked in the docs and not found anything you recognise. Let me take you through what Konva has to offer for selecting...
It's fine for the official Konva zoom-at-a-point demo to take the stage from unusably small to ridiculously large because the focus is on the mechanism, not the user experience. But in the real world we need something better UX. Here's my take...
When the user calls or sends in the email to the support team there's already a bad situation. How you respond and communicate, on a human level, will make the difference between winning an ally and making an enemy. Here's my thinking...
Stuck with a coding issue - found a solution in an npm package? Should you just npm -install it? There's no doubt that package managers give todays developers immediate access to an amazing resource of other peoples code. But at what cost and risk?