瀏覽代碼

[shgraph] CSS Fixes, some things now properly trigger a shader recompile

Clément Espeute 11 月之前
父節點
當前提交
023a0c4129
共有 4 個文件被更改,包括 4 次插入3 次删除
  1. 1 1
      bin/style.css
  2. 1 1
      bin/style.less
  3. 1 0
      hrt/shgraph/nodes/Color.hx
  4. 1 1
      hrt/shgraph/nodes/Sampler.hx

+ 1 - 1
bin/style.css

@@ -2110,7 +2110,7 @@ input[type=checkbox]:checked:after {
   outline: none !important;
   position: relative;
 }
-.graph-view .hide-toolbar2 {
+.graph-view .heaps-scene > .hide-toolbar2 {
   position: absolute;
   top: 10px;
   left: 10px;

+ 1 - 1
bin/style.less

@@ -2382,7 +2382,7 @@ input[type=checkbox] {
 	outline: none !important;
 	position: relative;
 
-	.hide-toolbar2 {
+	.heaps-scene>.hide-toolbar2 {
 		position: absolute;
 		top: 10px;
 		left: 10px;

+ 1 - 0
hrt/shgraph/nodes/Color.hx

@@ -41,6 +41,7 @@ class Color extends ShaderConst {
 			g = vec.y;
 			b = vec.z;
 			a = vec.w;
+			requestRecompile();
 		};
 
 		elements.push(element);

+ 1 - 1
hrt/shgraph/nodes/Sampler.hx

@@ -74,7 +74,6 @@ class Sampler extends ShaderNodeHxsl {
 	override public function getPropertiesHTML(width : Float) : Array<hide.Element> {
 		var elements = super.getPropertiesHTML(width);
 
-
 		{
 			var element = new hide.Element('<div style="width: ${width * 0.8}px; height: 40px"></div>');
 			element.append('<span>Wrap</span>');
@@ -122,6 +121,7 @@ class Sampler extends ShaderNodeHxsl {
 			input.on("change", function(e) {
 				var value = input.val();
 				this.filter = filters[value];
+				requestRecompile();
 			});
 
 			elements.push(element);