From 6098e4b277217d674fe9ee9d1f48b503fc69bfbf Mon Sep 17 00:00:00 2001 From: fidelthomet Date: Wed, 28 Aug 2024 11:38:35 +0200 Subject: [PATCH] only create webgl context if element is in viewport --- README.md | 3 + index.html | 2 +- package.json | 2 +- src/main.js | 195 +++++++++++++++++++++++++++++++++++---------------- 4 files changed, 141 insertions(+), 61 deletions(-) diff --git a/README.md b/README.md index 01dabe1..7bf9c24 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,9 @@ use + + + ``` diff --git a/index.html b/index.html index 56c8aaa..b73bbdd 100644 --- a/index.html +++ b/index.html @@ -15,7 +15,7 @@

image

video

custom threshold map

- +