ARCS logo.js Augmented Reality Component System

Namespace: Component

ARCS. Component

Defines main traits of components in a namespace regrouping important methods
Source:

Members

<static> SourceIsNotComponent

Error message
Source:

<static> UndefinedSignal

Error message
Source:

<static> UndefinedSlot

Error message
Source:

Methods

<static> check(name)

Checks if the given prototype has traits of a component
Parameters:
Name Type Description
name string name of the prototype
Source:

<static> config(component, obj)

Specific hook that can be called when initializing a component
Parameters:
Name Type Description
component object prototype of the component
obj object the actual object
Source:

<static> connect(source, signal, destination, slt)

Connects two different components by using their signal and slots
Parameters:
Name Type Description
source object component sending data
signal string name of the signal to connect
destination object component receiving data
slt string name of the slot to connect
Source:

<static> create(name, sltList, sgnList)

External constructor: give component traits to any constructor. Component traits are the following:
  • Slot functions listed in an array;
  • A signal list described in an array;
  • A method returning the slot list;
  • A method returnung the signal list;
  • An emit method, to trigger signals by their names;
  • A slot method to cast an internal method to a slot;
  • A signal mehtod to register a possible signal.
Parameters:
Name Type Description
name string Class name to transform to a component
sltList string[] names of functions designated as slots, may be empty.
sgnList string[] names of functions designated as signals, may be empty.
Source:

<static> disconnect(source, signal, destination, slt)

Diconnects a signal/slot connection between two components
Parameters:
Name Type Description
source object component sending data
signal string name of the signal to connect
destination object component receiving data
slt string name of the slot to connect
Source:

<static> invoke(destination, slt, value)

Invokes a specific slot of a given component
Parameters:
Name Type Description
destination object component upon which invocation is performed
slt string name of the slot to invoke
value mixed value to input
Source: