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

@dotted-labs/ngx-products-3d

v0.1.1

Published

Productos 3D interactivos para Angular (Angular Three v4)

Downloads

36

Readme

@dotted-labs/ngx-products-3d

Productos 3D interactivos para Angular, construidos sobre Angular Three v4.

Primer producto: badge — acreditación 3D de socio colgada de una correa (lanyard) con física Rapier, arrastrable con el puntero.

Instalación

npm install @dotted-labs/ngx-products-3d angular-three@^4 angular-three-soba@^4 angular-three-rapier@^4 three @dimforge/rapier3d-compat meshline ngxtension
npm install -D @types/three

Requisitos: Angular ≥21, three ≥0.174.

Quickstart

1. Providers (ruta que consume el badge, NUNCA root)

import { provideProducts3d, provideProducts3dBadgeTheme } from '@dotted-labs/ngx-products-3d';

export const badgeRoute: Route = {
	path: 'membership',
	providers: [
		provideProducts3d({ cardModelUrl: '/assets/3d/card.glb' }),
		provideProducts3dBadgeTheme({
			bandTextureUrl: '/assets/3d/band.jpg',
			baseTextures: {
				gold: '/assets/3d/base-gold.jpg',
				silver: '/assets/3d/base-silver.jpg',
			},
			defaultBaseTextureUrl: '/assets/3d/base-default.jpg',
			fontUrl: '/assets/3d/font.json',
		}),
	],
	loadComponent: () => import('./membership.component'),
};

2. Consumo — contrato SSR/hydration (obligatorio)

Canvas nunca en server. Rapier WASM + Three ≈ 1.5MB → fuera del bundle inicial. Consumir SIEMPRE con @defer:

@defer (on viewport) {
	<products-3d-badge [member]="member()" />
} @placeholder {
	<img src="/assets/badge-static.webp" alt="Tarjeta de socio" />
}
import {
	Products3dBadge,
	type BadgeMemberData,
} from '@dotted-labs/ngx-products-3d';

member = signal<BadgeMemberData>({ name: 'Sergio', memberNumber: '0042', tier: 'gold' });

Reglas:

  1. @defer (on viewport) u on interaction + @placeholder con imagen estática → LCP barato.
  2. provideNgtRenderer() lo aporta la lib a nivel de componente; no lo declares en root.
  3. Preload opcional de assets pesados: <link rel="preload" as="fetch" href="/assets/3d/card.glb" crossorigin>.
  4. El componente incluye guard isPlatformBrowser como cinturón — no sustituye a @defer.

API

<products-3d-badge>

| Input | Tipo | Requerido | Descripción | |---|---|---|---| | member | BadgeMemberData | sí | Datos renderizados en la tarjeta | | theme | Products3dBadgeTheme | no | Fallback: token PRODUCTS_3D_BADGE_THEME | | debug | boolean | no | Debug de física |

Products3dBadgeTheme

| Campo | Tipo | Requerido | Descripción | |---|---|---|---| | bandTextureUrl | string | sí | Textura de la correa (RepeatWrapping aplicado por la lib) | | baseTextures | Record<string, string> | sí | Textura base del frente por tier | | defaultBaseTextureUrl | string | sí | Fallback si el tier no existe en baseTextures | | fontUrl | string | sí | Typeface JSON (three) para los textos 3D | | colors.band | string | no | Tinte de la correa | | colors.text | string | no | Color de los textos | | colors.clip | string | no | Tinte del clip metálico | | material | Partial<BadgePhysicalMaterialOptions> | no | Override del meshPhysicalMaterial de la tarjeta |

Assets NO empaquetados: la app consumidora provee todas las URLs → temas ilimitados por equipo.

Contrato del modelo GLB

Geometría única para todos los temas. Requisitos:

  • Nodos nombrados: card, clip, clamp
  • Materiales nombrados: base (card, recibe textura dinámica), metal (clip + clamp)
  • Origen en el punto de anclaje del clip
  • Transforms aplicados, Y-up, unidades métricas

Desarrollo

git clone https://github.com/dotted-labs/ngx-products-3d.git
cd ngx-products-3d
pnpm install
pnpm start                 # playground
pnpm run build:lib         # dist/ngx-products-3d

Licencia

MIT — see LICENSE.