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 🙏

© 2025 – Pkg Stats / Ryan Hefner

visioncraft3

v1.3.1

Published

<p>

Readme

visioncraft3.js

Install

npm i visioncraft3

Hello world

dom

<div id="container"></div>

style.css

#container {
  width: 100vw;
  height: 100vh;
  background: black;
  overflow: hidden;
}

script.js

import * as THREE from 'three';
import { MapScreen } from 'visioncraft3';
import { onMounted } from 'vue';
let screen;
const data = [
  {
    name: '上海市',
    value: 909347,
    title: '请求次数',
  },
  {
    name: '台湾省',
    value: 9347,
    title: '请求次数',
  }...
];
const conf = {
  MapConf: {
    autoLoop: false,
  },
  baseConf: {
    cameraConf: {
      far: 1000,
    },
  },
};
const assetsList = [
  {
    name: 'map',
    type: 'gltfModel',
    path: 'http://****/1692149741684china.glb',
  },
  {
    name: 'defaultTex',
    type: 'texture',
    path: 'http://****/1692150653983mapTu21.jpg',
  },
  {
    name: 'activeTex',
    type: 'texture',
    path: 'http://****/1692150673947mapTu22.jpg',
  },
  {
    name: 'tooltipTex',
    type: 'img',
    path: 'http://****/1692150631824tooltip.png',
  },
];
const hasLoad = () => {
  screen.loadData(
    data
  );
};
// 点击事件
const handleClick = (event) => {
  console.log(event.target, 'event00000');
};
onMounted(() => {
  screen = new MapScreen('container', conf);
  screen.loadAssets(assetsList, hasLoad, handleClick);
});

版本更新记录

[1.2.7] - 2024-10-25

新增

  • 增加了粒子波浪场景类,噪声扩散场景类

[1.2.6] - 2024-07-22

改进

  • 修改了旋转球场景类,小球的绘制流程

[1.2.4] - 2024-07-17

改进

  • 修改了地图场景类colors的逻辑,格式变成了数组
  • 增加了destoryall时,清除canvas的逻辑
  • 修改了场景大小使用的windows没用this.height的bug

[1.2.1] - 2023-09-07

新增

  • 增加了建筑场景预制类相关代码

[1.1.1] - 2023-08-23

新增

  • 增加了旋转球场景相关内容
  • 增加了说明文档大部分中文注释

[1.0.6] - 2023-08-16

改进

  • 修改了README.md

[1.0.4] - 2023-08-16

新增

  • 加入版本记录

[1.0.3] - 2023-08-16

修复

  • img图片跨域问题,同时发现使用时项目本地需要统一版本的three