feat: multi-format 3D viewer with large-file OBJ streaming, Z-up, projection/outline UI
Three.js viewer supporting glb/gltf/obj/fbx/dae/ifc/ply via both server (SSR) and drag&drop (CSR) paths. - Streaming OBJ parser (src/viewer/objStream.ts) for files past the V8 max string length (>~1GB text) that OBJLoader can't handle; indexed geometry, per-vertex color from MTL Kd, float64 recenter baked in. - In-viewer float64 recenter (objRecenter.ts) for huge CAD/survey coordinates (~1e8) so float32 vertex buffers keep precision (no cracked faces). - Z-up right-handed world; Y-up formats rotated on load. - OBJ+MTL+texture drag&drop (LoadingManager URL-modifier maps dropped images). - OrbitControls ground-plane panning (road/rail alignment workflow). - UI: Zoom Fit, perspective/orthographic toggle, feature-edge outline. - DoubleSide for CAD OBJ; PLY mesh + point-cloud support. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
# Basis Universal GPU Texture Compression
|
||||
|
||||
Basis Universal is a "[supercompressed](http://gamma.cs.unc.edu/GST/gst.pdf)"
|
||||
GPU texture and texture video compression system that outputs a highly
|
||||
compressed intermediate file format (.basis) that can be quickly transcoded to
|
||||
a wide variety of GPU texture compression formats.
|
||||
|
||||
[GitHub](https://github.com/BinomialLLC/basis_universal)
|
||||
|
||||
## Transcoders
|
||||
|
||||
Basis Universal texture data may be used in two different file formats:
|
||||
`.basis` and `.ktx2`, where `ktx2` is a standardized wrapper around basis texture data.
|
||||
|
||||
For further documentation about the Basis compressor and transcoder, refer to
|
||||
the [Basis GitHub repository](https://github.com/BinomialLLC/basis_universal).
|
||||
|
||||
The folder contains two files required for transcoding `.basis` or `.ktx2` textures:
|
||||
|
||||
* `basis_transcoder.js` — JavaScript wrapper for the WebAssembly transcoder.
|
||||
* `basis_transcoder.wasm` — WebAssembly transcoder.
|
||||
|
||||
Both are dependencies of `KTX2Loader`:
|
||||
|
||||
```js
|
||||
const ktx2Loader = new KTX2Loader();
|
||||
ktx2Loader.setTranscoderPath( 'examples/jsm/libs/basis/' );
|
||||
ktx2Loader.detectSupport( renderer );
|
||||
ktx2Loader.load( 'diffuse.ktx2', function ( texture ) {
|
||||
|
||||
const material = new THREE.MeshStandardMaterial( { map: texture } );
|
||||
|
||||
}, function () {
|
||||
|
||||
console.log( 'onProgress' );
|
||||
|
||||
}, function ( e ) {
|
||||
|
||||
console.error( e );
|
||||
|
||||
} );
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
[Apache License 2.0](https://github.com/BinomialLLC/basis_universal/blob/master/LICENSE)
|
||||
Reference in New Issue
Block a user