Repository navigation
Releases
v0.2.0 glTF 2.0 and GLB formats support added
glTF 2.0 and GLB formats support added.
Each model accepts exactly one source: objUrl, objText, gltfUrl, gltfText, glbUrl, or glbData. All formats also accept optional translation, rotation, and scale values. Scene and asset URLs remain owned and hosted by the consuming application.
Hosted glTF and GLB files resolve external buffers and images relative to their model URL. For a local .gltf upload, map each selected sidecar filename to its blob URL:
const scene = {
models: [{
id: 'local-product',
gltfText,
resourceUrls: {
'product.bin': binaryBlobUrl,
'albedo.png': albedoBlobUrl,
},
}],
};Local GLB files can be passed directly as glbData: await file.arrayBuffer().
The glTF 2.0 loader supports .gltf JSON and binary .glb assets, embedded or external buffers and images, indexed and non-indexed triangle primitives, node hierarchies and TRS/matrix transforms, POSITION, TEXCOORD_0, and PBR base-color textures. Sparse accessors, non-triangle primitive modes, animation, skinning, morph targets, and compressed mesh extensions such as Draco or Meshopt are rejected with an explicit error.
v0.1.6 Support OBJ files that use multiple materials, provide an MTL source and its diffuse textures
Support OBJ files that use multiple materials, provide an MTL source and its diffuse textures.
v0.1.5
v0.1.4
Allow rendering suspension during canvas transitions. Expose synchronous render suspension through the controller and React handle so consumers can avoid WebGPU submissions while fullscreen transitions resize the canvas. Add lifecycle tests and bump to 0.1.4.
v0.1.3
v0.1.2
Added runtime model transform API to make component actually usable in interesting ways.
Expose efficient in-place translation, rotation, and scale updates through the controller and React ref, with tests and animation documentation.
Bump package version to 0.1.2.
0.1.1
0.1.0
Initial version
npm install @optiklab/web-gpu-visualizer-component