diff --git a/dist/r3.js b/dist/r3.js index ca5e514..52c293b 100644 --- a/dist/r3.js +++ b/dist/r3.js @@ -17,12 +17,12 @@ class R3 { /** * static Version - Current R3 version */ -R3.Version = '3.0.203'; +R3.Version = '3.0.207'; /** * static CompileDate - Current compile date of R3 */ -R3.CompileDate = '2021 Oct 01 - 12:43:55 pm'; +R3.CompileDate = '2021 Oct 02 - 06:27:56 am'; class System { @@ -1001,6 +1001,11 @@ class SystemRuntime extends System { */ static Start(options) { + SystemRuntime.Subscriptions['RUNTIME_CREATED'] = Event.Subscribe( + Event.RUNTIME_CREATED, + SystemRuntime.OnRuntimeCreated + ); + SystemRuntime.Subscriptions['GET_RUNTIME'] = Event.Subscribe( Event.GET_RUNTIME, SystemRuntime.OnGetRuntime @@ -1029,6 +1034,9 @@ class SystemRuntime extends System { */ static Stop(options) { + SystemRuntime.Subscriptions['RUNTIME_CREATED'].remove(); + delete SystemRuntime.Subscriptions['RUNTIME_CREATED']; + SystemRuntime.Subscriptions['GET_RUNTIME'].remove(); delete SystemRuntime.Subscriptions['GET_RUNTIME']; @@ -1044,6 +1052,18 @@ class SystemRuntime extends System { } + /** + * OnRuntimeCreated() + * - Listens to events of type Event.RUNTIME_CREATED and executes this function. + * @param object (The event data passed as argument - typically an R3Object) + * @return + */ + static OnRuntimeCreated(object) { + + console.log('Runtime created : ' + object.name); + + } + /** * OnGetRuntime() * - Listens to events of type Event.GET_RUNTIME and executes this function. @@ -1425,7 +1445,16 @@ class RuntimeCoder extends Runtime { super(options); + /** + * name - Name of the runtime + */ + if (typeof options.name === 'undefined') { + options.name = this.constructor.name; + } + Object.assign(this, options); + + Event.Emit(Event.RUNTIME_CREATED, this); } } @@ -1524,7 +1553,16 @@ class RuntimeDOM extends Runtime { super(options); + /** + * name - Name of the runtime + */ + if (typeof options.name === 'undefined') { + options.name = this.constructor.name; + } + Object.assign(this, options); + + Event.Emit(Event.RUNTIME_CREATED, this); } } @@ -1631,7 +1669,16 @@ class RuntimeGUI extends Runtime { super(options); + /** + * name - Name of the runtime + */ + if (typeof options.name === 'undefined') { + options.name = this.constructor.name; + } + Object.assign(this, options); + + Event.Emit(Event.RUNTIME_CREATED, this); } } @@ -1730,7 +1777,16 @@ class RuntimeGraphics extends Runtime { super(options); + /** + * name - Name of the runtime + */ + if (typeof options.name === 'undefined') { + options.name = this.constructor.name; + } + Object.assign(this, options); + + Event.Emit(Event.RUNTIME_CREATED, this); } } @@ -1829,7 +1885,16 @@ class RuntimeImage extends Runtime { super(options); + /** + * name - Name of the runtime + */ + if (typeof options.name === 'undefined') { + options.name = this.constructor.name; + } + Object.assign(this, options); + + Event.Emit(Event.RUNTIME_CREATED, this); } } @@ -2019,7 +2084,16 @@ class RuntimePhysics extends Runtime { super(options); + /** + * name - Name of the runtime + */ + if (typeof options.name === 'undefined') { + options.name = this.constructor.name; + } + Object.assign(this, options); + + Event.Emit(Event.RUNTIME_CREATED, this); } } @@ -2118,7 +2192,16 @@ class RuntimeSocket extends Runtime { super(options); + /** + * name - Name of the runtime + */ + if (typeof options.name === 'undefined') { + options.name = this.constructor.name; + } + Object.assign(this, options); + + Event.Emit(Event.RUNTIME_CREATED, this); } } @@ -2133,7 +2216,16 @@ class RuntimeStatistics extends Runtime { super(options); + /** + * name - Name of the runtime + */ + if (typeof options.name === 'undefined') { + options.name = this.constructor.name; + } + Object.assign(this, options); + + Event.Emit(Event.RUNTIME_CREATED, this); } } @@ -2479,20 +2571,21 @@ Event.OBJECT_PROPERTY_UPDATED = 0x1e; Event.PAUSE = 0x1f; Event.PROJECT_INITIALIZED = 0x20; Event.RESTART = 0x21; -Event.SLIDER_ENTITY_INITIALIZED = 0x22; -Event.START = 0x23; -Event.TOUCH_CANCEL = 0x24; -Event.TOUCH_COMPONENT_INITIALIZED = 0x25; -Event.TOUCH_END = 0x26; -Event.TOUCH_MOVE = 0x27; -Event.TOUCH_START = 0x28; -Event.UPDATE_FROM_INSTANCE_AFTER = 0x29; -Event.UPDATE_FROM_INSTANCE_BEFORE = 0x2a; -Event.UPDATE_INSTANCE_AFTER = 0x2b; -Event.UPDATE_INSTANCE_BEFORE = 0x2c; -Event.UPDATE_INSTANCE_PROPERTY = 0x2d; -Event.UPDATE_PROPERTY_FROM_INSTANCE = 0x2e; -Event.MAX_EVENTS = 0x2f; +Event.RUNTIME_CREATED = 0x22; +Event.SLIDER_ENTITY_INITIALIZED = 0x23; +Event.START = 0x24; +Event.TOUCH_CANCEL = 0x25; +Event.TOUCH_COMPONENT_INITIALIZED = 0x26; +Event.TOUCH_END = 0x27; +Event.TOUCH_MOVE = 0x28; +Event.TOUCH_START = 0x29; +Event.UPDATE_FROM_INSTANCE_AFTER = 0x2a; +Event.UPDATE_FROM_INSTANCE_BEFORE = 0x2b; +Event.UPDATE_INSTANCE_AFTER = 0x2c; +Event.UPDATE_INSTANCE_BEFORE = 0x2d; +Event.UPDATE_INSTANCE_PROPERTY = 0x2e; +Event.UPDATE_PROPERTY_FROM_INSTANCE = 0x2f; +Event.MAX_EVENTS = 0x30; Event.GetEventName = function(eventId) { @@ -2530,19 +2623,20 @@ Event.GetEventName = function(eventId) { case 0x1f : return 'pause'; case 0x20 : return 'project_initialized'; case 0x21 : return 'restart'; - case 0x22 : return 'slider_entity_initialized'; - case 0x23 : return 'start'; - case 0x24 : return 'touch_cancel'; - case 0x25 : return 'touch_component_initialized'; - case 0x26 : return 'touch_end'; - case 0x27 : return 'touch_move'; - case 0x28 : return 'touch_start'; - case 0x29 : return 'update_from_instance_after'; - case 0x2a : return 'update_from_instance_before'; - case 0x2b : return 'update_instance_after'; - case 0x2c : return 'update_instance_before'; - case 0x2d : return 'update_instance_property'; - case 0x2e : return 'update_property_from_instance'; + case 0x22 : return 'runtime_created'; + case 0x23 : return 'slider_entity_initialized'; + case 0x24 : return 'start'; + case 0x25 : return 'touch_cancel'; + case 0x26 : return 'touch_component_initialized'; + case 0x27 : return 'touch_end'; + case 0x28 : return 'touch_move'; + case 0x29 : return 'touch_start'; + case 0x2a : return 'update_from_instance_after'; + case 0x2b : return 'update_from_instance_before'; + case 0x2c : return 'update_instance_after'; + case 0x2d : return 'update_instance_before'; + case 0x2e : return 'update_instance_property'; + case 0x2f : return 'update_property_from_instance'; default : throw new Error('Event type not defined : ' + eventId); } diff --git a/package.json b/package.json index ac4bd33..37eceb2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "r3", - "version": "3.0.203", + "version": "3.0.207", "description": "", "private": true, "dependencies": { diff --git a/src/r3/r3-event.js b/src/r3/r3-event.js index 2707bb9..2b4c1ca 100644 --- a/src/r3/r3-event.js +++ b/src/r3/r3-event.js @@ -383,20 +383,21 @@ Event.OBJECT_PROPERTY_UPDATED = 0x1e; Event.PAUSE = 0x1f; Event.PROJECT_INITIALIZED = 0x20; Event.RESTART = 0x21; -Event.SLIDER_ENTITY_INITIALIZED = 0x22; -Event.START = 0x23; -Event.TOUCH_CANCEL = 0x24; -Event.TOUCH_COMPONENT_INITIALIZED = 0x25; -Event.TOUCH_END = 0x26; -Event.TOUCH_MOVE = 0x27; -Event.TOUCH_START = 0x28; -Event.UPDATE_FROM_INSTANCE_AFTER = 0x29; -Event.UPDATE_FROM_INSTANCE_BEFORE = 0x2a; -Event.UPDATE_INSTANCE_AFTER = 0x2b; -Event.UPDATE_INSTANCE_BEFORE = 0x2c; -Event.UPDATE_INSTANCE_PROPERTY = 0x2d; -Event.UPDATE_PROPERTY_FROM_INSTANCE = 0x2e; -Event.MAX_EVENTS = 0x2f; +Event.RUNTIME_CREATED = 0x22; +Event.SLIDER_ENTITY_INITIALIZED = 0x23; +Event.START = 0x24; +Event.TOUCH_CANCEL = 0x25; +Event.TOUCH_COMPONENT_INITIALIZED = 0x26; +Event.TOUCH_END = 0x27; +Event.TOUCH_MOVE = 0x28; +Event.TOUCH_START = 0x29; +Event.UPDATE_FROM_INSTANCE_AFTER = 0x2a; +Event.UPDATE_FROM_INSTANCE_BEFORE = 0x2b; +Event.UPDATE_INSTANCE_AFTER = 0x2c; +Event.UPDATE_INSTANCE_BEFORE = 0x2d; +Event.UPDATE_INSTANCE_PROPERTY = 0x2e; +Event.UPDATE_PROPERTY_FROM_INSTANCE = 0x2f; +Event.MAX_EVENTS = 0x30; Event.GetEventName = function(eventId) { @@ -434,19 +435,20 @@ Event.GetEventName = function(eventId) { case 0x1f : return 'pause'; case 0x20 : return 'project_initialized'; case 0x21 : return 'restart'; - case 0x22 : return 'slider_entity_initialized'; - case 0x23 : return 'start'; - case 0x24 : return 'touch_cancel'; - case 0x25 : return 'touch_component_initialized'; - case 0x26 : return 'touch_end'; - case 0x27 : return 'touch_move'; - case 0x28 : return 'touch_start'; - case 0x29 : return 'update_from_instance_after'; - case 0x2a : return 'update_from_instance_before'; - case 0x2b : return 'update_instance_after'; - case 0x2c : return 'update_instance_before'; - case 0x2d : return 'update_instance_property'; - case 0x2e : return 'update_property_from_instance'; + case 0x22 : return 'runtime_created'; + case 0x23 : return 'slider_entity_initialized'; + case 0x24 : return 'start'; + case 0x25 : return 'touch_cancel'; + case 0x26 : return 'touch_component_initialized'; + case 0x27 : return 'touch_end'; + case 0x28 : return 'touch_move'; + case 0x29 : return 'touch_start'; + case 0x2a : return 'update_from_instance_after'; + case 0x2b : return 'update_from_instance_before'; + case 0x2c : return 'update_instance_after'; + case 0x2d : return 'update_instance_before'; + case 0x2e : return 'update_instance_property'; + case 0x2f : return 'update_property_from_instance'; default : throw new Error('Event type not defined : ' + eventId); } diff --git a/src/r3/r3-runtime/r3-runtime-coder.js b/src/r3/r3-runtime/r3-runtime-coder.js index 9b72b85..4f5d6a5 100644 --- a/src/r3/r3-runtime/r3-runtime-coder.js +++ b/src/r3/r3-runtime/r3-runtime-coder.js @@ -1,10 +1,16 @@ +//GENERATED_IMPORTS_START +//GENERATED_IMPORTS_END + +//CUSTOM_IMPORTS_START +//CUSTOM_IMPORTS_END + const Event = require('.././r3-event'); -const Utils = require('.././r3-utils'); const Runtime = require('./r3-runtime.js'); /** TEMPLATE_OPTIONS_START + name=this.constructor.name - Name of the runtime TEMPLATE_OPTIONS_END CUSTOM_OPTIONS_START @@ -42,12 +48,20 @@ class RuntimeCoder extends Runtime { super(options); //GENERATED_TEMPLATE_OPTIONS_INIT_START + /** + * name - Name of the runtime + */ + if (typeof options.name === 'undefined') { + options.name = this.constructor.name; + } //GENERATED_TEMPLATE_OPTIONS_INIT_END //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END Object.assign(this, options); + + Event.Emit(Event.RUNTIME_CREATED, this); } //GENERATED_CONSTRUCTOR_END 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 bafdc12..8b3f2ea 100644 --- a/src/r3/r3-runtime/r3-runtime-d-o-m.js +++ b/src/r3/r3-runtime/r3-runtime-d-o-m.js @@ -1,10 +1,16 @@ +//GENERATED_IMPORTS_START +//GENERATED_IMPORTS_END + +//CUSTOM_IMPORTS_START +//CUSTOM_IMPORTS_END + const Event = require('.././r3-event'); -const Utils = require('.././r3-utils'); const Runtime = require('./r3-runtime.js'); /** TEMPLATE_OPTIONS_START + name=this.constructor.name - Name of the runtime TEMPLATE_OPTIONS_END CUSTOM_OPTIONS_START @@ -42,12 +48,20 @@ class RuntimeDOM extends Runtime { super(options); //GENERATED_TEMPLATE_OPTIONS_INIT_START + /** + * name - Name of the runtime + */ + if (typeof options.name === 'undefined') { + options.name = this.constructor.name; + } //GENERATED_TEMPLATE_OPTIONS_INIT_END //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END Object.assign(this, options); + + Event.Emit(Event.RUNTIME_CREATED, this); } //GENERATED_CONSTRUCTOR_END 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 94cfb8e..7e2a03c 100644 --- a/src/r3/r3-runtime/r3-runtime-g-u-i.js +++ b/src/r3/r3-runtime/r3-runtime-g-u-i.js @@ -1,10 +1,16 @@ +//GENERATED_IMPORTS_START +//GENERATED_IMPORTS_END + +//CUSTOM_IMPORTS_START +//CUSTOM_IMPORTS_END + const Event = require('.././r3-event'); -const Utils = require('.././r3-utils'); const Runtime = require('./r3-runtime.js'); /** TEMPLATE_OPTIONS_START + name=this.constructor.name - Name of the runtime TEMPLATE_OPTIONS_END CUSTOM_OPTIONS_START @@ -42,12 +48,20 @@ class RuntimeGUI extends Runtime { super(options); //GENERATED_TEMPLATE_OPTIONS_INIT_START + /** + * name - Name of the runtime + */ + if (typeof options.name === 'undefined') { + options.name = this.constructor.name; + } //GENERATED_TEMPLATE_OPTIONS_INIT_END //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END Object.assign(this, options); + + Event.Emit(Event.RUNTIME_CREATED, this); } //GENERATED_CONSTRUCTOR_END diff --git a/src/r3/r3-runtime/r3-runtime-graphics.js b/src/r3/r3-runtime/r3-runtime-graphics.js index cca8516..e55f8f8 100644 --- a/src/r3/r3-runtime/r3-runtime-graphics.js +++ b/src/r3/r3-runtime/r3-runtime-graphics.js @@ -1,10 +1,16 @@ +//GENERATED_IMPORTS_START +//GENERATED_IMPORTS_END + +//CUSTOM_IMPORTS_START +//CUSTOM_IMPORTS_END + const Event = require('.././r3-event'); -const Utils = require('.././r3-utils'); const Runtime = require('./r3-runtime.js'); /** TEMPLATE_OPTIONS_START + name=this.constructor.name - Name of the runtime TEMPLATE_OPTIONS_END CUSTOM_OPTIONS_START @@ -42,12 +48,20 @@ class RuntimeGraphics extends Runtime { super(options); //GENERATED_TEMPLATE_OPTIONS_INIT_START + /** + * name - Name of the runtime + */ + if (typeof options.name === 'undefined') { + options.name = this.constructor.name; + } //GENERATED_TEMPLATE_OPTIONS_INIT_END //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END Object.assign(this, options); + + Event.Emit(Event.RUNTIME_CREATED, this); } //GENERATED_CONSTRUCTOR_END diff --git a/src/r3/r3-runtime/r3-runtime-image.js b/src/r3/r3-runtime/r3-runtime-image.js index 48e9f91..3636208 100644 --- a/src/r3/r3-runtime/r3-runtime-image.js +++ b/src/r3/r3-runtime/r3-runtime-image.js @@ -1,10 +1,16 @@ +//GENERATED_IMPORTS_START +//GENERATED_IMPORTS_END + +//CUSTOM_IMPORTS_START +//CUSTOM_IMPORTS_END + const Event = require('.././r3-event'); -const Utils = require('.././r3-utils'); const Runtime = require('./r3-runtime.js'); /** TEMPLATE_OPTIONS_START + name=this.constructor.name - Name of the runtime TEMPLATE_OPTIONS_END CUSTOM_OPTIONS_START @@ -42,12 +48,20 @@ class RuntimeImage extends Runtime { super(options); //GENERATED_TEMPLATE_OPTIONS_INIT_START + /** + * name - Name of the runtime + */ + if (typeof options.name === 'undefined') { + options.name = this.constructor.name; + } //GENERATED_TEMPLATE_OPTIONS_INIT_END //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END Object.assign(this, options); + + Event.Emit(Event.RUNTIME_CREATED, this); } //GENERATED_CONSTRUCTOR_END diff --git a/src/r3/r3-runtime/r3-runtime-physics.js b/src/r3/r3-runtime/r3-runtime-physics.js index a688b82..d900ff8 100644 --- a/src/r3/r3-runtime/r3-runtime-physics.js +++ b/src/r3/r3-runtime/r3-runtime-physics.js @@ -1,10 +1,16 @@ +//GENERATED_IMPORTS_START +//GENERATED_IMPORTS_END + +//CUSTOM_IMPORTS_START +//CUSTOM_IMPORTS_END + const Event = require('.././r3-event'); -const Utils = require('.././r3-utils'); const Runtime = require('./r3-runtime.js'); /** TEMPLATE_OPTIONS_START + name=this.constructor.name - Name of the runtime TEMPLATE_OPTIONS_END CUSTOM_OPTIONS_START @@ -42,12 +48,20 @@ class RuntimePhysics extends Runtime { super(options); //GENERATED_TEMPLATE_OPTIONS_INIT_START + /** + * name - Name of the runtime + */ + if (typeof options.name === 'undefined') { + options.name = this.constructor.name; + } //GENERATED_TEMPLATE_OPTIONS_INIT_END //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END Object.assign(this, options); + + Event.Emit(Event.RUNTIME_CREATED, this); } //GENERATED_CONSTRUCTOR_END diff --git a/src/r3/r3-runtime/r3-runtime-socket.js b/src/r3/r3-runtime/r3-runtime-socket.js index 8a19181..10d4d82 100644 --- a/src/r3/r3-runtime/r3-runtime-socket.js +++ b/src/r3/r3-runtime/r3-runtime-socket.js @@ -1,10 +1,16 @@ +//GENERATED_IMPORTS_START +//GENERATED_IMPORTS_END + +//CUSTOM_IMPORTS_START +//CUSTOM_IMPORTS_END + const Event = require('.././r3-event'); -const Utils = require('.././r3-utils'); const Runtime = require('./r3-runtime.js'); /** TEMPLATE_OPTIONS_START + name=this.constructor.name - Name of the runtime TEMPLATE_OPTIONS_END CUSTOM_OPTIONS_START @@ -42,12 +48,20 @@ class RuntimeSocket extends Runtime { super(options); //GENERATED_TEMPLATE_OPTIONS_INIT_START + /** + * name - Name of the runtime + */ + if (typeof options.name === 'undefined') { + options.name = this.constructor.name; + } //GENERATED_TEMPLATE_OPTIONS_INIT_END //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END Object.assign(this, options); + + Event.Emit(Event.RUNTIME_CREATED, this); } //GENERATED_CONSTRUCTOR_END diff --git a/src/r3/r3-runtime/r3-runtime-statistics.js b/src/r3/r3-runtime/r3-runtime-statistics.js index cfc917b..ead93be 100644 --- a/src/r3/r3-runtime/r3-runtime-statistics.js +++ b/src/r3/r3-runtime/r3-runtime-statistics.js @@ -1,10 +1,16 @@ +//GENERATED_IMPORTS_START +//GENERATED_IMPORTS_END + +//CUSTOM_IMPORTS_START +//CUSTOM_IMPORTS_END + const Event = require('.././r3-event'); -const Utils = require('.././r3-utils'); const Runtime = require('./r3-runtime.js'); /** TEMPLATE_OPTIONS_START + name=this.constructor.name - Name of the runtime TEMPLATE_OPTIONS_END CUSTOM_OPTIONS_START @@ -42,12 +48,20 @@ class RuntimeStatistics extends Runtime { super(options); //GENERATED_TEMPLATE_OPTIONS_INIT_START + /** + * name - Name of the runtime + */ + if (typeof options.name === 'undefined') { + options.name = this.constructor.name; + } //GENERATED_TEMPLATE_OPTIONS_INIT_END //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END Object.assign(this, options); + + Event.Emit(Event.RUNTIME_CREATED, this); } //GENERATED_CONSTRUCTOR_END diff --git a/src/r3/r3-system/r3-system-runtime.js b/src/r3/r3-system/r3-system-runtime.js index a1e4ed8..3884f00 100644 --- a/src/r3/r3-system/r3-system-runtime.js +++ b/src/r3/r3-system/r3-system-runtime.js @@ -83,6 +83,7 @@ const System = require('./r3-system.js'); CUSTOM_EVENT_LISTENERS_END CUSTOM_STATIC_EVENT_LISTENERS_START + Event.RUNTIME_CREATED Event.GET_RUNTIME Event.PROJECT_INITIALIZED Event.GET_API_URL @@ -149,6 +150,11 @@ class SystemRuntime extends System { //GENERATED_STATIC_START_METHOD_START //GENERATED_STATIC_EVENT_LISTENERS_START_START + SystemRuntime.Subscriptions['RUNTIME_CREATED'] = Event.Subscribe( + Event.RUNTIME_CREATED, + SystemRuntime.OnRuntimeCreated + ); + SystemRuntime.Subscriptions['GET_RUNTIME'] = Event.Subscribe( Event.GET_RUNTIME, SystemRuntime.OnGetRuntime @@ -190,6 +196,9 @@ class SystemRuntime extends System { //GENERATED_STATIC_STOP_METHOD_START //GENERATED_STATIC_EVENT_LISTENERS_STOP_START + SystemRuntime.Subscriptions['RUNTIME_CREATED'].remove(); + delete SystemRuntime.Subscriptions['RUNTIME_CREATED']; + SystemRuntime.Subscriptions['GET_RUNTIME'].remove(); delete SystemRuntime.Subscriptions['GET_RUNTIME']; @@ -224,6 +233,23 @@ class SystemRuntime extends System { //GENERATED_STATIC_EVENT_LISTENER_METHODS_START + /** + * OnRuntimeCreated() + * - Listens to events of type Event.RUNTIME_CREATED and executes this function. + * @param object (The event data passed as argument - typically an R3Object) + * @return + */ + static OnRuntimeCreated(object) { + + //GENERATED_STATIC_ON_RUNTIME_CREATED_METHOD_START + //GENERATED_STATIC_ON_RUNTIME_CREATED_METHOD_END + + //CUSTOM_STATIC_ON_RUNTIME_CREATED_METHOD_START + console.log('Runtime created : ' + object.name); + //CUSTOM_STATIC_ON_RUNTIME_CREATED_METHOD_END + + } + /** * OnGetRuntime() * - Listens to events of type Event.GET_RUNTIME and executes this function. diff --git a/src/r3/r3.js b/src/r3/r3.js index faa42cd..9ba7c8c 100644 --- a/src/r3/r3.js +++ b/src/r3/r3.js @@ -90,12 +90,12 @@ class R3 { /** * static Version - Current R3 version */ -R3.Version = '3.0.203'; +R3.Version = '3.0.207'; /** * static CompileDate - Current compile date of R3 */ -R3.CompileDate = '2021 Oct 01 - 12:43:55 pm'; +R3.CompileDate = '2021 Oct 02 - 06:27:56 am'; //GENERATED_STATIC_OPTIONS_INIT_END diff --git a/src/templates/runtime_base.template b/src/templates/runtime_base.template index c7358ca..08e353e 100644 --- a/src/templates/runtime_base.template +++ b/src/templates/runtime_base.template @@ -1,10 +1,16 @@ +//GENERATED_IMPORTS_START +//GENERATED_IMPORTS_END + +//CUSTOM_IMPORTS_START +//CUSTOM_IMPORTS_END + const Event = require('INCLUDE_PATH/r3-event'); -const Utils = require('INCLUDE_PATH/r3-utils'); const Runtime = require('./r3-runtime.js'); /** TEMPLATE_OPTIONS_START + name=this.constructor.name - Name of the runtime TEMPLATE_OPTIONS_END CUSTOM_OPTIONS_START diff --git a/src/templates/runtime_base_constructor.template b/src/templates/runtime_base_constructor.template index 453b20c..c3cb277 100644 --- a/src/templates/runtime_base_constructor.template +++ b/src/templates/runtime_base_constructor.template @@ -13,4 +13,6 @@ //GENERATED_OPTIONS_INIT_END Object.assign(this, options); + + Event.Emit(Event.RUNTIME_CREATED, this); } \ No newline at end of file diff --git a/src/templates/token.db b/src/templates/token.db index 93c6d3f..21a675e 100644 --- a/src/templates/token.db +++ b/src/templates/token.db @@ -68,6 +68,7 @@ GENERATED_STATIC_ON_OBJECT_CREATED_METHOD GENERATED_STATIC_ON_OBJECT_PROPERTY_UPDATED_METHOD GENERATED_STATIC_ON_OBJECT_PROPERTY_UPDATE_METHOD GENERATED_STATIC_ON_PROJECT_INITIALIZED_METHOD +GENERATED_STATIC_ON_RUNTIME_CREATED_METHOD GENERATED_STATIC_ON_SLIDER_ENTITY_INITIALIZED_METHOD GENERATED_STATIC_ON_TOUCH_CANCEL_METHOD GENERATED_STATIC_ON_TOUCH_END_METHOD @@ -150,6 +151,7 @@ CUSTOM_STATIC_ON_OBJECT_CREATED_METHOD CUSTOM_STATIC_ON_OBJECT_PROPERTY_UPDATED_METHOD CUSTOM_STATIC_ON_OBJECT_PROPERTY_UPDATE_METHOD CUSTOM_STATIC_ON_PROJECT_INITIALIZED_METHOD +CUSTOM_STATIC_ON_RUNTIME_CREATED_METHOD CUSTOM_STATIC_ON_SLIDER_ENTITY_INITIALIZED_METHOD CUSTOM_STATIC_ON_TOUCH_CANCEL_METHOD CUSTOM_STATIC_ON_TOUCH_END_METHOD diff --git a/version b/version index bc28713..4bdfb57 100644 --- a/version +++ b/version @@ -1 +1 @@ -3.0.203 \ No newline at end of file +3.0.207 \ No newline at end of file