(nodeType, nodeData)
| 106 | |
| 107 | |
| 108 | function registerVisualizer(nodeType, nodeData) { |
| 109 | if (nodeData.name !== "StableFast3DSave" && nodeData.name !== "StableFast3DPreview") |
| 110 | return; |
| 111 | |
| 112 | const originalOnNodeCreated = nodeType.prototype.onNodeCreated; |
| 113 | |
| 114 | nodeType.prototype.onNodeCreated = async function () { |
| 115 | const result = originalOnNodeCreated?.apply(this, arguments); |
| 116 | await createWidget.apply(this, [this, app]); |
| 117 | this.setSize([512, 512]); |
| 118 | return result; |
| 119 | }; |
| 120 | |
| 121 | nodeType.prototype.onExecuted = function (message) { |
| 122 | if (message?.glbs?.[0]) { |
| 123 | this.updateParameters(message.glbs[0]); |
| 124 | } |
| 125 | }; |
| 126 | } |
| 127 | |
| 128 | app.registerExtension({ |
| 129 | name: "StableFast3D.Visualizer", |
no outgoing calls
no test coverage detected