Live2D | Showcase Live2D on the Web | SDK library
kandi X-RAY | Live2D Summary
kandi X-RAY | Live2D Summary
Showcase Live2D on the Web!
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Live2D
Live2D Key Features
Live2D Examples and Code Snippets
Community Discussions
Trending Discussions on Live2D
QUESTION
When I tried to load a png to canvas in JavaScript, I got this error code in Microsoft Edge. This error happened in Edge only!
My project works like this:
--/index.html
--/live2d.js
--/models (folder)
---> /model.json
---> /skin.png
This model.json
defined the pictures needed in the model, and the live2d.js
get data from model.json
and make the model animate.
I just load above resources from CDN domain (https://cdn.example.com), to show in the index on main domain (https://example.com).
In FireFox and Chrome you may see a cute catoon in the left-bottom corner, but you will see nothing in Edge, and you may check it in console:
SCRIPT5022: SCRIPT5022: SecurityError
To enable image CORS in Firefox & Chrome, I've set img.crossOrigin = "Anonymous";
, following Mozilla's guidebook, and it really works for Firefox & Chrome, except Edge!
I see another question on IE10 in this site, seems pretty same as my problem on Edge, so is that mean Edge has the same CORS strategy as IE? And if possible, what should I do to make the catoon show normally on Edge (with CORS)?
I'd be very appreciate for any of your suggestion!
PS. You may try it here: https://u.shino.cc/stackoverflowStep 1: Open the console
Step 2: Run commend: iLoveStackOverflow();
Do two steps in both Firefox/Chrome and Edge, you may know what i'm taking.
(Step 2 is reloading a new skin.png
from a CDN domain)
ANSWER
Answered 2018-Feb-02 at 03:29Yes, after a long time I'm sure it's Edge not support image cross origin, to deal with this I add a js to detect browser, if is IE/Edge, I have to load the image from the same domain...
QUESTION
DOMException: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The cross-origin image at "https://xxxx.xxxx/models/skin.png " may not be loaded.
The project work like this:
--index.html
--live2d.js
--models (folder)
---| model.json
---| skin.png
This model.json
defined the pictures needed in the model, and the live2d.js
get data from model.json
and make the model animate.
If I put these in my main domain, everything works well, but when I tried to load these from my CDN domain (means load only index.html
from maindomain, but load other files from CDN), I got this:
But as you can see, although I belive I've set cross-origin of CDN server well, and the live2d.js
and model.json
load from CDN domain normally, only the picture getting wrong.
I've searched for a while, like this, but my problem is pretty different, cause all my files were load from a server, include index.html
.
ANSWER
Answered 2017-Dec-09 at 07:51I also had the same problem and I fixed it by setting the crossorigin for the loader which is used to load and parse the obj file.
Like this,
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Live2D
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page