Hyperse
  • Pricing
  • FAQs
Newsletter

Subscribe to our newsletter

Receive weekly updates with latest collections and exclusive offers, straight to your inbox.

Hyperse

Headless commerce solutions for brands, developers, and modern ecommerce teams.

Explore

  • Home
  • About Us
  • Partners
  • FAQs

Legal & resources

  • Proposal
  • Privacy Policy
  • Terms & Conditions

© 2026 Hyperse. All rights reserved.


  1. Home
  2. Vendure Plugins
  3. glass-plugin-dimension
glass-plugin-dimension

glass-plugin-dimension

By Yingchun Tian

glass-plugin-dimension is a Dimension plugin in the Hub Glass group.glass-plugin-dimension provides Dimension plugin capabilities for Hub Glass. Vertical solutions for optical and eyewear commerce.

CoreVendure Plugins

Specifications

Technical details and package information for this product.

Package

@hyperse-hub/glass-plugin-dimension

Support by

Yingchun Tian

Support languages

TypeScript, JavaScript, DIGITAL Command Language, CSS, Prolog, Shell

Integration type

Core

Category

Vendure Plugins

Compatible with

^3.0.0

Latest version

1.0.1

Downloads

0

Repository

https://github.com/hyperse-hub/hub-glass

Last published

May 03, 2026

Description
Changelog
loading...

@hyperse-hub/glass-plugin-dimension

Vendure plugin: frame dimension overlays for eyewear—normalized polylines on Product and optional diagram assets per ProductVariant.

Features

  • Product — dimensionModelConfig (GraphQL object): bridge, lens width/height, total width, temple length. Each value is a polyline as [[x, y], ...] with coordinates as decimal strings in normalized space (typically 0–1 vs. a reference image).
  • ProductVariant — dimensionFrameAsset / dimensionTempleAsset (Asset relations), hydrated when requested in GraphQL.

Admin stores the model as JSON in a text custom field; the API always resolves to a structured object, using defaultDimensionModel from plugin options when the field is empty or invalid.

Install

Register the plugin in your Vendure config (same pattern as other @hyperse-hub/glass-* plugins):

import { GlassPluginDimension } from '@hyperse-hub/glass-plugin-dimension'; export const config: VendureConfig = { plugins: [ GlassPluginDimension.init({ defaultDimensionModel: {/* ProductFrameDimensionModelConfig */}, }), ], };

Import the package once so custom-field TypeScript merges apply:

import '@hyperse-hub/glass-plugin-dimension';

Configuration

OptionDescription
defaultDimensionModelFallback when Product.customFields.dimensionModelConfig is missing or bad JSON.

Invalid JSON is logged under the context GlassPluginDimension and the default model is returned.

GraphQL

Registered on Admin and Shop APIs. Example shop query:

query { product(id: "1") { dimensionModelConfig { bridge lensWidth lensHeight totalWidth templeLength } variants { dimensionFrameAsset { preview } dimensionTempleAsset { preview } } } }

Requirements

  • Vendure ^3.6.0 (see peerDependencies in package.json).

On this page

  • @hyperse-hub/glass-plugin-dimension
    • Features
    • Install
    • Configuration
    • GraphQL
    • Requirements