minecraft-renderer 0.1.80 → 0.1.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -1
- package/dist/minecraft-renderer.js +68 -68
- package/dist/minecraft-renderer.js.meta.json +1 -1
- package/dist/threeWorker.js +437 -437
- package/package.json +1 -1
- package/src/lib/worldrendererCommon.ts +11 -0
- package/src/three/cameraCollisionBlockCache.ts +156 -0
- package/src/three/cameraCollisionSolidity.ts +50 -0
- package/src/three/chunkMeshManager.ts +4 -128
- package/src/three/globalLegacyBuffer.ts +0 -107
- package/src/three/sectionRaycastAabb.ts +0 -98
- package/src/three/tests/chunkMeshManagerLegacy.test.ts +0 -30
- package/src/three/thirdPersonVoxelRaycast.ts +120 -0
- package/src/three/worldRendererThree.ts +30 -40
- package/src/wasm-mesher/tests/cameraCollisionBlockCache.test.ts +82 -0
- package/src/wasm-mesher/tests/sectionRaycastAabb.test.ts +1 -106
- package/src/wasm-mesher/tests/thirdPersonVoxelRaycast.test.ts +63 -0
package/README.md
CHANGED
|
@@ -2,7 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
One of the best Minecraft world rendererers implemented from scratch. Uses Three.js WebGL 2 backend. Designed for performance testing, experimentation, and integration into Minecraft clients or other use cases for game world display.
|
|
6
|
+
|
|
7
|
+
Features:
|
|
8
|
+
|
|
9
|
+
- 💡 Full-featured: hand, third-person view, entities, debug features and even more!
|
|
10
|
+
- ⚡️ Leverages all available WebGL 2 and WASM world meshing for the maximum performance
|
|
11
|
+
- 📦 Implemented from scratch; small bundle size and runtime footprint
|
|
12
|
+
- ⚙️ Easily customizable: modular architecture with Three.js API
|
|
13
|
+
|
|
14
|
+
## Implemented Features
|
|
15
|
+
|
|
16
|
+
- WASM mesher workers (default path) with legacy JS mesher fallback
|
|
17
|
+
- Instanced shader-cube rendering for full blocks (`GlobalBlockBuffer`, one GPU draw)
|
|
18
|
+
- Global legacy geometry buffer for models/stairs/slabs (merged indexed mesh, opaque + blend passes)
|
|
19
|
+
- Block and sky lighting, smooth lighting, and vanilla vs high-contrast (default) face shading (`vanillaLook`)
|
|
20
|
+
- Signs, banners, skulls, and other block-entity overlays
|
|
21
|
+
- Entities: players with skins & animations, mobs, items, armor, text/item display
|
|
22
|
+
- Day cycle, skybox, starfield, rain, fireworks
|
|
23
|
+
- Third-person camera, view bobbing, holding block / hand
|
|
24
|
+
- Optional off-thread graphics backend (render in a worker!)
|
|
25
|
+
- Smooth lighting (lighting data has to be provided)
|
|
26
|
+
|
|
27
|
+
### Browser support
|
|
28
|
+
|
|
29
|
+
**Requires WebGL 2.0.** WebGL 1 is not supported as a full-feature path (shader cubes and several block shaders need WebGL2).
|
|
30
|
+
|
|
31
|
+
| Browser | Minimum version |
|
|
32
|
+
| -------------------- | --------------- |
|
|
33
|
+
| Chrome / Chromium | 56+ |
|
|
34
|
+
| Firefox | 51+ |
|
|
35
|
+
| Edge | 79+ (Chromium) |
|
|
36
|
+
| Safari (macOS / iOS) | 15.3+ |
|
|
37
|
+
| Opera | 43+ |
|
|
38
|
+
|
|
39
|
+
**Not supported:** Safari before 15.
|
|
40
|
+
|
|
41
|
+
Optional extensions (`WEBGL_multi_draw`, instanced base vertex) improve draw-call batching when present; the renderer falls back to capped multi-draw loops when they are missing.
|
|
6
42
|
|
|
7
43
|
## Architecture Overview
|
|
8
44
|
|