fix(stage-ui-live2d): require .model.json or .model3.json for Live2D files (#1156)
This commit is contained in:
@@ -18,7 +18,7 @@ ZipLoader.createSettings = async (reader: JSZip) => {
|
||||
}
|
||||
|
||||
export function isSettingsFile(file: string) {
|
||||
return file.endsWith('model3.json')
|
||||
return file.endsWith('.model3.json') || file.endsWith('.model.json')
|
||||
}
|
||||
|
||||
export function isMocFile(file: string) {
|
||||
|
||||
@@ -114,7 +114,7 @@ export class OPFSCache {
|
||||
writePromises.push(OPFSCache.writeFile(dirHandle, relativePath, file))
|
||||
}
|
||||
|
||||
const settingsFile = files.find(f => f.name.endsWith('model.json') || f.name.endsWith('model3.json'))
|
||||
const settingsFile = files.find(f => f.name.endsWith('.model.json') || f.name.endsWith('.model3.json'))
|
||||
|
||||
if (!settingsFile) {
|
||||
// reconstruct settings files from ModelSettings
|
||||
|
||||
Reference in New Issue
Block a user