PedagoComponent Class
This component tests the browser capabilities and redirects the user to the suitable page.
Constructor
PedagoComponent
(
-
core
Parameters:
-
core
CoreThe main engine.
Item Index
Methods
Methods
checkBrowserCapability
()
Boolean
Tests the browser WebGL capabilities and redirects the user to the suitable page.
Returns:
Boolean:
True if the browser supports Wanaplan, false if it does not.
destroy
()
Method called when the component is destroyed
disable
()
Disables the component
enable
()
Enables the component
getPageURL
(
String
private
-
page
Gets the url of a pedago page.
Parameters:
-
page
StringThe page.
Returns:
String:
Returns the complete url of the page.
getTargeted
(
Object
-
vector
Finds out if the given position is over an element handled by the component
Parameters:
-
vector
VectorA position, usually the cursor's one.
Returns:
Object:
The targeted element, or null if nothing is found.
initialize
()
Method called when Wanaplan is initialized.
You don't need to call this method manually.
onContextChanged
(
-
context
Method called when the context is switched (2D -> 3D or 3D -> 2D)
Parameters:
-
context
StringThe new context
startListening
()
Calls all the event listeners.
stopListening
()
Removes all the event listeners.
update
()
Generic update method, called on every frame