@@ -236,30 +236,8 @@ VectorOp.prototype.adjustNormal = function(normal: VecParam, position: VecParam)
236236 const zEq0 = new EqOp ( this . ad , normal . z ( ) , new Value ( this . ad , 0 ) )
237237 const normalIsX = new AndOp ( this . ad , yEq0 , zEq0 )
238238 const other = normalIsX . vecIfElse ( y , x )
239- /*const yEq0 = new LtOp(this.ad, new Abs(this.ad, normal.y()), new Value(this.ad, 0.2))
240- const zEq0 = new LtOp(this.ad, new Abs(this.ad, normal.z()), new Value(this.ad, 0.2))
241- const normalIsX = new AndOp(this.ad, yEq0, zEq0)
242- const other = normalIsX.vecIfElse(y, x)*/
243- /*const normalDotX = new Abs(this.ad, new Dot(this.ad, normal, x))
244- const normalDotY = new Abs(this.ad, new Dot(this.ad, normal, y))
245- const other = new VecNormalize(
246- this.ad,
247- new VecMix(
248- this.ad,
249- y,
250- x,
251- new Mult(
252- this.ad,
253- normalDotX,
254- normalDotY
255- ),
256- ),
257- )*/
258- //const v = new Cross(this.ad, other, normal)
259- //const u = new Cross(this.ad, v, normal)
260239 const v = new VecNormalize ( this . ad , new Cross ( this . ad , other , normal ) )
261240 const u = new Cross ( this . ad , v , normal )
262- //const u = new VecNormalize(this.ad, new Cross(this.ad, v, normal))
263241 const jacobian = new OffsetJacobian ( this . ad , position , this )
264242 const dodu = new VecMult ( this . ad , jacobian , u )
265243 const dodv = new VecMult ( this . ad , jacobian , v )
0 commit comments