From 5b04c31536ac094f74e8ffd52faae05337b5a37f Mon Sep 17 00:00:00 2001 From: Eyal Gruss Date: Wed, 25 Sep 2024 14:23:36 +0300 Subject: [PATCH] folder reorg --- README.md | 8 ++++---- {swissgl => libs/swissgl}/LICENSE | 0 {swissgl => libs/swissgl}/swissgl.js | 0 {swissgl => libs/swissgl}/swissgl.mjs | 0 media/LordTubeMaster.svg | 13 +++++++++++++ script.js | 2 +- 6 files changed, 18 insertions(+), 5 deletions(-) rename {swissgl => libs/swissgl}/LICENSE (100%) rename {swissgl => libs/swissgl}/swissgl.js (100%) rename {swissgl => libs/swissgl}/swissgl.mjs (100%) create mode 100644 media/LordTubeMaster.svg diff --git a/README.md b/README.md index 21d4209..7a64ffe 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ Note as of September 2024 this is only supported on *Chromium desktop*. Enable graphics/hardware acceleration browser setting to reduce lag. Particularly for the WebGPU examples - make sure you are using a discrete GPU. -For fullscreen zoom of output (with right-click) enable: `chrome://flags/#element-capture` (*Google Chrome*), or -`chrome://flags/#enable-experimental-web-platform-features` (*Chromium*). +To allow fullscreen zoom of output (with right-click) enable: `chrome://flags/#element-capture` (*Google Chrome 121+*), or +`chrome://flags/#enable-experimental-web-platform-features` (*Chromium 121+*). You can browse the effects with `Alt+↑` and `Alt+↓` @@ -18,7 +18,7 @@ WebGPU ([TensorFlow.js](https://www.tensorflow.org/js), [ONNX Runtime Web](https WebGL ([Three.js](https://threejs.org/), [SwissGL](https://google.github.io/swissgl/)), and VanillaJS. Known issues: -1. Modnet crashes using Transformers.js v3-alpha on Chromium 129+: https://github.com/xenova/transformers.js/issues/943 (I currently reverted to v2 causing a significant slowdown) +1. Modnet crashes using Transformers.js v3-alpha on Chromium 129+: https://github.com/xenova/transformers.js/issues/943 (currently reverted to v2 with a significant slowdown) 2. Resolution of captured media is doubled for smaller frames: https://github.com/screen-share/element-capture/issues/44
@@ -27,4 +27,4 @@ Known issues:
-![Architecture](LordTubeMaster.svg) +![Architecture](media/LordTubeMaster.svg) diff --git a/swissgl/LICENSE b/libs/swissgl/LICENSE similarity index 100% rename from swissgl/LICENSE rename to libs/swissgl/LICENSE diff --git a/swissgl/swissgl.js b/libs/swissgl/swissgl.js similarity index 100% rename from swissgl/swissgl.js rename to libs/swissgl/swissgl.js diff --git a/swissgl/swissgl.mjs b/libs/swissgl/swissgl.mjs similarity index 100% rename from swissgl/swissgl.mjs rename to libs/swissgl/swissgl.mjs diff --git a/media/LordTubeMaster.svg b/media/LordTubeMaster.svg new file mode 100644 index 0000000..408833a --- /dev/null +++ b/media/LordTubeMaster.svg @@ -0,0 +1,13 @@ + + + + + + + + <iframe src="https://youtube.com/...">getDisplayMedia({ preferCurrentTab: true })Element Capture (restrictTo)Region Capture (cropTo)MediaStreamTrackProcessorTransformStreamMediaStreamTrackGenerator<canvas><video>WebGLThree.jsSwissGLWebGPUTensorFlow.jsONNX Runtime webTransformers.jsWebAssembly(Wasm)MediaPipeVanillaJSScreenCaptureAPIInsertableStreamsAPI \ No newline at end of file diff --git a/script.js b/script.js index 2f53269..93ab0a0 100644 --- a/script.js +++ b/script.js @@ -24,7 +24,7 @@ import 'https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-webgpu@4.21.0/dist import * as ort from 'https://cdn.jsdelivr.net/npm/onnxruntime-web@1.19.2/dist/ort.webgpu.min.mjs' ort.env.wasm.wasmPaths = 'https://cdn.jsdelivr.net/npm/onnxruntime-web@1.19.2/dist/' -import SwissGL from './swissgl/swissgl.mjs' +import SwissGL from './libs/swissgl/swissgl.mjs' import DotCamera from './models/dotcamera.js' import * as THREE from 'https://cdn.jsdelivr.net/npm/three@0.168.0/build/three.module.min.js'