mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-17 00:13:17 +00:00
cba70a62ae
This commit implements a Sketchfab-style single-object viewer as a minimal proof-of-concept. ### `@storyteller/studio-web` This is a new package to house web components for interfacing with the `@storyteller/studio` WASM library. It currently includes a single component, `<sts-viewer />`, which is exported from `@storyteller/studio-web/viewer`. ### `react-frontend` This is a new application intended as a proof-of-concept and testbed for React interop with `@storyteller/studio-web`. Web components are currently a little bit fiddly to use in a React application. `react-frontend/src/app/studio-viewer.tsx` demonstrates how a React-idiomatic component can be written as a thin wrapper around a web component, and `react-frontend/src/app/app.tsx` demonstrates that wrapper component in use.
173 lines
2.5 KiB
JSON
173 lines
2.5 KiB
JSON
{
|
|
"asset":{
|
|
"generator":"Khronos glTF Blender I/O v3.6.27",
|
|
"version":"2.0"
|
|
},
|
|
"scene":0,
|
|
"scenes":[
|
|
{
|
|
"name":"Scene",
|
|
"nodes":[
|
|
0
|
|
]
|
|
}
|
|
],
|
|
"nodes":[
|
|
{
|
|
"mesh":0,
|
|
"name":"WickerBasket"
|
|
}
|
|
],
|
|
"materials":[
|
|
{
|
|
"name":"DefaultMaterial.002",
|
|
"normalTexture":{
|
|
"index":0
|
|
},
|
|
"pbrMetallicRoughness":{
|
|
"baseColorTexture":{
|
|
"index":1
|
|
},
|
|
"metallicRoughnessTexture":{
|
|
"index":2
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"meshes":[
|
|
{
|
|
"name":"WickerBasket",
|
|
"primitives":[
|
|
{
|
|
"attributes":{
|
|
"COLOR_0":0,
|
|
"POSITION":1,
|
|
"NORMAL":2,
|
|
"TEXCOORD_0":3
|
|
},
|
|
"indices":4,
|
|
"material":0
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"textures":[
|
|
{
|
|
"sampler":0,
|
|
"source":0
|
|
},
|
|
{
|
|
"sampler":0,
|
|
"source":1
|
|
},
|
|
{
|
|
"sampler":0,
|
|
"source":2
|
|
}
|
|
],
|
|
"images":[
|
|
{
|
|
"mimeType":"image/png",
|
|
"name":"archisketch_302398_frame-_brown__normal",
|
|
"uri":"../textures/archisketch_302398_frame-_brown__normal.png"
|
|
},
|
|
{
|
|
"mimeType":"image/png",
|
|
"name":"archisketch_302398_frame-_brown__basecolor",
|
|
"uri":"../textures/archisketch_302398_frame-_brown__basecolor.png"
|
|
},
|
|
{
|
|
"mimeType":"image/png",
|
|
"name":"archisketch_302398_frame-_brown__occlusionroughnessmetallic",
|
|
"uri":"../textures/archisketch_302398_frame-_brown__occlusionroughnessmetallic.png"
|
|
}
|
|
],
|
|
"accessors":[
|
|
{
|
|
"bufferView":0,
|
|
"componentType":5123,
|
|
"count":4003,
|
|
"normalized":true,
|
|
"type":"VEC4"
|
|
},
|
|
{
|
|
"bufferView":1,
|
|
"componentType":5126,
|
|
"count":4003,
|
|
"max":[
|
|
0.299081951379776,
|
|
0.2872571349143982,
|
|
0.2306119054555893
|
|
],
|
|
"min":[
|
|
-0.299081951379776,
|
|
0,
|
|
-0.2306119054555893
|
|
],
|
|
"type":"VEC3"
|
|
},
|
|
{
|
|
"bufferView":2,
|
|
"componentType":5126,
|
|
"count":4003,
|
|
"type":"VEC3"
|
|
},
|
|
{
|
|
"bufferView":3,
|
|
"componentType":5126,
|
|
"count":4003,
|
|
"type":"VEC2"
|
|
},
|
|
{
|
|
"bufferView":4,
|
|
"componentType":5123,
|
|
"count":19680,
|
|
"type":"SCALAR"
|
|
}
|
|
],
|
|
"bufferViews":[
|
|
{
|
|
"buffer":0,
|
|
"byteLength":32024,
|
|
"byteOffset":0,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":48036,
|
|
"byteOffset":32024,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":48036,
|
|
"byteOffset":80060,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":32024,
|
|
"byteOffset":128096,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":39360,
|
|
"byteOffset":160120,
|
|
"target":34963
|
|
}
|
|
],
|
|
"samplers":[
|
|
{
|
|
"magFilter":9729,
|
|
"minFilter":9987
|
|
}
|
|
],
|
|
"buffers":[
|
|
{
|
|
"byteLength":199480,
|
|
"uri":"wicker-basket.bin"
|
|
}
|
|
]
|
|
}
|