Skip to content

Commit

Permalink
chore: remove istanbul and editor comments (#2479)
Browse files Browse the repository at this point in the history
HoloTheDrunk authored Dec 17, 2024

Verified

This commit was signed with the committer’s verified signature.
ybw0014 ybw0014
1 parent 1e171ff commit c975752
Showing 10 changed files with 11 additions and 38 deletions.
8 changes: 4 additions & 4 deletions src/Controls/GlobeControls.js
Original file line number Diff line number Diff line change
@@ -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);
}
@@ -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;
@@ -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)));
@@ -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;
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';
1 change: 0 additions & 1 deletion src/Core/Deprecated/Undeprecator.js
Original file line number Diff line number Diff line change
@@ -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: {} };
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';
13 changes: 6 additions & 7 deletions src/Layer/OrientedImageLayer.js
Original file line number Diff line number Diff line change
@@ -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 = {
@@ -48,7 +48,7 @@ function updatePano(context, camera, layer) {
layer.material.updateUniforms(context.camera.camera3D);
context.view.notifyChange(layer, true);
}
}, () => {});
}, () => { });
}
}

@@ -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;
@@ -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
@@ -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);
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) {
2 changes: 0 additions & 2 deletions src/Source/FileSource.js
Original file line number Diff line number Diff line change
@@ -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;
4 changes: 1 addition & 3 deletions src/Source/Source.js
Original file line number Diff line number Diff line change
@@ -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.
@@ -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;
@@ -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);
1 change: 0 additions & 1 deletion src/Source/VectorTilesSource.js
Original file line number Diff line number Diff line change
@@ -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);
1 change: 0 additions & 1 deletion src/Utils/placeObjectOnGround.js
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit c975752

Please sign in to comment.