class KeyframeView extends WindozDomContent { constructor() { super() Object.assign(this, app.helpers.activeAttributes) } DOMContentFocused(options) { if(this.wasBlured){ // Avoid 2nd refesh on DomContentLoaded //this.refreshyoustuff() } this.wasBlured = false } DOMContentBlured(options) { this.wasBlured = true } async DOMContentLoaded(options) { this.windowPrefsId = `editors.keyframeview` this.models = options.models const components = ui.eicfy(this.el) this.setupTriggers(components) this.setupRefs(components) this.agentDefs = await this.models.agents.getSprites('Basic 3D') // for(const agentType in this.agentDefs){ // const opt = new Option(agentType, agentType) // this.outputs.agentsSelector.add(opt) // } // this.outputs.agentsSelector.addEventListener('change',this.onChangeAgent.bind(this)) // const x = new tinySelector('[data-output="agentsSelector"]',{ // selectorOptions: Object.keys(this.agentDefs).map(aname => ({ markup: aname, value: aname})) // }) // this.agentPreview = new app.LoadedModules.AgentPreview(this.outputs.agentSampleCanvas, this.agentDefs) // this.onChangeAgent() // this.agentPreview.startRendering() // this.agentPreview.animation = true } onChangeAgent(event){ this.agentPreview.setAgent(this.outputs.agentsSelector.value) } } app.registerClass('KeyframeView', KeyframeView)