Socket
Book a DemoInstallSign in
Socket

phoenix-event-display

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

phoenix-event-display

API for web-based experiment independent event display.

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
24
100%
Maintainers
1
Weekly downloads
 
Created
Source

Phoenix event display

A highly modular and API driven experiment independent event display that uses three.js for processing and presenting detector geometry and event data.

To use in your application. First, install the npm package.

npm install phoenix-event-display

To create a simple event display.

// Import required classes
import { EventDisplay, Configuration } from 'phoenix-event-display';

// Create the event display
const eventDisplay = new EventDisplay();

// Create the configuration
const configuration = new Configuration('wrapper_element_id');

// ... other configuration options

// Initialize the event display with the configuration
eventDisplay.init(configuration);

// Load and parse event data in Phoenix format and display it
fetch('path/to/event-data.json')
  .then((res) => res.json())
  .then((res) => {
    eventDisplay.parsePhoenixEvents(res);
  });

// Load detector geometry
eventDisplay.loadOBJGeometry('path/to/geometry.obj', 'Detector OBJ', 0x8c8c8c /* color */);

Usage examples

FAQs

Package last updated on 24 Sep 2020

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