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

@dfsj/cesium

v4.0.0-alpha.1

Published

基于cesium封装的3维地图可视化库

Readme

@dfsj/cesium

Cesium 二次封装库,提供三维 GIS 场景构建能力,包括图层加载、要素管理、测量标绘、材质效果等

version license

简介

@dfsj/cesium 是基于 CesiumJS 的三维 GIS 二次封装库,提供场景初始化、图层管理、要素标注、测量标绘、材质效果等开箱即用的能力,适用于数字孪生、智慧水利等三维可视化场景。

主要功能

  • 图层加载 - 支持影像、地形、三维模型等多种图层类型
  • 要素加载 - 矢量数据、图元要素、标绘要素管理
  • 测量工具 - 距离、面积、高度测量
  • 标绘功能 - 点线面标注与编辑
  • 材质效果 - 自定义 Shader 材质(水流、扫描线等)
  • 场景效果 - 雨雪雾、泛光、时间系统等

安装

# pnpm (推荐)
pnpm add @dfsj/cesium

# npm
npm install @dfsj/cesium

# yarn
yarn add @dfsj/cesium

快速开始

初始化一个基础的三维地球场景

import { initMap, Map } from '@dfsj/cesium'

// 初始化场景
const viewer = await initMap({
  container: 'app',        // DOM 容器 ID
  baseUrl: '/cesium',      // 静态资源路径 (需将 Assets/Workers 复制到 public/cesium)
  terrain: {               // 可选: 启用地形
    url: 'https://terrain.com'
  }
})

// 添加影像图层
const layer = new ImageryLayer({ url: 'https://imagery.com/tile' })
viewer.addLayer(layer)

主要导出

| 导出名 | 类型 | 说明 | |:------|:-----|:-----| | initMap | Function | 初始化地图场景 | | Map | Class | 地图核心类 | | ImageryLayer | Class | 影像图层 | | VectorOverlay | Class | 矢量图层 | | MeasureTool | Class | 测量工具 | | PlotTool | Class | 标绘工具 | | Material | Object | 材质效果集合 |

完整 API 文档请查看 在线文档站

使用要求

| 环境 | 要求 | |:-----|:-----| | Node.js | >=18.12.0 | | 包管理器 | pnpm >=9.0.2 / npm / yarn | | 框架依赖 | Vue >=3.3, Cesium >=1.107 |

静态资源配置

使用时需将 @cesium/engine 的静态资源复制到项目 public/cesium 目录:

public/cesium/
├── Assets/
├── Workers/
└── ThirdParty/

开发指南

git clone http://10.10.12.18/dfsj/dfsj
pnpm install
cd packages/cesium
pnpm watch          # 开发模式
pnpm build          # 构建

文档

许可证

MIT

Copyright (c) 2022 - present yangbo