Key:
| element | Implemented in p5 canvas | Implement in MyCanvas |
|---|---|---|
| Strings (p5 canvas has 10 strings, 50% implemented) | ||
| _textFont | x | x r |
| _textStyle | x | x r |
| _textAlign | x | x r |
| _textBaseline | x | |
| _rectMode | x | x r |
| _ellipseMode | x | x r |
| _colorMode | g | x r |
| _imageMode | x | |
| _cachedStrokeStyle | x | |
| _cachedFillStyle | x | |
| _cachedBlendMode | x | |
| _id | x r | |
| Numbers (p5 canvas has 5 numbers, 60% implemented
100% of the non "_" numbers) | ||
| width | x | x r |
| height | x | x r |
| _textSize | x | x r |
| _textLeading | x | |
| _curveTightness | x | |
| _strokeWeight | x r | |
| _textWeight | x r | |
| _textStrokeWeight | x r | |
| functions (p5 canvas has 93 functions, 52% implemented
69% of the non "_" related functions) | ||
| _applyDefaults | x | |
| resizeCanvas | x | x |
| background | x | x |
| clear | x | x |
| fill | x | x |
| stroke | x | x |
| erase | x | |
| noErase | x | |
| image | x | x |
| _getTintedImageCanvas | x | |
| blendMode | x | |
| blend function | x | |
| _getPixel | x | |
| loadPixels | x | |
| set | x | |
| updatePixels | x | |
| _acuteArcToBezier | x | |
| arc | x | x |
| ellipse | x | x |
| line | x | x |
| point | x | x |
| quad | x | x |
| rect | x | x |
| triangle | x | x |
| endShape | x | x |
| strokeCap | x | x |
| strokeJoin | x | |
| strokeWeight | x | x |
| _getFill | x | |
| _setFill | x | |
| _getStroke | x | |
| _setStroke | x | |
| bezier | x | x |
| curve | x | |
| _doFillStrokeClose | x | |
| applyMatrix | x | x |
| resetMatrix | x | x |
| rotate | x | x |
| scale | x | x |
| translate | x | x |
| text | x | x |
| _renderText | x | |
| textWidth | x | |
| _applyTextProperties | x | |
| push | x | |
| pop | x | |
| get | x | |
| textLeading | x | |
| textSize | x | x |
| textStyle | x | x |
| textAscent | x | |
| textDescent | x | |
| textAlign | x | x |
| _isOpenType | x | |
| _updateTextMetrics | x | |
| parent | x | x |
| id | x | x |
| class | x | |
| mousePressed | x | x |
| doubleClicked | x | x |
| mouseWheel | x | x |
| mouseReleased | x | x |
| mouseClicked | x | x |
| mouseMoved | x | x |
| mouseOver | x | x |
| mouseOut | x | x |
| touchStarted | x | x |
| touchMoved | x | x |
| touchEnded | x | x |
| dragOver | x | x |
| dragLeave | x | x |
| _setProperty | x | |
| changed | x | |
| input | x | |
| addClass | x | |
| removeClass | x | |
| hasClass | x | |
| toggleClass | x | |
| child | x | x |
| center | x | x |
| html | x | x |
| position | x | x |
| _translate | x | |
| _rotate | x | |
| style | x | x |
| attribute | x | |
| removeAttribute | x | |
| value | x | |
| show | x | x |
| hide | x | x |
| size | x | |
| remove | x | |
| drop | x | x |
| color | g | x |
| colorMode | g | x r |
| loadImage | g | x |
| noFill | g | x r |
| noStroke | g | x r |
| rectMode | g | x r |
| ellipseMode | g | x r |
| textFont | g | x r |
| square | g | x |
| circle | g | x |
| bezierPoint | g | x |
| bezierTangent | g | x |
| bezierPoint | g | x |
| _decrementPreload | g | x |
| beginShape | g | x r |
| vertex | g | x r |
| convertImageToMyCanvas | x | |
| keyDown | x | |
| keyUp | x | |
| objects (p5 canvas has 9 objects, 56% implemented
100% of the non "_" objects) | ||
| elt | x | x |
| _pixelsState | x | |
| _pInst | x | x |
| _events | x | x |
| canvas | x | x |
| _textAscent | x (null) | |
| _textDescent | x (null) | |
| _tint | x (null) | |
| drawingContext | x | x |
| _backgoundColor | x r | |
| _fillColor | x r | |
| _strokeColor | x r | |
| touches | g | x r |
| _colorMaxes | g | x r |
| boolean (p5 canvas has 6 boolean variables, 33% implemented
100% of the non "_" objects) | ||
| _isMainCanvas | x | x |
| _doStroke | x | |
| _doFill | x | |
| _strokeSet | x | |
| _fillSet | x | |
| _dragDisabled | x | x |
| mouseIsPressed | g | x |
| keyIsPressed | g | x |
| isOver | x r | |
| _strokeText | x | |
| _dragStarted | x | |
By this count, there are non "_" elements either in a p5 canvas or are related but global. MyCanvas implements (at least in part) 72 or 72% of them.
James Brink, 5/26/2020