https://github.com/evanw/webgl-recorder
Record all WebGL calls from any app for playback later
https://github.com/evanw/webgl-recorder
Last synced: 3 months ago
JSON representation
Record all WebGL calls from any app for playback later
- Host: GitHub
- URL: https://github.com/evanw/webgl-recorder
- Owner: evanw
- Created: 2017-01-13T00:49:24.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-10-21T06:48:55.000Z (over 4 years ago)
- Last Synced: 2025-03-17T12:02:09.406Z (3 months ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 81
- Watchers: 2
- Forks: 15
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WebGL Recorder
This is a small script that lets you record the WebGL calls of any app for playback later.
Example use case: create an easily reproducible test case of a complex WebGL app that demonstrates a browser bug.## Demo
1. Clone this repo
2. Open [demo/app.html](https://evanw.github.io/webgl-recorder/demo/app.html) in your browser
3. Wait until you want to stop recording, then click "Download Trace" (recording starts immediately)
4. Move the saved "trace.js" file next to [demo/playback.html](https://evanw.github.io/webgl-recorder/demo/playback.html) on your local machine
5. Open [demo/playback.html](https://evanw.github.io/webgl-recorder/demo/playback.html) in your browser to view the playback## Usage
Add `` to the page containing the WebGL code you want to record.
All WebGL contexts will begin recording immediately.
If `gl` is the `WebGLRenderingContext`, the current trace is accessible off of `gl.trace`.
The trace can be compiled to JavaScript playback code and then downloaded to a file using `gl.downloadTrace()`, or just compiled to a string without downloading using `gl.compileTrace()`.## License
This code is licensed under [CC0](https://creativecommons.org/publicdomain/zero/1.0/).