소스 검색

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

* Fix dFdy().negate()

* Fix .negate()
sunag 1 년 전
부모
커밋
cf340b9936
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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 ) {