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

cesium-handle

v0.0.1

Published

cesium常用函数封装库

Downloads

1

Readme

这个是一些CesiumJS库相关的函数集合,它主要用于处理地理信息可视化操作,如捕获输入,转换坐标系,及创建和绘制图形等。下面将会为每个函数提供一个简单的描述:

  1. initMouse(viewer): 初始化鼠标动作,在 viewer (Cesium 视图容器)中设定鼠标左键、中键、右键和滚轮的功能。

  2. getModelHeight(viewer, lng, lat): 根据经纬度信息获取模型地理高度。

  3. getRad(d): 一个辅助函数,用于将度数转换为弧度。

  4. getDistance(lng1, lat1, lng2, lat2): 计算两个地点之间的距离(根据经纬度计算)。

  5. windowPositionToWGS84(viewer, windowPosition): 将屏幕坐标转换为 WGS84地理坐标。

  6. Cartesian3ToWGS84(Cartesian3Point): 将Cesium库中的Cartesian3坐标转换为WGS84地理坐标。

  7. WGS84ToCartesian3(viewer, WGS84Pos): 将WGS84地理坐标转换为Cesium库中的Cartesian3坐标。

  8. dashLine(color): 创建一个虚线材质。

  9. getColor(option):根据提供的选项参数获取颜色。

  10. changeShowWhichPointLabel(newId): 动态展示特定点的标签。

  11. resolveShape(type, option, entityPositionArr): 根据给定的参数,生成不同类型的geometries。

  12. drawShape(viewer, type, entityPositionArr, option = {}): 根据提供的选项在viewer上绘图。

  13. convertPickToCartesian3(viewer, pickPoint): 将屏幕坐标点转换为 Cartesian3 坐标。

  14. removeMouseAction(handler): 移除鼠标事件处理程序中的所有输入动作。

  15. dynamicDrawShape(viewer, type, payload, fn): 在 viewer 中根据鼠标动作动态绘制形状。

  16. drawWall(viewer, wallList, option): 根据提供的wallList和其他选项在viewer中绘制一个墙壁。