{
const drawCube = regl(colorCubeRenderable);
const refresh = (angles=[0,0]) => {
const views = [
computeViewMatrix(angles, dimensions[0].center, dimensions[0].radius),
computeViewMatrix(angles, dimensions[1].center, dimensions[1].radius),
];
const eyes = [
computeEye(angles, dimensions[0].center, dimensions[0].radius),
computeEye(angles, dimensions[1].center, dimensions[1].radius)
];
regl.clear({
color: [0,0,0,1],
depth: 1
});
drawCube({viewMatrix: views[+solidOption], eye: eyes[+solidOption]});
}
refresh();
cameraControl(myCanvas,refresh);
return `render loop`
}