re-factored runtimes

master
Theunis J. Botha 2021-09-18 08:52:21 +02:00
parent ad817adf8e
commit 165dba208f
26 changed files with 1291 additions and 606 deletions

View File

@ -14,15 +14,14 @@ r3 create Event base ./
r3 create Project extends R3Object ./
r3 create R3 r3_base ./
r3 create R3Object extends Event ./
r3 create Runtime runtime_base ./r3-runtime/
r3 create RuntimeBullet runtime_extends Runtime ./r3-runtime/
r3 create RuntimeBullet runtime_extends RuntimePhysics ./r3-runtime/
r3 create RuntimeCodeMirror runtime_extends RuntimeCoder ./r3-runtime/
r3 create RuntimeCoder runtime_base ./r3-runtime/
r3 create RuntimeControlKit runtime_extends RuntimeGUI ./r3-runtime/
r3 create RuntimeDOM runtime_base ./r3-runtime/
r3 create RuntimeDocument runtime_extends RuntimeDOM ./r3-runtime/
r3 create RuntimeGUI runtime_base ./r3-runtime/
r3 create RuntimeGraphics runtime_extends Runtime ./r3-runtime/
r3 create RuntimeGraphics runtime_base ./r3-runtime/
r3 create RuntimePhysics runtime_base ./r3-runtime/
r3 create RuntimeSocket runtime_base ./r3-runtime/
r3 create RuntimeStatistics runtime_base ./r3-runtime/
@ -38,3 +37,6 @@ r3 create Utils base ./
r3 create SystemRender system_extends System ./r3-system/
r3 create SystemStorage system_extends System ./r3-system/
r3 create RuntimeImage runtime_base ./r3-runtime/
r3 create RuntimeWebImage runtime_extends RuntimeImage ./r3-runtime/
r3 create RuntimeNodeJSImage runtime_extends RuntimeImage ./r3-runtime/
r3 create Runtime base ./r3-runtime/

1156
dist/r3.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -305,7 +305,7 @@ class Node
public $name = '';
public $nameSpace = '';
public $parent = null;
public $children = null;
public $children = [];
public $isBaseClass = null;
function __construct(
@ -314,7 +314,7 @@ class Node
$__nameSpace = '',
$__nameSpaceClassName = '',
$__parent = null,
$__children = null,
$__children = [],
$__isBaseClass = null
)
{

View File

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

111
r3.php
View File

@ -1168,34 +1168,63 @@ function generateIndex($types)
*/
global $graph;
$template = file_get_contents('src/templates/index.template');
foreach ($types as $type) {
$node = $graph->search('name', $type);
$template = file_get_contents('src/templates/index.template');
$imports = [];
$body = [];
$exports = [];
$children = $graph->flatten($node);
if ($type === 'Runtime') {
$nodes = array_merge([$node], $children);
$nodes = $graph->walk();
foreach ($nodes as $child) {
foreach ($nodes as $node) {
$file = null;
if (preg_match('/\bRuntime\b/', $node->name) && $node->isBaseClass) {
$file = str_replace('src/r3/r3-' . strtolower($type), '.', $child->file);
$file = str_replace('src/r3/r3-' . strtolower($type), '.', $node->file);
array_push($imports, "const " . $child->name . ' = require(\'' . $file . "');");
array_push($imports, "const " . $node->name . ' = require(\'' . $file . "');");
foreach ($node->children as $child) {
$file = str_replace('src/r3/r3-' . strtolower($type), '.', $child->file);
array_push($imports, "const " . $child->name . ' = require(\'' . $file . "');");
array_push($body, 'Runtime.' . str_replace('Runtime', '', $child->name) . ' = ' . $child->name . ';');
foreach ($child->children as $implementation) {
$file = str_replace('src/r3/r3-' . strtolower($type), '.', $implementation->file);
array_push($imports, "const " . $implementation->name . ' = require(\'' . $file . "');");
// array_push($body, 'Runtime.' . str_replace('Runtime', '', $implementation->name) . ' = ' . $implementation->name . ';');
array_push($body, 'Runtime.' . str_replace('Runtime', '', $child->name) . '.' . str_replace('Runtime', '', $implementation->name) . ' = ' . $implementation->name . ';');
}
}
}
}
array_push($exports, 'module.exports = Runtime;');
} else {
$node = $graph->search('name', $type);
$children = $graph->flatten($node);
$nodes = array_merge([$node], $children);
foreach ($nodes as $child) {
$file = str_replace('src/r3/r3-' . strtolower($type), '.', $child->file);
array_push($imports, "const " . $child->name . ' = require(\'' . $file . "');");
}
buildIndexBody($graph, $node, $body, $node->nameSpaceClassName);
array_push($exports, 'module.exports = ' . $node->name . ';');
}
buildIndexBody($graph, $node, $body, $node->nameSpaceClassName);
array_push($exports, 'module.exports = ' . $node->name . ';');
$indexFile = 'src/r3/r3-'. strtolower($type) . '/index.js';
file_put_contents($indexFile, $template);
@ -1625,7 +1654,7 @@ function buildNodeList($file)
$nameSpace,
$nameSpaceClassName,
$extends,
null,
[],
$isBaseClass
);
@ -1644,36 +1673,52 @@ function generateOutOfClassImplementationDefines($graph, $types)
foreach ($types as $type) {
$updateList = [];
$i = 0;
$parent = $graph->search('name', $type);
if ($type === 'Runtime') {
$i = 0;
$nodes = $graph->walk();
foreach ($nodes as $node) {
if (preg_match('/Runtime\w+/', $node->name) && $node->isBaseClass) {
array_push($updateList, 'Runtime.BASE_' . strtoupper(from_camel_case($node->name)) . ' = 0x' . dechex($i) . ";\n");
$i++;
if (preg_match('/\bRuntime\b/', $node->name) && $node->isBaseClass) {
$parent = $node;
$updateList = [];
foreach ($parent->children as $child) {
array_push($updateList, 'Runtime.' . strtoupper(from_camel_case(str_replace('Runtime','Base', $child->name))) . ' = 0x' . dechex($i) . ";\n");
$i++;
}
updateSection($parent->file, 'GENERATED_OUT_OF_CLASS_IMPLEMENTATION' , $updateList);
}
}
array_push($updateList, "\n");
if (preg_match('/\bRuntime\w+/', $node->name) && $node->parent->name === 'Runtime') {
$i = 0;
$parent = $node;
foreach ($nodes as $node) {
if (preg_match('/Runtime\w+/', $node->name) && !$node->isBaseClass) {
array_push($updateList, 'Runtime.' . strtoupper(from_camel_case($node->name)) . ' = 0x' . dechex($i) . ";\n");
$i++;
$updateList = [];
foreach ($parent->children as $child) {
array_push($updateList, 'Runtime.' . strtoupper(from_camel_case(str_replace('Runtime','', $child->name))) . ' = 0x' . dechex($i) . ";\n");
$i++;
}
updateSection($parent->file, 'GENERATED_OUT_OF_CLASS_IMPLEMENTATION' , $updateList);
}
}
} else {
$i = 0;
$updateList = [];
$parent = $graph->search('name', $type);
$children = $graph->flatten($parent);
foreach ($children as $child) {
@ -1683,9 +1728,11 @@ function generateOutOfClassImplementationDefines($graph, $types)
array_push($updateList, $parent->name . '.MAX_' . strtoupper($parent->name) . ' = 0x' . dechex($i) . ";\n");
updateSection($parent->file, 'GENERATED_OUT_OF_CLASS_IMPLEMENTATION' , $updateList);
}
updateSection($parent->file, 'GENERATED_OUT_OF_CLASS_IMPLEMENTATION' , $updateList);
}

View File

@ -1,16 +1,9 @@
class R3 {
static version = '2.0.729';
static compileDate = '2021 Sep 17 - 14:41:27 pm';
static version = '2.0.758';
static compileDate = '2021 Sep 18 - 08:48:43 am';
}
//GENERATED_IMPORTS_START
const RuntimeCoder = require('./r3-runtime/r3-runtime-coder.js');
const RuntimeDOM = require('./r3-runtime/r3-runtime-d-o-m.js');
const RuntimeGUI = require('./r3-runtime/r3-runtime-g-u-i.js');
const RuntimeImage = require('./r3-runtime/r3-runtime-image.js');
const RuntimePhysics = require('./r3-runtime/r3-runtime-physics.js');
const RuntimeSocket = require('./r3-runtime/r3-runtime-socket.js');
const RuntimeStatistics = require('./r3-runtime/r3-runtime-statistics.js');
const Runtime = require('./r3-runtime/');
const System = require('./r3-system/');
const Event = require('./r3-event.js');
@ -22,13 +15,6 @@ const Project = require('./r3-project.js');
//GENERATED_IMPORTS_END
//GENERATED_DEFINES_START
R3.RuntimeCoder = RuntimeCoder;
R3.RuntimeDOM = RuntimeDOM;
R3.RuntimeGUI = RuntimeGUI;
R3.RuntimeImage = RuntimeImage;
R3.RuntimePhysics = RuntimePhysics;
R3.RuntimeSocket = RuntimeSocket;
R3.RuntimeStatistics = RuntimeStatistics;
R3.Runtime = Runtime;
R3.System = System;
R3.Event = Event;

View File

@ -1,14 +1,40 @@
//GENERATED_IMPORTS_START
const Runtime = require('./r3-runtime.js');
const RuntimeBullet = require('./r3-runtime-bullet.js');
const RuntimeCoder = require('./r3-runtime-coder.js');
const RuntimeCodeMirror = require('./r3-runtime-code-mirror.js');
const RuntimeDOM = require('./r3-runtime-d-o-m.js');
const RuntimeDocument = require('./r3-runtime-document.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');
const RuntimeThree = require('./r3-runtime-three.js');
const RuntimeImage = require('./r3-runtime-image.js');
const RuntimeNodeJSImage = require('./r3-runtime-node-j-s-image.js');
const RuntimeWebImage = require('./r3-runtime-web-image.js');
const RuntimePhysics = require('./r3-runtime-physics.js');
const RuntimeBullet = require('./r3-runtime-bullet.js');
const RuntimeSocket = require('./r3-runtime-socket.js');
const RuntimeStatistics = require('./r3-runtime-statistics.js');
const RuntimeStats = require('./r3-runtime-stats.js');
//GENERATED_IMPORTS_END
//GENERATED_INDEX_BODY_START
Runtime.Bullet = RuntimeBullet;
Runtime.Coder = RuntimeCoder;
Runtime.Coder.CodeMirror = RuntimeCodeMirror;
Runtime.DOM = RuntimeDOM;
Runtime.DOM.Document = RuntimeDocument;
Runtime.GUI = RuntimeGUI;
Runtime.GUI.ControlKit = RuntimeControlKit;
Runtime.Graphics = RuntimeGraphics;
Runtime.Graphics.Three = RuntimeThree;
Runtime.Image = RuntimeImage;
Runtime.Image.NodeJSImage = RuntimeNodeJSImage;
Runtime.Image.WebImage = RuntimeWebImage;
Runtime.Physics = RuntimePhysics;
Runtime.Physics.Bullet = RuntimeBullet;
Runtime.Socket = RuntimeSocket;
Runtime.Statistics = RuntimeStatistics;
Runtime.Statistics.Stats = RuntimeStats;
//GENERATED_INDEX_BODY_END
//GENERATED_EXPORTS_START

View File

@ -1,14 +1,32 @@
const Event = require('.././r3-event');
const Utils = require('.././r3-utils');
const Runtime = require('./r3-runtime.js');
const RuntimePhysics = require('./r3-runtime-physics.js');
/**
GENERATED_INHERITED_START
Class R3.Runtime.Bullet
Class R3.Runtime.Physics.Bullet
[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>
[Inherited from RuntimePhysics]
Inherited Properties:
<no inherited properties>
@ -72,7 +90,7 @@ const Runtime = require('./r3-runtime.js');
**/
class RuntimeBullet extends Runtime {
class RuntimeBullet extends RuntimePhysics {
//GENERATED_CONSTRUCTOR_START
constructor(options) {

View File

@ -6,7 +6,25 @@ const RuntimeCoder = require('./r3-runtime-coder.js');
GENERATED_INHERITED_START
Class R3.RuntimeCoder.CodeMirror
Class R3.Runtime.Coder.CodeMirror
[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>
[Inherited from RuntimeCoder]
Inherited Properties:

View File

@ -1,5 +1,6 @@
const Event = require('.././r3-event');
const Utils = require('.././r3-utils');
const Runtime = require('./r3-runtime.js');
/**
@ -29,7 +30,7 @@ const Utils = require('.././r3-utils');
**/
class RuntimeCoder {
class RuntimeCoder extends Runtime {
//GENERATED_CONSTRUCTOR_START
constructor(options) {
@ -38,6 +39,8 @@ class RuntimeCoder {
options = {};
}
super(options);
//GENERATED_TEMPLATE_OPTIONS_INIT_START
//GENERATED_TEMPLATE_OPTIONS_INIT_END
@ -71,6 +74,7 @@ class RuntimeCoder {
//GENERATED_STATIC_OPTIONS_INIT_END
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START
Runtime.CODE_MIRROR = 0x8;
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START

View File

@ -6,7 +6,25 @@ const RuntimeGUI = require('./r3-runtime-g-u-i.js');
GENERATED_INHERITED_START
Class R3.RuntimeGUI.ControlKit
Class R3.Runtime.GUI.ControlKit
[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>
[Inherited from RuntimeGUI]
Inherited Properties:

View File

@ -1,5 +1,6 @@
const Event = require('.././r3-event');
const Utils = require('.././r3-utils');
const Runtime = require('./r3-runtime.js');
/**
@ -29,7 +30,7 @@ const Utils = require('.././r3-utils');
**/
class RuntimeDOM {
class RuntimeDOM extends Runtime {
//GENERATED_CONSTRUCTOR_START
constructor(options) {
@ -38,6 +39,8 @@ class RuntimeDOM {
options = {};
}
super(options);
//GENERATED_TEMPLATE_OPTIONS_INIT_START
//GENERATED_TEMPLATE_OPTIONS_INIT_END
@ -71,6 +74,7 @@ class RuntimeDOM {
//GENERATED_STATIC_OPTIONS_INIT_END
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START
Runtime.DOCUMENT = 0x9;
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START

View File

@ -6,7 +6,25 @@ const RuntimeDOM = require('./r3-runtime-d-o-m.js');
GENERATED_INHERITED_START
Class R3.RuntimeDOM.Document
Class R3.Runtime.DOM.Document
[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>
[Inherited from RuntimeDOM]
Inherited Properties:

View File

@ -1,5 +1,6 @@
const Event = require('.././r3-event');
const Utils = require('.././r3-utils');
const Runtime = require('./r3-runtime.js');
/**
@ -29,7 +30,7 @@ const Utils = require('.././r3-utils');
**/
class RuntimeGUI {
class RuntimeGUI extends Runtime {
//GENERATED_CONSTRUCTOR_START
constructor(options) {
@ -38,6 +39,8 @@ class RuntimeGUI {
options = {};
}
super(options);
//GENERATED_TEMPLATE_OPTIONS_INIT_START
//GENERATED_TEMPLATE_OPTIONS_INIT_END
@ -71,6 +74,7 @@ class RuntimeGUI {
//GENERATED_STATIC_OPTIONS_INIT_END
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START
Runtime.CONTROL_KIT = 0xa;
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START

View File

@ -4,47 +4,6 @@ const Runtime = require('./r3-runtime.js');
/**
GENERATED_INHERITED_START
Class R3.Runtime.Graphics
[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 RuntimeGraphics]
Properties:
<no properties>
Static Properties:
<no static properties>
Methods:
<no methods>
Static Methods:
<no static methods>
GENERATED_INHERITED_END
TEMPLATE_OPTIONS_START
TEMPLATE_OPTIONS_END
@ -58,7 +17,6 @@ const Runtime = require('./r3-runtime.js');
CUSTOM_STATIC_OPTIONS_END
TEMPLATE_METHODS_START
buildInstance(component) - Creates an instance of R3.Component based on this Runtime.
TEMPLATE_METHODS_END
CUSTOM_METHODS_START
@ -90,26 +48,10 @@ class RuntimeGraphics extends Runtime {
//GENERATED_OPTIONS_INIT_END
Object.assign(this, options);
}
//GENERATED_CONSTRUCTOR_END
//GENERATED_TEMPLATE_METHODS_START
/**
* buildInstance()
* - Creates an instance of R3.Component based on this Runtime.
* @param component
*/
buildInstance(component) {
//GENERATED_BUILD_INSTANCE_METHOD_START
//GENERATED_BUILD_INSTANCE_METHOD_END
//CUSTOM_BUILD_INSTANCE_METHOD_START
//CUSTOM_BUILD_INSTANCE_METHOD_END
}
//GENERATED_TEMPLATE_METHODS_END
//GENERATED_METHODS_START
@ -123,7 +65,6 @@ class RuntimeGraphics extends Runtime {
//CUSTOM_IMPLEMENTATION_START
//CUSTOM_IMPLEMENTATION_END
}
//GENERATED_TEMPLATE_STATIC_OPTIONS_INIT_START
@ -133,6 +74,7 @@ class RuntimeGraphics extends Runtime {
//GENERATED_STATIC_OPTIONS_INIT_END
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START
Runtime.THREE = 0xb;
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START

View File

@ -1,5 +1,6 @@
const Event = require('.././r3-event');
const Utils = require('.././r3-utils');
const Runtime = require('./r3-runtime.js');
/**
@ -29,7 +30,7 @@ const Utils = require('.././r3-utils');
**/
class RuntimeImage {
class RuntimeImage extends Runtime {
//GENERATED_CONSTRUCTOR_START
constructor(options) {
@ -38,6 +39,8 @@ class RuntimeImage {
options = {};
}
super(options);
//GENERATED_TEMPLATE_OPTIONS_INIT_START
//GENERATED_TEMPLATE_OPTIONS_INIT_END
@ -71,6 +74,8 @@ class RuntimeImage {
//GENERATED_STATIC_OPTIONS_INIT_END
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START
Runtime.NODE_JS_IMAGE = 0xc;
Runtime.WEB_IMAGE = 0xd;
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START

View File

@ -0,0 +1,159 @@
const Event = require('.././r3-event');
const Utils = require('.././r3-utils');
const RuntimeImage = require('./r3-runtime-image.js');
/**
GENERATED_INHERITED_START
Class R3.Runtime.Image.NodeJSImage
[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>
[Inherited from RuntimeImage]
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 RuntimeNodeJSImage]
Properties:
<no properties>
Static Properties:
<no static properties>
Methods:
<no methods>
Static Methods:
<no static methods>
GENERATED_INHERITED_END
TEMPLATE_OPTIONS_START
TEMPLATE_OPTIONS_END
CUSTOM_OPTIONS_START
CUSTOM_OPTIONS_END
TEMPLATE_STATIC_OPTIONS_START
TEMPLATE_STATIC_OPTIONS_END
CUSTOM_STATIC_OPTIONS_START
CUSTOM_STATIC_OPTIONS_END
TEMPLATE_METHODS_START
buildInstance(component) - Creates an instance of R3.Component based on this Runtime.
TEMPLATE_METHODS_END
CUSTOM_METHODS_START
CUSTOM_METHODS_END
TEMPLATE_STATIC_METHODS_START
TEMPLATE_STATIC_METHODS_END
CUSTOM_STATIC_METHODS_START
CUSTOM_STATIC_METHODS_END
**/
class RuntimeNodeJSImage extends RuntimeImage {
//GENERATED_CONSTRUCTOR_START
constructor(options) {
if (typeof options === 'undefined') {
options = {};
}
super(options);
//GENERATED_TEMPLATE_OPTIONS_INIT_START
//GENERATED_TEMPLATE_OPTIONS_INIT_END
//GENERATED_OPTIONS_INIT_START
//GENERATED_OPTIONS_INIT_END
Object.assign(this, options);
}
//GENERATED_CONSTRUCTOR_END
//GENERATED_TEMPLATE_METHODS_START
/**
* buildInstance()
* - Creates an instance of R3.Component based on this Runtime.
* @param component
*/
buildInstance(component) {
//GENERATED_BUILD_INSTANCE_METHOD_START
//GENERATED_BUILD_INSTANCE_METHOD_END
//CUSTOM_BUILD_INSTANCE_METHOD_START
//CUSTOM_BUILD_INSTANCE_METHOD_END
}
//GENERATED_TEMPLATE_METHODS_END
//GENERATED_METHODS_START
//GENERATED_METHODS_END
//GENERATED_TEMPLATE_STATIC_METHODS_START
//GENERATED_TEMPLATE_STATIC_METHODS_END
//GENERATED_STATIC_METHODS_START
//GENERATED_STATIC_METHODS_END
//CUSTOM_IMPLEMENTATION_START
//CUSTOM_IMPLEMENTATION_END
}
//GENERATED_TEMPLATE_STATIC_OPTIONS_INIT_START
//GENERATED_TEMPLATE_STATIC_OPTIONS_INIT_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 = RuntimeNodeJSImage;

View File

@ -1,5 +1,6 @@
const Event = require('.././r3-event');
const Utils = require('.././r3-utils');
const Runtime = require('./r3-runtime.js');
/**
@ -29,7 +30,7 @@ const Utils = require('.././r3-utils');
**/
class RuntimePhysics {
class RuntimePhysics extends Runtime {
//GENERATED_CONSTRUCTOR_START
constructor(options) {
@ -38,6 +39,8 @@ class RuntimePhysics {
options = {};
}
super(options);
//GENERATED_TEMPLATE_OPTIONS_INIT_START
//GENERATED_TEMPLATE_OPTIONS_INIT_END
@ -71,6 +74,7 @@ class RuntimePhysics {
//GENERATED_STATIC_OPTIONS_INIT_END
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START
Runtime.BULLET = 0xe;
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START

View File

@ -1,5 +1,6 @@
const Event = require('.././r3-event');
const Utils = require('.././r3-utils');
const Runtime = require('./r3-runtime.js');
/**
@ -29,7 +30,7 @@ const Utils = require('.././r3-utils');
**/
class RuntimeSocket {
class RuntimeSocket extends Runtime {
//GENERATED_CONSTRUCTOR_START
constructor(options) {
@ -38,6 +39,8 @@ class RuntimeSocket {
options = {};
}
super(options);
//GENERATED_TEMPLATE_OPTIONS_INIT_START
//GENERATED_TEMPLATE_OPTIONS_INIT_END

View File

@ -1,5 +1,6 @@
const Event = require('.././r3-event');
const Utils = require('.././r3-utils');
const Runtime = require('./r3-runtime.js');
/**
@ -29,7 +30,7 @@ const Utils = require('.././r3-utils');
**/
class RuntimeStatistics {
class RuntimeStatistics extends Runtime {
//GENERATED_CONSTRUCTOR_START
constructor(options) {
@ -38,6 +39,8 @@ class RuntimeStatistics {
options = {};
}
super(options);
//GENERATED_TEMPLATE_OPTIONS_INIT_START
//GENERATED_TEMPLATE_OPTIONS_INIT_END
@ -71,6 +74,7 @@ class RuntimeStatistics {
//GENERATED_STATIC_OPTIONS_INIT_END
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START
Runtime.STATS = 0xf;
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START

View File

@ -6,7 +6,25 @@ const RuntimeStatistics = require('./r3-runtime-statistics.js');
GENERATED_INHERITED_START
Class R3.RuntimeStatistics.Stats
Class R3.Runtime.Statistics.Stats
[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>
[Inherited from RuntimeStatistics]
Inherited Properties:

View File

@ -0,0 +1,159 @@
const Event = require('.././r3-event');
const Utils = require('.././r3-utils');
const RuntimeImage = require('./r3-runtime-image.js');
/**
GENERATED_INHERITED_START
Class R3.Runtime.Image.WebImage
[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>
[Inherited from RuntimeImage]
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 RuntimeWebImage]
Properties:
<no properties>
Static Properties:
<no static properties>
Methods:
<no methods>
Static Methods:
<no static methods>
GENERATED_INHERITED_END
TEMPLATE_OPTIONS_START
TEMPLATE_OPTIONS_END
CUSTOM_OPTIONS_START
CUSTOM_OPTIONS_END
TEMPLATE_STATIC_OPTIONS_START
TEMPLATE_STATIC_OPTIONS_END
CUSTOM_STATIC_OPTIONS_START
CUSTOM_STATIC_OPTIONS_END
TEMPLATE_METHODS_START
buildInstance(component) - Creates an instance of R3.Component based on this Runtime.
TEMPLATE_METHODS_END
CUSTOM_METHODS_START
CUSTOM_METHODS_END
TEMPLATE_STATIC_METHODS_START
TEMPLATE_STATIC_METHODS_END
CUSTOM_STATIC_METHODS_START
CUSTOM_STATIC_METHODS_END
**/
class RuntimeWebImage extends RuntimeImage {
//GENERATED_CONSTRUCTOR_START
constructor(options) {
if (typeof options === 'undefined') {
options = {};
}
super(options);
//GENERATED_TEMPLATE_OPTIONS_INIT_START
//GENERATED_TEMPLATE_OPTIONS_INIT_END
//GENERATED_OPTIONS_INIT_START
//GENERATED_OPTIONS_INIT_END
Object.assign(this, options);
}
//GENERATED_CONSTRUCTOR_END
//GENERATED_TEMPLATE_METHODS_START
/**
* buildInstance()
* - Creates an instance of R3.Component based on this Runtime.
* @param component
*/
buildInstance(component) {
//GENERATED_BUILD_INSTANCE_METHOD_START
//GENERATED_BUILD_INSTANCE_METHOD_END
//CUSTOM_BUILD_INSTANCE_METHOD_START
//CUSTOM_BUILD_INSTANCE_METHOD_END
}
//GENERATED_TEMPLATE_METHODS_END
//GENERATED_METHODS_START
//GENERATED_METHODS_END
//GENERATED_TEMPLATE_STATIC_METHODS_START
//GENERATED_TEMPLATE_STATIC_METHODS_END
//GENERATED_STATIC_METHODS_START
//GENERATED_STATIC_METHODS_END
//CUSTOM_IMPLEMENTATION_START
//CUSTOM_IMPLEMENTATION_END
}
//GENERATED_TEMPLATE_STATIC_OPTIONS_INIT_START
//GENERATED_TEMPLATE_STATIC_OPTIONS_INIT_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 = RuntimeWebImage;

View File

@ -3,6 +3,10 @@ const Utils = require('.././r3-utils');
/**
GENERATED_INHERITED_START
GENERATED_INHERITED_END
TEMPLATE_OPTIONS_START
TEMPLATE_OPTIONS_END
@ -44,7 +48,16 @@ class Runtime {
//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
//CUSTOM_AFTER_INIT_START
//CUSTOM_AFTER_INIT_END
}
//GENERATED_CONSTRUCTOR_END
@ -62,6 +75,7 @@ class Runtime {
//CUSTOM_IMPLEMENTATION_START
//CUSTOM_IMPLEMENTATION_END
}
//GENERATED_TEMPLATE_STATIC_OPTIONS_INIT_START
@ -71,21 +85,14 @@ class Runtime {
//GENERATED_STATIC_OPTIONS_INIT_END
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START
Runtime.BASE_RUNTIME_CODER = 0x0;
Runtime.BASE_RUNTIME_DOM = 0x1;
Runtime.BASE_RUNTIME_GUI = 0x2;
Runtime.BASE_RUNTIME_IMAGE = 0x3;
Runtime.BASE_RUNTIME_PHYSICS = 0x4;
Runtime.BASE_RUNTIME_SOCKET = 0x5;
Runtime.BASE_RUNTIME_STATISTICS = 0x6;
Runtime.RUNTIME_CODE_MIRROR = 0x0;
Runtime.RUNTIME_DOCUMENT = 0x1;
Runtime.RUNTIME_CONTROL_KIT = 0x2;
Runtime.RUNTIME_STATS = 0x3;
Runtime.RUNTIME_BULLET = 0x4;
Runtime.RUNTIME_GRAPHICS = 0x5;
Runtime.RUNTIME_THREE = 0x6;
Runtime.BASE_CODER = 0x0;
Runtime.BASE_DOM = 0x1;
Runtime.BASE_GUI = 0x2;
Runtime.BASE_GRAPHICS = 0x3;
Runtime.BASE_IMAGE = 0x4;
Runtime.BASE_PHYSICS = 0x5;
Runtime.BASE_SOCKET = 0x6;
Runtime.BASE_STATISTICS = 0x7;
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START

View File

@ -1,5 +1,6 @@
const Event = require('INCLUDE_PATH/r3-event');
const Utils = require('INCLUDE_PATH/r3-utils');
const Runtime = require('./r3-runtime.js');
/**
@ -29,7 +30,7 @@ const Utils = require('INCLUDE_PATH/r3-utils');
**/
class CLASS_NAME {
class CLASS_NAME extends Runtime {
//GENERATED_CONSTRUCTOR_START
//GENERATED_CONSTRUCTOR_END

View File

@ -4,6 +4,8 @@
options = {};
}
super(options);
//GENERATED_TEMPLATE_OPTIONS_INIT_START
//GENERATED_TEMPLATE_OPTIONS_INIT_END

View File

@ -1 +1 @@
2.0.729
2.0.758