@loaders.gl/potree 4.0.0-alpha.24 → 4.0.0-alpha.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dist.min.js +1 -1
- package/dist/es5/parsers/parse-potree-hierarchy-chunk.js.map +1 -1
- package/dist/es5/potree-hierarchy-chunk-loader.js +2 -5
- package/dist/es5/potree-hierarchy-chunk-loader.js.map +1 -1
- package/dist/es5/potree-loader.js +1 -1
- package/dist/esm/parsers/parse-potree-hierarchy-chunk.js.map +1 -1
- package/dist/esm/potree-hierarchy-chunk-loader.js +1 -1
- package/dist/esm/potree-hierarchy-chunk-loader.js.map +1 -1
- package/dist/esm/potree-loader.js +1 -1
- package/dist/parsers/parse-potree-hierarchy-chunk.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/parsers/parse-potree-hierarchy-chunk.ts +3 -1
- package/src/potree-hierarchy-chunk-loader.ts +1 -1
package/dist/dist.min.js
CHANGED
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
name: "potree Hierarchy Chunk",
|
|
115
115
|
extensions: ["hrc"],
|
|
116
116
|
mimeTypes: ["application/octet-stream"],
|
|
117
|
-
parse: async (arrayBuffer, options) =>
|
|
117
|
+
parse: async (arrayBuffer, options) => parsePotreeHierarchyChunk(arrayBuffer),
|
|
118
118
|
parseSync: (arrayBuffer, options) => parsePotreeHierarchyChunk(arrayBuffer),
|
|
119
119
|
binary: true
|
|
120
120
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-potree-hierarchy-chunk.js","names":["parsePotreeHierarchyChunk","arrayBuffer","tileHeaders","parseBinaryChunk","buildHierarchy","byteOffset","arguments","length","undefined","dataView","DataView","stack","topTileHeader","decodeRow","push","snode","shift","mask","i","header","childMask","tileHeader","name","childCount","byteLength","getUint8","pointCount","getUint32","options","DEFAULT_OPTIONS","spacing","_objectSpread","topNode","nodes","_iterator","_createForOfIteratorHelper","_step","s","n","done","_options","value","index","parseInt","charAt","parentName","substring","parentNode","level","hasChildren","children","childrenByIndex","Array","fill","Math","pow","err","e","f"],"sources":["../../../src/parsers/parse-potree-hierarchy-chunk.ts"],"sourcesContent":["// This file is derived from the Cesium code base under BSD 2-clause license\n// See LICENSE.md and https://github.com/potree/potree/blob/develop/LICENSE\n\n// Potree Hierarchy Chunk file format\n// https://github.com/potree/potree/blob/develop/docs/potree-file-format.md#index-files\n\n/*\n### Hierarchy Chunk Files\n\nAs mentioned in the former section, the `.hrc` files contain the index structure\nmeaning a list of all the files stored within the directory tree.\n\nAn index file contains a list of tuple values with the first being a `uint8`\n\"mask\" and the second being `uint32` \"number of points\" of a hierarchy level\nin a [breadth first level order][breadth-first].\n\nPer hierarchy level we have 8 possible nodes. To indicate whether a node exists\na simple binary mask is used:\n\n| Position | Mask | [Binary][bin] |\n|----------|------|---------------|\n| 0 | 1 | 0b00000001 |\n| 1 | 2 | 0b00000010 |\n| 2 | 4 | 0b00000100 |\n| 3 | 8 | 0b00001000 |\n| 4 | 16 | 0b00010000 |\n| 5 | 32 | 0b00100000 |\n| 6 | 64 | 0b01000000 |\n| 7 | 128 | 0b10000000 |\n\nSo if in a hierarchy the child node 3 and node 7 exist then the hierarchies\nmask has to be `0b00001000 | 0b10000000` → `0b10001000` (=136).\n\n_Example:_ A simple, non-realistic tree:\n\n```\n|- r1\n| |\n| \\- r14 (2 Points)\n|\n\\- r3\n |\n \\- r36 (1 Point)\n```\n\nWould have an index looking like this:\n\n| name | mask | points |\n|------|--------------------|--------|\n| r | `0b00001010` (=10) | `3` |\n| r1 | `0b00010000` (=16) | `2` |\n| r3 | `0b01000000` (=64) | `1` |\n| r14 | `0b00000000` (=0) | `2` |\n| r36 | `0b00000000` (=0) | `1` |\n*/\n\n/** @todo these types are an incorrect mess */\nexport type POTreeTileHeader = {\n childCount: number;\n name: string;\n childMask: number;\n};\n\n/** @todo these types are an incorrect mess */\nexport type POTreeNode = {\n header: POTreeTileHeader;\n name: string;\n pointCount: number;\n children: POTreeNode[];\n childrenByIndex: POTreeNode[];\n};\n\n// load hierarchy\nexport function parsePotreeHierarchyChunk(arrayBuffer: ArrayBuffer) {\n const tileHeaders = parseBinaryChunk(arrayBuffer);\n return buildHierarchy(tileHeaders);\n}\n\n// Parses the binary rows\nfunction parseBinaryChunk(arrayBuffer: ArrayBuffer, byteOffset = 0) {\n const dataView = new DataView(arrayBuffer);\n\n const stack: POTreeNode[] = [];\n\n // Get root mask\n // @ts-expect-error\n const topTileHeader:
|
|
1
|
+
{"version":3,"file":"parse-potree-hierarchy-chunk.js","names":["parsePotreeHierarchyChunk","arrayBuffer","tileHeaders","parseBinaryChunk","buildHierarchy","byteOffset","arguments","length","undefined","dataView","DataView","stack","topTileHeader","decodeRow","push","snode","shift","mask","i","header","childMask","tileHeader","name","childCount","byteLength","getUint8","pointCount","getUint32","options","DEFAULT_OPTIONS","spacing","_objectSpread","topNode","nodes","_iterator","_createForOfIteratorHelper","_step","s","n","done","_options","value","index","parseInt","charAt","parentName","substring","parentNode","level","hasChildren","children","childrenByIndex","Array","fill","Math","pow","err","e","f"],"sources":["../../../src/parsers/parse-potree-hierarchy-chunk.ts"],"sourcesContent":["// This file is derived from the Cesium code base under BSD 2-clause license\n// See LICENSE.md and https://github.com/potree/potree/blob/develop/LICENSE\n\n// Potree Hierarchy Chunk file format\n// https://github.com/potree/potree/blob/develop/docs/potree-file-format.md#index-files\n\n/*\n### Hierarchy Chunk Files\n\nAs mentioned in the former section, the `.hrc` files contain the index structure\nmeaning a list of all the files stored within the directory tree.\n\nAn index file contains a list of tuple values with the first being a `uint8`\n\"mask\" and the second being `uint32` \"number of points\" of a hierarchy level\nin a [breadth first level order][breadth-first].\n\nPer hierarchy level we have 8 possible nodes. To indicate whether a node exists\na simple binary mask is used:\n\n| Position | Mask | [Binary][bin] |\n|----------|------|---------------|\n| 0 | 1 | 0b00000001 |\n| 1 | 2 | 0b00000010 |\n| 2 | 4 | 0b00000100 |\n| 3 | 8 | 0b00001000 |\n| 4 | 16 | 0b00010000 |\n| 5 | 32 | 0b00100000 |\n| 6 | 64 | 0b01000000 |\n| 7 | 128 | 0b10000000 |\n\nSo if in a hierarchy the child node 3 and node 7 exist then the hierarchies\nmask has to be `0b00001000 | 0b10000000` → `0b10001000` (=136).\n\n_Example:_ A simple, non-realistic tree:\n\n```\n|- r1\n| |\n| \\- r14 (2 Points)\n|\n\\- r3\n |\n \\- r36 (1 Point)\n```\n\nWould have an index looking like this:\n\n| name | mask | points |\n|------|--------------------|--------|\n| r | `0b00001010` (=10) | `3` |\n| r1 | `0b00010000` (=16) | `2` |\n| r3 | `0b01000000` (=64) | `1` |\n| r14 | `0b00000000` (=0) | `2` |\n| r36 | `0b00000000` (=0) | `1` |\n*/\n\n/** @todo these types are an incorrect mess */\nexport type POTreeTileHeader = {\n childCount: number;\n name: string;\n childMask: number;\n};\n\n/** @todo these types are an incorrect mess */\nexport type POTreeNode = {\n header: POTreeTileHeader;\n name: string;\n pointCount: number;\n children: POTreeNode[];\n childrenByIndex: POTreeNode[];\n};\n\n// type POTreeTileNode = POTreeNode;\n\n// load hierarchy\nexport function parsePotreeHierarchyChunk(arrayBuffer: ArrayBuffer) {\n const tileHeaders = parseBinaryChunk(arrayBuffer);\n return buildHierarchy(tileHeaders);\n}\n\n// Parses the binary rows\nfunction parseBinaryChunk(arrayBuffer: ArrayBuffer, byteOffset = 0) {\n const dataView = new DataView(arrayBuffer);\n\n const stack: POTreeNode[] = [];\n\n // Get root mask\n // @ts-expect-error\n const topTileHeader: POTreeNode = {};\n byteOffset = decodeRow(dataView, byteOffset, topTileHeader);\n\n stack.push(topTileHeader);\n\n const tileHeaders: POTreeTileHeader[] = [];\n\n while (stack.length > 0) {\n const snode = stack.shift();\n let mask = 1;\n\n for (let i = 0; i < 8; i++) {\n if (snode && (snode.header.childMask & mask) !== 0) {\n // @ts-expect-error\n const tileHeader: POTreeTileHeader = {};\n byteOffset = decodeRow(dataView, byteOffset, tileHeader);\n tileHeader.name = snode.name + i;\n\n // @ts-expect-error\n stack.push(tileHeader);\n tileHeaders.push(tileHeader);\n snode.header.childCount++;\n }\n mask = mask * 2;\n }\n\n if (byteOffset === dataView.byteLength) {\n break;\n }\n }\n\n return tileHeaders;\n}\n\nfunction decodeRow(dataView, byteOffset, tileHeader) {\n tileHeader.header = tileHeader.header || {};\n tileHeader.header.childMask = dataView.getUint8(byteOffset);\n tileHeader.header.childCount = 0;\n tileHeader.pointCount = dataView.getUint32(byteOffset + 1, true);\n tileHeader.name = '';\n byteOffset += 5;\n return byteOffset;\n}\n\n// Resolves the binary rows into a hierarchy (tree structure)\nfunction buildHierarchy(tileHeaders, options: {spacing?: number} = {}): POTreeNode {\n const DEFAULT_OPTIONS = {spacing: 100}; // TODO assert instead of default?\n options = {...DEFAULT_OPTIONS, ...options};\n\n const topNode = tileHeaders[0];\n const nodes = {};\n\n for (const tileHeader of tileHeaders) {\n const {name} = tileHeader;\n\n const index = parseInt(name.charAt(name.length - 1), 10);\n const parentName = name.substring(0, name.length - 1);\n const parentNode = nodes[parentName];\n const level = name.length - 1;\n // assert(parentNode && level >= 0);\n\n tileHeader.level = level;\n tileHeader.hasChildren = tileHeader.header.childCount;\n tileHeader.children = [];\n tileHeader.childrenByIndex = new Array(8).fill(null);\n tileHeader.spacing = (options?.spacing || 0) / Math.pow(2, level);\n // tileHeader.boundingVolume = Utils.createChildAABB(parentNode.boundingBox, index);\n\n if (parentNode) {\n parentNode.children.push(tileHeader);\n parentNode.childrenByIndex[index] = tileHeader;\n }\n\n // Add the node to the map\n nodes[name] = tileHeader;\n }\n\n // First node is the root\n return topNode;\n}\n"],"mappings":";;;;;;;;;;;;;AA2EO,SAASA,yBAAyBA,CAACC,WAAwB,EAAE;EAClE,IAAMC,WAAW,GAAGC,gBAAgB,CAACF,WAAW,CAAC;EACjD,OAAOG,cAAc,CAACF,WAAW,CAAC;AACpC;AAGA,SAASC,gBAAgBA,CAACF,WAAwB,EAAkB;EAAA,IAAhBI,UAAU,GAAAC,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AC,CAAC;MACrD,IAAMwC,UAAU,GAAGd,KAAK,CAACY,UAAU,CAAC;MACpC,IAAMG,KAAK,GAAG1B,IAAI,CAACf,MAAM,GAAG,CAAC;MAG7Bc,UAAU,CAAC2B,KAAK,GAAGA,KAAK;MACxB3B,UAAU,CAAC4B,WAAW,GAAG5B,UAAU,CAACF,MAAM,CAACI,UAAU;MACrDF,UAAU,CAAC6B,QAAQ,GAAG,EAAE;MACxB7B,UAAU,CAAC8B,eAAe,GAAG,IAAIC,KAAK,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;MACpDhC,UAAU,CAACS,OAAO,GAAG,CAAC,EAAAU,QAAA,GAAAZ,OAAO,cAAAY,QAAA,uBAAPA,QAAA,CAASV,OAAO,KAAI,CAAC,IAAIwB,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEP,KAAK,CAAC;MAGjE,IAAID,UAAU,EAAE;QACdA,UAAU,CAACG,QAAQ,CAACpC,IAAI,CAACO,UAAU,CAAC;QACpC0B,UAAU,CAACI,eAAe,CAACT,KAAK,CAAC,GAAGrB,UAAU;MAChD;MAGAY,KAAK,CAACX,IAAI,CAAC,GAAGD,UAAU;IAC1B;EAAC,SAAAmC,GAAA;IAAAtB,SAAA,CAAAuB,CAAA,CAAAD,GAAA;EAAA;IAAAtB,SAAA,CAAAwB,CAAA;EAAA;EAGD,OAAO1B,OAAO;AAChB"}
|
|
@@ -18,11 +18,8 @@ var PotreeHierarchyChunkLoader = {
|
|
|
18
18
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
19
19
|
while (1) switch (_context.prev = _context.next) {
|
|
20
20
|
case 0:
|
|
21
|
-
_context.
|
|
22
|
-
|
|
23
|
-
case 2:
|
|
24
|
-
return _context.abrupt("return", _context.sent);
|
|
25
|
-
case 3:
|
|
21
|
+
return _context.abrupt("return", (0, _parsePotreeHierarchyChunk.parsePotreeHierarchyChunk)(arrayBuffer));
|
|
22
|
+
case 1:
|
|
26
23
|
case "end":
|
|
27
24
|
return _context.stop();
|
|
28
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"potree-hierarchy-chunk-loader.js","names":["_parsePotreeHierarchyChunk","require","PotreeHierarchyChunkLoader","id","name","extensions","mimeTypes","parse","_parse","_asyncToGenerator2","default","_regenerator","mark","_callee","arrayBuffer","options","wrap","_callee$","_context","prev","next","
|
|
1
|
+
{"version":3,"file":"potree-hierarchy-chunk-loader.js","names":["_parsePotreeHierarchyChunk","require","PotreeHierarchyChunkLoader","id","name","extensions","mimeTypes","parse","_parse","_asyncToGenerator2","default","_regenerator","mark","_callee","arrayBuffer","options","wrap","_callee$","_context","prev","next","abrupt","parsePotreeHierarchyChunk","stop","_x","_x2","apply","arguments","parseSync","binary","exports"],"sources":["../../src/potree-hierarchy-chunk-loader.ts"],"sourcesContent":["import type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport type {POTreeLoaderOptions} from './potree-loader';\nimport type {POTreeNode} from './parsers/parse-potree-hierarchy-chunk';\nimport {parsePotreeHierarchyChunk} from './parsers/parse-potree-hierarchy-chunk';\n\n/** Potree hierarchy chunk loader */\n// @ts-ignore not a valid loader\nexport const PotreeHierarchyChunkLoader: LoaderWithParser<POTreeNode, never, POTreeLoaderOptions> =\n {\n id: 'potree',\n name: 'potree Hierarchy Chunk',\n extensions: ['hrc'],\n mimeTypes: ['application/octet-stream'],\n // binary potree files have no header bytes, no content test function possible\n // test: ['...'],\n parse: async (arrayBuffer, options) => parsePotreeHierarchyChunk(arrayBuffer),\n parseSync: (arrayBuffer, options) => parsePotreeHierarchyChunk(arrayBuffer),\n binary: true\n };\n"],"mappings":";;;;;;;;;AAGA,IAAAA,0BAAA,GAAAC,OAAA;AAIO,IAAMC,0BAAoF,GAC/F;EACEC,EAAE,EAAE,QAAQ;EACZC,IAAI,EAAE,wBAAwB;EAC9BC,UAAU,EAAE,CAAC,KAAK,CAAC;EACnBC,SAAS,EAAE,CAAC,0BAA0B,CAAC;EAGvCC,KAAK;IAAA,IAAAC,MAAA,OAAAC,kBAAA,CAAAC,OAAA,EAAAC,YAAA,CAAAD,OAAA,CAAAE,IAAA,CAAE,SAAAC,QAAOC,WAAW,EAAEC,OAAO;MAAA,OAAAJ,YAAA,CAAAD,OAAA,CAAAM,IAAA,UAAAC,SAAAC,QAAA;QAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;UAAA;YAAA,OAAAF,QAAA,CAAAG,MAAA,WAAK,IAAAC,oDAAyB,EAACR,WAAW,CAAC;UAAA;UAAA;YAAA,OAAAI,QAAA,CAAAK,IAAA;QAAA;MAAA,GAAAV,OAAA;IAAA;IAAA,SAAAN,MAAAiB,EAAA,EAAAC,GAAA;MAAA,OAAAjB,MAAA,CAAAkB,KAAA,OAAAC,SAAA;IAAA;IAAA,OAAApB,KAAA;EAAA;EAC7EqB,SAAS,EAAE,SAAAA,UAACd,WAAW,EAAEC,OAAO;IAAA,OAAK,IAAAO,oDAAyB,EAACR,WAAW,CAAC;EAAA;EAC3Ee,MAAM,EAAE;AACV,CAAC;AAACC,OAAA,CAAA5B,0BAAA,GAAAA,0BAAA"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.PotreeLoader = void 0;
|
|
7
|
-
var VERSION = typeof "4.0.0-alpha.
|
|
7
|
+
var VERSION = typeof "4.0.0-alpha.25" !== 'undefined' ? "4.0.0-alpha.25" : 'latest';
|
|
8
8
|
var PotreeLoader = {
|
|
9
9
|
name: 'potree',
|
|
10
10
|
id: 'potree',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-potree-hierarchy-chunk.js","names":["parsePotreeHierarchyChunk","arrayBuffer","tileHeaders","parseBinaryChunk","buildHierarchy","byteOffset","arguments","length","undefined","dataView","DataView","stack","topTileHeader","decodeRow","push","snode","shift","mask","i","header","childMask","tileHeader","name","childCount","byteLength","getUint8","pointCount","getUint32","options","DEFAULT_OPTIONS","spacing","topNode","nodes","_options","index","parseInt","charAt","parentName","substring","parentNode","level","hasChildren","children","childrenByIndex","Array","fill","Math","pow"],"sources":["../../../src/parsers/parse-potree-hierarchy-chunk.ts"],"sourcesContent":["// This file is derived from the Cesium code base under BSD 2-clause license\n// See LICENSE.md and https://github.com/potree/potree/blob/develop/LICENSE\n\n// Potree Hierarchy Chunk file format\n// https://github.com/potree/potree/blob/develop/docs/potree-file-format.md#index-files\n\n/*\n### Hierarchy Chunk Files\n\nAs mentioned in the former section, the `.hrc` files contain the index structure\nmeaning a list of all the files stored within the directory tree.\n\nAn index file contains a list of tuple values with the first being a `uint8`\n\"mask\" and the second being `uint32` \"number of points\" of a hierarchy level\nin a [breadth first level order][breadth-first].\n\nPer hierarchy level we have 8 possible nodes. To indicate whether a node exists\na simple binary mask is used:\n\n| Position | Mask | [Binary][bin] |\n|----------|------|---------------|\n| 0 | 1 | 0b00000001 |\n| 1 | 2 | 0b00000010 |\n| 2 | 4 | 0b00000100 |\n| 3 | 8 | 0b00001000 |\n| 4 | 16 | 0b00010000 |\n| 5 | 32 | 0b00100000 |\n| 6 | 64 | 0b01000000 |\n| 7 | 128 | 0b10000000 |\n\nSo if in a hierarchy the child node 3 and node 7 exist then the hierarchies\nmask has to be `0b00001000 | 0b10000000` → `0b10001000` (=136).\n\n_Example:_ A simple, non-realistic tree:\n\n```\n|- r1\n| |\n| \\- r14 (2 Points)\n|\n\\- r3\n |\n \\- r36 (1 Point)\n```\n\nWould have an index looking like this:\n\n| name | mask | points |\n|------|--------------------|--------|\n| r | `0b00001010` (=10) | `3` |\n| r1 | `0b00010000` (=16) | `2` |\n| r3 | `0b01000000` (=64) | `1` |\n| r14 | `0b00000000` (=0) | `2` |\n| r36 | `0b00000000` (=0) | `1` |\n*/\n\n/** @todo these types are an incorrect mess */\nexport type POTreeTileHeader = {\n childCount: number;\n name: string;\n childMask: number;\n};\n\n/** @todo these types are an incorrect mess */\nexport type POTreeNode = {\n header: POTreeTileHeader;\n name: string;\n pointCount: number;\n children: POTreeNode[];\n childrenByIndex: POTreeNode[];\n};\n\n// load hierarchy\nexport function parsePotreeHierarchyChunk(arrayBuffer: ArrayBuffer) {\n const tileHeaders = parseBinaryChunk(arrayBuffer);\n return buildHierarchy(tileHeaders);\n}\n\n// Parses the binary rows\nfunction parseBinaryChunk(arrayBuffer: ArrayBuffer, byteOffset = 0) {\n const dataView = new DataView(arrayBuffer);\n\n const stack: POTreeNode[] = [];\n\n // Get root mask\n // @ts-expect-error\n const topTileHeader:
|
|
1
|
+
{"version":3,"file":"parse-potree-hierarchy-chunk.js","names":["parsePotreeHierarchyChunk","arrayBuffer","tileHeaders","parseBinaryChunk","buildHierarchy","byteOffset","arguments","length","undefined","dataView","DataView","stack","topTileHeader","decodeRow","push","snode","shift","mask","i","header","childMask","tileHeader","name","childCount","byteLength","getUint8","pointCount","getUint32","options","DEFAULT_OPTIONS","spacing","topNode","nodes","_options","index","parseInt","charAt","parentName","substring","parentNode","level","hasChildren","children","childrenByIndex","Array","fill","Math","pow"],"sources":["../../../src/parsers/parse-potree-hierarchy-chunk.ts"],"sourcesContent":["// This file is derived from the Cesium code base under BSD 2-clause license\n// See LICENSE.md and https://github.com/potree/potree/blob/develop/LICENSE\n\n// Potree Hierarchy Chunk file format\n// https://github.com/potree/potree/blob/develop/docs/potree-file-format.md#index-files\n\n/*\n### Hierarchy Chunk Files\n\nAs mentioned in the former section, the `.hrc` files contain the index structure\nmeaning a list of all the files stored within the directory tree.\n\nAn index file contains a list of tuple values with the first being a `uint8`\n\"mask\" and the second being `uint32` \"number of points\" of a hierarchy level\nin a [breadth first level order][breadth-first].\n\nPer hierarchy level we have 8 possible nodes. To indicate whether a node exists\na simple binary mask is used:\n\n| Position | Mask | [Binary][bin] |\n|----------|------|---------------|\n| 0 | 1 | 0b00000001 |\n| 1 | 2 | 0b00000010 |\n| 2 | 4 | 0b00000100 |\n| 3 | 8 | 0b00001000 |\n| 4 | 16 | 0b00010000 |\n| 5 | 32 | 0b00100000 |\n| 6 | 64 | 0b01000000 |\n| 7 | 128 | 0b10000000 |\n\nSo if in a hierarchy the child node 3 and node 7 exist then the hierarchies\nmask has to be `0b00001000 | 0b10000000` → `0b10001000` (=136).\n\n_Example:_ A simple, non-realistic tree:\n\n```\n|- r1\n| |\n| \\- r14 (2 Points)\n|\n\\- r3\n |\n \\- r36 (1 Point)\n```\n\nWould have an index looking like this:\n\n| name | mask | points |\n|------|--------------------|--------|\n| r | `0b00001010` (=10) | `3` |\n| r1 | `0b00010000` (=16) | `2` |\n| r3 | `0b01000000` (=64) | `1` |\n| r14 | `0b00000000` (=0) | `2` |\n| r36 | `0b00000000` (=0) | `1` |\n*/\n\n/** @todo these types are an incorrect mess */\nexport type POTreeTileHeader = {\n childCount: number;\n name: string;\n childMask: number;\n};\n\n/** @todo these types are an incorrect mess */\nexport type POTreeNode = {\n header: POTreeTileHeader;\n name: string;\n pointCount: number;\n children: POTreeNode[];\n childrenByIndex: POTreeNode[];\n};\n\n// type POTreeTileNode = POTreeNode;\n\n// load hierarchy\nexport function parsePotreeHierarchyChunk(arrayBuffer: ArrayBuffer) {\n const tileHeaders = parseBinaryChunk(arrayBuffer);\n return buildHierarchy(tileHeaders);\n}\n\n// Parses the binary rows\nfunction parseBinaryChunk(arrayBuffer: ArrayBuffer, byteOffset = 0) {\n const dataView = new DataView(arrayBuffer);\n\n const stack: POTreeNode[] = [];\n\n // Get root mask\n // @ts-expect-error\n const topTileHeader: POTreeNode = {};\n byteOffset = decodeRow(dataView, byteOffset, topTileHeader);\n\n stack.push(topTileHeader);\n\n const tileHeaders: POTreeTileHeader[] = [];\n\n while (stack.length > 0) {\n const snode = stack.shift();\n let mask = 1;\n\n for (let i = 0; i < 8; i++) {\n if (snode && (snode.header.childMask & mask) !== 0) {\n // @ts-expect-error\n const tileHeader: POTreeTileHeader = {};\n byteOffset = decodeRow(dataView, byteOffset, tileHeader);\n tileHeader.name = snode.name + i;\n\n // @ts-expect-error\n stack.push(tileHeader);\n tileHeaders.push(tileHeader);\n snode.header.childCount++;\n }\n mask = mask * 2;\n }\n\n if (byteOffset === dataView.byteLength) {\n break;\n }\n }\n\n return tileHeaders;\n}\n\nfunction decodeRow(dataView, byteOffset, tileHeader) {\n tileHeader.header = tileHeader.header || {};\n tileHeader.header.childMask = dataView.getUint8(byteOffset);\n tileHeader.header.childCount = 0;\n tileHeader.pointCount = dataView.getUint32(byteOffset + 1, true);\n tileHeader.name = '';\n byteOffset += 5;\n return byteOffset;\n}\n\n// Resolves the binary rows into a hierarchy (tree structure)\nfunction buildHierarchy(tileHeaders, options: {spacing?: number} = {}): POTreeNode {\n const DEFAULT_OPTIONS = {spacing: 100}; // TODO assert instead of default?\n options = {...DEFAULT_OPTIONS, ...options};\n\n const topNode = tileHeaders[0];\n const nodes = {};\n\n for (const tileHeader of tileHeaders) {\n const {name} = tileHeader;\n\n const index = parseInt(name.charAt(name.length - 1), 10);\n const parentName = name.substring(0, name.length - 1);\n const parentNode = nodes[parentName];\n const level = name.length - 1;\n // assert(parentNode && level >= 0);\n\n tileHeader.level = level;\n tileHeader.hasChildren = tileHeader.header.childCount;\n tileHeader.children = [];\n tileHeader.childrenByIndex = new Array(8).fill(null);\n tileHeader.spacing = (options?.spacing || 0) / Math.pow(2, level);\n // tileHeader.boundingVolume = Utils.createChildAABB(parentNode.boundingBox, index);\n\n if (parentNode) {\n parentNode.children.push(tileHeader);\n parentNode.childrenByIndex[index] = tileHeader;\n }\n\n // Add the node to the map\n nodes[name] = tileHeader;\n }\n\n // First node is the root\n return topNode;\n}\n"],"mappings":"AA2EA,OAAO,SAASA,yBAAyBA,CAACC,WAAwB,EAAE;EAClE,MAAMC,WAAW,GAAGC,gBAAgB,CAACF,WAAW,CAAC;EACjD,OAAOG,cAAc,CAACF,WAAW,CAAC;AACpC;AAGA,SAASC,gBAAgBA,CAACF,WAAwB,EAAkB;EAAA,IAAhBI,UAAU,GAAAC,SAAA,CAAA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GAAGpB,UAAU,CAACF,MAAM,CAACI,UAAU;IACrDF,UAAU,CAACqB,QAAQ,GAAG,EAAE;IACxBrB,UAAU,CAACsB,eAAe,GAAG,IAAIC,KAAK,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;IACpDxB,UAAU,CAACS,OAAO,GAAG,CAAC,EAAAG,QAAA,GAAAL,OAAO,cAAAK,QAAA,uBAAPA,QAAA,CAASH,OAAO,KAAI,CAAC,IAAIgB,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEP,KAAK,CAAC;IAGjE,IAAID,UAAU,EAAE;MACdA,UAAU,CAACG,QAAQ,CAAC5B,IAAI,CAACO,UAAU,CAAC;MACpCkB,UAAU,CAACI,eAAe,CAACT,KAAK,CAAC,GAAGb,UAAU;IAChD;IAGAW,KAAK,CAACV,IAAI,CAAC,GAAGD,UAAU;EAC1B;EAGA,OAAOU,OAAO;AAChB"}
|
|
@@ -4,7 +4,7 @@ export const PotreeHierarchyChunkLoader = {
|
|
|
4
4
|
name: 'potree Hierarchy Chunk',
|
|
5
5
|
extensions: ['hrc'],
|
|
6
6
|
mimeTypes: ['application/octet-stream'],
|
|
7
|
-
parse: async (arrayBuffer, options) =>
|
|
7
|
+
parse: async (arrayBuffer, options) => parsePotreeHierarchyChunk(arrayBuffer),
|
|
8
8
|
parseSync: (arrayBuffer, options) => parsePotreeHierarchyChunk(arrayBuffer),
|
|
9
9
|
binary: true
|
|
10
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"potree-hierarchy-chunk-loader.js","names":["parsePotreeHierarchyChunk","PotreeHierarchyChunkLoader","id","name","extensions","mimeTypes","parse","arrayBuffer","options","parseSync","binary"],"sources":["../../src/potree-hierarchy-chunk-loader.ts"],"sourcesContent":["import type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport type {POTreeLoaderOptions} from './potree-loader';\nimport type {POTreeNode} from './parsers/parse-potree-hierarchy-chunk';\nimport {parsePotreeHierarchyChunk} from './parsers/parse-potree-hierarchy-chunk';\n\n/** Potree hierarchy chunk loader */\n// @ts-ignore not a valid loader\nexport const PotreeHierarchyChunkLoader: LoaderWithParser<POTreeNode, never, POTreeLoaderOptions> =\n {\n id: 'potree',\n name: 'potree Hierarchy Chunk',\n extensions: ['hrc'],\n mimeTypes: ['application/octet-stream'],\n // binary potree files have no header bytes, no content test function possible\n // test: ['...'],\n parse: async (arrayBuffer, options) =>
|
|
1
|
+
{"version":3,"file":"potree-hierarchy-chunk-loader.js","names":["parsePotreeHierarchyChunk","PotreeHierarchyChunkLoader","id","name","extensions","mimeTypes","parse","arrayBuffer","options","parseSync","binary"],"sources":["../../src/potree-hierarchy-chunk-loader.ts"],"sourcesContent":["import type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport type {POTreeLoaderOptions} from './potree-loader';\nimport type {POTreeNode} from './parsers/parse-potree-hierarchy-chunk';\nimport {parsePotreeHierarchyChunk} from './parsers/parse-potree-hierarchy-chunk';\n\n/** Potree hierarchy chunk loader */\n// @ts-ignore not a valid loader\nexport const PotreeHierarchyChunkLoader: LoaderWithParser<POTreeNode, never, POTreeLoaderOptions> =\n {\n id: 'potree',\n name: 'potree Hierarchy Chunk',\n extensions: ['hrc'],\n mimeTypes: ['application/octet-stream'],\n // binary potree files have no header bytes, no content test function possible\n // test: ['...'],\n parse: async (arrayBuffer, options) => parsePotreeHierarchyChunk(arrayBuffer),\n parseSync: (arrayBuffer, options) => parsePotreeHierarchyChunk(arrayBuffer),\n binary: true\n };\n"],"mappings":"AAGA,SAAQA,yBAAyB,QAAO,wCAAwC;AAIhF,OAAO,MAAMC,0BAAoF,GAC/F;EACEC,EAAE,EAAE,QAAQ;EACZC,IAAI,EAAE,wBAAwB;EAC9BC,UAAU,EAAE,CAAC,KAAK,CAAC;EACnBC,SAAS,EAAE,CAAC,0BAA0B,CAAC;EAGvCC,KAAK,EAAE,MAAAA,CAAOC,WAAW,EAAEC,OAAO,KAAKR,yBAAyB,CAACO,WAAW,CAAC;EAC7EE,SAAS,EAAEA,CAACF,WAAW,EAAEC,OAAO,KAAKR,yBAAyB,CAACO,WAAW,CAAC;EAC3EG,MAAM,EAAE;AACV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-potree-hierarchy-chunk.d.ts","sourceRoot":"","sources":["../../src/parsers/parse-potree-hierarchy-chunk.ts"],"names":[],"mappings":"AAwDA,8CAA8C;AAC9C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,8CAA8C;AAC9C,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,EAAE,gBAAgB,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,eAAe,EAAE,UAAU,EAAE,CAAC;CAC/B,CAAC;
|
|
1
|
+
{"version":3,"file":"parse-potree-hierarchy-chunk.d.ts","sourceRoot":"","sources":["../../src/parsers/parse-potree-hierarchy-chunk.ts"],"names":[],"mappings":"AAwDA,8CAA8C;AAC9C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,8CAA8C;AAC9C,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,EAAE,gBAAgB,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,eAAe,EAAE,UAAU,EAAE,CAAC;CAC/B,CAAC;AAKF,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,WAAW,cAGjE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/potree",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.25",
|
|
4
4
|
"description": "potree loaders for large point clouds.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"build-bundle": "esbuild src/bundle.ts --bundle --outfile=dist/dist.min.js"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@loaders.gl/math": "4.0.0-alpha.
|
|
38
|
+
"@loaders.gl/math": "4.0.0-alpha.25",
|
|
39
39
|
"@math.gl/core": "^3.5.1"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "40135f391b869388dbbcd615bbe51178d0c370be"
|
|
42
42
|
}
|
|
@@ -70,6 +70,8 @@ export type POTreeNode = {
|
|
|
70
70
|
childrenByIndex: POTreeNode[];
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
+
// type POTreeTileNode = POTreeNode;
|
|
74
|
+
|
|
73
75
|
// load hierarchy
|
|
74
76
|
export function parsePotreeHierarchyChunk(arrayBuffer: ArrayBuffer) {
|
|
75
77
|
const tileHeaders = parseBinaryChunk(arrayBuffer);
|
|
@@ -84,7 +86,7 @@ function parseBinaryChunk(arrayBuffer: ArrayBuffer, byteOffset = 0) {
|
|
|
84
86
|
|
|
85
87
|
// Get root mask
|
|
86
88
|
// @ts-expect-error
|
|
87
|
-
const topTileHeader:
|
|
89
|
+
const topTileHeader: POTreeNode = {};
|
|
88
90
|
byteOffset = decodeRow(dataView, byteOffset, topTileHeader);
|
|
89
91
|
|
|
90
92
|
stack.push(topTileHeader);
|
|
@@ -13,7 +13,7 @@ export const PotreeHierarchyChunkLoader: LoaderWithParser<POTreeNode, never, POT
|
|
|
13
13
|
mimeTypes: ['application/octet-stream'],
|
|
14
14
|
// binary potree files have no header bytes, no content test function possible
|
|
15
15
|
// test: ['...'],
|
|
16
|
-
parse: async (arrayBuffer, options) =>
|
|
16
|
+
parse: async (arrayBuffer, options) => parsePotreeHierarchyChunk(arrayBuffer),
|
|
17
17
|
parseSync: (arrayBuffer, options) => parsePotreeHierarchyChunk(arrayBuffer),
|
|
18
18
|
binary: true
|
|
19
19
|
};
|