Skip to content

XViewr SDK Feature Inventory

This document describes the current SDK feature set in product language rather than API-name language. It includes documented public capabilities and source-level capabilities that are important to the SDK's current state.

Core Viewer Platform

  • Browser-based 3D engineering viewer built on Three.js.
  • Plugin-driven architecture for enabling and disabling viewer capabilities independently.
  • Service registry for shared viewer systems such as camera, loading, mesh, selection, measurement, rendering, storage, and licensing.
  • Event bus for decoupled communication between services, plugins, and host applications.
  • Config manager with nested config updates, validation, and change watchers.
  • Viewer lifecycle management: ready state, resize handling, render loop, disposal, frame callbacks, and post-render callbacks.
  • Scene metrics reporting for object count, mesh count, visible meshes, vertices, triangles, and visible triangles.
  • Custom service and plugin registration for application-specific extensions.
  • TypeScript-first public API with typed config, services, plugins, events, and shared data structures.

Model Ingestion And Large Model Streaming

  • Load standard 3D assets from URLs or browser File objects.
  • Supported direct browser-loadable formats include GLB, GLTF, FBX, PLY, LAS, LAZ, STL, and OBJ.
  • STEP files are supported through the Xconvert pipeline, where Xconvert converts the source STEP data into optimized chunk assets and a manifest consumed by the SDK.
  • E57 is not currently supported.
  • GLB/GLTF loading supports Draco-compressed and Meshopt-compressed assets.
  • GLB/GLTF loading repairs missing or invalid normals so imported geometry remains renderable.
  • PLY loading supports both mesh-style and point-cloud-style geometry.
  • LAS/LAZ point-cloud loading supports color attributes, intensity, classification, point counts, compressed LAZ metadata, progress reporting, size checks, and malformed/truncated file validation.
  • File loading emits start, progress, success, and error events.
  • Custom loader adapters can be registered for additional formats.
  • URL validation blocks unsupported URL schemes while allowing HTTP, HTTPS, blob, and relative URLs.
  • Large CAD/STEP workflows are supported through the Xconvert backend pipeline: Xconvert converts very large source files into spatial chunks and emits a manifest consumed by the SDK.
  • Chunked model loading fetches the Xconvert manifest, normalizes chunk metadata, builds a root model group, and loads baseline chunks concurrently.
  • Chunk manifests can carry spatial bounds, octree data, hierarchy data, baseline LOD URLs, and detail LOD URLs.
  • Chunk loading exposes per-chunk progress callbacks and chunk-loaded events.
  • Chunked models preserve backend hierarchy/tree metadata for downstream model tree and storage features.
  • Each chunk and mesh is tagged with SDK metadata so the LOD system, mesh registry, selection, and hierarchy services can recognize it.
  • Baseline chunk concurrency is configurable for faster first visual load on large assemblies.
  • Companion CAD edge data can be decoded from inline GLB metadata or loaded from .edges.json / .edges.json.gz.
  • CAD edge overlays are rendered per mesh using line segments, including grouped CAD primitive distribution by solid ID or nearest bounding-box center.
  • Split GLTF primitives can be merged back into unified meshes while preserving multi-material groups.
  • Static large GLB loading can disable matrix auto-updates for performance.

Proprietary LOD And Performance System

  • Camera-aware LOD streaming for Xconvert chunked models.
  • Baseline geometry is loaded first for immediate visibility; detail geometry is fetched on demand.
  • LOD decisions use frustum visibility, screen-space size, camera movement, exposure scoring, chunk priority, and octree clustering.
  • Interior or low-exposure chunks can be culled more aggressively than exterior chunks.
  • Outer-shell chunk prioritization improves perceived quality for large assemblies.
  • Detail upgrades pause while the camera is moving and resume after movement debounce.
  • Detail geometry can be swapped in place or handled through preview/hide behavior.
  • LOD uses hysteresis to avoid flickering around visibility thresholds.
  • Configurable screen-pixel thresholds decide when chunks are hidden or upgraded.
  • Configurable octree depth, leaf size, clustering thresholds, frustum margin, and movement thresholds.
  • Detail chunk loading tracks in-flight requests and avoids duplicate loads.
  • Detail cache budget is enforced with high/low watermarks.
  • Idle, budget, unload, and dispose eviction paths free detail geometry.
  • Active, selected, isolated, or x-rayed detail chunks can be protected from eviction.
  • Cache stats include loaded bytes, peak bytes, evicted bytes, largest chunk, loaded chunk totals, eviction totals, and budget downgrade counts.
  • Debug LOD materials can color baseline and detail geometry differently.

Camera And Navigation

  • Perspective and orthographic camera support.
  • Runtime switching between perspective and orthographic projections while preserving view state.
  • Orbit, Trackball, Arcball, Fly, FirstPerson, Map, and PointerLock controls.
  • View presets for top, bottom, left, right, front, back, and isometric views.
  • Fit-to-view for whole scenes, selected targets, or explicit bounding boxes.
  • Configurable camera FOV, near/far planes, position, target, zoom, damping, pan, rotate, and zoom limits.
  • Smooth camera flights to a position and target.
  • Animated orbit, pan, zoom, and preset transitions.
  • Save and restore named camera states.
  • Camera info reporting for position, rotation, target, type, FOV, and zoom.
  • Interactive ViewCube overlay with face, edge, and corner navigation.
  • ViewCube drag-to-rotate support.
  • ViewCube configurable corner placement, size, offset, and animation duration.

Rendering And Visual Quality

  • WebGL renderer setup with antialiasing, alpha, drawing-buffer preservation, stencil, pixel ratio, tone mapping, exposure, color space, and shadow map options.
  • Local clipping enabled for cross-sections.
  • Render service with manual frame rendering and render-to-texture support.
  • Screenshot capture as PNG data URL.
  • Quality presets for low, medium, and high rendering modes.
  • Wireframe toggle.
  • Rendering stats for FPS, render time, triangles, draw calls, and frame count.
  • Post-processing service with lazy composer setup.
  • Custom post-process pass registration and removal.
  • Shared color, depth, normal targets and textures for advanced post-processing effects.
  • Runtime resize handling for renderer, camera, and post-processing targets.

Environment, Lighting, Shadows, And Backgrounds

  • HDRI environment loading and preset registration.
  • Built-in outdoor environment preset.
  • HDRI intensity, rotation, background blur, and background intensity controls.
  • Option to show HDRI as scene background or use a separate canvas background.
  • Ambient and directional light configuration.
  • Soft/contact shadow system with intensity, blur radius, and shadow map size.
  • Shadow refresh after model changes.
  • Background modes: transparent, solid color, vertical gradient, radial gradient, image fit, image fill, image tile, THREE.Color, and THREE.Texture.
  • Background rendering support for canvas export.

Mesh Registry And Object Operations

  • Automatic mesh registration for loaded models.
  • Deterministic mesh IDs and unified lookup metadata.
  • Mesh metadata includes name, path, layer, owner file, bounding box, center, volume, surface area, tags, parent/child IDs, and timestamps.
  • Lookup by SDK ID, unified ID, name, layer, owner file, bounds, children, and custom predicates.
  • Registry statistics for mesh count, indexed meshes, files, and layers.
  • Neighbor finding by bounding-box contact with configurable depth.
  • Neighbor finding by radius around selected or individual mesh centers.
  • Hide, show, show-all, ghost, x-ray, isolate, clear isolation, clear ghosting, clear x-ray, and restore operations.
  • Display intent tracking so systems can coordinate visibility/material state.
  • Mesh processing pipeline with pre-process, compute, metadata, index, and post-process stages.
  • Custom pipeline functions with priority and per-stage enable/disable.
  • Edge-line utility functions for decoding, loading, building, and disposing CAD edge overlays.

Selection And Highlighting

  • Click/raycast-based object selection.
  • Single and multi-selection support.
  • Additive selection.
  • Deselect, toggle, clear, select all, and invert selection.
  • Region selection by screen rectangle sampling.
  • Selection by bounding box.
  • Focus camera on current selection.
  • Contact-neighbor selection expansion.
  • Radius-neighbor selection expansion.
  • Hover tracking and hover highlighting.
  • Selectable-only mode using userData.isSelectable.
  • Raycasting respects active cross-section clipping planes.
  • Pluggable highlight strategies.
  • Default material-swap highlighting.
  • Configurable selected color, hover color, intensity, and outline width.
  • Selection, deselection, hover, clear, invert, all-selected, and neighbor-selected events.

Measurement

  • Interactive 3D measurement mode.
  • Distance measurement.
  • Angle measurement.
  • Area measurement.
  • Multi-point measurement.
  • Axis-aligned bounding-box measurement.
  • Oriented bounding-box measurement.
  • Volume measurement.
  • Circle measurement.
  • Arc measurement.
  • Custom measurement descriptor registration.
  • Programmatic measurement creation from points.
  • Auto-create measurements when enough points are collected.
  • Manual completion for variable-point measurements.
  • Temporary hover point preview.
  • Point update/edit support.
  • Measurement visibility toggling.
  • Measurement reset and removal.
  • Surface snapping for distance and multi-point measurements.
  • Optional section-limited raycasting against contour objects.
  • Distance component rendering for dx/dy/dz legs.
  • Volume computation with auto, tetrahedron, or voxel methods.
  • Voxel volume settings for resolution, max cells, center/corner sampling, and axis voting.
  • Measurement labels with configurable global and per-type styling.
  • Measurement leader lines with configurable color, width, opacity, and dash pattern.

Cross-Sectioning

  • Interactive clipping-plane mode.
  • Axis-aligned section creation on X, Y, or Z.
  • Arbitrary clipping plane creation from position and normal.
  • Multiple clipping planes with add, update, remove, clear, and query operations.
  • Visible plane mesh auto-sized to scene bounds.
  • Transform gizmo attachment for moving section planes.
  • Plane rotation in degrees.
  • Center plane on scene.
  • Fit section plane to scene.
  • Plane color and opacity controls.
  • Plane boundary outline toggle and color.
  • Plane helper toggle.
  • Section contour generation and visibility toggle.
  • Contour color control.
  • Clip cap fill toggle, color, and style.
  • Export section contours as IGES.
  • Section plane animation along its normal.
  • Callback helpers for plane created, updated, removed, transform started, and transform ended.

Transform Controls

  • Translate, rotate, and scale gizmos.
  • Automatic attachment when exactly one object is selected.
  • Detach on multi-selection or clear.
  • Manual attach and detach.
  • World/local transform spaces.
  • Gizmo size control.
  • Per-axis visibility controls.
  • Translation, rotation, and scale snapping.
  • Transform snapshot reading.
  • Apply saved transform data.
  • Reset target transform to identity.
  • Camera controls are disabled while dragging the transform gizmo.
  • Transform change, drag, mode, space, snap, axis, reset, and apply events.

Materials And Object Styling

  • Default, Matcap, and Random material modes.
  • Custom material mode registration.
  • Original material tracking.
  • Stable material tracking for restoring after temporary effects.
  • Per-mesh color override and reset.
  • Reset all colors.
  • Temporary color flash effect.
  • Material creation for standard, physical, basic, matcap, and shader materials.
  • Built-in material lookup.
  • X-ray material generation with opacity, rim strength, rim power, rim color, and fill color.
  • Global clipping plane application to registered materials.

Scene Hierarchy, Model Tree, And BOM

  • Scene hierarchy graph storing assemblies, subassemblies, components, parts, hardware, references, and root nodes.
  • Automatic hierarchy building from loaded scene traversal.
  • Hierarchy building from Xconvert chunk manifests.
  • Node metadata, transforms, absolute transforms, bounding boxes, visibility, lock state, parent/child relationships, and mesh IDs.
  • Node CRUD operations.
  • Query nodes by type, depth, tags, custom filter, visibility, and max results.
  • Export hierarchy as JSON, XML, or CSV.
  • Import hierarchy from JSON or XML.
  • Hierarchy statistics including node counts, type counts, relationships, and memory usage.
  • Dataset manager for custom schemas attached to nodes.
  • Assembly manager for relationships and BOM data.
  • Model tree plugin with searchable and filterable hierarchy view.
  • Tree filtering by node type, tags, name pattern, visible-only, max depth, or custom predicate.
  • Tree sorting by name, type, depth, or custom function.
  • Expand/collapse individual nodes.
  • Expand/collapse all in built-in UI.
  • Select tree node and sync to scene selection.
  • Sync scene selection back to tree selection.
  • Toggle node and descendant visibility through mesh service.
  • Built-in model tree UI panel.
  • Light/dark UI themes and custom CSS/style overrides.
  • Tree statistics for total nodes, expanded nodes, selected node, and counts by type.

Labels And Annotation

  • HTML labels anchored to 3D meshes.
  • Labels update screen position every frame from the active camera.
  • Labels can be attached by target mesh ID and local position.
  • Custom label types with custom renderers.
  • Per-label renderer override.
  • Per-label style override.
  • Label filtering by type, mesh ID, tags, or custom predicate.
  • Show only selected label types.
  • Draggable labels with remembered drag offsets.
  • SVG leader lines from label to anchor.
  • Leader line color, width, opacity, and dash styling.
  • Auto z-index based on camera distance.
  • Hide labels when anchors are outside camera near/far range.
  • Label CRUD through service and plugin.

Animation

  • Keyframe animation creation and playback.
  • Play, pause, resume, stop, seek, remove, and query animations.
  • Timeline creation with tracks.
  • Timeline playback and stop.
  • Global pause, resume, stop-all, and time-scale controls.
  • Tween engine for object properties.
  • Vector3 animation helper.
  • Multi-property animation helper including dot-path properties.
  • Transform animation for position, rotation, and scale.
  • Engine timelines with named registration and stop controls.
  • Easing support including linear and power easing modes.
  • Scene-state snapshot capture for objects with SDK IDs.
  • Scene-state restore by matching object IDs.
  • Delta animation between two scene snapshots.
  • Object-tree delta animation.
  • Camera state capture and replay support.
  • Orbit state capture and application.

Explosion And Assembly Review

  • Hierarchical exploded views for assemblies.
  • X-axis, Y-axis, Z-axis, and radial explosion.
  • Combined per-axis and radial explosion.
  • Depth-based explosion of hierarchy levels.
  • Scoped explosion for a subtree.
  • Immediate-child-only scoped explosion.
  • Reset to original positions.
  • Reset-based and current-based explosion modes.
  • Configurable explosion origin.
  • Configurable strength and scene-scale multiplier.
  • Auto-reset on model load.
  • Explosion stats for mesh counts, scene bounds, scene scale, and current values.
  • Mesh pipeline integration so newly registered meshes are prepared automatically.
  • Slash-command registration for explosion workflows when command service is available.

Grid

  • Shader-based reference grid.
  • Grid orientations for X, Y, Z, -X, -Y, and -Z.
  • Configurable grid size, position, cell color, section color, cell size, section size, line thickness, fade distance, fade strength, and side.
  • Infinite-grid style rendering.
  • Follow-camera mode.
  • Visibility toggle.
  • Auto-fit to loaded scene.
  • Fit grid to a specific object.
  • Compute grid parameters without applying them.
  • Grid creation, target, orientation, fit, visibility, and config events.

Technical Drawings

  • CAD-style hidden-line drawing generation from the current scene.
  • Front, right, top, or current-view drawing generation.
  • Orthographic drawing workflow.
  • Visible edge rendering.
  • Hidden-line rendering as dashed or ghosted lines.
  • Optional silhouette emphasis.
  • Target all objects or current selection.
  • Optional section-plane awareness.
  • Configurable visible weight, hidden weight, dash size, gap size, ghost opacity, crease angle, resolution, caching, batch size, wireframe mode, and depth epsilon settings.
  • Drawing performance stats.
  • WebGL capability reporting.
  • Edge cache clearing.
  • PNG drawing export.
  • SVG edge export.
  • Debug tools for depth diagnostics and injecting generated lines into the main scene.

Canvas And Image Export

  • Export current viewer canvas as PNG, JPEG, or WebP.
  • Configurable export width, height, quality, background, and filename.
  • Option to include or exclude measurement geometry.
  • Option to include or exclude labels.
  • DOM label overlay compositing into exported image.
  • Transparent export background support.
  • Download helper for generated image.
  • Export started, completed, and error events.

2D Image Review And Markup

  • Standalone 2D image viewer plugin.
  • Image loading into a canvas.
  • Zoom-to-cursor.
  • Pan support.
  • Fit-to-container reset.
  • Transform reporting with scale, offsets, min zoom, and max zoom.
  • Markup overlay canvas for image-space drawing.
  • Pen and eraser tools.
  • Configurable stroke color and thickness.
  • Enable/disable markup input.
  • Markup transform sync with image pan/zoom.
  • Clear markup.
  • Undo history.
  • Export markup overlay as data URL.

Command And Slash Input

  • Command registration and unregistration by plugins.
  • Command lookup by name or category.
  • Command validation before execution.
  • Typed parameter validation, including enum, numeric min/max, and custom checks.
  • Command execution with before, success, and error events. Execution never throws; failures come back in a result envelope.
  • Batch execution of command sequences with stop-on-error control.
  • Machine-readable command catalog generated from the registry for host-side LLM tool calling.
  • Slash-command input binding.
  • Slash-command autocomplete for commands and parameters.
  • Slash-command parsing with quoted values, numbers, booleans, JSON objects, and arrays.
  • Chained slash commands with &&.
  • Slash-command execution, suggestion, error, and chain-completed events.
  • Protection against dangerous prototype keys in parsed command parameters.

Licensing And Security

  • XVR1 ES256 license validation.
  • License signature, issuer, audience, expiry, and optional domain validation.
  • Feature and plugin gating based on license claims.
  • License tiers: trial, standard, professional, enterprise.
  • Days-remaining calculation.
  • Customer name and tier reporting.
  • Expiring-license event.
  • Optional revocation endpoint and revocation modes.
  • Runtime APIs are blocked until license validation completes.
  • Sanitization helpers for HTML, XML, SVG attributes, CSS colors, filenames, and CSV fields.
  • Structured SDK error classes for plugin, service, config, license, loader, render, and component failures.

Developer And Diagnostics

  • Debug console plugin for monitoring selected SDK events and service availability.
  • Debug UI with log filtering, stats, clear, export, show, hide, and toggle controls.
  • Development-only window.debugConsole helpers.
  • Public logger with log levels.
  • Component manager for attaching reusable components to scene objects.
  • Build outputs for ESM, UMD, and TypeScript declarations.
  • Subpath imports for core, plugins, services, types, and utils.
  • Test coverage across core, services, plugins, loading, LOD, selection, measurement, rendering, storage, exports, and utilities.
  • Release validation, package audit, SBOM generation, vulnerability scanning, SAST scanning, and CI pipeline scripts.

XViewr SDK and xConvert CLI documentation.