feat: Adjust the X3D browser size #24

Merged
glen merged 1 commits from viewer_size into main 2023-09-11 18:20:10 +00:00
9 changed files with 2060 additions and 2043 deletions
Showing only changes of commit 7ae9dd706f - Show all commits

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

File diff suppressed because it is too large Load Diff

1
etc/x_itePostamble.txt Normal file
View File

@ -0,0 +1 @@
}

4
etc/x_itePreamble.txt Normal file
View 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.

View File

@ -39,6 +39,6 @@
typescript: '^5.2.2',
},
dependencies: {
vrml1to97: '^0.1.3',
vrml1to97: '^0.2.0',
},
}

View File

@ -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

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"]')

View File

@ -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