Skip to content

Instantly share code, notes, and snippets.

@davidmerwin
Last active November 24, 2023 02:47
Show Gist options
  • Save davidmerwin/439beb52eaee004265e4d447f9f070af to your computer and use it in GitHub Desktop.
Save davidmerwin/439beb52eaee004265e4d447f9f070af to your computer and use it in GitHub Desktop.

TypeScript Snippet

Preview:
// Set up controls for the app
private setUpControls() {
  // Enable damping for smoother camera movement
  this.controls.enableDamping = true;

  // Set the damping factor for the controls
  this.controls.dampingFactor = 0.05;

  // Disable screen space panning
  this.controls.screenSpacePanning = false;

  // Set the minimum distance of the camera from the scene
  this.controls.minDistance = 10;

  // Set the maximum distance of the camera from the scene
  this.controls.maxDistance = 50;

  // Set the maximum polar angle (vertical rotation) of the camera
  this.controls.maxPolarAngle = Math.PI;
}
Associated Context
Type Code Snippet ( .ts )
Associated Tags No Tags Associated
Description 'No Description Provided'
Related Links http://quantumai.google/cirq
https://github.com/davidmerwin
Related People David Merwin, Jack Cheng, CIRQ
Sensitive Information No Sensitive Information Detected
Shareable Link https://davidmerwin.pieces.cloud/?p=9fdd478023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment