Skip to content

Commit

Permalink
chore: update three to 0.153.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mgermerie authored and jailln committed Jul 5, 2023
1 parent a2e0f5c commit 728f473
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 21 deletions.
1 change: 1 addition & 0 deletions config/threeExamples.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export default {
'./loaders/GLTFLoader.js',
'./loaders/DRACOLoader.js',
'./loaders/DDSLoader.js',
'./utils/BufferGeometryUtils.js',
'./capabilities/WebGL.js',
],
};
2 changes: 1 addition & 1 deletion examples/itowns-potree.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
with `itowns.THREE` or `itowns.proj4`. -->
<script type="text/javascript">
const THREE = itowns.THREE;
THREE.Object3D.DefaultUp.set(0, 0, 1);
THREE.Object3D.DEFAULT_UP.set(0, 0, 1);

const proj4 = itowns.proj4;
</script>
Expand Down
2 changes: 1 addition & 1 deletion examples/view_multi_25d.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
// `viewerDiv` will contain iTowns' rendering area (`<canvas>`)
viewerDiv = document.getElementById('viewerDiv');

itowns.THREE.Object3D.DefaultUp.set(0, 0, 1);
itowns.THREE.Object3D.DEFAULT_UP.set(0, 0, 1);

scale = new itowns.THREE.Vector3(1, 1, 1).divideScalar(extent.planarDimensions().x);

Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
},
"peerDependencies": {
"proj4": "^2.8.0",
"three": "0.146.0"
"three": "0.153.0"
},
"devDependencies": {
"@babel/cli": "^7.17.10",
Expand Down Expand Up @@ -109,7 +109,7 @@
"puppeteer": "^14.1.1",
"q": "^1.5.1",
"replace-in-file": "^6.3.2",
"three": "0.146.0",
"three": "0.153.0",
"url-polyfill": "^1.1.12",
"webpack": "^5.72.1",
"webpack-cli": "^4.9.2",
Expand Down
2 changes: 1 addition & 1 deletion src/Converter/Feature2Texture.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export default {
data[0] = backgroundColor.r * 255;
data[1] = backgroundColor.g * 255;
data[2] = backgroundColor.b * 255;
texture = new THREE.DataTexture(data, 1, 1, THREE.RGBFormat);
texture = new THREE.DataTexture(data, 1, 1, THREE.RGBAFormat);
} else {
texture = new THREE.Texture();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Prefab/Globe/SkyShader.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ class Sky extends THREE.Mesh {
depthWrite: false,
});

const skyGeo = new THREE.SphereBufferGeometry(40000, 32, 15);
const skyGeo = new THREE.SphereGeometry(40000, 32, 15);
super(skyGeo, skyMat);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Prefab/GlobeView.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class GlobeView extends View {
* @param {Object} options.controls - See options of {@link GlobeControls}
*/
constructor(viewerDiv, placement = {}, options = {}) {
THREE.Object3D.DefaultUp.set(0, 0, 1);
THREE.Object3D.DEFAULT_UP.set(0, 0, 1);
// Setup View
super('EPSG:4978', viewerDiv, options);
this.isGlobeView = true;
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Prefab/PlanarView.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class PlanarView extends View {
* initialization. By default, camera will display the view's extent (given in `extent` parameter).
*/
constructor(viewerDiv, extent, options = {}) {
THREE.Object3D.DefaultUp.set(0, 0, 1);
THREE.Object3D.DEFAULT_UP.set(0, 0, 1);

// Setup View
super(extent.crs, viewerDiv, options);
Expand Down
2 changes: 1 addition & 1 deletion src/Parser/LASParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default {
geometry.userData.vertexCount = parsedData.header.vertexCount;
geometry.userData.boundingBox = parsedData.header.boundingBox;

const positionBuffer = new THREE.BufferAttribute(parsedData.attributes.POSITION.value, 3, false);
const positionBuffer = new THREE.BufferAttribute(parsedData.attributes.POSITION.value, 3);
geometry.setAttribute('position', positionBuffer);

const intensityBuffer = new THREE.BufferAttribute(parsedData.attributes.intensity.value, 1, true);
Expand Down
2 changes: 1 addition & 1 deletion src/Parser/deprecated/LegacyGLTFLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ threeExamples.LegacyGLTFLoader = ( function () {

var WEBGL_TEXTURE_FORMATS = {
6406: THREE.AlphaFormat,
6407: THREE.RGBFormat,
6407: THREE.RGBAFormat,
6408: THREE.RGBAFormat,
6409: THREE.LuminanceFormat,
6410: THREE.LuminanceAlphaFormat
Expand Down
2 changes: 1 addition & 1 deletion src/Renderer/OrientedImageMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import textureVS from 'Renderer/Shader/ProjectiveTextureVS.glsl';
import textureFS from 'Renderer/Shader/ProjectiveTextureFS.glsl';
import ShaderUtils from 'Renderer/Shader/ShaderUtils';

const ndcToTextureMatrix = new THREE.Matrix4().set(
const ndcToTextureMatrix = new THREE.Matrix4(
1, 0, 0, 1,
0, 1, 0, 1,
0, 0, 2, 0,
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/CameraUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Ellipsoid from 'Core/Math/Ellipsoid';
import OBB from 'Renderer/OBB';
import { VIEW_EVENTS } from 'Core/View';

THREE.Object3D.DefaultUp.set(0, 0, 1);
THREE.Object3D.DEFAULT_UP.set(0, 0, 1);
const targetPosition = new THREE.Vector3();
const targetCoord = new Coordinates('EPSG:4326', 0, 0, 0);
const ellipsoid = new Ellipsoid();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cameraUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function equalToFixed(value1, value2, toFixed) {
}

describe('Camera utils unit test', function () {
THREE.Object3D.DefaultUp = new THREE.Vector3(0, 0, 1);
THREE.Object3D.DEFAULT_UP = new THREE.Vector3(0, 0, 1);

const original = DEMUtils.getElevationValueAt;

Expand Down

0 comments on commit 728f473

Please sign in to comment.