I am using using JavaScript library Kinetic.js for HTML5 canvas.
Here is the method stage.get() to get objects from stage (canvas). I have assigned the id's or class names to each object
if I get the object by id var obj = stage.get('#obj_id') it works but If try to get the multiple objects by class name var objs = stage.get('.obj_class_name') it returns an empty [] object
How I can get multiple objects from stage .
well, you could just do .getChildren() to get all children, then iterate through the array with a loop and a condition to add a new array you created.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With