Skip to content

Commit

Permalink
Merge pull request #304 from lume/dynamic-cam
Browse files Browse the repository at this point in the history
Dynamic cam
  • Loading branch information
keywizzle authored Jul 27, 2024
2 parents 57edd7e + 38ef185 commit 173ce7d
Show file tree
Hide file tree
Showing 12 changed files with 315 additions and 11 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ jobs:
if: runner.os != 'Windows'
run: |
cd packages/docsifyjs+docsify/ && git checkout docs/emoji.md src/core/render/emoji-data.js && cd .. && cd ..
git status && git submodule foreach git --no-pager diff && git add . && git diff --quiet && git diff --cached --quiet
git status
git --no-pager diff
git submodule foreach git --no-pager diff
git add .
git diff --quiet && git diff --cached --quiet
env:
CI: true
2 changes: 1 addition & 1 deletion apps/docs
Submodule docs updated 1 files
+38 −0 api/cameras/CameraRig.md
40 changes: 39 additions & 1 deletion dist/cameras/CameraRig.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { type ElementAttributes } from '@lume/element';
import { Element3D, type Element3DAttributes } from '../core/Element3D.js';
import { FlingRotation, ScrollFling, PinchFling } from '../interaction/index.js';
import type { PerspectiveCamera } from './PerspectiveCamera.js';
export type CameraRigAttributes = Element3DAttributes | 'verticalAngle' | 'minVerticalAngle' | 'maxVerticalAngle' | 'horizontalAngle' | 'minHorizontalAngle' | 'maxHorizontalAngle' | 'distance' | 'minDistance' | 'maxDistance' | 'active' | 'dollySpeed' | 'interactive' | 'dollyEpsilon' | 'dollyScrollLerp' | 'dollyPinchSlowdown' | 'rotationEpsilon' | 'rotationSlowdown' | 'initialPolarAngle' | 'minPolarAngle' | 'maxPolarAngle' | 'initialDistance';
export type CameraRigAttributes = Element3DAttributes | 'verticalAngle' | 'minVerticalAngle' | 'maxVerticalAngle' | 'horizontalAngle' | 'minHorizontalAngle' | 'maxHorizontalAngle' | 'distance' | 'minDistance' | 'maxDistance' | 'active' | 'dollySpeed' | 'interactive' | 'rotationSpeed' | 'dynamicDolly' | 'dynamicRotation' | 'dollyEpsilon' | 'dollyScrollLerp' | 'dollyPinchSlowdown' | 'rotationEpsilon' | 'rotationSlowdown' | 'initialPolarAngle' | 'minPolarAngle' | 'maxPolarAngle' | 'initialDistance';
/**
* @class CameraRig
*
Expand Down Expand Up @@ -217,6 +217,44 @@ export declare class CameraRig extends Element3D {
* disabled, but the camera rig can still be manipulated programmatically.
*/
interactive: boolean;
/**
* @property {number} rotationSpeed
*
* *attribute*
*
* Default: `1`
*
* How much the camera rotates while dragging.
*/
rotationSpeed: number;
/**
* @property {boolean} dynamicDolly
*
* *attribute*
*
* Default: `false`
*
* When `true`, the effective dolly speed will be changed based on the
* camera's distance to `minDistance`. Getting closer to `minDistance` will
* lower the effective dolly speed towards zero. This is useful when zoomed
* into an object and having the dolly movements not be disproportionately
* huge while viewing fine details of the object.
*/
dynamicDolly: boolean;
/**
* @property {boolean} dynamicRotation
*
* *attribute*
*
* Default: `false`
*
* When `true`, the effective rotation speed will be changed based on the
* camera's distance to `minDistance`. Getting closer to `minDistance` will
* lower the effective rotation speed to allow for finer control. This is useful
* zoomed in to see fine details of an object and having the rotation not be
* disproportionately huge, for example when zooming into a 3D globe.
*/
dynamicRotation: boolean;
/**
* @property {number} dollyEpsilon
*
Expand Down
2 changes: 1 addition & 1 deletion dist/cameras/CameraRig.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

122 changes: 121 additions & 1 deletion dist/cameras/CameraRig.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 173ce7d

Please sign in to comment.