diff --git a/test/unit/potree.js b/test/unit/potree.js index b744b603a7..8357520388 100644 --- a/test/unit/potree.js +++ b/test/unit/potree.js @@ -60,6 +60,7 @@ describe('Potree', function () { const source = new PotreeSource({ file: fileName, url: baseurl, + crs: 'EPSG:4978', }); // Configure Point Cloud layer diff --git a/test/unit/potree2.js b/test/unit/potree2.js index ff1b48a0c7..906558c293 100644 --- a/test/unit/potree2.js +++ b/test/unit/potree2.js @@ -17,16 +17,18 @@ describe('Potree2', function () { before(function () { renderer = new Renderer(); - viewer = new View('EPSG:3946', renderer.domElement, { renderer }); + viewer = new View('EPSG:4978', renderer.domElement, { renderer }); viewer.camera.camera3D.position.copy(new Vector3(0, 0, 10)); // Configure Point Cloud layer + const source = new Potree2Source({ + file: 'metadata.json', + url: 'https://raw.githubusercontent.com/iTowns/iTowns2-sample-data/master/pointclouds/potree2.0/lion', + networkOptions: process.env.HTTPS_PROXY ? { agent: new HttpsProxyAgent(process.env.HTTPS_PROXY) } : {}, + crs: 'EPSG:4978', + }); potreeLayer = new Potree2Layer('lion', { - source: new Potree2Source({ - file: 'metadata.json', - url: 'https://raw.githubusercontent.com/iTowns/iTowns2-sample-data/master/pointclouds/potree2.0/lion', - networkOptions: process.env.HTTPS_PROXY ? { agent: new HttpsProxyAgent(process.env.HTTPS_PROXY) } : {}, - }), + source, crs: viewer.referenceCrs, }); diff --git a/test/unit/potree2layerparsing.js b/test/unit/potree2layerparsing.js index 9f1dc423fc..6cf06f8bd0 100644 --- a/test/unit/potree2layerparsing.js +++ b/test/unit/potree2layerparsing.js @@ -50,6 +50,7 @@ describe('Potree2 Provider', function () { file: 'metadata.json', url: 'https://raw.githubusercontent.com/iTowns/iTowns2-sample-data/master/pointclouds/potree2.0/lion', networkOptions: process.env.HTTPS_PROXY ? { agent: new HttpsProxyAgent(process.env.HTTPS_PROXY) } : {}, + crs: 'EPSG:4978', metadata, }); @@ -65,6 +66,7 @@ describe('Potree2 Provider', function () { file: 'metadata.json', url: 'https://raw.githubusercontent.com/iTowns/iTowns2-sample-data/master/pointclouds/potree2.0/lion', networkOptions: process.env.HTTPS_PROXY ? { agent: new HttpsProxyAgent(process.env.HTTPS_PROXY) } : {}, + crs: 'EPSG:4978', metadata: { version: '2.0', name: 'lion', @@ -132,6 +134,7 @@ describe('Potree2 Provider', function () { file: 'metadata.json', url: 'https://raw.githubusercontent.com/iTowns/iTowns2-sample-data/master/pointclouds/potree2.0/lion', networkOptions: process.env.HTTPS_PROXY ? { agent: new HttpsProxyAgent(process.env.HTTPS_PROXY) } : {}, + crs: 'EPSG:4978', metadata: { version: '2.0', name: 'lion', @@ -199,6 +202,7 @@ describe('Potree2 Provider', function () { file: 'metadata.json', url: 'https://raw.githubusercontent.com/iTowns/iTowns2-sample-data/master/pointclouds/potree2.0/lion', networkOptions: process.env.HTTPS_PROXY ? { agent: new HttpsProxyAgent(process.env.HTTPS_PROXY) } : {}, + crs: 'EPSG:4978', metadata: { version: '2.0', name: 'lion', diff --git a/test/unit/potreelayerparsing.js b/test/unit/potreelayerparsing.js index 0f1207edb2..11d9e68566 100644 --- a/test/unit/potreelayerparsing.js +++ b/test/unit/potreelayerparsing.js @@ -42,7 +42,8 @@ describe('Potree Provider', function () { it('cloud with no normal information', function _it(done) { // No normals const cloud = { - boundingBox: { lx: 0, ly: 1, ux: 2, uy: 3 }, + boundingBox: { lx: 10, ly: 20, ux: 30, uy: 40 }, + tightBoundingBox: { lx: 1, ly: 2, ux: 3, uy: 4 }, scale: 1.0, pointAttributes: ['POSITION', 'RGB'], octreeDir: 'data', @@ -51,6 +52,7 @@ describe('Potree Provider', function () { const source = new PotreeSource({ file: fileName, url: baseurl, + crs: 'EPSG:4978', cloud, }); @@ -66,7 +68,8 @@ describe('Potree Provider', function () { it('cloud with normals as vector', function _it(done) { // // // // normals as vector const cloud = { - boundingBox: { lx: 0, ly: 1, ux: 2, uy: 3 }, + boundingBox: { lx: 10, ly: 20, ux: 30, uy: 40 }, + tightBoundingBox: { lx: 1, ly: 2, ux: 3, uy: 4 }, scale: 1.0, pointAttributes: ['POSITION', 'NORMAL', 'CLASSIFICATION'], octreeDir: 'data', @@ -75,6 +78,7 @@ describe('Potree Provider', function () { const source = new PotreeSource({ file: fileName, url: baseurl, + crs: 'EPSG:4978', cloud, }); @@ -91,7 +95,8 @@ describe('Potree Provider', function () { it('cloud with spheremapped normals', function _it(done) { // // spheremapped normals const cloud = { - boundingBox: { lx: 0, ly: 1, ux: 2, uy: 3 }, + boundingBox: { lx: 10, ly: 20, ux: 30, uy: 40 }, + tightBoundingBox: { lx: 1, ly: 2, ux: 3, uy: 4 }, scale: 1.0, pointAttributes: ['POSITION', 'COLOR_PACKED', 'NORMAL_SPHEREMAPPED'], octreeDir: 'data', @@ -99,6 +104,7 @@ describe('Potree Provider', function () { const source = new PotreeSource({ file: fileName, url: baseurl, + crs: 'EPSG:4978', cloud, }); const layer = new PotreeLayer('pointsCloud3', { source, crs: view.referenceCrs }); @@ -115,7 +121,8 @@ describe('Potree Provider', function () { it('cloud with oct16 normals', function _it(done) { // // // oct16 normals const cloud = { - boundingBox: { lx: 0, ly: 1, ux: 2, uy: 3 }, + boundingBox: { lx: 10, ly: 20, ux: 30, uy: 40 }, + tightBoundingBox: { lx: 1, ly: 2, ux: 3, uy: 4 }, scale: 1.0, pointAttributes: ['POSITION', 'COLOR_PACKED', 'CLASSIFICATION', 'NORMAL_OCT16'], octreeDir: 'data', @@ -123,6 +130,7 @@ describe('Potree Provider', function () { const source = new PotreeSource({ file: fileName, url: baseurl, + crs: 'EPSG:4978', cloud, }); const layer = new PotreeLayer('pointsCloud4', { source, crs: view.referenceCrs });