Fill this out this info to make it easier for the community to help you! If you don’t fill out this information, your post may be deleted or removed.
What Wick Editor Version are you using?
web version - 1.19.3
Describe the Problem
I want to do hand drawn animation but I do not like the default brush look. After looking for ways I came across WickBrush - https://github.com/Wicklets/WickBrush (JS library for brushes). I code for fun, doing some creative coding or automating stuff, so I am not sure how to go about this. Where I am stuck is how do I go about testing this or the whole scripting thing. I know about buttons and events but the brush is a global phenomenon I want to happen not just when something is clicked and such.
Although looking at the WickBrush Git repo what seems feasible to me is:
- create a new brush by simply changing the brush tip property png. I could host my brush tip png in GitHubPages for WickBrush to use.
- a simple procedural brush tip that looks like a crayon with stagger, like this
WickBrush.BitmapBrush.enable();
// Step 1: Create a simple circular brush tip
const canvas = document.createElement(“canvas”);
canvas.width = 16;
canvas.height = 16;
const ctx = canvas.getContext(“2d”);
ctx.fillStyle = “black”;
ctx.beginPath();
ctx.arc(8, 8, 4, 0, Math.PI * 2);
ctx.fill();
// Step 2: Create Image and apply it as the brush tip
const img = new Image();
img.src = canvas.toDataURL();
img.onload = () => {
const tip = WickBrush.BitmapBrush.createBrushFromImage(img);
WickBrush.BitmapBrush.setBrushTip(tip);
// Step 3: Add stagger (jitter)
WickBrush.BitmapBrush.setBrushJitter(2); // Staggers the position
WickBrush.BitmapBrush.setSpacing(0.1); // Smooth stroke with overlap
console.log(“ Simple crayon brush with stagger ready!”);
};
What have you tried so far?
- Tried downloading the WickBrush.js on local storage to import to Wick editor. I am not being able to import .js files or maybe I am doing something wrong.
- Tried to see if I could plug the code into the console itself so it ran on my browser, cant make heads and tails of it.
I’d really appreciate the help since I travel a lot and dont want to download softwares. I prefer web based apps. Wick Editor is perfect for my hand drawn animation needs but would love to be able to change the brush tip, since I think it is a feasible option via WickBrush.
Would also appreciate help on how to get started with Scripting. Looked around the forum but there are methods and documentation but not actually how to start (except for the button etc etc) from the Learn page.
Thank you.