Platform
Resources
Pricing
Sign in
Get started
Sean Kelley
Workspace
Fork
Published
2 collections
By
Sean Kelley
Edited
Jun 5, 2020
Insert cell
Insert cell
detectWebGLContext
=
{
const
canvas
=
document
.
createElement
(
"canvas"
)
;
const
gl
=
canvas
.
getContext
(
"webgl"
)
||
canvas
.
getContext
(
"experimental-webgl"
)
;
return
(
gl
&&
gl
instanceof
WebGLRenderingContext
?
true
:
false
)
}
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...
WebGL Utilities
Sean Kelley
Snippets
Sean Kelley
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
detectWebGLContext
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML