reload scene now clears arrows + remove agent
This commit is contained in:
@@ -59,7 +59,7 @@ class KeyframeView extends WindozDomContent {
|
||||
this.kfArena.startRendering()
|
||||
|
||||
this.outputs.btnAddAgent.disabled = true
|
||||
this.outputs.btnRemoveAgent.disabled = true
|
||||
this.outputs.btnRemoveAgent.disabled = true
|
||||
this.outputs.btnSaveKF.disabled = true
|
||||
this.outputs.kfName.addEventListener('keyup', this.updateKfButtons.bind(this))
|
||||
this.currentlySelectedAid = null
|
||||
@@ -160,12 +160,13 @@ class KeyframeView extends WindozDomContent {
|
||||
if(this.currentlySelectedAid == aid){ // Deselect
|
||||
this.kfArena.clearHighlight3DObj(obj3D, this.kfArena.scene)
|
||||
this.currentlySelectedAid = null
|
||||
this.outputs.btnRemoveAgent.disabled = true
|
||||
} else { // Select
|
||||
if(this.currentlySelectedAid){
|
||||
this.kfArena.clearHighlight3DObj(this.kfArena.scene.getObjectByName(this.currentlySelectedAid), this.kfArena.scene)
|
||||
}
|
||||
|
||||
this.currentlySelectedAid = aid
|
||||
this.currentlySelectedAid = aid
|
||||
this.outputs.btnRemoveAgent.disabled = false
|
||||
if(this.kfArena.agents[aid]) {
|
||||
this.kfArena.highlight3DObj(obj3D, this.kfArena.scene)
|
||||
this.fillAgentProperties(aid, this.kfArena.agents[aid].props, this.kfArena.agents[aid].values)
|
||||
@@ -185,6 +186,11 @@ class KeyframeView extends WindozDomContent {
|
||||
this.updateKfButtons()
|
||||
}
|
||||
|
||||
onRemoveAgent(event){
|
||||
if(!this.currentlySelectedAid) return
|
||||
this.kfArena.removeAgent(this.currentlySelectedAid)
|
||||
}
|
||||
|
||||
newAgent(aType, AgentValues){
|
||||
const aid = crypto.randomUUIDv7()
|
||||
this.kfArena.addAgent(aType, aid, this.currentAgentType.atp_props , AgentValues)
|
||||
|
||||
Reference in New Issue
Block a user