directionConfirmGlobal Class
Item Index
Methods
- dir_addVectorFromMouse
- dir_addVectorToPair
- dir_changeCurrentPair
- dir_confirmPair
- dir_deconfirmPair
- dir_dehighlight
- dir_doDrag
- dir_doMouseDown
- dir_doMouseLeave
- dir_doMouseUp
- dir_doMouseUp
- dir_fixOpacity
- dir_getDir
- dir_getDirectionFromMouse
- dir_grab
- dir_grabExtension
- dir_highlight
- dir_initAxisLines
- dir_insertAssemblyPairs
- dir_insertVectorView
- dir_justDont
- dir_linkPair
- dir_linkParts
- dir_loadParts
- dir_parseData
- dir_readMultipleFiles
- dir_recieveData
- dir_removeVectorView
- dir_remVectorFromPair
- dir_renderXML
- dir_sendData
- dir_updateAxisLines
- dir_vecEntryUpdate
- dir_whoIsLeft
- doPartDrag
- part_doMouseDown
- part_doMouseLeave
- part_doMouseUp
- part_doZoom
- part_justDont
Methods
dir_addVectorFromMouse
-
mouseX
-
mouseY
Adds a vector to the currently displayed pair based off of camera position, mouse X and mouse Y
Parameters:
-
mouseX
FloatThe X position of the mouse
-
mouseY
FloatThe Y position of the mouse
Returns:
dir_addVectorToPair
-
theButton
Inserts a blank vector widget into the vector view element
Parameters:
-
theButton
HTML ElementThe "add vector" button
Returns:
dir_changeCurrentPair
-
theButton
Given an HTML element corresponding to a "focus" button, makes the corresponding pair of parts to be displayed
Parameters:
-
theButton
HTML ElementThe confirm button of the element to be moved
Returns:
dir_confirmPair
-
theButton
Given an HTML element corresponding to a "confirm" button, moves the parent element to the confirmed section of the webpage
Parameters:
-
theButton
HTML ElementThe confirm button of the element to be moved
Returns:
dir_deconfirmPair
-
theButton
Given an HTML element corresponding to a "unconfirm" button, moves the parent element to the unconfirmed section of the webpage
Parameters:
-
theButton
HTML ElementThe unconfirm button of the element to be moved
Returns:
dir_dehighlight
-
thePair
dir_dehighlights the given pair of parts
Parameters:
-
thePair
ObjectThe pair object to be dir_dehighlighted
Returns:
dir_doDrag
-
theEvent
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:
dir_doMouseDown
-
theEvent
Given a mousedown event, sets corresponding internal button states for mouse-related controls
Parameters:
-
theEvent
Mousedown event
Returns:
dir_doMouseLeave
-
theEvent
Given a mouseleave event, sets corresponding internal button states for mouse-related controls
Parameters:
-
theEvent
Mouseup event
Returns:
dir_doMouseUp
-
theEvent
Given a mousewheel event, changes the distance of the camera from the center of the scene
Parameters:
-
theEvent
Mouseup event
Returns:
dir_doMouseUp
-
theEvent
Given a mouseup event, sets corresponding internal button states for mouse-related controls
Parameters:
-
theEvent
Mouseup event
Returns:
dir_fixOpacity
-
theSlider
Sets the opacity of each (non-dir_highlighted) mesh object to the value of the slider element provided
Parameters:
-
theSlider
ObjectThe slider which is to be referenced when setting object opacity
Returns:
dir_getDir
-
theVec
Finds and returns the index of the direction in the list of usable vector directions which best matches the given vector
Parameters:
-
theVec
Vector3The vector to be searched with
Returns:
The index of the best matching direction in the list of usable vector directions
dir_getDirectionFromMouse
-
mouseX
-
mouseY
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:
dir_grab
-
theTree
-
theMember
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 ObjectThe jQuery object whose child is to be returned
-
theMember
StringThe name of the tag being searched
Returns:
The first child with the given tag. If such a child does not exist, null is returned.
dir_grabExtension
-
theName
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
StringThe file name to be processed
Returns:
the extension in the given file name. If no extension is found, the 'undefined' value is returned.
dir_highlight
-
thePair
dir_highlights the given pair of parts
Parameters:
-
thePair
ObjectThe pair object to be dir_highlighted
Returns:
dir_initAxisLines
()
Void
Initializes the lines for the XYZ compass in the display
Returns:
dir_insertAssemblyPairs
()
Void
Populates the webpage with graphical representations of the assembly pairs stored in the global variable assemblyPairs
Returns:
dir_insertVectorView
-
theButton
Inserts the vector view into the webpage
Parameters:
-
theButton
HTML ElementThe vector viewing button
Returns:
dir_justDont
-
theEvent
Prevents the default response of the given event (used to prevent dropdown menus when right clicking on the display).
Parameters:
-
theEvent
Event ObjectThe event to suppress the default response of.
Returns:
dir_linkPair
-
a
-
b
-
vec
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
StringThe first part name
-
b
StringThe second part name
-
vec
Vector3The vector to be added to the pair
Returns:
The resulting pair object
dir_linkParts
()
Void
Links together the pairs of parts corresponding to the strings present in the namePairs array.
Returns:
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:
dir_parseData
()
Void
Populates the webpage with data stored int the global variable theSML
Returns:
dir_readMultipleFiles
-
evt
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
EventA fileinput event, to be given by a fileinput event listener
Returns:
dir_recieveData
-
theXMLFile
-
theSTLFiles
The function which handles the actual dir_rendering of the solution file animation and loading in the models
Parameters:
-
theXMLFile
String -
theSTLFiles
Object
Returns:
dir_removeVectorView
-
theButton
Removes the vector view from the webpage
Parameters:
-
theButton
HTML ElementThe vector viewing button
Returns:
dir_remVectorFromPair
-
theButton
Removes a vector widget from the vector view element
Parameters:
-
theButton
HTML ElementThe "remove" button of the widget to be removed
Returns:
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:
dir_sendData
-
theXMLText
Is called whenever the user submits the part table and every entry has been properly filled out.
Parameters:
-
theXMLText
StringThe contents of the disassembly directions in the webpage, as a string in XML formatting
Returns:
dir_updateAxisLines
()
Void
Updates the lines for the XYZ compass in the display
Returns:
dir_vecEntryUpdate
-
theInput
Updates a vector to match the values in its corresponding widget
Parameters:
-
theInput
HTML ElementAn input element of the vector's widget
Returns:
dir_whoIsLeft
-
theReaders
Outputs through the console the list of FileReaders in theReaders which have not yet completed their loading
Parameters:
-
theReaders
FileReader Object ListThe list of FileReaders to be checked
Returns:
doPartDrag
-
theEvent
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:
part_doMouseDown
-
theEvent
Given a mousedown event, sets corresponding internal button states for mouse-related controls
Parameters:
-
theEvent
Mousedown event
Returns:
part_doMouseLeave
-
theEvent
Given a mouseleave event, sets corresponding internal button states for mouse-related controls
Parameters:
-
theEvent
Mouseup event
Returns:
part_doMouseUp
-
theEvent
Given a mouseup event, sets corresponding internal button states for mouse-related controls
Parameters:
-
theEvent
Mouseup event
Returns:
part_doZoom
-
theEvent
Given a mousewheel event, changes the distance of the camera from the center of the scene
Parameters:
-
theEvent
Mouseup event
Returns:
part_justDont
-
theEvent
Prevents the default response of the given event (used to prevent dropdown menus when right clicking on the display).
Parameters:
-
theEvent
Event ObjectThe event to suppress the default response of.