We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d2f4c7 commit 80f3212Copy full SHA for 80f3212
src/webgl/p5.Geometry.js
@@ -62,6 +62,8 @@ class Geometry {
62
this._hasFillTransparency = undefined;
63
this._hasStrokeTransparency = undefined;
64
65
+ this.gid = `_p5_Geometry_${Geometry.nextId}`;
66
+ Geometry.nextId++;
67
if (callback instanceof Function) {
68
callback.call(this);
69
}
@@ -1917,6 +1919,12 @@ class Geometry {
1917
1919
1918
1920
};
1921
1922
+/**
1923
+ * Keeps track of how many custom geometry objects have been made so that each
1924
+ * can be assigned a unique ID.
1925
+ */
1926
+Geometry.nextId = 0;
1927
+
1928
function geometry(p5, fn){
1929
/**
1930
* A class to describe a 3D shape.
0 commit comments