Javascript block

Does anyone know why this isnt working

whats the error?

no error. just isnt working

What is it supposed to do?

apply the kernel to the image then warp it

Do you even have the required sprites?


Maybe it's the costumes? The turtle costume makes things weird.

no. not the problem

Maybe because you have "pixels, width, width" in the inputs, but the Javascript Function block has "pixels, width, height"?

no. def not the problem

No, how about this?
First parameter: pixels in inputs, pixels in definition.
Second parameter: width in inputs, width in definition.
Third parameter: width in inputs, height in definition.

i have made a block before i know those inputs work

No, I'm saying the 3rd parameter is different between the inputs (the (input 1, input 2, <>) part) & the with inputs part. I'm comparing the top and bottom parts of the image.

there is no error. it just isnt working

Well, I don't know, then, other than the the 1st set of inputs (in the Javascript Function block) is (pixels, width, height, point1, point2, point3, point4) & the 2nd set of inputs (in the run with inputs block) is (pixels (matches), width (matches), width (doesn't match, should be height, unless it's supposed to be a square), position of sprite(3) (I assume this is point1), position of sprite(4) (I assume this is point2), position of sprite(5) (I assume this is point3), & position of sprite(6) (I assume this is point4)).

Your expressions are wrong

x = cx + 240; 
y = cy + 180;

Variables are not initialized or have no value

pixwidth, pixheight

Remove the unnecessary code and log the actual values of the position, dimension, and color before drawing a rectangle.

what do you mean

There are multiple errors in your code.
The simplest way to debug it is to look at the variable's values with the console.log.

There is a Pixels library with convolution filters.
untitled script pic - 2024-05-14T023228.314

i want to make that faster