feat: Add GLSL shader definitions and adjust gradient title drawing order to render as a background layer.
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "comfyui-shadernoiseksampler-web",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"type": "module",
|
||||
"description": "TypeScript frontend for ComfyUI ShaderNoiseKSampler custom nodes",
|
||||
"scripts": {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "comfyui-shadernoiseksampler"
|
||||
description = "Transform AI image generation from random exploration into deliberate artistic navigation. This advanced KSampler replacement blends traditional noise with shader noise. Navigate latent space with intention using adjustable noise parameters, shape masks, and colors transformations."
|
||||
version = "1.3.1"
|
||||
version = "1.3.2"
|
||||
license = {file = "LICENSE"}
|
||||
|
||||
[project.urls]
|
||||
|
||||
+1076
File diff suppressed because it is too large
Load Diff
@@ -19,12 +19,12 @@ const extension = {
|
||||
const origOnDrawForeground = nodeType.prototype.onDrawForeground;
|
||||
// Add our own onDrawForeground function
|
||||
nodeType.prototype.onDrawForeground = function (ctx) {
|
||||
// Call the original onDrawForeground if it exists
|
||||
// Draw gradient title FIRST so it acts as background layer
|
||||
drawGradientTitle(this, ctx);
|
||||
// Call the original onDrawForeground after, so shader renders on top
|
||||
if (origOnDrawForeground) {
|
||||
origOnDrawForeground.call(this, ctx);
|
||||
}
|
||||
// Draw a custom gradient title
|
||||
drawGradientTitle(this, ctx);
|
||||
};
|
||||
// Clean up resources when node is removed
|
||||
const origOnRemoved = nodeType.prototype.onRemoved;
|
||||
|
||||
@@ -57,13 +57,13 @@ const extension: ComfyExtension = {
|
||||
this: ShaderNode,
|
||||
ctx: CanvasRenderingContext2D
|
||||
): void {
|
||||
// Call the original onDrawForeground if it exists
|
||||
// Draw gradient title FIRST so it acts as background layer
|
||||
drawGradientTitle(this, ctx);
|
||||
|
||||
// Call the original onDrawForeground after, so shader renders on top
|
||||
if (origOnDrawForeground) {
|
||||
origOnDrawForeground.call(this, ctx);
|
||||
}
|
||||
|
||||
// Draw a custom gradient title
|
||||
drawGradientTitle(this, ctx);
|
||||
};
|
||||
|
||||
// Clean up resources when node is removed
|
||||
|
||||
Reference in New Issue
Block a user