Skip to content

Commit 03cd06f

Browse files
committed
fix: add customShapes in Graphics.js and fix unit test error
1 parent 91bcb62 commit 03cd06f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/core/p5.Graphics.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import material from '../webgl/material';
2323
import creatingReading from '../color/creating_reading';
2424
import trigonometry from '../math/trigonometry';
2525
import { renderers } from './rendering';
26+
import customShapes from '../shape/custom_shapes';
2627

2728
class Graphics {
2829
constructor(w, h, renderer, pInst, canvas) {
@@ -671,15 +672,13 @@ function graphics(p5, fn){
671672
* </div>
672673
*/
673674
p5.Graphics = Graphics;
674-
p5.Graphics.prototype.splineVertex = function(x, y, z, u, v) {
675-
this._renderer.splineVertex(x, y, z, u, v);
676-
return this;
677-
};
675+
678676
// Shapes
679677
primitives2D(p5, p5.Graphics.prototype);
680678
attributes(p5, p5.Graphics.prototype);
681679
curves(p5, p5.Graphics.prototype);
682680
vertex(p5, p5.Graphics.prototype);
681+
customShapes(p5, p5.Graphics.prototype);
683682

684683
setting(p5, p5.Graphics.prototype);
685684
loadingDisplaying(p5, p5.Graphics.prototype);

0 commit comments

Comments
 (0)