mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 22:36:39 +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 ZERO_VEC3 = {x: 0, y: 0, z: 0};
|
||||||
var IDENTITY_QUAT = {x: 0, y: 0, z: 0, w: 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() {
|
function getTag() {
|
||||||
return "grab-" + MyAvatar.sessionUUID;
|
return "grab-" + MyAvatar.sessionUUID;
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,3 +179,9 @@ pointInExtents = function(point, minPoint, maxPoint) {
|
||||||
(point.y >= minPoint.y && point.y <= maxPoint.y) &&
|
(point.y >= minPoint.y && point.y <= maxPoint.y) &&
|
||||||
(point.z >= minPoint.z && point.z <= maxPoint.z);
|
(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