Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/core/renderer/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ export * from './constants.js';

export { LRUCache } from './utilities/LRUCache.js';
export { PriorityQueue } from './utilities/PriorityQueue.js';
export * as TraversalUtils from './utilities/TraversalUtils.js';
export * as LoaderUtils from './utilities/LoaderUtils.js';
Comment on lines +15 to +16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are also not documented nor intended to be user-accessible. They're exported so they can be used in plugins, etc. I'm hesitant to make them public because I'm not prepared to consider these part of the API and document things like breaking changes.

export { BatchTable } from './utilities/BatchTable.js';
export { FeatureTable } from './utilities/FeatureTable.js';
2 changes: 2 additions & 0 deletions src/core/renderer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ export { LRUCache } from './utilities/LRUCache.js';
export * from './utilities/PriorityQueue.js';
export * as TraversalUtils from './utilities/TraversalUtils.js';
export * as LoaderUtils from './utilities/LoaderUtils.js';
export { BatchTable } from './utilities/BatchTable.js';
export { FeatureTable } from './utilities/FeatureTable.js';
4 changes: 3 additions & 1 deletion src/core/renderer/utilities/BatchTable.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export class BatchTable {
import { FeatureTable } from './FeatureTable.js';

export class BatchTable extends FeatureTable {

count : number;

Expand Down
5 changes: 4 additions & 1 deletion src/core/renderer/utilities/FeatureTable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ interface FeatureTableHeader {

export class FeatureTable {

header: FeatureTableHeader;
buffer : ArrayBuffer;
binOffset : number;
binLength : number;
header : FeatureTableHeader;

constructor(
buffer : ArrayBuffer,
Expand Down
6 changes: 6 additions & 0 deletions src/core/renderer/utilities/LoaderUtils.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export function readMagicBytes( bufferOrDataView: ArrayBufferLike | DataView ): string | null;

export function arrayToString( array: AllowSharedBufferSource ): string;

// Returns a working path with a trailing slash
export function getWorkingPath( url: string ): string;
19 changes: 19 additions & 0 deletions src/core/renderer/utilities/TraversalUtils.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Tile } from '../tiles/Tile.js';

// Helper function for traversing a tile set. If `beforeCb` returns `true` then the
// traversal will end early.
export function traverseSet(
tile: Tile,
beforeCb?: ( (
tile: Tile,
parent: Tile | null,
depth: number,
) => boolean | void ) | null,
afterCb?: ( ( tile: Tile, parent: Tile | null, depth: number ) => void ) | null,
): void;

// Traverses the ancestry of the tile up to the root tile.
export function traverseAncestors(
tile: Tile,
callback?: ( ( current: Tile, parent: Tile | null, depth: number ) => void ) | null,
): void;
3 changes: 2 additions & 1 deletion src/three/renderer/controls/EnvironmentControls.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Camera, EventDispatcher, Object3D, Plane, Vector3 } from 'three';
import { Camera, Clock, EventDispatcher, Object3D, Plane, Vector3 } from 'three';
import { TilesRenderer } from '../tiles/TilesRenderer.js';

export interface EnvironmentControlsEventMap {
Expand Down Expand Up @@ -35,6 +35,7 @@ export class EnvironmentControls extends EventDispatcher<EnvironmentControlsEven
fallbackPlane: Plane;
up: Vector3;
pivotPoint: Vector3;
clock: Clock;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally I'm only adding types for features I intend to be accessed by a user - basically the "public" API. So I'd prefer to keep the clock variable excluded here.


constructor(
scene?: Object3D,
Expand Down
Loading