Platform
Resources
Pricing
Sign in
Contact us
Fil
Vocateur.
Workspace
Fork
Published
2 collections
By
Fil
Edited
Mar 28, 2022
2 forks
15 stars
GPU.js
Dijkstra’s algorithm in gpu.js
Raster projection with GPU.js
Image to GPU.js
Hello, gpu.js v2
Also listed in…
Hello
Insert cell
Insert cell
html
`${
video
}${
kernel
.
canvas
}`
Insert cell
video
=
html
`<video src="https://upload.wikimedia.org/wikipedia/commons/e/ec/Jellyfish_in_Vr%C3%A5ngo.webm" controls width="337" height="599" crossorigin="anonymous" loop autoplay style="float:left"></video>`
Insert cell
GPU
=
require
(
"gpu.js@2.15.2"
)
Insert cell
gpu
=
new
GPU
.
GPU
(
{
mode
:
'webgl2'
}
)
Insert cell
kernel
=
gpu
.
createKernel
(
function
(
frame
)
{
const
pixel
=
frame
[
this
.
output
.
y
-
this
.
thread
.
y
]
[
this
.
output
.
x
-
this
.
thread
.
x
]
;
this
.
color
(
pixel
.
b
,
pixel
.
g
,
pixel
.
r
,
pixel
.
a
)
;
}
,
{
output
:
[
337
,
599
]
,
graphical
:
true
}
)
Insert cell
{
while
(
true
)
{
kernel
(
video
)
;
yield
;
}
}
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Fork
View
Export
Listed in...
GPU.js
Fil
Hello
Fil
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
video
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
GPU
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
gpu
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
kernel
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML