git ssb

0+

Dominic / cad2



Commit 3197c81babd811eaaced15542dcf80418f910bf7

default to hires curves

Dominic Tarr committed on 12/30/2017, 8:03:29 AM
Parent: 485abbed38bbfd00fab0954f74231a8d4085db0d

Files changed

midpoint.jschanged
midpoint.jsView
@@ -32,9 +32,9 @@
3232 exports.snapY = snap
3333
3434 function smooth2D (points, tension, sides) {
3535 tension = tension || 0.5
36- sides = sides || 3
36 + sides = sides || 5
3737 var p = Cardinal.getCurvePoints(points.reduce(function (a, b) {
3838 return a.concat(b)
3939 }), tension, sides)
4040
@@ -50,12 +50,12 @@
5050 function smooth (points, step, tension) {
5151 step = step || 1
5252 var smoothX = m.snapY(smooth2D(points.map(function (e) {
5353 return [e[0],e[1]]
54- }), tension), step)
54 + }), tension, 10), step)
5555 var smoothZ = m.snapY(smooth2D(points.map(function (e) {
5656 return [e[2],e[1]]
57- }), tension), step)
57 + }), tension, 10), step)
5858
5959 return smoothX.map(function (e, i) {
6060 return [e[0],e[1], smoothZ[i][0]]
6161 })

Built with git-ssb-web