sunrize 2.0.16 → 2.1.0
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 +4 -4
- package/src/Editors/OutlineEditor.js +4 -0
- package/src/Editors/ScriptEditor.js +91 -89
- package/src/Tools/Grouping/X3DBoundedObjectTool.x3d +45 -42
- package/src/Tools/Grouping/X3DTransformNodeTool.x3d +30 -30
- package/src/Tools/Layout/LayoutGroupTool.js +39 -1
- package/src/Undo/Editor.js +2 -1
- package/src/assets/X3DUOM.xml +339 -330
|
@@ -2,11 +2,49 @@
|
|
|
2
2
|
|
|
3
3
|
const
|
|
4
4
|
X3DBoundedObjectTool = require ("../Grouping/X3DBoundedObjectTool"),
|
|
5
|
-
ToolColors = require ("../Core/ToolColors")
|
|
5
|
+
ToolColors = require ("../Core/ToolColors"),
|
|
6
|
+
X3D = require ("../../X3D");
|
|
6
7
|
|
|
7
8
|
class LayoutGroupTool extends X3DBoundedObjectTool
|
|
8
9
|
{
|
|
9
10
|
toolBBoxColor = ToolColors .DARK_GREEN;
|
|
11
|
+
|
|
12
|
+
#scale = new X3D .Vector3 ();
|
|
13
|
+
#rectangleScale = new X3D .Vector4 ();
|
|
14
|
+
#rectangle = new X3D .Vector4 ();
|
|
15
|
+
|
|
16
|
+
traverse (type, renderObject)
|
|
17
|
+
{
|
|
18
|
+
if (this .tool)
|
|
19
|
+
{
|
|
20
|
+
if (this .layoutNode)
|
|
21
|
+
{
|
|
22
|
+
if (!this .tool .layoutDisplay)
|
|
23
|
+
this .tool .layoutDisplay = true;
|
|
24
|
+
|
|
25
|
+
renderObject .modelViewMatrix .get () .get (null, null, this .#scale);
|
|
26
|
+
this .#rectangleScale .set (this .#scale .x, this .#scale .y, this .#scale .x, this .#scale .y);
|
|
27
|
+
|
|
28
|
+
this .layoutNode .push (type, renderObject);
|
|
29
|
+
|
|
30
|
+
const rectangle = this .#rectangle
|
|
31
|
+
.assign (renderObject .getLayoutRectangles () .at (-1))
|
|
32
|
+
.divVec (this .#rectangleScale);
|
|
33
|
+
|
|
34
|
+
if (!this .tool .layoutRectangle .getValue () .equals (rectangle))
|
|
35
|
+
this .tool .layoutRectangle = rectangle;
|
|
36
|
+
|
|
37
|
+
this .layoutNode .pop (type, renderObject);
|
|
38
|
+
}
|
|
39
|
+
else
|
|
40
|
+
{
|
|
41
|
+
if (this .tool .layoutDisplay)
|
|
42
|
+
this .tool .layoutDisplay = false;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
super .traverse (type, renderObject);
|
|
47
|
+
}
|
|
10
48
|
}
|
|
11
49
|
|
|
12
50
|
module .exports = LayoutGroupTool;
|
package/src/Undo/Editor.js
CHANGED
|
@@ -534,7 +534,8 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
534
534
|
</x3d-canvas>
|
|
535
535
|
<p>Made with <a href="https://create3000.github.io/sunrize/" target="_blank">Sunrize X3D Editor</a>. If local files are not loaded <a href="https://create3000.github.io/x_ite/setup-a-localhost-server">consider setup a localhost server</a> or use <a href="https://create3000.github.io/x_ite/dom-integration">DOM integration methods</a>.</p>
|
|
536
536
|
</body>
|
|
537
|
-
</html
|
|
537
|
+
</html>
|
|
538
|
+
`
|
|
538
539
|
}
|
|
539
540
|
|
|
540
541
|
static absoluteURL = new RegExp ("^(?:[a-z]+:|//)", "i");
|