MCPcopy
hub / github.com/Orillusion/orillusion

github.com/Orillusion/orillusion @v0.8.4 sqlite

repository ↗ · DeepWiki ↗ · release v0.8.4 ↗
10,219 symbols 27,436 edges 1,040 files 1,287 documented · 13%
README

Cover Art

Orillusion

Test npm

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 or Webpack.

  • Install dependencies:
npm install @orillusion/core --save
  • Import on-demand:
import { Engine3D, Camera3D } from '@orillusion/core'
  • Import globally:
import * as Orillusion from '@orillusion/core'

CDN

In order to use the engine more conveniently, we support to use native <script> tag to import Orillusion. Three different ways to import using the official CDN link:

  • Global Build: You can use Orillusion directly from a CDN via a script tag:
<script src="https://unpkg.com/@orillusion/core/dist/orillusion.umd.js"></script>
<script>  
    const { Engine3D, Camera3D } = Orillusion  
</script>

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 way for development. As most browsers have supported ES module, we just need to import the ES build version of orillusion.es.js
<script type="module">  
    import { Engine3D, Camera3D } from "https://unpkg.com/@orillusion/core/dist/orillusion.es.js" 
</script>
  • Import Maps: In order to manage the name of dependencies, we recommend using Import Maps

<script  type="importmap">  
{  
    "imports": { "@orillusion/core": "https://unpkg.com/@orillusion/core/dist/orillusion.es.js" }  
}  
</script>  

<script  type="module">  
    import { Engine3D, Camera3D } from "@orillusion/core"
</script>

Usage

Create Engine3D instance

At the beginning, we need to use Engine3D.init() and then the instance Engine3D will be created for further use

import { Engine3D } from '@orillusion/core' 
Engine3D.init().then(()=>{  
    // Next
})

As Engine3D.init() is asynchronous, we recommend using async/await in the code

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 <canvas> with a id

<canvas id="canvas" width="800" height="500" />

Next, we need to get the <canvas> via id and then init engine by passing the <canvas> to canvasConfig

import { Engine3D } from '@orillusion/core';  
let canvas = document.getElementById('canvas')  

await Engine3D.init({  
    canvasConfig: { canvas }  
})

Please read the Docs 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

Dev and Contribution

Please make sure to read the Contributing Guide before developing or making a pull request.

License

Orillusion engine is released under the MIT license.

Extension points exported contracts — how you extend this code

ITexture (Interface)
(no doc) [8 implementers]
src/gfx/graphics/webGpu/core/texture/ITexture.ts
TimeInterpolator (Interface)
(no doc) [20 implementers]
src/math/TimeInterpolator.ts
IBound (Interface)
(no doc) [4 implementers]
src/core/bound/IBound.ts
IUIInteractive (Interface)
(no doc) [2 implementers]
src/components/gui/uiComponents/IUIInteractive.ts
VideoFrame (Interface)
(no doc) [1 implementers]
packages/media-extention/VideoTexture.ts
FontOptions (Interface)
(no doc)
packages/geometry/lib/opentype.d.ts
ChildShape (Interface)
(no doc)
packages/physics/utils/CollisionShapeUtil.ts
GUIParams (Interface)
(no doc)
packages/debug/dat.gui.module.d.ts

Core symbols most depended-on inside this repo

S
called by 34102
packages/ammo/ammo.js
apply
called by 1921
src/textures/AtmosphericScatteringSky.ts
R
called by 899
packages/ammo/ammo.js
push
called by 879
src/core/tree/kdTree/KDTreeNode.ts
addComponent
called by 739
src/core/entities/Object3D.ts
addChild
called by 534
src/core/entities/Entity.ts
ma
called by 513
packages/draco/draco_decoder_gltf.js
add
called by 441
src/math/Vector2.ts

Shape

Method 5,022
Function 3,103
Class 2,003
Enum 60
Interface 31

Languages

TypeScript100%

Modules by API surface

packages/ammo/ammo.js1,888 symbols
packages/draco/draco_decoder_gltf.js516 symbols
packages/geometry/lib/opentype.js351 symbols
packages/ammo/ammo.d.ts236 symbols
src/gfx/graphics/webGpu/shader/converter/StatementNode.ts126 symbols
src/math/Vector3.ts82 symbols
src/math/Matrix4.ts81 symbols
packages/wasm-matrix/matrix.js69 symbols
packages/debug/dat.gui.module.js69 symbols
src/math/MathUtil.ts67 symbols
src/core/pool/memory/MemoryInfo.ts65 symbols
src/math/TimeInterpolator.ts59 symbols

Dependencies from manifests, versioned

@orillusion/ammo>=0.2.1 · 1×
@orillusion/core0.7.0 · 1×
@webgpu/types0.1.45 · 1×
conventional-changelog-cli2.2.2 · 1×
electron31.1.0 · 1×
typedoc0.25.7 · 1×
typedoc-plugin-markdown3.17.1 · 1×
typescript5.3.3 · 1×
vite5.3.1 · 1×
xvfb-maybe0.2.1 · 1×

For agents

$ claude mcp add orillusion \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact