react-postprocessing icon indicating copy to clipboard operation
react-postprocessing copied to clipboard

Why `Outline`'s props `patternTexture` type is number?

Open Suprhimp opened this issue 1 year ago • 5 comments

Hi, I'm very happy to use r3f and react-postprocessing now with my project.

By the way, I found something strange about the OutlineEffect.

I tested the props patternTexture in OutlineEffect, I found that patternTexture type is number. When I follow the OutlineEffect from postprocessing, patternTexture is not number. I think it should be THREE.Texture.

When I just put my pattern image to patternTexture props, it just cover my whole scene like below. image

  • I think we should allow visibleEdgeColor,hiddenEdgeColor props type string.

Suprhimp avatar Mar 10 '23 05:03 Suprhimp

Most likely old version of pp has this prop as a number

we're going to release #179 and #180 soon with latest pp and it should eliminate some problems

talentlessguy avatar Mar 10 '23 09:03 talentlessguy

@talentlessguy still, the patternTexture type is number..

Suprhimp avatar Apr 25 '23 14:04 Suprhimp

@Suprhimp is it still a number? rpp now uses strictly pp types (before they were custom and potentially outdated)

talentlessguy avatar Apr 30 '23 11:04 talentlessguy

Yep I guess.. I want to fix and make a PR with that but I don't know what should I fix first...

https://github.com/pmndrs/postprocessing/blob/3e6ea9d8fddd2ca2d269e2182752f8199b8248af/src/effects/OutlineEffect.js#L24

Suprhimp avatar May 08 '23 00:05 Suprhimp

Probably we should omit it from props and handle patternTextture separately

talentlessguy avatar May 08 '23 08:05 talentlessguy