three.js icon indicating copy to clipboard operation
three.js copied to clipboard

Blender Exporter: omit emissive and ambient properties from MeshBasicMaterial

Open repsac opened this issue 11 years ago • 3 comments

This results in a JSON that does not load correctly because the loader does not check that the properties exist on the material before setting them.

        if ( json.ambient !== undefined ) material.ambient.setHex( json.ambient );
        if ( json.emissive !== undefined ) material.emissive.setHex( json.emissive );

Going to make sure the JSON omits these properties when the material is a MeshBasicMaterial

repsac avatar Feb 10 '15 04:02 repsac

The ambient property has been removed in #5809.

WestLangley avatar Feb 10 '15 08:02 WestLangley

Ah thanks. And @mrdoob pinged me as well and I totally missed it.

repsac avatar Feb 10 '15 15:02 repsac

Fixed https://github.com/mrdoob/three.js/pull/6048/

repsac avatar Feb 11 '15 02:02 repsac