Skip to content

Commit

Permalink
Move "camera transition" to core
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson committed Nov 7, 2024
1 parent 7434abf commit dc7e5f6
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions example/fadingTiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import {
Group,
} from 'three';
import { TilesFadePlugin } from './src/plugins/fade/TilesFadePlugin.js';
import { EnvironmentControls, TilesRenderer } from '3d-tiles-renderer';
import { EnvironmentControls, TilesRenderer, CameraTransitionManager } from '3d-tiles-renderer';
import { GUI } from 'three/examples/jsm/libs/lil-gui.module.min.js';
import { CameraTransitionManager } from './src/camera/CameraTransitionManager.js';

let controls, scene, renderer;
let groundTiles, skyTiles, tilesParent, transition;
Expand Down
2 changes: 1 addition & 1 deletion example/googleMapsExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
CAMERA_FRAME,
GeoUtils,
GlobeControls,
CameraTransitionManager,
TilesRenderer,
} from '3d-tiles-renderer';
import { GoogleCloudAuthPlugin } from '3d-tiles-renderer/plugins';
Expand All @@ -17,7 +18,6 @@ import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js';
import { GUI } from 'three/examples/jsm/libs/lil-gui.module.min.js';
import Stats from 'three/examples/jsm/libs/stats.module.js';
import { CameraTransitionManager } from './src/camera/CameraTransitionManager.js';
import { TileCompressionPlugin } from './src/plugins/TileCompressionPlugin.js';
import { UpdateOnChangePlugin } from './src/plugins/UpdateOnChangePlugin.js';
import { TilesFadePlugin } from './src/plugins/fade/TilesFadePlugin.js';
Expand Down
2 changes: 1 addition & 1 deletion example/r3f/globe.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
GlobeControls,
EastNorthUpFrame,
CompassGizmo,
CameraTransition,
} from '3d-tiles-renderer/r3f';
import { CameraTransition } from './components/CameraTransition.jsx';

// Plugins
import { GoogleCloudAuthPlugin } from '3d-tiles-renderer/plugins';
Expand Down
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export * from './three/renderers/CesiumIonTilesRenderer.js';
// three.js controls
export { GlobeControls } from './three/controls/GlobeControls.js';
export { EnvironmentControls } from './three/controls/EnvironmentControls.js';
export { CameraTransitionManager } from './three/controls/CameraTransitionManager.js';

// three.js plugins
export { CesiumIonAuthPlugin } from './three/plugins/CesiumIonAuthPlugin.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef, useEffect, useMemo } from 'react';
import { useFrame, useThree } from '@react-three/fiber';
import { CameraTransitionManager } from '../../src/camera/CameraTransitionManager.js';
import { CameraTransitionManager } from '3d-tiles-renderer';

export const CameraTransition = forwardRef( function CameraTransition( props, ref ) {

Expand Down
1 change: 1 addition & 0 deletions src/r3f/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export * from './components/TilesAttributionOverlay.jsx';
export * from './components/CanvasDOMOverlay.jsx';
export * from './components/CameraControls.jsx';
export * from './components/CompassGizmo.jsx';
export * from './components/CameraTransition.jsx';

0 comments on commit dc7e5f6

Please sign in to comment.