I am making a project which animates fabricjs objects with theatrejs studio, and exports pure html with fabirc.min.js and core-only.min.js having animation state..
While working on a project, I would like to import already exported file to modify. I can remove existing fabric objects and sheet objects, add imported fabric objects and create sheet objects. Up to this is fine.
But sequence state is not being applied.
basically I want to call again project = getProject('HTML Animation Tutorial', {state}), but this would be a new state. But this is disallowed.
I want to ask what is workaround for this use case?
https://vimlesh1975.github.io/ReactCasparClient/WebAnimator
I am making a project which animates fabricjs objects with theatrejs studio, and exports pure html with fabirc.min.js and core-only.min.js having animation state.. While working on a project, I would like to import already exported file to modify. I can remove existing fabric objects and sheet objects, add imported fabric objects and create sheet objects. Up to this is fine. But sequence state is not being applied. basically I want to call again project = getProject('HTML Animation Tutorial', {state}), but this would be a new state. But this is disallowed. I want to ask what is workaround for this use case? https://vimlesh1975.github.io/ReactCasparClient/WebAnimator
My import code is
const importHtml = async () => { deleteAllObjects() const [aa] = await window.showOpenFilePicker(); if (aa) { const file = await aa.getFile(); const content = await file.text(); var canvasContent = content.split('const content =')[1].split(';')[0]; initialiseCore(canvasContent); var animationContetent = content.split('{state:')[1].split('});')[0]; console.log(animationContetent); project = getProject('HTML Animation Tutorial', { state: JSON.parse(animationContetent) }); } }