Skip to content

Commit 82a7b0c

Browse files
authored
Merge pull request #494 from engaging-computing/dev
Release 2.3.1
2 parents 684ffa2 + cc1bb21 commit 82a7b0c

8 files changed

Lines changed: 218 additions & 158 deletions

File tree

README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,11 @@ The Engaging Computing Group develops new technologies to enable learners—yout
99
## Status
1010
[![CircleCI](https://circleci.com/gh/engaging-computing/MYR.svg?style=shield)](https://circleci.com/gh/engaging-computing/MYR)
1111

12-
## Change Log - 2.2.0 -> 2.3.0
13-
- Adds Minecraft style flying controls
14-
- Removes flying setting toggle
15-
- Updates default scene to show helper grid by default
16-
- MYR provided textures are now case insensitive
17-
- Textures can be tiled
18-
- Fixes black flickering bug when entering VR mode on mobile
19-
- Spelling fixes
20-
- Updated AFrame to use v1.x.y
21-
12+
## Change Log - 2.3.0 -> 2.3.1
13+
- Updated VR/AR buttons to be spaced out
14+
- Fixed bug where colorshift would always choose white for it's initial color
15+
- Updated autocompelete to put cursor in between parenthesis instead of after
16+
- Fixed a bug where a pushable entity would not be able to be pushed (`makePushable`)
2217

2318

2419
## Acknowledgments

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "myr",
3-
"version": "2.3.0",
3+
"version": "2.3.1",
44
"private": false,
55
"engines": {
66
"node": "12.18.2"

src/components/editor/customCompleter.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,14 @@ export const customCompleter = {
213213
caption: word,
214214
value: word,
215215
meta: "MYR",
216-
score: 2
216+
score: 2,
217+
completer:{
218+
insertMatch: function(editor,data){
219+
editor.completer.insertMatch({value:data.value});
220+
let pos = editor.selection.getCursor();
221+
editor.gotoLine(pos.row+1,pos.column-1);
222+
}
223+
}
217224
};
218225
}));
219226

src/components/structural/View.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class View extends Component {
139139
if (ent.tube) {
140140
return <a-tube path={ent.path} radius={ent.radius} material={ent.material} shadow={shadow} shadowcustomsetting></a-tube>;
141141
}
142-
return <a-entity key={ent.id} {...flattened} shadow={shadow} shadowcustomsetting ></a-entity>;
142+
return <a-entity class="raycastable" key={ent.id} {...flattened} shadow={shadow} shadowcustomsetting ></a-entity>;
143143
}
144144
}
145145
//return elements that contains necessary configuration for light indicator based on light's type and properties

src/css/App.css

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,11 +320,20 @@ div#reference-drawer>div {
320320
margin-right: 10px;
321321
}
322322

323-
/************************************
324-
********THIS IS THE VR BUTTON********
325-
************************************/
323+
/* Overwrites default A-Frame behavior for embedded
324+
* buttons to behave as if scene was located within
325+
* an iframe */
326326
.a-enter-vr {
327-
position: "relative";
327+
position: absolute;
328+
bottom:20px !important;
329+
right:20px !important;
330+
z-index: 1 !important;
331+
}
332+
333+
.a-enter-ar {
334+
position: absolute;
335+
bottom:20px !important;
336+
right:80px !important;
328337
z-index: 1 !important;
329338
}
330339

src/myr/Myr.js

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,23 +1775,21 @@ class Myr {
17751775
//if the element is light
17761776
if(String(el.id).includes("lgt")){
17771777
let split = el.light.state.split(/\s|;/).filter(Boolean);
1778-
let colorIndex = split.indexOf("color:");
1779-
let baseCol = split[colorIndex+1];
1778+
let colorIndex = split.indexOf("color:")+1;
1779+
let baseCol = split[colorIndex];
17801780
if(this.colourNameToHex(baseCol)!==false){
17811781
baseCol = this.colourNameToHex(baseCol);
17821782
}
17831783
if(this.colourNameToHex(color) !== false){
17841784
color = this.colourNameToHex(color);
17851785
}
1786-
let anim = `
1787-
property: light.color;
1786+
let anim = `property: light.color;
17881787
from: ${baseCol};
17891788
to: ${color};
17901789
dur: ${this.cursor.duration};
17911790
dir: alternate;
17921791
loop: ${Boolean(this.cursor.loop)};
1793-
type: color;
1794-
`;
1792+
type: color;`;
17951793
el.animation__color = anim;
17961794
return outerElId;
17971795
}
@@ -1801,31 +1799,29 @@ class Myr {
18011799
let innerEl = el.els[i];
18021800
//innerEl.material.split(/\s|;/) returns an array of strings separated by " " and ";",
18031801
//color is always its first attribute (after "color: ")
1804-
let anim = `
1805-
property: components.material.material.color;
1806-
from: ${(innerEl.material.split(/\s|;/))[1]};
1807-
to: ${color};
1808-
dur: ${this.cursor.duration};
1809-
dir: alternate;
1810-
loop: ${Boolean(this.cursor.loop)};
1811-
isRawProperty: true;
1812-
type: color;
1813-
`;
1802+
let anim = `property: components.material.material.color;
1803+
from: ${(innerEl.material.split(/\s|;/))[1]};
1804+
to: ${color};
1805+
dur: ${this.cursor.duration};
1806+
dir: alternate;
1807+
loop: ${Boolean(this.cursor.loop)};
1808+
isRawProperty: true;
1809+
type: color;`;
18141810
innerEl.animation__color = anim;
18151811

18161812
}
18171813
return outerElId;
18181814
}
1819-
let anim = `
1820-
property: components.material.material.color;
1821-
from: ${(el.material.split(/\s|;/))[2]};
1822-
to: ${color};
1823-
dur: ${this.cursor.duration};
1824-
dir: alternate;
1825-
loop: ${Boolean(this.cursor.loop)};
1826-
isRawProperty: true;
1827-
type: color;
1828-
`;
1815+
1816+
const mat = el.material.split(/\s|;/);
1817+
let anim = `property: components.material.material.color;
1818+
from: ${mat[mat.indexOf("color:")+1]};
1819+
to: ${color};
1820+
dur: ${this.cursor.duration};
1821+
dir: alternate;
1822+
loop: ${Boolean(this.cursor.loop)};
1823+
isRawProperty: true;
1824+
type: color;`;
18291825
el.animation__color = anim;
18301826
return outerElId;
18311827
}

0 commit comments

Comments
 (0)