# orillusion **Repository Path**: mirrors/orillusion ## Basic Information - **Project Name**: orillusion - **Description**: Orillusion 引擎是一款完全支持 WebGPU 标准的轻量级渲染引擎 - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: main - **Homepage**: https://www.oschina.net/p/orillusion - **GVP Project**: No ## Statistics - **Stars**: 10 - **Forks**: 4 - **Created**: 2023-05-11 - **Last Updated**: 2025-07-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ![Cover Art](https://github.com/Orillusion/orillusion-webgpu-samples/blob/main/logo_new.png) ## Orillusion [![Test](https://github.com/Orillusion/orillusion/actions/workflows/ci.yml/badge.svg)](https://github.com/Orillusion/orillusion/actions/workflows/ci.yml) [![npm](https://img.shields.io/npm/v/@orillusion/core)](https://www.npmjs.com/package/@orillusion/core) `Orillusion` is a pure Web3D rendering engine which is fully developed based on the `WebGPU` standard. It aims to achieve desktop-level rendering effects and supports 3D rendering of complex scenes in the browser. ## Need to know Beta version, **NOT** recommended for any commercial application. ## Contributing (ongoing) `WebGPU` is the latest technology in the web domain and will play a crucial role in terms of 3D rendering as well as `AI/LLM` scenarios. We aim to create a dedicated technical community for the `WebGPU` field, bringing together outstanding developers. Hope more and more `front-end` developers could stay updated with the latest Web technologies `NOT ONLY` image slicing for web design. Specifically, we will continuously update the excellent samples provided by open-source contributors, allowing everyone to see better works. Hope it could help highlight the very talented individual developers within the community! ## Install ### NPM We recommend using front-end build tools for developing Web3D applications, such [Vite](https://vitejs.dev/) or [Webpack](https://webpack.js.org/). - Install dependencies: ```text npm install @orillusion/core --save ``` - Import on-demand: ```javascript import { Engine3D, Camera3D } from '@orillusion/core' ``` - Import globally: ```javascript import * as Orillusion from '@orillusion/core' ``` ### CDN In order to use the engine more conveniently, we support to use native ` ``` The above link loads the global build of `Orillusion`, where all top-level APIs are exposed as properties on the global `Orillusion` object. - **ESModule Build:** We recommend using the [ESModule](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Modules) way for development. As most browsers have supported `ES` module, we just need to import the `ES` build version of `orillusion.es.js` ```html ``` - **Import Maps:** In order to manage the name of dependencies, we recommend using [Import Maps](https://caniuse.com/import-maps) ```html ``` ## Usage ### Create Engine3D instance At the beginning, we need to use `Engine3D.init()` and then the instance `Engine3D` will be created for further use ```javascript import { Engine3D } from '@orillusion/core' Engine3D.init().then(()=>{ // Next }) ``` As `Engine3D.init()` is asynchronous, we recommend using `async/await` in the code ```javascript import { Engine3D } from '@orillusion/core' async function demo(){ await Engine3D.init(); // Next } demo() ``` ### Create canvas In default, `Engine3D.init()`will create a `canvas` the same size with the window. Also, we could create a `canvas` manually using tag `` with a `id` ```html ``` Next, we need to get the `` via `id` and then init engine by passing the `` to `canvasConfig` ```javascript import { Engine3D } from '@orillusion/core'; let canvas = document.getElementById('canvas') await Engine3D.init({ canvasConfig: { canvas } }) ``` Please read the [Docs](https://www.orillusion.com/guide/) to Learn More. ## Platform **Windows/Mac/Linux:** - Chrome 113+ - Edge: 113+ **Android (Behind the `enable-unsafe-webgpu` flag):** - Chrome Canary 113+ - Edge Canary 113+ ## Useful links - [Official Web Site](https://www.orillusion.com/) - [Documentation](https://www.orillusion.com/guide/) - [Forum](https://forum.orillusion.com/) ## Dev and Contribution Please make sure to read the [Contributing Guide](.github/contributing.md) before developing or making a pull request. ## License Orillusion engine is released under the [MIT](https://opensource.org/licenses/MIT) license.