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 🙏

© 2026 – Pkg Stats / Ryan Hefner

cesium-flyto

v1.0.0

Published

A simple wrapper for Cesium's flyTo camera function

Readme

cesium-flyto

一个简单的 Cesium flyTo 相机控制函数封装。

安装

npm install cesium-flyto

使用方法

首先在HTML中引入Cesium:

<script src="path/to/Cesium.js"></script>
<script src="path/to/cesium-flyto.js"></script>

然后在JavaScript中使用:

// 假设已经创建了Cesium viewer实例
const viewer = new Cesium.Viewer('cesiumContainer');

// 使用testFlyTo函数
cesiumFlyTo.testFlyTo(viewer, {
    destination: {
        longitude: 116.3912,
        latitude: 39.9073,
        height: 1000
    },
    duration: 2,
    orientation: {
        heading: 0,
        pitch: -45,
        roll: 0
    }
}).then(() => {
    console.log('飞行完成!');
});

参数说明

  • viewer: Cesium viewer实例(必需)
  • options: 配置对象
    • destination: 目标位置对象(必需)
      • longitude: 经度
      • latitude: 纬度
      • height: 高度(可选,默认为0)
    • duration: 飞行持续时间,单位秒(可选,默认为2)
    • orientation: 视角方向(可选)
      • heading: 航向角,单位度
      • pitch: 俯仰角,单位度
      • roll: 翻滚角,单位度

返回值

返回一个Promise,在飞行完成时resolve。

注意事项

  • 使用前请确保已经正确引入Cesium
  • 所有角度参数均使用度数,函数内部会自动转换为弧度