From dd78294ff85bbcc5ed4a98e25d5b66f166e62575 Mon Sep 17 00:00:00 2001 From: pandrr Date: Wed, 15 May 2024 09:54:21 +0200 Subject: [PATCH] dev changes / new op editorevents --- .../Ops.Array.StringToArray_v2.js | 2 +- .../Ops.Array.StringToArray_v2.json | 2 - .../Ops.Gl.Phong.SpotLight_v5.js | 4 +- .../Ops.Gl.Phong.SpotLight_v5.json | 82 ------------------- .../Ops.Gl.Textures.WebcamTexture_v3.js | 1 + .../Ops.Gl.Textures.WebcamTexture_v3.json | 3 +- ....Graphics.Geometry.GeometryAttributes.json | 2 - .../Ops.Ui.CablesEditorEvents.js | 14 ++++ .../Ops.Ui.CablesEditorEvents.json | 33 ++++++++ 9 files changed, 52 insertions(+), 91 deletions(-) create mode 100644 src/ops/base/Ops.Ui.CablesEditorEvents/Ops.Ui.CablesEditorEvents.js create mode 100644 src/ops/base/Ops.Ui.CablesEditorEvents/Ops.Ui.CablesEditorEvents.json diff --git a/src/ops/base/Ops.Array.StringToArray_v2/Ops.Array.StringToArray_v2.js b/src/ops/base/Ops.Array.StringToArray_v2/Ops.Array.StringToArray_v2.js index 533b97a795..ac34535fa9 100644 --- a/src/ops/base/Ops.Array.StringToArray_v2/Ops.Array.StringToArray_v2.js +++ b/src/ops/base/Ops.Array.StringToArray_v2/Ops.Array.StringToArray_v2.js @@ -69,7 +69,7 @@ function parse() } if (hasStrings) { - op.setUiError("notnum", "Parse Error / Not all values numerical!"); + op.setUiError("notnum", "Parse Error / Not all values numerical!", 1); } } diff --git a/src/ops/base/Ops.Array.StringToArray_v2/Ops.Array.StringToArray_v2.json b/src/ops/base/Ops.Array.StringToArray_v2/Ops.Array.StringToArray_v2.json index 4d12d92644..a5f7649b18 100644 --- a/src/ops/base/Ops.Array.StringToArray_v2/Ops.Array.StringToArray_v2.json +++ b/src/ops/base/Ops.Array.StringToArray_v2/Ops.Array.StringToArray_v2.json @@ -3,8 +3,6 @@ "authorName": "pandur", "created": 1548108515570, "summary": "Parse a string into an array (create, split string, stringToArray)", - - "docs": { "ports": [ { diff --git a/src/ops/base/Ops.Gl.Phong.SpotLight_v5/Ops.Gl.Phong.SpotLight_v5.js b/src/ops/base/Ops.Gl.Phong.SpotLight_v5/Ops.Gl.Phong.SpotLight_v5.js index eb8e623556..23db5e5a59 100644 --- a/src/ops/base/Ops.Gl.Phong.SpotLight_v5/Ops.Gl.Phong.SpotLight_v5.js +++ b/src/ops/base/Ops.Gl.Phong.SpotLight_v5/Ops.Gl.Phong.SpotLight_v5.js @@ -312,8 +312,8 @@ function renderLight() { const blurAmount = 1.5 * inBlur.get() * texelSize; if (inRenderMapActive.get()) newLight.renderPasses(inPolygonOffset.get(), blurAmount, function () { outTrigger.trigger(); }); - outTexture.set(null); - outTexture.set(newLight.getShadowMapDepth()); + // outTexture.set(null); + outTexture.setRef(newLight.getShadowMapDepth()); // remove light from stack and readd it with shadow map & mvp matrix cgl.frameStore.lightStack.pop(); diff --git a/src/ops/base/Ops.Gl.Phong.SpotLight_v5/Ops.Gl.Phong.SpotLight_v5.json b/src/ops/base/Ops.Gl.Phong.SpotLight_v5/Ops.Gl.Phong.SpotLight_v5.json index ae0b7cec68..0c2883b243 100644 --- a/src/ops/base/Ops.Gl.Phong.SpotLight_v5/Ops.Gl.Phong.SpotLight_v5.json +++ b/src/ops/base/Ops.Gl.Phong.SpotLight_v5/Ops.Gl.Phong.SpotLight_v5.json @@ -135,93 +135,11 @@ "group": "Shadow Map Settings", "subType": "boolean" }, - { - "type": 0, - "name": "Map Size index", - "subType": "integer" - }, - { - "type": 5, - "name": "Map Size", - "group": "Shadow Map Settings" - }, { "type": 0, "name": "Shadow Strength", "group": "Shadow Map Settings", "subType": "number" - }, - { - "type": 0, - "name": "Near", - "group": "Shadow Map Settings", - "subType": "number" - }, - { - "type": 0, - "name": "Far", - "group": "Shadow Map Settings", - "subType": "number" - }, - { - "type": 0, - "name": "Bias", - "group": "Shadow Map Settings", - "subType": "number" - }, - { - "type": 0, - "name": "Polygon Offset", - "group": "Shadow Map Settings", - "subType": "integer" - }, - { - "type": 0, - "name": "Normal Offset", - "group": "Shadow Map Settings", - "subType": "number" - }, - { - "type": 0, - "name": "Blur Amount", - "group": "Shadow Map Settings", - "subType": "number" - }, - { - "type": 0, - "name": "Enable Advanced", - "group": "Advanced Options", - "subType": "boolean" - }, - { - "type": 0, - "name": "MSAA index", - "subType": "integer" - }, - { - "type": 5, - "name": "MSAA", - "group": "Advanced Options" - }, - { - "type": 0, - "name": "Texture Filter index", - "subType": "integer" - }, - { - "type": 5, - "name": "Texture Filter", - "group": "Advanced Options" - }, - { - "type": 0, - "name": "Anisotropic index", - "subType": "integer" - }, - { - "type": 5, - "name": "Anisotropic", - "group": "Advanced Options" } ], "portsOut": [ diff --git a/src/ops/base/Ops.Gl.Textures.WebcamTexture_v3/Ops.Gl.Textures.WebcamTexture_v3.js b/src/ops/base/Ops.Gl.Textures.WebcamTexture_v3/Ops.Gl.Textures.WebcamTexture_v3.js index c25d652afc..c3f2e14f8d 100644 --- a/src/ops/base/Ops.Gl.Textures.WebcamTexture_v3/Ops.Gl.Textures.WebcamTexture_v3.js +++ b/src/ops/base/Ops.Gl.Textures.WebcamTexture_v3/Ops.Gl.Textures.WebcamTexture_v3.js @@ -43,6 +43,7 @@ videoElement.setAttribute("muted", ""); videoElement.setAttribute("playsinline", ""); videoElement.setAttribute("style", inCss.get()); op.patch.cgl.canvas.parentElement.appendChild(videoElement); +// let oldCanvas=op.patch.cgl.canvas; let tex = null; let initingDevices = false; diff --git a/src/ops/base/Ops.Gl.Textures.WebcamTexture_v3/Ops.Gl.Textures.WebcamTexture_v3.json b/src/ops/base/Ops.Gl.Textures.WebcamTexture_v3/Ops.Gl.Textures.WebcamTexture_v3.json index cb16fb304d..d95b43379c 100644 --- a/src/ops/base/Ops.Gl.Textures.WebcamTexture_v3/Ops.Gl.Textures.WebcamTexture_v3.json +++ b/src/ops/base/Ops.Gl.Textures.WebcamTexture_v3/Ops.Gl.Textures.WebcamTexture_v3.json @@ -143,7 +143,7 @@ { "type": 0, "name": "Available", - "subType": "number" + "subType": "boolean" }, { "type": 0, @@ -180,7 +180,6 @@ }, "summary": "Use your webcam camera as a texture", "issues": "", - "youtubeids": [], "docs": { "ports": [ diff --git a/src/ops/base/Ops.Graphics.Geometry.GeometryAttributes/Ops.Graphics.Geometry.GeometryAttributes.json b/src/ops/base/Ops.Graphics.Geometry.GeometryAttributes/Ops.Graphics.Geometry.GeometryAttributes.json index db431e49fe..8637ac53c6 100644 --- a/src/ops/base/Ops.Graphics.Geometry.GeometryAttributes/Ops.Graphics.Geometry.GeometryAttributes.json +++ b/src/ops/base/Ops.Graphics.Geometry.GeometryAttributes/Ops.Graphics.Geometry.GeometryAttributes.json @@ -45,11 +45,9 @@ "docs": { "ports": [] }, - "exampleProjectId": "4VpJz6", "issues": "", "caniusequery": "", - "youtubeids": [], "changelog": [ { diff --git a/src/ops/base/Ops.Ui.CablesEditorEvents/Ops.Ui.CablesEditorEvents.js b/src/ops/base/Ops.Ui.CablesEditorEvents/Ops.Ui.CablesEditorEvents.js new file mode 100644 index 0000000000..d6ac3e3d2f --- /dev/null +++ b/src/ops/base/Ops.Ui.CablesEditorEvents/Ops.Ui.CablesEditorEvents.js @@ -0,0 +1,14 @@ +const + outSaving = op.outTrigger("Saving Patch"), + inTriggerChanged = op.inTriggerButton("Set Changed Patch"); + +op.patch.on("uiSavePatch", () => +{ + outSaving.trigger(); +}); + +inTriggerChanged.onTriggered = () => +{ + if (!CABLES.UI) return; + gui.savedState.setUnSaved("ui event op", 0); +}; diff --git a/src/ops/base/Ops.Ui.CablesEditorEvents/Ops.Ui.CablesEditorEvents.json b/src/ops/base/Ops.Ui.CablesEditorEvents/Ops.Ui.CablesEditorEvents.json new file mode 100644 index 0000000000..0eb5070f5d --- /dev/null +++ b/src/ops/base/Ops.Ui.CablesEditorEvents/Ops.Ui.CablesEditorEvents.json @@ -0,0 +1,33 @@ +{ + "id": "31add1df-b4ce-486a-bbad-3291e07d8b76", + "changelog": [ + { + "message": "created op", + "author": "pandur", + "date": 0, + "type": "new" + }, + { + "message": "created op\t", + "type": "new", + "author": "pandur", + "date": 1715092320586 + } + ], + "authorName": "pandur", + "created": 1632840113349, + "layout": { + "portsIn": [ + { + "type": 1, + "name": "Set Changed Patch" + } + ], + "portsOut": [ + { + "type": 1, + "name": "Saving Patch" + } + ] + } +}