@shapediver/viewer.shared.services
Advanced tools
Comparing version 1.8.7 to 1.8.8
@@ -6,5 +6,2 @@ export declare enum CAMERA { | ||
} | ||
export declare enum ENVIRONMENTMAP { | ||
ENVIRONMENTMAP_LOADED = "environmentmap.loaded" | ||
} | ||
export declare enum RENDERING { | ||
@@ -18,3 +15,2 @@ BEAUTY_RENDERING_FINISHED = "rendering.beautyrenderingfinished" | ||
VIEWER_CREATED = "viewer.created", | ||
VIEWER_INITIALIZED = "viewer.initialized", | ||
VIEWER_UPDATED = "viewer.updated", | ||
@@ -25,11 +21,6 @@ VIEWER_CLOSED = "viewer.closed" | ||
SESSION_CREATED = "session.created", | ||
SESSION_INITIALIZED = "session.initialized", | ||
SESSION_LOADED = "session.loaded", | ||
SESSION_CUSTOMIZED = "session.customized", | ||
SESSION_INITIAL_OUTPUTS_LOADED = "session.initialOutputsLoaded", | ||
SESSION_CLOSED = "session.closed" | ||
} | ||
export declare enum SETTINGS { | ||
SETTINGS_REGISTERED = "settings.registered", | ||
SETTINGS_REGISTERED_EXTERNAL = "settings.registered.external", | ||
SETTINGS_UPDATE = "settings.update" | ||
@@ -48,3 +39,2 @@ } | ||
CAMERA: typeof CAMERA; | ||
ENVIRONMENTMAP: typeof ENVIRONMENTMAP; | ||
RENDERING: typeof RENDERING; | ||
@@ -57,3 +47,3 @@ SCENE: typeof SCENE; | ||
}; | ||
export declare type MAINEVENTTYPE = typeof CAMERA | typeof ENVIRONMENTMAP | typeof RENDERING | typeof SCENE | typeof SESSION | typeof SETTINGS | typeof VIEWER | typeof INTERACTION; | ||
export declare type MAINEVENTTYPE = typeof CAMERA | typeof RENDERING | typeof SCENE | typeof SESSION | typeof SETTINGS | typeof VIEWER | typeof INTERACTION; | ||
//# sourceMappingURL=EventTypes.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EVENTTYPE = exports.INTERACTION = exports.SETTINGS = exports.SESSION = exports.VIEWER = exports.SCENE = exports.RENDERING = exports.ENVIRONMENTMAP = exports.CAMERA = void 0; | ||
exports.EVENTTYPE = exports.INTERACTION = exports.SETTINGS = exports.SESSION = exports.VIEWER = exports.SCENE = exports.RENDERING = exports.CAMERA = void 0; | ||
var CAMERA; | ||
@@ -10,6 +10,2 @@ (function (CAMERA) { | ||
})(CAMERA = exports.CAMERA || (exports.CAMERA = {})); | ||
var ENVIRONMENTMAP; | ||
(function (ENVIRONMENTMAP) { | ||
ENVIRONMENTMAP["ENVIRONMENTMAP_LOADED"] = "environmentmap.loaded"; | ||
})(ENVIRONMENTMAP = exports.ENVIRONMENTMAP || (exports.ENVIRONMENTMAP = {})); | ||
var RENDERING; | ||
@@ -26,3 +22,2 @@ (function (RENDERING) { | ||
VIEWER["VIEWER_CREATED"] = "viewer.created"; | ||
VIEWER["VIEWER_INITIALIZED"] = "viewer.initialized"; | ||
VIEWER["VIEWER_UPDATED"] = "viewer.updated"; | ||
@@ -34,6 +29,3 @@ VIEWER["VIEWER_CLOSED"] = "viewer.closed"; | ||
SESSION["SESSION_CREATED"] = "session.created"; | ||
SESSION["SESSION_INITIALIZED"] = "session.initialized"; | ||
SESSION["SESSION_LOADED"] = "session.loaded"; | ||
SESSION["SESSION_CUSTOMIZED"] = "session.customized"; | ||
SESSION["SESSION_INITIAL_OUTPUTS_LOADED"] = "session.initialOutputsLoaded"; | ||
SESSION["SESSION_CLOSED"] = "session.closed"; | ||
@@ -43,4 +35,2 @@ })(SESSION = exports.SESSION || (exports.SESSION = {})); | ||
(function (SETTINGS) { | ||
SETTINGS["SETTINGS_REGISTERED"] = "settings.registered"; | ||
SETTINGS["SETTINGS_REGISTERED_EXTERNAL"] = "settings.registered.external"; | ||
SETTINGS["SETTINGS_UPDATE"] = "settings.update"; | ||
@@ -60,3 +50,2 @@ })(SETTINGS = exports.SETTINGS || (exports.SETTINGS = {})); | ||
CAMERA, | ||
ENVIRONMENTMAP, | ||
RENDERING, | ||
@@ -63,0 +52,0 @@ SCENE, |
@@ -19,5 +19,6 @@ import { EventEngine } from './event-engine/EventEngine'; | ||
import { MimeTypeUtils } from './mime-type-utils/MimeTypeUtils'; | ||
import { StatePromise } from './state-engine/StatePromise'; | ||
export { EventEngine, EVENTTYPE, MAINEVENTTYPE, IEvent }; | ||
export { SettingsEngine }; | ||
export { StateEngine }; | ||
export { StateEngine, StatePromise }; | ||
export { SystemInfo }; | ||
@@ -24,0 +25,0 @@ export { IDomEventListener, DomEventEngine }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MimeTypeUtils = exports.PerformanceEvaluator = exports.SDError = exports.LOGGINGTOPIC = exports.LOGGINGLEVEL = exports.Logger = exports.InputValidator = exports.TypeChecker = exports.Converter = exports.UuidGenerator = exports.ImageLoader = exports.HttpClient = exports.DomEventEngine = exports.SystemInfo = exports.StateEngine = exports.SettingsEngine = exports.EVENTTYPE = exports.EventEngine = void 0; | ||
exports.MimeTypeUtils = exports.PerformanceEvaluator = exports.SDError = exports.LOGGINGTOPIC = exports.LOGGINGLEVEL = exports.Logger = exports.InputValidator = exports.TypeChecker = exports.Converter = exports.UuidGenerator = exports.ImageLoader = exports.HttpClient = exports.DomEventEngine = exports.SystemInfo = exports.StatePromise = exports.StateEngine = exports.SettingsEngine = exports.EVENTTYPE = exports.EventEngine = void 0; | ||
const EventEngine_1 = require("./event-engine/EventEngine"); | ||
@@ -38,2 +38,4 @@ Object.defineProperty(exports, "EventEngine", { enumerable: true, get: function () { return EventEngine_1.EventEngine; } }); | ||
Object.defineProperty(exports, "MimeTypeUtils", { enumerable: true, get: function () { return MimeTypeUtils_1.MimeTypeUtils; } }); | ||
const StatePromise_1 = require("./state-engine/StatePromise"); | ||
Object.defineProperty(exports, "StatePromise", { enumerable: true, get: function () { return StatePromise_1.StatePromise; } }); | ||
//# sourceMappingURL=index.js.map |
@@ -13,3 +13,2 @@ "use strict"; | ||
const EventEngine_1 = require("../event-engine/EventEngine"); | ||
const EventTypes_1 = require("../event-engine/EventTypes"); | ||
const Logger_1 = require("../logger/Logger"); | ||
@@ -102,3 +101,2 @@ const SDError_1 = require("../logger/SDError"); | ||
this._settings = viewer_settings_1.DefaultsV3(); | ||
this._eventEngine.emitEvent(EventTypes_1.EVENTTYPE.SETTINGS.SETTINGS_REGISTERED, { sessionId }); | ||
} | ||
@@ -108,3 +106,2 @@ else { | ||
this.cleanSettings(this._settings); | ||
this._eventEngine.emitEvent(EventTypes_1.EVENTTYPE.SETTINGS.SETTINGS_REGISTERED, { sessionId }); | ||
} | ||
@@ -114,3 +111,2 @@ } | ||
this._settings = viewer_settings_1.DefaultsV3(); | ||
this._eventEngine.emitEvent(EventTypes_1.EVENTTYPE.SETTINGS.SETTINGS_REGISTERED, { sessionId: '' }); | ||
} | ||
@@ -117,0 +113,0 @@ cleanSettings(json) { |
import { StatePromise } from './StatePromise'; | ||
export declare class StateEngine { | ||
private readonly _boundingBoxCreated; | ||
private readonly _customStates; | ||
private readonly _eventEngine; | ||
private readonly _boundingBoxCreated; | ||
private readonly _primarySessionLoaded; | ||
private readonly _primarySessionInitialOutputsLoaded; | ||
private readonly _primarySettingsRegistered; | ||
private readonly _firstViewerShown; | ||
private readonly _fontLoaded; | ||
private readonly _customStates; | ||
private readonly _primarySessionAvailable; | ||
private readonly _sessions; | ||
private readonly _viewers; | ||
constructor(); | ||
get primarySettingsRegistered(): StatePromise<boolean>; | ||
get boundingBoxCreated(): StatePromise<boolean>; | ||
get primarySessionLoaded(): StatePromise<boolean>; | ||
get primarySessionInitialOutputsLoaded(): StatePromise<boolean>; | ||
get firstViewerShown(): StatePromise<boolean>; | ||
get fontLoaded(): StatePromise<boolean>; | ||
getCustomState(id: string): StatePromise<boolean>; | ||
createCustomState(id: string): StatePromise<boolean>; | ||
get primarySessionAvailable(): StatePromise<boolean>; | ||
get primarySession(): { | ||
id: string; | ||
primary: boolean; | ||
initialized: StatePromise<boolean>; | ||
settingsRegistered: StatePromise<boolean>; | ||
} | null; | ||
get sessions(): { | ||
[key: string]: { | ||
id: string; | ||
primary: boolean; | ||
initialized: StatePromise<boolean>; | ||
settingsRegistered: StatePromise<boolean>; | ||
}; | ||
}; | ||
get viewers(): { | ||
[key: string]: { | ||
id: string; | ||
initialized: StatePromise<boolean>; | ||
settingsLoaded: StatePromise<boolean>; | ||
environmentMapLoaded: StatePromise<boolean>; | ||
}; | ||
}; | ||
} | ||
//# sourceMappingURL=StateEngine.d.ts.map |
@@ -18,36 +18,31 @@ "use strict"; | ||
constructor() { | ||
this._customStates = {}; | ||
this._eventEngine = tsyringe_1.container.resolve(index_1.EventEngine); | ||
this._customStates = {}; | ||
this._primarySettingsRegistered = new StatePromise_1.StatePromise(); | ||
this._sessions = {}; | ||
this._viewers = {}; | ||
this._boundingBoxCreated = new StatePromise_1.StatePromise(); | ||
this._primarySessionLoaded = new StatePromise_1.StatePromise(); | ||
this._primarySessionInitialOutputsLoaded = new StatePromise_1.StatePromise(); | ||
this._firstViewerShown = new StatePromise_1.StatePromise(); | ||
this._fontLoaded = new StatePromise_1.StatePromise(); | ||
this._primarySessionAvailable = new StatePromise_1.StatePromise(); | ||
} | ||
get primarySettingsRegistered() { | ||
return this._primarySettingsRegistered; | ||
} | ||
get boundingBoxCreated() { | ||
return this._boundingBoxCreated; | ||
} | ||
get primarySessionLoaded() { | ||
return this._primarySessionLoaded; | ||
get fontLoaded() { | ||
return this._fontLoaded; | ||
} | ||
get primarySessionInitialOutputsLoaded() { | ||
return this._primarySessionInitialOutputsLoaded; | ||
get primarySessionAvailable() { | ||
return this._primarySessionAvailable; | ||
} | ||
get firstViewerShown() { | ||
return this._firstViewerShown; | ||
get primarySession() { | ||
for (let s in this.sessions) | ||
if (this.sessions[s].primary) | ||
return this.sessions[s]; | ||
return null; | ||
} | ||
get fontLoaded() { | ||
return this._fontLoaded; | ||
get sessions() { | ||
return this._sessions; | ||
} | ||
getCustomState(id) { | ||
return this._customStates[id]; | ||
get viewers() { | ||
return this._viewers; | ||
} | ||
createCustomState(id) { | ||
this._customStates[id] = new StatePromise_1.StatePromise(); | ||
return this._customStates[id]; | ||
} | ||
}; | ||
@@ -54,0 +49,0 @@ StateEngine = __decorate([ |
{ | ||
"name": "@shapediver/viewer.shared.services", | ||
"version": "1.8.7", | ||
"version": "1.8.8", | ||
"description": "", | ||
@@ -43,3 +43,3 @@ "keywords": [], | ||
"@shapediver/viewer.settings": "*", | ||
"@shapediver/viewer.shared.build-data": "^1.8.7", | ||
"@shapediver/viewer.shared.build-data": "^1.8.8", | ||
"@types/ua-parser-js": "^0.7.36", | ||
@@ -53,3 +53,3 @@ "@types/uuid": "^8.3.0", | ||
}, | ||
"gitHead": "dc7d441449a7d513232e9d09e895b228bd2421f5" | ||
"gitHead": "8c8f5871d266791e35f863ca103d52a3530cb6f4" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
734
7
193010
2180