MCPcopy Create free account
hub / github.com/Stability-AI/stable-fast-3d / registerVisualizer

Function registerVisualizer

comfyui/visualization.js:108–126  ·  view source on GitHub ↗
(nodeType, nodeData)

Source from the content-addressed store, hash-verified

106
107
108function 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
128app.registerExtension({
129 name: "StableFast3D.Visualizer",

Callers 1

beforeRegisterNodeDefFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected