toJSON(obj) {
        var json = TextureSerializer.prototype.toJSON.call(this, obj);

        json.image = [];

        obj.image.forEach(n => {
            if (n.src.startsWith('data')) { // base64
                json.image.push({
                    tagName: 'img',
                    src: n.src,
                    width: n.width,
                    height: n.height
                });
            } else { // url
                json.image.push({
                    tagName: 'img',
                    src: n.src.replace(location.href, '/'),
                    width: n.width,
                    height: n.height
                });
            }
        });

        return json;
    }
CubeTextureSerializer
@author tengge / https://github.com/tengge1