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

duo-3d-sphere

v1.0.27

Published

a cool 3D sphere

Readme

目录

快速入门

安装

$ npm i duo-3d-sphere --save             # install duo-3d-sphere   

依赖

→ three.js

→ tween.js

用法

main.js 文件:


import duo3dSphere from 'duo-3d-sphere'

Vue.use(duo3dSphere)

使用:

<template>
  <div>
   <duo-3d-sphere
      :table="table"
      :starSize="starSize"
      :starTail="starTail"
      :starAlpha="starAlpha"
      :starAmount="starAmount"
      :sphereSkin="sphereSkin"
      :spherePositionX="spherePositionX"
      :spherePositionY="spherePositionY"
      :spherePositionZ="spherePositionZ"
      :starSpeedReciprocal="starSpeedReciprocal"
      :starsDiameterReciprocal="starsDiameterReciprocal"
      :starIsClockwiseRotation="starIsClockwiseRotation"
    />
  </div>
</template>
<script>
export default {
  data() {
    return {
      table: [], // 3d 球体中卡片展示的数据
      starSize: 4, // canvas 背景星星尺寸
      starTail: 0.5, // canvas 背景星星的小尾巴
      starAlpha: 20, // canvas 背景星星的透明度值
      starAmount: 200, // canvas 背景星星的数量
      spherePositionX: 50, // 3d 球体 X 轴的值
      spherePositionY: 50, // 3d 球体 Y 轴的值
      sphereSkin: "shallowBlue", // 3d 球体中卡片的颜色: violet | deepBlue | shallowBlue | 自定义
      spherePositionZ: 2500, // 3d 球体 Z 轴的值
      starSpeedReciprocal: 20, // canvas 背景星星的速度(反比)
      starsDiameterReciprocal: 2, // canvas 背景星星的扩展范围(反比)
      starIsClockwiseRotation: true, // 是否显示 canvas 背景
    };
  },
  mounted() {
    this.generateData();
  },
  methods: {
    generateData() {
      let data = [],
        firstNames = "赵钱孙李周吴郑王",
        lastNames = "云鹤九霄龙腾四海";

      for (let i = 0; i < 100; i++) {
        let f = parseInt(Math.random() * firstNames.length),
          l = parseInt(Math.random() * lastNames.length),
          name = firstNames[f] + lastNames[l];
        data.push({
          title: `${name}`,
          details: "10",
        });
      }
      this.table = data;
    },
  },
};
</script>
<style>
* {
  padding: 0;
  margin: 0;
}
</style>

→ simple demo

维护者