Browse files

better type annotations for Location and a few other files.

  • Loading branch information...
1 parent 49ba2ae commit 82fb4d79c13a21a9f0b81f21ead1801664703332 @danielrh danielrh committed May 14, 2012
2 externals/protojs
@@ -1 +1 @@
-Subproject commit fcd81bf093e8eb7dda1efbb61c966db5c6fc78b7
+Subproject commit 04311aac2e9ed821f7ee56b524167487a0682a41
View
10 katajs/core/Channel.js
@@ -43,12 +43,12 @@ Kata.require([
/**
* Registers a function to be called when a message is sent.
- * @param {function(Kata.Channel, (string|object))} listener A callback func
+ * @param {function(Kata.Channel, (string|Object))} listener A callback func
*/
Kata.Channel.prototype.registerListener = function (listener) {
if (!listener.call) {
- if (network_debug) console.log("Listener call type is ",typeof(listener));
- if (network_debug) console.log("Listener constructor type is ",listener.constructor);
+ if (network_debug) Kata.log("Listener call type is "+typeof(listener));
+ if (network_debug) Kata.log("Listener constructor type is "+listener.constructor);
throw "Error in registerListener: not a function";
}
if (!this.mListener) {
@@ -63,7 +63,7 @@ Kata.require([
/**
* Registers a function to be called when a message is sent.
- * @param {function(Kata.Channel, (string|object))} listener A callback func
+ * @param {function(Kata.Channel, (string|Object))} listener A callback func
*/
Kata.Channel.prototype.unregisterListener = function (listener) {
if (listener==this.mListener) {
@@ -86,7 +86,7 @@ Kata.require([
/**
* Protected function to be called by subclasses when a message has been
* received and is to be delivered to listeners.
- * @param {string|object} data Serializable data to pass to the listeners.
+ * @param {string|Object} data Serializable data to pass to the listeners.
* @protected
*/
Kata.Channel.prototype.callListeners = function (data) {
View
30 katajs/core/Core.js
@@ -30,6 +30,9 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+/**
+ * @suppress {duplicate}
+ */
var Kata;
var network_debug = false;
@@ -50,7 +53,11 @@ if (typeof(console) == "undefined") {
}
if (typeof(JSON) == "undefined") {JSON = {};}
-Kata.urlGetVars = new (function (sSearch) {
+Kata.urlGetVars = new (
+/**
+ * @constructor
+ */
+ function (sSearch) {
'use strict';
var rNull = /^\s*$/, rBool = /^(true|false)$/i;
function buildValue(sValue) {
@@ -352,7 +359,10 @@ if (!Kata.queryString) {
};
}
};
-
+/**
+ * @param {Object} msg
+ * @param {string=} level
+ */
Kata.stringify = function(msg, level) {
'use strict';
if (!level) {
@@ -374,15 +384,14 @@ if (!Kata.queryString) {
if (console.log && console.log.apply && debug_console) {
/** Logs msg to the console, in addition to some json object.
- * @param {...(object|string)} var_args Some optional JSON data to log.
+ * @param {...(Object|string)} var_args Some optional JSON data to log.
*/
Kata.log = function(var_args) {
'use strict';
console.log.apply(console, arguments);
};
} else if (typeof(document)=="undefined" || typeof(window)=="undefined") {
- /** Logs msg to the parent web worker, in addition to some json object.
- * @param {...(object|string)} var_args Logs some optional JSON data.
+ /* Logs msg to the parent web worker, in addition to some json object.
*/
Kata.log = console.log = function(var_args) {
'use strict';
@@ -399,11 +408,10 @@ if (!Kata.queryString) {
msg : __magic_debug_msg_string,
debug : "log",
contents : args
- });
+ },"*");
};
} else if (debug_console) {
- /** Logs msg to the console, in addition to some json object.
- * @param {...(object|string)} var_args Logs some optional JSON data.
+ /* Logs msg to the console, in addition to some json object.
*/
Kata.log = console.log = function(var_args) {
'use strict';
@@ -476,7 +484,7 @@ if (!Kata.queryString) {
msg : __magic_debug_msg_string,
debug : "error",
contents : error
- });
+ },"*");
throw error;
}
// Main thread
@@ -493,7 +501,7 @@ if (!Kata.queryString) {
*
* @param {string} note If supplied, this note will be reported
* with the rest of the information.
- * @param {string} type If supplied, is used as a prefix to .
+ * @param {string=} type If supplied, is used as a prefix to .
*/
Kata.warn = function(note, type) {
'use strict';
@@ -508,7 +516,7 @@ if (!Kata.queryString) {
debug : "warn",
type : type,
contents : note
- });
+ },"*");
console.trace && console.trace();
return;
}
View
8 katajs/core/Deque.js
@@ -55,7 +55,7 @@
}
var destIndex=this.mHead+this.mSize;
if (destIndex>=this.mArray.length) {
- this.destIndex-=this.mArray.length;
+ destIndex-=this.mArray.length;
}
this.mSize++;
this.mArray[destIndex]=e;
@@ -78,15 +78,15 @@
Kata.Deque.prototype.index=function(y) {
var destIndex=this.mHead+y;
if (destIndex>=this.mArray.length) {
- this.destIndex-=this.mArray.length;
+ destIndex-=this.mArray.length;
}
return this.mArray[destIndex];
};
Kata.Deque.prototype.back=function() {
var destIndex=this.mHead+this.mSize-1;
if (destIndex>=this.mArray.length) {
- this.destIndex-=this.mArray.length;
+ destIndex-=this.mArray.length;
}
return this.mArray[destIndex];
};
@@ -95,7 +95,7 @@
if (this.mSize==0) return undefined;
var destIndex=this.mHead+this.mSize-1;
if (destIndex>=this.mArray.length) {
- this.destIndex-=this.mArray.length;
+ destIndex-=this.mArray.length;
}
var retval=this.mArray[destIndex];
this.mArray[destIndex]=null;
View
3 katajs/core/FilterChannel.js
@@ -39,8 +39,9 @@ Kata.require([
* listeners.
*
* @constructor
+ * @extends {Kata.Channel}
* @param {Kata.Channel} channel the channel which feeds this one
- * @param {function(Kata.Channel, (string|object))} filter the filter to apply. Takes the same
+ * @param {function(Kata.Channel, (string|Object))} filter the filter to apply. Takes the same
* form as a listener but returns a boolean indicating whether to
* deliver to listeners
*/
View
8 katajs/core/GenericWorker.js
@@ -42,12 +42,12 @@ self.onmessage = function (ev) {
// This may not be necessary if importscripts uses relative paths.
var scriptroot = data[0];
var queryString = data[5] || "";
- try {
- //importScripts(scriptroot+"katajs.compiled.js"+queryString);
+ try {//FIXME: should we do this
+ importScripts(scriptroot+"katajs.compiled.js"+queryString);
} catch (e) {
try {
- console.log("Exception loading katajs.compiled.js", e);
- } catch (e) {}
+ Kata.log("Exception loading katajs.compiled.js", e);
+ } catch (ex) {}
}
if (typeof(Kata)==="undefined") {
try {
View
172 katajs/core/Location.js
@@ -1,4 +1,4 @@
-/* Location.js Functions to bring together space and time to reveal the logical 3space position of an object
+/* Location.js Functions to bring together space and time to reveal the logical 3space position of an objectonte
* o3dgfx.js
*
* Copyright (c) 2010, Daniel Reiter Horn
@@ -31,19 +31,36 @@
*/
"use strict";
-Kata.require([], function() {
+/**
+ * @typedef{!Array|!ArrayBuffer|!TypedArray}
+ */
+var Kata_Vector;
+/**
+ * @typedef{{scale:!Kata_Vector,scaleTime:number,pos:!Kata_Vector,posTime:number,orient:!Kata_Vector,orientTime:number,vel:!Kata_Vector,rotaxis:!Kata_Vector,rotvel:number}}
+ */
+var Kata_Location;
+/**
+ * @typedef{{scale:!Kata_Vector,time:number,pos:!Kata_Vector,orient:!Kata_Vector,vel:!Kata_Vector,rotaxis:!Kata_Vector,rotvel:number}}
+ */
+var Kata_LocationMsg;
+
+/**
+ * @typedef {number}
+ */
+var Kata_Date;
+Kata.require([], function() {
/**
* Returns the identity location updated at the current time
- * @return {!Location} an identity object with time set to newDate
+ * @return {Kata_Location} an identity object with time set to newDate
*/
Kata.LocationIdentityNow=function() {
- return Kata.LocationIdentity(new Date());
+ return Kata.LocationIdentity(Date.now());
};
/**
* Returns the identity location updated passed-in time
- * @param {!Date} time the time which should be filled in to the location object
- * @return {!Location} an identity object with time set to time
+ * @param {Kata_Date} time the time which should be filled in to the location object
+ * @return {Kata_Location} an identity object with time set to time
*/
Kata.LocationIdentity=function(time){
return {
@@ -60,19 +77,19 @@ Kata.LocationIdentity=function(time){
};
/**
* Computes the number of seconds between 2 times as a floating point number
- * @param {!Date} newTime the time farthest in the future to subtract
- * @param {!Date} oldTime the time farthest in the past to take the difference of
+ * @param {Kata_Date} newTime the time farthest in the future to subtract
+ * @param {Kata_Date} oldTime the time farthest in the past to take the difference of
* @return {number} number of seconds between the two times
*/
Kata.deltaTime=function(newTime,oldTime) {
return (newTime/*.getTime()*/-oldTime/*.getTime()*/)*.001;
}
/**
* Takes a coordinate, a velocity and a time and extrapolates linearly from the starting location
- * @param {Array} a the starting vector at deltaTime=0
- * @param {Array} adel the velocity on the 3vec a
+ * @param {Kata_Vector} a the starting vector at deltaTime=0
+ * @param {Kata_Vector} adel the velocity on the 3vec a
* @param {number} deltaTime the number of seconds that have elapsed since the coordinate was correct
- * @return {Array} the extrapolated vector
+ * @return {Kata_Vector} the extrapolated vector
*/
Kata._helperLocationExtrapolate3vec=function(a,adel,deltaTime){
return [a[0]+adel[0]*deltaTime,
@@ -81,9 +98,9 @@ Kata._helperLocationExtrapolate3vec=function(a,adel,deltaTime){
};
/**
* Takes an axis and an angle and makes a quaternion out of them with [x,y,z,w] as the coordinate layout
- * @param {Array} aaxis axis
- * @param {Array} aangle the angle in radians
- * @return {Array} the quaternion
+ * @param {Kata_Vector} aaxis axis
+ * @param {number} aangle the angle in radians
+ * @return {Kata_Vector} the quaternion
*/
Kata._helperQuatFromAxisAngle=function(aaxis,aangle) {
var sinHalf=Math.sin(aangle/2.0);
@@ -93,11 +110,11 @@ Kata._helperQuatFromAxisAngle=function(aaxis,aangle) {
/**
* Extrapolates the quaternion using the velocity and axis deltaTime seconds into the future
- * @param {Array} a starting quaternion
+ * @param {Kata_Vector} a starting quaternion
* @param {number} avel the rotational speed in radians per second rotating around aaxis
- * @param {Array} aaxis the rotational axis around which a rotates
+ * @param {Kata_Vector} aaxis the rotational axis around which a rotates
* @param {number} deltaTime the number of seconds since the starting quaternion was measured
- * @return {Array} The quaternion extrapolated deltaTime seconds from a
+ * @return {Kata_Vector} The quaternion extrapolated deltaTime seconds from a
*/
Kata.extrapolateQuaternion=function(a,avel,aaxis,deltaTime){
var aangle=avel*deltaTime;
@@ -122,14 +139,14 @@ Kata.extrapolateQuaternion=function(a,avel,aaxis,deltaTime){
* If the time is after the first, newer 3vec (a), it extrapolates the 3vec
* If the time is before the second, older 3vec (b) it uses the second, older 3vec
* otherwise it does a weighted interpolation of the 3vecs
- * @param {Array} a the ending quaternion to interpolate
- * @param {number} avel the velocity a will move
- * @param {Date} atime the sample time at which the final 3vec was measured to be at a
- * @param {Array} b starting, older 3vec to interpolate
- * @param {number} bvel the velocity b moved at
- * @param {Date} btime the sample time at which the 3vec was measured to be at b
- * @param {Date} curTime the current date to interpolate at
- * @return {Array} The quaternion interpolated between a and b at curtime
+ * @param {Kata_Vector} a the ending quaternion to interpolate
+ * @param {Kata_Vector} adel the velocity a will move
+ * @param {Kata_Date} atime the sample time at which the final 3vec was measured to be at a
+ * @param {Kata_Vector} b starting, older 3vec to interpolate
+ * @param {Kata_Vector} bdel the velocity b moved at
+ * @param {Kata_Date} btime the sample time at which the 3vec was measured to be at b
+ * @param {Kata_Date} curtime the current date to interpolate at
+ * @return {Kata_Vector} The quaternion interpolated between a and b at curtime
*/
Kata._helperLocationInterpolate3vec=function(a,adel,atime,b,bdel,btime,curtime) {
var secondsPassed=Kata.deltaTime(curtime,atime);
@@ -156,14 +173,12 @@ Kata._helperLocationInterpolate3vec=function(a,adel,atime,b,bdel,btime,curtime)
* If the time is after the first, newer 3vec (a), it extrapolates the 3vec
* If the time is before the second, older 3vec (b) it uses the second, older 3vec
* otherwise it does a weighted interpolation of the 3vecs
- * @param {Array} a the ending quaternion to interpolate
- * @param {number} avel the velocity a will move
- * @param {Date} atime the sample time at which the final 3vec was measured to be at a
- * @param {Array} b starting, older 3vec to interpolate
- * @param {number} bvel the velocity b moved at
- * @param {Date} btime the sample time at which the 3vec was measured to be at b
- * @param {Date} curTime the current date to interpolate at
- * @return {Array} The quaternion interpolated between a and b at curtime
+ * @param {Kata_Vector} a the ending quaternion to interpolate
+ * @param {Kata_Date} atime the sample time at which the final 3vec was measured to be at a
+ * @param {Kata_Vector} b starting, older 3vec to interpolate
+ * @param {Kata_Date} btime the sample time at which the 3vec was measured to be at b
+ * @param {Kata_Date} curtime the current date to interpolate at
+ * @return {Kata_Vector} The quaternion interpolated between a and b at curtime
*/
Kata._helperLocationInterpolateNoVel4vec=function(a,atime,b,btime,curtime) {
var secondsPassed=Kata.deltaTime(curtime,atime);
@@ -191,16 +206,16 @@ Kata._helperLocationInterpolateNoVel4vec=function(a,atime,b,btime,curtime) {
* If the time is after the first, newer quaternion (a), it extrapolates the quaternion
* If the time is before the second, older quaternion (b) it uses the second quaternion
* otherwise it does a weighted interpolation of the quaternions
- * @param {Array} a the ending quaternion to interpolate
+ * @param {Kata_Vector} a the ending quaternion to interpolate
* @param {number} avel the rotational speed in radians per second a rotates around aaxis
- * @param {Array} aaxis the rotational axis around which a rotates
- * @param {Array} atime the sample time at which the final quaternion was measured to be at a
- * @param {Date} b starting quaternion to interpolate
+ * @param {Kata_Vector} aaxis the rotational axis around which a rotates
+ * @param {Kata_Date} atime the sample time at which the final quaternion was measured to be at a
+ * @param {Kata_Vector} b starting quaternion to interpolate
* @param {number} bvel the rotational speed in radians per second b rotates around baxis
- * @param {Array} baxis the rotational axis around which b rotates
- * @param {Date} btime the sample time at which the beginning quaternion was measured to be at b
- * @param {Date} curTime the current date to interpolate at
- * @return {Array} The quaternion interpolated between a and b at curtime
+ * @param {Kata_Vector} baxis the rotational axis around which b rotates
+ * @param {Kata_Date} btime the sample time at which the beginning quaternion was measured to be at b
+ * @param {Kata_Date} curtime the current date to interpolate at
+ * @return {Kata_Vector} The quaternion interpolated between a and b at curtime
*/
Kata._helperLocationInterpolateQuaternion=function(a,avel,aaxis,atime,b,bvel,baxis,btime,curtime) {
var secondsPassed=Kata.deltaTime(curtime,atime);
@@ -231,10 +246,10 @@ Kata._helperLocationInterpolateQuaternion=function(a,avel,aaxis,atime,b,bvel,bax
/**
* interpolates between 2 locations at a time probably between the two, otherwise the newer one is extrapolated
- * @param {!Location} location the newest location update
- * @param {!Location} prevLoaction the second newest location update
- * @param {Date} time the time to extrapolate to
- * @returns {!Location} an param-by-param interpolation of the locations if the time is between the two times for that property, otherwise an extrapolation of the newest location update to the future
+ * @param {Kata_Location} location the newest location update
+ * @param {Kata_Location} prevLocation the second newest location update
+ * @param {Kata_Date} time the time to extrapolate to
+ * @returns {Kata_Location} an param-by-param interpolation of the locations if the time is between the two times for that property, otherwise an extrapolation of the newest location update to the future
*/
Kata.LocationInterpolate=function(location,prevLocation,time) {
return {
@@ -258,12 +273,12 @@ Kata.LocationInterpolate=function(location,prevLocation,time) {
/**
* interpolates between 2 locations where 3 times are passed in and used to separately interpolate each field
- * @param {!Location} location the newest location update
- * @param {!Location} prevLoaction the second newest location update
- * @param {Date} posTime the time to extrapolate to for positions
- * @param {Date} orientTime the time to extrapolate to for orientations
- * @param {Date} scaleTime the time to extrapolate to for scale
- * @returns {!Location} an param-by-param interpolation of the locations if the time is between the two times for that property, otherwise an extrapolation of the newest location update to the future
+ * @param {Kata_Location} location the newest location update
+ * @param {Kata_Location} prevLocation the second newest location update
+ * @param {Kata_Date} posTime the time to extrapolate to for positions
+ * @param {Kata_Date} orientTime the time to extrapolate to for orientations
+ * @param {Kata_Date} scaleTime the time to extrapolate to for scale
+ * @returns {Kata_Location} an param-by-param interpolation of the locations if the time is between the two times for that property, otherwise an extrapolation of the newest location update to the future
*/
Kata.LocationTriTimeInterpolate=function(location,prevLocation,posTime,orientTime,scaleTime) {
return {
@@ -287,9 +302,9 @@ Kata.LocationTriTimeInterpolate=function(location,prevLocation,posTime,orientTim
/**
* Extrapolates a location to a future time so that it may be interpolated
- * @param {!Location} location the latest location sample
- * @param {Date} time the current time for which to extrapolate over
- * @returns {!Location} a Location class that has the current time set to time but the same velocity and rotation
+ * @param {Kata_Location} location the latest location sample
+ * @param {Kata_Date} time the current time for which to extrapolate over
+ * @returns {Kata_Location} a Location class that has the current time set to time but the same velocity and rotation
*/
Kata.LocationExtrapolate=function(location,time) {
return {
@@ -393,11 +408,11 @@ Kata.LocationCopyUnifyTime= function(msg, destination) {
* returns a new location that has the default properties where the msg does not specify the values
* and uses the messages values where they are specified
* @param msg the network message being received
- * @returns {!Location} a Location class with curLocation augmented with the msg fields that exist
+ * @returns {Kata_Location} a Location class with curLocation augmented with the msg fields that exist
*/
Kata.LocationSet=function(msg) {
if (msg.time==undefined)
- msg.time=new Date();
+ msg.time=Date.now();
if (msg.scale==undefined)
msg.scale=[0,0,0,1];
if (msg.vel==undefined)
@@ -430,9 +445,9 @@ Kata.LocationSet=function(msg) {
* is newer within the accuracy of the javascript timer.
*
* @param msg the network message being received
- * @param {!Location} curLocation the currently known latest update (modified with prevLocation items that have not changed in new update)
- * @param {!Location} prevLocation the update before the current update
- * @returns {!Location} a Location class with curLocation augmented with the msg fields that exist
+ * @param {Kata_Location} curLocation the currently known latest update (modified with prevLocation items that have not changed in new update)
+ * @param {Kata_Location} prevLocation the update before the current update
+ * @returns {Kata_Location} a Location class with curLocation augmented with the msg fields that exist
*/
Kata.LocationUpdate=function(msg,curLocation,prevLocation, curDate) {
if (!prevLocation)
@@ -508,7 +523,7 @@ Kata.LocationUpdate=function(msg,curLocation,prevLocation, curDate) {
/**
* Takes a current location and updates it with all fields and timestamps that have changed
* @param msg the network message being received
- * @param {!Location} curLocation the currently known latest update (modified with prevLocation items that have not changed in new update)
+ * @param {Kata_Location} curLocation the currently known latest update (modified with prevLocation items that have not changed in new update)
*/
Kata.LocationReset=function(msg,curLocation) {
if (msg.scale!==undefined) {
@@ -534,9 +549,9 @@ Kata.LocationReset=function(msg,curLocation) {
/**
* Multiplies two quaternions.
- * @param {!o3djs.quaternions.Quaternion} a Operand quaternion.
- * @param {!o3djs.quaternions.Quaternion} b Operand quaternion.
- * @return {!o3djs.quaternions.Quaternion} The quaternion product a * b.
+ * @param {!Kata_Vector} a Operand quaternion.
+ * @param {!Kata_Vector} b Operand quaternion.
+ * @return {!Kata_Vector} The quaternion product a * b.
*/
Kata.QuaternionMulQuaternion=function(a, b) {
var aX = a[0];
@@ -561,8 +576,8 @@ Kata.QuaternionMulQuaternion=function(a, b) {
* a quaternion r means to express that vector as a quaternion q by letting
* q = [v[0], v[1], v[2], 0] and then obtain the rotated vector by evaluating
* the expression (r * q) / r.
- * @param {!o3djs.quaternions.Quaternion} q The quaternion.
- * @return {!o3djs.math.Matrix4} A 4-by-4 rotation matrix.
+ * @param {!Kata_Vector} q The quaternion.
+ * @return {!Kata_Vector} A 4-by-4 rotation matrix.
*/
Kata.QuaternionToRotation=function (q) {
var qX = q[0];
@@ -621,6 +636,9 @@ Kata.Vec3Sub=function(a,b) {
Kata.Vec3Scale=function(a,b) {
return [a[0]*b,a[1]*b,a[2]*b];
};
+Kata.Vec4Scale=function(a,b) {
+ return [a[0]*b,a[1]*b,a[2]*b,a[3]*b];
+};
Kata.Vec3Rotate=function(a,v0,v1,v2) {
return [a[0]*v0[0]+a[1]*v1[0]+a[2]*v2[0],
a[0]*v0[1]+a[1]*v1[1]+a[2]*v2[1],
@@ -630,10 +648,10 @@ Kata.Vec3Rotate=function(a,v0,v1,v2) {
* LocationCompose takes in a location and a prev and cur position for a parent node
* and turns it into a single location that represents the current transformation at
* the time snapshots listed in loc
- * @param {!Location} loc the location to be combined with its parents
- * @param {!Location} prevParentLoc the parent's previous location
- * @param {!Location} curParentLoc the parent's current location
- * @returns{!Location} loc, combined with the appropriate interpolation of cur and prevParentLoc
+ * @param {Kata_Location} loc the location to be combined with its parents
+ * @param {Kata_Location} prevParentLoc the parent's previous location
+ * @param {Kata_Location} curParentLoc the parent's current location
+ * @returns{Kata_Location} loc, combined with the appropriate interpolation of cur and prevParentLoc
*/
Kata.LocationCompose=function(loc, prevParentLoc, curParentLoc) {
var parentLoc=Kata.LocationTriTimeInterpolate(curParentLoc,prevParentLoc,loc.posTime,loc.orientTime,loc.scaleTime);
@@ -676,10 +694,10 @@ Kata.QuaternionInverse=function(q) {
* the time snapshots listed in loc as a child transformation of the ParentLocs
* so that it would remain at the same position that it was as a child of prev and
* curParentLoc at its respective timestamps
- * @param {!Location} loc the location to be combined with its parents
- * @param {!Location} prevParentLoc the parent's previous location
- * @param {!Location} curParentLoc the parent's current location
- * @returns{!Location} loc, combined with the appropriate interpolation of cur and prevParentLoc
+ * @param {Kata_Location} loc the location to be combined with its parents
+ * @param {Kata_Location} prevParentLoc the parent's previous location
+ * @param {Kata_Location} curParentLoc the parent's current location
+ * @returns{Kata_Location} loc, combined with the appropriate interpolation of cur and prevParentLoc
*/
Kata.LocationInverseCompose=function(loc, prevParentLoc, curParentLoc) {
var parentLoc=Kata.LocationTriTimeInterpolate(curParentLoc,prevParentLoc,loc.posTime,loc.orientTime,loc.scaleTime);
@@ -711,10 +729,10 @@ Kata.LocationInverseCompose=function(loc, prevParentLoc, curParentLoc) {
};
/**
* takes the loc that is based off of the oldNode and places it as a child of newNode
- * @param {!Location} loc the location of the object relative to oldNode
- * @param {Array} oldNodes the previous array of pairs of [prev,cur] Location classes that represent the object with lowest element being farthest from the root of the heirarchy of transforms
- * @param {Array} newNodes the current array of pairs of [prev,cur] Location classes that represent the object with the first element being farthest from the root of the heirarchy of transforms
- * @returns {!Location} a Location class that has been composed with oldNode and then the inverse of newNode
+ * @param {Kata_Location} loc the location of the object relative to oldNode
+ * @param {!Array.<!Kata_Location>} oldNode the previous array of pairs of [prev,cur] Location classes that represent the object with lowest element being farthest from the root of the heirarchy of transforms
+ * @param {!Array.<!Kata_Location>} newNode the current array of pairs of [prev,cur] Location classes that represent the object with the first element being farthest from the root of the heirarchy of transforms
+ * @returns {Kata_Location} a Location class that has been composed with oldNode and then the inverse of newNode
*/
Kata.LocationReparent=function(loc,oldNode,newNode){
var i;
View
6 katajs/oh/plugins/sirikata/SirikataSpaceConnection.js
@@ -228,9 +228,9 @@ Kata.require([
resetTime=true;
}
Kata.LocationCopyUnifyTime(loc, reqloc);
-
- if (resetTime) {
/*
+ if (resetTime) {
+
delete loc.time;
delete reqloc.time;
if (reqloc.posTime!==undefined)
@@ -239,8 +239,8 @@ Kata.require([
delete reqloc.orientTime;
if (reqloc.scaleTime!==undefined)
delete reqloc.scaleTime;
-*/
}
+*/
reqloc.visual = loc.visual;
this.mOutstandingConnectRequests[objid] =
{

0 comments on commit 82fb4d7

Please sign in to comment.