How to reach scenes by name

Hi

I am creating 2 scenes with javascript for loop…and assign name with;

scene.name = “scene”+i (scene0 and scene1)

I want to rotate my scene0 with a button click via tweenmax.js. But I cannot reach scene…how can I do that?

TweenMax.to(scene0.rotation, 0.7,{
y:-0.5,
delay:1,
onUpdate:function(){
renderer.render(scene0, camera);
}
});

I know this code is wrong but It was working with single scene…

I tried something like : scene.name[“scene0”].rotation…

I hope I can explain what I need?

thanks.

You can query a 3D objects by its name via: Object3D.getObjectByName(). So try it with:

const scene0 = scene.getObjectByName( 'scene0' );