feat: Produce an archematics plugin that works in Firefox #38

Merged
glen merged 3 commits from first_plugin into main 2023-10-05 06:19:14 +00:00
34 changed files with 15341 additions and 1051 deletions
Showing only changes of commit 58469f793e - Show all commits

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
$wnd.webSimple.runAsyncCallback2('wqb(2080,1,EFh);_.dd=function(){};K4g(Tc)(2);\n//# sourceURL=webSimple-2.js\n')

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,23 @@
function webSimple(){var H='bootstrap',I='begin',J='gwt.codesvr.webSimple=',K='gwt.codesvr=',L='webSimple',M='startup',N='DUMMY',O=0,P=1,Q='iframe',R='position:absolute; width:0; height:0; border:none; left: -1000px;',S=' top: -1000px;',T='Chrome',U='CSS1Compat',V='<!doctype html>',W='',X='<html><head><\/head><body><\/body><\/html>',Y='undefined',Z='readystatechange',$=10,_='script',ab='javascript',bb='Failed to load ',cb='moduleStartup',db='scriptTagAdded',eb='moduleRequested',fb='meta',gb='name',hb='webSimple::',ib='::',jb='gwt:property',kb='content',lb='=',mb='gwt:onPropertyErrorFn',nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb='gwt:onLoadErrorFn',qb='" for "gwt:onLoadErrorFn"',rb='#',sb='?',tb='/',ub='img',vb='clear.cache.gif',wb='baseUrl',xb='webSimple.nocache.js',yb='base',zb='//',Ab='selectingPermutation',Bb='webSimple.devmode.js',Cb='5F2C6F84737382D2A3B062804F6250CE',Db=':',Eb='.cache.js',Fb='loadExternalRefs',Gb='end';var n=window;var o=document;q(H,I);function p(){var a=n.location.search;return a.indexOf(J)!=-1||a.indexOf(K)!=-1}
function q(a,b){if(n.__gwtStatsEvent){n.__gwtStatsEvent({moduleName:L,sessionId:n.__gwtStatsSessionId,subSystem:M,evtGroup:a,millis:(new Date).getTime(),type:b})}}
webSimple.__sendStats=q;webSimple.__moduleName=L;webSimple.__errFn=null;webSimple.__moduleBase=N;webSimple.__softPermutationId=O;webSimple.__computePropValue=null;webSimple.__getPropMap=null;webSimple.__installRunAsyncCode=function(){};webSimple.__gwtStartLoadingFragment=function(){return null};webSimple.__gwt_isKnownPropertyValue=function(){return false};webSimple.__gwt_getMetaProperty=function(){return null};var r=null;var s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L};webSimple.__moduleStartupDone=function(e){var f=s[L].bindings;s[L].bindings=function(){var a=f?f():{};var b=e[webSimple.__softPermutationId];for(var c=O;c<b.length;c++){var d=b[c];a[d[O]]=d[P]}return a}};var t;function u(){v();return t}
function v(){if(t){return}var a=o.createElement(Q);a.id=L;a.style.cssText=R+S;a.tabIndex=-1;o.body.appendChild(a);t=a.contentWindow.document;if(navigator.userAgent.indexOf(T)==-1){t.open();var b=document.compatMode==U?V:W;t.write(b+X);t.close()}}
function w(f){function g(a){function b(){if(typeof o.readyState==Y){return typeof o.body!=Y&&o.body!=null}return /loaded|complete/.test(o.readyState)}
var c=b();if(c){a();return}function d(){if(!c){if(!b()){return}c=true;a();if(o.removeEventListener){o.removeEventListener(Z,d,false)}if(e){clearInterval(e)}}}
if(o.addEventListener){o.addEventListener(Z,d,false)}var e=setInterval(function(){d()},$)}
function h(a){var b=u();var c=b.body;var d=b.createElement(_);d.language=ab;d.crossOrigin=W;d.src=a;if(webSimple.__errFn){d.onerror=function(){webSimple.__errFn(L,new Error(bb+a))}}c.appendChild(d);q(cb,db)}
q(cb,eb);g(function(){h(f)})}
webSimple.__startLoadingFragment=function(a){return C(a)};webSimple.__installRunAsyncCode=function(a){var b=u();var c=b.body;var d=b.createElement(_);d.language=ab;d.text=a;c.appendChild(d);c.removeChild(d)};function A(){var c={};var d;var e;var f=o.getElementsByTagName(fb);for(var g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){j=j.replace(hb,W);if(j.indexOf(ib)>=O){continue}if(j==jb){k=i.getAttribute(kb);if(k){var l,m=k.indexOf(lb);if(m>=O){j=k.substring(O,m);l=k.substring(m+P)}else{j=k;l=W}c[j]=l}}else if(j==mb){k=i.getAttribute(kb);if(k){try{d=eval(k)}catch(a){alert(nb+k+ob)}}}else if(j==pb){k=i.getAttribute(kb);if(k){try{e=eval(k)}catch(a){alert(nb+k+qb)}}}}}__gwt_getMetaProperty=function(a){var b=c[a];return b==null?null:b};r=d;webSimple.__errFn=e}
function B(){function e(a){var b=a.lastIndexOf(rb);if(b==-1){b=a.length}var c=a.indexOf(sb);if(c==-1){c=a.length}var d=a.lastIndexOf(tb,Math.min(c,b));return d>=O?a.substring(O,d+P):W}
function f(a){if(a.match(/^\w+:\/\//)){}else{var b=o.createElement(ub);b.src=a+vb;a=e(b.src)}return a}
function g(){var a=__gwt_getMetaProperty(wb);if(a!=null){return a}return W}
function h(){var a=o.getElementsByTagName(_);for(var b=O;b<a.length;++b){if(a[b].src.indexOf(xb)!=-1){return e(a[b].src)}}return W}
function i(){var a=o.getElementsByTagName(yb);if(a.length>O){return a[a.length-P].href}return W}
function j(){var a=o.location;return a.href==a.protocol+zb+a.host+a.pathname+a.search+a.hash}
var k=g();if(k==W){k=h()}if(k==W){k=i()}if(k==W&&j()){k=e(o.location.href)}k=f(k);return k}
function C(a){if(a.match(/^\//)){return a}if(a.match(/^[a-zA-Z]+:\/\//)){return a}return webSimple.__moduleBase+a}
function D(){var f=[];var g=O;var h=[];var i=[];function j(a){var b=i[a](),c=h[a];if(b in c){return b}var d=[];for(var e in c){d[c[e]]=e}if(r){r(a,d,b)}throw null}
__gwt_isKnownPropertyValue=function(a,b){return b in h[a]};webSimple.__getPropMap=function(){var a={};for(var b in h){if(h.hasOwnProperty(b)){a[b]=j(b)}}return a};webSimple.__computePropValue=j;n.__gwt_activeModules[L].bindings=webSimple.__getPropMap;q(H,Ab);if(p()){return C(Bb)}var k;try{k=Cb;var l=k.indexOf(Db);if(l!=-1){g=parseInt(k.substring(l+P),$);k=k.substring(O,l)}}catch(a){}webSimple.__softPermutationId=g;return C(k+Eb)}
function F(){if(!n.__gwt_stylesLoaded){n.__gwt_stylesLoaded={}}q(Fb,I);q(Fb,Gb)}
A();webSimple.__moduleBase=B();s[L].moduleBase=webSimple.__moduleBase;var G=D();F();q(H,Gb);w(G);return true}
webSimple.succeeded=webSimple();

File diff suppressed because one or more lines are too long

11
etc/deps/README.txt Normal file
View File

@ -0,0 +1,11 @@
# GeoGebra Math Apps
Solve math problems, graph functions, create geometric constructions, do statistics and calculus, save and share your results. All of that in your browser using [GeoGebra Graphing Calculator](http://www.geogebra.org/graphing), [GeoGebra Classic](http://www.geogebra.org/classic) and [other apps](https://www.geogebra.org/download).
# Embedding Math Apps in your website
With our JavaScript library it's easy to embed GeoGebra in any website, please see the following documentation
- https://wiki.geogebra.org/en/Reference:Math_Apps_Embedding -- how to embed and customize the Apps
- https://wiki.geogebra.org/en/Reference:JavaScript -- JavaScript API to interact with the Apps
- https://www.github.com/geogebra/math-apps-examples -- examples of Math Apps embedded in HTML you can clone and play with
# License
You are free to copy, distribute and transmit GeoGebra for non-commercial purposes. For details see https://www.geogebra.org/license

View File

@ -1,6 +1,6 @@
// Hack to move GGBApplet into the global namespace
// (since we are getting it from a script)
import {GGBApplet as moduleGGBApplet} from './geogebra/entry.ts'
import {GGBApplet as moduleGGBApplet} from './geotypes/entry.ts'
declare global {
class GGBApplet extends moduleGGBApplet {
}

View File

@ -1,11 +1,11 @@
/* X_ITE v8.12.4 */(() => { // webpackBootstrap
/* X_ITE v8.12.5 */(() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ 355:
/***/ ((module) => {
module.exports = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("lib/jquery");
module.exports = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("lib/jquery");
/***/ })
@ -73,97 +73,97 @@ var __webpack_exports__ = {};
// UNUSED EXPORTS: default
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components\")"
const Components_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Components");
const Components_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Components");
var Components_default = /*#__PURE__*/__webpack_require__.n(Components_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DBaseNode\")"
const X3DBaseNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Base/X3DBaseNode");
const X3DBaseNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Base/X3DBaseNode");
var X3DBaseNode_default = /*#__PURE__*/__webpack_require__.n(X3DBaseNode_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DFieldDefinition\")"
const X3DFieldDefinition_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Base/X3DFieldDefinition");
const X3DFieldDefinition_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Base/X3DFieldDefinition");
var X3DFieldDefinition_default = /*#__PURE__*/__webpack_require__.n(X3DFieldDefinition_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/FieldDefinitionArray\")"
const FieldDefinitionArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Base/FieldDefinitionArray");
const FieldDefinitionArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Base/FieldDefinitionArray");
var FieldDefinitionArray_default = /*#__PURE__*/__webpack_require__.n(FieldDefinitionArray_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DField\")"
const X3DField_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Base/X3DField");
const X3DField_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Base/X3DField");
var X3DField_default = /*#__PURE__*/__webpack_require__.n(X3DField_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DArrayField\")"
const X3DArrayField_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Base/X3DArrayField");
const X3DArrayField_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Base/X3DArrayField");
var X3DArrayField_default = /*#__PURE__*/__webpack_require__.n(X3DArrayField_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Fields\")"
const Fields_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Fields");
const Fields_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Fields");
var Fields_default = /*#__PURE__*/__webpack_require__.n(Fields_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Browser/X3DBrowser\")"
const X3DBrowser_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Browser/X3DBrowser");
const X3DBrowser_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Browser/X3DBrowser");
var X3DBrowser_default = /*#__PURE__*/__webpack_require__.n(X3DBrowser_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Configuration/ComponentInfo\")"
const ComponentInfo_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Configuration/ComponentInfo");
const ComponentInfo_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Configuration/ComponentInfo");
var ComponentInfo_default = /*#__PURE__*/__webpack_require__.n(ComponentInfo_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Configuration/ComponentInfoArray\")"
const ComponentInfoArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Configuration/ComponentInfoArray");
const ComponentInfoArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Configuration/ComponentInfoArray");
var ComponentInfoArray_default = /*#__PURE__*/__webpack_require__.n(ComponentInfoArray_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Configuration/ProfileInfo\")"
const ProfileInfo_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Configuration/ProfileInfo");
const ProfileInfo_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Configuration/ProfileInfo");
var ProfileInfo_default = /*#__PURE__*/__webpack_require__.n(ProfileInfo_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Configuration/ProfileInfoArray\")"
const ProfileInfoArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Configuration/ProfileInfoArray");
const ProfileInfoArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Configuration/ProfileInfoArray");
var ProfileInfoArray_default = /*#__PURE__*/__webpack_require__.n(ProfileInfoArray_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Configuration/ConcreteNodesArray\")"
const ConcreteNodesArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Configuration/ConcreteNodesArray");
const ConcreteNodesArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Configuration/ConcreteNodesArray");
var ConcreteNodesArray_default = /*#__PURE__*/__webpack_require__.n(ConcreteNodesArray_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Configuration/AbstractNodesArray\")"
const AbstractNodesArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Configuration/AbstractNodesArray");
const AbstractNodesArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Configuration/AbstractNodesArray");
var AbstractNodesArray_default = /*#__PURE__*/__webpack_require__.n(AbstractNodesArray_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Configuration/UnitInfo\")"
const UnitInfo_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Configuration/UnitInfo");
const UnitInfo_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Configuration/UnitInfo");
var UnitInfo_default = /*#__PURE__*/__webpack_require__.n(UnitInfo_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Configuration/UnitInfoArray\")"
const UnitInfoArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Configuration/UnitInfoArray");
const UnitInfoArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Configuration/UnitInfoArray");
var UnitInfoArray_default = /*#__PURE__*/__webpack_require__.n(UnitInfoArray_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Execution/NamedNodesArray\")"
const NamedNodesArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Execution/NamedNodesArray");
const NamedNodesArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Execution/NamedNodesArray");
var NamedNodesArray_default = /*#__PURE__*/__webpack_require__.n(NamedNodesArray_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Execution/ImportedNodesArray\")"
const ImportedNodesArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Execution/ImportedNodesArray");
const ImportedNodesArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Execution/ImportedNodesArray");
var ImportedNodesArray_default = /*#__PURE__*/__webpack_require__.n(ImportedNodesArray_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Execution/X3DImportedNode\")"
const X3DImportedNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Execution/X3DImportedNode");
const X3DImportedNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Execution/X3DImportedNode");
var X3DImportedNode_default = /*#__PURE__*/__webpack_require__.n(X3DImportedNode_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Execution/ExportedNodesArray\")"
const ExportedNodesArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Execution/ExportedNodesArray");
const ExportedNodesArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Execution/ExportedNodesArray");
var ExportedNodesArray_default = /*#__PURE__*/__webpack_require__.n(ExportedNodesArray_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Execution/X3DExportedNode\")"
const X3DExportedNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Execution/X3DExportedNode");
const X3DExportedNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Execution/X3DExportedNode");
var X3DExportedNode_default = /*#__PURE__*/__webpack_require__.n(X3DExportedNode_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Execution/X3DExecutionContext\")"
const X3DExecutionContext_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Execution/X3DExecutionContext");
const X3DExecutionContext_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Execution/X3DExecutionContext");
var X3DExecutionContext_default = /*#__PURE__*/__webpack_require__.n(X3DExecutionContext_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Execution/X3DScene\")"
const X3DScene_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Execution/X3DScene");
const X3DScene_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Execution/X3DScene");
var X3DScene_default = /*#__PURE__*/__webpack_require__.n(X3DScene_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Prototype/ExternProtoDeclarationArray\")"
const ExternProtoDeclarationArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Prototype/ExternProtoDeclarationArray");
const ExternProtoDeclarationArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Prototype/ExternProtoDeclarationArray");
var ExternProtoDeclarationArray_default = /*#__PURE__*/__webpack_require__.n(ExternProtoDeclarationArray_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Prototype/ProtoDeclarationArray\")"
const ProtoDeclarationArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Prototype/ProtoDeclarationArray");
const ProtoDeclarationArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Prototype/ProtoDeclarationArray");
var ProtoDeclarationArray_default = /*#__PURE__*/__webpack_require__.n(ProtoDeclarationArray_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Prototype/X3DExternProtoDeclaration\")"
const X3DExternProtoDeclaration_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Prototype/X3DExternProtoDeclaration");
const X3DExternProtoDeclaration_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Prototype/X3DExternProtoDeclaration");
var X3DExternProtoDeclaration_default = /*#__PURE__*/__webpack_require__.n(X3DExternProtoDeclaration_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Prototype/X3DProtoDeclaration\")"
const X3DProtoDeclaration_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Prototype/X3DProtoDeclaration");
const X3DProtoDeclaration_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Prototype/X3DProtoDeclaration");
var X3DProtoDeclaration_default = /*#__PURE__*/__webpack_require__.n(X3DProtoDeclaration_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Prototype/X3DProtoDeclarationNode\")"
const X3DProtoDeclarationNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Prototype/X3DProtoDeclarationNode");
const X3DProtoDeclarationNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Prototype/X3DProtoDeclarationNode");
var X3DProtoDeclarationNode_default = /*#__PURE__*/__webpack_require__.n(X3DProtoDeclarationNode_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Routing/RouteArray\")"
const RouteArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Routing/RouteArray");
const RouteArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Routing/RouteArray");
var RouteArray_default = /*#__PURE__*/__webpack_require__.n(RouteArray_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Routing/X3DRoute\")"
const X3DRoute_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Routing/X3DRoute");
const X3DRoute_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Routing/X3DRoute");
var X3DRoute_default = /*#__PURE__*/__webpack_require__.n(X3DRoute_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Namespace\")"
const Namespace_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Namespace");
const Namespace_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Namespace");
var Namespace_default = /*#__PURE__*/__webpack_require__.n(Namespace_namespaceObject);
;// CONCATENATED MODULE: ./src/x_ite/Browser/Scripting/evaluate.js
/*******************************************************************************
@ -215,7 +215,7 @@ var Namespace_default = /*#__PURE__*/__webpack_require__.n(Namespace_namespaceOb
function evaluate (thisArg, globalObject, sourceText)
{
return Function (/* js */ `with (arguments [0])
return new Function (/* js */ `with (arguments [0])
{
return eval ((() =>
{
@ -239,13 +239,13 @@ const __default__ = evaluate;
Namespace_default().add ("evaluate", "x_ite/Browser/Scripting/evaluate", __default__);
/* harmony default export */ const Scripting_evaluate = (__default__);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Core/X3DChildNode\")"
const X3DChildNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Components/Core/X3DChildNode");
const X3DChildNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Components/Core/X3DChildNode");
var X3DChildNode_default = /*#__PURE__*/__webpack_require__.n(X3DChildNode_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Networking/X3DUrlObject\")"
const X3DUrlObject_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Components/Networking/X3DUrlObject");
const X3DUrlObject_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Components/Networking/X3DUrlObject");
var X3DUrlObject_default = /*#__PURE__*/__webpack_require__.n(X3DUrlObject_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DConstants\")"
const X3DConstants_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Base/X3DConstants");
const X3DConstants_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Base/X3DConstants");
var X3DConstants_default = /*#__PURE__*/__webpack_require__.n(X3DConstants_namespaceObject);
;// CONCATENATED MODULE: ./src/x_ite/Components/Scripting/X3DScriptNode.js
/*******************************************************************************
@ -342,10 +342,10 @@ const X3DScriptNode_default_ = X3DScriptNode;
Namespace_default().add ("X3DScriptNode", "x_ite/Components/Scripting/X3DScriptNode", X3DScriptNode_default_);
/* harmony default export */ const Scripting_X3DScriptNode = (X3DScriptNode_default_);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/InputOutput/FileLoader\")"
const FileLoader_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/InputOutput/FileLoader");
const FileLoader_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/InputOutput/FileLoader");
var FileLoader_default = /*#__PURE__*/__webpack_require__.n(FileLoader_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Fields/SFNodeCache\")"
const SFNodeCache_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Fields/SFNodeCache");
const SFNodeCache_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Fields/SFNodeCache");
var SFNodeCache_default = /*#__PURE__*/__webpack_require__.n(SFNodeCache_namespaceObject);
;// CONCATENATED MODULE: ./src/x_ite/Components/Scripting/Script.js
/* provided dependency */ var $ = __webpack_require__(355);

View File

@ -1,7 +1,7 @@
/* X_ITE v8.12.4 */(() => { // webpackBootstrap
/* X_ITE v8.12.5 */(() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ 591:
/***/ 246:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
/**
@ -14488,7 +14488,7 @@
/***/ ((module) => {
"use strict";
module.exports = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("lib/jquery");
module.exports = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("lib/jquery");
/***/ }),
@ -14564,25 +14564,25 @@ var __webpack_exports__ = {};
// UNUSED EXPORTS: default
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components\")"
const Components_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Components");
const Components_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Components");
var Components_default = /*#__PURE__*/__webpack_require__.n(Components_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Fields\")"
const Fields_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Fields");
const Fields_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Fields");
var Fields_default = /*#__PURE__*/__webpack_require__.n(Fields_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DFieldDefinition\")"
const X3DFieldDefinition_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Base/X3DFieldDefinition");
const X3DFieldDefinition_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Base/X3DFieldDefinition");
var X3DFieldDefinition_default = /*#__PURE__*/__webpack_require__.n(X3DFieldDefinition_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/FieldDefinitionArray\")"
const FieldDefinitionArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Base/FieldDefinitionArray");
const FieldDefinitionArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Base/FieldDefinitionArray");
var FieldDefinitionArray_default = /*#__PURE__*/__webpack_require__.n(FieldDefinitionArray_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Core/X3DNode\")"
const X3DNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Components/Core/X3DNode");
const X3DNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Components/Core/X3DNode");
var X3DNode_default = /*#__PURE__*/__webpack_require__.n(X3DNode_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Networking/X3DUrlObject\")"
const X3DUrlObject_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Components/Networking/X3DUrlObject");
const X3DUrlObject_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Components/Networking/X3DUrlObject");
var X3DUrlObject_default = /*#__PURE__*/__webpack_require__.n(X3DUrlObject_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Namespace\")"
const Namespace_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Namespace");
const Namespace_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Namespace");
var Namespace_default = /*#__PURE__*/__webpack_require__.n(Namespace_namespaceObject);
;// CONCATENATED MODULE: ./src/x_ite/Browser/Text/TextAlignment.js
/*******************************************************************************
@ -14648,12 +14648,12 @@ const __default__ = TextAlignment;
Namespace_default().add ("TextAlignment", "x_ite/Browser/Text/TextAlignment", __default__);
/* harmony default export */ const Text_TextAlignment = (__default__);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/InputOutput/FileLoader\")"
const FileLoader_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/InputOutput/FileLoader");
const FileLoader_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/InputOutput/FileLoader");
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DConstants\")"
const X3DConstants_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Base/X3DConstants");
const X3DConstants_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Base/X3DConstants");
var X3DConstants_default = /*#__PURE__*/__webpack_require__.n(X3DConstants_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Browser/Networking/URLs\")"
const URLs_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Browser/Networking/URLs");
const URLs_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Browser/Networking/URLs");
var URLs_default = /*#__PURE__*/__webpack_require__.n(URLs_namespaceObject);
;// CONCATENATED MODULE: ./src/x_ite/Components/Text/X3DFontStyleNode.js
/*******************************************************************************
@ -14921,19 +14921,19 @@ const X3DFontStyleNode_default_ = X3DFontStyleNode;
Namespace_default().add ("X3DFontStyleNode", "x_ite/Components/Text/X3DFontStyleNode", X3DFontStyleNode_default_);
/* harmony default export */ const Text_X3DFontStyleNode = (X3DFontStyleNode_default_);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Browser/Core/PrimitiveQuality\")"
const PrimitiveQuality_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Browser/Core/PrimitiveQuality");
const PrimitiveQuality_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Browser/Core/PrimitiveQuality");
var PrimitiveQuality_default = /*#__PURE__*/__webpack_require__.n(PrimitiveQuality_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Geometry/Box2\")"
const Box2_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("standard/Math/Geometry/Box2");
const Box2_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("standard/Math/Geometry/Box2");
var Box2_default = /*#__PURE__*/__webpack_require__.n(Box2_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Geometry/Box3\")"
const Box3_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("standard/Math/Geometry/Box3");
const Box3_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("standard/Math/Geometry/Box3");
var Box3_default = /*#__PURE__*/__webpack_require__.n(Box3_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Numbers/Vector2\")"
const Vector2_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("standard/Math/Numbers/Vector2");
const Vector2_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("standard/Math/Numbers/Vector2");
var Vector2_default = /*#__PURE__*/__webpack_require__.n(Vector2_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Numbers/Vector3\")"
const Vector3_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("standard/Math/Numbers/Vector3");
const Vector3_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("standard/Math/Numbers/Vector3");
var Vector3_default = /*#__PURE__*/__webpack_require__.n(Vector3_namespaceObject);
;// CONCATENATED MODULE: ./src/x_ite/Browser/Text/X3DTextGeometry.js
/*******************************************************************************
@ -15555,13 +15555,13 @@ const X3DTextGeometry_default_ = X3DTextGeometry;
Namespace_default().add ("X3DTextGeometry", "x_ite/Browser/Text/X3DTextGeometry", X3DTextGeometry_default_);
/* harmony default export */ const Text_X3DTextGeometry = (X3DTextGeometry_default_);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Numbers/Matrix4\")"
const Matrix4_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("standard/Math/Numbers/Matrix4");
const Matrix4_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("standard/Math/Numbers/Matrix4");
var Matrix4_default = /*#__PURE__*/__webpack_require__.n(Matrix4_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Algorithms/Bezier\")"
const Bezier_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("standard/Math/Algorithms/Bezier");
const Bezier_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("standard/Math/Algorithms/Bezier");
var Bezier_default = /*#__PURE__*/__webpack_require__.n(Bezier_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"lib/libtess\")"
const libtess_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("lib/libtess");
const libtess_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("lib/libtess");
var libtess_default = /*#__PURE__*/__webpack_require__.n(libtess_namespaceObject);
;// CONCATENATED MODULE: ./src/x_ite/Browser/Text/PolygonText.js
/*******************************************************************************
@ -16051,7 +16051,7 @@ Namespace_default().add ("FontStyle", "x_ite/Components/Text/FontStyle", FontSty
/* harmony default export */ const Text_FontStyle = (FontStyle_default_);
;// CONCATENATED MODULE: ./src/x_ite/Browser/Text/X3DTextContext.js
/* provided dependency */ var $ = __webpack_require__(355);
/* provided dependency */ var opentype = __webpack_require__(591);
/* provided dependency */ var opentype = __webpack_require__(246);
/*******************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@ -16191,10 +16191,10 @@ const X3DTextContext_default_ = X3DTextContext;
Namespace_default().add ("X3DTextContext", "x_ite/Browser/Text/X3DTextContext", X3DTextContext_default_);
/* harmony default export */ const Text_X3DTextContext = (X3DTextContext_default_);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Rendering/X3DGeometryNode\")"
const X3DGeometryNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Components/Rendering/X3DGeometryNode");
const X3DGeometryNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Components/Rendering/X3DGeometryNode");
var X3DGeometryNode_default = /*#__PURE__*/__webpack_require__.n(X3DGeometryNode_namespaceObject);
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DCast\")"
const X3DCast_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.4")] .require ("x_ite/Base/X3DCast");
const X3DCast_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("x_ite/Base/X3DCast");
var X3DCast_default = /*#__PURE__*/__webpack_require__.n(X3DCast_namespaceObject);
;// CONCATENATED MODULE: ./src/x_ite/Components/Text/Text.js
/*******************************************************************************

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -9,6 +9,11 @@
{
"matches": ["*://*/*"],
"js": ["giveAwrl.js"]
},
{
"matches": ["*://*/*"],
"js": ["adapptext.js"],
"run_at": "document_start"
}
],
"web_accessible_resources": [{
@ -17,7 +22,15 @@
"deps/x_ite/x_ite.mjs",
"deps/x_ite/x_ite.css",
"deps/x_ite/assets/components/Scripting.js",
"deps/x_ite/assets/components/Text.js"
"deps/x_ite/assets/components/Text.js",
"adapptlet.js",
"deps/GeoGebra/deployggb.js",
"deps/GeoGebra/HTML5/5.0/webSimple/5F2C6F84737382D2A3B062804F6250CE.cache.js",
"deps/GeoGebra/HTML5/5.0/webSimple/webSimple.nocache.js",
"deps/GeoGebra/HTML5/5.0/webSimple/clear.cache.gif",
"deps/GeoGebra/HTML5/5.0/webSimple/deferredjs/*",
"deps/GeoGebra/HTML5/5.0/css/bundles/simple-bundle.css"
]
}]
}],
"permissions": ["tabs", "scripting"]
}

View File

@ -10,6 +10,7 @@
<li> <a href="inscribed-equilateral.html">Before</a> </li>
<li> <a href="inscribed-revived.html">Revived</a> </li>
<li> <a href="inscribed-modified.html">After</a> </li>
<li> <a href="jelts/book1/joyceDefI2.html">Book I Def 2</a> </li>
</ul>
<h2>WRL Files</h2>
<ul><li> <a href="wrl_2.html">Target two</a></li>

File diff suppressed because one or more lines are too long

49
src/adapptext.civet Normal file
View File

@ -0,0 +1,49 @@
import {AppletDescription, AdapParams, params} from ./adapptypes.ts
// (At least some of) Joyce's pages have inline scripts that remove their
// own applet nodes, so we have to watch for them as they are added. Hence,
// this script runs at document_start, and watches for applets being added,
// setting up the joyceApplets structure as it goes
joyceApplets: AppletDescription[] := []
obs := new MutationObserver (mutationList) =>
for each change of mutationList
for each newGenericNode of change.addedNodes
newNode := (newGenericNode as HTMLElement)
newParent := (change.target as HTMLElement)
unless newNode.tagName is 'APPLET' then continue
unless newNode.getAttribute('code') is 'Geometry' then continue
id .= newParent.getAttribute 'id'
unless id
id = 'joyceApplet' + joyceApplets.length
newParent.setAttribute 'id', id
joyceApplets.push {
html: newNode.outerHTML,
params(newNode.children),
id,
width: parseInt(newNode.getAttribute('width') ?? '200'),
height: parseInt(newNode.getAttribute('height') ?? '200') }
config := childList: true, subtree: true
obs.observe document.documentElement, config
function addScriptTag(url: string, module = false)
return new Promise (resolve, reject) =>
script := document.createElement 'script'
script.addEventListener 'load', resolve
script.addEventListener 'error', reject
script.src = url
if module then script.type = 'module'
document.head.appendChild script
document.addEventListener "DOMContentLoaded", =>
finalJoyceApplet := document.querySelector "applet[code='Geometry']"
if joyceApplets.length or finalJoyceApplet
adapParams: AdapParams := {
codebase: browser.runtime.getURL('deps/GeoGebra/HTML5/5.0/webSimple'),
joyceApplets }
// @ts-ignore
window.wrappedJSObject.adapParams = cloneInto(adapParams, window)
addScriptTag(browser.runtime.getURL 'deps/GeoGebra/deployggb.js').then =>
addScriptTag browser.runtime.getURL('adapptlet.js'), true

View File

@ -1,18 +1,12 @@
import https://code.jquery.com/jquery-3.7.1.js
import type {AppletObject} from ./deps/geogebra/api.ts
import ./deps/jquery.js
import type {AppletObject} from ./deps/geotypes/api.ts
import {AppletDescription, AdapParams, params} from ./adapptypes.ts
colorsea from ./deps/colorsea.js
type AppletDescription
html: string
children: HTMLCollection
id: string
width: number
height: number
joyceApplets: AppletDescription[] := []
$('applet[code="Geometry"]').before (i, html) ->
id := `joyceApplet${i}`
joyceApplets.push { html, this.children, id,
joyceApplets.push { html, params(this.children), id,
width: parseInt(this.getAttribute('width') ?? '200'),
height: parseInt(this.getAttribute('height') ?? '200') }
`<div id="${id}"></div>`
@ -41,8 +35,8 @@ type Description
// with the otherName property:
type JoyceElements = Record<AnyName, Description>
jQuery.getScript 'https://www.geogebra.org/apps/deployggb.js', =>
for each jApp of joyceApplets
function postApplets(jApplets: AppletDescription[], codebase = '')
for each jApp of jApplets
params := {
appName: 'classic',
-enableRightClick,
@ -52,15 +46,36 @@ jQuery.getScript 'https://www.geogebra.org/apps/deployggb.js', =>
appletOnLoad: (api: AppletObject) =>
elements: JoyceElements := {}
backgroundRGB := [255, 255, 255] as RGB
for child of jApp.children
dispatchJcommand api, child, elements, backgroundRGB
for name, value in jApp.params
dispatchJcommand api, name, value, elements, backgroundRGB
api.setCoordSystem -10, 10 + jApp.width, -10, 10 + jApp.height
api.setAxesVisible false, false
api.setGridVisible false
} as const
geoApp := new GGBApplet params
if codebase then geoApp.setHTML5Codebase codebase
geoApp.inject jApp.id
adapParams: AdapParams :=
typeof GGBApplet is 'undefined'
? {loader: 'https://www.geogebra.org/apps/deployggb.js', joyceApplets: []}
: ((window as any).adapParams as AdapParams)
// Always use the final joyceApplets if there are any:
if joyceApplets.length
adapParams.joyceApplets = joyceApplets
if adapParams.joyceApplets.length
if adapParams.loader
jQuery.getScript adapParams.loader, =>
postApplets adapParams.joyceApplets
else
postApplets adapParams.joyceApplets, adapParams.codebase
/* That's all of the actions of this script. All of the remainder is
* implementation.
*/
type DimParts = [string[], string[], string[]] // Gives GeoNames
// or expressions for 0-, 1-, and 2-dimensional parts for coloring
@ -92,42 +107,34 @@ type XYZ = RGB
// present in that applet
function dispatchJcommand(
api: AppletObject,
param: Element,
name: string,
value: string,
elements: JoyceElements
backgroundRGB: RGB): void
val := param.getAttribute 'value'
unless val return
attr := param.getAttribute 'name'
switch attr
switch name
'background'
backgroundHex := `#${val}`
api.setGraphicsOptions 1, bgColor: backgroundHex
newback := colorsea(backgroundHex).rgb()
newback := joyce2rgb value, backgroundRGB
for i of [0..2]
backgroundRGB[i] = newback[i]
api.setGraphicsOptions 1, bgColor: colorsea(backgroundRGB).hex()
'title'
api.evalCommand `TitlePoint = Corner(1,1)
Text("${val}", TitlePoint + (2,5))`
Text("${value}", TitlePoint + (2,5))`
/e\[\d+\]/
num := parseInt(attr.slice(2))
{commands, callbacks, parts} := jToG val, elements, num, backgroundRGB
num := parseInt(name.slice(2))
{commands, callbacks, parts} :=
jToG value, elements, num, backgroundRGB
if commands.length
lastTried .= 0
if commands.filter((&)).every (cmd) =>
api.evalCommand(cmd) and ++lastTried
callbacks.forEach &(api, parts)
else console.log
else console.warn
`Geogebra command '${commands[lastTried]}'
(part of translation of '${val}')
(part of translation of '${value}')
failed.`
else console.log `Could not parse command '${val}'`
else console.log `Unkown param ${param}`
// function myListener(...args: unknown[]) {
// console.log 'In my listener with', args
// }
// window.myListener = myListener
else console.warn `Could not parse command '${value}'`
else console.warn `Unkown param ${name} = ${value}`
// Parses a Joyce element-creating command, extending the elements
// by side effect:
@ -139,7 +146,7 @@ function jToG(
[jname, klass, method, data, ...colors] := jCom.split ';'
cmdr .= freshCommander()
unless klass in classHandler
console.log `Unknown entity class ${klass}`
console.warn `Unknown entity class ${klass}`
return cmdr
assertJoyceClass klass // shouldn't need to do that :-/
name := if /^\p{L}\w*$/u.test jname then jname else geoname jname, elements
@ -151,7 +158,7 @@ function jToG(
(args.scalar ?= []).push scalar
continue
unless jdep in elements
console.log `Reference to unknown geometric entity ${jdep} in $jCom}`
console.warn `Reference to unknown geometric entity ${jdep} in $jCom}`
return cmdr
usesCaptions.push jdep
{klass: depKlass, otherName: depGeo, ends} := elements[jdep]
@ -335,7 +342,7 @@ function joyce2rgb(cname: string, backgroundRGB?: RGB): RGB
[H,S,B] := cname.split(',').map (s) => parseInt s
colorsea.hsv(H, S, B).rgb()
else
console.log 'Could not parse color:', cname
console.warn 'Could not parse color:', cname
[128, 128, 128]
function pointDefaultRGB(name: string, method: string): RGB

20
src/adapptypes.civet Normal file
View File

@ -0,0 +1,20 @@
export type AppletDescription
html: string
params: Record<string, string>
id: string
width: number
height: number
export type AdapParams
codebase?: string
loader?: string
joyceApplets: AppletDescription[]
export function params(kids: HTMLCollection): Record<string, string>
return.value: Record<string, string> := {}
for each kid of kids
unless kid.tagName is 'PARAM' then continue
name := kid.getAttribute 'name'
value := kid.getAttribute 'value'
unless name and value then continue
return.value[name] = value

View File

@ -11,7 +11,6 @@ function makeBrowser(url: string, width: string, height: string)
unless typeof browser is 'undefined'
if browser?.runtime?.getURL
x_ite_url = browser.runtime.getURL x_ite_rel
console.log 'LOADING', x_ite_url
const { default: X3D } = await import x_ite_url
canvas := X3D.createBrowser()

View File

@ -2,6 +2,7 @@
mkdir -p $1
cp etc/deps/jquery.js $1
cp -r etc/deps/x_ite $1
cp -r etc/deps/geotypes $1
cp -rL node_modules/vrml1to97/{deps,vrml1to97,streamToString.js} $1
cp -rL node_modules/colorsea/dist/index.esm.js $1/colorsea.js
cp -rL node_modules/colorsea/dist/index.d.ts $1/colorsea.d.ts

View File

@ -1,15 +1,16 @@
mkdir -p etc/deps/geogebra
mkdir -p etc/deps/geotypes
mkdir -p etc/deps/x_ite/assets/components
mkdir etc/deps/x_ite/assets/images
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/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/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://download.geogebra.org/installers/5.0/geogebra-math-apps-bundle-5-0-803-0.zip' --output etc/deps/geo.zip
unzip -d etc/deps etc/deps/geo.zip
rm etc/deps/geo.zip
cp etc/geogebraPreamble.txt etc/deps/geotypes/api.ts
curl 'https://raw.githubusercontent.com/netless-io/netless-app/master/packages/app-geogebra/src/types/api.ts' >> etc/deps/geotypes/api.ts
cp etc/geogebraPreamble.txt etc/deps/geotypes/entry.ts
curl 'https://raw.githubusercontent.com/netless-io/netless-app/master/packages/app-geogebra/src/types/entry.ts' >> etc/deps/geotypes/entry.ts
cp etc/geogebraPreamble.txt etc/deps/geotypes/params.ts
curl 'https://raw.githubusercontent.com/netless-io/netless-app/master/packages/app-geogebra/src/types/params.ts' >> etc/deps/geotypes/params.ts
curl 'https://code.jquery.com/jquery-3.7.1.js' > etc/deps/jquery.js

View File

@ -6,7 +6,7 @@ cp etc/deps/x_ite/x_ite.css $1/deps/x_ite
cp etc/deps/x_ite/assets/images/logo.128.png $1/deps/x_ite/assets/images
cp etc/deps/x_ite/x_ite.mjs $1/deps/x_ite
cp etc/deps/x_ite/assets/components/* $1/deps/x_ite/assets/components
cp -r etc/deps/GeoGebra $1/deps
npx rollup public/js/giveAwrl.js --dir extension
# sed -i -e 's/import..meta..//g' extension/giveAwrl.js
# sed -i -e 's/return "MODULE"/return "BROWSER"/g' extension/giveAwrl.js
npx rollup public/js/adapptlet.js --file extension/adapptlet.js
npx rollup public/js/adapptext.js --file extension/adapptext.js