mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-08-12 18:19:05 +08:00
Make sure errorMsg is defined (#76)
This commit is contained in:
parent
db5e679828
commit
e648e1bde5
@ -76,7 +76,8 @@ THREE.DRACOLoader.prototype = {
|
|||||||
console.log('Loaded a point cloud.');
|
console.log('Loaded a point cloud.');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.error('THREE.DRACOLoader: Unknown geometry type.');
|
const errorMsg = 'THREE.DRACOLoader: Unknown geometry type.'
|
||||||
|
console.error(errorMsg);
|
||||||
throw new Error(errorMsg);
|
throw new Error(errorMsg);
|
||||||
}
|
}
|
||||||
return scope.convertDracoGeometryTo3JS(wrapper, geometryType, buffer,
|
return scope.convertDracoGeometryTo3JS(wrapper, geometryType, buffer,
|
||||||
@ -124,7 +125,8 @@ THREE.DRACOLoader.prototype = {
|
|||||||
const posAttId = wrapper.GetAttributeId(dracoGeometry,
|
const posAttId = wrapper.GetAttributeId(dracoGeometry,
|
||||||
dracoDecoder.POSITION);
|
dracoDecoder.POSITION);
|
||||||
if (posAttId == -1) {
|
if (posAttId == -1) {
|
||||||
console.error('THREE.DRACOLoader: No position attribute found.');
|
const errorMsg = 'THREE.DRACOLoader: No position attribute found.';
|
||||||
|
console.error(errorMsg);
|
||||||
dracoDecoder.destroy(wrapper);
|
dracoDecoder.destroy(wrapper);
|
||||||
dracoDecoder.destroy(dracoGeometry);
|
dracoDecoder.destroy(dracoGeometry);
|
||||||
throw new Error(errorMsg);
|
throw new Error(errorMsg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user