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

@bebeau/globe

v1.2.1

Published

A component built to display a 3d globe render with location specific arch animation based on data points

Downloads

183

Readme

WKNDHRS Globe Package

Overview

This project is a package that can be added to any react web/mobile application. The package renders a 3D globe with animation arcs representing the sending to/from lat/lng data points. Data points are managed per client install or manually passed as a prop to the component.

View the live demo

Globe Render

Install

  1. Make sure your project has these package versions installed.
"peerDependencies": {
  "react": "18.0.0",
  "react-dom": "18.0.0",
  "react-native": "0.69.9",
  "react-scripts": "^5.0.1",
  "expo": "46.0.20"
}
  1. Add package to working project
yarn add @bebeau/globe
  1. Import into project
import GlobeRender from '@bebeau/globe';
  1. Use component
<GlobeRender
  cleintID=""
  theme=""
  type=""
  exit=""
  currentUser=""
  currentLocation=""
  manualDataPoints=""
  messages=""
>
  1. The globe package is using flexbox to fit the height of the parent element. Be sure to set the height of the parent element the globe package is used within.

Default Props

Prop | Type | Description |---|---|---| cleintID | string | The cleintID is the ID used to pull data points from https://hc.rebuild.digital. theme | string | Defines theme styling, either child or adult. type | string | Defines direction of beams to current location, either send or receive. exit | function | Exit is the function fired upon exiting the globe view to handle navigation back to the previous app screen.

Themes

The theme passed in determines the styling of the globe element. There are two theme options, child and adult.

Child | Adult |---|---| Child Theme | Adult Theme

Optional Props

Prop | Type | Description |---|---|---| currentUser | string | Current user's name. Used in the carousel cards. currentLocation | object | Current user's location. If location is not passed in as a prop, location object is set based on IP of user session. See below for data structure. manualDataPoints | object[] | Used to pass in manual array of location objects to be used as data points. If this prop exists, it will overwrite the clientID prop data. messages | object[] | Messages are passed in as an array of JSON objects. If messages exist, a card carousel will be rendered overlaying the globe. See below for data structure.

Data Structure

Messages Object

{
 location: {
    state: string,
    countryCode: string
  },
  "message": string,
  "sender": string
}

Location Object

{
  id: string,
  title: string,
  coordinates: {
    lng: number,
    lat: number,
  },
}