
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
product-display-360
Advanced tools
A lightweight, high-performance JavaScript library for displaying 360-degree views of products. It supports touch and mouse interactions for a smooth rotation experience.
npm install product-display-360
<script src="https://unpkg.com/product-display-360/dist/index.js"></script>
<link rel="stylesheet" href="https://unpkg.com/product-display-360/dist/index.css" />
<script src="./dist/index.js"></script>
<link rel="stylesheet" href="./dist/index.css" />
import { CI360LIB } from 'product-display-360';
// Add a hotspot
CI360LIB.addHotspot({
frame: 58,
x: 50,
y: 50,
title: 'Product Feature',
description: 'This is an important product feature.'
});
// Initialize configuration
CI360LIB.init({
container: document.querySelector('.product-display-360'),
framesPath: 'https://your-cdn.com/frames/',
framesFile: '0-{index}.jpg',
framesCount: 199,
initFrame: 58,
framesReverse: true,
alpha: true
});
<div class="product-display-360"></div>
.product-display-360 {
width: 99vw;
height: 98vh;
background: #c5c3c6;
border-radius: 20px;
overflow: hidden;
}
// Add a hotspot
CI360LIB.addHotspot({
frame: 58,
x: 50,
y: 50,
title: 'Product Feature',
description: 'This is an important product feature.'
});
// Initialize configuration
CI360LIB.init({
container: document.querySelector('.product-display-360'),
framesPath: 'https://your-cdn.com/frames/',
framesFile: '0-{index}.jpg',
framesCount: 199,
initFrame: 58,
framesReverse: true,
alpha: true
});
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
container | HTMLElement | Yes | - | The container element |
framesPath | string | Yes | - | Path to the image frames |
framesFile | string | Yes | - | Filename format for frames, use {index} as a placeholder |
framesCount | number | Yes | - | Total number of frames |
initFrame | number | No | 0 | Initial frame |
framesReverse | boolean | No | false | Whether to play in reverse |
alpha | boolean | No | false | Whether to support transparent background |
git clone [repository-url]
cd product-display-360
npm install
# Development mode
npm run dev
# Build
npm run build
# Generate type declaration files
npm run build:types
product-display-360/
├── src/ # Source code directory
│ ├── core/ # Core functionality
│ ├── utils/ # Utility functions
│ └── types/ # Type definitions
├── dist/ # Build output directory
├── types/ # TypeScript declaration files
├── rollup.config.ts # Rollup configuration file
├── tsconfig.json # TypeScript configuration file
└── package.json # Project configuration file
Image Optimization
Performance Optimization
framesCount
reasonably; not exceeding 200 frames is recommended.requestAnimationFrame
for animations.Hotspots
framesCount
parameter.We welcome issues and pull requests. Before submitting a PR, please ensure:
MIT
Gleason
FAQs
360˚产品展示
We found that product-display-360 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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.