Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@onirix/node-inspector

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onirix/node-inspector

Onirix Node Inspector allows you to highlight specific parts of your 3D models and link useful and readable information to the users of your experiences.

latest
npmnpm
Version
1.0.3
Version published
Maintainers
3
Created
Source

Version
Documentation Twitter: onirix

OnirixNodeInspector

OnirixNodeInspector is a JavaScript library designed to interact with the Onirix Embed SDK. It provides functionality to load, inspect, and highlight nodes in a 3D scene, display associated data sheets for selected nodes, and manage interactions with nodes in the scene.

To learn more about this module visit our documentation.

Install

You can install the library via npm:

npm install @onirix/node-inspector

Alternatively, include the dependency in the HTML tag:

<head>
    <script src="https://cdn.jsdelivr.net/npm/@onirix/node-inspector@1.0.3/+esm"></script>
</head>

Or use it as an ES module:

import OnirixNodeInspector from "https://cdn.jsdelivr.net/npm/@onirix/node-inspector@1.0.3/+esm";

Usage

Initialization

To initialize the OnirixNodeInspector module, create a new instance of the class and pass the Onirix EmbedSDK instance.

import OnirixEmbedSDK from "https://cdn.jsdelivr.net/npm/@onirix/embed-sdk@1.17.1/+esm";
import OnirixNodeInspector from "https://cdn.jsdelivr.net/npm/@onirix/node-inspector@1.0.3/+esm";

const embedSdk = new OnirixEmbedSDK();
embedSdk.connect();

const nodeInspector = new OnirixNodeInspector(embedSdk);

const nodeInspector = new OnirixNodeInspector(embedSdk, {
    enableHighlight: true,
    highlightParams: { type: "box", border: { enable: true } },
    showNodeData: true,
    onlyWithDatasheets: false,
});

Onirix Node Inspector offers you several options to adapt its use to your needs. You can configure the operation through a second parameter in the module builder. These are the available options:

  • embedSdk (required): Instance of the Onirix Embed SDK.
  • params (optional): Configuration parameters for the inspector:
    • enableHighlight (default: true): Whether to enable node highlighting.
    • dataStructure(default: ox-node-inspector): Name of the datasheet data structure.
    • highlightParams (default: {type: "box", border: {enable: false}}): Parameters for node highlighting.
    • showNodeData (default: true): Whether to show node data in the UI panel when a node is selected.
    • onlyWithDatasheets (default: false): Whether to only include nodes with associated datasheets.
    • onNodeSelected (default: null): Callback function to execute when a node is selected.
import OnirixEmbedSDK from "https://cdn.jsdelivr.net/npm/@onirix/embed-sdk@1.17.1/+esm";
import OnirixNodeInspector from "https://cdn.jsdelivr.net/npm/@onirix/node-inspector@1.0.3/+esm";

const embedSdk = new OnirixEmbedSDK();
embedSdk.connect();

const params = {
    'highlightParams': {
        'color': '#F00'
    },
    'dataStructure': 'my-structure',
    'onlyWithDatasheets': true
}

const nodeInspector = new OnirixNodeInspector(embedSdk, params);

OnirixNodeInspector Class

Methods

setHighlightingParams(enable, params)

Configures the highlighting parameters for nodes. More information about the highlighting options in the EmbedSDK documentation.

  • Parameters:
    • enable (boolean): Whether to enable node highlighting.
    • params (object): Highlighting parameters, such as type and border settings.
  • Example:
nodeInspector.setHighlightingParams(true, { type: "box", border: { enable: true } });

Example

import OnirixEmbedSDK from "https://cdn.jsdelivr.net/npm/@onirix/embed-sdk@1.17.1/+esm";
import OnirixNodeInspector from "https://cdn.jsdelivr.net/npm/@onirix/node-inspector@1.0.3/+esm";

const embedSdk = new OnirixEmbedSDK();
embedSdk.connect();

const nodeInspector = new OnirixNodeInspector(embedSdk);

// Configure highlighting
nodeInspector.setHighlightingParams(true, { type: "box", border: { enable: true } });

Author

👤 Onirix

Keywords

Augmented reality

FAQs

Package last updated on 31 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts