moved to runtime dom

master
Theunis J. Botha 2021-09-10 12:11:16 +02:00
parent 6a99de01d8
commit 552a632dbf
13 changed files with 387 additions and 41 deletions

View File

@ -19,8 +19,8 @@ r3 create RuntimeBullet extends RuntimePhysics ./r3-runtime/
r3 create RuntimeCodeMirror extends RuntimeCoder ./r3-runtime/
r3 create RuntimeCoder extends Runtime ./r3-runtime/
r3 create RuntimeControlKit extends RuntimeGUI ./r3-runtime/
r3 create RuntimeDefault extends Runtime ./r3-runtime/
r3 create RuntimeDocument extends RuntimeDefault ./r3-runtime/
r3 create RuntimeDOM extends Runtime ./r3-runtime/
r3 create RuntimeDocument extends RuntimeDOM ./r3-runtime/
r3 create RuntimeGUI extends Runtime ./r3-runtime/
r3 create RuntimeGraphics extends Runtime ./r3-runtime/
r3 create RuntimePhysics extends Runtime ./r3-runtime/

152
dist/r3.js vendored
View File

@ -1,6 +1,6 @@
class R3 {
static version = '2.0.520';
static compileDate = '2021 Sep 10 - 10:57:46 am';
static version = '2.0.522';
static compileDate = '2021 Sep 10 - 11:12:39 am';
}
class Entity {
@ -2393,6 +2393,10 @@ class SystemRuntime extends System {
*/
static OnGetRuntime(object) {
if (object instanceof R3.Component.DOM) {
}
}
}
@ -2590,18 +2594,19 @@ class Runtime extends Event {
Runtime.RUNTIME_CODER = 0x0;
Runtime.RUNTIME_CODE_MIRROR = 0x1;
Runtime.RUNTIME_DEFAULT = 0x2;
Runtime.RUNTIME_DOM = 0x2;
Runtime.RUNTIME_DOCUMENT = 0x3;
Runtime.RUNTIME_GUI = 0x4;
Runtime.RUNTIME_CONTROL_KIT = 0x5;
Runtime.RUNTIME_GRAPHICS = 0x6;
Runtime.RUNTIME_THREE = 0x7;
Runtime.RUNTIME_PHYSICS = 0x8;
Runtime.RUNTIME_BULLET = 0x9;
Runtime.RUNTIME_SOCKET = 0xa;
Runtime.RUNTIME_STATISTICS = 0xb;
Runtime.RUNTIME_STATS = 0xc;
Runtime.MAX_RUNTIME = 0xd;
Runtime.RUNTIME_DEFAULT = 0x4;
Runtime.RUNTIME_GUI = 0x5;
Runtime.RUNTIME_CONTROL_KIT = 0x6;
Runtime.RUNTIME_GRAPHICS = 0x7;
Runtime.RUNTIME_THREE = 0x8;
Runtime.RUNTIME_PHYSICS = 0x9;
Runtime.RUNTIME_BULLET = 0xa;
Runtime.RUNTIME_SOCKET = 0xb;
Runtime.RUNTIME_STATISTICS = 0xc;
Runtime.RUNTIME_STATS = 0xd;
Runtime.MAX_RUNTIME = 0xe;
/**
@ -2841,6 +2846,118 @@ class RuntimeCoder extends Runtime {
}
/**
Class R3.Event.Runtime.DOM
[Inherited from Event]
Inherited Properties:
<no inherited properties>
Inherited Static Properties:
<no inherited static properties>
Inherited Methods:
- initialize()
Should raise an event(s) which indicates that this object initialized
- async(eventId, data, clientCallback, clientErrorCallback)
Simply calls 'Async()' passing it the arguments
- emit(eventId, data, clientCallback, clientErrorCallback)
Simply calls 'Emit()' passing it the arguments
- subscribe(eventId, callback)
Simply calls 'Subscribe()' passing it the arguments
Inherited Static Methods:
- Async(eventId, data, clientCallback, clientErrorCallback)
Calls all subscription functions registered to eventId with data, clientCallback and clientErrorCallback as
arguments. If an error occurs during clientCallback it additionally will execute clientErrorCallback with the
error as argument.
- Emit(eventId, data, clientCallback, clientErrorCallback)
Calls all subscription functions registered to eventId with data as arg. Calls clientCallback directly after
the event result is obtained, passing it the result. If an exception occurs during execution, the
clientErrorCallback is called with the error as argument.
- Subscribe(eventId, callback)
Subscribes to 'eventName', ex. Event.BEFORE_RENDER and executes 'callback()' when eventName is raised
[Inherited from Runtime]
Inherited Properties:
<no inherited properties>
Inherited Static Properties:
<no inherited static properties>
Inherited Methods:
<no inherited methods>
Inherited Static Methods:
<no inherited static methods>
[Belonging to RuntimeDOM]
Properties:
<no properties>
Static Properties:
<no static properties>
Methods:
<no methods>
Static Methods:
<no static methods>
**/
class RuntimeDOM extends Runtime {
constructor(options) {
if (typeof options === 'undefined') {
options = {};
}
if (typeof options.initialized === 'undefined') {
options.initialized = false;
}
if (typeof options.callDepth === 'undefined') {
options.callDepth = 0;
} else {
options.callDepth++;
}
super(options);
Object.assign(this, options);
if (options.callDepth === 0) {
this.initialize();
} else {
options.callDepth--;
}
}
}
/**
Class R3.Event.Runtime.Default
@ -4013,7 +4130,7 @@ class RuntimeCodeMirror extends RuntimeCoder {
/**
Class R3.Event.Runtime.Default.Document
Class R3.Event.Runtime.DOM.Document
[Inherited from Event]
Inherited Properties:
@ -4071,7 +4188,7 @@ class RuntimeCodeMirror extends RuntimeCoder {
<no inherited static methods>
[Inherited from RuntimeDefault]
[Inherited from RuntimeDOM]
Inherited Properties:
@ -4109,7 +4226,7 @@ class RuntimeCodeMirror extends RuntimeCoder {
**/
class RuntimeDocument extends RuntimeDefault {
class RuntimeDocument extends RuntimeDOM {
constructor(options) {
@ -6221,8 +6338,9 @@ Component.Input = ComponentInput;
Component.Input.Touch = ComponentTouch;
Runtime.Coder = RuntimeCoder;
Runtime.Coder.CodeMirror = RuntimeCodeMirror;
Runtime.DOM = RuntimeDOM;
Runtime.DOM.Document = RuntimeDocument;
Runtime.Default = RuntimeDefault;
Runtime.Default.Document = RuntimeDocument;
Runtime.GUI = RuntimeGUI;
Runtime.GUI.ControlKit = RuntimeControlKit;
Runtime.Graphics = RuntimeGraphics;

View File

@ -1,6 +1,6 @@
{
"name": "r3",
"version" : "2.0.520",
"version" : "2.0.522",
"description": "",
"private": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
class R3 {
static version = '2.0.520';
static compileDate = '2021 Sep 10 - 10:57:46 am';
static version = '2.0.522';
static compileDate = '2021 Sep 10 - 11:12:39 am';
}
//GENERATED_IMPORTS_START

View File

@ -2,8 +2,9 @@
const Runtime = require('./r3-runtime.js');
const RuntimeCoder = require('./r3-runtime-coder.js');
const RuntimeCodeMirror = require('./r3-runtime-code-mirror.js');
const RuntimeDefault = require('./r3-runtime-default.js');
const RuntimeDOM = require('./r3-runtime-d-o-m.js');
const RuntimeDocument = require('./r3-runtime-document.js');
const RuntimeDefault = require('./r3-runtime-default.js');
const RuntimeGUI = require('./r3-runtime-g-u-i.js');
const RuntimeControlKit = require('./r3-runtime-control-kit.js');
const RuntimeGraphics = require('./r3-runtime-graphics.js');
@ -18,8 +19,9 @@ const RuntimeStats = require('./r3-runtime-stats.js');
//GENERATED_INDEX_BODY_START
Runtime.Coder = RuntimeCoder;
Runtime.Coder.CodeMirror = RuntimeCodeMirror;
Runtime.DOM = RuntimeDOM;
Runtime.DOM.Document = RuntimeDocument;
Runtime.Default = RuntimeDefault;
Runtime.Default.Document = RuntimeDocument;
Runtime.GUI = RuntimeGUI;
Runtime.GUI.ControlKit = RuntimeControlKit;
Runtime.Graphics = RuntimeGraphics;

View File

@ -0,0 +1,166 @@
const Event = require('.././r3-event');
const Utils = require('.././r3-utils');
const Runtime = require('.././r3-runtime.js');
/**
GENERATED_INHERITED_START
Class R3.Event.Runtime.DOM
[Inherited from Event]
Inherited Properties:
<no inherited properties>
Inherited Static Properties:
<no inherited static properties>
Inherited Methods:
- initialize()
Should raise an event(s) which indicates that this object initialized
- async(eventId, data, clientCallback, clientErrorCallback)
Simply calls 'Async()' passing it the arguments
- emit(eventId, data, clientCallback, clientErrorCallback)
Simply calls 'Emit()' passing it the arguments
- subscribe(eventId, callback)
Simply calls 'Subscribe()' passing it the arguments
Inherited Static Methods:
- Async(eventId, data, clientCallback, clientErrorCallback)
Calls all subscription functions registered to eventId with data, clientCallback and clientErrorCallback as
arguments. If an error occurs during clientCallback it additionally will execute clientErrorCallback with the
error as argument.
- Emit(eventId, data, clientCallback, clientErrorCallback)
Calls all subscription functions registered to eventId with data as arg. Calls clientCallback directly after
the event result is obtained, passing it the result. If an exception occurs during execution, the
clientErrorCallback is called with the error as argument.
- Subscribe(eventId, callback)
Subscribes to 'eventName', ex. Event.BEFORE_RENDER and executes 'callback()' when eventName is raised
[Inherited from Runtime]
Inherited Properties:
<no inherited properties>
Inherited Static Properties:
<no inherited static properties>
Inherited Methods:
<no inherited methods>
Inherited Static Methods:
<no inherited static methods>
[Belonging to RuntimeDOM]
Properties:
<no properties>
Static Properties:
<no static properties>
Methods:
<no methods>
Static Methods:
<no static methods>
GENERATED_INHERITED_END
CUSTOM_OPTIONS_START
CUSTOM_OPTIONS_END
CUSTOM_INSTANCE_OPTIONS_MAPPING_START
CUSTOM_INSTANCE_OPTIONS_MAPPING_END
CUSTOM_LINKED_OBJECTS_START
CUSTOM_LINKED_OBJECTS_END
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_END
CUSTOM_METHODS_START
CUSTOM_METHODS_END
CUSTOM_STATIC_METHODS_START
CUSTOM_STATIC_METHODS_END
**/
class RuntimeDOM extends Runtime {
//GENERATED_CONSTRUCTOR_EXTENDS_START
constructor(options) {
if (typeof options === 'undefined') {
options = {};
}
if (typeof options.initialized === 'undefined') {
options.initialized = false;
}
if (typeof options.callDepth === 'undefined') {
options.callDepth = 0;
} else {
options.callDepth++;
}
super(options);
//GENERATED_OPTIONS_INIT_START
//GENERATED_OPTIONS_INIT_END
//CUSTOM_OPTIONS_INIT_START
//CUSTOM_OPTIONS_INIT_END
Object.assign(this, options);
//CUSTOM_BEFORE_INIT_START
//CUSTOM_BEFORE_INIT_END
if (options.callDepth === 0) {
this.initialize();
} else {
options.callDepth--;
}
//CUSTOM_AFTER_INIT_START
//CUSTOM_AFTER_INIT_END
}
//GENERATED_CONSTRUCTOR_EXTENDS_END
//GENERATED_METHODS_START
//GENERATED_METHODS_END
//GENERATED_STATIC_METHODS_START
//GENERATED_STATIC_METHODS_END
//CUSTOM_IMPLEMENTATION_START
//CUSTOM_IMPLEMENTATION_END
}
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
module.exports = RuntimeDOM;

View File

@ -1,12 +1,12 @@
const Event = require('.././r3-event');
const Utils = require('.././r3-utils');
const RuntimeDefault = require('.././r3-runtime-default.js');
const RuntimeDOM = require('.././r3-runtime-d-o-m.js');
/**
GENERATED_INHERITED_START
Class R3.Event.Runtime.Default.Document
Class R3.Event.Runtime.DOM.Document
[Inherited from Event]
Inherited Properties:
@ -64,7 +64,7 @@ const RuntimeDefault = require('.././r3-runtime-default.js');
<no inherited static methods>
[Inherited from RuntimeDefault]
[Inherited from RuntimeDOM]
Inherited Properties:
@ -122,7 +122,7 @@ const RuntimeDefault = require('.././r3-runtime-default.js');
**/
class RuntimeDocument extends RuntimeDefault {
class RuntimeDocument extends RuntimeDOM {
//GENERATED_CONSTRUCTOR_EXTENDS_START
constructor(options) {

View File

@ -141,18 +141,19 @@ class Runtime extends Event {
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START
Runtime.RUNTIME_CODER = 0x0;
Runtime.RUNTIME_CODE_MIRROR = 0x1;
Runtime.RUNTIME_DEFAULT = 0x2;
Runtime.RUNTIME_DOM = 0x2;
Runtime.RUNTIME_DOCUMENT = 0x3;
Runtime.RUNTIME_GUI = 0x4;
Runtime.RUNTIME_CONTROL_KIT = 0x5;
Runtime.RUNTIME_GRAPHICS = 0x6;
Runtime.RUNTIME_THREE = 0x7;
Runtime.RUNTIME_PHYSICS = 0x8;
Runtime.RUNTIME_BULLET = 0x9;
Runtime.RUNTIME_SOCKET = 0xa;
Runtime.RUNTIME_STATISTICS = 0xb;
Runtime.RUNTIME_STATS = 0xc;
Runtime.MAX_RUNTIME = 0xd;
Runtime.RUNTIME_DEFAULT = 0x4;
Runtime.RUNTIME_GUI = 0x5;
Runtime.RUNTIME_CONTROL_KIT = 0x6;
Runtime.RUNTIME_GRAPHICS = 0x7;
Runtime.RUNTIME_THREE = 0x8;
Runtime.RUNTIME_PHYSICS = 0x9;
Runtime.RUNTIME_BULLET = 0xa;
Runtime.RUNTIME_SOCKET = 0xb;
Runtime.RUNTIME_STATISTICS = 0xc;
Runtime.RUNTIME_STATS = 0xd;
Runtime.MAX_RUNTIME = 0xe;
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START

View File

@ -185,6 +185,9 @@ class SystemRuntime extends System {
//GENERATED_STATIC_ON_GET_RUNTIME_METHOD_END
//CUSTOM_STATIC_ON_GET_RUNTIME_METHOD_START
if (object instanceof R3.Component.DOM) {
}
//CUSTOM_STATIC_ON_GET_RUNTIME_METHOD_END
}

View File

@ -0,0 +1,57 @@
const Event = require('INCLUDE_PATH/r3-event');
const Utils = require('INCLUDE_PATH/r3-utils');
/**
CUSTOM_OPTIONS_START
CUSTOM_OPTIONS_END
CUSTOM_STATIC_OPTIONS_START
CUSTOM_STATIC_OPTIONS_END
CUSTOM_EVENT_LISTENERS_START
CUSTOM_EVENT_LISTENERS_END
CUSTOM_STATIC_EVENT_LISTENERS_START
CUSTOM_STATIC_EVENT_LISTENERS_END
CUSTOM_METHODS_START
CUSTOM_METHODS_END
CUSTOM_STATIC_METHODS_START
CUSTOM_STATIC_METHODS_END
**/
class CLASS_NAME {
//GENERATED_CONSTRUCTOR_START
//GENERATED_CONSTRUCTOR_END
//GENERATED_METHODS_START
//GENERATED_METHODS_END
//GENERATED_STATIC_METHODS_START
//GENERATED_STATIC_METHODS_END
//GENERATED_EVENT_LISTENER_METHODS_START
//GENERATED_EVENT_LISTENER_METHODS_END
//GENERATED_STATIC_EVENT_LISTENER_METHODS_START
//GENERATED_STATIC_EVENT_LISTENER_METHODS_END
//CUSTOM_IMPLEMENTATION_START
//CUSTOM_IMPLEMENTATION_END
}
//GENERATED_STATIC_OPTIONS_INIT_START
//GENERATED_STATIC_OPTIONS_INIT_END
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
module.exports = CLASS_NAME;

View File

@ -2,7 +2,6 @@ GENERATED_ASYNC_METHOD
GENERATED_CONSTRUCTOR
GENERATED_CONSTRUCTOR_EXTENDS
GENERATED_CREATE_INSTANCE_METHOD
GENERATED_CREATE_INSTANCE_OPTIONS
GENERATED_DEFINES
GENERATED_DISPOSE_INSTANCE_METHOD
GENERATED_DISPOSE_METHOD

View File

@ -1 +1 @@
2.0.520
2.0.522