try again on string startswith

This commit is contained in:
Seth Alves 2015-09-30 14:16:07 -07:00
parent c27766facb
commit b417abc3de
3 changed files with 2 additions and 8 deletions

View file

@ -104,7 +104,7 @@ function entityIsGrabbedByOther(entityID) {
if (tag == getTag()) {
continue;
}
if (tag.startsWith("grab-")) {
if (tag.slice(0, 5) == "grab-") {
return true;
}
}

View file

@ -27,7 +27,7 @@ function entityIsGrabbedByOther(entityID) {
if (tag == getTag()) {
continue;
}
if (tag.startsWith("grab-")) {
if (tag.slice(0, 5) == "grab-") {
return true;
}
}

View file

@ -179,9 +179,3 @@ pointInExtents = function(point, minPoint, maxPoint) {
(point.y >= minPoint.y && point.y <= maxPoint.y) &&
(point.z >= minPoint.z && point.z <= maxPoint.z);
}
if (typeof String.prototype.startsWith != 'function') {
String.prototype.startsWith = function (str){
return this.slice(0, str.length) == str;
};
}