Dynamic content loading

Hi guys. I want to know if it is possible to dynamically load and unload 3D models and audio? In my project I have about 25 low poly 3D models and audio tracks (10-30 seconds each), but I only need one pair at a time, so it would be nice to load the next pair when I need it and unload the previous one.

Bump - I would also like to know about this. Can I dynamically load content? In particular I would like to have multiple images in one filter and load the content for each on demand.

I know we can load audio/video files from the web into a zap. Haven’t tried it but you maybe able to reload them as well to make them dynamic. As for the 3d models I saw a post where Zappar said no. I has to be in the zap file.

Steve

Yes, you can do that. Here’s an example:

let model = Z.Object().type('https://something.s3.amazonaws.com/3DTest/Torus.fbx').materials(['https://something.s3.amazonaws.com/3DTest/ShapesTexture_Torus.jpg']).layerMode(Z.LayerMode.full_3d);
    model.on('ready',(){
       symbol.nodes.Group.push(model);
       console.log('end');
    })

Audio same thing, but it must be an mp3 file passed into a video node.

2 Likes