bzselect now clean + KVview adapted

This commit is contained in:
STEINNI
2025-10-18 18:30:02 +00:00
parent 12e72f9c7f
commit e3ca6bd6b2
5 changed files with 62 additions and 60 deletions
+8 -15
View File
@@ -21,28 +21,21 @@ class KeyframeView extends WindozDomContent {
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.outputs.agentsSelector.fillOptions( Object.keys(this.agentDefs).map(aname => ({ markup: `<i>${aname}</i>`, value: aname})) )
this.outputs.agentsSelector.addEventListener('change',this.onChangeAgent.bind(this))
// this.agentPreview = new app.LoadedModules.AgentPreview(this.outputs.agentSampleCanvas, this.agentDefs)
// this.onChangeAgent()
// this.agentPreview.startRendering()
// this.agentPreview.animation = true
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)
console.log('onChangeAgent',this.outputs.agentsSelector.value)
if(this.outputs.agentsSelector.value) this.agentPreview.setAgent(this.outputs.agentsSelector.value)
}
}