ThreeJS WebGL Infinity Mirror

Viewed 15

I am developing a mirror box using multiple WebGL Mirrors. Currently THREE.Mirror only supports rendering one other mirror...

groundMirror.renderWithMirror( topMirror );
verticalMirror.renderWithMirror( groundMirror );
topMirror.renderWithMirror(groundMirror);
leftSideMirror.renderWithMirror(rightSideMirror);
rightSideMirror.renderWithMirror(leftSideMirror);
backSideMirror.renderWithMirror(frontSideMirror);
frontSideMirror.renderWithMirror(backSideMirror);
renderer.render(scene, camera);

This is currenlty not supported:

frontSideMirror.renderWithMirrors(topMirror,groundMirror,rightMirror,leftSideMirror,frontSide,backSide);

Mirror Error Image

https://codepen.io/ao-austinoliver/pen/OJZjOgy

https://drive.google.com/file/d/1BgN8I4A7JB-f-0rBGyKFfVRzu25RLavD/view?usp=sharing

How can I extend the THREE.Mirror api to create a infinity mirror?

0 Answers
Related