MCPcopy Index your code
hub / github.com/Reon90/redcube

github.com/Reon90/redcube @5.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 5.0.0 ↗ · + Follow
1,118 symbols 2,304 edges 55 files 16 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

redcube RedCube

The GLTF viewer with WebGL2 and WebGPU backends.

npm downloads typescript last commit size eslint

WebGL2 demo | WebGPU demo

The javascript rendering library for Khronos glTF 2.0 format.

Features

• glTF 2.0 Specification

• KHR_draco_mesh_compression

• KHR_materials_dispersion

KHR_materials_dispersion

• KHR_materials_anisotropy

KHR_materials_anisotropy

• KHR_materials_diffuse_transmission

KHR_materials_diffuse_transmission

• KHR_materials_diffuse_transmission + subsurface scatering

sss

• KHR_lights_punctual

KHR_lights_punctual

• KHR_materials_clearcoat

KHR_materials_clearcoat

• KHR_materials_pbrSpecularGlossiness

• KHR_materials_sheen

KHR_materials_sheen

• KHR_materials_transmission

KHR_materials_transmission

• KHR_materials_volume

KHR_materials_volume

• KHR_materials_emissive_strength

• KHR_materials_iridescence

KHR_materials_iridescence

• KHR_materials_unlit

• KHR_materials_variants

KHR_materials_variants

• KHR_mesh_quantization

• KHR_texture_basisu

• KHR_texture_transform

• EXT_lights_image_based

EXT_lights_image_based

• KHR_materials_ior

KHR_materials_ior

Check list

Platforms

• Browsers with WebGL 2.0 support

• Browsers with WebGPU support (Chrome 113 and above)

• Node.js renderless

How to convert 3D model to gltf

• Blender 2.80 File -> Export -> glTF 2.0

Sketchfab 100,000+ models

Usage

<canvas style="width: 600px; height: 600px;"></canvas>

const renderer = new RedCube('./box.gltf', canvas);
renderer.init(() => {
    console.log('loaded');
});

Install

npm install redcube.js

Extension points exported contracts — how you extend this code

WEBGPU (Interface)
(no doc)
index.d.ts
AccessorSparseIndices (Interface)
(no doc)
GLTF.ts
Texture (Interface)
(no doc)
src/particles.ts
Entry (Interface)
(no doc)
src/container.ts
Texture (Interface)
(no doc)
src/env.ts
Texture (Interface)
(no doc)
src/env.webgpu.ts
Texture (Interface)
(no doc)
src/postprocessing.ts
Constructable (Interface)
(no doc)
src/parse.ts

Core symbols most depended-on inside this repo

add
called by 87
src/objects/uniform.ts
set
called by 68
src/matrix.ts
get
called by 61
src/container.ts
throwBindingError
called by 36
libktx.js
max
called by 33
src/matrix.ts
min
called by 32
src/matrix.ts
normalize
called by 30
src/matrix.ts
multiply
called by 25
src/matrix.ts

Shape

Function 612
Method 364
Class 82
Interface 60

Languages

TypeScript100%

Modules by API surface

libktx.js373 symbols
src/matrix.ts88 symbols
twgsl.js86 symbols
glslang.js47 symbols
draco_decoder_nodejs.js46 symbols
src/parse.ts39 symbols
src/utils.ts33 symbols
GLTF.ts28 symbols
src/env.webgpu.ts26 symbols
src/postprocessing.webgpu.ts25 symbols
src/postprocessing.ts23 symbols
src/objects/mesh.ts22 symbols

For agents

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

⬇ download graph artifact