vendor/GLTFExporter.js
function serializeUserData(object) {
      try {
        return JSON.parse(JSON.stringify(object.userData));
      } catch (error) {
        console.warn(
          "THREE.GLTFExporter: userData of '" +
            object.name +
            "' " +
            "won't be serialized because of JSON.stringify error - " +
            error.message
        );

        return {};
      }
    }
function serializeUserData(object) {
      try {
        return JSON.parse(JSON.stringify(object.userData));
      } catch (error) {
        console.warn(
          "THREE.GLTFExporter: userData of '" +
            object.name +
            "' " +
            "won't be serialized because of JSON.stringify error - " +
            error.message
        );

        return {};
      }
    }
function serializeUserData ( object ) { try { return JSON . parse ( JSON . stringify ( object . userData ) ) ; } catch ( error ) { console . warn ( "THREE.GLTFExporter: userData of '" + object . name + "' " + "won't be serialized because of JSON.stringify error - " + error . message ) ; return { } ; } }
Serializes a userData.

@param {THREE.Object3D|THREE.Material} object
@returns {Object}
Serializes a userData .