feat: Adjust the X3D browser size (#24)

Does this simply by setting CSS properties on the canvas element.
  Also updates vrml1to97 and switches to using x_ite.d.ts directly
  from the x_ite repository (although the link will have to change
  once it is merged into main).
  Resolves #21.
  Resolves #23.

Reviewed-on: #24
Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-committed-by: Glen Whitney <glen@studioinfinity.org>
This commit is contained in:
Glen Whitney 2023-09-11 18:20:09 +00:00 committed by Glen Whitney
parent 765d4ff840
commit af472d7bfe
9 changed files with 2060 additions and 2043 deletions

View file

@ -3,7 +3,10 @@ X3D from https://create3000.github.io/code/x_ite/latest/x_ite.mjs
{convert} from ./deps/vrml1to97/index.js
certainlyHandled := '.x3d .gltf .glb .obj .stl .ply'.split ' '
// The next line will need to change when we handle pages with more than
// one link, since we will potentially need a canvas for each one.
canvas := X3D.createBrowser()
$(canvas).css width: '150px', height: '150px'
browser := X3D.getBrowser canvas
browser.setBrowserOption 'StraightenHorizon', false
site := $('a[href^="http"]')