paperjs-offset
paperjs-offset copied to clipboard
Offset artifacts at larger distances
Thanks for the wonderful library! It's exactly what I need!
For my application, I'm looking to make multiple large offsets of a single shape. Unfortunately it seems like there are some artifacts that show up at larger distances.

Here's the source:
(function() {
function RunDemo() {
let canvas = document.querySelector('canvas')
paper.setup(canvas)
function outset(item, distance, iterations) {
for (var i = 0; i < iterations; i++) {
PaperOffset.offset(item, i*distance);
}
}
let c3 = new paper.Path.Circle({ center: [180, 260], radius: 50, strokeColor: 'black' })
let c4 = new paper.Path.Circle({ center: [230, 260], radius: 40, strokeColor: 'black' })
let c5 = new paper.Path.Circle({ center: [205, 200], radius: 40, strokeColor: 'black' })
let cc1 = c3.unite(c4, { insert: true })
let cc = cc1.unite(c5, { insert: true })
c3.remove()
c4.remove()
c5.remove()
cc1.remove()
cc.bringToFront()
outset(cc, 4, 30);
}
window.onload = RunDemo
})()
I'll try to improve this, but I can't promise a timeline. Hope I can fix this soon.