diff --git a/src/assets/avatars/BotBobo_Avatar.glb b/src/assets/avatars/BotBobo_Avatar.glb deleted file mode 100644 index 66862adb28f35fb3bb1ca4954d840a1f9a91bb96..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/BotBobo_Avatar.glb and /dev/null differ diff --git a/src/assets/avatars/BotBobo_Avatar_Unlit.glb b/src/assets/avatars/BotBobo_Avatar_Unlit.glb deleted file mode 100644 index e4a939a242fc930dc52c7d60aa145b7b86023330..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/BotBobo_Avatar_Unlit.glb and /dev/null differ diff --git a/src/assets/avatars/BotDefault_Avatar.glb b/src/assets/avatars/BotDefault_Avatar.glb deleted file mode 100644 index 0784e7354e0fe2e35b3df8329c5587616203b7c3..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/BotDefault_Avatar.glb and /dev/null differ diff --git a/src/assets/avatars/BotDefault_Avatar_Unlit.glb b/src/assets/avatars/BotDefault_Avatar_Unlit.glb deleted file mode 100644 index 850f7552c4183553779dfe0776fb92f042b7f8ca..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/BotDefault_Avatar_Unlit.glb and /dev/null differ diff --git a/src/assets/avatars/BotDom_Avatar.glb b/src/assets/avatars/BotDom_Avatar.glb deleted file mode 100644 index 098a042ead7b919170c6c4c6a63ba40f62a1b81b..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/BotDom_Avatar.glb and /dev/null differ diff --git a/src/assets/avatars/BotDom_Avatar_Unlit.glb b/src/assets/avatars/BotDom_Avatar_Unlit.glb deleted file mode 100644 index 88c830ae9f73581683050705ad75f321bdeecb37..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/BotDom_Avatar_Unlit.glb and /dev/null differ diff --git a/src/assets/avatars/BotGreg_Avatar.glb b/src/assets/avatars/BotGreg_Avatar.glb deleted file mode 100644 index 33ca3ee66249ed267688353ef0ab82fd97dfc8bc..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/BotGreg_Avatar.glb and /dev/null differ diff --git a/src/assets/avatars/BotGreg_Avatar_Unlit.glb b/src/assets/avatars/BotGreg_Avatar_Unlit.glb deleted file mode 100644 index ed0a5291790f79029b6c7e624a45253c5f6caeb3..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/BotGreg_Avatar_Unlit.glb and /dev/null differ diff --git a/src/assets/avatars/BotGuest_Avatar.glb b/src/assets/avatars/BotGuest_Avatar.glb deleted file mode 100644 index e0be8e9cbad1a1d6167c0c0ccf333285d0857472..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/BotGuest_Avatar.glb and /dev/null differ diff --git a/src/assets/avatars/BotGuest_Avatar_Unlit.glb b/src/assets/avatars/BotGuest_Avatar_Unlit.glb deleted file mode 100644 index 3bc50b18e3ffbf9f9007a6f7790a8512284949a7..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/BotGuest_Avatar_Unlit.glb and /dev/null differ diff --git a/src/assets/avatars/BotJim_Avatar.glb b/src/assets/avatars/BotJim_Avatar.glb deleted file mode 100644 index 34c1a8cf274d0ed62b2bc22b51d573f6bafc1728..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/BotJim_Avatar.glb and /dev/null differ diff --git a/src/assets/avatars/BotJim_Avatar_Unlit.glb b/src/assets/avatars/BotJim_Avatar_Unlit.glb deleted file mode 100644 index 534356f80deb17b8808bc778db2db048811baf6a..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/BotJim_Avatar_Unlit.glb and /dev/null differ diff --git a/src/assets/avatars/BotKev_Avatar.glb b/src/assets/avatars/BotKev_Avatar.glb deleted file mode 100644 index a20a54bcc42926a79b623e360a4ed9ddb2380695..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/BotKev_Avatar.glb and /dev/null differ diff --git a/src/assets/avatars/BotKev_Avatar_Unlit.glb b/src/assets/avatars/BotKev_Avatar_Unlit.glb deleted file mode 100644 index d70196b7a3f83f25445cef27cf0fbc7493805cd2..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/BotKev_Avatar_Unlit.glb and /dev/null differ diff --git a/src/assets/avatars/BotPinky_Avatar.glb b/src/assets/avatars/BotPinky_Avatar.glb deleted file mode 100644 index da14ccd6ada339e7d28c1dfcd636a0810d45907c..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/BotPinky_Avatar.glb and /dev/null differ diff --git a/src/assets/avatars/BotPinky_Avatar_Unlit.glb b/src/assets/avatars/BotPinky_Avatar_Unlit.glb deleted file mode 100644 index 4029c8c6feb3dfe137d932ff0e7eb9223c60b6d1..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/BotPinky_Avatar_Unlit.glb and /dev/null differ diff --git a/src/assets/avatars/BotRobert_Avatar.glb b/src/assets/avatars/BotRobert_Avatar.glb deleted file mode 100644 index 68d28e5a19616eae6e5e5c8694182efe02643c65..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/BotRobert_Avatar.glb and /dev/null differ diff --git a/src/assets/avatars/BotRobert_Avatar_Unlit.glb b/src/assets/avatars/BotRobert_Avatar_Unlit.glb deleted file mode 100644 index 505eae50b5604bdbe3a7076421dabd1847e561f1..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/BotRobert_Avatar_Unlit.glb and /dev/null differ diff --git a/src/assets/avatars/BotWoody_Avatar.glb b/src/assets/avatars/BotWoody_Avatar.glb deleted file mode 100644 index 0a205ee9311b5c73f96f5fdf562970bd362b1a21..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/BotWoody_Avatar.glb and /dev/null differ diff --git a/src/assets/avatars/BotWoody_Avatar_Unlit.glb b/src/assets/avatars/BotWoody_Avatar_Unlit.glb deleted file mode 100644 index bd330d47f269ccaae436fbb3a33aa85b51eee6fd..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/BotWoody_Avatar_Unlit.glb and /dev/null differ diff --git a/src/assets/avatars/avatars.js b/src/assets/avatars/avatars.js index 7934ecb66c1439b04e892367dc3655d1f3826abe..e0cce328dce5db122a267603fd8f2e9ec4a25db7 100644 --- a/src/assets/avatars/avatars.js +++ b/src/assets/avatars/avatars.js @@ -1,65 +1,38 @@ export const avatars = [ { id: "botdefault", - models: { - low: `${require("./BotDefault_Avatar_Unlit.glb")}`, - high: `${require("./BotDefault_Avatar.glb")}` - } + model: "https://asset-bundles-dev.reticulum.io/bots/BotDefault_Avatar-9f71f8ff22.gltf" }, { id: "botbobo", - models: { - low: `${require("./BotBobo_Avatar_Unlit.glb")}`, - high: `${require("./BotBobo_Avatar.glb")}` - } + model: "https://asset-bundles-dev.reticulum.io/bots/BotBobo_Avatar-f9740a010b.gltf" }, { id: "botdom", - models: { - low: `${require("./BotDom_Avatar_Unlit.glb")}`, - high: `${require("./BotDom_Avatar.glb")}` - } + model: "https://asset-bundles-dev.reticulum.io/bots/BotDom_Avatar-6aa1b5d781.gltf" }, { id: "botgreg", - models: { - low: `${require("./BotGreg_Avatar_Unlit.glb")}`, - high: `${require("./BotGreg_Avatar.glb")}` - } + model: "https://asset-bundles-dev.reticulum.io/bots/BotGreg_Avatar-98d39797bb.gltf" }, { id: "botguest", - models: { - low: `${require("./BotGuest_Avatar_Unlit.glb")}`, - high: `${require("./BotGuest_Avatar.glb")}` - } + model: "https://asset-bundles-dev.reticulum.io/bots/BotGuest_Avatar-78cd857332.gltf" }, { id: "botjim", - models: { - low: `${require("./BotJim_Avatar_Unlit.glb")}`, - high: `${require("./BotJim_Avatar.glb")}` - } + model: "https://asset-bundles-dev.reticulum.io/bots/BotJim_Avatar-d28005a687.gltf" }, { id: "botpinky", - models: { - low: `${require("./BotPinky_Avatar_Unlit.glb")}`, - high: `${require("./BotPinky_Avatar.glb")}` - } + model: "https://asset-bundles-dev.reticulum.io/bots/BotPinky_Avatar-b0b93f8675.gltf" }, { id: "botrobert", - models: { - low: `${require("./BotRobert_Avatar_Unlit.glb")}`, - high: `${require("./BotRobert_Avatar.glb")}` - } + model: "https://asset-bundles-dev.reticulum.io/bots/BotRobert_Avatar-e9554880f3.gltf" }, { id: "botwoody", - models: { - low: `${require("./BotWoody_Avatar_Unlit.glb")}`, - high: `${require("./BotWoody_Avatar.glb")}` - } + model: "https://asset-bundles-dev.reticulum.io/bots/BotWoody_Avatar-0140485a23.gltf" } ]; diff --git a/src/assets/avatars/dodec/AvatarHand_L/AvatarDodeca_Texture.png b/src/assets/avatars/dodec/AvatarHand_L/AvatarDodeca_Texture.png deleted file mode 100644 index d0f89bc1497e8bc97c7c035abde9705e1316b613..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/dodec/AvatarHand_L/AvatarDodeca_Texture.png and /dev/null differ diff --git a/src/assets/avatars/dodec/AvatarHand_L/Avatar_HandL.bin b/src/assets/avatars/dodec/AvatarHand_L/Avatar_HandL.bin deleted file mode 100644 index ec35a43eff862c13c920dc70127e296629a2075f..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/dodec/AvatarHand_L/Avatar_HandL.bin and /dev/null differ diff --git a/src/assets/avatars/dodec/AvatarHand_L/Avatar_HandL.gltf b/src/assets/avatars/dodec/AvatarHand_L/Avatar_HandL.gltf deleted file mode 100644 index b47180f7e925c0866321a9387ba96bc161101f5e..0000000000000000000000000000000000000000 --- a/src/assets/avatars/dodec/AvatarHand_L/Avatar_HandL.gltf +++ /dev/null @@ -1 +0,0 @@ -{"accessors":[{"bufferView":0,"componentType":5126,"count":540,"type":"VEC3","max":[0.21502137184143066,0.31034931540489197,0.30054089426994324],"min":[-0.21345257759094238,-0.28918552398681641,-0.6024399995803833]},{"bufferView":1,"componentType":5126,"count":540,"type":"VEC3","max":[0.99698549509048462,0.97377252578735352,0.63385242223739624],"min":[-0.99751198291778564,-0.9912988543510437,-0.99289071559906006]},{"bufferView":2,"componentType":5126,"count":540,"type":"VEC4","max":[0.999259889125824,0.98216503858566284,0.98798274993896484,-1.0],"min":[-0.99856418371200562,-0.99964511394500732,-0.99477094411849976,-1.0]},{"bufferView":3,"componentType":5126,"count":540,"type":"VEC2","max":[0.49392947554588318,-0.12775179743766785],"min":[0.00923137180507183,-0.49687236547470093]},{"bufferView":4,"componentType":5123,"count":2328,"type":"SCALAR","max":[539.0],"min":[0.0]}],"asset":{"version":"2.0"},"buffers":[{"uri":"Avatar_HandL.bin","byteLength":30576}],"bufferViews":[{"buffer":0,"byteLength":6480},{"buffer":0,"byteOffset":6480,"byteLength":6480},{"buffer":0,"byteOffset":12960,"byteLength":8640},{"buffer":0,"byteOffset":21600,"byteLength":4320},{"buffer":0,"byteOffset":25920,"byteLength":4656}],"images":[{"uri":"AvatarDodeca_Texture.png","name":"AvatarDodeca_Texture"}],"materials":[{"pbrMetallicRoughness":{"baseColorTexture":{"index":0},"metallicFactor":0.0},"name":"AvatarDodeca_Texture"}],"meshes":[{"primitives":[{"attributes":{"POSITION":0,"NORMAL":1,"TANGENT":2,"TEXCOORD_0":3},"indices":4,"material":0}],"name":"Avatar_HandL"}],"nodes":[{"mesh":0,"name":"Avatar_HandL"}],"samplers":[{}],"scene":0,"scenes":[{"nodes":[0],"name":"Avatar_HandL"}],"textures":[{"sampler":0,"source":0,"name":"AvatarDodeca_Texture"}]} \ No newline at end of file diff --git a/src/assets/avatars/dodec/AvatarHand_R/AvatarDodeca_Texture.png b/src/assets/avatars/dodec/AvatarHand_R/AvatarDodeca_Texture.png deleted file mode 100644 index d0f89bc1497e8bc97c7c035abde9705e1316b613..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/dodec/AvatarHand_R/AvatarDodeca_Texture.png and /dev/null differ diff --git a/src/assets/avatars/dodec/AvatarHand_R/Avatar_HandR.bin b/src/assets/avatars/dodec/AvatarHand_R/Avatar_HandR.bin deleted file mode 100644 index 4861e7a7c94b1bb610660e8e1f1da95c0e8fd563..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/dodec/AvatarHand_R/Avatar_HandR.bin and /dev/null differ diff --git a/src/assets/avatars/dodec/AvatarHand_R/Avatar_HandR.gltf b/src/assets/avatars/dodec/AvatarHand_R/Avatar_HandR.gltf deleted file mode 100644 index d7b3042b39aafbdd63400397de57b0f3c4c5a8d8..0000000000000000000000000000000000000000 --- a/src/assets/avatars/dodec/AvatarHand_R/Avatar_HandR.gltf +++ /dev/null @@ -1 +0,0 @@ -{"accessors":[{"bufferView":0,"componentType":5126,"count":540,"type":"VEC3","max":[0.21345257759094238,0.31034931540489197,0.30054089426994324],"min":[-0.21502137184143066,-0.28918552398681641,-0.6024399995803833]},{"bufferView":1,"componentType":5126,"count":540,"type":"VEC3","max":[0.99751198291778564,0.97377252578735352,0.63385242223739624],"min":[-0.99698549509048462,-0.9912988543510437,-0.99289071559906006]},{"bufferView":2,"componentType":5126,"count":540,"type":"VEC4","max":[0.99856418371200562,0.98216503858566284,0.98798274993896484,1.0],"min":[-0.999259889125824,-0.99964511394500732,-0.99477094411849976,1.0]},{"bufferView":3,"componentType":5126,"count":540,"type":"VEC2","max":[0.99392950534820557,-0.12775179743766785],"min":[0.50923138856887817,-0.49687236547470093]},{"bufferView":4,"componentType":5123,"count":2328,"type":"SCALAR","max":[539.0],"min":[0.0]}],"asset":{"version":"2.0"},"buffers":[{"uri":"Avatar_HandR.bin","byteLength":30576}],"bufferViews":[{"buffer":0,"byteLength":6480},{"buffer":0,"byteOffset":6480,"byteLength":6480},{"buffer":0,"byteOffset":12960,"byteLength":8640},{"buffer":0,"byteOffset":21600,"byteLength":4320},{"buffer":0,"byteOffset":25920,"byteLength":4656}],"images":[{"uri":"AvatarDodeca_Texture.png","name":"AvatarDodeca_Texture"}],"materials":[{"pbrMetallicRoughness":{"baseColorTexture":{"index":0},"metallicFactor":0.0},"name":"AvatarDodeca_Texture"}],"meshes":[{"primitives":[{"attributes":{"POSITION":0,"NORMAL":1,"TANGENT":2,"TEXCOORD_0":3},"indices":4,"material":0}],"name":"Avatar_HandR"}],"nodes":[{"mesh":0,"name":"Avatar_HandR"}],"samplers":[{}],"scene":0,"scenes":[{"nodes":[0],"name":"Avatar_HandR"}],"textures":[{"sampler":0,"source":0,"name":"AvatarDodeca_Texture"}]} \ No newline at end of file diff --git a/src/assets/avatars/dodec/DodecAvatarGLTF/AvatarDodeca_Texture.png b/src/assets/avatars/dodec/DodecAvatarGLTF/AvatarDodeca_Texture.png deleted file mode 100644 index 3f7585fbd2ec32b717296daedb765cad19b9daa7..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/dodec/DodecAvatarGLTF/AvatarDodeca_Texture.png and /dev/null differ diff --git a/src/assets/avatars/dodec/DodecAvatarGLTF/DodecAvatar_Head.bin b/src/assets/avatars/dodec/DodecAvatarGLTF/DodecAvatar_Head.bin deleted file mode 100644 index b4284d677642861c1d1520e36ea43cffc1e6516f..0000000000000000000000000000000000000000 Binary files a/src/assets/avatars/dodec/DodecAvatarGLTF/DodecAvatar_Head.bin and /dev/null differ diff --git a/src/assets/avatars/dodec/DodecAvatarGLTF/DodecAvatar_Head.gltf b/src/assets/avatars/dodec/DodecAvatarGLTF/DodecAvatar_Head.gltf deleted file mode 100644 index 94949cd5b070a5bf5f87703339f62076b020be3e..0000000000000000000000000000000000000000 --- a/src/assets/avatars/dodec/DodecAvatarGLTF/DodecAvatar_Head.gltf +++ /dev/null @@ -1 +0,0 @@ -{"accessors":[{"bufferView":0,"componentType":5126,"count":384,"type":"VEC3","max":[0.47052082419395447,0.47052082419395447,0.47052082419395447],"min":[-0.47052082419395447,-0.47052082419395447,-0.47052082419395447]},{"bufferView":1,"componentType":5126,"count":384,"type":"VEC3","max":[0.99266362190246582,0.987006425857544,1.0],"min":[-0.99266362190246582,-0.98700630664825439,-1.0]},{"bufferView":2,"componentType":5126,"count":384,"type":"VEC4","max":[1.0,1.0,0.987902820110321,1.0],"min":[-1.0,-1.0,-0.95196151733398438,-1.0]},{"bufferView":3,"componentType":5126,"count":384,"type":"VEC2","max":[0.99672305583953857,-0.5052105188369751],"min":[0.038782119750976563,-0.99697029590606689]},{"bufferView":4,"componentType":5123,"count":1464,"type":"SCALAR","max":[383.0],"min":[0.0]}],"asset":{"version":"2.0"},"buffers":[{"uri":"DodecAvatar_Head.bin","byteLength":21360}],"bufferViews":[{"buffer":0,"byteLength":4608},{"buffer":0,"byteOffset":4608,"byteLength":4608},{"buffer":0,"byteOffset":9216,"byteLength":6144},{"buffer":0,"byteOffset":15360,"byteLength":3072},{"buffer":0,"byteOffset":18432,"byteLength":2928}],"images":[{"uri":"AvatarDodeca_Texture.png","name":"AvatarDodeca_Texture"}],"materials":[{"pbrMetallicRoughness":{"baseColorTexture":{"index":0},"metallicFactor":0.0},"name":"AvatarDodeca_Texture"}],"meshes":[{"primitives":[{"attributes":{"POSITION":0,"NORMAL":1,"TANGENT":2,"TEXCOORD_0":3},"indices":4,"material":0}],"name":"DodecAvatar_Head"}],"nodes":[{"mesh":0,"name":"DodecAvatar_Head"}],"samplers":[{}],"scene":0,"scenes":[{"nodes":[0],"name":"DodecAvatar_Head"}],"textures":[{"sampler":0,"source":0,"name":"AvatarDodeca_Texture"}]} \ No newline at end of file diff --git a/src/assets/environments/RockIslandTest/LowPolyGradients.png b/src/assets/environments/RockIslandTest/LowPolyGradients.png deleted file mode 100644 index 694117894c4e7e32ba67e64547f3bd5ba58d991f..0000000000000000000000000000000000000000 Binary files a/src/assets/environments/RockIslandTest/LowPolyGradients.png and /dev/null differ diff --git a/src/assets/environments/RockIslandTest/RockIsland.bin b/src/assets/environments/RockIslandTest/RockIsland.bin deleted file mode 100644 index f739cbb7fdc727e2c9f7f2b66364bd9ece6425c7..0000000000000000000000000000000000000000 Binary files a/src/assets/environments/RockIslandTest/RockIsland.bin and /dev/null differ diff --git a/src/assets/environments/RockIslandTest/RockIsland.gltf b/src/assets/environments/RockIslandTest/RockIsland.gltf deleted file mode 100644 index f98afc3480872c4a8fb44e991f5bd4694a8c3e96..0000000000000000000000000000000000000000 --- a/src/assets/environments/RockIslandTest/RockIsland.gltf +++ /dev/null @@ -1 +0,0 @@ -{"accessors":[{"bufferView":0,"componentType":5126,"count":1411,"type":"VEC3","max":[19.999996185302734,3.1086244689504383E-15,20.000003814697266],"min":[-20.000003814697266,-1.3123339414596558,-19.999996185302734]},{"bufferView":1,"componentType":5126,"count":1411,"type":"VEC3","max":[0.26660636067390442,1.0,0.33901205658912659],"min":[-0.20681542158126831,0.932644248008728,-0.23218832910060883]},{"bufferView":2,"componentType":5126,"count":1411,"type":"VEC4","max":[-0.96324127912521362,0.26863479614257813,0.00802996288985014,1.0],"min":[-1.0,-0.21762958168983459,-0.0092367539182305336,1.0]},{"bufferView":3,"componentType":5126,"count":1411,"type":"VEC2","max":[1.0,-0.5],"min":[0.5,-1.0]},{"bufferView":4,"componentType":5123,"count":7926,"type":"SCALAR","max":[1410.0],"min":[0.0]},{"bufferView":5,"componentType":5126,"count":648,"type":"VEC3","max":[2.9559423923492432,2.1683521270751953,3.1799838542938232],"min":[-3.5352246761322021,-0.44372734427452087,-3.1799838542938232]},{"bufferView":6,"componentType":5126,"count":648,"type":"VEC3","max":[0.999163031578064,0.99966990947723389,0.98909211158752441],"min":[-0.97800123691558838,-1.0,-0.99961471557617188]},{"bufferView":7,"componentType":5126,"count":648,"type":"VEC4","max":[1.0,0.879211962223053,1.0,1.0],"min":[-0.99995076656341553,-0.99060577154159546,-0.99919396638870239,-1.0]},{"bufferView":8,"componentType":5126,"count":648,"type":"VEC2","max":[0.43582868576049805,-0.0074357390403747559],"min":[0.0037140846252441406,-0.99294942617416382]},{"bufferView":9,"componentType":5123,"count":1086,"type":"SCALAR","max":[647.0],"min":[0.0]},{"bufferView":10,"componentType":5126,"count":648,"type":"VEC3","max":[2.9559423923492432,2.1683521270751953,3.1799838542938232],"min":[-3.5352246761322021,-0.44372734427452087,-3.1799838542938232]},{"bufferView":11,"componentType":5126,"count":648,"type":"VEC3","max":[0.999163031578064,0.99966990947723389,0.98909211158752441],"min":[-0.97800123691558838,-1.0,-0.99961471557617188]},{"bufferView":12,"componentType":5126,"count":648,"type":"VEC4","max":[1.0,0.879211962223053,1.0,1.0],"min":[-0.99995076656341553,-0.99060577154159546,-0.99919396638870239,-1.0]},{"bufferView":13,"componentType":5126,"count":648,"type":"VEC2","max":[0.43582868576049805,-0.0074357390403747559],"min":[0.0037140846252441406,-0.99294942617416382]},{"bufferView":14,"componentType":5123,"count":1086,"type":"SCALAR","max":[647.0],"min":[0.0]},{"bufferView":15,"componentType":5126,"count":546,"type":"VEC3","max":[2.9899981021881104,3.5676181316375732,2.8179035186767578],"min":[-3.8418266773223877,-0.040709495544433594,-3.4786128997802734]},{"bufferView":16,"componentType":5126,"count":546,"type":"VEC3","max":[0.96864801645278931,0.99882489442825317,0.99907445907592773],"min":[-0.98354208469390869,-0.74868243932724,-0.98847699165344238]},{"bufferView":17,"componentType":5126,"count":546,"type":"VEC4","max":[1.0,0.96006858348846436,0.99997138977050781,1.0],"min":[-0.99678885936737061,-0.99173903465271,-0.99109262228012085,1.0]},{"bufferView":18,"componentType":5126,"count":546,"type":"VEC2","max":[0.49659347534179688,-0.017128758132457733],"min":[0.25181496143341064,-0.997360348701477]},{"bufferView":19,"componentType":5123,"count":1014,"type":"SCALAR","max":[545.0],"min":[0.0]},{"bufferView":20,"componentType":5126,"count":546,"type":"VEC3","max":[2.9899981021881104,3.5676181316375732,2.8179035186767578],"min":[-3.8418266773223877,-0.040709495544433594,-3.4786128997802734]},{"bufferView":21,"componentType":5126,"count":546,"type":"VEC3","max":[0.96864801645278931,0.99882489442825317,0.99907445907592773],"min":[-0.98354208469390869,-0.74868243932724,-0.98847699165344238]},{"bufferView":22,"componentType":5126,"count":546,"type":"VEC4","max":[1.0,0.96006858348846436,0.99997138977050781,1.0],"min":[-0.99678885936737061,-0.99173903465271,-0.99109262228012085,1.0]},{"bufferView":23,"componentType":5126,"count":546,"type":"VEC2","max":[0.49721819162368774,-0.017128758132457733],"min":[0.25243967771530151,-0.997360348701477]},{"bufferView":24,"componentType":5123,"count":1014,"type":"SCALAR","max":[545.0],"min":[0.0]},{"bufferView":25,"componentType":5126,"count":546,"type":"VEC3","max":[2.9899981021881104,3.5676181316375732,2.8179035186767578],"min":[-3.8418266773223877,-0.040709495544433594,-3.4786128997802734]},{"bufferView":26,"componentType":5126,"count":546,"type":"VEC3","max":[0.96864801645278931,0.99882489442825317,0.99907445907592773],"min":[-0.98354208469390869,-0.74868243932724,-0.98847699165344238]},{"bufferView":27,"componentType":5126,"count":546,"type":"VEC4","max":[1.0,0.96006858348846436,0.99997138977050781,1.0],"min":[-0.99678885936737061,-0.99173903465271,-0.99109262228012085,1.0]},{"bufferView":28,"componentType":5126,"count":546,"type":"VEC2","max":[0.24725833535194397,-0.017128758132457733],"min":[0.0024798214435577393,-0.997360348701477]},{"bufferView":29,"componentType":5123,"count":1014,"type":"SCALAR","max":[545.0],"min":[0.0]},{"bufferView":30,"componentType":5126,"count":82,"type":"VEC3","max":[0.93866407871246338,1.0926105976104736,0.86003494262695313],"min":[-0.61562132835388184,0.0,-0.91247844696044922]},{"bufferView":31,"componentType":5126,"count":82,"type":"VEC3","max":[0.94896394014358521,0.99244141578674316,0.99672383069992065],"min":[-0.99999809265136719,0.0,-0.94705736637115479]},{"bufferView":32,"componentType":5126,"count":82,"type":"VEC4","max":[0.99672383069992065,0.26544073224067688,0.99382126331329346,1.0],"min":[-0.98112761974334717,-0.342925488948822,-0.99999809265136719,1.0]},{"bufferView":33,"componentType":5126,"count":82,"type":"VEC2","max":[0.46181493997573853,-0.0877450704574585],"min":[0.25926116108894348,-0.982083797454834]},{"bufferView":34,"componentType":5121,"count":144,"type":"SCALAR","max":[81.0],"min":[0.0]},{"bufferView":35,"componentType":5126,"count":82,"type":"VEC3","max":[2.3649082183837891,1.0926105976104736,1.9330106973648071],"min":[-2.1655979156494141,0.0,-2.0063893795013428]},{"bufferView":36,"componentType":5126,"count":82,"type":"VEC3","max":[0.98967838287353516,0.99887090921401978,0.92581111192703247],"min":[-0.98946976661682129,0.0,-0.99940323829650879]},{"bufferView":37,"componentType":5126,"count":82,"type":"VEC4","max":[0.975090742111206,0.36814635992050171,0.99176400899887085,1.0],"min":[-0.99951469898223877,-0.22390003502368927,-0.99675518274307251,1.0]},{"bufferView":38,"componentType":5126,"count":82,"type":"VEC2","max":[0.46181493997573853,-0.0877450704574585],"min":[0.25926116108894348,-0.982083797454834]},{"bufferView":39,"componentType":5121,"count":144,"type":"SCALAR","max":[81.0],"min":[0.0]},{"bufferView":40,"componentType":5126,"count":108,"type":"VEC3","max":[1.2821140289306641,1.4500410556793213,0.71328639984130859],"min":[-1.5092668533325195,0.0,-2.6325387954711914]},{"bufferView":41,"componentType":5126,"count":108,"type":"VEC3","max":[0.99886143207550049,0.99783533811569214,0.95127010345458984],"min":[-0.94242948293685913,-0.033464446663856506,-0.98947012424468994]},{"bufferView":42,"componentType":5126,"count":108,"type":"VEC4","max":[0.97160744667053223,0.94099634885787964,0.99991941452026367,1.0],"min":[-0.99569183588027954,-0.98788422346115112,-0.9930422306060791,1.0]},{"bufferView":43,"componentType":5126,"count":108,"type":"VEC2","max":[0.498996376991272,-0.16156533360481262],"min":[0.28047823905944824,-0.99637091159820557]},{"bufferView":44,"componentType":5121,"count":192,"type":"SCALAR","max":[107.0],"min":[0.0]},{"bufferView":45,"componentType":5126,"count":108,"type":"VEC3","max":[1.2821140289306641,1.4500410556793213,0.71328639984130859],"min":[-1.5092668533325195,0.0,-2.6325387954711914]},{"bufferView":46,"componentType":5126,"count":108,"type":"VEC3","max":[0.99886143207550049,0.99783533811569214,0.95127010345458984],"min":[-0.94242948293685913,-0.033464446663856506,-0.98947012424468994]},{"bufferView":47,"componentType":5126,"count":108,"type":"VEC4","max":[0.97160744667053223,0.94099634885787964,0.99991941452026367,1.0],"min":[-0.99569183588027954,-0.98788422346115112,-0.9930422306060791,1.0]},{"bufferView":48,"componentType":5126,"count":108,"type":"VEC2","max":[0.498996376991272,-0.16156533360481262],"min":[0.28047823905944824,-0.99637091159820557]},{"bufferView":49,"componentType":5121,"count":192,"type":"SCALAR","max":[107.0],"min":[0.0]},{"bufferView":50,"componentType":5126,"count":403,"type":"VEC3","max":[16.000001907348633,0.0,16.000003814697266],"min":[-16.000001907348633,-15.020404815673828,-16.000003814697266]},{"bufferView":51,"componentType":5126,"count":403,"type":"VEC3","max":[0.95499247312545776,0.74890261888504028,0.97037827968597412],"min":[-0.99407404661178589,-0.98670178651809692,-0.95499193668365479]},{"bufferView":52,"componentType":5126,"count":403,"type":"VEC4","max":[1.0,0.787509560585022,0.99889814853668213,1.0],"min":[-1.0,-0.95876884460449219,-1.0,1.0]},{"bufferView":53,"componentType":5126,"count":403,"type":"VEC2","max":[1.3963935375213623,-0.0097050070762634277],"min":[-0.39781582355499268,-1.0070931911468506]},{"bufferView":54,"componentType":5123,"count":702,"type":"SCALAR","max":[402.0],"min":[0.0]},{"bufferView":55,"componentType":5126,"count":378,"type":"VEC3","max":[123.10870361328125,-38.315250396728516,1326.8095703125],"min":[-1236.1318359375,-966.20843505859375,-1620.9500732421875]},{"bufferView":56,"componentType":5126,"count":378,"type":"VEC3","max":[0.999698281288147,1.0,0.84968304634094238],"min":[-0.0063941203989088535,-0.27718955278396606,-0.87069481611251831]},{"bufferView":57,"componentType":5126,"count":378,"type":"VEC4","max":[0.99994182586669922,0.98820680379867554,0.999813973903656,1.0],"min":[-0.85544717311859131,-0.99870669841766357,-0.99975448846817017,1.0]},{"bufferView":58,"componentType":5126,"count":378,"type":"VEC2","max":[0.24664026498794556,-0.0046227052807807922],"min":[0.0012694597244262695,-0.98859697580337524]},{"bufferView":59,"componentType":5123,"count":960,"type":"SCALAR","max":[377.0],"min":[0.0]},{"bufferView":60,"componentType":5126,"count":1717,"type":"VEC3","max":[19.446229934692383,12.104448318481445,19.578594207763672],"min":[-19.710948944091797,-12.104447364807129,-19.578592300415039]},{"bufferView":61,"componentType":5126,"count":1717,"type":"VEC3","max":[0.98982715606689453,1.0,0.9982561469078064],"min":[-0.99698609113693237,-1.0,-0.99995458126068115]},{"bufferView":62,"componentType":5126,"count":1717,"type":"VEC4","max":[1.0,0.87921351194381714,0.998589813709259,1.0],"min":[-0.99999558925628662,-0.990605890750885,-0.99973934888839722,-1.0]},{"bufferView":63,"componentType":5126,"count":1717,"type":"VEC2","max":[0.9969220757484436,-0.0074357390403747559],"min":[0.00886639952659607,-0.99692213535308838]},{"bufferView":64,"componentType":5123,"count":2928,"type":"SCALAR","max":[1716.0],"min":[0.0]}],"asset":{"version":"2.0"},"buffers":[{"uri":"RockIsland.bin","byteLength":382836}],"bufferViews":[{"buffer":0,"byteLength":16932},{"buffer":0,"byteOffset":16932,"byteLength":16932},{"buffer":0,"byteOffset":33864,"byteLength":22576},{"buffer":0,"byteOffset":56440,"byteLength":11288},{"buffer":0,"byteOffset":67728,"byteLength":15852},{"buffer":0,"byteOffset":83580,"byteLength":7776},{"buffer":0,"byteOffset":91356,"byteLength":7776},{"buffer":0,"byteOffset":99132,"byteLength":10368},{"buffer":0,"byteOffset":109500,"byteLength":5184},{"buffer":0,"byteOffset":114684,"byteLength":2172},{"buffer":0,"byteOffset":116856,"byteLength":7776},{"buffer":0,"byteOffset":124632,"byteLength":7776},{"buffer":0,"byteOffset":132408,"byteLength":10368},{"buffer":0,"byteOffset":142776,"byteLength":5184},{"buffer":0,"byteOffset":147960,"byteLength":2172},{"buffer":0,"byteOffset":150132,"byteLength":6552},{"buffer":0,"byteOffset":156684,"byteLength":6552},{"buffer":0,"byteOffset":163236,"byteLength":8736},{"buffer":0,"byteOffset":171972,"byteLength":4368},{"buffer":0,"byteOffset":176340,"byteLength":2028},{"buffer":0,"byteOffset":178368,"byteLength":6552},{"buffer":0,"byteOffset":184920,"byteLength":6552},{"buffer":0,"byteOffset":191472,"byteLength":8736},{"buffer":0,"byteOffset":200208,"byteLength":4368},{"buffer":0,"byteOffset":204576,"byteLength":2028},{"buffer":0,"byteOffset":206604,"byteLength":6552},{"buffer":0,"byteOffset":213156,"byteLength":6552},{"buffer":0,"byteOffset":219708,"byteLength":8736},{"buffer":0,"byteOffset":228444,"byteLength":4368},{"buffer":0,"byteOffset":232812,"byteLength":2028},{"buffer":0,"byteOffset":234840,"byteLength":984},{"buffer":0,"byteOffset":235824,"byteLength":984},{"buffer":0,"byteOffset":236808,"byteLength":1312},{"buffer":0,"byteOffset":238120,"byteLength":656},{"buffer":0,"byteOffset":238776,"byteLength":144},{"buffer":0,"byteOffset":238920,"byteLength":984},{"buffer":0,"byteOffset":239904,"byteLength":984},{"buffer":0,"byteOffset":240888,"byteLength":1312},{"buffer":0,"byteOffset":242200,"byteLength":656},{"buffer":0,"byteOffset":242856,"byteLength":144},{"buffer":0,"byteOffset":243000,"byteLength":1296},{"buffer":0,"byteOffset":244296,"byteLength":1296},{"buffer":0,"byteOffset":245592,"byteLength":1728},{"buffer":0,"byteOffset":247320,"byteLength":864},{"buffer":0,"byteOffset":248184,"byteLength":192},{"buffer":0,"byteOffset":248376,"byteLength":1296},{"buffer":0,"byteOffset":249672,"byteLength":1296},{"buffer":0,"byteOffset":250968,"byteLength":1728},{"buffer":0,"byteOffset":252696,"byteLength":864},{"buffer":0,"byteOffset":253560,"byteLength":192},{"buffer":0,"byteOffset":253752,"byteLength":4836},{"buffer":0,"byteOffset":258588,"byteLength":4836},{"buffer":0,"byteOffset":263424,"byteLength":6448},{"buffer":0,"byteOffset":269872,"byteLength":3224},{"buffer":0,"byteOffset":273096,"byteLength":1404},{"buffer":0,"byteOffset":274500,"byteLength":4536},{"buffer":0,"byteOffset":279036,"byteLength":4536},{"buffer":0,"byteOffset":283572,"byteLength":6048},{"buffer":0,"byteOffset":289620,"byteLength":3024},{"buffer":0,"byteOffset":292644,"byteLength":1920},{"buffer":0,"byteOffset":294564,"byteLength":20604},{"buffer":0,"byteOffset":315168,"byteLength":20604},{"buffer":0,"byteOffset":335772,"byteLength":27472},{"buffer":0,"byteOffset":363244,"byteLength":13736},{"buffer":0,"byteOffset":376980,"byteLength":5856}],"images":[{"uri":"LowPolyGradients.png","name":"LowPolyGradients"}],"materials":[{"pbrMetallicRoughness":{"baseColorTexture":{"index":0},"metallicFactor":0.0},"name":"LowPolyGradients"}],"meshes":[{"primitives":[{"attributes":{"POSITION":0,"NORMAL":1,"TANGENT":2,"TEXCOORD_0":3},"indices":4,"material":0}],"name":"RockIsland_Meshes"},{"primitives":[{"attributes":{"POSITION":5,"NORMAL":6,"TANGENT":7,"TEXCOORD_0":8},"indices":9,"material":0}],"name":"RockCollapse_00"},{"primitives":[{"attributes":{"POSITION":10,"NORMAL":11,"TANGENT":12,"TEXCOORD_0":13},"indices":14,"material":0}],"name":"RockCollapse_01"},{"primitives":[{"attributes":{"POSITION":15,"NORMAL":16,"TANGENT":17,"TEXCOORD_0":18},"indices":19,"material":0}],"name":"RockMed_00"},{"primitives":[{"attributes":{"POSITION":20,"NORMAL":21,"TANGENT":22,"TEXCOORD_0":23},"indices":24,"material":0}],"name":"RockMed_01"},{"primitives":[{"attributes":{"POSITION":25,"NORMAL":26,"TANGENT":27,"TEXCOORD_0":28},"indices":29,"material":0}],"name":"RockMed_02"},{"primitives":[{"attributes":{"POSITION":30,"NORMAL":31,"TANGENT":32,"TEXCOORD_0":33},"indices":34,"material":0}],"name":"RockSmall_00"},{"primitives":[{"attributes":{"POSITION":35,"NORMAL":36,"TANGENT":37,"TEXCOORD_0":38},"indices":39,"material":0}],"name":"RockSmall_01"},{"primitives":[{"attributes":{"POSITION":40,"NORMAL":41,"TANGENT":42,"TEXCOORD_0":43},"indices":44,"material":0}],"name":"RockSmallA_01"},{"primitives":[{"attributes":{"POSITION":45,"NORMAL":46,"TANGENT":47,"TEXCOORD_0":48},"indices":49,"material":0}],"name":"RockSmallA_02"},{"primitives":[{"attributes":{"POSITION":50,"NORMAL":51,"TANGENT":52,"TEXCOORD_0":53},"indices":54,"material":0}],"name":"RockUnderChunk"},{"primitives":[{"attributes":{"POSITION":55,"NORMAL":56,"TANGENT":57,"TEXCOORD_0":58},"indices":59,"material":0}],"name":"RockLandscape_background"},{"primitives":[{"attributes":{"POSITION":60,"NORMAL":61,"TANGENT":62,"TEXCOORD_0":63},"indices":64,"material":0}],"name":"RockIsland_Floater (1)"}],"nodes":[{"children":[1,2,3,4,5,6,7,8,9,10],"mesh":0,"name":"RockIsland_Meshes"},{"mesh":1,"scale":[1.4877162,1.4877162,1.4877162],"translation":[4.975782,-0.778213739,12.5263834],"name":"RockCollapse_00"},{"mesh":2,"rotation":[2.24125927E-17,0.8660254,2.24125927E-17,0.5],"scale":[2.08280277,2.08280277,2.08280277],"translation":[-12.5198393,-0.08149375,0.669323862],"name":"RockCollapse_01"},{"mesh":3,"scale":[0.419126272,0.419126272,0.419126272],"translation":[-2.89321947,-0.181781,8.143376],"name":"RockMed_00"},{"mesh":4,"rotation":[-8.00039162E-17,-0.923879564,-8.00039162E-17,0.382683456],"scale":[0.2933884,0.2933884,0.2933884],"translation":[5.78990173,-0.618600249,-2.91498733],"name":"RockMed_01"},{"mesh":5,"scale":[0.838252544,0.838252544,0.838252544],"translation":[9.599285,-0.566143334,-9.459988],"name":"RockMed_02"},{"mesh":6,"scale":[0.419126272,0.419126272,0.419126272],"translation":[-1.54470789,-0.181781,7.39793253],"name":"RockSmall_00"},{"mesh":7,"scale":[0.419126272,0.419126272,0.419126272],"translation":[0.2531415,-0.181781,-10.5903826],"name":"RockSmall_01"},{"mesh":8,"rotation":[-6.123234E-17,-1.0,-6.123234E-17,-5.05321539E-16],"scale":[0.419126272,0.419126272,0.419126272],"translation":[-3.29713774,-0.3228769,-5.73409271],"name":"RockSmallA_01"},{"mesh":9,"rotation":[-6.123234E-17,-1.0,-6.123234E-17,-5.05321539E-16],"scale":[1.54238474,0.7711924,1.54238474],"translation":[11.5860052,-0.1732521,2.40355229],"name":"RockSmallA_02"},{"mesh":10,"scale":[1.237053,1.237053,1.237053],"translation":[1.90734863E-06,-1.382638,2.861023E-06],"name":"RockUnderChunk"},{"mesh":11,"name":"RockLandscape_background"},{"mesh":12,"rotation":[0.0,0.8957491,0.0,0.44456014],"translation":[-106.7,47.2,-114.0],"name":"RockIsland_Floater (1)"},{"mesh":12,"rotation":[0.0,0.802093,0.0,-0.597199142],"translation":[195.6,129.0,336.0],"name":"RockIsland_Floater (4)"},{"mesh":12,"rotation":[0.0,0.8117935,0.0,0.5839446],"translation":[-26.0,10.4,129.0],"name":"RockIsland_Floater"},{"mesh":12,"rotation":[0.0,-0.394923657,0.0,0.918714],"translation":[-288.3,150.8,116.4],"name":"RockIsland_Floater (3)"},{"mesh":12,"rotation":[0.0,-0.4841211,0.0,0.875001],"translation":[102.9,29.8,-102.6],"name":"RockIsland_Floater (2)"}],"samplers":[{}],"scene":0,"scenes":[{"nodes":[0,11,12,13,14,15,16],"name":"RockIsland"}],"textures":[{"sampler":0,"source":0,"name":"LowPolyGradients"}]} \ No newline at end of file diff --git a/src/avatar-selector.js b/src/avatar-selector.js index ea3ff71a0f1f225cb9ae9f68a813167125bc3207..9f5aabab2417584d33a1d6eb43f75503a0212631 100644 --- a/src/avatar-selector.js +++ b/src/avatar-selector.js @@ -10,7 +10,6 @@ import "./vendor/GLTFLoader"; import "./components/animation-mixer"; import "./components/audio-feedback"; import "./components/loop-animation"; -import "./elements/a-progressive-asset"; import "./gltf-component-mappings"; import { avatars } from "./assets/avatars/avatars"; diff --git a/src/components/gltf-model-plus.js b/src/components/gltf-model-plus.js index 49c891ebb9260f84be62720288dfe72b04fa0c62..3864f9327c92ce63deddf8f08766a9316cf4a3da 100644 --- a/src/components/gltf-model-plus.js +++ b/src/components/gltf-model-plus.js @@ -166,7 +166,7 @@ function nextTick() { }); } -function cachedLoadGLTF(src, onProgress) { +function cachedLoadGLTF(src, preferredTechnique, onProgress) { return new Promise((resolve, reject) => { // Load the gltf model from the cache if it exists. if (GLTFCache[src]) { @@ -174,7 +174,10 @@ function cachedLoadGLTF(src, onProgress) { resolve(cloneGltf(GLTFCache[src])); } else { // Otherwise load the new gltf model. - new THREE.GLTFLoader().load( + const gltfLoader = new THREE.GLTFLoader(); + gltfLoader.preferredTechnique = preferredTechnique; + + gltfLoader.load( src, model => { if (!GLTFCache[src]) { @@ -193,7 +196,8 @@ function cachedLoadGLTF(src, onProgress) { AFRAME.registerComponent("gltf-model-plus", { schema: { src: { type: "string" }, - inflate: { default: false } + inflate: { default: false }, + preferredTechnique: { default: AFRAME.utils.device.isMobile() ? "KHR_materials_unlit" : "pbrMetallicRoughness" } }, init() { @@ -244,7 +248,7 @@ AFRAME.registerComponent("gltf-model-plus", { return; } - const model = await cachedLoadGLTF(src); + const model = await cachedLoadGLTF(src, this.data.preferredTechnique); // If we started loading something else already // TODO: there should be a way to cancel loading instead diff --git a/src/elements/a-progressive-asset.js b/src/elements/a-progressive-asset.js deleted file mode 100644 index db51b9b74484043a1f83847cc64d4ccc4bc6554c..0000000000000000000000000000000000000000 --- a/src/elements/a-progressive-asset.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Modified version of a-asset-item that adds high-src and low-src options - * Extracted from https://github.com/aframevr/aframe/blob/master/src/core/a-assets.js - */ - -AFRAME.registerElement("a-progressive-asset", { - prototype: Object.create(AFRAME.ANode.prototype, { - createdCallback: { - value() { - this.data = null; - this.isAssetItem = true; - } - }, - - attachedCallback: { - value() { - if (!this.parentNode.fileLoader) { - throw new Error("a-progressive-asset must be the child of an a-assets element."); - } - - this.fileLoader = this.parentNode.fileLoader; - - const self = this; - const fallbackSrc = this.getAttribute("src"); - const highSrc = this.getAttribute("high-src"); - const lowSrc = this.getAttribute("low-src"); - - let src = fallbackSrc; - - if (window.APP.quality === "high") { - src = highSrc; - } else if (window.APP.quality === "low") { - src = lowSrc; - } - - this.fileLoader.setResponseType(this.getAttribute("response-type")); - this.fileLoader.load( - src, - function handleOnLoad(response) { - self.data = response; - /* - Workaround for a Chrome bug. If another XHR is sent to the same url before the - previous one closes, the second request never finishes. - setTimeout finishes the first request and lets the logic triggered by load open - subsequent requests. - setTimeout can be removed once the fix for the bug below ships: - https://bugs.chromium.org/p/chromium/issues/detail?id=633696&q=component%3ABlink%3ENetwork%3EXHR%20&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified - */ - setTimeout(function load() { - AFRAME.ANode.prototype.load.call(self); - }); - }, - function handleOnProgress(xhr) { - self.emit("progress", { - loadedBytes: xhr.loaded, - totalBytes: xhr.total, - xhr: xhr - }); - }, - function handleOnError(xhr) { - self.emit("error", { xhr: xhr }); - } - ); - } - } - }) -}); diff --git a/src/hub.html b/src/hub.html index a18d5159b09230df5eca4a3a42df5fabac8c74c1..5ff15546d7ef57bc1494334af385df801b2b23a3 100644 --- a/src/hub.html +++ b/src/hub.html @@ -31,69 +31,16 @@ <img id="muted" src="./assets/hud/muted.png" > <img id="avatar" src="./assets/hud/avatar.jpg" > - <a-progressive-asset - id="botdefault" - response-type="arraybuffer" - src="./assets/avatars/BotDefault_Avatar_Unlit.glb" - high-src="./assets/avatars/BotDefault_Avatar.glb" - low-src="./assets/avatars/BotDefault_Avatar_Unlit.glb" - ></a-progressive-asset> - <a-progressive-asset - id="botbobo" - response-type="arraybuffer" - src="./assets/avatars/BotBobo_Avatar_Unlit.glb" - high-src="./assets/avatars/BotBobo_Avatar.glb" - low-src="./assets/avatars/BotBobo_Avatar_Unlit.glb" - ></a-progressive-asset> - <a-progressive-asset - id="botdom" - response-type="arraybuffer" - src="./assets/avatars/BotDom_Avatar_Unlit.glb" - high-src="./assets/avatars/BotDom_Avatar.glb" - low-src="./assets/avatars/BotDom_Avatar_Unlit.glb" - ></a-progressive-asset> - <a-progressive-asset - id="botgreg" - response-type="arraybuffer" - src="./assets/avatars/BotGreg_Avatar_Unlit.glb" - high-src="./assets/avatars/BotGreg_Avatar.glb" - low-src="./assets/avatars/BotGreg_Avatar_Unlit.glb" - ></a-progressive-asset> - <a-progressive-asset - id="botguest" - response-type="arraybuffer" - src="./assets/avatars/BotGuest_Avatar_Unlit.glb" - high-src="./assets/avatars/BotGuest_Avatar.glb" - low-src="./assets/avatars/BotGuest_Avatar_Unlit.glb" - ></a-progressive-asset> - <a-progressive-asset - id="botjim" - response-type="arraybuffer" - src="./assets/avatars/BotJim_Avatar_Unlit.glb" - high-src="./assets/avatars/BotJim_Avatar.glb" - low-src="./assets/avatars/BotJim_Avatar_Unlit.glb" - ></a-progressive-asset> - <a-progressive-asset - id="botpinky" - response-type="arraybuffer" - src="./assets/avatars/BotPinky_Avatar_Unlit.glb" - high-src="./assets/avatars/BotPinky_Avatar.glb" - low-src="./assets/avatars/BotPinky_Avatar_Unlit.glb" - ></a-progressive-asset> - <a-progressive-asset - id="botrobert" - response-type="arraybuffer" - src="./assets/avatars/BotRobert_Avatar_Unlit.glb" - high-src="./assets/avatars/BotRobert_Avatar.glb" - low-src="./assets/avatars/BotRobert_Avatar_Unlit.glb" - ></a-progressive-asset> - <a-progressive-asset - id="botwoody" - response-type="arraybuffer" - src="./assets/avatars/BotWoody_Avatar_Unlit.glb" - high-src="./assets/avatars/BotWoody_Avatar.glb" - low-src="./assets/avatars/BotWoody_Avatar_Unlit.glb" - ></a-progressive-asset> + <a-asset-item id="botdefault" response-type="arraybuffer" src="https://asset-bundles-dev.reticulum.io/bots/BotDefault_Avatar-9f71f8ff22.gltf"></a-asset-item> + <a-asset-item id="botbobo" response-type="arraybuffer" src="https://asset-bundles-dev.reticulum.io/bots/BotBobo_Avatar-f9740a010b.gltf"></a-asset-item> + <a-asset-item id="botdom" response-type="arraybuffer" src="https://asset-bundles-dev.reticulum.io/bots/BotDom_Avatar-6aa1b5d781.gltf"></a-asset-item> + <a-asset-item id="botgreg" response-type="arraybuffer" src="https://asset-bundles-dev.reticulum.io/bots/BotGreg_Avatar-98d39797bb.gltf"></a-asset-item> + <a-asset-item id="botguest" response-type="arraybuffer" src="https://asset-bundles-dev.reticulum.io/bots/BotGuest_Avatar-78cd857332.gltf"></a-asset-item> + <a-asset-item id="botjim" response-type="arraybuffer" src="https://asset-bundles-dev.reticulum.io/bots/BotJim_Avatar-d28005a687.gltf"></a-asset-item> + <a-asset-item id="botpinky" response-type="arraybuffer" src="https://asset-bundles-dev.reticulum.io/bots/BotPinky_Avatar-b0b93f8675.gltf"></a-asset-item> + <a-asset-item id="botrobert" response-type="arraybuffer" src="https://asset-bundles-dev.reticulum.io/bots/BotRobert_Avatar-e9554880f3.gltf"></a-asset-item> + <a-asset-item id="botwoody" response-type="arraybuffer" src="https://asset-bundles-dev.reticulum.io/bots/BotWoody_Avatar-0140485a23.gltf"></a-asset-item> + <a-asset-item id="watch-model" response-type="arraybuffer" src="./assets/hud/watch.glb"></a-asset-item> <a-asset-item id="interactable-duck" response-type="arraybuffer" src="./assets/interactables/duck/DuckyMesh.glb"></a-asset-item> diff --git a/src/hub.js b/src/hub.js index 05139629a35113bd4555b77eb6db2faef9a73a75..9df7c45a4476b0f69f51264864415308f076c8ad 100644 --- a/src/hub.js +++ b/src/hub.js @@ -67,8 +67,6 @@ if (qs.quality) { window.APP.quality = isMobile ? "low" : "high"; } -import "./elements/a-progressive-asset"; - import "aframe-physics-system"; import "aframe-physics-extras"; import "super-hands"; diff --git a/src/react-components/avatar-selector.js b/src/react-components/avatar-selector.js index 5cb456ee578bd0c966c02653296457d425c31326..2256845bb5538970c64f83047decb8842a615e7d 100644 --- a/src/react-components/avatar-selector.js +++ b/src/react-components/avatar-selector.js @@ -45,13 +45,7 @@ class AvatarSelector extends Component { render() { const avatarAssets = this.props.avatars.map(avatar => ( - <a-progressive-asset - id={avatar.id} - key={avatar.id} - response-type="arraybuffer" - high-src={`${avatar.models.high}`} - low-src={`${avatar.models.low}`} - /> + <a-asset-item id={avatar.id} key={avatar.id} response-type="arraybuffer" src={`${avatar.model}`} /> )); const avatarEntities = this.props.avatars.map((avatar, i) => ( diff --git a/src/vendor/GLTFLoader.js b/src/vendor/GLTFLoader.js index 0992a18dba1a474bed8999035e6c5e1376b568b3..25e397ce98c7ebc2be929195c6863338154c01bc 100644 --- a/src/vendor/GLTFLoader.js +++ b/src/vendor/GLTFLoader.js @@ -1,4 +1,5 @@ // https://github.com/mrdoob/three.js/blob/1e943ba79196737bc8505522e928595687c09425/examples/js/loaders/GLTFLoader.js +// + MOZ_alt_materials draft extension /** * @author Rich Tibbett / https://github.com/richtr @@ -14,6 +15,7 @@ THREE.GLTFLoader = ( function () { this.manager = ( manager !== undefined ) ? manager : THREE.DefaultLoadingManager; this.dracoLoader = null; + this.preferredTechnique = null; } @@ -125,6 +127,12 @@ THREE.GLTFLoader = ( function () { if ( json.extensionsUsed ) { + if ( json.extensionsUsed.indexOf( EXTENSIONS.MOZ_ALT_MATERIALS ) >= 0 ) { + + extensions[ EXTENSIONS.MOZ_ALT_MATERIALS ] = new MOZAltMaterialsExtension( this.preferredTechnique ); + + } + if ( json.extensionsUsed.indexOf( EXTENSIONS.KHR_LIGHTS ) >= 0 ) { extensions[ EXTENSIONS.KHR_LIGHTS ] = new GLTFLightsExtension( json ); @@ -226,7 +234,8 @@ THREE.GLTFLoader = ( function () { KHR_DRACO_MESH_COMPRESSION: 'KHR_draco_mesh_compression', KHR_LIGHTS: 'KHR_lights', KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS: 'KHR_materials_pbrSpecularGlossiness', - KHR_MATERIALS_UNLIT: 'KHR_materials_unlit' + KHR_MATERIALS_UNLIT: 'KHR_materials_unlit', + MOZ_ALT_MATERIALS: "MOZ_alt_materials" }; /** @@ -874,6 +883,32 @@ THREE.GLTFLoader = ( function () { } + function MOZAltMaterialsExtension ( preferredTechnique ) { + + this.name = EXTENSIONS.MOZ_ALT_MATERIALS; + this.preferredTechnique = preferredTechnique; + + } + + MOZAltMaterialsExtension.prototype.getAltMaterial = function ( materialDef, materials ) { + + var mamExtension = materialDef.extensions && materialDef.extensions[ EXTENSIONS.MOZ_ALT_MATERIALS ]; + + if ( mamExtension ) { + + if ( this.preferredTechnique && mamExtension[ this.preferredTechnique ] !== undefined ) { + + var altMaterialIndex = mamExtension[ this.preferredTechnique ]; + return materials[ altMaterialIndex ]; + + } + + return materialDef; + + } + + }; + /*********************************/ /********** INTERPOLATION ********/ /*********************************/ @@ -1855,6 +1890,13 @@ THREE.GLTFLoader = ( function () { var extensions = this.extensions; var materialDef = this.json.materials[ materialIndex ]; + if ( materialDef.extensions && materialDef.extensions[ EXTENSIONS.MOZ_ALT_MATERIALS ] ) { + + var mamExtension = extensions[ EXTENSIONS.MOZ_ALT_MATERIALS ]; + materialDef = mamExtension.getAltMaterial( materialDef, this.json.materials ); + + } + var materialType; var materialParams = {}; var materialExtensions = materialDef.extensions || {}; diff --git a/webpack.config.js b/webpack.config.js index 44b833cedd8bd6882cb629bec366d44014003de3..56e643a7260f3d8214b116ad83f0aad876c3f4a1 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -118,14 +118,7 @@ const config = { loader: "html-loader", options: { // <a-asset-item>'s src property is overwritten with the correct transformed asset url. - attrs: [ - "img:src", - "a-asset-item:src", - "a-progressive-asset:src", - "a-progressive-asset:high-src", - "a-progressive-asset:low-src", - "audio:src" - ], + attrs: ["img:src", "a-asset-item:src", "audio:src"], // You can get transformed asset urls in an html template using ${require("pathToFile.ext")} interpolate: "require" }