From 2b8c94cb250724715d7af73a10d7aed12f75bda6 Mon Sep 17 00:00:00 2001 From: "Theunis J. Botha" Date: Sat, 2 Oct 2021 06:50:42 +0200 Subject: [PATCH] new components --- .r3_history | 6 + dist/r3.js | 1873 +++++++++++------ package.json | 2 +- src/r3/index.js | 7 +- src/r3/r3-component/index.js | 16 +- .../r3-component-buffer-geometry.js | 347 +++ src/r3/r3-component/r3-component-geometry.js | 328 +++ src/r3/r3-component/r3-component-material.js | 23 +- src/r3/r3-component/r3-component-mesh.js | 23 +- .../r3-component-plane-geometry.js | 365 ++++ src/r3/r3-component/r3-component-texture.js | 23 +- src/r3/r3-component/r3-component.js | 15 +- src/r3/r3-object/index.js | 16 +- src/r3/r3-object/r3-object.js | 15 +- src/templates/token.db | 1 - test/R3.test.js | 27 +- version | 2 +- 17 files changed, 2349 insertions(+), 740 deletions(-) create mode 100644 src/r3/r3-component/r3-component-buffer-geometry.js create mode 100644 src/r3/r3-component/r3-component-geometry.js create mode 100644 src/r3/r3-component/r3-component-plane-geometry.js diff --git a/.r3_history b/.r3_history index 30a5e25..93895dd 100644 --- a/.r3_history +++ b/.r3_history @@ -41,3 +41,9 @@ r3 create RuntimeNodeJSImage runtime_extends RuntimeImage ./r3-runtime/ r3 create Runtime base ./r3-runtime/ r3 create ComponentCode component_extends Component ./r3-component/ r3 create R3Object object_base ./r3-object/ +r3 create ComponentMaterial component_extends Component ./r3-component/ +r3 create ComponentTexture component_extends Component ./r3-component/ +r3 create ComponentMesh component_extends Component ./r3-component/ +r3 create ComponentGeometry component_extends Component ./r3-component/ +r3 create ComponentBufferGeometry component_extends ComponentGeometry ./r3-component/ +r3 create ComponentPlaneGeometry component_extends ComponentBufferGeometry ./r3-component/ diff --git a/dist/r3.js b/dist/r3.js index 52c293b..0f106ca 100644 --- a/dist/r3.js +++ b/dist/r3.js @@ -2902,14 +2902,17 @@ R3Object.COMPONENT = 0x3; R3Object.COMPONENT_CODE = 0x4; R3Object.COMPONENT_DOM = 0x5; R3Object.COMPONENT_CANVAS = 0x6; -R3Object.COMPONENT_GRAPHICS = 0x7; -R3Object.COMPONENT_IMAGE = 0x8; -R3Object.COMPONENT_MATERIAL = 0x9; -R3Object.COMPONENT_MESH = 0xa; -R3Object.COMPONENT_TEXTURE = 0xb; +R3Object.COMPONENT_GEOMETRY = 0x7; +R3Object.COMPONENT_BUFFER_GEOMETRY = 0x8; +R3Object.COMPONENT_PLANE_GEOMETRY = 0x9; +R3Object.COMPONENT_GRAPHICS = 0xa; +R3Object.COMPONENT_IMAGE = 0xb; R3Object.COMPONENT_INPUT = 0xc; R3Object.COMPONENT_TOUCH = 0xd; -R3Object.MAX_R3OBJECT = 0xe; +R3Object.COMPONENT_MATERIAL = 0xe; +R3Object.COMPONENT_MESH = 0xf; +R3Object.COMPONENT_TEXTURE = 0x10; +R3Object.MAX_R3OBJECT = 0x11; /** @@ -3887,14 +3890,17 @@ class Component extends R3Object { Component.CODE = 0x0; Component.DOM = 0x1; Component.CANVAS = 0x2; -Component.GRAPHICS = 0x3; -Component.IMAGE = 0x4; -Component.MATERIAL = 0x5; -Component.MESH = 0x6; -Component.TEXTURE = 0x7; +Component.GEOMETRY = 0x3; +Component.BUFFER_GEOMETRY = 0x4; +Component.PLANE_GEOMETRY = 0x5; +Component.GRAPHICS = 0x6; +Component.IMAGE = 0x7; Component.INPUT = 0x8; Component.TOUCH = 0x9; -Component.MAX_COMPONENT = 0xa; +Component.MATERIAL = 0xa; +Component.MESH = 0xb; +Component.TEXTURE = 0xc; +Component.MAX_COMPONENT = 0xd; /** @@ -4645,6 +4651,630 @@ class ComponentCanvas extends ComponentDOM { } +/** + + Class R3.Event.Object.Component.Geometry + [Inherited from Event] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + - async(eventId, data, clientCallback, clientErrorCallback) + Simply calls 'Async()' passing it the arguments + + - emit(eventId, data, clientCallback, clientErrorCallback) + Simply calls 'Emit()' passing it the arguments + + - subscribe(eventId, callback) + Simply calls 'Subscribe()' passing it the arguments + + Inherited Static Methods: + + - Async(eventId, data, clientCallback, clientErrorCallback) + Calls all subscription functions registered to eventId with data, clientCallback and clientErrorCallback as + arguments. If an error occurs during clientCallback it additionally will execute clientErrorCallback with the + error as argument. + + - Emit(eventId, data, clientCallback, clientErrorCallback) + Calls all subscription functions registered to eventId with data as arg. Calls clientCallback directly after + the event result is obtained, passing it the result. If an exception occurs during execution, the + clientErrorCallback is called with the error as argument. + + - Subscribe(eventId, callback) + Subscribes to 'eventName', ex. Event.BEFORE_RENDER and executes 'callback()' when eventName is raised + + [Inherited from R3Object] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from Component] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Belonging to ComponentGeometry] + + Properties: + + + + Static Properties: + + + + Methods: + + + + Static Methods: + + + + **/ + +class ComponentGeometry extends Component { + + constructor(options) { + + if (typeof options === 'undefined') { + options = {}; + } + + if (typeof options.maxDepth === 'undefined') { + options.maxDepth = 0; + } + + if (typeof options.callDepth === 'undefined') { + options.callDepth = 0; + } else { + options.callDepth++; + } + + options.maxDepth = options.callDepth; + + super(options); + + /** + * instance - Holds the current instance of this object as determined (built) by the runtime object. + */ + if (typeof options.instance === 'undefined') { + options.instance = null; + } + + this.underConstruction = true; + + Object.assign(this, options); + + this.underConstruction = false; + + if (options.callDepth === 0) { + this.initialize(); + } else { + options.callDepth--; + } + + } + + /** + * initialize() + * - Notifies all systems listening that this component initialized. + */ + initialize() { + + super.initialize(); + + if (this.initializeDepth === this.maxDepth) { + + if (this instanceof Component && this.initialized) { + this.createInstance(); + } + + if (this instanceof Entity && this.initialized && !this.started) { + this.start(); + } + + } else { + this.initializeDepth++; + } + + } + + /** + * updateInstance() + * - Updates this object by copying the values of the current object into it's instance object. + * @param property + */ + updateInstance(property) { + + this.emit(Event.UPDATE_INSTANCE_BEFORE, this); + + this.emit(Event.UPDATE_INSTANCE_AFTER, this); + + } + + /** + * updateFromInstance() + * - Updates this object by copying the values of its instance into the current object. + * @param property + */ + updateFromInstance(property) { + + this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this); + + this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this); + + } + +} + +/** + + Class R3.Event.Object.Component.Geometry.BufferGeometry + [Inherited from Event] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + - async(eventId, data, clientCallback, clientErrorCallback) + Simply calls 'Async()' passing it the arguments + + - emit(eventId, data, clientCallback, clientErrorCallback) + Simply calls 'Emit()' passing it the arguments + + - subscribe(eventId, callback) + Simply calls 'Subscribe()' passing it the arguments + + Inherited Static Methods: + + - Async(eventId, data, clientCallback, clientErrorCallback) + Calls all subscription functions registered to eventId with data, clientCallback and clientErrorCallback as + arguments. If an error occurs during clientCallback it additionally will execute clientErrorCallback with the + error as argument. + + - Emit(eventId, data, clientCallback, clientErrorCallback) + Calls all subscription functions registered to eventId with data as arg. Calls clientCallback directly after + the event result is obtained, passing it the result. If an exception occurs during execution, the + clientErrorCallback is called with the error as argument. + + - Subscribe(eventId, callback) + Subscribes to 'eventName', ex. Event.BEFORE_RENDER and executes 'callback()' when eventName is raised + + [Inherited from R3Object] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from Component] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from ComponentGeometry] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Belonging to ComponentBufferGeometry] + + Properties: + + + + Static Properties: + + + + Methods: + + + + Static Methods: + + + + **/ + +class ComponentBufferGeometry extends ComponentGeometry { + + constructor(options) { + + if (typeof options === 'undefined') { + options = {}; + } + + if (typeof options.maxDepth === 'undefined') { + options.maxDepth = 0; + } + + if (typeof options.callDepth === 'undefined') { + options.callDepth = 0; + } else { + options.callDepth++; + } + + options.maxDepth = options.callDepth; + + super(options); + + /** + * instance - Holds the current instance of this object as determined (built) by the runtime object. + */ + if (typeof options.instance === 'undefined') { + options.instance = null; + } + + this.underConstruction = true; + + Object.assign(this, options); + + this.underConstruction = false; + + if (options.callDepth === 0) { + this.initialize(); + } else { + options.callDepth--; + } + + } + + /** + * initialize() + * - Notifies all systems listening that this component initialized. + */ + initialize() { + + super.initialize(); + + if (this.initializeDepth === this.maxDepth) { + + if (this instanceof Component && this.initialized) { + this.createInstance(); + } + + if (this instanceof Entity && this.initialized && !this.started) { + this.start(); + } + + } else { + this.initializeDepth++; + } + + } + + /** + * updateInstance() + * - Updates this object by copying the values of the current object into it's instance object. + * @param property + */ + updateInstance(property) { + + this.emit(Event.UPDATE_INSTANCE_BEFORE, this); + + this.emit(Event.UPDATE_INSTANCE_AFTER, this); + + } + + /** + * updateFromInstance() + * - Updates this object by copying the values of its instance into the current object. + * @param property + */ + updateFromInstance(property) { + + this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this); + + this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this); + + } + +} + +/** + + Class R3.Event.Object.Component.Geometry.BufferGeometry.PlaneGeometry + [Inherited from Event] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + - async(eventId, data, clientCallback, clientErrorCallback) + Simply calls 'Async()' passing it the arguments + + - emit(eventId, data, clientCallback, clientErrorCallback) + Simply calls 'Emit()' passing it the arguments + + - subscribe(eventId, callback) + Simply calls 'Subscribe()' passing it the arguments + + Inherited Static Methods: + + - Async(eventId, data, clientCallback, clientErrorCallback) + Calls all subscription functions registered to eventId with data, clientCallback and clientErrorCallback as + arguments. If an error occurs during clientCallback it additionally will execute clientErrorCallback with the + error as argument. + + - Emit(eventId, data, clientCallback, clientErrorCallback) + Calls all subscription functions registered to eventId with data as arg. Calls clientCallback directly after + the event result is obtained, passing it the result. If an exception occurs during execution, the + clientErrorCallback is called with the error as argument. + + - Subscribe(eventId, callback) + Subscribes to 'eventName', ex. Event.BEFORE_RENDER and executes 'callback()' when eventName is raised + + [Inherited from R3Object] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from Component] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from ComponentGeometry] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from ComponentBufferGeometry] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Belonging to ComponentPlaneGeometry] + + Properties: + + + + Static Properties: + + + + Methods: + + + + Static Methods: + + + + **/ + +class ComponentPlaneGeometry extends ComponentBufferGeometry { + + constructor(options) { + + if (typeof options === 'undefined') { + options = {}; + } + + if (typeof options.maxDepth === 'undefined') { + options.maxDepth = 0; + } + + if (typeof options.callDepth === 'undefined') { + options.callDepth = 0; + } else { + options.callDepth++; + } + + options.maxDepth = options.callDepth; + + super(options); + + /** + * instance - Holds the current instance of this object as determined (built) by the runtime object. + */ + if (typeof options.instance === 'undefined') { + options.instance = null; + } + + this.underConstruction = true; + + Object.assign(this, options); + + this.underConstruction = false; + + if (options.callDepth === 0) { + this.initialize(); + } else { + options.callDepth--; + } + + } + + /** + * initialize() + * - Notifies all systems listening that this component initialized. + */ + initialize() { + + super.initialize(); + + if (this.initializeDepth === this.maxDepth) { + + if (this instanceof Component && this.initialized) { + this.createInstance(); + } + + if (this instanceof Entity && this.initialized && !this.started) { + this.start(); + } + + } else { + this.initializeDepth++; + } + + } + + /** + * updateInstance() + * - Updates this object by copying the values of the current object into it's instance object. + * @param property + */ + updateInstance(property) { + + this.emit(Event.UPDATE_INSTANCE_BEFORE, this); + + this.emit(Event.UPDATE_INSTANCE_AFTER, this); + + } + + /** + * updateFromInstance() + * - Updates this object by copying the values of its instance into the current object. + * @param property + */ + updateFromInstance(property) { + + this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this); + + this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this); + + } + +} + /** Class R3.Event.Object.Component.Graphics @@ -5384,630 +6014,6 @@ class ComponentImage extends ComponentGraphics { } -/** - - Class R3.Event.Object.Component.Graphics.Material - [Inherited from Event] - - Inherited Properties: - - - - Inherited Static Properties: - - - - Inherited Methods: - - - async(eventId, data, clientCallback, clientErrorCallback) - Simply calls 'Async()' passing it the arguments - - - emit(eventId, data, clientCallback, clientErrorCallback) - Simply calls 'Emit()' passing it the arguments - - - subscribe(eventId, callback) - Simply calls 'Subscribe()' passing it the arguments - - Inherited Static Methods: - - - Async(eventId, data, clientCallback, clientErrorCallback) - Calls all subscription functions registered to eventId with data, clientCallback and clientErrorCallback as - arguments. If an error occurs during clientCallback it additionally will execute clientErrorCallback with the - error as argument. - - - Emit(eventId, data, clientCallback, clientErrorCallback) - Calls all subscription functions registered to eventId with data as arg. Calls clientCallback directly after - the event result is obtained, passing it the result. If an exception occurs during execution, the - clientErrorCallback is called with the error as argument. - - - Subscribe(eventId, callback) - Subscribes to 'eventName', ex. Event.BEFORE_RENDER and executes 'callback()' when eventName is raised - - [Inherited from R3Object] - - Inherited Properties: - - - - Inherited Static Properties: - - - - Inherited Methods: - - - - Inherited Static Methods: - - - - [Inherited from Component] - - Inherited Properties: - - - - Inherited Static Properties: - - - - Inherited Methods: - - - - Inherited Static Methods: - - - - [Inherited from ComponentGraphics] - - Inherited Properties: - - - - Inherited Static Properties: - - - - Inherited Methods: - - - - Inherited Static Methods: - - - - [Belonging to ComponentMaterial] - - Properties: - - - - Static Properties: - - - - Methods: - - - - Static Methods: - - - - **/ - -class ComponentMaterial extends ComponentGraphics { - - constructor(options) { - - if (typeof options === 'undefined') { - options = {}; - } - - if (typeof options.maxDepth === 'undefined') { - options.maxDepth = 0; - } - - if (typeof options.callDepth === 'undefined') { - options.callDepth = 0; - } else { - options.callDepth++; - } - - options.maxDepth = options.callDepth; - - super(options); - - /** - * instance - Holds the current instance of this object as determined (built) by the runtime object. - */ - if (typeof options.instance === 'undefined') { - options.instance = null; - } - - this.underConstruction = true; - - Object.assign(this, options); - - this.underConstruction = false; - - if (options.callDepth === 0) { - this.initialize(); - } else { - options.callDepth--; - } - - } - - /** - * initialize() - * - Notifies all systems listening that this component initialized. - */ - initialize() { - - super.initialize(); - - if (this.initializeDepth === this.maxDepth) { - - if (this instanceof Component && this.initialized) { - this.createInstance(); - } - - if (this instanceof Entity && this.initialized && !this.started) { - this.start(); - } - - } else { - this.initializeDepth++; - } - - } - - /** - * updateInstance() - * - Updates this object by copying the values of the current object into it's instance object. - * @param property - */ - updateInstance(property) { - - this.emit(Event.UPDATE_INSTANCE_BEFORE, this); - - this.emit(Event.UPDATE_INSTANCE_AFTER, this); - - } - - /** - * updateFromInstance() - * - Updates this object by copying the values of its instance into the current object. - * @param property - */ - updateFromInstance(property) { - - this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this); - - this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this); - - } - -} - -/** - - Class R3.Event.Object.Component.Graphics.Mesh - [Inherited from Event] - - Inherited Properties: - - - - Inherited Static Properties: - - - - Inherited Methods: - - - async(eventId, data, clientCallback, clientErrorCallback) - Simply calls 'Async()' passing it the arguments - - - emit(eventId, data, clientCallback, clientErrorCallback) - Simply calls 'Emit()' passing it the arguments - - - subscribe(eventId, callback) - Simply calls 'Subscribe()' passing it the arguments - - Inherited Static Methods: - - - Async(eventId, data, clientCallback, clientErrorCallback) - Calls all subscription functions registered to eventId with data, clientCallback and clientErrorCallback as - arguments. If an error occurs during clientCallback it additionally will execute clientErrorCallback with the - error as argument. - - - Emit(eventId, data, clientCallback, clientErrorCallback) - Calls all subscription functions registered to eventId with data as arg. Calls clientCallback directly after - the event result is obtained, passing it the result. If an exception occurs during execution, the - clientErrorCallback is called with the error as argument. - - - Subscribe(eventId, callback) - Subscribes to 'eventName', ex. Event.BEFORE_RENDER and executes 'callback()' when eventName is raised - - [Inherited from R3Object] - - Inherited Properties: - - - - Inherited Static Properties: - - - - Inherited Methods: - - - - Inherited Static Methods: - - - - [Inherited from Component] - - Inherited Properties: - - - - Inherited Static Properties: - - - - Inherited Methods: - - - - Inherited Static Methods: - - - - [Inherited from ComponentGraphics] - - Inherited Properties: - - - - Inherited Static Properties: - - - - Inherited Methods: - - - - Inherited Static Methods: - - - - [Belonging to ComponentMesh] - - Properties: - - - - Static Properties: - - - - Methods: - - - - Static Methods: - - - - **/ - -class ComponentMesh extends ComponentGraphics { - - constructor(options) { - - if (typeof options === 'undefined') { - options = {}; - } - - if (typeof options.maxDepth === 'undefined') { - options.maxDepth = 0; - } - - if (typeof options.callDepth === 'undefined') { - options.callDepth = 0; - } else { - options.callDepth++; - } - - options.maxDepth = options.callDepth; - - super(options); - - /** - * instance - Holds the current instance of this object as determined (built) by the runtime object. - */ - if (typeof options.instance === 'undefined') { - options.instance = null; - } - - this.underConstruction = true; - - Object.assign(this, options); - - this.underConstruction = false; - - if (options.callDepth === 0) { - this.initialize(); - } else { - options.callDepth--; - } - - } - - /** - * initialize() - * - Notifies all systems listening that this component initialized. - */ - initialize() { - - super.initialize(); - - if (this.initializeDepth === this.maxDepth) { - - if (this instanceof Component && this.initialized) { - this.createInstance(); - } - - if (this instanceof Entity && this.initialized && !this.started) { - this.start(); - } - - } else { - this.initializeDepth++; - } - - } - - /** - * updateInstance() - * - Updates this object by copying the values of the current object into it's instance object. - * @param property - */ - updateInstance(property) { - - this.emit(Event.UPDATE_INSTANCE_BEFORE, this); - - this.emit(Event.UPDATE_INSTANCE_AFTER, this); - - } - - /** - * updateFromInstance() - * - Updates this object by copying the values of its instance into the current object. - * @param property - */ - updateFromInstance(property) { - - this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this); - - this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this); - - } - -} - -/** - - Class R3.Event.Object.Component.Graphics.Texture - [Inherited from Event] - - Inherited Properties: - - - - Inherited Static Properties: - - - - Inherited Methods: - - - async(eventId, data, clientCallback, clientErrorCallback) - Simply calls 'Async()' passing it the arguments - - - emit(eventId, data, clientCallback, clientErrorCallback) - Simply calls 'Emit()' passing it the arguments - - - subscribe(eventId, callback) - Simply calls 'Subscribe()' passing it the arguments - - Inherited Static Methods: - - - Async(eventId, data, clientCallback, clientErrorCallback) - Calls all subscription functions registered to eventId with data, clientCallback and clientErrorCallback as - arguments. If an error occurs during clientCallback it additionally will execute clientErrorCallback with the - error as argument. - - - Emit(eventId, data, clientCallback, clientErrorCallback) - Calls all subscription functions registered to eventId with data as arg. Calls clientCallback directly after - the event result is obtained, passing it the result. If an exception occurs during execution, the - clientErrorCallback is called with the error as argument. - - - Subscribe(eventId, callback) - Subscribes to 'eventName', ex. Event.BEFORE_RENDER and executes 'callback()' when eventName is raised - - [Inherited from R3Object] - - Inherited Properties: - - - - Inherited Static Properties: - - - - Inherited Methods: - - - - Inherited Static Methods: - - - - [Inherited from Component] - - Inherited Properties: - - - - Inherited Static Properties: - - - - Inherited Methods: - - - - Inherited Static Methods: - - - - [Inherited from ComponentGraphics] - - Inherited Properties: - - - - Inherited Static Properties: - - - - Inherited Methods: - - - - Inherited Static Methods: - - - - [Belonging to ComponentTexture] - - Properties: - - - - Static Properties: - - - - Methods: - - - - Static Methods: - - - - **/ - -class ComponentTexture extends ComponentGraphics { - - constructor(options) { - - if (typeof options === 'undefined') { - options = {}; - } - - if (typeof options.maxDepth === 'undefined') { - options.maxDepth = 0; - } - - if (typeof options.callDepth === 'undefined') { - options.callDepth = 0; - } else { - options.callDepth++; - } - - options.maxDepth = options.callDepth; - - super(options); - - /** - * instance - Holds the current instance of this object as determined (built) by the runtime object. - */ - if (typeof options.instance === 'undefined') { - options.instance = null; - } - - this.underConstruction = true; - - Object.assign(this, options); - - this.underConstruction = false; - - if (options.callDepth === 0) { - this.initialize(); - } else { - options.callDepth--; - } - - } - - /** - * initialize() - * - Notifies all systems listening that this component initialized. - */ - initialize() { - - super.initialize(); - - if (this.initializeDepth === this.maxDepth) { - - if (this instanceof Component && this.initialized) { - this.createInstance(); - } - - if (this instanceof Entity && this.initialized && !this.started) { - this.start(); - } - - } else { - this.initializeDepth++; - } - - } - - /** - * updateInstance() - * - Updates this object by copying the values of the current object into it's instance object. - * @param property - */ - updateInstance(property) { - - this.emit(Event.UPDATE_INSTANCE_BEFORE, this); - - this.emit(Event.UPDATE_INSTANCE_AFTER, this); - - } - - /** - * updateFromInstance() - * - Updates this object by copying the values of its instance into the current object. - * @param property - */ - updateFromInstance(property) { - - this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this); - - this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this); - - } - -} - /** Class R3.Event.Object.Component.Input @@ -6490,6 +6496,576 @@ class ComponentTouch extends ComponentInput { } +/** + + Class R3.Event.Object.Component.Material + [Inherited from Event] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + - async(eventId, data, clientCallback, clientErrorCallback) + Simply calls 'Async()' passing it the arguments + + - emit(eventId, data, clientCallback, clientErrorCallback) + Simply calls 'Emit()' passing it the arguments + + - subscribe(eventId, callback) + Simply calls 'Subscribe()' passing it the arguments + + Inherited Static Methods: + + - Async(eventId, data, clientCallback, clientErrorCallback) + Calls all subscription functions registered to eventId with data, clientCallback and clientErrorCallback as + arguments. If an error occurs during clientCallback it additionally will execute clientErrorCallback with the + error as argument. + + - Emit(eventId, data, clientCallback, clientErrorCallback) + Calls all subscription functions registered to eventId with data as arg. Calls clientCallback directly after + the event result is obtained, passing it the result. If an exception occurs during execution, the + clientErrorCallback is called with the error as argument. + + - Subscribe(eventId, callback) + Subscribes to 'eventName', ex. Event.BEFORE_RENDER and executes 'callback()' when eventName is raised + + [Inherited from R3Object] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from Component] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Belonging to ComponentMaterial] + + Properties: + + + + Static Properties: + + + + Methods: + + + + Static Methods: + + + + **/ + +class ComponentMaterial extends Component { + + constructor(options) { + + if (typeof options === 'undefined') { + options = {}; + } + + if (typeof options.maxDepth === 'undefined') { + options.maxDepth = 0; + } + + if (typeof options.callDepth === 'undefined') { + options.callDepth = 0; + } else { + options.callDepth++; + } + + options.maxDepth = options.callDepth; + + super(options); + + /** + * instance - Holds the current instance of this object as determined (built) by the runtime object. + */ + if (typeof options.instance === 'undefined') { + options.instance = null; + } + + this.underConstruction = true; + + Object.assign(this, options); + + this.underConstruction = false; + + if (options.callDepth === 0) { + this.initialize(); + } else { + options.callDepth--; + } + + } + + /** + * initialize() + * - Notifies all systems listening that this component initialized. + */ + initialize() { + + super.initialize(); + + if (this.initializeDepth === this.maxDepth) { + + if (this instanceof Component && this.initialized) { + this.createInstance(); + } + + if (this instanceof Entity && this.initialized && !this.started) { + this.start(); + } + + } else { + this.initializeDepth++; + } + + } + + /** + * updateInstance() + * - Updates this object by copying the values of the current object into it's instance object. + * @param property + */ + updateInstance(property) { + + this.emit(Event.UPDATE_INSTANCE_BEFORE, this); + + this.emit(Event.UPDATE_INSTANCE_AFTER, this); + + } + + /** + * updateFromInstance() + * - Updates this object by copying the values of its instance into the current object. + * @param property + */ + updateFromInstance(property) { + + this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this); + + this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this); + + } + +} + +/** + + Class R3.Event.Object.Component.Mesh + [Inherited from Event] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + - async(eventId, data, clientCallback, clientErrorCallback) + Simply calls 'Async()' passing it the arguments + + - emit(eventId, data, clientCallback, clientErrorCallback) + Simply calls 'Emit()' passing it the arguments + + - subscribe(eventId, callback) + Simply calls 'Subscribe()' passing it the arguments + + Inherited Static Methods: + + - Async(eventId, data, clientCallback, clientErrorCallback) + Calls all subscription functions registered to eventId with data, clientCallback and clientErrorCallback as + arguments. If an error occurs during clientCallback it additionally will execute clientErrorCallback with the + error as argument. + + - Emit(eventId, data, clientCallback, clientErrorCallback) + Calls all subscription functions registered to eventId with data as arg. Calls clientCallback directly after + the event result is obtained, passing it the result. If an exception occurs during execution, the + clientErrorCallback is called with the error as argument. + + - Subscribe(eventId, callback) + Subscribes to 'eventName', ex. Event.BEFORE_RENDER and executes 'callback()' when eventName is raised + + [Inherited from R3Object] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from Component] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Belonging to ComponentMesh] + + Properties: + + + + Static Properties: + + + + Methods: + + + + Static Methods: + + + + **/ + +class ComponentMesh extends Component { + + constructor(options) { + + if (typeof options === 'undefined') { + options = {}; + } + + if (typeof options.maxDepth === 'undefined') { + options.maxDepth = 0; + } + + if (typeof options.callDepth === 'undefined') { + options.callDepth = 0; + } else { + options.callDepth++; + } + + options.maxDepth = options.callDepth; + + super(options); + + /** + * instance - Holds the current instance of this object as determined (built) by the runtime object. + */ + if (typeof options.instance === 'undefined') { + options.instance = null; + } + + this.underConstruction = true; + + Object.assign(this, options); + + this.underConstruction = false; + + if (options.callDepth === 0) { + this.initialize(); + } else { + options.callDepth--; + } + + } + + /** + * initialize() + * - Notifies all systems listening that this component initialized. + */ + initialize() { + + super.initialize(); + + if (this.initializeDepth === this.maxDepth) { + + if (this instanceof Component && this.initialized) { + this.createInstance(); + } + + if (this instanceof Entity && this.initialized && !this.started) { + this.start(); + } + + } else { + this.initializeDepth++; + } + + } + + /** + * updateInstance() + * - Updates this object by copying the values of the current object into it's instance object. + * @param property + */ + updateInstance(property) { + + this.emit(Event.UPDATE_INSTANCE_BEFORE, this); + + this.emit(Event.UPDATE_INSTANCE_AFTER, this); + + } + + /** + * updateFromInstance() + * - Updates this object by copying the values of its instance into the current object. + * @param property + */ + updateFromInstance(property) { + + this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this); + + this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this); + + } + +} + +/** + + Class R3.Event.Object.Component.Texture + [Inherited from Event] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + - async(eventId, data, clientCallback, clientErrorCallback) + Simply calls 'Async()' passing it the arguments + + - emit(eventId, data, clientCallback, clientErrorCallback) + Simply calls 'Emit()' passing it the arguments + + - subscribe(eventId, callback) + Simply calls 'Subscribe()' passing it the arguments + + Inherited Static Methods: + + - Async(eventId, data, clientCallback, clientErrorCallback) + Calls all subscription functions registered to eventId with data, clientCallback and clientErrorCallback as + arguments. If an error occurs during clientCallback it additionally will execute clientErrorCallback with the + error as argument. + + - Emit(eventId, data, clientCallback, clientErrorCallback) + Calls all subscription functions registered to eventId with data as arg. Calls clientCallback directly after + the event result is obtained, passing it the result. If an exception occurs during execution, the + clientErrorCallback is called with the error as argument. + + - Subscribe(eventId, callback) + Subscribes to 'eventName', ex. Event.BEFORE_RENDER and executes 'callback()' when eventName is raised + + [Inherited from R3Object] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from Component] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Belonging to ComponentTexture] + + Properties: + + + + Static Properties: + + + + Methods: + + + + Static Methods: + + + + **/ + +class ComponentTexture extends Component { + + constructor(options) { + + if (typeof options === 'undefined') { + options = {}; + } + + if (typeof options.maxDepth === 'undefined') { + options.maxDepth = 0; + } + + if (typeof options.callDepth === 'undefined') { + options.callDepth = 0; + } else { + options.callDepth++; + } + + options.maxDepth = options.callDepth; + + super(options); + + /** + * instance - Holds the current instance of this object as determined (built) by the runtime object. + */ + if (typeof options.instance === 'undefined') { + options.instance = null; + } + + this.underConstruction = true; + + Object.assign(this, options); + + this.underConstruction = false; + + if (options.callDepth === 0) { + this.initialize(); + } else { + options.callDepth--; + } + + } + + /** + * initialize() + * - Notifies all systems listening that this component initialized. + */ + initialize() { + + super.initialize(); + + if (this.initializeDepth === this.maxDepth) { + + if (this instanceof Component && this.initialized) { + this.createInstance(); + } + + if (this instanceof Entity && this.initialized && !this.started) { + this.start(); + } + + } else { + this.initializeDepth++; + } + + } + + /** + * updateInstance() + * - Updates this object by copying the values of the current object into it's instance object. + * @param property + */ + updateInstance(property) { + + this.emit(Event.UPDATE_INSTANCE_BEFORE, this); + + this.emit(Event.UPDATE_INSTANCE_AFTER, this); + + } + + /** + * updateFromInstance() + * - Updates this object by copying the values of its instance into the current object. + * @param property + */ + updateFromInstance(property) { + + this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this); + + this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this); + + } + +} + class Utils { constructor(options) { @@ -7684,13 +8260,16 @@ console.log('r3.js - version ' + R3.Version + ' compiled ' + R3.CompileDate); Component.Code = ComponentCode; Component.DOM = ComponentDOM; Component.DOM.Canvas = ComponentCanvas; +Component.Geometry = ComponentGeometry; +Component.Geometry.BufferGeometry = ComponentBufferGeometry; +Component.Geometry.BufferGeometry.PlaneGeometry = ComponentPlaneGeometry; Component.Graphics = ComponentGraphics; Component.Graphics.Image = ComponentImage; -Component.Graphics.Material = ComponentMaterial; -Component.Graphics.Mesh = ComponentMesh; -Component.Graphics.Texture = ComponentTexture; Component.Input = ComponentInput; Component.Input.Touch = ComponentTouch; +Component.Material = ComponentMaterial; +Component.Mesh = ComponentMesh; +Component.Texture = ComponentTexture; Entity.Slider = EntitySlider; R3Object.Project = Project; R3Object.Entity = Entity; @@ -7699,13 +8278,16 @@ R3Object.Component = Component; R3Object.Component.Code = ComponentCode; R3Object.Component.DOM = ComponentDOM; R3Object.Component.DOM.Canvas = ComponentCanvas; +R3Object.Component.Geometry = ComponentGeometry; +R3Object.Component.Geometry.BufferGeometry = ComponentBufferGeometry; +R3Object.Component.Geometry.BufferGeometry.PlaneGeometry = ComponentPlaneGeometry; R3Object.Component.Graphics = ComponentGraphics; R3Object.Component.Graphics.Image = ComponentImage; -R3Object.Component.Graphics.Material = ComponentMaterial; -R3Object.Component.Graphics.Mesh = ComponentMesh; -R3Object.Component.Graphics.Texture = ComponentTexture; R3Object.Component.Input = ComponentInput; R3Object.Component.Input.Touch = ComponentTouch; +R3Object.Component.Material = ComponentMaterial; +R3Object.Component.Mesh = ComponentMesh; +R3Object.Component.Texture = ComponentTexture; Runtime.Coder = RuntimeCoder; Runtime.Coder.CodeMirror = RuntimeCodeMirror; Runtime.DOM = RuntimeDOM; @@ -7739,11 +8321,12 @@ R3.Entity = Entity; R3.Component = Component; R3.Code = R3Object.Component.Code; R3.Canvas = R3Object.Component.DOM.Canvas; +R3.PlaneGeometry = R3Object.Component.Geometry.BufferGeometry.PlaneGeometry; R3.Image = R3Object.Component.Graphics.Image; -R3.Material = R3Object.Component.Graphics.Material; -R3.Mesh = R3Object.Component.Graphics.Mesh; -R3.Texture = R3Object.Component.Graphics.Texture; R3.Touch = R3Object.Component.Input.Touch; +R3.Material = R3Object.Component.Material; +R3.Mesh = R3Object.Component.Mesh; +R3.Texture = R3Object.Component.Texture; R3.System.DOM.Start(); R3.System.Input.Start(); R3.System.Linking.Start(); diff --git a/package.json b/package.json index 37eceb2..3f6defe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "r3", - "version": "3.0.207", + "version": "3.0.214", "description": "", "private": true, "dependencies": { diff --git a/src/r3/index.js b/src/r3/index.js index 1a105ce..fde9de3 100644 --- a/src/r3/index.js +++ b/src/r3/index.js @@ -21,11 +21,12 @@ R3.Entity = Entity; R3.Component = Component; R3.Code = R3Object.Component.Code; R3.Canvas = R3Object.Component.DOM.Canvas; +R3.PlaneGeometry = R3Object.Component.Geometry.BufferGeometry.PlaneGeometry; R3.Image = R3Object.Component.Graphics.Image; -R3.Material = R3Object.Component.Graphics.Material; -R3.Mesh = R3Object.Component.Graphics.Mesh; -R3.Texture = R3Object.Component.Graphics.Texture; R3.Touch = R3Object.Component.Input.Touch; +R3.Material = R3Object.Component.Material; +R3.Mesh = R3Object.Component.Mesh; +R3.Texture = R3Object.Component.Texture; //GENERATED_DEFINES_END //CUSTOM_DEFINES_START diff --git a/src/r3/r3-component/index.js b/src/r3/r3-component/index.js index 01e8f14..1bc6b58 100644 --- a/src/r3/r3-component/index.js +++ b/src/r3/r3-component/index.js @@ -3,26 +3,32 @@ const Component = require('./r3-component.js'); const ComponentCode = require('./r3-component-code.js'); const ComponentDOM = require('./r3-component-d-o-m.js'); const ComponentCanvas = require('./r3-component-canvas.js'); +const ComponentGeometry = require('./r3-component-geometry.js'); +const ComponentBufferGeometry = require('./r3-component-buffer-geometry.js'); +const ComponentPlaneGeometry = require('./r3-component-plane-geometry.js'); const ComponentGraphics = require('./r3-component-graphics.js'); const ComponentImage = require('./r3-component-image.js'); +const ComponentInput = require('./r3-component-input.js'); +const ComponentTouch = require('./r3-component-touch.js'); const ComponentMaterial = require('./r3-component-material.js'); const ComponentMesh = require('./r3-component-mesh.js'); const ComponentTexture = require('./r3-component-texture.js'); -const ComponentInput = require('./r3-component-input.js'); -const ComponentTouch = require('./r3-component-touch.js'); //GENERATED_IMPORTS_END //GENERATED_INDEX_BODY_START Component.Code = ComponentCode; Component.DOM = ComponentDOM; Component.DOM.Canvas = ComponentCanvas; +Component.Geometry = ComponentGeometry; +Component.Geometry.BufferGeometry = ComponentBufferGeometry; +Component.Geometry.BufferGeometry.PlaneGeometry = ComponentPlaneGeometry; Component.Graphics = ComponentGraphics; Component.Graphics.Image = ComponentImage; -Component.Graphics.Material = ComponentMaterial; -Component.Graphics.Mesh = ComponentMesh; -Component.Graphics.Texture = ComponentTexture; Component.Input = ComponentInput; Component.Input.Touch = ComponentTouch; +Component.Material = ComponentMaterial; +Component.Mesh = ComponentMesh; +Component.Texture = ComponentTexture; //GENERATED_INDEX_BODY_END //GENERATED_EXPORTS_START diff --git a/src/r3/r3-component/r3-component-buffer-geometry.js b/src/r3/r3-component/r3-component-buffer-geometry.js new file mode 100644 index 0000000..7ed5b77 --- /dev/null +++ b/src/r3/r3-component/r3-component-buffer-geometry.js @@ -0,0 +1,347 @@ +//GENERATED_IMPORTS_START +const Entity = require('../r3-entity/r3-entity.js'); +//GENERATED_IMPORTS_END + +//CUSTOM_IMPORTS_START +//CUSTOM_IMPORTS_END + +const Component = require('../r3-component/r3-component.js'); +const ComponentGeometry = require('./r3-component-geometry.js'); + +/** + + GENERATED_INHERITED_START + + Class R3.Event.Object.Component.Geometry.BufferGeometry + [Inherited from Event] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + - async(eventId, data, clientCallback, clientErrorCallback) + Simply calls 'Async()' passing it the arguments + + - emit(eventId, data, clientCallback, clientErrorCallback) + Simply calls 'Emit()' passing it the arguments + + - subscribe(eventId, callback) + Simply calls 'Subscribe()' passing it the arguments + + Inherited Static Methods: + + - Async(eventId, data, clientCallback, clientErrorCallback) + Calls all subscription functions registered to eventId with data, clientCallback and clientErrorCallback as + arguments. If an error occurs during clientCallback it additionally will execute clientErrorCallback with the + error as argument. + + - Emit(eventId, data, clientCallback, clientErrorCallback) + Calls all subscription functions registered to eventId with data as arg. Calls clientCallback directly after + the event result is obtained, passing it the result. If an exception occurs during execution, the + clientErrorCallback is called with the error as argument. + + - Subscribe(eventId, callback) + Subscribes to 'eventName', ex. Event.BEFORE_RENDER and executes 'callback()' when eventName is raised + + [Inherited from R3Object] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from Component] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from ComponentGeometry] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Belonging to ComponentBufferGeometry] + + Properties: + + + + Static Properties: + + + + Methods: + + + + Static Methods: + + + + GENERATED_INHERITED_END + + TEMPLATE_OPTIONS_START + instance=null - Holds the current instance of this object as determined (built) by the runtime object. + TEMPLATE_OPTIONS_END + + CUSTOM_OPTIONS_START + CUSTOM_OPTIONS_END + + CUSTOM_REQUIRED_COMPONENTS_START + CUSTOM_REQUIRED_COMPONENTS_END + + TEMPLATE_STATIC_OPTIONS_START + TEMPLATE_STATIC_OPTIONS_END + + CUSTOM_STATIC_OPTIONS_START + CUSTOM_STATIC_OPTIONS_END + + TEMPLATE_INSTANCE_OPTIONS_MAPPING_START + TEMPLATE_INSTANCE_OPTIONS_MAPPING_END + + CUSTOM_INSTANCE_OPTIONS_MAPPING_START + CUSTOM_INSTANCE_OPTIONS_MAPPING_END + + TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START + instance + TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END + + CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START + CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_END + + TEMPLATE_METHODS_START + initialize() - Notifies all systems listening that this component initialized. + updateInstance(property) - Updates this object by copying the values of the current object into it's instance object. + updateFromInstance(property) - Updates this object by copying the values of its instance into the current object. + 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 ComponentBufferGeometry extends ComponentGeometry { + + //GENERATED_CONSTRUCTOR_START + constructor(options) { + + if (typeof options === 'undefined') { + options = {}; + } + + if (typeof options.maxDepth === 'undefined') { + options.maxDepth = 0; + } + + if (typeof options.callDepth === 'undefined') { + options.callDepth = 0; + } else { + options.callDepth++; + } + + options.maxDepth = options.callDepth; + + super(options); + + //GENERATED_TEMPLATE_OPTIONS_INIT_START + /** + * instance - Holds the current instance of this object as determined (built) by the runtime object. + */ + if (typeof options.instance === 'undefined') { + options.instance = null; + } + //GENERATED_TEMPLATE_OPTIONS_INIT_END + + //GENERATED_OPTIONS_INIT_START + //GENERATED_OPTIONS_INIT_END + + //GENERATED_REQUIRED_COMPONENTS_START + //GENERATED_REQUIRED_COMPONENTS_END + + //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 { + options.callDepth--; + } + + //CUSTOM_AFTER_INIT_START + //CUSTOM_AFTER_INIT_END + } + //GENERATED_CONSTRUCTOR_END + + //GENERATED_TEMPLATE_METHODS_START + + /** + * initialize() + * - Notifies all systems listening that this component initialized. + */ + initialize() { + + //GENERATED_INITIALIZE_METHOD_START + super.initialize(); + //GENERATED_INITIALIZE_METHOD_END + + //CUSTOM_INITIALIZE_METHOD_START + //CUSTOM_INITIALIZE_METHOD_END + + //GENERATED_INITIALIZE_METHOD_AFTER_START + if (this.initializeDepth === this.maxDepth) { + + if (this instanceof Component && this.initialized) { + this.createInstance(); + } + + if (this instanceof Entity && this.initialized && !this.started) { + this.start(); + } + + } else { + this.initializeDepth++; + } + //GENERATED_INITIALIZE_METHOD_AFTER_END + + } + + /** + * updateInstance() + * - Updates this object by copying the values of the current object into it's instance object. + * @param property + */ + updateInstance(property) { + + //GENERATED_UPDATE_INSTANCE_METHOD_START + this.emit(Event.UPDATE_INSTANCE_BEFORE, this); + + //GENERATED_UPDATE_INSTANCE_OPTIONS_START + //GENERATED_UPDATE_INSTANCE_OPTIONS_END + + //GENERATED_TEMPLATE_UPDATE_INSTANCE_OPTIONS_START + //GENERATED_TEMPLATE_UPDATE_INSTANCE_OPTIONS_END + + this.emit(Event.UPDATE_INSTANCE_AFTER, this); + //GENERATED_UPDATE_INSTANCE_METHOD_END + + //CUSTOM_UPDATE_INSTANCE_METHOD_START + //CUSTOM_UPDATE_INSTANCE_METHOD_END + + //GENERATED_UPDATE_INSTANCE_METHOD_AFTER_START + //GENERATED_UPDATE_INSTANCE_METHOD_AFTER_END + + } + + /** + * updateFromInstance() + * - Updates this object by copying the values of its instance into the current object. + * @param property + */ + updateFromInstance(property) { + + //GENERATED_UPDATE_FROM_INSTANCE_METHOD_START + this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this); + + //GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_START + //GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_END + + //GENERATED_TEMPLATE_UPDATE_FROM_INSTANCE_OPTIONS_START + //GENERATED_TEMPLATE_UPDATE_FROM_INSTANCE_OPTIONS_END + + this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this); + + //GENERATED_UPDATE_FROM_INSTANCE_METHOD_END + + //CUSTOM_UPDATE_FROM_INSTANCE_METHOD_START + //CUSTOM_UPDATE_FROM_INSTANCE_METHOD_END + + //GENERATED_UPDATE_FROM_INSTANCE_METHOD_AFTER_START + //GENERATED_UPDATE_FROM_INSTANCE_METHOD_AFTER_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 = ComponentBufferGeometry; diff --git a/src/r3/r3-component/r3-component-geometry.js b/src/r3/r3-component/r3-component-geometry.js new file mode 100644 index 0000000..d5429d4 --- /dev/null +++ b/src/r3/r3-component/r3-component-geometry.js @@ -0,0 +1,328 @@ +//GENERATED_IMPORTS_START +const Entity = require('../r3-entity/r3-entity.js'); +//GENERATED_IMPORTS_END + +//CUSTOM_IMPORTS_START +//CUSTOM_IMPORTS_END + +const Component = require('../r3-component/r3-component.js'); + +/** + + GENERATED_INHERITED_START + + Class R3.Event.Object.Component.Geometry + [Inherited from Event] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + - async(eventId, data, clientCallback, clientErrorCallback) + Simply calls 'Async()' passing it the arguments + + - emit(eventId, data, clientCallback, clientErrorCallback) + Simply calls 'Emit()' passing it the arguments + + - subscribe(eventId, callback) + Simply calls 'Subscribe()' passing it the arguments + + Inherited Static Methods: + + - Async(eventId, data, clientCallback, clientErrorCallback) + Calls all subscription functions registered to eventId with data, clientCallback and clientErrorCallback as + arguments. If an error occurs during clientCallback it additionally will execute clientErrorCallback with the + error as argument. + + - Emit(eventId, data, clientCallback, clientErrorCallback) + Calls all subscription functions registered to eventId with data as arg. Calls clientCallback directly after + the event result is obtained, passing it the result. If an exception occurs during execution, the + clientErrorCallback is called with the error as argument. + + - Subscribe(eventId, callback) + Subscribes to 'eventName', ex. Event.BEFORE_RENDER and executes 'callback()' when eventName is raised + + [Inherited from R3Object] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from Component] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Belonging to ComponentGeometry] + + Properties: + + + + Static Properties: + + + + Methods: + + + + Static Methods: + + + + GENERATED_INHERITED_END + + TEMPLATE_OPTIONS_START + instance=null - Holds the current instance of this object as determined (built) by the runtime object. + TEMPLATE_OPTIONS_END + + CUSTOM_OPTIONS_START + CUSTOM_OPTIONS_END + + CUSTOM_REQUIRED_COMPONENTS_START + CUSTOM_REQUIRED_COMPONENTS_END + + TEMPLATE_STATIC_OPTIONS_START + TEMPLATE_STATIC_OPTIONS_END + + CUSTOM_STATIC_OPTIONS_START + CUSTOM_STATIC_OPTIONS_END + + TEMPLATE_INSTANCE_OPTIONS_MAPPING_START + TEMPLATE_INSTANCE_OPTIONS_MAPPING_END + + CUSTOM_INSTANCE_OPTIONS_MAPPING_START + CUSTOM_INSTANCE_OPTIONS_MAPPING_END + + TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START + instance + TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END + + CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START + CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_END + + TEMPLATE_METHODS_START + initialize() - Notifies all systems listening that this component initialized. + updateInstance(property) - Updates this object by copying the values of the current object into it's instance object. + updateFromInstance(property) - Updates this object by copying the values of its instance into the current object. + 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 ComponentGeometry extends Component { + + //GENERATED_CONSTRUCTOR_START + constructor(options) { + + if (typeof options === 'undefined') { + options = {}; + } + + if (typeof options.maxDepth === 'undefined') { + options.maxDepth = 0; + } + + if (typeof options.callDepth === 'undefined') { + options.callDepth = 0; + } else { + options.callDepth++; + } + + options.maxDepth = options.callDepth; + + super(options); + + //GENERATED_TEMPLATE_OPTIONS_INIT_START + /** + * instance - Holds the current instance of this object as determined (built) by the runtime object. + */ + if (typeof options.instance === 'undefined') { + options.instance = null; + } + //GENERATED_TEMPLATE_OPTIONS_INIT_END + + //GENERATED_OPTIONS_INIT_START + //GENERATED_OPTIONS_INIT_END + + //GENERATED_REQUIRED_COMPONENTS_START + //GENERATED_REQUIRED_COMPONENTS_END + + //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 { + options.callDepth--; + } + + //CUSTOM_AFTER_INIT_START + //CUSTOM_AFTER_INIT_END + } + //GENERATED_CONSTRUCTOR_END + + //GENERATED_TEMPLATE_METHODS_START + + /** + * initialize() + * - Notifies all systems listening that this component initialized. + */ + initialize() { + + //GENERATED_INITIALIZE_METHOD_START + super.initialize(); + //GENERATED_INITIALIZE_METHOD_END + + //CUSTOM_INITIALIZE_METHOD_START + //CUSTOM_INITIALIZE_METHOD_END + + //GENERATED_INITIALIZE_METHOD_AFTER_START + if (this.initializeDepth === this.maxDepth) { + + if (this instanceof Component && this.initialized) { + this.createInstance(); + } + + if (this instanceof Entity && this.initialized && !this.started) { + this.start(); + } + + } else { + this.initializeDepth++; + } + //GENERATED_INITIALIZE_METHOD_AFTER_END + + } + + /** + * updateInstance() + * - Updates this object by copying the values of the current object into it's instance object. + * @param property + */ + updateInstance(property) { + + //GENERATED_UPDATE_INSTANCE_METHOD_START + this.emit(Event.UPDATE_INSTANCE_BEFORE, this); + + //GENERATED_UPDATE_INSTANCE_OPTIONS_START + //GENERATED_UPDATE_INSTANCE_OPTIONS_END + + //GENERATED_TEMPLATE_UPDATE_INSTANCE_OPTIONS_START + //GENERATED_TEMPLATE_UPDATE_INSTANCE_OPTIONS_END + + this.emit(Event.UPDATE_INSTANCE_AFTER, this); + //GENERATED_UPDATE_INSTANCE_METHOD_END + + //CUSTOM_UPDATE_INSTANCE_METHOD_START + //CUSTOM_UPDATE_INSTANCE_METHOD_END + + //GENERATED_UPDATE_INSTANCE_METHOD_AFTER_START + //GENERATED_UPDATE_INSTANCE_METHOD_AFTER_END + + } + + /** + * updateFromInstance() + * - Updates this object by copying the values of its instance into the current object. + * @param property + */ + updateFromInstance(property) { + + //GENERATED_UPDATE_FROM_INSTANCE_METHOD_START + this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this); + + //GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_START + //GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_END + + //GENERATED_TEMPLATE_UPDATE_FROM_INSTANCE_OPTIONS_START + //GENERATED_TEMPLATE_UPDATE_FROM_INSTANCE_OPTIONS_END + + this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this); + + //GENERATED_UPDATE_FROM_INSTANCE_METHOD_END + + //CUSTOM_UPDATE_FROM_INSTANCE_METHOD_START + //CUSTOM_UPDATE_FROM_INSTANCE_METHOD_END + + //GENERATED_UPDATE_FROM_INSTANCE_METHOD_AFTER_START + //GENERATED_UPDATE_FROM_INSTANCE_METHOD_AFTER_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 = ComponentGeometry; diff --git a/src/r3/r3-component/r3-component-material.js b/src/r3/r3-component/r3-component-material.js index 7d3c48e..ca7f33b 100644 --- a/src/r3/r3-component/r3-component-material.js +++ b/src/r3/r3-component/r3-component-material.js @@ -6,13 +6,12 @@ const Entity = require('../r3-entity/r3-entity.js'); //CUSTOM_IMPORTS_END const Component = require('../r3-component/r3-component.js'); -const ComponentGraphics = require('./r3-component-graphics.js'); /** GENERATED_INHERITED_START - Class R3.Event.Object.Component.Graphics.Material + Class R3.Event.Object.Component.Material [Inherited from Event] Inherited Properties: @@ -69,24 +68,6 @@ const ComponentGraphics = require('./r3-component-graphics.js'); [Inherited from Component] - Inherited Properties: - - - - Inherited Static Properties: - - - - Inherited Methods: - - - - Inherited Static Methods: - - - - [Inherited from ComponentGraphics] - Inherited Properties: @@ -169,7 +150,7 @@ const ComponentGraphics = require('./r3-component-graphics.js'); **/ -class ComponentMaterial extends ComponentGraphics { +class ComponentMaterial extends Component { //GENERATED_CONSTRUCTOR_START constructor(options) { diff --git a/src/r3/r3-component/r3-component-mesh.js b/src/r3/r3-component/r3-component-mesh.js index c7a3a90..f8ef526 100644 --- a/src/r3/r3-component/r3-component-mesh.js +++ b/src/r3/r3-component/r3-component-mesh.js @@ -6,13 +6,12 @@ const Entity = require('../r3-entity/r3-entity.js'); //CUSTOM_IMPORTS_END const Component = require('../r3-component/r3-component.js'); -const ComponentGraphics = require('./r3-component-graphics.js'); /** GENERATED_INHERITED_START - Class R3.Event.Object.Component.Graphics.Mesh + Class R3.Event.Object.Component.Mesh [Inherited from Event] Inherited Properties: @@ -69,24 +68,6 @@ const ComponentGraphics = require('./r3-component-graphics.js'); [Inherited from Component] - Inherited Properties: - - - - Inherited Static Properties: - - - - Inherited Methods: - - - - Inherited Static Methods: - - - - [Inherited from ComponentGraphics] - Inherited Properties: @@ -169,7 +150,7 @@ const ComponentGraphics = require('./r3-component-graphics.js'); **/ -class ComponentMesh extends ComponentGraphics { +class ComponentMesh extends Component { //GENERATED_CONSTRUCTOR_START constructor(options) { diff --git a/src/r3/r3-component/r3-component-plane-geometry.js b/src/r3/r3-component/r3-component-plane-geometry.js new file mode 100644 index 0000000..ae15235 --- /dev/null +++ b/src/r3/r3-component/r3-component-plane-geometry.js @@ -0,0 +1,365 @@ +//GENERATED_IMPORTS_START +const Entity = require('../r3-entity/r3-entity.js'); +//GENERATED_IMPORTS_END + +//CUSTOM_IMPORTS_START +//CUSTOM_IMPORTS_END + +const Component = require('../r3-component/r3-component.js'); +const ComponentBufferGeometry = require('./r3-component-buffer-geometry.js'); + +/** + + GENERATED_INHERITED_START + + Class R3.Event.Object.Component.Geometry.BufferGeometry.PlaneGeometry + [Inherited from Event] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + - async(eventId, data, clientCallback, clientErrorCallback) + Simply calls 'Async()' passing it the arguments + + - emit(eventId, data, clientCallback, clientErrorCallback) + Simply calls 'Emit()' passing it the arguments + + - subscribe(eventId, callback) + Simply calls 'Subscribe()' passing it the arguments + + Inherited Static Methods: + + - Async(eventId, data, clientCallback, clientErrorCallback) + Calls all subscription functions registered to eventId with data, clientCallback and clientErrorCallback as + arguments. If an error occurs during clientCallback it additionally will execute clientErrorCallback with the + error as argument. + + - Emit(eventId, data, clientCallback, clientErrorCallback) + Calls all subscription functions registered to eventId with data as arg. Calls clientCallback directly after + the event result is obtained, passing it the result. If an exception occurs during execution, the + clientErrorCallback is called with the error as argument. + + - Subscribe(eventId, callback) + Subscribes to 'eventName', ex. Event.BEFORE_RENDER and executes 'callback()' when eventName is raised + + [Inherited from R3Object] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from Component] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from ComponentGeometry] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Inherited from ComponentBufferGeometry] + + Inherited Properties: + + + + Inherited Static Properties: + + + + Inherited Methods: + + + + Inherited Static Methods: + + + + [Belonging to ComponentPlaneGeometry] + + Properties: + + + + Static Properties: + + + + Methods: + + + + Static Methods: + + + + GENERATED_INHERITED_END + + TEMPLATE_OPTIONS_START + instance=null - Holds the current instance of this object as determined (built) by the runtime object. + TEMPLATE_OPTIONS_END + + CUSTOM_OPTIONS_START + CUSTOM_OPTIONS_END + + CUSTOM_REQUIRED_COMPONENTS_START + CUSTOM_REQUIRED_COMPONENTS_END + + TEMPLATE_STATIC_OPTIONS_START + TEMPLATE_STATIC_OPTIONS_END + + CUSTOM_STATIC_OPTIONS_START + CUSTOM_STATIC_OPTIONS_END + + TEMPLATE_INSTANCE_OPTIONS_MAPPING_START + TEMPLATE_INSTANCE_OPTIONS_MAPPING_END + + CUSTOM_INSTANCE_OPTIONS_MAPPING_START + CUSTOM_INSTANCE_OPTIONS_MAPPING_END + + TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START + instance + TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END + + CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START + CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_END + + TEMPLATE_METHODS_START + initialize() - Notifies all systems listening that this component initialized. + updateInstance(property) - Updates this object by copying the values of the current object into it's instance object. + updateFromInstance(property) - Updates this object by copying the values of its instance into the current object. + 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 ComponentPlaneGeometry extends ComponentBufferGeometry { + + //GENERATED_CONSTRUCTOR_START + constructor(options) { + + if (typeof options === 'undefined') { + options = {}; + } + + if (typeof options.maxDepth === 'undefined') { + options.maxDepth = 0; + } + + if (typeof options.callDepth === 'undefined') { + options.callDepth = 0; + } else { + options.callDepth++; + } + + options.maxDepth = options.callDepth; + + super(options); + + //GENERATED_TEMPLATE_OPTIONS_INIT_START + /** + * instance - Holds the current instance of this object as determined (built) by the runtime object. + */ + if (typeof options.instance === 'undefined') { + options.instance = null; + } + //GENERATED_TEMPLATE_OPTIONS_INIT_END + + //GENERATED_OPTIONS_INIT_START + //GENERATED_OPTIONS_INIT_END + + //GENERATED_REQUIRED_COMPONENTS_START + //GENERATED_REQUIRED_COMPONENTS_END + + //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 { + options.callDepth--; + } + + //CUSTOM_AFTER_INIT_START + //CUSTOM_AFTER_INIT_END + } + //GENERATED_CONSTRUCTOR_END + + //GENERATED_TEMPLATE_METHODS_START + + /** + * initialize() + * - Notifies all systems listening that this component initialized. + */ + initialize() { + + //GENERATED_INITIALIZE_METHOD_START + super.initialize(); + //GENERATED_INITIALIZE_METHOD_END + + //CUSTOM_INITIALIZE_METHOD_START + //CUSTOM_INITIALIZE_METHOD_END + + //GENERATED_INITIALIZE_METHOD_AFTER_START + if (this.initializeDepth === this.maxDepth) { + + if (this instanceof Component && this.initialized) { + this.createInstance(); + } + + if (this instanceof Entity && this.initialized && !this.started) { + this.start(); + } + + } else { + this.initializeDepth++; + } + //GENERATED_INITIALIZE_METHOD_AFTER_END + + } + + /** + * updateInstance() + * - Updates this object by copying the values of the current object into it's instance object. + * @param property + */ + updateInstance(property) { + + //GENERATED_UPDATE_INSTANCE_METHOD_START + this.emit(Event.UPDATE_INSTANCE_BEFORE, this); + + //GENERATED_UPDATE_INSTANCE_OPTIONS_START + //GENERATED_UPDATE_INSTANCE_OPTIONS_END + + //GENERATED_TEMPLATE_UPDATE_INSTANCE_OPTIONS_START + //GENERATED_TEMPLATE_UPDATE_INSTANCE_OPTIONS_END + + this.emit(Event.UPDATE_INSTANCE_AFTER, this); + //GENERATED_UPDATE_INSTANCE_METHOD_END + + //CUSTOM_UPDATE_INSTANCE_METHOD_START + //CUSTOM_UPDATE_INSTANCE_METHOD_END + + //GENERATED_UPDATE_INSTANCE_METHOD_AFTER_START + //GENERATED_UPDATE_INSTANCE_METHOD_AFTER_END + + } + + /** + * updateFromInstance() + * - Updates this object by copying the values of its instance into the current object. + * @param property + */ + updateFromInstance(property) { + + //GENERATED_UPDATE_FROM_INSTANCE_METHOD_START + this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this); + + //GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_START + //GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_END + + //GENERATED_TEMPLATE_UPDATE_FROM_INSTANCE_OPTIONS_START + //GENERATED_TEMPLATE_UPDATE_FROM_INSTANCE_OPTIONS_END + + this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this); + + //GENERATED_UPDATE_FROM_INSTANCE_METHOD_END + + //CUSTOM_UPDATE_FROM_INSTANCE_METHOD_START + //CUSTOM_UPDATE_FROM_INSTANCE_METHOD_END + + //GENERATED_UPDATE_FROM_INSTANCE_METHOD_AFTER_START + //GENERATED_UPDATE_FROM_INSTANCE_METHOD_AFTER_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 = ComponentPlaneGeometry; diff --git a/src/r3/r3-component/r3-component-texture.js b/src/r3/r3-component/r3-component-texture.js index d9596ea..3fa00ef 100644 --- a/src/r3/r3-component/r3-component-texture.js +++ b/src/r3/r3-component/r3-component-texture.js @@ -6,13 +6,12 @@ const Entity = require('../r3-entity/r3-entity.js'); //CUSTOM_IMPORTS_END const Component = require('../r3-component/r3-component.js'); -const ComponentGraphics = require('./r3-component-graphics.js'); /** GENERATED_INHERITED_START - Class R3.Event.Object.Component.Graphics.Texture + Class R3.Event.Object.Component.Texture [Inherited from Event] Inherited Properties: @@ -69,24 +68,6 @@ const ComponentGraphics = require('./r3-component-graphics.js'); [Inherited from Component] - Inherited Properties: - - - - Inherited Static Properties: - - - - Inherited Methods: - - - - Inherited Static Methods: - - - - [Inherited from ComponentGraphics] - Inherited Properties: @@ -169,7 +150,7 @@ const ComponentGraphics = require('./r3-component-graphics.js'); **/ -class ComponentTexture extends ComponentGraphics { +class ComponentTexture extends Component { //GENERATED_CONSTRUCTOR_START constructor(options) { diff --git a/src/r3/r3-component/r3-component.js b/src/r3/r3-component/r3-component.js index a184bda..413295b 100644 --- a/src/r3/r3-component/r3-component.js +++ b/src/r3/r3-component/r3-component.js @@ -329,14 +329,17 @@ class Component extends R3Object { Component.CODE = 0x0; Component.DOM = 0x1; Component.CANVAS = 0x2; -Component.GRAPHICS = 0x3; -Component.IMAGE = 0x4; -Component.MATERIAL = 0x5; -Component.MESH = 0x6; -Component.TEXTURE = 0x7; +Component.GEOMETRY = 0x3; +Component.BUFFER_GEOMETRY = 0x4; +Component.PLANE_GEOMETRY = 0x5; +Component.GRAPHICS = 0x6; +Component.IMAGE = 0x7; Component.INPUT = 0x8; Component.TOUCH = 0x9; -Component.MAX_COMPONENT = 0xa; +Component.MATERIAL = 0xa; +Component.MESH = 0xb; +Component.TEXTURE = 0xc; +Component.MAX_COMPONENT = 0xd; //GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END //CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START diff --git a/src/r3/r3-object/index.js b/src/r3/r3-object/index.js index 56a3aa1..2e48e30 100644 --- a/src/r3/r3-object/index.js +++ b/src/r3/r3-object/index.js @@ -7,13 +7,16 @@ const Component = require('../r3-component/r3-component.js'); const ComponentCode = require('../r3-component/r3-component-code.js'); const ComponentDOM = require('../r3-component/r3-component-d-o-m.js'); const ComponentCanvas = require('../r3-component/r3-component-canvas.js'); +const ComponentGeometry = require('../r3-component/r3-component-geometry.js'); +const ComponentBufferGeometry = require('../r3-component/r3-component-buffer-geometry.js'); +const ComponentPlaneGeometry = require('../r3-component/r3-component-plane-geometry.js'); const ComponentGraphics = require('../r3-component/r3-component-graphics.js'); const ComponentImage = require('../r3-component/r3-component-image.js'); +const ComponentInput = require('../r3-component/r3-component-input.js'); +const ComponentTouch = require('../r3-component/r3-component-touch.js'); const ComponentMaterial = require('../r3-component/r3-component-material.js'); const ComponentMesh = require('../r3-component/r3-component-mesh.js'); const ComponentTexture = require('../r3-component/r3-component-texture.js'); -const ComponentInput = require('../r3-component/r3-component-input.js'); -const ComponentTouch = require('../r3-component/r3-component-touch.js'); //GENERATED_IMPORTS_END //GENERATED_INDEX_BODY_START @@ -24,13 +27,16 @@ R3Object.Component = Component; R3Object.Component.Code = ComponentCode; R3Object.Component.DOM = ComponentDOM; R3Object.Component.DOM.Canvas = ComponentCanvas; +R3Object.Component.Geometry = ComponentGeometry; +R3Object.Component.Geometry.BufferGeometry = ComponentBufferGeometry; +R3Object.Component.Geometry.BufferGeometry.PlaneGeometry = ComponentPlaneGeometry; R3Object.Component.Graphics = ComponentGraphics; R3Object.Component.Graphics.Image = ComponentImage; -R3Object.Component.Graphics.Material = ComponentMaterial; -R3Object.Component.Graphics.Mesh = ComponentMesh; -R3Object.Component.Graphics.Texture = ComponentTexture; R3Object.Component.Input = ComponentInput; R3Object.Component.Input.Touch = ComponentTouch; +R3Object.Component.Material = ComponentMaterial; +R3Object.Component.Mesh = ComponentMesh; +R3Object.Component.Texture = ComponentTexture; //GENERATED_INDEX_BODY_END //GENERATED_EXPORTS_START diff --git a/src/r3/r3-object/r3-object.js b/src/r3/r3-object/r3-object.js index 6c88778..ef131ec 100644 --- a/src/r3/r3-object/r3-object.js +++ b/src/r3/r3-object/r3-object.js @@ -360,14 +360,17 @@ R3Object.COMPONENT = 0x3; R3Object.COMPONENT_CODE = 0x4; R3Object.COMPONENT_DOM = 0x5; R3Object.COMPONENT_CANVAS = 0x6; -R3Object.COMPONENT_GRAPHICS = 0x7; -R3Object.COMPONENT_IMAGE = 0x8; -R3Object.COMPONENT_MATERIAL = 0x9; -R3Object.COMPONENT_MESH = 0xa; -R3Object.COMPONENT_TEXTURE = 0xb; +R3Object.COMPONENT_GEOMETRY = 0x7; +R3Object.COMPONENT_BUFFER_GEOMETRY = 0x8; +R3Object.COMPONENT_PLANE_GEOMETRY = 0x9; +R3Object.COMPONENT_GRAPHICS = 0xa; +R3Object.COMPONENT_IMAGE = 0xb; R3Object.COMPONENT_INPUT = 0xc; R3Object.COMPONENT_TOUCH = 0xd; -R3Object.MAX_R3OBJECT = 0xe; +R3Object.COMPONENT_MATERIAL = 0xe; +R3Object.COMPONENT_MESH = 0xf; +R3Object.COMPONENT_TEXTURE = 0x10; +R3Object.MAX_R3OBJECT = 0x11; //GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END //CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START diff --git a/src/templates/token.db b/src/templates/token.db index 21a675e..4bfdfae 100644 --- a/src/templates/token.db +++ b/src/templates/token.db @@ -136,7 +136,6 @@ CUSTOM_STATIC_ON_COMPONENT_INITIALIZED_METHOD CUSTOM_STATIC_ON_CREATE_INSTANCE_BEFORE_METHOD CUSTOM_STATIC_ON_DOM_COMPONENT_INITIALIZED_METHOD CUSTOM_STATIC_ON_ENTITY_INITIALIZED_METHOD -CUSTOM_STATIC_ON_ENTITY_PROPERTY_UPDATED_METHOD CUSTOM_STATIC_ON_GET_API_URL_METHOD CUSTOM_STATIC_ON_GET_RUNTIME_METHOD CUSTOM_STATIC_ON_IMAGE_INSTANCE_CREATED_METHOD diff --git a/test/R3.test.js b/test/R3.test.js index 609de29..774c6e0 100644 --- a/test/R3.test.js +++ b/test/R3.test.js @@ -5,13 +5,16 @@ const Event = require('../src/r3/r3-event.js'); const ComponentCode = require('../src/r3/r3-component/./r3-component-code.js'); const ComponentDOM = require('../src/r3/r3-component/./r3-component-d-o-m.js'); const ComponentCanvas = require('../src/r3/r3-component/./r3-component-canvas.js'); +const ComponentGeometry = require('../src/r3/r3-component/./r3-component-geometry.js'); +const ComponentBufferGeometry = require('../src/r3/r3-component/./r3-component-buffer-geometry.js'); +const ComponentPlaneGeometry = require('../src/r3/r3-component/./r3-component-plane-geometry.js'); const ComponentGraphics = require('../src/r3/r3-component/./r3-component-graphics.js'); const ComponentImage = require('../src/r3/r3-component/./r3-component-image.js'); +const ComponentInput = require('../src/r3/r3-component/./r3-component-input.js'); +const ComponentTouch = require('../src/r3/r3-component/./r3-component-touch.js'); const ComponentMaterial = require('../src/r3/r3-component/./r3-component-material.js'); const ComponentMesh = require('../src/r3/r3-component/./r3-component-mesh.js'); const ComponentTexture = require('../src/r3/r3-component/./r3-component-texture.js'); -const ComponentInput = require('../src/r3/r3-component/./r3-component-input.js'); -const ComponentTouch = require('../src/r3/r3-component/./r3-component-touch.js'); //GENERATED_COMPONENT_IMPORTS_END //GENERATED_ENTITY_IMPORTS_START @@ -66,13 +69,16 @@ describe('R3 Tests', () => { const componentCode = new ComponentCode(); const componentDOM = new ComponentDOM(); const componentCanvas = new ComponentCanvas(); + const componentGeometry = new ComponentGeometry(); + const componentBufferGeometry = new ComponentBufferGeometry(); + const componentPlaneGeometry = new ComponentPlaneGeometry(); const componentGraphics = new ComponentGraphics(); const componentImage = new ComponentImage(); + const componentInput = new ComponentInput(); + const componentTouch = new ComponentTouch(); const componentMaterial = new ComponentMaterial(); const componentMesh = new ComponentMesh(); const componentTexture = new ComponentTexture(); - const componentInput = new ComponentInput(); - const componentTouch = new ComponentTouch(); //GENERATED_COMPONENT_CREATE_END } @@ -126,5 +132,18 @@ describe('R3 Tests', () => { } ); + it ( + 'Linking system calls createInstance() in the right order', + () => { + + const project = new Project(); + const canvas = new ComponentCanvas(); + const slider = new EntitySlider(); + const touch = new ComponentTouch(); + const texture = new ComponentTexture(); + + } + ); + }); diff --git a/version b/version index 4bdfb57..cedec8b 100644 --- a/version +++ b/version @@ -1 +1 @@ -3.0.207 \ No newline at end of file +3.0.214 \ No newline at end of file