lots of refactorings - runtime system generation
parent
9b9691a248
commit
ef662c8458
72
.r3_history
72
.r3_history
|
@ -1,50 +1,52 @@
|
|||
r3 create R3 base ./
|
||||
r3 create Event base ./
|
||||
r3 create Graph base ./
|
||||
r3 create Node base ./
|
||||
r3 create Utils base ./
|
||||
r3 create R3Object object_base ./r3-object/
|
||||
r3 create Project object_extends R3Object ./r3-object/
|
||||
r3 create Component component_base ./r3-component/
|
||||
r3 create ComponentCanvas component_extends ComponentDOM ./r3-component/
|
||||
r3 create ComponentDOM component_extends Component ./r3-component/
|
||||
r3 create ComponentGraphics component_extends Component ./r3-component/
|
||||
r3 create ComponentImage component_extends ComponentGraphics ./r3-component/
|
||||
r3 create ComponentInput component_extends Component ./r3-component/
|
||||
r3 create ComponentMaterial component_extends ComponentGraphics ./r3-component/
|
||||
r3 create ComponentMesh component_extends ComponentGraphics ./r3-component/
|
||||
r3 create ComponentTexture component_extends ComponentGraphics ./r3-component/
|
||||
r3 create ComponentTouch component_extends ComponentInput ./r3-component/
|
||||
r3 create ComponentCode component_extends Component ./r3-component/ RuntimeCode
|
||||
r3 create ComponentCodeJS component_extends ComponentCode ./r3-component/ RuntimeCode
|
||||
r3 create ComponentDOM component_extends Component ./r3-component/ RuntimeDOM
|
||||
r3 create ComponentGraphics component_extends Component ./r3-component/ RuntimeGraphics
|
||||
r3 create ComponentInput component_extends Component ./r3-component/ RuntimeDOM
|
||||
r3 create ComponentDOMImage component_extends ComponentDOM ./r3-component/ RuntimeDOM
|
||||
r3 create ComponentDOMCanvas component_extends ComponentDOM ./r3-component/ RuntimeDOM
|
||||
r3 create ComponentGraphicsGeometry component_extends ComponentGraphics ./r3-component/ RuntimeGraphics
|
||||
r3 create ComponentGraphicsImage component_extends ComponentGraphics ./r3-component/ RuntimeGraphics
|
||||
r3 create ComponentGraphicsGeometryBuffer component_extends ComponentGraphicsGeometry ./r3-component/ RuntimeGraphics
|
||||
r3 create ComponentGraphicsGeometryBufferPlane component_extends ComponentGraphicsGeometryBuffer ./r3-component/ RuntimeGraphics
|
||||
r3 create ComponentGraphicsMaterial component_extends ComponentGraphics ./r3-component/ RuntimeGraphics
|
||||
r3 create ComponentGraphicsMesh component_extends ComponentGraphics ./r3-component/ RuntimeGraphics
|
||||
r3 create ComponentGraphicsTexture component_extends ComponentGraphics ./r3-component/ RuntimeGraphics
|
||||
r3 create ComponentInputTouch component_extends ComponentInput ./r3-component/ RuntimeDOM
|
||||
r3 create Entity entity_base ./r3-entity/
|
||||
r3 create EntitySlider entity_extends Entity ./r3-entity/
|
||||
r3 create Event base ./
|
||||
r3 create Project object_extends R3Object ./r3-object/
|
||||
r3 create R3 base ./
|
||||
r3 create RuntimeBullet runtime_extends RuntimePhysics ./r3-runtime/
|
||||
r3 create RuntimeCodeMirror runtime_extends RuntimeCoder ./r3-runtime/
|
||||
r3 create Runtime base ./r3-runtime/
|
||||
r3 create RuntimeAudio runtime_base ./r3-runtime/
|
||||
r3 create RuntimeAudioThree runtime_extends RuntimeAudio ./r3-runtime/ ClientSide
|
||||
r3 create RuntimeCode runtime_base ./r3-runtime/
|
||||
r3 create RuntimeCodeJS runtime_extends RuntimeCode ./r3-runtime/ ClientServerSide Default
|
||||
r3 create RuntimeCoder runtime_base ./r3-runtime/
|
||||
r3 create RuntimeControlKit runtime_extends RuntimeGUI ./r3-runtime/
|
||||
r3 create RuntimeDOM runtime_base ./r3-runtime/
|
||||
r3 create RuntimeCoderCodeMirror runtime_extends RuntimeCoder ./r3-runtime/ ClientSide Default
|
||||
r3 create RuntimeGUI runtime_base ./r3-runtime/
|
||||
r3 create RuntimeGUIControlKit runtime_extends RuntimeGUI ./r3-runtime/ ClientSide Default
|
||||
r3 create RuntimeDOM runtime_base ./r3-runtime/
|
||||
r3 create RuntimeDOMJS runtime_extends RuntimeDOM ./r3-runtime/ ServerSide Default
|
||||
r3 create RuntimeDOMWeb runtime_extends RuntimeDOM ./r3-runtime/ ClientSide Default
|
||||
r3 create RuntimeGraphics runtime_base ./r3-runtime/
|
||||
r3 create RuntimeGraphicsThree runtime_extends RuntimeGraphics ./r3-runtime/ ClientSide Default
|
||||
r3 create RuntimePhysics runtime_base ./r3-runtime/
|
||||
r3 create RuntimePhysicsBullet runtime_extends RuntimePhysics ./r3-runtime/ ServerSide Default
|
||||
r3 create RuntimeSocket runtime_base ./r3-runtime/
|
||||
r3 create RuntimeStatistics runtime_base ./r3-runtime/
|
||||
r3 create RuntimeStats runtime_extends RuntimeStatistics ./r3-runtime/
|
||||
r3 create RuntimeThree runtime_extends RuntimeGraphics ./r3-runtime/
|
||||
r3 create RuntimeStatisticsStats runtime_extends RuntimeStatistics ./r3-runtime/ ClientSide Default
|
||||
r3 create System system_base ./r3-system/
|
||||
r3 create SystemDOM system_extends System ./r3-system/
|
||||
r3 create SystemInput system_extends System ./r3-system/
|
||||
r3 create SystemLinking system_extends System ./r3-system/
|
||||
r3 create SystemRender system_extends System ./r3-system/
|
||||
r3 create SystemRuntime system_extends System ./r3-system/
|
||||
r3 create SystemSocket system_extends System ./r3-system/
|
||||
r3 create Utils base ./
|
||||
r3 create SystemRender system_extends System ./r3-system/
|
||||
r3 create SystemStorage system_extends System ./r3-system/
|
||||
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/
|
||||
r3 create Graph base ./
|
||||
r3 create Node base ./
|
||||
r3 create RuntimeJSDOM runtime_extends RuntimeDOM ./r3-runtime/
|
||||
r3 create RuntimeWebDOM runtime_extends RuntimeDOM ./r3-runtime/
|
||||
r3 create ComponentTest component_extends ComponentDOM ./r3-component/ RuntimeDOM
|
||||
r3 create SystemStorage system_extends System ./r3-system/
|
||||
|
|
|
@ -1,6 +1,57 @@
|
|||
//GENERATED_IMPORTS_START
|
||||
const R3 = require('./r3.js');
|
||||
const System = require('./r3-system/');
|
||||
const Runtime = require('./r3-runtime/');
|
||||
const Event = require('./r3-event.js');
|
||||
const Graph = require('./r3-graph.js');
|
||||
const Node = require('./r3-node.js');
|
||||
const Utils = require('./r3-utils.js');
|
||||
const R3Object = require('./r3-object/');
|
||||
const Project = require('./r3-object/r3-project.js');
|
||||
const Entity = require('./r3-entity/');
|
||||
const Component = require('./r3-component/');
|
||||
//GENERATED_IMPORTS_END
|
||||
|
||||
R3.System.Linking.start();
|
||||
R3.System.Socket.start();
|
||||
//GENERATED_DEFINES_START
|
||||
R3.System = System;
|
||||
R3.Runtime = Runtime;
|
||||
R3.Event = Event;
|
||||
R3.Graph = Graph;
|
||||
R3.Node = Node;
|
||||
R3.Utils = Utils;
|
||||
R3.Object = R3Object;
|
||||
R3.Project = Project;
|
||||
R3.Entity = Entity;
|
||||
R3.Component = Component;
|
||||
R3.JS = R3Object.Component.Code.JS;
|
||||
R3.Canvas = R3Object.Component.DOM.Canvas;
|
||||
R3.DOM = R3Object.Component.DOM;
|
||||
R3.DOM.Image = R3Object.Component.DOM.Image;
|
||||
R3.Plane = R3Object.Component.Graphics.Geometry.Buffer.Plane;
|
||||
R3.Graphics = R3Object.Component.Graphics;
|
||||
R3.Graphics.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;
|
||||
//GENERATED_DEFINES_END
|
||||
|
||||
//CUSTOM_DEFINES_START
|
||||
//CUSTOM_DEFINES_END
|
||||
|
||||
//GENERATED_SOURCE_START
|
||||
//GENERATED_SOURCE_END
|
||||
|
||||
console.log('r3.js - version ' + R3.Version + ' compiled ' + R3.CompileDate);
|
||||
|
||||
//GENERATED_SYSTEM_START
|
||||
R3.System.DOM.Start();
|
||||
R3.System.Input.Start();
|
||||
R3.System.Linking.Start();
|
||||
R3.System.Render.Start();
|
||||
R3.System.Runtime.Start();
|
||||
R3.System.Socket.Start();
|
||||
R3.System.Storage.Start();
|
||||
//GENERATED_SYSTEM_END
|
||||
|
||||
module.exports = R3;
|
||||
|
|
|
@ -1,172 +0,0 @@
|
|||
const Event = require('r3-event');
|
||||
const Utils = require('r3-utils');
|
||||
const R3Object = require('r3-r3-object.js');
|
||||
|
||||
/**
|
||||
|
||||
OPTIONS_START
|
||||
runtime='default'
|
||||
OPTIONS_END
|
||||
|
||||
INSTANCE_OPTIONS_MAPPING_START
|
||||
INSTANCE_OPTIONS_MAPPING_END
|
||||
|
||||
LINKED_OBJECTS_START
|
||||
LINKED_OBJECTS_END
|
||||
|
||||
EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
runtime
|
||||
EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
**/
|
||||
|
||||
class Component extends R3Object {
|
||||
|
||||
//CONSTRUCTOR_EXTENDS_TEMPLATE_START
|
||||
constructor(options) {
|
||||
|
||||
if (Utils.UndefinedOrNull(options)) {
|
||||
options = {};
|
||||
}
|
||||
|
||||
super(options);
|
||||
|
||||
this.emit(Event.OBJECT_CREATED, this);
|
||||
|
||||
//OPTIONS_INIT_START
|
||||
if (typeof options === 'undefined') {
|
||||
options = {};
|
||||
}
|
||||
if (Utils.UndefinedOrNull(options.runtime)) {
|
||||
options.runtime = 'default';
|
||||
}
|
||||
//OPTIONS_INIT_END
|
||||
|
||||
//CUSTOM_OPTIONS_INIT_START
|
||||
//CUSTOM_OPTIONS_INIT_END
|
||||
|
||||
Object.assign(this, options);
|
||||
|
||||
//CUSTOM_BEFORE_INIT_START
|
||||
this.emit(Event.COMPONENT_INITIALIZED, this);
|
||||
//CUSTOM_BEFORE_INIT_END
|
||||
|
||||
this.emit(Event.OBJECT_INITIALIZED, this);
|
||||
}
|
||||
//CONSTRUCTOR_EXTENDS_TEMPLATE_END
|
||||
|
||||
//CREATE_INSTANCE_TEMPLATE_START
|
||||
createInstance() {
|
||||
|
||||
//CREATE_INSTANCE_BEFORE_START
|
||||
this.emit(Event.CREATE_INSTANCE_BEFORE, this);
|
||||
//CREATE_INSTANCE_BEFORE_END
|
||||
|
||||
//CUSTOM_CREATE_INSTANCE_START
|
||||
//CUSTOM_CREATE_INSTANCE_END
|
||||
|
||||
//CREATE_INSTANCE_AFTER_START
|
||||
this[this.runtime].createInstance(
|
||||
this,
|
||||
{
|
||||
//CREATE_INSTANCE_OPTIONS_START
|
||||
//CREATE_INSTANCE_OPTIONS_END
|
||||
}
|
||||
)
|
||||
|
||||
this.emit(Event.INSTANCE_CREATED, this);
|
||||
//CREATE_INSTANCE_AFTER_END
|
||||
|
||||
}
|
||||
//CREATE_INSTANCE_TEMPLATE_END
|
||||
|
||||
//UPDATE_INSTANCE_TEMPLATE_START
|
||||
updateInstance(property) {
|
||||
|
||||
//UPDATE_INSTANCE_BEFORE_START
|
||||
this.emit(Event.UPDATE_INSTANCE_BEFORE, this);
|
||||
//UPDATE_INSTANCE_BEFORE_END
|
||||
|
||||
//UPDATE_INSTANCE_OPTIONS_START
|
||||
//UPDATE_INSTANCE_OPTIONS_END
|
||||
|
||||
//CUSTOM_UPDATE_INSTANCE_START
|
||||
//CUSTOM_UPDATE_INSTANCE_END
|
||||
|
||||
//UPDATE_INSTANCE_AFTER_START
|
||||
this.emit(Event.UPDATE_INSTANCE_AFTER, this);
|
||||
//UPDATE_INSTANCE_AFTER_END
|
||||
|
||||
}
|
||||
//UPDATE_INSTANCE_TEMPLATE_END
|
||||
|
||||
//UPDATE_FROM_INSTANCE_TEMPLATE_START
|
||||
updateFromInstance(property) {
|
||||
|
||||
//UPDATE_FROM_INSTANCE_BEFORE_START
|
||||
this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this);
|
||||
//UPDATE_FROM_INSTANCE_BEFORE_END
|
||||
|
||||
//UPDATE_FROM_INSTANCE_OPTIONS_START
|
||||
//UPDATE_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
//CUSTOM_UPDATE_FROM_INSTANCE_START
|
||||
//CUSTOM_UPDATE_FROM_INSTANCE_END
|
||||
|
||||
//UPDATE_FROM_INSTANCE_AFTER_START
|
||||
this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this);
|
||||
//UPDATE_FROM_INSTANCE_AFTER_END
|
||||
|
||||
}
|
||||
//UPDATE_FROM_INSTANCE_TEMPLATE_END
|
||||
|
||||
//DISPOSE_TEMPLATE_START
|
||||
dispose() {
|
||||
|
||||
//DISPOSE_BEFORE_START
|
||||
this.subscribe(
|
||||
Event.INSTANCE_DISPOSED,
|
||||
function(object) {
|
||||
if (object === this) {
|
||||
this.emit(Event.DISPOSE_OBJECT, this);
|
||||
}
|
||||
}
|
||||
);
|
||||
//DISPOSE_BEFORE_END
|
||||
|
||||
//CUSTOM_DISPOSE_START
|
||||
//CUSTOM_DISPOSE_END
|
||||
|
||||
//DISPOSE_AFTER_START
|
||||
this.disposeInstance();
|
||||
//DISPOSE_AFTER_END
|
||||
|
||||
}
|
||||
//DISPOSE_TEMPLATE_END
|
||||
|
||||
//DISPOSE_INSTANCE_TEMPLATE_START
|
||||
disposeInstance() {
|
||||
|
||||
//DISPOSE_INSTANCE_BEFORE_START
|
||||
console.log('Disposing instance of ' + this.name);
|
||||
//DISPOSE_INSTANCE_BEFORE_END
|
||||
|
||||
//CUSTOM_DISPOSE_INSTANCE_START
|
||||
//CUSTOM_DISPOSE_INSTANCE_END
|
||||
|
||||
//DISPOSE_INSTANCE_AFTER_START
|
||||
this.emit(Event.DISPOSE_INSTANCE, this);
|
||||
//DISPOSE_INSTANCE_AFTER_END
|
||||
|
||||
}
|
||||
//DISPOSE_INSTANCE_TEMPLATE_END
|
||||
|
||||
//CUSTOM_IMPLEMENTATION_START
|
||||
//CUSTOM_IMPLEMENTATION_END
|
||||
|
||||
}
|
||||
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
module.exports = Component;
|
|
@ -1,24 +1,62 @@
|
|||
const Utils = require('r3-utils');
|
||||
//GENERATED_IMPORTS_START
|
||||
//GENERATED_IMPORTS_END
|
||||
|
||||
//CUSTOM_IMPORTS_START
|
||||
const Utils = require('./r3-utils.js');
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
/**
|
||||
|
||||
OPTIONS_START
|
||||
OPTIONS_END
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
TEMPLATE_STATIC_OPTIONS_START
|
||||
TEMPLATE_STATIC_OPTIONS_END
|
||||
|
||||
CUSTOM_STATIC_OPTIONS_START
|
||||
CUSTOM_STATIC_OPTIONS_END
|
||||
|
||||
TEMPLATE_METHODS_START
|
||||
TEMPLATE_METHODS_END
|
||||
|
||||
CUSTOM_METHODS_START
|
||||
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
|
||||
CUSTOM_METHODS_END
|
||||
|
||||
TEMPLATE_STATIC_METHODS_START
|
||||
TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
CUSTOM_STATIC_METHODS_START
|
||||
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 @return {Object} - A handle to the subscription which can be removed by calling handle.remove()
|
||||
CUSTOM_STATIC_METHODS_END
|
||||
|
||||
**/
|
||||
|
||||
class Event {
|
||||
|
||||
//CONSTRUCTOR_TEMPLATE_START
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
||||
Event.Emit(Event.OBJECT_CREATED, this);
|
||||
|
||||
//OPTIONS_INIT_START
|
||||
if (typeof options === 'undefined') {
|
||||
options = {};
|
||||
options = {};
|
||||
}
|
||||
//OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
//CUSTOM_OPTIONS_INIT_START
|
||||
//CUSTOM_OPTIONS_INIT_END
|
||||
|
@ -28,150 +66,130 @@ class Event {
|
|||
//CUSTOM_BEFORE_INIT_START
|
||||
//CUSTOM_BEFORE_INIT_END
|
||||
|
||||
Event.Emit(Event.OBJECT_INITIALIZED, this);
|
||||
//CUSTOM_AFTER_INIT_START
|
||||
//CUSTOM_AFTER_INIT_END
|
||||
}
|
||||
//CONSTRUCTOR_TEMPLATE_END
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
||||
//CUSTOM_IMPLEMENTATION_START
|
||||
//GENERATED_TEMPLATE_METHODS_START
|
||||
//GENERATED_TEMPLATE_METHODS_END
|
||||
|
||||
/**
|
||||
* Some nice Events handling
|
||||
* @type {{}}
|
||||
*/
|
||||
static Subscriptions = {};
|
||||
//GENERATED_METHODS_START
|
||||
|
||||
static Subscribe(
|
||||
eventName,
|
||||
fn
|
||||
) {
|
||||
/**
|
||||
* Todo - maybe eventually store a boolean which indicates if the function has been executed
|
||||
*/
|
||||
let subscriptionId = Utils.RandomId(10);
|
||||
/**
|
||||
* async()
|
||||
* - Simply calls 'Async()' passing it the arguments
|
||||
* @param eventId
|
||||
* @param data
|
||||
* @param clientCallback
|
||||
* @param clientErrorCallback
|
||||
*/
|
||||
async(
|
||||
eventId,
|
||||
data,
|
||||
clientCallback,
|
||||
clientErrorCallback
|
||||
) {
|
||||
|
||||
if (Event.Subscriptions.hasOwnProperty(eventName)) {
|
||||
//GENERATED_ASYNC_METHOD_START
|
||||
//GENERATED_ASYNC_METHOD_END
|
||||
|
||||
if (Event.Subscriptions[eventName][subscriptionId]) {
|
||||
throw new Error('A component can only subscribe to a particular event ID once');
|
||||
}
|
||||
|
||||
Event.Subscriptions[eventName][subscriptionId] = fn;
|
||||
} else {
|
||||
Event.Subscriptions[eventName] = {};
|
||||
Event.Subscriptions[eventName][subscriptionId] = fn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a handle to the caller to allow us to unsubscribe to this event
|
||||
*/
|
||||
return {
|
||||
fn: fn,
|
||||
remove: function (eventId, subscriptionId) {
|
||||
|
||||
return function () {
|
||||
|
||||
/**
|
||||
* Stop listening for this event from this component
|
||||
*/
|
||||
delete Event.Subscriptions[eventId][subscriptionId];
|
||||
|
||||
/**
|
||||
* If the length of listeners is 0, stop referencing this event
|
||||
* @type {string[]}
|
||||
*/
|
||||
let listeners = Object.keys(Event.Subscriptions[eventId]);
|
||||
if (listeners.length === 0) {
|
||||
delete Event.Subscriptions[eventId];
|
||||
}
|
||||
}
|
||||
|
||||
}(eventName, subscriptionId),
|
||||
subscriptionId : subscriptionId
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Subscribe to some events
|
||||
* @param eventName
|
||||
* @param callback
|
||||
*/
|
||||
subscribe(
|
||||
eventName,
|
||||
callback
|
||||
) {
|
||||
return Event.Subscribe(eventName, callback.bind(this));
|
||||
};
|
||||
|
||||
/**
|
||||
* Static Synchronous Event - Calls clientCallback directly after the event result is obtained
|
||||
* @param eventId
|
||||
* @param data
|
||||
* @param clientCallback is executed ideally when the event completed
|
||||
* @param clientErrorCallback
|
||||
* @returns {number} of callbacks executed
|
||||
* @constructor
|
||||
*/
|
||||
static Emit(
|
||||
eventId,
|
||||
data,
|
||||
clientCallback,
|
||||
clientErrorCallback
|
||||
) {
|
||||
if (Event.Subscriptions.hasOwnProperty(eventId)) {
|
||||
|
||||
let subscriptionIds = Object.keys(Event.Subscriptions[eventId]);
|
||||
|
||||
subscriptionIds.map(
|
||||
function(subscriptionId) {
|
||||
try {
|
||||
let result = Event.Subscriptions[eventId][subscriptionId](data);
|
||||
|
||||
if (clientCallback) {
|
||||
clientCallback(result);
|
||||
}
|
||||
} catch (error) {
|
||||
if (clientErrorCallback) {
|
||||
clientErrorCallback(error);
|
||||
} else {
|
||||
console.error(error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
emit(
|
||||
eventName,
|
||||
data,
|
||||
clientCallback,
|
||||
clientErrorCallback
|
||||
) {
|
||||
return Event.Emit(
|
||||
eventName,
|
||||
//CUSTOM_ASYNC_METHOD_START
|
||||
return Event.Async(
|
||||
eventId,
|
||||
data,
|
||||
clientCallback,
|
||||
clientErrorCallback
|
||||
);
|
||||
}
|
||||
//CUSTOM_ASYNC_METHOD_END
|
||||
|
||||
/**
|
||||
* Execute the functions which subscribe to this event, but don't process the client callback - the subscription function
|
||||
* should execute the client callback
|
||||
* @param eventId
|
||||
* @param data
|
||||
* @param clientCallback
|
||||
* @param clientErrorCallback
|
||||
* @returns {number}
|
||||
* @constructor
|
||||
*/
|
||||
static Async(
|
||||
eventId,
|
||||
data,
|
||||
clientCallback,
|
||||
clientErrorCallback
|
||||
) {
|
||||
//GENERATED_ASYNC_METHOD_AFTER_START
|
||||
//GENERATED_ASYNC_METHOD_AFTER_END
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* emit()
|
||||
* - Simply calls 'Emit()' passing it the arguments
|
||||
* @param eventId
|
||||
* @param data
|
||||
* @param clientCallback
|
||||
* @param clientErrorCallback
|
||||
*/
|
||||
emit(
|
||||
eventId,
|
||||
data,
|
||||
clientCallback,
|
||||
clientErrorCallback
|
||||
) {
|
||||
|
||||
//GENERATED_EMIT_METHOD_START
|
||||
//GENERATED_EMIT_METHOD_END
|
||||
|
||||
//CUSTOM_EMIT_METHOD_START
|
||||
return Event.Emit(
|
||||
eventId,
|
||||
data,
|
||||
clientCallback,
|
||||
clientErrorCallback
|
||||
);
|
||||
//CUSTOM_EMIT_METHOD_END
|
||||
|
||||
//GENERATED_EMIT_METHOD_AFTER_START
|
||||
//GENERATED_EMIT_METHOD_AFTER_END
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* subscribe()
|
||||
* - Simply calls 'Subscribe()' passing it the arguments
|
||||
* @param eventId
|
||||
* @param callback
|
||||
*/
|
||||
subscribe(
|
||||
eventId,
|
||||
callback
|
||||
) {
|
||||
|
||||
//GENERATED_SUBSCRIBE_METHOD_START
|
||||
//GENERATED_SUBSCRIBE_METHOD_END
|
||||
|
||||
//CUSTOM_SUBSCRIBE_METHOD_START
|
||||
return Event.Subscribe(eventId, callback.bind(this));
|
||||
//CUSTOM_SUBSCRIBE_METHOD_END
|
||||
|
||||
//GENERATED_SUBSCRIBE_METHOD_AFTER_START
|
||||
//GENERATED_SUBSCRIBE_METHOD_AFTER_END
|
||||
|
||||
}
|
||||
//GENERATED_METHODS_END
|
||||
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_START
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
//GENERATED_STATIC_METHODS_START
|
||||
|
||||
/**
|
||||
* Async()
|
||||
* - 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.
|
||||
* @param eventId
|
||||
* @param data
|
||||
* @param clientCallback
|
||||
* @param clientErrorCallback
|
||||
*/
|
||||
static Async(
|
||||
eventId,
|
||||
data,
|
||||
clientCallback,
|
||||
clientErrorCallback
|
||||
) {
|
||||
|
||||
//GENERATED_STATIC_ASYNC_METHOD_START
|
||||
//GENERATED_STATIC_ASYNC_METHOD_END
|
||||
|
||||
//CUSTOM_STATIC_ASYNC_METHOD_START
|
||||
if (Event.Subscriptions.hasOwnProperty(eventId)) {
|
||||
|
||||
let subscriptionIds = Object.keys(Event.Subscriptions[eventId]);
|
||||
|
@ -191,60 +209,260 @@ class Event {
|
|||
}
|
||||
)
|
||||
}
|
||||
};
|
||||
//CUSTOM_STATIC_ASYNC_METHOD_END
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Emit()
|
||||
* - 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.
|
||||
* @param eventId
|
||||
* @param data
|
||||
* @param clientCallback
|
||||
* @param clientErrorCallback
|
||||
*/
|
||||
static Emit(
|
||||
eventId,
|
||||
data,
|
||||
clientCallback,
|
||||
clientErrorCallback
|
||||
) {
|
||||
|
||||
//GENERATED_STATIC_EMIT_METHOD_START
|
||||
//GENERATED_STATIC_EMIT_METHOD_END
|
||||
|
||||
//CUSTOM_STATIC_EMIT_METHOD_START
|
||||
if (Event.Subscriptions.hasOwnProperty(eventId)) {
|
||||
|
||||
let subscriptionIds = Object.keys(Event.Subscriptions[eventId]);
|
||||
|
||||
subscriptionIds.map(
|
||||
function(subscriptionId) {
|
||||
try {
|
||||
|
||||
let result = Event.Subscriptions[eventId][subscriptionId](data);
|
||||
|
||||
if (clientCallback) {
|
||||
clientCallback(result);
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
|
||||
if (clientErrorCallback) {
|
||||
clientErrorCallback(error);
|
||||
} else {
|
||||
console.error(error);
|
||||
throw error;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
)
|
||||
} else {
|
||||
if (clientCallback) {
|
||||
clientCallback();
|
||||
}
|
||||
}
|
||||
|
||||
//CUSTOM_STATIC_EMIT_METHOD_END
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Subscribe()
|
||||
* - Subscribes to 'eventName', ex. Event.BEFORE_RENDER and executes 'callback()' when eventName is raised
|
||||
* @param eventId
|
||||
* @param callback
|
||||
* @returns {Object} - A handle to the subscription which can be removed by calling handle.remove()
|
||||
*/
|
||||
static Subscribe(
|
||||
eventId,
|
||||
callback
|
||||
) {
|
||||
|
||||
//GENERATED_STATIC_SUBSCRIBE_METHOD_START
|
||||
//GENERATED_STATIC_SUBSCRIBE_METHOD_END
|
||||
|
||||
//CUSTOM_STATIC_SUBSCRIBE_METHOD_START
|
||||
let subscriptionId = Utils.RandomId(10);
|
||||
|
||||
if (Event.Subscriptions.hasOwnProperty(eventId)) {
|
||||
|
||||
if (Event.Subscriptions[eventId][subscriptionId]) {
|
||||
throw new Error('A component can only subscribe to a particular event ID once');
|
||||
}
|
||||
|
||||
Event.Subscriptions[eventId][subscriptionId] = callback;
|
||||
|
||||
} else {
|
||||
Event.Subscriptions[eventId] = {};
|
||||
Event.Subscriptions[eventId][subscriptionId] = callback;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a handle to the caller to allow us to unsubscribe to this event
|
||||
*/
|
||||
return {
|
||||
fn: callback,
|
||||
remove: function (eventId, subscriptionId) {
|
||||
|
||||
return function () {
|
||||
|
||||
/**
|
||||
* Stop listening for this event from this component
|
||||
*/
|
||||
delete Event.Subscriptions[eventId][subscriptionId];
|
||||
|
||||
/**
|
||||
* If the length of listeners is 0, stop referencing this event
|
||||
* @type {string[]}
|
||||
*/
|
||||
let listeners = Object.keys(Event.Subscriptions[eventId]);
|
||||
if (listeners.length === 0) {
|
||||
delete Event.Subscriptions[eventId];
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}(eventId, subscriptionId),
|
||||
subscriptionId : subscriptionId
|
||||
};
|
||||
//CUSTOM_STATIC_SUBSCRIBE_METHOD_END
|
||||
|
||||
}
|
||||
//GENERATED_STATIC_METHODS_END
|
||||
|
||||
//CUSTOM_IMPLEMENTATION_START
|
||||
|
||||
/**
|
||||
* Some nice Events handling
|
||||
* @type {{}}
|
||||
*/
|
||||
static Subscriptions = {};
|
||||
|
||||
//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
|
||||
|
||||
//EVENT_GENERATED_START
|
||||
Event.COMPONENT_INITIALIZED = 0x1;
|
||||
Event.CREATE_INSTANCE_BEFORE = 0x2;
|
||||
Event.DISPOSE_INSTANCE = 0x3;
|
||||
Event.DISPOSE_OBJECT = 0x4;
|
||||
Event.GET_RUNTIME = 0x5;
|
||||
Event.GET_WINDOW_SIZE = 0x6;
|
||||
Event.INSTANCE_CREATED = 0x7;
|
||||
Event.INSTANCE_DISPOSED = 0x8;
|
||||
Event.OBJECT_CREATED = 0x9;
|
||||
Event.OBJECT_INITIALIZED = 0xa;
|
||||
Event.PAUSE = 0xb;
|
||||
Event.RESTART = 0xc;
|
||||
Event.START = 0xd;
|
||||
Event.UPDATE_FROM_INSTANCE_AFTER = 0xe;
|
||||
Event.UPDATE_FROM_INSTANCE_BEFORE = 0xf;
|
||||
Event.UPDATE_INSTANCE_AFTER = 0x10;
|
||||
Event.UPDATE_INSTANCE_BEFORE = 0x11;
|
||||
Event.MAX_EVENTS = 0x12;
|
||||
//GENERATED_EVENTS_START
|
||||
Event.BEFORE_RENDER = 0x1;
|
||||
Event.BLACKLISTED_COMPONENT_INSTANCE_REQUEST = 0x2;
|
||||
Event.COMPONENT_CREATED = 0x3;
|
||||
Event.COMPONENT_INITIALIZED = 0x4;
|
||||
Event.CREATE_INSTANCE_BEFORE = 0x5;
|
||||
Event.DISPOSE_INSTANCE = 0x6;
|
||||
Event.DISPOSE_OBJECT = 0x7;
|
||||
Event.DOM_COMPONENT_INITIALIZED = 0x8;
|
||||
Event.ENTITY_CREATED = 0x9;
|
||||
Event.ENTITY_INITIALIZED = 0xa;
|
||||
Event.ENTITY_STARTED = 0xb;
|
||||
Event.FINAL_INITIALIZE = 0xc;
|
||||
Event.GET_API_URL = 0xd;
|
||||
Event.GET_RUNTIME = 0xe;
|
||||
Event.GET_WINDOW_SIZE = 0xf;
|
||||
Event.GRAPHICS_COMPONENT_INITIALIZED = 0x10;
|
||||
Event.IMAGE_INSTANCE_CREATED = 0x11;
|
||||
Event.INPUT_COMPONENT_INITIALIZED = 0x12;
|
||||
Event.INSTANCE_CREATED = 0x13;
|
||||
Event.INSTANCE_DISPOSED = 0x14;
|
||||
Event.KEYBOARD_DOWN = 0x15;
|
||||
Event.KEYBOARD_UP = 0x16;
|
||||
Event.MOUSE_DOWN = 0x17;
|
||||
Event.MOUSE_MOVE = 0x18;
|
||||
Event.MOUSE_UP = 0x19;
|
||||
Event.MOUSE_WHEEL = 0x1a;
|
||||
Event.OBJECT_CREATED = 0x1b;
|
||||
Event.OBJECT_PROPERTY_UPDATE = 0x1c;
|
||||
Event.OBJECT_PROPERTY_UPDATED = 0x1d;
|
||||
Event.ON_READY_STATE_CHANGE = 0x1e;
|
||||
Event.PAUSE = 0x1f;
|
||||
Event.PROJECT_INITIALIZED = 0x20;
|
||||
Event.RESTART = 0x21;
|
||||
Event.RUNTIME_CREATED = 0x22;
|
||||
Event.SLIDER_ENTITY_INITIALIZED = 0x23;
|
||||
Event.START = 0x24;
|
||||
Event.TOUCH_CANCEL = 0x25;
|
||||
Event.TOUCH_END = 0x26;
|
||||
Event.TOUCH_MOVE = 0x27;
|
||||
Event.TOUCH_START = 0x28;
|
||||
Event.UPDATE_FROM_INSTANCE_AFTER = 0x29;
|
||||
Event.UPDATE_FROM_INSTANCE_BEFORE = 0x2a;
|
||||
Event.UPDATE_INSTANCE_AFTER = 0x2b;
|
||||
Event.UPDATE_INSTANCE_BEFORE = 0x2c;
|
||||
Event.UPDATE_INSTANCE_PROPERTY = 0x2d;
|
||||
Event.UPDATE_PROPERTY_FROM_INSTANCE = 0x2e;
|
||||
Event.MAX_EVENTS = 0x2f;
|
||||
|
||||
Event.GetEventName = function(eventId) {
|
||||
|
||||
switch(eventId) {
|
||||
case 0x1 : return 'component_initialized';
|
||||
case 0x2 : return 'create_instance_before';
|
||||
case 0x3 : return 'dispose_instance';
|
||||
case 0x4 : return 'dispose_object';
|
||||
case 0x5 : return 'get_runtime';
|
||||
case 0x6 : return 'get_window_size';
|
||||
case 0x7 : return 'instance_created';
|
||||
case 0x8 : return 'instance_disposed';
|
||||
case 0x9 : return 'object_created';
|
||||
case 0xa : return 'object_initialized';
|
||||
case 0xb : return 'pause';
|
||||
case 0xc : return 'restart';
|
||||
case 0xd : return 'start';
|
||||
case 0xe : return 'update_from_instance_after';
|
||||
case 0xf : return 'update_from_instance_before';
|
||||
case 0x10 : return 'update_instance_after';
|
||||
case 0x11 : return 'update_instance_before';
|
||||
case 0x1 : return 'before_render';
|
||||
case 0x2 : return 'blacklisted_component_instance_request';
|
||||
case 0x3 : return 'component_created';
|
||||
case 0x4 : return 'component_initialized';
|
||||
case 0x5 : return 'create_instance_before';
|
||||
case 0x6 : return 'dispose_instance';
|
||||
case 0x7 : return 'dispose_object';
|
||||
case 0x8 : return 'dom_component_initialized';
|
||||
case 0x9 : return 'entity_created';
|
||||
case 0xa : return 'entity_initialized';
|
||||
case 0xb : return 'entity_started';
|
||||
case 0xc : return 'final_initialize';
|
||||
case 0xd : return 'get_api_url';
|
||||
case 0xe : return 'get_runtime';
|
||||
case 0xf : return 'get_window_size';
|
||||
case 0x10 : return 'graphics_component_initialized';
|
||||
case 0x11 : return 'image_instance_created';
|
||||
case 0x12 : return 'input_component_initialized';
|
||||
case 0x13 : return 'instance_created';
|
||||
case 0x14 : return 'instance_disposed';
|
||||
case 0x15 : return 'keyboard_down';
|
||||
case 0x16 : return 'keyboard_up';
|
||||
case 0x17 : return 'mouse_down';
|
||||
case 0x18 : return 'mouse_move';
|
||||
case 0x19 : return 'mouse_up';
|
||||
case 0x1a : return 'mouse_wheel';
|
||||
case 0x1b : return 'object_created';
|
||||
case 0x1c : return 'object_property_update';
|
||||
case 0x1d : return 'object_property_updated';
|
||||
case 0x1e : return 'on_ready_state_change';
|
||||
case 0x1f : return 'pause';
|
||||
case 0x20 : return 'project_initialized';
|
||||
case 0x21 : return 'restart';
|
||||
case 0x22 : return 'runtime_created';
|
||||
case 0x23 : return 'slider_entity_initialized';
|
||||
case 0x24 : return 'start';
|
||||
case 0x25 : return 'touch_cancel';
|
||||
case 0x26 : return 'touch_end';
|
||||
case 0x27 : return 'touch_move';
|
||||
case 0x28 : return 'touch_start';
|
||||
case 0x29 : return 'update_from_instance_after';
|
||||
case 0x2a : return 'update_from_instance_before';
|
||||
case 0x2b : return 'update_instance_after';
|
||||
case 0x2c : return 'update_instance_before';
|
||||
case 0x2d : return 'update_instance_property';
|
||||
case 0x2e : return 'update_property_from_instance';
|
||||
default :
|
||||
throw new Error('Event type not defined : ' + eventId);
|
||||
}
|
||||
|
||||
};
|
||||
//EVENT_GENERATED_END
|
||||
//GENERATED_EVENTS_END
|
||||
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
module.exports = Event;
|
||||
module.exports = Event;
|
||||
|
|
|
@ -1,209 +0,0 @@
|
|||
const Event = require('r3-event');
|
||||
const Utils = require('r3-utils');
|
||||
const R3Object = require('r3-r3-object.js');
|
||||
|
||||
/**
|
||||
|
||||
OPTIONS_START
|
||||
isPublic=true
|
||||
applicationMode=Project.APPLICATION_MODE_EDIT
|
||||
OPTIONS_END
|
||||
|
||||
INSTANCE_OPTIONS_MAPPING_START
|
||||
INSTANCE_OPTIONS_MAPPING_END
|
||||
|
||||
LINKED_OBJECTS_START
|
||||
entities=[Entity]
|
||||
controls=[Control]
|
||||
images=[Image]
|
||||
code=[CustomCode]
|
||||
LINKED_OBJECTS_END
|
||||
|
||||
EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
**/
|
||||
|
||||
class Project extends R3Object {
|
||||
|
||||
//CONSTRUCTOR_EXTENDS_TEMPLATE_START
|
||||
constructor(options) {
|
||||
|
||||
if (Utils.UndefinedOrNull(options)) {
|
||||
options = {};
|
||||
}
|
||||
|
||||
super(options);
|
||||
|
||||
this.emit(Event.OBJECT_CREATED, this);
|
||||
|
||||
//OPTIONS_INIT_START
|
||||
if (typeof options === 'undefined') {
|
||||
options = {};
|
||||
}
|
||||
if (Utils.UndefinedOrNull(options.isPublic)) {
|
||||
options.isPublic = true;
|
||||
}
|
||||
if (Utils.UndefinedOrNull(options.applicationMode)) {
|
||||
options.applicationMode = Project.APPLICATION_MODE_EDIT;
|
||||
}
|
||||
//OPTIONS_INIT_END
|
||||
|
||||
//CUSTOM_OPTIONS_INIT_START
|
||||
//CUSTOM_OPTIONS_INIT_END
|
||||
|
||||
Object.assign(this, options);
|
||||
|
||||
//CUSTOM_BEFORE_INIT_START
|
||||
//CUSTOM_BEFORE_INIT_END
|
||||
|
||||
this.emit(Event.OBJECT_INITIALIZED, this);
|
||||
}
|
||||
//CONSTRUCTOR_EXTENDS_TEMPLATE_END
|
||||
|
||||
//CREATE_INSTANCE_TEMPLATE_START
|
||||
createInstance() {
|
||||
|
||||
//CREATE_INSTANCE_BEFORE_START
|
||||
this.emit(Event.CREATE_INSTANCE_BEFORE, this);
|
||||
//CREATE_INSTANCE_BEFORE_END
|
||||
|
||||
//CUSTOM_CREATE_INSTANCE_START
|
||||
//CUSTOM_CREATE_INSTANCE_END
|
||||
|
||||
//CREATE_INSTANCE_AFTER_START
|
||||
this[this.runtime].createInstance(
|
||||
this,
|
||||
{
|
||||
//CREATE_INSTANCE_OPTIONS_START
|
||||
'isPublic': this.isPublic,
|
||||
'applicationMode': this.applicationMode
|
||||
//CREATE_INSTANCE_OPTIONS_END
|
||||
}
|
||||
)
|
||||
|
||||
this.emit(Event.INSTANCE_CREATED, this);
|
||||
//CREATE_INSTANCE_AFTER_END
|
||||
|
||||
}
|
||||
//CREATE_INSTANCE_TEMPLATE_END
|
||||
|
||||
//UPDATE_INSTANCE_TEMPLATE_START
|
||||
updateInstance(property) {
|
||||
|
||||
//UPDATE_INSTANCE_BEFORE_START
|
||||
this.emit(Event.UPDATE_INSTANCE_BEFORE, this);
|
||||
//UPDATE_INSTANCE_BEFORE_END
|
||||
|
||||
//UPDATE_INSTANCE_OPTIONS_START
|
||||
if (property === 'isPublic') {
|
||||
this.instance.isPublic = this.isPublic;
|
||||
return;
|
||||
}
|
||||
if (property === 'applicationMode') {
|
||||
this.instance.applicationMode = this.applicationMode;
|
||||
return;
|
||||
}
|
||||
//UPDATE_INSTANCE_OPTIONS_END
|
||||
|
||||
//CUSTOM_UPDATE_INSTANCE_START
|
||||
//CUSTOM_UPDATE_INSTANCE_END
|
||||
|
||||
//UPDATE_INSTANCE_AFTER_START
|
||||
this.emit(Event.UPDATE_INSTANCE_AFTER, this);
|
||||
//UPDATE_INSTANCE_AFTER_END
|
||||
|
||||
}
|
||||
//UPDATE_INSTANCE_TEMPLATE_END
|
||||
|
||||
//UPDATE_FROM_INSTANCE_TEMPLATE_START
|
||||
updateFromInstance(property) {
|
||||
|
||||
//UPDATE_FROM_INSTANCE_BEFORE_START
|
||||
this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this);
|
||||
//UPDATE_FROM_INSTANCE_BEFORE_END
|
||||
|
||||
//UPDATE_FROM_INSTANCE_OPTIONS_START
|
||||
if (property === 'isPublic' || property === 'all') {
|
||||
this.isPublic = this.instance.isPublic;
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (property === 'applicationMode' || property === 'all') {
|
||||
this.applicationMode = this.instance.applicationMode;
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//UPDATE_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
//CUSTOM_UPDATE_FROM_INSTANCE_START
|
||||
//CUSTOM_UPDATE_FROM_INSTANCE_END
|
||||
|
||||
//UPDATE_FROM_INSTANCE_AFTER_START
|
||||
this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this);
|
||||
//UPDATE_FROM_INSTANCE_AFTER_END
|
||||
|
||||
}
|
||||
//UPDATE_FROM_INSTANCE_TEMPLATE_END
|
||||
|
||||
//DISPOSE_TEMPLATE_START
|
||||
dispose() {
|
||||
|
||||
//DISPOSE_BEFORE_START
|
||||
this.subscribe(
|
||||
Event.INSTANCE_DISPOSED,
|
||||
function(object) {
|
||||
if (object === this) {
|
||||
this.emit(Event.DISPOSE_OBJECT, this);
|
||||
}
|
||||
}
|
||||
);
|
||||
//DISPOSE_BEFORE_END
|
||||
|
||||
//CUSTOM_DISPOSE_START
|
||||
//CUSTOM_DISPOSE_END
|
||||
|
||||
//DISPOSE_AFTER_START
|
||||
this.disposeInstance();
|
||||
//DISPOSE_AFTER_END
|
||||
|
||||
}
|
||||
//DISPOSE_TEMPLATE_END
|
||||
|
||||
//DISPOSE_INSTANCE_TEMPLATE_START
|
||||
disposeInstance() {
|
||||
|
||||
//DISPOSE_INSTANCE_BEFORE_START
|
||||
console.log('Disposing instance of ' + this.name);
|
||||
//DISPOSE_INSTANCE_BEFORE_END
|
||||
|
||||
//CUSTOM_DISPOSE_INSTANCE_START
|
||||
//CUSTOM_DISPOSE_INSTANCE_END
|
||||
|
||||
//DISPOSE_INSTANCE_AFTER_START
|
||||
this.emit(Event.DISPOSE_INSTANCE, this);
|
||||
//DISPOSE_INSTANCE_AFTER_END
|
||||
|
||||
}
|
||||
//DISPOSE_INSTANCE_TEMPLATE_END
|
||||
|
||||
//CUSTOM_IMPLEMENTATION_START
|
||||
//CUSTOM_IMPLEMENTATION_END
|
||||
|
||||
}
|
||||
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
Project.CAMERA_INDEX_EDIT = 0x0;
|
||||
Project.CAMERA_INDEX_RUN = 0x1;
|
||||
|
||||
Project.APPLICATION_MODE_EDIT = Project.CAMERA_INDEX_EDIT;
|
||||
Project.APPLICATION_MODE_RUN = Project.CAMERA_INDEX_RUN;
|
||||
|
||||
Project.RENDERER_INDEX_MAIN = 0x0;
|
||||
|
||||
Project.RENDER_TARGET_INDEX_NONE = -0x1;
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
module.exports = Project;
|
|
@ -1,180 +0,0 @@
|
|||
const Utils = require('r3-utils');
|
||||
const Event = require('r3-event.js');
|
||||
|
||||
/**
|
||||
|
||||
OPTIONS_START
|
||||
id=Utils.RandomId(10)
|
||||
name=this.constructor.name + '(' + options.id + ')'
|
||||
register=true
|
||||
OPTIONS_END
|
||||
|
||||
INSTANCE_OPTIONS_MAPPING_START
|
||||
INSTANCE_OPTIONS_MAPPING_END
|
||||
|
||||
LINKED_OBJECTS_START
|
||||
LINKED_OBJECTS_END
|
||||
|
||||
EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
id
|
||||
name
|
||||
register
|
||||
EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
**/
|
||||
|
||||
class R3Object extends Event {
|
||||
|
||||
//CONSTRUCTOR_EXTENDS_TEMPLATE_START
|
||||
constructor(options) {
|
||||
|
||||
if (Utils.UndefinedOrNull(options)) {
|
||||
options = {};
|
||||
}
|
||||
|
||||
super(options);
|
||||
|
||||
this.emit(Event.OBJECT_CREATED, this);
|
||||
|
||||
//OPTIONS_INIT_START
|
||||
if (typeof options === 'undefined') {
|
||||
options = {};
|
||||
}
|
||||
if (Utils.UndefinedOrNull(options.id)) {
|
||||
options.id = Utils.RandomId(10);
|
||||
}
|
||||
if (Utils.UndefinedOrNull(options.name)) {
|
||||
options.name = this.constructor.name + '(' + options.id + ')';
|
||||
}
|
||||
if (Utils.UndefinedOrNull(options.register)) {
|
||||
options.register = true;
|
||||
}
|
||||
//OPTIONS_INIT_END
|
||||
|
||||
//CUSTOM_OPTIONS_INIT_START
|
||||
//CUSTOM_OPTIONS_INIT_END
|
||||
|
||||
Object.assign(this, options);
|
||||
|
||||
//CUSTOM_BEFORE_INIT_START
|
||||
//CUSTOM_BEFORE_INIT_END
|
||||
|
||||
this.emit(Event.OBJECT_INITIALIZED, this);
|
||||
}
|
||||
//CONSTRUCTOR_EXTENDS_TEMPLATE_END
|
||||
|
||||
//CREATE_INSTANCE_TEMPLATE_START
|
||||
createInstance() {
|
||||
|
||||
//CREATE_INSTANCE_BEFORE_START
|
||||
this.emit(Event.CREATE_INSTANCE_BEFORE, this);
|
||||
//CREATE_INSTANCE_BEFORE_END
|
||||
|
||||
//CUSTOM_CREATE_INSTANCE_START
|
||||
//CUSTOM_CREATE_INSTANCE_END
|
||||
|
||||
//CREATE_INSTANCE_AFTER_START
|
||||
this[this.runtime].createInstance(
|
||||
this,
|
||||
{
|
||||
//CREATE_INSTANCE_OPTIONS_START
|
||||
//CREATE_INSTANCE_OPTIONS_END
|
||||
}
|
||||
)
|
||||
|
||||
this.emit(Event.INSTANCE_CREATED, this);
|
||||
//CREATE_INSTANCE_AFTER_END
|
||||
|
||||
}
|
||||
//CREATE_INSTANCE_TEMPLATE_END
|
||||
|
||||
//UPDATE_INSTANCE_TEMPLATE_START
|
||||
updateInstance(property) {
|
||||
|
||||
//UPDATE_INSTANCE_BEFORE_START
|
||||
this.emit(Event.UPDATE_INSTANCE_BEFORE, this);
|
||||
//UPDATE_INSTANCE_BEFORE_END
|
||||
|
||||
//UPDATE_INSTANCE_OPTIONS_START
|
||||
//UPDATE_INSTANCE_OPTIONS_END
|
||||
|
||||
//CUSTOM_UPDATE_INSTANCE_START
|
||||
//CUSTOM_UPDATE_INSTANCE_END
|
||||
|
||||
//UPDATE_INSTANCE_AFTER_START
|
||||
this.emit(Event.UPDATE_INSTANCE_AFTER, this);
|
||||
//UPDATE_INSTANCE_AFTER_END
|
||||
|
||||
}
|
||||
//UPDATE_INSTANCE_TEMPLATE_END
|
||||
|
||||
//UPDATE_FROM_INSTANCE_TEMPLATE_START
|
||||
updateFromInstance(property) {
|
||||
|
||||
//UPDATE_FROM_INSTANCE_BEFORE_START
|
||||
this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this);
|
||||
//UPDATE_FROM_INSTANCE_BEFORE_END
|
||||
|
||||
//UPDATE_FROM_INSTANCE_OPTIONS_START
|
||||
//UPDATE_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
//CUSTOM_UPDATE_FROM_INSTANCE_START
|
||||
//CUSTOM_UPDATE_FROM_INSTANCE_END
|
||||
|
||||
//UPDATE_FROM_INSTANCE_AFTER_START
|
||||
this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this);
|
||||
//UPDATE_FROM_INSTANCE_AFTER_END
|
||||
|
||||
}
|
||||
//UPDATE_FROM_INSTANCE_TEMPLATE_END
|
||||
|
||||
//DISPOSE_TEMPLATE_START
|
||||
dispose() {
|
||||
|
||||
//DISPOSE_BEFORE_START
|
||||
this.subscribe(
|
||||
Event.INSTANCE_DISPOSED,
|
||||
function(object) {
|
||||
if (object === this) {
|
||||
this.emit(Event.DISPOSE_OBJECT, this);
|
||||
}
|
||||
}
|
||||
);
|
||||
//DISPOSE_BEFORE_END
|
||||
|
||||
//CUSTOM_DISPOSE_START
|
||||
//CUSTOM_DISPOSE_END
|
||||
|
||||
//DISPOSE_AFTER_START
|
||||
this.disposeInstance();
|
||||
//DISPOSE_AFTER_END
|
||||
|
||||
}
|
||||
//DISPOSE_TEMPLATE_END
|
||||
|
||||
//DISPOSE_INSTANCE_TEMPLATE_START
|
||||
disposeInstance() {
|
||||
|
||||
//DISPOSE_INSTANCE_BEFORE_START
|
||||
console.log('Disposing instance of ' + this.name);
|
||||
//DISPOSE_INSTANCE_BEFORE_END
|
||||
|
||||
//CUSTOM_DISPOSE_INSTANCE_START
|
||||
//CUSTOM_DISPOSE_INSTANCE_END
|
||||
|
||||
//DISPOSE_INSTANCE_AFTER_START
|
||||
this.emit(Event.DISPOSE_INSTANCE, this);
|
||||
//DISPOSE_INSTANCE_AFTER_END
|
||||
|
||||
}
|
||||
//DISPOSE_INSTANCE_TEMPLATE_END
|
||||
|
||||
//CUSTOM_IMPLEMENTATION_START
|
||||
//CUSTOM_IMPLEMENTATION_END
|
||||
|
||||
}
|
||||
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
module.exports = R3Object;
|
|
@ -1,9 +1,24 @@
|
|||
//GENERATED_IMPORTS_START
|
||||
const System = require('./r3-system.js');
|
||||
const SystemDOM = require('./r3-system-d-o-m.js');
|
||||
const SystemInput = require('./r3-system-input.js');
|
||||
const SystemLinking = require('./r3-system-linking.js');
|
||||
const SystemRender = require('./r3-system-render.js');
|
||||
const SystemRuntime = require('./r3-system-runtime.js');
|
||||
const SystemSocket = require('./r3-system-socket.js');
|
||||
const SystemStorage = require('./r3-system-storage.js');
|
||||
//GENERATED_IMPORTS_END
|
||||
|
||||
module.exports = {
|
||||
System,
|
||||
SystemLinking,
|
||||
SystemSocket
|
||||
}
|
||||
//GENERATED_INDEX_BODY_START
|
||||
System.DOM = SystemDOM;
|
||||
System.Input = SystemInput;
|
||||
System.Linking = SystemLinking;
|
||||
System.Render = SystemRender;
|
||||
System.Runtime = SystemRuntime;
|
||||
System.Socket = SystemSocket;
|
||||
System.Storage = SystemStorage;
|
||||
//GENERATED_INDEX_BODY_END
|
||||
|
||||
//GENERATED_EXPORTS_START
|
||||
module.exports = System;
|
||||
//GENERATED_EXPORTS_END
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,17 +1,214 @@
|
|||
//GENERATED_IMPORTS_START
|
||||
//GENERATED_IMPORTS_END
|
||||
|
||||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Event = require('.././r3-event');
|
||||
const System = require('./r3-system.js');
|
||||
|
||||
class SocketSystem extends System {
|
||||
/**
|
||||
|
||||
static start() {
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
super.start();
|
||||
|
||||
console.log('starting socket system');
|
||||
Class R3.System.Socket
|
||||
[Inherited from System]
|
||||
|
||||
return true;
|
||||
Inherited Properties:
|
||||
|
||||
}
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to SystemSocket]
|
||||
|
||||
Properties:
|
||||
|
||||
<no properties>
|
||||
|
||||
Static Properties:
|
||||
|
||||
<no static properties>
|
||||
|
||||
Methods:
|
||||
|
||||
<no methods>
|
||||
|
||||
Static Methods:
|
||||
|
||||
<no static methods>
|
||||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
TEMPLATE_STATIC_OPTIONS_START
|
||||
Started=false - Indicates whether or not this system is running or not
|
||||
Subscriptions={} - An association object which hold the subscription handles for Events this system is listening to. The system can stop receiving events by calling remove() on a handle.
|
||||
TEMPLATE_STATIC_OPTIONS_END
|
||||
|
||||
CUSTOM_STATIC_OPTIONS_START
|
||||
CUSTOM_STATIC_OPTIONS_END
|
||||
|
||||
CUSTOM_EVENT_LISTENERS_START
|
||||
CUSTOM_EVENT_LISTENERS_END
|
||||
|
||||
CUSTOM_STATIC_EVENT_LISTENERS_START
|
||||
CUSTOM_STATIC_EVENT_LISTENERS_END
|
||||
|
||||
TEMPLATE_METHODS_START
|
||||
TEMPLATE_METHODS_END
|
||||
|
||||
CUSTOM_METHODS_START
|
||||
CUSTOM_METHODS_END
|
||||
|
||||
TEMPLATE_STATIC_METHODS_START
|
||||
Start(options) - Starts the system by registering subscriptions to events
|
||||
Stop(options) - Stops the system by removing these subscriptions to events
|
||||
TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
CUSTOM_STATIC_METHODS_START
|
||||
CUSTOM_STATIC_METHODS_END
|
||||
|
||||
**/
|
||||
|
||||
class SystemSocket extends System {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
||||
if (typeof options === 'undefined') {
|
||||
options = {};
|
||||
}
|
||||
|
||||
super(options);
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
//CUSTOM_OPTIONS_INIT_START
|
||||
//CUSTOM_OPTIONS_INIT_END
|
||||
|
||||
Object.assign(this, options);
|
||||
|
||||
//CUSTOM_BEFORE_INIT_START
|
||||
//CUSTOM_BEFORE_INIT_END
|
||||
|
||||
//CUSTOM_AFTER_INIT_START
|
||||
//CUSTOM_AFTER_INIT_END
|
||||
}
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
||||
//GENERATED_TEMPLATE_METHODS_START
|
||||
//GENERATED_TEMPLATE_METHODS_END
|
||||
|
||||
//GENERATED_METHODS_START
|
||||
//GENERATED_METHODS_END
|
||||
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_START
|
||||
|
||||
/**
|
||||
* Start()
|
||||
* - Starts the system by registering subscriptions to events
|
||||
* @param options
|
||||
*/
|
||||
static Start(options) {
|
||||
|
||||
//GENERATED_STATIC_START_METHOD_START
|
||||
|
||||
//GENERATED_STATIC_EVENT_LISTENERS_START_START
|
||||
|
||||
//GENERATED_STATIC_EVENT_LISTENERS_START_END
|
||||
|
||||
//CUSTOM_BEFORE_STATIC_SYSTEM_START_START
|
||||
//CUSTOM_BEFORE_STATIC_SYSTEM_START_END
|
||||
|
||||
SystemSocket.Started = true;
|
||||
|
||||
console.log('Started system: SystemSocket');
|
||||
|
||||
//GENERATED_STATIC_START_METHOD_END
|
||||
|
||||
//CUSTOM_STATIC_START_METHOD_START
|
||||
//CUSTOM_STATIC_START_METHOD_END
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop()
|
||||
* - Stops the system by removing these subscriptions to events
|
||||
* @param options
|
||||
*/
|
||||
static Stop(options) {
|
||||
|
||||
//GENERATED_STATIC_STOP_METHOD_START
|
||||
|
||||
//GENERATED_STATIC_EVENT_LISTENERS_STOP_START
|
||||
//GENERATED_STATIC_EVENT_LISTENERS_STOP_END
|
||||
|
||||
//CUSTOM_BEFORE_STATIC_SYSTEM_STOP_START
|
||||
//CUSTOM_BEFORE_STATIC_SYSTEM_STOP_END
|
||||
|
||||
SystemSocket.Started = false;
|
||||
|
||||
console.log('Stopped system: SystemSocket');
|
||||
|
||||
//GENERATED_STATIC_STOP_METHOD_END
|
||||
|
||||
//CUSTOM_STATIC_STOP_METHOD_START
|
||||
//CUSTOM_STATIC_STOP_METHOD_END
|
||||
|
||||
}
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
//GENERATED_STATIC_METHODS_START
|
||||
//GENERATED_STATIC_METHODS_END
|
||||
|
||||
//GENERATED_EVENT_LISTENER_METHODS_START
|
||||
//GENERATED_EVENT_LISTENER_METHODS_END
|
||||
|
||||
//GENERATED_STATIC_EVENT_LISTENER_METHODS_START
|
||||
//GENERATED_STATIC_EVENT_LISTENER_METHODS_END
|
||||
|
||||
//CUSTOM_IMPLEMENTATION_START
|
||||
//CUSTOM_IMPLEMENTATION_END
|
||||
}
|
||||
|
||||
module.exports = SocketSystem;
|
||||
//GENERATED_TEMPLATE_STATIC_OPTIONS_INIT_START
|
||||
/**
|
||||
* static Started - Indicates whether or not this system is running or not
|
||||
*/
|
||||
SystemSocket.Started = false;
|
||||
|
||||
/**
|
||||
* static Subscriptions - An association object which hold the subscription handles for Events this system is
|
||||
* listening to. The system can stop receiving events by calling remove() on a handle.
|
||||
*/
|
||||
SystemSocket.Subscriptions = {};
|
||||
|
||||
//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 = SystemSocket;
|
||||
|
|
|
@ -1,9 +1,111 @@
|
|||
//GENERATED_IMPORTS_START
|
||||
//GENERATED_IMPORTS_END
|
||||
|
||||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Event = require('.././r3-event');
|
||||
const Utils = require('.././r3-utils');
|
||||
|
||||
/**
|
||||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
TEMPLATE_STATIC_OPTIONS_START
|
||||
TEMPLATE_STATIC_OPTIONS_END
|
||||
|
||||
CUSTOM_STATIC_OPTIONS_START
|
||||
CUSTOM_STATIC_OPTIONS_END
|
||||
|
||||
CUSTOM_EVENT_LISTENERS_START
|
||||
CUSTOM_EVENT_LISTENERS_END
|
||||
|
||||
CUSTOM_STATIC_EVENT_LISTENERS_START
|
||||
CUSTOM_STATIC_EVENT_LISTENERS_END
|
||||
|
||||
TEMPLATE_METHODS_START
|
||||
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 System {
|
||||
|
||||
static start() {
|
||||
console.log('starting a system');
|
||||
}
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
||||
if (typeof options === 'undefined') {
|
||||
options = {};
|
||||
}
|
||||
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
Object.assign(this, options);
|
||||
|
||||
}
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
||||
//GENERATED_TEMPLATE_METHODS_START
|
||||
//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
|
||||
|
||||
//GENERATED_EVENT_LISTENER_METHODS_START
|
||||
//GENERATED_EVENT_LISTENER_METHODS_END
|
||||
|
||||
//GENERATED_STATIC_EVENT_LISTENER_METHODS_START
|
||||
//GENERATED_STATIC_EVENT_LISTENER_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
|
||||
System.DOM = 0x0;
|
||||
System.INPUT = 0x1;
|
||||
System.LINKING = 0x2;
|
||||
System.RENDER = 0x3;
|
||||
System.RUNTIME = 0x4;
|
||||
System.SOCKET = 0x5;
|
||||
System.STORAGE = 0x6;
|
||||
System.MAX_SYSTEM = 0x7;
|
||||
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
module.exports = System;
|
||||
|
|
|
@ -1,24 +1,55 @@
|
|||
const Event = require('r3-event');
|
||||
//GENERATED_IMPORTS_START
|
||||
//GENERATED_IMPORTS_END
|
||||
|
||||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
/**
|
||||
|
||||
OPTIONS_START
|
||||
OPTIONS_END
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
TEMPLATE_STATIC_OPTIONS_START
|
||||
TEMPLATE_STATIC_OPTIONS_END
|
||||
|
||||
CUSTOM_STATIC_OPTIONS_START
|
||||
CUSTOM_STATIC_OPTIONS_END
|
||||
|
||||
TEMPLATE_METHODS_START
|
||||
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 Utils {
|
||||
|
||||
//CONSTRUCTOR_TEMPLATE_START
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
||||
Event.Emit(Event.OBJECT_CREATED, this);
|
||||
|
||||
//OPTIONS_INIT_START
|
||||
if (typeof options === 'undefined') {
|
||||
options = {};
|
||||
options = {};
|
||||
}
|
||||
//OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
//CUSTOM_OPTIONS_INIT_START
|
||||
//CUSTOM_OPTIONS_INIT_END
|
||||
|
@ -28,9 +59,22 @@ class Utils {
|
|||
//CUSTOM_BEFORE_INIT_START
|
||||
//CUSTOM_BEFORE_INIT_END
|
||||
|
||||
Event.Emit(Event.OBJECT_INITIALIZED, this);
|
||||
//CUSTOM_AFTER_INIT_START
|
||||
//CUSTOM_AFTER_INIT_END
|
||||
}
|
||||
//CONSTRUCTOR_TEMPLATE_END
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
||||
//GENERATED_TEMPLATE_METHODS_START
|
||||
//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
|
||||
static GetFirstParent(object, constructor) {
|
||||
|
@ -56,7 +100,7 @@ class Utils {
|
|||
json = JSON.stringify(json, undefined, 2);
|
||||
}
|
||||
json = json.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
||||
return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) {
|
||||
return json.replace(/("(\u[a-zA-Z0-9]{4}|\[^u]|[^\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) {
|
||||
let cls = 'number';
|
||||
if (/^"/.test(match)) {
|
||||
if (/:$/.test(match)) {
|
||||
|
@ -391,39 +435,6 @@ class Utils {
|
|||
result[name].w = false;
|
||||
};
|
||||
|
||||
static ObjectPropertiesAsBoolean(object) {
|
||||
return Object.keys(object).reduce(
|
||||
function(result, propertyId) {
|
||||
|
||||
if (typeof object[propertyId] === 'function') {
|
||||
return result;
|
||||
}
|
||||
|
||||
result[propertyId] = false;
|
||||
|
||||
// if (object[propertyId] instanceof R3.Vector2) {
|
||||
// Utils.BuildVectorSource(result, propertyId, 2);
|
||||
// }
|
||||
//
|
||||
// if (object[propertyId] instanceof R3.Vector3) {
|
||||
// Utils.BuildVectorSource(result, propertyId, 3);
|
||||
// }
|
||||
//
|
||||
// if (object[propertyId] instanceof R3.Vector4) {
|
||||
// Utils.BuildVectorSource(result, propertyId, 4);
|
||||
// }
|
||||
//
|
||||
// if (object[propertyId] instanceof R3.Quaternion) {
|
||||
// Utils.BuildQuaternionSource(result, propertyId);
|
||||
// }
|
||||
|
||||
return result;
|
||||
|
||||
}.bind(this),
|
||||
{}
|
||||
);
|
||||
};
|
||||
|
||||
static GetRuntime() {
|
||||
|
||||
let result = null;
|
||||
|
@ -471,7 +482,6 @@ class Utils {
|
|||
object.height = size.height;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns id of object with the name if it exists in the array, otherwise null
|
||||
* @param name
|
||||
|
@ -498,15 +508,6 @@ class Utils {
|
|||
);
|
||||
};
|
||||
|
||||
static LoadIdsFromArrayToIdObject(array, idToObject) {
|
||||
|
||||
};
|
||||
|
||||
static LoadIdsFromObjectToIdObject(object, idToObject) {
|
||||
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets random int exclusive of maximum but inclusive of minimum
|
||||
* @param min
|
||||
|
@ -591,8 +592,8 @@ class Utils {
|
|||
|
||||
let FN_ARGS = /^function\s*[^\(]*\(\s*([^\)]*)\)/m;
|
||||
let FN_ARG_SPLIT = /,/;
|
||||
let FN_ARG = /^\s*(_?)(.+?)\1\s*$/;
|
||||
let STRIP_COMMENTS = /(\/\/.*$)|(\/\*[\s\S]*?\*\/)|(\s*=[^,\)]*(('(?:\\'|[^'\r\n])*')|("(?:\\"|[^"\r\n])*"))|(\s*=[^,\)]*))/mg;
|
||||
let FN_ARG = /^\s*(_?)(.+?)\s*$/;
|
||||
let STRIP_COMMENTS = /(\/\/.*$)|(\/\*[\s\S]*?\*\/)|(\s*=[^,\)]*(('(?:\'|[^'\r\n])*')|("(?:\"|[^"\r\n])*"))|(\s*=[^,\)]*))/mg;
|
||||
|
||||
let parameters,
|
||||
fnText,
|
||||
|
@ -683,26 +684,6 @@ class Utils {
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Links an object to its parent through idToObject array
|
||||
* @param propertyString
|
||||
* @param idToObject
|
||||
* @param parentObject
|
||||
* @param id
|
||||
* @constructor
|
||||
*/
|
||||
static Link(propertyString, idToObject, parentObject, id) {
|
||||
|
||||
if (!Utils.UndefinedOrNull(parentObject[propertyString])) {
|
||||
|
||||
if (!idToObject.hasOwnProperty(id)) {
|
||||
console.warn('Linking failed for object:' + parentObject.name);
|
||||
}
|
||||
|
||||
parentObject[propertyString] = idToObject[id];
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Generates a random ID
|
||||
* @returns {string}
|
||||
|
@ -1139,12 +1120,18 @@ class Utils {
|
|||
* @constructor
|
||||
*/
|
||||
static PushUnique(array, object) {
|
||||
|
||||
if (array.indexOf(object) === -1) {
|
||||
array.push(object);
|
||||
}
|
||||
};
|
||||
|
||||
static RemoveFromArray(array, object) {
|
||||
let index = array.indexOf(object);
|
||||
if (index !== -1) {
|
||||
array.splice(index, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether or not the object is empty
|
||||
* @param obj
|
||||
|
@ -1269,7 +1256,16 @@ class Utils {
|
|||
|
||||
}
|
||||
|
||||
//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 = Utils;
|
||||
module.exports = Utils;
|
||||
|
|
|
@ -1,20 +1,108 @@
|
|||
const {System, SystemLinking, SystemSocket} = require('./r3-system');
|
||||
const R3Object = require('./r3-r3-object');
|
||||
//GENERATED_IMPORTS_START
|
||||
//GENERATED_IMPORTS_END
|
||||
|
||||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
/**
|
||||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
TEMPLATE_STATIC_OPTIONS_START
|
||||
TEMPLATE_STATIC_OPTIONS_END
|
||||
|
||||
CUSTOM_STATIC_OPTIONS_START
|
||||
Version='__VERSION__' - Current R3 version
|
||||
CompileDate='__COMPILE_DATE__' - Current compile date of R3
|
||||
CUSTOM_STATIC_OPTIONS_END
|
||||
|
||||
TEMPLATE_METHODS_START
|
||||
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 R3 {
|
||||
|
||||
constructor() {
|
||||
}
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
||||
static version() {
|
||||
return 'Sun Jun 20 2021 18:45:42 GMT+0000 (Coordinated Universal Time)';
|
||||
}
|
||||
if (typeof options === 'undefined') {
|
||||
options = {};
|
||||
}
|
||||
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
//CUSTOM_OPTIONS_INIT_START
|
||||
//CUSTOM_OPTIONS_INIT_END
|
||||
|
||||
Object.assign(this, options);
|
||||
|
||||
//CUSTOM_BEFORE_INIT_START
|
||||
//CUSTOM_BEFORE_INIT_END
|
||||
|
||||
//CUSTOM_AFTER_INIT_START
|
||||
//CUSTOM_AFTER_INIT_END
|
||||
}
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
||||
//GENERATED_TEMPLATE_METHODS_START
|
||||
//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
|
||||
|
||||
}
|
||||
|
||||
R3.R3Object = R3Object;
|
||||
R3.System = System;
|
||||
R3.System.Linking = SystemLinking;
|
||||
R3.System.Socket = SystemSocket;
|
||||
//GENERATED_TEMPLATE_STATIC_OPTIONS_INIT_START
|
||||
//GENERATED_TEMPLATE_STATIC_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_STATIC_OPTIONS_INIT_START
|
||||
/**
|
||||
* static Version - Current R3 version
|
||||
*/
|
||||
R3.Version = '3.0.426';
|
||||
|
||||
/**
|
||||
* static CompileDate - Current compile date of R3
|
||||
*/
|
||||
R3.CompileDate = '2021 Oct 24 - 08:43:26 am';
|
||||
|
||||
//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 = R3;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
11
graph.php
11
graph.php
|
@ -307,6 +307,9 @@ class Node
|
|||
public $parent = null;
|
||||
public $children = [];
|
||||
public $isBaseClass = null;
|
||||
public $serverSide = false;
|
||||
public $clientSide = false;
|
||||
public $default = false;
|
||||
|
||||
function __construct(
|
||||
$__file,
|
||||
|
@ -315,7 +318,10 @@ class Node
|
|||
$__nameSpaceClassName = '',
|
||||
$__parent = null,
|
||||
$__children = [],
|
||||
$__isBaseClass = null
|
||||
$__isBaseClass = null,
|
||||
$__serverSide = false,
|
||||
$__clientSide = false,
|
||||
$__default = false
|
||||
)
|
||||
{
|
||||
$this->file = $__file;
|
||||
|
@ -325,6 +331,9 @@ class Node
|
|||
$this->parent = $__parent;
|
||||
$this->children = $__children;
|
||||
$this->isBaseClass = $__isBaseClass;
|
||||
$this->serverSide = $__serverSide;
|
||||
$this->clientSide = $__clientSide;
|
||||
$this->default = $__default;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "r3",
|
||||
"version": "3.0.363",
|
||||
"version": "3.0.433",
|
||||
"description": "",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
|
|
221
r3.php
221
r3.php
|
@ -1541,12 +1541,50 @@ function generateR3($nodes, $graph)
|
|||
|
||||
$children = $graph->flatten($component);
|
||||
|
||||
$leafNodes = [];
|
||||
|
||||
foreach ($children as $child) {
|
||||
|
||||
if (sizeof($child->children) === 0) {
|
||||
array_push($defines, 'R3.' . $child->nameSpaceClassName . ' = ' . $child->nameSpace);
|
||||
array_push($leafNodes, $child);
|
||||
}
|
||||
}
|
||||
|
||||
for ($i = 0; $i < sizeof($leafNodes); $i++) {
|
||||
|
||||
$leafNode = $leafNodes[$i];
|
||||
|
||||
$duplicate = false;
|
||||
|
||||
for ($n = 0; $n < sizeof($leafNodes); $n++) {
|
||||
if ($n !== $i && $leafNode->nameSpaceClassName === $leafNodes[$n]->nameSpaceClassName) {
|
||||
$duplicate = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($duplicate) {
|
||||
|
||||
$nameSpaces = preg_split('/\./', $leafNode->nameSpace);
|
||||
|
||||
$nameSpaceClassName = $nameSpaces[sizeof($nameSpaces) - 2] . '.' . $nameSpaces[sizeof($nameSpaces) - 1];
|
||||
|
||||
array_pop($nameSpaces);
|
||||
|
||||
$alternateNamespace = join(".", $nameSpaces);
|
||||
|
||||
array_push($defines, 'R3.' . $nameSpaces[sizeof($nameSpaces) - 1] . ' = ' . $alternateNamespace);
|
||||
|
||||
/**
|
||||
* Below is not strictly needed because the parent namespace has already been linked.
|
||||
*/
|
||||
// array_push($defines, 'R3.' . $nameSpaceClassName . ' = ' . $leafNode->nameSpace);
|
||||
} else {
|
||||
array_push($defines, 'R3.' . $leafNode->nameSpaceClassName . ' = ' . $leafNode->nameSpace);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
$r3Index = 'src/r3/index.js';
|
||||
|
||||
save($r3Index, getTokens(['CUSTOM']));
|
||||
|
@ -1913,6 +1951,37 @@ function buildNodeList($file)
|
|||
$nameSpace = '';
|
||||
$nameSpaceClassName = $class;
|
||||
|
||||
$serverSide = false;
|
||||
$clientSide = false;
|
||||
$default = false;
|
||||
|
||||
if (preg_match('/Runtime/', $extends)) {
|
||||
/**
|
||||
* Search for serverSide and default options
|
||||
*/
|
||||
$found = false;
|
||||
while (!feof($fn) && !$found) {
|
||||
$line = fgets($fn);
|
||||
|
||||
$matches = [];
|
||||
|
||||
if (preg_match('/^\s*options\.serverSide\s*=\s*(.*);/', $line, $matches)) {
|
||||
$serverSide = ($matches[1]==="true");
|
||||
}
|
||||
|
||||
if (preg_match('/^\s*options\.clientSide\s*=\s*(.*);/', $line, $matches)) {
|
||||
$clientSide = ($matches[1]==="true");
|
||||
}
|
||||
|
||||
if (preg_match('/^\s*options\.default\s*=\s*(.*);/', $line, $matches)) {
|
||||
$default = ($matches[1]==="true");
|
||||
$found = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$needles = [
|
||||
'Component',
|
||||
'Entity',
|
||||
|
@ -1944,7 +2013,10 @@ function buildNodeList($file)
|
|||
$nameSpaceClassName,
|
||||
$extends,
|
||||
[],
|
||||
$isBaseClass
|
||||
$isBaseClass,
|
||||
$serverSide,
|
||||
$clientSide,
|
||||
$default
|
||||
);
|
||||
|
||||
array_push($nodeList, $node);
|
||||
|
@ -2055,6 +2127,146 @@ function buildRuntimeOutOfClassDefines(&$outOfClassDefines, $node, $depth = 1)
|
|||
}
|
||||
}
|
||||
|
||||
function getDefaultRuntime($serverSide, $runtimeBase)
|
||||
{
|
||||
foreach ($runtimeBase->children as $runtime) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function replaceSection($string, $token, $updates, $separator = "\n")
|
||||
{
|
||||
|
||||
if (getType($updates) === 'array') {
|
||||
$updates = implode($separator, $updates);
|
||||
}
|
||||
|
||||
if (strlen($updates) <= 0) {
|
||||
echo "No contents to be updated for token $token\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (substr($updates, -1) !== "\n") {
|
||||
$updates .= "\n";
|
||||
}
|
||||
|
||||
$whiteSpaceObject = getWhitespace($string, $token . '_END');
|
||||
|
||||
if ($whiteSpaceObject === null) {
|
||||
/**
|
||||
* This file does not contain the token which requires an update - we can return here
|
||||
*/
|
||||
echo "Skipping token $token because it was not found but it could be generated soon...\n";
|
||||
return $token;
|
||||
}
|
||||
|
||||
$endToken = $token . "_END";
|
||||
|
||||
if ($whiteSpaceObject['inline-comment']) {
|
||||
$endToken = '//' . $endToken;
|
||||
}
|
||||
|
||||
$whiteSpace = $whiteSpaceObject['white-space'];
|
||||
|
||||
$string = preg_replace(
|
||||
'/\b' . $token . '_START\b.*?\b' . $token . '_END\b/s',
|
||||
$token . "_START\n" . $updates . $whiteSpace . $endToken,
|
||||
$string
|
||||
);
|
||||
|
||||
return $string;
|
||||
}
|
||||
|
||||
function getRuntimeInfo($node)
|
||||
{
|
||||
return [
|
||||
'runtimeBase' => $node->parent->name,
|
||||
'runtimeDefaultShort' => $node->nameSpaceClassName,
|
||||
'className' => $node->name
|
||||
];
|
||||
}
|
||||
|
||||
function updateRuntimeDefaultSection($node, $defaultRuntimeTemplate)
|
||||
{
|
||||
$info = getRuntimeInfo($node);
|
||||
|
||||
$updates = str_replace('RUNTIME_BASE', $info['runtimeBase'], $defaultRuntimeTemplate);
|
||||
$updates = str_replace('RUNTIME_DEFAULT_SHORT', $info['runtimeDefaultShort'], $updates);
|
||||
return str_replace('RUNTIME_CLASS', $info['className'], $updates);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $runtimeLocators
|
||||
* @param $node
|
||||
* @param int $depth
|
||||
* @throws Exception
|
||||
*/
|
||||
function buildGenerateRuntimeLocator(&$runtimeLocators, $node, $depth = 1)
|
||||
{
|
||||
$template = file_get_contents('./src/templates/generated_runtime_locator.template');
|
||||
$defaultRuntimeTemplate = file_get_contents('src/templates/generated_default_runtime.template');
|
||||
|
||||
foreach ($node->children as $runtimeBaseNode) {
|
||||
$updated = str_replace('RUNTIME_CLASS', $runtimeBaseNode->name, $template);
|
||||
|
||||
$defaultServerRuntime=[];
|
||||
$defaultClientRuntime=[];
|
||||
|
||||
foreach ($runtimeBaseNode->children as $runtimeImplementation) {
|
||||
|
||||
if ($runtimeImplementation->default && $runtimeImplementation->serverSide) {
|
||||
array_push($defaultServerRuntime, $runtimeImplementation);
|
||||
}
|
||||
|
||||
if ($runtimeImplementation->default && $runtimeImplementation->clientSide) {
|
||||
array_push($defaultClientRuntime, $runtimeImplementation);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (sizeof($defaultClientRuntime) > 1) {
|
||||
throw new Exception('Too many default client runtimes defined');
|
||||
}
|
||||
|
||||
if (sizeof($defaultServerRuntime) > 1) {
|
||||
throw new Exception('Too many default server runtimes defined');
|
||||
}
|
||||
|
||||
$defaultClient = null;
|
||||
|
||||
if (sizeof($defaultClientRuntime) === 1) {
|
||||
$defaultClient = $defaultClientRuntime[0];
|
||||
}
|
||||
|
||||
$defaultServer = null;
|
||||
|
||||
if (sizeof($defaultServerRuntime) === 1) {
|
||||
$defaultServer = $defaultServerRuntime[0];
|
||||
}
|
||||
|
||||
if ($defaultClient) {
|
||||
$updates = updateRuntimeDefaultSection($defaultClient, $defaultRuntimeTemplate);
|
||||
$updated = replaceSection($updated, "GENERATED_DEFAULT_CLIENT_SIDE_RUNTIME", $updates);
|
||||
}
|
||||
|
||||
if ($defaultServer) {
|
||||
$updates = updateRuntimeDefaultSection($defaultServer, $defaultRuntimeTemplate);
|
||||
$updated = replaceSection($updated, "GENERATED_DEFAULT_SERVER_SIDE_RUNTIME", $updates);
|
||||
}
|
||||
|
||||
array_push($runtimeLocators, $updated);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function generateR3NodeDist()
|
||||
{
|
||||
rrmdir('dist/r3-node');
|
||||
recursive_copy('src/r3/', 'dist/r3-node');
|
||||
}
|
||||
|
||||
function generateRuntimeSystem($graph)
|
||||
{
|
||||
|
||||
|
@ -2070,8 +2282,12 @@ function generateRuntimeSystem($graph)
|
|||
|
||||
buildRuntimeOutOfClassDefines($outOfClassDefines, $node, 0);
|
||||
|
||||
$runtimeLocators = [];
|
||||
buildGenerateRuntimeLocator($runtimeLocators, $node);
|
||||
|
||||
updateSection('./src/r3/r3-system/r3-system-runtime.js', 'GENERATED_IMPORTS', $imports, "\n");
|
||||
updateSection('./src/r3/r3-system/r3-system-runtime.js', 'GENERATED_OUT_OF_CLASS_IMPLEMENTATION', $outOfClassDefines, "\n");
|
||||
updateSection('./src/r3/r3-system/r3-system-runtime.js', 'GENERATED_RUNTIME_LOCATOR', $runtimeLocators, "\n");
|
||||
|
||||
}
|
||||
|
||||
|
@ -2282,6 +2498,7 @@ if ($argv[2] == 'build-dist') {
|
|||
|
||||
generateR3($nodes, $graph);
|
||||
generateR3Dist($nodes);
|
||||
generateR3NodeDist();
|
||||
|
||||
foreach ($files as $file) {
|
||||
|
||||
|
|
|
@ -23,15 +23,17 @@ R3.Object = R3Object;
|
|||
R3.Project = Project;
|
||||
R3.Entity = Entity;
|
||||
R3.Component = Component;
|
||||
R3.Code = R3Object.Component.Code;
|
||||
R3.JS = R3Object.Component.Code.JS;
|
||||
R3.Canvas = R3Object.Component.DOM.Canvas;
|
||||
R3.Test = R3Object.Component.DOM.Test;
|
||||
R3.PlaneGeometry = R3Object.Component.Geometry.BufferGeometry.PlaneGeometry;
|
||||
R3.Image = R3Object.Component.Graphics.Image;
|
||||
R3.DOM = R3Object.Component.DOM;
|
||||
R3.DOM.Image = R3Object.Component.DOM.Image;
|
||||
R3.Plane = R3Object.Component.Graphics.Geometry.Buffer.Plane;
|
||||
R3.Graphics = R3Object.Component.Graphics;
|
||||
R3.Graphics.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
|
||||
|
|
|
@ -1,36 +1,38 @@
|
|||
//GENERATED_IMPORTS_START
|
||||
const Component = require('./r3-component.js');
|
||||
const ComponentCode = require('./r3-component-code.js');
|
||||
const ComponentCodeJS = require('./r3-component-code-j-s.js');
|
||||
const ComponentDOM = require('./r3-component-d-o-m.js');
|
||||
const ComponentCanvas = require('./r3-component-canvas.js');
|
||||
const ComponentTest = require('./r3-component-test.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 ComponentDOMCanvas = require('./r3-component-d-o-m-canvas.js');
|
||||
const ComponentDOMImage = require('./r3-component-d-o-m-image.js');
|
||||
const ComponentGraphics = require('./r3-component-graphics.js');
|
||||
const ComponentImage = require('./r3-component-image.js');
|
||||
const ComponentGraphicsGeometry = require('./r3-component-graphics-geometry.js');
|
||||
const ComponentGraphicsGeometryBuffer = require('./r3-component-graphics-geometry-buffer.js');
|
||||
const ComponentGraphicsGeometryBufferPlane = require('./r3-component-graphics-geometry-buffer-plane.js');
|
||||
const ComponentGraphicsImage = require('./r3-component-graphics-image.js');
|
||||
const ComponentGraphicsMaterial = require('./r3-component-graphics-material.js');
|
||||
const ComponentGraphicsMesh = require('./r3-component-graphics-mesh.js');
|
||||
const ComponentGraphicsTexture = require('./r3-component-graphics-texture.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 ComponentInputTouch = require('./r3-component-input-touch.js');
|
||||
//GENERATED_IMPORTS_END
|
||||
|
||||
//GENERATED_INDEX_BODY_START
|
||||
Component.Code = ComponentCode;
|
||||
Component.Code.JS = ComponentCodeJS;
|
||||
Component.DOM = ComponentDOM;
|
||||
Component.DOM.Canvas = ComponentCanvas;
|
||||
Component.DOM.Test = ComponentTest;
|
||||
Component.Geometry = ComponentGeometry;
|
||||
Component.Geometry.BufferGeometry = ComponentBufferGeometry;
|
||||
Component.Geometry.BufferGeometry.PlaneGeometry = ComponentPlaneGeometry;
|
||||
Component.DOM.Canvas = ComponentDOMCanvas;
|
||||
Component.DOM.Image = ComponentDOMImage;
|
||||
Component.Graphics = ComponentGraphics;
|
||||
Component.Graphics.Image = ComponentImage;
|
||||
Component.Graphics.Geometry = ComponentGraphicsGeometry;
|
||||
Component.Graphics.Geometry.Buffer = ComponentGraphicsGeometryBuffer;
|
||||
Component.Graphics.Geometry.Buffer.Plane = ComponentGraphicsGeometryBufferPlane;
|
||||
Component.Graphics.Image = ComponentGraphicsImage;
|
||||
Component.Graphics.Material = ComponentGraphicsMaterial;
|
||||
Component.Graphics.Mesh = ComponentGraphicsMesh;
|
||||
Component.Graphics.Texture = ComponentGraphicsTexture;
|
||||
Component.Input = ComponentInput;
|
||||
Component.Input.Touch = ComponentTouch;
|
||||
Component.Material = ComponentMaterial;
|
||||
Component.Mesh = ComponentMesh;
|
||||
Component.Texture = ComponentTexture;
|
||||
Component.Input.Touch = ComponentInputTouch;
|
||||
//GENERATED_INDEX_BODY_END
|
||||
|
||||
//GENERATED_EXPORTS_START
|
||||
|
|
|
@ -5,15 +5,15 @@ const Entity = require('../r3-entity/r3-entity.js');
|
|||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Component = require('../r3-component/r3-component.js');
|
||||
const Event = require('../r3-event.js');
|
||||
const ComponentBufferGeometry = require('./r3-component-buffer-geometry.js');
|
||||
const ComponentCode = require('./r3-component-code.js');
|
||||
const RuntimeCode = require('../r3-runtime/r3-runtime-code.js');
|
||||
|
||||
/**
|
||||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
Class R3.Event.Object.Component.Geometry.BufferGeometry.PlaneGeometry
|
||||
Class R3.Event.Object.Component.Code.JS
|
||||
[Inherited from Event]
|
||||
|
||||
Inherited Properties:
|
||||
|
@ -86,7 +86,7 @@ const ComponentBufferGeometry = require('./r3-component-buffer-geometry.js');
|
|||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from ComponentGeometry]
|
||||
[Inherited from ComponentCode]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
|
@ -104,25 +104,7 @@ const ComponentBufferGeometry = require('./r3-component-buffer-geometry.js');
|
|||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from ComponentBufferGeometry]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to ComponentPlaneGeometry]
|
||||
[Belonging to ComponentCodeJS]
|
||||
|
||||
Properties:
|
||||
|
||||
|
@ -144,6 +126,8 @@ const ComponentBufferGeometry = require('./r3-component-buffer-geometry.js');
|
|||
|
||||
TEMPLATE_OPTIONS_START
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
runtime=null - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
runtimeClass=RuntimeCode
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
|
@ -166,6 +150,8 @@ const ComponentBufferGeometry = require('./r3-component-buffer-geometry.js');
|
|||
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
instance
|
||||
runtime
|
||||
runtimeClass
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
|
@ -188,7 +174,7 @@ const ComponentBufferGeometry = require('./r3-component-buffer-geometry.js');
|
|||
|
||||
**/
|
||||
|
||||
class ComponentPlaneGeometry extends ComponentBufferGeometry {
|
||||
class ComponentCodeJS extends ComponentCode {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
@ -218,6 +204,18 @@ class ComponentPlaneGeometry extends ComponentBufferGeometry {
|
|||
if (typeof options.instance === 'undefined') {
|
||||
options.instance = null;
|
||||
}
|
||||
/**
|
||||
* runtime - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
*/
|
||||
if (typeof options.runtime === 'undefined') {
|
||||
options.runtime = null;
|
||||
}
|
||||
/**
|
||||
* runtimeClass - No comment
|
||||
*/
|
||||
if (typeof options.runtimeClass === 'undefined') {
|
||||
options.runtimeClass = RuntimeCode;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
|
@ -361,4 +359,4 @@ class ComponentPlaneGeometry extends ComponentBufferGeometry {
|
|||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
module.exports = ComponentPlaneGeometry;
|
||||
module.exports = ComponentCodeJS;
|
|
@ -5,8 +5,8 @@ const Entity = require('../r3-entity/r3-entity.js');
|
|||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Component = require('../r3-component/r3-component.js');
|
||||
const Event = require('../r3-event.js');
|
||||
const RuntimeCode = require('../r3-runtime/r3-runtime-code.js');
|
||||
|
||||
/**
|
||||
|
||||
|
@ -107,6 +107,8 @@ const Event = require('../r3-event.js');
|
|||
|
||||
TEMPLATE_OPTIONS_START
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
runtime=null - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
runtimeClass=RuntimeCode
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
|
@ -129,6 +131,8 @@ const Event = require('../r3-event.js');
|
|||
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
instance
|
||||
runtime
|
||||
runtimeClass
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
|
@ -181,6 +185,18 @@ class ComponentCode extends Component {
|
|||
if (typeof options.instance === 'undefined') {
|
||||
options.instance = null;
|
||||
}
|
||||
/**
|
||||
* runtime - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
*/
|
||||
if (typeof options.runtime === 'undefined') {
|
||||
options.runtime = null;
|
||||
}
|
||||
/**
|
||||
* runtimeClass - No comment
|
||||
*/
|
||||
if (typeof options.runtimeClass === 'undefined') {
|
||||
options.runtimeClass = RuntimeCode;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
|
|
|
@ -5,9 +5,9 @@ const Entity = require('../r3-entity/r3-entity.js');
|
|||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Component = require('../r3-component/r3-component.js');
|
||||
const Event = require('../r3-event.js');
|
||||
const ComponentDOM = require('./r3-component-d-o-m.js');
|
||||
const RuntimeDOM = require('../r3-runtime/r3-runtime-d-o-m.js');
|
||||
|
||||
/**
|
||||
|
||||
|
@ -90,8 +90,7 @@ const ComponentDOM = require('./r3-component-d-o-m.js');
|
|||
|
||||
Inherited Properties:
|
||||
|
||||
- instance (Default value null - Holds the current instance of this object as determined (built) by
|
||||
the runtime object.)
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
|
@ -105,11 +104,10 @@ const ComponentDOM = require('./r3-component-d-o-m.js');
|
|||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to ComponentCanvas]
|
||||
[Belonging to ComponentDOMCanvas]
|
||||
|
||||
Properties:
|
||||
|
||||
- type (Default value 'canvas')
|
||||
- width (Default value 500 - The initial width of the canvas (You can override it with CSS))
|
||||
- height (Default value 500 - The initial height of the canvas (You can override it with CSS))
|
||||
- style (Default value 'border:1px solid #00bb00;')
|
||||
|
@ -130,10 +128,11 @@ const ComponentDOM = require('./r3-component-d-o-m.js');
|
|||
|
||||
TEMPLATE_OPTIONS_START
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
runtime=null - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
runtimeClass=RuntimeDOM
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
type='canvas'
|
||||
width=500 - The initial width of the canvas (You can override it with CSS)
|
||||
height=500 - The initial height of the canvas (You can override it with CSS)
|
||||
style='border:1px solid #00bb00;'
|
||||
|
@ -156,10 +155,11 @@ const ComponentDOM = require('./r3-component-d-o-m.js');
|
|||
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
instance
|
||||
runtime
|
||||
runtimeClass
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
type
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
TEMPLATE_METHODS_START
|
||||
|
@ -179,7 +179,7 @@ const ComponentDOM = require('./r3-component-d-o-m.js');
|
|||
|
||||
**/
|
||||
|
||||
class ComponentCanvas extends ComponentDOM {
|
||||
class ComponentDOMCanvas extends ComponentDOM {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
@ -209,15 +209,21 @@ class ComponentCanvas extends ComponentDOM {
|
|||
if (typeof options.instance === 'undefined') {
|
||||
options.instance = null;
|
||||
}
|
||||
/**
|
||||
* runtime - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
*/
|
||||
if (typeof options.runtime === 'undefined') {
|
||||
options.runtime = null;
|
||||
}
|
||||
/**
|
||||
* runtimeClass - No comment
|
||||
*/
|
||||
if (typeof options.runtimeClass === 'undefined') {
|
||||
options.runtimeClass = RuntimeDOM;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
/**
|
||||
* type - No comment
|
||||
*/
|
||||
if (typeof options.type === 'undefined') {
|
||||
options.type = 'canvas';
|
||||
}
|
||||
/**
|
||||
* width - The initial width of the canvas (You can override it with CSS)
|
||||
*/
|
||||
|
@ -283,7 +289,6 @@ class ComponentCanvas extends ComponentDOM {
|
|||
//GENERATED_INITIALIZE_METHOD_END
|
||||
|
||||
//CUSTOM_INITIALIZE_METHOD_START
|
||||
Event.Emit(Event.CANVAS_COMPONENT_INITIALIZED, this);
|
||||
//CUSTOM_INITIALIZE_METHOD_END
|
||||
|
||||
//GENERATED_INITIALIZE_METHOD_AFTER_START
|
||||
|
@ -461,4 +466,4 @@ class ComponentCanvas extends ComponentDOM {
|
|||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
module.exports = ComponentCanvas;
|
||||
module.exports = ComponentDOMCanvas;
|
|
@ -3,18 +3,17 @@ const Entity = require('../r3-entity/r3-entity.js');
|
|||
//GENERATED_IMPORTS_END
|
||||
|
||||
//CUSTOM_IMPORTS_START
|
||||
const Utils = require('../r3-utils.js');
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Component = require('../r3-component/r3-component.js');
|
||||
const Event = require('../r3-event.js');
|
||||
const ComponentGraphics = require('./r3-component-graphics.js');
|
||||
const ComponentDOM = require('./r3-component-d-o-m.js');
|
||||
const RuntimeDOM = require('../r3-runtime/r3-runtime-d-o-m.js');
|
||||
|
||||
/**
|
||||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
Class R3.Event.Object.Component.Graphics.Image
|
||||
Class R3.Event.Object.Component.DOM.Image
|
||||
[Inherited from Event]
|
||||
|
||||
Inherited Properties:
|
||||
|
@ -87,7 +86,7 @@ const ComponentGraphics = require('./r3-component-graphics.js');
|
|||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from ComponentGraphics]
|
||||
[Inherited from ComponentDOM]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
|
@ -105,7 +104,7 @@ const ComponentGraphics = require('./r3-component-graphics.js');
|
|||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to ComponentImage]
|
||||
[Belonging to ComponentDOMImage]
|
||||
|
||||
Properties:
|
||||
|
||||
|
@ -143,6 +142,8 @@ const ComponentGraphics = require('./r3-component-graphics.js');
|
|||
|
||||
TEMPLATE_OPTIONS_START
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
runtime=null - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
runtimeClass=RuntimeDOM
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
|
@ -176,6 +177,8 @@ const ComponentGraphics = require('./r3-component-graphics.js');
|
|||
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
instance
|
||||
runtime
|
||||
runtimeClass
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
|
@ -202,7 +205,7 @@ const ComponentGraphics = require('./r3-component-graphics.js');
|
|||
|
||||
**/
|
||||
|
||||
class ComponentImage extends ComponentGraphics {
|
||||
class ComponentDOMImage extends ComponentDOM {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
@ -232,6 +235,18 @@ class ComponentImage extends ComponentGraphics {
|
|||
if (typeof options.instance === 'undefined') {
|
||||
options.instance = null;
|
||||
}
|
||||
/**
|
||||
* runtime - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
*/
|
||||
if (typeof options.runtime === 'undefined') {
|
||||
options.runtime = null;
|
||||
}
|
||||
/**
|
||||
* runtimeClass - No comment
|
||||
*/
|
||||
if (typeof options.runtimeClass === 'undefined') {
|
||||
options.runtimeClass = RuntimeDOM;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
|
@ -313,35 +328,9 @@ class ComponentImage extends ComponentGraphics {
|
|||
//GENERATED_AFTER_REQUIRED_COMPONENTS_END
|
||||
|
||||
//CUSTOM_OPTIONS_INIT_START
|
||||
|
||||
if (options.extension.match(/(png)$/i)) {
|
||||
options.contentType = 'image/png';
|
||||
}
|
||||
|
||||
if (options.extension.match(/(jpg|jpeg)$/i)) {
|
||||
options.contentType = 'image/jpeg';
|
||||
}
|
||||
|
||||
if (options.extension.match(/(gif)$/i)) {
|
||||
options.contentType = 'image/gif';
|
||||
}
|
||||
|
||||
//CUSTOM_OPTIONS_INIT_END
|
||||
|
||||
//CUSTOM_BEFORE_INIT_START
|
||||
|
||||
if (options.width > options.height) {
|
||||
options.orientation = 'landscape';
|
||||
}
|
||||
|
||||
if (options.width < options.height) {
|
||||
options.orientation = 'portrait';
|
||||
}
|
||||
|
||||
if (options.width === options.height) {
|
||||
options.orientation = 'square';
|
||||
}
|
||||
|
||||
//CUSTOM_BEFORE_INIT_END
|
||||
|
||||
this.underConstruction = true;
|
||||
|
@ -374,7 +363,6 @@ class ComponentImage extends ComponentGraphics {
|
|||
//GENERATED_INITIALIZE_METHOD_END
|
||||
|
||||
//CUSTOM_INITIALIZE_METHOD_START
|
||||
Event.Emit(Event.IMAGE_COMPONENT_INITIALIZED, this);
|
||||
//CUSTOM_INITIALIZE_METHOD_END
|
||||
|
||||
//GENERATED_INITIALIZE_METHOD_AFTER_START
|
||||
|
@ -692,4 +680,4 @@ class ComponentImage extends ComponentGraphics {
|
|||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
module.exports = ComponentImage;
|
||||
module.exports = ComponentDOMImage;
|
|
@ -5,8 +5,8 @@ const Entity = require('../r3-entity/r3-entity.js');
|
|||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Component = require('../r3-component/r3-component.js');
|
||||
const Event = require('../r3-event.js');
|
||||
const RuntimeDOM = require('../r3-runtime/r3-runtime-d-o-m.js');
|
||||
|
||||
/**
|
||||
|
||||
|
@ -89,8 +89,7 @@ const Event = require('../r3-event.js');
|
|||
|
||||
Properties:
|
||||
|
||||
- instance (Default value null - Holds the current instance of this object as determined (built) by
|
||||
the runtime object.)
|
||||
<no properties>
|
||||
|
||||
Static Properties:
|
||||
|
||||
|
@ -108,10 +107,11 @@ const Event = require('../r3-event.js');
|
|||
|
||||
TEMPLATE_OPTIONS_START
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
runtime=null - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
runtimeClass=RuntimeDOM
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
CUSTOM_REQUIRED_COMPONENTS_START
|
||||
|
@ -131,6 +131,8 @@ const Event = require('../r3-event.js');
|
|||
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
instance
|
||||
runtime
|
||||
runtimeClass
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
|
@ -183,15 +185,21 @@ class ComponentDOM extends Component {
|
|||
if (typeof options.instance === 'undefined') {
|
||||
options.instance = null;
|
||||
}
|
||||
/**
|
||||
* runtime - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
*/
|
||||
if (typeof options.runtime === 'undefined') {
|
||||
options.runtime = null;
|
||||
}
|
||||
/**
|
||||
* runtimeClass - No comment
|
||||
*/
|
||||
if (typeof options.runtimeClass === 'undefined') {
|
||||
options.runtimeClass = RuntimeDOM;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_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_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_REQUIRED_COMPONENTS_START
|
||||
|
@ -263,20 +271,6 @@ class ComponentDOM extends Component {
|
|||
this.emit(Event.UPDATE_INSTANCE_BEFORE, this);
|
||||
|
||||
//GENERATED_UPDATE_INSTANCE_OPTIONS_START
|
||||
if (property === 'instance') {
|
||||
this.instance.instance = this.instance;
|
||||
this.emit(
|
||||
Event.UPDATE_INSTANCE_PROPERTY,
|
||||
{
|
||||
component : this,
|
||||
property : 'instance',
|
||||
instanceProperty : 'instance'
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//GENERATED_UPDATE_INSTANCE_OPTIONS_END
|
||||
|
||||
//GENERATED_TEMPLATE_UPDATE_INSTANCE_OPTIONS_START
|
||||
|
@ -304,20 +298,6 @@ class ComponentDOM extends Component {
|
|||
this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this);
|
||||
|
||||
//GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_START
|
||||
if (property === 'instance' || property === 'all') {
|
||||
this.instance = this.instance.instance;
|
||||
this.emit(
|
||||
Event.UPDATE_PROPERTY_FROM_INSTANCE,
|
||||
{
|
||||
component : this,
|
||||
property : 'instance',
|
||||
instanceProperty : 'instance'
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
//GENERATED_TEMPLATE_UPDATE_FROM_INSTANCE_OPTIONS_START
|
||||
|
|
|
@ -0,0 +1,398 @@
|
|||
//GENERATED_IMPORTS_START
|
||||
const Entity = require('../r3-entity/r3-entity.js');
|
||||
//GENERATED_IMPORTS_END
|
||||
|
||||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Event = require('../r3-event.js');
|
||||
const ComponentGraphicsGeometryBuffer = require('./r3-component-graphics-geometry-buffer.js');
|
||||
const RuntimeGraphics = require('../r3-runtime/r3-runtime-graphics.js');
|
||||
|
||||
/**
|
||||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
Class R3.Event.Object.Component.Graphics.Geometry.Buffer.Plane
|
||||
[Inherited from Event]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no 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:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from Component]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from ComponentGraphics]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from ComponentGraphicsGeometry]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from ComponentGraphicsGeometryBuffer]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to ComponentGraphicsGeometryBufferPlane]
|
||||
|
||||
Properties:
|
||||
|
||||
<no properties>
|
||||
|
||||
Static Properties:
|
||||
|
||||
<no static properties>
|
||||
|
||||
Methods:
|
||||
|
||||
<no methods>
|
||||
|
||||
Static Methods:
|
||||
|
||||
<no static methods>
|
||||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
runtime=null - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
runtimeClass=RuntimeGraphics
|
||||
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
|
||||
runtime
|
||||
runtimeClass
|
||||
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 ComponentGraphicsGeometryBufferPlane extends ComponentGraphicsGeometryBuffer {
|
||||
|
||||
//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;
|
||||
}
|
||||
/**
|
||||
* runtime - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
*/
|
||||
if (typeof options.runtime === 'undefined') {
|
||||
options.runtime = null;
|
||||
}
|
||||
/**
|
||||
* runtimeClass - No comment
|
||||
*/
|
||||
if (typeof options.runtimeClass === 'undefined') {
|
||||
options.runtimeClass = RuntimeGraphics;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_REQUIRED_COMPONENTS_START
|
||||
//GENERATED_REQUIRED_COMPONENTS_END
|
||||
|
||||
//GENERATED_AFTER_REQUIRED_COMPONENTS_START
|
||||
for (let r = 0; r < this.required.length; r++) {
|
||||
this.ready[r] = true;
|
||||
}
|
||||
//GENERATED_AFTER_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) {
|
||||
this.emit(Event.FINAL_INITIALIZE, this);
|
||||
} 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 = ComponentGraphicsGeometryBufferPlane;
|
|
@ -0,0 +1,380 @@
|
|||
//GENERATED_IMPORTS_START
|
||||
const Entity = require('../r3-entity/r3-entity.js');
|
||||
//GENERATED_IMPORTS_END
|
||||
|
||||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Event = require('../r3-event.js');
|
||||
const ComponentGraphicsGeometry = require('./r3-component-graphics-geometry.js');
|
||||
const RuntimeGraphics = require('../r3-runtime/r3-runtime-graphics.js');
|
||||
|
||||
/**
|
||||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
Class R3.Event.Object.Component.Graphics.Geometry.Buffer
|
||||
[Inherited from Event]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no 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:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from Component]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from ComponentGraphics]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from ComponentGraphicsGeometry]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to ComponentGraphicsGeometryBuffer]
|
||||
|
||||
Properties:
|
||||
|
||||
<no properties>
|
||||
|
||||
Static Properties:
|
||||
|
||||
<no static properties>
|
||||
|
||||
Methods:
|
||||
|
||||
<no methods>
|
||||
|
||||
Static Methods:
|
||||
|
||||
<no static methods>
|
||||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
runtime=null - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
runtimeClass=RuntimeGraphics
|
||||
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
|
||||
runtime
|
||||
runtimeClass
|
||||
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 ComponentGraphicsGeometryBuffer extends ComponentGraphicsGeometry {
|
||||
|
||||
//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;
|
||||
}
|
||||
/**
|
||||
* runtime - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
*/
|
||||
if (typeof options.runtime === 'undefined') {
|
||||
options.runtime = null;
|
||||
}
|
||||
/**
|
||||
* runtimeClass - No comment
|
||||
*/
|
||||
if (typeof options.runtimeClass === 'undefined') {
|
||||
options.runtimeClass = RuntimeGraphics;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_REQUIRED_COMPONENTS_START
|
||||
//GENERATED_REQUIRED_COMPONENTS_END
|
||||
|
||||
//GENERATED_AFTER_REQUIRED_COMPONENTS_START
|
||||
for (let r = 0; r < this.required.length; r++) {
|
||||
this.ready[r] = true;
|
||||
}
|
||||
//GENERATED_AFTER_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) {
|
||||
this.emit(Event.FINAL_INITIALIZE, this);
|
||||
} 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 = ComponentGraphicsGeometryBuffer;
|
|
@ -0,0 +1,362 @@
|
|||
//GENERATED_IMPORTS_START
|
||||
const Entity = require('../r3-entity/r3-entity.js');
|
||||
//GENERATED_IMPORTS_END
|
||||
|
||||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Event = require('../r3-event.js');
|
||||
const ComponentGraphics = require('./r3-component-graphics.js');
|
||||
const RuntimeGraphics = require('../r3-runtime/r3-runtime-graphics.js');
|
||||
|
||||
/**
|
||||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
Class R3.Event.Object.Component.Graphics.Geometry
|
||||
[Inherited from Event]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no 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:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from Component]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from ComponentGraphics]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to ComponentGraphicsGeometry]
|
||||
|
||||
Properties:
|
||||
|
||||
<no properties>
|
||||
|
||||
Static Properties:
|
||||
|
||||
<no static properties>
|
||||
|
||||
Methods:
|
||||
|
||||
<no methods>
|
||||
|
||||
Static Methods:
|
||||
|
||||
<no static methods>
|
||||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
runtime=null - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
runtimeClass=RuntimeGraphics
|
||||
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
|
||||
runtime
|
||||
runtimeClass
|
||||
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 ComponentGraphicsGeometry extends ComponentGraphics {
|
||||
|
||||
//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;
|
||||
}
|
||||
/**
|
||||
* runtime - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
*/
|
||||
if (typeof options.runtime === 'undefined') {
|
||||
options.runtime = null;
|
||||
}
|
||||
/**
|
||||
* runtimeClass - No comment
|
||||
*/
|
||||
if (typeof options.runtimeClass === 'undefined') {
|
||||
options.runtimeClass = RuntimeGraphics;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_REQUIRED_COMPONENTS_START
|
||||
//GENERATED_REQUIRED_COMPONENTS_END
|
||||
|
||||
//GENERATED_AFTER_REQUIRED_COMPONENTS_START
|
||||
for (let r = 0; r < this.required.length; r++) {
|
||||
this.ready[r] = true;
|
||||
}
|
||||
//GENERATED_AFTER_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) {
|
||||
this.emit(Event.FINAL_INITIALIZE, this);
|
||||
} 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 = ComponentGraphicsGeometry;
|
|
@ -5,14 +5,15 @@ const Entity = require('../r3-entity/r3-entity.js');
|
|||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Component = require('../r3-component/r3-component.js');
|
||||
const Event = require('../r3-event.js');
|
||||
const ComponentGraphics = require('./r3-component-graphics.js');
|
||||
const RuntimeGraphics = require('../r3-runtime/r3-runtime-graphics.js');
|
||||
|
||||
/**
|
||||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
Class R3.Event.Object.Component.Material
|
||||
Class R3.Event.Object.Component.Graphics.Image
|
||||
[Inherited from Event]
|
||||
|
||||
Inherited Properties:
|
||||
|
@ -85,7 +86,25 @@ const Event = require('../r3-event.js');
|
|||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to ComponentMaterial]
|
||||
[Inherited from ComponentGraphics]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to ComponentGraphicsImage]
|
||||
|
||||
Properties:
|
||||
|
||||
|
@ -107,6 +126,8 @@ const Event = require('../r3-event.js');
|
|||
|
||||
TEMPLATE_OPTIONS_START
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
runtime=null - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
runtimeClass=RuntimeGraphics
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
|
@ -129,6 +150,8 @@ const Event = require('../r3-event.js');
|
|||
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
instance
|
||||
runtime
|
||||
runtimeClass
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
|
@ -151,7 +174,7 @@ const Event = require('../r3-event.js');
|
|||
|
||||
**/
|
||||
|
||||
class ComponentMaterial extends Component {
|
||||
class ComponentGraphicsImage extends ComponentGraphics {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
@ -181,6 +204,18 @@ class ComponentMaterial extends Component {
|
|||
if (typeof options.instance === 'undefined') {
|
||||
options.instance = null;
|
||||
}
|
||||
/**
|
||||
* runtime - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
*/
|
||||
if (typeof options.runtime === 'undefined') {
|
||||
options.runtime = null;
|
||||
}
|
||||
/**
|
||||
* runtimeClass - No comment
|
||||
*/
|
||||
if (typeof options.runtimeClass === 'undefined') {
|
||||
options.runtimeClass = RuntimeGraphics;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
|
@ -324,4 +359,4 @@ class ComponentMaterial extends Component {
|
|||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
module.exports = ComponentMaterial;
|
||||
module.exports = ComponentGraphicsImage;
|
|
@ -0,0 +1,362 @@
|
|||
//GENERATED_IMPORTS_START
|
||||
const Entity = require('../r3-entity/r3-entity.js');
|
||||
//GENERATED_IMPORTS_END
|
||||
|
||||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Event = require('../r3-event.js');
|
||||
const ComponentGraphics = require('./r3-component-graphics.js');
|
||||
const RuntimeGraphics = require('../r3-runtime/r3-runtime-graphics.js');
|
||||
|
||||
/**
|
||||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
Class R3.Event.Object.Component.Graphics.Material
|
||||
[Inherited from Event]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no 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:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from Component]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from ComponentGraphics]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to ComponentGraphicsMaterial]
|
||||
|
||||
Properties:
|
||||
|
||||
<no properties>
|
||||
|
||||
Static Properties:
|
||||
|
||||
<no static properties>
|
||||
|
||||
Methods:
|
||||
|
||||
<no methods>
|
||||
|
||||
Static Methods:
|
||||
|
||||
<no static methods>
|
||||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
runtime=null - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
runtimeClass=RuntimeGraphics
|
||||
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
|
||||
runtime
|
||||
runtimeClass
|
||||
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 ComponentGraphicsMaterial extends ComponentGraphics {
|
||||
|
||||
//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;
|
||||
}
|
||||
/**
|
||||
* runtime - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
*/
|
||||
if (typeof options.runtime === 'undefined') {
|
||||
options.runtime = null;
|
||||
}
|
||||
/**
|
||||
* runtimeClass - No comment
|
||||
*/
|
||||
if (typeof options.runtimeClass === 'undefined') {
|
||||
options.runtimeClass = RuntimeGraphics;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_REQUIRED_COMPONENTS_START
|
||||
//GENERATED_REQUIRED_COMPONENTS_END
|
||||
|
||||
//GENERATED_AFTER_REQUIRED_COMPONENTS_START
|
||||
for (let r = 0; r < this.required.length; r++) {
|
||||
this.ready[r] = true;
|
||||
}
|
||||
//GENERATED_AFTER_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) {
|
||||
this.emit(Event.FINAL_INITIALIZE, this);
|
||||
} 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 = ComponentGraphicsMaterial;
|
|
@ -5,14 +5,15 @@ const Entity = require('../r3-entity/r3-entity.js');
|
|||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Component = require('../r3-component/r3-component.js');
|
||||
const Event = require('../r3-event.js');
|
||||
const ComponentGraphics = require('./r3-component-graphics.js');
|
||||
const RuntimeGraphics = require('../r3-runtime/r3-runtime-graphics.js');
|
||||
|
||||
/**
|
||||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
Class R3.Event.Object.Component.Mesh
|
||||
Class R3.Event.Object.Component.Graphics.Mesh
|
||||
[Inherited from Event]
|
||||
|
||||
Inherited Properties:
|
||||
|
@ -85,11 +86,30 @@ const Event = require('../r3-event.js');
|
|||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to ComponentMesh]
|
||||
[Inherited from ComponentGraphics]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to ComponentGraphicsMesh]
|
||||
|
||||
Properties:
|
||||
|
||||
- material (Default value null)
|
||||
- geometry (Default value null)
|
||||
|
||||
Static Properties:
|
||||
|
||||
|
@ -107,10 +127,13 @@ const Event = require('../r3-event.js');
|
|||
|
||||
TEMPLATE_OPTIONS_START
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
runtime=null - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
runtimeClass=RuntimeGraphics
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
material=null
|
||||
geometry=null
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
CUSTOM_REQUIRED_COMPONENTS_START
|
||||
|
@ -134,6 +157,8 @@ const Event = require('../r3-event.js');
|
|||
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
instance
|
||||
runtime
|
||||
runtimeClass
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
|
@ -156,7 +181,7 @@ const Event = require('../r3-event.js');
|
|||
|
||||
**/
|
||||
|
||||
class ComponentMesh extends Component {
|
||||
class ComponentGraphicsMesh extends ComponentGraphics {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
@ -186,6 +211,18 @@ class ComponentMesh extends Component {
|
|||
if (typeof options.instance === 'undefined') {
|
||||
options.instance = null;
|
||||
}
|
||||
/**
|
||||
* runtime - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
*/
|
||||
if (typeof options.runtime === 'undefined') {
|
||||
options.runtime = null;
|
||||
}
|
||||
/**
|
||||
* runtimeClass - No comment
|
||||
*/
|
||||
if (typeof options.runtimeClass === 'undefined') {
|
||||
options.runtimeClass = RuntimeGraphics;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
|
@ -195,6 +232,12 @@ class ComponentMesh extends Component {
|
|||
if (typeof options.material === 'undefined') {
|
||||
options.material = null;
|
||||
}
|
||||
/**
|
||||
* geometry - No comment
|
||||
*/
|
||||
if (typeof options.geometry === 'undefined') {
|
||||
options.geometry = null;
|
||||
}
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_REQUIRED_COMPONENTS_START
|
||||
|
@ -456,6 +499,20 @@ class ComponentMesh extends Component {
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (property === 'geometry') {
|
||||
this.instance.geometry = this.geometry;
|
||||
this.emit(
|
||||
Event.UPDATE_INSTANCE_PROPERTY,
|
||||
{
|
||||
component : this,
|
||||
property : 'geometry',
|
||||
instanceProperty : 'geometry'
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//GENERATED_UPDATE_INSTANCE_OPTIONS_END
|
||||
|
||||
//GENERATED_TEMPLATE_UPDATE_INSTANCE_OPTIONS_START
|
||||
|
@ -497,6 +554,20 @@ class ComponentMesh extends Component {
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (property === 'geometry' || property === 'all') {
|
||||
this.geometry = this.instance.geometry;
|
||||
this.emit(
|
||||
Event.UPDATE_PROPERTY_FROM_INSTANCE,
|
||||
{
|
||||
component : this,
|
||||
property : 'geometry',
|
||||
instanceProperty : 'geometry'
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
//GENERATED_TEMPLATE_UPDATE_FROM_INSTANCE_OPTIONS_START
|
||||
|
@ -540,4 +611,4 @@ class ComponentMesh extends Component {
|
|||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
module.exports = ComponentMesh;
|
||||
module.exports = ComponentGraphicsMesh;
|
|
@ -5,14 +5,15 @@ const Entity = require('../r3-entity/r3-entity.js');
|
|||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Component = require('../r3-component/r3-component.js');
|
||||
const Event = require('../r3-event.js');
|
||||
const ComponentGraphics = require('./r3-component-graphics.js');
|
||||
const RuntimeGraphics = require('../r3-runtime/r3-runtime-graphics.js');
|
||||
|
||||
/**
|
||||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
Class R3.Event.Object.Component.Geometry
|
||||
Class R3.Event.Object.Component.Graphics.Texture
|
||||
[Inherited from Event]
|
||||
|
||||
Inherited Properties:
|
||||
|
@ -85,7 +86,25 @@ const Event = require('../r3-event.js');
|
|||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to ComponentGeometry]
|
||||
[Inherited from ComponentGraphics]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to ComponentGraphicsTexture]
|
||||
|
||||
Properties:
|
||||
|
||||
|
@ -107,6 +126,8 @@ const Event = require('../r3-event.js');
|
|||
|
||||
TEMPLATE_OPTIONS_START
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
runtime=null - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
runtimeClass=RuntimeGraphics
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
|
@ -129,6 +150,8 @@ const Event = require('../r3-event.js');
|
|||
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
instance
|
||||
runtime
|
||||
runtimeClass
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
|
@ -151,7 +174,7 @@ const Event = require('../r3-event.js');
|
|||
|
||||
**/
|
||||
|
||||
class ComponentGeometry extends Component {
|
||||
class ComponentGraphicsTexture extends ComponentGraphics {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
@ -181,6 +204,18 @@ class ComponentGeometry extends Component {
|
|||
if (typeof options.instance === 'undefined') {
|
||||
options.instance = null;
|
||||
}
|
||||
/**
|
||||
* runtime - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
*/
|
||||
if (typeof options.runtime === 'undefined') {
|
||||
options.runtime = null;
|
||||
}
|
||||
/**
|
||||
* runtimeClass - No comment
|
||||
*/
|
||||
if (typeof options.runtimeClass === 'undefined') {
|
||||
options.runtimeClass = RuntimeGraphics;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
|
@ -324,4 +359,4 @@ class ComponentGeometry extends Component {
|
|||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
module.exports = ComponentGeometry;
|
||||
module.exports = ComponentGraphicsTexture;
|
|
@ -5,8 +5,8 @@ const Entity = require('../r3-entity/r3-entity.js');
|
|||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Component = require('../r3-component/r3-component.js');
|
||||
const Event = require('../r3-event.js');
|
||||
const RuntimeGraphics = require('../r3-runtime/r3-runtime-graphics.js');
|
||||
|
||||
/**
|
||||
|
||||
|
@ -107,6 +107,8 @@ const Event = require('../r3-event.js');
|
|||
|
||||
TEMPLATE_OPTIONS_START
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
runtime=null - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
runtimeClass=RuntimeGraphics
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
|
@ -129,6 +131,8 @@ const Event = require('../r3-event.js');
|
|||
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
instance
|
||||
runtime
|
||||
runtimeClass
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
|
@ -181,6 +185,18 @@ class ComponentGraphics extends Component {
|
|||
if (typeof options.instance === 'undefined') {
|
||||
options.instance = null;
|
||||
}
|
||||
/**
|
||||
* runtime - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
*/
|
||||
if (typeof options.runtime === 'undefined') {
|
||||
options.runtime = null;
|
||||
}
|
||||
/**
|
||||
* runtimeClass - No comment
|
||||
*/
|
||||
if (typeof options.runtimeClass === 'undefined') {
|
||||
options.runtimeClass = RuntimeGraphics;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
|
|
|
@ -5,15 +5,15 @@ const Entity = require('../r3-entity/r3-entity.js');
|
|||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Component = require('../r3-component/r3-component.js');
|
||||
const Event = require('../r3-event.js');
|
||||
const ComponentGeometry = require('./r3-component-geometry.js');
|
||||
const ComponentInput = require('./r3-component-input.js');
|
||||
const RuntimeDOM = require('../r3-runtime/r3-runtime-d-o-m.js');
|
||||
|
||||
/**
|
||||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
Class R3.Event.Object.Component.Geometry.BufferGeometry
|
||||
Class R3.Event.Object.Component.Input.Touch
|
||||
[Inherited from Event]
|
||||
|
||||
Inherited Properties:
|
||||
|
@ -86,7 +86,7 @@ const ComponentGeometry = require('./r3-component-geometry.js');
|
|||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from ComponentGeometry]
|
||||
[Inherited from ComponentInput]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
|
@ -104,7 +104,7 @@ const ComponentGeometry = require('./r3-component-geometry.js');
|
|||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to ComponentBufferGeometry]
|
||||
[Belonging to ComponentInputTouch]
|
||||
|
||||
Properties:
|
||||
|
||||
|
@ -126,6 +126,8 @@ const ComponentGeometry = require('./r3-component-geometry.js');
|
|||
|
||||
TEMPLATE_OPTIONS_START
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
runtime=null - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
runtimeClass=RuntimeDOM
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
|
@ -148,6 +150,8 @@ const ComponentGeometry = require('./r3-component-geometry.js');
|
|||
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
instance
|
||||
runtime
|
||||
runtimeClass
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
|
@ -170,7 +174,7 @@ const ComponentGeometry = require('./r3-component-geometry.js');
|
|||
|
||||
**/
|
||||
|
||||
class ComponentBufferGeometry extends ComponentGeometry {
|
||||
class ComponentInputTouch extends ComponentInput {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
@ -200,6 +204,18 @@ class ComponentBufferGeometry extends ComponentGeometry {
|
|||
if (typeof options.instance === 'undefined') {
|
||||
options.instance = null;
|
||||
}
|
||||
/**
|
||||
* runtime - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
*/
|
||||
if (typeof options.runtime === 'undefined') {
|
||||
options.runtime = null;
|
||||
}
|
||||
/**
|
||||
* runtimeClass - No comment
|
||||
*/
|
||||
if (typeof options.runtimeClass === 'undefined') {
|
||||
options.runtimeClass = RuntimeDOM;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
|
@ -343,4 +359,4 @@ class ComponentBufferGeometry extends ComponentGeometry {
|
|||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
module.exports = ComponentBufferGeometry;
|
||||
module.exports = ComponentInputTouch;
|
|
@ -5,8 +5,8 @@ const Entity = require('../r3-entity/r3-entity.js');
|
|||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Component = require('../r3-component/r3-component.js');
|
||||
const Event = require('../r3-event.js');
|
||||
const RuntimeDOM = require('../r3-runtime/r3-runtime-d-o-m.js');
|
||||
|
||||
/**
|
||||
|
||||
|
@ -107,6 +107,8 @@ const Event = require('../r3-event.js');
|
|||
|
||||
TEMPLATE_OPTIONS_START
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
runtime=null - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
runtimeClass=RuntimeDOM
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
|
@ -129,6 +131,8 @@ const Event = require('../r3-event.js');
|
|||
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
instance
|
||||
runtime
|
||||
runtimeClass
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
|
@ -181,6 +185,18 @@ class ComponentInput extends Component {
|
|||
if (typeof options.instance === 'undefined') {
|
||||
options.instance = null;
|
||||
}
|
||||
/**
|
||||
* runtime - Holds the current runtime instance of this Component based on the Runtime Class
|
||||
*/
|
||||
if (typeof options.runtime === 'undefined') {
|
||||
options.runtime = null;
|
||||
}
|
||||
/**
|
||||
* runtimeClass - No comment
|
||||
*/
|
||||
if (typeof options.runtimeClass === 'undefined') {
|
||||
options.runtimeClass = RuntimeDOM;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
|
|
|
@ -1,327 +0,0 @@
|
|||
//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 Event = require('../r3-event.js');
|
||||
|
||||
/**
|
||||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
Class R3.Event.Object.Component.Texture
|
||||
[Inherited from Event]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no 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:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from Component]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to ComponentTexture]
|
||||
|
||||
Properties:
|
||||
|
||||
<no properties>
|
||||
|
||||
Static Properties:
|
||||
|
||||
<no static properties>
|
||||
|
||||
Methods:
|
||||
|
||||
<no methods>
|
||||
|
||||
Static Methods:
|
||||
|
||||
<no 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 ComponentTexture 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
|
||||
|
||||
//GENERATED_AFTER_REQUIRED_COMPONENTS_START
|
||||
for (let r = 0; r < this.required.length; r++) {
|
||||
this.ready[r] = true;
|
||||
}
|
||||
//GENERATED_AFTER_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) {
|
||||
this.emit(Event.FINAL_INITIALIZE, this);
|
||||
} 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 = ComponentTexture;
|
|
@ -1,429 +0,0 @@
|
|||
//GENERATED_IMPORTS_START
|
||||
const Entity = require('../r3-entity/r3-entity.js');
|
||||
//GENERATED_IMPORTS_END
|
||||
|
||||
//CUSTOM_IMPORTS_START
|
||||
const ComponentDOM = require('../r3-component/r3-component-d-o-m.js');
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Component = require('../r3-component/r3-component.js');
|
||||
const Event = require('../r3-event.js');
|
||||
const ComponentInput = require('./r3-component-input.js');
|
||||
|
||||
/**
|
||||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
Class R3.Event.Object.Component.Input.Touch
|
||||
[Inherited from Event]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no 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:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from Component]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from ComponentInput]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to ComponentTouch]
|
||||
|
||||
Properties:
|
||||
|
||||
- domComponent (Default value null - A Touch Component requires a Canvas component to bind to.)
|
||||
|
||||
Static Properties:
|
||||
|
||||
<no static properties>
|
||||
|
||||
Methods:
|
||||
|
||||
<no methods>
|
||||
|
||||
Static Methods:
|
||||
|
||||
<no 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
|
||||
domComponent=null - A Touch Component requires a Canvas component to bind to.
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
CUSTOM_REQUIRED_COMPONENTS_START
|
||||
[0]domComponent=ComponentDOM
|
||||
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 ComponentTouch extends ComponentInput {
|
||||
|
||||
//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
|
||||
/**
|
||||
* domComponent - A Touch Component requires a Canvas component to bind to.
|
||||
*/
|
||||
if (typeof options.domComponent === 'undefined') {
|
||||
options.domComponent = null;
|
||||
}
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_REQUIRED_COMPONENTS_START
|
||||
/**
|
||||
* domComponent - No comment
|
||||
*/
|
||||
if (typeof options.required[0] === 'undefined') {
|
||||
options.required[0] = {};
|
||||
}
|
||||
|
||||
options.required[0].domComponent = ComponentDOM;
|
||||
|
||||
if (typeof this._cache === 'undefined') {
|
||||
this._cache = {};
|
||||
}
|
||||
|
||||
this._cache['domComponent'] = options.domComponent;
|
||||
Object.defineProperty(
|
||||
this,
|
||||
'domComponent',
|
||||
{
|
||||
configurable : true,
|
||||
enumerable : true,
|
||||
set: (x) => {
|
||||
Event.Emit(
|
||||
Event.OBJECT_PROPERTY_UPDATE,
|
||||
{
|
||||
r3Object : this,
|
||||
property : 'domComponent',
|
||||
value : x
|
||||
}
|
||||
);
|
||||
this._cache['domComponent'] = x;
|
||||
Event.Emit(
|
||||
Event.OBJECT_PROPERTY_UPDATED,
|
||||
{
|
||||
r3Object : this,
|
||||
property : 'domComponent',
|
||||
value : x
|
||||
}
|
||||
);
|
||||
return x;
|
||||
},
|
||||
get : () => {
|
||||
return this._cache['domComponent'];
|
||||
}
|
||||
}
|
||||
)
|
||||
//GENERATED_REQUIRED_COMPONENTS_END
|
||||
|
||||
//GENERATED_AFTER_REQUIRED_COMPONENTS_START
|
||||
for (let r = 0; r < this.required.length; r++) {
|
||||
this.ready[r] = true;
|
||||
}
|
||||
//GENERATED_AFTER_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
|
||||
Event.Emit(Event.TOUCH_COMPONENT_INITIALIZED, this);
|
||||
//CUSTOM_INITIALIZE_METHOD_END
|
||||
|
||||
//GENERATED_INITIALIZE_METHOD_AFTER_START
|
||||
if (this.initializeDepth === this.maxDepth) {
|
||||
this.emit(Event.FINAL_INITIALIZE, this);
|
||||
} 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
|
||||
if (property === 'domComponent') {
|
||||
this.instance.domComponent = this.domComponent;
|
||||
this.emit(
|
||||
Event.UPDATE_INSTANCE_PROPERTY,
|
||||
{
|
||||
component : this,
|
||||
property : 'domComponent',
|
||||
instanceProperty : 'domComponent'
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//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
|
||||
if (property === 'domComponent' || property === 'all') {
|
||||
this.domComponent = this.instance.domComponent;
|
||||
this.emit(
|
||||
Event.UPDATE_PROPERTY_FROM_INSTANCE,
|
||||
{
|
||||
component : this,
|
||||
property : 'domComponent',
|
||||
instanceProperty : 'domComponent'
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//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 = ComponentTouch;
|
|
@ -329,20 +329,21 @@ class Component extends R3Object {
|
|||
|
||||
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
Component.CODE = 0x0;
|
||||
Component.DOM = 0x1;
|
||||
Component.CANVAS = 0x2;
|
||||
Component.TEST = 0x3;
|
||||
Component.GEOMETRY = 0x4;
|
||||
Component.BUFFER_GEOMETRY = 0x5;
|
||||
Component.PLANE_GEOMETRY = 0x6;
|
||||
Component.GRAPHICS = 0x7;
|
||||
Component.IMAGE = 0x8;
|
||||
Component.INPUT = 0x9;
|
||||
Component.TOUCH = 0xa;
|
||||
Component.MATERIAL = 0xb;
|
||||
Component.MESH = 0xc;
|
||||
Component.TEXTURE = 0xd;
|
||||
Component.MAX_COMPONENT = 0xe;
|
||||
Component.CODE_JS = 0x1;
|
||||
Component.DOM = 0x2;
|
||||
Component.DOM_CANVAS = 0x3;
|
||||
Component.DOM_IMAGE = 0x4;
|
||||
Component.GRAPHICS = 0x5;
|
||||
Component.GRAPHICS_GEOMETRY = 0x6;
|
||||
Component.GRAPHICS_GEOMETRY_BUFFER = 0x7;
|
||||
Component.GRAPHICS_GEOMETRY_BUFFER_PLANE = 0x8;
|
||||
Component.GRAPHICS_IMAGE = 0x9;
|
||||
Component.GRAPHICS_MATERIAL = 0xa;
|
||||
Component.GRAPHICS_MESH = 0xb;
|
||||
Component.GRAPHICS_TEXTURE = 0xc;
|
||||
Component.INPUT = 0xd;
|
||||
Component.INPUT_TOUCH = 0xe;
|
||||
Component.MAX_COMPONENT = 0xf;
|
||||
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
|
|
|
@ -361,107 +361,101 @@ class Event {
|
|||
//GENERATED_EVENTS_START
|
||||
Event.BEFORE_RENDER = 0x1;
|
||||
Event.BLACKLISTED_COMPONENT_INSTANCE_REQUEST = 0x2;
|
||||
Event.CANVAS_COMPONENT_INITIALIZED = 0x3;
|
||||
Event.COMPONENT_CREATED = 0x4;
|
||||
Event.COMPONENT_INITIALIZED = 0x5;
|
||||
Event.CREATE_INSTANCE_BEFORE = 0x6;
|
||||
Event.DISPOSE_INSTANCE = 0x7;
|
||||
Event.DISPOSE_OBJECT = 0x8;
|
||||
Event.DOM_COMPONENT_INITIALIZED = 0x9;
|
||||
Event.ENTITY_CREATED = 0xa;
|
||||
Event.ENTITY_INITIALIZED = 0xb;
|
||||
Event.ENTITY_STARTED = 0xc;
|
||||
Event.FINAL_INITIALIZE = 0xd;
|
||||
Event.GET_API_URL = 0xe;
|
||||
Event.GET_RUNTIME = 0xf;
|
||||
Event.GET_WINDOW_SIZE = 0x10;
|
||||
Event.GRAPHICS_COMPONENT_INITIALIZED = 0x11;
|
||||
Event.IMAGE_COMPONENT_INITIALIZED = 0x12;
|
||||
Event.IMAGE_INSTANCE_CREATED = 0x13;
|
||||
Event.INPUT_COMPONENT_INITIALIZED = 0x14;
|
||||
Event.INSTANCE_CREATED = 0x15;
|
||||
Event.INSTANCE_DISPOSED = 0x16;
|
||||
Event.KEYBOARD_DOWN = 0x17;
|
||||
Event.KEYBOARD_UP = 0x18;
|
||||
Event.MOUSE_DOWN = 0x19;
|
||||
Event.MOUSE_MOVE = 0x1a;
|
||||
Event.MOUSE_UP = 0x1b;
|
||||
Event.MOUSE_WHEEL = 0x1c;
|
||||
Event.OBJECT_CREATED = 0x1d;
|
||||
Event.OBJECT_PROPERTY_UPDATE = 0x1e;
|
||||
Event.OBJECT_PROPERTY_UPDATED = 0x1f;
|
||||
Event.ON_READY_STATE_CHANGE = 0x20;
|
||||
Event.PAUSE = 0x21;
|
||||
Event.PROJECT_INITIALIZED = 0x22;
|
||||
Event.RESTART = 0x23;
|
||||
Event.RUNTIME_CREATED = 0x24;
|
||||
Event.SLIDER_ENTITY_INITIALIZED = 0x25;
|
||||
Event.START = 0x26;
|
||||
Event.TOUCH_CANCEL = 0x27;
|
||||
Event.TOUCH_COMPONENT_INITIALIZED = 0x28;
|
||||
Event.TOUCH_END = 0x29;
|
||||
Event.TOUCH_MOVE = 0x2a;
|
||||
Event.TOUCH_START = 0x2b;
|
||||
Event.UPDATE_FROM_INSTANCE_AFTER = 0x2c;
|
||||
Event.UPDATE_FROM_INSTANCE_BEFORE = 0x2d;
|
||||
Event.UPDATE_INSTANCE_AFTER = 0x2e;
|
||||
Event.UPDATE_INSTANCE_BEFORE = 0x2f;
|
||||
Event.UPDATE_INSTANCE_PROPERTY = 0x30;
|
||||
Event.UPDATE_PROPERTY_FROM_INSTANCE = 0x31;
|
||||
Event.MAX_EVENTS = 0x32;
|
||||
Event.COMPONENT_CREATED = 0x3;
|
||||
Event.COMPONENT_INITIALIZED = 0x4;
|
||||
Event.CREATE_INSTANCE_BEFORE = 0x5;
|
||||
Event.DISPOSE_INSTANCE = 0x6;
|
||||
Event.DISPOSE_OBJECT = 0x7;
|
||||
Event.DOM_COMPONENT_INITIALIZED = 0x8;
|
||||
Event.ENTITY_CREATED = 0x9;
|
||||
Event.ENTITY_INITIALIZED = 0xa;
|
||||
Event.ENTITY_STARTED = 0xb;
|
||||
Event.FINAL_INITIALIZE = 0xc;
|
||||
Event.GET_API_URL = 0xd;
|
||||
Event.GET_RUNTIME = 0xe;
|
||||
Event.GET_WINDOW_SIZE = 0xf;
|
||||
Event.GRAPHICS_COMPONENT_INITIALIZED = 0x10;
|
||||
Event.IMAGE_INSTANCE_CREATED = 0x11;
|
||||
Event.INPUT_COMPONENT_INITIALIZED = 0x12;
|
||||
Event.INSTANCE_CREATED = 0x13;
|
||||
Event.INSTANCE_DISPOSED = 0x14;
|
||||
Event.KEYBOARD_DOWN = 0x15;
|
||||
Event.KEYBOARD_UP = 0x16;
|
||||
Event.MOUSE_DOWN = 0x17;
|
||||
Event.MOUSE_MOVE = 0x18;
|
||||
Event.MOUSE_UP = 0x19;
|
||||
Event.MOUSE_WHEEL = 0x1a;
|
||||
Event.OBJECT_CREATED = 0x1b;
|
||||
Event.OBJECT_PROPERTY_UPDATE = 0x1c;
|
||||
Event.OBJECT_PROPERTY_UPDATED = 0x1d;
|
||||
Event.ON_READY_STATE_CHANGE = 0x1e;
|
||||
Event.PAUSE = 0x1f;
|
||||
Event.PROJECT_INITIALIZED = 0x20;
|
||||
Event.RESTART = 0x21;
|
||||
Event.RUNTIME_CREATED = 0x22;
|
||||
Event.SLIDER_ENTITY_INITIALIZED = 0x23;
|
||||
Event.START = 0x24;
|
||||
Event.TOUCH_CANCEL = 0x25;
|
||||
Event.TOUCH_END = 0x26;
|
||||
Event.TOUCH_MOVE = 0x27;
|
||||
Event.TOUCH_START = 0x28;
|
||||
Event.UPDATE_FROM_INSTANCE_AFTER = 0x29;
|
||||
Event.UPDATE_FROM_INSTANCE_BEFORE = 0x2a;
|
||||
Event.UPDATE_INSTANCE_AFTER = 0x2b;
|
||||
Event.UPDATE_INSTANCE_BEFORE = 0x2c;
|
||||
Event.UPDATE_INSTANCE_PROPERTY = 0x2d;
|
||||
Event.UPDATE_PROPERTY_FROM_INSTANCE = 0x2e;
|
||||
Event.MAX_EVENTS = 0x2f;
|
||||
|
||||
Event.GetEventName = function(eventId) {
|
||||
|
||||
switch(eventId) {
|
||||
case 0x1 : return 'before_render';
|
||||
case 0x2 : return 'blacklisted_component_instance_request';
|
||||
case 0x3 : return 'canvas_component_initialized';
|
||||
case 0x4 : return 'component_created';
|
||||
case 0x5 : return 'component_initialized';
|
||||
case 0x6 : return 'create_instance_before';
|
||||
case 0x7 : return 'dispose_instance';
|
||||
case 0x8 : return 'dispose_object';
|
||||
case 0x9 : return 'dom_component_initialized';
|
||||
case 0xa : return 'entity_created';
|
||||
case 0xb : return 'entity_initialized';
|
||||
case 0xc : return 'entity_started';
|
||||
case 0xd : return 'final_initialize';
|
||||
case 0xe : return 'get_api_url';
|
||||
case 0xf : return 'get_runtime';
|
||||
case 0x10 : return 'get_window_size';
|
||||
case 0x11 : return 'graphics_component_initialized';
|
||||
case 0x12 : return 'image_component_initialized';
|
||||
case 0x13 : return 'image_instance_created';
|
||||
case 0x14 : return 'input_component_initialized';
|
||||
case 0x15 : return 'instance_created';
|
||||
case 0x16 : return 'instance_disposed';
|
||||
case 0x17 : return 'keyboard_down';
|
||||
case 0x18 : return 'keyboard_up';
|
||||
case 0x19 : return 'mouse_down';
|
||||
case 0x1a : return 'mouse_move';
|
||||
case 0x1b : return 'mouse_up';
|
||||
case 0x1c : return 'mouse_wheel';
|
||||
case 0x1d : return 'object_created';
|
||||
case 0x1e : return 'object_property_update';
|
||||
case 0x1f : return 'object_property_updated';
|
||||
case 0x20 : return 'on_ready_state_change';
|
||||
case 0x21 : return 'pause';
|
||||
case 0x22 : return 'project_initialized';
|
||||
case 0x23 : return 'restart';
|
||||
case 0x24 : return 'runtime_created';
|
||||
case 0x25 : return 'slider_entity_initialized';
|
||||
case 0x26 : return 'start';
|
||||
case 0x27 : return 'touch_cancel';
|
||||
case 0x28 : return 'touch_component_initialized';
|
||||
case 0x29 : return 'touch_end';
|
||||
case 0x2a : return 'touch_move';
|
||||
case 0x2b : return 'touch_start';
|
||||
case 0x2c : return 'update_from_instance_after';
|
||||
case 0x2d : return 'update_from_instance_before';
|
||||
case 0x2e : return 'update_instance_after';
|
||||
case 0x2f : return 'update_instance_before';
|
||||
case 0x30 : return 'update_instance_property';
|
||||
case 0x31 : return 'update_property_from_instance';
|
||||
case 0x3 : return 'component_created';
|
||||
case 0x4 : return 'component_initialized';
|
||||
case 0x5 : return 'create_instance_before';
|
||||
case 0x6 : return 'dispose_instance';
|
||||
case 0x7 : return 'dispose_object';
|
||||
case 0x8 : return 'dom_component_initialized';
|
||||
case 0x9 : return 'entity_created';
|
||||
case 0xa : return 'entity_initialized';
|
||||
case 0xb : return 'entity_started';
|
||||
case 0xc : return 'final_initialize';
|
||||
case 0xd : return 'get_api_url';
|
||||
case 0xe : return 'get_runtime';
|
||||
case 0xf : return 'get_window_size';
|
||||
case 0x10 : return 'graphics_component_initialized';
|
||||
case 0x11 : return 'image_instance_created';
|
||||
case 0x12 : return 'input_component_initialized';
|
||||
case 0x13 : return 'instance_created';
|
||||
case 0x14 : return 'instance_disposed';
|
||||
case 0x15 : return 'keyboard_down';
|
||||
case 0x16 : return 'keyboard_up';
|
||||
case 0x17 : return 'mouse_down';
|
||||
case 0x18 : return 'mouse_move';
|
||||
case 0x19 : return 'mouse_up';
|
||||
case 0x1a : return 'mouse_wheel';
|
||||
case 0x1b : return 'object_created';
|
||||
case 0x1c : return 'object_property_update';
|
||||
case 0x1d : return 'object_property_updated';
|
||||
case 0x1e : return 'on_ready_state_change';
|
||||
case 0x1f : return 'pause';
|
||||
case 0x20 : return 'project_initialized';
|
||||
case 0x21 : return 'restart';
|
||||
case 0x22 : return 'runtime_created';
|
||||
case 0x23 : return 'slider_entity_initialized';
|
||||
case 0x24 : return 'start';
|
||||
case 0x25 : return 'touch_cancel';
|
||||
case 0x26 : return 'touch_end';
|
||||
case 0x27 : return 'touch_move';
|
||||
case 0x28 : return 'touch_start';
|
||||
case 0x29 : return 'update_from_instance_after';
|
||||
case 0x2a : return 'update_from_instance_before';
|
||||
case 0x2b : return 'update_instance_after';
|
||||
case 0x2c : return 'update_instance_before';
|
||||
case 0x2d : return 'update_instance_property';
|
||||
case 0x2e : return 'update_property_from_instance';
|
||||
default :
|
||||
throw new Error('Event type not defined : ' + eventId);
|
||||
}
|
||||
|
|
|
@ -5,19 +5,20 @@ const Entity = require('../r3-entity/r3-entity.js');
|
|||
const EntitySlider = require('../r3-entity/r3-entity-slider.js');
|
||||
const Component = require('../r3-component/r3-component.js');
|
||||
const ComponentCode = require('../r3-component/r3-component-code.js');
|
||||
const ComponentCodeJS = require('../r3-component/r3-component-code-j-s.js');
|
||||
const ComponentDOM = require('../r3-component/r3-component-d-o-m.js');
|
||||
const ComponentCanvas = require('../r3-component/r3-component-canvas.js');
|
||||
const ComponentTest = require('../r3-component/r3-component-test.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 ComponentDOMCanvas = require('../r3-component/r3-component-d-o-m-canvas.js');
|
||||
const ComponentDOMImage = require('../r3-component/r3-component-d-o-m-image.js');
|
||||
const ComponentGraphics = require('../r3-component/r3-component-graphics.js');
|
||||
const ComponentImage = require('../r3-component/r3-component-image.js');
|
||||
const ComponentGraphicsGeometry = require('../r3-component/r3-component-graphics-geometry.js');
|
||||
const ComponentGraphicsGeometryBuffer = require('../r3-component/r3-component-graphics-geometry-buffer.js');
|
||||
const ComponentGraphicsGeometryBufferPlane = require('../r3-component/r3-component-graphics-geometry-buffer-plane.js');
|
||||
const ComponentGraphicsImage = require('../r3-component/r3-component-graphics-image.js');
|
||||
const ComponentGraphicsMaterial = require('../r3-component/r3-component-graphics-material.js');
|
||||
const ComponentGraphicsMesh = require('../r3-component/r3-component-graphics-mesh.js');
|
||||
const ComponentGraphicsTexture = require('../r3-component/r3-component-graphics-texture.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 ComponentInputTouch = require('../r3-component/r3-component-input-touch.js');
|
||||
//GENERATED_IMPORTS_END
|
||||
|
||||
//GENERATED_INDEX_BODY_START
|
||||
|
@ -26,19 +27,20 @@ R3Object.Entity = Entity;
|
|||
R3Object.Entity.Slider = EntitySlider;
|
||||
R3Object.Component = Component;
|
||||
R3Object.Component.Code = ComponentCode;
|
||||
R3Object.Component.Code.JS = ComponentCodeJS;
|
||||
R3Object.Component.DOM = ComponentDOM;
|
||||
R3Object.Component.DOM.Canvas = ComponentCanvas;
|
||||
R3Object.Component.DOM.Test = ComponentTest;
|
||||
R3Object.Component.Geometry = ComponentGeometry;
|
||||
R3Object.Component.Geometry.BufferGeometry = ComponentBufferGeometry;
|
||||
R3Object.Component.Geometry.BufferGeometry.PlaneGeometry = ComponentPlaneGeometry;
|
||||
R3Object.Component.DOM.Canvas = ComponentDOMCanvas;
|
||||
R3Object.Component.DOM.Image = ComponentDOMImage;
|
||||
R3Object.Component.Graphics = ComponentGraphics;
|
||||
R3Object.Component.Graphics.Image = ComponentImage;
|
||||
R3Object.Component.Graphics.Geometry = ComponentGraphicsGeometry;
|
||||
R3Object.Component.Graphics.Geometry.Buffer = ComponentGraphicsGeometryBuffer;
|
||||
R3Object.Component.Graphics.Geometry.Buffer.Plane = ComponentGraphicsGeometryBufferPlane;
|
||||
R3Object.Component.Graphics.Image = ComponentGraphicsImage;
|
||||
R3Object.Component.Graphics.Material = ComponentGraphicsMaterial;
|
||||
R3Object.Component.Graphics.Mesh = ComponentGraphicsMesh;
|
||||
R3Object.Component.Graphics.Texture = ComponentGraphicsTexture;
|
||||
R3Object.Component.Input = ComponentInput;
|
||||
R3Object.Component.Input.Touch = ComponentTouch;
|
||||
R3Object.Component.Material = ComponentMaterial;
|
||||
R3Object.Component.Mesh = ComponentMesh;
|
||||
R3Object.Component.Texture = ComponentTexture;
|
||||
R3Object.Component.Input.Touch = ComponentInputTouch;
|
||||
//GENERATED_INDEX_BODY_END
|
||||
|
||||
//GENERATED_EXPORTS_START
|
||||
|
|
|
@ -416,20 +416,21 @@ R3Object.ENTITY = 0x1;
|
|||
R3Object.ENTITY_SLIDER = 0x2;
|
||||
R3Object.COMPONENT = 0x3;
|
||||
R3Object.COMPONENT_CODE = 0x4;
|
||||
R3Object.COMPONENT_DOM = 0x5;
|
||||
R3Object.COMPONENT_CANVAS = 0x6;
|
||||
R3Object.COMPONENT_TEST = 0x7;
|
||||
R3Object.COMPONENT_GEOMETRY = 0x8;
|
||||
R3Object.COMPONENT_BUFFER_GEOMETRY = 0x9;
|
||||
R3Object.COMPONENT_PLANE_GEOMETRY = 0xa;
|
||||
R3Object.COMPONENT_GRAPHICS = 0xb;
|
||||
R3Object.COMPONENT_IMAGE = 0xc;
|
||||
R3Object.COMPONENT_INPUT = 0xd;
|
||||
R3Object.COMPONENT_TOUCH = 0xe;
|
||||
R3Object.COMPONENT_MATERIAL = 0xf;
|
||||
R3Object.COMPONENT_MESH = 0x10;
|
||||
R3Object.COMPONENT_TEXTURE = 0x11;
|
||||
R3Object.MAX_R3OBJECT = 0x12;
|
||||
R3Object.COMPONENT_CODE_JS = 0x5;
|
||||
R3Object.COMPONENT_DOM = 0x6;
|
||||
R3Object.COMPONENT_DOM_CANVAS = 0x7;
|
||||
R3Object.COMPONENT_DOM_IMAGE = 0x8;
|
||||
R3Object.COMPONENT_GRAPHICS = 0x9;
|
||||
R3Object.COMPONENT_GRAPHICS_GEOMETRY = 0xa;
|
||||
R3Object.COMPONENT_GRAPHICS_GEOMETRY_BUFFER = 0xb;
|
||||
R3Object.COMPONENT_GRAPHICS_GEOMETRY_BUFFER_PLANE = 0xc;
|
||||
R3Object.COMPONENT_GRAPHICS_IMAGE = 0xd;
|
||||
R3Object.COMPONENT_GRAPHICS_MATERIAL = 0xe;
|
||||
R3Object.COMPONENT_GRAPHICS_MESH = 0xf;
|
||||
R3Object.COMPONENT_GRAPHICS_TEXTURE = 0x10;
|
||||
R3Object.COMPONENT_INPUT = 0x11;
|
||||
R3Object.COMPONENT_INPUT_TOUCH = 0x12;
|
||||
R3Object.MAX_R3OBJECT = 0x13;
|
||||
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
|
|
|
@ -1,36 +1,44 @@
|
|||
//GENERATED_IMPORTS_START
|
||||
const Runtime = require('./r3-runtime.js');
|
||||
const RuntimeAudio = require('./r3-runtime-audio.js');
|
||||
const RuntimeAudioThree = require('./r3-runtime-audio-three.js');
|
||||
const RuntimeCode = require('./r3-runtime-code.js');
|
||||
const RuntimeCodeJS = require('./r3-runtime-code-j-s.js');
|
||||
const RuntimeCoder = require('./r3-runtime-coder.js');
|
||||
const RuntimeCodeMirror = require('./r3-runtime-code-mirror.js');
|
||||
const RuntimeCoderCodeMirror = require('./r3-runtime-coder-code-mirror.js');
|
||||
const RuntimeDOM = require('./r3-runtime-d-o-m.js');
|
||||
const RuntimeJSDOM = require('./r3-runtime-j-s-d-o-m.js');
|
||||
const RuntimeWebDOM = require('./r3-runtime-web-d-o-m.js');
|
||||
const RuntimeDOMJS = require('./r3-runtime-d-o-m-j-s.js');
|
||||
const RuntimeDOMWeb = require('./r3-runtime-d-o-m-web.js');
|
||||
const RuntimeGUI = require('./r3-runtime-g-u-i.js');
|
||||
const RuntimeControlKit = require('./r3-runtime-control-kit.js');
|
||||
const RuntimeGUIControlKit = require('./r3-runtime-g-u-i-control-kit.js');
|
||||
const RuntimeGraphics = require('./r3-runtime-graphics.js');
|
||||
const RuntimeThree = require('./r3-runtime-three.js');
|
||||
const RuntimeGraphicsThree = require('./r3-runtime-graphics-three.js');
|
||||
const RuntimePhysics = require('./r3-runtime-physics.js');
|
||||
const RuntimeBullet = require('./r3-runtime-bullet.js');
|
||||
const RuntimePhysicsBullet = require('./r3-runtime-physics-bullet.js');
|
||||
const RuntimeSocket = require('./r3-runtime-socket.js');
|
||||
const RuntimeStatistics = require('./r3-runtime-statistics.js');
|
||||
const RuntimeStats = require('./r3-runtime-stats.js');
|
||||
const RuntimeStatisticsStats = require('./r3-runtime-statistics-stats.js');
|
||||
//GENERATED_IMPORTS_END
|
||||
|
||||
//GENERATED_INDEX_BODY_START
|
||||
Runtime.Audio = RuntimeAudio;
|
||||
Runtime.Audio.Three = RuntimeAudioThree;
|
||||
Runtime.Code = RuntimeCode;
|
||||
Runtime.Code.JS = RuntimeCodeJS;
|
||||
Runtime.Coder = RuntimeCoder;
|
||||
Runtime.Coder.CodeMirror = RuntimeCodeMirror;
|
||||
Runtime.Coder.CodeMirror = RuntimeCoderCodeMirror;
|
||||
Runtime.DOM = RuntimeDOM;
|
||||
Runtime.DOM.JSDOM = RuntimeJSDOM;
|
||||
Runtime.DOM.WebDOM = RuntimeWebDOM;
|
||||
Runtime.DOM.JS = RuntimeDOMJS;
|
||||
Runtime.DOM.Web = RuntimeDOMWeb;
|
||||
Runtime.GUI = RuntimeGUI;
|
||||
Runtime.GUI.ControlKit = RuntimeControlKit;
|
||||
Runtime.GUI.ControlKit = RuntimeGUIControlKit;
|
||||
Runtime.Graphics = RuntimeGraphics;
|
||||
Runtime.Graphics.Three = RuntimeThree;
|
||||
Runtime.Graphics.Three = RuntimeGraphicsThree;
|
||||
Runtime.Physics = RuntimePhysics;
|
||||
Runtime.Physics.Bullet = RuntimeBullet;
|
||||
Runtime.Physics.Bullet = RuntimePhysicsBullet;
|
||||
Runtime.Socket = RuntimeSocket;
|
||||
Runtime.Statistics = RuntimeStatistics;
|
||||
Runtime.Statistics.Stats = RuntimeStats;
|
||||
Runtime.Statistics.Stats = RuntimeStatisticsStats;
|
||||
//GENERATED_INDEX_BODY_END
|
||||
|
||||
//GENERATED_EXPORTS_START
|
||||
|
|
|
@ -0,0 +1,190 @@
|
|||
//GENERATED_IMPORTS_START
|
||||
//GENERATED_IMPORTS_END
|
||||
|
||||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Event = require('.././r3-event');
|
||||
const Utils = require('.././r3-utils');
|
||||
const RuntimeAudio = require('./r3-runtime-audio.js');
|
||||
|
||||
/**
|
||||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
Class R3.Runtime.Audio.Three
|
||||
[Inherited from Runtime]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from RuntimeAudio]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to RuntimeAudioThree]
|
||||
|
||||
Properties:
|
||||
|
||||
<no properties>
|
||||
|
||||
Static Properties:
|
||||
|
||||
<no static properties>
|
||||
|
||||
Methods:
|
||||
|
||||
<no methods>
|
||||
|
||||
Static Methods:
|
||||
|
||||
<no static methods>
|
||||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
serverSide=false - Flag which indicates whether or not this runtime is intended for server side
|
||||
clientSide=true - Flag which indicates whether or not this runtime is intended for client side
|
||||
default=true - Flag which indicates whether or not this runtime is the default when there is no project specified runtime.
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
TEMPLATE_STATIC_OPTIONS_START
|
||||
TEMPLATE_STATIC_OPTIONS_END
|
||||
|
||||
CUSTOM_STATIC_OPTIONS_START
|
||||
CUSTOM_STATIC_OPTIONS_END
|
||||
|
||||
TEMPLATE_METHODS_START
|
||||
buildInstance(component) - Creates a runtime instance object based on the R3.Component representing it.
|
||||
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 RuntimeAudioThree extends RuntimeAudio {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
||||
if (typeof options === 'undefined') {
|
||||
options = {};
|
||||
}
|
||||
|
||||
super(options);
|
||||
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
/**
|
||||
* serverSide - Flag which indicates whether or not this runtime is intended for server side
|
||||
*/
|
||||
if (typeof options.serverSide === 'undefined') {
|
||||
options.serverSide = false;
|
||||
}
|
||||
/**
|
||||
* clientSide - Flag which indicates whether or not this runtime is intended for client side
|
||||
*/
|
||||
if (typeof options.clientSide === 'undefined') {
|
||||
options.clientSide = true;
|
||||
}
|
||||
/**
|
||||
* default - Flag which indicates whether or not this runtime is the default when there is no project
|
||||
* specified runtime.
|
||||
*/
|
||||
if (typeof options.default === 'undefined') {
|
||||
options.default = true;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
Object.assign(this, options);
|
||||
|
||||
}
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
||||
//GENERATED_TEMPLATE_METHODS_START
|
||||
|
||||
/**
|
||||
* buildInstance()
|
||||
* - Creates a runtime instance object based on the R3.Component representing it.
|
||||
* @param component
|
||||
*/
|
||||
buildInstance(component) {
|
||||
|
||||
//GENERATED_BUILD_INSTANCE_METHOD_START
|
||||
//GENERATED_BUILD_INSTANCE_METHOD_END
|
||||
|
||||
//CUSTOM_BUILD_INSTANCE_METHOD_START
|
||||
//CUSTOM_BUILD_INSTANCE_METHOD_END
|
||||
|
||||
//GENERATED_BUILD_INSTANCE_METHOD_AFTER_START
|
||||
//GENERATED_BUILD_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 = RuntimeAudioThree;
|
|
@ -0,0 +1,137 @@
|
|||
//GENERATED_IMPORTS_START
|
||||
//GENERATED_IMPORTS_END
|
||||
|
||||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Event = require('.././r3-event');
|
||||
const Runtime = require('./r3-runtime.js');
|
||||
|
||||
/**
|
||||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
Class R3.Runtime.Audio
|
||||
[Inherited from Runtime]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to RuntimeAudio]
|
||||
|
||||
Properties:
|
||||
|
||||
<no properties>
|
||||
|
||||
Static Properties:
|
||||
|
||||
<no static properties>
|
||||
|
||||
Methods:
|
||||
|
||||
<no methods>
|
||||
|
||||
Static Methods:
|
||||
|
||||
<no static methods>
|
||||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
name=this.constructor.name - Name of the runtime
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
TEMPLATE_STATIC_OPTIONS_START
|
||||
TEMPLATE_STATIC_OPTIONS_END
|
||||
|
||||
CUSTOM_STATIC_OPTIONS_START
|
||||
CUSTOM_STATIC_OPTIONS_END
|
||||
|
||||
TEMPLATE_METHODS_START
|
||||
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 RuntimeAudio extends Runtime {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
||||
if (typeof options === 'undefined') {
|
||||
options = {};
|
||||
}
|
||||
|
||||
super(options);
|
||||
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
/**
|
||||
* name - Name of the runtime
|
||||
*/
|
||||
if (typeof options.name === 'undefined') {
|
||||
options.name = this.constructor.name;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
Object.assign(this, options);
|
||||
|
||||
Event.Emit(Event.RUNTIME_CREATED, this);
|
||||
}
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
||||
//GENERATED_TEMPLATE_METHODS_START
|
||||
//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 = RuntimeAudio;
|
|
@ -0,0 +1,190 @@
|
|||
//GENERATED_IMPORTS_START
|
||||
//GENERATED_IMPORTS_END
|
||||
|
||||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Event = require('.././r3-event');
|
||||
const Utils = require('.././r3-utils');
|
||||
const RuntimeCode = require('./r3-runtime-code.js');
|
||||
|
||||
/**
|
||||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
Class R3.Runtime.Code.JS
|
||||
[Inherited from Runtime]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from RuntimeCode]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to RuntimeCodeJS]
|
||||
|
||||
Properties:
|
||||
|
||||
<no properties>
|
||||
|
||||
Static Properties:
|
||||
|
||||
<no static properties>
|
||||
|
||||
Methods:
|
||||
|
||||
<no methods>
|
||||
|
||||
Static Methods:
|
||||
|
||||
<no static methods>
|
||||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
serverSide=true - Flag which indicates whether or not this runtime is intended for server side
|
||||
clientSide=true - Flag which indicates whether or not this runtime is intended for client side
|
||||
default=true - Flag which indicates whether or not this runtime is the default when there is no project specified runtime.
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
TEMPLATE_STATIC_OPTIONS_START
|
||||
TEMPLATE_STATIC_OPTIONS_END
|
||||
|
||||
CUSTOM_STATIC_OPTIONS_START
|
||||
CUSTOM_STATIC_OPTIONS_END
|
||||
|
||||
TEMPLATE_METHODS_START
|
||||
buildInstance(component) - Creates a runtime instance object based on the R3.Component representing it.
|
||||
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 RuntimeCodeJS extends RuntimeCode {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
||||
if (typeof options === 'undefined') {
|
||||
options = {};
|
||||
}
|
||||
|
||||
super(options);
|
||||
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
/**
|
||||
* serverSide - Flag which indicates whether or not this runtime is intended for server side
|
||||
*/
|
||||
if (typeof options.serverSide === 'undefined') {
|
||||
options.serverSide = true;
|
||||
}
|
||||
/**
|
||||
* clientSide - Flag which indicates whether or not this runtime is intended for client side
|
||||
*/
|
||||
if (typeof options.clientSide === 'undefined') {
|
||||
options.clientSide = true;
|
||||
}
|
||||
/**
|
||||
* default - Flag which indicates whether or not this runtime is the default when there is no project
|
||||
* specified runtime.
|
||||
*/
|
||||
if (typeof options.default === 'undefined') {
|
||||
options.default = true;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
Object.assign(this, options);
|
||||
|
||||
}
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
||||
//GENERATED_TEMPLATE_METHODS_START
|
||||
|
||||
/**
|
||||
* buildInstance()
|
||||
* - Creates a runtime instance object based on the R3.Component representing it.
|
||||
* @param component
|
||||
*/
|
||||
buildInstance(component) {
|
||||
|
||||
//GENERATED_BUILD_INSTANCE_METHOD_START
|
||||
//GENERATED_BUILD_INSTANCE_METHOD_END
|
||||
|
||||
//CUSTOM_BUILD_INSTANCE_METHOD_START
|
||||
//CUSTOM_BUILD_INSTANCE_METHOD_END
|
||||
|
||||
//GENERATED_BUILD_INSTANCE_METHOD_AFTER_START
|
||||
//GENERATED_BUILD_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 = RuntimeCodeJS;
|
|
@ -0,0 +1,137 @@
|
|||
//GENERATED_IMPORTS_START
|
||||
//GENERATED_IMPORTS_END
|
||||
|
||||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Event = require('.././r3-event');
|
||||
const Runtime = require('./r3-runtime.js');
|
||||
|
||||
/**
|
||||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
Class R3.Runtime.Code
|
||||
[Inherited from Runtime]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to RuntimeCode]
|
||||
|
||||
Properties:
|
||||
|
||||
<no properties>
|
||||
|
||||
Static Properties:
|
||||
|
||||
<no static properties>
|
||||
|
||||
Methods:
|
||||
|
||||
<no methods>
|
||||
|
||||
Static Methods:
|
||||
|
||||
<no static methods>
|
||||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
name=this.constructor.name - Name of the runtime
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
TEMPLATE_STATIC_OPTIONS_START
|
||||
TEMPLATE_STATIC_OPTIONS_END
|
||||
|
||||
CUSTOM_STATIC_OPTIONS_START
|
||||
CUSTOM_STATIC_OPTIONS_END
|
||||
|
||||
TEMPLATE_METHODS_START
|
||||
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 RuntimeCode extends Runtime {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
||||
if (typeof options === 'undefined') {
|
||||
options = {};
|
||||
}
|
||||
|
||||
super(options);
|
||||
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
/**
|
||||
* name - Name of the runtime
|
||||
*/
|
||||
if (typeof options.name === 'undefined') {
|
||||
options.name = this.constructor.name;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
Object.assign(this, options);
|
||||
|
||||
Event.Emit(Event.RUNTIME_CREATED, this);
|
||||
}
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
||||
//GENERATED_TEMPLATE_METHODS_START
|
||||
//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 = RuntimeCode;
|
|
@ -49,7 +49,7 @@ const RuntimeCoder = require('./r3-runtime-coder.js');
|
|||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to RuntimeCodeMirror]
|
||||
[Belonging to RuntimeCoderCodeMirror]
|
||||
|
||||
Properties:
|
||||
|
||||
|
@ -70,6 +70,9 @@ const RuntimeCoder = require('./r3-runtime-coder.js');
|
|||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
serverSide=false - Flag which indicates whether or not this runtime is intended for server side
|
||||
clientSide=true - Flag which indicates whether or not this runtime is intended for client side
|
||||
default=true - Flag which indicates whether or not this runtime is the default when there is no project specified runtime.
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
|
@ -96,7 +99,7 @@ const RuntimeCoder = require('./r3-runtime-coder.js');
|
|||
|
||||
**/
|
||||
|
||||
class RuntimeCodeMirror extends RuntimeCoder {
|
||||
class RuntimeCoderCodeMirror extends RuntimeCoder {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
@ -108,6 +111,25 @@ class RuntimeCodeMirror extends RuntimeCoder {
|
|||
super(options);
|
||||
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
/**
|
||||
* serverSide - Flag which indicates whether or not this runtime is intended for server side
|
||||
*/
|
||||
if (typeof options.serverSide === 'undefined') {
|
||||
options.serverSide = false;
|
||||
}
|
||||
/**
|
||||
* clientSide - Flag which indicates whether or not this runtime is intended for client side
|
||||
*/
|
||||
if (typeof options.clientSide === 'undefined') {
|
||||
options.clientSide = true;
|
||||
}
|
||||
/**
|
||||
* default - Flag which indicates whether or not this runtime is the default when there is no project
|
||||
* specified runtime.
|
||||
*/
|
||||
if (typeof options.default === 'undefined') {
|
||||
options.default = true;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
|
@ -165,4 +187,4 @@ class RuntimeCodeMirror extends RuntimeCoder {
|
|||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
module.exports = RuntimeCodeMirror;
|
||||
module.exports = RuntimeCoderCodeMirror;
|
|
@ -2,8 +2,6 @@
|
|||
//GENERATED_IMPORTS_END
|
||||
|
||||
//CUSTOM_IMPORTS_START
|
||||
const ComponentCanvas = require('../r3-component/r3-component-canvas');
|
||||
const ComponentImage = require('../r3-component/r3-component-image');
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Event = require('.././r3-event');
|
||||
|
@ -14,7 +12,7 @@ const RuntimeDOM = require('./r3-runtime-d-o-m.js');
|
|||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
Class R3.Runtime.DOM.WebDOM
|
||||
Class R3.Runtime.DOM.JS
|
||||
[Inherited from Runtime]
|
||||
|
||||
Inherited Properties:
|
||||
|
@ -51,7 +49,7 @@ const RuntimeDOM = require('./r3-runtime-d-o-m.js');
|
|||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to RuntimeWebDOM]
|
||||
[Belonging to RuntimeDOMJS]
|
||||
|
||||
Properties:
|
||||
|
||||
|
@ -72,6 +70,9 @@ const RuntimeDOM = require('./r3-runtime-d-o-m.js');
|
|||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
serverSide=true - Flag which indicates whether or not this runtime is intended for server side
|
||||
clientSide=false - Flag which indicates whether or not this runtime is intended for client side
|
||||
default=true - Flag which indicates whether or not this runtime is the default when there is no project specified runtime.
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
|
@ -98,7 +99,7 @@ const RuntimeDOM = require('./r3-runtime-d-o-m.js');
|
|||
|
||||
**/
|
||||
|
||||
class RuntimeWebDOM extends RuntimeDOM {
|
||||
class RuntimeDOMJS extends RuntimeDOM {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
@ -110,6 +111,25 @@ class RuntimeWebDOM extends RuntimeDOM {
|
|||
super(options);
|
||||
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
/**
|
||||
* serverSide - Flag which indicates whether or not this runtime is intended for server side
|
||||
*/
|
||||
if (typeof options.serverSide === 'undefined') {
|
||||
options.serverSide = true;
|
||||
}
|
||||
/**
|
||||
* clientSide - Flag which indicates whether or not this runtime is intended for client side
|
||||
*/
|
||||
if (typeof options.clientSide === 'undefined') {
|
||||
options.clientSide = false;
|
||||
}
|
||||
/**
|
||||
* default - Flag which indicates whether or not this runtime is the default when there is no project
|
||||
* specified runtime.
|
||||
*/
|
||||
if (typeof options.default === 'undefined') {
|
||||
options.default = true;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
|
@ -133,20 +153,6 @@ class RuntimeWebDOM extends RuntimeDOM {
|
|||
//GENERATED_BUILD_INSTANCE_METHOD_END
|
||||
|
||||
//CUSTOM_BUILD_INSTANCE_METHOD_START
|
||||
if (component instanceof ComponentCanvas) {
|
||||
let canvas = document.createElement('canvas');
|
||||
canvas.setAttribute('width', component.width);
|
||||
canvas.setAttribute('height', component.height);
|
||||
canvas.setAttribute('style', component.style);
|
||||
return canvas;
|
||||
}
|
||||
|
||||
if (component instanceof ComponentImage) {
|
||||
let image = document.createElement('img');
|
||||
image.setAttribute('src', component.src);
|
||||
image.setAttribute('alt', component.alt);
|
||||
return image;
|
||||
}
|
||||
//CUSTOM_BUILD_INSTANCE_METHOD_END
|
||||
|
||||
//GENERATED_BUILD_INSTANCE_METHOD_AFTER_START
|
||||
|
@ -181,4 +187,4 @@ class RuntimeWebDOM extends RuntimeDOM {
|
|||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
module.exports = RuntimeWebDOM;
|
||||
module.exports = RuntimeDOMJS;
|
|
@ -2,9 +2,6 @@
|
|||
//GENERATED_IMPORTS_END
|
||||
|
||||
//CUSTOM_IMPORTS_START
|
||||
const jsdom = require('jsdom');
|
||||
const {JSDOM} = jsdom;
|
||||
const ComponentCanvas = require('../r3-component/r3-component-canvas');
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Event = require('.././r3-event');
|
||||
|
@ -15,7 +12,7 @@ const RuntimeDOM = require('./r3-runtime-d-o-m.js');
|
|||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
Class R3.Runtime.DOM.JSDOM
|
||||
Class R3.Runtime.DOM.Web
|
||||
[Inherited from Runtime]
|
||||
|
||||
Inherited Properties:
|
||||
|
@ -52,11 +49,11 @@ const RuntimeDOM = require('./r3-runtime-d-o-m.js');
|
|||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to RuntimeJSDOM]
|
||||
[Belonging to RuntimeDOMWeb]
|
||||
|
||||
Properties:
|
||||
|
||||
- dom (Default value new JSDOM(`<!DOCTYPE html><p>R3 NodeJS DOM</p>`);)
|
||||
<no properties>
|
||||
|
||||
Static Properties:
|
||||
|
||||
|
@ -73,10 +70,12 @@ const RuntimeDOM = require('./r3-runtime-d-o-m.js');
|
|||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
serverSide=false - Flag which indicates whether or not this runtime is intended for server side
|
||||
clientSide=true - Flag which indicates whether or not this runtime is intended for client side
|
||||
default=true - Flag which indicates whether or not this runtime is the default when there is no project specified runtime.
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
dom=new JSDOM(`<!DOCTYPE html><p>R3 NodeJS DOM</p>`);
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
TEMPLATE_STATIC_OPTIONS_START
|
||||
|
@ -100,7 +99,7 @@ const RuntimeDOM = require('./r3-runtime-d-o-m.js');
|
|||
|
||||
**/
|
||||
|
||||
class RuntimeJSDOM extends RuntimeDOM {
|
||||
class RuntimeDOMWeb extends RuntimeDOM {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
@ -112,15 +111,28 @@ class RuntimeJSDOM extends RuntimeDOM {
|
|||
super(options);
|
||||
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
/**
|
||||
* serverSide - Flag which indicates whether or not this runtime is intended for server side
|
||||
*/
|
||||
if (typeof options.serverSide === 'undefined') {
|
||||
options.serverSide = false;
|
||||
}
|
||||
/**
|
||||
* clientSide - Flag which indicates whether or not this runtime is intended for client side
|
||||
*/
|
||||
if (typeof options.clientSide === 'undefined') {
|
||||
options.clientSide = true;
|
||||
}
|
||||
/**
|
||||
* default - Flag which indicates whether or not this runtime is the default when there is no project
|
||||
* specified runtime.
|
||||
*/
|
||||
if (typeof options.default === 'undefined') {
|
||||
options.default = true;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
/**
|
||||
* dom - No comment
|
||||
*/
|
||||
if (typeof options.dom === 'undefined') {
|
||||
options.dom = new JSDOM(`<!DOCTYPE html><p>R3 NodeJS DOM</p>`);;
|
||||
}
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
Object.assign(this, options);
|
||||
|
@ -141,13 +153,6 @@ class RuntimeJSDOM extends RuntimeDOM {
|
|||
//GENERATED_BUILD_INSTANCE_METHOD_END
|
||||
|
||||
//CUSTOM_BUILD_INSTANCE_METHOD_START
|
||||
if (component instanceof ComponentCanvas) {
|
||||
let canvas = this.dom.window.document.createElement('canvas');
|
||||
canvas.setAttribute('width', component.width);
|
||||
canvas.setAttribute('height', component.height);
|
||||
canvas.setAttribute('style', component.style);
|
||||
return canvas;
|
||||
}
|
||||
//CUSTOM_BUILD_INSTANCE_METHOD_END
|
||||
|
||||
//GENERATED_BUILD_INSTANCE_METHOD_AFTER_START
|
||||
|
@ -182,4 +187,4 @@ class RuntimeJSDOM extends RuntimeDOM {
|
|||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
module.exports = RuntimeJSDOM;
|
||||
module.exports = RuntimeDOMWeb;
|
|
@ -49,7 +49,7 @@ const RuntimeGUI = require('./r3-runtime-g-u-i.js');
|
|||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to RuntimeControlKit]
|
||||
[Belonging to RuntimeGUIControlKit]
|
||||
|
||||
Properties:
|
||||
|
||||
|
@ -70,6 +70,9 @@ const RuntimeGUI = require('./r3-runtime-g-u-i.js');
|
|||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
serverSide=false - Flag which indicates whether or not this runtime is intended for server side
|
||||
clientSide=true - Flag which indicates whether or not this runtime is intended for client side
|
||||
default=true - Flag which indicates whether or not this runtime is the default when there is no project specified runtime.
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
|
@ -96,7 +99,7 @@ const RuntimeGUI = require('./r3-runtime-g-u-i.js');
|
|||
|
||||
**/
|
||||
|
||||
class RuntimeControlKit extends RuntimeGUI {
|
||||
class RuntimeGUIControlKit extends RuntimeGUI {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
@ -108,6 +111,25 @@ class RuntimeControlKit extends RuntimeGUI {
|
|||
super(options);
|
||||
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
/**
|
||||
* serverSide - Flag which indicates whether or not this runtime is intended for server side
|
||||
*/
|
||||
if (typeof options.serverSide === 'undefined') {
|
||||
options.serverSide = false;
|
||||
}
|
||||
/**
|
||||
* clientSide - Flag which indicates whether or not this runtime is intended for client side
|
||||
*/
|
||||
if (typeof options.clientSide === 'undefined') {
|
||||
options.clientSide = true;
|
||||
}
|
||||
/**
|
||||
* default - Flag which indicates whether or not this runtime is the default when there is no project
|
||||
* specified runtime.
|
||||
*/
|
||||
if (typeof options.default === 'undefined') {
|
||||
options.default = true;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
|
@ -165,4 +187,4 @@ class RuntimeControlKit extends RuntimeGUI {
|
|||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
module.exports = RuntimeControlKit;
|
||||
module.exports = RuntimeGUIControlKit;
|
|
@ -49,7 +49,7 @@ const RuntimeGraphics = require('./r3-runtime-graphics.js');
|
|||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to RuntimeThree]
|
||||
[Belonging to RuntimeGraphicsThree]
|
||||
|
||||
Properties:
|
||||
|
||||
|
@ -70,6 +70,9 @@ const RuntimeGraphics = require('./r3-runtime-graphics.js');
|
|||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
serverSide=false - Flag which indicates whether or not this runtime is intended for server side
|
||||
clientSide=true - Flag which indicates whether or not this runtime is intended for client side
|
||||
default=true - Flag which indicates whether or not this runtime is the default when there is no project specified runtime.
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
|
@ -96,7 +99,7 @@ const RuntimeGraphics = require('./r3-runtime-graphics.js');
|
|||
|
||||
**/
|
||||
|
||||
class RuntimeThree extends RuntimeGraphics {
|
||||
class RuntimeGraphicsThree extends RuntimeGraphics {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
@ -108,6 +111,25 @@ class RuntimeThree extends RuntimeGraphics {
|
|||
super(options);
|
||||
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
/**
|
||||
* serverSide - Flag which indicates whether or not this runtime is intended for server side
|
||||
*/
|
||||
if (typeof options.serverSide === 'undefined') {
|
||||
options.serverSide = false;
|
||||
}
|
||||
/**
|
||||
* clientSide - Flag which indicates whether or not this runtime is intended for client side
|
||||
*/
|
||||
if (typeof options.clientSide === 'undefined') {
|
||||
options.clientSide = true;
|
||||
}
|
||||
/**
|
||||
* default - Flag which indicates whether or not this runtime is the default when there is no project
|
||||
* specified runtime.
|
||||
*/
|
||||
if (typeof options.default === 'undefined') {
|
||||
options.default = true;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
|
@ -165,4 +187,4 @@ class RuntimeThree extends RuntimeGraphics {
|
|||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
module.exports = RuntimeThree;
|
||||
module.exports = RuntimeGraphicsThree;
|
|
@ -49,7 +49,7 @@ const RuntimePhysics = require('./r3-runtime-physics.js');
|
|||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to RuntimeBullet]
|
||||
[Belonging to RuntimePhysicsBullet]
|
||||
|
||||
Properties:
|
||||
|
||||
|
@ -70,6 +70,9 @@ const RuntimePhysics = require('./r3-runtime-physics.js');
|
|||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
serverSide=true - Flag which indicates whether or not this runtime is intended for server side
|
||||
clientSide=false - Flag which indicates whether or not this runtime is intended for client side
|
||||
default=true - Flag which indicates whether or not this runtime is the default when there is no project specified runtime.
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
|
@ -96,7 +99,7 @@ const RuntimePhysics = require('./r3-runtime-physics.js');
|
|||
|
||||
**/
|
||||
|
||||
class RuntimeBullet extends RuntimePhysics {
|
||||
class RuntimePhysicsBullet extends RuntimePhysics {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
@ -108,6 +111,25 @@ class RuntimeBullet extends RuntimePhysics {
|
|||
super(options);
|
||||
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
/**
|
||||
* serverSide - Flag which indicates whether or not this runtime is intended for server side
|
||||
*/
|
||||
if (typeof options.serverSide === 'undefined') {
|
||||
options.serverSide = true;
|
||||
}
|
||||
/**
|
||||
* clientSide - Flag which indicates whether or not this runtime is intended for client side
|
||||
*/
|
||||
if (typeof options.clientSide === 'undefined') {
|
||||
options.clientSide = false;
|
||||
}
|
||||
/**
|
||||
* default - Flag which indicates whether or not this runtime is the default when there is no project
|
||||
* specified runtime.
|
||||
*/
|
||||
if (typeof options.default === 'undefined') {
|
||||
options.default = true;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
|
@ -165,4 +187,4 @@ class RuntimeBullet extends RuntimePhysics {
|
|||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
module.exports = RuntimeBullet;
|
||||
module.exports = RuntimePhysicsBullet;
|
|
@ -49,7 +49,7 @@ const RuntimeStatistics = require('./r3-runtime-statistics.js');
|
|||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to RuntimeStats]
|
||||
[Belonging to RuntimeStatisticsStats]
|
||||
|
||||
Properties:
|
||||
|
||||
|
@ -70,6 +70,9 @@ const RuntimeStatistics = require('./r3-runtime-statistics.js');
|
|||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
serverSide=false - Flag which indicates whether or not this runtime is intended for server side
|
||||
clientSide=true - Flag which indicates whether or not this runtime is intended for client side
|
||||
default=true - Flag which indicates whether or not this runtime is the default when there is no project specified runtime.
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
|
@ -96,7 +99,7 @@ const RuntimeStatistics = require('./r3-runtime-statistics.js');
|
|||
|
||||
**/
|
||||
|
||||
class RuntimeStats extends RuntimeStatistics {
|
||||
class RuntimeStatisticsStats extends RuntimeStatistics {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
@ -108,6 +111,25 @@ class RuntimeStats extends RuntimeStatistics {
|
|||
super(options);
|
||||
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
/**
|
||||
* serverSide - Flag which indicates whether or not this runtime is intended for server side
|
||||
*/
|
||||
if (typeof options.serverSide === 'undefined') {
|
||||
options.serverSide = false;
|
||||
}
|
||||
/**
|
||||
* clientSide - Flag which indicates whether or not this runtime is intended for client side
|
||||
*/
|
||||
if (typeof options.clientSide === 'undefined') {
|
||||
options.clientSide = true;
|
||||
}
|
||||
/**
|
||||
* default - Flag which indicates whether or not this runtime is the default when there is no project
|
||||
* specified runtime.
|
||||
*/
|
||||
if (typeof options.default === 'undefined') {
|
||||
options.default = true;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
|
@ -165,4 +187,4 @@ class RuntimeStats extends RuntimeStatistics {
|
|||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
module.exports = RuntimeStats;
|
||||
module.exports = RuntimeStatisticsStats;
|
|
@ -88,20 +88,24 @@ class Runtime {
|
|||
//GENERATED_STATIC_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
Runtime.BASE_CODER = 0x0;
|
||||
Runtime.BASE_DOM = 0x1;
|
||||
Runtime.BASE_GUI = 0x2;
|
||||
Runtime.BASE_GRAPHICS = 0x3;
|
||||
Runtime.BASE_PHYSICS = 0x4;
|
||||
Runtime.BASE_SOCKET = 0x5;
|
||||
Runtime.BASE_STATISTICS = 0x6;
|
||||
Runtime.CODE_MIRROR = 0x7;
|
||||
Runtime.JSDOM = 0x8;
|
||||
Runtime.WEB_DOM = 0x9;
|
||||
Runtime.CONTROL_KIT = 0xa;
|
||||
Runtime.THREE = 0xb;
|
||||
Runtime.BULLET = 0xc;
|
||||
Runtime.STATS = 0xd;
|
||||
Runtime.BASE_AUDIO = 0x0;
|
||||
Runtime.BASE_CODE = 0x1;
|
||||
Runtime.BASE_CODER = 0x2;
|
||||
Runtime.BASE_DOM = 0x3;
|
||||
Runtime.BASE_GUI = 0x4;
|
||||
Runtime.BASE_GRAPHICS = 0x5;
|
||||
Runtime.BASE_PHYSICS = 0x6;
|
||||
Runtime.BASE_SOCKET = 0x7;
|
||||
Runtime.BASE_STATISTICS = 0x8;
|
||||
Runtime.AUDIO_THREE = 0x9;
|
||||
Runtime.CODE_JS = 0xa;
|
||||
Runtime.CODER_CODE_MIRROR = 0xb;
|
||||
Runtime.DOMJS = 0xc;
|
||||
Runtime.DOM_WEB = 0xd;
|
||||
Runtime.GUI_CONTROL_KIT = 0xe;
|
||||
Runtime.GRAPHICS_THREE = 0xf;
|
||||
Runtime.PHYSICS_BULLET = 0x10;
|
||||
Runtime.STATISTICS_STATS = 0x11;
|
||||
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_END
|
||||
|
||||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
//GENERATED_IMPORTS_START
|
||||
const RuntimeAudio = require('../r3-runtime/r3-runtime-audio.js');
|
||||
const RuntimeCode = require('../r3-runtime/r3-runtime-code.js');
|
||||
const RuntimeCoder = require('../r3-runtime/r3-runtime-coder.js');
|
||||
const RuntimeDOM = require('../r3-runtime/r3-runtime-d-o-m.js');
|
||||
const RuntimeGUI = require('../r3-runtime/r3-runtime-g-u-i.js');
|
||||
|
@ -7,30 +9,35 @@ const RuntimePhysics = require('../r3-runtime/r3-runtime-physics.js');
|
|||
const RuntimeSocket = require('../r3-runtime/r3-runtime-socket.js');
|
||||
const RuntimeStatistics = require('../r3-runtime/r3-runtime-statistics.js');
|
||||
|
||||
// RuntimeAudio Runtimes
|
||||
const RuntimeAudioThree = require('../r3-runtime/r3-runtime-audio-three.js');
|
||||
|
||||
// RuntimeCode Runtimes
|
||||
const RuntimeCodeJS = require('../r3-runtime/r3-runtime-code-j-s.js');
|
||||
|
||||
// RuntimeCoder Runtimes
|
||||
const RuntimeCodeMirror = require('../r3-runtime/r3-runtime-code-mirror.js');
|
||||
const RuntimeCoderCodeMirror = require('../r3-runtime/r3-runtime-coder-code-mirror.js');
|
||||
|
||||
// RuntimeDOM Runtimes
|
||||
const RuntimeJSDOM = require('../r3-runtime/r3-runtime-j-s-d-o-m.js');
|
||||
const RuntimeWebDOM = require('../r3-runtime/r3-runtime-web-d-o-m.js');
|
||||
const RuntimeDOMJS = require('../r3-runtime/r3-runtime-d-o-m-j-s.js');
|
||||
const RuntimeDOMWeb = require('../r3-runtime/r3-runtime-d-o-m-web.js');
|
||||
|
||||
// RuntimeGUI Runtimes
|
||||
const RuntimeControlKit = require('../r3-runtime/r3-runtime-control-kit.js');
|
||||
const RuntimeGUIControlKit = require('../r3-runtime/r3-runtime-g-u-i-control-kit.js');
|
||||
|
||||
// RuntimeGraphics Runtimes
|
||||
const RuntimeThree = require('../r3-runtime/r3-runtime-three.js');
|
||||
const RuntimeGraphicsThree = require('../r3-runtime/r3-runtime-graphics-three.js');
|
||||
|
||||
// RuntimePhysics Runtimes
|
||||
const RuntimeBullet = require('../r3-runtime/r3-runtime-bullet.js');
|
||||
const RuntimePhysicsBullet = require('../r3-runtime/r3-runtime-physics-bullet.js');
|
||||
|
||||
// RuntimeSocket Runtimes
|
||||
|
||||
// RuntimeStatistics Runtimes
|
||||
const RuntimeStats = require('../r3-runtime/r3-runtime-stats.js');
|
||||
const RuntimeStatisticsStats = require('../r3-runtime/r3-runtime-statistics-stats.js');
|
||||
//GENERATED_IMPORTS_END
|
||||
|
||||
//CUSTOM_IMPORTS_START
|
||||
const ComponentCode = require('../r3-component/r3-component-code.js');
|
||||
const Utils = require('.././r3-utils.js');
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
|
@ -280,46 +287,246 @@ class SystemRuntime extends System {
|
|||
|
||||
//GENERATED_STATIC_ON_GET_RUNTIME_METHOD_START
|
||||
//GENERATED_RUNTIME_LOCATOR_START
|
||||
if (object.runtimeClass === RuntimeAudio) {
|
||||
|
||||
if (SystemRuntime.CurrentProject === null) {
|
||||
/**
|
||||
* We use the default runtime
|
||||
*/
|
||||
if (SystemRuntime.ServerSide) {
|
||||
//GENERATED_DEFAULT_SERVER_SIDE_RUNTIME_START
|
||||
throw new Error('No server side implementation for RuntimeAudio');
|
||||
//GENERATED_DEFAULT_SERVER_SIDE_RUNTIME_END
|
||||
} else {
|
||||
//GENERATED_DEFAULT_CLIENT_SIDE_RUNTIME_START
|
||||
if (typeof SystemRuntime.RuntimeAudio.Three === 'undefined') {
|
||||
SystemRuntime.RuntimeAudio.Three = new RuntimeAudioThree();
|
||||
}
|
||||
return SystemRuntime.RuntimeAudio.Three;
|
||||
//GENERATED_DEFAULT_CLIENT_SIDE_RUNTIME_END
|
||||
}
|
||||
} else {
|
||||
/**
|
||||
* Get runtime from project
|
||||
*/
|
||||
console.log('todo : implement project based runtime here');
|
||||
}
|
||||
}
|
||||
|
||||
if (object.runtimeClass === RuntimeCode) {
|
||||
|
||||
if (SystemRuntime.CurrentProject === null) {
|
||||
/**
|
||||
* We use the default runtime
|
||||
*/
|
||||
if (SystemRuntime.ServerSide) {
|
||||
//GENERATED_DEFAULT_SERVER_SIDE_RUNTIME_START
|
||||
if (typeof SystemRuntime.RuntimeCode.JS === 'undefined') {
|
||||
SystemRuntime.RuntimeCode.JS = new RuntimeCodeJS();
|
||||
}
|
||||
return SystemRuntime.RuntimeCode.JS;
|
||||
//GENERATED_DEFAULT_SERVER_SIDE_RUNTIME_END
|
||||
} else {
|
||||
//GENERATED_DEFAULT_CLIENT_SIDE_RUNTIME_START
|
||||
if (typeof SystemRuntime.RuntimeCode.JS === 'undefined') {
|
||||
SystemRuntime.RuntimeCode.JS = new RuntimeCodeJS();
|
||||
}
|
||||
return SystemRuntime.RuntimeCode.JS;
|
||||
//GENERATED_DEFAULT_CLIENT_SIDE_RUNTIME_END
|
||||
}
|
||||
} else {
|
||||
/**
|
||||
* Get runtime from project
|
||||
*/
|
||||
console.log('todo : implement project based runtime here');
|
||||
}
|
||||
}
|
||||
|
||||
if (object.runtimeClass === RuntimeCoder) {
|
||||
|
||||
if (SystemRuntime.CurrentProject === null) {
|
||||
/**
|
||||
* We use the default runtime
|
||||
*/
|
||||
if (SystemRuntime.ServerSide) {
|
||||
//GENERATED_DEFAULT_SERVER_SIDE_RUNTIME_START
|
||||
throw new Error('No server side implementation for RuntimeCoder');
|
||||
//GENERATED_DEFAULT_SERVER_SIDE_RUNTIME_END
|
||||
} else {
|
||||
//GENERATED_DEFAULT_CLIENT_SIDE_RUNTIME_START
|
||||
if (typeof SystemRuntime.RuntimeCoder.CodeMirror === 'undefined') {
|
||||
SystemRuntime.RuntimeCoder.CodeMirror = new RuntimeCoderCodeMirror();
|
||||
}
|
||||
return SystemRuntime.RuntimeCoder.CodeMirror;
|
||||
//GENERATED_DEFAULT_CLIENT_SIDE_RUNTIME_END
|
||||
}
|
||||
} else {
|
||||
/**
|
||||
* Get runtime from project
|
||||
*/
|
||||
console.log('todo : implement project based runtime here');
|
||||
}
|
||||
}
|
||||
|
||||
if (object.runtimeClass === RuntimeDOM) {
|
||||
|
||||
if (SystemRuntime.CurrentProject === null) {
|
||||
/**
|
||||
* We use the default runtime
|
||||
*/
|
||||
if (SystemRuntime.ServerSide) {
|
||||
//GENERATED_DEFAULT_SERVER_SIDE_RUNTIME_START
|
||||
if (typeof SystemRuntime.RuntimeDOM.JS === 'undefined') {
|
||||
SystemRuntime.RuntimeDOM.JS = new RuntimeDOMJS();
|
||||
}
|
||||
return SystemRuntime.RuntimeDOM.JS;
|
||||
//GENERATED_DEFAULT_SERVER_SIDE_RUNTIME_END
|
||||
} else {
|
||||
//GENERATED_DEFAULT_CLIENT_SIDE_RUNTIME_START
|
||||
if (typeof SystemRuntime.RuntimeDOM.Web === 'undefined') {
|
||||
SystemRuntime.RuntimeDOM.Web = new RuntimeDOMWeb();
|
||||
}
|
||||
return SystemRuntime.RuntimeDOM.Web;
|
||||
//GENERATED_DEFAULT_CLIENT_SIDE_RUNTIME_END
|
||||
}
|
||||
} else {
|
||||
/**
|
||||
* Get runtime from project
|
||||
*/
|
||||
console.log('todo : implement project based runtime here');
|
||||
}
|
||||
}
|
||||
|
||||
if (object.runtimeClass === RuntimeGUI) {
|
||||
|
||||
if (SystemRuntime.CurrentProject === null) {
|
||||
/**
|
||||
* We use the default runtime
|
||||
*/
|
||||
if (SystemRuntime.ServerSide) {
|
||||
//GENERATED_DEFAULT_SERVER_SIDE_RUNTIME_START
|
||||
throw new Error('No server side implementation for RuntimeGUI');
|
||||
//GENERATED_DEFAULT_SERVER_SIDE_RUNTIME_END
|
||||
} else {
|
||||
//GENERATED_DEFAULT_CLIENT_SIDE_RUNTIME_START
|
||||
if (typeof SystemRuntime.RuntimeGUI.ControlKit === 'undefined') {
|
||||
SystemRuntime.RuntimeGUI.ControlKit = new RuntimeGUIControlKit();
|
||||
}
|
||||
return SystemRuntime.RuntimeGUI.ControlKit;
|
||||
//GENERATED_DEFAULT_CLIENT_SIDE_RUNTIME_END
|
||||
}
|
||||
} else {
|
||||
/**
|
||||
* Get runtime from project
|
||||
*/
|
||||
console.log('todo : implement project based runtime here');
|
||||
}
|
||||
}
|
||||
|
||||
if (object.runtimeClass === RuntimeGraphics) {
|
||||
|
||||
if (SystemRuntime.CurrentProject === null) {
|
||||
/**
|
||||
* We use the default runtime
|
||||
*/
|
||||
if (SystemRuntime.ServerSide) {
|
||||
//GENERATED_DEFAULT_SERVER_SIDE_RUNTIME_START
|
||||
throw new Error('No server side implementation for RuntimeGraphics');
|
||||
//GENERATED_DEFAULT_SERVER_SIDE_RUNTIME_END
|
||||
} else {
|
||||
//GENERATED_DEFAULT_CLIENT_SIDE_RUNTIME_START
|
||||
if (typeof SystemRuntime.RuntimeGraphics.Three === 'undefined') {
|
||||
SystemRuntime.RuntimeGraphics.Three = new RuntimeGraphicsThree();
|
||||
}
|
||||
return SystemRuntime.RuntimeGraphics.Three;
|
||||
//GENERATED_DEFAULT_CLIENT_SIDE_RUNTIME_END
|
||||
}
|
||||
} else {
|
||||
/**
|
||||
* Get runtime from project
|
||||
*/
|
||||
console.log('todo : implement project based runtime here');
|
||||
}
|
||||
}
|
||||
|
||||
if (object.runtimeClass === RuntimePhysics) {
|
||||
|
||||
if (SystemRuntime.CurrentProject === null) {
|
||||
/**
|
||||
* We use the default runtime
|
||||
*/
|
||||
if (SystemRuntime.ServerSide) {
|
||||
//GENERATED_DEFAULT_SERVER_SIDE_RUNTIME_START
|
||||
if (typeof SystemRuntime.RuntimePhysics.Bullet === 'undefined') {
|
||||
SystemRuntime.RuntimePhysics.Bullet = new RuntimePhysicsBullet();
|
||||
}
|
||||
return SystemRuntime.RuntimePhysics.Bullet;
|
||||
//GENERATED_DEFAULT_SERVER_SIDE_RUNTIME_END
|
||||
} else {
|
||||
//GENERATED_DEFAULT_CLIENT_SIDE_RUNTIME_START
|
||||
throw new Error('No client side implementation for RuntimePhysics');
|
||||
//GENERATED_DEFAULT_CLIENT_SIDE_RUNTIME_END
|
||||
}
|
||||
} else {
|
||||
/**
|
||||
* Get runtime from project
|
||||
*/
|
||||
console.log('todo : implement project based runtime here');
|
||||
}
|
||||
}
|
||||
|
||||
if (object.runtimeClass === RuntimeSocket) {
|
||||
|
||||
if (SystemRuntime.CurrentProject === null) {
|
||||
/**
|
||||
* We use the default runtime
|
||||
*/
|
||||
if (SystemRuntime.ServerSide) {
|
||||
//GENERATED_DEFAULT_SERVER_SIDE_RUNTIME_START
|
||||
throw new Error('No server side implementation for RuntimeSocket');
|
||||
//GENERATED_DEFAULT_SERVER_SIDE_RUNTIME_END
|
||||
} else {
|
||||
//GENERATED_DEFAULT_CLIENT_SIDE_RUNTIME_START
|
||||
throw new Error('No client side implementation for RuntimeSocket');
|
||||
//GENERATED_DEFAULT_CLIENT_SIDE_RUNTIME_END
|
||||
}
|
||||
} else {
|
||||
/**
|
||||
* Get runtime from project
|
||||
*/
|
||||
console.log('todo : implement project based runtime here');
|
||||
}
|
||||
}
|
||||
|
||||
if (object.runtimeClass === RuntimeStatistics) {
|
||||
|
||||
if (SystemRuntime.CurrentProject === null) {
|
||||
/**
|
||||
* We use the default runtime
|
||||
*/
|
||||
if (SystemRuntime.ServerSide) {
|
||||
//GENERATED_DEFAULT_SERVER_SIDE_RUNTIME_START
|
||||
throw new Error('No server side implementation for RuntimeStatistics');
|
||||
//GENERATED_DEFAULT_SERVER_SIDE_RUNTIME_END
|
||||
} else {
|
||||
//GENERATED_DEFAULT_CLIENT_SIDE_RUNTIME_START
|
||||
if (typeof SystemRuntime.RuntimeStatistics.Stats === 'undefined') {
|
||||
SystemRuntime.RuntimeStatistics.Stats = new RuntimeStatisticsStats();
|
||||
}
|
||||
return SystemRuntime.RuntimeStatistics.Stats;
|
||||
//GENERATED_DEFAULT_CLIENT_SIDE_RUNTIME_END
|
||||
}
|
||||
} else {
|
||||
/**
|
||||
* Get runtime from project
|
||||
*/
|
||||
console.log('todo : implement project based runtime here');
|
||||
}
|
||||
}
|
||||
//GENERATED_RUNTIME_LOCATOR_END
|
||||
//GENERATED_STATIC_ON_GET_RUNTIME_METHOD_END
|
||||
|
||||
//CUSTOM_STATIC_ON_GET_RUNTIME_METHOD_START
|
||||
/**
|
||||
* DOM and Input Components are typically managed through
|
||||
* the DOM.
|
||||
*/
|
||||
if (
|
||||
object.runtimeClass === RuntimeDOM
|
||||
) {
|
||||
if (SystemRuntime.CurrentProject === null) {
|
||||
|
||||
if (SystemRuntime.ServerSide) {
|
||||
|
||||
if (!SystemRuntime.RuntimeDOM.JS) {
|
||||
SystemRuntime.RuntimeDOM.JS = new RuntimeJSDOM();
|
||||
}
|
||||
|
||||
return SystemRuntime.RuntimeDOM.JS;
|
||||
|
||||
} else {
|
||||
|
||||
if (!SystemRuntime.RuntimeDOM.Web) {
|
||||
SystemRuntime.RuntimeDOM.Web = new RuntimeWebDOM();
|
||||
}
|
||||
|
||||
return SystemRuntime.RuntimeDOM.Web;
|
||||
|
||||
}
|
||||
} else {
|
||||
console.log('TODO: implement a project based DOM runtime');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (object instanceof ComponentCode) {
|
||||
|
||||
}
|
||||
//CUSTOM_STATIC_ON_GET_RUNTIME_METHOD_END
|
||||
|
||||
}
|
||||
|
@ -412,6 +619,8 @@ SystemRuntime.ServerSide = (typeof process !== 'undefined');
|
|||
//GENERATED_STATIC_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
SystemRuntime.RuntimeAudio = {};
|
||||
SystemRuntime.RuntimeCode = {};
|
||||
SystemRuntime.RuntimeCoder = {};
|
||||
SystemRuntime.RuntimeDOM = {};
|
||||
SystemRuntime.RuntimeGUI = {};
|
||||
|
|
|
@ -90,12 +90,12 @@ class R3 {
|
|||
/**
|
||||
* static Version - Current R3 version
|
||||
*/
|
||||
R3.Version = '3.0.348';
|
||||
R3.Version = '3.0.426';
|
||||
|
||||
/**
|
||||
* static CompileDate - Current compile date of R3
|
||||
*/
|
||||
R3.CompileDate = '2021 Oct 10 - 20:47:06 pm';
|
||||
R3.CompileDate = '2021 Oct 24 - 08:43:26 am';
|
||||
|
||||
//GENERATED_STATIC_OPTIONS_INIT_END
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
//CUSTOM_IMPORTS_START
|
||||
//CUSTOM_IMPORTS_END
|
||||
|
||||
const Component = require('../r3-component/r3-component.js');
|
||||
const Event = require('../r3-event.js');
|
||||
const EXTEND_CLASS = require('./EXTEND_CLASS_FILE_NAME');
|
||||
const RUNTIME_CLASS = require('../r3-runtime/RUNTIME_CLASS_FILE_NAME');
|
||||
|
@ -41,6 +40,8 @@ const RUNTIME_CLASS = require('../r3-runtime/RUNTIME_CLASS_FILE_NAME');
|
|||
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
instance
|
||||
runtime
|
||||
runtimeClass
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
if (typeof SystemRuntime.RUNTIME_BASE.RUNTIME_DEFAULT_SHORT === 'undefined') {
|
||||
SystemRuntime.RUNTIME_BASE.RUNTIME_DEFAULT_SHORT = new RUNTIME_CLASS();
|
||||
}
|
||||
return SystemRuntime.RUNTIME_BASE.RUNTIME_DEFAULT_SHORT;
|
|
@ -1,6 +1,4 @@
|
|||
if (
|
||||
object.runtimeClass === RUNTIME_CLASS
|
||||
) {
|
||||
if (object.runtimeClass === RUNTIME_CLASS) {
|
||||
|
||||
if (SystemRuntime.CurrentProject === null) {
|
||||
/**
|
||||
|
@ -21,4 +19,4 @@
|
|||
*/
|
||||
console.log('todo : implement project based runtime here');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,9 @@ const EXTEND_CLASS = require('./EXTEND_CLASS_FILE_NAME');
|
|||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
serverSide=RUNTIME_IS_SERVER_SIDE - Flag which indicates whether or not this runtime is intended for server side
|
||||
clientSide=RUNTIME_IS_CLIENT_SIDE - Flag which indicates whether or not this runtime is intended for client side
|
||||
default=RUNTIME_IS_DEFAULT - Flag which indicates whether or not this runtime is the default when there is no project specified runtime.
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
|
|
|
@ -10,6 +10,8 @@ GENERATED_BUILD_SOLUTION_METHOD_AFTER
|
|||
GENERATED_CONSTRUCTOR
|
||||
GENERATED_CREATE_INSTANCE_METHOD
|
||||
GENERATED_CREATE_INSTANCE_METHOD_AFTER
|
||||
GENERATED_DEFAULT_CLIENT_SIDE_RUNTIME
|
||||
GENERATED_DEFAULT_SERVER_SIDE_RUNTIME
|
||||
GENERATED_DEFINES
|
||||
GENERATED_DISPOSE_INSTANCE_METHOD
|
||||
GENERATED_DISPOSE_INSTANCE_METHOD_AFTER
|
||||
|
|
|
@ -3,19 +3,20 @@ const Event = require('../src/r3/r3-event.js');
|
|||
|
||||
//GENERATED_COMPONENT_IMPORTS_START
|
||||
const ComponentCode = require('../src/r3/r3-component/./r3-component-code.js');
|
||||
const ComponentCodeJS = require('../src/r3/r3-component/./r3-component-code-j-s.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 ComponentTest = require('../src/r3/r3-component/./r3-component-test.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 ComponentDOMCanvas = require('../src/r3/r3-component/./r3-component-d-o-m-canvas.js');
|
||||
const ComponentDOMImage = require('../src/r3/r3-component/./r3-component-d-o-m-image.js');
|
||||
const ComponentGraphics = require('../src/r3/r3-component/./r3-component-graphics.js');
|
||||
const ComponentImage = require('../src/r3/r3-component/./r3-component-image.js');
|
||||
const ComponentGraphicsGeometry = require('../src/r3/r3-component/./r3-component-graphics-geometry.js');
|
||||
const ComponentGraphicsGeometryBuffer = require('../src/r3/r3-component/./r3-component-graphics-geometry-buffer.js');
|
||||
const ComponentGraphicsGeometryBufferPlane = require('../src/r3/r3-component/./r3-component-graphics-geometry-buffer-plane.js');
|
||||
const ComponentGraphicsImage = require('../src/r3/r3-component/./r3-component-graphics-image.js');
|
||||
const ComponentGraphicsMaterial = require('../src/r3/r3-component/./r3-component-graphics-material.js');
|
||||
const ComponentGraphicsMesh = require('../src/r3/r3-component/./r3-component-graphics-mesh.js');
|
||||
const ComponentGraphicsTexture = require('../src/r3/r3-component/./r3-component-graphics-texture.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 ComponentInputTouch = require('../src/r3/r3-component/./r3-component-input-touch.js');
|
||||
//GENERATED_COMPONENT_IMPORTS_END
|
||||
|
||||
//GENERATED_ENTITY_IMPORTS_START
|
||||
|
@ -23,20 +24,24 @@ const EntitySlider = require('../src/r3/r3-entity/./r3-entity-slider.js');
|
|||
//GENERATED_ENTITY_IMPORTS_END
|
||||
|
||||
//GENERATED_RUNTIME_IMPORTS_START
|
||||
const RuntimeAudio = require('../src/r3/r3-runtime/./r3-runtime-audio.js');
|
||||
const RuntimeAudioThree = require('../src/r3/r3-runtime/./r3-runtime-audio-three.js');
|
||||
const RuntimeCode = require('../src/r3/r3-runtime/./r3-runtime-code.js');
|
||||
const RuntimeCodeJS = require('../src/r3/r3-runtime/./r3-runtime-code-j-s.js');
|
||||
const RuntimeCoder = require('../src/r3/r3-runtime/./r3-runtime-coder.js');
|
||||
const RuntimeCodeMirror = require('../src/r3/r3-runtime/./r3-runtime-code-mirror.js');
|
||||
const RuntimeCoderCodeMirror = require('../src/r3/r3-runtime/./r3-runtime-coder-code-mirror.js');
|
||||
const RuntimeDOM = require('../src/r3/r3-runtime/./r3-runtime-d-o-m.js');
|
||||
const RuntimeJSDOM = require('../src/r3/r3-runtime/./r3-runtime-j-s-d-o-m.js');
|
||||
const RuntimeWebDOM = require('../src/r3/r3-runtime/./r3-runtime-web-d-o-m.js');
|
||||
const RuntimeDOMJS = require('../src/r3/r3-runtime/./r3-runtime-d-o-m-j-s.js');
|
||||
const RuntimeDOMWeb = require('../src/r3/r3-runtime/./r3-runtime-d-o-m-web.js');
|
||||
const RuntimeGUI = require('../src/r3/r3-runtime/./r3-runtime-g-u-i.js');
|
||||
const RuntimeControlKit = require('../src/r3/r3-runtime/./r3-runtime-control-kit.js');
|
||||
const RuntimeGUIControlKit = require('../src/r3/r3-runtime/./r3-runtime-g-u-i-control-kit.js');
|
||||
const RuntimeGraphics = require('../src/r3/r3-runtime/./r3-runtime-graphics.js');
|
||||
const RuntimeThree = require('../src/r3/r3-runtime/./r3-runtime-three.js');
|
||||
const RuntimeGraphicsThree = require('../src/r3/r3-runtime/./r3-runtime-graphics-three.js');
|
||||
const RuntimePhysics = require('../src/r3/r3-runtime/./r3-runtime-physics.js');
|
||||
const RuntimeBullet = require('../src/r3/r3-runtime/./r3-runtime-bullet.js');
|
||||
const RuntimePhysicsBullet = require('../src/r3/r3-runtime/./r3-runtime-physics-bullet.js');
|
||||
const RuntimeSocket = require('../src/r3/r3-runtime/./r3-runtime-socket.js');
|
||||
const RuntimeStatistics = require('../src/r3/r3-runtime/./r3-runtime-statistics.js');
|
||||
const RuntimeStats = require('../src/r3/r3-runtime/./r3-runtime-stats.js');
|
||||
const RuntimeStatisticsStats = require('../src/r3/r3-runtime/./r3-runtime-statistics-stats.js');
|
||||
//GENERATED_RUNTIME_IMPORTS_END
|
||||
|
||||
//GENERATED_R3_OBJECT_IMPORTS_START
|
||||
|
@ -67,32 +72,34 @@ describe('R3 Tests', () => {
|
|||
//GENERATED_COMPONENT_CREATE_START
|
||||
const componentCode = new ComponentCode();
|
||||
assert.isTrue(componentCode.initialized);
|
||||
const componentCodeJS = new ComponentCodeJS();
|
||||
assert.isTrue(componentCodeJS.initialized);
|
||||
const componentDOM = new ComponentDOM();
|
||||
assert.isTrue(componentDOM.initialized);
|
||||
const componentCanvas = new ComponentCanvas();
|
||||
assert.isTrue(componentCanvas.initialized);
|
||||
const componentTest = new ComponentTest();
|
||||
assert.isTrue(componentTest.initialized);
|
||||
const componentGeometry = new ComponentGeometry();
|
||||
assert.isTrue(componentGeometry.initialized);
|
||||
const componentBufferGeometry = new ComponentBufferGeometry();
|
||||
assert.isTrue(componentBufferGeometry.initialized);
|
||||
const componentPlaneGeometry = new ComponentPlaneGeometry();
|
||||
assert.isTrue(componentPlaneGeometry.initialized);
|
||||
const componentDOMCanvas = new ComponentDOMCanvas();
|
||||
assert.isTrue(componentDOMCanvas.initialized);
|
||||
const componentDOMImage = new ComponentDOMImage();
|
||||
assert.isTrue(componentDOMImage.initialized);
|
||||
const componentGraphics = new ComponentGraphics();
|
||||
assert.isTrue(componentGraphics.initialized);
|
||||
const componentImage = new ComponentImage();
|
||||
assert.isTrue(componentImage.initialized);
|
||||
const componentGraphicsGeometry = new ComponentGraphicsGeometry();
|
||||
assert.isTrue(componentGraphicsGeometry.initialized);
|
||||
const componentGraphicsGeometryBuffer = new ComponentGraphicsGeometryBuffer();
|
||||
assert.isTrue(componentGraphicsGeometryBuffer.initialized);
|
||||
const componentGraphicsGeometryBufferPlane = new ComponentGraphicsGeometryBufferPlane();
|
||||
assert.isTrue(componentGraphicsGeometryBufferPlane.initialized);
|
||||
const componentGraphicsImage = new ComponentGraphicsImage();
|
||||
assert.isTrue(componentGraphicsImage.initialized);
|
||||
const componentGraphicsMaterial = new ComponentGraphicsMaterial();
|
||||
assert.isTrue(componentGraphicsMaterial.initialized);
|
||||
const componentGraphicsMesh = new ComponentGraphicsMesh();
|
||||
assert.isTrue(componentGraphicsMesh.initialized);
|
||||
const componentGraphicsTexture = new ComponentGraphicsTexture();
|
||||
assert.isTrue(componentGraphicsTexture.initialized);
|
||||
const componentInput = new ComponentInput();
|
||||
assert.isTrue(componentInput.initialized);
|
||||
const componentTouch = new ComponentTouch();
|
||||
assert.isTrue(componentTouch.initialized);
|
||||
const componentMaterial = new ComponentMaterial();
|
||||
assert.isTrue(componentMaterial.initialized);
|
||||
const componentMesh = new ComponentMesh();
|
||||
assert.isTrue(componentMesh.initialized);
|
||||
const componentTexture = new ComponentTexture();
|
||||
assert.isTrue(componentTexture.initialized);
|
||||
const componentInputTouch = new ComponentInputTouch();
|
||||
assert.isTrue(componentInputTouch.initialized);
|
||||
//GENERATED_COMPONENT_CREATE_END
|
||||
|
||||
}
|
||||
|
@ -115,20 +122,24 @@ describe('R3 Tests', () => {
|
|||
() => {
|
||||
|
||||
//GENERATED_RUNTIME_CREATE_START
|
||||
const runtimeAudio = new RuntimeAudio();
|
||||
const runtimeAudioThree = new RuntimeAudioThree();
|
||||
const runtimeCode = new RuntimeCode();
|
||||
const runtimeCodeJS = new RuntimeCodeJS();
|
||||
const runtimeCoder = new RuntimeCoder();
|
||||
const runtimeCodeMirror = new RuntimeCodeMirror();
|
||||
const runtimeCoderCodeMirror = new RuntimeCoderCodeMirror();
|
||||
const runtimeDOM = new RuntimeDOM();
|
||||
const runtimeJSDOM = new RuntimeJSDOM();
|
||||
const runtimeWebDOM = new RuntimeWebDOM();
|
||||
const runtimeDOMJS = new RuntimeDOMJS();
|
||||
const runtimeDOMWeb = new RuntimeDOMWeb();
|
||||
const runtimeGUI = new RuntimeGUI();
|
||||
const runtimeControlKit = new RuntimeControlKit();
|
||||
const runtimeGUIControlKit = new RuntimeGUIControlKit();
|
||||
const runtimeGraphics = new RuntimeGraphics();
|
||||
const runtimeThree = new RuntimeThree();
|
||||
const runtimeGraphicsThree = new RuntimeGraphicsThree();
|
||||
const runtimePhysics = new RuntimePhysics();
|
||||
const runtimeBullet = new RuntimeBullet();
|
||||
const runtimePhysicsBullet = new RuntimePhysicsBullet();
|
||||
const runtimeSocket = new RuntimeSocket();
|
||||
const runtimeStatistics = new RuntimeStatistics();
|
||||
const runtimeStats = new RuntimeStats();
|
||||
const runtimeStatisticsStats = new RuntimeStatisticsStats();
|
||||
//GENERATED_RUNTIME_CREATE_END
|
||||
|
||||
}
|
||||
|
|
32
utils.php
32
utils.php
|
@ -1,5 +1,37 @@
|
|||
<?php
|
||||
|
||||
function rrmdir($src) {
|
||||
$dir = opendir($src);
|
||||
while(false !== ( $file = readdir($dir)) ) {
|
||||
if (( $file != '.' ) && ( $file != '..' )) {
|
||||
$full = $src . '/' . $file;
|
||||
if ( is_dir($full) ) {
|
||||
rrmdir($full);
|
||||
}
|
||||
else {
|
||||
unlink($full);
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($dir);
|
||||
rmdir($src);
|
||||
}
|
||||
|
||||
function recursive_copy($src,$dst) {
|
||||
$dir = opendir($src);
|
||||
@mkdir($dst);
|
||||
while(( $file = readdir($dir)) ) {
|
||||
if (( $file != '.' ) && ( $file != '..' )) {
|
||||
if ( is_dir($src . '/' . $file) ) {
|
||||
recursive_copy($src .'/'. $file, $dst .'/'. $file);
|
||||
} else {
|
||||
copy($src .'/'. $file,$dst .'/'. $file);
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($dir);
|
||||
}
|
||||
|
||||
function to_camel_case_from_upper_underscore($string, $capitalizeFirstCharacter = true)
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in New Issue