Skip to content

Commit

Permalink
Merge pull request #494 from engaging-computing/dev
Browse files Browse the repository at this point in the history
Release 2.3.1
  • Loading branch information
kdvalin authored Jun 9, 2021
2 parents 684ffa2 + cc1bb21 commit 82a7b0c
Show file tree
Hide file tree
Showing 8 changed files with 218 additions and 158 deletions.
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,11 @@ 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.2.0 -> 2.3.0
- Adds Minecraft style flying controls
- Removes flying setting toggle
- Updates default scene to show helper grid by default
- MYR provided textures are now case insensitive
- Textures can be tiled
- Fixes black flickering bug when entering VR mode on mobile
- Spelling fixes
- Updated AFrame to use v1.x.y

## Change Log - 2.3.0 -> 2.3.1
- Updated VR/AR buttons to be spaced out
- Fixed bug where colorshift would always choose white for it's initial color
- Updated autocompelete to put cursor in between parenthesis instead of after
- Fixed a bug where a pushable entity would not be able to be pushed (`makePushable`)


## Acknowledgments
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "myr",
"version": "2.3.0",
"version": "2.3.1",
"private": false,
"engines": {
"node": "12.18.2"
Expand Down
9 changes: 8 additions & 1 deletion src/components/editor/customCompleter.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,14 @@ export const customCompleter = {
caption: word,
value: word,
meta: "MYR",
score: 2
score: 2,
completer:{
insertMatch: function(editor,data){
editor.completer.insertMatch({value:data.value});
let pos = editor.selection.getCursor();
editor.gotoLine(pos.row+1,pos.column-1);
}
}
};
}));

Expand Down
2 changes: 1 addition & 1 deletion src/components/structural/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class View extends Component {
if (ent.tube) {
return <a-tube path={ent.path} radius={ent.radius} material={ent.material} shadow={shadow} shadowcustomsetting></a-tube>;
}
return <a-entity key={ent.id} {...flattened} shadow={shadow} shadowcustomsetting ></a-entity>;
return <a-entity class="raycastable" key={ent.id} {...flattened} shadow={shadow} shadowcustomsetting ></a-entity>;
}
}
//return elements that contains necessary configuration for light indicator based on light's type and properties
Expand Down
17 changes: 13 additions & 4 deletions src/css/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,20 @@ div#reference-drawer>div {
margin-right: 10px;
}

/************************************
********THIS IS THE VR BUTTON********
************************************/
/* Overwrites default A-Frame behavior for embedded
* buttons to behave as if scene was located within
* an iframe */
.a-enter-vr {
position: "relative";
position: absolute;
bottom:20px !important;
right:20px !important;
z-index: 1 !important;
}

.a-enter-ar {
position: absolute;
bottom:20px !important;
right:80px !important;
z-index: 1 !important;
}

Expand Down
48 changes: 22 additions & 26 deletions src/myr/Myr.js
Original file line number Diff line number Diff line change
Expand Up @@ -1775,23 +1775,21 @@ class Myr {
//if the element is light
if(String(el.id).includes("lgt")){
let split = el.light.state.split(/\s|;/).filter(Boolean);
let colorIndex = split.indexOf("color:");
let baseCol = split[colorIndex+1];
let colorIndex = split.indexOf("color:")+1;
let baseCol = split[colorIndex];
if(this.colourNameToHex(baseCol)!==false){
baseCol = this.colourNameToHex(baseCol);
}
if(this.colourNameToHex(color) !== false){
color = this.colourNameToHex(color);
}
let anim = `
property: light.color;
let anim = `property: light.color;
from: ${baseCol};
to: ${color};
dur: ${this.cursor.duration};
dir: alternate;
loop: ${Boolean(this.cursor.loop)};
type: color;
`;
type: color;`;
el.animation__color = anim;
return outerElId;
}
Expand All @@ -1801,31 +1799,29 @@ class Myr {
let innerEl = el.els[i];
//innerEl.material.split(/\s|;/) returns an array of strings separated by " " and ";",
//color is always its first attribute (after "color: ")
let anim = `
property: components.material.material.color;
from: ${(innerEl.material.split(/\s|;/))[1]};
to: ${color};
dur: ${this.cursor.duration};
dir: alternate;
loop: ${Boolean(this.cursor.loop)};
isRawProperty: true;
type: color;
`;
let anim = `property: components.material.material.color;
from: ${(innerEl.material.split(/\s|;/))[1]};
to: ${color};
dur: ${this.cursor.duration};
dir: alternate;
loop: ${Boolean(this.cursor.loop)};
isRawProperty: true;
type: color;`;
innerEl.animation__color = anim;

}
return outerElId;
}
let anim = `
property: components.material.material.color;
from: ${(el.material.split(/\s|;/))[2]};
to: ${color};
dur: ${this.cursor.duration};
dir: alternate;
loop: ${Boolean(this.cursor.loop)};
isRawProperty: true;
type: color;
`;

const mat = el.material.split(/\s|;/);
let anim = `property: components.material.material.color;
from: ${mat[mat.indexOf("color:")+1]};
to: ${color};
dur: ${this.cursor.duration};
dir: alternate;
loop: ${Boolean(this.cursor.loop)};
isRawProperty: true;
type: color;`;
el.animation__color = anim;
return outerElId;
}
Expand Down
Loading

0 comments on commit 82a7b0c

Please sign in to comment.