Fix svg incompatible layer effects for patches and heads

This commit is contained in:
Mentor Palokaj 2021-10-30 10:34:27 +02:00
parent ea099d5e88
commit bb892b0807
5 changed files with 1226 additions and 5582 deletions

Binary file not shown.

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 9.3 MiB

After

Width:  |  Height:  |  Size: 14 MiB

Binary file not shown.

View File

@ -80,10 +80,10 @@ exports.globalAttributes = [
] }, ] },
{ trait_type: "background complexity", values: [ { trait_type: "background complexity", values: [
{ value: 1, probability: .4 }, { value: 1, probability: .05 },
{ value: 2, probability: .3 }, { value: 2, probability: .10 },
{ value: 3, probability: .2 }, { value: 3, probability: .10 },
{ value: 4, probability: .1 } { value: 4, probability: .75 }
] } ] }

View File

@ -87,9 +87,7 @@ module.exports = async function svgFromAttributes( attributes=[], path='' ) {
// In others, keeping is cool, and removing is less cool // In others, keeping is cool, and removing is less cool
// so higher rarity means less looping // so higher rarity means less looping
const toRemove = 4 - background_complexity const toRemove = 4 - background_complexity
console.log( `Removing ${ toRemove } background props` )
for ( let i = 1; i <= toRemove; i++ ) { for ( let i = 1; i <= toRemove; i++ ) {
console.log( `Remove #${ background }-element-${ 5 - i }` )
const element = document.querySelector( `#${ background }-element-${ 5 - i }` ) const element = document.querySelector( `#${ background }-element-${ 5 - i }` )
if( element ) element.remove() if( element ) element.remove()
else console.log( `Could not find #${ background }-element-${ 5 - i }` ) else console.log( `Could not find #${ background }-element-${ 5 - i }` )