mirror of
https://github.com/exogen/t2-model-skinner.git
synced 2026-01-19 19:24:44 +00:00
Use defaults on error
This commit is contained in:
parent
3cffa96941
commit
248b969d26
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
self.__BUILD_MANIFEST=function(s){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[s,"static/chunks/e21e5bbe-b28e0079b469d4e8.js","static/chunks/ebc70433-4eccd1cb3af29a3e.js","static/chunks/6eb5140f-31a2b2da7903b885.js","static/chunks/5d416436-3c60fd013e24a5af.js","static/chunks/85d7bc83-1ca530d7d3f44153.js","static/chunks/3a17f596-9aeae038dfa51955.js","static/chunks/f580fadb-2911e2fbf64aae5a.js","static/chunks/515-13ff0773d41722ae.js","static/chunks/pages/index-d4d443df49e6b529.js"],"/_error":["static/chunks/pages/_error-54b9fcf45cb5bc62.js"],"/gallery":[s,"static/chunks/737a5600-aea383aaa2061cc6.js","static/chunks/918-3c6747f76df39072.js","static/css/922e89893536f2f9.css","static/chunks/pages/gallery-af1406fdc1af13f5.js"],sortedPages:["/","/_app","/_error","/gallery"]}}("static/chunks/cb355538-e538db8a1761f402.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
||||
self.__BUILD_MANIFEST=function(s){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[s,"static/chunks/e21e5bbe-b28e0079b469d4e8.js","static/chunks/ebc70433-4eccd1cb3af29a3e.js","static/chunks/6eb5140f-31a2b2da7903b885.js","static/chunks/5d416436-3c60fd013e24a5af.js","static/chunks/85d7bc83-1ca530d7d3f44153.js","static/chunks/3a17f596-9aeae038dfa51955.js","static/chunks/f580fadb-2911e2fbf64aae5a.js","static/chunks/515-13ff0773d41722ae.js","static/chunks/pages/index-28c32b1427b3bfd0.js"],"/_error":["static/chunks/pages/_error-54b9fcf45cb5bc62.js"],"/gallery":[s,"static/chunks/737a5600-aea383aaa2061cc6.js","static/chunks/918-3c6747f76df39072.js","static/css/922e89893536f2f9.css","static/chunks/pages/gallery-af1406fdc1af13f5.js"],sortedPages:["/","/_app","/_error","/gallery"]}}("static/chunks/cb355538-e538db8a1761f402.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
||||
2
docs/_next/static/chunks/pages/index-28c32b1427b3bfd0.js
Normal file
2
docs/_next/static/chunks/pages/index-28c32b1427b3bfd0.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -61,7 +61,7 @@ export function getSkinImageUrls({
|
|||
return Object.fromEntries(skin.materials);
|
||||
}
|
||||
}
|
||||
return {};
|
||||
throw new Error("No skin found");
|
||||
}
|
||||
switch (selectedModelType) {
|
||||
case "player":
|
||||
|
|
@ -252,15 +252,19 @@ export default function WarriorProvider({ children }: { children: ReactNode }) {
|
|||
|
||||
useEffect(() => {
|
||||
if (selectedSkin) {
|
||||
setSkinImageUrls(
|
||||
getSkinImageUrls({
|
||||
try {
|
||||
const skinImageUrls = getSkinImageUrls({
|
||||
basePath,
|
||||
actualModel,
|
||||
selectedModelType,
|
||||
selectedSkin,
|
||||
selectedSkinType,
|
||||
})
|
||||
);
|
||||
});
|
||||
setSkinImageUrls(skinImageUrls);
|
||||
} catch (err) {
|
||||
setSelectedSkinType("default");
|
||||
setSelectedSkin(modelDefaults[actualModel]);
|
||||
}
|
||||
}
|
||||
}, [
|
||||
basePath,
|
||||
|
|
|
|||
Loading…
Reference in a new issue