npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

amap-wave

v1.0.1

Published

Amap water wave diffusion special effects

Downloads

6

Readme

基于高德地图jsapi的水波扩散特效

这是我很早之前做的一个效果 此特效借鉴了网上的某篇博客,进行了优化修改 博客地址暂时忘记了,有同学发现了可以联系我将地址加上来

npm安装

npm install amap-wave

模块化导入

import AMapWave from 'amap-wave'

在html中的引入

<script src="/dist/amap-wave.js"></script>

示例

var map = new AMap.Map('container', {
  zoom: 11,//级别
  center: [116.397428, 39.90923],//中心点坐标
  viewMode: '3D'//使用3D视图
});

<!-- 实例化 -->
var wave = new AMapWave(map, 5000, 3, map.getCenter(), {
  fillColor: '#1fc315',
  fillOpacity: 0.8
})
<!-- 开始动画 -->
wave.start(5000, 2500)
<!-- 暂停动画 -->
wave.stop()
<!-- 销毁 -->
wave.remove()

参数

  • map 高德地图实例对象
  • radius Number,半径,单位米
  • level Number,级数,一次有几个圆扩散
  • point LngLat Object,位置position即中心点
  • style Object{fillColor: String, fillOpacity: Number} 样式对象,设置圆形的填充颜色以及扩散边缘的透明度

方法

  • start(distance|Number, t0|Number) 开始动画
    • distance 播放完成一轮动画(所有层全部播放完毕)的时间
    • t0 从中心扩散到边界的时间
  • stop 暂停
  • remove 销毁