Skip to content

Commit 8b85d7b

Browse files
authored
Merge pull request #187 from CesiumGS/use-default-offset-types
Use default offset types for strings and arrays
2 parents 6560737 + 22befa7 commit 8b85d7b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/tools/gltfExtensionsUtils/StructuralMetadataUtils.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,16 @@ export class StructuralMetadataUtils {
154154
if (arrayOffsets) {
155155
arrayOffsetsBufferViewData = Buffer.from(arrayOffsets);
156156
}
157-
const arrayOffsetType = propertyTableProperty.getArrayOffsetType();
157+
const arrayOffsetType =
158+
propertyTableProperty.getArrayOffsetType() ?? "UINT32";
158159

159160
const stringOffsets = propertyTableProperty.getStringOffsets();
160161
let stringOffsetsBufferViewData: Buffer | undefined;
161162
if (stringOffsets) {
162163
stringOffsetsBufferViewData = Buffer.from(stringOffsets);
163164
}
164-
const stringOffsetType = propertyTableProperty.getStringOffsetType();
165+
const stringOffsetType =
166+
propertyTableProperty.getStringOffsetType() ?? "UINT32";
165167

166168
let enumValueType: string | undefined = undefined;
167169
const enumType = classProperty.getEnumType();

0 commit comments

Comments
 (0)