Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r8-devel started #54

Merged
merged 3 commits into from
Aug 23, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
DEVEL - **r7**
DEVEL - **r8-devel**

2013-08-23 - **r7**
* Improved tablet support [(KazutoMurase)](https://github.com/KazutoMurase/)
* Fix to cylinder marker type [(KazutoMurase)](https://github.com/KazutoMurase/)
* Fix to IM transforms [(eratner)](https://github.com/eratner/)
* Fix to colored mesh resources [(eratner)](https://github.com/eratner/)

2013-06-06 - **r6**
* MARKER_CUBE_LIST added to Marker.js [(rctoris)](https://github.com/rctoris/)
Expand Down
2 changes: 1 addition & 1 deletion build/ros3d.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

var ROS3D = ROS3D || {
REVISION : '7-devel'
REVISION : '8-devel'
};

// Marker types
Expand Down
2 changes: 1 addition & 1 deletion build/ros3d.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion doc/Arrow.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ROS3D.Ar
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Thu Jun 06 2013 10:17:53 GMT-0400 (EDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Fri Aug 23 2013 11:15:20 GMT-0400 (EDT)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion doc/Axes.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ROS3D.Ar
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Thu Jun 06 2013 10:17:53 GMT-0400 (EDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Fri Aug 23 2013 11:15:20 GMT-0400 (EDT)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion doc/DepthCloud.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ROS3D.Ar
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Thu Jun 06 2013 10:17:53 GMT-0400 (EDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Fri Aug 23 2013 11:15:20 GMT-0400 (EDT)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion doc/Grid.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ROS3D.Ar
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Thu Jun 06 2013 10:17:53 GMT-0400 (EDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Fri Aug 23 2013 11:15:20 GMT-0400 (EDT)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion doc/Highlighter.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ROS3D.Ar
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Thu Jun 06 2013 10:17:53 GMT-0400 (EDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Fri Aug 23 2013 11:15:20 GMT-0400 (EDT)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion doc/InteractiveMarker.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ROS3D.Ar
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Thu Jun 06 2013 10:17:53 GMT-0400 (EDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Fri Aug 23 2013 11:15:20 GMT-0400 (EDT)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion doc/InteractiveMarkerClient.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ROS3D.Ar
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Thu Jun 06 2013 10:17:53 GMT-0400 (EDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Fri Aug 23 2013 11:15:20 GMT-0400 (EDT)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion doc/InteractiveMarkerControl.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ROS3D.Ar
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Thu Jun 06 2013 10:17:53 GMT-0400 (EDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Fri Aug 23 2013 11:15:20 GMT-0400 (EDT)
</footer>

<script> prettyPrint(); </script>
Expand Down
6 changes: 5 additions & 1 deletion doc/InteractiveMarkerHandle.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ <h1 class="page-title">Source: interactivemarkers/InteractiveMarkerHandle.js</h1
this.pose = new ROSLIB.Pose(event);
var inv = this.tfTransform.clone();
inv.rotation.invert();
inv.translation.multiplyQuaternion(inv.rotation);
inv.translation.x *= -1;
inv.translation.y *= -1;
inv.translation.z *= -1;
this.pose.applyTransform(inv);

// send feedback to the server
Expand Down Expand Up @@ -213,7 +217,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ROS3D.Ar
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Thu Jun 06 2013 10:17:53 GMT-0400 (EDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Fri Aug 23 2013 11:15:20 GMT-0400 (EDT)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion doc/InteractiveMarkerMenu.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ROS3D.Ar
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Thu Jun 06 2013 10:17:53 GMT-0400 (EDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Fri Aug 23 2013 11:15:20 GMT-0400 (EDT)
</footer>

<script> prettyPrint(); </script>
Expand Down
17 changes: 12 additions & 5 deletions doc/Marker.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ <h1 class="page-title">Source: markers/Marker.js</h1>
var cylinderMesh = new THREE.Mesh(cylinderGeom, colorMaterial);
cylinderMesh.useQuaternion = true;
cylinderMesh.quaternion.setFromAxisAngle(new THREE.Vector3(1, 0, 0), Math.PI * 0.5);
cylinderMesh.scale = new THREE.Vector3(message.scale.x, message.scale.y, message.scale.z);
cylinderMesh.scale = new THREE.Vector3(message.scale.x, message.scale.z, message.scale.y);
this.add(cylinderMesh);
break;
case ROS3D.MARKER_CUBE_LIST:
Expand Down Expand Up @@ -205,10 +205,17 @@ <h1 class="page-title">Source: markers/Marker.js</h1>
break;
case ROS3D.MARKER_MESH_RESOURCE:
// load and add the mesh
this.add(new ROS3D.MeshResource({
var meshColorMaterial = null;
if(message.color.r !== 0 || message.color.g !== 0 ||
message.color.b !== 0 || message.color.a !== 0) {
meshColorMaterial = colorMaterial;
}
var meshResource = new ROS3D.MeshResource({
path : path,
resource : message.mesh_resource.substr(10)
}));
resource : message.mesh_resource.substr(10),
material : meshColorMaterial
});
this.add(meshResource);
break;
case ROS3D.MARKER_TRIANGLE_LIST:
// create the list of triangles
Expand Down Expand Up @@ -262,7 +269,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ROS3D.Ar
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Thu Jun 06 2013 10:17:53 GMT-0400 (EDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Fri Aug 23 2013 11:15:20 GMT-0400 (EDT)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion doc/MarkerClient.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ROS3D.Ar
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Thu Jun 06 2013 10:17:53 GMT-0400 (EDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Fri Aug 23 2013 11:15:20 GMT-0400 (EDT)
</footer>

<script> prettyPrint(); </script>
Expand Down
18 changes: 17 additions & 1 deletion doc/MeshResource.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ <h1 class="page-title">Source: models/MeshResource.js</h1>
* @param options - object with following keys:
* * path (optional) - the base path to the associated models that will be loaded
* * resource - the resource file name to load
* * material (optional) - the material to use for the object
* * warnings (optional) - if warnings should be printed
*/
ROS3D.MeshResource = function(options) {
var that = this;
options = options || {};
var path = options.path || '/';
var resource = options.resource;
var material = options.material || null;
this.warnings = options.warnings;

THREE.Object3D.call(this);
Expand All @@ -71,6 +73,20 @@ <h1 class="page-title">Source: models/MeshResource.js</h1>
var scale = collada.dae.asset.unit;
collada.scene.scale = new THREE.Vector3(scale, scale, scale);
}

if(material !== null) {
var setMaterial = function(node, material) {
node.material = material;
if (node.children) {
for (var i = 0; i &lt; node.children.length; i++) {
setMaterial(node.children[i], material);
}
}
};

setMaterial(collada.scene, material);
}

that.add(collada.scene);
});
}
Expand All @@ -92,7 +108,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ROS3D.Ar
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Thu Jun 06 2013 10:17:53 GMT-0400 (EDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Fri Aug 23 2013 11:15:20 GMT-0400 (EDT)
</footer>

<script> prettyPrint(); </script>
Expand Down
49 changes: 43 additions & 6 deletions doc/MouseHandler.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,18 @@ <h1 class="page-title">Source: visualization/interaction/MouseHandler.js</h1>
// compute normalized device coords and 3D mouse ray
var target = domEvent.target;
var rect = target.getBoundingClientRect();
var left = domEvent.clientX - rect.left - target.clientLeft + target.scrollLeft;
var top = domEvent.clientY - rect.top - target.clientTop + target.scrollTop;
var pos_x, pos_y;

if(domEvent.type.indexOf('touch') !== -1) {
pos_x = domEvent.changedTouches[0].clientX;
pos_y = domEvent.changedTouches[0].clientY;
}
else {
pos_x = domEvent.clientX;
pos_y = domEvent.clientY;
}
var left = pos_x - rect.left - target.clientLeft + target.scrollLeft;
var top = pos_y - rect.top - target.clientTop + target.scrollTop;
var deviceX = left / target.clientWidth * 2 - 1;
var deviceY = -top / target.clientHeight * 2 + 1;
var vector = new THREE.Vector3(deviceX, deviceY, 0.5);
Expand Down Expand Up @@ -105,11 +115,22 @@ <h1 class="page-title">Source: visualization/interaction/MouseHandler.js</h1>
return;
}

// if the touch leaves the dom element, stop everything
if (domEvent.type === 'touchleave' || domEvent.type === 'touchend') {
if (this.dragging) {
this.notify(this.lastTarget, 'mouseup', event3D);
this.dragging = false;
}
this.notify(this.lastTarget, 'touchend', event3D);
this.lastTarget = null;
return;
}

// while the user is holding the mouse down, stay on the same target
if (this.dragging) {
this.notify(this.lastTarget, domEvent.type, event3D);
// for check for right or left mouse button
if ((domEvent.type === 'mouseup' && domEvent.button === 2) || domEvent.type === 'click') {
if ((domEvent.type === 'mouseup' && domEvent.button === 2) || domEvent.type === 'click' || domEvent.type === 'touchend') {
this.dragging = false;
}
return;
Expand All @@ -127,7 +148,7 @@ <h1 class="page-title">Source: visualization/interaction/MouseHandler.js</h1>
}

// if the mouse moves from one object to another (or from/to the 'null' object), notify both
if (target !== this.lastTarget) {
if (target !== this.lastTarget && domEvent.type.match(/mouse/)) {
var eventAccepted = this.notify(target, 'mouseover', event3D);
if (eventAccepted) {
this.notify(this.lastTarget, 'mouseout', event3D);
Expand All @@ -141,9 +162,25 @@ <h1 class="page-title">Source: visualization/interaction/MouseHandler.js</h1>
}
}

// if the finger moves from one object to another (or from/to the 'null' object), notify both
if (target !== this.lastTarget && domEvent.type.match(/touch/)) {
var toucheventAccepted = this.notify(target, domEvent.type, event3D);
if (toucheventAccepted) {
this.notify(this.lastTarget, 'touchleave', event3D);
this.notify(this.lastTarget, 'touchend', event3D);
} else {
// if target was null or no target has caught our event, fall back
target = this.fallbackTarget;
if (target !== this.lastTarget) {
this.notify(this.lastTarget, 'touchmove', event3D);
this.notify(this.lastTarget, 'touchend', event3D);
}
}
}

// pass through event
this.notify(target, domEvent.type, event3D);
if (domEvent.type === 'mousedown') {
if (domEvent.type === 'mousedown' || domEvent.type === 'touchstart' || domEvent.type === 'touchmove') {
this.dragging = true;
}
this.lastTarget = target;
Expand Down Expand Up @@ -199,7 +236,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ROS3D.Ar
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Thu Jun 06 2013 10:17:53 GMT-0400 (EDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Fri Aug 23 2013 11:15:20 GMT-0400 (EDT)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion doc/OccupancyGrid.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ROS3D.Ar
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Thu Jun 06 2013 10:17:53 GMT-0400 (EDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Fri Aug 23 2013 11:15:20 GMT-0400 (EDT)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion doc/OccupancyGridClient.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ROS3D.Ar
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Thu Jun 06 2013 10:17:53 GMT-0400 (EDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Fri Aug 23 2013 11:15:20 GMT-0400 (EDT)
</footer>

<script> prettyPrint(); </script>
Expand Down
Loading