-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of https://github.com/engaging-computing/myr into doc
- Loading branch information
Showing
24 changed files
with
1,075 additions
and
762 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#The client ID should NOT start with http or https! This will cause authentication failure! | ||
REACT_APP_GOOGLE_CLIENTID=<Required for authenticting with the backend, get this from a team member> | ||
REACT_APP_GOOGLE_CLIENTID=<Required for authenticting with the backend, get this from a team member> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ | |
"curly": "warn", | ||
"no-lonely-if": "warn", | ||
"no-console": [ | ||
"error", | ||
"warn", | ||
{ | ||
"allow": [ | ||
"warn", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
10.13 | ||
10.13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,10 +9,17 @@ The Engaging Computing Group develops new technologies to enable learners—yout | |
## Status | ||
[![CircleCI](https://circleci.com/gh/engaging-computing/MYR.svg?style=shield)](https://circleci.com/gh/engaging-computing/MYR) | ||
|
||
## Change Log - 2.3.1 -> 2.4.0 | ||
- Added ability to import custom GLTF models into a scene | ||
- Added a keyboard shortcut information menu | ||
- Added a slider for setting the movement speed in a scene | ||
## Change Log - 2.4.0 -> 3.0.0 | ||
- Removed undocumented aliases for `box` and `prisim` | ||
- All scenes using these aliases have been automatically changed to reflect the new API | ||
- Changed the behavior of `getRandomColor` to only return a random color | ||
- Added `setRandomColor` to behave like `getRandomColor` did previously | ||
- A migration has updated scenes to be properly using these functions | ||
- If your scene broke as a result of this update, please let us know [[email protected]](mailto:[email protected]) | ||
- Misc. Package dependency updates | ||
- Moved Model and Asset reference to their own page | ||
- Removed broken links to non-existent example pages | ||
|
||
|
||
|
||
## Acknowledgments | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import React from "react"; | ||
import ModelTab from "./ModelReferenceTab"; | ||
import TextureTab from "./TextureReferenceTab"; | ||
|
||
import { | ||
Tabs, | ||
Tab, | ||
Icon, | ||
Hidden, | ||
} from "@material-ui/core"; | ||
|
||
import "../../css/ModelReferencePage.css"; | ||
|
||
export default class AssetReference extends React.Component { | ||
|
||
constructor(props) { | ||
super(props); | ||
this.state = { | ||
value: "a", | ||
}; | ||
} | ||
|
||
handleChange = (event, value) => { | ||
this.setState({ value }); | ||
}; | ||
|
||
componentDidMount() { | ||
const qsa = new URLSearchParams(window.location.search); | ||
if (qsa.has("tab") && qsa.get("tab").toLowerCase() === "textures") { | ||
this.setState({ value: "b" }); | ||
} | ||
} | ||
|
||
render() { | ||
document.title = "Asset | MYR"; | ||
return ( | ||
<div id="modelReference-page"> | ||
<Tabs | ||
id="modelReference-tabs" | ||
variant="fullWidth" | ||
value={this.state.value} | ||
onChange={this.handleChange} > | ||
<Tab | ||
icon={<Icon className="material-icons model">model</Icon>} | ||
label={ | ||
<Hidden xsDown> | ||
<div>MODEL</div> | ||
</Hidden> | ||
} | ||
value='a' /> | ||
<Tab | ||
icon={<Icon className="material-icons texture">texture</Icon>} | ||
label={ | ||
<Hidden xsDown> | ||
<div>TEXTURE</div> | ||
</Hidden> | ||
} | ||
value='b' /> | ||
</Tabs> | ||
{this.state.value === "a" && | ||
<div style={{ marginTop: 0 }}> | ||
<ModelTab /> | ||
</div>} | ||
{this.state.value === "b" && | ||
<div style={{ marginTop: 0 }}> | ||
<TextureTab /> | ||
</div>} | ||
</div> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import React from "react"; | ||
import model from "../../myr/modelReference"; | ||
|
||
import ModelPack from "../structural/Models.js"; | ||
|
||
import { | ||
Table, | ||
TableBody, | ||
TableHead, | ||
TableRow, | ||
TableCell | ||
} from "@material-ui/core"; | ||
|
||
import "../../css/ModelReferencePage.css"; | ||
|
||
export default class ModelReference extends React.Component { | ||
imageHelper = (model) => { | ||
if(model) { | ||
let models = ModelPack().ModelPack; | ||
|
||
if(models.has(model)) { | ||
let gltf = models.get(model); | ||
return gltf.image; | ||
} | ||
return null; | ||
} | ||
return null; | ||
}; | ||
|
||
render() { | ||
return ( | ||
<Table > | ||
<TableHead > | ||
<TableRow> | ||
<TableCell>Name</TableCell> | ||
<TableCell></TableCell> | ||
<TableCell className='model'>Image</TableCell> | ||
</TableRow> | ||
</TableHead> | ||
<TableBody> {model.map((row, index) => { | ||
return ( | ||
<TableRow key={index}> | ||
<TableCell >{row.name}</TableCell> | ||
<TableCell ></TableCell> | ||
<TableCell > | ||
<img id="image" src={this.imageHelper(row.model)} alt="alt" height = "90" width = "90"></img> | ||
</TableCell> | ||
</TableRow>); | ||
})} | ||
</TableBody> | ||
</Table> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import React from "react"; | ||
import texture from "../../myr/textureReference"; | ||
|
||
import TexturePack from "../structural/Textures.js"; | ||
|
||
import { | ||
Table, | ||
TableBody, | ||
TableHead, | ||
TableRow, | ||
TableCell, | ||
} from "@material-ui/core"; | ||
|
||
import "../../css/TextureReferencePage.css"; | ||
|
||
export default class TextureReference extends React.Component { | ||
imageHelper = (image) => { | ||
if(image) { | ||
let textures = TexturePack(); | ||
let textureTitle = [...textures.TexturePack.map(obj => obj.title)]; | ||
let textureURL = [...textures.TexturePack.map(obj => obj.url)]; | ||
|
||
let texture = textureURL[textureTitle.indexOf(image)]; | ||
|
||
return ( | ||
texture | ||
); | ||
} else { | ||
return null; | ||
} | ||
}; | ||
|
||
render() { | ||
return ( | ||
<Table > | ||
<TableHead > | ||
<TableRow> | ||
<TableCell>Name</TableCell> | ||
<TableCell></TableCell> | ||
<TableCell className='texture'>Image</TableCell> | ||
<TableCell className='creator'>Image Creator</TableCell> | ||
</TableRow> | ||
</TableHead> | ||
<TableBody> {texture.map((row, index) => { | ||
return ( | ||
<TableRow key={index}> | ||
<TableCell >{row.name}</TableCell> | ||
<TableCell ></TableCell> | ||
<TableCell > | ||
<img id="image" src={this.imageHelper(row.image)} alt="alt" height = "90" width = "90"></img> | ||
</TableCell> | ||
<TableCell >{row.creator}</TableCell> | ||
</TableRow>); | ||
})} | ||
</TableBody> | ||
</Table> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.