big fix in bzselect
This commit is contained in:
@@ -49,7 +49,7 @@ app.helpers.helpers3D = {
|
||||
return obj
|
||||
},
|
||||
|
||||
cameraAutoFrame(object, camera, offset = 1.25, controls) {
|
||||
cameraAutoFrame(object, camera, offset = 1.5, controls) {
|
||||
const box = new THREE.Box3().setFromObject(object)
|
||||
const size = new THREE.Vector3()
|
||||
const center = new THREE.Vector3()
|
||||
|
||||
Vendored
+1
-1
@@ -93,7 +93,7 @@ class BZselect extends Buildoz {
|
||||
|
||||
addOption(value, markup){
|
||||
const opt = document.createElement('option')
|
||||
opt.setAttribute(value, value)
|
||||
opt.setAttribute('value', value)
|
||||
opt.innerHTML = markup
|
||||
opt.addEventListener('click',this.onClick.bind(this))
|
||||
this.append(opt)
|
||||
|
||||
@@ -22,7 +22,10 @@ class KeyframeView extends WindozDomContent {
|
||||
this.setupRefs(components)
|
||||
|
||||
this.agentDefs = await this.models.agents.getSprites('Basic 3D')
|
||||
this.outputs.agentsSelector.fillOptions( Object.keys(this.agentDefs).map(aname => ({ markup: `<i>${aname}</i>`, value: aname})) )
|
||||
this.outputs.agentsSelector.fillOptions( Object.keys(this.agentDefs).map(aname => {
|
||||
console.log(this.agentDefs[aname])
|
||||
return({ markup: `${aname}`, value: aname})
|
||||
}))
|
||||
this.outputs.agentsSelector.addEventListener('change',this.onChangeAgent.bind(this))
|
||||
|
||||
this.agentPreview = new app.LoadedModules.AgentPreview(this.outputs.agentSampleCanvas, this.agentDefs)
|
||||
@@ -34,7 +37,6 @@ class KeyframeView extends WindozDomContent {
|
||||
|
||||
|
||||
onChangeAgent(event){
|
||||
console.log('onChangeAgent',this.outputs.agentsSelector.value)
|
||||
if(this.outputs.agentsSelector.value) this.agentPreview.setAgent(this.outputs.agentsSelector.value)
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ export class AgentPreview{
|
||||
this.currentAgentObj.position.set(0, 0, 0)
|
||||
this.scene.add(this.currentAgentObj)
|
||||
|
||||
this.cameraAutoFrame(this.currentAgentObj, this.camera)
|
||||
this.cameraAutoFrame(this.currentAgentObj, this.camera, 2)
|
||||
}
|
||||
|
||||
set animation(value){
|
||||
|
||||
Reference in New Issue
Block a user