diff --git a/app/helpers/helpers3D.module.js b/app/helpers/helpers3D.module.js index 876bd1f..135d59c 100644 --- a/app/helpers/helpers3D.module.js +++ b/app/helpers/helpers3D.module.js @@ -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() diff --git a/app/thirdparty/buildoz/buildoz.js b/app/thirdparty/buildoz/buildoz.js index 4e6d1fc..207ed71 100644 --- a/app/thirdparty/buildoz/buildoz.js +++ b/app/thirdparty/buildoz/buildoz.js @@ -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) diff --git a/app/views/editors/KeyframeView.js b/app/views/editors/KeyframeView.js index 0d164e3..a95ed74 100644 --- a/app/views/editors/KeyframeView.js +++ b/app/views/editors/KeyframeView.js @@ -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: `${aname}`, 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) } diff --git a/app/views/editors/modules/agentPreview.module.js b/app/views/editors/modules/agentPreview.module.js index 5c5644a..a467845 100644 --- a/app/views/editors/modules/agentPreview.module.js +++ b/app/views/editors/modules/agentPreview.module.js @@ -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){