Skip to content
Projets

À propos

RedGPU, une bibliothèque WebGPU pour JavaScript.

Jeux et émulation

Comment ces chiffres sont mesurés

What you can do

  • Self-Contained ESM & On-Demand WASM - Ships as a single ES module ready to run directly in the browser without a bundler. Heavy WASM decoders (Draco, Meshopt, KTX2 BasisU) load on demand (+0 KB core bundle overhead).
  • glTF 2.0 (23 Extensions) - Full PBR extensions + KHR_draco_mesh_compression, KHR/EXT_meshopt_compression, KHR_texture_basisu, KHR_materials_variants, KHR_animation_pointer, KHR_node_visibility, KHR_mesh_quantization, Zero-Copy GLB parsing, and Zero-GC animation updates.
  • PBR & Lighting - Metallic-Roughness, Clearcoat, Sheen, Iridescence, Anisotropy, Specular, 2-Pass Transmission & Volume, HDR IBL, Directional / Point / Spot lights, and shadow mapping.
  • Antialiasing & Post-Effects - TAA (with motion vectors & Kawase+Karis transmission downsampling), MSAA, FXAA, Bloom, Auto Exposure, Tone Mapping (Khronos PBR Neutral, ACES Filmic, Linear), SSAO, SSR, DoF, and custom post-effects.

Progression mesurée des étoiles

in 24h
0
in 7 days
+1
in 15 days
+1
in 1 month
+1

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

RedGPU Logo

RedGPU

TypeScript WebGPU 3D/2D graphics engine
Built from the ground up for WebGPU — PBR, glTF 2.0 (23 extensions), Post-Effects, and Physics.

Latest Release CI Status MIT License GitHub Stars Follow on X

🎮 Live Examples · 📖 User Manual · 📚 API Reference · 🚀 Releases

🌍 Open World Showcase

Real-time WebGPU terrain, physically-based sky atmosphere, water reflection/refraction, wind-driven foliage, and directional shadows.

📦 glTF 2.0 & PBR Showcase (V4.6.0)

23 official glTF 2.0 extensions, on-demand WASM decoders (Draco · Meshopt · KTX2), real-time material variants, and stabilized TAA transmission.


✨ Key Features

Category Highlights
Self-Contained ESM & On-Demand WASM Ships as a single ES module ready to run directly in the browser without a bundler. Heavy WASM decoders (Draco, Meshopt, KTX2 BasisU) load on demand (+0 KB core bundle overhead).
glTF 2.0 (23 Extensions) Full PBR extensions + KHR_draco_mesh_compression, KHR/EXT_meshopt_compression, KHR_texture_basisu, KHR_materials_variants, KHR_animation_pointer, KHR_node_visibility, KHR_mesh_quantization, Zero-Copy GLB parsing, and Zero-GC animation updates.
PBR & Lighting Metallic-Roughness, Clearcoat, Sheen, Iridescence, Anisotropy, Specular, 2-Pass Transmission & Volume, HDR IBL, Directional / Point / Spot lights, and shadow mapping.
Antialiasing & Post-Effects TAA (with motion vectors & Kawase+Karis transmission downsampling), MSAA, FXAA, Bloom, Auto Exposure, Tone Mapping (Khronos PBR Neutral, ACES Filmic, Linear), SSAO, SSR, DoF, and custom post-effects.
Unified 3D & 2D Engine Scene graph, GPU Instancing, LOD, Skinning & Morph targets, TextField2D / TextField3D, Sprites, Particle systems, Atmosphere, Water/Lake, and optional Rapier 3D physics plugin.

🚀 Quick Start

RedGPU ships as a single ES module that runs directly in any WebGPU-enabled browser — no bundler required.

<canvas id="redgpu-canvas" style="width: 100vw; height: 100vh; display: block;"></canvas>
<script type="module">
    import * as RedGPU from 'https://redcamel.github.io/RedGPU/dist/index.js';

    const canvas = document.getElementById('redgpu-canvas');

    RedGPU.init(canvas, (redGPUContext) => {
        const scene = new RedGPU.Display.Scene();
        const light = new RedGPU.Light.DirectionalLight();
        scene.lightManager.addDirectionalLight(light);

        const controller = new RedGPU.Camera.OrbitController(redGPUContext);
        controller.distance = 5;

        const view = new RedGPU.Display.View3D(redGPUContext, scene, controller);
        redGPUContext.addView(view);

        const mesh = new RedGPU.Display.Mesh(
                redGPUContext,
                new RedGPU.Primitive.Box(redGPUContext),
                new RedGPU.Material.PhongMaterial(redGPUContext, '#4fc3f7')
        );
        scene.addChild(mesh);

        const renderer = new RedGPU.Renderer();
        renderer.start(redGPUContext, () => {
            mesh.rotationX += 0.5;
            mesh.rotationY += 0.8;
        });
    });
</script>

Loading a glTF / GLB Model (async/await)

const loader = await RedGPU.GLTFLoader.loadAsync(redGPUContext, 'model.glb');
scene.addChild(loader.resultMesh);

🎮 Live Examples

Explore hundreds of interactive WebGPU examples covering 3D/2D rendering, PBR, glTF 2.0, post-effects, atmosphere, water, and physics.


🎬 More Showcase Videos

Click to expand showcase videos (3)

🌐 Browser Support

RedGPU targets browsers with native WebGPU support:

  • Chrome / Edge (Desktop & Android)
  • Safari (macOS / iOS with WebGPU enabled)
  • Firefox (Nightly / WebGPU enabled)

🛠️ Development

npm install
npm run typecheck   # TypeScript static type check
npm run test:unit   # Vitest unit tests
npm run build       # Rollup production bundle (core + Rapier plugin)
npm run test:e2e    # Playwright Chromium WebGPU E2E tests

📄 License

RedGPU is released under the MIT License.

Explorer des projets similaires

Chargement…