First of all thanks for all the work on this wonderful project.
Can somebody be so kind to provide some boilerplate for addons to get the scene, camera & renderer?
I've looked at the effects-composer addon, but I wasn't able to understand the Symbol magic.
In the console I tried retrieving the THREEjs scene on the modelviewer.dev page:
Live Demo
const enableAddon = (modelviewer) => {
modelviewer.addEventListener('before-render', function(e){
let sceneSymbol = 'Symbol("scene")'
let symbols = Object.getOwnPropertySymbols(this);
let sceneValue = this[symbols.find(symbol => symbol === sceneSymbol)];
console.log(sceneSymbol)
console.dir(symbols)
console.dir(sceneValue)
})
}
let els = [ ...document.body.querySelectorAll('model-viewer') ]
els.map( enableAddon )
But I can't seem to access those symbols...any idea?
My main interest is: THREE's camera, scene and renderer
Description
First of all thanks for all the work on this wonderful project. Can somebody be so kind to provide some boilerplate for addons to get the scene, camera & renderer? I've looked at the effects-composer addon, but I wasn't able to understand the Symbol magic. In the console I tried retrieving the THREEjs scene on the modelviewer.dev page:
Live Demo
But I can't seem to access those symbols...any idea? My main interest is: THREE's camera, scene and renderer
Version
model-viewer: v3.5.0
Browser Affected
OS