Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverse painter algo not extensible #109

Open
Samsy opened this issue Aug 8, 2024 · 0 comments
Open

Reverse painter algo not extensible #109

Samsy opened this issue Aug 8, 2024 · 0 comments

Comments

@Samsy
Copy link

Samsy commented Aug 8, 2024

Hello hello !

I'm starting to implement the vanilla build and realised that it requires to setup a custom reversePainterSortStable algo to sort the transparent objects.

I am using a custom reversePainterSortStable as well, and wonder how this could be compatible / how to proceed here to extend yours ? It would be needed to get all the elements exported so it is re-writable with some extensions from outside the package

There are two things here :

1 )
̶T̶h̶e̶ ̶g̶i̶v̶e̶n̶ ̶a̶l̶g̶o̶ ̶i̶s̶ ̶u̶s̶i̶n̶g̶ ̶l̶o̶c̶a̶l̶l̶y̶ ̶d̶e̶f̶i̶n̶e̶d̶ ̶p̶r̶o̶p̶e̶r̶i̶e̶s̶ ̶i̶n̶s̶t̶a̶n̶t̶i̶e̶d̶ ̶w̶i̶t̶h̶ ̶s̶y̶m̶b̶o̶l̶s̶ ̶:̶
̶S̶y̶m̶b̶o̶l̶(̶'̶c̶a̶m̶e̶r̶a̶-̶d̶i̶s̶t̶a̶n̶c̶e̶-̶k̶e̶y̶'̶)̶ ̶e̶t̶c̶.̶.̶ ̶m̶e̶a̶n̶ ̶I̶ ̶c̶a̶n̶n̶o̶t̶ ̶o̶v̶e̶r̶ ̶e̶x̶t̶e̶n̶d̶ ̶t̶h̶e̶ ̶s̶o̶r̶t̶e̶r̶ ̶a̶n̶d̶ ̶i̶m̶p̶l̶e̶m̶e̶n̶t̶ ̶t̶h̶e̶ ̶c̶o̶m̶p̶a̶r̶a̶i̶s̶o̶n̶s̶ ̶f̶r̶o̶m̶ ̶o̶u̶t̶s̶i̶d̶e̶ ̶t̶h̶e̶ ̶p̶a̶c̶k̶a̶g̶e̶ ̶s̶i̶n̶c̶e̶ ̶S̶y̶m̶b̶o̶l̶(̶x̶)̶ ̶!̶=̶ ̶S̶y̶m̶b̶o̶l̶(̶x̶)̶
̶E̶v̶e̶n̶ ̶t̶h̶o̶u̶g̶h̶ ̶t̶h̶o̶s̶e̶ ̶s̶y̶m̶b̶o̶l̶s̶ ̶a̶r̶e̶ ̶e̶x̶p̶o̶r̶t̶e̶d̶,̶ ̶I̶ ̶c̶a̶n̶n̶o̶t̶ ̶a̶c̶c̶e̶s̶s̶ ̶t̶h̶e̶m̶ ̶i̶n̶ ̶t̶h̶e̶ ̶@̶p̶m̶n̶d̶r̶s̶/̶u̶i̶k̶i̶t̶ ̶n̶a̶m̶e̶s̶p̶a̶c̶e̶ ̶s̶i̶n̶c̶e̶ ̶t̶h̶e̶ ̶e̶n̶t̶r̶y̶ ̶p̶o̶i̶n̶t̶ ̶o̶f̶ ̶t̶h̶e̶ ̶p̶a̶c̶k̶a̶g̶e̶ ̶i̶s̶ ̶p̶o̶i̶n̶t̶i̶n̶g̶ ̶t̶o̶ ̶d̶i̶s̶t̶/̶i̶n̶d̶e̶x̶.̶j̶s̶

Edit: realised I could import those using :

import { cameraDistanceKey } from '@pmndrs/uikit/internals';

https://github.com/pmndrs/uikit/blob/main/packages/uikit/package.json#L24

https://github.com/pmndrs/uikit/blob/main/packages/uikit/src/order.ts#L9

2 ) compareOrderInfo isn't exported, and not accessible from outside the package

https://github.com/pmndrs/uikit/blob/main/packages/uikit/src/order.ts#L26

Any help appreciated 🙏🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant