I have a Konva layer with some creature Image objects on it. I would like to store custom data values (hp and time) on these objects so when I serialize the container these data values would appear in the json. How can I achieve that?
var creature = new Konva.Image({
image: images[creat.id],
x: creat.x,
y: creat.y,
draggable: true,
id:creat.id,
url:creat.url,
hp:creat.hp,
time: creat.time
});