camilleroux/fxhash-bridge

Aqw_Zert style interacts with other styles

Closed this issue · 3 comments

As an example, see Estienne style rendered before and after Aqw_Zert has been rendered.

Before:
Screen Shot 2022-02-20 at 10 12 55 PM

After:
Screen Shot 2022-02-20 at 10 13 10 PM

@AqwUnderscoreZert Any unusual features that you use that need to be reset between drawing different styles? See here for all the things we're resetting already:

fxhash-bridge/src/index.js

Lines 181 to 191 in 1c6cc2c

// restore default p5 modes to prevent changes across styles
p5.colorMode(p5.RGB)
p5.ellipseMode(p5.CENTER)
p5.rectMode(p5.CORNER)
p5.blendMode(p5.BLEND)
p5.imageMode(p5.CORNER)
p5.angleMode(p5.RADIANS)
p5.pixelDensity(window.devicePixelRatio)
p5.strokeWeight(1)
p5.drawingContext.shadowBlur = 0
p5.drawingContext.filter = 'none'

These are candidates for things that need to be reset:

this._p5.strokeCap(this._p5.SQUARE)
this._p5.colorMode(this._p5.HSL, 360, 100, 100, 1);
this._p5.rectMode(this._p5.CENTER);
this._p5.ellipseMode(this._p5.CENTER);
this._p5.noiseDetail(12, 0.85);

If I have to take a guess, it's probably the noise detail. Other styles use noise() without setting noiseDetail() first.

Wow thanks @clauswilke ! That one was not easy to catch! Thanks a lot man!

Fixed for me! @camilleroux you can close this issue.