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

blueprint-render

v0.2.3

Published

框架无关的 UE 蓝图 / 材质图查看器:<blueprint-viewer> Web Component + BlueprintUE 增强渲染器,VuePress / Astro / 原生 HTML 通用

Readme

blueprint-render

npm version license

English | 中文

A framework-agnostic <blueprint-viewer> Web Component + BlueprintUE modified renderer for embedding interactive UE Blueprint / Material graphs into notes and blogs.

Motivation: As a TA / environment artist, I got tired of taking low-resolution screenshots of blueprint graphs. Now you can paste blueprint text directly and get an interactive, zoomable, copyable diagram.

Also available as an Obsidian plugin: obsidian-blueprint-viewer

Preview

Material graph render

Toolbar: pan / zoom, All (fit all nodes), copy code (one-click copy back to UE), name label (auto-extracted from filename or manual).

What is this

  • core: <blueprint-viewer> custom element (light DOM) — loads blueprint text, renders it, includes copy-code button, All (fit-to-screen), operation hint, and watermark.
  • renderer: Based on BlueprintUE official render.js (MIT), with modifications: left-drag pan (was right-drag to avoid browser gesture conflicts), All button, translate3d() GPU acceleration, English hints, smaller watermark.
  • adapters: src/vuepress/BlueprintRender.vue (VuePress 2), src/astro/BlueprintViewer.astro.

Quick Start

0. Prepare blueprint files

In UE editor, select blueprint/material nodes → copy → paste and save as .txt files. Place them in your project's public/blueprints/ directory (served from site root at build time).

Astro (simplest)

npm install blueprint-render
---
import BlueprintViewer from "blueprint-render/astro";
---

<BlueprintViewer src="/blueprints/xxx.txt" height="643" />

The component lazy-loads the core internally — no manual script or CSS needed.

VuePress 2

npm install blueprint-render
  1. Copy node_modules/blueprint-render/src/vuepress/BlueprintRender.vue to your project's .vuepress/components/ directory (VuePress auto-registers it globally).
  2. Use it directly in Markdown:
<BlueprintRender src="/blueprints/xxx.txt" height="643" />

The core is dynamically import()-ed in onMounted, so only pages that use the component load it.

Vanilla HTML / other builders

Method 1: npm + bundler (recommended)

npm install blueprint-render
// Import once in your entry JS to register the custom element
import "blueprint-render";
<blueprint-viewer src="/blueprints/xxx.txt" height="643"></blueprint-viewer>

Method 2: No bundler, single file

Copy node_modules/blueprint-render/dist/blueprint-viewer.js (~330 KB self-contained ESM) to your static directory:

<script type="module" src="/blueprint-render/blueprint-viewer.js"></script>
<blueprint-viewer src="/blueprints/xxx.txt" height="643"></blueprint-viewer>

Attributes

| Attribute | Type | Default | Description | |---|---|---|---| | src | string | — | URL of blueprint text file (takes priority over text) | | text | string | — | Pass blueprint text directly | | height | number | 643 | Render area height (px) | | name | string | auto from src | Name label shown next to copy code; auto-extracted from filename if omitted | | show-copy | boolean | true | Show the copy code button | | auto-fit | boolean | false | Auto fit all nodes after render (off by default, set auto-fit="true" to enable) | | title | string | Blueprint | Accessibility / tooltip title |

Interaction

Basic

| Action | Result | |---|---| | Left-drag on empty space | Pan canvas | | Ctrl + scroll wheel | Zoom | | All button | Fit all nodes on screen | | Reset button | Reset zoom and pan | | copy code button | Copy raw blueprint text (paste back into UE editor) | | Hamburger menu (☰) top-left | Save as image |

Sub-graph navigation (double-click to enter)

Double-click a node to enter its sub-graph. The breadcrumb shows the current level (Graph > NodeName); click Graph to return to the top level.

Sub-graphs only exist when child nodes are embedded in the copied text:

| Type | Double-click to enter? | Why | |---|---|---| | Collapsed Nodes | ✅ Yes | Child nodes embedded in copied text | | Blueprint Macro | ✅ Yes | Expanded macro nodes embedded in text | | Animation State Machine | ✅ Yes | Sub-states embedded in text | | Material Function Call | ❌ No | Only an external asset reference; internal nodes not in text | | Material Layer | ❌ No | Same — external asset reference |

Collapse Nodes tip (the only way to create sub-graphs in material graphs)

Material functions are not sub-graphs — they're standalone assets, and copying only includes a reference. To create a double-clickable sub-graph in a material graph, use Collapse Nodes:

  1. In the Material Editor, select the nodes you want to bundle
  2. Right-click → Collapse Nodes
  3. Name the collapsed node (double-click title to rename)
  4. Select all → copy → paste and save as .txt
  5. In the renderer, double-click the collapsed node → enter sub-graph; breadcrumb shows Graph > NodeName
  6. Click Graph → return to top level

Nodes inside a collapsed node are fully embedded in the copied text, so the renderer can display them correctly.

Development

npm install        # zero dependencies (build script is dependency-free)
npm run build      # outputs dist/blueprint-viewer.js (self-contained single file)

Core source: src/core/ (render.js / render.css are the single source of truth, blueprint-viewer.js is the component). Build output dist/blueprint-viewer.js is a self-contained ESM usable directly by Vite / Astro / <script type="module">.

Roadmap

  • More builder adapters: Hugo shortcode, VitePress, Hexo, Next.js / Nuxt wrappers. The core <blueprint-viewer> is builder-agnostic — any site supporting custom elements can use it via <script type="module">.
  • Renderer improvements: more UE new-version node styles, large-graph performance, light/dark theme.
  • Toolchain: direct .uasset file parsing (waiting for official uasset-reader-js to support blueprint node parsing).

Docs

License & Attribution

Project License

This project is released under the MIT License — see LICENSE.

Third-Party Attribution

The renderer is based on BlueprintUE Self-Hosted Edition:

  • src/core/render.js — Blueprint rendering engine
  • src/core/render.css — Blueprint stylesheet

Original project info:

Modifications made on top of the original (see header of src/core/render.js):

  • Left-drag pan (was right-drag)
  • Added All (fit-to-screen) button
  • getStyleTransformCSS uses translate3d() to force GPU compositing
  • English operation hints, smaller watermark
  • Web Component wrapper (<blueprint-viewer>)

This project retains the original copyright notice and attributes the original project per MIT license terms.

Support

If this project saves you time, consider buying me a coffee ☕