This commit is contained in:
David Rowe 2014-07-28 20:00:23 -07:00
parent f46c064e88
commit 63d7ff0bde

View file

@ -59,13 +59,13 @@ var mode = 0;
if (typeof String.prototype.fileName !== "function") { if (typeof String.prototype.fileName !== "function") {
String.prototype.fileName = function (str) { String.prototype.fileName = function () {
return this.replace(/^(.*[\/\\])*/, ""); return this.replace(/^(.*[\/\\])*/, "");
}; };
} }
if (typeof String.prototype.path !== "function") { if (typeof String.prototype.path !== "function") {
String.prototype.path = function (str) { String.prototype.path = function () {
return this.replace(/[\\\/][^\\\/]*$/, ""); return this.replace(/[\\\/][^\\\/]*$/, "");
}; };
} }
@ -185,8 +185,7 @@ var httpMultiPart = (function () {
// - name, buffer // - name, buffer
var buffer, var buffer,
stringBuffer, stringBuffer,
string, string;
length;
if (object.name === undefined) { if (object.name === undefined) {
@ -267,7 +266,6 @@ var httpMultiPart = (function () {
return that; return that;
}()); }());
var modelUploader = (function () { var modelUploader = (function () {
var that = {}, var that = {},
urlBase = "http://public.highfidelity.io/meshes/", urlBase = "http://public.highfidelity.io/meshes/",
@ -283,15 +281,14 @@ var modelUploader = (function () {
ANIMATION_URL_FIELD = "animationurl", ANIMATION_URL_FIELD = "animationurl",
PITCH_FIELD = "pitch", PITCH_FIELD = "pitch",
YAW_FIELD = "yaw", YAW_FIELD = "yaw",
ROLL_FIELD = "roll", ROLL_FIELD = "roll";
fbxDataView;
function error(message) { function error(message) {
Window.alert(message); Window.alert(message);
print(message); print(message);
} }
function readFile(filename, buffer, length) { function readFile(filename) {
var url = "file:///" + filename, var url = "file:///" + filename,
req = new XMLHttpRequest(); req = new XMLHttpRequest();
@ -305,7 +302,7 @@ var modelUploader = (function () {
return { return {
filename: filename.fileName(), filename: filename.fileName(),
buffer: req.response, buffer: req.response
}; };
} }
@ -561,7 +558,6 @@ var modelUploader = (function () {
} }
function createHttpMessage() { function createHttpMessage() {
var i;
print("Preparing to send model"); print("Preparing to send model");