Skip to content

Commit b3895a6

Browse files
committed
fix eslint errors
1 parent c85807f commit b3895a6

File tree

56 files changed

+82
-68
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+82
-68
lines changed

eslint.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ export default [
2020
"Apps/Sandcastle/gallery/gallery-index.js",
2121
"Apps/Sandcastle2/",
2222
"packages/sandcastle/public/",
23+
"packages/sandcastle/templates/Sandcastle.d.ts",
24+
"packages/sandcastle/templates/Sandcastle.js",
2325
"packages/engine/Source/Scene/GltfPipeline/**/*",
2426
"packages/engine/Source/Shaders/**/*",
2527
"Specs/jasmine/*",
@@ -114,6 +116,13 @@ export default [
114116
"no-alert": "off",
115117
},
116118
},
119+
{
120+
files: ["packages/sandcastle/gallery/hello-world/main.js"],
121+
rules: {
122+
// ignore this rule here to avoid the excessive eslint-disable comment in our bare minimum example
123+
"no-unused-vars": "off",
124+
},
125+
},
117126
{
118127
files: ["Specs/**/*", "packages/**/Specs/**/*"],
119128
languageOptions: {

packages/sandcastle/gallery/3d-tiles-1.1-cdb-yemen/main.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,6 @@ try {
340340
},
341341
);
342342
viewer.scene.primitives.add(buildingsTileset);
343-
const center = Cesium.Cartesian3.fromDegrees(45.04192, 12.753525, 2000);
344343

345344
viewer.camera.flyTo({
346345
duration: 0,

packages/sandcastle/gallery/3d-tiles-1.1-photogrammetry-classification/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ handler.setInputAction(function (movement) {
261261
}, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
262262

263263
const clickHandler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
264-
handler.setInputAction(function (movement) {
264+
clickHandler.setInputAction(function (movement) {
265265
if (enablePicking) {
266266
const pickedObject = scene.pick(movement.position);
267267
if (

packages/sandcastle/gallery/3d-tiles-1.1-s2-globe/main.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ metadataOverlay.style.fontSize = "16px";
108108
metadataOverlay.style.borderRadius = "4px";
109109

110110
let tableHtmlScratch;
111-
let i;
112111

113112
handler.setInputAction(function (movement) {
114113
if (enablePicking) {

packages/sandcastle/gallery/3d-tiles-inspector/main.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const viewer = new Cesium.Viewer("cesiumContainer", {
88
viewer.scene.globe.depthTestAgainstTerrain = true;
99

1010
viewer.extend(Cesium.viewerCesium3DTilesInspectorMixin);
11-
const inspectorViewModel = viewer.cesium3DTilesInspector.viewModel;
1211

1312
try {
1413
const tileset = await Cesium.Cesium3DTileset.fromIonAssetId(75343, {

packages/sandcastle/gallery/3d-tiles-nga-gpm-visualization/main.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as Cesium from "cesium";
2-
import Sandcastle from "Sandcastle";
32

43
// Basic setup
54
const viewer = new Cesium.Viewer("cesiumContainer", {
@@ -469,7 +468,7 @@ class PropertyTextureShaders {
469468
float value1 = float(fsInput.metadata.${propertyName1});
470469
float range1 = float(${sourceMax1}) - float(${sourceMin1});
471470
float brightness1 = (value1 - float(${sourceMin1})) / range1;
472-
471+
473472
vec3 diffuseHsl = czm_RGBToHSL(material.diffuse);
474473
diffuseHsl.y *= 0.25;
475474
diffuseHsl.z *= 0.25;

packages/sandcastle/gallery/3d-tiles-performance-testing-dev/main.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ The heatmapTileProperty will colorize the tile property in a heatmap. Booleans s
1414
const viewer = new Cesium.Viewer("cesiumContainer");
1515
const scene = viewer.scene;
1616
const camera = scene.camera;
17-
const globe = scene.globe;
18-
const statistics = Cesium.RequestScheduler.statistics;
1917
const Cartesian3 = Cesium.Cartesian3;
2018

2119
let tourTime = 0;

packages/sandcastle/gallery/aec-architectural-design/main.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,9 @@ for (const { title, assetId, visible } of tilesetData) {
8080
viewer.scene.primitives.add(tileset);
8181
tileset.show = visible;
8282

83-
const toggleBtn = Sandcastle.addToggleButton(
84-
title,
85-
visible,
86-
function (checked) {
87-
tileset.show = checked;
88-
},
89-
);
83+
Sandcastle.addToggleButton(title, visible, function (checked) {
84+
tileset.show = checked;
85+
});
9086
} catch (error) {
9187
console.log(`Error loading tileset (${title}): ${error}`);
9288
}

packages/sandcastle/gallery/ambient-occlusion/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as Cesium from "cesium";
22

33
const viewer = new Cesium.Viewer("cesiumContainer");
44

5-
const { canvas, camera, clock, scene } = viewer;
5+
const { camera, clock, scene } = viewer;
66
camera.frustum.near = 1.0;
77
scene.debugShowFramesPerSecond = true;
88

packages/sandcastle/gallery/arcgis-mapserver/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import * as Cesium from "cesium";
22

3+
/* eslint-disable no-unused-vars */
4+
35
// An ArcGIS Access Token is required to authenticate requests to an ArcGIS Image Tile service.
46
// To access secure ArcGIS resources, you need to create an ArcGIS developer account at https://developers.arcgis.com/,
57
// then implement an authentication method to obtain an access token. See https://developers.arcgis.com/documentation/mapping-apis-and-services/security

0 commit comments

Comments
 (0)