HTML5 Canvas -Move mask using JavaScript?

Engaged ,
Mar 30, 2022 Mar 30, 2022

Copy link to clipboard

Copied

I have two promitive oval shapes on a mask layer, 'mask_idn'.  How can I move that mask layer, or the shapes on that layer,  using JavaScript?  I can't seem to assign instance name to the shapes...

Views

43

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Engaged , Mar 30, 2022 Mar 30, 2022
Got it working with:mask.x -= 1; Which is the variable for the mask in the JS file.

Likes

Translate

Translate
Engaged ,
Mar 30, 2022 Mar 30, 2022

Copy link to clipboard

Copied

LATEST

Got it working with:

mask.x -= 1;

 

Which is the variable for the mask in the JS file.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines