SmallRomance
SmallRomance copied to clipboard
程序员的小浪漫
const width = util.isPhone() ? document.body.clientWidth : 360; const height = util.isPhone() ? document.body.clientHeight : 600; 源码中判断是否为移动端时,条件取值反了,建议修改为: const width = util.isPhone() ? 360 : document.body.clientWidth; const height = util.isPhone() ?...
前辈,很开心能看到您的这个开源项目,我想知道这个项目是怎么放在您的博客中的?还希望前辈指点迷津。
撩妹必备黑科技
支持非常好
一直是loading,求大佬帮助
如题
rt
### 预览  完整项目预览----[预览地址](http://lingyouhuiquanla.com/lover/); ### 粒子效果原理 在canvas中,可以通过`getImageData()`方法来获取像素数据。 ```javascript ctx.fillStyle = '#ff0000'; ctx.fillRect(0, 0, 1, 1); const imageData = ctx.getImageData(0, 0, 1, 1); ``` `imageData`有三个属性: * `data`:数组,包含了像素信息,每个像素会有四个长度,如`[255,0,0,255, ... ,255,127,0,255]`,分别代表该像素的RGBA值。 * `width`:`imageData`对象的宽。...