0

I've already known that there is a similar question "Save only a certain part of an HTML canvas" been solved. Save only a certain part of an HTML canvas

However, my question is if there are many sprites drawn on one canvas, can I save only one certain sprite of them?

Thank you~

1
  • Sure, clear the whole canvas, redraw only the one you want, export, optionnaly re-clear all + redraw all if you want to go back to the previous state. You could also draw that sprite on another canvas, that might be best depending on the situation. Commented Feb 7, 2022 at 8:48

1 Answer 1

0

Yes, perhaps the easiest way is to cache the item you want, and then export its cacheCanvas, which is the off-screen canvas that is created as the object cache.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.