@loaders.gl/ply 3.4.0-alpha.2 → 3.4.0-alpha.4
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 +142 -70
- package/dist/es5/index.js +17 -13
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/lib/get-ply-schema.js +0 -1
- package/dist/es5/lib/get-ply-schema.js.map +1 -1
- package/dist/es5/lib/normalize-ply.js +47 -25
- package/dist/es5/lib/normalize-ply.js.map +1 -1
- package/dist/es5/lib/parse-ply-in-batches.js +162 -172
- package/dist/es5/lib/parse-ply-in-batches.js.map +1 -1
- package/dist/es5/lib/parse-ply.js +114 -54
- package/dist/es5/lib/parse-ply.js.map +1 -1
- package/dist/es5/lib/ply-types.js.map +1 -1
- package/dist/es5/ply-loader.js +1 -3
- package/dist/es5/ply-loader.js.map +1 -1
- package/dist/es5/workers/ply-worker.js.map +1 -1
- package/dist/esm/bundle.js +0 -1
- package/dist/esm/bundle.js.map +1 -1
- package/dist/esm/index.js +6 -8
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/get-ply-schema.js +0 -1
- package/dist/esm/lib/get-ply-schema.js.map +1 -1
- package/dist/esm/lib/normalize-ply.js +46 -26
- package/dist/esm/lib/normalize-ply.js.map +1 -1
- package/dist/esm/lib/parse-ply-in-batches.js +18 -27
- package/dist/esm/lib/parse-ply-in-batches.js.map +1 -1
- package/dist/esm/lib/parse-ply.js +92 -56
- package/dist/esm/lib/parse-ply.js.map +1 -1
- package/dist/esm/lib/ply-types.js.map +1 -1
- package/dist/esm/ply-loader.js +1 -4
- package/dist/esm/ply-loader.js.map +1 -1
- package/dist/index.d.ts +3 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -9
- package/dist/lib/normalize-ply.js +33 -11
- package/dist/lib/parse-ply-in-batches.d.ts +1 -1
- package/dist/lib/parse-ply-in-batches.d.ts.map +1 -1
- package/dist/lib/parse-ply-in-batches.js +19 -18
- package/dist/lib/parse-ply.d.ts +4 -1
- package/dist/lib/parse-ply.d.ts.map +1 -1
- package/dist/lib/parse-ply.js +103 -47
- package/dist/lib/ply-types.d.ts +19 -11
- package/dist/lib/ply-types.d.ts.map +1 -1
- package/dist/ply-worker.js +143 -71
- package/package.json +4 -4
- package/src/index.ts +6 -6
- package/src/lib/normalize-ply.ts +34 -12
- package/src/lib/parse-ply-in-batches.ts +20 -22
- package/src/lib/parse-ply.ts +114 -55
- package/src/lib/ply-types.ts +21 -12
package/dist/dist.min.js
CHANGED
|
@@ -680,15 +680,36 @@
|
|
|
680
680
|
}
|
|
681
681
|
function getMeshAttributes(attributes) {
|
|
682
682
|
const accessors = {};
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
683
|
+
for (const attributeName of Object.keys(attributes)) {
|
|
684
|
+
switch (attributeName) {
|
|
685
|
+
case "vertices":
|
|
686
|
+
if (attributes.vertices.length > 0) {
|
|
687
|
+
accessors.POSITION = { value: new Float32Array(attributes.vertices), size: 3 };
|
|
688
|
+
}
|
|
689
|
+
break;
|
|
690
|
+
case "normals":
|
|
691
|
+
if (attributes.normals.length > 0) {
|
|
692
|
+
accessors.NORMAL = { value: new Float32Array(attributes.normals), size: 3 };
|
|
693
|
+
}
|
|
694
|
+
break;
|
|
695
|
+
case "uvs":
|
|
696
|
+
if (attributes.uvs.length > 0) {
|
|
697
|
+
accessors.TEXCOORD_0 = { value: new Float32Array(attributes.uvs), size: 2 };
|
|
698
|
+
}
|
|
699
|
+
break;
|
|
700
|
+
case "colors":
|
|
701
|
+
if (attributes.colors.length > 0) {
|
|
702
|
+
accessors.COLOR_0 = { value: new Uint8Array(attributes.colors), size: 3, normalized: true };
|
|
703
|
+
}
|
|
704
|
+
break;
|
|
705
|
+
case "indices":
|
|
706
|
+
break;
|
|
707
|
+
default:
|
|
708
|
+
if (attributes[attributeName].length > 0) {
|
|
709
|
+
accessors[attributeName] = { value: new Float32Array(attributes[attributeName]), size: 1 };
|
|
710
|
+
}
|
|
711
|
+
break;
|
|
712
|
+
}
|
|
692
713
|
}
|
|
693
714
|
return accessors;
|
|
694
715
|
}
|
|
@@ -763,35 +784,72 @@
|
|
|
763
784
|
};
|
|
764
785
|
break;
|
|
765
786
|
case "property":
|
|
766
|
-
if (
|
|
767
|
-
|
|
787
|
+
if (currentElement2) {
|
|
788
|
+
const property = makePLYElementProperty(lineValues);
|
|
789
|
+
if (options?.propertyNameMapping && property.name in options?.propertyNameMapping) {
|
|
790
|
+
property.name = options?.propertyNameMapping[property.name];
|
|
791
|
+
}
|
|
792
|
+
currentElement2.properties.push(property);
|
|
768
793
|
}
|
|
769
|
-
currentElement2.properties.push(makePLYElementProperty(lineValues, options.propertyNameMapping));
|
|
770
794
|
break;
|
|
771
795
|
default:
|
|
772
796
|
console.log("unhandled", lineType, lineValues);
|
|
773
797
|
}
|
|
774
798
|
}
|
|
775
|
-
if (currentElement2
|
|
799
|
+
if (currentElement2) {
|
|
776
800
|
header.elements.push(currentElement2);
|
|
777
801
|
}
|
|
778
802
|
return header;
|
|
779
803
|
}
|
|
780
|
-
function
|
|
781
|
-
const
|
|
782
|
-
|
|
804
|
+
function getPLYAttributes(header) {
|
|
805
|
+
const attributes = {
|
|
806
|
+
indices: [],
|
|
807
|
+
vertices: [],
|
|
808
|
+
normals: [],
|
|
809
|
+
uvs: [],
|
|
810
|
+
colors: []
|
|
783
811
|
};
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
812
|
+
for (const element of header.elements) {
|
|
813
|
+
if (element.name === "vertex") {
|
|
814
|
+
for (const property of element.properties) {
|
|
815
|
+
switch (property.name) {
|
|
816
|
+
case "x":
|
|
817
|
+
case "y":
|
|
818
|
+
case "z":
|
|
819
|
+
case "nx":
|
|
820
|
+
case "ny":
|
|
821
|
+
case "nz":
|
|
822
|
+
case "s":
|
|
823
|
+
case "t":
|
|
824
|
+
case "red":
|
|
825
|
+
case "green":
|
|
826
|
+
case "blue":
|
|
827
|
+
break;
|
|
828
|
+
default:
|
|
829
|
+
attributes[property.name] = [];
|
|
830
|
+
break;
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
}
|
|
790
834
|
}
|
|
791
|
-
|
|
792
|
-
|
|
835
|
+
return attributes;
|
|
836
|
+
}
|
|
837
|
+
function makePLYElementProperty(propertyValues) {
|
|
838
|
+
const type = propertyValues[0];
|
|
839
|
+
switch (type) {
|
|
840
|
+
case "list":
|
|
841
|
+
return {
|
|
842
|
+
type,
|
|
843
|
+
name: propertyValues[3],
|
|
844
|
+
countType: propertyValues[1],
|
|
845
|
+
itemType: propertyValues[2]
|
|
846
|
+
};
|
|
847
|
+
default:
|
|
848
|
+
return {
|
|
849
|
+
type,
|
|
850
|
+
name: propertyValues[1]
|
|
851
|
+
};
|
|
793
852
|
}
|
|
794
|
-
return property;
|
|
795
853
|
}
|
|
796
854
|
function parseASCIINumber(n, type) {
|
|
797
855
|
switch (type) {
|
|
@@ -817,7 +875,7 @@
|
|
|
817
875
|
throw new Error(type);
|
|
818
876
|
}
|
|
819
877
|
}
|
|
820
|
-
function
|
|
878
|
+
function parsePLYElement(properties, line) {
|
|
821
879
|
const values = line.split(/\s+/);
|
|
822
880
|
const element = {};
|
|
823
881
|
for (let i = 0; i < properties.length; i++) {
|
|
@@ -835,13 +893,7 @@
|
|
|
835
893
|
return element;
|
|
836
894
|
}
|
|
837
895
|
function parseASCII(data, header) {
|
|
838
|
-
const attributes =
|
|
839
|
-
indices: [],
|
|
840
|
-
vertices: [],
|
|
841
|
-
normals: [],
|
|
842
|
-
uvs: [],
|
|
843
|
-
colors: []
|
|
844
|
-
};
|
|
896
|
+
const attributes = getPLYAttributes(header);
|
|
845
897
|
let result;
|
|
846
898
|
const patternBody = /end_header\s([\s\S]*)$/;
|
|
847
899
|
let body = "";
|
|
@@ -859,7 +911,7 @@
|
|
|
859
911
|
currentElement2++;
|
|
860
912
|
currentElementCount = 0;
|
|
861
913
|
}
|
|
862
|
-
const element =
|
|
914
|
+
const element = parsePLYElement(header.elements[currentElement2].properties, line);
|
|
863
915
|
handleElement(attributes, header.elements[currentElement2].name, element);
|
|
864
916
|
currentElementCount++;
|
|
865
917
|
}
|
|
@@ -868,15 +920,40 @@
|
|
|
868
920
|
}
|
|
869
921
|
function handleElement(buffer, elementName, element = {}) {
|
|
870
922
|
if (elementName === "vertex") {
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
923
|
+
for (const propertyName of Object.keys(element)) {
|
|
924
|
+
switch (propertyName) {
|
|
925
|
+
case "x":
|
|
926
|
+
buffer.vertices.push(element.x, element.y, element.z);
|
|
927
|
+
break;
|
|
928
|
+
case "y":
|
|
929
|
+
case "z":
|
|
930
|
+
break;
|
|
931
|
+
case "nx":
|
|
932
|
+
if ("nx" in element && "ny" in element && "nz" in element) {
|
|
933
|
+
buffer.normals.push(element.nx, element.ny, element.nz);
|
|
934
|
+
}
|
|
935
|
+
break;
|
|
936
|
+
case "ny":
|
|
937
|
+
case "nz":
|
|
938
|
+
break;
|
|
939
|
+
case "s":
|
|
940
|
+
if ("s" in element && "t" in element) {
|
|
941
|
+
buffer.uvs.push(element.s, element.t);
|
|
942
|
+
}
|
|
943
|
+
break;
|
|
944
|
+
case "t":
|
|
945
|
+
break;
|
|
946
|
+
case "red":
|
|
947
|
+
if ("red" in element && "green" in element && "blue" in element) {
|
|
948
|
+
buffer.colors.push(element.red, element.green, element.blue);
|
|
949
|
+
}
|
|
950
|
+
break;
|
|
951
|
+
case "green":
|
|
952
|
+
case "blue":
|
|
953
|
+
break;
|
|
954
|
+
default:
|
|
955
|
+
buffer[propertyName].push(element[propertyName]);
|
|
956
|
+
}
|
|
880
957
|
}
|
|
881
958
|
} else if (elementName === "face") {
|
|
882
959
|
const vertexIndices = element.vertex_indices || element.vertex_index;
|
|
@@ -943,13 +1020,7 @@
|
|
|
943
1020
|
return [element, read];
|
|
944
1021
|
}
|
|
945
1022
|
function parseBinary(data, header) {
|
|
946
|
-
const attributes =
|
|
947
|
-
indices: [],
|
|
948
|
-
vertices: [],
|
|
949
|
-
normals: [],
|
|
950
|
-
uvs: [],
|
|
951
|
-
colors: []
|
|
952
|
-
};
|
|
1023
|
+
const attributes = getPLYAttributes(header);
|
|
953
1024
|
const littleEndian = header.format === "binary_little_endian";
|
|
954
1025
|
const body = new DataView(data, header.headerLength);
|
|
955
1026
|
let result;
|
|
@@ -1089,21 +1160,22 @@
|
|
|
1089
1160
|
}
|
|
1090
1161
|
return header;
|
|
1091
1162
|
}
|
|
1092
|
-
function makePLYElementProperty2(
|
|
1093
|
-
const
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1163
|
+
function makePLYElementProperty2(propertyValues, propertyNameMapping) {
|
|
1164
|
+
const type = propertyValues[0];
|
|
1165
|
+
switch (type) {
|
|
1166
|
+
case "list":
|
|
1167
|
+
return {
|
|
1168
|
+
type,
|
|
1169
|
+
name: propertyValues[3],
|
|
1170
|
+
countType: propertyValues[1],
|
|
1171
|
+
itemType: propertyValues[2]
|
|
1172
|
+
};
|
|
1173
|
+
default:
|
|
1174
|
+
return {
|
|
1175
|
+
type,
|
|
1176
|
+
name: propertyValues[1]
|
|
1177
|
+
};
|
|
1105
1178
|
}
|
|
1106
|
-
return property;
|
|
1107
1179
|
}
|
|
1108
1180
|
async function parseASCII2(lineIterator, header) {
|
|
1109
1181
|
const attributes = {
|
|
@@ -1122,7 +1194,7 @@
|
|
|
1122
1194
|
currentElement2++;
|
|
1123
1195
|
currentElementCount = 0;
|
|
1124
1196
|
}
|
|
1125
|
-
const element =
|
|
1197
|
+
const element = parsePLYElement2(header.elements[currentElement2].properties, line);
|
|
1126
1198
|
handleElement2(attributes, header.elements[currentElement2].name, element);
|
|
1127
1199
|
currentElementCount++;
|
|
1128
1200
|
}
|
|
@@ -1153,7 +1225,7 @@
|
|
|
1153
1225
|
throw new Error(type);
|
|
1154
1226
|
}
|
|
1155
1227
|
}
|
|
1156
|
-
function
|
|
1228
|
+
function parsePLYElement2(properties, line) {
|
|
1157
1229
|
const values = line.split(/\s+/);
|
|
1158
1230
|
const element = {};
|
|
1159
1231
|
for (let i = 0; i < properties.length; i++) {
|
|
@@ -1220,10 +1292,10 @@
|
|
|
1220
1292
|
init_parse_ply_in_batches();
|
|
1221
1293
|
PLYLoader2 = {
|
|
1222
1294
|
...PLYLoader,
|
|
1223
|
-
parse: async (arrayBuffer, options) => parsePLY(arrayBuffer, options),
|
|
1224
|
-
parseTextSync: parsePLY,
|
|
1225
|
-
parseSync: parsePLY,
|
|
1226
|
-
parseInBatches: parsePLYInBatches
|
|
1295
|
+
parse: async (arrayBuffer, options) => parsePLY(arrayBuffer, options?.ply),
|
|
1296
|
+
parseTextSync: (arrayBuffer, options) => parsePLY(arrayBuffer, options?.ply),
|
|
1297
|
+
parseSync: (arrayBuffer, options) => parsePLY(arrayBuffer, options?.ply),
|
|
1298
|
+
parseInBatches: (arrayBuffer, options) => parsePLYInBatches(arrayBuffer, options?.ply)
|
|
1227
1299
|
};
|
|
1228
1300
|
_typecheckPLYLoader = PLYLoader2;
|
|
1229
1301
|
}
|
package/dist/es5/index.js
CHANGED
|
@@ -16,22 +16,20 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
|
|
|
16
16
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
17
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
18
|
var _plyLoader = require("./ply-loader");
|
|
19
|
-
var _parsePly =
|
|
20
|
-
var _parsePlyInBatches =
|
|
19
|
+
var _parsePly = require("./lib/parse-ply");
|
|
20
|
+
var _parsePlyInBatches = require("./lib/parse-ply-in-batches");
|
|
21
21
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
22
22
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
23
|
var PLYLoader = _objectSpread(_objectSpread({}, _plyLoader.PLYLoader), {}, {
|
|
24
24
|
parse: function () {
|
|
25
25
|
var _parse = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee(arrayBuffer, options) {
|
|
26
26
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
27
|
-
while (1) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return _context.stop();
|
|
34
|
-
}
|
|
27
|
+
while (1) switch (_context.prev = _context.next) {
|
|
28
|
+
case 0:
|
|
29
|
+
return _context.abrupt("return", (0, _parsePly.parsePLY)(arrayBuffer, options === null || options === void 0 ? void 0 : options.ply));
|
|
30
|
+
case 1:
|
|
31
|
+
case "end":
|
|
32
|
+
return _context.stop();
|
|
35
33
|
}
|
|
36
34
|
}, _callee);
|
|
37
35
|
}));
|
|
@@ -40,9 +38,15 @@ var PLYLoader = _objectSpread(_objectSpread({}, _plyLoader.PLYLoader), {}, {
|
|
|
40
38
|
}
|
|
41
39
|
return parse;
|
|
42
40
|
}(),
|
|
43
|
-
parseTextSync:
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
parseTextSync: function parseTextSync(arrayBuffer, options) {
|
|
42
|
+
return (0, _parsePly.parsePLY)(arrayBuffer, options === null || options === void 0 ? void 0 : options.ply);
|
|
43
|
+
},
|
|
44
|
+
parseSync: function parseSync(arrayBuffer, options) {
|
|
45
|
+
return (0, _parsePly.parsePLY)(arrayBuffer, options === null || options === void 0 ? void 0 : options.ply);
|
|
46
|
+
},
|
|
47
|
+
parseInBatches: function parseInBatches(arrayBuffer, options) {
|
|
48
|
+
return (0, _parsePlyInBatches.parsePLYInBatches)(arrayBuffer, options === null || options === void 0 ? void 0 : options.ply);
|
|
49
|
+
}
|
|
46
50
|
});
|
|
47
51
|
exports.PLYLoader = PLYLoader;
|
|
48
52
|
var _typecheckPLYLoader = PLYLoader;
|
package/dist/es5/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["PLYLoader","PLYWorkerLoader","parse","arrayBuffer","options","parsePLY","parseTextSync","parseSync","parseInBatches","parsePLYInBatches","_typecheckPLYLoader"],"sources":["../../src/index.ts"],"sourcesContent":["import type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport {PLYLoader as PLYWorkerLoader} from './ply-loader';\nimport parsePLY from './lib/parse-ply';\nimport parsePLYInBatches from './lib/parse-ply-in-batches';\n\n// PLYLoader\n\nexport {PLYWorkerLoader};\n\n/**\n * Loader for PLY - Polygon File Format\n */\nexport const PLYLoader = {\n ...PLYWorkerLoader,\n // Note: parsePLY supports both text and binary\n parse: async (arrayBuffer, options) => parsePLY(arrayBuffer, options), // TODO - this may not detect text correctly?\n parseTextSync: parsePLY,\n parseSync: parsePLY,\n parseInBatches: parsePLYInBatches\n};\n\nexport const _typecheckPLYLoader: LoaderWithParser = PLYLoader;\n"],"mappings":";;;;;;;;;;;;;;;;;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":"index.js","names":["_plyLoader","require","_parsePly","_parsePlyInBatches","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","PLYLoader","PLYWorkerLoader","parse","_parse","_asyncToGenerator2","_regenerator","mark","_callee","arrayBuffer","options","wrap","_callee$","_context","prev","next","abrupt","parsePLY","ply","stop","_x","_x2","parseTextSync","parseSync","parseInBatches","parsePLYInBatches","exports","_typecheckPLYLoader"],"sources":["../../src/index.ts"],"sourcesContent":["import type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport {PLYLoader as PLYWorkerLoader} from './ply-loader';\nimport {parsePLY} from './lib/parse-ply';\nimport {parsePLYInBatches} from './lib/parse-ply-in-batches';\n\n// PLYLoader\n\nexport {PLYWorkerLoader};\n\n/**\n * Loader for PLY - Polygon File Format\n */\nexport const PLYLoader = {\n ...PLYWorkerLoader,\n // Note: parsePLY supports both text and binary\n parse: async (arrayBuffer, options) => parsePLY(arrayBuffer, options?.ply), // TODO - this may not detect text correctly?\n parseTextSync: (arrayBuffer, options) => parsePLY(arrayBuffer, options?.ply),\n parseSync: (arrayBuffer, options) => parsePLY(arrayBuffer, options?.ply),\n parseInBatches: (arrayBuffer, options) => parsePLYInBatches(arrayBuffer, options?.ply)\n};\n\nexport const _typecheckPLYLoader: LoaderWithParser = PLYLoader;\n"],"mappings":";;;;;;;;;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAF,OAAA;AAA6D,SAAAG,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAA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AAW,EAAEC,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEQ,GAAG,CAAC;UAAA;UAAA;YAAA,OAAAL,QAAA,CAAAM,IAAA;QAAA;MAAA,GAAAX,OAAA;IAAA;IAAA,SAAAL,MAAAiB,EAAA,EAAAC,GAAA;MAAA,OAAAjB,MAAA,CAAAjB,KAAA,OAAAI,SAAA;IAAA;IAAA,OAAAY,KAAA;EAAA;EAC1EmB,aAAa,EAAE,SAAAA,cAACb,WAAW,EAAEC,OAAO;IAAA,OAAK,IAAAO,kBAAQ,EAACR,WAAW,EAAEC,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEQ,GAAG,CAAC;EAAA;EAC5EK,SAAS,EAAE,SAAAA,UAACd,WAAW,EAAEC,OAAO;IAAA,OAAK,IAAAO,kBAAQ,EAACR,WAAW,EAAEC,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEQ,GAAG,CAAC;EAAA;EACxEM,cAAc,EAAE,SAAAA,eAACf,WAAW,EAAEC,OAAO;IAAA,OAAK,IAAAe,oCAAiB,EAAChB,WAAW,EAAEC,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEQ,GAAG,CAAC;EAAA;AAAA,EACvF;AAACQ,OAAA,CAAAzB,SAAA,GAAAA,SAAA;AAEK,IAAM0B,mBAAqC,GAAG1B,SAAS;AAACyB,OAAA,CAAAC,mBAAA,GAAAA,mBAAA"}
|
|
@@ -10,7 +10,6 @@ function getPLYSchema(plyHeader, attributes) {
|
|
|
10
10
|
var schema = (0, _schema.deduceMeshSchema)(attributes, metadataMap);
|
|
11
11
|
return schema;
|
|
12
12
|
}
|
|
13
|
-
|
|
14
13
|
function makeMetadataFromPlyHeader(plyHeader) {
|
|
15
14
|
var metadataMap = new Map();
|
|
16
15
|
metadataMap.set('ply_comments', JSON.stringify(plyHeader.comments));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-ply-schema.js","names":["getPLYSchema","plyHeader","attributes","metadataMap","makeMetadataFromPlyHeader","schema","deduceMeshSchema","Map","set","JSON","stringify","comments","elements","format","undefined","version","headerLength","toString"],"sources":["../../../src/lib/get-ply-schema.ts"],"sourcesContent":["import {Schema, MeshAttributes, deduceMeshSchema} from '@loaders.gl/schema';\nimport type {PLYHeader} from './ply-types';\n\n/**\n * Gets schema from PLY header\n * @param plyHeader\n * @param metadata\n * @returns Schema\n */\nexport function getPLYSchema(plyHeader: PLYHeader, attributes: MeshAttributes): Schema {\n const metadataMap = makeMetadataFromPlyHeader(plyHeader);\n const schema = deduceMeshSchema(attributes, metadataMap);\n return schema;\n}\n\n/**\n * Make arrow like schema metadata by PlyHeader properties\n * @param plyHeader\n * @returns\n */\nfunction makeMetadataFromPlyHeader(plyHeader: PLYHeader): Map<string, string> {\n const metadataMap = new Map();\n metadataMap.set('ply_comments', JSON.stringify(plyHeader.comments));\n metadataMap.set('ply_elements', JSON.stringify(plyHeader.elements));\n if (plyHeader.format !== undefined) {\n metadataMap.set('ply_format', plyHeader.format);\n }\n if (plyHeader.version !== undefined) {\n metadataMap.set('ply_version', plyHeader.version);\n }\n if (plyHeader.headerLength !== undefined) {\n metadataMap.set('ply_headerLength', plyHeader.headerLength.toString(10));\n }\n return metadataMap;\n}\n"],"mappings":";;;;;;AAAA;AASO,
|
|
1
|
+
{"version":3,"file":"get-ply-schema.js","names":["_schema","require","getPLYSchema","plyHeader","attributes","metadataMap","makeMetadataFromPlyHeader","schema","deduceMeshSchema","Map","set","JSON","stringify","comments","elements","format","undefined","version","headerLength","toString"],"sources":["../../../src/lib/get-ply-schema.ts"],"sourcesContent":["import {Schema, MeshAttributes, deduceMeshSchema} from '@loaders.gl/schema';\nimport type {PLYHeader} from './ply-types';\n\n/**\n * Gets schema from PLY header\n * @param plyHeader\n * @param metadata\n * @returns Schema\n */\nexport function getPLYSchema(plyHeader: PLYHeader, attributes: MeshAttributes): Schema {\n const metadataMap = makeMetadataFromPlyHeader(plyHeader);\n const schema = deduceMeshSchema(attributes, metadataMap);\n return schema;\n}\n\n/**\n * Make arrow like schema metadata by PlyHeader properties\n * @param plyHeader\n * @returns\n */\nfunction makeMetadataFromPlyHeader(plyHeader: PLYHeader): Map<string, string> {\n const metadataMap = new Map();\n metadataMap.set('ply_comments', JSON.stringify(plyHeader.comments));\n metadataMap.set('ply_elements', JSON.stringify(plyHeader.elements));\n if (plyHeader.format !== undefined) {\n metadataMap.set('ply_format', plyHeader.format);\n }\n if (plyHeader.version !== undefined) {\n metadataMap.set('ply_version', plyHeader.version);\n }\n if (plyHeader.headerLength !== undefined) {\n metadataMap.set('ply_headerLength', plyHeader.headerLength.toString(10));\n }\n return metadataMap;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AASO,SAASC,YAAYA,CAACC,SAAoB,EAAEC,UAA0B,EAAU;EACrF,IAAMC,WAAW,GAAGC,yBAAyB,CAACH,SAAS,CAAC;EACxD,IAAMI,MAAM,GAAG,IAAAC,wBAAgB,EAACJ,UAAU,EAAEC,WAAW,CAAC;EACxD,OAAOE,MAAM;AACf;AAOA,SAASD,yBAAyBA,CAACH,SAAoB,EAAuB;EAC5E,IAAME,WAAW,GAAG,IAAII,GAAG,CAAC,CAAC;EAC7BJ,WAAW,CAACK,GAAG,CAAC,cAAc,EAAEC,IAAI,CAACC,SAAS,CAACT,SAAS,CAACU,QAAQ,CAAC,CAAC;EACnER,WAAW,CAACK,GAAG,CAAC,cAAc,EAAEC,IAAI,CAACC,SAAS,CAACT,SAAS,CAACW,QAAQ,CAAC,CAAC;EACnE,IAAIX,SAAS,CAACY,MAAM,KAAKC,SAAS,EAAE;IAClCX,WAAW,CAACK,GAAG,CAAC,YAAY,EAAEP,SAAS,CAACY,MAAM,CAAC;EACjD;EACA,IAAIZ,SAAS,CAACc,OAAO,KAAKD,SAAS,EAAE;IACnCX,WAAW,CAACK,GAAG,CAAC,aAAa,EAAEP,SAAS,CAACc,OAAO,CAAC;EACnD;EACA,IAAId,SAAS,CAACe,YAAY,KAAKF,SAAS,EAAE;IACxCX,WAAW,CAACK,GAAG,CAAC,kBAAkB,EAAEP,SAAS,CAACe,YAAY,CAACC,QAAQ,CAAC,EAAE,CAAC,CAAC;EAC1E;EACA,OAAOd,WAAW;AACpB"}
|
|
@@ -10,7 +10,6 @@ function normalizePLY(plyHeader, plyAttributes, options) {
|
|
|
10
10
|
var attributes = getMeshAttributes(plyAttributes);
|
|
11
11
|
var boundingBox = (0, _schema.getMeshBoundingBox)(attributes);
|
|
12
12
|
var vertexCount = plyAttributes.indices.length || plyAttributes.vertices.length / 3;
|
|
13
|
-
|
|
14
13
|
var isTriangles = plyAttributes.indices && plyAttributes.indices.length > 0;
|
|
15
14
|
var mode = isTriangles ? 4 : 0;
|
|
16
15
|
var topology = isTriangles ? 'triangle-list' : 'point-list';
|
|
@@ -39,32 +38,55 @@ function normalizePLY(plyHeader, plyAttributes, options) {
|
|
|
39
38
|
}
|
|
40
39
|
return plyMesh;
|
|
41
40
|
}
|
|
42
|
-
|
|
43
41
|
function getMeshAttributes(attributes) {
|
|
44
42
|
var accessors = {};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
43
|
+
for (var _i = 0, _Object$keys = Object.keys(attributes); _i < _Object$keys.length; _i++) {
|
|
44
|
+
var attributeName = _Object$keys[_i];
|
|
45
|
+
switch (attributeName) {
|
|
46
|
+
case 'vertices':
|
|
47
|
+
if (attributes.vertices.length > 0) {
|
|
48
|
+
accessors.POSITION = {
|
|
49
|
+
value: new Float32Array(attributes.vertices),
|
|
50
|
+
size: 3
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
break;
|
|
54
|
+
case 'normals':
|
|
55
|
+
if (attributes.normals.length > 0) {
|
|
56
|
+
accessors.NORMAL = {
|
|
57
|
+
value: new Float32Array(attributes.normals),
|
|
58
|
+
size: 3
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
break;
|
|
62
|
+
case 'uvs':
|
|
63
|
+
if (attributes.uvs.length > 0) {
|
|
64
|
+
accessors.TEXCOORD_0 = {
|
|
65
|
+
value: new Float32Array(attributes.uvs),
|
|
66
|
+
size: 2
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
break;
|
|
70
|
+
case 'colors':
|
|
71
|
+
if (attributes.colors.length > 0) {
|
|
72
|
+
accessors.COLOR_0 = {
|
|
73
|
+
value: new Uint8Array(attributes.colors),
|
|
74
|
+
size: 3,
|
|
75
|
+
normalized: true
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
break;
|
|
79
|
+
case 'indices':
|
|
80
|
+
break;
|
|
81
|
+
default:
|
|
82
|
+
if (attributes[attributeName].length > 0) {
|
|
83
|
+
accessors[attributeName] = {
|
|
84
|
+
value: new Float32Array(attributes[attributeName]),
|
|
85
|
+
size: 1
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
68
90
|
}
|
|
69
91
|
return accessors;
|
|
70
92
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-ply.js","names":["normalizePLY","plyHeader","plyAttributes","options","attributes","getMeshAttributes","boundingBox","getMeshBoundingBox","vertexCount","indices","length","vertices","isTriangles","mode","topology","schema","getPLYSchema","plyMesh","loader","loaderData","header","value","Uint32Array","size","accessors","POSITION","Float32Array","normals","NORMAL","uvs","TEXCOORD_0","colors","COLOR_0","Uint8Array","normalized"],"sources":["../../../src/lib/normalize-ply.ts"],"sourcesContent":["import type {MeshAttributes} from '@loaders.gl/schema';\nimport {getMeshBoundingBox} from '@loaders.gl/schema';\nimport type {PLYMesh, PLYHeader, PLYAttributes, MeshHeader} from './ply-types';\nimport {getPLYSchema} from './get-ply-schema';\n\n/**\n * @param header\n * @param attributes\n * @returns data and header\n */\nexport default function normalizePLY(\n plyHeader: MeshHeader & PLYHeader,\n plyAttributes: PLYAttributes,\n options?: {}\n): PLYMesh {\n const attributes = getMeshAttributes(plyAttributes);\n const boundingBox = getMeshBoundingBox(attributes);\n const vertexCount = plyAttributes.indices.length || plyAttributes.vertices.length / 3;\n\n // TODO - how to detect POINT CLOUDS vs MESHES?\n // TODO - For Meshes, PLY quadrangles must be split?\n const isTriangles = plyAttributes.indices && plyAttributes.indices.length > 0;\n const mode = isTriangles ? 4 : 0; // TRIANGLES vs POINTS\n const topology = isTriangles ? 'triangle-list' : 'point-list';\n\n const schema = getPLYSchema(plyHeader, attributes);\n\n const plyMesh: PLYMesh = {\n loader: 'ply',\n loaderData: plyHeader,\n header: {\n vertexCount,\n boundingBox\n },\n schema,\n attributes,\n indices: {value: new Uint32Array(0), size: 0},\n mode,\n topology\n };\n\n if (plyAttributes.indices.length > 0) {\n plyMesh.indices = {value: new Uint32Array(plyAttributes.indices), size: 1};\n }\n\n return plyMesh;\n}\n\n/**\n * @param attributes\n * @returns accessors []\n */\nfunction getMeshAttributes(attributes: PLYAttributes): MeshAttributes {\n const accessors: MeshAttributes = {};\n\n accessors.POSITION = {value: new Float32Array(attributes.vertices), size: 3};\n\n
|
|
1
|
+
{"version":3,"file":"normalize-ply.js","names":["_schema","require","_getPlySchema","normalizePLY","plyHeader","plyAttributes","options","attributes","getMeshAttributes","boundingBox","getMeshBoundingBox","vertexCount","indices","length","vertices","isTriangles","mode","topology","schema","getPLYSchema","plyMesh","loader","loaderData","header","value","Uint32Array","size","accessors","_i","_Object$keys","Object","keys","attributeName","POSITION","Float32Array","normals","NORMAL","uvs","TEXCOORD_0","colors","COLOR_0","Uint8Array","normalized"],"sources":["../../../src/lib/normalize-ply.ts"],"sourcesContent":["import type {MeshAttributes} from '@loaders.gl/schema';\nimport {getMeshBoundingBox} from '@loaders.gl/schema';\nimport type {PLYMesh, PLYHeader, PLYAttributes, MeshHeader} from './ply-types';\nimport {getPLYSchema} from './get-ply-schema';\n\n/**\n * @param header\n * @param attributes\n * @returns data and header\n */\nexport default function normalizePLY(\n plyHeader: MeshHeader & PLYHeader,\n plyAttributes: PLYAttributes,\n options?: {}\n): PLYMesh {\n const attributes = getMeshAttributes(plyAttributes);\n const boundingBox = getMeshBoundingBox(attributes);\n const vertexCount = plyAttributes.indices.length || plyAttributes.vertices.length / 3;\n\n // TODO - how to detect POINT CLOUDS vs MESHES?\n // TODO - For Meshes, PLY quadrangles must be split?\n const isTriangles = plyAttributes.indices && plyAttributes.indices.length > 0;\n const mode = isTriangles ? 4 : 0; // TRIANGLES vs POINTS\n const topology = isTriangles ? 'triangle-list' : 'point-list';\n\n const schema = getPLYSchema(plyHeader, attributes);\n\n const plyMesh: PLYMesh = {\n loader: 'ply',\n loaderData: plyHeader,\n header: {\n vertexCount,\n boundingBox\n },\n schema,\n attributes,\n indices: {value: new Uint32Array(0), size: 0},\n mode,\n topology\n };\n\n if (plyAttributes.indices.length > 0) {\n plyMesh.indices = {value: new Uint32Array(plyAttributes.indices), size: 1};\n }\n\n return plyMesh;\n}\n\n/**\n * @param attributes\n * @returns accessors []\n */\n// eslint-disable-next-line complexity\nfunction getMeshAttributes(attributes: PLYAttributes): MeshAttributes {\n const accessors: MeshAttributes = {};\n\n for (const attributeName of Object.keys(attributes)) {\n switch (attributeName) {\n case 'vertices':\n if (attributes.vertices.length > 0) {\n accessors.POSITION = {value: new Float32Array(attributes.vertices), size: 3};\n }\n break;\n\n // optional attributes data\n case 'normals':\n if (attributes.normals.length > 0) {\n accessors.NORMAL = {value: new Float32Array(attributes.normals), size: 3};\n }\n break;\n\n case 'uvs':\n if (attributes.uvs.length > 0) {\n accessors.TEXCOORD_0 = {value: new Float32Array(attributes.uvs), size: 2};\n }\n break;\n\n case 'colors':\n if (attributes.colors.length > 0) {\n // TODO - normalized shoud be based on `uchar` flag in source data?\n accessors.COLOR_0 = {value: new Uint8Array(attributes.colors), size: 3, normalized: true};\n }\n break;\n\n case 'indices':\n break;\n\n default:\n if (attributes[attributeName].length > 0) {\n accessors[attributeName] = {value: new Float32Array(attributes[attributeName]), size: 1};\n }\n break;\n }\n }\n return accessors;\n}\n"],"mappings":";;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AAOe,SAASE,YAAYA,CAClCC,SAAiC,EACjCC,aAA4B,EAC5BC,OAAY,EACH;EACT,IAAMC,UAAU,GAAGC,iBAAiB,CAACH,aAAa,CAAC;EACnD,IAAMI,WAAW,GAAG,IAAAC,0BAAkB,EAACH,UAAU,CAAC;EAClD,IAAMI,WAAW,GAAGN,aAAa,CAACO,OAAO,CAACC,MAAM,IAAIR,aAAa,CAACS,QAAQ,CAACD,MAAM,GAAG,CAAC;EAIrF,IAAME,WAAW,GAAGV,aAAa,CAACO,OAAO,IAAIP,aAAa,CAACO,OAAO,CAACC,MAAM,GAAG,CAAC;EAC7E,IAAMG,IAAI,GAAGD,WAAW,GAAG,CAAC,GAAG,CAAC;EAChC,IAAME,QAAQ,GAAGF,WAAW,GAAG,eAAe,GAAG,YAAY;EAE7D,IAAMG,MAAM,GAAG,IAAAC,0BAAY,EAACf,SAAS,EAAEG,UAAU,CAAC;EAElD,IAAMa,OAAgB,GAAG;IACvBC,MAAM,EAAE,KAAK;IACbC,UAAU,EAAElB,SAAS;IACrBmB,MAAM,EAAE;MACNZ,WAAW,EAAXA,WAAW;MACXF,WAAW,EAAXA;IACF,CAAC;IACDS,MAAM,EAANA,MAAM;IACNX,UAAU,EAAVA,UAAU;IACVK,OAAO,EAAE;MAACY,KAAK,EAAE,IAAIC,WAAW,CAAC,CAAC,CAAC;MAAEC,IAAI,EAAE;IAAC,CAAC;IAC7CV,IAAI,EAAJA,IAAI;IACJC,QAAQ,EAARA;EACF,CAAC;EAED,IAAIZ,aAAa,CAACO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