I use shapediver API for an web page... (http://app.shapediver.com/api)
in API its is writen for adding "addEventListener(type, callback)" and; for removeing , it is writen; removeEventListener(token)
and for token :
id --> of the message token, the same id is used for all messages belonging to the same process
serial --> number of the message token,> increases for every message belonging to the same process
payload -->> which optionally may be passed to asynchronous functions, e.g. a token used to identify progress or status messages of asynchronous processes
I couldnt removeEventListener of API.. add event listener starts but doesnt stop here is what I tried:
api.scene.addEventListener(api.scene.EVENTTYPE.SUBSCENE_PUBLISHED, myFunctionpicbir);
function myFunctionpicbir() {
alert("1")
setTimeout(function() {
html2canvas($('#sdv-container-sky')[0], {
x: 500,
y: 0,
height: 600,
width: 900
}).then(function(canvas) {
document.getElementById('kumas_cizim').appendChild(canvas);
api.scene.removeEventListener(api.scene.EVENTTYPE.SUBSCENE_PUBLISHED, myFunctionpicbir);
myFunctiona();
}, 1500);
})