pboyer / verb

Open-source, cross-platform NURBS
http://www.verbnurbs.com
MIT License
733 stars 106 forks source link

Transform NurbsCurve (Rotate) #57

Open RafaelScharf opened 3 years ago

RafaelScharf commented 3 years ago

I need to rotate Nurbs Curve, I tried using the .transform method to change rotate using matrix but to no avail.

Look at my code

    `
    let cNurbsW = new verb.geom.NurbsCurve(arrayCurvesWidth[0]);
      let tempAngle = MathUtils.degToRad(45)
      cNurbsW.transform(
          [
              [Math.cos(tempAngle), -Math.sin(tempAngle), 0, 0],
              [Math.sin(tempAngle), Math.cos(tempAngle), 0, 0],
              [0, 0, 1, 0],
              [0, 0, 0, 1]
          ]
      )
    `

How to i rotate my NubsCurve?