mirror of
https://github.com/gpujs/gpu.js.git
synced 2026-01-25 16:08:02 +00:00
Added Canvas Elements as valid input to Kernel
This small change only allows single canvas elements as kernel input. They have the exact same properties and use cases as html images, bit if you need to use a canvas directly it is more efficient than converting it to an image first.
This commit is contained in:
parent
cd0b417c67
commit
84debbb4d3
@ -144,6 +144,8 @@ const utils = {
|
||||
switch (value.nodeName) {
|
||||
case 'IMG':
|
||||
return 'HTMLImage';
|
||||
case 'CANVAS':
|
||||
return 'HTMLImage';
|
||||
case 'VIDEO':
|
||||
return 'HTMLVideo';
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user