• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

[canvas] Warning on getImageData uses from create.js library

Explorer ,
Dec 05, 2022 Dec 05, 2022

Copy link to clipboard

Copied

Hello all!

 

I'm using Chrome to test my canvas and I get a lot of these warning message:

 

Canvas2D: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true. See: https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently
b._testHit @ createjs.min.js:13
b._getObjectsUnderPoint @ createjs.min.js:13
b._getObjectsUnderPoint @ createjs.min.js:13
b._testMouseOver @ createjs.min.js:13
(anonymous) @ createjs.min.js:13
setInterval (async)
b.enableMouseOver @ createjs.min.js:13
handleComplete @ Burger_08a.html?8407550:116
(anonymous) @ Burger_08a.html?8407550:94
b._dispatchEvent @ createjs.min.js:12
b._dispatchEvent @ createjs.min.js:12
b.dispatchEvent @ createjs.min.js:12
b._sendComplete @ createjs.min.js:16
b._loadNext @ createjs.min.js:17
b._processFinishedLoad @ createjs.min.js:17
b._handleFileComplete @ createjs.min.js:17
(anonymous) @ createjs.min.js:12
b._dispatchEvent @ createjs.min.js:12
b._dispatchEvent @ createjs.min.js:12
b.dispatchEvent @ createjs.min.js:12
b._sendComplete @ createjs.min.js:16
b._handleAudioDecoded @ createjs.min.js:18
(anonymous) @ createjs.min.js:15

 

My javascript comprehension is quite basic. so I'm just guessing, this may be a way to reduce resource consumption. But not sure where do I should set willReadFrequently attribute to true.

Thanks

Views

907

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 05, 2022 Dec 05, 2022

Copy link to clipboard

Copied

you should be testing from adobe animate > control > test movie > in browser.

 

otherwise, if you open the published html from your local drive, you will see crose-domain errors when trying to load assets (like images).

 

you can also, upload to a server and test.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 05, 2022 Dec 05, 2022

Copy link to clipboard

Copied

Thank you Kglad!

Yes, I am testing that way. 
using the Adobe Animate localServer URL something like; http://127.0.0.1:8090/blablabla.html?6915 

But not sure what it does it mean, or if this is a reason to worry about high resource consumption.

  

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 05, 2022 Dec 05, 2022

Copy link to clipboard

Copied

it means you're violating a browser cross-domain restriction.

 

again, test using animate or upload to a server and test.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 06, 2022 Dec 06, 2022

Copy link to clipboard

Copied

LATEST

Hi, kglad!

I've uploaded it to a server to test and I received the same warning, 
https://burgers8d.netlify.app/ 

Any idea? Thanks again! 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines