Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update node.js import to make them es compatible #1159

Merged
merged 1 commit into from
Oct 4, 2023
Merged
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: 1 addition & 1 deletion src/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {Plugin, SceneModel, utils} from "../../viewer/index.js"
import {GLTFSceneModelLoader} from "./GLTFSceneModelLoader.js";

import {GLTFDefaultDataSource} from "./GLTFDefaultDataSource.js";
import {IFCObjectDefaults} from "../../viewer/metadata/IFCObjectDefaults";
import {IFCObjectDefaults} from "../../viewer/metadata/IFCObjectDefaults.js";

/**
* {@link Viewer} plugin that loads models from [glTF](https://www.khronos.org/gltf/).
Expand Down
6 changes: 3 additions & 3 deletions src/viewer/metadata/MetaModel.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {PropertySet} from "./PropertySet";
import {MetaObject} from "./MetaObject";
import {math} from "../scene";
import {PropertySet} from "./PropertySet.js";
import {MetaObject} from "./MetaObject.js";
import {math} from "../scene/math/math.js";

/**
* @desc Metadata corresponding to an {@link Entity} that represents a model.
Expand Down
4 changes: 2 additions & 2 deletions src/viewer/scene/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ export * from "./Component.js";
export * from "./utils.js";
export * from "./stats.js";
export * from "./constants/constants.js";
export * from "./lod";
export * from "./vfc";
export * from "./lod/index.js";
export * from "./vfc/index.js";
4 changes: 2 additions & 2 deletions src/viewer/scene/lod/LOD.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Component} from "../Component";
import {LODCullingManager} from "./LODCullingManager";
import {Component} from "../Component.js";
import {LODCullingManager} from "./LODCullingManager.js";

/**
* Manages LOD culling for {@link SceneModel} implementations.
Expand Down
2 changes: 1 addition & 1 deletion src/viewer/scene/lod/LODCullingManager.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {LODState} from "./LODState";
import {LODState} from "./LODState.js";

/**
* @private
Expand Down
2 changes: 1 addition & 1 deletion src/viewer/scene/lod/LODState.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* @private
*/
import {math} from "../math";
import {math} from "../math/math.js";

export class LODState {

Expand Down
2 changes: 1 addition & 1 deletion src/viewer/scene/marker/Marker.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {math} from '../math/math.js';
import {Component} from '../Component.js';
import {worldToRTCPos} from "../math/rtcCoords.js";
import {SceneModelEntity} from "../model/SceneModelEntity";
import {SceneModelEntity} from "../model/SceneModelEntity.js";

const tempVec4a = math.vec4();
const tempVec4b = math.vec4();
Expand Down
10 changes: 5 additions & 5 deletions src/viewer/scene/model/SceneModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ import {
sRGBEncoding
} from "../constants/constants.js";
import {createPositionsDecodeMatrix, quantizePositions} from "./compression.js";
import {uniquifyPositions} from "./dtx/triangles/calculateUniquePositions";
import {rebucketPositions} from "./dtx/triangles/rebucketPositions";
import {TrianglesDataTextureLayer} from "./dtx/triangles/TrianglesDataTextureLayer";
import {SceneModelEntity} from "./SceneModelEntity";
import {geometryCompressionUtils} from "../math/geometryCompressionUtils";
import {uniquifyPositions} from "./dtx/triangles/calculateUniquePositions.js";
import {rebucketPositions} from "./dtx/triangles/rebucketPositions.js";
import {TrianglesDataTextureLayer} from "./dtx/triangles/TrianglesDataTextureLayer.js";
import {SceneModelEntity} from "./SceneModelEntity.js";
import {geometryCompressionUtils} from "../math/geometryCompressionUtils.js";

const tempVec3a = math.vec3();
const tempMat4 = math.mat4();
Expand Down
6 changes: 3 additions & 3 deletions src/viewer/scene/model/dtx/triangles/DataTextureGenerator.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {createRTCViewMat, math} from "../../../math";
import {BindableDataTexture} from "./BindableDataTexture";
import {dataTextureRamStats} from "./dataTextureRamStats";
import {createRTCViewMat, math} from "../../../math/index.js";
import {BindableDataTexture} from "./BindableDataTexture.js";
import {dataTextureRamStats} from "./dataTextureRamStats.js";

/**
* @private
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {geometryCompressionUtils} from "../../../math/geometryCompressionUtils.j
import {getDataTextureRenderers} from "./TrianglesDataTextureRenderers.js";
import {TrianglesDataTextureBuffer} from "./TrianglesDataTextureBuffer.js";
import {DataTextureState} from "./DataTextureState.js"
import {DataTextureGenerator} from "./DataTextureGenerator";
import {dataTextureRamStats} from "./dataTextureRamStats";
import {DataTextureGenerator} from "./DataTextureGenerator.js";
import {dataTextureRamStats} from "./dataTextureRamStats.js";

/**
* 12-bits allowed for object ids.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Program} from "../../../../webgl/Program.js";
import {math} from "../../../../math/math.js";
import {createRTCViewMat, getPlaneRTCPos} from "../../../../math";
import {createRTCViewMat, getPlaneRTCPos} from "../../../../math/index.js";

const tempVec3a = math.vec3();
const tempVec3b = math.vec3();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {geometryCompressionUtils} from "../../../math/geometryCompressionUtils.j
import {getBatchingRenderers} from "./TrianglesBatchingRenderers.js";
import {TrianglesBatchingBuffer} from "./TrianglesBatchingBuffer.js";
import {quantizePositions, transformAndOctEncodeNormals} from "../../compression.js";
import {getSnapBatchingRenderers} from "../snapBatching/SnapBatchingRenderers";
import {getSnapBatchingRenderers} from "../snapBatching/SnapBatchingRenderers.js";

const tempMat4 = math.mat4();
const tempMat4b = math.mat4();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {math} from "../../../math/math.js";
import {RenderState} from "../../../webgl/RenderState.js";
import {ArrayBuf} from "../../../webgl/ArrayBuf.js";
import {getInstancingRenderers} from "./TrianglesInstancingRenderers.js";
import {getSnapInstancingRenderers} from "../snapInstancing/SnapInstancingRenderers";
import {getSnapInstancingRenderers} from "../snapInstancing/SnapInstancingRenderers.js";

const tempUint8Vec4 = new Uint8Array(4);
const tempFloat32 = new Float32Array(1);
Expand Down
2 changes: 1 addition & 1 deletion src/viewer/scene/scene/Scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {SAO} from "../postfx/SAO.js";
import {PointsMaterial} from "../materials/PointsMaterial.js";
import {LinesMaterial} from "../materials/LinesMaterial.js";
import {LOD} from "../lod/LOD.js";
import {VFC} from "../vfc/VFC";
import {VFC} from "../vfc/VFC.js";

// Enables runtime check for redundant calls to object state update methods, eg. Scene#_objectVisibilityUpdated
const ASSERT_OBJECT_STATE_UPDATE = false;
Expand Down
4 changes: 2 additions & 2 deletions src/viewer/scene/vfc/VFC.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Component} from "../Component";
import {VFCManager} from "./VFCManager";
import {Component} from "../Component.js";
import {VFCManager} from "./VFCManager.js";

/**
* Manages view frustum culling (VFC) for {@link SceneModel} implementations.
Expand Down
2 changes: 1 addition & 1 deletion src/viewer/scene/vfc/VFCManager.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {VFCState} from "./VFCState";
import {VFCState} from "./VFCState.js";

/**
* @private
Expand Down
4 changes: 2 additions & 2 deletions src/viewer/scene/vfc/VFCState.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {clusterizeV2} from "./cluster-helper";
import {math} from "../math";
import {clusterizeV2} from "./cluster-helper.js";
import {math} from "../math/math.js";

const tempVec3 = math.vec3();

Expand Down