mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-16 21:47:09 +02:00
move string startswith to utils.js
This commit is contained in:
parent
f746a970de
commit
c27766facb
2 changed files with 6 additions and 8 deletions
|
@ -14,14 +14,6 @@ var MAX_SOLID_ANGLE = 0.01; // objects that appear smaller than this can't be gr
|
|||
var ZERO_VEC3 = {x: 0, y: 0, z: 0};
|
||||
var IDENTITY_QUAT = {x: 0, y: 0, z: 0, w: 0};
|
||||
|
||||
|
||||
if (typeof String.prototype.startsWith != 'function') {
|
||||
// see below for better implementation!
|
||||
String.prototype.startsWith = function (str){
|
||||
return this.indexOf(str) === 0;
|
||||
};
|
||||
}
|
||||
|
||||
function getTag() {
|
||||
return "grab-" + MyAvatar.sessionUUID;
|
||||
}
|
||||
|
|
|
@ -179,3 +179,9 @@ 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;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue