@shapediver/viewer.shared.global-access-objects 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +73 -0
- package/README.md +3 -0
- package/dist/GlobalAccessObjects.d.ts +21 -0
- package/dist/GlobalAccessObjects.d.ts.map +1 -0
- package/dist/GlobalAccessObjects.js +52 -0
- package/dist/GlobalAccessObjects.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/package.json +47 -0
- package/src/GlobalAccessObjects.ts +51 -0
- package/src/index.ts +5 -0
- package/tsconfig.json +17 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
Required Notice: Copyright 2023 ShapeDiver GmbH (https://www.shapediver.com)
|
|
2
|
+
|
|
3
|
+
https://polyformproject.org/licenses/noncommercial/1.0.0
|
|
4
|
+
|
|
5
|
+
Acceptance
|
|
6
|
+
|
|
7
|
+
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
|
|
8
|
+
|
|
9
|
+
Copyright License
|
|
10
|
+
|
|
11
|
+
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor’s copyright in it for any permitted purpose. However, you may only distribute the software according to Distribution License and make changes or new works based on the software according to Changes and New Works License.
|
|
12
|
+
|
|
13
|
+
Distribution License
|
|
14
|
+
|
|
15
|
+
The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by Changes and New Works License.
|
|
16
|
+
|
|
17
|
+
Notices
|
|
18
|
+
|
|
19
|
+
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with Required Notice: that the licensor provided with the software. For example:
|
|
20
|
+
|
|
21
|
+
Required Notice: Copyright 2023 ShapeDiver GmbH (https://www.shapediver.com)
|
|
22
|
+
|
|
23
|
+
Changes and New Works License
|
|
24
|
+
|
|
25
|
+
The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
|
|
26
|
+
|
|
27
|
+
Patent License
|
|
28
|
+
|
|
29
|
+
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
|
|
30
|
+
|
|
31
|
+
Noncommercial Purposes
|
|
32
|
+
|
|
33
|
+
Any noncommercial purpose is a permitted purpose.
|
|
34
|
+
|
|
35
|
+
Personal Uses
|
|
36
|
+
|
|
37
|
+
Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
|
|
38
|
+
|
|
39
|
+
Noncommercial Organizations
|
|
40
|
+
|
|
41
|
+
Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
|
|
42
|
+
|
|
43
|
+
Fair Use
|
|
44
|
+
|
|
45
|
+
You may have “fair use” rights for the software under the law. These terms do not limit them.
|
|
46
|
+
|
|
47
|
+
No Other Rights
|
|
48
|
+
|
|
49
|
+
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
|
|
50
|
+
|
|
51
|
+
Patent Defense
|
|
52
|
+
|
|
53
|
+
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
54
|
+
|
|
55
|
+
Violations
|
|
56
|
+
|
|
57
|
+
The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
|
|
58
|
+
|
|
59
|
+
No Liability
|
|
60
|
+
|
|
61
|
+
As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.
|
|
62
|
+
|
|
63
|
+
Definitions
|
|
64
|
+
|
|
65
|
+
The licensor is the individual or entity offering these terms, and the software is the software the licensor makes available under these terms.
|
|
66
|
+
|
|
67
|
+
You refers to the individual or entity agreeing to these terms.
|
|
68
|
+
|
|
69
|
+
Your company is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. Control means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
70
|
+
|
|
71
|
+
Your licenses are all the licenses granted to you for the software under these terms.
|
|
72
|
+
|
|
73
|
+
Use means anything you do with the software requiring one of your licenses.
|
package/README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ShapeDiverResponseOutputContent } from "@shapediver/sdk.geometry-api-sdk-v2";
|
|
2
|
+
import { ITreeNode } from "@shapediver/viewer.shared.node-tree";
|
|
3
|
+
import { ITag3D } from "@shapediver/viewer.data-engine.shared-types";
|
|
4
|
+
export declare class GlobalAccessObjects {
|
|
5
|
+
#private;
|
|
6
|
+
private static _instance;
|
|
7
|
+
static get instance(): GlobalAccessObjects;
|
|
8
|
+
get combineTextures(): ((red?: HTMLImageElement | ArrayBuffer, green?: HTMLImageElement | ArrayBuffer, blue?: HTMLImageElement | ArrayBuffer) => Promise<{
|
|
9
|
+
image: HTMLImageElement | ArrayBuffer;
|
|
10
|
+
blob: Blob;
|
|
11
|
+
}>) | undefined;
|
|
12
|
+
set combineTextures(value: ((red?: HTMLImageElement | ArrayBuffer, green?: HTMLImageElement | ArrayBuffer, blue?: HTMLImageElement | ArrayBuffer) => Promise<{
|
|
13
|
+
image: HTMLImageElement | ArrayBuffer;
|
|
14
|
+
blob: Blob;
|
|
15
|
+
}>) | undefined);
|
|
16
|
+
get loadContent(): ((content: ShapeDiverResponseOutputContent, jwtToken?: string, taskEventId?: string) => Promise<ITreeNode>) | undefined;
|
|
17
|
+
set loadContent(value: ((content: ShapeDiverResponseOutputContent, jwtToken?: string, taskEventId?: string) => Promise<ITreeNode>) | undefined);
|
|
18
|
+
get loadTag3D(): ((tag3dInfo: ITag3D) => ITreeNode | undefined) | undefined;
|
|
19
|
+
set loadTag3D(value: ((tag3dInfo: ITag3D) => ITreeNode | undefined) | undefined);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=GlobalAccessObjects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlobalAccessObjects.d.ts","sourceRoot":"","sources":["../src/GlobalAccessObjects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AACtF,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,6CAA6C,CAAC;AAErE,qBAAa,mBAAmB;;IAG5B,OAAO,CAAC,MAAM,CAAC,SAAS,CAAsB;IAU9C,WAAkB,QAAQ,wBAEzB;IAMD,IAAW,eAAe,IAIQ,CAAC,CAAC,GAAG,CAAC,EAAE,gBAAgB,GAAG,WAAW,EAAE,KAAK,CAAC,EAAE,gBAAgB,GAAG,WAAW,EAAE,IAAI,CAAC,EAAE,gBAAgB,GAAG,WAAW,KAAK,OAAO,CAAC;QAAE,KAAK,EAAE,gBAAgB,GAAG,WAAW,CAAC;QAAC,IAAI,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC,GAAG,SAAS,CAFtO;IAED,IAAW,eAAe,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,gBAAgB,GAAG,WAAW,EAAE,KAAK,CAAC,EAAE,gBAAgB,GAAG,WAAW,EAAE,IAAI,CAAC,EAAE,gBAAgB,GAAG,WAAW,KAAK,OAAO,CAAC;QAAE,KAAK,EAAE,gBAAgB,GAAG,WAAW,CAAC;QAAC,IAAI,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC,GAAG,SAAS,EAEtO;IAED,IAAW,WAAW,IAIQ,CAAC,CAAC,OAAO,EAAE,+BAA+B,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC,GAAG,SAAS,CAFpJ;IAED,IAAW,WAAW,CAAC,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,+BAA+B,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC,GAAG,SAAS,EAEpJ;IAED,IAAW,SAAS,IAIQ,CAAC,CAAC,SAAS,EAAE,MAAM,KAAK,SAAS,GAAG,SAAS,CAAC,GAAG,SAAS,CAFrF;IAED,IAAW,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,SAAS,EAAE,MAAM,KAAK,SAAS,GAAG,SAAS,CAAC,GAAG,SAAS,EAErF;CAGJ"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
8
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
11
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
12
|
+
};
|
|
13
|
+
var _GlobalAccessObjects_combineTextures, _GlobalAccessObjects_loadContent, _GlobalAccessObjects_loadTag3D;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.GlobalAccessObjects = void 0;
|
|
16
|
+
class GlobalAccessObjects {
|
|
17
|
+
constructor() {
|
|
18
|
+
// #region Properties (4)
|
|
19
|
+
_GlobalAccessObjects_combineTextures.set(this, void 0);
|
|
20
|
+
_GlobalAccessObjects_loadContent.set(this, void 0);
|
|
21
|
+
_GlobalAccessObjects_loadTag3D.set(this, void 0);
|
|
22
|
+
// #endregion Public Getters And Setters (6)
|
|
23
|
+
}
|
|
24
|
+
// #endregion Properties (4)
|
|
25
|
+
// #region Public Static Getters And Setters (1)
|
|
26
|
+
static get instance() {
|
|
27
|
+
return this._instance || (this._instance = new this());
|
|
28
|
+
}
|
|
29
|
+
// #endregion Public Static Getters And Setters (1)
|
|
30
|
+
// #region Public Getters And Setters (6)
|
|
31
|
+
get combineTextures() {
|
|
32
|
+
return __classPrivateFieldGet(this, _GlobalAccessObjects_combineTextures, "f");
|
|
33
|
+
}
|
|
34
|
+
set combineTextures(value) {
|
|
35
|
+
__classPrivateFieldSet(this, _GlobalAccessObjects_combineTextures, value, "f");
|
|
36
|
+
}
|
|
37
|
+
get loadContent() {
|
|
38
|
+
return __classPrivateFieldGet(this, _GlobalAccessObjects_loadContent, "f");
|
|
39
|
+
}
|
|
40
|
+
set loadContent(value) {
|
|
41
|
+
__classPrivateFieldSet(this, _GlobalAccessObjects_loadContent, value, "f");
|
|
42
|
+
}
|
|
43
|
+
get loadTag3D() {
|
|
44
|
+
return __classPrivateFieldGet(this, _GlobalAccessObjects_loadTag3D, "f");
|
|
45
|
+
}
|
|
46
|
+
set loadTag3D(value) {
|
|
47
|
+
__classPrivateFieldSet(this, _GlobalAccessObjects_loadTag3D, value, "f");
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.GlobalAccessObjects = GlobalAccessObjects;
|
|
51
|
+
_GlobalAccessObjects_combineTextures = new WeakMap(), _GlobalAccessObjects_loadContent = new WeakMap(), _GlobalAccessObjects_loadTag3D = new WeakMap();
|
|
52
|
+
//# sourceMappingURL=GlobalAccessObjects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlobalAccessObjects.js","sourceRoot":"","sources":["../src/GlobalAccessObjects.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAIA,MAAa,mBAAmB;IAAhC;QACI,yBAAyB;QAIzB,uDAA2M;QAC3M,mDAAyH;QACzH,iDAA0D;QAsC1D,4CAA4C;IAChD,CAAC;IArCG,4BAA4B;IAE5B,gDAAgD;IAEzC,MAAM,KAAK,QAAQ;QACtB,OAAO,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED,mDAAmD;IAEnD,yCAAyC;IAEzC,IAAW,eAAe;QACtB,OAAO,uBAAA,IAAI,4CAAiB,CAAC;IACjC,CAAC;IAED,IAAW,eAAe,CAAC,KAA4M;QACnO,uBAAA,IAAI,wCAAoB,KAAK,MAAA,CAAC;IAClC,CAAC;IAED,IAAW,WAAW;QAClB,OAAO,uBAAA,IAAI,wCAAa,CAAC;IAC7B,CAAC;IAED,IAAW,WAAW,CAAC,KAA8H;QACjJ,uBAAA,IAAI,oCAAgB,KAAK,MAAA,CAAC;IAC9B,CAAC;IAED,IAAW,SAAS;QAChB,OAAO,uBAAA,IAAI,sCAAW,CAAC;IAC3B,CAAC;IAED,IAAW,SAAS,CAAC,KAAiE;QAClF,uBAAA,IAAI,kCAAc,KAAK,MAAA,CAAC;IAC5B,CAAC;CAGJ;AA9CD,kDA8CC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EACH,mBAAmB,EACtB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GlobalAccessObjects = void 0;
|
|
4
|
+
const GlobalAccessObjects_1 = require("./GlobalAccessObjects");
|
|
5
|
+
Object.defineProperty(exports, "GlobalAccessObjects", { enumerable: true, get: function () { return GlobalAccessObjects_1.GlobalAccessObjects; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,+DAA4D;AAGxD,oGAHK,yCAAmB,OAGL"}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@shapediver/viewer.shared.global-access-objects",
|
|
3
|
+
"version": "3.0.5",
|
|
4
|
+
"description": "",
|
|
5
|
+
"keywords": [],
|
|
6
|
+
"author": "Michael Oppitz <michael@shapediver.com>",
|
|
7
|
+
"license": "polyform-noncommercial-1.0.0",
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"directories": {
|
|
10
|
+
"test": "__tests__"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"src",
|
|
15
|
+
"package.json",
|
|
16
|
+
"README.md",
|
|
17
|
+
"tsconfig.json"
|
|
18
|
+
],
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/shapediver/Viewer.git"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"check": "tsc --noEmit",
|
|
28
|
+
"build": "bash ../../scripts/building/build.sh",
|
|
29
|
+
"build-watch": "bash ../../scripts/building/build-watch.sh",
|
|
30
|
+
"build-dep": "bash ../../scripts/building/build-dep.sh"
|
|
31
|
+
},
|
|
32
|
+
"bugs": {
|
|
33
|
+
"url": "https://github.com/shapediver/Viewer/issues"
|
|
34
|
+
},
|
|
35
|
+
"homepage": "https://github.com/shapediver/Viewer#readme",
|
|
36
|
+
"typings": "dist/index.d.ts",
|
|
37
|
+
"jest": {
|
|
38
|
+
"preset": "ts-jest",
|
|
39
|
+
"testEnvironment": "node"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@shapediver/sdk.geometry-api-sdk-v2": "1.8.2",
|
|
43
|
+
"@shapediver/viewer.data-engine.shared-types": "3.0.5",
|
|
44
|
+
"@shapediver/viewer.shared.node-tree": "3.0.5"
|
|
45
|
+
},
|
|
46
|
+
"gitHead": "e2425f80b2b03354c46ae7daa418bf591d250a78"
|
|
47
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ShapeDiverResponseOutputContent } from "@shapediver/sdk.geometry-api-sdk-v2";
|
|
2
|
+
import { ITreeNode } from "@shapediver/viewer.shared.node-tree";
|
|
3
|
+
import { ITag3D } from "@shapediver/viewer.data-engine.shared-types";
|
|
4
|
+
|
|
5
|
+
export class GlobalAccessObjects {
|
|
6
|
+
// #region Properties (4)
|
|
7
|
+
|
|
8
|
+
private static _instance: GlobalAccessObjects;
|
|
9
|
+
|
|
10
|
+
#combineTextures?: (red?: HTMLImageElement | ArrayBuffer, green?: HTMLImageElement | ArrayBuffer, blue?: HTMLImageElement | ArrayBuffer) => Promise<{ image: HTMLImageElement | ArrayBuffer, blob: Blob }>;
|
|
11
|
+
#loadContent?: (content: ShapeDiverResponseOutputContent, jwtToken?: string, taskEventId?: string) => Promise<ITreeNode>;
|
|
12
|
+
#loadTag3D?: (tag3dInfo: ITag3D) => ITreeNode | undefined;
|
|
13
|
+
|
|
14
|
+
// #endregion Properties (4)
|
|
15
|
+
|
|
16
|
+
// #region Public Static Getters And Setters (1)
|
|
17
|
+
|
|
18
|
+
public static get instance() {
|
|
19
|
+
return this._instance || (this._instance = new this());
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// #endregion Public Static Getters And Setters (1)
|
|
23
|
+
|
|
24
|
+
// #region Public Getters And Setters (6)
|
|
25
|
+
|
|
26
|
+
public get combineTextures() {
|
|
27
|
+
return this.#combineTextures;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
public set combineTextures(value: ((red?: HTMLImageElement | ArrayBuffer, green?: HTMLImageElement | ArrayBuffer, blue?: HTMLImageElement | ArrayBuffer) => Promise<{ image: HTMLImageElement | ArrayBuffer, blob: Blob }>) | undefined) {
|
|
31
|
+
this.#combineTextures = value;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
public get loadContent() {
|
|
35
|
+
return this.#loadContent;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
public set loadContent(value: ((content: ShapeDiverResponseOutputContent, jwtToken?: string, taskEventId?: string) => Promise<ITreeNode>) | undefined) {
|
|
39
|
+
this.#loadContent = value;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
public get loadTag3D() {
|
|
43
|
+
return this.#loadTag3D;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
public set loadTag3D(value: ((tag3dInfo: ITag3D) => ITreeNode | undefined) | undefined) {
|
|
47
|
+
this.#loadTag3D = value;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// #endregion Public Getters And Setters (6)
|
|
51
|
+
}
|
package/src/index.ts
ADDED
package/tsconfig.json
ADDED