@needle-tools/engine 3.5.5-alpha → 3.5.5-alpha.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@needle-tools/engine",
3
- "version": "3.5.5-alpha",
3
+ "version": "3.5.5-alpha.1",
4
4
  "description": "Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development with great integrations into editors like Unity or Blender - and can be deployed onto any device! It is flexible, extensible and networking and XR are built-in",
5
5
  "main": "dist/needle-engine.umd.cjs",
6
6
  "type": "module",
@@ -1,20 +1,26 @@
1
1
  import { loadConfig } from "./config.js";
2
2
  import { tryGetNeedleEngineVersion } from "./utils.js";
3
3
 
4
+ // NOTE: ALL DEFINES MUST BE SET HERE! NEVER ADD OR RELY ON DEFINES IN ANY OTHER PLUGIN
5
+
4
6
  /** used to pass config variables into vite.config.define
5
7
  * for example "useRapier"
6
8
  */
9
+
10
+ // https://vitejs.dev/config/#using-environment-variables-in-config
11
+
7
12
  export const needleDefines = (command, needleEngineConfig, userSettings) => {
8
13
 
9
14
  if (!userSettings) userSettings = {};
10
15
 
11
16
  let useRapier = true;
12
- if (needleEngineConfig.useRapier === false || userSettings?.useRapier === false) useRapier = false;
17
+ if (needleEngineConfig?.useRapier === false || userSettings?.useRapier === false) useRapier = false;
13
18
 
14
19
  return {
15
20
  name: 'needle-defines',
16
21
  enforce: 'pre',
17
22
  config(viteConfig) {
23
+ // console.log("Update vite defines -------------------------------------------");
18
24
  if (!viteConfig.define) viteConfig.define = {};
19
25
  viteConfig.define.NEEDLE_ENGINE_META = {
20
26
  version: tryGetNeedleEngineVersion(),
@@ -27,7 +33,7 @@ export const needleDefines = (command, needleEngineConfig, userSettings) => {
27
33
  useRapier = false;
28
34
  }
29
35
  }
30
- console.log("UseRapier?", useRapier);
36
+ // console.log("UseRapier?", useRapier);
31
37
  if (viteConfig.define.NEEDLE_USE_RAPIER === undefined) {
32
38
  viteConfig.define.NEEDLE_USE_RAPIER = useRapier;
33
39
  }
@@ -1,5 +1,5 @@
1
1
  import { TypeStore } from "./../engine_typestore"
2
-
2
+
3
3
  // Import types
4
4
  import { __Ignore } from "../../engine-components/codegen/components";
5
5
  import { ActionBuilder } from "../../engine-components/export/usdz/extensions/behavior/BehavioursBuilder";
@@ -215,7 +215,7 @@ import { XRGrabModel } from "../../engine-components/webxr/WebXRGrabRendering";
215
215
  import { XRGrabRendering } from "../../engine-components/webxr/WebXRGrabRendering";
216
216
  import { XRRig } from "../../engine-components/webxr/WebXRRig";
217
217
  import { XRState } from "../../engine-components/XRFlag";
218
-
218
+
219
219
  // Register types
220
220
  TypeStore.add("__Ignore", __Ignore);
221
221
  TypeStore.add("ActionBuilder", ActionBuilder);