menu_book Course Curriculum (HTML Canvas) expand_more
Canvas Setup
Paths & Shapes
Styling
Text & Images
Transforms
Compositing & Clipping
Pixels & Animation
lighter blending
Learn lighter blending in HTML Canvas with a focused explanation, a topic-specific example, edge guidance, and a mastery check.
12 min read
•
Intermediate
canvas-055.js
js
const canvas=document.querySelector("canvas");
const ctx=canvas.getContext("2d");
ctx.globalCompositeOperation="lighter";ctx.fillStyle="red";ctx.fillRect(20,20,100,100);ctx.fillStyle="blue";ctx.fillRect(70,50,100,100);
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content