52

用canvas 画烟花

 5 years ago
source link: https://juejin.im/post/5b587f59e51d45191e0d04ae
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
开始 最终效果: codepen 一开始都是一个单一的用例,定位在画布中央,再扩展开来 先获取canvas元素及可视宽高 let canvas = document.querySelector('#canvas') let context =

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK