Skip to main content
Inspiring
March 30, 2022
Answered

HTML5 Canvas -Move mask using JavaScript?

  • March 30, 2022
  • 1 reply
  • 250 views

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...

    This topic has been closed for replies.
    Correct answer FlatChat

    Got it working with:

    mask.x -= 1;

     

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

    1 reply

    FlatChatAuthorCorrect answer
    Inspiring
    March 30, 2022

    Got it working with:

    mask.x -= 1;

     

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