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 🙏

© 2026 – Pkg Stats / Ryan Hefner

string-tune-3d

v0.0.10

Published

CSS-driven 3D graphics library that lets you control Three.js objects through CSS custom properties.

Downloads

961

Readme


Overview

StringTune-3D is a 3D graphics module for the StringTune ecosystem that lets you control 3D objects through CSS custom properties. No imperative Three.js code — just HTML attributes and CSS.

<div
  string="3d"
  string-3d="sphere"
  style="
    width: 150px;
    height: 150px;
    --material-color: #667eea;
    --rotate-y: 45;
    --material-metalness: 0.8;
  "
></div>

Note: StringTune-3D requires the base @fiddle-digital/string-tune package.


Features

| Feature | Description | | ----------------- | -------------------------------------------------------------------- | | 🎨 CSS-First | Control transforms, materials, and effects via CSS custom properties | | 🔄 Auto-Sync | 3D objects automatically follow DOM element position and size | | 📦 Primitives | Box, sphere, plane, cylinder + GLTF/GLB model loading | | 💡 Lighting | Ambient, directional, point, spot, and hemisphere lights | | ✨ Filters | Blur, bloom, pixel effects through --filter property | | 🎭 Materials | Basic, standard PBR, and custom shader materials | | 🔤 3D Text | Extruded text geometry with bevel support | | 🌟 Particles | Emitter and instanced particle systems |


Installation

# Install dependencies
npm install @fiddle-digital/string-tune string-tune-3d three

Quick Start

1. Setup

import { StringTune } from "@fiddle-digital/string-tune";
import { String3D, ThreeJSProvider } from "string-tune-3d";
import * as THREE from "three";

// Configure Three.js provider
String3D.setProvider(new ThreeJSProvider(THREE));

// Initialize StringTune with 3D module
const stringTune = StringTune.getInstance();
stringTune.use(String3D);
stringTune.start(60);

2. Add 3D Objects

<!-- Lighting -->
<div
  string="3d"
  string-3d="ambientLight"
  style="--light-intensity: 0.5"
></div>
<div
  string="3d"
  string-3d="directionalLight"
  style="--light-intensity: 1"
></div>

<!-- 3D Box -->
<div
  string="3d"
  string-3d="box"
  style="
    width: 150px;
    height: 150px;
    --material-type: standard;
    --material-color: #667eea;
    --material-metalness: 0.5;
    --rotate-y: 20;
  "
></div>

3. Animate with CSS

.my-3d-object {
  --rotate-y: 0;
  transition: --rotate-y 0.4s ease;
}

.my-3d-object:hover {
  --rotate-y: 180;
}

Examples

Metallic Sphere

<div
  string="3d"
  string-3d="sphere"
  style="
    --material-type: standard;
    --material-color: #c0c0c0;
    --material-metalness: 1;
    --material-roughness: 0.1;
  "
></div>

Glowing Object with Bloom

<div
  string="3d"
  string-3d="box"
  style="
    --material-emissive: #ff0066;
    --filter: bloom(0.6, 0.3);
  "
></div>

Load 3D Model

<div
  string="3d"
  string-3d="model"
  string-3d-model="/models/robot.glb"
  string-3d-model-fit="contain"
  style="width: 300px; height: 300px;"
></div>

CSS Properties

| Property | Description | | -------------------------- | ------------------------------ | | --translate-x/y/z | Position offset | | --rotate-x/y/z | Rotation in degrees | | --scale, --scale-x/y/z | Scale multipliers | | --opacity | Transparency (0-1) | | --material-type | basic, standard, or custom | | --material-color | Surface color | | --material-metalness | Metallic look (0-1) | | --material-roughness | Surface roughness (0-1) | | --filter | Post-processing effects |

📖 Full CSS Reference →


Documentation

| Guide | Description | | ------------------------------------------------------------------------------ | --------------------------- | | Installation | Setup and dependencies | | Quick Start | First 3D scene | | Core Concepts | Architecture overview | | CSS Properties | Complete property reference | | 3D Objects | Available object types | | Materials | Material & texture system | | Lighting | Light types & shadows | | Filters | Post-processing effects | | Performance | Optimization tips |


Browser Support

| Browser | Version | | ------- | ------- | | Chrome | 56+ | | Firefox | 51+ | | Safari | 11+ | | Edge | 79+ |


Contributing

Contributions are welcome! Please read our contributing guidelines before submitting PRs.

# Clone and install
git clone https://github.com/penev-palemiya/StringTune-3D.git
cd string-tune-3d
npm install

# Build
npm run build

License

MIT © penev.tech