MCPcopy
hub / github.com/processing/p5.js / _setDefaultCamera

Method _setDefaultCamera

src/webgl/p5.Camera.js:1741–1760  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1739 //detect if user didn't set the camera
1740 //then call this function below
1741 _setDefaultCamera() {
1742 this.cameraFOV = this.defaultCameraFOV;
1743 this.aspectRatio = this.defaultAspectRatio;
1744 this.eyeX = this.defaultEyeX;
1745 this.eyeY = this.defaultEyeY;
1746 this.eyeZ = this.defaultEyeZ;
1747 this.centerX = this.defaultCenterX;
1748 this.centerY = this.defaultCenterY;
1749 this.centerZ = this.defaultCenterZ;
1750 this.upX = 0;
1751 this.upY = 1;
1752 this.upZ = 0;
1753 this.cameraNear = this.defaultCameraNear;
1754 this.cameraFar = this.defaultCameraFar;
1755
1756 this.perspective();
1757 this.camera();
1758
1759 this.cameraType = 'default';
1760 }
1761
1762 _resize() {
1763 // If we're using the default camera, update the aspect ratio

Callers 4

cameraFunction · 0.95
constructorMethod · 0.80
createCameraMethod · 0.80
constructorMethod · 0.80

Calls 2

perspectiveMethod · 0.95
cameraMethod · 0.95

Tested by

no test coverage detected