GLTFReader
-
class
compas.files.GLTFReader(filepath)[source] Bases:
objectRead 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
__init__(filepath)Initialize self.
get_data_uri_data(uri)get_filepath(uri)get_generic_data(num_components, count)get_mime_type(string)is_data_uri(uri)read()