MCPcopy
hub / github.com/processing/p5.js / reset

Method reset

src/webgl/p5.Geometry.js:202–228  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

200 }
201
202 reset() {
203 // Notify renderer that geometry is being reset (for buffer cleanup)
204 this.renderer?.onReset?.(this);
205
206 this._hasFillTransparency = undefined;
207 this._hasStrokeTransparency = undefined;
208
209 this.lineVertices.clear();
210 this.lineTangentsIn.clear();
211 this.lineTangentsOut.clear();
212 this.lineSides.clear();
213
214 this.vertices.length = 0;
215 this.edges.length = 0;
216 this.vertexColors.length = 0;
217 this.vertexStrokeColors.length = 0;
218 this.lineVertexColors.clear();
219 this.vertexNormals.length = 0;
220 this.uvs.length = 0;
221
222 for (const propName in this.userVertexProperties){
223 this.userVertexProperties[propName].delete();
224 }
225 this.userVertexProperties = {};
226
227 this.dirtyFlags = {};
228 }
229
230 hasFillTransparency() {
231 if (this._hasFillTransparency === undefined) {

Callers 6

constructFromContoursMethod · 0.45
beginMethod · 0.45
setMethod · 0.45
interactionFunction · 0.45
_promoteToFramebufferMethod · 0.45

Calls 3

onResetMethod · 0.80
deleteMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected