Function
| Static Public Summary | ||
| public |
AssetReference(param0: object): HTMLElement Create a layout for model reference page. |
|
| public |
Collection(param0: object): HTMLElement Create a layout for collection page. |
|
| public |
Create a layout for reference page. |
|
| public |
addCollectionID(payload: string): object Sends a signal to the reducer to add the scene to the collection |
|
| public |
arrayText(text: *): * Return a react elements contain a cue-card for Array data type |
|
| public |
asyncCollection(collectionID: string, uid: *): * Fetch the specific collection specify by user |
|
| public |
asyncCollections(uid: *): * Fetch the list of the user collection asynchronously Use when user login or added a new collection |
|
| public |
asyncExampleProj(): * Fetch a eample scenes from the backend |
|
| public |
asyncUserProj(uid: *): * Retrieved the list of user scenes |
|
| public |
asyncUserSettings(id: *): * |
|
| public |
boolText(text: *): * Return a react elements contain a cue-card for Boolean data type |
|
| public |
|
|
| public |
changeCamMode(config: *): object Sends a signal to the reducer to change the mode of the camera |
|
| public |
changeFloorColor(color: string): object Sends a signal to the reducer to change the sky color |
|
| public |
Sends a signal to the reducer to change the perspective |
|
| public |
changeSettings(payload: *): object Sends a signal to the reducer to change the settings |
|
| public |
changeSkyColor(color: string): object Sends a signal to the reducer to change the sky color |
|
| public |
changeView(): object Sends a signal to the reducer to toggle to be view only(hide the editor) or not |
|
| public |
classes(state: *, action: *): * Collection Reducer |
|
| public |
course(state: *, action: *): * Course Reducer |
|
| public |
async createCollection(name: string, uid: *): boolean Creates a new collection |
|
| public |
dataText(text: *): * Return a react elements contain a cue-card for dynamic data type |
|
| public |
deleteCollection(collectionID: string, name: string, uid: *): * Sends a signal to the reducer to delete the specific collection of user |
|
| public |
deleteProj(uid: *, id: string, name: string): * Delete the specify user project |
|
| public |
editor(state: *, action: *): * Editor Reducer |
|
| public |
fetchCourse(courseId: string): * Fetch specific course |
|
| public |
fetchCourses(): * Fetch all the courses available |
|
| public |
fetchLesson(json: *): * Fetch the lesson that is supplied by the parameter. |
|
| public |
fetchReferenceExample(funcName: string): * Fetch specific example scene from backend. |
|
| public |
fetchScene(id: string, uid: *): * This does an async fetch to backend to grab the scene, then dispatches the necessary functions to update the state. |
|
| public |
loadCourse(course: *): object Sends signal to the reducer to load the course retrieved |
|
| public |
loadLesson(lesson: object): * Sends signal to the reducer to load a new lesson supplied by parameter |
|
| public |
loadReferenceExample(refEx: object): * Sends a signal to the reducer to load the retrieved scene |
|
| public |
This function load data of scene to the redux store |
|
| public |
loadSettings(payload: *): object Sends a signal to the reducer to load the settings sends by the |
|
| public |
Sends a signal to the reducer to login with the given user |
|
| public |
Sends a signal to the reducer to logout the current user |
|
| public |
m(model: *): * |
|
| public |
This function registers the scene's name with Redux |
|
| public |
nextLesson(currentIndex: number, next: object): * Increment the lesson index and load the next lesson. |
|
| public |
numberText(text: *): * Return a react elements contain a cue-card for Number data type |
|
| public |
previousLesson(currentIndex: number, prev: object): * Decrement the lesson index and load the previous lesson. |
|
| public |
project(state: *, action: *): * Project Reducers |
|
| public |
r(ref: *): * |
|
| public |
recover(): * Sends a signal to the reducer to 'rewind' until last stable render |
|
| public |
referenceExample(state: *, action: *): * Reference Example reducer |
|
| public |
Sends a signal to the reducer to refresh with the given text |
|
| public |
refreshToken(token: object): object Sends a signal to the reducer to refresh the token |
|
| public |
removeCollectionID(payload: string): object Sends a signal to the reducer to add the scene to the collection |
|
| public |
Sends a signal to the reducer to render the scene |
|
| public |
Sends a signal to the reducer to reset the floor color |
|
| public |
Sends a signal to the reducer to reset the settings to default |
|
| public |
Sends a signal to the reducer to reset the sky color |
|
| public |
router(): * Create an routers that switch to correct react component for different endpoints |
|
| public |
async save(uid: *, scene: *, img: *, sceneID: *): * Saves a scene to MongoDB |
|
| public |
scene(state: *, action: *): * Scene Reducers |
|
| public |
Sends a signal to the reducer to change the position of the camera |
|
| public |
setCurrentIndex(newIndex: number): object Sends signal to the reducer to update the current index of the Course |
|
| public |
Sends a signal to the reducer to cahnge the description of the scene |
|
| public |
setNameDesc(payload: *): object Sends a signal to the reducer to change both name and description |
|
| public |
stringText(text: *): * Return a react elements contain a cue-card for String data type |
|
| public |
syncCollection(payload: object): object Sends a signal to the reducer to load the retrieved collection |
|
| public |
syncCollections(payload: object): object Sends a signal to the reducer to sync the user collections |
|
| public |
syncCourses(payload: *): * Sends a signal to the reducer to synchronize the courses |
|
| public |
syncExampleProj(payload: *): * Sends signal to the reducer to sync the example project |
|
| public |
syncUserProj(payload: *): * Sends signal to the reducer to sync the user project |
|
| public |
syncUserSettings(settings: *): {"type": *, "settings": *} |
|
| public |
t(tex: *): * |
|
| public |
Sends a signal to the reducer to toggle for light to cast shadow |
|
| public |
Sends a signal to the reducer to toggle the coordinate floor |
|
| public |
Sends a signal to the reducer to toggle for cursor to display cusor on screen |
|
| public |
Sends a signal to the reducer to toggle the default light |
|
| public |
Sends a signal to the reducer to toggle the floor |
|
| public |
Sends a signal to the reducer to toggle for light to show light indicator |
|
| public |
updateFontSize(fontSize: *): {"type": *, "fontSize": *} |
|
| public |
updateMoveSpeed(speed: number): {"type": *, "speed": *} Sends a signal to the reducer to change the speed of movement |
|
| public |
updateSavedText(savedText: *): * Sends a signal to the reducer to update the savedText when user try to save or open scene/course |
|
| public |
updateUserSettings(id: *, settings: *): * |
|
| public |
user(state: *, action: *): * User Reducers |
|
Static Public
public AssetReference(param0: object): HTMLElement source
import {AssetReference} from 'myr/src/components/layouts/AssetReference.js'Create a layout for model reference page.
Params:
| Name | Type | Attribute | Description |
| param0 | object | List of props that will be use in components |
Return:
| HTMLElement | Layout of the model reference page |
public Collection(param0: object): HTMLElement source
import {Collection} from 'myr/src/components/layouts/Collection.js'Create a layout for collection page.
Params:
| Name | Type | Attribute | Description |
| param0 | object | List of props that will be use in components |
Return:
| HTMLElement | Layout of the collection page |
public Reference(param0: object): HTMLElement source
import {Reference} from 'myr/src/components/layouts/Reference.js'Create a layout for reference page.
Params:
| Name | Type | Attribute | Description |
| param0 | object | List of props that will be use in components |
Return:
| HTMLElement | Layout of the reference page |
public addCollectionID(payload: string): object source
import {addCollectionID} from 'myr/src/actions/sceneActions.js'Sends a signal to the reducer to add the scene to the collection
Params:
| Name | Type | Attribute | Description |
| payload | string | id of collection to add scene to |
public arrayText(text: *): * source
import {arrayText} from 'myr/src/myr/reference.js'Return a react elements contain a cue-card for Array data type
Params:
| Name | Type | Attribute | Description |
| text | * |
Return:
| * |
public asyncCollection(collectionID: string, uid: *): * source
import {asyncCollection} from 'myr/src/actions/collectionActions.js'Fetch the specific collection specify by user
Params:
| Name | Type | Attribute | Description |
| collectionID | string | Collection id |
|
| uid | * | A JWT token to authenticate with the backend |
Return:
| * |
public asyncCollections(uid: *): * source
import {asyncCollections} from 'myr/src/actions/collectionActions.js'Fetch the list of the user collection asynchronously Use when user login or added a new collection
Params:
| Name | Type | Attribute | Description |
| uid | * | A JWT token to authenticate with the backend |
Return:
| * |
public asyncExampleProj(): * source
import {asyncExampleProj} from 'myr/src/actions/projectActions.js'Fetch a eample scenes from the backend
Return:
| * |
public asyncUserProj(uid: *): * source
import {asyncUserProj} from 'myr/src/actions/projectActions.js'Retrieved the list of user scenes
Params:
| Name | Type | Attribute | Description |
| uid | * | A JWT token to authenticate with the backend |
Return:
| * |
public asyncUserSettings(id: *): * source
import {asyncUserSettings} from 'myr/src/actions/userActions.js'Params:
| Name | Type | Attribute | Description |
| id | * |
Return:
| * |
public boolText(text: *): * source
import {boolText} from 'myr/src/myr/reference.js'Return a react elements contain a cue-card for Boolean data type
Params:
| Name | Type | Attribute | Description |
| text | * |
Return:
| * |
public changeCamMode(config: *): object source
import {changeCamMode} from 'myr/src/actions/sceneActions.js'Sends a signal to the reducer to change the mode of the camera
Params:
| Name | Type | Attribute | Description |
| config | * | New mode to change |
public changeFloorColor(color: string): object source
import {changeFloorColor} from 'myr/src/actions/sceneActions.js'Sends a signal to the reducer to change the sky color
Params:
| Name | Type | Attribute | Description |
| color | string | Color to be change to |
public changePerspective(): object source
import {changePerspective} from 'myr/src/actions/sceneActions.js'Sends a signal to the reducer to change the perspective
public changeSettings(payload: *): object source
import {changeSettings} from 'myr/src/actions/sceneActions.js'Sends a signal to the reducer to change the settings
Params:
| Name | Type | Attribute | Description |
| payload | * |
public changeSkyColor(color: string): object source
import {changeSkyColor} from 'myr/src/actions/sceneActions.js'Sends a signal to the reducer to change the sky color
Params:
| Name | Type | Attribute | Description |
| color | string | Color to be change to |
public changeView(): object source
import {changeView} from 'myr/src/actions/sceneActions.js'Sends a signal to the reducer to toggle to be view only(hide the editor) or not
public classes(state: *, action: *): * source
import classes from 'myr/src/reducers/collections.js'Collection Reducer
Params:
| Name | Type | Attribute | Description |
| state | * |
|
|
| action | * |
Return:
| * |
public course(state: *, action: *): * source
import course from 'myr/src/reducers/course.js'Course Reducer
Params:
| Name | Type | Attribute | Description |
| state | * |
|
|
| action | * |
Return:
| * |
public async createCollection(name: string, uid: *): boolean source
import {createCollection} from 'myr/src/actions/collectionActions.js'Creates a new collection
Params:
| Name | Type | Attribute | Description |
| name | string | The name of the collection to be created |
|
| uid | * | A JWT token to authenticate with the backend |
public dataText(text: *): * source
import {dataText} from 'myr/src/myr/reference.js'Return a react elements contain a cue-card for dynamic data type
Params:
| Name | Type | Attribute | Description |
| text | * |
Return:
| * |
public deleteCollection(collectionID: string, name: string, uid: *): * source
import {deleteCollection} from 'myr/src/actions/collectionActions.js'Sends a signal to the reducer to delete the specific collection of user
Return:
| * |
public deleteProj(uid: *, id: string, name: string): * source
import {deleteProj} from 'myr/src/actions/projectActions.js'Delete the specify user project
Return:
| * |
public editor(state: *, action: *): * source
import editor from 'myr/src/reducers/editor.js'Editor Reducer
Params:
| Name | Type | Attribute | Description |
| state | * |
|
|
| action | * |
Return:
| * |
public fetchCourse(courseId: string): * source
import {fetchCourse} from 'myr/src/actions/courseActions.js'Fetch specific course
Params:
| Name | Type | Attribute | Description |
| courseId | string | id of the course getting |
Return:
| * |
public fetchCourses(): * source
import {fetchCourses} from 'myr/src/actions/courseActions.js'Fetch all the courses available
Return:
| * |
public fetchLesson(json: *): * source
import {fetchLesson} from 'myr/src/actions/courseActions.js'Fetch the lesson that is supplied by the parameter.
Params:
| Name | Type | Attribute | Description |
| json | * | Lesson data |
Return:
| * |
public fetchReferenceExample(funcName: string): * source
import {fetchReferenceExample} from 'myr/src/actions/referenceExampleActions.js'Fetch specific example scene from backend. On success, load and render the example scene
Params:
| Name | Type | Attribute | Description |
| funcName | string | Name of the example scene to retrieve |
Return:
| * |
public fetchScene(id: string, uid: *): * source
import {fetchScene} from 'myr/src/actions/editorActions.js'This does an async fetch to backend to grab the scene, then dispatches the necessary functions to update the state.
Params:
| Name | Type | Attribute | Description |
| id | string | scene id |
|
| uid | * | A JWT token to authenticate with the backend |
Return:
| * |
public loadCourse(course: *): object source
import {loadCourse} from 'myr/src/actions/courseActions.js'Sends signal to the reducer to load the course retrieved
Params:
| Name | Type | Attribute | Description |
| course | * | Data of course retrieved |
public loadLesson(lesson: object): * source
import {loadLesson} from 'myr/src/actions/courseActions.js'Sends signal to the reducer to load a new lesson supplied by parameter
Params:
| Name | Type | Attribute | Description |
| lesson | object | Lesson data |
Return:
| * | reducer action obj with type: LOAD_LESSON and payload: lesson |
public loadReferenceExample(refEx: object): * source
import {loadReferenceExample} from 'myr/src/actions/referenceExampleActions.js'Sends a signal to the reducer to load the retrieved scene
Params:
| Name | Type | Attribute | Description |
| refEx | object | object of data of example scene |
Return:
| * | reducer action obj with type: LOAD_REF_EX with payload:refEx |
public loadScene(data: string): * source
import {loadScene} from 'myr/src/actions/sceneActions.js'This function load data of scene to the redux store
Params:
| Name | Type | Attribute | Description |
| data | string | the id of the loaded scene |
Return:
| * | a reducer action with type:LOAD_SCENE |
public loadSettings(payload: *): object source
import {loadSettings} from 'myr/src/actions/sceneActions.js'Sends a signal to the reducer to load the settings sends by the
Params:
| Name | Type | Attribute | Description |
| payload | * |
public login(user: obj): object source
import {login} from 'myr/src/actions/authActions.js'Sends a signal to the reducer to login with the given user
Params:
| Name | Type | Attribute | Description |
| user | obj | User data from the firebase auth obj |
public logout(): object source
import {logout} from 'myr/src/actions/authActions.js'Sends a signal to the reducer to logout the current user
public m(model: *): * source
import m from 'myr/src/components/structural/Models.js'Params:
| Name | Type | Attribute | Description |
| model | * |
|
Return:
| * |
public nameScene(name: string): * source
import {nameScene} from 'myr/src/actions/sceneActions.js'This function registers the scene's name with Redux
Params:
| Name | Type | Attribute | Description |
| name | string | the name is given by the user or when a scene is loaded |
Return:
| * | a reducer action with type:NAME_SCENE |
public nextLesson(currentIndex: number, next: object): * source
import {nextLesson} from 'myr/src/actions/courseActions.js'Increment the lesson index and load the next lesson. Frontend disables option if out of bounds
Return:
| * |
public numberText(text: *): * source
import {numberText} from 'myr/src/myr/reference.js'Return a react elements contain a cue-card for Number data type
Params:
| Name | Type | Attribute | Description |
| text | * |
Return:
| * |
public previousLesson(currentIndex: number, prev: object): * source
import {previousLesson} from 'myr/src/actions/courseActions.js'Decrement the lesson index and load the previous lesson. Frontend disables option if out of bounds
Return:
| * |
public project(state: *, action: *): * source
import project from 'myr/src/reducers/project.js'Project Reducers
Params:
| Name | Type | Attribute | Description |
| state | * |
|
|
| action | * |
Return:
| * |
public r(ref: *): * source
import r from 'myr/src/myr/reference.js'Params:
| Name | Type | Attribute | Description |
| ref | * |
|
Return:
| * |
public recover(): * source
import {recover} from 'myr/src/actions/editorActions.js'Sends a signal to the reducer to 'rewind' until last stable render
Return:
| * | reducer action obj with action type |
public referenceExample(state: *, action: *): * source
import referenceExample from 'myr/src/reducers/referenceExample.js'Reference Example reducer
Params:
| Name | Type | Attribute | Description |
| state | * |
|
|
| action | * |
Return:
| * |
public refresh(text: string, uid: *): * source
import {refresh} from 'myr/src/actions/editorActions.js'Sends a signal to the reducer to refresh with the given text
Params:
| Name | Type | Attribute | Description |
| text | string | Text from the Ace Editor component |
|
| uid | * | A JWT token to authenticate with the backend |
Return:
| * | reducer action obj with action type and text |
public refreshToken(token: object): object source
import {refreshToken} from 'myr/src/actions/authActions.js'Sends a signal to the reducer to refresh the token
Params:
| Name | Type | Attribute | Description |
| token | object |
public removeCollectionID(payload: string): object source
import {removeCollectionID} from 'myr/src/actions/sceneActions.js'Sends a signal to the reducer to add the scene to the collection
Params:
| Name | Type | Attribute | Description |
| payload | string | id of collection to remove scene to |
public render(text: string, uid: *): * source
import {render} from 'myr/src/actions/editorActions.js'Sends a signal to the reducer to render the scene
Params:
| Name | Type | Attribute | Description |
| text | string | Text from the Ace Editor component |
|
| uid | * | A JWT token to authenticate with the backend |
Return:
| * | reducer action obj with action type and text |
public resetFloorColor(): object source
import {resetFloorColor} from 'myr/src/actions/sceneActions.js'Sends a signal to the reducer to reset the floor color
public resetSettings(): object source
import {resetSettings} from 'myr/src/actions/sceneActions.js'Sends a signal to the reducer to reset the settings to default
public resetSkyColor(): object source
import {resetSkyColor} from 'myr/src/actions/sceneActions.js'Sends a signal to the reducer to reset the sky color
public router(): * source
import router from 'myr/src/routes.js'Create an routers that switch to correct react component for different endpoints
Return:
| * | BrowserRouter with all of available router (except about page) |
public async save(uid: *, scene: *, img: *, sceneID: *): * source
import {save} from 'myr/src/actions/projectActions.js'Saves a scene to MongoDB
Params:
| Name | Type | Attribute | Description |
| uid | * | The id of the logged in user |
|
| scene | * | JSON data of the scene to be saved |
|
| img | * | JPEG Image file of the Scene |
|
| sceneID | * | sceneId to be updated, if undefined, creates a new scene |
Return:
| * | The ID of the saved scene |
public scene(state: *, action: *): * source
import scene from 'myr/src/reducers/scene.js'Scene Reducers
Params:
| Name | Type | Attribute | Description |
| state | * |
|
|
| action | * |
Return:
| * |
public setCamera(x: number, y: number, z: number): object source
import {setCamera} from 'myr/src/actions/sceneActions.js'Sends a signal to the reducer to change the position of the camera
public setCurrentIndex(newIndex: number): object source
import {setCurrentIndex} from 'myr/src/actions/courseActions.js'Sends signal to the reducer to update the current index of the Course
Params:
| Name | Type | Attribute | Description |
| newIndex | number | New index to be set |
public setDesc(payload: string): object source
import {setDesc} from 'myr/src/actions/sceneActions.js'Sends a signal to the reducer to cahnge the description of the scene
Params:
| Name | Type | Attribute | Description |
| payload | string | description of the |
public setNameDesc(payload: *): object source
import {setNameDesc} from 'myr/src/actions/sceneActions.js'Sends a signal to the reducer to change both name and description
Params:
| Name | Type | Attribute | Description |
| payload | * |
public stringText(text: *): * source
import {stringText} from 'myr/src/myr/reference.js'Return a react elements contain a cue-card for String data type
Params:
| Name | Type | Attribute | Description |
| text | * |
Return:
| * |
public syncCollection(payload: object): object source
import {syncCollection} from 'myr/src/actions/collectionActions.js'Sends a signal to the reducer to load the retrieved collection
Params:
| Name | Type | Attribute | Description |
| payload | object | Data of retrieved collection |
public syncCollections(payload: object): object source
import {syncCollections} from 'myr/src/actions/collectionActions.js'Sends a signal to the reducer to sync the user collections
Params:
| Name | Type | Attribute | Description |
| payload | object | List of user collections |
public syncCourses(payload: *): * source
import {syncCourses} from 'myr/src/actions/courseActions.js'Sends a signal to the reducer to synchronize the courses
Params:
| Name | Type | Attribute | Description |
| payload | * | List of courses retrieved |
Return:
| * | reducer action object with type: SYNC_COURSE and payload |
public syncExampleProj(payload: *): * source
import {syncExampleProj} from 'myr/src/actions/projectActions.js'Sends signal to the reducer to sync the example project
Params:
| Name | Type | Attribute | Description |
| payload | * | List of the example project |
Return:
| * | reducer action obj with type: SYNC_EXAMP_PROJ with payload |
public syncUserProj(payload: *): * source
import {syncUserProj} from 'myr/src/actions/projectActions.js'Sends signal to the reducer to sync the user project
Params:
| Name | Type | Attribute | Description |
| payload | * | list of user projects |
Return:
| * | reducer action obj with type: SYNC_USER_PROJ wiht payload |
public syncUserSettings(settings: *): {"type": *, "settings": *} source
import {syncUserSettings} from 'myr/src/actions/userActions.js'Params:
| Name | Type | Attribute | Description |
| settings | * |
Return:
| {"type": *, "settings": *} |
public t(tex: *): * source
import t from 'myr/src/components/structural/Textures.js'Params:
| Name | Type | Attribute | Description |
| tex | * |
|
Return:
| * |
public toggleCastShadow(): object source
import {toggleCastShadow} from 'myr/src/actions/sceneActions.js'Sends a signal to the reducer to toggle for light to cast shadow
public toggleCoordSky(): object source
import {toggleCoordSky} from 'myr/src/actions/sceneActions.js'Sends a signal to the reducer to toggle the coordinate floor
public toggleCursor(): object source
import {toggleCursor} from 'myr/src/actions/sceneActions.js'Sends a signal to the reducer to toggle for cursor to display cusor on screen
public toggleDefaultLight(): object source
import {toggleDefaultLight} from 'myr/src/actions/sceneActions.js'Sends a signal to the reducer to toggle the default light
public toggleFloor(): object source
import {toggleFloor} from 'myr/src/actions/sceneActions.js'Sends a signal to the reducer to toggle the floor
public toggleLightIndicator(): object source
import {toggleLightIndicator} from 'myr/src/actions/sceneActions.js'Sends a signal to the reducer to toggle for light to show light indicator
public updateFontSize(fontSize: *): {"type": *, "fontSize": *} source
import {updateFontSize} from 'myr/src/actions/userActions.js'Params:
| Name | Type | Attribute | Description |
| fontSize | * |
Return:
| {"type": *, "fontSize": *} |
public updateMoveSpeed(speed: number): {"type": *, "speed": *} source
import {updateMoveSpeed} from 'myr/src/actions/sceneActions.js'Sends a signal to the reducer to change the speed of movement
Params:
| Name | Type | Attribute | Description |
| speed | number |
Return:
| {"type": *, "speed": *} |
public updateSavedText(savedText: *): * source
import {updateSavedText} from 'myr/src/actions/editorActions.js'Sends a signal to the reducer to update the savedText when user try to save or open scene/course
Params:
| Name | Type | Attribute | Description |
| savedText | * |
Return:
| * | reducer action obj with action type |
public updateUserSettings(id: *, settings: *): * source
import {updateUserSettings} from 'myr/src/actions/userActions.js'Params:
| Name | Type | Attribute | Description |
| id | * | ||
| settings | * |
Return:
| * |
public user(state: *, action: *): * source
import user from 'myr/src/reducers/user.js'User Reducers
Params:
| Name | Type | Attribute | Description |
| state | * |
|
|
| action | * |
Return:
| * |