mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-29 09:08:58 +00:00
Single-object viewer POC (#14)
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.
This commit is contained in:
@@ -0,0 +1,172 @@
|
||||
{
|
||||
"asset":{
|
||||
"generator":"Khronos glTF Blender I/O v3.6.27",
|
||||
"version":"2.0"
|
||||
},
|
||||
"scene":0,
|
||||
"scenes":[
|
||||
{
|
||||
"name":"Scene",
|
||||
"nodes":[
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"nodes":[
|
||||
{
|
||||
"mesh":0,
|
||||
"name":"Couch"
|
||||
}
|
||||
],
|
||||
"materials":[
|
||||
{
|
||||
"name":"Archisketch_122724_Frame_Yellow",
|
||||
"normalTexture":{
|
||||
"index":0
|
||||
},
|
||||
"pbrMetallicRoughness":{
|
||||
"baseColorTexture":{
|
||||
"index":1
|
||||
},
|
||||
"metallicRoughnessTexture":{
|
||||
"index":2
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"meshes":[
|
||||
{
|
||||
"name":"Couch",
|
||||
"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_122724_frame_yellow_normal",
|
||||
"uri":"../textures/archisketch_122724_frame_yellow_normal.png"
|
||||
},
|
||||
{
|
||||
"mimeType":"image/png",
|
||||
"name":"archisketch_122724_frame_yellow_basecolor",
|
||||
"uri":"../textures/archisketch_122724_frame_yellow_basecolor.png"
|
||||
},
|
||||
{
|
||||
"mimeType":"image/png",
|
||||
"name":"archisketch_122724_frame_yellow_occlusionroughnessmetallic",
|
||||
"uri":"../textures/archisketch_122724_frame_yellow_occlusionroughnessmetallic.png"
|
||||
}
|
||||
],
|
||||
"accessors":[
|
||||
{
|
||||
"bufferView":0,
|
||||
"componentType":5123,
|
||||
"count":9285,
|
||||
"normalized":true,
|
||||
"type":"VEC4"
|
||||
},
|
||||
{
|
||||
"bufferView":1,
|
||||
"componentType":5126,
|
||||
"count":9285,
|
||||
"max":[
|
||||
0.5208197832107544,
|
||||
0.8453625440597534,
|
||||
0.4746153652667999
|
||||
],
|
||||
"min":[
|
||||
-0.5208197832107544,
|
||||
0,
|
||||
-0.4746153652667999
|
||||
],
|
||||
"type":"VEC3"
|
||||
},
|
||||
{
|
||||
"bufferView":2,
|
||||
"componentType":5126,
|
||||
"count":9285,
|
||||
"type":"VEC3"
|
||||
},
|
||||
{
|
||||
"bufferView":3,
|
||||
"componentType":5126,
|
||||
"count":9285,
|
||||
"type":"VEC2"
|
||||
},
|
||||
{
|
||||
"bufferView":4,
|
||||
"componentType":5123,
|
||||
"count":37824,
|
||||
"type":"SCALAR"
|
||||
}
|
||||
],
|
||||
"bufferViews":[
|
||||
{
|
||||
"buffer":0,
|
||||
"byteLength":74280,
|
||||
"byteOffset":0,
|
||||
"target":34962
|
||||
},
|
||||
{
|
||||
"buffer":0,
|
||||
"byteLength":111420,
|
||||
"byteOffset":74280,
|
||||
"target":34962
|
||||
},
|
||||
{
|
||||
"buffer":0,
|
||||
"byteLength":111420,
|
||||
"byteOffset":185700,
|
||||
"target":34962
|
||||
},
|
||||
{
|
||||
"buffer":0,
|
||||
"byteLength":74280,
|
||||
"byteOffset":297120,
|
||||
"target":34962
|
||||
},
|
||||
{
|
||||
"buffer":0,
|
||||
"byteLength":75648,
|
||||
"byteOffset":371400,
|
||||
"target":34963
|
||||
}
|
||||
],
|
||||
"samplers":[
|
||||
{
|
||||
"magFilter":9729,
|
||||
"minFilter":9987
|
||||
}
|
||||
],
|
||||
"buffers":[
|
||||
{
|
||||
"byteLength":447048,
|
||||
"uri":"couch.bin"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user