Open aemkei opened 8 years ago
Unfortunately repeating the canvas is not a solution here, because it is cut off to the right, too. Guess, we have two options here:
I think it is better to render it multiple times because if you zoom out you can see full worlds and even more than twice. See attached picture.
@aemkei Btw, is not option to do offscreen render without cutting and then use repeat functionality?
Or something like this (maybe I am completely wrong).
I am aware fixing this edge cases can be difficult but it will be super cool to have fixed them to have robust solution.
I guess we have to issues here:
IMO we can ignore 1) for now, because we do not lose visual information. But we need to focus on 2) first!
Unfortunately, an offscreen won't work if you zoom in further because the canvas would be too big to render.
Why do you think that offscreen render will be so big? In my opinion the render target size should not be bigger than size of "one world" (in case there are multiple words displayed) which never will be bigger than canvas.
PS: Later today I will try to draw a picture of what I mean. English is not my native language so probably I express myself badly ;-)
Using multiple cameras akin to this example should do the trick:
@rock7-dan This is only part of problem, this does not solve issue with repeating rendered layer when more words are displayed.
Following the approach used in that example, and two cameras side-by side would facilitate two worlds being shown at once.
You just adjust the masking between the left/right cameras depending which worlds are being shown. This strategy could be extended further with 3 or more cameras for additional worlds.
Hi @rock7-dan @aemkei I just wanted to share that I am willing to pay to have this functionality implemented ;-)
The Three.js scene is drawn from -180 to +180 degree, which results in a map that looks cut off at the date line:
@korczis suggested: