Closed IntroEvEivie closed 2 years ago
Sure. The Live2DModel.from()
method can accept a flat array of File
s containing all the files of a model, e.g. Live2DModel.from(files)
. Though working, it's an experimental feature and so not mentioned the docs.
The files array can be obtained by a file input or the drag and drop API.
Sure. The
Live2DModel.from()
method can accept a flat array ofFile
s containing all the files of a model, e.g.Live2DModel.from(files)
. Though working, it's an experimental feature and so not mentioned the docs.The files array can be obtained by a file input or the drag and drop API.
If you can, please explain in more detail. i'm facing problem loading .json and .moc files from local resource. But usually there is an error "Access to XMLHttpRequest at 'file:///...test.json' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. log.ts:25 [XHRLoader] Failed to load resource as json (Status 0): test.json". As far as I understand, it will not work if you use the server, but I want to display local resources on the Android platform in a webview and use it when this server is extremely difficult.
This is due to the security policy of the browser, and is out of the scope of this project, you can search the web for solutions. Basically, as long as you're able to load the files, there's no problem to use this plugin.
is it possible to display local .moc or .json files without using the server side?