diff --git a/docs/docs/shape-custom-shapes.md b/docs/docs/shape-custom-shapes.md index e56db40257..c20051734d 100644 --- a/docs/docs/shape-custom-shapes.md +++ b/docs/docs/shape-custom-shapes.md @@ -439,11 +439,6 @@ Shape data will be updated during rendering, or call `shape.updateData()` to upd ``` - `cx`, `cy` : Control point - `x`, `y` : End point -- Add smooth quadratic bezier of lines - ```javascript - lines.smoothQuadraticBezierTo(x, y); - ``` - - `x`, `y` : End point - Add cubic bezier of lines ```javascript lines.cubicBezierTo(cx0, cy0, cx1, cy1, x, y); @@ -451,12 +446,6 @@ Shape data will be updated during rendering, or call `shape.updateData()` to upd - `cx0`, `cy0` : Control point0 - `cx1`, `cy1` : Control point1 - `x`, `y` : End point -- Add smooth cubic bezier of lines - ```javascript - lines.smoothCubicBezierTo(cx1, cy1, x, y); - ``` - - `cx1`, `cy1` : Control point1 - - `x`, `y` : End point - End commands - Close path, to fill color ```javascript diff --git a/plugins/gameobjects/shape/shapes/geoms/lines/Lines.d.ts b/plugins/gameobjects/shape/shapes/geoms/lines/Lines.d.ts index dbef18b4c4..3fb85a044a 100644 --- a/plugins/gameobjects/shape/shapes/geoms/lines/Lines.d.ts +++ b/plugins/gameobjects/shape/shapes/geoms/lines/Lines.d.ts @@ -32,19 +32,12 @@ export default class Lines extends PathBase { cx: number, cy: number, x: number, y: number ): this; - smoothQuadraticBezierTo( - x: number, y: number - ): this; cubicBezierTo( cx0: number, cy0: number, cx1: number, cy1: number, x: number, y: number ): this; - smoothCubicBezierTo( - cx1: number, cy1: number, - x: number, y: number - ): this; close(): this; diff --git a/plugins/gameobjects/shape/shapes/geoms/lines/Lines.js b/plugins/gameobjects/shape/shapes/geoms/lines/Lines.js index 4dd7b74ad1..11d8c411a2 100644 --- a/plugins/gameobjects/shape/shapes/geoms/lines/Lines.js +++ b/plugins/gameobjects/shape/shapes/geoms/lines/Lines.js @@ -85,13 +85,6 @@ class Lines extends PathBase { return this; } - smoothQuadraticBezierTo(x, y) { - this.builder.smoothQuadraticBezierTo(x, y); - - this.dirty = true; - return this; - } - cubicBezierTo(cx0, cy0, cx1, cy1, x, y) { this.builder.cubicBezierTo(cx0, cy0, cx1, cy1, x, y); @@ -99,13 +92,6 @@ class Lines extends PathBase { return this; } - smoothCubicBezierTo(cx1, cy1, x, y) { - this.builder.smoothCubicBezierTo(cx1, cy1, x, y); - - this.dirty = true; - return this; - } - close() { this.builder.close(); diff --git a/plugins/geom/pathdata/PathDataBuilder/AddPathMethods.js b/plugins/geom/pathdata/PathDataBuilder/AddPathMethods.js index d6e7c4f1ce..3375a2e4bd 100644 --- a/plugins/geom/pathdata/PathDataBuilder/AddPathMethods.js +++ b/plugins/geom/pathdata/PathDataBuilder/AddPathMethods.js @@ -87,15 +87,6 @@ export default { this.lastPointX = x; this.lastPointY = y; - this.lastCX = cx; - this.lastCY = cy; - return this; - }, - - smoothQuadraticBezierTo(x, y) { - var cx = this.lastPointX * 2 - this.lastCX; - var cy = this.lastPointY * 2 - this.lastCY; - this.quadraticBezierTo(cx, cy, x, y); return this; }, @@ -108,15 +99,6 @@ export default { this.lastPointX = x; this.lastPointY = y; - this.lastCX = cx1; - this.lastCY = cy1; - return this; - }, - - smoothCubicBezierTo(cx1, cy1, x, y) { - var cx0 = this.lastPointX * 2 - this.lastCX; - var cy0 = this.lastPointY * 2 - this.lastCY; - this.cubicBezierTo(cx0, cy0, cx1, cy1, x, y); return this; }, diff --git a/plugins/geom/pathdata/PathDataBuilder/TransformPointsMethods.js b/plugins/geom/pathdata/PathDataBuilder/TransformPointsMethods.js index ace7f0f0c6..46ec2568ee 100644 --- a/plugins/geom/pathdata/PathDataBuilder/TransformPointsMethods.js +++ b/plugins/geom/pathdata/PathDataBuilder/TransformPointsMethods.js @@ -18,15 +18,6 @@ export default { var pathDataCnt = this.pathData.length; this.lastPointX = this.pathData[pathDataCnt - 2]; this.lastPointY = this.pathData[pathDataCnt - 1]; - if (this.lastCX !== undefined) { - var point = { - x: this.lastCX, - y: this.lastCY - } - PointRotateAround(point, centerX, centerY, angle); - this.lastCX = point.x; - this.lastCY = point.y; - } return this; }, @@ -38,14 +29,6 @@ export default { Scale(centerX, centerY, scaleX, scaleY, this.pathData); this.lastPointX = this.pathData[pathDataCnt - 2]; this.lastPointY = this.pathData[pathDataCnt - 1]; - if (this.lastCX !== undefined) { - var x = this.lastCX - centerX; - var y = this.lastCY - centerY; - x *= scaleX; - y *= scaleY; - this.lastCX = x + centerX; - this.lastCY = y + centerY; - } return this; },