API Docs for:
Show:

directionConfirmGlobal Class

Methods

dir_addVectorFromMouse

(
  • mouseX
  • mouseY
)
Void

Adds a vector to the currently displayed pair based off of camera position, mouse X and mouse Y

Parameters:

  • mouseX Float

    The X position of the mouse

  • mouseY Float

    The Y position of the mouse

Returns:

Void:

dir_addVectorToPair

(
  • theButton
)
Void

Inserts a blank vector widget into the vector view element

Parameters:

  • theButton HTML Element

    The "add vector" button

Returns:

Void:

dir_changeCurrentPair

(
  • theButton
)
Void

Given an HTML element corresponding to a "focus" button, makes the corresponding pair of parts to be displayed

Parameters:

  • theButton HTML Element

    The confirm button of the element to be moved

Returns:

Void:

dir_confirmPair

(
  • theButton
)
Void

Given an HTML element corresponding to a "confirm" button, moves the parent element to the confirmed section of the webpage

Parameters:

  • theButton HTML Element

    The confirm button of the element to be moved

Returns:

Void:

dir_deconfirmPair

(
  • theButton
)
Void

Given an HTML element corresponding to a "unconfirm" button, moves the parent element to the unconfirmed section of the webpage

Parameters:

  • theButton HTML Element

    The unconfirm button of the element to be moved

Returns:

Void:

dir_dehighlight

(
  • thePair
)
Void

dir_dehighlights the given pair of parts

Parameters:

  • thePair Object

    The pair object to be dir_dehighlighted

Returns:

Void:

dir_doDrag

(
  • theEvent
)
Void

Given a mousedrag event, rotates the camera or adds a vector to the currently displayed pair, depending upon whether or not the left or right mouse button is depressed

Parameters:

  • theEvent Mouseup event

Returns:

Void:

dir_doMouseDown

(
  • theEvent
)
Void

Given a mousedown event, sets corresponding internal button states for mouse-related controls

Parameters:

  • theEvent Mousedown event

Returns:

Void:

dir_doMouseLeave

(
  • theEvent
)
Void

Given a mouseleave event, sets corresponding internal button states for mouse-related controls

Parameters:

  • theEvent Mouseup event

Returns:

Void:

dir_doMouseUp

(
  • theEvent
)
Void

Given a mousewheel event, changes the distance of the camera from the center of the scene

Parameters:

  • theEvent Mouseup event

Returns:

Void:

dir_doMouseUp

(
  • theEvent
)
Void

Given a mouseup event, sets corresponding internal button states for mouse-related controls

Parameters:

  • theEvent Mouseup event

Returns:

Void:

dir_fixOpacity

(
  • theSlider
)
Void

Sets the opacity of each (non-dir_highlighted) mesh object to the value of the slider element provided

Parameters:

  • theSlider Object

    The slider which is to be referenced when setting object opacity

Returns:

Void:

dir_getDir

(
  • theVec
)
Int

Finds and returns the index of the direction in the list of usable vector directions which best matches the given vector

Parameters:

  • theVec Vector3

    The vector to be searched with

Returns:

Int:

The index of the best matching direction in the list of usable vector directions

dir_getDirectionFromMouse

(
  • mouseX
  • mouseY
)
Int

Maps a given mouse X position and mouse Y position to a point on a unit hemisphere facing towards the user then returns the index of the closest valid direction

Parameters:

  • mouseX Float
  • mouseY Float

Returns:

Int:

dir_grab

(
  • theTree
  • theMember
)
JQuery Object

Given a jQuery object and a string, returns the first child of the given element with a tag equivalent to the given string.

Parameters:

  • theTree JQuery Object

    The jQuery object whose child is to be returned

  • theMember String

    The name of the tag being searched

Returns:

JQuery Object:

The first child with the given tag. If such a child does not exist, null is returned.

dir_grabExtension

(
  • theName
)
String

Accepts a string and outputs the string of all characters following the final '.' symbol in the string. This is used internally to extract file extensions from file names.

Parameters:

  • theName String

    The file name to be processed

Returns:

String:

the extension in the given file name. If no extension is found, the 'undefined' value is returned.

dir_highlight

(
  • thePair
)
Void

dir_highlights the given pair of parts

Parameters:

  • thePair Object

    The pair object to be dir_highlighted

Returns:

Void:

dir_initAxisLines

() Void

Initializes the lines for the XYZ compass in the display

Returns:

Void:

dir_insertAssemblyPairs

() Void

Populates the webpage with graphical representations of the assembly pairs stored in the global variable assemblyPairs

Returns:

Void:

dir_insertVectorView

(
  • theButton
)
Void

Inserts the vector view into the webpage

Parameters:

  • theButton HTML Element

    The vector viewing button

Returns:

Void:

dir_justDont

(
  • theEvent
)
Void

Prevents the default response of the given event (used to prevent dropdown menus when right clicking on the display).

Parameters:

  • theEvent Event Object

    The event to suppress the default response of.

Returns:

Void:

dir_linkPair

(
  • a
  • b
  • vec
)
Object

Accepts two strings, a and b, and a vector, vec, and outputs a constructed part pair object if the two strings correspond to two extant parts

Parameters:

  • a String

    The first part name

  • b String

    The second part name

  • vec Vector3

    The vector to be added to the pair

Returns:

Object:

The resulting pair object

dir_linkParts

() Void

Links together the pairs of parts corresponding to the strings present in the namePairs array.

Returns:

Void:

dir_loadParts

() Void

Called internally upon every recieved fileload event. Checks if every file reader in the array "fileReaders" has fully read each of their files. If so, then the function converts all recieved stl files into threeJS models and executes "dir_renderParts".

Returns:

Void:

dir_parseData

() Void

Populates the webpage with data stored int the global variable theSML

Returns:

Void:

dir_readMultipleFiles

(
  • evt
)
Void

Accepts a fileinput event, presumably from a file upload event listener, and assigns functions to each file reader listed in the event to be called upon the full loading of that given reader's files

Parameters:

  • evt Event

    A fileinput event, to be given by a fileinput event listener

Returns:

Void:

dir_recieveData

(
  • theXMLFile
  • theSTLFiles
)
Void

The function which handles the actual dir_rendering of the solution file animation and loading in the models

Parameters:

  • theXMLFile String
  • theSTLFiles Object

Returns:

Void:

dir_removeVectorView

(
  • theButton
)
Void

Removes the vector view from the webpage

Parameters:

  • theButton HTML Element

    The vector viewing button

Returns:

Void:

dir_remVectorFromPair

(
  • theButton
)
Void

Removes a vector widget from the vector view element

Parameters:

  • theButton HTML Element

    The "remove" button of the widget to be removed

Returns:

Void:

dir_renderXML

() Void

Processes the information in the webpage into an XML string and inserts a download link for the data into the top of the page

Returns:

Void:

dir_sendData

(
  • theXMLText
)
Void

Is called whenever the user submits the part table and every entry has been properly filled out.

Parameters:

  • theXMLText String

    The contents of the disassembly directions in the webpage, as a string in XML formatting

Returns:

Void:

dir_updateAxisLines

() Void

Updates the lines for the XYZ compass in the display

Returns:

Void:

dir_vecEntryUpdate

(
  • theInput
)
Void

Updates a vector to match the values in its corresponding widget

Parameters:

  • theInput HTML Element

    An input element of the vector's widget

Returns:

Void:

dir_whoIsLeft

(
  • theReaders
)
Void

Outputs through the console the list of FileReaders in theReaders which have not yet completed their loading

Parameters:

  • theReaders FileReader Object List

    The list of FileReaders to be checked

Returns:

Void:

doPartDrag

(
  • theEvent
)
Void

Given a mousedrag event, rotates the camera or adds a vector to the currently displayed pair, depending upon whether or not the left or right mouse button is depressed

Parameters:

  • theEvent Mouseup event

Returns:

Void:

part_doMouseDown

(
  • theEvent
)
Void

Given a mousedown event, sets corresponding internal button states for mouse-related controls

Parameters:

  • theEvent Mousedown event

Returns:

Void:

part_doMouseLeave

(
  • theEvent
)
Void

Given a mouseleave event, sets corresponding internal button states for mouse-related controls

Parameters:

  • theEvent Mouseup event

Returns:

Void:

part_doMouseUp

(
  • theEvent
)
Void

Given a mouseup event, sets corresponding internal button states for mouse-related controls

Parameters:

  • theEvent Mouseup event

Returns:

Void:

part_doZoom

(
  • theEvent
)
Void

Given a mousewheel event, changes the distance of the camera from the center of the scene

Parameters:

  • theEvent Mouseup event

Returns:

Void:

part_justDont

(
  • theEvent
)
Void

Prevents the default response of the given event (used to prevent dropdown menus when right clicking on the display).

Parameters:

  • theEvent Event Object

    The event to suppress the default response of.

Returns:

Void: