Add shadertoy-server example for WebGL shader rendering (#226)
Introduces a new MCP App example that renders ShaderToy-compatible GLSL fragment shaders in real-time using WebGL 2.0 and ShaderToyLite.js. Features: - Standard ShaderToy uniforms (`iTime`, `iResolution`, `iMouse`, etc.) - Multi-pass rendering with buffers A-D for feedback effects - Shader compilation error overlay Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
b273279849
commit
ec3409aa91
2 changed files with 1641 additions and 1901 deletions
|
|
@ -1,8 +1,11 @@
|
|||
import { test, expect, type Page, type ConsoleMessage } from "@playwright/test";
|
||||
|
||||
// Dynamic element selectors to mask for screenshot comparison
|
||||
//
|
||||
// Note: CSS modules generate unique class names, so we use attribute selectors
|
||||
// with partial matches (e.g., [class*="heatmapWrapper"]) for those components
|
||||
//
|
||||
// Note: map-server uses SLOW_SERVERS timeout instead of masking to wait for tiles
|
||||
const DYNAMIC_MASKS: Record<string, string[]> = {
|
||||
integration: ["#server-time"], // Server time display
|
||||
"basic-preact": ["#server-time"], // Server time display
|
||||
|
|
@ -13,7 +16,7 @@ const DYNAMIC_MASKS: Record<string, string[]> = {
|
|||
"basic-vue": ["#server-time"], // Server time display
|
||||
"cohort-heatmap": ['[class*="heatmapWrapper"]'], // Heatmap grid (random data)
|
||||
"customer-segmentation": [".chart-container"], // Scatter plot (random data)
|
||||
// Note: map-server uses SLOW_SERVERS timeout instead of masking to wait for tiles
|
||||
shadertoy: ["#canvas"], // WebGL shader canvas (animated)
|
||||
"system-monitor": [
|
||||
".chart-container", // CPU chart (highly dynamic)
|
||||
"#status-text", // Current timestamp
|
||||
|
|
@ -46,6 +49,7 @@ const SERVERS = [
|
|||
{ key: "customer-segmentation", name: "Customer Segmentation Server" },
|
||||
{ key: "map-server", name: "CesiumJS Map Server" },
|
||||
{ key: "scenario-modeler", name: "SaaS Scenario Modeler" },
|
||||
{ key: "shadertoy", name: "ShaderToy Server" },
|
||||
{ key: "sheet-music", name: "Sheet Music Server" },
|
||||
{ key: "system-monitor", name: "System Monitor Server" },
|
||||
{ key: "threejs", name: "Three.js Server" },
|
||||
|
|
|
|||
BIN
tests/e2e/servers.spec.ts-snapshots/shadertoy.png
Normal file
BIN
tests/e2e/servers.spec.ts-snapshots/shadertoy.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
Loading…
Reference in a new issue