Ver código fonte

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

* Fix dFdy().negate()

* Fix .negate()
sunag 1 ano atrás
pai
commit
cf340b9936
1 arquivos alterados com 1 adições e 1 exclusões
  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 ) {