Repository: NASA-AMMOS/3DTilesRendererJS
Pull request #1217 (2025-07-11 23:57:32)

Reorganize file structure
Related to #1187 


Patch:
diff --git a/example/ellipsoid.js b/example/ellipsoid.js
index 9171351..661b127 100644
--- a/example/ellipsoid.js
+++ b/example/ellipsoid.js
@@ -1,5 +1,5 @@
-import { SphereHelper } from '../src/plugins/three/objects/SphereHelper.js';
-import { EllipsoidRegionHelper, EllipsoidRegionLineHelper } from '../src/plugins/three/objects/EllipsoidRegionHelper.js';
+import { SphereHelper } from '../src/three/plugins/objects/SphereHelper.js';
+import { EllipsoidRegionHelper, EllipsoidRegionLineHelper } from '../src/three/plugins/objects/EllipsoidRegionHelper.js';
 import {
 	Scene,
 	Group,
diff --git a/package.json b/package.json
index b8ba895..f7ba34a 100644
--- a/package.json
+++ b/package.json
@@ -23,10 +23,15 @@
   ],
   "exports": {
     ".": "./src/index.js",
-    "./core": "./src/core/index.js",
-    "./three": "./src/three/index.js",
+    "./plugins": "./src/plugins.js",
+
+    "./core": "./src/core/renderer/index.js",
+    "./three": "./src/three/renderer/index.js",
     "./r3f": "./src/r3f/index.jsx",
-    "./plugins": "./src/plugins/index.js",
+
+    "./core/plugins": "./src/core/plugins/index.js",
+    "./three/plugins": "./src/three/plugins/index.js",
+
     "./src/*": "./src/*"
   },
   "scripts": {
diff --git a/src/plugins/core/EnforceNonZeroErrorPlugin.d.ts b/src/core/plugins/EnforceNonZeroErrorPlugin.d.ts
similarity index 100%
rename from src/plugins/core/EnforceNonZeroErrorPlugin.d.ts
rename to src/core/plugins/EnforceNonZeroErrorPlugin.d.ts
diff --git a/src/plugins/core/EnforceNonZeroErrorPlugin.js b/src/core/plugins/EnforceNonZeroErrorPlugin.js
similarity index 100%
rename from src/plugins/core/EnforceNonZeroErrorPlugin.js
rename to src/core/plugins/EnforceNonZeroErrorPlugin.js
diff --git a/src/plugins/core/ImplicitTilingPlugin.d.ts b/src/core/plugins/ImplicitTilingPlugin.d.ts
similarity index 100%
rename from src/plugins/core/ImplicitTilingPlugin.d.ts
rename to src/core/plugins/ImplicitTilingPlugin.d.ts
diff --git a/src/plugins/core/ImplicitTilingPlugin.js b/src/core/plugins/ImplicitTilingPlugin.js
similarity index 100%
rename from src/plugins/core/ImplicitTilingPlugin.js
rename to src/core/plugins/ImplicitTilingPlugin.js
diff --git a/src/plugins/core/SUBTREELoader.js b/src/core/plugins/SUBTREELoader.js
similarity index 99%
rename from src/plugins/core/SUBTREELoader.js
rename to src/core/plugins/SUBTREELoader.js
index d41bf54..6a7aa3e 100644
--- a/src/plugins/core/SUBTREELoader.js
+++ b/src/core/plugins/SUBTREELoader.js
@@ -2,9 +2,9 @@
  * Structure almost identical to Cesium, also the comments and the names are kept
  * https://github.com/CesiumGS/cesium/blob/0a69f67b393ba194eefb7254600811c4b712ddc0/packages/engine/Source/Scene/Implicit3DTileContent.js
  */
-import { LoaderBase } from '../../core/loaders/LoaderBase.js';
-import { readMagicBytes } from '../../core/utilities/readMagicBytes.js';
-import { arrayToString } from '../../core/utilities/arrayToString.js';
+import { LoaderBase } from '../renderer/loaders/LoaderBase.js';
+import { readMagicBytes } from '../renderer/utilities/readMagicBytes.js';
+import { arrayToString } from '../renderer/utilities/arrayToString.js';
 
 function isOctreeSubdivision( tile ) {
 
diff --git a/src/plugins/core/auth/CesiumIonAuth.js b/src/core/plugins/auth/CesiumIonAuth.js
similarity index 100%
rename from src/plugins/core/auth/CesiumIonAuth.js
rename to src/core/plugins/auth/CesiumIonAuth.js
diff --git a/src/plugins/core/auth/GoogleCloudAuth.js b/src/core/plugins/auth/GoogleCloudAuth.js
similarity index 97%
rename from src/plugins/core/auth/GoogleCloudAuth.js
rename to src/core/plugins/auth/GoogleCloudAuth.js
index f196de0..9e26996 100644
--- a/src/plugins/core/auth/GoogleCloudAuth.js
+++ b/src/core/plugins/auth/GoogleCloudAuth.js
@@ -1,4 +1,4 @@
-import { traverseSet } from '../../../core/renderer/traverseFunctions.js';
+import { traverseSet } from '../../renderer/tiles/traverseFunctions.js';
 
 const TILES_MAP_URL = 'https://tile.googleapis.com/v1/createSession';
 
diff --git a/src/core/plugins/index.d.ts b/src/core/plugins/index.d.ts
new file mode 100644
index 0000000..90534f5
--- /dev/null
+++ b/src/core/plugins/index.d.ts
@@ -0,0 +1,2 @@
+export * from './ImplicitTilingPlugin.js';
+export * from './EnforceNonZeroErrorPlugin.js';
diff --git a/src/core/plugins/index.js b/src/core/plugins/index.js
new file mode 100644
index 0000000..90534f5
--- /dev/null
+++ b/src/core/plugins/index.js
@@ -0,0 +1,2 @@
+export * from './ImplicitTilingPlugin.js';
+export * from './EnforceNonZeroErrorPlugin.js';
diff --git a/src/plugins/core/loaders/QuantizedMeshLoaderBase.js b/src/core/plugins/loaders/QuantizedMeshLoaderBase.js
similarity index 98%
rename from src/plugins/core/loaders/QuantizedMeshLoaderBase.js
rename to src/core/plugins/loaders/QuantizedMeshLoaderBase.js
index 84b6518..dcfab1e 100644
--- a/src/plugins/core/loaders/QuantizedMeshLoaderBase.js
+++ b/src/core/plugins/loaders/QuantizedMeshLoaderBase.js
@@ -1,4 +1,4 @@
-import { LoaderBase } from '../../../core/loaders/LoaderBase.js';
+import { LoaderBase } from '../../renderer/loaders/LoaderBase.js';
 
 export function zigZagDecode( value ) {
 
diff --git a/src/core/constants.d.ts b/src/core/renderer/constants.d.ts
similarity index 100%
rename from src/core/constants.d.ts
rename to src/core/renderer/constants.d.ts
diff --git a/src/core/constants.js b/src/core/renderer/constants.js
similarity index 100%
rename from src/core/constants.js
rename to src/core/renderer/constants.js
diff --git a/src/core/index.d.ts b/src/core/renderer/index.d.ts
similarity index 73%
rename from src/core/index.d.ts
rename to src/core/renderer/index.d.ts
index 8e8808e..11230b0 100644
--- a/src/core/index.d.ts
+++ b/src/core/renderer/index.d.ts
@@ -1,8 +1,8 @@
 // common
-export { TilesRendererBase } from './renderer/TilesRendererBase.js';
-export { Tile } from './renderer/Tile.js';
-export { TileBase } from './renderer/TileBase.js';
-export { Tileset } from './renderer/Tileset.js';
+export { TilesRendererBase } from './tiles/TilesRendererBase.js';
+export { Tile } from './tiles/Tile.js';
+export { TileBase } from './tiles/TileBase.js';
+export { Tileset } from './tiles/Tileset.js';
 export { B3DMLoaderBase } from './loaders/B3DMLoaderBase.js';
 export { I3DMLoaderBase } from './loaders/I3DMLoaderBase.js';
 export { PNTSLoaderBase } from './loaders/PNTSLoaderBase.js';
diff --git a/src/core/index.js b/src/core/renderer/index.js
similarity index 86%
rename from src/core/index.js
rename to src/core/renderer/index.js
index 42f2852..5823503 100644
--- a/src/core/index.js
+++ b/src/core/renderer/index.js
@@ -1,5 +1,5 @@
 // common
-export { TilesRendererBase } from './renderer/TilesRendererBase.js';
+export { TilesRendererBase } from './tiles/TilesRendererBase.js';
 export { LoaderBase } from './loaders/LoaderBase.js';
 export { B3DMLoaderBase } from './loaders/B3DMLoaderBase.js';
 export { I3DMLoaderBase } from './loaders/I3DMLoaderBase.js';
diff --git a/src/core/loaders/B3DMLoaderBase.d.ts b/src/core/renderer/loaders/B3DMLoaderBase.d.ts
similarity index 100%
rename from src/core/loaders/B3DMLoaderBase.d.ts
rename to src/core/renderer/loaders/B3DMLoaderBase.d.ts
diff --git a/src/core/loaders/B3DMLoaderBase.js b/src/core/renderer/loaders/B3DMLoaderBase.js
similarity index 100%
rename from src/core/loaders/B3DMLoaderBase.js
rename to src/core/renderer/loaders/B3DMLoaderBase.js
diff --git a/src/core/loaders/CMPTLoaderBase.d.ts b/src/core/renderer/loaders/CMPTLoaderBase.d.ts
similarity index 100%
rename from src/core/loaders/CMPTLoaderBase.d.ts
rename to src/core/renderer/loaders/CMPTLoaderBase.d.ts
diff --git a/src/core/loaders/CMPTLoaderBase.js b/src/core/renderer/loaders/CMPTLoaderBase.js
similarity index 100%
rename from src/core/loaders/CMPTLoaderBase.js
rename to src/core/renderer/loaders/CMPTLoaderBase.js
diff --git a/src/core/loaders/I3DMLoaderBase.d.ts b/src/core/renderer/loaders/I3DMLoaderBase.d.ts
similarity index 100%
rename from src/core/loaders/I3DMLoaderBase.d.ts
rename to src/core/renderer/loaders/I3DMLoaderBase.d.ts
diff --git a/src/core/loaders/I3DMLoaderBase.js b/src/core/renderer/loaders/I3DMLoaderBase.js
similarity index 100%
rename from src/core/loaders/I3DMLoaderBase.js
rename to src/core/renderer/loaders/I3DMLoaderBase.js
diff --git a/src/core/loaders/LoaderBase.d.ts b/src/core/renderer/loaders/LoaderBase.d.ts
similarity index 100%
rename from src/core/loaders/LoaderBase.d.ts
rename to src/core/renderer/loaders/LoaderBase.d.ts
diff --git a/src/core/loaders/LoaderBase.js b/src/core/renderer/loaders/LoaderBase.js
similarity index 100%
rename from src/core/loaders/LoaderBase.js
rename to src/core/renderer/loaders/LoaderBase.js
diff --git a/src/core/loaders/PNTSLoaderBase.d.ts b/src/core/renderer/loaders/PNTSLoaderBase.d.ts
similarity index 100%
rename from src/core/loaders/PNTSLoaderBase.d.ts
rename to src/core/renderer/loaders/PNTSLoaderBase.d.ts
diff --git a/src/core/loaders/PNTSLoaderBase.js b/src/core/renderer/loaders/PNTSLoaderBase.js
similarity index 100%
rename from src/core/loaders/PNTSLoaderBase.js
rename to src/core/renderer/loaders/PNTSLoaderBase.js
diff --git a/src/core/renderer/Tile.d.ts b/src/core/renderer/tiles/Tile.d.ts
similarity index 100%
rename from src/core/renderer/Tile.d.ts
rename to src/core/renderer/tiles/Tile.d.ts
diff --git a/src/core/renderer/TileBase.d.ts b/src/core/renderer/tiles/TileBase.d.ts
similarity index 100%
rename from src/core/renderer/TileBase.d.ts
rename to src/core/renderer/tiles/TileBase.d.ts
diff --git a/src/core/renderer/TileInternal.d.ts b/src/core/renderer/tiles/TileInternal.d.ts
similarity index 100%
rename from src/core/renderer/TileInternal.d.ts
rename to src/core/renderer/tiles/TileInternal.d.ts
diff --git a/src/core/renderer/TilesRendererBase.d.ts b/src/core/renderer/tiles/TilesRendererBase.d.ts
similarity index 100%
rename from src/core/renderer/TilesRendererBase.d.ts
rename to src/core/renderer/tiles/TilesRendererBase.d.ts
diff --git a/src/core/renderer/TilesRendererBase.js b/src/core/renderer/tiles/TilesRendererBase.js
similarity index 100%
rename from src/core/renderer/TilesRendererBase.js
rename to src/core/renderer/tiles/TilesRendererBase.js
diff --git a/src/core/renderer/Tileset.d.ts b/src/core/renderer/tiles/Tileset.d.ts
similarity index 100%
rename from src/core/renderer/Tileset.d.ts
rename to src/core/renderer/tiles/Tileset.d.ts
diff --git a/src/core/renderer/traverseFunctions.js b/src/core/renderer/tiles/traverseFunctions.js
similarity index 100%
rename from src/core/renderer/traverseFunctions.js
rename to src/core/renderer/tiles/traverseFunctions.js
diff --git a/src/core/utilities/BatchTable.d.ts b/src/core/renderer/utilities/BatchTable.d.ts
similarity index 100%
rename from src/core/utilities/BatchTable.d.ts
rename to src/core/renderer/utilities/BatchTable.d.ts
diff --git a/src/core/utilities/BatchTable.js b/src/core/renderer/utilities/BatchTable.js
similarity index 100%
rename from src/core/utilities/BatchTable.js
rename to src/core/renderer/utilities/BatchTable.js
diff --git a/src/core/utilities/BatchTableHierarchyExtension.js b/src/core/renderer/utilities/BatchTableHierarchyExtension.js
similarity index 100%
rename from src/core/utilities/BatchTableHierarchyExtension.js
rename to src/core/renderer/utilities/BatchTableHierarchyExtension.js
diff --git a/src/core/utilities/FeatureTable.d.ts b/src/core/renderer/utilities/FeatureTable.d.ts
similarity index 100%
rename from src/core/utilities/FeatureTable.d.ts
rename to src/core/renderer/utilities/FeatureTable.d.ts
diff --git a/src/core/utilities/FeatureTable.js b/src/core/renderer/utilities/FeatureTable.js
similarity index 100%
rename from src/core/utilities/FeatureTable.js
rename to src/core/renderer/utilities/FeatureTable.js
diff --git a/src/core/utilities/LRUCache.d.ts b/src/core/renderer/utilities/LRUCache.d.ts
similarity index 100%
rename from src/core/utilities/LRUCache.d.ts
rename to src/core/renderer/utilities/LRUCache.d.ts
diff --git a/src/core/utilities/LRUCache.js b/src/core/renderer/utilities/LRUCache.js
similarity index 100%
rename from src/core/utilities/LRUCache.js
rename to src/core/renderer/utilities/LRUCache.js
diff --git a/src/core/utilities/PriorityQueue.d.ts b/src/core/renderer/utilities/PriorityQueue.d.ts
similarity index 100%
rename from src/core/utilities/PriorityQueue.d.ts
rename to src/core/renderer/utilities/PriorityQueue.d.ts
diff --git a/src/core/utilities/PriorityQueue.js b/src/core/renderer/utilities/PriorityQueue.js
similarity index 100%
rename from src/core/utilities/PriorityQueue.js
rename to src/core/renderer/utilities/PriorityQueue.js
diff --git a/src/core/utilities/arrayToString.js b/src/core/renderer/utilities/arrayToString.js
similarity index 100%
rename from src/core/utilities/arrayToString.js
rename to src/core/renderer/utilities/arrayToString.js
diff --git a/src/core/utilities/decodeOctNormal.js b/src/core/renderer/utilities/decodeOctNormal.js
similarity index 100%
rename from src/core/utilities/decodeOctNormal.js
rename to src/core/renderer/utilities/decodeOctNormal.js
diff --git a/src/core/utilities/readMagicBytes.js b/src/core/renderer/utilities/readMagicBytes.js
similarity index 100%
rename from src/core/utilities/readMagicBytes.js
rename to src/core/renderer/utilities/readMagicBytes.js
diff --git a/src/core/utilities/rgb565torgb.js b/src/core/renderer/utilities/rgb565torgb.js
similarity index 100%
rename from src/core/utilities/rgb565torgb.js
rename to src/core/renderer/utilities/rgb565torgb.js
diff --git a/src/core/utilities/throttle.js b/src/core/renderer/utilities/throttle.js
similarity index 100%
rename from src/core/utilities/throttle.js
rename to src/core/renderer/utilities/throttle.js
diff --git a/src/core/utilities/urlExtension.js b/src/core/renderer/utilities/urlExtension.js
similarity index 100%
rename from src/core/utilities/urlExtension.js
rename to src/core/renderer/utilities/urlExtension.js
diff --git a/src/index.d.ts b/src/index.d.ts
index 07852ec..5abdc02 100644
--- a/src/index.d.ts
+++ b/src/index.d.ts
@@ -1,5 +1,5 @@
 // core
-export * from './core/index.js';
+export * from './core/renderer/index.js';
 
 // three
-export * from './three/index.js';
+export * from './three/renderer/index.js';
diff --git a/src/index.js b/src/index.js
index 07852ec..5abdc02 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,5 +1,5 @@
 // core
-export * from './core/index.js';
+export * from './core/renderer/index.js';
 
 // three
-export * from './three/index.js';
+export * from './three/renderer/index.js';
diff --git a/src/plugins.d.ts b/src/plugins.d.ts
new file mode 100644
index 0000000..1ace2f3
--- /dev/null
+++ b/src/plugins.d.ts
@@ -0,0 +1,5 @@
+// core
+export * from './core/plugins/index.js';
+
+// three
+export * from './three/plugins/index.js';
diff --git a/src/plugins.js b/src/plugins.js
new file mode 100644
index 0000000..1ace2f3
--- /dev/null
+++ b/src/plugins.js
@@ -0,0 +1,5 @@
+// core
+export * from './core/plugins/index.js';
+
+// three
+export * from './three/plugins/index.js';
diff --git a/src/plugins/index.d.ts b/src/plugins/index.d.ts
deleted file mode 100644
index 1959de4..0000000
--- a/src/plugins/index.d.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-// three.js plugins
-export { CesiumIonAuthPlugin } from './three/CesiumIonAuthPlugin.js';
-export { GoogleCloudAuthPlugin } from './three/GoogleCloudAuthPlugin.js';
-export { UpdateOnChangePlugin } from './three/UpdateOnChangePlugin.js';
-export { TileCompressionPlugin } from './three/TileCompressionPlugin.js';
-export { GLTFExtensionsPlugin } from './three/GLTFExtensionsPlugin.js';
-export { ReorientationPlugin } from './three/ReorientationPlugin.js';
-export { UnloadTilesPlugin } from './three/UnloadTilesPlugin.js';
-export { TilesFadePlugin } from './three/fade/TilesFadePlugin.js';
-export { BatchedTilesPlugin } from './three/batched/BatchedTilesPlugin.js';
-export { TileFlatteningPlugin } from './three/TileFlatteningPlugin.js';
-export { QuantizedMeshPlugin } from './three/QuantizedMeshPlugin.js';
-export * from './three/images/ImageOverlayPlugin.js';
-export * from './three/LoadRegionPlugin.js';
-export * from './three/DebugTilesPlugin.js';
-
-// other formats
-export * from './three/images/DeepZoomImagePlugin.js';
-export * from './three/images/EPSGTilesPlugin.js';
-
-// common plugins
-export { ImplicitTilingPlugin } from './core/ImplicitTilingPlugin.js';
-
-// gltf extensions
-export { GLTFCesiumRTCExtension } from './three/gltf/GLTFCesiumRTCExtension.js';
-export { GLTFStructuralMetadataExtension } from './three/gltf/GLTFStructuralMetadataExtension.js';
-export { GLTFMeshFeaturesExtension } from './three/gltf/GLTFMeshFeaturesExtension.js';
diff --git a/src/plugins/index.js b/src/plugins/index.js
deleted file mode 100644
index f723cae..0000000
--- a/src/plugins/index.js
+++ /dev/null
@@ -1,28 +0,0 @@
-// three.js plugins
-export { CesiumIonAuthPlugin } from './three/CesiumIonAuthPlugin.js';
-export { GoogleCloudAuthPlugin } from './three/GoogleCloudAuthPlugin.js';
-export { UpdateOnChangePlugin } from './three/UpdateOnChangePlugin.js';
-export { TileCompressionPlugin } from './three/TileCompressionPlugin.js';
-export { GLTFExtensionsPlugin } from './three/GLTFExtensionsPlugin.js';
-export { ReorientationPlugin } from './three/ReorientationPlugin.js';
-export { UnloadTilesPlugin } from './three/UnloadTilesPlugin.js';
-export { TilesFadePlugin } from './three/fade/TilesFadePlugin.js';
-export { BatchedTilesPlugin } from './three/batched/BatchedTilesPlugin.js';
-export { TileFlatteningPlugin } from './three/TileFlatteningPlugin.js';
-export { QuantizedMeshPlugin } from './three/QuantizedMeshPlugin.js';
-export * from './three/images/ImageOverlayPlugin.js';
-export * from './three/LoadRegionPlugin.js';
-export * from './three/DebugTilesPlugin.js';
-
-// other formats
-export * from './three/images/DeepZoomImagePlugin.js';
-export * from './three/images/EPSGTilesPlugin.js';
-
-// common plugins
-export { ImplicitTilingPlugin } from './core/ImplicitTilingPlugin.js';
-export { EnforceNonZeroErrorPlugin } from './core/EnforceNonZeroErrorPlugin.js';
-
-// gltf extensions
-export { GLTFCesiumRTCExtension } from './three/gltf/GLTFCesiumRTCExtension.js';
-export { GLTFStructuralMetadataExtension } from './three/gltf/GLTFStructuralMetadataExtension.js';
-export { GLTFMeshFeaturesExtension } from './three/gltf/GLTFMeshFeaturesExtension.js';
diff --git a/src/r3f/components/CameraControls.d.ts b/src/r3f/components/CameraControls.d.ts
index d0b4ea7..dd05e42 100644
--- a/src/r3f/components/CameraControls.d.ts
+++ b/src/r3f/components/CameraControls.d.ts
@@ -1,7 +1,7 @@
 import type { ForwardRefExoticComponent, RefAttributes } from 'react';
 import type { Camera, Object3D } from 'three';
-import type { EnvironmentControls as EnvironmentControlsImpl } from '../../three/controls/EnvironmentControls.js';
-import type { GlobeControls as GlobeControlsImpl } from '../../three/controls/GlobeControls.js';
+import type { EnvironmentControls as EnvironmentControlsImpl } from '../../three/renderer/controls/EnvironmentControls.js';
+import type { GlobeControls as GlobeControlsImpl } from '../../three/renderer/controls/GlobeControls.js';
 import type { TilesRenderer } from './TilesRenderer.jsx';
 
 interface ControlsBaseProps {
diff --git a/src/r3f/components/CameraControls.jsx b/src/r3f/components/CameraControls.jsx
index 419ece8..0dad02f 100644
--- a/src/r3f/components/CameraControls.jsx
+++ b/src/r3f/components/CameraControls.jsx
@@ -1,7 +1,7 @@
 import { forwardRef, useMemo, useEffect, useContext } from 'react';
 import { useThree, useFrame } from '@react-three/fiber';
-import { EnvironmentControls as EnvironmentControlsImpl } from '../../three/controls/EnvironmentControls.js';
-import { GlobeControls as GlobeControlsImpl } from '../../three/controls/GlobeControls.js';
+import { EnvironmentControls as EnvironmentControlsImpl } from '../../three/renderer/controls/EnvironmentControls.js';
+import { GlobeControls as GlobeControlsImpl } from '../../three/renderer/controls/GlobeControls.js';
 import { useShallowOptions } from '../utilities/useOptions.js';
 import { TilesRendererContext } from './TilesRenderer.jsx';
 import { useApplyRefs } from '../utilities/useApplyRefs.js';
diff --git a/src/r3f/components/CameraTransition.d.ts b/src/r3f/components/CameraTransition.d.ts
index 41fbb1f..0a3017a 100644
--- a/src/r3f/components/CameraTransition.d.ts
+++ b/src/r3f/components/CameraTransition.d.ts
@@ -1,5 +1,5 @@
 import { Camera } from 'three';
-import { CameraTransitionManager } from '../../three/controls/CameraTransitionManager.js';
+import { CameraTransitionManager } from '../../three/renderer/controls/CameraTransitionManager.js';
 
 interface CameraTransitionProps {
     mode?: 'perspective' | 'orthographic';
diff --git a/src/r3f/components/CameraTransition.jsx b/src/r3f/components/CameraTransition.jsx
index 32cee08..a76a5fc 100644
--- a/src/r3f/components/CameraTransition.jsx
+++ b/src/r3f/components/CameraTransition.jsx
@@ -1,6 +1,6 @@
 import { forwardRef, useEffect, useMemo } from 'react';
 import { useFrame, useThree } from '@react-three/fiber';
-import { CameraTransitionManager } from '../../three/controls/CameraTransitionManager.js';
+import { CameraTransitionManager } from '../../three/renderer/controls/CameraTransitionManager.js';
 import { useDeepOptions } from '../utilities/useOptions.js';
 import { useApplyRefs } from '../utilities/useApplyRefs.js';
 
diff --git a/src/r3f/components/CompassGizmo.jsx b/src/r3f/components/CompassGizmo.jsx
index 78ef85f..b69bdc6 100644
--- a/src/r3f/components/CompassGizmo.jsx
+++ b/src/r3f/components/CompassGizmo.jsx
@@ -2,7 +2,7 @@ import { createPortal, useFrame, useThree } from '@react-three/fiber';
 import { useContext, useEffect, useMemo, useRef, useState } from 'react';
 import { BackSide, Matrix4, OrthographicCamera, Ray, Scene, Vector3 } from 'three';
 import { TilesRendererContext } from './TilesRenderer';
-import { closestRayEllipsoidSurfacePointEstimate } from '../../three/controls/utils';
+import { closestRayEllipsoidSurfacePointEstimate } from '../../three/renderer/controls/utils';
 
 // Based in part on @pmndrs/drei's Gizmo component
 
diff --git a/src/r3f/components/SettledObjects.jsx b/src/r3f/components/SettledObjects.jsx
index 34fdefa..8a20940 100644
--- a/src/r3f/components/SettledObjects.jsx
+++ b/src/r3f/components/SettledObjects.jsx
@@ -3,7 +3,7 @@ import { useMultipleRefs } from '../utilities/useMultipleRefs.js';
 import { TilesRendererContext } from './TilesRenderer.jsx';
 import { QueryManager } from '../utilities/QueryManager.js';
 import { useDeepOptions } from '../utilities/useOptions.js';
-import { OBJECT_FRAME } from '../../three/math/Ellipsoid.js';
+import { OBJECT_FRAME } from '../../three/renderer/math/Ellipsoid.js';
 import { Matrix4, Ray, Vector3 } from 'three';
 import { useFrame, useThree } from '@react-three/fiber';
 import { useApplyRefs } from '../utilities/useApplyRefs.js';
diff --git a/src/r3f/components/TilesRenderer.d.ts b/src/r3f/components/TilesRenderer.d.ts
index b44c751..7d2d97c 100644
--- a/src/r3f/components/TilesRenderer.d.ts
+++ b/src/r3f/components/TilesRenderer.d.ts
@@ -1,4 +1,4 @@
-import type { TilesRenderer as TilesRendererImpl, TilesRendererEventMap } from '../../three/renderer/TilesRenderer.js';
+import type { TilesRenderer as TilesRendererImpl, TilesRendererEventMap } from '../../three/renderer/tiles/TilesRenderer.js';
 import type {
 	ReactNode,
 	Context,
diff --git a/src/r3f/components/TilesRenderer.jsx b/src/r3f/components/TilesRenderer.jsx
index 4a81a7d..174ae7e 100644
--- a/src/r3f/components/TilesRenderer.jsx
+++ b/src/r3f/components/TilesRenderer.jsx
@@ -1,11 +1,11 @@
 import { createContext, useContext, useEffect, useRef, forwardRef, useMemo, useCallback, useState, useLayoutEffect } from 'react';
 import { useThree, useFrame } from '@react-three/fiber';
 import { Object3D } from 'three';
-import { TilesRenderer as TilesRendererImpl } from '../../three/renderer/TilesRenderer.js';
+import { TilesRenderer as TilesRendererImpl } from '../../three/renderer/tiles/TilesRenderer.js';
 import { useDeepOptions } from '../utilities/useOptions.js';
 import { useObjectDep } from '../utilities/useObjectDep.js';
 import { useApplyRefs } from '../utilities/useApplyRefs.js';
-import { WGS84_ELLIPSOID } from '../../three/math/GeoConstants.js';
+import { WGS84_ELLIPSOID } from '../../three/renderer/math/GeoConstants.js';
 
 // context for accessing the tile set
 export const TilesRendererContext = createContext( null );
diff --git a/src/r3f/utilities/QueryManager.js b/src/r3f/utilities/QueryManager.js
index 853a57b..61712fa 100644
--- a/src/r3f/utilities/QueryManager.js
+++ b/src/r3f/utilities/QueryManager.js
@@ -8,7 +8,7 @@ import {
 	Vector2,
 } from 'three';
 import { SceneObserver } from './SceneObserver.js';
-import { Ellipsoid } from '../../three/math/Ellipsoid.js';
+import { Ellipsoid } from '../../three/renderer/math/Ellipsoid.js';
 
 const _raycaster = /* @__PURE__ */ new Raycaster();
 const _line0 = /* @__PURE__ */ new Line3();
diff --git a/src/plugins/three/CesiumIonAuthPlugin.d.ts b/src/three/plugins/CesiumIonAuthPlugin.d.ts
similarity index 100%
rename from src/plugins/three/CesiumIonAuthPlugin.d.ts
rename to src/three/plugins/CesiumIonAuthPlugin.d.ts
diff --git a/src/plugins/three/CesiumIonAuthPlugin.js b/src/three/plugins/CesiumIonAuthPlugin.js
similarity index 98%
rename from src/plugins/three/CesiumIonAuthPlugin.js
rename to src/three/plugins/CesiumIonAuthPlugin.js
index 1aef1bb..56fb3ec 100644
--- a/src/plugins/three/CesiumIonAuthPlugin.js
+++ b/src/three/plugins/CesiumIonAuthPlugin.js
@@ -1,4 +1,4 @@
-import { CesiumIonAuth } from '../core/auth/CesiumIonAuth.js';
+import { CesiumIonAuth } from '../../core/plugins/auth/CesiumIonAuth.js';
 import { GoogleCloudAuthPlugin } from './GoogleCloudAuthPlugin.js';
 import { TMSTilesPlugin } from './images/EPSGTilesPlugin.js';
 import { QuantizedMeshPlugin } from './QuantizedMeshPlugin.js';
diff --git a/src/plugins/three/DebugTilesPlugin.d.ts b/src/three/plugins/DebugTilesPlugin.d.ts
similarity index 95%
rename from src/plugins/three/DebugTilesPlugin.d.ts
rename to src/three/plugins/DebugTilesPlugin.d.ts
index 2ff0842..fd6b33b 100644
--- a/src/plugins/three/DebugTilesPlugin.d.ts
+++ b/src/three/plugins/DebugTilesPlugin.d.ts
@@ -1,4 +1,4 @@
-import { Tile } from '../../core/renderer/Tile.js';
+import { Tile } from '../../core/renderer/tiles/Tile.js';
 import { Color } from 'three';
 
 export enum ColorMode {}
diff --git a/src/plugins/three/DebugTilesPlugin.js b/src/three/plugins/DebugTilesPlugin.js
similarity index 99%
rename from src/plugins/three/DebugTilesPlugin.js
rename to src/three/plugins/DebugTilesPlugin.js
index d520e26..01053dd 100644
--- a/src/plugins/three/DebugTilesPlugin.js
+++ b/src/three/plugins/DebugTilesPlugin.js
@@ -1,7 +1,7 @@
 import { Box3Helper, Group, MeshStandardMaterial, PointsMaterial, Sphere, Color, MeshBasicMaterial } from 'three';
 import { SphereHelper } from './objects/SphereHelper.js';
 import { EllipsoidRegionLineHelper } from './objects/EllipsoidRegionHelper.js';
-import { traverseAncestors, traverseSet } from '../../core/renderer/traverseFunctions.js';
+import { traverseAncestors, traverseSet } from '../../core/renderer/tiles/traverseFunctions.js';
 
 const ORIGINAL_MATERIAL = Symbol( 'ORIGINAL_MATERIAL' );
 const HAS_RANDOM_COLOR = Symbol( 'HAS_RANDOM_COLOR' );
diff --git a/src/plugins/three/GLTFExtensionsPlugin.d.ts b/src/three/plugins/GLTFExtensionsPlugin.d.ts
similarity index 100%
rename from src/plugins/three/GLTFExtensionsPlugin.d.ts
rename to src/three/plugins/GLTFExtensionsPlugin.d.ts
diff --git a/src/plugins/three/GLTFExtensionsPlugin.js b/src/three/plugins/GLTFExtensionsPlugin.js
similarity index 100%
rename from src/plugins/three/GLTFExtensionsPlugin.js
rename to src/three/plugins/GLTFExtensionsPlugin.js
diff --git a/src/plugins/three/GoogleAttributionsManager.js b/src/three/plugins/GoogleAttributionsManager.js
similarity index 100%
rename from src/plugins/three/GoogleAttributionsManager.js
rename to src/three/plugins/GoogleAttributionsManager.js
diff --git a/src/plugins/three/GoogleCloudAuthPlugin.d.ts b/src/three/plugins/GoogleCloudAuthPlugin.d.ts
similarity index 100%
rename from src/plugins/three/GoogleCloudAuthPlugin.d.ts
rename to src/three/plugins/GoogleCloudAuthPlugin.d.ts
diff --git a/src/plugins/three/GoogleCloudAuthPlugin.js b/src/three/plugins/GoogleCloudAuthPlugin.js
similarity index 96%
rename from src/plugins/three/GoogleCloudAuthPlugin.js
rename to src/three/plugins/GoogleCloudAuthPlugin.js
index f3acee5..222541b 100644
--- a/src/plugins/three/GoogleCloudAuthPlugin.js
+++ b/src/three/plugins/GoogleCloudAuthPlugin.js
@@ -1,4 +1,4 @@
-import { GoogleCloudAuth } from '../core/auth/GoogleCloudAuth.js';
+import { GoogleCloudAuth } from '../../core/plugins/auth/GoogleCloudAuth.js';
 import { GoogleAttributionsManager } from './GoogleAttributionsManager.js';
 
 const TILES_3D_API = 'https://tile.googleapis.com/v1/3dtiles/root.json';
diff --git a/src/plugins/three/LoadRegionPlugin.d.ts b/src/three/plugins/LoadRegionPlugin.d.ts
similarity index 74%
rename from src/plugins/three/LoadRegionPlugin.d.ts
rename to src/three/plugins/LoadRegionPlugin.d.ts
index 01b5556..3e774ca 100644
--- a/src/plugins/three/LoadRegionPlugin.d.ts
+++ b/src/three/plugins/LoadRegionPlugin.d.ts
@@ -1,7 +1,7 @@
-import { TileBoundingVolume } from '../../three/math/TileBoundingVolume.js';
-import { Tile } from '../../core/renderer/Tile.js';
-import { TilesRenderer } from '../../three/renderer/TilesRenderer.js';
-import { OBB } from '../../three/math/OBB.js';
+import { TileBoundingVolume } from '../../three/renderer/math/TileBoundingVolume.js';
+import { Tile } from '../../core/renderer/tiles/Tile.js';
+import { TilesRenderer } from '../../three/renderer/tiles/TilesRenderer.js';
+import { OBB } from '../../three/renderer/math/OBB.js';
 import { Sphere, Ray } from 'three';
 
 declare class BaseRegion {
diff --git a/src/plugins/three/LoadRegionPlugin.js b/src/three/plugins/LoadRegionPlugin.js
similarity index 97%
rename from src/plugins/three/LoadRegionPlugin.js
rename to src/three/plugins/LoadRegionPlugin.js
index 935b484..b108011 100644
--- a/src/plugins/three/LoadRegionPlugin.js
+++ b/src/three/plugins/LoadRegionPlugin.js
@@ -1,5 +1,5 @@
 import { Ray, Sphere } from 'three';
-import { OBB } from '../../three/math/OBB.js';
+import { OBB } from '../../three/renderer/math/OBB.js';
 
 export class LoadRegionPlugin {
 
diff --git a/src/plugins/three/QuantizedMeshPlugin.d.ts b/src/three/plugins/QuantizedMeshPlugin.d.ts
similarity index 100%
rename from src/plugins/three/QuantizedMeshPlugin.d.ts
rename to src/three/plugins/QuantizedMeshPlugin.d.ts
diff --git a/src/plugins/three/QuantizedMeshPlugin.js b/src/three/plugins/QuantizedMeshPlugin.js
similarity index 100%
rename from src/plugins/three/QuantizedMeshPlugin.js
rename to src/three/plugins/QuantizedMeshPlugin.js
diff --git a/src/plugins/README.md b/src/three/plugins/README.md
similarity index 100%
rename from src/plugins/README.md
rename to src/three/plugins/README.md
diff --git a/src/plugins/three/ReorientationPlugin.d.ts b/src/three/plugins/ReorientationPlugin.d.ts
similarity index 100%
rename from src/plugins/three/ReorientationPlugin.d.ts
rename to src/three/plugins/ReorientationPlugin.d.ts
diff --git a/src/plugins/three/ReorientationPlugin.js b/src/three/plugins/ReorientationPlugin.js
similarity index 97%
rename from src/plugins/three/ReorientationPlugin.js
rename to src/three/plugins/ReorientationPlugin.js
index 210e133..6a2227a 100644
--- a/src/plugins/three/ReorientationPlugin.js
+++ b/src/three/plugins/ReorientationPlugin.js
@@ -1,5 +1,5 @@
 import { Sphere } from 'three';
-import { OBJECT_FRAME } from '../../three/math/Ellipsoid.js';
+import { OBJECT_FRAME } from '../../three/renderer/math/Ellipsoid.js';
 
 const sphere = /* @__PURE__ */ new Sphere();
 export class ReorientationPlugin {
diff --git a/src/plugins/three/TileCompressionPlugin.d.ts b/src/three/plugins/TileCompressionPlugin.d.ts
similarity index 100%
rename from src/plugins/three/TileCompressionPlugin.d.ts
rename to src/three/plugins/TileCompressionPlugin.d.ts
diff --git a/src/plugins/three/TileCompressionPlugin.js b/src/three/plugins/TileCompressionPlugin.js
similarity index 100%
rename from src/plugins/three/TileCompressionPlugin.js
rename to src/three/plugins/TileCompressionPlugin.js
diff --git a/src/plugins/three/TileFlatteningPlugin.d.ts b/src/three/plugins/TileFlatteningPlugin.d.ts
similarity index 100%
rename from src/plugins/three/TileFlatteningPlugin.d.ts
rename to src/three/plugins/TileFlatteningPlugin.d.ts
diff --git a/src/plugins/three/TileFlatteningPlugin.js b/src/three/plugins/TileFlatteningPlugin.js
similarity index 100%
rename from src/plugins/three/TileFlatteningPlugin.js
rename to src/three/plugins/TileFlatteningPlugin.js
diff --git a/src/plugins/three/UnloadTilesPlugin.d.ts b/src/three/plugins/UnloadTilesPlugin.d.ts
similarity index 100%
rename from src/plugins/three/UnloadTilesPlugin.d.ts
rename to src/three/plugins/UnloadTilesPlugin.d.ts
diff --git a/src/plugins/three/UnloadTilesPlugin.js b/src/three/plugins/UnloadTilesPlugin.js
similarity index 98%
rename from src/plugins/three/UnloadTilesPlugin.js
rename to src/three/plugins/UnloadTilesPlugin.js
index 74492d4..2ddde6b 100644
--- a/src/plugins/three/UnloadTilesPlugin.js
+++ b/src/three/plugins/UnloadTilesPlugin.js
@@ -1,4 +1,4 @@
-import { LRUCache } from '../../core/utilities/LRUCache.js';
+import { LRUCache } from '../../core/renderer/utilities/LRUCache.js';
 
 // Plugin that disposes tiles on unload to remove them from the GPU, saving memory
 
diff --git a/src/plugins/three/UpdateOnChangePlugin.d.ts b/src/three/plugins/UpdateOnChangePlugin.d.ts
similarity index 100%
rename from src/plugins/three/UpdateOnChangePlugin.d.ts
rename to src/three/plugins/UpdateOnChangePlugin.d.ts
diff --git a/src/plugins/three/UpdateOnChangePlugin.js b/src/three/plugins/UpdateOnChangePlugin.js
similarity index 100%
rename from src/plugins/three/UpdateOnChangePlugin.js
rename to src/three/plugins/UpdateOnChangePlugin.js
diff --git a/src/plugins/three/batched/BatchedTilesPlugin.d.ts b/src/three/plugins/batched/BatchedTilesPlugin.d.ts
similarity index 100%
rename from src/plugins/three/batched/BatchedTilesPlugin.d.ts
rename to src/three/plugins/batched/BatchedTilesPlugin.d.ts
diff --git a/src/plugins/three/batched/BatchedTilesPlugin.js b/src/three/plugins/batched/BatchedTilesPlugin.js
similarity index 100%
rename from src/plugins/three/batched/BatchedTilesPlugin.js
rename to src/three/plugins/batched/BatchedTilesPlugin.js
diff --git a/src/plugins/three/batched/ExpandingBatchedMesh.js b/src/three/plugins/batched/ExpandingBatchedMesh.js
similarity index 100%
rename from src/plugins/three/batched/ExpandingBatchedMesh.js
rename to src/three/plugins/batched/ExpandingBatchedMesh.js
diff --git a/src/plugins/three/batched/ModelViewBatchedMesh.js b/src/three/plugins/batched/ModelViewBatchedMesh.js
similarity index 100%
rename from src/plugins/three/batched/ModelViewBatchedMesh.js
rename to src/three/plugins/batched/ModelViewBatchedMesh.js
diff --git a/src/plugins/three/batched/utilities.js b/src/three/plugins/batched/utilities.js
similarity index 100%
rename from src/plugins/three/batched/utilities.js
rename to src/three/plugins/batched/utilities.js
diff --git a/src/plugins/three/fade/FadeBatchedMesh.js b/src/three/plugins/fade/FadeBatchedMesh.js
similarity index 100%
rename from src/plugins/three/fade/FadeBatchedMesh.js
rename to src/three/plugins/fade/FadeBatchedMesh.js
diff --git a/src/plugins/three/fade/FadeManager.js b/src/three/plugins/fade/FadeManager.js
similarity index 100%
rename from src/plugins/three/fade/FadeManager.js
rename to src/three/plugins/fade/FadeManager.js
diff --git a/src/plugins/three/fade/FadeMaterialManager.js b/src/three/plugins/fade/FadeMaterialManager.js
similarity index 100%
rename from src/plugins/three/fade/FadeMaterialManager.js
rename to src/three/plugins/fade/FadeMaterialManager.js
diff --git a/src/plugins/three/fade/PassThroughBatchedMesh.js b/src/three/plugins/fade/PassThroughBatchedMesh.js
similarity index 100%
rename from src/plugins/three/fade/PassThroughBatchedMesh.js
rename to src/three/plugins/fade/PassThroughBatchedMesh.js
diff --git a/src/plugins/three/fade/TilesFadePlugin.d.ts b/src/three/plugins/fade/TilesFadePlugin.d.ts
similarity index 100%
rename from src/plugins/three/fade/TilesFadePlugin.d.ts
rename to src/three/plugins/fade/TilesFadePlugin.d.ts
diff --git a/src/plugins/three/fade/TilesFadePlugin.js b/src/three/plugins/fade/TilesFadePlugin.js
similarity index 100%
rename from src/plugins/three/fade/TilesFadePlugin.js
rename to src/three/plugins/fade/TilesFadePlugin.js
diff --git a/src/plugins/three/fade/wrapFadeMaterial.js b/src/three/plugins/fade/wrapFadeMaterial.js
similarity index 100%
rename from src/plugins/three/fade/wrapFadeMaterial.js
rename to src/three/plugins/fade/wrapFadeMaterial.js
diff --git a/src/plugins/three/gltf/GLTFCesiumRTCExtension.d.ts b/src/three/plugins/gltf/GLTFCesiumRTCExtension.d.ts
similarity index 100%
rename from src/plugins/three/gltf/GLTFCesiumRTCExtension.d.ts
rename to src/three/plugins/gltf/GLTFCesiumRTCExtension.d.ts
diff --git a/src/plugins/three/gltf/GLTFCesiumRTCExtension.js b/src/three/plugins/gltf/GLTFCesiumRTCExtension.js
similarity index 100%
rename from src/plugins/three/gltf/GLTFCesiumRTCExtension.js
rename to src/three/plugins/gltf/GLTFCesiumRTCExtension.js
diff --git a/src/plugins/three/gltf/GLTFMeshFeaturesExtension.d.ts b/src/three/plugins/gltf/GLTFMeshFeaturesExtension.d.ts
similarity index 100%
rename from src/plugins/three/gltf/GLTFMeshFeaturesExtension.d.ts
rename to src/three/plugins/gltf/GLTFMeshFeaturesExtension.d.ts
diff --git a/src/plugins/three/gltf/GLTFMeshFeaturesExtension.js b/src/three/plugins/gltf/GLTFMeshFeaturesExtension.js
similarity index 100%
rename from src/plugins/three/gltf/GLTFMeshFeaturesExtension.js
rename to src/three/plugins/gltf/GLTFMeshFeaturesExtension.js
diff --git a/src/plugins/three/gltf/GLTFStructuralMetadataExtension.d.ts b/src/three/plugins/gltf/GLTFStructuralMetadataExtension.d.ts
similarity index 100%
rename from src/plugins/three/gltf/GLTFStructuralMetadataExtension.d.ts
rename to src/three/plugins/gltf/GLTFStructuralMetadataExtension.d.ts
diff --git a/src/plugins/three/gltf/GLTFStructuralMetadataExtension.js b/src/three/plugins/gltf/GLTFStructuralMetadataExtension.js
similarity index 100%
rename from src/plugins/three/gltf/GLTFStructuralMetadataExtension.js
rename to src/three/plugins/gltf/GLTFStructuralMetadataExtension.js
diff --git a/src/plugins/three/gltf/metadata/classes/ClassProperty.js b/src/three/plugins/gltf/metadata/classes/ClassProperty.js
similarity index 100%
rename from src/plugins/three/gltf/metadata/classes/ClassProperty.js
rename to src/three/plugins/gltf/metadata/classes/ClassProperty.js
diff --git a/src/plugins/three/gltf/metadata/classes/MeshFeatures.js b/src/three/plugins/gltf/metadata/classes/MeshFeatures.js
similarity index 100%
rename from src/plugins/three/gltf/metadata/classes/MeshFeatures.js
rename to src/three/plugins/gltf/metadata/classes/MeshFeatures.js
diff --git a/src/plugins/three/gltf/metadata/classes/PropertyAttributeAccessor.js b/src/three/plugins/gltf/metadata/classes/PropertyAttributeAccessor.js
similarity index 100%
rename from src/plugins/three/gltf/metadata/classes/PropertyAttributeAccessor.js
rename to src/three/plugins/gltf/metadata/classes/PropertyAttributeAccessor.js
diff --git a/src/plugins/three/gltf/metadata/classes/PropertySetAccessor.js b/src/three/plugins/gltf/metadata/classes/PropertySetAccessor.js
similarity index 100%
rename from src/plugins/three/gltf/metadata/classes/PropertySetAccessor.js
rename to src/three/plugins/gltf/metadata/classes/PropertySetAccessor.js
diff --git a/src/plugins/three/gltf/metadata/classes/PropertyTableAccessor.js b/src/three/plugins/gltf/metadata/classes/PropertyTableAccessor.js
similarity index 100%
rename from src/plugins/three/gltf/metadata/classes/PropertyTableAccessor.js
rename to src/three/plugins/gltf/metadata/classes/PropertyTableAccessor.js
diff --git a/src/plugins/three/gltf/metadata/classes/PropertyTextureAccessor.js b/src/three/plugins/gltf/metadata/classes/PropertyTextureAccessor.js
similarity index 100%
rename from src/plugins/three/gltf/metadata/classes/PropertyTextureAccessor.js
rename to src/three/plugins/gltf/metadata/classes/PropertyTextureAccessor.js
diff --git a/src/plugins/three/gltf/metadata/classes/StructuralMetadata.js b/src/three/plugins/gltf/metadata/classes/StructuralMetadata.js
similarity index 100%
rename from src/plugins/three/gltf/metadata/classes/StructuralMetadata.js
rename to src/three/plugins/gltf/metadata/classes/StructuralMetadata.js
diff --git a/src/plugins/three/gltf/metadata/utilities/ClassPropertyHelpers.js b/src/three/plugins/gltf/metadata/utilities/ClassPropertyHelpers.js
similarity index 100%
rename from src/plugins/three/gltf/metadata/utilities/ClassPropertyHelpers.js
rename to src/three/plugins/gltf/metadata/utilities/ClassPropertyHelpers.js
diff --git a/src/plugins/three/gltf/metadata/utilities/TexCoordUtilities.js b/src/three/plugins/gltf/metadata/utilities/TexCoordUtilities.js
similarity index 100%
rename from src/plugins/three/gltf/metadata/utilities/TexCoordUtilities.js
rename to src/three/plugins/gltf/metadata/utilities/TexCoordUtilities.js
diff --git a/src/plugins/three/gltf/metadata/utilities/TextureReadUtility.js b/src/three/plugins/gltf/metadata/utilities/TextureReadUtility.js
similarity index 100%
rename from src/plugins/three/gltf/metadata/utilities/TextureReadUtility.js
rename to src/three/plugins/gltf/metadata/utilities/TextureReadUtility.js
diff --git a/src/plugins/three/images/DeepZoomImagePlugin.d.ts b/src/three/plugins/images/DeepZoomImagePlugin.d.ts
similarity index 100%
rename from src/plugins/three/images/DeepZoomImagePlugin.d.ts
rename to src/three/plugins/images/DeepZoomImagePlugin.d.ts
diff --git a/src/plugins/three/images/DeepZoomImagePlugin.js b/src/three/plugins/images/DeepZoomImagePlugin.js
similarity index 100%
rename from src/plugins/three/images/DeepZoomImagePlugin.js
rename to src/three/plugins/images/DeepZoomImagePlugin.js
diff --git a/src/plugins/three/images/EPSGTilesPlugin.d.ts b/src/three/plugins/images/EPSGTilesPlugin.d.ts
similarity index 100%
rename from src/plugins/three/images/EPSGTilesPlugin.d.ts
rename to src/three/plugins/images/EPSGTilesPlugin.d.ts
diff --git a/src/plugins/three/images/EPSGTilesPlugin.js b/src/three/plugins/images/EPSGTilesPlugin.js
similarity index 100%
rename from src/plugins/three/images/EPSGTilesPlugin.js
rename to src/three/plugins/images/EPSGTilesPlugin.js
diff --git a/src/plugins/three/images/EllipsoidProjectionTilesPlugin.js b/src/three/plugins/images/EllipsoidProjectionTilesPlugin.js
similarity index 100%
rename from src/plugins/three/images/EllipsoidProjectionTilesPlugin.js
rename to src/three/plugins/images/EllipsoidProjectionTilesPlugin.js
diff --git a/src/plugins/three/images/ImageFormatPlugin.js b/src/three/plugins/images/ImageFormatPlugin.js
similarity index 100%
rename from src/plugins/three/images/ImageFormatPlugin.js
rename to src/three/plugins/images/ImageFormatPlugin.js
diff --git a/src/plugins/three/images/ImageOverlayPlugin.d.ts b/src/three/plugins/images/ImageOverlayPlugin.d.ts
similarity index 100%
rename from src/plugins/three/images/ImageOverlayPlugin.d.ts
rename to src/three/plugins/images/ImageOverlayPlugin.d.ts
diff --git a/src/plugins/three/images/ImageOverlayPlugin.js b/src/three/plugins/images/ImageOverlayPlugin.js
similarity index 99%
rename from src/plugins/three/images/ImageOverlayPlugin.js
rename to src/three/plugins/images/ImageOverlayPlugin.js
index a4e624e..99e70d4 100644
--- a/src/plugins/three/images/ImageOverlayPlugin.js
+++ b/src/three/plugins/images/ImageOverlayPlugin.js
@@ -3,10 +3,10 @@ import { TiledTextureComposer } from './overlays/TiledTextureComposer.js';
 import { XYZImageSource } from './sources/XYZImageSource.js';
 import { TMSImageSource } from './sources/TMSImageSource.js';
 import { forEachTileInBounds, getMeshesCartographicRange, getMeshesPlanarRange } from './overlays/utils.js';
-import { CesiumIonAuth } from '../../core/auth/CesiumIonAuth.js';
-import { PriorityQueue } from '../../../core/utilities/PriorityQueue.js';
+import { CesiumIonAuth } from '../../../core/plugins/auth/CesiumIonAuth.js';
+import { PriorityQueue } from '../../../core/renderer/utilities/PriorityQueue.js';
 import { wrapOverlaysMaterial } from './overlays/wrapOverlaysMaterial.js';
-import { GoogleCloudAuth } from '../../core/auth/GoogleCloudAuth.js';
+import { GoogleCloudAuth } from '../../../core/plugins/auth/GoogleCloudAuth.js';
 import { GeometryClipper } from '../utilities/GeometryClipper.js';
 
 const _matrix = /* @__PURE__ */ new Matrix4();
diff --git a/src/plugins/three/images/overlays/TiledTextureComposer.js b/src/three/plugins/images/overlays/TiledTextureComposer.js
similarity index 100%
rename from src/plugins/three/images/overlays/TiledTextureComposer.js
rename to src/three/plugins/images/overlays/TiledTextureComposer.js
diff --git a/src/plugins/three/images/overlays/utils.js b/src/three/plugins/images/overlays/utils.js
similarity index 100%
rename from src/plugins/three/images/overlays/utils.js
rename to src/three/plugins/images/overlays/utils.js
diff --git a/src/plugins/three/images/overlays/wrapOverlaysMaterial.js b/src/three/plugins/images/overlays/wrapOverlaysMaterial.js
similarity index 100%
rename from src/plugins/three/images/overlays/wrapOverlaysMaterial.js
rename to src/three/plugins/images/overlays/wrapOverlaysMaterial.js
diff --git a/src/plugins/three/images/sources/DeepZoomImageSource.js b/src/three/plugins/images/sources/DeepZoomImageSource.js
similarity index 100%
rename from src/plugins/three/images/sources/DeepZoomImageSource.js
rename to src/three/plugins/images/sources/DeepZoomImageSource.js
diff --git a/src/plugins/three/images/sources/TMSImageSource.js b/src/three/plugins/images/sources/TMSImageSource.js
similarity index 100%
rename from src/plugins/three/images/sources/TMSImageSource.js
rename to src/three/plugins/images/sources/TMSImageSource.js
diff --git a/src/plugins/three/images/sources/TiledImageSource.js b/src/three/plugins/images/sources/TiledImageSource.js
similarity index 100%
rename from src/plugins/three/images/sources/TiledImageSource.js
rename to src/three/plugins/images/sources/TiledImageSource.js
diff --git a/src/plugins/three/images/sources/XYZImageSource.js b/src/three/plugins/images/sources/XYZImageSource.js
similarity index 100%
rename from src/plugins/three/images/sources/XYZImageSource.js
rename to src/three/plugins/images/sources/XYZImageSource.js
diff --git a/src/plugins/three/images/utils/DataCache.js b/src/three/plugins/images/utils/DataCache.js
similarity index 100%
rename from src/plugins/three/images/utils/DataCache.js
rename to src/three/plugins/images/utils/DataCache.js
diff --git a/src/plugins/three/images/utils/ProjectionScheme.js b/src/three/plugins/images/utils/ProjectionScheme.js
similarity index 100%
rename from src/plugins/three/images/utils/ProjectionScheme.js
rename to src/three/plugins/images/utils/ProjectionScheme.js
diff --git a/src/plugins/three/images/utils/TilingScheme.js b/src/three/plugins/images/utils/TilingScheme.js
similarity index 100%
rename from src/plugins/three/images/utils/TilingScheme.js
rename to src/three/plugins/images/utils/TilingScheme.js
diff --git a/src/plugins/three/images/utils/getCartographicToMeterDerivative.js b/src/three/plugins/images/utils/getCartographicToMeterDerivative.js
similarity index 100%
rename from src/plugins/three/images/utils/getCartographicToMeterDerivative.js
rename to src/three/plugins/images/utils/getCartographicToMeterDerivative.js
diff --git a/src/three/plugins/index.d.ts b/src/three/plugins/index.d.ts
new file mode 100644
index 0000000..e905341
--- /dev/null
+++ b/src/three/plugins/index.d.ts
@@ -0,0 +1,24 @@
+// three.js plugins
+export { CesiumIonAuthPlugin } from './CesiumIonAuthPlugin.js';
+export { GoogleCloudAuthPlugin } from './GoogleCloudAuthPlugin.js';
+export { UpdateOnChangePlugin } from './UpdateOnChangePlugin.js';
+export { TileCompressionPlugin } from './TileCompressionPlugin.js';
+export { GLTFExtensionsPlugin } from './GLTFExtensionsPlugin.js';
+export { ReorientationPlugin } from './ReorientationPlugin.js';
+export { UnloadTilesPlugin } from './UnloadTilesPlugin.js';
+export { TilesFadePlugin } from './fade/TilesFadePlugin.js';
+export { BatchedTilesPlugin } from './batched/BatchedTilesPlugin.js';
+export { TileFlatteningPlugin } from './TileFlatteningPlugin.js';
+export { QuantizedMeshPlugin } from './QuantizedMeshPlugin.js';
+export * from './images/ImageOverlayPlugin.js';
+export * from './LoadRegionPlugin.js';
+export * from './DebugTilesPlugin.js';
+
+// other formats
+export * from './images/DeepZoomImagePlugin.js';
+export * from './images/EPSGTilesPlugin.js';
+
+// gltf extensions
+export { GLTFCesiumRTCExtension } from './gltf/GLTFCesiumRTCExtension.js';
+export { GLTFStructuralMetadataExtension } from './gltf/GLTFStructuralMetadataExtension.js';
+export { GLTFMeshFeaturesExtension } from './gltf/GLTFMeshFeaturesExtension.js';
diff --git a/src/three/plugins/index.js b/src/three/plugins/index.js
new file mode 100644
index 0000000..e905341
--- /dev/null
+++ b/src/three/plugins/index.js
@@ -0,0 +1,24 @@
+// three.js plugins
+export { CesiumIonAuthPlugin } from './CesiumIonAuthPlugin.js';
+export { GoogleCloudAuthPlugin } from './GoogleCloudAuthPlugin.js';
+export { UpdateOnChangePlugin } from './UpdateOnChangePlugin.js';
+export { TileCompressionPlugin } from './TileCompressionPlugin.js';
+export { GLTFExtensionsPlugin } from './GLTFExtensionsPlugin.js';
+export { ReorientationPlugin } from './ReorientationPlugin.js';
+export { UnloadTilesPlugin } from './UnloadTilesPlugin.js';
+export { TilesFadePlugin } from './fade/TilesFadePlugin.js';
+export { BatchedTilesPlugin } from './batched/BatchedTilesPlugin.js';
+export { TileFlatteningPlugin } from './TileFlatteningPlugin.js';
+export { QuantizedMeshPlugin } from './QuantizedMeshPlugin.js';
+export * from './images/ImageOverlayPlugin.js';
+export * from './LoadRegionPlugin.js';
+export * from './DebugTilesPlugin.js';
+
+// other formats
+export * from './images/DeepZoomImagePlugin.js';
+export * from './images/EPSGTilesPlugin.js';
+
+// gltf extensions
+export { GLTFCesiumRTCExtension } from './gltf/GLTFCesiumRTCExtension.js';
+export { GLTFStructuralMetadataExtension } from './gltf/GLTFStructuralMetadataExtension.js';
+export { GLTFMeshFeaturesExtension } from './gltf/GLTFMeshFeaturesExtension.js';
diff --git a/src/plugins/three/loaders/QuantizedMeshLoader.js b/src/three/plugins/loaders/QuantizedMeshLoader.js
similarity index 98%
rename from src/plugins/three/loaders/QuantizedMeshLoader.js
rename to src/three/plugins/loaders/QuantizedMeshLoader.js
index c0b1f51..33f34af 100644
--- a/src/plugins/three/loaders/QuantizedMeshLoader.js
+++ b/src/three/plugins/loaders/QuantizedMeshLoader.js
@@ -13,8 +13,8 @@ import {
 	UnsignedByteType,
 	Vector3,
 } from 'three';
-import { QuantizedMeshLoaderBase } from '../../core/loaders/QuantizedMeshLoaderBase.js';
-import { Ellipsoid } from '../../../three/math/Ellipsoid.js';
+import { QuantizedMeshLoaderBase } from '../../../core/plugins/loaders/QuantizedMeshLoaderBase.js';
+import { Ellipsoid } from '../../../three/renderer/math/Ellipsoid.js';
 
 const _norm = /* @__PURE__ */ new Vector3();
 const _tri = /* @__PURE__ */ new Triangle();
diff --git a/src/plugins/three/objects/EllipsoidRegionHelper.js b/src/three/plugins/objects/EllipsoidRegionHelper.js
similarity index 98%
rename from src/plugins/three/objects/EllipsoidRegionHelper.js
rename to src/three/plugins/objects/EllipsoidRegionHelper.js
index 8d866c7..411bb99 100644
--- a/src/plugins/three/objects/EllipsoidRegionHelper.js
+++ b/src/three/plugins/objects/EllipsoidRegionHelper.js
@@ -1,4 +1,4 @@
-import { EllipsoidRegion } from '../../../three/math/EllipsoidRegion.js';
+import { EllipsoidRegion } from '../../../three/renderer/math/EllipsoidRegion.js';
 import { Mesh, Vector3, MathUtils, BoxGeometry, BufferGeometry, EdgesGeometry, LineSegments, BufferAttribute } from 'three';
 
 const _norm = new Vector3();
diff --git a/src/plugins/three/objects/SphereHelper.js b/src/three/plugins/objects/SphereHelper.js
similarity index 100%
rename from src/plugins/three/objects/SphereHelper.js
rename to src/three/plugins/objects/SphereHelper.js
diff --git a/src/plugins/three/utilities/GeometryClipper.js b/src/three/plugins/utilities/GeometryClipper.js
similarity index 100%
rename from src/plugins/three/utilities/GeometryClipper.js
rename to src/three/plugins/utilities/GeometryClipper.js
diff --git a/src/plugins/three/utilities/QuantizedMeshClipper.js b/src/three/plugins/utilities/QuantizedMeshClipper.js
similarity index 99%
rename from src/plugins/three/utilities/QuantizedMeshClipper.js
rename to src/three/plugins/utilities/QuantizedMeshClipper.js
index 6c0d964..3b580c9 100644
--- a/src/plugins/three/utilities/QuantizedMeshClipper.js
+++ b/src/three/plugins/utilities/QuantizedMeshClipper.js
@@ -1,6 +1,6 @@
 import { MathUtils, Vector2, Vector3 } from 'three';
 import { GeometryClipper, hashVertex } from './GeometryClipper.js';
-import { Ellipsoid } from '../../../three/math/Ellipsoid.js';
+import { Ellipsoid } from '../../../three/renderer/math/Ellipsoid.js';
 
 const _cart = {};
 const _vec = /* @__PURE__ */ new Vector3();
diff --git a/src/three/controls/CameraTransitionManager.d.ts b/src/three/renderer/controls/CameraTransitionManager.d.ts
similarity index 100%
rename from src/three/controls/CameraTransitionManager.d.ts
rename to src/three/renderer/controls/CameraTransitionManager.d.ts
diff --git a/src/three/controls/CameraTransitionManager.js b/src/three/renderer/controls/CameraTransitionManager.js
similarity index 100%
rename from src/three/controls/CameraTransitionManager.js
rename to src/three/renderer/controls/CameraTransitionManager.js
diff --git a/src/three/controls/EnvironmentControls.d.ts b/src/three/renderer/controls/EnvironmentControls.d.ts
similarity index 95%
rename from src/three/controls/EnvironmentControls.d.ts
rename to src/three/renderer/controls/EnvironmentControls.d.ts
index e5cd7eb..08bbd0a 100644
--- a/src/three/controls/EnvironmentControls.d.ts
+++ b/src/three/renderer/controls/EnvironmentControls.d.ts
@@ -1,5 +1,5 @@
 import { Camera, EventDispatcher, Object3D, Plane, Vector3 } from 'three';
-import { TilesRenderer } from '../renderer/TilesRenderer.js';
+import { TilesRenderer } from '../tiles/TilesRenderer.js';
 
 export interface EnvironmentControlsEventMap {
 	'change': {};
diff --git a/src/three/controls/EnvironmentControls.js b/src/three/renderer/controls/EnvironmentControls.js
similarity index 100%
rename from src/three/controls/EnvironmentControls.js
rename to src/three/renderer/controls/EnvironmentControls.js
diff --git a/src/three/controls/GlobeControls.d.ts b/src/three/renderer/controls/GlobeControls.d.ts
similarity index 100%
rename from src/three/controls/GlobeControls.d.ts
rename to src/three/renderer/controls/GlobeControls.d.ts
diff --git a/src/three/controls/GlobeControls.js b/src/three/renderer/controls/GlobeControls.js
similarity index 100%
rename from src/three/controls/GlobeControls.js
rename to src/three/renderer/controls/GlobeControls.js
diff --git a/src/three/controls/PivotPointMesh.js b/src/three/renderer/controls/PivotPointMesh.js
similarity index 100%
rename from src/three/controls/PivotPointMesh.js
rename to src/three/renderer/controls/PivotPointMesh.js
diff --git a/src/three/controls/PointerTracker.js b/src/three/renderer/controls/PointerTracker.js
similarity index 100%
rename from src/three/controls/PointerTracker.js
rename to src/three/renderer/controls/PointerTracker.js
diff --git a/src/three/controls/utils.js b/src/three/renderer/controls/utils.js
similarity index 100%
rename from src/three/controls/utils.js
rename to src/three/renderer/controls/utils.js
diff --git a/src/three/index.d.ts b/src/three/renderer/index.d.ts
similarity index 84%
rename from src/three/index.d.ts
rename to src/three/renderer/index.d.ts
index a358714..af20aec 100644
--- a/src/three/index.d.ts
+++ b/src/three/renderer/index.d.ts
@@ -1,6 +1,6 @@
 // three.js
-export { TilesRenderer, TilesRendererEventMap } from './renderer/TilesRenderer.js';
-export { TilesGroup } from './renderer/TilesGroup.js';
+export { TilesRenderer, TilesRendererEventMap } from './tiles/TilesRenderer.js';
+export { TilesGroup } from './tiles/TilesGroup.js';
 export { B3DMLoader, B3DMScene } from './loaders/B3DMLoader.js';
 export { I3DMLoader, I3DMScene } from './loaders/I3DMLoader.js';
 export { PNTSLoader, PNTSScene } from './loaders/PNTSLoader.js';
diff --git a/src/three/index.js b/src/three/renderer/index.js
similarity index 91%
rename from src/three/index.js
rename to src/three/renderer/index.js
index 82c9b6d..5684b18 100644
--- a/src/three/index.js
+++ b/src/three/renderer/index.js
@@ -1,5 +1,5 @@
 // three.js
-export { TilesRenderer } from './renderer/TilesRenderer.js';
+export { TilesRenderer } from './tiles/TilesRenderer.js';
 export { B3DMLoader } from './loaders/B3DMLoader.js';
 export { PNTSLoader } from './loaders/PNTSLoader.js';
 export { I3DMLoader } from './loaders/I3DMLoader.js';
diff --git a/src/three/loaders/B3DMLoader.d.ts b/src/three/renderer/loaders/B3DMLoader.d.ts
similarity index 65%
rename from src/three/loaders/B3DMLoader.d.ts
rename to src/three/renderer/loaders/B3DMLoader.d.ts
index 2b60948..c238729 100644
--- a/src/three/loaders/B3DMLoader.d.ts
+++ b/src/three/renderer/loaders/B3DMLoader.d.ts
@@ -1,6 +1,6 @@
-import { B3DMBaseResult, B3DMLoaderBase } from '../../core/loaders/B3DMLoaderBase.js';
-import { BatchTable } from '../../core/utilities/BatchTable.js';
-import { FeatureTable } from '../../core/utilities/FeatureTable.js';
+import { B3DMBaseResult, B3DMLoaderBase } from '../../../core/renderer/loaders/B3DMLoaderBase.js';
+import { BatchTable } from '../../../core/renderer/utilities/BatchTable.js';
+import { FeatureTable } from '../../../core/renderer/utilities/FeatureTable.js';
 import { LoadingManager, Group } from 'three';
 import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
 
diff --git a/src/three/loaders/B3DMLoader.js b/src/three/renderer/loaders/B3DMLoader.js
similarity index 96%
rename from src/three/loaders/B3DMLoader.js
rename to src/three/renderer/loaders/B3DMLoader.js
index 070acc5..648e42a 100644
--- a/src/three/loaders/B3DMLoader.js
+++ b/src/three/renderer/loaders/B3DMLoader.js
@@ -1,4 +1,4 @@
-import { B3DMLoaderBase } from '../../core/loaders/B3DMLoaderBase.js';
+import { B3DMLoaderBase } from '../../../core/renderer/loaders/B3DMLoaderBase.js';
 import { DefaultLoadingManager, Matrix4 } from 'three';
 import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
 
diff --git a/src/three/loaders/CMPTLoader.d.ts b/src/three/renderer/loaders/CMPTLoader.d.ts
similarity index 51%
rename from src/three/loaders/CMPTLoader.d.ts
rename to src/three/renderer/loaders/CMPTLoader.d.ts
index 0c143e9..dc10008 100644
--- a/src/three/loaders/CMPTLoader.d.ts
+++ b/src/three/renderer/loaders/CMPTLoader.d.ts
@@ -1,8 +1,8 @@
-import { B3DMBaseResult } from '../../core/loaders/B3DMLoaderBase.js';
-import { I3DMBaseResult } from '../../core/loaders/I3DMLoaderBase.js';
-import { PNTSBaseResult } from '../../core/loaders/PNTSLoaderBase.js';
+import { B3DMBaseResult } from '../../../core/renderer/loaders/B3DMLoaderBase.js';
+import { I3DMBaseResult } from '../../../core/renderer/loaders/I3DMLoaderBase.js';
+import { PNTSBaseResult } from '../../../core/renderer/loaders/PNTSLoaderBase.js';
 import { Group, LoadingManager } from 'three';
-import { CMPTLoaderBase } from '../../core/loaders/CMPTLoaderBase.js';
+import { CMPTLoaderBase } from '../../../core/renderer/loaders/CMPTLoaderBase.js';
 
 export interface CMPTResult {
 
diff --git a/src/three/loaders/CMPTLoader.js b/src/three/renderer/loaders/CMPTLoader.js
similarity index 96%
rename from src/three/loaders/CMPTLoader.js
rename to src/three/renderer/loaders/CMPTLoader.js
index 8fe4f59..7c1e3da 100644
--- a/src/three/loaders/CMPTLoader.js
+++ b/src/three/renderer/loaders/CMPTLoader.js
@@ -1,5 +1,5 @@
 import { Group, DefaultLoadingManager, Matrix4 } from 'three';
-import { CMPTLoaderBase } from '../../core/loaders/CMPTLoaderBase.js';
+import { CMPTLoaderBase } from '../../../core/renderer/loaders/CMPTLoaderBase.js';
 import { B3DMLoader } from './B3DMLoader.js';
 import { PNTSLoader } from './PNTSLoader.js';
 import { I3DMLoader } from './I3DMLoader.js';
diff --git a/src/three/loaders/I3DMLoader.d.ts b/src/three/renderer/loaders/I3DMLoader.d.ts
similarity index 65%
rename from src/three/loaders/I3DMLoader.d.ts
rename to src/three/renderer/loaders/I3DMLoader.d.ts
index b2b5384..ac3b454 100644
--- a/src/three/loaders/I3DMLoader.d.ts
+++ b/src/three/renderer/loaders/I3DMLoader.d.ts
@@ -1,6 +1,6 @@
-import { I3DMBaseResult, I3DMLoaderBase } from '../../core/loaders/I3DMLoaderBase.js';
-import { BatchTable } from '../../core/utilities/BatchTable.js';
-import { FeatureTable } from '../../core/utilities/FeatureTable.js';
+import { I3DMBaseResult, I3DMLoaderBase } from '../../../core/renderer/loaders/I3DMLoaderBase.js';
+import { BatchTable } from '../../../core/renderer/utilities/BatchTable.js';
+import { FeatureTable } from '../../../core/renderer/utilities/FeatureTable.js';
 import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
 import { Group, LoadingManager } from 'three';
 
diff --git a/src/three/loaders/I3DMLoader.js b/src/three/renderer/loaders/I3DMLoader.js
similarity index 98%
rename from src/three/loaders/I3DMLoader.js
rename to src/three/renderer/loaders/I3DMLoader.js
index 4d2ccc2..539cf90 100644
--- a/src/three/loaders/I3DMLoader.js
+++ b/src/three/renderer/loaders/I3DMLoader.js
@@ -1,4 +1,4 @@
-import { I3DMLoaderBase } from '../../core/loaders/I3DMLoaderBase.js';
+import { I3DMLoaderBase } from '../../../core/renderer/loaders/I3DMLoaderBase.js';
 import { DefaultLoadingManager, Matrix4, InstancedMesh, Vector3, Quaternion } from 'three';
 import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
 import { WGS84_ELLIPSOID } from '../math/GeoConstants.js';
diff --git a/src/three/loaders/PNTSLoader.d.ts b/src/three/renderer/loaders/PNTSLoader.d.ts
similarity index 61%
rename from src/three/loaders/PNTSLoader.d.ts
rename to src/three/renderer/loaders/PNTSLoader.d.ts
index 2f5bde6..f657979 100644
--- a/src/three/loaders/PNTSLoader.d.ts
+++ b/src/three/renderer/loaders/PNTSLoader.d.ts
@@ -1,6 +1,6 @@
-import { PNTSBaseResult, PNTSLoaderBase } from '../../core/loaders/PNTSLoaderBase.js';
-import { BatchTable } from '../../core/utilities/BatchTable.js';
-import { FeatureTable } from '../../core/utilities/FeatureTable.js';
+import { PNTSBaseResult, PNTSLoaderBase } from '../../../core/renderer/loaders/PNTSLoaderBase.js';
+import { BatchTable } from '../../../core/renderer/utilities/BatchTable.js';
+import { FeatureTable } from '../../../core/renderer/utilities/FeatureTable.js';
 import { Points, LoadingManager } from 'three';
 
 interface PNTSScene extends Points {
diff --git a/src/three/loaders/PNTSLoader.js b/src/three/renderer/loaders/PNTSLoader.js
similarity index 95%
rename from src/three/loaders/PNTSLoader.js
rename to src/three/renderer/loaders/PNTSLoader.js
index a000bad..671b197 100644
--- a/src/three/loaders/PNTSLoader.js
+++ b/src/three/renderer/loaders/PNTSLoader.js
@@ -1,4 +1,4 @@
-import { PNTSLoaderBase } from '../../core/loaders/PNTSLoaderBase.js';
+import { PNTSLoaderBase } from '../../../core/renderer/loaders/PNTSLoaderBase.js';
 import {
 	Points,
 	PointsMaterial,
@@ -8,8 +8,8 @@ import {
 	Vector3,
 	Color,
 } from 'three';
-import { rgb565torgb } from '../../core/utilities/rgb565torgb.js';
-import { decodeOctNormal } from '../../core/utilities/decodeOctNormal.js';
+import { rgb565torgb } from '../../../core/renderer/utilities/rgb565torgb.js';
+import { decodeOctNormal } from '../../../core/renderer/utilities/decodeOctNormal.js';
 
 const DRACO_ATTRIBUTE_MAP = {
 	RGB: 'color',
diff --git a/src/three/math/Ellipsoid.d.ts b/src/three/renderer/math/Ellipsoid.d.ts
similarity index 100%
rename from src/three/math/Ellipsoid.d.ts
rename to src/three/renderer/math/Ellipsoid.d.ts
diff --git a/src/three/math/Ellipsoid.js b/src/three/renderer/math/Ellipsoid.js
similarity index 97%
rename from src/three/math/Ellipsoid.js
rename to src/three/renderer/math/Ellipsoid.js
index efbdfb6..3e5c204 100644
--- a/src/three/math/Ellipsoid.js
+++ b/src/three/renderer/math/Ellipsoid.js
@@ -199,7 +199,7 @@ export class Ellipsoid {
 	getCartographicToPosition( lat, lon, height, target ) {
 
 		// From Cesium function Ellipsoid.cartographicToCartesian
-		// https://github.com/CesiumGS/cesium/blob/665ec32e813d5d6fe906ec3e87187f6c38ed5e49/packages/engine/Source/Core/Ellipsoid.js#L396
+		// https://github.com/CesiumGS/cesium/blob/665ec32e813d5d6fe906ec3e87187f6c38ed5e49/packages/engine/Source/core/renderer/Ellipsoid.js#L396
 		this.getCartographicToNormal( lat, lon, _norm );
 
 		const radius = this.radius;
@@ -218,7 +218,7 @@ export class Ellipsoid {
 	getPositionToCartographic( pos, target ) {
 
 		// From Cesium function Ellipsoid.cartesianToCartographic
-		// https://github.com/CesiumGS/cesium/blob/665ec32e813d5d6fe906ec3e87187f6c38ed5e49/packages/engine/Source/Core/Ellipsoid.js#L463
+		// https://github.com/CesiumGS/cesium/blob/665ec32e813d5d6fe906ec3e87187f6c38ed5e49/packages/engine/Source/core/renderer/Ellipsoid.js#L463
 		this.getPositionToSurfacePoint( pos, _vec );
 		this.getPositionToNormal( pos, _norm );
 
@@ -258,7 +258,7 @@ export class Ellipsoid {
 	getPositionToSurfacePoint( pos, target ) {
 
 		// From Cesium function Ellipsoid.scaleToGeodeticSurface
-		// https://github.com/CesiumGS/cesium/blob/d11b746e5809ac115fcff65b7b0c6bdfe81dcf1c/packages/engine/Source/Core/scaleToGeodeticSurface.js#L25
+		// https://github.com/CesiumGS/cesium/blob/d11b746e5809ac115fcff65b7b0c6bdfe81dcf1c/packages/engine/Source/core/renderer/scaleToGeodeticSurface.js#L25
 		const radius = this.radius;
 		const invRadiusSqX = 1 / ( radius.x ** 2 );
 		const invRadiusSqY = 1 / ( radius.y ** 2 );
diff --git a/src/three/math/EllipsoidRegion.d.ts b/src/three/renderer/math/EllipsoidRegion.d.ts
similarity index 100%
rename from src/three/math/EllipsoidRegion.d.ts
rename to src/three/renderer/math/EllipsoidRegion.d.ts
diff --git a/src/three/math/EllipsoidRegion.js b/src/three/renderer/math/EllipsoidRegion.js
similarity index 100%
rename from src/three/math/EllipsoidRegion.js
rename to src/three/renderer/math/EllipsoidRegion.js
diff --git a/src/three/math/ExtendedFrustum.d.ts b/src/three/renderer/math/ExtendedFrustum.d.ts
similarity index 100%
rename from src/three/math/ExtendedFrustum.d.ts
rename to src/three/renderer/math/ExtendedFrustum.d.ts
diff --git a/src/three/math/ExtendedFrustum.js b/src/three/renderer/math/ExtendedFrustum.js
similarity index 100%
rename from src/three/math/ExtendedFrustum.js
rename to src/three/renderer/math/ExtendedFrustum.js
diff --git a/src/three/math/GeoConstants.d.ts b/src/three/renderer/math/GeoConstants.d.ts
similarity index 100%
rename from src/three/math/GeoConstants.d.ts
rename to src/three/renderer/math/GeoConstants.d.ts
diff --git a/src/three/math/GeoConstants.js b/src/three/renderer/math/GeoConstants.js
similarity index 67%
rename from src/three/math/GeoConstants.js
rename to src/three/renderer/math/GeoConstants.js
index ac9f802..9cd1588 100644
--- a/src/three/math/GeoConstants.js
+++ b/src/three/renderer/math/GeoConstants.js
@@ -1,4 +1,4 @@
-import { WGS84_RADIUS, WGS84_HEIGHT } from '../../core/constants.js';
+import { WGS84_RADIUS, WGS84_HEIGHT } from '../../../core/renderer/constants.js';
 import { Ellipsoid } from './Ellipsoid.js';
 
 export const WGS84_ELLIPSOID = new Ellipsoid( WGS84_RADIUS, WGS84_RADIUS, WGS84_HEIGHT );
diff --git a/src/three/math/GeoUtils.d.ts b/src/three/renderer/math/GeoUtils.d.ts
similarity index 100%
rename from src/three/math/GeoUtils.d.ts
rename to src/three/renderer/math/GeoUtils.d.ts
diff --git a/src/three/math/GeoUtils.js b/src/three/renderer/math/GeoUtils.js
similarity index 100%
rename from src/three/math/GeoUtils.js
rename to src/three/renderer/math/GeoUtils.js
diff --git a/src/three/math/OBB.d.ts b/src/three/renderer/math/OBB.d.ts
similarity index 100%
rename from src/three/math/OBB.d.ts
rename to src/three/renderer/math/OBB.d.ts
diff --git a/src/three/math/OBB.js b/src/three/renderer/math/OBB.js
similarity index 100%
rename from src/three/math/OBB.js
rename to src/three/renderer/math/OBB.js
diff --git a/src/three/math/TileBoundingVolume.d.ts b/src/three/renderer/math/TileBoundingVolume.d.ts
similarity index 100%
rename from src/three/math/TileBoundingVolume.d.ts
rename to src/three/renderer/math/TileBoundingVolume.d.ts
diff --git a/src/three/math/TileBoundingVolume.js b/src/three/renderer/math/TileBoundingVolume.js
similarity index 100%
rename from src/three/math/TileBoundingVolume.js
rename to src/three/renderer/math/TileBoundingVolume.js
diff --git a/src/three/renderer/TilesGroup.d.ts b/src/three/renderer/tiles/TilesGroup.d.ts
similarity index 100%
rename from src/three/renderer/TilesGroup.d.ts
rename to src/three/renderer/tiles/TilesGroup.d.ts
diff --git a/src/three/renderer/TilesGroup.js b/src/three/renderer/tiles/TilesGroup.js
similarity index 100%
rename from src/three/renderer/TilesGroup.js
rename to src/three/renderer/tiles/TilesGroup.js
diff --git a/src/three/renderer/TilesRenderer.d.ts b/src/three/renderer/tiles/TilesRenderer.d.ts
similarity index 95%
rename from src/three/renderer/TilesRenderer.d.ts
rename to src/three/renderer/tiles/TilesRenderer.d.ts
index 870dfbe..ae44b0b 100644
--- a/src/three/renderer/TilesRenderer.d.ts
+++ b/src/three/renderer/tiles/TilesRenderer.d.ts
@@ -1,6 +1,6 @@
 import { Box3, Camera, Vector2, Matrix4, WebGLRenderer, Object3D, LoadingManager, Sphere, EventListener, EventDispatcher, BaseEvent } from 'three';
-import { Tile } from '../../core/renderer/Tile.js';
-import { TilesRendererBase } from '../../core/renderer/TilesRendererBase.js';
+import { Tile } from '../../../core/renderer/tiles/Tile.js';
+import { TilesRendererBase } from '../../../core/renderer/tiles/TilesRendererBase.js';
 import { TilesGroup } from './TilesGroup.js';
 import { Ellipsoid } from '../math/Ellipsoid.js';
 
diff --git a/src/three/renderer/TilesRenderer.js b/src/three/renderer/tiles/TilesRenderer.js
similarity index 99%
rename from src/three/renderer/TilesRenderer.js
rename to src/three/renderer/tiles/TilesRenderer.js
index b0881a6..939b5e1 100644
--- a/src/three/renderer/TilesRenderer.js
+++ b/src/three/renderer/tiles/TilesRenderer.js
@@ -1,4 +1,4 @@
-import { TilesRendererBase } from '../../core/renderer/TilesRendererBase.js';
+import { TilesRendererBase } from '../../../core/renderer/tiles/TilesRendererBase.js';
 import { B3DMLoader } from '../loaders/B3DMLoader.js';
 import { PNTSLoader } from '../loaders/PNTSLoader.js';
 import { I3DMLoader } from '../loaders/I3DMLoader.js';
@@ -14,7 +14,7 @@ import {
 	Group,
 } from 'three';
 import { raycastTraverse, raycastTraverseFirstHit } from './raycastTraverse.js';
-import { readMagicBytes } from '../../core/utilities/readMagicBytes.js';
+import { readMagicBytes } from '../../../core/renderer/utilities/readMagicBytes.js';
 import { TileBoundingVolume } from '../math/TileBoundingVolume.js';
 import { ExtendedFrustum } from '../math/ExtendedFrustum.js';
 import { estimateBytesUsed } from './utilities.js';
diff --git a/tsconfig.json b/tsconfig.json
index 6e0d9e9..2a83c28 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -10,6 +10,6 @@
     },
     "files": [
         "src/index.d.ts",
-        "src/plugins/index.d.ts"
+        "src/plugins.d.ts"
     ]
 }


Test patch:
diff --git a/src/three/renderer/raycastTraverse.js b/src/three/renderer/tiles/raycastTraverse.js
similarity index 100%
rename from src/three/renderer/raycastTraverse.js
rename to src/three/renderer/tiles/raycastTraverse.js
diff --git a/src/three/renderer/utilities.js b/src/three/renderer/tiles/utilities.js
similarity index 100%
rename from src/three/renderer/utilities.js
rename to src/three/renderer/tiles/utilities.js
diff --git a/test/DataCache.test.js b/test/DataCache.test.js
index 1117885..a8dbf8d 100644
--- a/test/DataCache.test.js
+++ b/test/DataCache.test.js
@@ -1,4 +1,4 @@
-import { DataCache } from '../src/plugins/three/images/utils/DataCache.js';
+import { DataCache } from '../src/three/plugins/images/utils/DataCache.js';
 
 function waitFrame() {
 
diff --git a/test/Ellipsoid.test.js b/test/Ellipsoid.test.js
index bbfe495..b5db234 100644
--- a/test/Ellipsoid.test.js
+++ b/test/Ellipsoid.test.js
@@ -1,10 +1,10 @@
 /* eslint-disable jest/expect-expect */
 import * as Cesium from 'cesium';
 import { Vector3, MathUtils, Matrix4, Box3, Sphere } from 'three';
-import { EllipsoidRegion } from '../src/three/math/EllipsoidRegion.js';
-import { Ellipsoid } from '../src/three/math/Ellipsoid.js';
-import { WGS84_HEIGHT, WGS84_RADIUS } from '../src/core/constants.js';
-import { WGS84_ELLIPSOID } from '../src/three/math/GeoConstants.js';
+import { EllipsoidRegion } from '../src/three/renderer/math/EllipsoidRegion.js';
+import { Ellipsoid } from '../src/three/renderer/math/Ellipsoid.js';
+import { WGS84_HEIGHT, WGS84_RADIUS } from '../src/core/renderer/constants.js';
+import { WGS84_ELLIPSOID } from '../src/three/renderer/math/GeoConstants.js';
 
 function epsCompare( a, b, EPSILON = 1e-10 ) {
 
diff --git a/test/LRUCache.test.js b/test/LRUCache.test.js
index f00c6db..356df14 100644
--- a/test/LRUCache.test.js
+++ b/test/LRUCache.test.js
@@ -1,4 +1,4 @@
-import { LRUCache } from '../src/core/utilities/LRUCache.js';
+import { LRUCache } from '../src/core/renderer/utilities/LRUCache.js';
 
 globalThis.requestAnimationFrame = setTimeout;
 globalThis.cancelAnimationFrame = clearTimeout;
diff --git a/test/PriorityQueue.test.js b/test/PriorityQueue.test.js
index be1b0f0..4ca0472 100644
--- a/test/PriorityQueue.test.js
+++ b/test/PriorityQueue.test.js
@@ -1,4 +1,4 @@
-import { PriorityQueue } from '../src/core/utilities/PriorityQueue.js';
+import { PriorityQueue } from '../src/core/renderer/utilities/PriorityQueue.js';
 
 // eslint-disable-next-line
 globalThis.requestAnimationFrame = cb => setTimeout( cb );
diff --git a/test/ProjectionScheme.test.js b/test/ProjectionScheme.test.js
index df2d8a1..9dc901f 100644
--- a/test/ProjectionScheme.test.js
+++ b/test/ProjectionScheme.test.js
@@ -1,4 +1,4 @@
-import { ProjectionScheme } from '../src/plugins/three/images/utils/ProjectionScheme.js';
+import { ProjectionScheme } from '../src/three/plugins/images/utils/ProjectionScheme.js';
 import { MathUtils } from 'three';
 
 describe( 'ProjectionScheme', () => {
diff --git a/test/TilingScheme.test.js b/test/TilingScheme.test.js
index 89bd0e0..fbdc813 100644
--- a/test/TilingScheme.test.js
+++ b/test/TilingScheme.test.js
@@ -1,5 +1,5 @@
-import { TilingScheme } from '../src/plugins/three/images/utils/TilingScheme.js';
-import { ProjectionScheme } from '../src/plugins/three/images/utils/ProjectionScheme.js';
+import { TilingScheme } from '../src/three/plugins/images/utils/TilingScheme.js';
+import { ProjectionScheme } from '../src/three/plugins/images/utils/ProjectionScheme.js';
 
 describe( 'TiltingScheme', () => {
 
diff --git a/test/decodeOctNormal.test.js b/test/decodeOctNormal.test.js
index f9ab4dd..5b053eb 100644
--- a/test/decodeOctNormal.test.js
+++ b/test/decodeOctNormal.test.js
@@ -1,4 +1,4 @@
-import { decodeOctNormal } from '../src/core/utilities/decodeOctNormal';
+import { decodeOctNormal } from '../src/core/renderer/utilities/decodeOctNormal';
 
 const PRECISION = 0.005;
 
diff --git a/test/traverseFunctions.test.js b/test/traverseFunctions.test.js
index 858dc47..b26125a 100644
--- a/test/traverseFunctions.test.js
+++ b/test/traverseFunctions.test.js
@@ -1,4 +1,4 @@
-import { traverseAncestors, traverseSet } from '../src/core/renderer/traverseFunctions.js';
+import { traverseAncestors, traverseSet } from '../src/core/renderer/tiles/traverseFunctions.js';
 
 describe( 'traverseSet', () => {
 
diff --git a/test/urlExtension.test.js b/test/urlExtension.test.js
index 910f9d6..2aa964c 100644
--- a/test/urlExtension.test.js
+++ b/test/urlExtension.test.js
@@ -1,4 +1,4 @@
-import { getUrlExtension } from '../src/core/utilities/urlExtension.js';
+import { getUrlExtension } from '../src/core/renderer/utilities/urlExtension.js';
 
 describe( 'getUrlExtension', () => {