--
Antiprism Site: http://www.antiprism.com
---
You received this message because you are subscribed to the Google Groups "antiprism" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antiprism+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/antiprism/d6f17a65-f465-4dd2-8b8b-37f63b276bb7n%40googlegroups.com.
- have a way to go and back from a full screen view (without leaving the page preferably)
I have implemented the triple click and it should not mess with the full screen double click.
I just need to find someone that could test it on a touchscreen, I don't have such device myself.
I do have an old 5S Iphone but the browser does not display the canvas and models properly, ... Or is it an Iphone feature ?
Also I have added support for triggering full screen with both a lower case and an upper case F key press.
Also you can reset both the position and rotation of the camera with 5 or R keys (upper and lower cases).
Should I remove 5 ?
Regarding the full screen border, you can add this css property
.threeJS-viewer::backdrop {
border:10px solid white;
}
FWIW, full-viewport is somewhat harder to make robust as opposed to full-screen, which has a browser API and OS support. Scott
I have managed to find a solution for the background transparency but we need to define the correct behavior before I commit.
Here is what I have found:- Using renderer.setClearColor(color, alpha); is a global setting that is set on the renderer so all divs will have the specified color and alpha value. When a data-background-color is defined, I apply it as the scene background color that is always opaque and come on top of the renderer color. If no data-background-color is defined, the scene background color is left unset and is transparent by default.
- Before, when unset, the default data-background-color default value was #cccccc. I can set it to undefined instead which will leave the scene.background unset and transparent. I will also have the renderer alpha value be 0. This way I should comply with your needs. I have tested it and it works.
- When a transparent background is used and the full screen is activated, the rest of the webpage will show behind the model. Is that okay ?
- One can specify a texture as the scene background color.
--
Antiprism Site: http://www.antiprism.com
---
You received this message because you are subscribed to the Google Groups "antiprism" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antiprism+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/antiprism/ee051233-7cea-44ea-90ea-80e355f2dd28n%40googlegroups.com.
Unfortunately you cannot put the background color on the div element because it lives above the canvas where the model is rendered.
What I can do is put back the default color to #cccccc when the data-background-color is missing on the div element.
And then add a behavior to recognize invalid input as fully transparent like anything not of the form "#xxxxxx" ("transparent" or "0" for instance).
What I can also do is copy the default color from somewhere. Thanks for bringing up the variables in CSS, I did not know they existed.Following the w3school doc https://www.w3schools.com/Css/css3_variables_overriding.asp,
you could have a :root element with a --default-background-color that I could look up with javascript and use as the default color when there is no data-background-color field instead of setting every div element with the same wanted value.And if you don't set this variable I guess you would get #cccccc.
Having a data-fullscreen-background-color can definitely work.
Should I proceed with these ideas ?
I have not tried putting a texture as the background, the threejs doc says it should work, are you interested in having that ?
Le samedi 15 juin 2024 à 16:41:21 UTC+2, Roger Kaufman a écrit :
On 6/15/2024 10:29 AM, Roger Kaufman wrote:
> Anyway, if the default background were able to be set per page, having
> transparent as the default should be an issue. As long as it can still
> be set per instance on the page.
That should have been
if the default data-background-color were able to be set per page,
having transparent as the default should *NOT* be an issue. As long as
it can still be set per instance on the page.
Roger
--
Antiprism Site: http://www.antiprism.com
---
You received this message because you are subscribed to the Google Groups "antiprism" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antiprism+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/antiprism/ced2d7d5-d329-4740-bfaf-e843cf0ce75bn%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/antiprism/9e978d6f-2343-41df-8e36-bf458fafa53an%40googlegroups.com.
Also the container of the viewer gets reduced because it moves out of it and go full screen, you may probably solve that with the correct css on the container.
I tried for quite sometime to solve that with width and height parameters in various places with no luck. I tried putting the div on another canvas but that didn't work. I'm almost thinking it needs a transparent image under the div or something. Here are a couple of test pages showing transparency. It would be nice if the underlying page didn't change in full screen.
https://www.interocitors.com/polyhedra/multi-off-viewer/off_test/transparent.test1.html?url=multi-off-viewer/off_test/esI.off&data-faces-active=true&data-vertex-radius=0.08&data-edge-radius=0.05&data-rotation-speed=0.25
https://www.interocitors.com/polyhedra/multi-off-viewer/off_test/transparent.test2.html?url=multi-off-viewer/off_test/esI.off&data-faces-active=true&data-vertex-radius=0.08&data-edge-radius=0.05&data-rotation-speed=0.25