Skip to main content
Inspiring
Mar 30, 2022 8:37 AM UTC
Answered

HTML5 Canvas -Move mask using JavaScript?

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 is closed to new replies. Start a new post to keep the conversation going.
    FlatChatCorrect answer
    Inspiring
    Mar 30, 2022 8:49 AM UTC

    Got it working with:

    mask.x -= 1;

     

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

    1 reply

    FlatChatAuthorCorrect answer
    Inspiring
    Mar 30, 2022 8:49 AM UTC

    Got it working with:

    mask.x -= 1;

     

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

    Translate