const scrConsole = document.createElement('div');
scrConsole.id = 'screenConsole';
scrConsole.style.position = 'absolute';
scrConsole.style.zIndex = 9e9;
scrConsole.style.bottom = '5px';
scrConsole.style.left = '5px';
scrConsole.style.color = 'white';
scrConsole.style.fontSize = '.8em';
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ | |
/* A entry point for the browser bundle version. This gets compiled by: | |
browserify --debug ./ccxt.browser.js > ./build/ccxt.browser.js | |
*/ | |
window.ccxt = require ('./ccxt') | |
},{"./ccxt":2}],2:[function(require,module,exports){ | |
"use strict"; |
N png -> mp4
ffmpeg -r 30 -i "img%02d.png" -pix_fmt yuv420p -movflags +faststart perfectloop.mp4
trim first 5 second
ffmpeg -ss 00:00:05 -t 00:00:10 -i 1.mov 2.mov
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This simple snippet is a good start for FMA emulation in javascript. | |
// It pass a LOT of accuracy tests but can't handle cases with overflows and odd rounding | |
// IEEE compliant version is developed here: https://github.com/munsocket/proposal-fma/ | |
export function fma(a, b, c) { | |
let LO; | |
function twoSum(a, b) { | |
let s = a + b; | |
let a1 = s - b; |
https://github.com/gpuweb/gpuweb/wiki/Implementation-Status#implementation-status
Windows bat ( canary )
chrome --enable-unsafe-webgpu --host-resolver-rules="MAP *google.com 127.0.0.1" --new-window "https://compute.toys"
MacOS applescript (canary package)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// copy paste this in console | |
function shader_exporter(duration, width, heigth, paused) { | |
document.getElementById('demogl').style.width = width + 'px'; | |
document.getElementById('demogl').style.height = heigth + 'px'; | |
document.getElementById('myResetButton').click(); | |
document.getElementById('myRecord').click(); | |
if (paused) document.getElementById('myPauseButton').click(); | |
let t0 = performance.now(); | |
function loop(){ | |
if (performance.now() - t0 > duration * 1000) { |
Revision: 06.08.2023, https://compute.toys/view/407
fn sdSphere(p: vec3f, r: f32) -> f32 {
return length(p) - r;
}
Revision: 06.08.2023, https://compute.toys/view/398
fn sdCircle(p: vec2f, r: f32) -> f32 {
return length(p) - r;
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Clone and build WebKit | |
git clone https://github.com/WebKit/WebKit.git WebKit | |
cd WebKit | |
Tools/Scripts/build-webkit -cmakeargs="-DENABLE_WEBGPU_BY_DEFAULT=1" --debug | |
2) Run your app | |
__XPC_METAL_CAPTURE_ENABLED=1 Tools/Scripts/run-minibrowser --debug --url http://localhost:5000/index.html#/loaders/gsplat |