Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cesium/widgets

Package Overview
Dependencies
Maintainers
5
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cesium/widgets - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

Source/Viewer/viewerVoxelInspectorMixin.js

23

index.js
export { default as ClockViewModel } from './Source/ClockViewModel.js';
export { default as Command } from './Source/Command.js';
export { default as createCommand } from './Source/createCommand.js';
export { default as InspectorShared } from './Source/InspectorShared.js';
export { default as subscribeAndEvaluate } from './Source/subscribeAndEvaluate.js';
export { default as SvgPathBindingHandler } from './Source/SvgPathBindingHandler.js';
export { default as ToggleButtonViewModel } from './Source/ToggleButtonViewModel.js';
export { default as createCommand } from './Source/createCommand.js';
export { default as subscribeAndEvaluate } from './Source/subscribeAndEvaluate.js';
export { default as Animation } from './Source/Animation/Animation.js';

@@ -12,5 +12,5 @@ export { default as AnimationViewModel } from './Source/Animation/AnimationViewModel.js';

export { default as BaseLayerPickerViewModel } from './Source/BaseLayerPicker/BaseLayerPickerViewModel.js';
export { default as ProviderViewModel } from './Source/BaseLayerPicker/ProviderViewModel.js';
export { default as createDefaultImageryProviderViewModels } from './Source/BaseLayerPicker/createDefaultImageryProviderViewModels.js';
export { default as createDefaultTerrainProviderViewModels } from './Source/BaseLayerPicker/createDefaultTerrainProviderViewModels.js';
export { default as ProviderViewModel } from './Source/BaseLayerPicker/ProviderViewModel.js';
export { default as Cesium3DTilesInspector } from './Source/Cesium3DTilesInspector/Cesium3DTilesInspector.js';

@@ -22,8 +22,8 @@ export { default as Cesium3DTilesInspectorViewModel } from './Source/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModel.js';

export { default as FullscreenButtonViewModel } from './Source/FullscreenButton/FullscreenButtonViewModel.js';
export { default as Geocoder } from './Source/Geocoder/Geocoder.js';
export { default as GeocoderViewModel } from './Source/Geocoder/GeocoderViewModel.js';
export { default as HomeButton } from './Source/HomeButton/HomeButton.js';
export { default as HomeButtonViewModel } from './Source/HomeButton/HomeButtonViewModel.js';
export { default as InfoBox } from './Source/InfoBox/InfoBox.js';
export { default as InfoBoxViewModel } from './Source/InfoBox/InfoBoxViewModel.js';
export { default as HomeButton } from './Source/HomeButton/HomeButton.js';
export { default as HomeButtonViewModel } from './Source/HomeButton/HomeButtonViewModel.js';
export { default as Geocoder } from './Source/Geocoder/Geocoder.js';
export { default as GeocoderViewModel } from './Source/Geocoder/GeocoderViewModel.js';
export { default as NavigationHelpButton } from './Source/NavigationHelpButton/NavigationHelpButton.js';

@@ -39,8 +39,8 @@ export { default as NavigationHelpButtonViewModel } from './Source/NavigationHelpButton/NavigationHelpButtonViewModel.js';

export { default as SelectionIndicatorViewModel } from './Source/SelectionIndicator/SelectionIndicatorViewModel.js';
export { default as knockout_3_5_1 } from './Source/ThirdParty/knockout-3.5.1.js';
export { default as knockout_es5 } from './Source/ThirdParty/knockout-es5.js';
export { default as knockout } from './Source/ThirdParty/knockout.js';
export { default as Timeline } from './Source/Timeline/Timeline.js';
export { default as TimelineHighlightRange } from './Source/Timeline/TimelineHighlightRange.js';
export { default as TimelineTrack } from './Source/Timeline/TimelineTrack.js';
export { default as knockout_3_5_1 } from './Source/ThirdParty/knockout-3.5.1.js';
export { default as knockout_es5 } from './Source/ThirdParty/knockout-es5.js';
export { default as knockout } from './Source/ThirdParty/knockout.js';
export { default as VRButton } from './Source/VRButton/VRButton.js';

@@ -53,1 +53,4 @@ export { default as VRButtonViewModel } from './Source/VRButton/VRButtonViewModel.js';

export { default as viewerPerformanceWatchdogMixin } from './Source/Viewer/viewerPerformanceWatchdogMixin.js';
export { default as viewerVoxelInspectorMixin } from './Source/Viewer/viewerVoxelInspectorMixin.js';
export { default as VoxelInspector } from './Source/VoxelInspector/VoxelInspector.js';
export { default as VoxelInspectorViewModel } from './Source/VoxelInspector/VoxelInspectorViewModel.js';
{
"name": "@cesium/widgets",
"version": "1.0.0",
"version": "1.1.0",
"description": "A widgets library for use with CesiumJS. CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin.",

@@ -31,3 +31,3 @@ "keywords": [

"dependencies": {
"@cesium/engine": "1.0.0",
"@cesium/engine": "1.1.0",
"nosleep.js": "^0.12.0"

@@ -34,0 +34,0 @@ },

@@ -1,8 +0,2 @@

import {
Check,
defaultValue,
defined,
destroyObject,
getElement,
} from "@cesium/engine";
import { Check, destroyObject, getElement } from "@cesium/engine";
import knockout from "../ThirdParty/knockout.js";

@@ -53,3 +47,2 @@ import InspectorShared from "../InspectorShared.js";

const panel = document.createElement("div");
this._panel = panel;
panel.className = "cesium-cesiumInspector-dropDown";

@@ -60,2 +53,4 @@ element.appendChild(panel);

const createCheckbox = InspectorShared.createCheckbox;
const createRangeInput = InspectorShared.createRangeInput;
const createButton = InspectorShared.createButton;

@@ -116,6 +111,6 @@ const tilesetPanelContents = createSection(

tilesetPanelContents.appendChild(
makeButton("togglePickTileset", "Pick Tileset", "pickActive")
createButton("Pick Tileset", "togglePickTileset", "pickActive")
);
tilesetPanelContents.appendChild(
makeButton("trimTilesCache", "Trim Tiles Cache")
createButton("Trim Tiles Cache", "trimTilesCache")
);

@@ -125,3 +120,3 @@ tilesetPanelContents.appendChild(createCheckbox("Enable Picking", "picking"));

displayPanelContents.appendChild(createCheckbox("Colorize", "colorize"));
displayPanelContents.appendChild(
const wireframeCheckbox = displayPanelContents.appendChild(
createCheckbox(

@@ -134,3 +129,3 @@ "Wireframe",

//Create warning text when the Wireframe checkbox is disabled
// Create warning text when the Wireframe checkbox is disabled
const warningText = document.createElement("p");

@@ -147,3 +142,3 @@ warningText.setAttribute(

"Set enableDebugWireframe to true in the tileset constructor to enable this option.";
displayPanelContents.lastChild.appendChild(warningText);
wireframeCheckbox.appendChild(warningText);

@@ -169,9 +164,9 @@ displayPanelContents.appendChild(

pointCloudShadingContainer.appendChild(
makeRangeInput("geometricErrorScale", 0, 2, 0.01, "Geometric Error Scale")
createRangeInput("Geometric Error Scale", "geometricErrorScale", 0, 2, 0.01)
);
pointCloudShadingContainer.appendChild(
makeRangeInput("maximumAttenuation", 0, 32, 1, "Maximum Attenuation")
createRangeInput("Maximum Attenuation", "maximumAttenuation", 0, 32, 1)
);
pointCloudShadingContainer.appendChild(
makeRangeInput("baseResolution", 0, 1, 0.01, "Base Resolution")
createRangeInput("Base Resolution", "baseResolution", 0, 1, 0.01)
);

@@ -186,6 +181,6 @@ pointCloudShadingContainer.appendChild(

edlContainer.appendChild(
makeRangeInput("eyeDomeLightingStrength", 0, 2.0, 0.1, "EDL Strength")
createRangeInput("EDL Strength", "eyeDomeLightingStrength", 0, 2.0, 0.1)
);
edlContainer.appendChild(
makeRangeInput("eyeDomeLightingRadius", 0, 4.0, 0.1, "EDL Radius")
createRangeInput("EDL Radius", "eyeDomeLightingRadius", 0, 4.0, 0.1)
);

@@ -202,8 +197,8 @@ pointCloudShadingContainer.appendChild(edlContainer);

sseContainer.appendChild(
makeRangeInput(
createRangeInput(
"Maximum Screen Space Error",
"maximumScreenSpaceError",
0,
128,
1,
"Maximum Screen Space Error"
1
)

@@ -218,3 +213,4 @@ );

dynamicScreenSpaceErrorContainer.appendChild(
makeRangeInput(
createRangeInput(
"Screen Space Error Density",
"dynamicScreenSpaceErrorDensitySliderValue",

@@ -224,3 +220,2 @@ 0,

0.005,
"Screen Space Error Density",
"dynamicScreenSpaceErrorDensity"

@@ -230,8 +225,8 @@ )

dynamicScreenSpaceErrorContainer.appendChild(
makeRangeInput(
createRangeInput(
"Screen Space Error Factor",
"dynamicScreenSpaceErrorFactor",
1,
10,
0.1,
"Screen Space Error Factor"
0.1
)

@@ -295,3 +290,3 @@ );

stylePanelEditor.appendChild(styleEditor);
const closeStylesBtn = makeButton("compileStyle", "Compile (Ctrl+Enter)");
const closeStylesBtn = createButton("Compile (Ctrl+Enter)", "compileStyle");
stylePanelEditor.appendChild(closeStylesBtn);

@@ -322,3 +317,3 @@ const errorBox = document.createElement("div");

skipScreenSpaceErrorFactorContainer.appendChild(
makeRangeInput("skipScreenSpaceErrorFactor", 1, 50, 1, "Skip SSE Factor")
createRangeInput("Skip SSE Factor", "skipScreenSpaceErrorFactor", 1, 50, 1)
);

@@ -328,8 +323,8 @@ optimizationPanelContents.appendChild(skipScreenSpaceErrorFactorContainer);

baseScreenSpaceError.appendChild(
makeRangeInput(
createRangeInput(
"SSE before skipping LOD",
"baseScreenSpaceError",
0,
4096,
1,
"SSE before skipping LOD"
1
)

@@ -340,3 +335,3 @@ );

skipLevelsContainer.appendChild(
makeRangeInput("skipLevels", 0, 10, 1, "Min. levels to skip")
createRangeInput("Min. levels to skip", "skipLevels", 0, 10, 1)
);

@@ -402,40 +397,2 @@ optimizationPanelContents.appendChild(skipLevelsContainer);

function makeRangeInput(property, min, max, step, text, displayProperty) {
displayProperty = defaultValue(displayProperty, property);
const input = document.createElement("input");
input.setAttribute("data-bind", `value: ${displayProperty}`);
input.type = "number";
const slider = document.createElement("input");
slider.type = "range";
slider.min = min;
slider.max = max;
slider.step = step;
slider.setAttribute("data-bind", `valueUpdate: "input", value: ${property}`);
const wrapper = document.createElement("div");
wrapper.appendChild(slider);
const container = document.createElement("div");
container.className = "cesium-cesiumInspector-slider";
container.appendChild(document.createTextNode(text));
container.appendChild(input);
container.appendChild(wrapper);
return container;
}
function makeButton(action, text, active) {
const button = document.createElement("button");
button.type = "button";
button.textContent = text;
button.className = "cesium-cesiumInspector-pickButton";
let binding = `click: ${action}`;
if (defined(active)) {
binding += `, css: {"cesium-cesiumInspector-pickButtonHighlight" : ${active}}`;
}
button.setAttribute("data-bind", binding);
return button;
}
export default Cesium3DTilesInspector;

@@ -56,3 +56,2 @@ import {

const panel = document.createElement("div");
this._panel = panel;
panel.className = "cesium-cesiumInspector-dropDown";

@@ -59,0 +58,0 @@ element.appendChild(panel);

@@ -1,5 +0,5 @@

import { Check, defined } from "@cesium/engine";
import { Check, defaultValue, defined } from "@cesium/engine";
/**
* A static class with helper functions used by the CesiumInspector and Cesium3DTilesInspector
* A static class with helper functions used by CesiumInspector, Cesium3DTilesInspector, and VoxelInspector
* @private

@@ -86,2 +86,85 @@ */

};
/**
* Creates a range input
* @param {String} rangeText The text to display
* @param {String} sliderValueBinding The name of the variable used for slider value binding
* @param {Number} min The minimum value
* @param {Number} max The maximum value
* @param {Number} [step] The step size. Defaults to "any".
* @param {String} [inputValueBinding] The name of the variable used for input value binding
* @return {Element}
*/
InspectorShared.createRangeInput = function (
rangeText,
sliderValueBinding,
min,
max,
step,
inputValueBinding
) {
//>>includeStart('debug', pragmas.debug);
Check.typeOf.string("rangeText", rangeText);
Check.typeOf.string("sliderValueBinding", sliderValueBinding);
Check.typeOf.number("min", min);
Check.typeOf.number("max", max);
//>>includeEnd('debug');
inputValueBinding = defaultValue(inputValueBinding, sliderValueBinding);
const input = document.createElement("input");
input.setAttribute("data-bind", `value: ${inputValueBinding}`);
input.type = "number";
const slider = document.createElement("input");
slider.type = "range";
slider.min = min;
slider.max = max;
slider.step = defaultValue(step, "any");
slider.setAttribute(
"data-bind",
`valueUpdate: "input", value: ${sliderValueBinding}`
);
const wrapper = document.createElement("div");
wrapper.appendChild(slider);
const container = document.createElement("div");
container.className = "cesium-cesiumInspector-slider";
container.appendChild(document.createTextNode(rangeText));
container.appendChild(input);
container.appendChild(wrapper);
return container;
};
/**
* Creates a button component
* @param {String} buttonText The button text
* @param {String} clickedBinding The name of the variable used for clicked binding
* @param {String} [activeBinding] The name of the variable used for active binding
* @return {Element}
*/
InspectorShared.createButton = function (
buttonText,
clickedBinding,
activeBinding
) {
//>>includeStart('debug', pragmas.debug);
Check.typeOf.string("buttonText", buttonText);
Check.typeOf.string("clickedBinding", clickedBinding);
//>>includeEnd('debug');
const button = document.createElement("button");
button.type = "button";
button.textContent = buttonText;
button.className = "cesium-cesiumInspector-pickButton";
let binding = `click: ${clickedBinding}`;
if (defined(activeBinding)) {
binding += `, css: {"cesium-cesiumInspector-pickButtonHighlight" : ${activeBinding}}`;
}
button.setAttribute("data-bind", binding);
return button;
};
export default InspectorShared;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc