@combeenation/3d-viewer 4.2.0 → 4.3.0-alpha1

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.
Files changed (80) hide show
  1. package/README.md +2 -2
  2. package/dist/lib-cjs/api/classes/dottedPath.js +2 -5
  3. package/dist/lib-cjs/api/classes/dottedPath.js.map +1 -1
  4. package/dist/lib-cjs/api/classes/element.js +89 -66
  5. package/dist/lib-cjs/api/classes/element.js.map +1 -1
  6. package/dist/lib-cjs/api/classes/event.js.map +1 -1
  7. package/dist/lib-cjs/api/classes/eventBroadcaster.js.map +1 -1
  8. package/dist/lib-cjs/api/classes/parameter.js +3 -2
  9. package/dist/lib-cjs/api/classes/parameter.js.map +1 -1
  10. package/dist/lib-cjs/api/classes/parameterObservable.js.map +1 -1
  11. package/dist/lib-cjs/api/classes/parameterizable.js.map +1 -1
  12. package/dist/lib-cjs/api/classes/placementAnimation.js +2 -2
  13. package/dist/lib-cjs/api/classes/placementAnimation.js.map +1 -1
  14. package/dist/lib-cjs/api/classes/variant.js +26 -19
  15. package/dist/lib-cjs/api/classes/variant.js.map +1 -1
  16. package/dist/lib-cjs/api/classes/variantInstance.js +19 -19
  17. package/dist/lib-cjs/api/classes/variantInstance.js.map +1 -1
  18. package/dist/lib-cjs/api/classes/variantParameterizable.js.map +1 -1
  19. package/dist/lib-cjs/api/classes/viewer.d.ts +5 -0
  20. package/dist/lib-cjs/api/classes/viewer.js +32 -17
  21. package/dist/lib-cjs/api/classes/viewer.js.map +1 -1
  22. package/dist/lib-cjs/api/classes/viewerLight.js +24 -24
  23. package/dist/lib-cjs/api/classes/viewerLight.js.map +1 -1
  24. package/dist/lib-cjs/api/internal/debugViewer.js +1 -2
  25. package/dist/lib-cjs/api/internal/debugViewer.js.map +1 -1
  26. package/dist/lib-cjs/api/internal/lensRendering.js.map +1 -1
  27. package/dist/lib-cjs/api/internal/sceneSetup.js +25 -22
  28. package/dist/lib-cjs/api/internal/sceneSetup.js.map +1 -1
  29. package/dist/lib-cjs/api/manager/animationManager.js +24 -15
  30. package/dist/lib-cjs/api/manager/animationManager.js.map +1 -1
  31. package/dist/lib-cjs/api/manager/sceneManager.js +3 -3
  32. package/dist/lib-cjs/api/manager/sceneManager.js.map +1 -1
  33. package/dist/lib-cjs/api/manager/variantInstanceManager.js +10 -7
  34. package/dist/lib-cjs/api/manager/variantInstanceManager.js.map +1 -1
  35. package/dist/lib-cjs/api/store/specStorage.js.map +1 -1
  36. package/dist/lib-cjs/api/util/babylonHelper.d.ts +1 -1
  37. package/dist/lib-cjs/api/util/babylonHelper.js +12 -15
  38. package/dist/lib-cjs/api/util/babylonHelper.js.map +1 -1
  39. package/dist/lib-cjs/api/util/globalTypes.d.ts +25 -24
  40. package/dist/lib-cjs/api/util/resourceHelper.js +3 -1
  41. package/dist/lib-cjs/api/util/resourceHelper.js.map +1 -1
  42. package/dist/lib-cjs/api/util/stringHelper.d.ts +1 -1
  43. package/dist/lib-cjs/api/util/stringHelper.js +2 -2
  44. package/dist/lib-cjs/api/util/stringHelper.js.map +1 -1
  45. package/dist/lib-cjs/index.js.map +1 -1
  46. package/package.json +7 -3
  47. package/src/api/classes/animationInterface.ts +4 -6
  48. package/src/api/classes/dottedPath.ts +179 -187
  49. package/src/api/classes/element.ts +644 -621
  50. package/src/api/classes/event.ts +310 -313
  51. package/src/api/classes/eventBroadcaster.ts +47 -49
  52. package/src/api/classes/parameter.ts +394 -397
  53. package/src/api/classes/parameterObservable.ts +84 -83
  54. package/src/api/classes/parameterizable.ts +71 -73
  55. package/src/api/classes/placementAnimation.ts +130 -130
  56. package/src/api/classes/variant.ts +806 -778
  57. package/src/api/classes/variantInstance.ts +60 -52
  58. package/src/api/classes/variantParameterizable.ts +72 -67
  59. package/src/api/classes/viewer.ts +531 -489
  60. package/src/api/classes/viewerLight.ts +300 -300
  61. package/src/api/internal/debugViewer.ts +61 -53
  62. package/src/api/internal/lensRendering.ts +2 -3
  63. package/src/api/internal/sceneSetup.ts +144 -137
  64. package/src/api/manager/animationManager.ts +122 -97
  65. package/src/api/manager/sceneManager.ts +83 -86
  66. package/src/api/manager/variantInstanceManager.ts +234 -224
  67. package/src/api/store/specStorage.ts +48 -51
  68. package/src/api/util/babylonHelper.ts +329 -325
  69. package/src/api/util/globalTypes.ts +244 -245
  70. package/src/api/util/resourceHelper.ts +97 -109
  71. package/src/api/util/stringHelper.ts +13 -16
  72. package/src/buildinfo.json +2 -2
  73. package/src/commonjs.tsconfig.json +8 -11
  74. package/src/declaration.tsconfig.json +6 -8
  75. package/src/dev.ts +28 -28
  76. package/src/es6.tsconfig.json +8 -11
  77. package/src/index.ts +39 -39
  78. package/src/tsconfig.json +30 -41
  79. package/src/tsconfig.types.json +8 -9
  80. package/src/types.d.ts +0 -1
@@ -3,18 +3,18 @@ import { emitter, Event } from '../classes/event';
3
3
  /**
4
4
  * Sleeps for a certain amount of microseconds.
5
5
  */
6
- const sleep = ( ms: number ) => new Promise( resolve => window.setTimeout( resolve, ms ) );
6
+ const sleep = (ms: number) => new Promise(resolve => window.setTimeout(resolve, ms));
7
7
 
8
8
  /**
9
9
  * Loads any kind of response from given path.
10
10
  * @emits {@link Event.LOADING_START}
11
11
  * @emits {@link Event.LOADING_END}
12
12
  */
13
- const load = async function( path: string ): Promise<Response> {
14
- emitter.emit( Event.LOADING_START, path );
15
- let data = await fetch( path );
16
- emitter.emit( Event.LOADING_END, path );
17
- return data;
13
+ const load = async function (path: string): Promise<Response> {
14
+ emitter.emit(Event.LOADING_START, path);
15
+ let data = await fetch(path);
16
+ emitter.emit(Event.LOADING_END, path);
17
+ return data;
18
18
  };
19
19
 
20
20
  /**
@@ -22,9 +22,9 @@ const load = async function( path: string ): Promise<Response> {
22
22
  * @emits {@link Event.LOADING_START}
23
23
  * @emits {@link Event.LOADING_END}
24
24
  */
25
- const loadJson = async function<T>( path: string ): Promise<T> {
26
- const response = await load(path);
27
- return response.json();
25
+ const loadJson = async function <T>(path: string): Promise<T> {
26
+ const response = await load(path);
27
+ return response.json();
28
28
  };
29
29
 
30
30
  /**
@@ -32,154 +32,142 @@ const loadJson = async function<T>( path: string ): Promise<T> {
32
32
  * @emits {@link Event.LOADING_START}
33
33
  * @emits {@link Event.LOADING_END}
34
34
  */
35
- const loadText = async function( path: string ): Promise<string> {
36
- const response = await load(path);
37
- return response.text();
35
+ const loadText = async function (path: string): Promise<string> {
36
+ const response = await load(path);
37
+ return response.text();
38
38
  };
39
39
 
40
40
  /**
41
41
  * Debounces: it limits the rate at which a function can fire.
42
42
  */
43
- const debounce = function( func: Function, wait: number, immediate: boolean = false ) {
44
- let timeout: any;
45
- return function() {
46
- // @ts-ignore
47
- const context = this;
48
- const args = arguments;
49
- const later = function() {
50
- timeout = null;
51
- if( !immediate ) {
52
- func.apply( context, args );
53
- }
54
- };
55
- const callNow = immediate && !timeout;
56
- clearTimeout( timeout );
57
- timeout = setTimeout( later, wait );
58
- if( callNow ) {
59
- func.apply( context, args );
60
- }
61
- };
43
+ const debounce = function (func: Function, wait: number, immediate: boolean = false) {
44
+ let timeout: any;
45
+ return function () {
46
+ // @ts-ignore
47
+ const context = this;
48
+ const args = arguments;
49
+ const later = function () {
50
+ timeout = null;
51
+ if (!immediate) {
52
+ func.apply(context, args);
53
+ }
54
+ };
55
+ const callNow = immediate && !timeout;
56
+ clearTimeout(timeout);
57
+ timeout = setTimeout(later, wait);
58
+ if (callNow) {
59
+ func.apply(context, args);
60
+ }
61
+ };
62
62
  };
63
63
 
64
64
  /**
65
65
  * Merges multiple maps.
66
66
  */
67
- const mergeMaps = function <TKey, TValue>( ...maps: Map<TKey, TValue>[] ): Map<TKey, TValue> {
68
- const resultMap = new Map<TKey, TValue>();
69
- maps.forEach( map => {
70
- map.forEach( ( v, k ) => {
71
- resultMap.set( k, v );
72
- } );
73
- } );
74
- return resultMap;
67
+ const mergeMaps = function <TKey, TValue>(...maps: Map<TKey, TValue>[]): Map<TKey, TValue> {
68
+ const resultMap = new Map<TKey, TValue>();
69
+ maps.forEach(map => {
70
+ map.forEach((v, k) => {
71
+ resultMap.set(k, v);
72
+ });
73
+ });
74
+ return resultMap;
75
75
  };
76
76
 
77
77
  /**
78
78
  * Creates a HTML image element based on a SVG string, whereas all the embedded assets in the SVG (eg: fonts, images)
79
79
  * are already loaded and exchanged by their base64 representation.\
80
80
  * There the output image can exist as "standalone" image and may be used for example as a paintable.
81
- *
81
+ *
82
82
  * !!CAUTION!!: The used functions within this code section are very well evaluated since most alternatives
83
83
  * somehow don't work in Safari, as mentioned in the following BJS forum entries:
84
84
  * - https://forum.babylonjs.com/t/drawing-svg-content-text-into-dynamictexture-doesnt-work-in-safari-v15/25048
85
85
  * - https://forum.babylonjs.com/t/texture-createfrombase64string-doesnt-seem-to-work-for-ios-devices-initially/25502
86
86
  */
87
- const createImageFromSvg = async function( svgSrc: string ): Promise<HTMLImageElement> {
88
- // replace assets with their base64 versions in svg source code
89
- const svgWithAssetsEmbedded = await _embedAssets( svgSrc );
87
+ const createImageFromSvg = async function (svgSrc: string): Promise<HTMLImageElement> {
88
+ // replace assets with their base64 versions in svg source code
89
+ const svgWithAssetsEmbedded = await _embedAssets(svgSrc);
90
90
 
91
- // create data string which can be used as an image source
92
- const svgEncoded = 'data:image/svg+xml,' + encodeURIComponent(svgWithAssetsEmbedded)
91
+ // create data string which can be used as an image source
92
+ const svgEncoded = 'data:image/svg+xml,' + encodeURIComponent(svgWithAssetsEmbedded);
93
93
 
94
- return createImageFromImgSrc(svgEncoded);
94
+ return createImageFromImgSrc(svgEncoded);
95
95
  };
96
96
 
97
97
  /**
98
98
  * Creates an HTML image element from a dedicated image source.\
99
99
  * Also waits until the image has loaded.
100
- *
100
+ *
101
101
  * !!CAUTION!!: The `setTimeout` after loading is finished is required due to a Safari bug:
102
102
  * - https://bugs.webkit.org/show_bug.cgi?id=39059
103
103
  * - https://bugs.webkit.org/show_bug.cgi?id=219770
104
- *
104
+ *
105
105
  * It's not 100% ensured that the timeout solves the issue in every case, but there is no other way unfortunately.\
106
106
  * => Keep an eye on it in future projects
107
- *
107
+ *
108
108
  * @param imgSrc Theoretically every source is valid which is also supported by
109
109
  * [HTMLImageElement.src](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/src).\
110
110
  * Known exceptions are SVGs with embedded assets that are provided as object URL. See comments in
111
111
  * {@link createImageFromSvg} for further details.
112
112
  */
113
- const createImageFromImgSrc = async function ( imgSrc: string ): Promise<HTMLImageElement> {
114
- let img = new Image();
113
+ const createImageFromImgSrc = async function (imgSrc: string): Promise<HTMLImageElement> {
114
+ let img = new Image();
115
115
 
116
- await new Promise(resolve => {
117
- img.onload = () => {
118
- setTimeout(resolve, 0);
119
- }
120
- img.src = imgSrc;
121
- });
116
+ await new Promise(resolve => {
117
+ img.onload = () => {
118
+ setTimeout(resolve, 0);
119
+ };
120
+ img.src = imgSrc;
121
+ });
122
122
 
123
- return img;
124
- }
123
+ return img;
124
+ };
125
125
 
126
126
  /**
127
127
  * Replaces all supported image & font URLs in the given SVG with their base64 representation.
128
128
  */
129
- const _embedAssets = async function( svgSrc: string ): Promise<string> {
130
- const _imageExtensions = ['png', 'gif', 'jpg', 'jpeg', 'svg', 'bmp'];
131
- const _fontExtensions = ['woff2', 'woff', 'ttf', 'otf'];
132
- const _assetExtensions = [..._imageExtensions, ..._fontExtensions];
133
- // Regex copied from https://stackoverflow.com/a/8943487/1273551, not "stress tested"...
134
- const urlRegex = /(\bhttps?:\/\/[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|])/gi;
135
- const allUrls = svgSrc.match( urlRegex ) as string[];
136
- const assetUrls = allUrls.filter(
137
- url => _assetExtensions.some(
138
- extension => url.toLowerCase().endsWith( `.${extension}` )
139
- )
140
- );
141
- const assetBase64Fetcher = assetUrls.map( _fetchBase64AssetUrl );
142
- const assetFetcherResults = await Promise.all( assetBase64Fetcher );
143
- return assetFetcherResults.reduce(
144
- ( svgSrc, x ) => svgSrc.replace( x.url, x.base64 ), svgSrc
145
- );
129
+ const _embedAssets = async function (svgSrc: string): Promise<string> {
130
+ const _imageExtensions = ['png', 'gif', 'jpg', 'jpeg', 'svg', 'bmp'];
131
+ const _fontExtensions = ['woff2', 'woff', 'ttf', 'otf'];
132
+ const _assetExtensions = [..._imageExtensions, ..._fontExtensions];
133
+ // Regex copied from https://stackoverflow.com/a/8943487/1273551, not "stress tested"...
134
+ const urlRegex = /(\bhttps?:\/\/[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|])/gi;
135
+ const allUrls = svgSrc.match(urlRegex) as string[];
136
+ const assetUrls = allUrls.filter(url =>
137
+ _assetExtensions.some(extension => url.toLowerCase().endsWith(`.${extension}`))
138
+ );
139
+ const assetBase64Fetcher = assetUrls.map(_fetchBase64AssetUrl);
140
+ const assetFetcherResults = await Promise.all(assetBase64Fetcher);
141
+ return assetFetcherResults.reduce((svgSrc, x) => svgSrc.replace(x.url, x.base64), svgSrc);
146
142
  };
147
143
 
148
144
  /**
149
145
  * Fetch asset (image or font) and convert it to base64 string representation.
150
146
  */
151
- const _fetchBase64AssetUrl = async function( assetUrl: string ): Promise<{ url: string, base64: string }> {
152
- // TODO: Cache known base64 representation and only fetch/convert when not already known.
153
- // Usually the fetch shouldn't hit the network but the browser cache since the SVG was already drawn.
154
- // See comments of "createImageBitmapFromSvg" for some considerations...
155
- return new Promise( async (resolve, reject) => {
156
- const resp = await fetch( assetUrl );
157
- const blob = await resp.blob();
158
- const reader = new FileReader();
159
- reader.onloadend = event => {
160
- const target = event.target;
161
- if( !target ) {
162
- return reject( `Asset with URL "${assetUrl}" could not be loaded.` );
163
- }
164
- const result = target.result;
165
- if( !result ) {
166
- return reject( `Asset with URL "${assetUrl}" returned an empty result.` );
167
- }
168
- resolve( {
169
- url: assetUrl,
170
- base64: result.toString() as string,
171
- } );
172
- };
173
- reader.readAsDataURL( blob );
174
- } );
147
+ const _fetchBase64AssetUrl = async function (assetUrl: string): Promise<{ url: string; base64: string }> {
148
+ // TODO: Cache known base64 representation and only fetch/convert when not already known.
149
+ // Usually the fetch shouldn't hit the network but the browser cache since the SVG was already drawn.
150
+ // See comments of "createImageBitmapFromSvg" for some considerations...
151
+ return new Promise(async (resolve, reject) => {
152
+ const resp = await fetch(assetUrl);
153
+ const blob = await resp.blob();
154
+ const reader = new FileReader();
155
+ reader.onloadend = event => {
156
+ const target = event.target;
157
+ if (!target) {
158
+ return reject(`Asset with URL "${assetUrl}" could not be loaded.`);
159
+ }
160
+ const result = target.result;
161
+ if (!result) {
162
+ return reject(`Asset with URL "${assetUrl}" returned an empty result.`);
163
+ }
164
+ resolve({
165
+ url: assetUrl,
166
+ base64: result.toString() as string,
167
+ });
168
+ };
169
+ reader.readAsDataURL(blob);
170
+ });
175
171
  };
176
172
 
177
- export {
178
- sleep,
179
- loadJson,
180
- loadText,
181
- debounce,
182
- mergeMaps,
183
- createImageFromSvg,
184
- createImageFromImgSrc
185
- };
173
+ export { sleep, loadJson, loadText, debounce, mergeMaps, createImageFromSvg, createImageFromImgSrc };
@@ -1,26 +1,23 @@
1
1
  /**
2
2
  * Creates a random uuidv4.
3
3
  */
4
- const uuidv4 = function() {
5
- // @ts-ignore
6
- return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace( /[018]/g, c =>
7
- (c ^ crypto.getRandomValues( new Uint8Array( 1 ) )[0] & 15 >> c / 4).toString( 16 )
8
- );
4
+ const uuidv4 = function () {
5
+ // @ts-ignore
6
+ return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c =>
7
+ (c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))).toString(16)
8
+ );
9
9
  };
10
10
 
11
11
  /**
12
12
  * Converts a string from camel case to snake case.
13
13
  */
14
- const camelToSnakeCase = function( str: string ): string {
15
- return str
16
- .replace( /([A-Z])/g, " $1" )
17
- .trim()
18
- .split( ' ' )
19
- .join('_')
20
- .toLowerCase();
14
+ const camelToSnakeCase = function (str: string): string {
15
+ return str
16
+ .replace(/([A-Z])/g, ' $1')
17
+ .trim()
18
+ .split(' ')
19
+ .join('_')
20
+ .toLowerCase();
21
21
  };
22
22
 
23
- export {
24
- uuidv4,
25
- camelToSnakeCase,
26
- };
23
+ export { uuidv4, camelToSnakeCase };
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "@VERSION@"
3
- }
2
+ "version": "@VERSION@"
3
+ }
@@ -1,13 +1,10 @@
1
1
  {
2
- "extends": "./tsconfig",
3
- "exclude": [
4
- "dev.ts",
5
- "assets"
6
- ],
7
- "compilerOptions": {
8
- "module": "commonjs",
9
- "moduleResolution": "node",
10
- "outDir": "../dist/lib-cjs",
11
- "declaration": true
12
- }
2
+ "extends": "./tsconfig",
3
+ "exclude": ["dev.ts", "assets"],
4
+ "compilerOptions": {
5
+ "module": "commonjs",
6
+ "moduleResolution": "node",
7
+ "outDir": "../dist/lib-cjs",
8
+ "declaration": true
9
+ }
13
10
  }
@@ -1,10 +1,8 @@
1
1
  {
2
- "extends": "./tsconfig",
3
- "compilerOptions": {
4
- "declaration": true,
5
- "outDir": "../dist/types",
6
- "emitDeclarationOnly": true
7
- }
8
-
9
-
2
+ "extends": "./tsconfig",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "outDir": "../dist/types",
6
+ "emitDeclarationOnly": true
7
+ }
10
8
  }
package/src/dev.ts CHANGED
@@ -6,38 +6,38 @@ import { Emitter, Viewer } from '.';
6
6
 
7
7
  import { createSpec, beforeBootstrap, afterBootstrap, createUIelements } from '../assets/index';
8
8
 
9
- const loadingElement = document.getElementById( 'loading' ) as HTMLDivElement;
9
+ const loadingElement = document.getElementById('loading') as HTMLDivElement;
10
10
 
11
- Emitter.on( Event.BOOTSTRAP_START, () => {
12
- Emitter.on( Event.LOADING_START, () => {
13
- loadingElement!.style.display = 'block';
14
- } );
15
- Emitter.on( Event.VARIANT_CREATED, () => {
16
- loadingElement!.style.display = 'none';
17
- } );
18
- } );
11
+ Emitter.on(Event.BOOTSTRAP_START, () => {
12
+ Emitter.on(Event.LOADING_START, () => {
13
+ loadingElement!.style.display = 'block';
14
+ });
15
+ Emitter.on(Event.VARIANT_CREATED, () => {
16
+ loadingElement!.style.display = 'none';
17
+ });
18
+ });
19
19
 
20
- document.addEventListener('DOMContentLoaded', main );
20
+ document.addEventListener('DOMContentLoaded', main);
21
21
 
22
22
  async function main() {
23
- const viewer = await bootstrapViewer();
24
- // "Export" for console testing...
25
- set( window, 'viewer', viewer);
23
+ const viewer = await bootstrapViewer();
24
+ // "Export" for console testing...
25
+ set(window, 'viewer', viewer);
26
26
  }
27
27
 
28
28
  async function bootstrapViewer() {
29
- const canvas = document.getElementById( 'babylon-canvas' ) as HTMLCanvasElement;
30
- if( !canvas ) {
31
- throw new Error( 'Missing "canvas" element' );
32
- }
33
- const viewer = new Viewer(canvas, createSpec());
34
- await beforeBootstrap(viewer);
35
- try {
36
- await viewer.bootstrap();
37
- } catch (e) {
38
- console.error(e);
39
- }
40
- await afterBootstrap( viewer );
41
- await createUIelements( viewer );
42
- return viewer;
43
- }
29
+ const canvas = document.getElementById('babylon-canvas') as HTMLCanvasElement;
30
+ if (!canvas) {
31
+ throw new Error('Missing "canvas" element');
32
+ }
33
+ const viewer = new Viewer(canvas, createSpec());
34
+ await beforeBootstrap(viewer);
35
+ try {
36
+ await viewer.bootstrap();
37
+ } catch (e) {
38
+ console.error(e);
39
+ }
40
+ await afterBootstrap(viewer);
41
+ await createUIelements(viewer);
42
+ return viewer;
43
+ }
@@ -1,13 +1,10 @@
1
1
  {
2
- "extends": "./tsconfig",
3
- "exclude": [
4
- "dev.ts",
5
- "assets"
6
- ],
7
- "compilerOptions": {
8
- "module": "es6",
9
- "moduleResolution": "node",
10
- "outDir": "../dist/lib-es6",
11
- "declaration": true
12
- }
2
+ "extends": "./tsconfig",
3
+ "exclude": ["dev.ts", "assets"],
4
+ "compilerOptions": {
5
+ "module": "es6",
6
+ "moduleResolution": "node",
7
+ "outDir": "../dist/lib-es6",
8
+ "declaration": true
9
+ }
13
10
  }
package/src/index.ts CHANGED
@@ -49,43 +49,43 @@ import * as BabylonHelper from './api/util/babylonHelper';
49
49
  * Expose some frequently used babylon modules by our consumers.
50
50
  */
51
51
  export {
52
- AnimationManager,
53
- Variant,
54
- VariantInstanceManager,
55
- Viewer,
56
- ParameterObservable,
57
- Parameterizable,
58
- VariantParameterizable,
59
- ViewerLight,
60
- emitter as Emitter,
61
- EventEmitter,
62
- Event,
63
- Parameter,
64
- VariantInstance,
65
- Color3,
66
- Color4,
67
- Vector3,
68
- AbstractMesh,
69
- InstancedMesh,
70
- Mesh,
71
- TransformNode,
72
- Node,
73
- Material,
74
- PBRMaterial,
75
- StandardMaterial,
76
- Scene,
77
- Engine,
78
- ArcRotateCamera,
79
- DynamicTexture,
80
- CubeTexture,
81
- MeshBuilder,
82
- Texture,
83
- BabylonAnimation,
84
- HemisphericLight,
85
- DirectionalLight,
86
- Element,
87
- EventBroadcaster,
88
- SceneManager,
89
- PlacementAnimation,
90
- BabylonHelper,
52
+ AnimationManager,
53
+ Variant,
54
+ VariantInstanceManager,
55
+ Viewer,
56
+ ParameterObservable,
57
+ Parameterizable,
58
+ VariantParameterizable,
59
+ ViewerLight,
60
+ emitter as Emitter,
61
+ EventEmitter,
62
+ Event,
63
+ Parameter,
64
+ VariantInstance,
65
+ Color3,
66
+ Color4,
67
+ Vector3,
68
+ AbstractMesh,
69
+ InstancedMesh,
70
+ Mesh,
71
+ TransformNode,
72
+ Node,
73
+ Material,
74
+ PBRMaterial,
75
+ StandardMaterial,
76
+ Scene,
77
+ Engine,
78
+ ArcRotateCamera,
79
+ DynamicTexture,
80
+ CubeTexture,
81
+ MeshBuilder,
82
+ Texture,
83
+ BabylonAnimation,
84
+ HemisphericLight,
85
+ DirectionalLight,
86
+ Element,
87
+ EventBroadcaster,
88
+ SceneManager,
89
+ PlacementAnimation,
90
+ BabylonHelper,
91
91
  };
package/src/tsconfig.json CHANGED
@@ -1,43 +1,32 @@
1
1
  {
2
- "buildOnSave": false,
3
- "compileOnSave": false,
4
- "exclude": [
5
- "dist"
6
- ],
7
- "compilerOptions": {
8
- "module": "es2015",
9
- "moduleResolution": "node",
10
- "target": "es5",
11
- "removeComments": false,
12
- "preserveConstEnums": true,
13
- "sourceMap": true,
14
- "skipLibCheck": true,
15
- "strict": true,
16
- "noFallthroughCasesInSwitch": true,
17
- "baseUrl": ".",
18
- "importHelpers": true,
19
- "resolveJsonModule": true,
20
- "lib": [
21
- "es6",
22
- "dom"
23
- ]
24
- },
25
- "typedocOptions": {
26
- "name": "Combeenation 3D viewer",
27
- "entryPoints": [
28
- "src/index.ts",
29
- "src/api/util/globalTypes.ts",
30
- ],
31
- "exclude": [
32
- "src/dev.ts",
33
- "assets/"
34
- ],
35
- "excludeInternal": true,
36
- "excludePrivate": true,
37
- "excludeProtected": true,
38
- "listInvalidSymbolLinks": true,
39
- "out": "docs",
40
- "pages": "src/pagesconfig.json",
41
- "theme": "doc/cbn-docs-theme"
42
- }
2
+ "buildOnSave": false,
3
+ "compileOnSave": false,
4
+ "exclude": ["dist"],
5
+ "compilerOptions": {
6
+ "module": "es2015",
7
+ "moduleResolution": "node",
8
+ "target": "es5",
9
+ "removeComments": false,
10
+ "preserveConstEnums": true,
11
+ "sourceMap": true,
12
+ "skipLibCheck": true,
13
+ "strict": true,
14
+ "noFallthroughCasesInSwitch": true,
15
+ "baseUrl": ".",
16
+ "importHelpers": true,
17
+ "resolveJsonModule": true,
18
+ "lib": ["es6", "dom"]
19
+ },
20
+ "typedocOptions": {
21
+ "name": "Combeenation 3D viewer",
22
+ "entryPoints": ["src/index.ts", "src/api/util/globalTypes.ts"],
23
+ "exclude": ["src/dev.ts", "assets/"],
24
+ "excludeInternal": true,
25
+ "excludePrivate": true,
26
+ "excludeProtected": true,
27
+ "listInvalidSymbolLinks": true,
28
+ "out": "docs",
29
+ "pages": "src/pagesconfig.json",
30
+ "theme": "doc/cbn-docs-theme"
31
+ }
43
32
  }
@@ -1,10 +1,9 @@
1
1
  {
2
- "extends": "./tsconfig",
3
- "exclude": [
4
- ],
5
- "compilerOptions": {
6
- "declaration": true,
7
- "noEmit": false,
8
- "emitDeclarationOnly": true
9
- }
10
- }
2
+ "extends": "./tsconfig",
3
+ "exclude": [],
4
+ "compilerOptions": {
5
+ "declaration": true,
6
+ "noEmit": false,
7
+ "emitDeclarationOnly": true
8
+ }
9
+ }
package/src/types.d.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  /** @ignore **/
2
2
  declare let IS_PRODUCTION: boolean;
3
3
  declare let VERSION_INFORMATION: string;
4
-