Skip to content

Commit

Permalink
fix PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
belom88 committed Oct 7, 2024
1 parent 39ab225 commit b8d4a76
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions examples/experimental/potree/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import DeckGL from '@deck.gl/react';
import {MapViewState} from '@deck.gl/core';
import {PotreeSource} from '@loaders.gl/potree';

import PotreeTile3DLayer from './potree-tile-3d-layer';
import {PotreeTile3DLayer} from './potree-tile-3d-layer';

export const TRANSITION_DURAITON = 4000;

Expand All @@ -30,7 +30,7 @@ export default function App() {
function renderLayers() {
const layers = new PotreeTile3DLayer({
data: 'https://raw.githubusercontent.com/visgl/deck.gl-data/refs/heads/master/formats/potree/1.8/3dm_32_291_5744_1_nw-converted',
dataSource: PotreeSource
source: PotreeSource
});
return [layers];
}
Expand Down
16 changes: 8 additions & 8 deletions examples/experimental/potree/src/potree-tile-3d-layer.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import {Tile3DLayer, Tile3DLayerProps} from '@deck.gl/geo-layers';
import {UpdateParameters} from '@deck.gl/core/typed';
import { Viewport } from '@deck.gl/core';
import {Viewport} from '@deck.gl/core';
import {Source} from '@loaders.gl/loader-utils';
import { PointcloudTileset } from './pointcloud-tileset';
import {PointcloudTileset} from './pointcloud-tileset';

export type PotreeTile3DLayerProps = {
dataSource: Source
}
source: Source;
};

export default class PotreeTile3DLayer<
export class PotreeTile3DLayer<
DataT = any,
// eslint-disable-next-line @typescript-eslint/ban-types
ExtraProps extends {} = {}
> extends Tile3DLayer<DataT, Tile3DLayerProps & PotreeTile3DLayerProps & ExtraProps > {
> extends Tile3DLayer<DataT, Tile3DLayerProps & PotreeTile3DLayerProps & ExtraProps> {
static layerName = 'PotreeTile3DLayer';
static defaultProps = Tile3DLayer.defaultProps as any;

Expand Down Expand Up @@ -43,7 +43,7 @@ export default class PotreeTile3DLayer<
private async _loadTileset(tilesetUrl) {
const {loadOptions = {}} = this.props;

const dataSource = this.props.dataSource.createDataSource(tilesetUrl, {});
const dataSource = this.props.source.createDataSource(tilesetUrl, {});

const tileset3d = new PointcloudTileset(dataSource);

Expand All @@ -69,7 +69,7 @@ export default class PotreeTile3DLayer<
}

// eslint-disable-next-line @typescript-eslint/no-floating-promises
tileset3d.selectTiles(Object.values(viewports)).then(frameNumber => {
tileset3d.selectTiles(Object.values(viewports)).then((frameNumber) => {
const tilesetChanged = this.state.frameNumber !== frameNumber;
if (tilesetChanged) {
this.setState({frameNumber});
Expand Down

0 comments on commit b8d4a76

Please sign in to comment.