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.path

v0.0.8

Published

<!-- * @Author: MrRice * @Date: 2024-07-16 18:30:07 * @LastEditors: 米大饭 [email protected] * @LastEditTime: 2024-08-05 22:34:11 * @FilePath: /cesium-path/README.MD * @Description: * -----小舟从此逝,江海寄余生---- * Copyright (c) 2024 by 米大饭, All Rights Reser

Downloads

3

Readme

CesiumPath

一个Cesium创建路径的方法

拓展

基于DrawCommand创建了新的Primitive支持继承three的模块

来源:基于一个Three.Path库的简易傻瓜式移植。

安装

npm install

运行

npm run dev

如何使用

    //引入模块
     import { CesiumPathGeometry } from 'cesiumPath';
    //点数据
    let pathData = [
      [121.34861148053537, 31.176501484821816, 40.561642015460457],
      [121.44695953835536, 31.183106832223146, 41.534012018365177],
      [121.47080127407735, 31.135714370305443, 53.297309271158188],
      [121.42327439103151, 31.12370321270027, 50.84025524552838],
      [121.4213359001137, 31.159925827084713, 47.609356226790908],
      [121.36188159675834, 31.162128285124, 42.005962607369975],
      [121.36298493172815, 31.11244465546675, 50.319108882265667],
      [121.46179295810667, 31.102447810026, 42.467301960707738],
    ];

    const cesiumGeo = new CesiumPathGeometry({
      points: pathData,//顶点数据
      width: 1000,//宽度
      arrow:false,//末尾是否显示箭头
      cornerRadius: 1000,//拐角半径
      cornerSplit:100,//拐角细分
      close: false,//是否闭合
      side:'both',//挤出侧
    })
    const geometryInstance = new Cesium.GeometryInstance({
      geometry: cesiumGeo,
    });
    const color = Cesium.Color.fromCssColorString("#00ff00");


    const material = new Cesium.Material({
      fabric: {
        type: "Color",
        uniforms: {
          color: color,
        },
      },
    });

    const appearance = new Cesium.MaterialAppearance({
      material: material,
    });

    const primitive = new Cesium.Primitive({
      geometryInstances: [geometryInstance],
      appearance: appearance,
      asynchronous: false,
    });

//其余用法请看examples目录下面的demo