@shapediver/viewer.settings
Advanced tools
Comparing version 0.4.3 to 0.5.0
@@ -26,2 +26,7 @@ import { IGlobalSettings } from "./interfaces/IGlobalSettings"; | ||
import { IAmbientLightProperties as IAmbientLightPropertiesV3_4, IDirectionalLightProperties as IDirectionalLightPropertiesV3_4, IHemisphereLightProperties as IHemisphereLightPropertiesV3_4, ILightSceneSettings as ILightSceneSettingsV3_4, IPointLightProperties as IPointLightPropertiesV3_4, ISpotLightProperties as ISpotLightPropertiesV3_4 } from "./versions/v3/ILightSceneSettings"; | ||
import { ISettings as ISettingsV4_0 } from "./versions/v4_0/ISettings"; | ||
import { Defaults as DefaultsV4_0 } from "./versions/v4_0/Defaults"; | ||
import { ICameraSettings as ICameraSettingsV4_0, IOrbitControlsSettings as IOrbitControlsSettingsV4_0, IOrthographicCameraSettings as IOrthographicCameraSettingsV4_0, IOrthographicControlsSettings as IOrthographicControlsSettingsV4_0, IPerspectiveCameraSettings as IPerspectiveCameraSettingsV4_0 } from "./versions/v3/ICameraSettings"; | ||
import { IAmbientLightProperties as IAmbientLightPropertiesV4_0, IDirectionalLightProperties as IDirectionalLightPropertiesV4_0, IHemisphereLightProperties as IHemisphereLightPropertiesV4_0, ILightSceneSettings as ILightSceneSettingsV4_0, IPointLightProperties as IPointLightPropertiesV4_0, ISpotLightProperties as ISpotLightPropertiesV4_0 } from "./versions/v3/ILightSceneSettings"; | ||
import { IPostProcessingEffectsArray as IPostProcessingEffectsArrayV4_0 } from "./versions/v4_0/IPostProcessingEffectSettings"; | ||
export { ISettingsV1, DefaultsV1 }; | ||
@@ -34,7 +39,9 @@ export { ISettingsV2, DefaultsV2 }; | ||
export { ISettingsV3_4, DefaultsV3_4, ICameraSettingsV3_4, IOrthographicCameraSettingsV3_4, IPerspectiveCameraSettingsV3_4, IOrbitControlsSettingsV3_4, IOrthographicControlsSettingsV3_4, ILightSceneSettingsV3_4, IAmbientLightPropertiesV3_4, IDirectionalLightPropertiesV3_4, IHemisphereLightPropertiesV3_4, IPointLightPropertiesV3_4, ISpotLightPropertiesV3_4 }; | ||
export declare type versions = '1.0' | '2.0' | '3.0' | '3.1' | '3.2' | '3.3' | '3.4'; | ||
export { ISettingsV4_0, DefaultsV4_0, ICameraSettingsV4_0, IOrthographicCameraSettingsV4_0, IPerspectiveCameraSettingsV4_0, IOrbitControlsSettingsV4_0, IOrthographicControlsSettingsV4_0, ILightSceneSettingsV4_0, IAmbientLightPropertiesV4_0, IDirectionalLightPropertiesV4_0, IHemisphereLightPropertiesV4_0, IPointLightPropertiesV4_0, ISpotLightPropertiesV4_0, IPostProcessingEffectsArrayV4_0 }; | ||
export { ISettingsV4_0 as ISettings, DefaultsV4_0 as Defaults, ICameraSettingsV4_0 as ICameraSettings, IOrthographicCameraSettingsV4_0 as IOrthographicCameraSettings, IPerspectiveCameraSettingsV4_0 as IPerspectiveCameraSettings, IOrbitControlsSettingsV4_0 as IOrbitControlsSettings, IOrthographicControlsSettingsV4_0 as IOrthographicControlsSettings, ILightSceneSettingsV4_0 as ILightSceneSettings, IAmbientLightPropertiesV4_0 as IAmbientLightProperties, IDirectionalLightPropertiesV4_0 as IDirectionalLightProperties, IHemisphereLightPropertiesV4_0 as IHemisphereLightProperties, IPointLightPropertiesV4_0 as IPointLightProperties, ISpotLightPropertiesV4_0 as ISpotLightProperties, IPostProcessingEffectsArrayV4_0 as IPostProcessingEffectsArray }; | ||
export declare type versions = '1.0' | '2.0' | '3.0' | '3.1' | '3.2' | '3.3' | '3.4' | '4.0'; | ||
export declare const convert: (settings: any, targetVersion: versions) => IGlobalSettings; | ||
export declare const validate: (settings: any, targetVersion?: versions | undefined) => void; | ||
export declare const evaluateSettingsVersion: (viewerVersion?: string | undefined) => versions; | ||
export declare const latestVersion = "3.4"; | ||
export declare const latestVersion = "4.0"; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.latestVersion = exports.evaluateSettingsVersion = exports.validate = exports.convert = exports.DefaultsV3_4 = exports.DefaultsV3_3 = exports.DefaultsV3_2 = exports.DefaultsV3_1 = exports.DefaultsV3 = exports.DefaultsV2 = exports.DefaultsV1 = void 0; | ||
exports.latestVersion = exports.evaluateSettingsVersion = exports.validate = exports.convert = exports.Defaults = exports.DefaultsV4_0 = exports.DefaultsV3_4 = exports.DefaultsV3_3 = exports.DefaultsV3_2 = exports.DefaultsV3_1 = exports.DefaultsV3 = exports.DefaultsV2 = exports.DefaultsV1 = void 0; | ||
const Defaults_1 = require("./versions/v1/Defaults"); | ||
@@ -31,2 +31,7 @@ Object.defineProperty(exports, "DefaultsV1", { enumerable: true, get: function () { return Defaults_1.Defaults; } }); | ||
const Converter_6 = require("./versions/v3_4/Converter"); | ||
const Defaults_8 = require("./versions/v4_0/Defaults"); | ||
Object.defineProperty(exports, "DefaultsV4_0", { enumerable: true, get: function () { return Defaults_8.Defaults; } }); | ||
Object.defineProperty(exports, "Defaults", { enumerable: true, get: function () { return Defaults_8.Defaults; } }); | ||
const Validator_8 = require("./versions/v4_0/Validator"); | ||
const Converter_7 = require("./versions/v4_0/Converter"); | ||
let settingsUtilities = []; | ||
@@ -82,2 +87,9 @@ settingsUtilities.push({ | ||
}); | ||
settingsUtilities.push({ | ||
version: '4.0', | ||
defaults: Defaults_8.Defaults, | ||
convertToPrevious: Converter_7.convertToPrevious, | ||
convertFromPrevious: Converter_7.convertFromPrevious, | ||
validate: Validator_8.validate | ||
}); | ||
const convert = (settings, targetVersion) => { | ||
@@ -137,2 +149,5 @@ const original_version = settings.settings_version || '1.0'; | ||
const upgradeVersions = viewerVersion.split('.'); | ||
if ((+upgradeVersions[1] === 2 && +upgradeVersions[2] >= 10) || +upgradeVersions[1] > 2) { | ||
return '4.0'; | ||
} | ||
if ((+upgradeVersions[1] === 2 && +upgradeVersions[2] >= 9) || +upgradeVersions[1] > 2) { | ||
@@ -157,3 +172,3 @@ return '3.4'; | ||
exports.evaluateSettingsVersion = evaluateSettingsVersion; | ||
exports.latestVersion = '3.4'; | ||
exports.latestVersion = '4.0'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@shapediver/viewer.settings", | ||
"version": "0.4.3", | ||
"version": "0.5.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "license": "polyform-noncommercial-1.0.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
448250
146
4505