feat: Produce an archematics plugin that works in Firefox (#38)
With this loaded in under the Firefox debugger, one can see linked WRL files and Java Geometry Applets on arbitrary web pages. This represents significant progress on #28, but getting more controls and getting it to work in other browsers is still on deck. Reviewed-on: #38 Co-authored-by: Glen Whitney <glen@studioinfinity.org> Co-committed-by: Glen Whitney <glen@studioinfinity.org>
This commit is contained in:
parent
b31c0671d2
commit
e7361f94a7
43 changed files with 164418 additions and 102 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
BIN
etc/deps/GeoGebra/HTML5/5.0/webSimple/clear.cache.gif
Normal file
BIN
etc/deps/GeoGebra/HTML5/5.0/webSimple/clear.cache.gif
Normal file
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
|
@ -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
23
etc/deps/GeoGebra/HTML5/5.0/webSimple/webSimple.nocache.js
Normal file
23
etc/deps/GeoGebra/HTML5/5.0/webSimple/webSimple.nocache.js
Normal 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();
|
5
etc/deps/GeoGebra/deployggb.js
Normal file
5
etc/deps/GeoGebra/deployggb.js
Normal file
File diff suppressed because one or more lines are too long
11
etc/deps/README.txt
Normal file
11
etc/deps/README.txt
Normal 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
|
2
etc/deps/geogebraAmbient.d.ts
vendored
2
etc/deps/geogebraAmbient.d.ts
vendored
|
@ -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 {
|
||||
}
|
||||
|
|
10716
etc/deps/jquery.js
vendored
Normal file
10716
etc/deps/jquery.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
942
etc/deps/x_ite/assets/components/Scripting.js
Normal file
942
etc/deps/x_ite/assets/components/Scripting.js
Normal file
|
@ -0,0 +1,942 @@
|
|||
/* X_ITE v8.12.5 */(() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ 355:
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window [Symbol .for ("X_ITE.X3D-8.12.5")] .require ("lib/jquery");
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/compat get default export */
|
||||
/******/ (() => {
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = (module) => {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ () => (module['default']) :
|
||||
/******/ () => (module);
|
||||
/******/ __webpack_require__.d(getter, { a: getter });
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/define property getters */
|
||||
/******/ (() => {
|
||||
/******/ // define getter functions for harmony exports
|
||||
/******/ __webpack_require__.d = (exports, definition) => {
|
||||
/******/ for(var key in definition) {
|
||||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
||||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
var __webpack_exports__ = {};
|
||||
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
||||
(() => {
|
||||
|
||||
// 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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.5")] .require ("x_ite/Namespace");
|
||||
var Namespace_default = /*#__PURE__*/__webpack_require__.n(Namespace_namespaceObject);
|
||||
;// CONCATENATED MODULE: ./src/x_ite/Browser/Scripting/evaluate.js
|
||||
/*******************************************************************************
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
|
||||
*
|
||||
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
||||
*
|
||||
* The copyright notice above does not evidence any actual of intended
|
||||
* publication of such source code, and is an unpublished work by create3000.
|
||||
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
||||
* create3000.
|
||||
*
|
||||
* No permission is granted to copy, distribute, or create derivative works from
|
||||
* the contents of this software, in whole or in part, without the prior written
|
||||
* permission of create3000.
|
||||
*
|
||||
* NON-MILITARY USE ONLY
|
||||
*
|
||||
* All create3000 software are effectively free software with a non-military use
|
||||
* restriction. It is free. Well commented source is provided. You may reuse the
|
||||
* source in any way you please with the exception anything that uses it must be
|
||||
* marked to indicate is contains 'non-military use only' components.
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
|
||||
*
|
||||
* This file is part of the X_ITE Project.
|
||||
*
|
||||
* X_ITE is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU General Public License version 3 only, as published by the
|
||||
* Free Software Foundation.
|
||||
*
|
||||
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
||||
* details (a copy is included in the LICENSE file that accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version 3
|
||||
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
||||
* copy of the GPLv3 License.
|
||||
*
|
||||
* For Silvio, Joy and Adi.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
function evaluate (thisArg, globalObject, sourceText)
|
||||
{
|
||||
return new Function (/* js */ `with (arguments [0])
|
||||
{
|
||||
return eval ((() =>
|
||||
{
|
||||
const sourceText = arguments [1];
|
||||
|
||||
delete arguments [0];
|
||||
delete arguments [1];
|
||||
|
||||
arguments .length = 0;
|
||||
|
||||
return sourceText;
|
||||
})
|
||||
());
|
||||
}`)
|
||||
.call (thisArg, globalObject, sourceText);
|
||||
}
|
||||
|
||||
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.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.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.5")] .require ("x_ite/Base/X3DConstants");
|
||||
var X3DConstants_default = /*#__PURE__*/__webpack_require__.n(X3DConstants_namespaceObject);
|
||||
;// CONCATENATED MODULE: ./src/x_ite/Components/Scripting/X3DScriptNode.js
|
||||
/*******************************************************************************
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
|
||||
*
|
||||
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
||||
*
|
||||
* The copyright notice above does not evidence any actual of intended
|
||||
* publication of such source code, and is an unpublished work by create3000.
|
||||
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
||||
* create3000.
|
||||
*
|
||||
* No permission is granted to copy, distribute, or create derivative works from
|
||||
* the contents of this software, in whole or in part, without the prior written
|
||||
* permission of create3000.
|
||||
*
|
||||
* NON-MILITARY USE ONLY
|
||||
*
|
||||
* All create3000 software are effectively free software with a non-military use
|
||||
* restriction. It is free. Well commented source is provided. You may reuse the
|
||||
* source in any way you please with the exception anything that uses it must be
|
||||
* marked to indicate is contains 'non-military use only' components.
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
|
||||
*
|
||||
* This file is part of the X_ITE Project.
|
||||
*
|
||||
* X_ITE is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU General Public License version 3 only, as published by the
|
||||
* Free Software Foundation.
|
||||
*
|
||||
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
||||
* details (a copy is included in the LICENSE file that accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version 3
|
||||
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
||||
* copy of the GPLv3 License.
|
||||
*
|
||||
* For Silvio, Joy and Adi.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function X3DScriptNode (executionContext)
|
||||
{
|
||||
X3DChildNode_default().call (this, executionContext);
|
||||
X3DUrlObject_default().call (this, executionContext);
|
||||
|
||||
this .addType ((X3DConstants_default()).X3DScriptNode);
|
||||
}
|
||||
|
||||
Object .assign (Object .setPrototypeOf (X3DScriptNode .prototype, (X3DChildNode_default()).prototype),
|
||||
(X3DUrlObject_default()).prototype,
|
||||
{
|
||||
initialize ()
|
||||
{
|
||||
X3DChildNode_default().prototype .initialize .call (this);
|
||||
X3DUrlObject_default().prototype .initialize .call (this);
|
||||
},
|
||||
dispose ()
|
||||
{
|
||||
X3DUrlObject_default().prototype .dispose .call (this);
|
||||
X3DChildNode_default().prototype .dispose .call (this);
|
||||
},
|
||||
});
|
||||
|
||||
Object .defineProperties (X3DScriptNode,
|
||||
{
|
||||
typeName:
|
||||
{
|
||||
value: "X3DScriptNode",
|
||||
enumerable: true,
|
||||
},
|
||||
componentName:
|
||||
{
|
||||
value: "Scripting",
|
||||
enumerable: true,
|
||||
},
|
||||
});
|
||||
|
||||
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.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.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);
|
||||
/*******************************************************************************
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
|
||||
*
|
||||
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
||||
*
|
||||
* The copyright notice above does not evidence any actual of intended
|
||||
* publication of such source code, and is an unpublished work by create3000.
|
||||
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
||||
* create3000.
|
||||
*
|
||||
* No permission is granted to copy, distribute, or create derivative works from
|
||||
* the contents of this software, in whole or in part, without the prior written
|
||||
* permission of create3000.
|
||||
*
|
||||
* NON-MILITARY USE ONLY
|
||||
*
|
||||
* All create3000 software are effectively free software with a non-military use
|
||||
* restriction. It is free. Well commented source is provided. You may reuse the
|
||||
* source in any way you please with the exception anything that uses it must be
|
||||
* marked to indicate is contains 'non-military use only' components.
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
|
||||
*
|
||||
* This file is part of the X_ITE Project.
|
||||
*
|
||||
* X_ITE is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU General Public License version 3 only, as published by the
|
||||
* Free Software Foundation.
|
||||
*
|
||||
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
||||
* details (a copy is included in the LICENSE file that accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version 3
|
||||
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
||||
* copy of the GPLv3 License.
|
||||
*
|
||||
* For Silvio, Joy and Adi.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function Script (executionContext)
|
||||
{
|
||||
Scripting_X3DScriptNode .call (this, executionContext);
|
||||
|
||||
this .addType ((X3DConstants_default()).Script);
|
||||
}
|
||||
|
||||
Object .assign (Object .setPrototypeOf (Script .prototype, Scripting_X3DScriptNode .prototype),
|
||||
{
|
||||
initialize ()
|
||||
{
|
||||
Scripting_X3DScriptNode .prototype .initialize .call (this);
|
||||
|
||||
this .requestImmediateLoad () .catch (Function .prototype);
|
||||
},
|
||||
getExtendedEventHandling ()
|
||||
{
|
||||
return false;
|
||||
},
|
||||
canUserDefinedFields ()
|
||||
{
|
||||
return true;
|
||||
},
|
||||
addUserDefinedField (accessType, name, field)
|
||||
{
|
||||
Scripting_X3DScriptNode .prototype .addUserDefinedField .call (this, accessType, name, field);
|
||||
|
||||
if (!this .isInitialized ())
|
||||
return;
|
||||
|
||||
this .setLoadState ((X3DConstants_default()).NOT_STARTED_STATE);
|
||||
this .requestImmediateLoad () .catch (Function .prototype);
|
||||
},
|
||||
removeUserDefinedField (name)
|
||||
{
|
||||
this .getUserDefinedFields () .get (name) ?.removeInterest ("set_field__", this);
|
||||
|
||||
Scripting_X3DScriptNode .prototype .removeUserDefinedField .call (this, name);
|
||||
|
||||
if (!this .isInitialized ())
|
||||
return;
|
||||
|
||||
this .setLoadState ((X3DConstants_default()).NOT_STARTED_STATE);
|
||||
this .requestImmediateLoad () .catch (Function .prototype);
|
||||
},
|
||||
getSourceText ()
|
||||
{
|
||||
return this ._url;
|
||||
},
|
||||
unloadData ()
|
||||
{
|
||||
this .initialize__ ("");
|
||||
},
|
||||
loadData ()
|
||||
{
|
||||
new (FileLoader_default()) (this) .loadDocument (this ._url, (data) =>
|
||||
{
|
||||
if (data === null)
|
||||
{
|
||||
// No URL could be loaded.
|
||||
this .setLoadState ((X3DConstants_default()).FAILED_STATE);
|
||||
}
|
||||
else
|
||||
{
|
||||
this .initialize__ ($.decodeText (data));
|
||||
this .setLoadState ((X3DConstants_default()).COMPLETE_STATE);
|
||||
}
|
||||
});
|
||||
},
|
||||
createGlobalObject ()
|
||||
{
|
||||
const browser = this .getBrowser ();
|
||||
|
||||
function SFNode (vrmlSyntax)
|
||||
{
|
||||
const nodes = browser .createVrmlFromString (vrmlSyntax);
|
||||
|
||||
if (nodes .length && nodes [0])
|
||||
return nodes [0];
|
||||
|
||||
throw new Error ("SFNode.new: invalid argument.");
|
||||
}
|
||||
|
||||
SFNode .prototype = (Fields_default()).SFNode .prototype;
|
||||
|
||||
const globalObject =
|
||||
{
|
||||
NULL: { value: null },
|
||||
FALSE: { value: false },
|
||||
TRUE: { value: true },
|
||||
print: { value: browser .println .bind (browser) },
|
||||
trace: { value: browser .println .bind (browser) },
|
||||
|
||||
Browser: { value: browser },
|
||||
|
||||
X3DConstants: { value: (X3DConstants_default()) },
|
||||
X3DBrowser: { value: (X3DBrowser_default()) },
|
||||
X3DExecutionContext: { value: (X3DExecutionContext_default()) },
|
||||
X3DScene: { value: (X3DScene_default()) },
|
||||
ComponentInfo: { value: (ComponentInfo_default()) },
|
||||
ComponentInfoArray: { value: (ComponentInfoArray_default()) },
|
||||
ProfileInfo: { value: (ProfileInfo_default()) },
|
||||
ProfileInfoArray: { value: (ProfileInfoArray_default()) },
|
||||
ConcreteNodesArray: { value: (ConcreteNodesArray_default()) }, // non-standard
|
||||
AbstractNodesArray: { value: (AbstractNodesArray_default()) }, // non-standard
|
||||
UnitInfo: { value: (UnitInfo_default()) },
|
||||
UnitInfoArray: { value: (UnitInfoArray_default()) },
|
||||
NamedNodesArray: { value: (NamedNodesArray_default()) }, // non-standard
|
||||
ImportedNodesArray: { value: (ImportedNodesArray_default()) }, // non-standard
|
||||
X3DImportedNode: { value: (X3DImportedNode_default()) }, // non-standard
|
||||
ExportedNodesArray: { value: (ExportedNodesArray_default()) }, // non-standard
|
||||
X3DExportedNode: { value: (X3DExportedNode_default()) }, // non-standard
|
||||
ExternProtoDeclarationArray: { value: (ExternProtoDeclarationArray_default()) },
|
||||
ProtoDeclarationArray: { value: (ProtoDeclarationArray_default()) },
|
||||
X3DExternProtoDeclaration: { value: (X3DExternProtoDeclaration_default()) },
|
||||
X3DProtoDeclaration: { value: (X3DProtoDeclaration_default()) },
|
||||
X3DProtoDeclarationNode: { value: (X3DProtoDeclarationNode_default()) }, // non-standard
|
||||
RouteArray: { value: (RouteArray_default()) },
|
||||
X3DRoute: { value: (X3DRoute_default()) },
|
||||
|
||||
X3DBaseNode: { value: (X3DBaseNode_default()) }, // non-standard
|
||||
|
||||
X3DFieldDefinition: { value: (X3DFieldDefinition_default()) },
|
||||
FieldDefinitionArray: { value: (FieldDefinitionArray_default()) },
|
||||
|
||||
X3DField: { value: (X3DField_default()) },
|
||||
X3DArrayField: { value: (X3DArrayField_default()) },
|
||||
|
||||
SFColor: { value: (Fields_default()).SFColor },
|
||||
SFColorRGBA: { value: (Fields_default()).SFColorRGBA },
|
||||
SFImage: { value: (Fields_default()).SFImage },
|
||||
SFMatrix3d: { value: (Fields_default()).SFMatrix3d },
|
||||
SFMatrix3f: { value: (Fields_default()).SFMatrix3f },
|
||||
SFMatrix4d: { value: (Fields_default()).SFMatrix4d },
|
||||
SFMatrix4f: { value: (Fields_default()).SFMatrix4f },
|
||||
SFNode: { value: SFNode },
|
||||
SFRotation: { value: (Fields_default()).SFRotation },
|
||||
SFString: { value: (Fields_default()).SFString },
|
||||
SFVec2d: { value: (Fields_default()).SFVec2d },
|
||||
SFVec2f: { value: (Fields_default()).SFVec2f },
|
||||
SFVec3d: { value: (Fields_default()).SFVec3d },
|
||||
SFVec3f: { value: (Fields_default()).SFVec3f },
|
||||
SFVec4d: { value: (Fields_default()).SFVec4d },
|
||||
SFVec4f: { value: (Fields_default()).SFVec4f },
|
||||
VrmlMatrix: { value: (Fields_default()).VrmlMatrix },
|
||||
|
||||
MFBool: { value: (Fields_default()).MFBool },
|
||||
MFColor: { value: (Fields_default()).MFColor },
|
||||
MFColorRGBA: { value: (Fields_default()).MFColorRGBA },
|
||||
MFDouble: { value: (Fields_default()).MFDouble },
|
||||
MFFloat: { value: (Fields_default()).MFFloat },
|
||||
MFImage: { value: (Fields_default()).MFImage },
|
||||
MFInt32: { value: (Fields_default()).MFInt32 },
|
||||
MFMatrix3d: { value: (Fields_default()).MFMatrix3d },
|
||||
MFMatrix3f: { value: (Fields_default()).MFMatrix3f },
|
||||
MFMatrix4d: { value: (Fields_default()).MFMatrix4d },
|
||||
MFMatrix4f: { value: (Fields_default()).MFMatrix4f },
|
||||
MFNode: { value: (Fields_default()).MFNode },
|
||||
MFRotation: { value: (Fields_default()).MFRotation },
|
||||
MFString: { value: (Fields_default()).MFString },
|
||||
MFTime: { value: (Fields_default()).MFTime },
|
||||
MFVec2d: { value: (Fields_default()).MFVec2d },
|
||||
MFVec2f: { value: (Fields_default()).MFVec2f },
|
||||
MFVec3d: { value: (Fields_default()).MFVec3d },
|
||||
MFVec3f: { value: (Fields_default()).MFVec3f },
|
||||
MFVec4d: { value: (Fields_default()).MFVec4d },
|
||||
MFVec4f: { value: (Fields_default()).MFVec4f },
|
||||
};
|
||||
|
||||
for (const field of this .getUserDefinedFields ())
|
||||
{
|
||||
const name = field .getName ();
|
||||
|
||||
if (field .getAccessType () === (X3DConstants_default()).inputOnly)
|
||||
continue;
|
||||
|
||||
if (!(name in globalObject))
|
||||
{
|
||||
globalObject [name] =
|
||||
{
|
||||
get: field .valueOf .bind (field),
|
||||
set: field .setValue .bind (field),
|
||||
};
|
||||
}
|
||||
|
||||
if (field .getAccessType () === (X3DConstants_default()).inputOutput)
|
||||
{
|
||||
globalObject [name + "_changed"] =
|
||||
{
|
||||
get: field .valueOf .bind (field),
|
||||
set: field .setValue .bind (field),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return Object .create (Object .prototype, globalObject);
|
||||
},
|
||||
createContext (sourceText)
|
||||
{
|
||||
try
|
||||
{
|
||||
const callbacks = ["initialize", "prepareEvents", "eventsProcessed", "shutdown"];
|
||||
|
||||
for (const field of this .getUserDefinedFields ())
|
||||
{
|
||||
switch (field .getAccessType ())
|
||||
{
|
||||
case (X3DConstants_default()).inputOnly:
|
||||
callbacks .push (field .getName ());
|
||||
break;
|
||||
case (X3DConstants_default()).inputOutput:
|
||||
callbacks .push ("set_" + field .getName ());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
sourceText += ";\n[" + callbacks .map (c => `typeof ${c} !== "undefined" ? ${c} : undefined`) .join (",") + "];";
|
||||
|
||||
const
|
||||
result = this .evaluate (sourceText),
|
||||
context = new Map ();
|
||||
|
||||
for (let i = 0; i < callbacks .length; ++ i)
|
||||
context .set (callbacks [i], result [i]);
|
||||
|
||||
return context;
|
||||
}
|
||||
catch (error)
|
||||
{
|
||||
this .setError ("while evaluating script source", error);
|
||||
|
||||
return new Map ();
|
||||
}
|
||||
},
|
||||
evaluate (sourceText)
|
||||
{
|
||||
const browser = this .getBrowser ();
|
||||
|
||||
try
|
||||
{
|
||||
browser .getScriptStack () .push (this);
|
||||
|
||||
if (!this .globalObject)
|
||||
this .globalObject = this .createGlobalObject ();
|
||||
|
||||
return Scripting_evaluate (SFNodeCache_default().get (this), this .globalObject, sourceText);
|
||||
}
|
||||
finally
|
||||
{
|
||||
browser .getScriptStack () .pop ();
|
||||
}
|
||||
},
|
||||
initialize__ (sourceText)
|
||||
{
|
||||
this .disconnect ();
|
||||
|
||||
const browser = this .getBrowser ();
|
||||
|
||||
// Create context.
|
||||
|
||||
this .globalObject = this .createGlobalObject ();
|
||||
this .context = this .createContext (sourceText);
|
||||
|
||||
// Connect shutdown.
|
||||
|
||||
const shutdown = this .context .get ("shutdown");
|
||||
|
||||
if (typeof shutdown === "function")
|
||||
$(window) .on ("unload.Script" + this .getId (), this .call__ .bind (this, shutdown, "shutdown"));
|
||||
|
||||
// Connect prepareEvents.
|
||||
|
||||
const prepareEvents = this .context .get ("prepareEvents");
|
||||
|
||||
if (typeof prepareEvents === "function")
|
||||
browser .prepareEvents () .addInterest ("call__", this, prepareEvents, "prepareEvents");
|
||||
|
||||
// Connect eventsProcessed.
|
||||
|
||||
const eventsProcessed = this .context .get ("eventsProcessed");
|
||||
|
||||
if (typeof eventsProcessed === "function")
|
||||
this .addInterest ("call__", this, eventsProcessed, "eventsProcessed");
|
||||
|
||||
// Connect fields.
|
||||
|
||||
for (const field of this .getUserDefinedFields ())
|
||||
{
|
||||
switch (field .getAccessType ())
|
||||
{
|
||||
case (X3DConstants_default()).inputOnly:
|
||||
{
|
||||
const callback = this .context .get (field .getName ());
|
||||
|
||||
if (typeof callback === "function")
|
||||
field .addInterest ("set_field__", this, callback);
|
||||
|
||||
break;
|
||||
}
|
||||
case (X3DConstants_default()).inputOutput:
|
||||
{
|
||||
const callback = this .context .get ("set_" + field .getName ());
|
||||
|
||||
if (typeof callback === "function")
|
||||
field .addInterest ("set_field__", this, callback);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Call initialize function.
|
||||
|
||||
const initialize = this .context .get ("initialize");
|
||||
|
||||
if (typeof initialize === "function")
|
||||
this .call__ (initialize, "initialize");
|
||||
},
|
||||
call__ (callback, name)
|
||||
{
|
||||
const browser = this .getBrowser ();
|
||||
|
||||
browser .getScriptStack () .push (this);
|
||||
|
||||
try
|
||||
{
|
||||
callback .call (SFNodeCache_default().get (this), browser .getCurrentTime ());
|
||||
}
|
||||
catch (error)
|
||||
{
|
||||
this .setError (`in function '${name}'`, error);
|
||||
}
|
||||
|
||||
browser .getScriptStack () .pop ();
|
||||
},
|
||||
set_field__ (callback, field)
|
||||
{
|
||||
const browser = this .getBrowser ();
|
||||
|
||||
field .setTainted (true);
|
||||
browser .getScriptStack () .push (this);
|
||||
|
||||
try
|
||||
{
|
||||
callback .call (SFNodeCache_default().get (this), field .valueOf (), browser .getCurrentTime ());
|
||||
}
|
||||
catch (error)
|
||||
{
|
||||
this .setError ("in function '" + field .getName () + "'", error);
|
||||
}
|
||||
|
||||
browser .getScriptStack () .pop ();
|
||||
field .setTainted (false);
|
||||
},
|
||||
setError (reason, error)
|
||||
{
|
||||
console .error ("JavaScript Error in Script '" + this .getName () + "', " + reason + "\nworld url is '" + this .getExecutionContext () .getWorldURL () + "':");
|
||||
console .error (error);
|
||||
},
|
||||
disconnect ()
|
||||
{
|
||||
// Call shutdown.
|
||||
|
||||
const shutdown = this .context ?.get ("shutdown");
|
||||
|
||||
if (typeof shutdown === "function")
|
||||
this .call__ (shutdown, "shutdown");
|
||||
|
||||
// Disconnect shutdown.
|
||||
|
||||
$(window) .off (".Script" + this .getId ());
|
||||
|
||||
// Disconnect prepareEvents.
|
||||
|
||||
this .getBrowser () .prepareEvents () .removeInterest ("call__", this);
|
||||
|
||||
// Disconnect eventsProcessed.
|
||||
|
||||
this .removeInterest ("call__", this);
|
||||
|
||||
// Disconnect fields.
|
||||
|
||||
for (const field of this .getUserDefinedFields ())
|
||||
field .removeInterest ("set_field__", this);
|
||||
},
|
||||
dispose ()
|
||||
{
|
||||
this .disconnect ();
|
||||
|
||||
Scripting_X3DScriptNode .prototype .dispose .call (this);
|
||||
},
|
||||
});
|
||||
|
||||
Object .defineProperties (Script,
|
||||
{
|
||||
typeName:
|
||||
{
|
||||
value: "Script",
|
||||
enumerable: true,
|
||||
},
|
||||
componentName:
|
||||
{
|
||||
value: "Scripting",
|
||||
enumerable: true,
|
||||
},
|
||||
containerField:
|
||||
{
|
||||
value: "children",
|
||||
enumerable: true,
|
||||
},
|
||||
specificationRange:
|
||||
{
|
||||
value: Object .freeze (["2.0", "Infinity"]),
|
||||
enumerable: true,
|
||||
},
|
||||
fieldDefinitions:
|
||||
{
|
||||
value: new (FieldDefinitionArray_default()) ([
|
||||
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "metadata", new (Fields_default()).SFNode ()),
|
||||
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "description", new (Fields_default()).SFString ()),
|
||||
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "load", new (Fields_default()).SFBool (true)),
|
||||
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "url", new (Fields_default()).MFString ()),
|
||||
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "autoRefresh", new (Fields_default()).SFTime ()),
|
||||
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "autoRefreshTimeLimit", new (Fields_default()).SFTime (3600)),
|
||||
new (X3DFieldDefinition_default()) ((X3DConstants_default()).initializeOnly, "directOutput", new (Fields_default()).SFBool ()),
|
||||
new (X3DFieldDefinition_default()) ((X3DConstants_default()).initializeOnly, "mustEvaluate", new (Fields_default()).SFBool ()),
|
||||
]),
|
||||
enumerable: true,
|
||||
},
|
||||
});
|
||||
|
||||
const Script_default_ = Script;
|
||||
;
|
||||
|
||||
Namespace_default().add ("Script", "x_ite/Components/Scripting/Script", Script_default_);
|
||||
/* harmony default export */ const Scripting_Script = (Script_default_);
|
||||
;// CONCATENATED MODULE: ./src/assets/components/Scripting.js
|
||||
/*******************************************************************************
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
|
||||
*
|
||||
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
||||
*
|
||||
* The copyright notice above does not evidence any actual of intended
|
||||
* publication of such source code, and is an unpublished work by create3000.
|
||||
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
||||
* create3000.
|
||||
*
|
||||
* No permission is granted to copy, distribute, or create derivative works from
|
||||
* the contents of this software, in whole or in part, without the prior written
|
||||
* permission of create3000.
|
||||
*
|
||||
* NON-MILITARY USE ONLY
|
||||
*
|
||||
* All create3000 software are effectively free software with a non-military use
|
||||
* restriction. It is free. Well commented source is provided. You may reuse the
|
||||
* source in any way you please with the exception anything that uses it must be
|
||||
* marked to indicate is contains 'non-military use only' components.
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
|
||||
*
|
||||
* This file is part of the X_ITE Project.
|
||||
*
|
||||
* X_ITE is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU General Public License version 3 only, as published by the
|
||||
* Free Software Foundation.
|
||||
*
|
||||
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
||||
* details (a copy is included in the LICENSE file that accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version 3
|
||||
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
||||
* copy of the GPLv3 License.
|
||||
*
|
||||
* For Silvio, Joy and Adi.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Components_default().add ({
|
||||
name: "Scripting",
|
||||
concreteNodes:
|
||||
[
|
||||
Scripting_Script,
|
||||
],
|
||||
abstractNodes:
|
||||
[
|
||||
Scripting_X3DScriptNode,
|
||||
],
|
||||
});
|
||||
|
||||
const Scripting_default_ = undefined;
|
||||
;
|
||||
|
||||
Namespace_default().add ("Scripting", "assets/components/Scripting", Scripting_default_);
|
||||
/* harmony default export */ const Scripting = ((/* unused pure expression or super */ null && (Scripting_default_)));
|
||||
})();
|
||||
|
||||
/******/ })()
|
||||
;
|
16465
etc/deps/x_ite/assets/components/Text.js
Normal file
16465
etc/deps/x_ite/assets/components/Text.js
Normal file
File diff suppressed because it is too large
Load diff
BIN
etc/deps/x_ite/assets/images/logo.128.png
Normal file
BIN
etc/deps/x_ite/assets/images/logo.128.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
1
etc/deps/x_ite/x_ite.css
Normal file
1
etc/deps/x_ite/x_ite.css
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,8 +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.
|
||||
const X3D: X3D;
|
||||
declare const X3D: X3D;
|
||||
export default X3D;
|
||||
export interface X3D {
|
||||
(callback?: () => void, fallback?: (error: Error) => void): Promise<void>;
|
||||
|
@ -355,7 +351,7 @@ export interface X3DRoute {
|
|||
|
||||
type FieldCallback = (value: unknown) => void
|
||||
|
||||
class X3DField {
|
||||
declare class X3DField {
|
||||
equals(other: X3DField): boolean;
|
||||
assign(other: X3DField): void;
|
||||
setValue(value: unknown): void;
|
||||
|
@ -2098,4 +2094,3 @@ export interface X3DConstants {
|
|||
X3DViewportNode: 82;
|
||||
X3DWorld: 3;
|
||||
}
|
||||
}
|
121559
etc/deps/x_ite/x_ite.mjs
Normal file
121559
etc/deps/x_ite/x_ite.mjs
Normal file
File diff suppressed because it is too large
Load diff
42
etc/manifest.json
Normal file
42
etc/manifest.json
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"manifest_version": 3,
|
||||
"name": "archematics",
|
||||
"version": "0.1",
|
||||
|
||||
"description": "unearths mathematical treasures lost in the web.",
|
||||
|
||||
"content_scripts": [
|
||||
{
|
||||
"matches": ["*://*/*"],
|
||||
"js": ["giveAwrl.js"]
|
||||
},
|
||||
{
|
||||
"matches": ["*://*/*"],
|
||||
"js": ["adapptext.js"],
|
||||
"run_at": "document_start"
|
||||
}
|
||||
],
|
||||
"options_ui": {
|
||||
"page": "options.html",
|
||||
"browser_style": false
|
||||
},
|
||||
"web_accessible_resources": [{
|
||||
"matches": ["<all_urls>"],
|
||||
"resources": [
|
||||
"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",
|
||||
"adapptlet.js",
|
||||
"adapptypes.js",
|
||||
"options.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": ["storage"]
|
||||
}
|
19
etc/options.html
Normal file
19
etc/options.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h3>Debugging</h3>
|
||||
Trace the following to the JavaScript console:
|
||||
<h4>Java Geometry Applets</h4>
|
||||
<label for="commands">Commands executed</label>
|
||||
<input type="checkbox" id="commands">
|
||||
<label for="color">Colors assigned</label>
|
||||
<input type="checkbox" id="color">
|
||||
<script src="options.js" type="module"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue