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

Method at

src/shape/custom_shapes.js:858–873  ·  view source on GitHub ↗
(contoursIndex, primitivesIndex, verticesIndex)

Source from the content-addressed store, hash-verified

856
857 // TEST
858 at(contoursIndex, primitivesIndex, verticesIndex) {
859 let contour;
860 let primitive;
861
862 contour = this.contours.at(contoursIndex);
863
864 switch(arguments.length) {
865 case 1:
866 return contour;
867 case 2:
868 return contour.primitives.at(primitivesIndex);
869 case 3:
870 primitive = contour.primitives.at(primitivesIndex);
871 return primitive.vertices.at(verticesIndex);
872 }
873 }
874
875 // maybe call this clear() for consistency with PrimitiveShapeCreators.clear()?
876 // note: p5.Geometry has a reset() method, but also clearColors()

Callers 15

#generalVertexMethod · 0.95
beginContourMethod · 0.95
endContourMethod · 0.95
drawFunction · 0.80
MemberExpressionFunction · 0.80
parseObjFunction · 0.80
unquoteFunction · 0.80
fontFunction · 0.80
addToShapeMethod · 0.80
_nextPrimitiveMethod · 0.80
_previousPrimitiveMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected