engine

playcanvasMIT活跃维护

基于 WebGL、WebGPU、WebXR 和 glTF 的浏览器端图形运行时,用来在网页里跑 3D 游戏和交互场景,支持高斯泼溅等新渲染特性。

Powerful web graphics runtime built on WebGL, WebGPU, WebXR and glTF

v2.24.0发布于 2026-11-09 16:22 UTC17,255star +18 / 7 天2,053fork同步于 2026-11-10 05:24 UTC

怎么上手

从 README 代码块原样提取,可能是其中一种安装方式
npm install playcanvas
npm create playcanvas@latest
npm install
硬件要求

README 没有说明硬件要求。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

这个项目的说明还在生成中,先参考下面「最近发版」和 README。

最近发版

5 个版本v2.24.0
  1. v2.24.0最新正式版2026-11-09 · 2026-11-09 16:22 UTC

    New Features

    • Introduce CameraFrameEffect and convert the vignette and grading effects by @mvaligursky in #9666
    • Add SMAA anti-aliasing as an opt-in CameraFrame effect by @mvaligursky in #9747
    • Add auto exposure as an opt-in CameraFrame effect by @mvaligursky in #9757
    • Add a lens flare effect to CameraFrame by @mvaligursky in #9734
    • Add temporal upscaling to the TAA of CameraFrame by @mvaligursky in #9739
    • Add a channel mixer to the CameraFrame color grading by @mvaligursky in #9939
    • Add DynamicSkyEffect, a camera frame effect rendering a dynamic sky by @mvaligursky in #9765
    • Add haze to DynamicSkyEffect by @mvaligursky in #9897
    • Add an Editor script for the DynamicSkyEffect by @mvaligursky in #9859
    • Add Sky#enabled and let the sky be hidden per camera by @mvaligursky in #9760
    • Make the CameraFrameEffect pass hooks public by @mvaligursky in #9841
    • Add frame passes which execute after a camera renders by @mvaligursky in #9707
    • Add onBefore and onAfter callbacks to all frame passes by @mvaligursky in #9788
    • Make the frame pass classes public by @mvaligursky in #9822
    • Make RenderPassForward and CameraComponent#framePasses public by @mvaligursky in #9839
    • Add ComputePass, which dispatches computes at a position in the frame by @mvaligursky in #9710
    • Add XR view selection and before/after callbacks to ComputePass by @mvaligursky in #9722
    • Add Compute#setupDispatchThreads to dispatch for a number of threads by @mvaligursky in #9733
    • Add scene depth and color map access to compute shaders by @mvaligursky in #9680
    • Add per-camera scene depth and color map handles by @mvaligursky in #9667
    • Add the size of the scene map to its handle by @mvaligursky in #9844
    • Add planar reflections to StandardMaterial by @mvaligursky in #9902
    • Add a Gaussian mipmap filter, and smoother planar reflections by @mvaligursky in #9932
    • Add AgX and AgX Punchy tonemapping by @mvaligursky in #9874
    • Support the KHR_materials_diffuse_transmission glTF extension by @willeastcott in #9558
    • Decode EXT_meshopt_compression and KHR_meshopt_compression glTF buffer views by @willeastcott in #9738
    • Add clipping planes to cameras, mesh instances and render components by @willeastcott in #9755
    • Add shadowBounds to fit the shadow of a directional light to a box by @mvaligursky in #9791
    • Add RoundedBoxGeometry by @mvaligursky in #9849
    • Render to a layer of a 2D texture array by @mvaligursky in #9689
    • Create and upload volume textures on WebGPU by @mvaligursky in #9695
    • Read and copy the depth slices of volume textures by @mvaligursky in #9696
    • Render to the depth slices of volume textures by @mvaligursky in #9697
    • Add SOG v3 loading and over-unity opacity rendering by @slimbuck in #9873
    • Load SPZ version 3 files, enabling SPZ based LCC2 scenes by @mvaligursky in #9980
    • Load XGRIDS LCC2 gsplat scenes by @mvaligursky in #9885
    • Add SH band 4 support for PLY gaussian splats by @mvaligursky in #9796
    • Add VoxelOccupancy and a gaussian splat particle blast example by @mvaligursky in #9907
    • Add camera, light, shape and icon gizmos with snapping handles by @kpal81xd in #9809
    • Add BoundingBoxGizmo to outline a selection's bounds with corner brackets by @kpal81xd in #9804
    • Add gizmo transform readout and Blender-style rotate angle sector by @kpal81xd in #9801
    • Add Grid extra and rebuild the Grid script on it by @kpal81xd in #9808
    • Add letterSpacing to text elements by @mvaligursky in #9728
    • Load TexturePacker and Aseprite sprite sheets as texture atlases by @willeastcott in #9923
    • Add per-button mouse mapping and ground pan to CameraControls by @mvaligursky in #9944
    • Add an optional screen size to CameraComponent worldToScreen and screenToWorld by @mvaligursky in #9911

    Changes

    • Hold the light mask and all uv sets as shader define flags by @mvaligursky in #9659
    • Remove the legacy LIT_OLD_AMBIENT combine and LIT_DIFFUSE_MAP by @mvaligursky in #9681
    • Deprecate the legacy post effec
  2. v2.23.32026-10-15 · 2026-10-15 15:44 UTC
    查看更新说明

    Fixes

    • Warn about unregistered render containers only when preload starts by @mvaligursky in #9771

    Full Changelog: https://github.com/playcanvas/engine/compare/v2.23.2...v2.23.3

  3. v2.23.22026-10-09 · 2026-10-09 15:01 UTC
    查看更新说明

    Fixes

    • Stream gsplat LOD levels coarsest first across the whole view by @mvaligursky in #9694
    • Keep the Node worker_threads require out of bundled worker code by @mvaligursky in #9656
    • Keep the canvas resolution when its client size is zero by @mvaligursky in #9671
    • Skip the MiniStats draw when it has nothing to render by @mvaligursky in #9672

    Full Changelog: https://github.com/playcanvas/engine/compare/v2.23.1...v2.23.2

  4. v2.23.12026-10-07 · 2026-10-07 10:49 UTC
    查看更新说明

    Fixes

    • Fix apps not being announced to the devtools hook from every build by @mvaligursky in #9646
    • Keep MiniStats sized to the canvas when it resizes without a resizecanvas event by @slimbuck in #9661
    • Do not fire tween events that have no name by @mvaligursky in #9650
    • Resolve the inspector's engine peer to the linked engine by @mvaligursky in #9641

    Full Changelog: https://github.com/playcanvas/engine/compare/v2.23.0...v2.23.1

  5. v2.23.02026-10-01 · 2026-10-01 12:28 UTC
    查看更新说明

    Changes

    • Add distanceSq by @AlexAPPi in #9313
    • Add useFog/useTonemap to ParticleSystemComponent, deprecate noFog by @mvaligursky in #9340
    • Load audio assets regardless of the URL's file extension by @mvaligursky in #9365
    • Poll gamepads every frame without allocating by @willeastcott in #9470
    • Run the engine headless in Node.js without jsdom by @willeastcott in #9504
    • Replace batch.origMeshInstances[0] with sourceMeshInstance variable by @AlexAPPi in #9454

    Rendering

    • Store mesh instance matrices in a persistent storage buffer on WebGPU by @mvaligursky in #9614
    • Add a bloom threshold to CameraFrame by @mvaligursky in #9455
    • Add per-attachment clear colors to the camera for multiple render targets by @mvaligursky in #9333
    • Support stencil clears inside a render pass on WebGPU by @mvaligursky in #9612
    • Allow camera viewports extending past the render target on WebGPU by @mvaligursky in #9516
    • Add partial vertex and index buffer uploads by @mvaligursky in #9401
    • Add screen_size to forward view uniforms and deprecate uScreenSize by @mvaligursky in #9331
    • Pack forward view uniforms to reduce alignment padding by @mvaligursky in #9332
    • Move per-pass uniforms into the view uniform buffer by @mvaligursky in #9582
    • Move textureBias into the view uniform buffer by @mvaligursky in #9484
    • Supply per-pass textures through the WebGPU view bind group by @mvaligursky in #9521
    • Publish the scene environment textures under their own uniforms by @mvaligursky in #9364
    • Add an opt-in std140 packing order to UniformBufferFormat by @mvaligursky in #9400
    • Stop creating typed array views for every dynamic uniform buffer update by @mvaligursky in #9418
    • Retain WebGPU render pipelines between draws by @mvaligursky in #9380
    • Look the WebGPU render pipeline up only when its state changes by @mvaligursky in #9492
    • Write WebGPU buffer data directly from its storage by @mvaligursky in #9379
    • Pass WebGPU bind group dynamic offsets as a typed array by @mvaligursky in #9487
    • Skip WebGPU vertex and index buffer binds the render pass already has by @mvaligursky in #9496
    • Keep the backing store of the device vertex buffer list across draws by @mvaligursky in #9498
    • Assign bind group slots by index during the update by @mvaligursky in #9425
    • Split the bind group update into a scope path and an owner path by @mvaligursky in #9429
    • Leave a texture out of the mesh bind group when a supplied group has it by @mvaligursky in #9436
    • Let the graphics device own the built-in textures by @mvaligursky in #9438
    • Rebuild layer mesh arrays lazily after removals by @mvaligursky in #9378
    • Pack the mesh instance light mask into 8 bits, for 24 shader define flags by @mvaligursky in #9617
    • Rename supportsUniformBuffers to usesMeshBindGroups by @mvaligursky in #9383
    • Split WebGPU device creation from device initialization by @mvaligursky in #9483
    • Ignore MeshInstance#setIndirect where indirect draw is not supported by @mvaligursky in #9462
    • Remove obsolete immediate mesh rendering by @mvaligursky in #9385
    • Remove the shader dump and precompile workflow by @mvaligursky in #9477
    • Remove obsolete Mac Chrome blitFramebuffer workaround by @mvaligursky in #9318
    • Remove obsolete Safari texture unit workaround by @mvaligursky in #9319

    Lighting & Shadows

    • Move light uniforms into the view uniform buffer, uploaded once per pass by @mvaligursky in #9482
    • Give every light an absolute slot, shared by all light masks by @mvaligursky in #9475
    • Dispatch the lights of a pass once, not per light mask by @mvaligursky in #9479
    • Consolidate light slots into a LightList shared by renderer, shaders and lightmapper by @mvaligursky in #9481
    • Make world-cluster allocation request/execute based by @mvaligursky in #9473
    • Fade directional shadows at the far distance by @mvaligursky in #9417
    • Skip shadow sampling beyond the far distance by @mvaligursky in #9419
    • Request directional shadow culling from s

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    PlayCanvas Engine

    NPM Version NPM Downloads License Discord Reddit X

    | User Manual | API Reference | Examples | Blog | Forum |

    PlayCanvas is an open-source game engine built on WebGL2 and WebGPU. Use it to create interactive 3D apps, games and visualizations that run in any browser on any device.

    English 中文 日本語 한글

    Install

    npm install playcanvas
    

    Or scaffold a full project in seconds with create-playcanvas:

    npm create playcanvas@latest
    

    Usage

    Here's a super-simple Hello World example - a spinning cube!

    import {
      Application,
      Color,
      Entity,
      FILLMODE_FILL_WINDOW,
      RESOLUTION_AUTO
    } from 'playcanvas';
    
    const canvas = document.createElement('canvas');
    document.body.appendChild(canvas);
    
    const app = new Application(canvas);
    
    // fill the available space at full resolution
    app.setCanvasFillMode(FILLMODE_FILL_WINDOW);
    app.setCanvasResolution(RESOLUTION_AUTO);
    
    // ensure canvas is resized when window changes size
    window.addEventListener('resize', () => app.resizeCanvas());
    
    // create box entity
    const box = new Entity('cube');
    box.addComponent('render', {
      type: 'box'
    });
    app.root.addChild(box);
    
    // create camera entity
    const camera = new Entity('camera');
    camera.addComponent('camera', {
      clearColor: new Color(0.1, 0.2, 0.3)
    });
    app.root.addChild(camera);
    camera.setPosition(0, 0, 3);
    
    // create directional light entity
    const light = new Entity('light');
    light.addComponent('light');
    app.root.addChild(light);
    light.setEulerAngles(45, 0, 0);
    
    // rotate the box according to the delta time since the last frame
    app.on('update', dt => box.rotate(10 * dt, 20 * dt, 30 * dt));
    
    app.start();
    

    Want to play with the code yourself? Edit it on CodePen.

    A full guide to setting up a local development environment based on the PlayCanvas Engine can be found here.

    Features

    PlayCanvas is a fully-featured game engine.

    • 🧊 Graphics - Advanced 2D + 3D graphics engine built on WebGL2 & WebGPU
    • 💠 Gaussian Splatting - First-class support for loading and rendering 3D Gaussian Splats
    • 🥽 XR - Built-in support for immersive AR and VR experiences via WebXR
    • ⚛️ Physics - Full integration with 3D rigid-body physics engine ammo.js
    • 🏃 Animation - Powerful state-based animations for characters and arbitrary scene properties
    • 🎮 Input - Mouse, keyboard, touch and gamepad APIs
    • 🔊 Sound - 3D positional sounds built on the Web Audio API
    • 📦 Assets - Asynchronous streaming system built on glTF 2.0, Draco and Basis compression
    • 📜 Scripts - Write game behaviors in TypeScript or JavaScript

    Ecosystem

    Build with PlayCanvas your way:

    PackageDescription
    playcanvasCore engine (you are here)
    @playcanvas/reactReact renderer for PlayCanvas
    @playcanvas/web-componentsDeclarative 3D via Custom Elements
    create-playcanvasProject scaffolding CLI
    PlayCanvas EditorBrowser-based visual editor

    Project Showcase

    Many games and apps have been published using the PlayCanvas engine. Here is a small selection:

    Seemore After The Flood Casino
    Swooop dev Archer Gaussian Splat Statues
    Car Star-Lord Global Illumination

    You can see more games on the PlayCanvas website.

    Users

    PlayCanvas is used by leading companies in video games, advertising and visualization such as:
    Animech, Arm, BMW, Disney, Facebook, Famobi, Funday Factory, IGT, King, Miniclip, Leapfrog, Mojiworks, Mozilla, Nickelodeon, Nordeus, NOWWA, PikPok, PlaySide Studios, Polaris, Product Madness, Samsung, Snap, Spry Fox, Zeptolab, Zynga

    How to build

    Ensure you have Node.js 18+ installed. Then, install all of the required Node.js dependencies:

    npm install
    

    Now you can run various build options:

    CommandDescriptionOutputs To
    npm run buildBuild all engine flavors and type declarationsbuild
    npm run docsBuild engine API reference docsdocs