function generate(x, y, angle) {
let firstPoint = new paper.Point(x + 4, y + 90)
let secondPoint = new paper.Point(x + 20, y + 40)
let thirdPoint = new paper.Point(x + 50, y + 0)
let forthPoint = new paper.Point(x + 50, y + 90)
let handleIn = new paper.Point(-20, 50);
let secondHandleIn = new paper.Point(-10, 40)
let handleOut = new paper.Point(20, -40);
let firstSegment = new paper.Segment(firstPoint, null, null)
let secondSegment
let thirdSegment = new paper.Segment(thirdPoint, null, null)
let forthSegment = new paper.Segment(forthPoint, null, null)
secondSegment = new paper.Segment(secondPoint, secondHandleIn, handleOut)
let firstPath = new paper.Path(secondSegment, thirdSegment, forthSegment, secondSegment);
firstPath.shadowColor = '#000000',
firstPath.shadowBlur = 5
firstPath.fillColor = '#40a9ff'
secondSegment = new paper.Segment(secondPoint, handleIn, secondHandleIn)
let secondPath = new paper.Path(firstSegment, secondSegment, forthSegment, firstSegment);
secondPath.strokeWidth = 1
secondPath.shadowColor = '#000000',
secondPath.shadowBlur = 10
secondPath.fillColor = {
gradient: {
stops: ['#1890ff', '#40a9ff']
},
origin: firstPoint,
destination: forthPoint
}
let group = new paper.Group({
children: [firstPath, secondPath],
strokeColor: 'black',
})
group.rotate(angle, forthPoint)
return group
}