-
Notifications
You must be signed in to change notification settings - Fork 34
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
Should container projection respect sorting? #17
Comments
no, you need to write face detection for that - the vector cross product of axises will show which one is up :) Pixi doesn't have cull_face and cull_back yet. Btw, I'm working on that 3d thing again, I hope it'll be ready this weekend, and you'll be able to use my face detection :) |
ty @ivanpopelyshev! |
@ivanpkpelyshev what is the condition that i should use in order to detect which face is visible? |
sign of cross-product of axises you put it. in case of multiple containers chain - same, but look at two first columns of the resulting world transform inside projection component. |
xAxis should be i have tried this but doesnt seems to be correct |
do you have a stack of containers or just one? no, just |
just one for now |
like that? Math.sign(a[0] * a[4] - a[1] * a[3]) * Math.sign(a[2]) * Math.sign(a[5]) |
Yes. Does it work for you? |
nope
http://pixijs.io/examples/#/projection/quad-homo.js I suppose to see -1 always when the rabbit ok t-shirt logo is flipped and 1 when is in the right side |
Thank you! I'll look at it tomorrow :) |
Hi @ivanpopelyshev any news about this? |
Testing it right now. It doesnt work, im sick, i dont know what to do. Any ideas? |
I'm sure that at a[2]=0 a[5]=0 its behaving bwrong, so i dont know how to add them to equation |
Ok, i'm stupid.; That one works
|
Thabk you man! I will try it tomorrow |
Question what does a[8] represent? |
i guess that's a coefficient for whole matrix that we can divide everything on it. When I take vector (dx,0,1) and multiply by matrix, i get |
@lucap86 important update: 0.2.1 version is released, it has 3d transforms and |
Hi @ivanpopelyshev great news!!! just a question. why not also toCamera3d? |
Because camera3d does not have corresponding element in pixi. Why do you need it? |
Ok but what if i already have a pixi container that i want to convert in a camera3d? In the end a camera3d is an enhanced pixi3d container |
write your own conversion method. assign all the properties for camera (far, near, focus), add projection, put certain values in projection |
or create camera3d based on that container and move all the children there |
If I have a 2d projected container with 2 sprites inside, when the plane is "flipped" should i see child sprites in a reverse order?
an application can be a container containing 2 sprites inside in the same positon, representing the 2 faces of a card.
container
|----- face1 : z=0
|----- face2 : z=1
when i "flip" the container i should see "face1" instead of "face2"?
The text was updated successfully, but these errors were encountered: