GLTFReader

class compas.files.GLTFReader(filepath)[source]

Bases: object

Read the contents of a glTF or glb version 2 file using the json library. Uses ideas from Khronos Group’s glTF-Blender-IO. Caution: Extensions are minimally supported and their data may be lost.

Parameters

filepath (str) – Path to the file.

Attributes
  • filepath (str) – String containing the path to the glTF.

  • json (dict) – Dictionary object containing the contents of the glTF.

  • data (list) – List of lists containing data read from binary files.

  • image_data (list) – List containing image data.

Methods

get_data_uri_data

get_filepath

get_generic_data

get_mime_type

is_data_uri

read