Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson committed Oct 10, 2020
1 parent 33a4af5 commit 21e7238
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 15 deletions.
33 changes: 29 additions & 4 deletions javascript/example/bundle/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60363,10 +60363,13 @@

if (this.jointType === v) return;
this._jointType = v;

this.matrixWorldNeedsUpdate = true;
switch (v) {

case 'fixed':
this.jointValue = [];
break;

case 'continuous':
case 'revolute':
case 'prismatic':
Expand All @@ -60392,6 +60395,7 @@
}

constructor(...args) {

super(...args);

this.isURDFJoint = true;
Expand All @@ -60406,6 +60410,7 @@

this.origPosition = null;
this.origQuaternion = null;

}

/* Overrides */
Expand All @@ -60426,6 +60431,7 @@
this.origQuaternion = source.origQuaternion ? source.origQuaternion.clone() : null;

return this;

}

/* Public Functions */
Expand All @@ -60452,7 +60458,7 @@

let angle = values[0];
if (angle == null) return false;
if (angle === this.jointValue) return false;
if (angle === this.angle) return false;

if (!this.ignoreLimits && this.jointType === 'revolute') {

Expand Down Expand Up @@ -60484,7 +60490,7 @@

let pos = values[0];
if (pos == null) return false;
if (pos === this.jointValue) return false;
if (pos === this.angle) return false;

if (!this.ignoreLimits) {

Expand Down Expand Up @@ -60695,11 +60701,21 @@
this.parseCollision = false;
this.packages = '';
this.workingPath = '';
this.fetchOptions = null;
this.fetchOptions = {};

}

/* Public API */
loadAsync(urdf) {

return new Promise((resolve, reject) => {

this.load(urdf, resolve, null, reject);

});

}

// urdf: The path to the URDF within the package OR absolute
// onComplete: Callback that is passed the model once loaded
load(urdf, onComplete, onProgress, onError) {
Expand All @@ -60711,12 +60727,17 @@
const urdfPath = this.manager.resolveURL(urdf);

manager.itemStart(urdfPath);

fetch(urdfPath, this.fetchOptions)
.then(res => {

if (onProgress) {

onProgress(null);

}
return res.text();

})
.then(data => {

Expand All @@ -60734,9 +60755,13 @@
.catch(e => {

if (onError) {

onError(e);

} else {

console.error('URDFLoader: Error loading file.', e);

}
manager.itemError(urdfPath);
manager.itemEnd(urdfPath);
Expand Down
2 changes: 1 addition & 1 deletion javascript/example/bundle/index.js.map

Large diffs are not rendered by default.

33 changes: 29 additions & 4 deletions javascript/example/bundle/simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -59489,10 +59489,13 @@

if (this.jointType === v) return;
this._jointType = v;

this.matrixWorldNeedsUpdate = true;
switch (v) {

case 'fixed':
this.jointValue = [];
break;

case 'continuous':
case 'revolute':
case 'prismatic':
Expand All @@ -59518,6 +59521,7 @@
}

constructor(...args) {

super(...args);

this.isURDFJoint = true;
Expand All @@ -59532,6 +59536,7 @@

this.origPosition = null;
this.origQuaternion = null;

}

/* Overrides */
Expand All @@ -59552,6 +59557,7 @@
this.origQuaternion = source.origQuaternion ? source.origQuaternion.clone() : null;

return this;

}

/* Public Functions */
Expand All @@ -59578,7 +59584,7 @@

let angle = values[0];
if (angle == null) return false;
if (angle === this.jointValue) return false;
if (angle === this.angle) return false;

if (!this.ignoreLimits && this.jointType === 'revolute') {

Expand Down Expand Up @@ -59610,7 +59616,7 @@

let pos = values[0];
if (pos == null) return false;
if (pos === this.jointValue) return false;
if (pos === this.angle) return false;

if (!this.ignoreLimits) {

Expand Down Expand Up @@ -59821,11 +59827,21 @@
this.parseCollision = false;
this.packages = '';
this.workingPath = '';
this.fetchOptions = null;
this.fetchOptions = {};

}

/* Public API */
loadAsync(urdf) {

return new Promise((resolve, reject) => {

this.load(urdf, resolve, null, reject);

});

}

// urdf: The path to the URDF within the package OR absolute
// onComplete: Callback that is passed the model once loaded
load(urdf, onComplete, onProgress, onError) {
Expand All @@ -59837,12 +59853,17 @@
const urdfPath = this.manager.resolveURL(urdf);

manager.itemStart(urdfPath);

fetch(urdfPath, this.fetchOptions)
.then(res => {

if (onProgress) {

onProgress(null);

}
return res.text();

})
.then(data => {

Expand All @@ -59860,9 +59881,13 @@
.catch(e => {

if (onError) {

onError(e);

} else {

console.error('URDFLoader: Error loading file.', e);

}
manager.itemError(urdfPath);
manager.itemEnd(urdfPath);
Expand Down
2 changes: 1 addition & 1 deletion javascript/example/bundle/simple.js.map

Large diffs are not rendered by default.

33 changes: 29 additions & 4 deletions javascript/umd/URDFLoader.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion javascript/umd/URDFLoader.js.map

Large diffs are not rendered by default.

0 comments on commit 21e7238

Please sign in to comment.