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

chore: remove istanbul and editor comments #2479

Merged
merged 1 commit into from
Dec 17, 2024
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
8 changes: 4 additions & 4 deletions src/Controls/GlobeControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ class GlobeControls extends THREE.EventDispatcher {
*
* @deprecated Use View#getScale instead.
*/
getScale(pitch) /* istanbul ignore next */ {
getScale(pitch) {
console.warn('Deprecated, use View#getScale instead.');
return this.view.getScale(pitch);
}
Expand All @@ -1096,7 +1096,7 @@ class GlobeControls extends THREE.EventDispatcher {
*
* @deprecated Use `View#getPixelsToMeters` instead.
*/
pixelsToMeters(pixels, pixelPitch = 0.28) /* istanbul ignore next */ {
pixelsToMeters(pixels, pixelPitch = 0.28) {
console.warn('Deprecated use View#getPixelsToMeters instead.');
const scaled = this.getScale(pixelPitch);
const size = pixels * pixelPitch;
Expand All @@ -1112,7 +1112,7 @@ class GlobeControls extends THREE.EventDispatcher {
* @deprecated Use `View#getPixelsToMeters` and `GlobeControls#metersToDegrees`
* instead.
*/
pixelsToDegrees(pixels, pixelPitch = 0.28) /* istanbul ignore next */ {
pixelsToDegrees(pixels, pixelPitch = 0.28) {
console.warn('Deprecated, use View#getPixelsToMeters and GlobeControls#getMetersToDegrees instead.');
const chord = this.pixelsToMeters(pixels, pixelPitch);
return THREE.MathUtils.radToDeg(2 * Math.asin(chord / (2 * ellipsoidSizes.x)));
Expand All @@ -1126,7 +1126,7 @@ class GlobeControls extends THREE.EventDispatcher {
*
* @deprecated Use `View#getMetersToPixels` instead.
*/
metersToPixels(value, pixelPitch = 0.28) /* istanbul ignore next */ {
metersToPixels(value, pixelPitch = 0.28) {
console.warn('Deprecated, use View#getMetersToPixels instead.');
const scaled = this.getScale(pixelPitch);
pixelPitch /= 1000;
Expand Down
5 changes: 0 additions & 5 deletions src/Converter/convertToTile.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
import * as THREE from 'three';
import TileMesh from 'Core/TileMesh';
import LayeredMaterial from 'Renderer/LayeredMaterial';
Expand Down
1 change: 0 additions & 1 deletion src/Core/Deprecated/Undeprecator.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export const deprecatedColorLayerOptions = (options) => {
};

export const deprecatedParsingOptionsToNewOne = (options) => {
/* istanbul ignore next */
if (options.crsOut || options.crsIn) {
console.warn('Parsing options with crsIn and crsOut are deprecated, use { in, out } structure.');
const newOptions = { in: {}, out: {} };
Expand Down
7 changes: 0 additions & 7 deletions src/Core/Prefab/Globe/Atmosphere.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/


import * as THREE from 'three';
import GeometryLayer from 'Layer/GeometryLayer';
import Coordinates from 'Core/Geographic/Coordinates';
Expand Down
13 changes: 6 additions & 7 deletions src/Layer/OrientedImageLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function updatePano(context, camera, layer) {
const imagesInfo = layer.cameras.map(cam => ({
cameraId: cam.name,
panoId: newPano.id,
as: () => {},
as: () => { },
})).filter(info => !panoCameras || panoCameras.includes(info.cameraId));

const command = {
Expand All @@ -48,7 +48,7 @@ function updatePano(context, camera, layer) {
layer.material.updateUniforms(context.camera.camera3D);
context.view.notifyChange(layer, true);
}
}, () => {});
}, () => { });
}
}

Expand Down Expand Up @@ -103,12 +103,11 @@ class OrientedImageLayer extends GeometryLayer {
const {
backgroundDistance,
background = createBackground(backgroundDistance),
onPanoChanged = () => {},
getCamerasNameFromFeature = () => {},
onPanoChanged = () => { },
getCamerasNameFromFeature = () => { },
...geometryOptions
} = config;

/* istanbul ignore next */
if (config.projection) {
console.warn('OrientedImageLayer projection parameter is deprecated, use crs instead.');
config.crs = config.crs || config.projection;
Expand Down Expand Up @@ -144,7 +143,7 @@ class OrientedImageLayer extends GeometryLayer {

// panos is an array of feature point, representing many panoramics.
// for each point, there is a position and a quaternion attribute.
this.source.whenReady.then(metadata => GeoJsonParser.parse(config.orientation || metadata.orientation, options).then((orientation) => {
this.source.whenReady.then(metadata => GeoJsonParser.parse(config.orientation || metadata.orientation, options).then((orientation) => {
this.panos = orientation.features;

// the crs input is parsed in geojson parser
Expand All @@ -171,7 +170,7 @@ class OrientedImageLayer extends GeometryLayer {
}
}).then(() => {
// array of cameras, represent the projective texture configuration for each panoramic.
CameraCalibrationParser.parse(config.calibration || metadata.calibration, config).then((cameras) => {
CameraCalibrationParser.parse(config.calibration || metadata.calibration, config).then((cameras) => {
this.cameras = cameras;
// create the material
this.material = new OrientedImageMaterial(this.cameras, config);
Expand Down
7 changes: 0 additions & 7 deletions src/Renderer/SphereHelper.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/


import * as THREE from 'three';

function SphereHelper(radius) {
Expand Down
2 changes: 0 additions & 2 deletions src/Source/FileSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,10 @@ class FileSource extends Source {
* presents in `features` under the property `crs`, it is fine.
*/
constructor(source) {
/* istanbul ignore next */
if (source.parsedData) {
console.warn('FileSource parsedData parameter is deprecated, use features instead of.');
source.features = source.features || source.parsedData;
}
/* istanbul ignore next */
if (source.projection) {
console.warn('FileSource projection parameter is deprecated, use crs instead.');
source.crs = source.crs || source.projection;
Expand Down
4 changes: 1 addition & 3 deletions src/Source/Source.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const supportedParsers = new Map([
['application/gdf', GDFParser.parse],
]);

const noCache = { getByArray: () => {}, setByArray: a => a, clear: () => {} };
const noCache = { getByArray: () => { }, setByArray: a => a, clear: () => { } };

/**
* @property {string} crs - data crs projection.
Expand All @@ -36,7 +36,6 @@ const noCache = { getByArray: () => {}, setByArray: a => a, clear: () => {} };
*/
class InformationsData {
constructor(options) {
/* istanbul ignore next */
if (options.projection) {
console.warn('Source projection parameter is deprecated, use crs instead.');
options.crs = options.crs || options.projection;
Expand Down Expand Up @@ -174,7 +173,6 @@ class Source extends InformationsData {
.catch(err => this.handlingError(err)),
key);

/* istanbul ignore next */
if (this.onParsedFile) {
features.then((feat) => {
this.onParsedFile(feat);
Expand Down
1 change: 0 additions & 1 deletion src/Source/VectorTilesSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ class VectorTilesSource extends TMSSource {
.catch(err => this.handlingError(err)),
key);

/* istanbul ignore next */
if (this.onParsedFile) {
features.then((feat) => {
this.onParsedFile(feat);
Expand Down
1 change: 0 additions & 1 deletion src/Utils/placeObjectOnGround.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ function _updateVector3(layer, method, nodes, vecCRS, vec, offset, matrices = {}
*
* @return {boolean} true if successful, false if we couldn't lookup the elevation at the given coords
*/
/* istanbul ignore next */
function placeObjectOnGround(layer, crs, obj, options = {}, tileHint) {
console.warn('placeObjectOnGround has been deprecated because it needs review and test');
let tiles;
Expand Down
Loading