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

Method model

src/core/p5.Renderer3D.js:550–563  ·  view source on GitHub ↗
(model, count = 1)

Source from the content-addressed store, hash-verified

548 }
549
550 model(model, count = 1) {
551 if (model.vertices.length > 0) {
552 if (this.geometryBuilder) {
553 this.geometryBuilder.addRetained(model);
554 } else {
555 if (!this.geometryInHash(model.gid)) {
556 model._edgesToVertices();
557 this._getOrMakeCachedBuffers(model);
558 }
559
560 this._drawGeometry(model, { count });
561 }
562 }
563 }
564
565 _getOrMakeCachedBuffers(geometry) {
566 return this.geometryBufferCache.ensureCached(geometry);

Callers 9

p5.Geometry.jsFile · 0.80
p5.RendererGL.jsFile · 0.80
webgpu.jsFile · 0.80
webgl.jsFile · 0.80
loadingFunction · 0.80
primitives3DFunction · 0.80

Calls 5

geometryInHashMethod · 0.95
_drawGeometryMethod · 0.95
addRetainedMethod · 0.80
_edgesToVerticesMethod · 0.80

Tested by

no test coverage detected