Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/Federico'
Browse files Browse the repository at this point in the history
# Conflicts:
#	meshwarp/meshwarp.js
#	meshwarp/meshwarp.maxpat
  • Loading branch information
Robert Ramirez committed Apr 20, 2021
2 parents 286dede + 8ac5bb1 commit 5e562e2
Show file tree
Hide file tree
Showing 11 changed files with 2,018 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# meshwarp
# meshwarp

Federico's Branch
31 changes: 31 additions & 0 deletions code/GraphicElements.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
function GraphicElements() {
this.sketch = new JitterObject("jit.gl.sketch");
this.sketch.depth_enable = 0;
this.sketch.layer = FRONT;
this.sketch.color = RED;
this.sketch.line_width = 2;

this.circleRadius = 0.03;

this.transformMouseToWorld = function(screenCoord) {
return this.sketch.screentoworld(screenCoord);
}

this.setDrawto = function(drawto) {
this.sketch.drawto = drawto;
}

this.initGraphicElements = function() {
this.setDrawto(nodeCTX.name);
}

this.drawCircle = function(coordsWorld) {
this.sketch.reset();
this.sketch.moveto(coordsWorld);
this.sketch.framecircle(this.circleRadius);
}

this.reset = function() {
this.sketch.reset();
}
}
Loading

0 comments on commit 5e562e2

Please sign in to comment.