Explorar o código

Fix WireframeHelper for BufferGeometries without offsets

by just creating a dummy offset
Sébastien Valette %!s(int64=11) %!d(string=hai) anos
pai
achega
82b6b8ccfc
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      src/extras/helpers/WireframeHelper.js

+ 6 - 0
src/extras/helpers/WireframeHelper.js

@@ -74,6 +74,12 @@ THREE.WireframeHelper = function ( object, hex ) {
 			var offsets = object.geometry.offsets;
 			var numEdges = 0;
 
+			if (!offsets.length) {
+
+				offsets = [{count : indices.length, index : 0, start : 0}];
+
+			}
+
 			// allocate maximal size
 			var edges = new Uint32Array( 2 * indices.length );