diff --git a/utils/exporters/blender/addons/io_three/exporter/api/texture.py b/utils/exporters/blender/addons/io_three/exporter/api/texture.py index 9880750d2bc5323ae0e1010152af6311af19219d..bebdbcb8c93191cca482b758148eb73c671559b3 100644 --- a/utils/exporters/blender/addons/io_three/exporter/api/texture.py +++ b/utils/exporters/blender/addons/io_three/exporter/api/texture.py @@ -155,12 +155,20 @@ def wrap(texture): """ logger.debug("texture.wrap(%s)", texture) - wrapping = { - True: constants.WRAPPING.MIRROR, - False: constants.WRAPPING.REPEAT - } - return (wrapping[texture.use_mirror_x], - wrapping[texture.use_mirror_y]) + + if(texture.extension == "REPEAT"): + wrapping = { + True: constants.WRAPPING.MIRROR, + False: constants.WRAPPING.REPEAT + } + return (wrapping[texture.use_mirror_x], + wrapping[texture.use_mirror_y]) + + # provide closest available three.js behavior. + # other possible values: "CLIP", "EXTEND", "CLIP_CUBE", "CHECKER", + # best match CLAMP behavior + else: + return (constants.WRAPPING.CLAMP, constants.WRAPPING.CLAMP); def textures():