sneak out implementation from threejs-experiements