add threejs demo

This commit is contained in:
Simon Knott 2024-08-07 14:59:39 +02:00
parent 59a5817f87
commit 39533d021a
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -56,3 +56,14 @@ test('Go JS', async ({ page }) => {
} }
}); });
}); });
test('ThreeJS', async ({ page }) => {
await page.addInitScript(() => {
const original = window.HTMLCanvasElement.prototype.getContext;
window.HTMLCanvasElement.prototype.getContext = function(id, options) { return original.call(this, id, {...options, preserveDrawingBuffer: true }) }
});
await page.goto('https://threejs.org/examples/webgl_animation_skinning_morph.html');
await page.waitForTimeout(1000);
await page.getByLabel('Surprised').fill('1');
await page.waitForTimeout(1000);
});