🔳<canvas>
browser ⟩ canvas
<canvas> elements have 2 sizes:
canvas size: size displayed on the page. (that's what we set with CSS)
canvas resolution: number of pixels in the canvas. (like an image)
👉 three.js ⟩ Responsive Design
canvas.width 與 canvas.stlyle.width 作用不同❗
👉 segmentfault ⭐️
graphics
ctx.gradient() - create gradients.
.getContext() - returns
CanvasRenderingContext2Dfor"2d"WebGLRenderingContextfor"webgl"|"experimental-webgl"WebGL2RenderingContextfor"webgl2"ImageBitmapRenderingContextfor"bitmaprenderer"null, otherwise.
Last updated
Was this helpful?