Explorar o código

TSL: Fix `.negate()` (#26804)

* Fix dFdy().negate()

* Fix .negate()
sunag hai 1 ano
pai
achega
cf340b9936
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      examples/jsm/nodes/math/MathNode.js

+ 1 - 1
examples/jsm/nodes/math/MathNode.js

@@ -102,7 +102,7 @@ class MathNode extends TempNode {
 
 		} else if ( method === MathNode.NEGATE ) {
 
-			return builder.format( '-' + a.build( builder, inputType ), type, output );
+			return builder.format( '( - ' + a.build( builder, inputType ) + ' )', type, output );
 
 		} else if ( method === MathNode.ONE_MINUS ) {