Skip to content

Commit

Permalink
HTNLVideoElement追加
Browse files Browse the repository at this point in the history
  • Loading branch information
inaridarkfox4231 committed Nov 7, 2023
1 parent 9ae9b0e commit c36c7ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/p5wgex.js
Original file line number Diff line number Diff line change
Expand Up @@ -2296,6 +2296,7 @@ const p5wgex = (function(){
if(src instanceof Uint8Array || src instanceof Float32Array){ return src; }
if(src instanceof HTMLImageElement){ return src; }
if(src instanceof HTMLCanvasElement){ return src; }
if(src instanceof HTMLVideoElement){ 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 @@ -5932,7 +5933,7 @@ const p5wgex = (function(){
// infoが次のタイプの場合は{src:info}で置き換えることとする。
// もっともこの定義の仕方では他のオプションを用意できないので、あくまでも簡易措置である。
if (info instanceof Uint8Array || info instanceof Float32Array || info instanceof HTMLImageElement ||
info instanceof HTMLCanvasElement || info instanceof p5.Graphics || info instanceof p5.Image) {
info instanceof HTMLCanvasElement || info instanceof HTMLVideoElement || info instanceof p5.Graphics || info instanceof p5.Image) {
this.registTexture(name, {src:info});
return this;
}
Expand Down

0 comments on commit c36c7ab

Please sign in to comment.