imagine-curator-sdk 0.2.4 → 0.2.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/README.md CHANGED
@@ -21,10 +21,10 @@ function App() {
21
21
 
22
22
  ## Peer Dependencies
23
23
 
24
- This package requires React 18+:
24
+ This package requires React 18+ and react-unity-webgl:
25
25
 
26
26
  ```bash
27
- npm install react react-dom
27
+ npm install react react-dom react-unity-webgl@^8.7.4
28
28
  ```
29
29
 
30
30
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imagine-curator-sdk",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Imagine Curator SDK - React components for 3D visualization and rendering",
5
5
  "type": "module",
6
6
  "main": "src/lib.js",
@@ -1,10 +1,14 @@
1
- const REACT_APP_VERSION = import.meta.env.VITE_VERSION || '1.0.0';
1
+ // Import Unity build files as URLs
2
+ import loaderUrl from '../../assets/Build/LiveFurnishBuild.loader.js?url';
3
+ import dataUrl from '../../assets/Build/LiveFurnishBuild.data?url';
4
+ import frameworkUrl from '../../assets/Build/LiveFurnishBuild.framework.js?url';
5
+ import codeUrl from '../../assets/Build/LiveFurnishBuild.wasm?url';
2
6
 
3
7
  export const UNITY_REF = {
4
- loaderUrl: `/Build/LiveFurnishBuild.loader.js`,
5
- dataUrl: `/Build/LiveFurnishBuild.data`,
6
- frameworkUrl: `/Build/LiveFurnishBuild.framework.js`,
7
- codeUrl: `/Build/LiveFurnishBuild.wasm`,
8
+ loaderUrl,
9
+ dataUrl,
10
+ frameworkUrl,
11
+ codeUrl,
8
12
  streamingAssetsUrl: 'StreamingAssets',
9
13
  companyName: 'DefaultCompany',
10
14
  productName: 'Live FurnishV2',
@@ -1,5 +1,10 @@
1
1
  import { COLOR_TYPE } from '../redux/slicers/admin/curatorStylesSlicer';
2
- const REACT_APP_VERSION = import.meta.env.VITE_VERSION;
2
+
3
+ // Import Unity build files as URLs (uses main build - configurator build not available)
4
+ import loaderUrl from '../assets/Build/LiveFurnishBuild.loader.js?url';
5
+ import dataUrl from '../assets/Build/LiveFurnishBuild.data?url';
6
+ import frameworkUrl from '../assets/Build/LiveFurnishBuild.framework.js?url';
7
+ import codeUrl from '../assets/Build/LiveFurnishBuild.wasm?url';
3
8
 
4
9
  export const CONFIGURATOR_TYPE = {
5
10
  IMAGE: '1',
@@ -24,10 +29,10 @@ export const THEME = {
24
29
  export const NEW_CONFIGURATOR_ID = 'new';
25
30
 
26
31
  export const UNITY_REF = {
27
- loaderUrl: `/Build/configurator/WebGLBuild.loader.js?version=${REACT_APP_VERSION}`,
28
- dataUrl: `/Build/configurator/WebGLBuild.data?version=${REACT_APP_VERSION}`,
29
- frameworkUrl: `/Build/configurator/WebGLBuild.framework.js?version=${REACT_APP_VERSION}`,
30
- codeUrl: `/Build/configurator/WebGLBuild.wasm?version=${REACT_APP_VERSION}`,
32
+ loaderUrl,
33
+ dataUrl,
34
+ frameworkUrl,
35
+ codeUrl,
31
36
  };
32
37
 
33
38
  export const EMPTY_CONFIGURATOR = {
@@ -5,13 +5,18 @@ export const TYPE_TEXTURE = 2;
5
5
  export const MODE_EDIT = 'edit';
6
6
  export const MODE_UPLOAD = 'upload';
7
7
  export const MODE_MOVE_TO_TEXTURES = 'move-to-textures';
8
- const REACT_APP_VERSION = import.meta.env.VITE_VERSION;
8
+
9
+ // Import Unity build files as URLs (uses main build - texture preview build not available)
10
+ import loaderUrl from '../assets/Build/LiveFurnishBuild.loader.js?url';
11
+ import dataUrl from '../assets/Build/LiveFurnishBuild.data?url';
12
+ import frameworkUrl from '../assets/Build/LiveFurnishBuild.framework.js?url';
13
+ import codeUrl from '../assets/Build/LiveFurnishBuild.wasm?url';
9
14
 
10
15
  export const UNITY_REF = {
11
- loaderUrl: `/Build/texture/TexturePreviewBuild.loader.js?version=${MODE_MOVE_TO_TEXTURES}`,
12
- dataUrl: `/Build/texture/TexturePreviewBuild.data?version=${MODE_MOVE_TO_TEXTURES}`,
13
- frameworkUrl: `/Build/texture/TexturePreviewBuild.framework.js?version=${MODE_MOVE_TO_TEXTURES}`,
14
- codeUrl: `/Build/texture/TexturePreviewBuild.wasm?version=${MODE_MOVE_TO_TEXTURES}`,
16
+ loaderUrl,
17
+ dataUrl,
18
+ frameworkUrl,
19
+ codeUrl,
15
20
  };
16
21
 
17
22
  export const MAX_UPLOAD_WIDTH_PIXELS = 16384;