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

threesnap

v0.0.26-beta

Published

Full screen, snap scroll library with ready-to-use three.js configurations.

Downloads

16

Readme

CSS3 Threejs TypeScript Vite

Usage

To create smooth transitions between different 3D model configurations (position, rotation, and scale) based on page scroll events, you can use the createThreesnap function. Models and their transformations (such as position, rotation, and scale) will be adjusted as the user scrolls through different sections of the webpage.

Features

  • Three.js Integration: Render and manipulate 3D models using Three.js.
  • Smooth Scroll Transitions: Change models' positions, rotations, and scales as users scroll between sections.
  • Multi-Model Support: Each page can have multiple 3D models with unique configurations.
  • Customizable: Easily customize the camera position, model scale, and page-specific transformations.

Installation

First, install the required dependencies:

npm install threesnap

Example

Here's how you can use the library to configure a 3D model across different pages:

createThreesnap({
  fixedZ: 5,
  pages: [
    {
      models: [
        {
          modelPath: "./path/to/model1.glb",
          position: { x: 0, y: 0, z: 0 },
          rotation: { x: 0, y: 0, z: 0 },
          scale: { x: 0.5, y: 0.5, z: 0.5 },
        },
      ],
    },
    {
      models: [
        {
          modelPath: "./path/to/model2.glb",
          position: { x: 30, y: 25, z: -120 },
          rotation: { x: 45, y: 30, z: 0 },
          scale: { x: 0.7, y: 0.7, z: 0.7 },
        },
      ],
    },
    {
      models: [
        {
          modelPath: "./path/to/model3.glb",
          position: { x: 0, y: 0, z: 20 },
          rotation: { x: 0, y: 90, z: 45 },
          scale: { x: 0.6, y: 0.6, z: 0.6 },
        },
      ],
    },
    {
      models: [
        {
          modelPath: "./path/to/model4.glb",
          position: { x: -25, y: -35, z: -30 },
          rotation: { x: -45, y: 60, z: 30 },
          scale: { x: 0.8, y: 0.8, z: 0.8 },
        },
      ],
    },
  ],
});

Contributing

Contributions to the project is highly appreciated. If you have any suggestions/questions/requests please consider opening an issue. If you want to contribute to the project, fixing an open issue is greatly recommended and appreciated. To see the all contribution rules please check the contribution rules.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

| Maintainer | E-Mail | | --------------------------------------- | ---------------------- | | kaandesu | [email protected] |