mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-22 08:06:01 +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.
561 lines
8.3 KiB
JSON
561 lines
8.3 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":"PottedPlant1",
|
|
"scale":[
|
|
0.7147455811500549,
|
|
0.7147455811500549,
|
|
0.7147455811500549
|
|
]
|
|
}
|
|
],
|
|
"materials":[
|
|
{
|
|
"doubleSided":true,
|
|
"name":"05___Defaultwww1",
|
|
"pbrMetallicRoughness":{
|
|
"baseColorTexture":{
|
|
"index":0
|
|
},
|
|
"metallicFactor":0,
|
|
"roughnessFactor":0.5
|
|
}
|
|
},
|
|
{
|
|
"doubleSided":true,
|
|
"name":"02___Defaultwe1",
|
|
"pbrMetallicRoughness":{
|
|
"baseColorTexture":{
|
|
"index":1
|
|
},
|
|
"metallicFactor":0,
|
|
"roughnessFactor":0.5
|
|
}
|
|
},
|
|
{
|
|
"doubleSided":true,
|
|
"name":"17___Defaultweweqw1.001",
|
|
"pbrMetallicRoughness":{
|
|
"baseColorTexture":{
|
|
"index":2
|
|
},
|
|
"metallicFactor":0,
|
|
"roughnessFactor":0.5
|
|
}
|
|
},
|
|
{
|
|
"doubleSided":true,
|
|
"name":"01___Default1",
|
|
"pbrMetallicRoughness":{
|
|
"baseColorTexture":{
|
|
"index":3
|
|
},
|
|
"metallicFactor":0,
|
|
"roughnessFactor":0.5
|
|
}
|
|
},
|
|
{
|
|
"doubleSided":true,
|
|
"name":"16___Default1",
|
|
"pbrMetallicRoughness":{
|
|
"baseColorTexture":{
|
|
"index":4
|
|
},
|
|
"metallicFactor":0,
|
|
"roughnessFactor":0.5
|
|
}
|
|
}
|
|
],
|
|
"meshes":[
|
|
{
|
|
"name":"PottedPlant1",
|
|
"primitives":[
|
|
{
|
|
"attributes":{
|
|
"COLOR_0":0,
|
|
"POSITION":1,
|
|
"NORMAL":2,
|
|
"TEXCOORD_0":3
|
|
},
|
|
"indices":4,
|
|
"material":0
|
|
},
|
|
{
|
|
"attributes":{
|
|
"COLOR_0":5,
|
|
"POSITION":6,
|
|
"NORMAL":7,
|
|
"TEXCOORD_0":8
|
|
},
|
|
"indices":9,
|
|
"material":1
|
|
},
|
|
{
|
|
"attributes":{
|
|
"COLOR_0":10,
|
|
"POSITION":11,
|
|
"NORMAL":12,
|
|
"TEXCOORD_0":13
|
|
},
|
|
"indices":14,
|
|
"material":2
|
|
},
|
|
{
|
|
"attributes":{
|
|
"COLOR_0":15,
|
|
"POSITION":16,
|
|
"NORMAL":17,
|
|
"TEXCOORD_0":18
|
|
},
|
|
"indices":19,
|
|
"material":3
|
|
},
|
|
{
|
|
"attributes":{
|
|
"COLOR_0":20,
|
|
"POSITION":21,
|
|
"NORMAL":22,
|
|
"TEXCOORD_0":23
|
|
},
|
|
"indices":24,
|
|
"material":4
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"textures":[
|
|
{
|
|
"sampler":0,
|
|
"source":0
|
|
},
|
|
{
|
|
"sampler":0,
|
|
"source":1
|
|
},
|
|
{
|
|
"sampler":0,
|
|
"source":2
|
|
},
|
|
{
|
|
"sampler":0,
|
|
"source":3
|
|
},
|
|
{
|
|
"sampler":0,
|
|
"source":4
|
|
}
|
|
],
|
|
"images":[
|
|
{
|
|
"mimeType":"image/png",
|
|
"name":"map__4727_mix",
|
|
"uri":"../textures/map__4727_mix.png"
|
|
},
|
|
{
|
|
"mimeType":"image/png",
|
|
"name":"map__3_gradient_ramp_0",
|
|
"uri":"../textures/map__3_gradient_ramp_0.png"
|
|
},
|
|
{
|
|
"mimeType":"image/png",
|
|
"name":"sh__014e_0",
|
|
"uri":"../textures/sh__014e_0.png"
|
|
},
|
|
{
|
|
"mimeType":"image/png",
|
|
"name":"map__2138274789_falloff",
|
|
"uri":"../textures/map__2138274789_falloff.png"
|
|
},
|
|
{
|
|
"mimeType":"image/png",
|
|
"name":"sh__049",
|
|
"uri":"../textures/sh__049.png"
|
|
}
|
|
],
|
|
"accessors":[
|
|
{
|
|
"bufferView":0,
|
|
"componentType":5123,
|
|
"count":373,
|
|
"normalized":true,
|
|
"type":"VEC4"
|
|
},
|
|
{
|
|
"bufferView":1,
|
|
"componentType":5126,
|
|
"count":373,
|
|
"max":[
|
|
0.19935017824172974,
|
|
0.34052181243896484,
|
|
0.19498242437839508
|
|
],
|
|
"min":[
|
|
-0.2017928957939148,
|
|
0.10245688259601593,
|
|
-0.205869659781456
|
|
],
|
|
"type":"VEC3"
|
|
},
|
|
{
|
|
"bufferView":2,
|
|
"componentType":5126,
|
|
"count":373,
|
|
"type":"VEC3"
|
|
},
|
|
{
|
|
"bufferView":3,
|
|
"componentType":5126,
|
|
"count":373,
|
|
"type":"VEC2"
|
|
},
|
|
{
|
|
"bufferView":4,
|
|
"componentType":5123,
|
|
"count":864,
|
|
"type":"SCALAR"
|
|
},
|
|
{
|
|
"bufferView":5,
|
|
"componentType":5123,
|
|
"count":2881,
|
|
"normalized":true,
|
|
"type":"VEC4"
|
|
},
|
|
{
|
|
"bufferView":6,
|
|
"componentType":5126,
|
|
"count":2881,
|
|
"max":[
|
|
0.20022684335708618,
|
|
0.7127547264099121,
|
|
0.3447090983390808
|
|
],
|
|
"min":[
|
|
-0.25123924016952515,
|
|
0.2595646381378174,
|
|
-0.23161326348781586
|
|
],
|
|
"type":"VEC3"
|
|
},
|
|
{
|
|
"bufferView":7,
|
|
"componentType":5126,
|
|
"count":2881,
|
|
"type":"VEC3"
|
|
},
|
|
{
|
|
"bufferView":8,
|
|
"componentType":5126,
|
|
"count":2881,
|
|
"type":"VEC2"
|
|
},
|
|
{
|
|
"bufferView":9,
|
|
"componentType":5123,
|
|
"count":5253,
|
|
"type":"SCALAR"
|
|
},
|
|
{
|
|
"bufferView":10,
|
|
"componentType":5123,
|
|
"count":953,
|
|
"normalized":true,
|
|
"type":"VEC4"
|
|
},
|
|
{
|
|
"bufferView":11,
|
|
"componentType":5126,
|
|
"count":953,
|
|
"max":[
|
|
0.19372159242630005,
|
|
0.36101800203323364,
|
|
0.17712844908237457
|
|
],
|
|
"min":[
|
|
-0.17357796430587769,
|
|
0.3098647892475128,
|
|
-0.1897440403699875
|
|
],
|
|
"type":"VEC3"
|
|
},
|
|
{
|
|
"bufferView":12,
|
|
"componentType":5126,
|
|
"count":953,
|
|
"type":"VEC3"
|
|
},
|
|
{
|
|
"bufferView":13,
|
|
"componentType":5126,
|
|
"count":953,
|
|
"type":"VEC2"
|
|
},
|
|
{
|
|
"bufferView":14,
|
|
"componentType":5123,
|
|
"count":2124,
|
|
"type":"SCALAR"
|
|
},
|
|
{
|
|
"bufferView":15,
|
|
"componentType":5123,
|
|
"count":14616,
|
|
"normalized":true,
|
|
"type":"VEC4"
|
|
},
|
|
{
|
|
"bufferView":16,
|
|
"componentType":5126,
|
|
"count":14616,
|
|
"max":[
|
|
0.23089128732681274,
|
|
0.7691824436187744,
|
|
0.37735289335250854
|
|
],
|
|
"min":[
|
|
-0.2857348322868347,
|
|
0.3321642279624939,
|
|
-0.2779516577720642
|
|
],
|
|
"type":"VEC3"
|
|
},
|
|
{
|
|
"bufferView":17,
|
|
"componentType":5126,
|
|
"count":14616,
|
|
"type":"VEC3"
|
|
},
|
|
{
|
|
"bufferView":18,
|
|
"componentType":5126,
|
|
"count":14616,
|
|
"type":"VEC2"
|
|
},
|
|
{
|
|
"bufferView":19,
|
|
"componentType":5123,
|
|
"count":35076,
|
|
"type":"SCALAR"
|
|
},
|
|
{
|
|
"bufferView":20,
|
|
"componentType":5123,
|
|
"count":465,
|
|
"normalized":true,
|
|
"type":"VEC4"
|
|
},
|
|
{
|
|
"bufferView":21,
|
|
"componentType":5126,
|
|
"count":465,
|
|
"max":[
|
|
0.1985645890235901,
|
|
0.1372201144695282,
|
|
0.19498242437839508
|
|
],
|
|
"min":[
|
|
-0.2017926573753357,
|
|
0,
|
|
-0.2054220288991928
|
|
],
|
|
"type":"VEC3"
|
|
},
|
|
{
|
|
"bufferView":22,
|
|
"componentType":5126,
|
|
"count":465,
|
|
"type":"VEC3"
|
|
},
|
|
{
|
|
"bufferView":23,
|
|
"componentType":5126,
|
|
"count":465,
|
|
"type":"VEC2"
|
|
},
|
|
{
|
|
"bufferView":24,
|
|
"componentType":5123,
|
|
"count":1896,
|
|
"type":"SCALAR"
|
|
}
|
|
],
|
|
"bufferViews":[
|
|
{
|
|
"buffer":0,
|
|
"byteLength":2984,
|
|
"byteOffset":0,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":4476,
|
|
"byteOffset":2984,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":4476,
|
|
"byteOffset":7460,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":2984,
|
|
"byteOffset":11936,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":1728,
|
|
"byteOffset":14920,
|
|
"target":34963
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":23048,
|
|
"byteOffset":16648,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":34572,
|
|
"byteOffset":39696,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":34572,
|
|
"byteOffset":74268,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":23048,
|
|
"byteOffset":108840,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":10506,
|
|
"byteOffset":131888,
|
|
"target":34963
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":7624,
|
|
"byteOffset":142396,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":11436,
|
|
"byteOffset":150020,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":11436,
|
|
"byteOffset":161456,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":7624,
|
|
"byteOffset":172892,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":4248,
|
|
"byteOffset":180516,
|
|
"target":34963
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":116928,
|
|
"byteOffset":184764,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":175392,
|
|
"byteOffset":301692,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":175392,
|
|
"byteOffset":477084,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":116928,
|
|
"byteOffset":652476,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":70152,
|
|
"byteOffset":769404,
|
|
"target":34963
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":3720,
|
|
"byteOffset":839556,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":5580,
|
|
"byteOffset":843276,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":5580,
|
|
"byteOffset":848856,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":3720,
|
|
"byteOffset":854436,
|
|
"target":34962
|
|
},
|
|
{
|
|
"buffer":0,
|
|
"byteLength":3792,
|
|
"byteOffset":858156,
|
|
"target":34963
|
|
}
|
|
],
|
|
"samplers":[
|
|
{
|
|
"magFilter":9729,
|
|
"minFilter":9987
|
|
}
|
|
],
|
|
"buffers":[
|
|
{
|
|
"byteLength":861948,
|
|
"uri":"potted-plant-1.bin"
|
|
}
|
|
]
|
|
}
|