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

directus-extension-3d-viewer

v1.1.0

Published

Implements various frontend extensions for 3d models.

Downloads

1

Readme

Directus 3D Model Viewer

This extension embeds <model-viewer> into Directus as interface, display, panel andf endpoint (for use with live previews). These extensions will all render a 3d model in various places of the Directus UI. All of the extensions expect the 3d model files to be uploaded to the Directus File storage.

This extension relies on Directus version 10.10.0 or newer.

Tested with v10.13.0

Note: I've only tested this with *.glb 3d files! It may work with other formats but no guarantees.

Model Viewer Endpoint

With this endpoint you'll get a full page 3d model viewer which can be embedded as an iframe almost anywhere. The model viewer settings are configured based on url query parameters.

Camera Control | Auto Rotate :-------------:|:---------------: Endpoint Tank GIF | Endpoint Dino GIF

GET /3d-viewer/viewer/<file-uuid>?options

Options:

  • camera_controls boolean
  • auto_rotate boolean
  • shadow_intensity number
  • scale string

Example

GET /3d-viewer/viewer/bedfcb8b-1463-43e9-831e-45fd60f985f8
    ?camera_controls
    &auto_rotate
    &shadow_intensity=2
    &scale=2 2 2

Usage for Live Preview

where the "3D Model" field is a "File" relationship (or an input with a valid file UUID will do too)

Model Viewer Interface

This interface enables you to render 3d models on a Directus detail page. When setting values directly in the interface on an item detail page these will be leading and overwrite the set interface options.

Interface Options | Item Values :----------------:|:---------------: Interface Options GIF | Interface Item Values GIF Interface Options PNG | Interface Item Values PNG

Model Viewer Display

This display enables you to render 3d models on a Directus overview page. This takes a fair amount of resources so would not recommend this for pages with more than a few 3d model refrences.

Overview Page | Display Options :------------:|:---------------: Overview Page GIF | Display Options GIF

Model Viewer Panel

This panel enables you to render 3d models on a Directus insights panel.

Panel Example | Panel Options :------------:|:---------------: Panel Boat GIF | Panel Options PNG