diff --git a/dist/index.html b/dist/index.html index 5298dbc..b74e14c 100644 --- a/dist/index.html +++ b/dist/index.html @@ -43,6 +43,7 @@ slider.canvas = canvas; slider.images = []; slider.images = [image]; + slider.touch = touch; }); diff --git a/dist/r3.js b/dist/r3.js index ee8dd4b..5cd79fa 100644 --- a/dist/r3.js +++ b/dist/r3.js @@ -1,6 +1,6 @@ class R3 { - static version = '3.0.74'; - static compileDate = '2021 Sep 24 - 07:23:19 am'; + static version = '3.0.76'; + static compileDate = '2021 Sep 24 - 07:41:32 am'; } class Runtime { @@ -3689,8 +3689,16 @@ class ComponentCode extends Component { super(options); + if (typeof options.required === 'undefined') { + options.required = {} + } + + this.underConstruction = true; + Object.assign(this, options); + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { @@ -3899,8 +3907,16 @@ class ComponentDOM extends Component { options.instance = null; } + if (typeof options.required === 'undefined') { + options.required = {} + } + + this.underConstruction = true; + Object.assign(this, options); + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { @@ -4180,8 +4196,16 @@ class ComponentCanvas extends ComponentDOM { options.style = 'border:1px solid #00bb00;'; } + if (typeof options.required === 'undefined') { + options.required = {} + } + + this.underConstruction = true; + Object.assign(this, options); + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { @@ -4468,8 +4492,16 @@ class ComponentGraphics extends Component { super(options); + if (typeof options.required === 'undefined') { + options.required = {} + } + + this.underConstruction = true; + Object.assign(this, options); + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { @@ -4773,6 +4805,10 @@ class ComponentImage extends ComponentGraphics { options.orientation = 'square'; } + if (typeof options.required === 'undefined') { + options.required = {} + } + if (options.extension.match(/(png)$/i)) { options.contentType = 'image/png'; } @@ -4785,8 +4821,6 @@ class ComponentImage extends ComponentGraphics { options.contentType = 'image/gif'; } - Object.assign(this, options); - if (this.width > this.height) { this.orientation = 'landscape'; } @@ -4799,6 +4833,12 @@ class ComponentImage extends ComponentGraphics { this.orientation = 'square'; } + this.underConstruction = true; + + Object.assign(this, options); + + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { @@ -5245,8 +5285,16 @@ class ComponentMaterial extends ComponentGraphics { super(options); + if (typeof options.required === 'undefined') { + options.required = {} + } + + this.underConstruction = true; + Object.assign(this, options); + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { @@ -5465,8 +5513,16 @@ class ComponentMesh extends ComponentGraphics { super(options); + if (typeof options.required === 'undefined') { + options.required = {} + } + + this.underConstruction = true; + Object.assign(this, options); + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { @@ -5685,8 +5741,16 @@ class ComponentTexture extends ComponentGraphics { super(options); + if (typeof options.required === 'undefined') { + options.required = {} + } + + this.underConstruction = true; + Object.assign(this, options); + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { @@ -5887,8 +5951,16 @@ class ComponentInput extends Component { super(options); + if (typeof options.required === 'undefined') { + options.required = {} + } + + this.underConstruction = true; + Object.assign(this, options); + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { @@ -6066,6 +6138,8 @@ class ComponentInput extends Component { + canvas=R3.Canvas + **/ class ComponentTouch extends ComponentInput { @@ -6116,8 +6190,53 @@ class ComponentTouch extends ComponentInput { options.canvas = null; } + if (typeof options.required === 'undefined') { + options.required = {} + } + + /** + * canvas - No comment + */ + options.required.canvas = R3.Canvas; + this.canvasBackup = options.canvas; + Object.defineProperty( + this, + 'canvas', + { + configurable : true, + enumerable : true, + set: function(x) { + Event.Emit( + Event.ENTITY_PROPERTY_UPDATE, + { + entity : this, + property : 'canvas', + value : x + } + ); + this.canvasBackup = x; + Event.Emit( + Event.ENTITY_PROPERTY_UPDATED, + { + entity : this, + property : 'canvas', + value : x + } + ); + return x; + }, + get : function() { + return this.canvasBackup; + } + } + ) + + this.underConstruction = true; + Object.assign(this, options); + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { diff --git a/package.json b/package.json index 14782bb..838e5ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "r3", - "version" : "3.0.74", + "version" : "3.0.76", "description": "", "private": true, "dependencies": { diff --git a/src/r3/r3-component/r3-component-canvas.js b/src/r3/r3-component/r3-component-canvas.js index b891b88..1c841ef 100644 --- a/src/r3/r3-component/r3-component-canvas.js +++ b/src/r3/r3-component/r3-component-canvas.js @@ -251,14 +251,25 @@ class ComponentCanvas extends ComponentDOM { } //GENERATED_OPTIONS_INIT_END + if (typeof options.required === 'undefined') { + options.required = {} + } + + //GENERATED_REQUIRED_COMPONENTS_START + //GENERATED_REQUIRED_COMPONENTS_END + //CUSTOM_OPTIONS_INIT_START //CUSTOM_OPTIONS_INIT_END - Object.assign(this, options); - //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END + this.underConstruction = true; + + Object.assign(this, options); + + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { diff --git a/src/r3/r3-component/r3-component-code.js b/src/r3/r3-component/r3-component-code.js index bae4c3a..092a01c 100644 --- a/src/r3/r3-component/r3-component-code.js +++ b/src/r3/r3-component/r3-component-code.js @@ -200,14 +200,25 @@ class ComponentCode extends Component { //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END + if (typeof options.required === 'undefined') { + options.required = {} + } + + //GENERATED_REQUIRED_COMPONENTS_START + //GENERATED_REQUIRED_COMPONENTS_END + //CUSTOM_OPTIONS_INIT_START //CUSTOM_OPTIONS_INIT_END - Object.assign(this, options); - //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END + this.underConstruction = true; + + Object.assign(this, options); + + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { diff --git a/src/r3/r3-component/r3-component-d-o-m.js b/src/r3/r3-component/r3-component-d-o-m.js index 7ea24b5..d0cabea 100644 --- a/src/r3/r3-component/r3-component-d-o-m.js +++ b/src/r3/r3-component/r3-component-d-o-m.js @@ -208,14 +208,25 @@ class ComponentDOM extends Component { } //GENERATED_OPTIONS_INIT_END + if (typeof options.required === 'undefined') { + options.required = {} + } + + //GENERATED_REQUIRED_COMPONENTS_START + //GENERATED_REQUIRED_COMPONENTS_END + //CUSTOM_OPTIONS_INIT_START //CUSTOM_OPTIONS_INIT_END - Object.assign(this, options); - //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END + this.underConstruction = true; + + Object.assign(this, options); + + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { diff --git a/src/r3/r3-component/r3-component-graphics.js b/src/r3/r3-component/r3-component-graphics.js index 4fa5b21..daf1737 100644 --- a/src/r3/r3-component/r3-component-graphics.js +++ b/src/r3/r3-component/r3-component-graphics.js @@ -200,14 +200,25 @@ class ComponentGraphics extends Component { //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END + if (typeof options.required === 'undefined') { + options.required = {} + } + + //GENERATED_REQUIRED_COMPONENTS_START + //GENERATED_REQUIRED_COMPONENTS_END + //CUSTOM_OPTIONS_INIT_START //CUSTOM_OPTIONS_INIT_END - Object.assign(this, options); - //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END + this.underConstruction = true; + + Object.assign(this, options); + + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { diff --git a/src/r3/r3-component/r3-component-image.js b/src/r3/r3-component/r3-component-image.js index 45dd710..a5686f4 100644 --- a/src/r3/r3-component/r3-component-image.js +++ b/src/r3/r3-component/r3-component-image.js @@ -315,6 +315,13 @@ class ComponentImage extends ComponentGraphics { } //GENERATED_OPTIONS_INIT_END + if (typeof options.required === 'undefined') { + options.required = {} + } + + //GENERATED_REQUIRED_COMPONENTS_START + //GENERATED_REQUIRED_COMPONENTS_END + //CUSTOM_OPTIONS_INIT_START if (options.extension.match(/(png)$/i)) { @@ -331,8 +338,6 @@ class ComponentImage extends ComponentGraphics { //CUSTOM_OPTIONS_INIT_END - Object.assign(this, options); - //CUSTOM_BEFORE_INIT_START if (this.width > this.height) { @@ -349,6 +354,12 @@ class ComponentImage extends ComponentGraphics { //CUSTOM_BEFORE_INIT_END + this.underConstruction = true; + + Object.assign(this, options); + + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { diff --git a/src/r3/r3-component/r3-component-input.js b/src/r3/r3-component/r3-component-input.js index 85dd8d7..72b51ff 100644 --- a/src/r3/r3-component/r3-component-input.js +++ b/src/r3/r3-component/r3-component-input.js @@ -200,14 +200,25 @@ class ComponentInput extends Component { //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END + if (typeof options.required === 'undefined') { + options.required = {} + } + + //GENERATED_REQUIRED_COMPONENTS_START + //GENERATED_REQUIRED_COMPONENTS_END + //CUSTOM_OPTIONS_INIT_START //CUSTOM_OPTIONS_INIT_END - Object.assign(this, options); - //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END + this.underConstruction = true; + + Object.assign(this, options); + + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { diff --git a/src/r3/r3-component/r3-component-material.js b/src/r3/r3-component/r3-component-material.js index f8e72a2..1f4dae4 100644 --- a/src/r3/r3-component/r3-component-material.js +++ b/src/r3/r3-component/r3-component-material.js @@ -218,14 +218,25 @@ class ComponentMaterial extends ComponentGraphics { //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END + if (typeof options.required === 'undefined') { + options.required = {} + } + + //GENERATED_REQUIRED_COMPONENTS_START + //GENERATED_REQUIRED_COMPONENTS_END + //CUSTOM_OPTIONS_INIT_START //CUSTOM_OPTIONS_INIT_END - Object.assign(this, options); - //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END + this.underConstruction = true; + + Object.assign(this, options); + + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { diff --git a/src/r3/r3-component/r3-component-mesh.js b/src/r3/r3-component/r3-component-mesh.js index 81a2d27..e17e250 100644 --- a/src/r3/r3-component/r3-component-mesh.js +++ b/src/r3/r3-component/r3-component-mesh.js @@ -218,14 +218,25 @@ class ComponentMesh extends ComponentGraphics { //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END + if (typeof options.required === 'undefined') { + options.required = {} + } + + //GENERATED_REQUIRED_COMPONENTS_START + //GENERATED_REQUIRED_COMPONENTS_END + //CUSTOM_OPTIONS_INIT_START //CUSTOM_OPTIONS_INIT_END - Object.assign(this, options); - //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END + this.underConstruction = true; + + Object.assign(this, options); + + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { diff --git a/src/r3/r3-component/r3-component-texture.js b/src/r3/r3-component/r3-component-texture.js index 4d3ba41..17004b9 100644 --- a/src/r3/r3-component/r3-component-texture.js +++ b/src/r3/r3-component/r3-component-texture.js @@ -218,14 +218,25 @@ class ComponentTexture extends ComponentGraphics { //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END + if (typeof options.required === 'undefined') { + options.required = {} + } + + //GENERATED_REQUIRED_COMPONENTS_START + //GENERATED_REQUIRED_COMPONENTS_END + //CUSTOM_OPTIONS_INIT_START //CUSTOM_OPTIONS_INIT_END - Object.assign(this, options); - //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END + this.underConstruction = true; + + Object.assign(this, options); + + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { diff --git a/src/r3/r3-component/r3-component-touch.js b/src/r3/r3-component/r3-component-touch.js index 0db0d9b..9d61e6f 100644 --- a/src/r3/r3-component/r3-component-touch.js +++ b/src/r3/r3-component/r3-component-touch.js @@ -132,6 +132,7 @@ const ComponentInput = require('.././r3-component-input.js'); CUSTOM_OPTIONS_END CUSTOM_REQUIRED_COMPONENTS_START + canvas=R3.Canvas CUSTOM_REQUIRED_COMPONENTS_END TEMPLATE_STATIC_OPTIONS_START @@ -225,14 +226,61 @@ class ComponentTouch extends ComponentInput { } //GENERATED_OPTIONS_INIT_END + if (typeof options.required === 'undefined') { + options.required = {} + } + + //GENERATED_REQUIRED_COMPONENTS_START + /** + * canvas - No comment + */ + options.required.canvas = R3.Canvas; + this.canvasBackup = options.canvas; + Object.defineProperty( + this, + 'canvas', + { + configurable : true, + enumerable : true, + set: function(x) { + Event.Emit( + Event.ENTITY_PROPERTY_UPDATE, + { + entity : this, + property : 'canvas', + value : x + } + ); + this.canvasBackup = x; + Event.Emit( + Event.ENTITY_PROPERTY_UPDATED, + { + entity : this, + property : 'canvas', + value : x + } + ); + return x; + }, + get : function() { + return this.canvasBackup; + } + } + ) + //GENERATED_REQUIRED_COMPONENTS_END + //CUSTOM_OPTIONS_INIT_START //CUSTOM_OPTIONS_INIT_END - Object.assign(this, options); - //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END + this.underConstruction = true; + + Object.assign(this, options); + + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { diff --git a/src/r3/r3-entity/r3-entity-slider.js b/src/r3/r3-entity/r3-entity-slider.js index f0492f5..d1d7502 100644 --- a/src/r3/r3-entity/r3-entity-slider.js +++ b/src/r3/r3-entity/r3-entity-slider.js @@ -370,18 +370,18 @@ class EntitySlider extends Entity { ) //GENERATED_REQUIRED_COMPONENTS_END - this.underConstruction = true; - - Object.assign(this, options); - - this.underConstruction = false; - //CUSTOM_OPTIONS_INIT_START //CUSTOM_OPTIONS_INIT_END //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END + this.underConstruction = true; + + Object.assign(this, options); + + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { diff --git a/src/r3/r3-r3.js b/src/r3/r3-r3.js index 0826171..3680197 100644 --- a/src/r3/r3-r3.js +++ b/src/r3/r3-r3.js @@ -1,6 +1,6 @@ class R3 { - static version = '3.0.74'; - static compileDate = '2021 Sep 24 - 07:23:19 am'; + static version = '3.0.76'; + static compileDate = '2021 Sep 24 - 07:41:32 am'; } //GENERATED_IMPORTS_START diff --git a/src/templates/component_extends_constructor.template b/src/templates/component_extends_constructor.template index e7c467a..1ef286d 100644 --- a/src/templates/component_extends_constructor.template +++ b/src/templates/component_extends_constructor.template @@ -24,14 +24,25 @@ //GENERATED_OPTIONS_INIT_START //GENERATED_OPTIONS_INIT_END + if (typeof options.required === 'undefined') { + options.required = {} + } + + //GENERATED_REQUIRED_COMPONENTS_START + //GENERATED_REQUIRED_COMPONENTS_END + //CUSTOM_OPTIONS_INIT_START //CUSTOM_OPTIONS_INIT_END - Object.assign(this, options); - //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END + this.underConstruction = true; + + Object.assign(this, options); + + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { diff --git a/src/templates/entity_extends_constructor.template b/src/templates/entity_extends_constructor.template index 2d6ef89..d3a4784 100644 --- a/src/templates/entity_extends_constructor.template +++ b/src/templates/entity_extends_constructor.template @@ -35,18 +35,18 @@ //GENERATED_REQUIRED_COMPONENTS_START //GENERATED_REQUIRED_COMPONENTS_END - this.underConstruction = true; - - Object.assign(this, options); - - this.underConstruction = false; - //CUSTOM_OPTIONS_INIT_START //CUSTOM_OPTIONS_INIT_END //CUSTOM_BEFORE_INIT_START //CUSTOM_BEFORE_INIT_END + this.underConstruction = true; + + Object.assign(this, options); + + this.underConstruction = false; + if (options.callDepth === 0) { this.initialize(); } else { diff --git a/version b/version index b8a51c0..bec157c 100644 --- a/version +++ b/version @@ -1 +1 @@ -3.0.74 \ No newline at end of file +3.0.76 \ No newline at end of file