Comments (3)
I think this can be safely ignored. Chrome gives that warning whenever you read canvas pixels into normal Javascript variables. The property it suggests setting would turn off hardware acceleration for the canvas in question, which means no data has to be transferred from the GPU to get the pixel values in an array, but that also means that any canvas functions we call will also not get hardware acceleration. This would slow down things like tint()
a lot.
In general, loadPixels
/updatePixels
will be fine as long as you try to do it as little as possible (e.g. in your example, rotating your image once upfront is fine, just don't do it every frame in draw()
🙂) If you do need to be calling it often, maybe consider using a different approach. That will depend on the task, but sometimes it can be accomplished with blend modes or shaders (or in your case, maybe just a rotate(PI/2)
before drawing the image.)
from p5.js.
Thanks for your quick and clear answer @davepagurek! :o)
from p5.js.
Thanks @Wildernesss and @davepagurek. Closing this issue for organizational purpose. Please feel free to reopen it if further discussion is needed.
from p5.js.
Related Issues (20)
- Text-based canvas accessibility throws error on out-of-Y-bounds shapes HOT 8
- Inconsistent instance mode canvas sizing HOT 2
- set() does not use correct color HOT 5
- Wrong definition for circle on the reference for the `circle()` function. HOT 2
- How to correctly convert images and attach to canvas in p5js? HOT 2
- `saveGif()` (specifically: `_generateGlobalPalette()`) fails for large amount of frames HOT 5
- storeItem value must be serializable, not "any type HOT 5
- textBounds on multiline text breaks if global textLeading does not match the provided font size HOT 1
- Broken "Get Started for Developers" Hyperlink in README HOT 3
- Implement 2-d or n-d Arrays with a simple to use API (as per Vector)
- Calculation map() Documentation Enhancement HOT 1
- Horizontal overflow when creating canvas with createCanvas(windowWidth, windowHeight) HOT 2
- Error message not showing in proper selected language HOT 3
- Strange behavior of clips with three successive ellipses/circles HOT 4
- FES message is broken if reserved words are used. HOT 6
- Display issue for sliders created with createSlider HOT 11
- Text Wrapping Behavior in p5.js doesn't match the documentation HOT 4
- Image light orientation inconsistent with panorama HOT 5
- Revamp Friendly Error System's Parameter Validation HOT 1
- <code class="norender"> shows in the reference code snippets and break execution
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from p5.js.