@babylonjs/gui-editor 5.0.0-beta.5 → 5.0.0-beta.6
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/babylon.guiEditor.max.js +604 -2134
- package/babylon.guiEditor.max.js.map +1 -1
- package/babylon.guiEditor.module.d.ts +104 -707
- package/package.json +2 -2
package/babylon.guiEditor.max.js
CHANGED
@@ -10189,7 +10189,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
10189
10189
|
|
10190
10190
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a);
|
10191
10191
|
// Module
|
10192
|
-
___CSS_LOADER_EXPORT___.push([module.i, ":root {\n --blackBarHeight: 55px; }\n\n#gui-editor-workbench-root {\n display: grid;\n grid-template-rows: calc(100% - 55px);\n height: 100%;\n width: 100%;\n background: #e2e2e2;\n font: 14px \"acumin-pro-condensed\"; }\n\n.wait-screen {\n display: grid;\n justify-content: center;\n align-content: center;\n height: 100%;\n width: 100%;\n background: #464646;\n opacity: 0.95;\n color: white;\n font: 24px \"acumin-pro-condensed\";\n position: absolute;\n top: 0;\n left: 0; }\n .wait-screen.hidden {\n visibility: hidden; }\n\n#leftGrab {\n grid-row: 1 / span 2;\n grid-column: 2;\n cursor: ew-resize; }\n\n#rightGrab {\n grid-row: 1 / span 2;\n grid-column: 5;\n cursor: ew-resize; }\n\n#toolbarGrab {\n background: #333333;\n grid-row: 1 / span 3;\n grid-column: 3;\n height: 100%; }\n #toolbarGrab .blackLine {\n height: 5px;\n background: black; }\n #toolbarGrab .toolbar-label {\n color: white;\n font-size: 18px;\n display: grid;\n align-items: center;\n cursor: pointer;\n user-select: none;\n grid-template-columns: 1fr 20px;\n grid-template-rows: 100%;\n position: relative; }\n #toolbarGrab .toolbar-label.active {\n font-weight: bold;\n font-size: 20px; }\n #toolbarGrab .toolbar-label:hover {\n background: var(--selectionGrey); }\n #toolbarGrab .toolbar-label:hover .sub-items {\n display: block; }\n #toolbarGrab .toolbar-icon {\n width: 40px;\n height: 40px; }\n\n.diagram-container {\n position: relative;\n display: grid;\n grid-row: 1;\n grid-column: 4;\n background: #5f5b60;\n width: 100%;\n height: 100%; }\n .diagram-container .diagram {\n display: none;\n width: 100%;\n height: 100%; }\n\n.right-panel {\n grid-row: 1 / span 2;\n grid-column: 6;\n display: grid;\n grid-template-rows: 1fr 40px auto 40px;\n grid-template-columns: 100%;\n height: calc(100% - var(--blackBarHeight));\n overflow-y: auto; }\n .right-panel #propertyTab {\n grid-row: 1;\n grid-column: 1; }\n .right-panel .button {\n display: grid;\n justify-content: center;\n align-content: center;\n height: auto;\n width: calc(100% / 7);\n cursor: pointer; }\n .right-panel .button:hover {\n background: #337ab7;\n color: white;\n opacity: 0.8; }\n .right-panel .button.selected {\n background: #337ab7;\n color: white; }\n .right-panel .button.align {\n justify-content: stretch;\n text-align: center; }\n\n.blocker {\n visibility: hidden;\n position: absolute;\n width: calc(100% - 40px);\n height: 100%;\n top: 0;\n left: 0;\n background: rgba(20, 20, 20, 0.95);\n font-family: \"acumin-pro-condensed\";\n color: white;\n font-size: 24px;\n display: grid;\n align-content: center;\n justify-content: center;\n user-select: none;\n padding: 20px;\n text-align: center; }\n\n#log-console {\n grid-row: 2;\n grid-column: 4;\n display: none; }\n\n.dialog-container {\n position: absolute;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.6);\n display: grid;\n font-family: \"acumin-pro-condensed\";\n top: 0; }\n .dialog-container .dialog {\n align-self: center;\n justify-self: center;\n min-height: 140px;\n max-width: 400px;\n border-radius: 10px;\n background: white;\n display: grid;\n grid-template-columns: 100%;\n grid-template-rows: calc(100% - 50px) 50px; }\n .dialog-container .dialog .dialog-message {\n grid-row: 1;\n grid-column: 1;\n margin-top: 20px;\n padding: 10px;\n font-size: 18px;\n color: black; }\n .dialog-container .dialog .dialog-buttons {\n grid-row: 2;\n grid-column: 1;\n display: grid;\n grid-template-rows: 100%;\n grid-template-columns: 100%;\n color: white; }\n .dialog-container .dialog .dialog-buttons .dialog-button-ok {\n cursor: pointer;\n justify-self: center;\n background: green;\n min-width: 80px;\n justify-content: center;\n display: grid;\n align-content: center;\n align-self: center;\n height: 35px;\n border-radius: 10px; }\n .dialog-container .dialog .dialog-buttons .dialog-button-ok:hover {\n opacity: 0.8; }\n .dialog-container .dialog .dialog-buttons .dialog-button-ok.error {\n background: red; }\n\n.gizmo .bounding-box-line {\n background-color: black;\n position: absolute;\n line-height: 1px;\n height: 1px;\n pointer-events: none; }\n\n.gizmo .scale-point-container {\n position: absolute;\n width: 30px;\n height: 30px; }\n .gizmo .scale-point-container .scale-point {\n top: 10px;\n left: 10px;\n position: absolute;\n width: 10px;\n height: 10px;\n background: transparent;\n outline: #7d7d7d 2px solid; }\n .gizmo .scale-point-container .rotate-click-area {\n width: 20px;\n height: 20px;\n position: absolute; }\n .gizmo .scale-point-container .scale-click-area {\n width: 20px;\n height: 20px;\n position: absolute; }\n\n.gizmo .pivot-point {\n width: 30px;\n height: 30px;\n background: transparent;\n position: absolute; }\n", "",{"version":3,"sources":["webpack://./main.scss"],"names":[],"mappings":"AAAA;EACI,sBAAiB,EAAA;;AAGrB;EACI,aAAa;EACb,qCAAqC;EACrC,YAAY;EACZ,WAAW;EACX,mBAAmB;EACnB,iCAAiC,EAAA;;AAGrC;EACI,aAAa;EACb,uBAAuB;EACvB,qBAAqB;EACrB,YAAY;EACZ,WAAW;EACX,mBAAmB;EACnB,aAAa;EACb,YAAW;EACX,iCAAiC;EACjC,kBAAkB;EAClB,MAAM;EACN,OAAO,EAAA;EAZX;IAeQ,kBAAkB,EAAA;;AAI1B;EACI,oBAAoB;EACpB,cAAc;EACd,iBAAiB,EAAA;;AAGrB;EACI,oBAAoB;EACpB,cAAc;EACd,iBAAiB,EAAA;;AAIrB;EACI,mBAAmB;EACnB,oBAAoB;EACpB,cAAc;EACd,YAAY,EAAA;EAJhB;IAOQ,WAAY;IACZ,iBAAiB,EAAA;EARzB;IAWQ,YAAW;IACX,eAAe;IACf,aAAa;IACb,mBAAmB;IACnB,eAAe;IACf,iBAAiB;IACjB,+BAA+B;IAC/B,wBAAwB;IACxB,kBAAkB,EAAA;IAnB1B;MAsBY,iBAAiB;MACjB,eAAe,EAAA;IAvB3B;MA2BY,gCAAgC,EAAA;MA3B5C;QA6BgB,cAAc,EAAA;EA7B9B;IAkCQ,WAAW;IACX,YAAY,EAAA;;AAIpB;EACI,kBAAkB;EAClB,aAAa;EACb,WAAW;EACX,cAAc;EACd,mBAAmB;EACnB,WAAW;EACX,YAAY,EAAA;EAPhB;IAUQ,aAAa;IACb,WAAW;IACX,YAAY,EAAA;;AAIpB;EACI,oBAAoB;EACpB,cAAc;EACd,aAAa;EACb,sCAAsC;EACtC,2BAA2B;EAC3B,0CAA0C;EAC1C,gBAAgB,EAAA;EAPpB;IAUQ,WAAW;IACX,cAAc,EAAA;EAXtB;IAeQ,aAAa;IACb,uBAAuB;IACvB,qBAAqB;IACrB,YAAY;IACZ,qBAAqB;IACrB,eAAe,EAAA;IApBvB;MAuBY,mBAA6B;MAC7B,YAAY;MACZ,YAAY,EAAA;IAzBxB;MA6BY,mBAA6B;MAC7B,YAAY,EAAA;IA9BxB;MAkCY,wBAAwB;MACxB,kBAAkB,EAAA;;AAK9B;EACI,kBAAkB;EAClB,kBAAkB;EAClB,wBAAwB;EACxB,YAAY;EACZ,MAAM;EACN,OAAO;EAEP,kCAAkC;EAClC,mCAAmC;EACnC,YAAY;EACZ,eAAe;EAEf,aAAa;EACb,qBAAqB;EACrB,uBAAuB;EAEvB,iBAAiB;EAEjB,aAAa;EACb,kBAAkB,EAAA;;AAGtB;EACI,WAAW;EACX,cAAc;EACd,aAAa,EAAA;;AAGjB;EACI,kBAAkB;EAClB,WAAW;EACX,YAAY;EACZ,8BAAoC;EACpC,aAAa;EACb,mCAAmC;EACnC,MAAK,EAAA;EAPT;IAUQ,kBAAkB;IAClB,oBAAoB;IACpB,iBAAiB;IACjB,gBAAgB;IAChB,mBAAmB;IACnB,iBAAiB;IAEjB,aAAa;IACb,2BAA2B;IAC3B,0CAA0C,EAAA;IAnBlD;MAsBY,WAAW;MACX,cAAc;MACd,gBAAgB;MAChB,aAAa;MACb,eAAe;MACf,YAAY,EAAA;IA3BxB;MA+BY,WAAW;MACX,cAAc;MACd,aAAa;MACb,wBAAwB;MACxB,2BAA2B;MAC3B,YAAY,EAAA;MApCxB;QAuCgB,eAAe;QACf,oBAAoB;QACpB,iBAAgB;QAChB,eAAe;QACf,uBAAuB;QACvB,aAAa;QACb,qBAAqB;QACrB,kBAAkB;QAClB,YAAY;QACZ,mBAAmB,EAAA;QAhDnC;UAmDoB,YAAY,EAAA;QAnDhC;UAuDoB,eAAe,EAAA;;AAMnC;EAEQ,uBAAuB;EACvB,kBAAkB;EAClB,gBAAgB;EAChB,WAAW;EACX,oBAAoB,EAAA;;AAN5B;EASQ,kBAAkB;EAClB,WAAW;EACX,YAAY,EAAA;EAXpB;IAaY,SAAS;IACT,UAAU;IACV,kBAAkB;IAClB,WAAW;IACX,YAAY;IACZ,uBAAuB;IACvB,0BAAqC,EAAA;EAnBjD;IAsBY,WAAW;IACX,YAAY;IACZ,kBAAkB,EAAA;EAxB9B;IA2BY,WAAW;IACX,YAAY;IACZ,kBAAkB,EAAA;;AA7B9B;EAiCQ,WAAW;EACX,YAAY;EACZ,uBAAuB;EACvB,kBAAkB,EAAA","sourcesContent":[":root {\r\n --blackBarHeight: 55px;\r\n}\r\n\r\n#gui-editor-workbench-root {\r\n display: grid;\r\n grid-template-rows: calc(100% - 55px);\r\n height: 100%;\r\n width: 100%;\r\n background: #e2e2e2;\r\n font: 14px \"acumin-pro-condensed\"; \r\n}\r\n\r\n.wait-screen {\r\n display: grid;\r\n justify-content: center;\r\n align-content: center;\r\n height: 100%;\r\n width: 100%;\r\n background: #464646;\r\n opacity: 0.95;\r\n color:white;\r\n font: 24px \"acumin-pro-condensed\"; \r\n position: absolute;\r\n top: 0;\r\n left: 0; \r\n\r\n &.hidden {\r\n visibility: hidden;\r\n }\r\n}\r\n\r\n#leftGrab {\r\n grid-row: 1 / span 2;\r\n grid-column: 2;\r\n cursor: ew-resize;\r\n}\r\n\r\n#rightGrab {\r\n grid-row: 1 / span 2;\r\n grid-column: 5;\r\n cursor: ew-resize;\r\n}\r\n\r\n\r\n#toolbarGrab {\r\n background: #333333;\r\n grid-row: 1 / span 3;\r\n grid-column: 3;\r\n height: 100%;\r\n\r\n .blackLine {\r\n height: 5px;\r\n background: black;\r\n }\r\n .toolbar-label {\r\n color:white;\r\n font-size: 18px;\r\n display: grid;\r\n align-items: center;\r\n cursor: pointer;\r\n user-select: none;\r\n grid-template-columns: 1fr 20px;\r\n grid-template-rows: 100%;\r\n position: relative;\r\n\r\n &.active {\r\n font-weight: bold;\r\n font-size: 20px;\r\n }\r\n\r\n &:hover {\r\n background: var(--selectionGrey);\r\n .sub-items {\r\n display: block;\r\n }\r\n } \r\n }\r\n .toolbar-icon {\r\n width: 40px;\r\n height: 40px;\r\n }\r\n}\r\n\r\n.diagram-container {\r\n position: relative;\r\n display: grid;\r\n grid-row: 1;\r\n grid-column: 4;\r\n background: #5f5b60;\r\n width: 100%;\r\n height: 100%;\r\n\r\n .diagram {\r\n display: none;\r\n width: 100%;\r\n height: 100%;\r\n }\r\n}\r\n\r\n.right-panel {\r\n grid-row: 1 / span 2;\r\n grid-column: 6;\r\n display: grid;\r\n grid-template-rows: 1fr 40px auto 40px;\r\n grid-template-columns: 100%;\r\n height: calc(100% - var(--blackBarHeight));\r\n overflow-y: auto;\r\n\r\n #propertyTab {\r\n grid-row: 1;\r\n grid-column: 1;\r\n } \r\n \r\n .button {\r\n display: grid;\r\n justify-content: center;\r\n align-content: center;\r\n height: auto;\r\n width: calc(100% / 7);\r\n cursor: pointer;\r\n\r\n &:hover {\r\n background: rgb(51, 122, 183);\r\n color: white;\r\n opacity: 0.8;\r\n }\r\n\r\n &.selected {\r\n background: rgb(51, 122, 183);\r\n color: white;\r\n }\r\n \r\n &.align {\r\n justify-content: stretch;\r\n text-align: center;\r\n }\r\n } \r\n}\r\n\r\n.blocker {\r\n visibility: hidden;\r\n position: absolute;\r\n width: calc(100% - 40px);\r\n height: 100%;\r\n top: 0;\r\n left: 0;\r\n\r\n background: rgba(20, 20, 20, 0.95); \r\n font-family: \"acumin-pro-condensed\";\r\n color: white;\r\n font-size: 24px;\r\n\r\n display: grid;\r\n align-content: center;\r\n justify-content: center;\r\n\r\n user-select: none;\r\n\r\n padding: 20px;\r\n text-align: center;\r\n}\r\n\r\n#log-console {\r\n grid-row: 2;\r\n grid-column: 4;\r\n display: none;\r\n}\r\n\r\n.dialog-container {\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n background: rgba(0.1, 0.1, 0.1, 0.6);\r\n display: grid;\r\n font-family: \"acumin-pro-condensed\";\r\n top:0;\r\n\r\n .dialog {\r\n align-self: center;\r\n justify-self: center;\r\n min-height: 140px;\r\n max-width: 400px;\r\n border-radius: 10px;\r\n background: white;\r\n\r\n display: grid;\r\n grid-template-columns: 100%;\r\n grid-template-rows: calc(100% - 50px) 50px;\r\n\r\n .dialog-message {\r\n grid-row: 1;\r\n grid-column: 1;\r\n margin-top: 20px;\r\n padding: 10px;\r\n font-size: 18px;\r\n color: black;\r\n }\r\n\r\n .dialog-buttons {\r\n grid-row: 2;\r\n grid-column: 1;\r\n display: grid;\r\n grid-template-rows: 100%;\r\n grid-template-columns: 100%;\r\n color: white;\r\n\r\n .dialog-button-ok {\r\n cursor: pointer;\r\n justify-self: center;\r\n background:green;\r\n min-width: 80px;\r\n justify-content: center;\r\n display: grid;\r\n align-content: center;\r\n align-self: center;\r\n height: 35px; \r\n border-radius: 10px;\r\n\r\n &:hover {\r\n opacity: 0.8;\r\n }\r\n\r\n &.error {\r\n background: red;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n.gizmo {\r\n .bounding-box-line {\r\n background-color: black;\r\n position: absolute;\r\n line-height: 1px;\r\n height: 1px;\r\n pointer-events: none;\r\n }\r\n .scale-point-container {\r\n position: absolute;\r\n width: 30px;\r\n height: 30px;\r\n .scale-point {\r\n top: 10px;\r\n left: 10px;\r\n position: absolute;\r\n width: 10px;\r\n height: 10px;\r\n background: transparent;\r\n outline: rgb(125, 125, 125) 2px solid;\r\n }\r\n .rotate-click-area {\r\n width: 20px;\r\n height: 20px;\r\n position: absolute;\r\n }\r\n .scale-click-area {\r\n width: 20px;\r\n height: 20px;\r\n position: absolute;\r\n }\r\n }\r\n .pivot-point {\r\n width: 30px;\r\n height: 30px;\r\n background: transparent;\r\n position: absolute;\r\n }\r\n}"],"sourceRoot":""}]);
|
10192
|
+
___CSS_LOADER_EXPORT___.push([module.i, ":root {\n --blackBarHeight: 55px; }\n\n#gui-editor-workbench-root {\n display: grid;\n grid-template-rows: calc(100% - 55px);\n height: 100%;\n width: 100%;\n background: #e2e2e2;\n font: 14px \"acumin-pro-condensed\"; }\n\n.wait-screen {\n display: grid;\n justify-content: center;\n align-content: center;\n height: 100%;\n width: 100%;\n background: #464646;\n opacity: 0.95;\n color: white;\n font: 24px \"acumin-pro-condensed\";\n position: absolute;\n top: 0;\n left: 0; }\n .wait-screen.hidden {\n visibility: hidden; }\n\n#leftGrab {\n grid-row: 1 / span 2;\n grid-column: 2;\n cursor: ew-resize; }\n\n#rightGrab {\n grid-row: 1 / span 2;\n grid-column: 5;\n cursor: ew-resize; }\n\n#toolbarGrab {\n background: #333333;\n grid-row: 1 / span 3;\n grid-column: 3;\n height: 100%; }\n #toolbarGrab .blackLine {\n height: 5px;\n background: black; }\n #toolbarGrab .toolbar-label {\n color: white;\n font-size: 18px;\n display: grid;\n align-items: center;\n cursor: pointer;\n user-select: none;\n grid-template-columns: 1fr 20px;\n grid-template-rows: 100%;\n position: relative; }\n #toolbarGrab .toolbar-label.active {\n font-weight: bold;\n font-size: 20px; }\n #toolbarGrab .toolbar-label:hover {\n background: var(--selectionGrey); }\n #toolbarGrab .toolbar-label:hover .sub-items {\n display: block; }\n #toolbarGrab .toolbar-icon {\n width: 40px;\n height: 40px; }\n\n.diagram-container {\n position: relative;\n display: grid;\n grid-row: 1;\n grid-column: 4;\n background: #CCCCCC;\n width: 100%;\n height: 100%;\n overflow: hidden; }\n .diagram-container .diagram {\n display: none;\n width: 100%;\n height: 100%; }\n\n.right-panel {\n grid-row: 1 / span 2;\n grid-column: 6;\n display: grid;\n grid-template-rows: 1fr 40px auto 40px;\n grid-template-columns: 100%;\n height: calc(100% - var(--blackBarHeight));\n overflow-y: auto; }\n .right-panel #propertyTab {\n grid-row: 1;\n grid-column: 1; }\n .right-panel .button {\n display: grid;\n justify-content: center;\n align-content: center;\n height: auto;\n width: calc(100% / 7);\n cursor: pointer; }\n .right-panel .button:hover {\n background: #337ab7;\n color: white;\n opacity: 0.8; }\n .right-panel .button.selected {\n background: #337ab7;\n color: white; }\n .right-panel .button.align {\n justify-content: stretch;\n text-align: center; }\n\n.blocker {\n visibility: hidden;\n position: absolute;\n width: calc(100% - 40px);\n height: 100%;\n top: 0;\n left: 0;\n background: rgba(20, 20, 20, 0.95);\n font-family: \"acumin-pro-condensed\";\n color: white;\n font-size: 24px;\n display: grid;\n align-content: center;\n justify-content: center;\n user-select: none;\n padding: 20px;\n text-align: center; }\n\n#log-console {\n grid-row: 2;\n grid-column: 4;\n display: none; }\n\n.dialog-container {\n position: absolute;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.6);\n display: grid;\n font-family: \"acumin-pro-condensed\";\n top: 0; }\n .dialog-container .dialog {\n align-self: center;\n justify-self: center;\n min-height: 140px;\n max-width: 400px;\n border-radius: 10px;\n background: white;\n display: grid;\n grid-template-columns: 100%;\n grid-template-rows: calc(100% - 50px) 50px; }\n .dialog-container .dialog .dialog-message {\n grid-row: 1;\n grid-column: 1;\n margin-top: 20px;\n padding: 10px;\n font-size: 18px;\n color: black; }\n .dialog-container .dialog .dialog-buttons {\n grid-row: 2;\n grid-column: 1;\n display: grid;\n grid-template-rows: 100%;\n grid-template-columns: 100%;\n color: white; }\n .dialog-container .dialog .dialog-buttons .dialog-button-ok {\n cursor: pointer;\n justify-self: center;\n background: green;\n min-width: 80px;\n justify-content: center;\n display: grid;\n align-content: center;\n align-self: center;\n height: 35px;\n border-radius: 10px; }\n .dialog-container .dialog .dialog-buttons .dialog-button-ok:hover {\n opacity: 0.8; }\n .dialog-container .dialog .dialog-buttons .dialog-button-ok.error {\n background: red; }\n\n.gizmo .bounding-box-line {\n background-color: black;\n position: absolute;\n line-height: 1px;\n height: 1px;\n pointer-events: none; }\n\n.gizmo .scale-point-container {\n position: absolute;\n width: 30px;\n height: 30px; }\n .gizmo .scale-point-container .scale-point {\n top: 10px;\n left: 10px;\n position: absolute;\n width: 10px;\n height: 10px;\n background: transparent;\n outline: #7d7d7d 2px solid; }\n .gizmo .scale-point-container .rotate-click-area {\n width: 20px;\n height: 20px;\n position: absolute; }\n .gizmo .scale-point-container .scale-click-area {\n width: 20px;\n height: 20px;\n position: absolute; }\n\n.gizmo .pivot-point {\n width: 30px;\n height: 30px;\n background: transparent;\n position: absolute; }\n\n#workbench-canvas {\n position: relative; }\n\n.artboard-stroke {\n outline: 1px solid black;\n position: absolute;\n z-index: 5;\n pointer-events: none; }\n\n.artboard-background {\n position: absolute;\n background: repeating-conic-gradient(#E2E2E2 0% 25%, white 0% 50%) 50%/20px 20px;\n width: 100%;\n height: 100%; }\n", "",{"version":3,"sources":["webpack://./main.scss"],"names":[],"mappings":"AAAA;EACI,sBAAiB,EAAA;;AAGrB;EACI,aAAa;EACb,qCAAqC;EACrC,YAAY;EACZ,WAAW;EACX,mBAAmB;EACnB,iCAAiC,EAAA;;AAGrC;EACI,aAAa;EACb,uBAAuB;EACvB,qBAAqB;EACrB,YAAY;EACZ,WAAW;EACX,mBAAmB;EACnB,aAAa;EACb,YAAW;EACX,iCAAiC;EACjC,kBAAkB;EAClB,MAAM;EACN,OAAO,EAAA;EAZX;IAeQ,kBAAkB,EAAA;;AAI1B;EACI,oBAAoB;EACpB,cAAc;EACd,iBAAiB,EAAA;;AAGrB;EACI,oBAAoB;EACpB,cAAc;EACd,iBAAiB,EAAA;;AAIrB;EACI,mBAAmB;EACnB,oBAAoB;EACpB,cAAc;EACd,YAAY,EAAA;EAJhB;IAOQ,WAAY;IACZ,iBAAiB,EAAA;EARzB;IAWQ,YAAW;IACX,eAAe;IACf,aAAa;IACb,mBAAmB;IACnB,eAAe;IACf,iBAAiB;IACjB,+BAA+B;IAC/B,wBAAwB;IACxB,kBAAkB,EAAA;IAnB1B;MAsBY,iBAAiB;MACjB,eAAe,EAAA;IAvB3B;MA2BY,gCAAgC,EAAA;MA3B5C;QA6BgB,cAAc,EAAA;EA7B9B;IAkCQ,WAAW;IACX,YAAY,EAAA;;AAIpB;EACI,kBAAkB;EAClB,aAAa;EACb,WAAW;EACX,cAAc;EACd,mBAAmB;EACnB,WAAW;EACX,YAAY;EACZ,gBAAgB,EAAA;EARpB;IAWQ,aAAa;IACb,WAAW;IACX,YAAY,EAAA;;AAIpB;EACI,oBAAoB;EACpB,cAAc;EACd,aAAa;EACb,sCAAsC;EACtC,2BAA2B;EAC3B,0CAA0C;EAC1C,gBAAgB,EAAA;EAPpB;IAUQ,WAAW;IACX,cAAc,EAAA;EAXtB;IAeQ,aAAa;IACb,uBAAuB;IACvB,qBAAqB;IACrB,YAAY;IACZ,qBAAqB;IACrB,eAAe,EAAA;IApBvB;MAuBY,mBAA6B;MAC7B,YAAY;MACZ,YAAY,EAAA;IAzBxB;MA6BY,mBAA6B;MAC7B,YAAY,EAAA;IA9BxB;MAkCY,wBAAwB;MACxB,kBAAkB,EAAA;;AAK9B;EACI,kBAAkB;EAClB,kBAAkB;EAClB,wBAAwB;EACxB,YAAY;EACZ,MAAM;EACN,OAAO;EAEP,kCAAkC;EAClC,mCAAmC;EACnC,YAAY;EACZ,eAAe;EAEf,aAAa;EACb,qBAAqB;EACrB,uBAAuB;EAEvB,iBAAiB;EAEjB,aAAa;EACb,kBAAkB,EAAA;;AAGtB;EACI,WAAW;EACX,cAAc;EACd,aAAa,EAAA;;AAGjB;EACI,kBAAkB;EAClB,WAAW;EACX,YAAY;EACZ,8BAAoC;EACpC,aAAa;EACb,mCAAmC;EACnC,MAAK,EAAA;EAPT;IAUQ,kBAAkB;IAClB,oBAAoB;IACpB,iBAAiB;IACjB,gBAAgB;IAChB,mBAAmB;IACnB,iBAAiB;IAEjB,aAAa;IACb,2BAA2B;IAC3B,0CAA0C,EAAA;IAnBlD;MAsBY,WAAW;MACX,cAAc;MACd,gBAAgB;MAChB,aAAa;MACb,eAAe;MACf,YAAY,EAAA;IA3BxB;MA+BY,WAAW;MACX,cAAc;MACd,aAAa;MACb,wBAAwB;MACxB,2BAA2B;MAC3B,YAAY,EAAA;MApCxB;QAuCgB,eAAe;QACf,oBAAoB;QACpB,iBAAgB;QAChB,eAAe;QACf,uBAAuB;QACvB,aAAa;QACb,qBAAqB;QACrB,kBAAkB;QAClB,YAAY;QACZ,mBAAmB,EAAA;QAhDnC;UAmDoB,YAAY,EAAA;QAnDhC;UAuDoB,eAAe,EAAA;;AAMnC;EAEQ,uBAAuB;EACvB,kBAAkB;EAClB,gBAAgB;EAChB,WAAW;EACX,oBAAoB,EAAA;;AAN5B;EASQ,kBAAkB;EAClB,WAAW;EACX,YAAY,EAAA;EAXpB;IAaY,SAAS;IACT,UAAU;IACV,kBAAkB;IAClB,WAAW;IACX,YAAY;IACZ,uBAAuB;IACvB,0BAAqC,EAAA;EAnBjD;IAsBY,WAAW;IACX,YAAY;IACZ,kBAAkB,EAAA;EAxB9B;IA2BY,WAAW;IACX,YAAY;IACZ,kBAAkB,EAAA;;AA7B9B;EAiCQ,WAAW;EACX,YAAY;EACZ,uBAAuB;EACvB,kBAAkB,EAAA;;AAG1B;EACI,kBAAkB,EAAA;;AAEtB;EACI,wBAAwB;EACxB,kBAAkB;EAClB,UAAU;EACV,oBAAoB,EAAA;;AAExB;EACI,kBAAkB;EAClB,gFACe;EACf,WAAW;EACX,YAAY,EAAA","sourcesContent":[":root {\r\n --blackBarHeight: 55px;\r\n}\r\n\r\n#gui-editor-workbench-root {\r\n display: grid;\r\n grid-template-rows: calc(100% - 55px);\r\n height: 100%;\r\n width: 100%;\r\n background: #e2e2e2;\r\n font: 14px \"acumin-pro-condensed\"; \r\n}\r\n\r\n.wait-screen {\r\n display: grid;\r\n justify-content: center;\r\n align-content: center;\r\n height: 100%;\r\n width: 100%;\r\n background: #464646;\r\n opacity: 0.95;\r\n color:white;\r\n font: 24px \"acumin-pro-condensed\"; \r\n position: absolute;\r\n top: 0;\r\n left: 0; \r\n\r\n &.hidden {\r\n visibility: hidden;\r\n }\r\n}\r\n\r\n#leftGrab {\r\n grid-row: 1 / span 2;\r\n grid-column: 2;\r\n cursor: ew-resize;\r\n}\r\n\r\n#rightGrab {\r\n grid-row: 1 / span 2;\r\n grid-column: 5;\r\n cursor: ew-resize;\r\n}\r\n\r\n\r\n#toolbarGrab {\r\n background: #333333;\r\n grid-row: 1 / span 3;\r\n grid-column: 3;\r\n height: 100%;\r\n\r\n .blackLine {\r\n height: 5px;\r\n background: black;\r\n }\r\n .toolbar-label {\r\n color:white;\r\n font-size: 18px;\r\n display: grid;\r\n align-items: center;\r\n cursor: pointer;\r\n user-select: none;\r\n grid-template-columns: 1fr 20px;\r\n grid-template-rows: 100%;\r\n position: relative;\r\n\r\n &.active {\r\n font-weight: bold;\r\n font-size: 20px;\r\n }\r\n\r\n &:hover {\r\n background: var(--selectionGrey);\r\n .sub-items {\r\n display: block;\r\n }\r\n } \r\n }\r\n .toolbar-icon {\r\n width: 40px;\r\n height: 40px;\r\n }\r\n}\r\n\r\n.diagram-container {\r\n position: relative;\r\n display: grid;\r\n grid-row: 1;\r\n grid-column: 4;\r\n background: #CCCCCC;\r\n width: 100%;\r\n height: 100%;\r\n overflow: hidden;\r\n\r\n .diagram {\r\n display: none;\r\n width: 100%;\r\n height: 100%;\r\n }\r\n}\r\n\r\n.right-panel {\r\n grid-row: 1 / span 2;\r\n grid-column: 6;\r\n display: grid;\r\n grid-template-rows: 1fr 40px auto 40px;\r\n grid-template-columns: 100%;\r\n height: calc(100% - var(--blackBarHeight));\r\n overflow-y: auto;\r\n\r\n #propertyTab {\r\n grid-row: 1;\r\n grid-column: 1;\r\n } \r\n \r\n .button {\r\n display: grid;\r\n justify-content: center;\r\n align-content: center;\r\n height: auto;\r\n width: calc(100% / 7);\r\n cursor: pointer;\r\n\r\n &:hover {\r\n background: rgb(51, 122, 183);\r\n color: white;\r\n opacity: 0.8;\r\n }\r\n\r\n &.selected {\r\n background: rgb(51, 122, 183);\r\n color: white;\r\n }\r\n \r\n &.align {\r\n justify-content: stretch;\r\n text-align: center;\r\n }\r\n } \r\n}\r\n\r\n.blocker {\r\n visibility: hidden;\r\n position: absolute;\r\n width: calc(100% - 40px);\r\n height: 100%;\r\n top: 0;\r\n left: 0;\r\n\r\n background: rgba(20, 20, 20, 0.95); \r\n font-family: \"acumin-pro-condensed\";\r\n color: white;\r\n font-size: 24px;\r\n\r\n display: grid;\r\n align-content: center;\r\n justify-content: center;\r\n\r\n user-select: none;\r\n\r\n padding: 20px;\r\n text-align: center;\r\n}\r\n\r\n#log-console {\r\n grid-row: 2;\r\n grid-column: 4;\r\n display: none;\r\n}\r\n\r\n.dialog-container {\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n background: rgba(0.1, 0.1, 0.1, 0.6);\r\n display: grid;\r\n font-family: \"acumin-pro-condensed\";\r\n top:0;\r\n\r\n .dialog {\r\n align-self: center;\r\n justify-self: center;\r\n min-height: 140px;\r\n max-width: 400px;\r\n border-radius: 10px;\r\n background: white;\r\n\r\n display: grid;\r\n grid-template-columns: 100%;\r\n grid-template-rows: calc(100% - 50px) 50px;\r\n\r\n .dialog-message {\r\n grid-row: 1;\r\n grid-column: 1;\r\n margin-top: 20px;\r\n padding: 10px;\r\n font-size: 18px;\r\n color: black;\r\n }\r\n\r\n .dialog-buttons {\r\n grid-row: 2;\r\n grid-column: 1;\r\n display: grid;\r\n grid-template-rows: 100%;\r\n grid-template-columns: 100%;\r\n color: white;\r\n\r\n .dialog-button-ok {\r\n cursor: pointer;\r\n justify-self: center;\r\n background:green;\r\n min-width: 80px;\r\n justify-content: center;\r\n display: grid;\r\n align-content: center;\r\n align-self: center;\r\n height: 35px; \r\n border-radius: 10px;\r\n\r\n &:hover {\r\n opacity: 0.8;\r\n }\r\n\r\n &.error {\r\n background: red;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n.gizmo {\r\n .bounding-box-line {\r\n background-color: black;\r\n position: absolute;\r\n line-height: 1px;\r\n height: 1px;\r\n pointer-events: none;\r\n }\r\n .scale-point-container {\r\n position: absolute;\r\n width: 30px;\r\n height: 30px;\r\n .scale-point {\r\n top: 10px;\r\n left: 10px;\r\n position: absolute;\r\n width: 10px;\r\n height: 10px;\r\n background: transparent;\r\n outline: rgb(125, 125, 125) 2px solid;\r\n }\r\n .rotate-click-area {\r\n width: 20px;\r\n height: 20px;\r\n position: absolute;\r\n }\r\n .scale-click-area {\r\n width: 20px;\r\n height: 20px;\r\n position: absolute;\r\n }\r\n }\r\n .pivot-point {\r\n width: 30px;\r\n height: 30px;\r\n background: transparent;\r\n position: absolute;\r\n }\r\n}\r\n#workbench-canvas {\r\n position: relative;\r\n}\r\n.artboard-stroke {\r\n outline: 1px solid black;\r\n position: absolute;\r\n z-index: 5;\r\n pointer-events: none;\r\n}\r\n.artboard-background {\r\n position: absolute;\r\n background: repeating-conic-gradient(#E2E2E2 0% 25%, white 0% 50%) \r\n 50% / 20px 20px;\r\n width: 100%;\r\n height: 100%;\r\n}"],"sourceRoot":""}]);
|
10193
10193
|
// Exports
|
10194
10194
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
10195
10195
|
|
@@ -45191,7 +45191,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
45191
45191
|
|
45192
45192
|
|
45193
45193
|
|
45194
|
-
|
45195
45194
|
|
45196
45195
|
|
45197
45196
|
__webpack_require__(/*! ./propertyTab.scss */ "./components/propertyTab/propertyTab.scss");
|
@@ -45333,7 +45332,6 @@ var PropertyTabComponent = /** @class */ (function (_super) {
|
|
45333
45332
|
}
|
45334
45333
|
});
|
45335
45334
|
this.props.globalState.onResizeObservable.add(function (newSize) {
|
45336
|
-
_this.props.globalState.workbench.artBoardBackground._markAsDirty(true);
|
45337
45335
|
_this.forceUpdate();
|
45338
45336
|
});
|
45339
45337
|
this._onBuiltObserver = this.props.globalState.onBuiltObservable.add(function () {
|
@@ -45353,16 +45351,10 @@ var PropertyTabComponent = /** @class */ (function (_super) {
|
|
45353
45351
|
}, undefined, true);
|
45354
45352
|
};
|
45355
45353
|
PropertyTabComponent.prototype.save = function (saveCallback) {
|
45356
|
-
|
45357
|
-
this.props.globalState.
|
45354
|
+
this.props.globalState.workbench.removeEditorTransformation();
|
45355
|
+
var size = this.props.globalState.workbench.guiSize;
|
45356
|
+
this.props.globalState.guiTexture.scaleTo(size.width, size.height);
|
45358
45357
|
saveCallback();
|
45359
|
-
//readding the art board at the front of the list so it will be the first thing rendered.
|
45360
|
-
if (this.props.globalState.guiTexture.getChildren()[0].children.length) {
|
45361
|
-
this.props.globalState.guiTexture.getChildren()[0].children.unshift(this.props.globalState.workbench.artBoardBackground);
|
45362
|
-
}
|
45363
|
-
else {
|
45364
|
-
this.props.globalState.guiTexture.getChildren()[0].children.push(this.props.globalState.workbench.artBoardBackground);
|
45365
|
-
}
|
45366
45358
|
};
|
45367
45359
|
PropertyTabComponent.prototype.loadFromSnippet = function () {
|
45368
45360
|
var snippedId = this.props.globalState.hostWindow.prompt("Please enter the snippet ID to use");
|
@@ -45371,73 +45363,82 @@ var PropertyTabComponent = /** @class */ (function (_super) {
|
|
45371
45363
|
}
|
45372
45364
|
this.props.globalState.workbench.loadFromSnippet(snippedId);
|
45373
45365
|
};
|
45374
|
-
PropertyTabComponent.prototype.
|
45375
|
-
var _this = this;
|
45366
|
+
PropertyTabComponent.prototype.renderNode = function (node) {
|
45376
45367
|
var _a;
|
45377
|
-
|
45368
|
+
return react__WEBPACK_IMPORTED_MODULE_1__["createElement"](react__WEBPACK_IMPORTED_MODULE_1__["Fragment"], null,
|
45369
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { id: "header" },
|
45370
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("img", { id: "logo", src: this.renderControlIcon(node) }),
|
45371
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { id: "title" },
|
45372
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_sharedUiComponents_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_28__["TextInputLineComponent"], { noUnderline: true, lockObject: this._lockObject, label: "", target: node, propertyName: "name", onPropertyChangedObservable: this.props.globalState.onPropertyChangedObservable }))),
|
45373
|
+
this.renderProperties(node),
|
45374
|
+
((_a = node === null || node === void 0 ? void 0 : node.parent) === null || _a === void 0 ? void 0 : _a.typeName) === "Grid" && (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_parentingPropertyGridComponent__WEBPACK_IMPORTED_MODULE_29__["ParentingPropertyGridComponent"], { control: node, onPropertyChangedObservable: this.props.globalState.onPropertyChangedObservable, lockObject: this._lockObject })));
|
45375
|
+
};
|
45376
|
+
PropertyTabComponent.prototype.renderProperties = function (node) {
|
45377
|
+
var _this = this;
|
45378
|
+
var className = node.getClassName();
|
45378
45379
|
switch (className) {
|
45379
45380
|
case "TextBlock": {
|
45380
|
-
var textBlock =
|
45381
|
+
var textBlock = node;
|
45381
45382
|
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_propertyGrids_gui_textBlockPropertyGridComponent__WEBPACK_IMPORTED_MODULE_12__["TextBlockPropertyGridComponent"], { textBlock: textBlock, lockObject: this._lockObject, onPropertyChangedObservable: this.props.globalState.onPropertyChangedObservable }));
|
45382
45383
|
}
|
45383
45384
|
case "InputText": {
|
45384
|
-
var inputText =
|
45385
|
+
var inputText = node;
|
45385
45386
|
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_propertyGrids_gui_inputTextPropertyGridComponent__WEBPACK_IMPORTED_MODULE_13__["InputTextPropertyGridComponent"], { inputText: inputText, lockObject: this._lockObject, onPropertyChangedObservable: this.props.globalState.onPropertyChangedObservable }));
|
45386
45387
|
}
|
45387
45388
|
case "ColorPicker": {
|
45388
|
-
var colorPicker =
|
45389
|
+
var colorPicker = node;
|
45389
45390
|
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_propertyGrids_gui_colorPickerPropertyGridComponent__WEBPACK_IMPORTED_MODULE_14__["ColorPickerPropertyGridComponent"], { colorPicker: colorPicker, lockObject: this._lockObject, onPropertyChangedObservable: this.props.globalState.onPropertyChangedObservable }));
|
45390
45391
|
}
|
45391
45392
|
case "Image": {
|
45392
|
-
var image =
|
45393
|
+
var image = node;
|
45393
45394
|
return react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_propertyGrids_gui_imagePropertyGridComponent__WEBPACK_IMPORTED_MODULE_15__["ImagePropertyGridComponent"], { image: image, lockObject: this._lockObject, onPropertyChangedObservable: this.props.globalState.onPropertyChangedObservable });
|
45394
45395
|
}
|
45395
45396
|
case "Slider": {
|
45396
|
-
var slider =
|
45397
|
+
var slider = node;
|
45397
45398
|
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_propertyGrids_gui_sliderGenericPropertyGridComponent__WEBPACK_IMPORTED_MODULE_9__["SliderGenericPropertyGridComponent"], { slider: slider, lockObject: this._lockObject, onPropertyChangedObservable: this.props.globalState.onPropertyChangedObservable }));
|
45398
45399
|
}
|
45399
45400
|
case "ImageBasedSlider": {
|
45400
|
-
var imageBasedSlider =
|
45401
|
+
var imageBasedSlider = node;
|
45401
45402
|
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_propertyGrids_gui_imageBasedSliderPropertyGridComponent__WEBPACK_IMPORTED_MODULE_16__["ImageBasedSliderPropertyGridComponent"], { imageBasedSlider: imageBasedSlider, lockObject: this._lockObject, onPropertyChangedObservable: this.props.globalState.onPropertyChangedObservable }));
|
45402
45403
|
}
|
45403
45404
|
case "Rectangle": {
|
45404
|
-
var rectangle =
|
45405
|
+
var rectangle = node;
|
45405
45406
|
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_propertyGrids_gui_rectanglePropertyGridComponent__WEBPACK_IMPORTED_MODULE_17__["RectanglePropertyGridComponent"], { rectangle: rectangle, lockObject: this._lockObject, onPropertyChangedObservable: this.props.globalState.onPropertyChangedObservable }));
|
45406
45407
|
}
|
45407
45408
|
case "StackPanel": {
|
45408
|
-
var stackPanel =
|
45409
|
+
var stackPanel = node;
|
45409
45410
|
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_propertyGrids_gui_stackPanelPropertyGridComponent__WEBPACK_IMPORTED_MODULE_18__["StackPanelPropertyGridComponent"], { stackPanel: stackPanel, lockObject: this._lockObject, onPropertyChangedObservable: this.props.globalState.onPropertyChangedObservable }));
|
45410
45411
|
}
|
45411
45412
|
case "Grid": {
|
45412
|
-
var grid =
|
45413
|
+
var grid = node;
|
45413
45414
|
return react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_propertyGrids_gui_gridPropertyGridComponent__WEBPACK_IMPORTED_MODULE_19__["GridPropertyGridComponent"], { grid: grid, lockObject: this._lockObject, onPropertyChangedObservable: this.props.globalState.onPropertyChangedObservable });
|
45414
45415
|
}
|
45415
45416
|
case "ScrollViewer": {
|
45416
|
-
var scrollViewer =
|
45417
|
+
var scrollViewer = node;
|
45417
45418
|
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_propertyGrids_gui_scrollViewerPropertyGridComponent__WEBPACK_IMPORTED_MODULE_20__["ScrollViewerPropertyGridComponent"], { scrollViewer: scrollViewer, lockObject: this._lockObject, onPropertyChangedObservable: this.props.globalState.onPropertyChangedObservable }));
|
45418
45419
|
}
|
45419
45420
|
case "Ellipse": {
|
45420
|
-
var ellipse =
|
45421
|
+
var ellipse = node;
|
45421
45422
|
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_propertyGrids_gui_ellipsePropertyGridComponent__WEBPACK_IMPORTED_MODULE_21__["EllipsePropertyGridComponent"], { ellipse: ellipse, lockObject: this._lockObject, onPropertyChangedObservable: this.props.globalState.onPropertyChangedObservable }));
|
45422
45423
|
}
|
45423
45424
|
case "Checkbox": {
|
45424
|
-
var checkbox =
|
45425
|
+
var checkbox = node;
|
45425
45426
|
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_propertyGrids_gui_checkboxPropertyGridComponent__WEBPACK_IMPORTED_MODULE_22__["CheckboxPropertyGridComponent"], { checkbox: checkbox, lockObject: this._lockObject, onPropertyChangedObservable: this.props.globalState.onPropertyChangedObservable }));
|
45426
45427
|
}
|
45427
45428
|
case "RadioButton": {
|
45428
|
-
var radioButton =
|
45429
|
+
var radioButton = node;
|
45429
45430
|
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_propertyGrids_gui_radioButtonPropertyGridComponent__WEBPACK_IMPORTED_MODULE_11__["RadioButtonPropertyGridComponent"], { radioButton: radioButton, lockObject: this._lockObject, onPropertyChangedObservable: this.props.globalState.onPropertyChangedObservable }));
|
45430
45431
|
}
|
45431
45432
|
case "Line": {
|
45432
|
-
var line =
|
45433
|
+
var line = node;
|
45433
45434
|
return react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_propertyGrids_gui_linePropertyGridComponent__WEBPACK_IMPORTED_MODULE_10__["LinePropertyGridComponent"], { line: line, lockObject: this._lockObject, onPropertyChangedObservable: this.props.globalState.onPropertyChangedObservable });
|
45434
45435
|
}
|
45435
45436
|
case "DisplayGrid": {
|
45436
|
-
var displayGrid =
|
45437
|
+
var displayGrid = node;
|
45437
45438
|
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_propertyGrids_gui_displayGridPropertyGridComponent__WEBPACK_IMPORTED_MODULE_30__["DisplayGridPropertyGridComponent"], { displayGrid: displayGrid, lockObject: this._lockObject, onPropertyChangedObservable: this.props.globalState.onPropertyChangedObservable }));
|
45438
45439
|
}
|
45439
45440
|
case "Button": {
|
45440
|
-
var button_1 =
|
45441
|
+
var button_1 = node;
|
45441
45442
|
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_propertyGrids_gui_buttonPropertyGridComponent__WEBPACK_IMPORTED_MODULE_31__["ButtonPropertyGridComponent"], { key: "buttonMenu", rectangle: button_1, lockObject: this._lockObject, onPropertyChangedObservable: this.props.globalState.onPropertyChangedObservable, onAddComponent: function (value) {
|
45442
45443
|
var guiElement = _guiNodeTools__WEBPACK_IMPORTED_MODULE_32__["GUINodeTools"].CreateControlFromString(value);
|
45443
45444
|
var newGuiNode = _this.props.globalState.workbench.createNewGuiNode(guiElement);
|
@@ -45447,14 +45448,13 @@ var PropertyTabComponent = /** @class */ (function (_super) {
|
|
45447
45448
|
}
|
45448
45449
|
}
|
45449
45450
|
if (className !== "") {
|
45450
|
-
var control =
|
45451
|
+
var control = node;
|
45451
45452
|
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_propertyGrids_gui_controlPropertyGridComponent__WEBPACK_IMPORTED_MODULE_24__["ControlPropertyGridComponent"], { control: control, lockObject: this._lockObject, onPropertyChangedObservable: this.props.globalState.onPropertyChangedObservable }));
|
45452
45453
|
}
|
45453
45454
|
return null;
|
45454
45455
|
};
|
45455
|
-
PropertyTabComponent.prototype.renderControlIcon = function () {
|
45456
|
-
var
|
45457
|
-
var className = (_a = this.state.currentNode) === null || _a === void 0 ? void 0 : _a.getClassName();
|
45456
|
+
PropertyTabComponent.prototype.renderControlIcon = function (node) {
|
45457
|
+
var className = node.getClassName();
|
45458
45458
|
switch (className) {
|
45459
45459
|
case "TextBlock": {
|
45460
45460
|
return textBoxIcon;
|
@@ -45507,27 +45507,29 @@ var PropertyTabComponent = /** @class */ (function (_super) {
|
|
45507
45507
|
case "Button": {
|
45508
45508
|
return buttonIcon;
|
45509
45509
|
}
|
45510
|
+
case "Container": {
|
45511
|
+
return rectangleIcon;
|
45512
|
+
}
|
45510
45513
|
}
|
45511
45514
|
return adtIcon;
|
45512
45515
|
};
|
45513
45516
|
PropertyTabComponent.prototype.render = function () {
|
45514
45517
|
var _this = this;
|
45515
|
-
var _a, _b;
|
45516
45518
|
if (this.props.globalState.guiTexture == undefined)
|
45517
45519
|
return null;
|
45518
45520
|
var _sizeValues = [
|
45519
|
-
|
45520
|
-
|
45521
|
-
|
45522
|
-
|
45523
|
-
|
45524
|
-
|
45525
|
-
|
45526
|
-
|
45527
|
-
|
45528
|
-
|
45529
|
-
|
45530
|
-
|
45521
|
+
{ width: 1920, height: 1080 },
|
45522
|
+
{ width: 1366, height: 768 },
|
45523
|
+
{ width: 1280, height: 800 },
|
45524
|
+
{ width: 3840, height: 2160 },
|
45525
|
+
{ width: 750, height: 1334 },
|
45526
|
+
{ width: 1125, height: 2436 },
|
45527
|
+
{ width: 1170, height: 2532 },
|
45528
|
+
{ width: 1284, height: 2778 },
|
45529
|
+
{ width: 1080, height: 2220 },
|
45530
|
+
{ width: 1080, height: 2340 },
|
45531
|
+
{ width: 1024, height: 1024 },
|
45532
|
+
{ width: 2048, height: 2048 },
|
45531
45533
|
];
|
45532
45534
|
var _sizeOptions = [
|
45533
45535
|
{ label: "Web (1920)", value: 0 },
|
@@ -45543,21 +45545,14 @@ var PropertyTabComponent = /** @class */ (function (_super) {
|
|
45543
45545
|
{ label: "Square (1024)", value: 10 },
|
45544
45546
|
{ label: "Square (2048)", value: 11 },
|
45545
45547
|
];
|
45546
|
-
var size = this.props.globalState.
|
45547
|
-
|
45548
|
-
this._sizeOption = _sizeValues.findIndex(function (value) { return value.x == textureSize.x && value.y == textureSize.y; });
|
45548
|
+
var size = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this.props.globalState.workbench.guiSize);
|
45549
|
+
this._sizeOption = _sizeValues.findIndex(function (value) { return value.width == size.width && value.height == size.height; });
|
45549
45550
|
if (this._sizeOption < 0) {
|
45550
45551
|
this.props.globalState.onResponsiveChangeObservable.notifyObservers(false);
|
45551
45552
|
_babylonjs_core_Misc_tools__WEBPACK_IMPORTED_MODULE_4__["DataStorage"].WriteBoolean("Responsive", false);
|
45552
45553
|
}
|
45553
45554
|
if (this.state.currentNode && this.props.globalState.workbench.selectedGuiNodes.length === 1) {
|
45554
|
-
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { id: "ge-propertyTab" },
|
45555
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { id: "header" },
|
45556
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("img", { id: "logo", src: this.renderControlIcon() }),
|
45557
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { id: "title" },
|
45558
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_sharedUiComponents_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_28__["TextInputLineComponent"], { noUnderline: true, lockObject: this._lockObject, label: "", target: this.state.currentNode, propertyName: "name", onPropertyChangedObservable: this.props.globalState.onPropertyChangedObservable }))),
|
45559
|
-
this.renderProperties(),
|
45560
|
-
((_b = (_a = this.state.currentNode) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.typeName) === "Grid" && (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_parentingPropertyGridComponent__WEBPACK_IMPORTED_MODULE_29__["ParentingPropertyGridComponent"], { control: this.state.currentNode, onPropertyChangedObservable: this.props.globalState.onPropertyChangedObservable, lockObject: this._lockObject }))));
|
45555
|
+
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { id: "ge-propertyTab" }, this.renderNode(this.state.currentNode)));
|
45561
45556
|
}
|
45562
45557
|
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { id: "ge-propertyTab" },
|
45563
45558
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { id: "header" },
|
@@ -45574,7 +45569,7 @@ var PropertyTabComponent = /** @class */ (function (_super) {
|
|
45574
45569
|
_this._sizeOption = _sizeOptions.length;
|
45575
45570
|
if (value) {
|
45576
45571
|
_this._sizeOption = 0;
|
45577
|
-
_this.props.globalState.workbench.
|
45572
|
+
_this.props.globalState.workbench.guiSize = _sizeValues[_this._sizeOption];
|
45578
45573
|
}
|
45579
45574
|
_this.forceUpdate();
|
45580
45575
|
} }),
|
@@ -45582,19 +45577,19 @@ var PropertyTabComponent = /** @class */ (function (_super) {
|
|
45582
45577
|
_this._sizeOption = value;
|
45583
45578
|
if (_this._sizeOption !== _sizeOptions.length) {
|
45584
45579
|
var newSize = _sizeValues[_this._sizeOption];
|
45585
|
-
_this.props.globalState.workbench.
|
45580
|
+
_this.props.globalState.workbench.guiSize = newSize;
|
45586
45581
|
}
|
45587
45582
|
_this.forceUpdate();
|
45588
45583
|
} })),
|
45589
45584
|
!_babylonjs_core_Misc_tools__WEBPACK_IMPORTED_MODULE_4__["DataStorage"].ReadBoolean("Responsive", true) && (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "ge-divider" },
|
45590
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_sharedUiComponents_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_26__["FloatLineComponent"], { icon: canvasSizeIcon, iconLabel: "Canvas Size", label: "W", target:
|
45585
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_sharedUiComponents_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_26__["FloatLineComponent"], { icon: canvasSizeIcon, iconLabel: "Canvas Size", label: "W", target: size, propertyName: "width", isInteger: true, min: 1, max: MAX_TEXTURE_SIZE, onChange: function (newvalue) {
|
45591
45586
|
if (!isNaN(newvalue)) {
|
45592
|
-
_this.props.globalState.workbench.
|
45587
|
+
_this.props.globalState.workbench.guiSize = { width: newvalue, height: size.height };
|
45593
45588
|
}
|
45594
45589
|
} }),
|
45595
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_sharedUiComponents_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_26__["FloatLineComponent"], { icon: canvasSizeIcon, label: "H", target:
|
45590
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_sharedUiComponents_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_26__["FloatLineComponent"], { icon: canvasSizeIcon, label: "H", target: size, propertyName: "height", isInteger: true, min: 1, max: MAX_TEXTURE_SIZE, onChange: function (newvalue) {
|
45596
45591
|
if (!isNaN(newvalue)) {
|
45597
|
-
_this.props.globalState.workbench.
|
45592
|
+
_this.props.globalState.workbench.guiSize = { width: size.width, height: newvalue };
|
45598
45593
|
}
|
45599
45594
|
} }))),
|
45600
45595
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("hr", { className: "ge" }),
|
@@ -45608,7 +45603,9 @@ var PropertyTabComponent = /** @class */ (function (_super) {
|
|
45608
45603
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_sharedUiComponents_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_2__["ButtonLineComponent"], { label: "Load from snippet server", onClick: function () { return _this.loadFromSnippet(); } }),
|
45609
45604
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_sharedUiComponents_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_2__["ButtonLineComponent"], { label: "Save to snippet server", onClick: function () {
|
45610
45605
|
_this.props.globalState.onSnippetSaveObservable.notifyObservers();
|
45611
|
-
} })
|
45606
|
+
} }),
|
45607
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("hr", { className: "ge" }),
|
45608
|
+
this.renderNode(this.props.globalState.workbench.trueRootContainer))));
|
45612
45609
|
};
|
45613
45610
|
return PropertyTabComponent;
|
45614
45611
|
}(react__WEBPACK_IMPORTED_MODULE_1__["Component"]));
|
@@ -46269,8 +46266,9 @@ var TreeItemSelectableComponent = /** @class */ (function (_super) {
|
|
46269
46266
|
this.props.globalState.onSelectionChangedObservable.notifyObservers(entity);
|
46270
46267
|
this.props.globalState.selectionLock = true;
|
46271
46268
|
};
|
46272
|
-
TreeItemSelectableComponent.prototype.renderChildren = function (isExpanded) {
|
46269
|
+
TreeItemSelectableComponent.prototype.renderChildren = function (isExpanded, offset) {
|
46273
46270
|
var _this = this;
|
46271
|
+
if (offset === void 0) { offset = true; }
|
46274
46272
|
var entity = this.props.entity;
|
46275
46273
|
if ((!entity.getChildren && !entity.children) || !isExpanded) {
|
46276
46274
|
return null;
|
@@ -46283,11 +46281,14 @@ var TreeItemSelectableComponent = /** @class */ (function (_super) {
|
|
46283
46281
|
if (item.name == "Art-Board-Background") {
|
46284
46282
|
return null;
|
46285
46283
|
}
|
46286
|
-
return (react__WEBPACK_IMPORTED_MODULE_3__["createElement"](TreeItemSelectableComponent, { globalState: _this.props.globalState, mustExpand: _this.props.mustExpand, extensibilityGroups: _this.props.extensibilityGroups, selectedEntity: _this.props.selectedEntity, key: i, offset: _this.props.offset + 2, entity: item, filter: _this.props.filter }));
|
46284
|
+
return (react__WEBPACK_IMPORTED_MODULE_3__["createElement"](TreeItemSelectableComponent, { globalState: _this.props.globalState, mustExpand: _this.props.mustExpand, extensibilityGroups: _this.props.extensibilityGroups, selectedEntity: _this.props.selectedEntity, key: i, offset: _this.props.offset + (offset ? 2 : 0), entity: item, filter: _this.props.filter }));
|
46287
46285
|
});
|
46288
46286
|
};
|
46289
46287
|
TreeItemSelectableComponent.prototype.render = function () {
|
46290
46288
|
var _this = this;
|
46289
|
+
if (this.props.entity === this.props.globalState.workbench.trueRootContainer || this.props.entity === this.props.globalState.workbench.visibleRegionContainer) {
|
46290
|
+
return this.renderChildren(true, false);
|
46291
|
+
}
|
46291
46292
|
var marginStyle = {
|
46292
46293
|
paddingLeft: 10 * (this.props.offset + 0.5) - 20 + "px",
|
46293
46294
|
};
|
@@ -46392,1682 +46393,82 @@ var TreeItemSelectableComponent = /** @class */ (function (_super) {
|
|
46392
46393
|
|
46393
46394
|
/***/ }),
|
46394
46395
|
|
46395
|
-
/***/ "./diagram/
|
46396
|
-
|
46397
|
-
!*** ./diagram/
|
46398
|
-
|
46399
|
-
/*! exports provided:
|
46396
|
+
/***/ "./diagram/artBoard.tsx":
|
46397
|
+
/*!******************************!*\
|
46398
|
+
!*** ./diagram/artBoard.tsx ***!
|
46399
|
+
\******************************/
|
46400
|
+
/*! exports provided: ArtBoardComponent */
|
46400
46401
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
46401
46402
|
|
46402
46403
|
"use strict";
|
46403
46404
|
__webpack_require__.r(__webpack_exports__);
|
46404
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
46405
|
-
var
|
46406
|
-
|
46407
|
-
|
46408
|
-
|
46409
|
-
|
46410
|
-
|
46411
|
-
|
46412
|
-
|
46413
|
-
"
|
46414
|
-
|
46415
|
-
|
46416
|
-
|
46417
|
-
|
46418
|
-
|
46419
|
-
|
46420
|
-
|
46421
|
-
|
46422
|
-
|
46423
|
-
|
46424
|
-
|
46425
|
-
|
46426
|
-
|
46427
|
-
|
46428
|
-
|
46429
|
-
|
46430
|
-
|
46431
|
-
|
46432
|
-
|
46433
|
-
|
46434
|
-
|
46435
|
-
|
46436
|
-
|
46437
|
-
|
46438
|
-
|
46439
|
-
|
46440
|
-
|
46441
|
-
|
46442
|
-
|
46443
|
-
},
|
46444
|
-
{
|
46445
|
-
|
46446
|
-
|
46447
|
-
|
46448
|
-
|
46449
|
-
{
|
46450
|
-
"blockId": 214,
|
46451
|
-
"x": -2260,
|
46452
|
-
"y": -180
|
46453
|
-
},
|
46454
|
-
{
|
46455
|
-
"blockId": 215,
|
46456
|
-
"x": -2240,
|
46457
|
-
"y": -80
|
46458
|
-
},
|
46459
|
-
{
|
46460
|
-
"blockId": 216,
|
46461
|
-
"x": -2000,
|
46462
|
-
"y": -20
|
46463
|
-
},
|
46464
|
-
{
|
46465
|
-
"blockId": 217,
|
46466
|
-
"x": 3380,
|
46467
|
-
"y": 740
|
46468
|
-
},
|
46469
|
-
{
|
46470
|
-
"blockId": 218,
|
46471
|
-
"x": 2720,
|
46472
|
-
"y": 540
|
46473
|
-
},
|
46474
|
-
{
|
46475
|
-
"blockId": 219,
|
46476
|
-
"x": 2960,
|
46477
|
-
"y": 200
|
46478
|
-
},
|
46479
|
-
{
|
46480
|
-
"blockId": 220,
|
46481
|
-
"x": 2400,
|
46482
|
-
"y": 320
|
46483
|
-
},
|
46484
|
-
{
|
46485
|
-
"blockId": 221,
|
46486
|
-
"x": 2080,
|
46487
|
-
"y": 320
|
46488
|
-
},
|
46489
|
-
{
|
46490
|
-
"blockId": 222,
|
46491
|
-
"x": 1600,
|
46492
|
-
"y": 560
|
46493
|
-
},
|
46494
|
-
{
|
46495
|
-
"blockId": 223,
|
46496
|
-
"x": 1320,
|
46497
|
-
"y": 500
|
46498
|
-
},
|
46499
|
-
{
|
46500
|
-
"blockId": 224,
|
46501
|
-
"x": 1080,
|
46502
|
-
"y": 420
|
46503
|
-
},
|
46504
|
-
{
|
46505
|
-
"blockId": 225,
|
46506
|
-
"x": 820,
|
46507
|
-
"y": 520
|
46508
|
-
},
|
46509
|
-
{
|
46510
|
-
"blockId": 226,
|
46511
|
-
"x": 540,
|
46512
|
-
"y": 520
|
46513
|
-
},
|
46514
|
-
{
|
46515
|
-
"blockId": 227,
|
46516
|
-
"x": 280,
|
46517
|
-
"y": 520
|
46518
|
-
},
|
46519
|
-
{
|
46520
|
-
"blockId": 228,
|
46521
|
-
"x": -60,
|
46522
|
-
"y": 440
|
46523
|
-
},
|
46524
|
-
{
|
46525
|
-
"blockId": 229,
|
46526
|
-
"x": -340,
|
46527
|
-
"y": 420
|
46528
|
-
},
|
46529
|
-
{
|
46530
|
-
"blockId": 230,
|
46531
|
-
"x": -620,
|
46532
|
-
"y": 340
|
46533
|
-
},
|
46534
|
-
{
|
46535
|
-
"blockId": 231,
|
46536
|
-
"x": -880,
|
46537
|
-
"y": 340
|
46538
|
-
},
|
46539
|
-
{
|
46540
|
-
"blockId": 232,
|
46541
|
-
"x": -1160,
|
46542
|
-
"y": 160
|
46543
|
-
},
|
46544
|
-
{
|
46545
|
-
"blockId": 233,
|
46546
|
-
"x": -1480,
|
46547
|
-
"y": 260
|
46548
|
-
},
|
46549
|
-
{
|
46550
|
-
"blockId": 234,
|
46551
|
-
"x": -1160,
|
46552
|
-
"y": 460
|
46553
|
-
},
|
46554
|
-
{
|
46555
|
-
"blockId": 235,
|
46556
|
-
"x": -880,
|
46557
|
-
"y": 480
|
46558
|
-
},
|
46559
|
-
{
|
46560
|
-
"blockId": 236,
|
46561
|
-
"x": -60,
|
46562
|
-
"y": 700
|
46563
|
-
},
|
46564
|
-
{
|
46565
|
-
"blockId": 237,
|
46566
|
-
"x": -340,
|
46567
|
-
"y": 700
|
46568
|
-
},
|
46569
|
-
{
|
46570
|
-
"blockId": 238,
|
46571
|
-
"x": -620,
|
46572
|
-
"y": 700
|
46573
|
-
},
|
46574
|
-
{
|
46575
|
-
"blockId": 239,
|
46576
|
-
"x": -300,
|
46577
|
-
"y": 920
|
46578
|
-
},
|
46579
|
-
{
|
46580
|
-
"blockId": 240,
|
46581
|
-
"x": 540,
|
46582
|
-
"y": 420
|
46583
|
-
},
|
46584
|
-
{
|
46585
|
-
"blockId": 241,
|
46586
|
-
"x": 820,
|
46587
|
-
"y": 660
|
46588
|
-
},
|
46589
|
-
{
|
46590
|
-
"blockId": 242,
|
46591
|
-
"x": 540,
|
46592
|
-
"y": 660
|
46593
|
-
},
|
46594
|
-
{
|
46595
|
-
"blockId": 243,
|
46596
|
-
"x": 280,
|
46597
|
-
"y": 660
|
46598
|
-
},
|
46599
|
-
{
|
46600
|
-
"blockId": 244,
|
46601
|
-
"x": 1340,
|
46602
|
-
"y": 660
|
46603
|
-
},
|
46604
|
-
{
|
46605
|
-
"blockId": 245,
|
46606
|
-
"x": 1080,
|
46607
|
-
"y": 800
|
46608
|
-
},
|
46609
|
-
{
|
46610
|
-
"blockId": 246,
|
46611
|
-
"x": 2160,
|
46612
|
-
"y": 160
|
46613
|
-
},
|
46614
|
-
{
|
46615
|
-
"blockId": 247,
|
46616
|
-
"x": 2280,
|
46617
|
-
"y": 1000
|
46618
|
-
},
|
46619
|
-
{
|
46620
|
-
"blockId": 248,
|
46621
|
-
"x": 2040,
|
46622
|
-
"y": 780
|
46623
|
-
},
|
46624
|
-
{
|
46625
|
-
"blockId": 249,
|
46626
|
-
"x": 2860,
|
46627
|
-
"y": 840
|
46628
|
-
}
|
46629
|
-
],
|
46630
|
-
"frames": [
|
46631
|
-
{
|
46632
|
-
"x": 1920,
|
46633
|
-
"y": 80,
|
46634
|
-
"width": 1859.67,
|
46635
|
-
"height": 1260,
|
46636
|
-
"color": [
|
46637
|
-
0.2823529411764706,
|
46638
|
-
0.2823529411764706,
|
46639
|
-
0.2823529411764706
|
46640
|
-
],
|
46641
|
-
"name": "Checkered",
|
46642
|
-
"isCollapsed": false,
|
46643
|
-
"blocks": [
|
46644
|
-
221,
|
46645
|
-
246,
|
46646
|
-
220,
|
46647
|
-
219,
|
46648
|
-
248,
|
46649
|
-
247,
|
46650
|
-
218,
|
46651
|
-
249,
|
46652
|
-
217
|
46653
|
-
]
|
46654
|
-
}
|
46655
|
-
],
|
46656
|
-
"x": 155.3919960630531,
|
46657
|
-
"y": 164.5512292933413,
|
46658
|
-
"zoom": 0.2532192552683995
|
46659
|
-
},
|
46660
|
-
"customType": "BABYLON.NodeMaterial",
|
46661
|
-
"outputNodes": [
|
46662
|
-
211,
|
46663
|
-
217
|
46664
|
-
],
|
46665
|
-
"blocks": [
|
46666
|
-
{
|
46667
|
-
"customType": "BABYLON.VertexOutputBlock",
|
46668
|
-
"id": 211,
|
46669
|
-
"name": "VertexOutput",
|
46670
|
-
"comments": "",
|
46671
|
-
"visibleInInspector": false,
|
46672
|
-
"visibleOnFrame": false,
|
46673
|
-
"target": 1,
|
46674
|
-
"inputs": [
|
46675
|
-
{
|
46676
|
-
"name": "vector",
|
46677
|
-
"inputName": "vector",
|
46678
|
-
"targetBlockId": 212,
|
46679
|
-
"targetConnectionName": "output",
|
46680
|
-
"isExposedOnFrame": true,
|
46681
|
-
"exposedPortPosition": -1
|
46682
|
-
}
|
46683
|
-
],
|
46684
|
-
"outputs": []
|
46685
|
-
},
|
46686
|
-
{
|
46687
|
-
"customType": "BABYLON.TransformBlock",
|
46688
|
-
"id": 212,
|
46689
|
-
"name": "WorldPos * ViewProjectionTransform",
|
46690
|
-
"comments": "",
|
46691
|
-
"visibleInInspector": false,
|
46692
|
-
"visibleOnFrame": false,
|
46693
|
-
"target": 1,
|
46694
|
-
"inputs": [
|
46695
|
-
{
|
46696
|
-
"name": "vector",
|
46697
|
-
"inputName": "vector",
|
46698
|
-
"targetBlockId": 213,
|
46699
|
-
"targetConnectionName": "output",
|
46700
|
-
"isExposedOnFrame": true,
|
46701
|
-
"exposedPortPosition": -1
|
46702
|
-
},
|
46703
|
-
{
|
46704
|
-
"name": "transform",
|
46705
|
-
"inputName": "transform",
|
46706
|
-
"targetBlockId": 216,
|
46707
|
-
"targetConnectionName": "output",
|
46708
|
-
"isExposedOnFrame": true,
|
46709
|
-
"exposedPortPosition": -1
|
46710
|
-
}
|
46711
|
-
],
|
46712
|
-
"outputs": [
|
46713
|
-
{
|
46714
|
-
"name": "output"
|
46715
|
-
},
|
46716
|
-
{
|
46717
|
-
"name": "xyz"
|
46718
|
-
}
|
46719
|
-
],
|
46720
|
-
"complementZ": 0,
|
46721
|
-
"complementW": 1
|
46722
|
-
},
|
46723
|
-
{
|
46724
|
-
"customType": "BABYLON.TransformBlock",
|
46725
|
-
"id": 213,
|
46726
|
-
"name": "WorldPos",
|
46727
|
-
"comments": "",
|
46728
|
-
"visibleInInspector": false,
|
46729
|
-
"visibleOnFrame": false,
|
46730
|
-
"target": 1,
|
46731
|
-
"inputs": [
|
46732
|
-
{
|
46733
|
-
"name": "vector",
|
46734
|
-
"inputName": "vector",
|
46735
|
-
"targetBlockId": 214,
|
46736
|
-
"targetConnectionName": "output",
|
46737
|
-
"isExposedOnFrame": true,
|
46738
|
-
"exposedPortPosition": -1
|
46739
|
-
},
|
46740
|
-
{
|
46741
|
-
"name": "transform",
|
46742
|
-
"inputName": "transform",
|
46743
|
-
"targetBlockId": 215,
|
46744
|
-
"targetConnectionName": "output",
|
46745
|
-
"isExposedOnFrame": true,
|
46746
|
-
"exposedPortPosition": -1
|
46747
|
-
}
|
46748
|
-
],
|
46749
|
-
"outputs": [
|
46750
|
-
{
|
46751
|
-
"name": "output"
|
46752
|
-
},
|
46753
|
-
{
|
46754
|
-
"name": "xyz"
|
46755
|
-
}
|
46756
|
-
],
|
46757
|
-
"complementZ": 0,
|
46758
|
-
"complementW": 1
|
46759
|
-
},
|
46760
|
-
{
|
46761
|
-
"customType": "BABYLON.InputBlock",
|
46762
|
-
"id": 214,
|
46763
|
-
"name": "position",
|
46764
|
-
"comments": "",
|
46765
|
-
"visibleInInspector": false,
|
46766
|
-
"visibleOnFrame": false,
|
46767
|
-
"target": 1,
|
46768
|
-
"inputs": [],
|
46769
|
-
"outputs": [
|
46770
|
-
{
|
46771
|
-
"name": "output"
|
46772
|
-
}
|
46773
|
-
],
|
46774
|
-
"type": 8,
|
46775
|
-
"mode": 1,
|
46776
|
-
"animationType": 0,
|
46777
|
-
"min": 0,
|
46778
|
-
"max": 0,
|
46779
|
-
"isBoolean": false,
|
46780
|
-
"matrixMode": 0,
|
46781
|
-
"isConstant": false,
|
46782
|
-
"groupInInspector": "",
|
46783
|
-
"convertToGammaSpace": false,
|
46784
|
-
"convertToLinearSpace": false
|
46785
|
-
},
|
46786
|
-
{
|
46787
|
-
"customType": "BABYLON.InputBlock",
|
46788
|
-
"id": 215,
|
46789
|
-
"name": "World",
|
46790
|
-
"comments": "",
|
46791
|
-
"visibleInInspector": false,
|
46792
|
-
"visibleOnFrame": false,
|
46793
|
-
"target": 1,
|
46794
|
-
"inputs": [],
|
46795
|
-
"outputs": [
|
46796
|
-
{
|
46797
|
-
"name": "output"
|
46798
|
-
}
|
46799
|
-
],
|
46800
|
-
"type": 128,
|
46801
|
-
"mode": 0,
|
46802
|
-
"systemValue": 1,
|
46803
|
-
"animationType": 0,
|
46804
|
-
"min": 0,
|
46805
|
-
"max": 0,
|
46806
|
-
"isBoolean": false,
|
46807
|
-
"matrixMode": 0,
|
46808
|
-
"isConstant": false,
|
46809
|
-
"groupInInspector": "",
|
46810
|
-
"convertToGammaSpace": false,
|
46811
|
-
"convertToLinearSpace": false
|
46812
|
-
},
|
46813
|
-
{
|
46814
|
-
"customType": "BABYLON.InputBlock",
|
46815
|
-
"id": 216,
|
46816
|
-
"name": "ViewProjection",
|
46817
|
-
"comments": "",
|
46818
|
-
"visibleInInspector": false,
|
46819
|
-
"visibleOnFrame": false,
|
46820
|
-
"target": 1,
|
46821
|
-
"inputs": [],
|
46822
|
-
"outputs": [
|
46823
|
-
{
|
46824
|
-
"name": "output"
|
46825
|
-
}
|
46826
|
-
],
|
46827
|
-
"type": 128,
|
46828
|
-
"mode": 0,
|
46829
|
-
"systemValue": 4,
|
46830
|
-
"animationType": 0,
|
46831
|
-
"min": 0,
|
46832
|
-
"max": 0,
|
46833
|
-
"isBoolean": false,
|
46834
|
-
"matrixMode": 0,
|
46835
|
-
"isConstant": false,
|
46836
|
-
"groupInInspector": "",
|
46837
|
-
"convertToGammaSpace": false,
|
46838
|
-
"convertToLinearSpace": false
|
46839
|
-
},
|
46840
|
-
{
|
46841
|
-
"customType": "BABYLON.FragmentOutputBlock",
|
46842
|
-
"id": 217,
|
46843
|
-
"name": "FragmentOutput",
|
46844
|
-
"comments": "",
|
46845
|
-
"visibleInInspector": false,
|
46846
|
-
"visibleOnFrame": false,
|
46847
|
-
"target": 2,
|
46848
|
-
"inputs": [
|
46849
|
-
{
|
46850
|
-
"name": "rgba",
|
46851
|
-
"displayName": "rgba"
|
46852
|
-
},
|
46853
|
-
{
|
46854
|
-
"name": "rgb",
|
46855
|
-
"displayName": "rgb",
|
46856
|
-
"inputName": "rgb",
|
46857
|
-
"targetBlockId": 218,
|
46858
|
-
"targetConnectionName": "output",
|
46859
|
-
"isExposedOnFrame": true,
|
46860
|
-
"exposedPortPosition": -1
|
46861
|
-
},
|
46862
|
-
{
|
46863
|
-
"name": "a",
|
46864
|
-
"displayName": "a",
|
46865
|
-
"inputName": "a",
|
46866
|
-
"targetBlockId": 249,
|
46867
|
-
"targetConnectionName": "output",
|
46868
|
-
"isExposedOnFrame": true,
|
46869
|
-
"exposedPortPosition": -1
|
46870
|
-
}
|
46871
|
-
],
|
46872
|
-
"outputs": [],
|
46873
|
-
"convertToGammaSpace": false,
|
46874
|
-
"convertToLinearSpace": false
|
46875
|
-
},
|
46876
|
-
{
|
46877
|
-
"customType": "BABYLON.LerpBlock",
|
46878
|
-
"id": 218,
|
46879
|
-
"name": "Lerp",
|
46880
|
-
"comments": "",
|
46881
|
-
"visibleInInspector": false,
|
46882
|
-
"visibleOnFrame": false,
|
46883
|
-
"target": 4,
|
46884
|
-
"inputs": [
|
46885
|
-
{
|
46886
|
-
"name": "left",
|
46887
|
-
"displayName": "left",
|
46888
|
-
"inputName": "left",
|
46889
|
-
"targetBlockId": 219,
|
46890
|
-
"targetConnectionName": "rgb",
|
46891
|
-
"isExposedOnFrame": true,
|
46892
|
-
"exposedPortPosition": -1
|
46893
|
-
},
|
46894
|
-
{
|
46895
|
-
"name": "right",
|
46896
|
-
"displayName": "right",
|
46897
|
-
"inputName": "right",
|
46898
|
-
"targetBlockId": 247,
|
46899
|
-
"targetConnectionName": "rgb",
|
46900
|
-
"isExposedOnFrame": true,
|
46901
|
-
"exposedPortPosition": -1
|
46902
|
-
},
|
46903
|
-
{
|
46904
|
-
"name": "gradient",
|
46905
|
-
"displayName": "gradient",
|
46906
|
-
"inputName": "gradient",
|
46907
|
-
"targetBlockId": 247,
|
46908
|
-
"targetConnectionName": "a",
|
46909
|
-
"isExposedOnFrame": true,
|
46910
|
-
"exposedPortPosition": -1
|
46911
|
-
}
|
46912
|
-
],
|
46913
|
-
"outputs": [
|
46914
|
-
{
|
46915
|
-
"name": "output",
|
46916
|
-
"displayName": "output"
|
46917
|
-
}
|
46918
|
-
]
|
46919
|
-
},
|
46920
|
-
{
|
46921
|
-
"customType": "BABYLON.ColorSplitterBlock",
|
46922
|
-
"id": 219,
|
46923
|
-
"name": "ColorSplitter",
|
46924
|
-
"comments": "",
|
46925
|
-
"visibleInInspector": false,
|
46926
|
-
"visibleOnFrame": false,
|
46927
|
-
"target": 4,
|
46928
|
-
"inputs": [
|
46929
|
-
{
|
46930
|
-
"name": "rgba",
|
46931
|
-
"displayName": "rgba",
|
46932
|
-
"inputName": "rgba",
|
46933
|
-
"targetBlockId": 220,
|
46934
|
-
"targetConnectionName": "output",
|
46935
|
-
"isExposedOnFrame": true,
|
46936
|
-
"exposedPortPosition": -1
|
46937
|
-
},
|
46938
|
-
{
|
46939
|
-
"name": "rgb ",
|
46940
|
-
"displayName": "rgb ",
|
46941
|
-
"isExposedOnFrame": true,
|
46942
|
-
"exposedPortPosition": 3
|
46943
|
-
}
|
46944
|
-
],
|
46945
|
-
"outputs": [
|
46946
|
-
{
|
46947
|
-
"name": "rgb",
|
46948
|
-
"displayName": "rgb"
|
46949
|
-
},
|
46950
|
-
{
|
46951
|
-
"name": "r",
|
46952
|
-
"displayName": "r"
|
46953
|
-
},
|
46954
|
-
{
|
46955
|
-
"name": "g",
|
46956
|
-
"displayName": "g"
|
46957
|
-
},
|
46958
|
-
{
|
46959
|
-
"name": "b",
|
46960
|
-
"displayName": "b"
|
46961
|
-
},
|
46962
|
-
{
|
46963
|
-
"name": "a",
|
46964
|
-
"displayName": "a"
|
46965
|
-
}
|
46966
|
-
]
|
46967
|
-
},
|
46968
|
-
{
|
46969
|
-
"customType": "BABYLON.MaxBlock",
|
46970
|
-
"id": 220,
|
46971
|
-
"name": "Max",
|
46972
|
-
"comments": "",
|
46973
|
-
"visibleInInspector": false,
|
46974
|
-
"visibleOnFrame": false,
|
46975
|
-
"target": 4,
|
46976
|
-
"inputs": [
|
46977
|
-
{
|
46978
|
-
"name": "left",
|
46979
|
-
"displayName": "left",
|
46980
|
-
"inputName": "left",
|
46981
|
-
"targetBlockId": 221,
|
46982
|
-
"targetConnectionName": "rgba",
|
46983
|
-
"isExposedOnFrame": true,
|
46984
|
-
"exposedPortPosition": -1
|
46985
|
-
},
|
46986
|
-
{
|
46987
|
-
"name": "right",
|
46988
|
-
"displayName": "right",
|
46989
|
-
"inputName": "right",
|
46990
|
-
"targetBlockId": 246,
|
46991
|
-
"targetConnectionName": "output",
|
46992
|
-
"isExposedOnFrame": true,
|
46993
|
-
"exposedPortPosition": -1
|
46994
|
-
}
|
46995
|
-
],
|
46996
|
-
"outputs": [
|
46997
|
-
{
|
46998
|
-
"name": "output",
|
46999
|
-
"displayName": "output"
|
47000
|
-
}
|
47001
|
-
]
|
47002
|
-
},
|
47003
|
-
{
|
47004
|
-
"customType": "BABYLON.ColorMergerBlock",
|
47005
|
-
"id": 221,
|
47006
|
-
"name": "ColorMerger",
|
47007
|
-
"comments": "",
|
47008
|
-
"visibleInInspector": false,
|
47009
|
-
"visibleOnFrame": false,
|
47010
|
-
"target": 4,
|
47011
|
-
"inputs": [
|
47012
|
-
{
|
47013
|
-
"name": "rgb ",
|
47014
|
-
"displayName": "rgb "
|
47015
|
-
},
|
47016
|
-
{
|
47017
|
-
"name": "r",
|
47018
|
-
"displayName": "r",
|
47019
|
-
"inputName": "r",
|
47020
|
-
"targetBlockId": 222,
|
47021
|
-
"targetConnectionName": "output",
|
47022
|
-
"isExposedOnFrame": true,
|
47023
|
-
"exposedPortPosition": 0
|
47024
|
-
},
|
47025
|
-
{
|
47026
|
-
"name": "g",
|
47027
|
-
"displayName": "g",
|
47028
|
-
"inputName": "g",
|
47029
|
-
"targetBlockId": 222,
|
47030
|
-
"targetConnectionName": "output",
|
47031
|
-
"isExposedOnFrame": true,
|
47032
|
-
"exposedPortPosition": 1
|
47033
|
-
},
|
47034
|
-
{
|
47035
|
-
"name": "b",
|
47036
|
-
"displayName": "b",
|
47037
|
-
"inputName": "b",
|
47038
|
-
"targetBlockId": 222,
|
47039
|
-
"targetConnectionName": "output",
|
47040
|
-
"isExposedOnFrame": true,
|
47041
|
-
"exposedPortPosition": 2
|
47042
|
-
},
|
47043
|
-
{
|
47044
|
-
"name": "a",
|
47045
|
-
"displayName": "a"
|
47046
|
-
}
|
47047
|
-
],
|
47048
|
-
"outputs": [
|
47049
|
-
{
|
47050
|
-
"name": "rgba",
|
47051
|
-
"displayName": "rgba"
|
47052
|
-
},
|
47053
|
-
{
|
47054
|
-
"name": "rgb",
|
47055
|
-
"displayName": "rgb"
|
47056
|
-
}
|
47057
|
-
],
|
47058
|
-
"rSwizzle": "r",
|
47059
|
-
"gSwizzle": "g",
|
47060
|
-
"bSwizzle": "b",
|
47061
|
-
"aSwizzle": "a"
|
47062
|
-
},
|
47063
|
-
{
|
47064
|
-
"customType": "BABYLON.MaxBlock",
|
47065
|
-
"id": 222,
|
47066
|
-
"name": "Max",
|
47067
|
-
"comments": "",
|
47068
|
-
"visibleInInspector": false,
|
47069
|
-
"visibleOnFrame": false,
|
47070
|
-
"target": 4,
|
47071
|
-
"inputs": [
|
47072
|
-
{
|
47073
|
-
"name": "left",
|
47074
|
-
"inputName": "left",
|
47075
|
-
"targetBlockId": 223,
|
47076
|
-
"targetConnectionName": "output",
|
47077
|
-
"isExposedOnFrame": true,
|
47078
|
-
"exposedPortPosition": -1
|
47079
|
-
},
|
47080
|
-
{
|
47081
|
-
"name": "right",
|
47082
|
-
"inputName": "right",
|
47083
|
-
"targetBlockId": 244,
|
47084
|
-
"targetConnectionName": "output",
|
47085
|
-
"isExposedOnFrame": true,
|
47086
|
-
"exposedPortPosition": -1
|
47087
|
-
}
|
47088
|
-
],
|
47089
|
-
"outputs": [
|
47090
|
-
{
|
47091
|
-
"name": "output"
|
47092
|
-
}
|
47093
|
-
]
|
47094
|
-
},
|
47095
|
-
{
|
47096
|
-
"customType": "BABYLON.MultiplyBlock",
|
47097
|
-
"id": 223,
|
47098
|
-
"name": "Multiply",
|
47099
|
-
"comments": "",
|
47100
|
-
"visibleInInspector": false,
|
47101
|
-
"visibleOnFrame": false,
|
47102
|
-
"target": 4,
|
47103
|
-
"inputs": [
|
47104
|
-
{
|
47105
|
-
"name": "left",
|
47106
|
-
"inputName": "left",
|
47107
|
-
"targetBlockId": 224,
|
47108
|
-
"targetConnectionName": "output",
|
47109
|
-
"isExposedOnFrame": true,
|
47110
|
-
"exposedPortPosition": -1
|
47111
|
-
},
|
47112
|
-
{
|
47113
|
-
"name": "right",
|
47114
|
-
"inputName": "right",
|
47115
|
-
"targetBlockId": 241,
|
47116
|
-
"targetConnectionName": "output",
|
47117
|
-
"isExposedOnFrame": true,
|
47118
|
-
"exposedPortPosition": -1
|
47119
|
-
}
|
47120
|
-
],
|
47121
|
-
"outputs": [
|
47122
|
-
{
|
47123
|
-
"name": "output"
|
47124
|
-
}
|
47125
|
-
]
|
47126
|
-
},
|
47127
|
-
{
|
47128
|
-
"customType": "BABYLON.OneMinusBlock",
|
47129
|
-
"id": 224,
|
47130
|
-
"name": "One minus",
|
47131
|
-
"comments": "",
|
47132
|
-
"visibleInInspector": false,
|
47133
|
-
"visibleOnFrame": false,
|
47134
|
-
"target": 4,
|
47135
|
-
"inputs": [
|
47136
|
-
{
|
47137
|
-
"name": "input",
|
47138
|
-
"inputName": "input",
|
47139
|
-
"targetBlockId": 225,
|
47140
|
-
"targetConnectionName": "output",
|
47141
|
-
"isExposedOnFrame": true,
|
47142
|
-
"exposedPortPosition": -1
|
47143
|
-
}
|
47144
|
-
],
|
47145
|
-
"outputs": [
|
47146
|
-
{
|
47147
|
-
"name": "output"
|
47148
|
-
}
|
47149
|
-
]
|
47150
|
-
},
|
47151
|
-
{
|
47152
|
-
"customType": "BABYLON.ModBlock",
|
47153
|
-
"id": 225,
|
47154
|
-
"name": "Mod",
|
47155
|
-
"comments": "",
|
47156
|
-
"visibleInInspector": false,
|
47157
|
-
"visibleOnFrame": false,
|
47158
|
-
"target": 4,
|
47159
|
-
"inputs": [
|
47160
|
-
{
|
47161
|
-
"name": "left",
|
47162
|
-
"inputName": "left",
|
47163
|
-
"targetBlockId": 226,
|
47164
|
-
"targetConnectionName": "output",
|
47165
|
-
"isExposedOnFrame": true,
|
47166
|
-
"exposedPortPosition": -1
|
47167
|
-
},
|
47168
|
-
{
|
47169
|
-
"name": "right",
|
47170
|
-
"inputName": "right",
|
47171
|
-
"targetBlockId": 240,
|
47172
|
-
"targetConnectionName": "output",
|
47173
|
-
"isExposedOnFrame": true,
|
47174
|
-
"exposedPortPosition": -1
|
47175
|
-
}
|
47176
|
-
],
|
47177
|
-
"outputs": [
|
47178
|
-
{
|
47179
|
-
"name": "output"
|
47180
|
-
}
|
47181
|
-
]
|
47182
|
-
},
|
47183
|
-
{
|
47184
|
-
"customType": "BABYLON.TrigonometryBlock",
|
47185
|
-
"id": 226,
|
47186
|
-
"name": "Round",
|
47187
|
-
"comments": "",
|
47188
|
-
"visibleInInspector": false,
|
47189
|
-
"visibleOnFrame": false,
|
47190
|
-
"target": 4,
|
47191
|
-
"inputs": [
|
47192
|
-
{
|
47193
|
-
"name": "input",
|
47194
|
-
"inputName": "input",
|
47195
|
-
"targetBlockId": 227,
|
47196
|
-
"targetConnectionName": "output",
|
47197
|
-
"isExposedOnFrame": true,
|
47198
|
-
"exposedPortPosition": -1
|
47199
|
-
}
|
47200
|
-
],
|
47201
|
-
"outputs": [
|
47202
|
-
{
|
47203
|
-
"name": "output"
|
47204
|
-
}
|
47205
|
-
],
|
47206
|
-
"operation": 5
|
47207
|
-
},
|
47208
|
-
{
|
47209
|
-
"customType": "BABYLON.MultiplyBlock",
|
47210
|
-
"id": 227,
|
47211
|
-
"name": "Multiply",
|
47212
|
-
"comments": "",
|
47213
|
-
"visibleInInspector": false,
|
47214
|
-
"visibleOnFrame": false,
|
47215
|
-
"target": 4,
|
47216
|
-
"inputs": [
|
47217
|
-
{
|
47218
|
-
"name": "left",
|
47219
|
-
"inputName": "left",
|
47220
|
-
"targetBlockId": 228,
|
47221
|
-
"targetConnectionName": "x",
|
47222
|
-
"isExposedOnFrame": true,
|
47223
|
-
"exposedPortPosition": -1
|
47224
|
-
},
|
47225
|
-
{
|
47226
|
-
"name": "right",
|
47227
|
-
"inputName": "right",
|
47228
|
-
"targetBlockId": 236,
|
47229
|
-
"targetConnectionName": "output",
|
47230
|
-
"isExposedOnFrame": true,
|
47231
|
-
"exposedPortPosition": -1
|
47232
|
-
}
|
47233
|
-
],
|
47234
|
-
"outputs": [
|
47235
|
-
{
|
47236
|
-
"name": "output"
|
47237
|
-
}
|
47238
|
-
]
|
47239
|
-
},
|
47240
|
-
{
|
47241
|
-
"customType": "BABYLON.VectorSplitterBlock",
|
47242
|
-
"id": 228,
|
47243
|
-
"name": "VectorSplitter",
|
47244
|
-
"comments": "",
|
47245
|
-
"visibleInInspector": false,
|
47246
|
-
"visibleOnFrame": false,
|
47247
|
-
"target": 4,
|
47248
|
-
"inputs": [
|
47249
|
-
{
|
47250
|
-
"name": "xyzw"
|
47251
|
-
},
|
47252
|
-
{
|
47253
|
-
"name": "xyz "
|
47254
|
-
},
|
47255
|
-
{
|
47256
|
-
"name": "xy ",
|
47257
|
-
"inputName": "xy ",
|
47258
|
-
"targetBlockId": 229,
|
47259
|
-
"targetConnectionName": "output",
|
47260
|
-
"isExposedOnFrame": true,
|
47261
|
-
"exposedPortPosition": -1
|
47262
|
-
}
|
47263
|
-
],
|
47264
|
-
"outputs": [
|
47265
|
-
{
|
47266
|
-
"name": "xyz"
|
47267
|
-
},
|
47268
|
-
{
|
47269
|
-
"name": "xy"
|
47270
|
-
},
|
47271
|
-
{
|
47272
|
-
"name": "zw"
|
47273
|
-
},
|
47274
|
-
{
|
47275
|
-
"name": "x"
|
47276
|
-
},
|
47277
|
-
{
|
47278
|
-
"name": "y"
|
47279
|
-
},
|
47280
|
-
{
|
47281
|
-
"name": "z"
|
47282
|
-
},
|
47283
|
-
{
|
47284
|
-
"name": "w"
|
47285
|
-
}
|
47286
|
-
]
|
47287
|
-
},
|
47288
|
-
{
|
47289
|
-
"customType": "BABYLON.AddBlock",
|
47290
|
-
"id": 229,
|
47291
|
-
"name": "Add",
|
47292
|
-
"comments": "",
|
47293
|
-
"visibleInInspector": false,
|
47294
|
-
"visibleOnFrame": false,
|
47295
|
-
"target": 4,
|
47296
|
-
"inputs": [
|
47297
|
-
{
|
47298
|
-
"name": "left",
|
47299
|
-
"inputName": "left",
|
47300
|
-
"targetBlockId": 230,
|
47301
|
-
"targetConnectionName": "output",
|
47302
|
-
"isExposedOnFrame": true,
|
47303
|
-
"exposedPortPosition": -1
|
47304
|
-
},
|
47305
|
-
{
|
47306
|
-
"name": "right",
|
47307
|
-
"inputName": "right",
|
47308
|
-
"targetBlockId": 235,
|
47309
|
-
"targetConnectionName": "output",
|
47310
|
-
"isExposedOnFrame": true,
|
47311
|
-
"exposedPortPosition": -1
|
47312
|
-
}
|
47313
|
-
],
|
47314
|
-
"outputs": [
|
47315
|
-
{
|
47316
|
-
"name": "output"
|
47317
|
-
}
|
47318
|
-
]
|
47319
|
-
},
|
47320
|
-
{
|
47321
|
-
"customType": "BABYLON.MultiplyBlock",
|
47322
|
-
"id": 230,
|
47323
|
-
"name": "Multiply",
|
47324
|
-
"comments": "",
|
47325
|
-
"visibleInInspector": false,
|
47326
|
-
"visibleOnFrame": false,
|
47327
|
-
"target": 4,
|
47328
|
-
"inputs": [
|
47329
|
-
{
|
47330
|
-
"name": "left",
|
47331
|
-
"inputName": "left",
|
47332
|
-
"targetBlockId": 231,
|
47333
|
-
"targetConnectionName": "output",
|
47334
|
-
"isExposedOnFrame": true,
|
47335
|
-
"exposedPortPosition": -1
|
47336
|
-
},
|
47337
|
-
{
|
47338
|
-
"name": "right",
|
47339
|
-
"inputName": "right",
|
47340
|
-
"targetBlockId": 235,
|
47341
|
-
"targetConnectionName": "output",
|
47342
|
-
"isExposedOnFrame": true,
|
47343
|
-
"exposedPortPosition": -1
|
47344
|
-
}
|
47345
|
-
],
|
47346
|
-
"outputs": [
|
47347
|
-
{
|
47348
|
-
"name": "output"
|
47349
|
-
}
|
47350
|
-
]
|
47351
|
-
},
|
47352
|
-
{
|
47353
|
-
"customType": "BABYLON.DivideBlock",
|
47354
|
-
"id": 231,
|
47355
|
-
"name": "Divide",
|
47356
|
-
"comments": "",
|
47357
|
-
"visibleInInspector": false,
|
47358
|
-
"visibleOnFrame": false,
|
47359
|
-
"target": 4,
|
47360
|
-
"inputs": [
|
47361
|
-
{
|
47362
|
-
"name": "left",
|
47363
|
-
"inputName": "left",
|
47364
|
-
"targetBlockId": 232,
|
47365
|
-
"targetConnectionName": "xy",
|
47366
|
-
"isExposedOnFrame": true,
|
47367
|
-
"exposedPortPosition": -1
|
47368
|
-
},
|
47369
|
-
{
|
47370
|
-
"name": "right",
|
47371
|
-
"inputName": "right",
|
47372
|
-
"targetBlockId": 234,
|
47373
|
-
"targetConnectionName": "xy",
|
47374
|
-
"isExposedOnFrame": true,
|
47375
|
-
"exposedPortPosition": -1
|
47376
|
-
}
|
47377
|
-
],
|
47378
|
-
"outputs": [
|
47379
|
-
{
|
47380
|
-
"name": "output"
|
47381
|
-
}
|
47382
|
-
]
|
47383
|
-
},
|
47384
|
-
{
|
47385
|
-
"customType": "BABYLON.VectorMergerBlock",
|
47386
|
-
"id": 232,
|
47387
|
-
"name": "VectorMerger",
|
47388
|
-
"comments": "",
|
47389
|
-
"visibleInInspector": false,
|
47390
|
-
"visibleOnFrame": false,
|
47391
|
-
"target": 4,
|
47392
|
-
"inputs": [
|
47393
|
-
{
|
47394
|
-
"name": "xyzw "
|
47395
|
-
},
|
47396
|
-
{
|
47397
|
-
"name": "xyz "
|
47398
|
-
},
|
47399
|
-
{
|
47400
|
-
"name": "xy "
|
47401
|
-
},
|
47402
|
-
{
|
47403
|
-
"name": "zw "
|
47404
|
-
},
|
47405
|
-
{
|
47406
|
-
"name": "x",
|
47407
|
-
"inputName": "x",
|
47408
|
-
"targetBlockId": 233,
|
47409
|
-
"targetConnectionName": "x",
|
47410
|
-
"isExposedOnFrame": true,
|
47411
|
-
"exposedPortPosition": -1
|
47412
|
-
},
|
47413
|
-
{
|
47414
|
-
"name": "y",
|
47415
|
-
"inputName": "y",
|
47416
|
-
"targetBlockId": 233,
|
47417
|
-
"targetConnectionName": "y",
|
47418
|
-
"isExposedOnFrame": true,
|
47419
|
-
"exposedPortPosition": -1
|
47420
|
-
},
|
47421
|
-
{
|
47422
|
-
"name": "z"
|
47423
|
-
},
|
47424
|
-
{
|
47425
|
-
"name": "w"
|
47426
|
-
}
|
47427
|
-
],
|
47428
|
-
"outputs": [
|
47429
|
-
{
|
47430
|
-
"name": "xyzw"
|
47431
|
-
},
|
47432
|
-
{
|
47433
|
-
"name": "xyz"
|
47434
|
-
},
|
47435
|
-
{
|
47436
|
-
"name": "xy"
|
47437
|
-
},
|
47438
|
-
{
|
47439
|
-
"name": "zw"
|
47440
|
-
}
|
47441
|
-
],
|
47442
|
-
"xSwizzle": "x",
|
47443
|
-
"ySwizzle": "y",
|
47444
|
-
"zSwizzle": "z",
|
47445
|
-
"wSwizzle": "w"
|
47446
|
-
},
|
47447
|
-
{
|
47448
|
-
"customType": "BABYLON.VectorSplitterBlock",
|
47449
|
-
"id": 233,
|
47450
|
-
"name": "VectorSplitter",
|
47451
|
-
"comments": "",
|
47452
|
-
"visibleInInspector": false,
|
47453
|
-
"visibleOnFrame": false,
|
47454
|
-
"target": 4,
|
47455
|
-
"inputs": [
|
47456
|
-
{
|
47457
|
-
"name": "xyzw",
|
47458
|
-
"inputName": "xyzw",
|
47459
|
-
"targetBlockId": 212,
|
47460
|
-
"targetConnectionName": "output",
|
47461
|
-
"isExposedOnFrame": true,
|
47462
|
-
"exposedPortPosition": -1
|
47463
|
-
},
|
47464
|
-
{
|
47465
|
-
"name": "xyz ",
|
47466
|
-
"isExposedOnFrame": true,
|
47467
|
-
"exposedPortPosition": -1
|
47468
|
-
},
|
47469
|
-
{
|
47470
|
-
"name": "xy "
|
47471
|
-
}
|
47472
|
-
],
|
47473
|
-
"outputs": [
|
47474
|
-
{
|
47475
|
-
"name": "xyz"
|
47476
|
-
},
|
47477
|
-
{
|
47478
|
-
"name": "xy"
|
47479
|
-
},
|
47480
|
-
{
|
47481
|
-
"name": "zw"
|
47482
|
-
},
|
47483
|
-
{
|
47484
|
-
"name": "x"
|
47485
|
-
},
|
47486
|
-
{
|
47487
|
-
"name": "y"
|
47488
|
-
},
|
47489
|
-
{
|
47490
|
-
"name": "z"
|
47491
|
-
},
|
47492
|
-
{
|
47493
|
-
"name": "w"
|
47494
|
-
}
|
47495
|
-
]
|
47496
|
-
},
|
47497
|
-
{
|
47498
|
-
"customType": "BABYLON.VectorMergerBlock",
|
47499
|
-
"id": 234,
|
47500
|
-
"name": "VectorMerger",
|
47501
|
-
"comments": "",
|
47502
|
-
"visibleInInspector": false,
|
47503
|
-
"visibleOnFrame": false,
|
47504
|
-
"target": 4,
|
47505
|
-
"inputs": [
|
47506
|
-
{
|
47507
|
-
"name": "xyzw "
|
47508
|
-
},
|
47509
|
-
{
|
47510
|
-
"name": "xyz "
|
47511
|
-
},
|
47512
|
-
{
|
47513
|
-
"name": "xy "
|
47514
|
-
},
|
47515
|
-
{
|
47516
|
-
"name": "zw "
|
47517
|
-
},
|
47518
|
-
{
|
47519
|
-
"name": "x",
|
47520
|
-
"inputName": "x",
|
47521
|
-
"targetBlockId": 233,
|
47522
|
-
"targetConnectionName": "w",
|
47523
|
-
"isExposedOnFrame": true,
|
47524
|
-
"exposedPortPosition": -1
|
47525
|
-
},
|
47526
|
-
{
|
47527
|
-
"name": "y",
|
47528
|
-
"inputName": "y",
|
47529
|
-
"targetBlockId": 233,
|
47530
|
-
"targetConnectionName": "w",
|
47531
|
-
"isExposedOnFrame": true,
|
47532
|
-
"exposedPortPosition": -1
|
47533
|
-
},
|
47534
|
-
{
|
47535
|
-
"name": "z"
|
47536
|
-
},
|
47537
|
-
{
|
47538
|
-
"name": "w"
|
47539
|
-
}
|
47540
|
-
],
|
47541
|
-
"outputs": [
|
47542
|
-
{
|
47543
|
-
"name": "xyzw"
|
47544
|
-
},
|
47545
|
-
{
|
47546
|
-
"name": "xyz"
|
47547
|
-
},
|
47548
|
-
{
|
47549
|
-
"name": "xy"
|
47550
|
-
},
|
47551
|
-
{
|
47552
|
-
"name": "zw"
|
47553
|
-
}
|
47554
|
-
],
|
47555
|
-
"xSwizzle": "x",
|
47556
|
-
"ySwizzle": "y",
|
47557
|
-
"zSwizzle": "z",
|
47558
|
-
"wSwizzle": "w"
|
47559
|
-
},
|
47560
|
-
{
|
47561
|
-
"customType": "BABYLON.InputBlock",
|
47562
|
-
"id": 235,
|
47563
|
-
"name": "Vector2",
|
47564
|
-
"comments": "",
|
47565
|
-
"visibleInInspector": false,
|
47566
|
-
"visibleOnFrame": false,
|
47567
|
-
"target": 1,
|
47568
|
-
"inputs": [],
|
47569
|
-
"outputs": [
|
47570
|
-
{
|
47571
|
-
"name": "output"
|
47572
|
-
}
|
47573
|
-
],
|
47574
|
-
"type": 4,
|
47575
|
-
"mode": 0,
|
47576
|
-
"animationType": 0,
|
47577
|
-
"min": 0,
|
47578
|
-
"max": 0,
|
47579
|
-
"isBoolean": false,
|
47580
|
-
"matrixMode": 0,
|
47581
|
-
"isConstant": false,
|
47582
|
-
"groupInInspector": "",
|
47583
|
-
"convertToGammaSpace": false,
|
47584
|
-
"convertToLinearSpace": false,
|
47585
|
-
"valueType": "BABYLON.Vector2",
|
47586
|
-
"value": [
|
47587
|
-
0.5,
|
47588
|
-
0.5
|
47589
|
-
]
|
47590
|
-
},
|
47591
|
-
{
|
47592
|
-
"customType": "BABYLON.MultiplyBlock",
|
47593
|
-
"id": 236,
|
47594
|
-
"name": "Multiply",
|
47595
|
-
"comments": "",
|
47596
|
-
"visibleInInspector": false,
|
47597
|
-
"visibleOnFrame": false,
|
47598
|
-
"target": 4,
|
47599
|
-
"inputs": [
|
47600
|
-
{
|
47601
|
-
"name": "left",
|
47602
|
-
"inputName": "left",
|
47603
|
-
"targetBlockId": 237,
|
47604
|
-
"targetConnectionName": "output",
|
47605
|
-
"isExposedOnFrame": true,
|
47606
|
-
"exposedPortPosition": -1
|
47607
|
-
},
|
47608
|
-
{
|
47609
|
-
"name": "right",
|
47610
|
-
"inputName": "right",
|
47611
|
-
"targetBlockId": 239,
|
47612
|
-
"targetConnectionName": "output",
|
47613
|
-
"isExposedOnFrame": true,
|
47614
|
-
"exposedPortPosition": -1
|
47615
|
-
}
|
47616
|
-
],
|
47617
|
-
"outputs": [
|
47618
|
-
{
|
47619
|
-
"name": "output"
|
47620
|
-
}
|
47621
|
-
]
|
47622
|
-
},
|
47623
|
-
{
|
47624
|
-
"customType": "BABYLON.DivideBlock",
|
47625
|
-
"id": 237,
|
47626
|
-
"name": "Divide",
|
47627
|
-
"comments": "",
|
47628
|
-
"visibleInInspector": false,
|
47629
|
-
"visibleOnFrame": false,
|
47630
|
-
"target": 4,
|
47631
|
-
"inputs": [
|
47632
|
-
{
|
47633
|
-
"name": "left",
|
47634
|
-
"inputName": "left",
|
47635
|
-
"targetBlockId": 238,
|
47636
|
-
"targetConnectionName": "x",
|
47637
|
-
"isExposedOnFrame": true,
|
47638
|
-
"exposedPortPosition": -1
|
47639
|
-
},
|
47640
|
-
{
|
47641
|
-
"name": "right",
|
47642
|
-
"inputName": "right",
|
47643
|
-
"targetBlockId": 238,
|
47644
|
-
"targetConnectionName": "y",
|
47645
|
-
"isExposedOnFrame": true,
|
47646
|
-
"exposedPortPosition": -1
|
47647
|
-
}
|
47648
|
-
],
|
47649
|
-
"outputs": [
|
47650
|
-
{
|
47651
|
-
"name": "output"
|
47652
|
-
}
|
47653
|
-
]
|
47654
|
-
},
|
47655
|
-
{
|
47656
|
-
"customType": "BABYLON.ScreenSizeBlock",
|
47657
|
-
"id": 238,
|
47658
|
-
"name": "ScreenSize",
|
47659
|
-
"comments": "",
|
47660
|
-
"visibleInInspector": false,
|
47661
|
-
"visibleOnFrame": false,
|
47662
|
-
"target": 2,
|
47663
|
-
"inputs": [],
|
47664
|
-
"outputs": [
|
47665
|
-
{
|
47666
|
-
"name": "xy"
|
47667
|
-
},
|
47668
|
-
{
|
47669
|
-
"name": "x"
|
47670
|
-
},
|
47671
|
-
{
|
47672
|
-
"name": "y"
|
47673
|
-
}
|
47674
|
-
]
|
47675
|
-
},
|
47676
|
-
{
|
47677
|
-
"customType": "BABYLON.InputBlock",
|
47678
|
-
"id": 239,
|
47679
|
-
"name": "resolution",
|
47680
|
-
"comments": "",
|
47681
|
-
"visibleInInspector": false,
|
47682
|
-
"visibleOnFrame": false,
|
47683
|
-
"target": 1,
|
47684
|
-
"inputs": [],
|
47685
|
-
"outputs": [
|
47686
|
-
{
|
47687
|
-
"name": "output"
|
47688
|
-
}
|
47689
|
-
],
|
47690
|
-
"type": 1,
|
47691
|
-
"mode": 0,
|
47692
|
-
"animationType": 0,
|
47693
|
-
"min": 0,
|
47694
|
-
"max": 0,
|
47695
|
-
"isBoolean": false,
|
47696
|
-
"matrixMode": 0,
|
47697
|
-
"isConstant": false,
|
47698
|
-
"groupInInspector": "",
|
47699
|
-
"convertToGammaSpace": false,
|
47700
|
-
"convertToLinearSpace": false,
|
47701
|
-
"valueType": "number",
|
47702
|
-
"value": 100
|
47703
|
-
},
|
47704
|
-
{
|
47705
|
-
"customType": "BABYLON.InputBlock",
|
47706
|
-
"id": 240,
|
47707
|
-
"name": "Float",
|
47708
|
-
"comments": "",
|
47709
|
-
"visibleInInspector": false,
|
47710
|
-
"visibleOnFrame": false,
|
47711
|
-
"target": 1,
|
47712
|
-
"inputs": [],
|
47713
|
-
"outputs": [
|
47714
|
-
{
|
47715
|
-
"name": "output"
|
47716
|
-
}
|
47717
|
-
],
|
47718
|
-
"type": 1,
|
47719
|
-
"mode": 0,
|
47720
|
-
"animationType": 0,
|
47721
|
-
"min": 0,
|
47722
|
-
"max": 0,
|
47723
|
-
"isBoolean": false,
|
47724
|
-
"matrixMode": 0,
|
47725
|
-
"isConstant": false,
|
47726
|
-
"groupInInspector": "",
|
47727
|
-
"convertToGammaSpace": false,
|
47728
|
-
"convertToLinearSpace": false,
|
47729
|
-
"valueType": "number",
|
47730
|
-
"value": 2
|
47731
|
-
},
|
47732
|
-
{
|
47733
|
-
"customType": "BABYLON.ModBlock",
|
47734
|
-
"id": 241,
|
47735
|
-
"name": "Mod",
|
47736
|
-
"comments": "",
|
47737
|
-
"visibleInInspector": false,
|
47738
|
-
"visibleOnFrame": false,
|
47739
|
-
"target": 4,
|
47740
|
-
"inputs": [
|
47741
|
-
{
|
47742
|
-
"name": "left",
|
47743
|
-
"inputName": "left",
|
47744
|
-
"targetBlockId": 242,
|
47745
|
-
"targetConnectionName": "output",
|
47746
|
-
"isExposedOnFrame": true,
|
47747
|
-
"exposedPortPosition": -1
|
47748
|
-
},
|
47749
|
-
{
|
47750
|
-
"name": "right",
|
47751
|
-
"inputName": "right",
|
47752
|
-
"targetBlockId": 240,
|
47753
|
-
"targetConnectionName": "output",
|
47754
|
-
"isExposedOnFrame": true,
|
47755
|
-
"exposedPortPosition": -1
|
47756
|
-
}
|
47757
|
-
],
|
47758
|
-
"outputs": [
|
47759
|
-
{
|
47760
|
-
"name": "output"
|
47761
|
-
}
|
47762
|
-
]
|
47763
|
-
},
|
47764
|
-
{
|
47765
|
-
"customType": "BABYLON.TrigonometryBlock",
|
47766
|
-
"id": 242,
|
47767
|
-
"name": "Round",
|
47768
|
-
"comments": "",
|
47769
|
-
"visibleInInspector": false,
|
47770
|
-
"visibleOnFrame": false,
|
47771
|
-
"target": 4,
|
47772
|
-
"inputs": [
|
47773
|
-
{
|
47774
|
-
"name": "input",
|
47775
|
-
"inputName": "input",
|
47776
|
-
"targetBlockId": 243,
|
47777
|
-
"targetConnectionName": "output",
|
47778
|
-
"isExposedOnFrame": true,
|
47779
|
-
"exposedPortPosition": -1
|
47780
|
-
}
|
47781
|
-
],
|
47782
|
-
"outputs": [
|
47783
|
-
{
|
47784
|
-
"name": "output"
|
47785
|
-
}
|
47786
|
-
],
|
47787
|
-
"operation": 5
|
47788
|
-
},
|
47789
|
-
{
|
47790
|
-
"customType": "BABYLON.MultiplyBlock",
|
47791
|
-
"id": 243,
|
47792
|
-
"name": "Multiply",
|
47793
|
-
"comments": "",
|
47794
|
-
"visibleInInspector": false,
|
47795
|
-
"visibleOnFrame": false,
|
47796
|
-
"target": 4,
|
47797
|
-
"inputs": [
|
47798
|
-
{
|
47799
|
-
"name": "left",
|
47800
|
-
"inputName": "left",
|
47801
|
-
"targetBlockId": 228,
|
47802
|
-
"targetConnectionName": "y",
|
47803
|
-
"isExposedOnFrame": true,
|
47804
|
-
"exposedPortPosition": -1
|
47805
|
-
},
|
47806
|
-
{
|
47807
|
-
"name": "right",
|
47808
|
-
"inputName": "right",
|
47809
|
-
"targetBlockId": 239,
|
47810
|
-
"targetConnectionName": "output",
|
47811
|
-
"isExposedOnFrame": true,
|
47812
|
-
"exposedPortPosition": -1
|
47813
|
-
}
|
47814
|
-
],
|
47815
|
-
"outputs": [
|
47816
|
-
{
|
47817
|
-
"name": "output"
|
47818
|
-
}
|
47819
|
-
]
|
47820
|
-
},
|
47821
|
-
{
|
47822
|
-
"customType": "BABYLON.MultiplyBlock",
|
47823
|
-
"id": 244,
|
47824
|
-
"name": "Multiply",
|
47825
|
-
"comments": "",
|
47826
|
-
"visibleInInspector": false,
|
47827
|
-
"visibleOnFrame": false,
|
47828
|
-
"target": 4,
|
47829
|
-
"inputs": [
|
47830
|
-
{
|
47831
|
-
"name": "left",
|
47832
|
-
"inputName": "left",
|
47833
|
-
"targetBlockId": 225,
|
47834
|
-
"targetConnectionName": "output",
|
47835
|
-
"isExposedOnFrame": true,
|
47836
|
-
"exposedPortPosition": -1
|
47837
|
-
},
|
47838
|
-
{
|
47839
|
-
"name": "right",
|
47840
|
-
"inputName": "right",
|
47841
|
-
"targetBlockId": 245,
|
47842
|
-
"targetConnectionName": "output",
|
47843
|
-
"isExposedOnFrame": true,
|
47844
|
-
"exposedPortPosition": -1
|
47845
|
-
}
|
47846
|
-
],
|
47847
|
-
"outputs": [
|
47848
|
-
{
|
47849
|
-
"name": "output"
|
47850
|
-
}
|
47851
|
-
]
|
47852
|
-
},
|
47853
|
-
{
|
47854
|
-
"customType": "BABYLON.OneMinusBlock",
|
47855
|
-
"id": 245,
|
47856
|
-
"name": "One minus",
|
47857
|
-
"comments": "",
|
47858
|
-
"visibleInInspector": false,
|
47859
|
-
"visibleOnFrame": false,
|
47860
|
-
"target": 4,
|
47861
|
-
"inputs": [
|
47862
|
-
{
|
47863
|
-
"name": "input",
|
47864
|
-
"inputName": "input",
|
47865
|
-
"targetBlockId": 241,
|
47866
|
-
"targetConnectionName": "output",
|
47867
|
-
"isExposedOnFrame": true,
|
47868
|
-
"exposedPortPosition": -1
|
47869
|
-
}
|
47870
|
-
],
|
47871
|
-
"outputs": [
|
47872
|
-
{
|
47873
|
-
"name": "output"
|
47874
|
-
}
|
47875
|
-
]
|
47876
|
-
},
|
47877
|
-
{
|
47878
|
-
"customType": "BABYLON.InputBlock",
|
47879
|
-
"id": 246,
|
47880
|
-
"name": "Color4",
|
47881
|
-
"comments": "",
|
47882
|
-
"visibleInInspector": false,
|
47883
|
-
"visibleOnFrame": false,
|
47884
|
-
"target": 1,
|
47885
|
-
"inputs": [],
|
47886
|
-
"outputs": [
|
47887
|
-
{
|
47888
|
-
"name": "output"
|
47889
|
-
}
|
47890
|
-
],
|
47891
|
-
"type": 64,
|
47892
|
-
"mode": 0,
|
47893
|
-
"animationType": 0,
|
47894
|
-
"min": 0,
|
47895
|
-
"max": 0,
|
47896
|
-
"isBoolean": false,
|
47897
|
-
"matrixMode": 0,
|
47898
|
-
"isConstant": false,
|
47899
|
-
"groupInInspector": "",
|
47900
|
-
"convertToGammaSpace": false,
|
47901
|
-
"convertToLinearSpace": false,
|
47902
|
-
"valueType": "BABYLON.Color4",
|
47903
|
-
"value": [
|
47904
|
-
0.8862745098039215,
|
47905
|
-
0.8862745098039215,
|
47906
|
-
0.8862745098039215,
|
47907
|
-
1
|
47908
|
-
]
|
47909
|
-
},
|
47910
|
-
{
|
47911
|
-
"customType": "BABYLON.TextureBlock",
|
47912
|
-
"id": 247,
|
47913
|
-
"name": "Texture",
|
47914
|
-
"comments": "",
|
47915
|
-
"visibleInInspector": false,
|
47916
|
-
"visibleOnFrame": false,
|
47917
|
-
"target": 3,
|
47918
|
-
"inputs": [
|
47919
|
-
{
|
47920
|
-
"name": "uv",
|
47921
|
-
"displayName": "uv",
|
47922
|
-
"inputName": "uv",
|
47923
|
-
"targetBlockId": 248,
|
47924
|
-
"targetConnectionName": "output",
|
47925
|
-
"isExposedOnFrame": true,
|
47926
|
-
"exposedPortPosition": -1
|
47927
|
-
},
|
47928
|
-
{
|
47929
|
-
"name": "source",
|
47930
|
-
"displayName": "source"
|
47931
|
-
}
|
47932
|
-
],
|
47933
|
-
"outputs": [
|
47934
|
-
{
|
47935
|
-
"name": "rgba",
|
47936
|
-
"displayName": "rgba"
|
47937
|
-
},
|
47938
|
-
{
|
47939
|
-
"name": "rgb",
|
47940
|
-
"displayName": "rgb"
|
47941
|
-
},
|
47942
|
-
{
|
47943
|
-
"name": "r",
|
47944
|
-
"displayName": "r"
|
47945
|
-
},
|
47946
|
-
{
|
47947
|
-
"name": "g",
|
47948
|
-
"displayName": "g"
|
47949
|
-
},
|
47950
|
-
{
|
47951
|
-
"name": "b",
|
47952
|
-
"displayName": "b"
|
47953
|
-
},
|
47954
|
-
{
|
47955
|
-
"name": "a",
|
47956
|
-
"displayName": "a"
|
47957
|
-
},
|
47958
|
-
{
|
47959
|
-
"name": "level",
|
47960
|
-
"displayName": "level"
|
47961
|
-
}
|
47962
|
-
],
|
47963
|
-
"convertToGammaSpace": false,
|
47964
|
-
"convertToLinearSpace": false,
|
47965
|
-
"fragmentOnly": false,
|
47966
|
-
"disableLevelMultiplication": false
|
47967
|
-
},
|
47968
|
-
{
|
47969
|
-
"customType": "BABYLON.InputBlock",
|
47970
|
-
"id": 248,
|
47971
|
-
"name": "uv",
|
47972
|
-
"comments": "",
|
47973
|
-
"visibleInInspector": false,
|
47974
|
-
"visibleOnFrame": false,
|
47975
|
-
"target": 1,
|
47976
|
-
"inputs": [],
|
47977
|
-
"outputs": [
|
47978
|
-
{
|
47979
|
-
"name": "output"
|
47980
|
-
}
|
47981
|
-
],
|
47982
|
-
"type": 4,
|
47983
|
-
"mode": 1,
|
47984
|
-
"animationType": 0,
|
47985
|
-
"min": 0,
|
47986
|
-
"max": 0,
|
47987
|
-
"isBoolean": false,
|
47988
|
-
"matrixMode": 0,
|
47989
|
-
"isConstant": false,
|
47990
|
-
"groupInInspector": "",
|
47991
|
-
"convertToGammaSpace": false,
|
47992
|
-
"convertToLinearSpace": false
|
47993
|
-
},
|
47994
|
-
{
|
47995
|
-
"customType": "BABYLON.AddBlock",
|
47996
|
-
"id": 249,
|
47997
|
-
"name": "Add",
|
47998
|
-
"comments": "",
|
47999
|
-
"visibleInInspector": false,
|
48000
|
-
"visibleOnFrame": false,
|
48001
|
-
"target": 4,
|
48002
|
-
"inputs": [
|
48003
|
-
{
|
48004
|
-
"name": "left",
|
48005
|
-
"displayName": "left",
|
48006
|
-
"inputName": "left",
|
48007
|
-
"targetBlockId": 219,
|
48008
|
-
"targetConnectionName": "a",
|
48009
|
-
"isExposedOnFrame": true,
|
48010
|
-
"exposedPortPosition": -1
|
48011
|
-
},
|
48012
|
-
{
|
48013
|
-
"name": "right",
|
48014
|
-
"displayName": "right",
|
48015
|
-
"inputName": "right",
|
48016
|
-
"targetBlockId": 247,
|
48017
|
-
"targetConnectionName": "a",
|
48018
|
-
"isExposedOnFrame": true,
|
48019
|
-
"exposedPortPosition": -1
|
48020
|
-
}
|
48021
|
-
],
|
48022
|
-
"outputs": [
|
48023
|
-
{
|
48024
|
-
"name": "output",
|
48025
|
-
"displayName": "output"
|
48026
|
-
}
|
48027
|
-
]
|
48028
|
-
}
|
48029
|
-
]
|
48030
|
-
};
|
46405
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArtBoardComponent", function() { return ArtBoardComponent; });
|
46406
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../../../node_modules/tslib/tslib.es6.js");
|
46407
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
46408
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
46409
|
+
/* harmony import */ var _coordinateHelper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./coordinateHelper */ "./diagram/coordinateHelper.tsx");
|
46410
|
+
|
46411
|
+
|
46412
|
+
|
46413
|
+
var ArtBoardComponent = /** @class */ (function (_super) {
|
46414
|
+
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ArtBoardComponent, _super);
|
46415
|
+
function ArtBoardComponent(props) {
|
46416
|
+
var _this = _super.call(this, props) || this;
|
46417
|
+
_this.state = {
|
46418
|
+
bounds: new _coordinateHelper__WEBPACK_IMPORTED_MODULE_2__["Rect"](0, 0, 0, 0)
|
46419
|
+
};
|
46420
|
+
_this.props.globalState.onArtBoardUpdateRequiredObservable.add(function () { return _this.update(); });
|
46421
|
+
return _this;
|
46422
|
+
}
|
46423
|
+
ArtBoardComponent.prototype.update = function () {
|
46424
|
+
var visibleRegion = this.props.globalState.workbench.visibleRegionContainer;
|
46425
|
+
if (!visibleRegion)
|
46426
|
+
return;
|
46427
|
+
var localBounds = _coordinateHelper__WEBPACK_IMPORTED_MODULE_2__["CoordinateHelper"].computeLocalBounds(visibleRegion);
|
46428
|
+
var topLeftRTT = _coordinateHelper__WEBPACK_IMPORTED_MODULE_2__["CoordinateHelper"].nodeToRTTSpace(visibleRegion, localBounds.left, localBounds.top, undefined);
|
46429
|
+
var topLeftCanvas = _coordinateHelper__WEBPACK_IMPORTED_MODULE_2__["CoordinateHelper"].rttToCanvasSpace(topLeftRTT.x, topLeftRTT.y);
|
46430
|
+
var bottomRightRTT = _coordinateHelper__WEBPACK_IMPORTED_MODULE_2__["CoordinateHelper"].nodeToRTTSpace(visibleRegion, localBounds.right, localBounds.bottom, undefined);
|
46431
|
+
var bottomRightCanvas = _coordinateHelper__WEBPACK_IMPORTED_MODULE_2__["CoordinateHelper"].rttToCanvasSpace(bottomRightRTT.x, bottomRightRTT.y);
|
46432
|
+
this.setState({
|
46433
|
+
bounds: new _coordinateHelper__WEBPACK_IMPORTED_MODULE_2__["Rect"](topLeftCanvas.x, topLeftCanvas.y, bottomRightCanvas.x, bottomRightCanvas.y)
|
46434
|
+
});
|
46435
|
+
};
|
46436
|
+
ArtBoardComponent.prototype.render = function () {
|
46437
|
+
var style = {
|
46438
|
+
top: "".concat(this.state.bounds.top, "px"),
|
46439
|
+
left: "".concat(this.state.bounds.left, "px"),
|
46440
|
+
width: "".concat(this.state.bounds.width, "px"),
|
46441
|
+
height: "".concat(this.state.bounds.height, "px")
|
46442
|
+
};
|
46443
|
+
return react__WEBPACK_IMPORTED_MODULE_1__["createElement"](react__WEBPACK_IMPORTED_MODULE_1__["Fragment"], null,
|
46444
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "artboard-stroke", style: style }),
|
46445
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "artboard-background", style: style }));
|
46446
|
+
};
|
46447
|
+
return ArtBoardComponent;
|
46448
|
+
}(react__WEBPACK_IMPORTED_MODULE_1__["Component"]));
|
46449
|
+
|
48031
46450
|
|
48032
46451
|
|
48033
46452
|
/***/ }),
|
48034
46453
|
|
48035
|
-
/***/ "./diagram/
|
48036
|
-
|
48037
|
-
!*** ./diagram/
|
48038
|
-
|
48039
|
-
/*! exports provided:
|
46454
|
+
/***/ "./diagram/coordinateHelper.tsx":
|
46455
|
+
/*!**************************************!*\
|
46456
|
+
!*** ./diagram/coordinateHelper.tsx ***!
|
46457
|
+
\**************************************/
|
46458
|
+
/*! exports provided: Rect, CoordinateHelper */
|
48040
46459
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
48041
46460
|
|
48042
46461
|
"use strict";
|
48043
46462
|
__webpack_require__.r(__webpack_exports__);
|
48044
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
48045
|
-
/* harmony
|
48046
|
-
/* harmony import */ var
|
48047
|
-
/* harmony import */ var
|
48048
|
-
/* harmony import */ var
|
48049
|
-
/* harmony import */ var
|
48050
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
48051
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
|
48052
|
-
|
46463
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rect", function() { return Rect; });
|
46464
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CoordinateHelper", function() { return CoordinateHelper; });
|
46465
|
+
/* harmony import */ var _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babylonjs/gui/2D/controls/control */ "@babylonjs/gui/2D/controls/button");
|
46466
|
+
/* harmony import */ var _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_0__);
|
46467
|
+
/* harmony import */ var _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babylonjs/core/Maths/math.vector */ "@babylonjs/core/Misc/observable");
|
46468
|
+
/* harmony import */ var _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__);
|
48053
46469
|
|
48054
46470
|
|
48055
46471
|
|
48056
|
-
|
48057
|
-
|
48058
|
-
|
48059
|
-
|
48060
|
-
__webpack_require__(/*! ./workbenchCanvas.scss */ "./diagram/workbenchCanvas.scss");
|
48061
|
-
var gizmoPivotIcon = __webpack_require__(/*! ../../public/imgs/gizmoPivotIcon.svg */ "../public/imgs/gizmoPivotIcon.svg");
|
48062
|
-
// which side of the bounding box are we on?
|
48063
|
-
var ScalePointPosition;
|
48064
|
-
(function (ScalePointPosition) {
|
48065
|
-
ScalePointPosition[ScalePointPosition["Top"] = -1] = "Top";
|
48066
|
-
ScalePointPosition[ScalePointPosition["Left"] = -1] = "Left";
|
48067
|
-
ScalePointPosition[ScalePointPosition["Center"] = 0] = "Center";
|
48068
|
-
ScalePointPosition[ScalePointPosition["Right"] = 1] = "Right";
|
48069
|
-
ScalePointPosition[ScalePointPosition["Bottom"] = 1] = "Bottom";
|
48070
|
-
})(ScalePointPosition || (ScalePointPosition = {}));
|
48071
46472
|
var Rect = /** @class */ (function () {
|
48072
46473
|
function Rect(left, top, right, bottom) {
|
48073
46474
|
this.left = left;
|
@@ -48077,8 +46478,8 @@ var Rect = /** @class */ (function () {
|
|
48077
46478
|
}
|
48078
46479
|
Object.defineProperty(Rect.prototype, "center", {
|
48079
46480
|
get: function () {
|
48080
|
-
var topLeft = new
|
48081
|
-
return topLeft.addInPlace(new
|
46481
|
+
var topLeft = new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Vector2"](this.left, this.top);
|
46482
|
+
return topLeft.addInPlace(new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Vector2"](this.right, this.bottom).subtractInPlace(topLeft).multiplyByFloats(0.5, 0.5));
|
48082
46483
|
},
|
48083
46484
|
enumerable: false,
|
48084
46485
|
configurable: true
|
@@ -48099,6 +46500,219 @@ var Rect = /** @class */ (function () {
|
|
48099
46500
|
});
|
48100
46501
|
return Rect;
|
48101
46502
|
}());
|
46503
|
+
|
46504
|
+
var roundFactor = 100;
|
46505
|
+
var round = function (value) { return Math.round(value * roundFactor) / roundFactor; };
|
46506
|
+
var CoordinateHelper = /** @class */ (function () {
|
46507
|
+
function CoordinateHelper() {
|
46508
|
+
}
|
46509
|
+
/**
|
46510
|
+
* Get the scaling of a specific GUI control
|
46511
|
+
* @param node the node for which we are getting the scaling
|
46512
|
+
* @param relative should we return only the relative scaling (relative to the parent)
|
46513
|
+
* @returns an X,Y vector of the scaling
|
46514
|
+
*/
|
46515
|
+
CoordinateHelper.getScale = function (node, relative) {
|
46516
|
+
var x = node.scaleX;
|
46517
|
+
var y = node.scaleY;
|
46518
|
+
if (relative) {
|
46519
|
+
return new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Vector2"](x, y);
|
46520
|
+
}
|
46521
|
+
var parent = node.parent;
|
46522
|
+
while (parent) {
|
46523
|
+
x *= parent.scaleX;
|
46524
|
+
y *= parent.scaleY;
|
46525
|
+
parent = parent.parent;
|
46526
|
+
}
|
46527
|
+
return new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Vector2"](x, y);
|
46528
|
+
};
|
46529
|
+
CoordinateHelper.getRotation = function (node, relative) {
|
46530
|
+
// Gets rotate of a control account for all of it's parents rotations
|
46531
|
+
var rotation = node.rotation;
|
46532
|
+
if (relative) {
|
46533
|
+
return rotation;
|
46534
|
+
}
|
46535
|
+
var parent = node.parent;
|
46536
|
+
while (parent) {
|
46537
|
+
rotation += parent.rotation;
|
46538
|
+
parent = parent.parent;
|
46539
|
+
}
|
46540
|
+
return rotation;
|
46541
|
+
};
|
46542
|
+
/**
|
46543
|
+
* This function calculates a local matrix for a node, including it's full transformation and pivot point
|
46544
|
+
*
|
46545
|
+
* @param node the node to calculate the matrix for
|
46546
|
+
* @param useStoredValues should the stored (cached) values be used to calculate the matrix
|
46547
|
+
* @returns a new matrix for the control
|
46548
|
+
*/
|
46549
|
+
CoordinateHelper.getNodeMatrix = function (node, storedValues) {
|
46550
|
+
var size = this.globalState.guiTexture.getSize();
|
46551
|
+
// parent should always be defined, but stay safe
|
46552
|
+
var parentWidth = node.parent ? node.parent._currentMeasure.width : size.width;
|
46553
|
+
var parentHeight = node.parent ? node.parent._currentMeasure.height : size.height;
|
46554
|
+
var x = 0;
|
46555
|
+
var y = 0;
|
46556
|
+
var width = storedValues ? storedValues.width : node.widthInPixels;
|
46557
|
+
var height = storedValues ? storedValues.height : node.heightInPixels;
|
46558
|
+
var left = storedValues ? storedValues.left : node.leftInPixels;
|
46559
|
+
var top = storedValues ? storedValues.top : node.topInPixels;
|
46560
|
+
switch (node.horizontalAlignment) {
|
46561
|
+
case _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_0__["Control"].HORIZONTAL_ALIGNMENT_LEFT:
|
46562
|
+
x = -(parentWidth - width) / 2;
|
46563
|
+
break;
|
46564
|
+
case _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_0__["Control"].HORIZONTAL_ALIGNMENT_RIGHT:
|
46565
|
+
x = (parentWidth - width) / 2;
|
46566
|
+
break;
|
46567
|
+
case _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_0__["Control"].HORIZONTAL_ALIGNMENT_CENTER:
|
46568
|
+
x = 0;
|
46569
|
+
break;
|
46570
|
+
}
|
46571
|
+
switch (node.verticalAlignment) {
|
46572
|
+
case _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_0__["Control"].VERTICAL_ALIGNMENT_TOP:
|
46573
|
+
y = -(parentHeight - height) / 2;
|
46574
|
+
break;
|
46575
|
+
case _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_0__["Control"].VERTICAL_ALIGNMENT_BOTTOM:
|
46576
|
+
y = (parentHeight - height) / 2;
|
46577
|
+
break;
|
46578
|
+
case _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_0__["Control"].VERTICAL_ALIGNMENT_CENTER:
|
46579
|
+
y = 0;
|
46580
|
+
break;
|
46581
|
+
}
|
46582
|
+
this.resetMatrixArray();
|
46583
|
+
var m2d = this._matrixCache[0];
|
46584
|
+
var translateTo = this._matrixCache[1];
|
46585
|
+
// as this is used later it needs to persist
|
46586
|
+
var resultMatrix = _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_0__["Matrix2D"].Identity();
|
46587
|
+
// the pivot point around which the object transforms
|
46588
|
+
var offsetX = width * node.transformCenterX - width / 2;
|
46589
|
+
var offsetY = height * node.transformCenterY - height / 2;
|
46590
|
+
// pivot changes this point's position! but only in legacy pivot mode
|
46591
|
+
if (!node.descendantsOnlyPadding) {
|
46592
|
+
// TODO - padding needs to also take scaling into account?
|
46593
|
+
offsetX -= ((node.paddingRightInPixels - node.paddingLeftInPixels) * 1) / 2;
|
46594
|
+
offsetY -= ((node.paddingBottomInPixels - node.paddingTopInPixels) * 1) / 2;
|
46595
|
+
}
|
46596
|
+
// Set the translation
|
46597
|
+
_babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_0__["Matrix2D"].TranslationToRef(x + left, y + top, translateTo);
|
46598
|
+
// without parents scaling and rotation, calculate world matrix for each
|
46599
|
+
var rotation = this.getRotation(node, true);
|
46600
|
+
var scaling = this.getScale(node, true);
|
46601
|
+
// COmpose doesn't actually translate, but creates a form of pivot in a specific position
|
46602
|
+
_babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_0__["Matrix2D"].ComposeToRef(-offsetX, -offsetY, rotation, scaling.x, scaling.y, null, m2d);
|
46603
|
+
// actually compose the matrix
|
46604
|
+
resultMatrix.multiplyToRef(m2d, resultMatrix);
|
46605
|
+
resultMatrix.multiplyToRef(translateTo, resultMatrix);
|
46606
|
+
return resultMatrix;
|
46607
|
+
};
|
46608
|
+
/**
|
46609
|
+
* Using the node's tree, calculate its world matrix and return it
|
46610
|
+
* @param node the node to calculate the matrix for
|
46611
|
+
* @param useStoredValuesIfPossible used stored valued (cached when pointer down is clicked)
|
46612
|
+
* @returns the world matrix for this node
|
46613
|
+
*/
|
46614
|
+
CoordinateHelper.nodeToRTTWorldMatrix = function (node, storedValues) {
|
46615
|
+
var _this = this;
|
46616
|
+
var listOfNodes = [node];
|
46617
|
+
var parent = node.parent;
|
46618
|
+
var child = node;
|
46619
|
+
while (parent) {
|
46620
|
+
if (parent.typeName === "Grid") {
|
46621
|
+
var cellInfo = parent.getChildCellInfo(child);
|
46622
|
+
var cell = parent.cells[cellInfo];
|
46623
|
+
listOfNodes.push(cell);
|
46624
|
+
}
|
46625
|
+
listOfNodes.push(parent);
|
46626
|
+
child = parent;
|
46627
|
+
parent = parent.parent;
|
46628
|
+
}
|
46629
|
+
this.resetMatrixArray();
|
46630
|
+
var matrices = listOfNodes.map(function (node, index) { return _this.getNodeMatrix(node, index === 0 ? storedValues : undefined); });
|
46631
|
+
return matrices.reduce(function (acc, cur) {
|
46632
|
+
acc.multiplyToRef(cur, acc);
|
46633
|
+
return acc;
|
46634
|
+
}, this._matrixCache[2]);
|
46635
|
+
};
|
46636
|
+
CoordinateHelper.nodeToRTTSpace = function (node, x, y, reference, storedValues) {
|
46637
|
+
if (reference === void 0) { reference = new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Vector2"](); }
|
46638
|
+
var worldMatrix = this.nodeToRTTWorldMatrix(node, storedValues);
|
46639
|
+
worldMatrix.transformCoordinates(x, y, reference);
|
46640
|
+
// round
|
46641
|
+
reference.x = round(reference.x);
|
46642
|
+
reference.y = round(reference.y);
|
46643
|
+
return reference;
|
46644
|
+
};
|
46645
|
+
CoordinateHelper.rttToLocalNodeSpace = function (node, x, y, reference, storedValues) {
|
46646
|
+
if (reference === void 0) { reference = new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Vector2"](); }
|
46647
|
+
var worldMatrix = this.nodeToRTTWorldMatrix(node, storedValues);
|
46648
|
+
var inv = this._matrixCache[3];
|
46649
|
+
worldMatrix.invertToRef(inv);
|
46650
|
+
inv.transformCoordinates(x, y, reference);
|
46651
|
+
// round
|
46652
|
+
reference.x = round(reference.x);
|
46653
|
+
reference.y = round(reference.y);
|
46654
|
+
return reference;
|
46655
|
+
};
|
46656
|
+
CoordinateHelper.rttToCanvasSpace = function (x, y) {
|
46657
|
+
var engine = this.globalState.workbench._scene.getEngine();
|
46658
|
+
return new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Vector2"](x + engine.getRenderWidth() / 2, y + engine.getRenderHeight() / 2);
|
46659
|
+
};
|
46660
|
+
CoordinateHelper.mousePointerToRTTSpace = function (node, x, y) {
|
46661
|
+
var scene = this.globalState.workbench._scene;
|
46662
|
+
var engine = scene.getEngine();
|
46663
|
+
return new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Vector2"]((x || scene.pointerX) - engine.getRenderWidth() / 2, (y || scene.pointerY) - engine.getRenderHeight() / 2);
|
46664
|
+
};
|
46665
|
+
CoordinateHelper.resetMatrixArray = function () {
|
46666
|
+
this._matrixCache.forEach(function (matrix) {
|
46667
|
+
_babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_0__["Matrix2D"].IdentityToRef(matrix);
|
46668
|
+
});
|
46669
|
+
};
|
46670
|
+
CoordinateHelper.computeLocalBounds = function (node) {
|
46671
|
+
return new Rect(-node.widthInPixels * 0.5, -node.heightInPixels * 0.5, node.widthInPixels * 0.5, node.heightInPixels * 0.5);
|
46672
|
+
};
|
46673
|
+
CoordinateHelper._matrixCache = [_babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_0__["Matrix2D"].Identity(), _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_0__["Matrix2D"].Identity(), _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_0__["Matrix2D"].Identity(), _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_0__["Matrix2D"].Identity()];
|
46674
|
+
return CoordinateHelper;
|
46675
|
+
}());
|
46676
|
+
|
46677
|
+
|
46678
|
+
|
46679
|
+
/***/ }),
|
46680
|
+
|
46681
|
+
/***/ "./diagram/guiGizmo.tsx":
|
46682
|
+
/*!******************************!*\
|
46683
|
+
!*** ./diagram/guiGizmo.tsx ***!
|
46684
|
+
\******************************/
|
46685
|
+
/*! exports provided: GuiGizmoComponent */
|
46686
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
46687
|
+
|
46688
|
+
"use strict";
|
46689
|
+
__webpack_require__.r(__webpack_exports__);
|
46690
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GuiGizmoComponent", function() { return GuiGizmoComponent; });
|
46691
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../../../node_modules/tslib/tslib.es6.js");
|
46692
|
+
/* harmony import */ var _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babylonjs/gui/2D/controls/control */ "@babylonjs/gui/2D/controls/button");
|
46693
|
+
/* harmony import */ var _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_1__);
|
46694
|
+
/* harmony import */ var _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babylonjs/core/Maths/math.vector */ "@babylonjs/core/Misc/observable");
|
46695
|
+
/* harmony import */ var _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__);
|
46696
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
46697
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
|
46698
|
+
/* harmony import */ var _coordinateHelper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./coordinateHelper */ "./diagram/coordinateHelper.tsx");
|
46699
|
+
|
46700
|
+
|
46701
|
+
|
46702
|
+
|
46703
|
+
|
46704
|
+
|
46705
|
+
__webpack_require__(/*! ./workbenchCanvas.scss */ "./diagram/workbenchCanvas.scss");
|
46706
|
+
var gizmoPivotIcon = __webpack_require__(/*! ../../public/imgs/gizmoPivotIcon.svg */ "../public/imgs/gizmoPivotIcon.svg");
|
46707
|
+
// which side of the bounding box are we on?
|
46708
|
+
var ScalePointPosition;
|
46709
|
+
(function (ScalePointPosition) {
|
46710
|
+
ScalePointPosition[ScalePointPosition["Top"] = -1] = "Top";
|
46711
|
+
ScalePointPosition[ScalePointPosition["Left"] = -1] = "Left";
|
46712
|
+
ScalePointPosition[ScalePointPosition["Center"] = 0] = "Center";
|
46713
|
+
ScalePointPosition[ScalePointPosition["Right"] = 1] = "Right";
|
46714
|
+
ScalePointPosition[ScalePointPosition["Bottom"] = 1] = "Bottom";
|
46715
|
+
})(ScalePointPosition || (ScalePointPosition = {}));
|
48102
46716
|
var roundFactor = 100;
|
48103
46717
|
var round = function (value) { return Math.round(value * roundFactor) / roundFactor; };
|
48104
46718
|
// this defines the lines that link the corners, making up the bounding box
|
@@ -48128,13 +46742,11 @@ var GuiGizmoComponent = /** @class */ (function (_super) {
|
|
48128
46742
|
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GuiGizmoComponent, _super);
|
48129
46743
|
function GuiGizmoComponent(props) {
|
48130
46744
|
var _this = _super.call(this, props) || this;
|
48131
|
-
// used for scaling computations
|
48132
|
-
_this._initH = 0;
|
48133
|
-
_this._initW = 0;
|
48134
|
-
_this._initX = 0;
|
48135
|
-
_this._initY = 0;
|
48136
|
-
_this._plane = _babylonjs_core_Maths_math_axis__WEBPACK_IMPORTED_MODULE_2__["Plane"].FromPositionAndNormal(_babylonjs_core_Maths_math_axis__WEBPACK_IMPORTED_MODULE_2__["Vector3"].Zero(), _babylonjs_core_Maths_math_axis__WEBPACK_IMPORTED_MODULE_2__["Axis"].Y);
|
48137
46745
|
_this._onUp = function (evt) {
|
46746
|
+
// if left is still pressed, don't release
|
46747
|
+
if (evt && (evt.buttons & 1)) {
|
46748
|
+
return;
|
46749
|
+
}
|
48138
46750
|
// cleanup on pointer up
|
48139
46751
|
_this.setState({ scalePointDragging: -1, isRotating: false });
|
48140
46752
|
};
|
@@ -48144,8 +46756,8 @@ var GuiGizmoComponent = /** @class */ (function (_super) {
|
|
48144
46756
|
if (_this.state.scalePointDragging !== -1) {
|
48145
46757
|
if (selectedGuiNodes.length === 1) {
|
48146
46758
|
var node = selectedGuiNodes[0];
|
48147
|
-
var inRTT =
|
48148
|
-
var inNodeSpace =
|
46759
|
+
var inRTT = _coordinateHelper__WEBPACK_IMPORTED_MODULE_4__["CoordinateHelper"].mousePointerToRTTSpace(node, scene.pointerX, scene.pointerY);
|
46760
|
+
var inNodeSpace = _coordinateHelper__WEBPACK_IMPORTED_MODULE_4__["CoordinateHelper"].rttToLocalNodeSpace(node, inRTT.x, inRTT.y, undefined, _this._storedValues);
|
48149
46761
|
_this._dragLocalBounds(inNodeSpace);
|
48150
46762
|
_this._updateNodeFromLocalBounds(node, _this.state.scalePointDragging);
|
48151
46763
|
//convert to percentage
|
@@ -48170,11 +46782,8 @@ var GuiGizmoComponent = /** @class */ (function (_super) {
|
|
48170
46782
|
_this.setState({ scalePointDragging: scalePointIndex });
|
48171
46783
|
if (selectedGuiNodes.length > 0) {
|
48172
46784
|
var node = selectedGuiNodes[0];
|
48173
|
-
_this._localBounds =
|
48174
|
-
_this.
|
48175
|
-
_this._initH = node.heightInPixels;
|
48176
|
-
_this._initY = node.topInPixels;
|
48177
|
-
_this._initX = node.leftInPixels;
|
46785
|
+
_this._localBounds = _coordinateHelper__WEBPACK_IMPORTED_MODULE_4__["CoordinateHelper"].computeLocalBounds(node);
|
46786
|
+
_this._storedValues = new _coordinateHelper__WEBPACK_IMPORTED_MODULE_4__["Rect"](node.leftInPixels, node.topInPixels, node.leftInPixels + node.widthInPixels, node.topInPixels + node.heightInPixels);
|
48178
46787
|
}
|
48179
46788
|
};
|
48180
46789
|
_this._beginRotate = function () {
|
@@ -48183,10 +46792,10 @@ var GuiGizmoComponent = /** @class */ (function (_super) {
|
|
48183
46792
|
var pivot;
|
48184
46793
|
if (selectedGuiNodes.length === 1) {
|
48185
46794
|
var node = selectedGuiNodes[0];
|
48186
|
-
var nodeSpace = new
|
48187
|
-
var rtt =
|
48188
|
-
var canvas =
|
48189
|
-
pivot = new
|
46795
|
+
var nodeSpace = new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__["Vector2"](node.transformCenterX, node.transformCenterY);
|
46796
|
+
var rtt = _coordinateHelper__WEBPACK_IMPORTED_MODULE_4__["CoordinateHelper"].nodeToRTTSpace(node, nodeSpace.x, nodeSpace.y, undefined);
|
46797
|
+
var canvas = _coordinateHelper__WEBPACK_IMPORTED_MODULE_4__["CoordinateHelper"].rttToCanvasSpace(rtt.x, rtt.y);
|
46798
|
+
pivot = new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__["Vector2"](canvas.x, canvas.y);
|
48190
46799
|
}
|
48191
46800
|
else {
|
48192
46801
|
pivot = _this.state.canvasBounds.center;
|
@@ -48204,18 +46813,17 @@ var GuiGizmoComponent = /** @class */ (function (_super) {
|
|
48204
46813
|
_this.setState({ isRotating: true });
|
48205
46814
|
};
|
48206
46815
|
_this.props.globalState.guiGizmo = _this;
|
48207
|
-
_this._responsive =
|
48208
|
-
_this._matrixCache = [_babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_1__["Matrix2D"].Identity(), _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_1__["Matrix2D"].Identity(), _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_1__["Matrix2D"].Identity(), _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_1__["Matrix2D"].Identity()];
|
46816
|
+
_this._responsive = _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__["DataStorage"].ReadBoolean("Responsive", true);
|
48209
46817
|
var scalePoints = [];
|
48210
46818
|
for (var vertical = ScalePointPosition.Top; vertical <= ScalePointPosition.Bottom; vertical++) {
|
48211
46819
|
for (var horizontal = ScalePointPosition.Left; horizontal <= ScalePointPosition.Right; horizontal++) {
|
48212
46820
|
var isPivot = horizontal === ScalePointPosition.Center && vertical === ScalePointPosition.Center;
|
48213
|
-
scalePoints.push({ position: new
|
46821
|
+
scalePoints.push({ position: new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__["Vector2"](), horizontalPosition: horizontal, verticalPosition: vertical, rotation: 0, isPivot: isPivot });
|
48214
46822
|
}
|
48215
46823
|
}
|
48216
|
-
_this._localBounds = new Rect(0, 0, 0, 0);
|
46824
|
+
_this._localBounds = new _coordinateHelper__WEBPACK_IMPORTED_MODULE_4__["Rect"](0, 0, 0, 0);
|
48217
46825
|
_this.state = {
|
48218
|
-
canvasBounds: new Rect(0, 0, 0, 0),
|
46826
|
+
canvasBounds: new _coordinateHelper__WEBPACK_IMPORTED_MODULE_4__["Rect"](0, 0, 0, 0),
|
48219
46827
|
scalePoints: scalePoints,
|
48220
46828
|
scalePointDragging: -1,
|
48221
46829
|
isRotating: false
|
@@ -48243,11 +46851,11 @@ var GuiGizmoComponent = /** @class */ (function (_super) {
|
|
48243
46851
|
if (selectedGuiNodes.length > 0 && (force || this.state.scalePointDragging !== -1)) {
|
48244
46852
|
// Calculating the offsets for each scale point.
|
48245
46853
|
var half_1 = 1 / 2;
|
48246
|
-
var canvasBounds_1 = new Rect(Number.MAX_VALUE, Number.MAX_VALUE, 0, 0);
|
46854
|
+
var canvasBounds_1 = new _coordinateHelper__WEBPACK_IMPORTED_MODULE_4__["Rect"](Number.MAX_VALUE, Number.MAX_VALUE, 0, 0);
|
48247
46855
|
selectedGuiNodes.forEach(function (node) {
|
48248
|
-
var localBounds =
|
46856
|
+
var localBounds = _coordinateHelper__WEBPACK_IMPORTED_MODULE_4__["CoordinateHelper"].computeLocalBounds(node);
|
48249
46857
|
_this.state.scalePoints.forEach(function (scalePoint) {
|
48250
|
-
var nodeSpace = new
|
46858
|
+
var nodeSpace = new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__["Vector2"]();
|
48251
46859
|
switch (scalePoint.horizontalPosition) {
|
48252
46860
|
case ScalePointPosition.Left:
|
48253
46861
|
nodeSpace.x = localBounds.left;
|
@@ -48277,8 +46885,8 @@ var GuiGizmoComponent = /** @class */ (function (_super) {
|
|
48277
46885
|
nodeSpace.x = node.widthInPixels * half_1 * pivotX;
|
48278
46886
|
nodeSpace.y = node.heightInPixels * half_1 * pivotY;
|
48279
46887
|
}
|
48280
|
-
var rtt =
|
48281
|
-
var canvas =
|
46888
|
+
var rtt = _coordinateHelper__WEBPACK_IMPORTED_MODULE_4__["CoordinateHelper"].nodeToRTTSpace(node, nodeSpace.x, nodeSpace.y, undefined);
|
46889
|
+
var canvas = _coordinateHelper__WEBPACK_IMPORTED_MODULE_4__["CoordinateHelper"].rttToCanvasSpace(rtt.x, rtt.y);
|
48282
46890
|
if (canvas.x < canvasBounds_1.left) {
|
48283
46891
|
canvasBounds_1.left = canvas.x;
|
48284
46892
|
}
|
@@ -48295,7 +46903,7 @@ var GuiGizmoComponent = /** @class */ (function (_super) {
|
|
48295
46903
|
if (selectedGuiNodes.length === 1) {
|
48296
46904
|
scalePoint.position.x = canvas.x;
|
48297
46905
|
scalePoint.position.y = canvas.y;
|
48298
|
-
scalePoint.rotation =
|
46906
|
+
scalePoint.rotation = _coordinateHelper__WEBPACK_IMPORTED_MODULE_4__["CoordinateHelper"].getRotation(node) * (180 / Math.PI);
|
48299
46907
|
}
|
48300
46908
|
});
|
48301
46909
|
});
|
@@ -48336,178 +46944,6 @@ var GuiGizmoComponent = /** @class */ (function (_super) {
|
|
48336
46944
|
this.forceUpdate();
|
48337
46945
|
}
|
48338
46946
|
};
|
48339
|
-
GuiGizmoComponent.prototype._resetMatrixArray = function () {
|
48340
|
-
this._matrixCache.forEach(function (matrix) {
|
48341
|
-
_babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_1__["Matrix2D"].IdentityToRef(matrix);
|
48342
|
-
});
|
48343
|
-
};
|
48344
|
-
/**
|
48345
|
-
* This function calculates a local matrix for a node, including it's full transformation and pivot point
|
48346
|
-
*
|
48347
|
-
* @param node the node to calculate the matrix for
|
48348
|
-
* @param useStoredValues should the stored (cached) values be used to calculate the matrix
|
48349
|
-
* @returns a new matrix for the control
|
48350
|
-
*/
|
48351
|
-
GuiGizmoComponent.prototype._getNodeMatrix = function (node, useStoredValues) {
|
48352
|
-
var size = this.props.globalState.guiTexture.getSize();
|
48353
|
-
// parent should always be defined, but stay safe
|
48354
|
-
var parentWidth = node.parent ? node.parent._currentMeasure.width : size.width;
|
48355
|
-
var parentHeight = node.parent ? node.parent._currentMeasure.height : size.height;
|
48356
|
-
var x = 0;
|
48357
|
-
var y = 0;
|
48358
|
-
var width = useStoredValues ? this._initW : node.widthInPixels;
|
48359
|
-
var height = useStoredValues ? this._initH : node.heightInPixels;
|
48360
|
-
var left = useStoredValues ? this._initX : node.leftInPixels;
|
48361
|
-
var top = useStoredValues ? this._initY : node.topInPixels;
|
48362
|
-
switch (node.horizontalAlignment) {
|
48363
|
-
case _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_1__["Control"].HORIZONTAL_ALIGNMENT_LEFT:
|
48364
|
-
x = -(parentWidth - width) / 2;
|
48365
|
-
break;
|
48366
|
-
case _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_1__["Control"].HORIZONTAL_ALIGNMENT_RIGHT:
|
48367
|
-
x = (parentWidth - width) / 2;
|
48368
|
-
break;
|
48369
|
-
case _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_1__["Control"].HORIZONTAL_ALIGNMENT_CENTER:
|
48370
|
-
x = 0;
|
48371
|
-
break;
|
48372
|
-
}
|
48373
|
-
switch (node.verticalAlignment) {
|
48374
|
-
case _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_1__["Control"].VERTICAL_ALIGNMENT_TOP:
|
48375
|
-
y = -(parentHeight - height) / 2;
|
48376
|
-
break;
|
48377
|
-
case _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_1__["Control"].VERTICAL_ALIGNMENT_BOTTOM:
|
48378
|
-
y = (parentHeight - height) / 2;
|
48379
|
-
break;
|
48380
|
-
case _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_1__["Control"].VERTICAL_ALIGNMENT_CENTER:
|
48381
|
-
y = 0;
|
48382
|
-
break;
|
48383
|
-
}
|
48384
|
-
this._resetMatrixArray();
|
48385
|
-
var m2d = this._matrixCache[0];
|
48386
|
-
var translateTo = this._matrixCache[1];
|
48387
|
-
// as this is used later it needs to persist
|
48388
|
-
var resultMatrix = _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_1__["Matrix2D"].Identity();
|
48389
|
-
// the pivot point around which the object transforms
|
48390
|
-
var offsetX = width * node.transformCenterX - width / 2;
|
48391
|
-
var offsetY = height * node.transformCenterY - height / 2;
|
48392
|
-
// pivot changes this point's position! but only in legacy pivot mode
|
48393
|
-
if (!node.descendantsOnlyPadding) {
|
48394
|
-
// TODO - padding needs to also take scaling into account?
|
48395
|
-
offsetX -= ((node.paddingRightInPixels - node.paddingLeftInPixels) * 1) / 2;
|
48396
|
-
offsetY -= ((node.paddingBottomInPixels - node.paddingTopInPixels) * 1) / 2;
|
48397
|
-
}
|
48398
|
-
// Set the translation
|
48399
|
-
_babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_1__["Matrix2D"].TranslationToRef(x + left, y + top, translateTo);
|
48400
|
-
// without parents scaling and rotation, calculate world matrix for each
|
48401
|
-
var rotation = this.getRotation(node, true);
|
48402
|
-
var scaling = this.getScale(node, true);
|
48403
|
-
// COmpose doesn't actually translate, but creates a form of pivot in a specific position
|
48404
|
-
_babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_1__["Matrix2D"].ComposeToRef(-offsetX, -offsetY, rotation, scaling.x, scaling.y, null, m2d);
|
48405
|
-
// actually compose the matrix
|
48406
|
-
resultMatrix.multiplyToRef(m2d, resultMatrix);
|
48407
|
-
resultMatrix.multiplyToRef(translateTo, resultMatrix);
|
48408
|
-
return resultMatrix;
|
48409
|
-
};
|
48410
|
-
/**
|
48411
|
-
* Using the node's tree, calculate its world matrix and return it
|
48412
|
-
* @param node the node to calculate the matrix for
|
48413
|
-
* @param useStoredValuesIfPossible used stored valued (cached when pointer down is clicked)
|
48414
|
-
* @returns the world matrix for this node
|
48415
|
-
*/
|
48416
|
-
GuiGizmoComponent.prototype._nodeToRTTWorldMatrix = function (node, useStoredValuesIfPossible) {
|
48417
|
-
var _this = this;
|
48418
|
-
var listOfNodes = [node];
|
48419
|
-
var parent = node.parent;
|
48420
|
-
var child = node;
|
48421
|
-
while (parent) {
|
48422
|
-
if (parent.typeName === "Grid") {
|
48423
|
-
var cellInfo = parent.getChildCellInfo(child);
|
48424
|
-
var cell = parent.cells[cellInfo];
|
48425
|
-
listOfNodes.push(cell);
|
48426
|
-
}
|
48427
|
-
listOfNodes.push(parent);
|
48428
|
-
child = parent;
|
48429
|
-
parent = parent.parent;
|
48430
|
-
}
|
48431
|
-
this._resetMatrixArray();
|
48432
|
-
var matrices = listOfNodes.map(function (node, index) { return _this._getNodeMatrix(node, index === 0 && _this.state.scalePointDragging !== -1 && useStoredValuesIfPossible); });
|
48433
|
-
return matrices.reduce(function (acc, cur) {
|
48434
|
-
acc.multiplyToRef(cur, acc);
|
48435
|
-
return acc;
|
48436
|
-
}, this._matrixCache[2]);
|
48437
|
-
};
|
48438
|
-
GuiGizmoComponent.prototype._nodeToRTTSpace = function (node, x, y, reference, useStoredValuesIfPossible) {
|
48439
|
-
if (reference === void 0) { reference = new _babylonjs_core_Maths_math_axis__WEBPACK_IMPORTED_MODULE_2__["Vector2"](); }
|
48440
|
-
var worldMatrix = this._nodeToRTTWorldMatrix(node, useStoredValuesIfPossible);
|
48441
|
-
worldMatrix.transformCoordinates(x, y, reference);
|
48442
|
-
// round
|
48443
|
-
reference.x = round(reference.x);
|
48444
|
-
reference.y = round(reference.y);
|
48445
|
-
return reference;
|
48446
|
-
};
|
48447
|
-
GuiGizmoComponent.prototype._rttToLocalNodeSpace = function (node, x, y, reference, useStoredValuesIfPossible) {
|
48448
|
-
if (reference === void 0) { reference = new _babylonjs_core_Maths_math_axis__WEBPACK_IMPORTED_MODULE_2__["Vector2"](); }
|
48449
|
-
var worldMatrix = this._nodeToRTTWorldMatrix(node, useStoredValuesIfPossible);
|
48450
|
-
var inv = this._matrixCache[3];
|
48451
|
-
worldMatrix.invertToRef(inv);
|
48452
|
-
inv.transformCoordinates(x, y, reference);
|
48453
|
-
// round
|
48454
|
-
reference.x = round(reference.x);
|
48455
|
-
reference.y = round(reference.y);
|
48456
|
-
return reference;
|
48457
|
-
};
|
48458
|
-
GuiGizmoComponent.prototype._rttToCanvasSpace = function (x, y) {
|
48459
|
-
var tmpVec = new _babylonjs_core_Maths_math_axis__WEBPACK_IMPORTED_MODULE_2__["Vector3"](x, 0, -y);
|
48460
|
-
// Get the final projection in view space
|
48461
|
-
var camera = this.props.globalState.workbench._camera;
|
48462
|
-
var scene = this.props.globalState.workbench._scene;
|
48463
|
-
var engine = scene.getEngine();
|
48464
|
-
// TODO - to ref
|
48465
|
-
var projected = _babylonjs_core_Maths_math_axis__WEBPACK_IMPORTED_MODULE_2__["Vector3"].Project(tmpVec, _babylonjs_core_Maths_math_axis__WEBPACK_IMPORTED_MODULE_2__["Matrix"].Identity(), scene.getTransformMatrix(), camera.viewport.toGlobal(engine.getRenderWidth(), engine.getRenderHeight()));
|
48466
|
-
// round to 1 decimal points
|
48467
|
-
projected.x = round(projected.x);
|
48468
|
-
projected.y = round(projected.y);
|
48469
|
-
return projected;
|
48470
|
-
};
|
48471
|
-
GuiGizmoComponent.prototype._mousePointerToRTTSpace = function (node, x, y) {
|
48472
|
-
var camera = this.props.globalState.workbench._camera;
|
48473
|
-
var scene = this.props.globalState.workbench._scene;
|
48474
|
-
var newPosition = this.props.globalState.workbench.getPosition(scene, camera, this._plane, x !== null && x !== void 0 ? x : scene.pointerX, y || scene.pointerY);
|
48475
|
-
newPosition.z *= -1;
|
48476
|
-
return new _babylonjs_core_Maths_math_axis__WEBPACK_IMPORTED_MODULE_2__["Vector2"](round(newPosition.x), round(newPosition.z));
|
48477
|
-
};
|
48478
|
-
/**
|
48479
|
-
* Get the scaling of a specific GUI control
|
48480
|
-
* @param node the node for which we are getting the scaling
|
48481
|
-
* @param relative should we return only the relative scaling (relative to the parent)
|
48482
|
-
* @returns an X,Y vector of the scaling
|
48483
|
-
*/
|
48484
|
-
GuiGizmoComponent.prototype.getScale = function (node, relative) {
|
48485
|
-
var x = node.scaleX;
|
48486
|
-
var y = node.scaleY;
|
48487
|
-
if (relative) {
|
48488
|
-
return new _babylonjs_core_Maths_math_axis__WEBPACK_IMPORTED_MODULE_2__["Vector2"](x, y);
|
48489
|
-
}
|
48490
|
-
var parent = node.parent;
|
48491
|
-
while (parent) {
|
48492
|
-
x *= parent.scaleX;
|
48493
|
-
y *= parent.scaleY;
|
48494
|
-
parent = parent.parent;
|
48495
|
-
}
|
48496
|
-
return new _babylonjs_core_Maths_math_axis__WEBPACK_IMPORTED_MODULE_2__["Vector2"](x, y);
|
48497
|
-
};
|
48498
|
-
GuiGizmoComponent.prototype.getRotation = function (node, relative) {
|
48499
|
-
// Gets rotate of a control account for all of it's parents rotations
|
48500
|
-
var rotation = node.rotation;
|
48501
|
-
if (relative) {
|
48502
|
-
return rotation;
|
48503
|
-
}
|
48504
|
-
var parent = node.parent;
|
48505
|
-
while (parent) {
|
48506
|
-
rotation += parent.rotation;
|
48507
|
-
parent = parent.parent;
|
48508
|
-
}
|
48509
|
-
return rotation;
|
48510
|
-
};
|
48511
46947
|
GuiGizmoComponent.prototype.onUp = function (evt) {
|
48512
46948
|
this._onUp(evt);
|
48513
46949
|
};
|
@@ -48520,22 +46956,19 @@ var GuiGizmoComponent = /** @class */ (function (_super) {
|
|
48520
46956
|
y: (x - centerX) * Math.sin(angle) + (y - centerY) * Math.cos(angle) + centerY,
|
48521
46957
|
};
|
48522
46958
|
};
|
48523
|
-
GuiGizmoComponent.prototype._computeLocalBounds = function (node) {
|
48524
|
-
return new Rect(-node.widthInPixels * 0.5, -node.heightInPixels * 0.5, node.widthInPixels * 0.5, node.heightInPixels * 0.5);
|
48525
|
-
};
|
48526
46959
|
GuiGizmoComponent.prototype._dragLocalBounds = function (toPosition) {
|
48527
46960
|
var scalePoint = this.state.scalePoints[this.state.scalePointDragging];
|
48528
46961
|
if (scalePoint.horizontalPosition === ScalePointPosition.Left) {
|
48529
|
-
this._localBounds.left = toPosition.x;
|
46962
|
+
this._localBounds.left = Math.min(this._localBounds.right, toPosition.x);
|
48530
46963
|
}
|
48531
46964
|
if (scalePoint.horizontalPosition === ScalePointPosition.Right) {
|
48532
|
-
this._localBounds.right = toPosition.x;
|
46965
|
+
this._localBounds.right = Math.max(this._localBounds.left, toPosition.x);
|
48533
46966
|
}
|
48534
46967
|
if (scalePoint.verticalPosition === ScalePointPosition.Left) {
|
48535
|
-
this._localBounds.top = toPosition.y;
|
46968
|
+
this._localBounds.top = Math.min(this._localBounds.bottom, toPosition.y);
|
48536
46969
|
}
|
48537
46970
|
if (scalePoint.verticalPosition === ScalePointPosition.Bottom) {
|
48538
|
-
this._localBounds.bottom = toPosition.y;
|
46971
|
+
this._localBounds.bottom = Math.max(this._localBounds.top, toPosition.y);
|
48539
46972
|
}
|
48540
46973
|
};
|
48541
46974
|
GuiGizmoComponent.prototype._updateNodeFromLocalBounds = function (node, scalePointIndex) {
|
@@ -48545,8 +46978,8 @@ var GuiGizmoComponent = /** @class */ (function (_super) {
|
|
48545
46978
|
var left = scalePoint.horizontalPosition === ScalePointPosition.Left && scalePoint.verticalPosition !== ScalePointPosition.Center;
|
48546
46979
|
var top = scalePoint.verticalPosition === ScalePointPosition.Top && scalePoint.horizontalPosition !== ScalePointPosition.Center;
|
48547
46980
|
// calculate the center point
|
48548
|
-
var localRotation =
|
48549
|
-
var localScaling =
|
46981
|
+
var localRotation = _coordinateHelper__WEBPACK_IMPORTED_MODULE_4__["CoordinateHelper"].getRotation(node, true);
|
46982
|
+
var localScaling = _coordinateHelper__WEBPACK_IMPORTED_MODULE_4__["CoordinateHelper"].getScale(node, true);
|
48550
46983
|
var absoluteCenter = this._localBounds.center;
|
48551
46984
|
var center = absoluteCenter.clone();
|
48552
46985
|
// move to pivot
|
@@ -48555,8 +46988,8 @@ var GuiGizmoComponent = /** @class */ (function (_super) {
|
|
48555
46988
|
var sinRotation = Math.sin(localRotation);
|
48556
46989
|
var cosRotation180 = Math.cos(localRotation + Math.PI);
|
48557
46990
|
var sinRotation180 = Math.sin(localRotation + Math.PI);
|
48558
|
-
var widthDelta = (this.
|
48559
|
-
var heightDelta = (this.
|
46991
|
+
var widthDelta = (this._storedValues.width - width) * 0.5;
|
46992
|
+
var heightDelta = (this._storedValues.height - height) * 0.5;
|
48560
46993
|
// alignment compensation
|
48561
46994
|
switch (node.horizontalAlignment) {
|
48562
46995
|
case _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_1__["Control"].HORIZONTAL_ALIGNMENT_LEFT:
|
@@ -48581,8 +47014,8 @@ var GuiGizmoComponent = /** @class */ (function (_super) {
|
|
48581
47014
|
// rotate the center around 0,0
|
48582
47015
|
var rotatedCenter = this._rotate(center.x, center.y, 0, 0, localRotation);
|
48583
47016
|
// round the values and set them
|
48584
|
-
node.leftInPixels = round(this.
|
48585
|
-
node.topInPixels = round(this.
|
47017
|
+
node.leftInPixels = round(this._storedValues.left + rotatedCenter.x);
|
47018
|
+
node.topInPixels = round(this._storedValues.top + rotatedCenter.y);
|
48586
47019
|
node.widthInPixels = round(Math.max(10, width));
|
48587
47020
|
node.heightInPixels = round(Math.max(10, height));
|
48588
47021
|
if (node.typeName === "Image") {
|
@@ -48653,11 +47086,16 @@ var GuiGizmoComponent = /** @class */ (function (_super) {
|
|
48653
47086
|
};
|
48654
47087
|
return (react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { key: index, style: style, className: "scale-point-container" },
|
48655
47088
|
react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "rotate-click-area", onPointerDown: function () { return _this._beginRotate(); }, style: rotateClickAreaStyle }),
|
48656
|
-
react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "scale-click-area", draggable: true, onDragStart: function (evt) { return evt.preventDefault(); }, onPointerDown: function () {
|
48657
|
-
|
47089
|
+
react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "scale-click-area", draggable: true, onDragStart: function (evt) { return evt.preventDefault(); }, onPointerDown: function (event) {
|
47090
|
+
// if left mouse button down
|
47091
|
+
if (event.buttons & 1) {
|
47092
|
+
_this._beginDraggingScalePoint(index);
|
47093
|
+
}
|
48658
47094
|
}, onPointerUp: _this._onUp, style: scaleClickAreaStyle }),
|
48659
|
-
react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "scale-point", draggable: true, onDragStart: function (evt) { return evt.preventDefault(); }, onPointerDown: function () {
|
48660
|
-
|
47095
|
+
react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { className: "scale-point", draggable: true, onDragStart: function (evt) { return evt.preventDefault(); }, onPointerDown: function (event) {
|
47096
|
+
if (event.buttons & 1) {
|
47097
|
+
_this._beginDraggingScalePoint(index);
|
47098
|
+
}
|
48661
47099
|
}, onPointerUp: _this._onUp, style: { cursor: cursor } })));
|
48662
47100
|
})));
|
48663
47101
|
};
|
@@ -48688,11 +47126,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
48688
47126
|
/* harmony import */ var _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babylonjs/core/Maths/math.vector */ "@babylonjs/core/Misc/observable");
|
48689
47127
|
/* harmony import */ var _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__);
|
48690
47128
|
/* harmony import */ var _tools__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../tools */ "./tools.ts");
|
48691
|
-
/* harmony import */ var _GUIEditorNodeMaterial__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./GUIEditorNodeMaterial */ "./diagram/GUIEditorNodeMaterial.ts");
|
48692
|
-
|
48693
|
-
|
48694
|
-
|
48695
|
-
|
48696
47129
|
|
48697
47130
|
|
48698
47131
|
|
@@ -48737,12 +47170,20 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
48737
47170
|
_this._isOverGUINode = [];
|
48738
47171
|
_this._clipboard = [];
|
48739
47172
|
_this._selectAll = false;
|
48740
|
-
_this._cameraMaxRadiasFactor = 16384; // 2^13
|
48741
47173
|
_this._mainSelection = null;
|
48742
47174
|
_this._selectionDepth = 0;
|
48743
47175
|
_this._doubleClick = null;
|
48744
47176
|
_this._lockMainSelection = false;
|
48745
47177
|
_this._liveGuiTextureRerender = true;
|
47178
|
+
_this._anyControlClicked = true;
|
47179
|
+
_this._nextLiveGuiRender = -1;
|
47180
|
+
_this._liveGuiRerenderDelay = 100;
|
47181
|
+
_this._defaultGUISize = { width: 1024, height: 1024 };
|
47182
|
+
_this._initialPanningOffset = new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Vector2"](0, 0);
|
47183
|
+
_this._panningOffset = new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Vector2"](0, 0);
|
47184
|
+
_this._zoomFactor = 1;
|
47185
|
+
_this._zoomModeIncrement = 0.2;
|
47186
|
+
_this._guiSize = _this._defaultGUISize;
|
48746
47187
|
_this.keyEvent = function (evt) {
|
48747
47188
|
_this._ctrlKeyIsPressed = evt.ctrlKey;
|
48748
47189
|
_this._altKeyIsPressed = evt.altKey;
|
@@ -48845,7 +47286,7 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
48845
47286
|
_this._canvas.style.cursor = "grab";
|
48846
47287
|
}
|
48847
47288
|
_this.updateHitTest(_this.globalState.guiTexture.getChildren()[0], _this._forceSelecting);
|
48848
|
-
|
47289
|
+
// this.artBoardBackground.isHitTestVisible = true;
|
48849
47290
|
});
|
48850
47291
|
props.globalState.onSelectionButtonObservable.add(function () {
|
48851
47292
|
_this._forceSelecting = !_this._forceSelecting;
|
@@ -48853,7 +47294,7 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
48853
47294
|
_this._forceZooming = false;
|
48854
47295
|
_this._canvas.style.cursor = "default";
|
48855
47296
|
_this.updateHitTest(_this.globalState.guiTexture.getChildren()[0], _this._forceSelecting);
|
48856
|
-
|
47297
|
+
// this.artBoardBackground.isHitTestVisible = true;
|
48857
47298
|
});
|
48858
47299
|
props.globalState.onZoomObservable.add(function () {
|
48859
47300
|
_this._forceZooming = !_this._forceZooming;
|
@@ -48866,16 +47307,13 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
48866
47307
|
_this._canvas.style.cursor = "zoom-in";
|
48867
47308
|
}
|
48868
47309
|
_this.updateHitTest(_this.globalState.guiTexture.getChildren()[0], _this._forceSelecting);
|
48869
|
-
|
47310
|
+
// this.artBoardBackground.isHitTestVisible = true;
|
48870
47311
|
});
|
48871
47312
|
props.globalState.onFitToWindowObservable.add(function () {
|
48872
|
-
_this.
|
48873
|
-
|
48874
|
-
|
48875
|
-
|
48876
|
-
_this._camera.radius = _this._cameraRadias;
|
48877
|
-
_this._camera.target = _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Vector3"].Zero();
|
48878
|
-
}
|
47313
|
+
_this._panningOffset = new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Vector2"](0, 0);
|
47314
|
+
var xFactor = _this._engine.getRenderWidth() / _this.guiSize.width;
|
47315
|
+
var yFactor = _this._engine.getRenderHeight() / _this.guiSize.height;
|
47316
|
+
_this._zoomFactor = Math.min(xFactor, yFactor) * 0.9;
|
48879
47317
|
});
|
48880
47318
|
props.globalState.onOutlinesObservable.add(function () {
|
48881
47319
|
_this._outlines = !_this._outlines;
|
@@ -48892,11 +47330,73 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
48892
47330
|
_this.props.globalState.hostDocument.defaultView.addEventListener("blur", _this.blurEvent, false);
|
48893
47331
|
props.globalState.onWindowResizeObservable.add(function () {
|
48894
47332
|
_this.props.globalState.onGizmoUpdateRequireObservable.notifyObservers();
|
47333
|
+
_this.props.globalState.onArtBoardUpdateRequiredObservable.notifyObservers();
|
48895
47334
|
_this._engine.resize();
|
48896
47335
|
});
|
48897
47336
|
_this.props.globalState.workbench = _this;
|
48898
47337
|
return _this;
|
48899
47338
|
}
|
47339
|
+
Object.defineProperty(WorkbenchComponent.prototype, "visibleRegionContainer", {
|
47340
|
+
get: function () {
|
47341
|
+
return this._visibleRegionContainer;
|
47342
|
+
},
|
47343
|
+
enumerable: false,
|
47344
|
+
configurable: true
|
47345
|
+
});
|
47346
|
+
Object.defineProperty(WorkbenchComponent.prototype, "trueRootContainer", {
|
47347
|
+
get: function () {
|
47348
|
+
return this._trueRootContainer;
|
47349
|
+
},
|
47350
|
+
set: function (value) {
|
47351
|
+
var _this = this;
|
47352
|
+
if (value === this._trueRootContainer)
|
47353
|
+
return;
|
47354
|
+
this._visibleRegionContainer.children.forEach(function (child) { return _this._visibleRegionContainer.removeControl(child); });
|
47355
|
+
this._visibleRegionContainer.addControl(value);
|
47356
|
+
this._trueRootContainer = value;
|
47357
|
+
this._trueRootContainer.isPointerBlocker = false;
|
47358
|
+
value._host = this.props.globalState.guiTexture;
|
47359
|
+
},
|
47360
|
+
enumerable: false,
|
47361
|
+
configurable: true
|
47362
|
+
});
|
47363
|
+
Object.defineProperty(WorkbenchComponent.prototype, "guiSize", {
|
47364
|
+
get: function () {
|
47365
|
+
return this._guiSize;
|
47366
|
+
},
|
47367
|
+
// sets the size of the GUI and makes all neccessary adjustments
|
47368
|
+
set: function (value) {
|
47369
|
+
this._guiSize = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, value);
|
47370
|
+
this._visibleRegionContainer.widthInPixels = this._guiSize.width;
|
47371
|
+
this._visibleRegionContainer.heightInPixels = this._guiSize.height;
|
47372
|
+
this.globalState.onResizeObservable.notifyObservers(this._guiSize);
|
47373
|
+
this.globalState.onFitToWindowObservable.notifyObservers();
|
47374
|
+
this.globalState.onArtBoardUpdateRequiredObservable.notifyObservers();
|
47375
|
+
},
|
47376
|
+
enumerable: false,
|
47377
|
+
configurable: true
|
47378
|
+
});
|
47379
|
+
WorkbenchComponent.prototype.applyEditorTransformation = function () {
|
47380
|
+
var adt = this.globalState.guiTexture;
|
47381
|
+
if (adt._rootContainer != this._panAndZoomContainer) {
|
47382
|
+
adt._rootContainer = this._panAndZoomContainer;
|
47383
|
+
this._visibleRegionContainer.addControl(this._trueRootContainer);
|
47384
|
+
}
|
47385
|
+
if (adt.getSize().width !== this._engine.getRenderWidth() || adt.getSize().height !== this._engine.getRenderHeight()) {
|
47386
|
+
adt.scaleTo(this._engine.getRenderWidth(), this._engine.getRenderHeight());
|
47387
|
+
}
|
47388
|
+
this._trueRootContainer.clipContent = false;
|
47389
|
+
this._trueRootContainer.clipChildren = false;
|
47390
|
+
};
|
47391
|
+
WorkbenchComponent.prototype.removeEditorTransformation = function () {
|
47392
|
+
var adt = this.globalState.guiTexture;
|
47393
|
+
if (adt._rootContainer != this._trueRootContainer) {
|
47394
|
+
this._visibleRegionContainer.removeControl(this._trueRootContainer);
|
47395
|
+
adt._rootContainer = this._trueRootContainer;
|
47396
|
+
}
|
47397
|
+
this._trueRootContainer.clipContent = true;
|
47398
|
+
this._trueRootContainer.clipChildren = true;
|
47399
|
+
};
|
48900
47400
|
Object.defineProperty(WorkbenchComponent.prototype, "globalState", {
|
48901
47401
|
get: function () {
|
48902
47402
|
return this.props.globalState;
|
@@ -48951,7 +47451,7 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
48951
47451
|
selection = this._getParentWithDepth(selection);
|
48952
47452
|
}
|
48953
47453
|
else {
|
48954
|
-
selection = this._getMaxParent(selection, this.
|
47454
|
+
selection = this._getMaxParent(selection, this.trueRootContainer);
|
48955
47455
|
}
|
48956
47456
|
this._mainSelection = selection;
|
48957
47457
|
}
|
@@ -48975,11 +47475,6 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
48975
47475
|
control.isHitTestVisible = value;
|
48976
47476
|
});
|
48977
47477
|
};
|
48978
|
-
WorkbenchComponent.prototype.setCameraRadius = function () {
|
48979
|
-
var size = this.props.globalState.guiTexture.getSize();
|
48980
|
-
this._cameraRadias = size.width > size.height ? size.width : size.height;
|
48981
|
-
this._cameraRadias += this._cameraRadias - this._cameraRadias / 1.5;
|
48982
|
-
};
|
48983
47478
|
WorkbenchComponent.prototype.copyToClipboard = function () {
|
48984
47479
|
var _this = this;
|
48985
47480
|
this._clipboard = [];
|
@@ -49063,6 +47558,7 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
49063
47558
|
};
|
49064
47559
|
WorkbenchComponent.prototype.loadFromJson = function (serializationObject) {
|
49065
47560
|
var _a;
|
47561
|
+
this.removeEditorTransformation();
|
49066
47562
|
this.globalState.onSelectionChangedObservable.notifyObservers(null);
|
49067
47563
|
if (this.props.globalState.liveGuiTexture) {
|
49068
47564
|
(_a = this.globalState.liveGuiTexture) === null || _a === void 0 ? void 0 : _a.parseContent(serializationObject, true);
|
@@ -49071,6 +47567,8 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
49071
47567
|
else {
|
49072
47568
|
this.globalState.guiTexture.parseContent(serializationObject, true);
|
49073
47569
|
}
|
47570
|
+
this.trueRootContainer = this.props.globalState.guiTexture._rootContainer;
|
47571
|
+
this.guiSize = this.globalState.guiTexture.getSize();
|
49074
47572
|
this.loadToEditor();
|
49075
47573
|
};
|
49076
47574
|
WorkbenchComponent.prototype.loadFromSnippet = function (snippetId) {
|
@@ -49079,6 +47577,7 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
49079
47577
|
return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_b) {
|
49080
47578
|
switch (_b.label) {
|
49081
47579
|
case 0:
|
47580
|
+
this.removeEditorTransformation();
|
49082
47581
|
this.globalState.onSelectionChangedObservable.notifyObservers(null);
|
49083
47582
|
if (!this.props.globalState.liveGuiTexture) return [3 /*break*/, 2];
|
49084
47583
|
return [4 /*yield*/, ((_a = this.globalState.liveGuiTexture) === null || _a === void 0 ? void 0 : _a.parseFromSnippetAsync(snippetId, true))];
|
@@ -49091,6 +47590,8 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
49091
47590
|
_b.sent();
|
49092
47591
|
_b.label = 4;
|
49093
47592
|
case 4:
|
47593
|
+
this.trueRootContainer = this.props.globalState.guiTexture._rootContainer;
|
47594
|
+
this.guiSize = this.globalState.guiTexture.getSize();
|
49094
47595
|
this.loadToEditor();
|
49095
47596
|
if (this.props.globalState.customLoad) {
|
49096
47597
|
this.props.globalState.customLoad.action(this.globalState.guiTexture.snippetId).catch(function (err) {
|
@@ -49105,20 +47606,18 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
49105
47606
|
};
|
49106
47607
|
WorkbenchComponent.prototype.loadToEditor = function () {
|
49107
47608
|
var _this = this;
|
49108
|
-
var size = this.globalState.guiTexture.getSize();
|
49109
|
-
this.resizeGuiTexture(new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Vector2"](size.width, size.height));
|
49110
47609
|
this.globalState.guiTexture.rootContainer.children.forEach(function (guiElement) {
|
49111
47610
|
if (guiElement.name === "Art-Board-Background" && guiElement.typeName === "Rectangle") {
|
49112
|
-
|
47611
|
+
// this.artBoardBackground = guiElement as Rectangle;
|
49113
47612
|
return;
|
49114
47613
|
}
|
49115
47614
|
_this.createNewGuiNode(guiElement);
|
49116
47615
|
});
|
49117
47616
|
if (this.props.globalState.guiTexture.getChildren()[0].children.length) {
|
49118
|
-
this.props.globalState.guiTexture.getChildren()[0].children.unshift(this.props.globalState.workbench.artBoardBackground);
|
47617
|
+
// this.props.globalState.guiTexture.getChildren()[0].children.unshift(this.props.globalState.workbench.artBoardBackground);
|
49119
47618
|
}
|
49120
47619
|
else {
|
49121
|
-
this.props.globalState.guiTexture.getChildren()[0].children.push(this.props.globalState.workbench.artBoardBackground);
|
47620
|
+
// this.props.globalState.guiTexture.getChildren()[0].children.push(this.props.globalState.workbench.artBoardBackground);
|
49122
47621
|
}
|
49123
47622
|
this._isOverGUINode = [];
|
49124
47623
|
};
|
@@ -49136,14 +47635,6 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
49136
47635
|
});
|
49137
47636
|
this.updateHitTestForSelection(value);
|
49138
47637
|
};
|
49139
|
-
WorkbenchComponent.prototype.resizeGuiTexture = function (newvalue) {
|
49140
|
-
this._textureMesh.scaling.x = newvalue.x;
|
49141
|
-
this._textureMesh.scaling.z = newvalue.y;
|
49142
|
-
this.globalState.guiTexture.scaleTo(newvalue.x, newvalue.y);
|
49143
|
-
this.globalState.guiTexture.markAsDirty();
|
49144
|
-
this.globalState.onResizeObservable.notifyObservers(newvalue);
|
49145
|
-
this.globalState.onFitToWindowObservable.notifyObservers();
|
49146
|
-
};
|
49147
47638
|
WorkbenchComponent.prototype.findNodeFromGuiElement = function (guiControl) {
|
49148
47639
|
return this.nodes.filter(function (n) { return n === guiControl; })[0];
|
49149
47640
|
};
|
@@ -49152,7 +47643,7 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
49152
47643
|
this.globalState.liveGuiTexture.addControl(guiElement);
|
49153
47644
|
}
|
49154
47645
|
var newGuiNode = this.createNewGuiNode(guiElement);
|
49155
|
-
this.
|
47646
|
+
this.trueRootContainer.addControl(guiElement);
|
49156
47647
|
return newGuiNode;
|
49157
47648
|
};
|
49158
47649
|
//is the
|
@@ -49172,6 +47663,7 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
49172
47663
|
_this.clicked = false;
|
49173
47664
|
});
|
49174
47665
|
var onPointerDown = guiControl.onPointerDownObservable.add(function (evt) {
|
47666
|
+
_this._anyControlClicked = true;
|
49175
47667
|
if (!_this.isUp || evt.buttonIndex > 0)
|
49176
47668
|
return;
|
49177
47669
|
if (_this._forceSelecting) {
|
@@ -49272,7 +47764,7 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
49272
47764
|
}
|
49273
47765
|
else {
|
49274
47766
|
draggedControlParent.removeControl(draggedControl);
|
49275
|
-
this.
|
47767
|
+
this.trueRootContainer.addControl(draggedControl);
|
49276
47768
|
}
|
49277
47769
|
}
|
49278
47770
|
else {
|
@@ -49362,8 +47854,8 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
49362
47854
|
return true;
|
49363
47855
|
};
|
49364
47856
|
WorkbenchComponent.prototype.convertToPercentage = function (guiControl, includeScale) {
|
49365
|
-
var ratioX = this._textureMesh.scaling.x;
|
49366
|
-
var ratioY = this._textureMesh.scaling.z;
|
47857
|
+
var ratioX = 1; //this._textureMesh.scaling.x;
|
47858
|
+
var ratioY = 1; //this._textureMesh.scaling.z;
|
49367
47859
|
if (guiControl.parent) {
|
49368
47860
|
if (guiControl.parent.typeName === "Grid") {
|
49369
47861
|
var cellInfo = guiControl.parent.getChildCellInfo(guiControl);
|
@@ -49394,7 +47886,7 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
49394
47886
|
};
|
49395
47887
|
WorkbenchComponent.prototype.onMove = function (evt) {
|
49396
47888
|
var _this = this;
|
49397
|
-
var pos = this.
|
47889
|
+
var pos = this.getScaledPointerPosition();
|
49398
47890
|
// Move or guiNodes
|
49399
47891
|
if (this._mouseStartPointX != null && this._mouseStartPointY != null && !this._panning) {
|
49400
47892
|
var x = this._mouseStartPointX;
|
@@ -49402,23 +47894,19 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
49402
47894
|
var selected_1 = false;
|
49403
47895
|
this.selectedGuiNodes.forEach(function (element) {
|
49404
47896
|
if (pos) {
|
49405
|
-
selected_1 = _this._onMove(element, new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Vector2"](pos.x,
|
47897
|
+
selected_1 = _this._onMove(element, new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Vector2"](pos.x, pos.y), new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Vector2"](x, y), false) || selected_1;
|
49406
47898
|
}
|
49407
47899
|
});
|
49408
47900
|
this._mouseStartPointX = pos ? pos.x : this._mouseStartPointX;
|
49409
|
-
this._mouseStartPointY = pos ? pos.
|
47901
|
+
this._mouseStartPointY = pos ? pos.y : this._mouseStartPointY;
|
49410
47902
|
}
|
49411
47903
|
};
|
49412
|
-
WorkbenchComponent.prototype.
|
49413
|
-
var
|
49414
|
-
|
49415
|
-
|
49416
|
-
|
49417
|
-
|
49418
|
-
if (pickinfo === null || pickinfo === void 0 ? void 0 : pickinfo.hit) {
|
49419
|
-
return pickinfo.pickedPoint;
|
49420
|
-
}
|
49421
|
-
return null;
|
47904
|
+
WorkbenchComponent.prototype._screenToTexturePosition = function (screenPos) {
|
47905
|
+
var zoomVector = new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Vector2"](this._zoomFactor, this._zoomFactor);
|
47906
|
+
return screenPos.divideInPlace(zoomVector).add(this._panningOffset);
|
47907
|
+
};
|
47908
|
+
WorkbenchComponent.prototype.getScaledPointerPosition = function () {
|
47909
|
+
return this._screenToTexturePosition(new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Vector2"](this._scene.pointerX, this._scene.pointerY));
|
49422
47910
|
};
|
49423
47911
|
WorkbenchComponent.prototype.onDown = function (evt) {
|
49424
47912
|
var _a;
|
@@ -49429,13 +47917,10 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
49429
47917
|
}
|
49430
47918
|
return;
|
49431
47919
|
}
|
49432
|
-
var pos = this.
|
49433
|
-
if (pos === null && this._forceSelecting && !evt.button) {
|
49434
|
-
this.props.globalState.onSelectionChangedObservable.notifyObservers(null);
|
49435
|
-
}
|
47920
|
+
var pos = this.getScaledPointerPosition();
|
49436
47921
|
if (this._forceSelecting) {
|
49437
47922
|
this._mouseStartPointX = pos ? pos.x : this._mouseStartPointX;
|
49438
|
-
this._mouseStartPointY = pos ?
|
47923
|
+
this._mouseStartPointY = pos ? pos.y : this._mouseStartPointY;
|
49439
47924
|
}
|
49440
47925
|
};
|
49441
47926
|
WorkbenchComponent.prototype.onUp = function (evt) {
|
@@ -49456,61 +47941,66 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
49456
47941
|
// Create our first scene.
|
49457
47942
|
this._scene = new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Scene"](this._engine);
|
49458
47943
|
var clearColor = 204 / 255.0;
|
49459
|
-
this._scene.clearColor = new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Color4"](clearColor, clearColor, clearColor,
|
47944
|
+
this._scene.clearColor = new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Color4"](clearColor, clearColor, clearColor, 0.0);
|
49460
47945
|
var light = new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["HemisphericLight"]("light1", _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Axis"].Y, this._scene);
|
49461
47946
|
light.intensity = 0.9;
|
49462
|
-
|
49463
|
-
this.
|
49464
|
-
this.
|
49465
|
-
this.
|
49466
|
-
this.
|
49467
|
-
this.
|
49468
|
-
this.
|
49469
|
-
this.
|
49470
|
-
this.
|
49471
|
-
this.
|
49472
|
-
this.
|
49473
|
-
|
49474
|
-
|
49475
|
-
|
49476
|
-
|
47947
|
+
this._guiSize = this._defaultGUISize;
|
47948
|
+
this._panAndZoomContainer = new _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_3__["Container"]("panAndZoom");
|
47949
|
+
this._panAndZoomContainer.clipContent = false;
|
47950
|
+
this._panAndZoomContainer.clipChildren = false;
|
47951
|
+
this._visibleRegionContainer = new _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_3__["Container"]("visibleRegion");
|
47952
|
+
this._visibleRegionContainer.clipChildren = false;
|
47953
|
+
this._visibleRegionContainer.clipContent = false;
|
47954
|
+
this._visibleRegionContainer.widthInPixels = this.guiSize.width;
|
47955
|
+
this._visibleRegionContainer.heightInPixels = this.guiSize.height;
|
47956
|
+
this._panAndZoomContainer.addControl(this._visibleRegionContainer);
|
47957
|
+
var adt = this.globalState.guiTexture =
|
47958
|
+
this._visibleRegionContainer._host =
|
47959
|
+
this._panAndZoomContainer._host =
|
47960
|
+
_babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_3__["AdvancedDynamicTexture"].CreateFullscreenUI("guiTexture", true, this._scene, _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Texture"].NEAREST_NEAREST_MIPNEAREST, false);
|
47961
|
+
adt.useInvalidateRectOptimization = false;
|
47962
|
+
this.trueRootContainer = adt.rootContainer;
|
47963
|
+
adt.onEndRenderObservable.add(function () { return _this.props.globalState.onGizmoUpdateRequireObservable.notifyObservers(); });
|
49477
47964
|
this.synchronizeLiveGUI();
|
49478
|
-
|
49479
|
-
|
49480
|
-
|
49481
|
-
this._textureMesh.material = nodeMaterial;
|
49482
|
-
if (nodeMaterial) {
|
49483
|
-
var block = nodeMaterial.getBlockByName("Texture");
|
49484
|
-
block.texture = this.globalState.guiTexture;
|
49485
|
-
}
|
49486
|
-
this.setCameraRadius();
|
49487
|
-
this._camera = new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["ArcRotateCamera"]("Camera", -Math.PI / 2, 0, this._cameraRadias, _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Vector3"].Zero(), this._scene);
|
49488
|
-
this._camera.maxZ = this._cameraMaxRadiasFactor * 2;
|
49489
|
-
// This attaches the camera to the canvas
|
49490
|
-
this.addControls(this._scene, this._camera);
|
47965
|
+
new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["ArcRotateCamera"]("Camera", 0, 0, 0, _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Vector3"].Zero(), this._scene);
|
47966
|
+
// This attaches the mouse controls
|
47967
|
+
this.addControls(this._scene);
|
49491
47968
|
this._scene.getEngine().onCanvasPointerOutObservable.clear();
|
49492
47969
|
this._scene.doNotHandleCursors = true;
|
49493
47970
|
// Watch for browser/canvas resize events
|
49494
47971
|
this.globalState.hostWindow.addEventListener("resize", function () {
|
49495
|
-
_this.
|
47972
|
+
_this.props.globalState.onWindowResizeObservable.notifyObservers();
|
49496
47973
|
});
|
49497
47974
|
this._engine.resize();
|
47975
|
+
this.globalState.guiTexture.onBeginRenderObservable.add(function () {
|
47976
|
+
_this.applyEditorTransformation();
|
47977
|
+
});
|
47978
|
+
this.globalState.onPropertyChangedObservable.add(function (ev) {
|
47979
|
+
ev.object.markAsDirty(false);
|
47980
|
+
});
|
49498
47981
|
// Every time the original ADT re-renders, we must also re-render, so that layout information is computed correctly
|
49499
47982
|
// also, every time *we* re-render (due to a change in the GUI), we must re-render the original ADT
|
49500
47983
|
// to prevent an infite loop, we flip a boolean flag
|
49501
47984
|
if (this.globalState.liveGuiTexture) {
|
49502
47985
|
this._guiRenderObserver = this.globalState.guiTexture.onBeginRenderObservable.add(function () {
|
49503
|
-
var _a;
|
49504
47986
|
if (_this._liveGuiTextureRerender) {
|
49505
|
-
|
47987
|
+
_this._nextLiveGuiRender = Date.now() + _this._liveGuiRerenderDelay;
|
49506
47988
|
}
|
49507
47989
|
_this._liveGuiTextureRerender = true;
|
49508
47990
|
});
|
49509
47991
|
this._liveRenderObserver = this.globalState.liveGuiTexture.onEndRenderObservable.add(function () {
|
49510
47992
|
var _a;
|
47993
|
+
// return the GUI to the editor mode
|
49511
47994
|
(_a = _this.globalState.guiTexture) === null || _a === void 0 ? void 0 : _a.markAsDirty();
|
49512
47995
|
_this._liveGuiTextureRerender = false;
|
49513
47996
|
});
|
47997
|
+
this._scene.onAfterRenderObservable.add(function () {
|
47998
|
+
var _a;
|
47999
|
+
if (_this._nextLiveGuiRender > 0 && Date.now() > _this._nextLiveGuiRender) {
|
48000
|
+
_this._nextLiveGuiRender = -1;
|
48001
|
+
(_a = _this.globalState.liveGuiTexture) === null || _a === void 0 ? void 0 : _a.markAsDirty();
|
48002
|
+
}
|
48003
|
+
});
|
49514
48004
|
}
|
49515
48005
|
this.props.globalState.onErrorMessageDialogRequiredObservable.notifyObservers("Welcome to the GUI Editor Alpha. This editor is still a work in progress. Icons are currently temporary. Please submit feedback using the \"Give feedback\" button in the menu. ");
|
49516
48006
|
this._engine.runRenderLoop(function () {
|
@@ -49518,6 +48008,7 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
49518
48008
|
});
|
49519
48009
|
this.globalState.onNewSceneObservable.notifyObservers(this.globalState.guiTexture.getScene());
|
49520
48010
|
this.globalState.onPropertyGridUpdateRequiredObservable.notifyObservers();
|
48011
|
+
this.props.globalState.onFitToWindowObservable.notifyObservers();
|
49521
48012
|
};
|
49522
48013
|
// removes all controls from both GUIs, and re-adds the controls from the original to the GUI editor
|
49523
48014
|
WorkbenchComponent.prototype.synchronizeLiveGUI = function () {
|
@@ -49532,65 +48023,62 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
49532
48023
|
this.globalState.guiTexture.snippetId = this.globalState.liveGuiTexture.snippetId;
|
49533
48024
|
}
|
49534
48025
|
};
|
49535
|
-
//Add
|
49536
|
-
WorkbenchComponent.prototype.addControls = function (scene
|
48026
|
+
//Add zoom and pan controls
|
48027
|
+
WorkbenchComponent.prototype.addControls = function (scene) {
|
49537
48028
|
var _this = this;
|
49538
|
-
var _a;
|
49539
|
-
|
49540
|
-
|
49541
|
-
|
49542
|
-
camera.upperBetaLimit = Math.PI / 2 - 0.1;
|
49543
|
-
camera.angularSensibilityX = camera.angularSensibilityY = 500;
|
49544
|
-
var plane = _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Plane"].FromPositionAndNormal(_babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Vector3"].Zero(), _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Axis"].Y);
|
49545
|
-
var inertialPanning = _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Vector3"].Zero();
|
49546
|
-
var initialPos = new _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Vector3"](0, 0, 0);
|
49547
|
-
var panningFn = function () {
|
49548
|
-
var pos = _this.getPosition(scene, camera, plane);
|
49549
|
-
_this.panning(pos, initialPos, camera.inertia, inertialPanning);
|
49550
|
-
};
|
49551
|
-
var inertialPanningFn = function () {
|
49552
|
-
if (inertialPanning.x !== 0 || inertialPanning.y !== 0 || inertialPanning.z !== 0) {
|
49553
|
-
camera.target.addInPlace(inertialPanning);
|
49554
|
-
inertialPanning.scaleInPlace(camera.inertia);
|
49555
|
-
_this.zeroIfClose(inertialPanning);
|
49556
|
-
_this.props.globalState.onGizmoUpdateRequireObservable.notifyObservers();
|
49557
|
-
}
|
49558
|
-
};
|
49559
|
-
var wheelPrecisionFn = function () {
|
49560
|
-
camera.wheelPrecision = (1 / camera.radius) * 1000;
|
48029
|
+
var _a, _b, _c, _d;
|
48030
|
+
var zoomFnScrollWheel = function (e) {
|
48031
|
+
var delta = _this.zoomWheel(e);
|
48032
|
+
_this.zooming(1 + (delta / 1000));
|
49561
48033
|
};
|
49562
|
-
var
|
49563
|
-
|
49564
|
-
_this.
|
48034
|
+
var panningFn = function () { return _this.panning(); };
|
48035
|
+
var startPanning = function () {
|
48036
|
+
_this._scene.onPointerObservable.add(panningFn, _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["PointerEventTypes"].POINTERMOVE);
|
48037
|
+
_this._panning = true;
|
48038
|
+
_this._initialPanningOffset = _this.getScaledPointerPosition();
|
48039
|
+
_this._panAndZoomContainer.getDescendants().forEach(function (desc) {
|
48040
|
+
desc.metadata.isPointerBlocker = desc.isPointerBlocker;
|
48041
|
+
desc.isPointerBlocker = false;
|
48042
|
+
});
|
49565
48043
|
};
|
49566
|
-
var
|
49567
|
-
_this.
|
48044
|
+
var endPanning = function () {
|
48045
|
+
_this._panning = false;
|
48046
|
+
_this._panAndZoomContainer.getDescendants().forEach(function (desc) {
|
48047
|
+
if (desc.metadata.isPointerBlocker !== undefined) {
|
48048
|
+
desc.isPointerBlocker = desc.metadata.isPointerBlocker;
|
48049
|
+
delete desc.metadata.isPointerBlocker;
|
48050
|
+
}
|
48051
|
+
});
|
49568
48052
|
};
|
49569
48053
|
var removeObservers = function () {
|
49570
48054
|
scene.onPointerObservable.removeCallback(panningFn);
|
49571
|
-
scene.onPointerObservable.removeCallback(zoomFnMouse);
|
49572
48055
|
};
|
49573
|
-
|
48056
|
+
(_a = this._rootContainer.current) === null || _a === void 0 ? void 0 : _a.addEventListener("wheel", zoomFnScrollWheel);
|
48057
|
+
(_b = this._rootContainer.current) === null || _b === void 0 ? void 0 : _b.addEventListener("pointerdown", function (event) {
|
48058
|
+
console.log(event);
|
49574
48059
|
removeObservers();
|
49575
|
-
if (
|
49576
|
-
|
49577
|
-
scene.onPointerObservable.add(panningFn, _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["PointerEventTypes"].POINTERMOVE);
|
49578
|
-
_this._panning = true;
|
49579
|
-
}
|
49580
|
-
else if (_this._forceZooming) {
|
49581
|
-
initialPos = _this.getPosition(scene, camera, plane);
|
49582
|
-
scene.onPointerObservable.add(zoomFnMouse, _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["PointerEventTypes"].POINTERMOVE);
|
49583
|
-
_this._panning = false;
|
48060
|
+
if (event.button !== 0 || _this._forcePanning) {
|
48061
|
+
startPanning();
|
49584
48062
|
}
|
49585
48063
|
else {
|
49586
|
-
_this.
|
48064
|
+
if (_this._forceZooming) {
|
48065
|
+
_this.zooming(1.0 + (_this._altKeyIsPressed ? -_this._zoomModeIncrement : _this._zoomModeIncrement));
|
48066
|
+
}
|
48067
|
+
endPanning();
|
48068
|
+
// if we click in the scene and we don't hit any controls, deselect all
|
48069
|
+
_this._scene.onAfterRenderObservable.addOnce(function () {
|
48070
|
+
if (!_this._anyControlClicked) {
|
48071
|
+
_this.props.globalState.onSelectionChangedObservable.notifyObservers(null);
|
48072
|
+
}
|
48073
|
+
_this._anyControlClicked = false;
|
48074
|
+
});
|
49587
48075
|
}
|
49588
|
-
}
|
49589
|
-
|
48076
|
+
});
|
48077
|
+
(_c = this._rootContainer.current) === null || _c === void 0 ? void 0 : _c.addEventListener("pointerup", function (event) {
|
49590
48078
|
_this._panning = false;
|
49591
48079
|
removeObservers();
|
49592
48080
|
_this.props.globalState.guiGizmo.onUp();
|
49593
|
-
}
|
48081
|
+
});
|
49594
48082
|
scene.onKeyboardObservable.add(function (k, e) {
|
49595
48083
|
switch (k.event.key) {
|
49596
48084
|
case "s": //select
|
@@ -49620,38 +48108,39 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
49620
48108
|
break;
|
49621
48109
|
}
|
49622
48110
|
}, _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["KeyboardEventTypes"].KEYDOWN);
|
49623
|
-
scene.
|
49624
|
-
_this.
|
49625
|
-
|
49626
|
-
|
49627
|
-
|
48111
|
+
scene.onBeforeRenderObservable.add(function () {
|
48112
|
+
if (_this._panAndZoomContainer.scaleX !== _this._zoomFactor) {
|
48113
|
+
_this._panAndZoomContainer.scaleX = _this._zoomFactor;
|
48114
|
+
_this._panAndZoomContainer.scaleY = _this._zoomFactor;
|
48115
|
+
_this.globalState.onArtBoardUpdateRequiredObservable.notifyObservers();
|
48116
|
+
_this.globalState.onGizmoUpdateRequireObservable.notifyObservers();
|
48117
|
+
}
|
48118
|
+
var left = _this._zoomFactor * _this._panningOffset.x;
|
48119
|
+
var top = _this._zoomFactor * -_this._panningOffset.y;
|
48120
|
+
if (_this._panAndZoomContainer.leftInPixels !== left || _this._panAndZoomContainer.topInPixels !== top) {
|
48121
|
+
_this._panAndZoomContainer.leftInPixels = left;
|
48122
|
+
_this._panAndZoomContainer.topInPixels = top;
|
48123
|
+
_this.globalState.onArtBoardUpdateRequiredObservable.notifyObservers();
|
48124
|
+
_this.globalState.onGizmoUpdateRequireObservable.notifyObservers();
|
48125
|
+
}
|
48126
|
+
});
|
49628
48127
|
// stop context menu showing on canvas right click
|
49629
|
-
(
|
48128
|
+
(_d = scene
|
49630
48129
|
.getEngine()
|
49631
|
-
.getRenderingCanvas()) === null ||
|
48130
|
+
.getRenderingCanvas()) === null || _d === void 0 ? void 0 : _d.addEventListener("contextmenu", function (e) {
|
49632
48131
|
e.preventDefault();
|
49633
48132
|
});
|
49634
48133
|
};
|
49635
|
-
//Get pos on plane
|
49636
|
-
WorkbenchComponent.prototype.getPosition = function (scene, camera, plane, x, y) {
|
49637
|
-
if (x === void 0) { x = scene.pointerX; }
|
49638
|
-
if (y === void 0) { y = scene.pointerY; }
|
49639
|
-
var ray = scene.createPickingRay(x, y, _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Matrix"].Identity(), camera, false);
|
49640
|
-
var distance = ray.intersectsPlane(plane);
|
49641
|
-
//not using this ray again, so modifying its vectors here is fine
|
49642
|
-
return distance !== null ? ray.origin.addInPlace(ray.direction.scaleInPlace(distance)) : _babylonjs_core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_4__["Vector3"].Zero();
|
49643
|
-
};
|
49644
48134
|
//Return offsets for inertial panning given initial and current pointer positions
|
49645
|
-
WorkbenchComponent.prototype.panning = function (
|
49646
|
-
var
|
49647
|
-
|
49648
|
-
|
49649
|
-
|
49650
|
-
|
48135
|
+
WorkbenchComponent.prototype.panning = function () {
|
48136
|
+
var panningDelta = this.getScaledPointerPosition().subtract(this._initialPanningOffset).multiplyByFloats(1, -1);
|
48137
|
+
this._panningOffset = this._panningOffset.add(panningDelta);
|
48138
|
+
this._initialPanningOffset = this.getScaledPointerPosition();
|
48139
|
+
this.props.globalState.onArtBoardUpdateRequiredObservable.notifyObservers();
|
48140
|
+
this.props.globalState.onGizmoUpdateRequireObservable.notifyObservers();
|
49651
48141
|
};
|
49652
|
-
//Get the wheel delta
|
49653
|
-
WorkbenchComponent.prototype.zoomWheel = function (
|
49654
|
-
var event = p.event;
|
48142
|
+
//Get the wheel delta
|
48143
|
+
WorkbenchComponent.prototype.zoomWheel = function (event) {
|
49655
48144
|
event.preventDefault();
|
49656
48145
|
var delta = 0;
|
49657
48146
|
if (event.deltaY) {
|
@@ -49660,37 +48149,11 @@ var WorkbenchComponent = /** @class */ (function (_super) {
|
|
49660
48149
|
else if (event.detail) {
|
49661
48150
|
delta = -event.detail;
|
49662
48151
|
}
|
49663
|
-
delta /= camera.wheelPrecision;
|
49664
48152
|
return delta;
|
49665
48153
|
};
|
49666
48154
|
//Zoom to pointer position. Zoom amount determined by delta
|
49667
|
-
WorkbenchComponent.prototype.zooming = function (delta
|
49668
|
-
|
49669
|
-
var ur = camera.upperRadiusLimit;
|
49670
|
-
if (!lr || !ur) {
|
49671
|
-
return;
|
49672
|
-
}
|
49673
|
-
if (camera.radius - lr < 1 && delta > 0) {
|
49674
|
-
return;
|
49675
|
-
}
|
49676
|
-
else if (ur - camera.radius < 1 && delta < 0) {
|
49677
|
-
return;
|
49678
|
-
}
|
49679
|
-
var inertiaComp = 1 - camera.inertia;
|
49680
|
-
if (camera.radius - (camera.inertialRadiusOffset + delta) / inertiaComp < lr) {
|
49681
|
-
delta = (camera.radius - lr) * inertiaComp - camera.inertialRadiusOffset;
|
49682
|
-
}
|
49683
|
-
else if (camera.radius - (camera.inertialRadiusOffset + delta) / inertiaComp > ur) {
|
49684
|
-
delta = (camera.radius - ur) * inertiaComp - camera.inertialRadiusOffset;
|
49685
|
-
}
|
49686
|
-
var zoomDistance = delta / inertiaComp;
|
49687
|
-
var ratio = zoomDistance / camera.radius;
|
49688
|
-
var vec = this.getPosition(scene, camera, plane);
|
49689
|
-
var directionToZoomLocation = vec.subtract(camera.target);
|
49690
|
-
var offset = directionToZoomLocation.scale(ratio);
|
49691
|
-
offset.scaleInPlace(inertiaComp);
|
49692
|
-
ref.addInPlace(offset);
|
49693
|
-
camera.inertialRadiusOffset += delta;
|
48155
|
+
WorkbenchComponent.prototype.zooming = function (delta) {
|
48156
|
+
this._zoomFactor *= delta;
|
49694
48157
|
};
|
49695
48158
|
//Sets x y or z of passed in vector to zero if less than Epsilon
|
49696
48159
|
WorkbenchComponent.prototype.zeroIfClose = function (vec) {
|
@@ -49768,6 +48231,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
49768
48231
|
/* harmony import */ var _babylonjs_core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babylonjs/core/Misc/observable */ "@babylonjs/core/Misc/observable");
|
49769
48232
|
/* harmony import */ var _babylonjs_core_Misc_observable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babylonjs_core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__);
|
49770
48233
|
/* harmony import */ var _sharedUiComponents_tabs_propertyGrids_lockObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sharedUiComponents/tabs/propertyGrids/lockObject */ "./sharedUiComponents/tabs/propertyGrids/lockObject.ts");
|
48234
|
+
/* harmony import */ var _diagram_coordinateHelper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./diagram/coordinateHelper */ "./diagram/coordinateHelper.tsx");
|
48235
|
+
|
49771
48236
|
|
49772
48237
|
|
49773
48238
|
|
@@ -49812,6 +48277,7 @@ var GlobalState = /** @class */ (function () {
|
|
49812
48277
|
this.onDraggingStartObservable = new _babylonjs_core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]();
|
49813
48278
|
this.onWindowResizeObservable = new _babylonjs_core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]();
|
49814
48279
|
this.onGizmoUpdateRequireObservable = new _babylonjs_core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]();
|
48280
|
+
this.onArtBoardUpdateRequiredObservable = new _babylonjs_core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]();
|
49815
48281
|
this.draggedControl = null;
|
49816
48282
|
this.isSaving = false;
|
49817
48283
|
this.lockObject = new _sharedUiComponents_tabs_propertyGrids_lockObject__WEBPACK_IMPORTED_MODULE_1__["LockObject"]();
|
@@ -49820,6 +48286,7 @@ var GlobalState = /** @class */ (function () {
|
|
49820
48286
|
var g = _babylonjs_core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__["DataStorage"].ReadNumber("BackgroundColorG", 0.09803921568627451);
|
49821
48287
|
var b = _babylonjs_core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__["DataStorage"].ReadNumber("BackgroundColorB", 0.25098039215686274);
|
49822
48288
|
this.backgroundColor = new _babylonjs_core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__["Color4"](r, g, b, 1.0);
|
48289
|
+
_diagram_coordinateHelper__WEBPACK_IMPORTED_MODULE_2__["CoordinateHelper"].globalState = this;
|
49823
48290
|
}
|
49824
48291
|
return GlobalState;
|
49825
48292
|
}());
|
@@ -52595,6 +51062,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
52595
51062
|
/* harmony import */ var _components_sceneExplorer_sceneExplorerComponent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./components/sceneExplorer/sceneExplorerComponent */ "./components/sceneExplorer/sceneExplorerComponent.tsx");
|
52596
51063
|
/* harmony import */ var _components_commandBarComponent__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./components/commandBarComponent */ "./components/commandBarComponent.tsx");
|
52597
51064
|
/* harmony import */ var _diagram_guiGizmo__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./diagram/guiGizmo */ "./diagram/guiGizmo.tsx");
|
51065
|
+
/* harmony import */ var _diagram_artBoard__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./diagram/artBoard */ "./diagram/artBoard.tsx");
|
51066
|
+
|
52598
51067
|
|
52599
51068
|
|
52600
51069
|
|
@@ -52798,6 +51267,7 @@ var WorkbenchEditor = /** @class */ (function (_super) {
|
|
52798
51267
|
}, onDragOver: function (event) {
|
52799
51268
|
event.preventDefault();
|
52800
51269
|
} },
|
51270
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_diagram_artBoard__WEBPACK_IMPORTED_MODULE_12__["ArtBoardComponent"], { globalState: this.props.globalState }),
|
52801
51271
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_diagram_workbench__WEBPACK_IMPORTED_MODULE_7__["WorkbenchComponent"], { ref: "workbenchCanvas", globalState: this.props.globalState }),
|
52802
51272
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_diagram_guiGizmo__WEBPACK_IMPORTED_MODULE_11__["GuiGizmoComponent"], { globalState: this.props.globalState })),
|
52803
51273
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { id: "rightGrab", onPointerDown: function (evt) { return _this.onPointerDown(evt); }, onPointerUp: function (evt) { return _this.onPointerUp(evt); }, onPointerMove: function (evt) { return _this.resizeColumns(evt, false); } }),
|