createVectorTilePolygons.js.map 27 KB

1
  1. {"version":3,"file":"createVectorTilePolygons.js","sources":["../../../../Source/WorkersES6/createVectorTilePolygons.js"],"sourcesContent":["import AttributeCompression from \"../Core/AttributeCompression.js\";\nimport Cartesian3 from \"../Core/Cartesian3.js\";\nimport Cartographic from \"../Core/Cartographic.js\";\nimport Color from \"../Core/Color.js\";\nimport defined from \"../Core/defined.js\";\nimport Ellipsoid from \"../Core/Ellipsoid.js\";\nimport IndexDatatype from \"../Core/IndexDatatype.js\";\nimport CesiumMath from \"../Core/Math.js\";\nimport OrientedBoundingBox from \"../Core/OrientedBoundingBox.js\";\nimport Rectangle from \"../Core/Rectangle.js\";\nimport createTaskProcessorWorker from \"./createTaskProcessorWorker.js\";\n\nvar scratchCenter = new Cartesian3();\nvar scratchEllipsoid = new Ellipsoid();\nvar scratchRectangle = new Rectangle();\nvar scratchScalars = {\n min: undefined,\n max: undefined,\n indexBytesPerElement: undefined,\n};\n\nfunction unpackBuffer(buffer) {\n var packedBuffer = new Float64Array(buffer);\n\n var offset = 0;\n scratchScalars.indexBytesPerElement = packedBuffer[offset++];\n\n scratchScalars.min = packedBuffer[offset++];\n scratchScalars.max = packedBuffer[offset++];\n\n Cartesian3.unpack(packedBuffer, offset, scratchCenter);\n offset += Cartesian3.packedLength;\n\n Ellipsoid.unpack(packedBuffer, offset, scratchEllipsoid);\n offset += Ellipsoid.packedLength;\n\n Rectangle.unpack(packedBuffer, offset, scratchRectangle);\n}\n\nfunction packedBatchedIndicesLength(batchedIndices) {\n var length = batchedIndices.length;\n var count = 0;\n for (var i = 0; i < length; ++i) {\n count += Color.packedLength + 3 + batchedIndices[i].batchIds.length;\n }\n return count;\n}\n\nfunction packBuffer(indexDatatype, boundingVolumes, batchedIndices) {\n var numBVs = boundingVolumes.length;\n var length =\n 1 +\n 1 +\n numBVs * OrientedBoundingBox.packedLength +\n 1 +\n packedBatchedIndicesLength(batchedIndices);\n\n var packedBuffer = new Float64Array(length);\n\n var offset = 0;\n packedBuffer[offset++] = indexDatatype;\n packedBuffer[offset++] = numBVs;\n\n for (var i = 0; i < numBVs; ++i) {\n OrientedBoundingBox.pack(boundingVolumes[i], packedBuffer, offset);\n offset += OrientedBoundingBox.packedLength;\n }\n\n var indicesLength = batchedIndices.length;\n packedBuffer[offset++] = indicesLength;\n\n for (var j = 0; j < indicesLength; ++j) {\n var batchedIndex = batchedIndices[j];\n\n Color.pack(batchedIndex.color, packedBuffer, offset);\n offset += Color.packedLength;\n\n packedBuffer[offset++] = batchedIndex.offset;\n packedBuffer[offset++] = batchedIndex.count;\n\n var batchIds = batchedIndex.batchIds;\n var batchIdsLength = batchIds.length;\n packedBuffer[offset++] = batchIdsLength;\n\n for (var k = 0; k < batchIdsLength; ++k) {\n packedBuffer[offset++] = batchIds[k];\n }\n }\n\n return packedBuffer;\n}\n\nvar maxShort = 32767;\n\nvar scratchEncodedPosition = new Cartesian3();\nvar scratchNormal = new Cartesian3();\nvar scratchScaledNormal = new Cartesian3();\nvar scratchMinHeightPosition = new Cartesian3();\nvar scratchMaxHeightPosition = new Cartesian3();\nvar scratchBVCartographic = new Cartographic();\nvar scratchBVRectangle = new Rectangle();\n\nfunction createVectorTilePolygons(parameters, transferableObjects) {\n unpackBuffer(parameters.packedBuffer);\n\n var indices;\n var indexBytesPerElement = scratchScalars.indexBytesPerElement;\n if (indexBytesPerElement === 2) {\n indices = new Uint16Array(parameters.indices);\n } else {\n indices = new Uint32Array(parameters.indices);\n }\n\n var positions = new Uint16Array(parameters.positions);\n var counts = new Uint32Array(parameters.counts);\n var indexCounts = new Uint32Array(parameters.indexCounts);\n var batchIds = new Uint32Array(parameters.batchIds);\n var batchTableColors = new Uint32Array(parameters.batchTableColors);\n\n var boundingVolumes = new Array(counts.length);\n\n var center = scratchCenter;\n var ellipsoid = scratchEllipsoid;\n var rectangle = scratchRectangle;\n var minHeight = scratchScalars.min;\n var maxHeight = scratchScalars.max;\n\n var minimumHeights = parameters.minimumHeights;\n var maximumHeights = parameters.maximumHeights;\n if (defined(minimumHeights) && defined(maximumHeights)) {\n minimumHeights = new Float32Array(minimumHeights);\n maximumHeights = new Float32Array(maximumHeights);\n }\n\n var i;\n var j;\n var rgba;\n\n var positionsLength = positions.length / 2;\n var uBuffer = positions.subarray(0, positionsLength);\n var vBuffer = positions.subarray(positionsLength, 2 * positionsLength);\n AttributeCompression.zigZagDeltaDecode(uBuffer, vBuffer);\n\n var decodedPositions = new Float64Array(positionsLength * 3);\n for (i = 0; i < positionsLength; ++i) {\n var u = uBuffer[i];\n var v = vBuffer[i];\n\n var x = CesiumMath.lerp(rectangle.west, rectangle.east, u / maxShort);\n var y = CesiumMath.lerp(rectangle.south, rectangle.north, v / maxShort);\n\n var cart = Cartographic.fromRadians(x, y, 0.0, scratchBVCartographic);\n var decodedPosition = ellipsoid.cartographicToCartesian(\n cart,\n scratchEncodedPosition\n );\n Cartesian3.pack(decodedPosition, decodedPositions, i * 3);\n }\n\n var countsLength = counts.length;\n var offsets = new Array(countsLength);\n var indexOffsets = new Array(countsLength);\n var currentOffset = 0;\n var currentIndexOffset = 0;\n for (i = 0; i < countsLength; ++i) {\n offsets[i] = currentOffset;\n indexOffsets[i] = currentIndexOffset;\n\n currentOffset += counts[i];\n currentIndexOffset += indexCounts[i];\n }\n\n var batchedPositions = new Float32Array(positionsLength * 3 * 2);\n var batchedIds = new Uint16Array(positionsLength * 2);\n var batchedIndexOffsets = new Uint32Array(indexOffsets.length);\n var batchedIndexCounts = new Uint32Array(indexCounts.length);\n var batchedIndices = [];\n\n var colorToBuffers = {};\n for (i = 0; i < countsLength; ++i) {\n rgba = batchTableColors[i];\n if (!defined(colorToBuffers[rgba])) {\n colorToBuffers[rgba] = {\n positionLength: counts[i],\n indexLength: indexCounts[i],\n offset: 0,\n indexOffset: 0,\n batchIds: [i],\n };\n } else {\n colorToBuffers[rgba].positionLength += counts[i];\n colorToBuffers[rgba].indexLength += indexCounts[i];\n colorToBuffers[rgba].batchIds.push(i);\n }\n }\n\n // get the offsets and counts for the positions and indices of each primitive\n var buffer;\n var byColorPositionOffset = 0;\n var byColorIndexOffset = 0;\n for (rgba in colorToBuffers) {\n if (colorToBuffers.hasOwnProperty(rgba)) {\n buffer = colorToBuffers[rgba];\n buffer.offset = byColorPositionOffset;\n buffer.indexOffset = byColorIndexOffset;\n\n var positionLength = buffer.positionLength * 2;\n var indexLength = buffer.indexLength * 2 + buffer.positionLength * 6;\n\n byColorPositionOffset += positionLength;\n byColorIndexOffset += indexLength;\n\n buffer.indexLength = indexLength;\n }\n }\n\n var batchedDrawCalls = [];\n\n for (rgba in colorToBuffers) {\n if (colorToBuffers.hasOwnProperty(rgba)) {\n buffer = colorToBuffers[rgba];\n\n batchedDrawCalls.push({\n color: Color.fromRgba(parseInt(rgba)),\n offset: buffer.indexOffset,\n count: buffer.indexLength,\n batchIds: buffer.batchIds,\n });\n }\n }\n\n for (i = 0; i < countsLength; ++i) {\n rgba = batchTableColors[i];\n\n buffer = colorToBuffers[rgba];\n var positionOffset = buffer.offset;\n var positionIndex = positionOffset * 3;\n var batchIdIndex = positionOffset;\n\n var polygonOffset = offsets[i];\n var polygonCount = counts[i];\n var batchId = batchIds[i];\n\n var polygonMinimumHeight = minHeight;\n var polygonMaximumHeight = maxHeight;\n if (defined(minimumHeights) && defined(maximumHeights)) {\n polygonMinimumHeight = minimumHeights[i];\n polygonMaximumHeight = maximumHeights[i];\n }\n\n var minLat = Number.POSITIVE_INFINITY;\n var maxLat = Number.NEGATIVE_INFINITY;\n var minLon = Number.POSITIVE_INFINITY;\n var maxLon = Number.NEGATIVE_INFINITY;\n\n for (j = 0; j < polygonCount; ++j) {\n var position = Cartesian3.unpack(\n decodedPositions,\n polygonOffset * 3 + j * 3,\n scratchEncodedPosition\n );\n ellipsoid.scaleToGeodeticSurface(position, position);\n\n var carto = ellipsoid.cartesianToCartographic(\n position,\n scratchBVCartographic\n );\n var lat = carto.latitude;\n var lon = carto.longitude;\n\n minLat = Math.min(lat, minLat);\n maxLat = Math.max(lat, maxLat);\n minLon = Math.min(lon, minLon);\n maxLon = Math.max(lon, maxLon);\n\n var normal = ellipsoid.geodeticSurfaceNormal(position, scratchNormal);\n var scaledNormal = Cartesian3.multiplyByScalar(\n normal,\n polygonMinimumHeight,\n scratchScaledNormal\n );\n var minHeightPosition = Cartesian3.add(\n position,\n scaledNormal,\n scratchMinHeightPosition\n );\n\n scaledNormal = Cartesian3.multiplyByScalar(\n normal,\n polygonMaximumHeight,\n scaledNormal\n );\n var maxHeightPosition = Cartesian3.add(\n position,\n scaledNormal,\n scratchMaxHeightPosition\n );\n\n Cartesian3.subtract(maxHeightPosition, center, maxHeightPosition);\n Cartesian3.subtract(minHeightPosition, center, minHeightPosition);\n\n Cartesian3.pack(maxHeightPosition, batchedPositions, positionIndex);\n Cartesian3.pack(minHeightPosition, batchedPositions, positionIndex + 3);\n\n batchedIds[batchIdIndex] = batchId;\n batchedIds[batchIdIndex + 1] = batchId;\n\n positionIndex += 6;\n batchIdIndex += 2;\n }\n\n rectangle = scratchBVRectangle;\n rectangle.west = minLon;\n rectangle.east = maxLon;\n rectangle.south = minLat;\n rectangle.north = maxLat;\n\n boundingVolumes[i] = OrientedBoundingBox.fromRectangle(\n rectangle,\n minHeight,\n maxHeight,\n ellipsoid\n );\n\n var indicesIndex = buffer.indexOffset;\n\n var indexOffset = indexOffsets[i];\n var indexCount = indexCounts[i];\n\n batchedIndexOffsets[i] = indicesIndex;\n\n for (j = 0; j < indexCount; j += 3) {\n var i0 = indices[indexOffset + j] - polygonOffset;\n var i1 = indices[indexOffset + j + 1] - polygonOffset;\n var i2 = indices[indexOffset + j + 2] - polygonOffset;\n\n // triangle on the top of the extruded polygon\n batchedIndices[indicesIndex++] = i0 * 2 + positionOffset;\n batchedIndices[indicesIndex++] = i1 * 2 + positionOffset;\n batchedIndices[indicesIndex++] = i2 * 2 + positionOffset;\n\n // triangle on the bottom of the extruded polygon\n batchedIndices[indicesIndex++] = i2 * 2 + 1 + positionOffset;\n batchedIndices[indicesIndex++] = i1 * 2 + 1 + positionOffset;\n batchedIndices[indicesIndex++] = i0 * 2 + 1 + positionOffset;\n }\n\n // indices for the walls of the extruded polygon\n for (j = 0; j < polygonCount; ++j) {\n var v0 = j;\n var v1 = (j + 1) % polygonCount;\n\n batchedIndices[indicesIndex++] = v0 * 2 + 1 + positionOffset;\n batchedIndices[indicesIndex++] = v1 * 2 + positionOffset;\n batchedIndices[indicesIndex++] = v0 * 2 + positionOffset;\n\n batchedIndices[indicesIndex++] = v0 * 2 + 1 + positionOffset;\n batchedIndices[indicesIndex++] = v1 * 2 + 1 + positionOffset;\n batchedIndices[indicesIndex++] = v1 * 2 + positionOffset;\n }\n\n buffer.offset += polygonCount * 2;\n buffer.indexOffset = indicesIndex;\n\n batchedIndexCounts[i] = indicesIndex - batchedIndexOffsets[i];\n }\n\n batchedIndices = IndexDatatype.createTypedArray(\n batchedPositions.length / 3,\n batchedIndices\n );\n\n var batchedIndicesLength = batchedDrawCalls.length;\n for (var m = 0; m < batchedIndicesLength; ++m) {\n var tempIds = batchedDrawCalls[m].batchIds;\n var count = 0;\n var tempIdsLength = tempIds.length;\n for (var n = 0; n < tempIdsLength; ++n) {\n count += batchedIndexCounts[tempIds[n]];\n }\n batchedDrawCalls[m].count = count;\n }\n\n var indexDatatype =\n batchedIndices.BYTES_PER_ELEMENT === 2\n ? IndexDatatype.UNSIGNED_SHORT\n : IndexDatatype.UNSIGNED_INT;\n var packedBuffer = packBuffer(\n indexDatatype,\n boundingVolumes,\n batchedDrawCalls\n );\n\n transferableObjects.push(\n batchedPositions.buffer,\n batchedIndices.buffer,\n batchedIndexOffsets.buffer,\n batchedIndexCounts.buffer,\n batchedIds.buffer,\n packedBuffer.buffer\n );\n\n return {\n positions: batchedPositions.buffer,\n indices: batchedIndices.buffer,\n indexOffsets: batchedIndexOffsets.buffer,\n indexCounts: batchedIndexCounts.buffer,\n batchIds: batchedIds.buffer,\n packedBuffer: packedBuffer.buffer,\n };\n}\nexport default createTaskProcessorWorker(createVectorTilePolygons);\n"],"names":["Cartesian3","Ellipsoid","Rectangle","Color","OrientedBoundingBox","Cartographic","defined","AttributeCompression","CesiumMath","IndexDatatype"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EAYA,IAAI,aAAa,GAAG,IAAIA,qBAAU,EAAE,CAAC;EACrC,IAAI,gBAAgB,GAAG,IAAIC,oBAAS,EAAE,CAAC;EACvC,IAAI,gBAAgB,GAAG,IAAIC,oBAAS,EAAE,CAAC;EACvC,IAAI,cAAc,GAAG;EACrB,EAAE,GAAG,EAAE,SAAS;EAChB,EAAE,GAAG,EAAE,SAAS;EAChB,EAAE,oBAAoB,EAAE,SAAS;EACjC,CAAC,CAAC;AACF;EACA,SAAS,YAAY,CAAC,MAAM,EAAE;EAC9B,EAAE,IAAI,YAAY,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;AAC9C;EACA,EAAE,IAAI,MAAM,GAAG,CAAC,CAAC;EACjB,EAAE,cAAc,CAAC,oBAAoB,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;AAC/D;EACA,EAAE,cAAc,CAAC,GAAG,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;EAC9C,EAAE,cAAc,CAAC,GAAG,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;AAC9C;EACA,EAAEF,qBAAU,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;EACzD,EAAE,MAAM,IAAIA,qBAAU,CAAC,YAAY,CAAC;AACpC;EACA,EAAEC,oBAAS,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC;EAC3D,EAAE,MAAM,IAAIA,oBAAS,CAAC,YAAY,CAAC;AACnC;EACA,EAAEC,oBAAS,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC;EAC3D,CAAC;AACD;EACA,SAAS,0BAA0B,CAAC,cAAc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