Description of the problem
CameraHelper::constructor expects a Camera argument, but since CameraHelper::clone is not overwritten it will forward to LineSegments::constructor which expects a geometry and a material.
As a result cameraHelper.camera won't be set and cameraHelper.clone() throws via .update() (see https://jsfiddle.net/bbnk59af/).
Overwriting CameraHelper::clone to account for its own constructor solves the issue (see https://jsfiddle.net/bbnk59af/1/):
THREE.CameraHelper.prototype.clone = function () {
var clone = new this.constructor(this.camera).copy(this);
return clone;
}
I am not sure what the intended behaviour is in the case that cameraHelper.clone() gets called as a child of scene.clone(). The cameras and their helpers would be cloned individually, but the cloned helpers would point to the original cameras instead of the cloned ones.
Three.js version
Browser
OS
Description of the problem
CameraHelper::constructorexpects aCameraargument, but sinceCameraHelper::cloneis not overwritten it will forward toLineSegments::constructorwhich expects a geometry and a material.As a result
cameraHelper.camerawon't be set andcameraHelper.clone()throws via.update()(see https://jsfiddle.net/bbnk59af/).Overwriting
CameraHelper::cloneto account for its own constructor solves the issue (see https://jsfiddle.net/bbnk59af/1/):I am not sure what the intended behaviour is in the case that
cameraHelper.clone()gets called as a child ofscene.clone(). The cameras and their helpers would be cloned individually, but the cloned helpers would point to the original cameras instead of the cloned ones.Three.js version
Browser
OS