sunrize 1.7.32 → 1.7.34

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/bin/sunrize.js CHANGED
@@ -4,11 +4,17 @@
4
4
  const os = require ("os");
5
5
  const path = require ("path");
6
6
  const { spawn } = require ("child_process");
7
+ const cwd = process .cwd ();
7
8
  const cmd = os .platform () === "win32" ? "npm.cmd" : "npm";
9
+ const args = process .argv .slice (2);
8
10
 
9
11
  process .chdir (path .resolve (__dirname, ".."));
10
12
 
11
- const p = spawn (cmd, ["start", "--silent", "--", ... process .argv .slice (2)], { shell: true });
13
+ const p = spawn (cmd, ["start", "--silent", "--", btoa (JSON .stringify (args))],
14
+ {
15
+ shell: true,
16
+ cwd: cwd,
17
+ });
12
18
 
13
19
  p .stdout .pipe (process .stdout);
14
20
  p .stderr .pipe (process .stderr);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sunrize",
3
3
  "productName": "Sunrize X3D Editor",
4
- "version": "1.7.32",
4
+ "version": "1.7.34",
5
5
  "description": "A Multi-Platform X3D Editor",
6
6
  "main": "src/main.js",
7
7
  "bin": {
@@ -78,19 +78,19 @@
78
78
  "url": "https://patreon.com/X_ITE"
79
79
  },
80
80
  "devDependencies": {
81
- "@electron-forge/cli": "^7.5.0",
82
- "@electron-forge/maker-deb": "^7.5.0",
83
- "@electron-forge/maker-dmg": "^7.5.0",
84
- "@electron-forge/maker-rpm": "^7.5.0",
85
- "@electron-forge/maker-squirrel": "^7.5.0",
86
- "@electron-forge/maker-zip": "^7.5.0",
87
- "@electron-forge/publisher-github": "^7.5.0",
81
+ "@electron-forge/cli": "^7.6.0",
82
+ "@electron-forge/maker-deb": "^7.6.0",
83
+ "@electron-forge/maker-dmg": "^7.6.0",
84
+ "@electron-forge/maker-rpm": "^7.6.0",
85
+ "@electron-forge/maker-squirrel": "^7.6.0",
86
+ "@electron-forge/maker-zip": "^7.6.0",
87
+ "@electron-forge/publisher-github": "^7.6.0",
88
88
  "shell-tools": "^1.1.9"
89
89
  },
90
90
  "dependencies": {
91
91
  "capitalize": "^2.0.4",
92
92
  "console": "^0.7.2",
93
- "electron": "^33.2.0",
93
+ "electron": "^33.2.1",
94
94
  "electron-prompt": "^1.7.0",
95
95
  "electron-squirrel-startup": "^1.0.1",
96
96
  "electron-tabs": "^1.0.4",
@@ -99,7 +99,7 @@
99
99
  "jquery-ui-dist": "^1.13.3",
100
100
  "jstree": "^3.3.17",
101
101
  "material-icons": "^1.13.12",
102
- "material-symbols": "^0.27.0",
102
+ "material-symbols": "^0.27.1",
103
103
  "md5": "^2.3.0",
104
104
  "mime-types": "^2.1.35",
105
105
  "monaco-editor": "^0.50.0",
@@ -109,7 +109,7 @@
109
109
  "string-similarity": "^4.0.4",
110
110
  "tweakpane": "^3.1.10",
111
111
  "update-electron-app": "^3.0.0",
112
- "x_ite": "^10.5.12",
113
- "x3d-traverse": "^1.0.5"
112
+ "x_ite": "^10.5.15",
113
+ "x3d-traverse": "^1.0.6"
114
114
  }
115
115
  }
@@ -252,7 +252,7 @@ module .exports = class ScriptEditor extends Interface
252
252
  return;
253
253
 
254
254
  this .#declarations ??= fs .readFileSync (X3D .TYPE_SCRIPT_PATH, "utf8")
255
- .replace (/^.*?(?:export = X3D;)/s, "");
255
+ .replace (/^.*?(?:export.*?;)/s, "");
256
256
 
257
257
  const fields = Array .from (this .node .getUserDefinedFields (), field =>
258
258
  {
@@ -267,7 +267,7 @@ module .exports = class ScriptEditor extends Interface
267
267
  case X3D .X3DConstants .SFNode:
268
268
  {
269
269
  if (field .getValue ())
270
- return `declare let ${field .getName ()}: X3D .${field .getValue () .getTypeName ()}Proxy;`;
270
+ return `declare let ${field .getName ()}: X3D .${field .getNodeTypeName ()}Proxy;`;
271
271
  else
272
272
  return `declare let ${field .getName ()}: X3D .SFNode | null;`;
273
273
  }
@@ -284,10 +284,12 @@ module .exports = class ScriptEditor extends Interface
284
284
  {
285
285
  return `declare let ${field .getName ()}: ${
286
286
  this .#internalTypes .get (field .getType ()) ?? "X3D ." + field .getTypeName ()
287
- };`
287
+ };`;
288
288
  }
289
289
  }
290
290
  }
291
+ default:
292
+ return "";
291
293
  }
292
294
  });
293
295
 
@@ -297,6 +299,36 @@ module .exports = class ScriptEditor extends Interface
297
299
  ${this .#declarations};
298
300
  declare const Browser: X3D .X3DBrowser;
299
301
  declare const X3DConstants: X3D .X3DConstants;
302
+ declare const X3DBrowser: typeof X3D. X3DBrowser;
303
+ declare const X3DExecutionContext: typeof X3D. X3DExecutionContext;
304
+ declare const X3DScene: typeof X3D. X3DScene;
305
+ declare const ComponentInfo: typeof X3D. ComponentInfo;
306
+ declare const ComponentInfoArray: typeof X3D. ComponentInfoArray;
307
+ declare const ProfileInfo: typeof X3D. ProfileInfo;
308
+ declare const ProfileInfoArray: typeof X3D. ProfileInfoArray;
309
+ declare const ConcreteNodesArray: typeof X3D. ConcreteNodesArray;
310
+ declare const AbstractNodesArray: typeof X3D. AbstractNodesArray;
311
+ declare const UnitInfo: typeof X3D. UnitInfo;
312
+ declare const UnitInfoArray: typeof X3D. UnitInfoArray;
313
+ declare const NamedNodesArray: typeof X3D. NamedNodesArray;
314
+ declare const ImportedNodesArray: typeof X3D. ImportedNodesArray;
315
+ declare const X3DImportedNode: typeof X3D. X3DImportedNode;
316
+ declare const ExportedNodesArray: typeof X3D. ExportedNodesArray;
317
+ declare const X3DExportedNode: typeof X3D. X3DExportedNode;
318
+ declare const ExternProtoDeclarationArray: typeof X3D. ExternProtoDeclarationArray;
319
+ declare const ProtoDeclarationArray: typeof X3D. ProtoDeclarationArray;
320
+ declare const X3DExternProtoDeclaration: typeof X3D. X3DExternProtoDeclaration;
321
+ declare const X3DProtoDeclaration: typeof X3D. X3DProtoDeclaration;
322
+ declare const X3DProtoDeclarationNode: typeof X3D. X3DProtoDeclarationNode;
323
+ declare const RouteArray: typeof X3D. RouteArray;
324
+ declare const X3DRoute: typeof X3D. X3DRoute;
325
+ declare const X3DFieldDefinition: typeof X3D. X3DFieldDefinition;
326
+ declare const FieldDefinitionArray: typeof X3D. FieldDefinitionArray;
327
+ declare const X3DField: typeof X3D. X3DField;
328
+ declare const X3DArrayField: typeof X3D. X3DArrayField;
329
+ ${Array .from (this .browser .fieldTypes)
330
+ .map (type => `declare const ${type .typeName}: typeof X3D .${type .typeName};`)
331
+ .join ("\n")}
300
332
  declare const TRUE: true;
301
333
  declare const FALSE: false;
302
334
  declare const NULL: null;
@@ -2813,11 +2813,13 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
2813
2813
  {
2814
2814
  const modelMatrix = new X3D .Matrix4 ();
2815
2815
 
2816
- for (const object of hierarchy .reverse ())
2816
+ for (let object of hierarchy .reverse ())
2817
2817
  {
2818
- if (!(object instanceof X3D .X3DNode))
2818
+ if (!(object instanceof X3D .SFNode))
2819
2819
  continue;
2820
2820
 
2821
+ object = object .getValue ();
2822
+
2821
2823
  if (object .getType () .includes (X3D .X3DConstants .X3DLayerNode))
2822
2824
  {
2823
2825
  if (object !== layerNode)
package/src/main.js CHANGED
@@ -1,3 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ if (process .argv .length > 2)
4
+ process .argv = process .argv .concat (JSON .parse (atob (process .argv .pop ())));
5
+
3
6
  const app = require ("./Application/Application") .run ();