Skip to content

Commit db5f8d9

Browse files
committed
Remove unused bezierDetail()
1 parent d08e9da commit db5f8d9

File tree

2 files changed

+0
-106
lines changed

2 files changed

+0
-106
lines changed

src/core/p5.Graphics.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -573,9 +573,6 @@ class Graphics {
573573

574574
this._styles = [];
575575

576-
this._bezierDetail = 20;
577-
this._curveDetail = 20;
578-
579576
// this._colorMode = RGB;
580577
// this._colorMaxes = {
581578
// rgb: [255, 255, 255, 255],

src/shape/curves.js

Lines changed: 0 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -214,109 +214,6 @@ function curves(p5, fn){
214214
return this;
215215
};
216216

217-
/**
218-
* Sets the number of segments used to draw Bézier curves in WebGL mode.
219-
*
220-
* In WebGL mode, smooth shapes are drawn using many flat segments. Adding
221-
* more flat segments makes shapes appear smoother.
222-
*
223-
* The parameter, `detail`, is the number of segments to use while drawing a
224-
* Bézier curve. For example, calling `bezierDetail(5)` will use 5 segments to
225-
* draw curves with the <a href="#/p5/bezier">bezier()</a> function. By
226-
* default,`detail` is 20.
227-
*
228-
* Note: `bezierDetail()` has no effect in 2D mode.
229-
*
230-
* @method bezierDetail
231-
* @param {Number} detail number of segments to use. Defaults to 20.
232-
* @chainable
233-
*
234-
* @example
235-
* <div>
236-
* <code>
237-
* // Draw the original curve.
238-
*
239-
* function setup() {
240-
* createCanvas(100, 100);
241-
*
242-
* background(200);
243-
*
244-
* // Draw the anchor points in black.
245-
* stroke(0);
246-
* strokeWeight(5);
247-
* point(85, 20);
248-
* point(15, 80);
249-
*
250-
* // Draw the control points in red.
251-
* stroke(255, 0, 0);
252-
* point(10, 10);
253-
* point(90, 90);
254-
*
255-
* // Draw a black bezier curve.
256-
* noFill();
257-
* stroke(0);
258-
* strokeWeight(1);
259-
* bezier(85, 20, 10, 10, 90, 90, 15, 80);
260-
*
261-
* // Draw red lines from the anchor points to the control points.
262-
* stroke(255, 0, 0);
263-
* line(85, 20, 10, 10);
264-
* line(15, 80, 90, 90);
265-
*
266-
* describe(
267-
* 'A gray square with three curves. A black s-curve has two straight, red lines that extend from its ends. The endpoints of all the curves are marked with dots.'
268-
* );
269-
* }
270-
* </code>
271-
* </div>
272-
*
273-
* <div>
274-
* <code>
275-
* // Draw the curve with less detail.
276-
*
277-
* function setup() {
278-
* createCanvas(100, 100, WEBGL);
279-
*
280-
* background(200);
281-
*
282-
* // Set the curveDetail() to 5.
283-
* bezierDetail(5);
284-
*
285-
* // Draw the anchor points in black.
286-
* stroke(0);
287-
* strokeWeight(5);
288-
* point(35, -30, 0);
289-
* point(-35, 30, 0);
290-
*
291-
* // Draw the control points in red.
292-
* stroke(255, 0, 0);
293-
* point(-40, -40, 0);
294-
* point(40, 40, 0);
295-
*
296-
* // Draw a black bezier curve.
297-
* noFill();
298-
* stroke(0);
299-
* strokeWeight(1);
300-
* bezier(35, -30, 0, -40, -40, 0, 40, 40, 0, -35, 30, 0);
301-
*
302-
* // Draw red lines from the anchor points to the control points.
303-
* stroke(255, 0, 0);
304-
* line(35, -30, -40, -40);
305-
* line(-35, 30, 40, 40);
306-
*
307-
* describe(
308-
* 'A gray square with three curves. A black s-curve is drawn with jagged segments. Two straight, red lines that extend from its ends. The endpoints of all the curves are marked with dots.'
309-
* );
310-
* }
311-
* </code>
312-
* </div>
313-
*/
314-
fn.bezierDetail = function(d) {
315-
// p5._validateParameters('bezierDetail', arguments);
316-
this._bezierDetail = d;
317-
return this;
318-
};
319-
320217
/**
321218
* Calculates coordinates along a Bézier curve using interpolation.
322219
*

0 commit comments

Comments
 (0)