@colijnit/configuratorcore 262.1.0 → 262.1.1

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/README.md ADDED
@@ -0,0 +1,93 @@
1
+ # ConfiguratorCore
2
+
3
+
4
+
5
+ ## Getting started
6
+
7
+ To make it easy for you to get started with GitLab, here's a list of recommended next steps.
8
+
9
+ Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
10
+
11
+ ## Add your files
12
+
13
+ * [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
14
+ * [Add files using the command line](https://docs.gitlab.com/topics/git/add_files/#add-files-to-a-git-repository) or push an existing Git repository with the following command:
15
+
16
+ ```
17
+ cd existing_repo
18
+ git remote add origin https://gitlab.colijn-it.nl/libraries/configuratorcore.git
19
+ git branch -M master
20
+ git push -uf origin master
21
+ ```
22
+
23
+ ## Integrate with your tools
24
+
25
+ * [Set up project integrations](https://gitlab.colijn-it.nl/libraries/configuratorcore/-/settings/integrations)
26
+
27
+ ## Collaborate with your team
28
+
29
+ * [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
30
+ * [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
31
+ * [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
32
+ * [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
33
+ * [Set auto-merge](https://docs.gitlab.com/user/project/merge_requests/auto_merge/)
34
+
35
+ ## Test and Deploy
36
+
37
+ Use the built-in continuous integration in GitLab.
38
+
39
+ * [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/)
40
+ * [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
41
+ * [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
42
+ * [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
43
+ * [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
44
+
45
+ ***
46
+
47
+ # Editing this README
48
+
49
+ When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
50
+
51
+ ## Suggestions for a good README
52
+
53
+ Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
54
+
55
+ ## Name
56
+ Choose a self-explaining name for your project.
57
+
58
+ ## Description
59
+ Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
60
+
61
+ ## Badges
62
+ On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
63
+
64
+ ## Visuals
65
+ Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
66
+
67
+ ## Installation
68
+ Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
69
+
70
+ ## Usage
71
+ Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
72
+
73
+ ## Support
74
+ Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
75
+
76
+ ## Roadmap
77
+ If you have ideas for releases in the future, it is a good idea to list them in the README.
78
+
79
+ ## Contributing
80
+ State if you are open to contributions and what your requirements are for accepting them.
81
+
82
+ For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
83
+
84
+ You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
85
+
86
+ ## Authors and acknowledgment
87
+ Show your appreciation to those who have contributed to the project.
88
+
89
+ ## License
90
+ For open source projects, say how it is licensed.
91
+
92
+ ## Project status
93
+ If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
@@ -2937,5 +2937,5 @@ class Builder {
2937
2937
  * Generated bundle index. Do not edit.
2938
2938
  */
2939
2939
 
2940
- export { Builder, DebugUtils, ImageUtils, Material, ObjectUtils, Scene3DUtil, SelectionUtils, ThreedUtils, VariationCacheHelper, VariationHelper };
2940
+ export { AssetUtils, Builder, DebugUtils, FileUtils, FurnitureMaterial, ImageUtils, Material, ObjectUtils, Scene3DUtil, SelectionUtils, ThreedUtils, Variation, VariationCacheHelper, VariationHelper, VariationSettings, VariationSettingsSettings, VariationUtils };
2941
2941
  //# sourceMappingURL=colijnit-configuratorcore.mjs.map
package/index.d.ts CHANGED
@@ -188,6 +188,70 @@ declare class Material {
188
188
  clearcoatRoughnessMap: THREE.Texture | null;
189
189
  }
190
190
 
191
+ declare class Variation {
192
+ decoId: number;
193
+ brandId: string;
194
+ gameObjectName: string;
195
+ node: any;
196
+ optionText: string;
197
+ supplierArticleNr: string;
198
+ materialId: string;
199
+ material: Material;
200
+ }
201
+
202
+ declare class FurnitureMaterial extends Material {
203
+ textureFilename?: string;
204
+ normalFilename?: string;
205
+ aoFilename?: string;
206
+ metalnessFilename?: string;
207
+ roughnessFilename?: string;
208
+ displacementFilename?: string;
209
+ envMapFilename?: string;
210
+ emissiveFileName?: string;
211
+ sheenColorMapFileName?: string;
212
+ sheenRoughnessMapFileName?: string;
213
+ transmissionMapFileName?: string;
214
+ }
215
+ declare class AssetUtils {
216
+ static CreateMaterialFromAsset(asset: VariationSettings): Promise<Material>;
217
+ static setSettingsOfMaterial(material: Material, settings: any): void;
218
+ }
219
+
220
+ declare class DebugUtils {
221
+ static log(message: string): void;
222
+ }
223
+
224
+ declare class FileUtils {
225
+ private static _cachedTextureUploads;
226
+ private static _filesDontExist;
227
+ private static _filesExist;
228
+ static DoesFileExist(url: string): Promise<boolean>;
229
+ static StripMimeStringFromDataUri(dataUri: string): string;
230
+ static GetMimeStringFromDataUri(dataUri: string): string;
231
+ static FileExists(url: string, assetPath: string): Promise<boolean>;
232
+ /**
233
+ * There is some discrepancy regarding locations of h3d objects
234
+ * Therefor we need to (temporarily?!) fix the content url
235
+ * Also we need to change some additionals
236
+ */
237
+ static FixUrl(assetUrl: string): string;
238
+ static FixGlbUrl(assetUrl: string): string;
239
+ static MimeTypeFromFilename(fileName: string): string;
240
+ /**
241
+ * Downloads the given file to the users default download location.
242
+ * @param fileName With or without extension
243
+ * @param content File content as a string
244
+ * @param [mimeType = 'text/plain']
245
+ */
246
+ static DownloadFile(fileName: string, content: string, mimeType?: string): void;
247
+ static ReadAsText(file: File): Promise<string>;
248
+ static GetExtensionFromDataUri(dataUri: string): string;
249
+ static CreateDownloadFileNameFromBase64(dataUri: string): string;
250
+ static DownloadFromDataUri(dataUri: string, fileName: string): void;
251
+ static DocumentBodyToDataUri(documentBody: string, mimeType: string): string;
252
+ private static FixUnityUrl;
253
+ }
254
+
191
255
  declare class ImageUtils {
192
256
  static textures: Map<string, THREE.Texture>;
193
257
  static CreateTextureFromBase64(id: string, base64: string, material: Material, defaultFlip?: boolean): Promise<THREE.Texture>;
@@ -227,6 +291,14 @@ declare class ObjectUtils {
227
291
  private static _remapFloat;
228
292
  }
229
293
 
294
+ declare class Scene3DUtil {
295
+ static updatePivot(obj: Object3D): void;
296
+ static TrySelectorConnection(scene: Scene, parent: Object3D, part1: any, part2: any, isFirstElement: boolean, createAddableFn?: Function): boolean;
297
+ static Convert3DPointToScreenPoint(point: Vector3, camera: Camera, width: number, height: number): Vector2;
298
+ static CanSelectorConnect(consPart1: Object3D[], con1: Object3D | any, con2: Object3D | any, startWithMale?: boolean): boolean;
299
+ private static SelectorConnect;
300
+ }
301
+
230
302
  declare class SelectionUtils {
231
303
  static BuildFromAdjustables(scene: Scene, item: Object3D, adjustables: Selection[], placedAdjustables: Selection[], sourceObj: Object3D, activeConnector?: any, baseElementNodeId?: number): string[];
232
304
  static LinkSelectionsAndDecos(selections: Selection[], decos: DecoNode[], variations: any[]): void;
@@ -265,17 +337,23 @@ declare class ThreedUtils {
265
337
  private _handleUpdateProgressBar;
266
338
  }
267
339
 
268
- declare class DebugUtils {
269
- static log(message: string): void;
270
- }
271
-
272
- declare class Scene3DUtil {
273
- static updatePivot(obj: Object3D): void;
274
- static TrySelectorConnection(scene: Scene, parent: Object3D, part1: any, part2: any, isFirstElement: boolean, createAddableFn?: Function): boolean;
275
- static Convert3DPointToScreenPoint(point: Vector3, camera: Camera, width: number, height: number): Vector2;
276
- static CanSelectorConnect(consPart1: Object3D[], con1: Object3D | any, con2: Object3D | any, startWithMale?: boolean): boolean;
277
- private static SelectorConnect;
340
+ declare class VariationUtils {
341
+ private static MaterialCache;
342
+ static ClearCache(): void;
343
+ static LoadVariation(url: string, fileName: string, includeVariationFolder?: boolean): Promise<VariationSettings>;
344
+ static LoadVariationByUrl(materialCode: string, url: string): Promise<VariationSettings>;
345
+ static GetUrl(assetPath: string, url: string, fileName: string, includeVariationFolder?: boolean): string;
346
+ static GetFloorAssetUrl(assetPath: string, url: string, fileName: string, articleNumber: string): string;
347
+ static GetVariationSettingsFromFile(id: string, compressedFile: any): Promise<VariationSettings>;
348
+ private static CreateSettingsBasedOnIndex;
349
+ private static CreateSettingsBasedOnFileName;
350
+ private static LoadMaterialFromJson;
351
+ private static LoadMaterialFromGlb;
352
+ private static LoadFileContentFromZip;
353
+ private static FileIsImage;
354
+ private static GetBase64FileType;
355
+ private static GetZipContent;
278
356
  }
279
357
 
280
- export { Builder, DebugUtils, ImageUtils, Material, ObjectUtils, Scene3DUtil, SelectionUtils, ThreedUtils, VariationCacheHelper, VariationHelper };
358
+ export { AssetUtils, Builder, DebugUtils, FileUtils, FurnitureMaterial, ImageUtils, Material, ObjectUtils, Scene3DUtil, SelectionUtils, ThreedUtils, Variation, VariationCacheHelper, VariationHelper, VariationSettings, VariationSettingsSettings, VariationUtils };
281
359
  export type { ChangesInterface };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colijnit/configuratorcore",
3
- "version": "262.1.0",
3
+ "version": "262.1.1",
4
4
  "description": "iOne configurator core specific for version 262",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,