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:
parent
765d4ff840
commit
af472d7bfe
2035
etc/deps/x_ite.d.ts
vendored
2035
etc/deps/x_ite.d.ts
vendored
File diff suppressed because it is too large
Load Diff
2038
etc/deps/x_ite/x_ite.d.ts
vendored
Normal file
2038
etc/deps/x_ite/x_ite.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
etc/x_itePostamble.txt
Normal file
1
etc/x_itePostamble.txt
Normal file
@ -0,0 +1 @@
|
||||
}
|
4
etc/x_itePreamble.txt
Normal file
4
etc/x_itePreamble.txt
Normal file
@ -0,0 +1,4 @@
|
||||
declare module 'https://create3000.github.io/code/x_ite/latest/x_ite.mjs' {
|
||||
// This compilation-only file was replicated from the x_ite GitHub repository
|
||||
// https://github.com/create3000/x_ite
|
||||
// compliant with the GPL License, under which it was released.
|
@ -39,6 +39,6 @@
|
||||
typescript: '^5.2.2',
|
||||
},
|
||||
dependencies: {
|
||||
vrml1to97: '^0.1.3',
|
||||
vrml1to97: '^0.2.0',
|
||||
},
|
||||
}
|
||||
|
@ -6,8 +6,8 @@ settings:
|
||||
|
||||
dependencies:
|
||||
vrml1to97:
|
||||
specifier: ^0.1.3
|
||||
version: 0.1.3
|
||||
specifier: ^0.2.0
|
||||
version: 0.2.0
|
||||
|
||||
devDependencies:
|
||||
'@danielx/civet':
|
||||
@ -481,8 +481,8 @@ packages:
|
||||
resolution: {integrity: sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==}
|
||||
dev: true
|
||||
|
||||
/vrml1to97@0.1.3:
|
||||
resolution: {integrity: sha512-rccUBg3SXrnxaYvgAhM1AJeKXkDcUo9KPNE5UyaOzE/b7zy1hU1b5zuuqdE46hVVlGldFU4b2ejle0zKEVD9LA==}
|
||||
/vrml1to97@0.2.0:
|
||||
resolution: {integrity: sha512-RO5M/R9wqmLHbNm866Jz6Iax5BpL4BtqePM/arulHZZsC2rBmFmP4g00lvW/HUFQ6GT7I0/VHv/DPru272S3JA==}
|
||||
hasBin: true
|
||||
dev: false
|
||||
|
||||
|
@ -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"]')
|
||||
|
@ -1,10 +1,16 @@
|
||||
mkdir -p etc/deps/geogebra
|
||||
mkdir etc/deps/x_ite
|
||||
|
||||
cp etc/depPreamble.text etc/deps/geogebra/api.ts
|
||||
cp etc/geogebraPreamble.txt etc/deps/geogebra/api.ts
|
||||
curl 'https://raw.githubusercontent.com/netless-io/netless-app/master/packages/app-geogebra/src/types/api.ts' >> etc/deps/geogebra/api.ts
|
||||
|
||||
cp etc/depPreamble.text etc/deps/geogebra/entry.ts
|
||||
cp etc/geogebraPreamble.txt etc/deps/geogebra/entry.ts
|
||||
curl 'https://raw.githubusercontent.com/netless-io/netless-app/master/packages/app-geogebra/src/types/entry.ts' >> etc/deps/geogebra/entry.ts
|
||||
|
||||
cp etc/depPreamble.text etc/deps/geogebra/params.ts
|
||||
cp etc/geogebraPreamble.txt etc/deps/geogebra/params.ts
|
||||
curl 'https://raw.githubusercontent.com/netless-io/netless-app/master/packages/app-geogebra/src/types/params.ts' >> etc/deps/geogebra/params.ts
|
||||
|
||||
curl 'https://raw.githubusercontent.com/create3000/x_ite/development/dist/x_ite.d.ts' > etc/deps/x_ite/x_ite.d.ts.tmp
|
||||
sed -i -e 's/declare//g' etc/deps/x_ite/x_ite.d.ts.tmp
|
||||
cat etc/x_itePreamble.txt etc/deps/x_ite/x_ite.d.ts.tmp etc/x_itePostamble.txt > etc/deps/x_ite/x_ite.d.ts
|
||||
rm etc/deps/x_ite/x_ite.d.ts.tmp
|
||||
|
Loading…
Reference in New Issue
Block a user