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-tools-fxt

v1.1.3

Published

cesium工具包

Downloads

86

Readme

cesium 工具

建议默认 cesium 版本为 ^1.119.0,node 版本为 ^18.18.2

目前测量功能已做向下兼容,其他工具暂未做向下兼容

工具测试

项目启动测试需要将 package.pro.json 文件改为 package.json 进行测试,因为测试的时候是使用react环境进行的测试。

如需在其他项目中测试包内工具,使用 npm link 发布到本地,测试项目使用 npm link cesium-tools-fxt 引入包

如无特殊说明,工具所有结束操作均为鼠标右键结束操作。

发包注意

在发包前一定要检查 package.json 文件的依赖是否是工具包需要的,如果不对,一定是 package.json 和 package.prod.json 搞混了,重新命名即可。版本号需要修改

建议安装 npm install -g npm-version-bump 插件,实现一键更新版本号,[major.minor.patch]

npm version [major]

npm version [minor]

npm version [patch]

npm run build

npm publish

使用说明

开始:左键

结束:右键(如果无特殊说明均为右键结束)

测量基础功能使用说明:

const { measureDistance, measureArea, measureAngle, measureTheHeightOfTheGround } = useMeasure(
    measure as Cesium.Viewer,
    { trendsComputed: true }
);

// 例如使用测量距离,其他同理
measureDistance().active() // 开始
measureDistance().deactivate() // 注销
measureDistance().clear() // 清除图层
measureDistance().addToolsEventListener() // 监听事件
measureDistance().removeToolsEventListener() // 移除事件

其他工具基础功能使用说明

// 坡向分析使用,通视、透视、模拟转台同理
const { active, clear, deactivate, setInstance, addToolsEventListener, removeToolsEventListener } = useSlopeDirectionAnalysis();
setInstance() // 设置实例 即 viewer
active() // 开始
deactivate() // 注销
clear() // 清除图层
addToolsEventListener() // 监听事件
removeToolsEventListener() // 移除事件

实时计算:

距离测量、面积测量默认开启了实时计算功能,如果不开启,可设置 trendsComputed 为 false。 例:useXXX(XXX, { trendsComputed: false })

监听:

每一个工具方法会抛出 addToolsEventListener、removeToolsEventListener 进行监听和移除监听,绘制完成后会发送 'cesiumToolsFxt' 事件。

视域分析

特殊说明:在低版本 cesium 中可能存在无法运行的问题

通视分析

特殊说明:左键第二次点击即为结束

坡向分析

特殊说明:在低版本 cesium 中可能存在无法运行的问题

转台分析

特殊说明:左键点击后即结束

测量工具

距离测量、折现测量、面积测量、角度测量、地表高度测量