diff --git a/.r3_history b/.r3_history index 677ea5f..960bae4 100644 --- a/.r3_history +++ b/.r3_history @@ -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/ diff --git a/dist/r3.js b/dist/r3.js index 4111a16..204787f 100644 --- a/dist/r3.js +++ b/dist/r3.js @@ -1,97 +1,6 @@ class R3 { - static version = '2.0.729'; - static compileDate = '2021 Sep 17 - 14:41:27 pm'; -} - -class RuntimeCoder { - - constructor(options) { - - if (typeof options === 'undefined') { - options = {}; - } - - Object.assign(this, options); - } - -} - -class RuntimeDOM { - - constructor(options) { - - if (typeof options === 'undefined') { - options = {}; - } - - Object.assign(this, options); - } - -} - -class RuntimeGUI { - - constructor(options) { - - if (typeof options === 'undefined') { - options = {}; - } - - Object.assign(this, options); - } - -} - -class RuntimeImage { - - constructor(options) { - - if (typeof options === 'undefined') { - options = {}; - } - - Object.assign(this, options); - } - -} - -class RuntimePhysics { - - constructor(options) { - - if (typeof options === 'undefined') { - options = {}; - } - - Object.assign(this, options); - } - -} - -class RuntimeSocket { - - constructor(options) { - - if (typeof options === 'undefined') { - options = {}; - } - - Object.assign(this, options); - } - -} - -class RuntimeStatistics { - - constructor(options) { - - if (typeof options === 'undefined') { - options = {}; - } - - Object.assign(this, options); - } - + static version = '2.0.758'; + static compileDate = '2021 Sep 18 - 08:48:43 am'; } class Runtime { @@ -103,25 +12,19 @@ class Runtime { } Object.assign(this, options); + } } -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; class System { @@ -1701,48 +1604,7 @@ class Utils { } -/** - - Class R3.RuntimeCoder.CodeMirror - [Inherited from RuntimeCoder] - - Inherited Properties: - - - - Inherited Static Properties: - - - - Inherited Methods: - - - - Inherited Static Methods: - - - - [Belonging to RuntimeCodeMirror] - - Properties: - - - - Static Properties: - - - - Methods: - - - - Static Methods: - - - - **/ - -class RuntimeCodeMirror extends RuntimeCoder { +class RuntimeCoder extends Runtime { constructor(options) { @@ -1753,62 +1615,13 @@ class RuntimeCodeMirror extends RuntimeCoder { super(options); Object.assign(this, options); - - } - - /** - * buildInstance() - * - Creates an instance of R3.Component based on this Runtime. - * @param component - */ - buildInstance(component) { - } } -/** +Runtime.CODE_MIRROR = 0x8; - Class R3.RuntimeDOM.Document - [Inherited from RuntimeDOM] - - Inherited Properties: - - - - Inherited Static Properties: - - - - Inherited Methods: - - - - Inherited Static Methods: - - - - [Belonging to RuntimeDocument] - - Properties: - - - - Static Properties: - - - - Methods: - - - - Static Methods: - - - - **/ - -class RuntimeDocument extends RuntimeDOM { +class RuntimeDOM extends Runtime { constructor(options) { @@ -1819,70 +1632,13 @@ class RuntimeDocument extends RuntimeDOM { super(options); Object.assign(this, options); - - } - - /** - * buildInstance() - * - Creates an instance of R3.Component based on this Runtime. - * @param component - */ - buildInstance(component) { - - if (component instanceof R3.Component.DOM.Canvas) { - let canvas = document.createElement('canvas'); - canvas.setAttribute('width', component.width); - canvas.setAttribute('height', component.height); - canvas.setAttribute('style', component.style); - return canvas; - } - } } -/** +Runtime.DOCUMENT = 0x9; - Class R3.RuntimeGUI.ControlKit - [Inherited from RuntimeGUI] - - Inherited Properties: - - - - Inherited Static Properties: - - - - Inherited Methods: - - - - Inherited Static Methods: - - - - [Belonging to RuntimeControlKit] - - Properties: - - - - Static Properties: - - - - Methods: - - - - Static Methods: - - - - **/ - -class RuntimeControlKit extends RuntimeGUI { +class RuntimeGUI extends Runtime { constructor(options) { @@ -1893,192 +1649,11 @@ class RuntimeControlKit extends RuntimeGUI { super(options); Object.assign(this, options); - - } - - /** - * buildInstance() - * - Creates an instance of R3.Component based on this Runtime. - * @param component - */ - buildInstance(component) { - } } -/** - - Class R3.RuntimeStatistics.Stats - [Inherited from RuntimeStatistics] - - Inherited Properties: - - - - Inherited Static Properties: - - - - Inherited Methods: - - - - Inherited Static Methods: - - - - [Belonging to RuntimeStats] - - Properties: - - - - Static Properties: - - - - Methods: - - - - Static Methods: - - - - **/ - -class RuntimeStats extends RuntimeStatistics { - - constructor(options) { - - if (typeof options === 'undefined') { - options = {}; - } - - super(options); - - Object.assign(this, options); - - } - - /** - * buildInstance() - * - Creates an instance of R3.Component based on this Runtime. - * @param component - */ - buildInstance(component) { - - } - -} - -/** - - Class R3.Runtime.Bullet - [Inherited from Runtime] - - Inherited Properties: - - - - Inherited Static Properties: - - - - Inherited Methods: - - - - Inherited Static Methods: - - - - [Belonging to RuntimeBullet] - - Properties: - - - - Static Properties: - - - - Methods: - - - - Static Methods: - - - - **/ - -class RuntimeBullet extends Runtime { - - constructor(options) { - - if (typeof options === 'undefined') { - options = {}; - } - - super(options); - - Object.assign(this, options); - - } - - /** - * buildInstance() - * - Creates an instance of R3.Component based on this Runtime. - * @param component - */ - buildInstance(component) { - - } - -} - -/** - - Class R3.Runtime.Graphics - [Inherited from Runtime] - - Inherited Properties: - - - - Inherited Static Properties: - - - - Inherited Methods: - - - - Inherited Static Methods: - - - - [Belonging to RuntimeGraphics] - - Properties: - - - - Static Properties: - - - - Methods: - - - - Static Methods: - - - - **/ +Runtime.CONTROL_KIT = 0xa; class RuntimeGraphics extends Runtime { @@ -2091,20 +1666,79 @@ class RuntimeGraphics extends Runtime { super(options); Object.assign(this, options); - - } - - /** - * buildInstance() - * - Creates an instance of R3.Component based on this Runtime. - * @param component - */ - buildInstance(component) { - } } +Runtime.THREE = 0xb; + +class RuntimeImage extends Runtime { + + constructor(options) { + + if (typeof options === 'undefined') { + options = {}; + } + + super(options); + + Object.assign(this, options); + } + +} + +Runtime.NODE_JS_IMAGE = 0xc; +Runtime.WEB_IMAGE = 0xd; + +class RuntimePhysics extends Runtime { + + constructor(options) { + + if (typeof options === 'undefined') { + options = {}; + } + + super(options); + + Object.assign(this, options); + } + +} + +Runtime.BULLET = 0xe; + +class RuntimeSocket extends Runtime { + + constructor(options) { + + if (typeof options === 'undefined') { + options = {}; + } + + super(options); + + Object.assign(this, options); + } + +} + +class RuntimeStatistics extends Runtime { + + constructor(options) { + + if (typeof options === 'undefined') { + options = {}; + } + + super(options); + + Object.assign(this, options); + } + +} + +Runtime.STATS = 0xf; + /** Class R3.System.DOM @@ -3294,6 +2928,266 @@ class R3Object extends Event { } +/** + + Class R3.Runtime.Coder.CodeMirror + [Inherited from Runtime] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from RuntimeCoder] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Belonging to RuntimeCodeMirror] + + Properties: + + + + Static Properties: + + + + Methods: + + + + Static Methods: + + + + **/ + +class RuntimeCodeMirror extends RuntimeCoder { + + constructor(options) { + + if (typeof options === 'undefined') { + options = {}; + } + + super(options); + + Object.assign(this, options); + + } + + /** + * buildInstance() + * - Creates an instance of R3.Component based on this Runtime. + * @param component + */ + buildInstance(component) { + + } + +} + +/** + + Class R3.Runtime.DOM.Document + [Inherited from Runtime] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from RuntimeDOM] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Belonging to RuntimeDocument] + + Properties: + + + + Static Properties: + + + + Methods: + + + + Static Methods: + + + + **/ + +class RuntimeDocument extends RuntimeDOM { + + constructor(options) { + + if (typeof options === 'undefined') { + options = {}; + } + + super(options); + + Object.assign(this, options); + + } + + /** + * buildInstance() + * - Creates an instance of R3.Component based on this Runtime. + * @param component + */ + buildInstance(component) { + + if (component instanceof R3.Component.DOM.Canvas) { + let canvas = document.createElement('canvas'); + canvas.setAttribute('width', component.width); + canvas.setAttribute('height', component.height); + canvas.setAttribute('style', component.style); + return canvas; + } + + } + +} + +/** + + Class R3.Runtime.GUI.ControlKit + [Inherited from Runtime] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from RuntimeGUI] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Belonging to RuntimeControlKit] + + Properties: + + + + Static Properties: + + + + Methods: + + + + Static Methods: + + + + **/ + +class RuntimeControlKit extends RuntimeGUI { + + constructor(options) { + + if (typeof options === 'undefined') { + options = {}; + } + + super(options); + + Object.assign(this, options); + + } + + /** + * buildInstance() + * - Creates an instance of R3.Component based on this Runtime. + * @param component + */ + buildInstance(component) { + + } + +} + /** Class R3.Runtime.Graphics.Three @@ -3378,6 +3272,342 @@ class RuntimeThree extends RuntimeGraphics { } +/** + + Class R3.Runtime.Image.NodeJSImage + [Inherited from Runtime] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from RuntimeImage] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Belonging to RuntimeNodeJSImage] + + Properties: + + + + Static Properties: + + + + Methods: + + + + Static Methods: + + + + **/ + +class RuntimeNodeJSImage extends RuntimeImage { + + constructor(options) { + + if (typeof options === 'undefined') { + options = {}; + } + + super(options); + + Object.assign(this, options); + + } + + /** + * buildInstance() + * - Creates an instance of R3.Component based on this Runtime. + * @param component + */ + buildInstance(component) { + + } + +} + +/** + + Class R3.Runtime.Image.WebImage + [Inherited from Runtime] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from RuntimeImage] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Belonging to RuntimeWebImage] + + Properties: + + + + Static Properties: + + + + Methods: + + + + Static Methods: + + + + **/ + +class RuntimeWebImage extends RuntimeImage { + + constructor(options) { + + if (typeof options === 'undefined') { + options = {}; + } + + super(options); + + Object.assign(this, options); + + } + + /** + * buildInstance() + * - Creates an instance of R3.Component based on this Runtime. + * @param component + */ + buildInstance(component) { + + } + +} + +/** + + Class R3.Runtime.Physics.Bullet + [Inherited from Runtime] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from RuntimePhysics] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Belonging to RuntimeBullet] + + Properties: + + + + Static Properties: + + + + Methods: + + + + Static Methods: + + + + **/ + +class RuntimeBullet extends RuntimePhysics { + + constructor(options) { + + if (typeof options === 'undefined') { + options = {}; + } + + super(options); + + Object.assign(this, options); + + } + + /** + * buildInstance() + * - Creates an instance of R3.Component based on this Runtime. + * @param component + */ + buildInstance(component) { + + } + +} + +/** + + Class R3.Runtime.Statistics.Stats + [Inherited from Runtime] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from RuntimeStatistics] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Belonging to RuntimeStats] + + Properties: + + + + Static Properties: + + + + Methods: + + + + Static Methods: + + + + **/ + +class RuntimeStats extends RuntimeStatistics { + + constructor(options) { + + if (typeof options === 'undefined') { + options = {}; + } + + super(options); + + Object.assign(this, options); + + } + + /** + * buildInstance() + * - Creates an instance of R3.Component based on this Runtime. + * @param component + */ + buildInstance(component) { + + } + +} + /** Class R3.Event.Object.Entity @@ -6082,13 +6312,6 @@ class ComponentTouch extends ComponentInput { } -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; @@ -6122,9 +6345,22 @@ Component.Graphics.Mesh = ComponentMesh; Component.Graphics.Texture = ComponentTexture; Component.Input = ComponentInput; Component.Input.Touch = ComponentTouch; -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; Entity.Slider = EntitySlider; console.log('r3.js - version ' + R3.version + ' compiled ' + R3.compileDate); diff --git a/graph.php b/graph.php index 50664b3..2febab8 100644 --- a/graph.php +++ b/graph.php @@ -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 ) { diff --git a/package.json b/package.json index f73d1d9..458521d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "r3", - "version" : "2.0.729", + "version" : "2.0.758", "description": "", "private": true, "dependencies": { diff --git a/r3.php b/r3.php index b698003..0d16dfe 100755 --- a/r3.php +++ b/r3.php @@ -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); + } diff --git a/src/r3/r3-r3.js b/src/r3/r3-r3.js index 9b4998e..19b6a9c 100644 --- a/src/r3/r3-r3.js +++ b/src/r3/r3-r3.js @@ -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; diff --git a/src/r3/r3-runtime/index.js b/src/r3/r3-runtime/index.js index 8301a31..cdb8854 100644 --- a/src/r3/r3-runtime/index.js +++ b/src/r3/r3-runtime/index.js @@ -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 diff --git a/src/r3/r3-runtime/r3-runtime-bullet.js b/src/r3/r3-runtime/r3-runtime-bullet.js index 4f2a129..6cc1b30 100644 --- a/src/r3/r3-runtime/r3-runtime-bullet.js +++ b/src/r3/r3-runtime/r3-runtime-bullet.js @@ -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: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from RuntimePhysics] + 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) { diff --git a/src/r3/r3-runtime/r3-runtime-code-mirror.js b/src/r3/r3-runtime/r3-runtime-code-mirror.js index 67b5cf7..7d7269e 100644 --- a/src/r3/r3-runtime/r3-runtime-code-mirror.js +++ b/src/r3/r3-runtime/r3-runtime-code-mirror.js @@ -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: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + [Inherited from RuntimeCoder] Inherited Properties: diff --git a/src/r3/r3-runtime/r3-runtime-coder.js b/src/r3/r3-runtime/r3-runtime-coder.js index c244888..7003c84 100644 --- a/src/r3/r3-runtime/r3-runtime-coder.js +++ b/src/r3/r3-runtime/r3-runtime-coder.js @@ -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 diff --git a/src/r3/r3-runtime/r3-runtime-control-kit.js b/src/r3/r3-runtime/r3-runtime-control-kit.js index a3c560d..b688f0b 100644 --- a/src/r3/r3-runtime/r3-runtime-control-kit.js +++ b/src/r3/r3-runtime/r3-runtime-control-kit.js @@ -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: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + [Inherited from RuntimeGUI] Inherited Properties: diff --git a/src/r3/r3-runtime/r3-runtime-d-o-m.js b/src/r3/r3-runtime/r3-runtime-d-o-m.js index 6587221..4f3fe5d 100644 --- a/src/r3/r3-runtime/r3-runtime-d-o-m.js +++ b/src/r3/r3-runtime/r3-runtime-d-o-m.js @@ -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 diff --git a/src/r3/r3-runtime/r3-runtime-document.js b/src/r3/r3-runtime/r3-runtime-document.js index 0eb381b..55a91fa 100644 --- a/src/r3/r3-runtime/r3-runtime-document.js +++ b/src/r3/r3-runtime/r3-runtime-document.js @@ -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: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + [Inherited from RuntimeDOM] Inherited Properties: diff --git a/src/r3/r3-runtime/r3-runtime-g-u-i.js b/src/r3/r3-runtime/r3-runtime-g-u-i.js index 5239411..20301df 100644 --- a/src/r3/r3-runtime/r3-runtime-g-u-i.js +++ b/src/r3/r3-runtime/r3-runtime-g-u-i.js @@ -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 diff --git a/src/r3/r3-runtime/r3-runtime-graphics.js b/src/r3/r3-runtime/r3-runtime-graphics.js index 9e724bf..747248c 100644 --- a/src/r3/r3-runtime/r3-runtime-graphics.js +++ b/src/r3/r3-runtime/r3-runtime-graphics.js @@ -4,47 +4,6 @@ const Runtime = require('./r3-runtime.js'); /** - GENERATED_INHERITED_START - - Class R3.Runtime.Graphics - [Inherited from Runtime] - - Inherited Properties: - - - - Inherited Static Properties: - - - - Inherited Methods: - - - - Inherited Static Methods: - - - - [Belonging to RuntimeGraphics] - - Properties: - - - - Static Properties: - - - - Methods: - - - - 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 diff --git a/src/r3/r3-runtime/r3-runtime-image.js b/src/r3/r3-runtime/r3-runtime-image.js index e154599..5cba6e9 100644 --- a/src/r3/r3-runtime/r3-runtime-image.js +++ b/src/r3/r3-runtime/r3-runtime-image.js @@ -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 diff --git a/src/r3/r3-runtime/r3-runtime-node-j-s-image.js b/src/r3/r3-runtime/r3-runtime-node-j-s-image.js new file mode 100644 index 0000000..cd81a69 --- /dev/null +++ b/src/r3/r3-runtime/r3-runtime-node-j-s-image.js @@ -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: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from RuntimeImage] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Belonging to RuntimeNodeJSImage] + + Properties: + + + + Static Properties: + + + + Methods: + + + + 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; diff --git a/src/r3/r3-runtime/r3-runtime-physics.js b/src/r3/r3-runtime/r3-runtime-physics.js index ec211b4..fba919f 100644 --- a/src/r3/r3-runtime/r3-runtime-physics.js +++ b/src/r3/r3-runtime/r3-runtime-physics.js @@ -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 diff --git a/src/r3/r3-runtime/r3-runtime-socket.js b/src/r3/r3-runtime/r3-runtime-socket.js index 65457d6..8a19181 100644 --- a/src/r3/r3-runtime/r3-runtime-socket.js +++ b/src/r3/r3-runtime/r3-runtime-socket.js @@ -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 diff --git a/src/r3/r3-runtime/r3-runtime-statistics.js b/src/r3/r3-runtime/r3-runtime-statistics.js index 5898be4..7136758 100644 --- a/src/r3/r3-runtime/r3-runtime-statistics.js +++ b/src/r3/r3-runtime/r3-runtime-statistics.js @@ -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 diff --git a/src/r3/r3-runtime/r3-runtime-stats.js b/src/r3/r3-runtime/r3-runtime-stats.js index 9148b2b..60e5d58 100644 --- a/src/r3/r3-runtime/r3-runtime-stats.js +++ b/src/r3/r3-runtime/r3-runtime-stats.js @@ -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: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + [Inherited from RuntimeStatistics] Inherited Properties: diff --git a/src/r3/r3-runtime/r3-runtime-web-image.js b/src/r3/r3-runtime/r3-runtime-web-image.js new file mode 100644 index 0000000..4c7151e --- /dev/null +++ b/src/r3/r3-runtime/r3-runtime-web-image.js @@ -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: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from RuntimeImage] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Belonging to RuntimeWebImage] + + Properties: + + + + Static Properties: + + + + Methods: + + + + 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; diff --git a/src/r3/r3-runtime/r3-runtime.js b/src/r3/r3-runtime/r3-runtime.js index c6e7984..4fe8939 100644 --- a/src/r3/r3-runtime/r3-runtime.js +++ b/src/r3/r3-runtime/r3-runtime.js @@ -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 diff --git a/src/templates/runtime_base.template b/src/templates/runtime_base.template index d5e1de1..c7358ca 100644 --- a/src/templates/runtime_base.template +++ b/src/templates/runtime_base.template @@ -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 diff --git a/src/templates/runtime_base_constructor.template b/src/templates/runtime_base_constructor.template index ee9fdb0..453b20c 100644 --- a/src/templates/runtime_base_constructor.template +++ b/src/templates/runtime_base_constructor.template @@ -4,6 +4,8 @@ options = {}; } + super(options); + //GENERATED_TEMPLATE_OPTIONS_INIT_START //GENERATED_TEMPLATE_OPTIONS_INIT_END diff --git a/version b/version index d8dcf2d..d1affd4 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.0.729 \ No newline at end of file +2.0.758 \ No newline at end of file