f844b6d22e
* Added model-viewer's orbit camera control implementation. All the features from the old orbit controls are now functional with the new one * Figured out the relation between radius and fov. Added zoom decelariting when getting closer to origin. This feature was present in the old controller but lacking in this one * WIP * Added infinite zooming * First version of infinite zoom and zoom to cursor * A few improvements on zoom to cursor. Inifite zoom and zoom to cursor now work together. Simplified the implementation * Added orthographic camera functionality in the controller without hte special features * Zoom to cursor now works with orthographic projections. Switching between perspective and orthographic while keeping all functionality correct now works * Minor cleanup a ton more to come * Added controls dampening in the sandbox * Adapted frontend to the new controller plus some additional changes to the controller options in general * Implemented setting inline and polar viewers. However mosts of the time spent was dedicated into understanding why the frontend checks for changes in the camera each frame, and if it finds one forces the camera viewer to the inline one. I haven't figured out why it's doing this and it seems very wasteful. There probably is a better way of achieving the same thing * Orbit Controller now computes it;s cartesian value based on spherical in a function so it can be used in multiple places. Replaced getting the current camera position with the target camera position in frontend frame update callback as the old camera controller did * Follow mode now works properly * Sandbox fix * Disabled debug spheres * WIP on fly controls * Correct basis transformations for fly controls * Added QE up/down movement to fly controls * Minimum radius is now dynamic and accounts for scene size * Fixed an issue with zooming to cursor when infinetely zooming * Fixed inconsistencies between zooming normally and infinetely for both zooming to cursors and otherwise * Further fixing zooming to cursor when infinetely zooming * Zoom radius modulation * Fine tuning zooming radius and wheel modulation. I think I got to some defaults that seem good enough for all scene scales. * Defaulted to 30ms decau time for dampers * Added a 'tasOnly' argument in all 'intersect' variants. This will only intersect the TAS(es) and provide an intersection result. When requesting an intersection with 'firstOnly' set, onyl the first intersected TAS will be queried further and it's first intersected BAS will provide the intersection result. Conditioned zooming to cursors by needing to have any geometry under the cursor; Fixed some small issues with functions in the acceleration structures. * Restricted intersecting onyl when zooming * Geometry intersection when zooming does not affect infinetely zoom anymore, only zoom to cursor * Temporary disabled firstHitOnly * raycastFirst now works correctly in the context of tasOnly param true or false * Added dampers to the fly controls so we have consistency across various camera controller types. * Added statinary function * WIP on controls * Debuging orbit controller issues on ipad * More consolidation work on the interface for SpeckleControl and our current implementations for it * Added controller toggle-ing * Making the controllers work from immediate data * There are no more spaces left I can transform from/to. Done them all. Works fine now essentially. Just need to clean stuff up * SpeckleControls now provide an 'up' vector, and basis transformation is computed that way rather than requirig a mat4 directly. Fixed two issues with event locking on orbit and fly * More cleanup, more fixes, more grind * Controllers now have consistency in the basis they provide the position and target into. As well as the fromPositionAndTarget function. It will always be in a basis where (0,1,0) is up. This is required because certain parts of three.js assume that basis * FlyController is now properly relative-itiez * Sorted out options for both controls. Dampening is now done via options * Small fixes for frontend integration * Fixed the issue with quaternions misaligning around PI * Added consistent orthographic resizing * Fixed camera focusing when in orthographic mode * Implemented disabling/enabling rotations with the new controls. Removed PolarView since it was never used. Canonical views WIP * Made the HybridCameraController with the simplest implementation possible that seamslessly combines both camera controls. This is for testing to get an idea about how it feels. Removed zoomToCursors when not on geometry. Increased regular zoom speed * Using constants since move speed is a modifier * lock fix * Removed HybridCameraController. Increased maximum zoom. Removed toggling camera controls with Space. New way to apply canonic views, this time a correct one
98 lines
2.5 KiB
JSON
98 lines
2.5 KiB
JSON
{
|
|
"name": "@speckle/viewer",
|
|
"version": "2.5.4",
|
|
"description": "A 3d viewer for Speckle, based on threejs.",
|
|
"homepage": "https://speckle.systems",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/specklesystems/speckle-server.git",
|
|
"directory": "packages/viewer"
|
|
},
|
|
"main": "dist/index.cjs",
|
|
"module": "dist/index.js",
|
|
"exports": {
|
|
".": {
|
|
"import": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"require": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.cjs"
|
|
}
|
|
},
|
|
"./dist/assets/*": "./dist/assets/*",
|
|
"./assets/*": "./dist/assets/*"
|
|
},
|
|
"types": "./dist/index.d.ts",
|
|
"sourceType": "module",
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"engines": {
|
|
"node": ">=18.0.0"
|
|
},
|
|
"scripts": {
|
|
"build": "NODE_ENV=production rollup --config",
|
|
"build:dev": "rollup --config",
|
|
"dev": "rollup --config --watch",
|
|
"prepack": "yarn build",
|
|
"lint:js": "eslint .",
|
|
"lint:tsc": "tsc --noEmit",
|
|
"lint": "yarn lint:js && yarn lint:tsc",
|
|
"lint:ci": "yarn lint:tsc",
|
|
"test": "vitest",
|
|
"test:ui": "vitest --ui",
|
|
"test:run": "vitest run"
|
|
},
|
|
"author": "AEC Systems",
|
|
"license": "Apache-2.0",
|
|
"keywords": [
|
|
"speckle",
|
|
"aec",
|
|
"3d",
|
|
"3d viewer",
|
|
"threejs"
|
|
],
|
|
"dependencies": {
|
|
"@speckle/objectloader": "workspace:^",
|
|
"@speckle/shared": "workspace:^",
|
|
"@types/flat": "^5.0.2",
|
|
"flat": "^5.0.2",
|
|
"js-logger": "1.6.1",
|
|
"lodash-es": "^4.17.21",
|
|
"string-to-color": "^2.2.2",
|
|
"three": "^0.140.0",
|
|
"three-mesh-bvh": "0.5.17",
|
|
"tree-model": "1.0.7",
|
|
"troika-three-text": "0.47.2",
|
|
"type-fest": "^4.15.0"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/core": "^7.18.2",
|
|
"@babel/eslint-parser": "^7.18.2",
|
|
"@babel/preset-env": "^7.20.2",
|
|
"@rollup/plugin-babel": "^5.3.1",
|
|
"@rollup/plugin-image": "^3.0.2",
|
|
"@types/babel__core": "^7.20.1",
|
|
"@types/lodash-es": "4.17.12",
|
|
"@types/three": "^0.136.0",
|
|
"@typescript-eslint/eslint-plugin": "^7.12.0",
|
|
"@typescript-eslint/parser": "^7.12.0",
|
|
"@vitest/ui": "^1.4.0",
|
|
"core-js": "^3.21.1",
|
|
"eslint": "^9.4.0",
|
|
"eslint-config-prettier": "^9.1.0",
|
|
"jsdom": "^24.0.0",
|
|
"prettier": "^2.5.1",
|
|
"regenerator-runtime": "^0.13.7",
|
|
"rollup": "^2.70.1",
|
|
"rollup-plugin-delete": "^2.0.0",
|
|
"rollup-plugin-terser": "^7.0.2",
|
|
"rollup-plugin-typescript2": "^0.31.2",
|
|
"typescript": "^4.5.4",
|
|
"vitest": "^1.4.0"
|
|
},
|
|
"gitHead": "5627e490f9a3ecadf19cc4686ad15f344d9ad2d3"
|
|
}
|