Skip to content

Commit 1602d39

Browse files
authored
Camera controls restructure (#317)
* WIP: Replaced script camera controls with new version * Updated eslint * Removed scripts from rollup.config.js * Fixed types for camera controls * Fixed focusing * Fixed wheel and ctor for camera controls * Moved camera controls into model viewer src * Removed unnecessary input types from camera controls * Removed reset method * Cleaned up focusing * refactor * Folded double if statement * Renamed model to controller * Refactored camera controls to allow for multiple inputs to be used at once * Fixed pointer type restrictions * size fix * Cleaned up mode switch in camera controls * Set zoomScaleMin when camera clipping planes changed * Fixed button management in keyboard and mouse input * Fixed zooming min distance * Removed view and updated point to be target * Fixed zoom max distance * Removed babel parser * Reverted point and view * Fixed angle lerping * Updated key string to key code * Added space key to keyboard input * Replaced old camera controls with new one * Removed unused code from camera controls * Added back reset key * Fix missing newline at end of file in camera-controls.ts * Minor reorder * Fixed camera controls start position * Reduced smoothing to match old camera controls * Update playcanvas dependency to version 2.9.0-beta.1 * LInt fix * Update playcanvas dependency to version 2.10.3 * feat: updated control scheme to dynamically switch fly and orbit * fix: removed focus controller (not used) and pose reset (no change) * chore: update playcanvas dependency to version 2.10.5 * fix: removed touch sensitivity affecting panning on mobile * feat: integrate observer for dynamic camera mode switching * feat: add camera mode buttons with icons for fly and orbit modes * fix: restyled elements
1 parent 8de2c65 commit 1602d39

File tree

13 files changed

+444
-79
lines changed

13 files changed

+444
-79
lines changed

eslint.config.mjs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,17 @@ export default [
2525
...tsPlugin.configs['recommended'].rules,
2626
'@typescript-eslint/ban-ts-comment': 'off',
2727
'@typescript-eslint/no-explicit-any': 'off',
28-
'@typescript-eslint/no-unused-vars': 'off'
28+
'@typescript-eslint/no-unused-vars': 'off',
29+
'jsdoc/require-param-type': 'off',
30+
'jsdoc/require-returns-type': 'off',
31+
}
32+
},
33+
{
34+
files: ['**/*.js', '**/*.mjs'],
35+
languageOptions: {
36+
globals: {
37+
...globals.browser
38+
}
2939
}
3040
}
3141
];

package-lock.json

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"eslint": "^9.29.0",
4343
"eslint-import-resolver-typescript": "^4.4.3",
4444
"globals": "^16.2.0",
45-
"playcanvas": "^2.8.2",
45+
"playcanvas": "2.10.5",
4646
"qrious": "^4.0.2",
4747
"react": "^18.3.1",
4848
"react-dom": "^18.3.1",

rollup.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ export default {
7474
image({ dom: true }),
7575
alias({
7676
entries: {
77-
'playcanvas/scripts': path.resolve(ENGINE_DIR, 'scripts'),
7877
'playcanvas': ENGINE_PATH,
7978
'@playcanvas/pcui': PCUI_DIR
8079
}

0 commit comments

Comments
 (0)