html questions

9 views
Skip to first unread message

Roger Kaufman

unread,
Aug 31, 2023, 5:54:46 PM8/31/23
to anti...@googlegroups.com
Hi Wagyx,

I've gone over my web pages for the simple off viewer in conjunction
with my Webview system which probably no one is using, lol.

I have the simple off viewer in a folder called offview, and it is one
level under the polyhedra folder which I'm now (or will be) using as the
base for all pages on my site.

When I made this change the follow two lines no longer find a file.

in info.js line 20 the 'images' folder now has to be in the polyhedra
folder one level up.

   .append("<img width='32' height='32' src='images/icon-info.png'/>")

In off-viewer.js line 120 the 'off' folder has to be in the polyhedra
folder one level up. In this case, if the file is not available then all
that happens is a blank screen is shown instead of a tetrahedron which
doesn't matter so much.

        const obj={filename:"off/U1.off"};

I see why it is happening and I don't know of a workaround other than
providing the folders. But it makes the package not entirely
encapsulated in a sub-folder.


Also I'd like to know if you've ever set an <iframe> to go full screen
on a button press and then return to normal on Escape. I've also seen
examples of using F11 to do it as well but only had partial success with
it. In the latter case F11 would only maximize the iframe and and Escape
would return its original size, if everything worked as it should.

It is not super important if you are busy and the off viewer is
incredibly fast anyway. But I like to solve problems like this at least
as a learning exercise.

On this page I've set up a window view. The Fullscreen button just opens
another page full screen, but i wouldn't necessarily have to do that.

https://www.interocitors.com/polyhedra/offwin.html?url=offview/off_test/sssC.off

Roger

Wagyx Xygaw

unread,
Sep 3, 2023, 11:39:17 AM9/3/23
to antiprism
Hi Roger,
I'll take a look now so I think I could get an answer to your questions today or during the week.

Roger Kaufman

unread,
Sep 4, 2023, 4:40:39 AM9/4/23
to anti...@googlegroups.com
Hi Wagyx,

On 9/3/2023 11:39 AM, Wagyx Xygaw wrote:
> I'll take a look now so I think I could get an answer to your
> questions today or during the week.

One page where I've completed the transition to the new OFF viewer is here

https://www.interocitors.com/polyhedra/UCs/index.html

If you click on a picture it brings up the full screen browser. Links
below the picture will bring up the windowed browsers for OFF or VRML.

The OFF viewer if very versatile. I'm now able to show the OFF file with
black edges in the viewer.

Roger

Roger Kaufman

unread,
Sep 4, 2023, 5:18:17 AM9/4/23
to anti...@googlegroups.com
Hi Wagyx,

On 9/4/2023 4:41 AM, Roger Kaufman wrote:
> One page where I've completed the transition to the new OFF viewer is
> here
>
> https://www.interocitors.com/polyhedra/UCs/index.html

I just finished another page here

https://www.interocitors.com/polyhedra/Deltahedra/Convex/index.html

Clinking on the picture brings up the full screen, and clicking on the
OFF file link below the picture brings up the window view and allows for
downloading.

It is set for the black backgrounds on this page.

Roger

Roger Kaufman

unread,
Sep 4, 2023, 11:59:05 AM9/4/23
to anti...@googlegroups.com
Hi Wagyx,

On 9/3/2023 11:39 AM, Wagyx Xygaw wrote:
> Also I'd like to know if you've ever set an <iframe> to go full screen
> on a button press and then return to normal on Escape. I've also seen
> examples of using F11 to do it as well but only had partial success with
> it. In the latter case F11 would only maximize the iframe and and Escape
> would return its original size, if everything worked as it should.

I found a solution to maximizing an iframe on a button press here

https://idev.games/post/fullscreen-button-for-your-embedded-games

It acts like an F11 and Escape will return the page to normal. I've
updated the windowed viewer page and you can try it here.

https://www.interocitors.com/polyhedra/offwin.html?url=UCs/off/05__5_Tetrahedra.off&useBaseColor=false&vertexRadius=0.001&edgeRadius=0.001

The nice part about doing it this way is that any change in view in the
window is translated to full screen and back. If you change the rotation
in the window, it will continue in the full screen because it is the
same instance.

https://www.interocitors.com/polyhedra/offwin.html?url=offview/off_test/uc15.off&rotationSpeed=0.5&rotationDirection=0,1,0

Roger

Reply all
Reply to author
Forward
0 new messages