Hi,
It was mentioned previously that the websocket API now supports animation. Is there any example code or even just a code snippet illustrating how it’s used?
Hi,
It was mentioned previously that the websocket API now supports animation. Is there any example code or even just a code snippet illustrating how it’s used?
There are two different types of animation currently offered:
Example Object:
{"offsetX":0,
"x":20,
"highlighted":"https://cdn.gather.town/storage.googleapis.com/gather-town.appspot.com/uploads/oxrhEtb3sV7VutbQ/TnLd1QwcHJrqEOJ2rO2k4w",
"spritesheet":{
"animations":{
"default":{
"useSequenceAsRange":true,
"frameRate":6,
"loop":true,
"sequence":[0,5]
}
},
"framing":{
"frameWidth":64,
"frameHeight":96
},
"currentAnim":"default",
"spritesheetUrl":"https://cdn.gather.town/storage.googleapis.com/gather-town.appspot.com/uploads/oxrhEtb3sV7VutbQ/Nh7Rng3SvwZLHXxmvL1yms"
},
"color":"default",
"width":2,
"offsetY":0,
"objectPlacerId":"4cQU2MUyzVRqGryqYFecOSotH5D3",
"normal":"https://cdn.gather.town/storage.googleapis.com/gather-town.appspot.com/uploads/oxrhEtb3sV7VutbQ/8QPrJNQNTK7GVbgFJbcf8y",
"_tags":["Custom"],
"y":30,
"height":3,
"previewMessage":"FIRE!!",
"_name":"animated fireplace",
"templateId":"bFnSvEBFhwqWPvLulQWa2",
"properties":{},
"type":5,
"id":"ObjectID",
"orientation":0}
Thank you @Bill_Uncork-It