Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
name-sphere-threejs-npm
Advanced tools
A package for creating word clouds on a sphere using Three.js and React
Name-Sphere-Three.js is a React component built using Three.js and @react-three/fiber library. It enables you to create captivating word clouds in a sphere shape, adding an interactive and visually appealing element to your web applications.
Name-Sphere-Three.js uses Three.js to create a 3D sphere and position words evenly across its surface. The component leverages @react-three/fiber for rendering 3D graphics in React applications. Users can pass an array of words as props to the NameSphere component, which then generates a word cloud with the specified settings.
To install Name Sphere Three.js locally and set up a project using it, follow these steps:
Install Name Sphere Three.js: Open your terminal and run the following command to install the package:
npm install name-sphere-threejs
Import NameSphere Component: In your React project, import the NameSphere
component from "name-sphere-threejs"
:
import React from "react";
import { NameSphere } from "name-sphere-threejs";
Use NameSphere Component: Use the NameSphere
component in your React components as shown in the following example:
function App() {
return (
<NameSphere
count={5} // Number of words in each row/column on the sphere
radius={15} // Radius of the sphere
words={["word1", "word2", "word3"]} // Array of words to display on the sphere
color="black" // Default color of words
hoveredColor="red" // Color of words when hovered
width={"100%"} // Width of the canvas (you can use units like %, vh, vw, or px)
height={"100vh"} // Height of the canvas (you can use units like %, vh, vw, or px)
/>
);
}
export default App;
Customize Props: Customize the props of the NameSphere
component as needed to adjust the appearance and behavior of the word cloud.
By following these steps, you'll be able to set up a project using Name Sphere Three.js in your local environment.
count
: Number of words in each row/column on the sphere (default: 5
)radius
: Radius of the sphere (default: 15
)words
: Array of words to display on the sphere (default: []
)color
: Default color of words (default: "black"
)hoveredColor
: Color of words when hovered (default: "red"
)width
: Width of the canvas (default: "100%"
)height
: Height of the canvas (default: "100vh"
)count
and radius
to adjust the density and size of the word cloud.If you have any feedback, please reach out to us at khuntpriyansh1@gmail.com
Contributions to Name Sphere Three.js are welcome! If you encounter any bugs, have suggestions for improvements, or would like to contribute new features, feel free to open an issue or submit a pull request on GitHub.
This project is licensed under the MIT License.## Key Features
FAQs
A package for creating word clouds on a sphere using Three.js and React
We found that name-sphere-threejs-npm demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.