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

suns3d-cesium-sdk

v1.0.3

Published

Suns3D平台 - 基于Cesium的3D地球可视化SDK

Readme

VGEEarth WebGL平台

基于 Cesium.js 构建的 3D 地球可视化 SDK,提供丰富的 3D 地球操作功能和高级可视化特性。

功能特性

  • 🌍 3D 地球可视化 - 基于 Cesium.js 的高性能 3D 地球渲染
  • 🎯 实体管理 - 完整的 3D 实体创建、管理和操作功能
  • 📹 视频融合 - 支持视频与 3D 场景的实时融合
  • 🔥 热力图 - 基于 heatmap.js 的热力图可视化
  • 🏔️ 地形操作 - 支持地形挖掘和切割功能
  • 👁️ 可视域分析 - 基于 ShadowMap 的高效可视域计算
  • 🎮 相机控制 - 平滑的相机动画和漫游功能
  • 🔧 模块化设计 - 清晰的模块分离,便于维护和扩展

快速开始

安装依赖

Cesium版本1.133.1

npm install

开发模式

npm run dev

构建库

# 构建为库文件
npm run build:lib

# 构建为应用
npm run build

预览构建结果

npm run preview

使用示例

import { Earth, EntityManager, EntityTypes } from 'cesium-sdk'

// 创建地球实例
const earth = new Earth('MapContainer')

// 获取 viewer 实例
const viewer = earth.viewer3D

// 创建实体管理器
const entityManager = EntityManager.getInstance(viewer)

// 添加点实体
entityManager.createEntity({
  id: 'example-point',
  type: EntityTypes.POINT,
  position: [116.4, 39.9, 0],
  pixelSize: 15,
  color: '#FF0000'
})

项目结构

cesium-sdk/
├── src/                    # 源代码目录
│   ├── index.ts           # 主入口文件
│   ├── cesium-config.ts   # Cesium 配置
│   └── demo/              # 示例代码
├── Core/                  # 核心功能模块
│   ├── Earth/            # 地球模块
│   ├── WorkSpace/        # 工作空间
│   ├── EntityManager/    # 实体管理
│   ├── EventMana/        # 事件管理
│   └── ...               # 其他核心模块
├── Utils/                 # 工具类
├── vc-cesium/            # 视频融合功能
├── libs/                 # 第三方库
├── dist/                 # 构建输出
├── vite.config.ts        # Vite 配置
├── tsconfig.json         # TypeScript 配置
└── package.json          # 项目配置

构建配置

Vite 配置特性

  • Cesium 插件支持 - 自动处理 Cesium 相关资源
  • TypeScript 支持 - 完整的类型检查和声明文件生成
  • 库模式构建 - 支持构建为 UMD 和 ES 模块
  • 代码分割 - 自动分离 Cesium 和第三方库
  • 资源优化 - 自动压缩和优化静态资源
  • 兼容性支持 - 支持现代浏览器的兼容性构建

构建模式

  1. 库模式 (npm run build:lib)

    • 构建为可复用的库文件
    • 生成 UMD 和 ES 模块格式
    • 自动生成 TypeScript 声明文件
  2. 应用模式 (npm run build)

    • 构建为完整的 Web 应用
    • 包含所有依赖和资源
    • 适合直接部署使用

开发指南

添加新功能

  1. Core/ 目录下创建新模块
  2. src/index.ts 中导出新模块
  3. 更新类型定义文件
  4. 添加相应的测试和文档

调试技巧

  • 使用 npm run dev 启动开发服务器
  • 浏览器开发者工具中查看控制台输出
  • 使用 Vite 的热重载功能快速调试

许可证

MIT License

贡献

欢迎提交 Issue 和 Pull Request 来改进这个项目。

更新日志

v1.0.0

  • 初始版本发布
  • 支持基本的 3D 地球操作
  • 集成 Vite 构建系统