Skip to content

Commit

Permalink
chore(polyfills): remove polyfill for TextDecoder
Browse files Browse the repository at this point in the history
  • Loading branch information
Desplandis committed Feb 5, 2024
1 parent abc6bbb commit 356811e
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 20 deletions.
8 changes: 1 addition & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@
"earcut": "^2.2.4",
"js-priority-queue": "^0.1.5",
"pbf": "^3.2.1",
"shpjs": "^4.0.4",
"text-encoding-utf-8": "^1.0.2"
"shpjs": "^4.0.4"
},
"peerDependencies": {
"proj4": "^2.9.2",
Expand Down
3 changes: 2 additions & 1 deletion src/Core/3DTiles/C3DTBatchTable.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import utf8Decoder from 'Utils/Utf8Decoder';
import binaryPropertyAccessor from './utils/BinaryPropertyAccessor';
import { C3DTilesTypes } from './C3DTilesEnums';

const utf8Decoder = new TextDecoder();

/** @classdesc
* A 3D Tiles
* [batch
Expand Down
3 changes: 2 additions & 1 deletion src/Parser/B3dmParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { DRACOLoader } from 'ThreeExtended/loaders/DRACOLoader';
import { KTX2Loader } from 'ThreeExtended/loaders/KTX2Loader';
import LegacyGLTFLoader from 'Parser/deprecated/LegacyGLTFLoader';
import shaderUtils from 'Renderer/Shader/ShaderUtils';
import utf8Decoder from 'Utils/Utf8Decoder';
import C3DTBatchTable from 'Core/3DTiles/C3DTBatchTable';
import ReferLayerProperties from 'Layer/ReferencingLayerProperties';
import { MeshBasicMaterial } from 'three';
Expand All @@ -15,6 +14,8 @@ const matrixChangeUpVectorZtoY = (new THREE.Matrix4()).makeRotationX(Math.PI / 2
// For gltf rotation
const matrixChangeUpVectorZtoX = (new THREE.Matrix4()).makeRotationZ(-Math.PI / 2);

const utf8Decoder = new TextDecoder();

export const glTFLoader = new GLTFLoader();

export const legacyGLTFLoader = new LegacyGLTFLoader();
Expand Down
3 changes: 2 additions & 1 deletion src/Parser/PntsParser.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import * as THREE from 'three';
import utf8Decoder from 'Utils/Utf8Decoder';

import C3DTBatchTable from 'Core/3DTiles/C3DTBatchTable';

const utf8Decoder = new TextDecoder();

export default {
/** @module PntsParser */
/** Parse pnts buffer and extract THREE.Points and batch table
Expand Down
3 changes: 2 additions & 1 deletion src/Provider/3dTilesProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import B3dmParser from 'Parser/B3dmParser';
import PntsParser from 'Parser/PntsParser';
import Fetcher from 'Provider/Fetcher';
import ReferLayerProperties from 'Layer/ReferencingLayerProperties';
import utf8Decoder from 'Utils/Utf8Decoder';
import PointsMaterial from 'Renderer/PointsMaterial';

const utf8Decoder = new TextDecoder();

function b3dmToMesh(data, layer, url) {
const urlBase = THREE.LoaderUtils.extractUrlBase(url);
const options = {
Expand Down
7 changes: 0 additions & 7 deletions src/Utils/Utf8Decoder.js

This file was deleted.

0 comments on commit 356811e

Please sign in to comment.