KF console API
This commit is contained in:
@@ -119,10 +119,10 @@
|
||||
color: white;
|
||||
}
|
||||
.kf-editor .kfArena .inner-console .results .error{
|
||||
border-top: 1px solid red;
|
||||
border-bottom: 1px solid red;
|
||||
border-bottom: 2px solid black;
|
||||
background-color: #FDD;
|
||||
color: black;
|
||||
padding: 0.1em 0.5em 0.1em 0.5em;
|
||||
}
|
||||
</style>
|
||||
<div class="kf-editor cols-3">
|
||||
|
||||
@@ -136,7 +136,6 @@ class KeyframeView extends WindozDomContent {
|
||||
return(aid)
|
||||
}
|
||||
|
||||
|
||||
updateKfButtons(){
|
||||
if((Object.keys(this.kfArena.agents).length > 0) && (this.outputs.kfName.value.length > 5)) { this.outputs.btnSaveKF.disabled = false }
|
||||
else { this.outputs.btnSaveKF.disabled = true }
|
||||
@@ -164,9 +163,7 @@ class KeyframeView extends WindozDomContent {
|
||||
}
|
||||
|
||||
fillAgentProperties(aid, agentProps, agentValues = {}){
|
||||
this.outputs.agentProperties.innerHTML = `
|
||||
<div data-output="agentId">ID: ${aid}</div>
|
||||
`
|
||||
this.outputs.agentProperties.innerHTML = `<div data-output="agentId">ID: ${aid}</div>`
|
||||
this.outputs.agentProperties.append(...this.fieldsFromJSON(agentProps, agentValues, 'Internal properties', this.onPropsChanged.bind(this)))
|
||||
this.outputs.agentProperties.append(...this.fieldsFromJSON({
|
||||
"position.x": {
|
||||
@@ -242,7 +239,6 @@ if unsavec changes in scene => confirm before reloading
|
||||
Bugs
|
||||
|
||||
=> reselect same scene resets it
|
||||
=> Added with API = non-selectable
|
||||
=> loaded from KF => loosing internal props
|
||||
|
||||
|
||||
*/
|
||||
|
||||
@@ -217,7 +217,7 @@ export class kfArena{
|
||||
this.removeAgent(aid)
|
||||
}
|
||||
for(const agent of agents){
|
||||
this.addAgent(agent.ekfs_atp_id, agent.aid, agent.props, {...agent.gps_values, ...agent.store_values})
|
||||
this.addAgent(agent.ekfs_atp_id, agent.aid, agent.atp_props, {...agent.gps_values, ...agent.store_values})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user