Skip to content

Commit

Permalink
Merge pull request #398 from dukesook/pymd
Browse files Browse the repository at this point in the history
Add pymd box
  • Loading branch information
rbouqueau authored May 11, 2024
2 parents fbc0348 + 33e772e commit 7c43087
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/parsing/EntityToGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,26 @@ BoxParser.createEntityToGroupCtor("wbbr");

// Alternative entity (ISO/IEC 23008-12:2022 AMD1 Section 6.8.10)
BoxParser.createEntityToGroupCtor("prgr");

// Image Pyramid entity group (ISO/IEC 23008-12:20xx Section 6.8.11)
BoxParser.createEntityToGroupCtor("pymd", function(stream) {
this.group_id = stream.readUint32();
this.num_entities_in_group = stream.readUint32();
this.entity_ids = [];
for (var i = 0; i < this.num_entities_in_group; i++) {
var entity_id = stream.readUint32();
this.entity_ids.push(entity_id);
}

this.tile_size_x = stream.readUint16();
this.tile_size_y = stream.readUint16();
this.layer_binning = [];
this.tiles_in_layer_column_minus1 = [];
this.tiles_in_layer_row_minus1 = [];
for (i = 0; i < this.num_entities_in_group; i++) {
this.layer_binning[i] = stream.readUint16();
this.tiles_in_layer_row_minus1[i] = stream.readUint16();
this.tiles_in_layer_column_minus1[i] = stream.readUint16();
}
});

0 comments on commit 7c43087

Please sign in to comment.