Skip to content

HorizontalMoleculeNode

Overview

Base class for molecules with N atoms aligned on the horizontal axis, for N > 0. Note that here is technically no such thing as a single-atom molecule, but allowing N=1 simplifies the Equation model.

Origin is at geometric center of the node's bounding rectangle.

@author Chris Malley (PixelZoom, Inc.) @author Jonathan Olson <jonathan.olson@colorado.edu>

Class HorizontalMoleculeNode

import { HorizontalMoleculeNode } from 'scenerystack/nitroglycerin';

Constructor

new HorizontalMoleculeNode( elements : Element[], providedOptions? : HorizontalMoleculeNodeOptions )

Instance Methods

Type HorizontalMoleculeNodeOptions

import type { HorizontalMoleculeNodeOptions } from 'scenerystack/nitroglycerin';
  • direction?: "leftToRight" | "rightToLeft"
    direction of overlap, leftToRight or rightToLeft
  • overlapPercent?: number
    amount of overlap between atoms
  • & MoleculeNodeOptions

Source Code

See the source for HorizontalMoleculeNode.ts in the nitroglycerin repository.