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

sandi-ui

v1.0.0-beta.13

Published

vue3 3D component library based on three

Downloads

7

Readme

sandi-ui

中文English

简介

基于 three 编写的 带有事件系统的 vue3 组件库,用组件方式构建你的交互的 3D 世界

功能

事件系统

<SDGroup :onClick="() => { v1 += 0.5 }"></SDGroup>

你可以使用 在 Mesh 和 SDGroup 等物体组件上使用 :onclick 绑定点击事件 目前支持事件 onClick, onPointerOver, onPointerOut, onPointerMove, onPointerDown, onPointerUp, onWheel, onDblClick", onPointerMissed", onKeyMissed, None, onKeyDown, onKeyup, onKeypress, onContextmenu

接触检测

<SDRaycaster
  :lockDirection="true"
  :helper="true"
  :direction="[1,0,0]"
  :raycasterCallback="consoleRay"
  :far="4"
  :offset="[0,0,0]"
/>

使用 SDRaycaster 组件检测是否有物体接触,你可以做出很有意思的交互 demo

CSS2D 支持

可以做出信息点等好玩的交互啊

高级组件

SDLight、 SDMaterial、 SDMesh、SDGeometry 等组件可以支 threejs 实例注入

动画系统

SDAnimationAction SDAnimationMixer 组件 控制 FBX GLTF 文件的动画播放

控制器

SDOrbitControls、SDTransformControls、SDPointerLockControls 等 快速提供 360 度观察,移动缩放控制,第一人称控制

资源自动回收

vue 生命周期,当组件卸载时,会自动回收资源

文档地址

https://milifire.github.io/sandi-ui/

逐渐完善中, 里面有的例子,供你参考

快速开始

安装

pnpm

pnpm install sandi-ui

yarn

yarn add sandi-ui

npm

npm install sandi-ui

使用

import { createApp } from "vue";
import App from "./App.vue";
import sandiUI from "sandi-ui";
const app = createApp(App);
app.use(sandiUI);
app.mount("#app");

例子

<template>
  <SDWebglRenderer :width="800" :height="400">
    <SDScene>
      <SDPerspectiveCamera :positionZ="20" :positionY="6" />
      <SDFBXLoader url="/fbx/Rumba Dancing.fbx">
        <SDMeshBasicMaterial meshName="body1">
          <SDTextureLoader url="img/zhangfei.jpg" type="map" />
        </SDMeshBasicMaterial>
        <SDMeshBasicMaterial meshName="face">
          <SDTextureLoader url="img/face.png" type="map" />
        </SDMeshBasicMaterial>
        <SDAnimationMixer>
          <SDAnimationAction />
        </SDAnimationMixer>
      </SDFBXLoader>
    </SDScene>
  </SDWebglRenderer>
</template>

Image text