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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@angularai/spin-360

v0.0.3

Published

<div align="center"> <h1>@angularai/spin-360</h1> <p>🔄 AI-powered 360° product viewer with GIF generation for Angular</p>

Readme

Overview

@angularai/spin-360 provides an AI-powered 360° product viewer for Angular applications. Generate 360° views from a single image using DALL-E, create interactive spin viewers, and export as hover-to-play GIFs.

✨ Features

  • 🤖 AI Image Generation: Generate 360° views from a single product image using DALL-E 3
  • 🔄 Interactive Viewer: Drag-to-spin 360° product viewer
  • 🎬 GIF Export: Generate hover-to-play animated GIFs
  • 📱 Touch Support: Mobile-friendly touch gestures
  • ⚡ Auto-Spin: Configurable auto-rotation
  • 🎨 Customizable: Flexible styling options
  • 🔧 Fully Typed: Complete TypeScript support

📦 Installation

npm install @angularai/spin-360 @angularai/core

🚀 Quick Start

1. Basic 360° Viewer

import { Component } from '@angular/core';
import { SpinViewerComponent } from '@angularai/spin-360';

@Component({
  selector: 'app-product-viewer',
  standalone: true,
  imports: [SpinViewerComponent],
  template: `
    <spin-viewer
      [images]="productImages"
      [autoSpin]="true"
      [spinSpeed]="50"
    />
  `
})
export class ProductViewerComponent {
  productImages = [
    '/assets/product-0.jpg',
    '/assets/product-1.jpg',
    '/assets/product-2.jpg',
    // ... more angles
  ];
}

2. AI-Powered 360° Generation

import { Component } from '@angular/core';
import { SpinGeneratorComponent } from '@angularai/spin-360';

@Component({
  selector: 'app-spin-generator',
  standalone: true,
  imports: [SpinGeneratorComponent],
  template: `
    <spin-generator
      [provider]="'openai'"
      [apiKey]="apiKey"
      [generateGif]="true"
      [gifFrameDelay]="150"
      (imagesGenerated)="onImagesGenerated($event)"
      (gifGenerated)="onGifGenerated($event)"
    />
  `
})
export class SpinGeneratorDemoComponent {
  apiKey = 'your-openai-api-key';

  onImagesGenerated(images: string[]) {
    console.log('Generated 360° images:', images);
  }

  onGifGenerated(gifUrl: string) {
    console.log('Generated GIF:', gifUrl);
  }
}

3. Hover-to-Play GIF Preview

import { Component } from '@angular/core';
import { SpinGifPreviewComponent } from '@angularai/spin-360';

@Component({
  selector: 'app-gif-preview',
  standalone: true,
  imports: [SpinGifPreviewComponent],
  template: `
    <spin-gif-preview
      [gifUrl]="gifUrl"
      [staticImageUrl]="firstFrameUrl"
      [showDownloadButton]="true"
    />
  `
})
export class GifPreviewComponent {
  gifUrl = '/assets/product-360.gif';
  firstFrameUrl = '/assets/product-0.jpg';
}

📖 Component API

SpinViewerComponent

Inputs

| Input | Type | Default | Description | |-------|------|---------|-------------| | images | string[] | [] | Array of image URLs for 360° view | | autoSpin | boolean | false | Enable auto-rotation | | spinSpeed | number | 50 | Auto-spin speed (ms per frame) | | reverse | boolean | false | Reverse spin direction | | startIndex | number | 0 | Starting frame index |

Outputs

| Output | Type | Description | |--------|------|-------------| | frameChanged | EventEmitter<number> | Emitted when frame changes | | spinStarted | EventEmitter<void> | Emitted when spin starts | | spinStopped | EventEmitter<void> | Emitted when spin stops |

SpinGeneratorComponent

Inputs

| Input | Type | Default | Description | |-------|------|---------|-------------| | provider | string | 'openai' | AI provider | | apiKey | string | '' | API key | | generateGif | boolean | true | Auto-generate GIF | | gifFrameDelay | number | 150 | GIF frame delay (ms) | | numberOfAngles | number | 8 | Number of angles to generate |

Outputs

| Output | Type | Description | |--------|------|-------------| | imagesGenerated | EventEmitter<string[]> | Emitted when images are ready | | gifGenerated | EventEmitter<string> | Emitted when GIF is ready | | progress | EventEmitter<number> | Generation progress (0-100) |

SpinGifPreviewComponent

Inputs

| Input | Type | Default | Description | |-------|------|---------|-------------| | gifUrl | string | '' | URL of the animated GIF | | staticImageUrl | string | '' | URL of static first frame | | showDownloadButton | boolean | true | Show download button | | downloadFilename | string | 'spin-360.gif' | Download filename |

🎬 GIF Generation

The package includes a built-in GIF generator service:

import { Component, inject } from '@angular/core';
import { GifGeneratorService } from '@angularai/spin-360';

@Component({ ... })
export class GifComponent {
  private gifService = inject(GifGeneratorService);

  generateGif(images: string[]) {
    this.gifService.generateGif(images, {
      frameDelay: 150,
      width: 400,
      height: 400,
      quality: 10
    }).subscribe({
      next: (result) => {
        if (result.type === 'progress') {
          console.log('Progress:', result.progress);
        } else if (result.type === 'complete') {
          console.log('GIF URL:', result.url);
        }
      }
    });
  }
}

📦 Related Packages

| Package | Description | |---------|-------------| | @angularai/core | Core AI functionality | | @angularai/image-caption | AI image captioning |

🔗 Related Projects

| Framework | Repository | Status | |-----------|-----------|--------| | Vue.js | @aivue | ✅ Available | | React | @anthropic-ai/react | ✅ Available | | Angular | @angularai | ✅ Available | | Svelte | @svelteai | 💡 Planned |

📄 License

MIT © AngularAI