# Path: blendergltf/blendergltf.py
# DEFAULT_SETTINGS = {
#     'gltf_output_dir': '',
#     'gltf_name': 'gltf',
#     'gltf_export_binary': False,
#     'buffers_embed_data': True,
#     'buffers_combine_data': False,
#     'nodes_export_hidden': False,
#     'nodes_global_matrix': mathutils.Matrix.Identity(4),
#     'nodes_global_matrix_apply': True,
#     'nodes_selected_only': False,
#     'blocks_prune_unused': True,
#     'meshes_apply_modifiers': True,
#     'meshes_interleave_vertex_data': True,
#     'meshes_vertex_color_alpha': True,
#     'images_data_storage': 'COPY',
#     'asset_version': '2.0',
#     'asset_copyright': '',
#     'asset_profile': 'WEB',
#     'images_allow_srgb': False,
#     'extension_exporters': [],
#     'animations_object_export': 'ACTIVE',
#     'animations_armature_export': 'ELIGIBLE',
#     'animations_shape_key_export': 'ELIGIBLE',
#     'hacks_streaming': False,
# }
# PROFILE_MAP = {
#     'WEB': {'api': 'WebGL', 'version': '1.0'},
#     'DESKTOP': {'api': 'OpenGL', 'version': '3.0'}
# }
# def togl(matrix):
# def _decompose(matrix):
# def export_joint(state, bone):
# def export_buffers(state):
# def insert_root_nodes(state, root_matrix):
# def build_string_refmap(input_data):
# def build_int_refmap(input_data):
# def initialize_state(settings=None):
# def export_gltf(scene_delta, settings=None):
#         def decompose_apply(matrix):
#         def decompose_mesh_apply(matrix):
# 
# Path: blendergltf/exporters/base.py
# class BaseExporter:
#     gltf_key = ''
#     blender_key = ''
# 
#     @classmethod
#     def get_custom_properties(cls, blender_data):
#         custom_props = {
#             key: value.to_list() if hasattr(value, 'to_list') else value
#             for key, value in blender_data.items()
#             if key not in _IGNORED_CUSTOM_PROPS
#         }
# 
#         custom_props = {
#             key: value for key, value in custom_props.items()
#             if _is_serializable(value)
#         }
# 
#         return custom_props
# 
#     @classmethod
#     def check(cls, state, blender_data):
#         return True
# 
#     @classmethod
#     def default(cls, state, blender_data):
#         return {
#             'name': blender_data.name
#         }
# 
#     @classmethod
#     def export(cls, state, blender_data):
#         return {}


from distutils.version import StrictVersion as Version
from ..blendergltf import Reference
from ..exporters import BaseExporter
            linear_factor = light.linear_attenuation * (1 / light.distance)
            quad_factor = light.quadratic_attenuation * (1 / (light.distance * light.distance))
        elif light.falloff_type == 'INVERSE_COEFFICIENTS':
            constant_factor = light.constant_coefficient
            linear_factor = light.linear_coefficient * (1 / light.distance)
            quad_factor = light.quadratic_coefficient * (1 / (light.distance * light.distance))

        return constant_factor, linear_factor, quad_factor

    gltf_light = {}
    if light.type == 'SUN':
        gltf_light = {
            'directional': {
                'color': (light.color * light.energy)[:],
            },
            'type': 'directional',
        }
    elif light.type == 'POINT':
        constant_factor, linear_factor, quad_factor = calc_att()
        gltf_light = {
            'point': {
                'color': (light.color * light.energy)[:],

                'constantAttenuation': constant_factor,
                'linearAttenuation': linear_factor,
                'quadraticAttenuation': quad_factor,
            },
            'type': 'point',
        }
    elif light.type == 'SPOT':

# Path: blendergltf/blendergltf.py
# DEFAULT_SETTINGS = {
#     'gltf_output_dir': '',
#     'gltf_name': 'gltf',
#     'gltf_export_binary': False,
#     'buffers_embed_data': True,
#     'buffers_combine_data': False,
#     'nodes_export_hidden': False,
#     'nodes_global_matrix': mathutils.Matrix.Identity(4),
#     'nodes_global_matrix_apply': True,
#     'nodes_selected_only': False,
#     'blocks_prune_unused': True,
#     'meshes_apply_modifiers': True,
#     'meshes_interleave_vertex_data': True,
#     'meshes_vertex_color_alpha': True,
#     'images_data_storage': 'COPY',
#     'asset_version': '2.0',
#     'asset_copyright': '',
#     'asset_profile': 'WEB',
#     'images_allow_srgb': False,
#     'extension_exporters': [],
#     'animations_object_export': 'ACTIVE',
#     'animations_armature_export': 'ELIGIBLE',
#     'animations_shape_key_export': 'ELIGIBLE',
#     'hacks_streaming': False,
# }
# PROFILE_MAP = {
#     'WEB': {'api': 'WebGL', 'version': '1.0'},
#     'DESKTOP': {'api': 'OpenGL', 'version': '3.0'}
# }
# def togl(matrix):
# def _decompose(matrix):
# def export_joint(state, bone):
# def export_buffers(state):
# def insert_root_nodes(state, root_matrix):
# def build_string_refmap(input_data):
# def build_int_refmap(input_data):
# def initialize_state(settings=None):
# def export_gltf(scene_delta, settings=None):
#         def decompose_apply(matrix):
#         def decompose_mesh_apply(matrix):
# 
# Path: blendergltf/exporters/base.py
# class BaseExporter:
#     gltf_key = ''
#     blender_key = ''
# 
#     @classmethod
#     def get_custom_properties(cls, blender_data):
#         custom_props = {
#             key: value.to_list() if hasattr(value, 'to_list') else value
#             for key, value in blender_data.items()
#             if key not in _IGNORED_CUSTOM_PROPS
#         }
# 
#         custom_props = {
#             key: value for key, value in custom_props.items()
#             if _is_serializable(value)
#         }
# 
#         return custom_props
# 
#     @classmethod
#     def check(cls, state, blender_data):
#         return True
# 
#     @classmethod
#     def default(cls, state, blender_data):
#         return {
#             'name': blender_data.name
#         }
# 
#     @classmethod
#     def export(cls, state, blender_data):
#         return {}


# Path: blendergltf/extension_exporters/_lights_common.py
from distutils.version import StrictVersion as Version
from ..blendergltf import Reference
from ..exporters import BaseExporter

            linear_factor = light.linear_attenuation * (1 / light.distance)
            quad_factor = light.quadratic_attenuation * (1 / (light.distance * light.distance))
        elif light.falloff_type == 'INVERSE_COEFFICIENTS':
            constant_factor = light.constant_coefficient
            linear_factor = light.linear_coefficient * (1 / light.distance)
            quad_factor = light.quadratic_coefficient * (1 / (light.distance * light.distance))

        return constant_factor, linear_factor, quad_factor

    gltf_light = {}
    if light.type == 'SUN':
        gltf_light = {
            'directional': {
                'color': (light.color * light.energy)[:],
            },
            'type': 'directional',
        }
    elif light.type == 'POINT':
        constant_factor, linear_factor, quad_factor = calc_att()
        gltf_light = {
            'point': {
                'color': (light.color * light.energy)[:],

                'constantAttenuation': constant_factor,
                'linearAttenuation': linear_factor,
                'quadraticAttenuation': quad_factor,
            },
            'type': 'point',
        }
    elif light.type == 'SPOT':

        constant_factor, linear_factor, quad_factor = calc_att()