MCPcopy Index your code
hub / github.com/processing/p5.js / copy

Method copy

src/webgl/p5.Camera.js:1776–1813  ·  view source on GitHub ↗

* Returns a copy of a camera. * @private

()

Source from the content-addressed store, hash-verified

1774 * @private
1775 */
1776 copy() {
1777 const _cam = new Camera(this._renderer);
1778 _cam.cameraFOV = this.cameraFOV;
1779 _cam.aspectRatio = this.aspectRatio;
1780 _cam.eyeX = this.eyeX;
1781 _cam.eyeY = this.eyeY;
1782 _cam.eyeZ = this.eyeZ;
1783 _cam.centerX = this.centerX;
1784 _cam.centerY = this.centerY;
1785 _cam.centerZ = this.centerZ;
1786 _cam.upX = this.upX;
1787 _cam.upY = this.upY;
1788 _cam.upZ = this.upZ;
1789 _cam.cameraNear = this.cameraNear;
1790 _cam.cameraFar = this.cameraFar;
1791
1792 _cam.cameraType = this.cameraType;
1793 _cam.useLinePerspective = this.useLinePerspective;
1794
1795 _cam.cameraMatrix = this.cameraMatrix.copy();
1796 _cam.projMatrix = this.projMatrix.copy();
1797 _cam.yScale = this.yScale;
1798
1799 _cam.cameraType = this.cameraType;
1800
1801 _cam.defaultAspectRatio = this.defaultAspectRatio;
1802 _cam.defaultEyeX = this.defaultEyeX;
1803 _cam.defaultEyeY = this.defaultEyeY;
1804 _cam.defaultEyeZ = this.defaultEyeZ;
1805 _cam.defaultCameraFOV = this.defaultCameraFOV;
1806 _cam.defaultCenterX = this.defaultCenterX;
1807 _cam.defaultCenterY = this.defaultCenterY;
1808 _cam.defaultCenterZ = this.defaultCenterZ;
1809 _cam.defaultCameraNear = this.defaultCameraNear;
1810 _cam.defaultCameraFar = this.defaultCameraFar;
1811
1812 return _cam;
1813 }
1814
1815 clone() {
1816 return this.copy();

Callers 10

cloneMethod · 0.95
addImmediateMethod · 0.45
_edgesToVerticesMethod · 0.45
normalizeMethod · 0.45
parseObjFunction · 0.45
setMethod · 0.45
slerpMethod · 0.45
primitives3DFunction · 0.45
_promoteToFramebufferMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected