I'm a bit of Dev noonb, but I would like to create a flow in AR app which allows me to show/delay/hide/show type of behavirous.
I'm using aframe as a platform so now trying design it.
The experience will consist of 5 scences with multiple assets displayed and then hidden after some animations are played.
I tried to change the visible =true/false at the scene level but 8th wall is not loading once I have added extra scene.
Is the best way to create a function to control unhide at the entity level? any help would be hugely appreciated.
here is what I have so far
<a-entity
id="model"
gltf-model="#animatedModel"
class="cantap"
scale="55 55 55"
animation-mixer="clip: FLOAT"
xrextras-hold-drag
xrextras-two-finger-rotate
xrextras-pinch-scale
shadow
visible="true">
</a-entity>
and it is controlled by the button at the moment but I would like for it to happen automatically after x seconds passes
const nextButtonComponent = () => ({
init() {
const visibilityList = ['text', 'sun']
const model = document.getElementById('model')
const sunmodel = document.getElementById('sunmodel')
const nextButton = document.getElementById('nextbutton')
nextButton.style.display = 'block'
const nextAnimation = () => {
model.setAttribute('visible', false)
sunmodel.setAttribute('visible', true)
}
nextButton.onclick = nextAnimation // Switch to the next animation when the button is pressed.
},
})
export {nextButtonComponent}