sunrize 1.0.83 → 1.0.85

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,7 +1,7 @@
1
1
  {
2
2
  "name": "sunrize",
3
3
  "productName": "Sunrize X3D Editor",
4
- "version": "1.0.83",
4
+ "version": "1.0.85",
5
5
  "description": "A Multi-Platform X3D Editor",
6
6
  "main": "src/main.js",
7
7
  "bin": {
@@ -81,7 +81,7 @@
81
81
  "qtip2": "^3.0.3",
82
82
  "spectrum-colorpicker2": "^2.0.10",
83
83
  "string-similarity": "^4.0.4",
84
- "x_ite": "^8.11.8"
84
+ "x_ite": "^8.11.11"
85
85
  },
86
86
  "config": {
87
87
  "forge": {
@@ -94,6 +94,8 @@ module .exports = new class Document extends Interface
94
94
  configure ()
95
95
  {
96
96
  this .config .file .addDefaultValues ({ inferProfileAndComponents: true })
97
+
98
+ this .fileSaveFileTypeWarning = false
97
99
  }
98
100
 
99
101
  activate ()
@@ -194,8 +196,14 @@ module .exports = new class Document extends Interface
194
196
 
195
197
  if (this .filePath)
196
198
  {
197
- if (path .extname (this .filePath) .match (/.(?:gltf|glb|obj|stl|ply|svg)/i))
199
+ if (path .extname (this .filePath) .match (/\.(?:wrl|wrz|wrl\.gz|vrml|gltf|glb|obj|stl|ply|svg)$/i))
200
+ {
201
+ if (!this .fileSaveFileTypeWarning)
202
+ console .warn (`Cannot save ${this .filePath}. File type is not supported.`)
203
+
204
+ this .fileSaveFileTypeWarning = true;
198
205
  return
206
+ }
199
207
 
200
208
  fs .writeFileSync (this .filePath, Editor .getContents (scene, path .extname (this .filePath)))
201
209
 
@@ -182,7 +182,7 @@ module .exports = class Editor
182
182
  updatedProtos = new Map (),
183
183
  removedProtoNodes = new Set ()
184
184
 
185
- Traverse .traverse ([...newProtos, ...nodes], Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY | Traverse .ROOT_NODES, (node) =>
185
+ Traverse .traverse ([... newProtos, ... nodes], Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY | Traverse .ROOT_NODES, (node) =>
186
186
  {
187
187
  if (!node .getType () .includes (X3D .X3DConstants .X3DPrototypeInstance))
188
188
  return
@@ -236,7 +236,7 @@ module .exports = class Editor
236
236
 
237
237
  if (oldWorldURL)
238
238
  {
239
- this .rewriteURLs (executionContext, [...newProtos, ...nodes], oldWorldURL [0], executionContext .worldURL, undoManager)
239
+ this .rewriteURLs (executionContext, [... newProtos, ... nodes], oldWorldURL [0], executionContext .worldURL, undoManager)
240
240
  }
241
241
 
242
242
  scene .removeMetaData ("base")