Skip to content

Commit

Permalink
HTMLCanvasElementをcanvas要素として許容、color/のoptionでbreakの書き忘れを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
inaridarkfox4231 committed Oct 2, 2023
1 parent 55c4453 commit e011816
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/p5wgex.js
Original file line number Diff line number Diff line change
Expand Up @@ -2112,6 +2112,7 @@ const p5wgex = (function(){
if(src === undefined){ return null; }
if(src instanceof Uint8Array || src instanceof Float32Array){ return src; }
if(src instanceof HTMLImageElement){ return src; }
if(src instanceof HTMLCanvasElement){ return src; }
if(src instanceof p5.Graphics){ return src.elt; }
if(src instanceof p5.Image){ return src.canvas; }
myAlert("You cannot extract data from that source.");
Expand Down Expand Up @@ -5219,6 +5220,7 @@ const p5wgex = (function(){
if (data.length > 1) {
this.setUniform(data[1], coulour(prop));
}
break;
default:
// "/"が使われていない場合。ユニフォーム名に"/"は使えない決まりなので問題ない。
this.setUniform(uniformName, prop);
Expand Down

0 comments on commit e011816

Please sign in to comment.