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

@kappasigmamu/canary-component

v0.4.13-experimental

Published

React Component that renders the KappaSigmaMu Canary in 3D

Downloads

38

Readme

3D Kusama Canary Component

3D Canary Screenshot

A React component to render an interactive 3D Kusama Canary built on react-three-fiber.

It also supports loading different models and can be changed by given configurations.

Using

Import the component:

 import ThreeCanary from "@kappasigmamu/canary-component"

Instatiate the component passing the model as attribute along with the right configurations for the model:

 const config = {
   "nodeCoords": "Baked_GIL_BUSTO003_1.geometry.attributes.position",
   "nodeSigns": [-1, 1, -1],
   "nodeScale": 0.5,
   "nodeGroupScale": 0.1,
   "meshColorIndex": 3,
   "modelMaterial": "MatWireframe",
   "modelScale": 0.2,
   "gridPosition": [0, -0,4, 0],
   "cameraPosition": [-1, 2.5, 4]
 }
 
 <ThreeCanary
   objectUrl={ "/assets/gil.glb" }
   nodes={ this.state.nodesData }
   onNodeClick={ (nodeId) => {
     console.log("onNodeClick", nodeId)}
   }
   config={ config }
 />

If no config is given, the components defaults to the Canary model to keep backward compatibility.

It's also possible to import default configurations for models related to KSM (e.g. Canary and Gilberto Gil's bust:

 import ThreeCanary, { defaultCanaryConfig} from "@kappasigmamu/canary-component"

 <ThreeCanary
   objectUrl={ "/assets/gil.glb" }
   nodes={ this.state.nodesData }
   onNodeClick={ (nodeId) => {
     console.log("onNodeClick", nodeId)}
   }
   config={ defaultCanaryConfig["gil"] }
 />

Check ./src/index.js for a complete example on how to use the component.

Developing

Make sure you have latest stable Node.js installed (see nvm):

git clone [email protected]:KappaSigmaMu/canary-component.git
cd canary-component/
npm install

Start development mode:

npm run start

That should bring you to http://localhost:3000 with a hot-reload React app. Edit files at src/ to see live updates.

Production build

npm run build
git commit ...
git tag 0.x.x
git push
npm publish