You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use this library in chrome extension. The content script doesn't have html context (thus no <script> tag). We have successfully imported live2d.min.js and it worked for the cubism v2. But we couldn't import live2dcubismcore.min.js. Have tried to use
import * as Live2DCubismCore from 'live2dcubismcore.min.js';
window.Live2DCubismCore = Live2DCubismCore;
but got an error Failed to start up Cubism 4 framework.. Strangely, there's also no retry logs being printed.
Any thoughts how we can properly include this library? Thanks!
The text was updated successfully, but these errors were encountered:
Similiar to #19, live2dcubismcore.min.js is not a module, nor does it mount anything on global scope (usually window), that's why it's supposed to be loaded by <script>.
Not familiar with chrome extension, but I guess there's a way to load this script separately, so that it'll work as if it's loaded by <script>.
If that doesn't work, another way is to modify the script by replacing the first statement:
varLive2DCubismCore;
with:
window.Live2DCubismCore={};
then the variable will be correctly exposed, and the script can be imported as usual:
I'm trying to use this library in chrome extension. The content script doesn't have html context (thus no
<script>
tag). We have successfully importedlive2d.min.js
and it worked for the cubism v2. But we couldn't importlive2dcubismcore.min.js
. Have tried to usebut got an error
Failed to start up Cubism 4 framework.
. Strangely, there's also no retry logs being printed.Any thoughts how we can properly include this library? Thanks!
The text was updated successfully, but these errors were encountered: