-
-
Notifications
You must be signed in to change notification settings - Fork 279
Open
Description
Describe the bug
This is good software, but I can't get it to work for me at all in a traditional text/javascript environment :(
To Reproduce
1: go to https://github.com/yomotsu/camera-controls
2: download zip
3: run 'npm run build', jump through the error fixing hoops (so far so good)
3a: run 'tsc' (comments to which were hard enough to find)
3a1: see this output appear:
root@eagle:/var/www/nicer.app-5.10.z/domains/said.by/NicerAppWebOS/3rd-party/3D/libs/three.js/camera-controls-dev/examples# tsc
../src/CameraControls.ts:1:25 - error TS7016: Could not find a declaration file for module '../../build/three.module.js'. '/var/www/nicer.app-5.10.z/nicer.app-3rd-party/3D/libs/three.js/build/three.module.js' implicitly has an 'any' type.
1 import * as _THREE from '../../build/three.module.js' with {type:"javascript"};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/CameraControls.ts:1:55 - error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1 import * as _THREE from '../../build/three.module.js' with {type:"javascript"};
~~~~~~~~~~~~~~~~~~~~~~~~
../src/CameraControls.ts:16:8 - error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.
16 } from './types.ts';
~~~~~~~~~~~~
../src/CameraControls.ts:20:8 - error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.
20 } from './constants.ts';
~~~~~~~~~~~~~~~~
../src/CameraControls.ts:31:8 - error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.
31 } from './utils/math-utils.ts';
~~~~~~~~~~~~~~~~~~~~~~~
../src/CameraControls.ts:32:45 - error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.
32 import { extractClientCoordFromEvent } from './utils/extractClientCoordFromEvent.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/CameraControls.ts:33:50 - error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.
33 import { notSupportedInOrthographicCamera } from './utils/notSupportedInOrthographicCamera.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/CameraControls.ts:34:43 - error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.
34 import { EventDispatcher, Listener } from './EventDispatcher.ts';
~~~~~~~~~~~~~~~~~~~~~~
../src/CameraControls.ts:3372:31 - error TS7006: Parameter 'object' implicitly has an 'any' type.
3372 object3d.traverseVisible( ( object ) => {
~~~~~~
../src/CameraControls.ts:3383:31 - error TS7006: Parameter 'object' implicitly has an 'any' type.
3383 object3d.traverseVisible( ( object ) => {
~~~~~~
../src/types.ts:1:30 - error TS2307: Cannot find module '/NicerAppWebOS/3rd-party/3D/libs/three.js/build/three.module.js' or its corresponding type declarations.
1 import type * as _THREE from '/NicerAppWebOS/3rd-party/3D/libs/three.js/build/three.module.js';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/utils/extractClientCoordFromEvent.ts:1:31 - error TS2307: Cannot find module '/NicerAppWebOS/3rd-party/3D/libs/three.js/build/three.module.js' or its corresponding type declarations.
1 import type * as _THREE from '/NicerAppWebOS/3rd-party/3D/libs/three.js/build/three.module.js';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/utils/math-utils.ts:1:30 - error TS2307: Cannot find module '/NicerAppWebOS/3rd-party/3D/libs/three.js/build/three.module.js' or its corresponding type declarations.
1 import type * as _THREE from '/NicerAppWebOS/3rd-party/3D/libs/three.js/build/three.module.js';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/utils/notSupportedInOrthographicCamera.ts:1:25 - error TS2307: Cannot find module '/NicerAppWebOS/3rd-party/3D/libs/three.js/build/three.module.js' or its corresponding type declarations.
1 import * as _THREE from '/NicerAppWebOS/3rd-party/3D/libs/three.js/build/three.module.js';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 14 errors in 5 files.
Errors Files
10 ../src/CameraControls.ts:1
1 ../src/types.ts:1
1 ../src/utils/extractClientCoordFromEvent.ts:1
1 ../src/utils/math-utils.ts:1
1 ../src/utils/notSupportedInOrthographicCamera.ts:1
root@eagle:/var/www/nicer.app-5.10.z/domains/said.by/NicerAppWebOS/3rd-party/3D/libs/three.js/camera-controls-dev/examples#
Code
Live example
No response
Expected behavior
For the thing to run out of the box ;-)
Screenshots or Video
No response
Device
No response
OS
No response
Browser
No response
Metadata
Metadata
Assignees
Labels
No labels