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.
178 lines
2.6 KiB
JSON
178 lines
2.6 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":"Rug",
|
|
"scale":[
|
|
1.3000000715255737,
|
|
1.3000000715255737,
|
|
1.3000000715255737
|
|
]
|
|
}
|
|
],
|
|
"materials":[
|
|
{
|
|
"name":"initialShadingGroup.002",
|
|
"normalTexture":{
|
|
"index":0
|
|
},
|
|
"pbrMetallicRoughness":{
|
|
"baseColorTexture":{
|
|
"index":1
|
|
},
|
|
"metallicRoughnessTexture":{
|
|
"index":2
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"meshes":[
|
|
{
|
|
"name":"Rug",
|
|
"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_15261_frame_cocoa_normal",
|
|
"uri":"../textures/archisketch_15261_frame_cocoa_normal.png"
|
|
},
|
|
{
|
|
"mimeType":"image/png",
|
|
"name":"archisketch_15261_frame_cocoa_basecolor",
|
|
"uri":"../textures/archisketch_15261_frame_cocoa_basecolor.png"
|
|
},
|
|
{
|
|
"mimeType":"image/png",
|
|
"name":"archisketch_15261_frame_cocoa_occlusionroughnessmetallic",
|
|
"uri":"../textures/archisketch_15261_frame_cocoa_occlusionroughnessmetallic.png"
|
|
}
|
|
],
|
|
"accessors":[
|
|
{
|
|
"bufferView":0,
|
|
"componentType":5123,
|
|
"count":2196,
|
|
"normalized":true,
|
|
"type":"VEC4"
|
|
},
|
|
{
|
|
"bufferView":1,
|
|
"componentType":5126,
|
|
"count":2196,
|
|
"max":[
|
|
0.7471415996551514,
|
|
0.01999974437057972,
|
|
0.7471414804458618
|
|
],
|
|
"min":[
|
|
-0.7471415996551514,
|
|
0,
|
|
-0.7471414804458618
|
|
],
|
|
"type":"VEC3"
|
|
},
|
|
{
|
|
"bufferView":2,
|
|
"componentType":5126,
|
|
"count":2196,
|
|
"type":"VEC3"
|
|
},
|
|
{
|
|
"bufferView":3,
|
|
"componentType":5126,
|
|
"count":2196,
|
|
"type":"VEC2"
|
|
},
|
|
{
|
|
"bufferView":4,
|
|
"componentType":5123,
|
|
"count":12528,
|
|
"type":"SCALAR"
|
|
}
|
|
],
|
|
"bufferViews":[
|
|
{
|
|
"buffer":0,
|
|
"byteLength":17568,
|
|
"byteOffset":0,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":26352,
|
|
"byteOffset":17568,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":26352,
|
|
"byteOffset":43920,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":17568,
|
|
"byteOffset":70272,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":25056,
|
|
"byteOffset":87840,
|
|
"target":34963
|
|
}
|
|
],
|
|
"samplers":[
|
|
{
|
|
"magFilter":9729,
|
|
"minFilter":9987
|
|
}
|
|
],
|
|
"buffers":[
|
|
{
|
|
"byteLength":112896,
|
|
"uri":"rug.bin"
|
|
}
|
|
]
|
|
}
|