Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

HTML5 Canvas -Move mask using JavaScript?

Engaged ,
Mar 30, 2022 Mar 30, 2022

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

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

Translate
Engaged ,
Mar 30, 2022 Mar 30, 2022
LATEST

Got it working with:

mask.x -= 1;

 

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

Translate
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