template stuff for components
parent
8b4491e7ec
commit
4f6b2bf6e2
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "r3",
|
||||
"version" : "2.0.579",
|
||||
"version" : "2.0.645",
|
||||
"description": "",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
|
|
315
r3.php
315
r3.php
|
@ -6,36 +6,41 @@ include "graph.php";
|
|||
|
||||
global $files;
|
||||
|
||||
function getTokens($type)
|
||||
function getTokens($types)
|
||||
{
|
||||
$fn = fopen('src/templates/token.db', "r");
|
||||
|
||||
$tokens = [];
|
||||
|
||||
while (!feof($fn)) {
|
||||
foreach ($types as $type) {
|
||||
|
||||
$line = fgets($fn);
|
||||
$fn = fopen('src/templates/token.db', "r");
|
||||
|
||||
while (!feof($fn)) {
|
||||
|
||||
$line = fgets($fn);
|
||||
|
||||
$matches = [];
|
||||
if (preg_match('/^(' . $type . '.*$)/', $line, $matches)) {
|
||||
$tokens[$matches[1]] = [];
|
||||
}
|
||||
|
||||
$matches = [];
|
||||
if (preg_match('/^(' . $type . '.*$)/', $line, $matches)) {
|
||||
$tokens[$matches[1]] = [];
|
||||
}
|
||||
|
||||
fclose($fn);
|
||||
}
|
||||
|
||||
fclose($fn);
|
||||
|
||||
return $tokens;
|
||||
}
|
||||
|
||||
/**
|
||||
* Warning - does not do nested token extractions
|
||||
* @throws ErrorException
|
||||
*/
|
||||
function loadSaved($file, $tokens) {
|
||||
function loadSaved($file, $tokens, $extract = false) {
|
||||
|
||||
$saveFile = $file . '.saved';
|
||||
$saveFile = $file;
|
||||
|
||||
echo "loading file " . $saveFile . "\n";
|
||||
// echo "loading file " . $saveFile . "\n";
|
||||
|
||||
$loadedTokens = [];
|
||||
|
||||
|
@ -53,8 +58,13 @@ function loadSaved($file, $tokens) {
|
|||
|
||||
$tokenFound = false;
|
||||
|
||||
$justFound = false;
|
||||
|
||||
foreach ($tokens as $key => $store) {
|
||||
if (preg_match('/\b' . $key . '\b/', $line))
|
||||
if (
|
||||
preg_match('/\b' . $key . '\b/', $line) ||
|
||||
($extract && preg_match('/\b' . $key . '_START\b/', $line))
|
||||
)
|
||||
{
|
||||
if (array_key_exists($key, $loadedTokens)) {
|
||||
throw new ErrorException("TOKEN ALREADY EXISTS! : $key\n");
|
||||
|
@ -66,8 +76,14 @@ function loadSaved($file, $tokens) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($extract && preg_match('/\b' . $currentTokenKey . '_END\b/', $line)) {
|
||||
$currentTokenKey = null;
|
||||
}
|
||||
|
||||
if (!$tokenFound && $line != false) {
|
||||
array_push($loadedTokens[$currentTokenKey], $line);
|
||||
if ($currentTokenKey != null) {
|
||||
array_push($loadedTokens[$currentTokenKey], $line);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -114,7 +130,7 @@ function getFileData($file, &$tokens)
|
|||
|
||||
function save($file, $tokens) {
|
||||
|
||||
echo "saving file " . $file . "\n";
|
||||
// echo "saving file " . $file . "\n";
|
||||
|
||||
getFileData($file, $tokens);
|
||||
|
||||
|
@ -136,7 +152,7 @@ function save($file, $tokens) {
|
|||
|
||||
file_put_contents($saveFile, $saved);
|
||||
|
||||
echo "saved file $saveFile\n";
|
||||
// echo "saved file $saveFile\n";
|
||||
|
||||
return [
|
||||
$saveFile,
|
||||
|
@ -275,7 +291,7 @@ function doGetInheritedTemplateUpdates($node, $restoreTokens, $inherited = true,
|
|||
if (!file_exists($saveFile)) {
|
||||
save($node->file, $restoreTokens);
|
||||
}
|
||||
$tokens = loadSaved($node->file, $restoreTokens);
|
||||
$tokens = loadSaved($node->file . '.saved', $restoreTokens);
|
||||
|
||||
if ($node->parent !== null) {
|
||||
$parentSaveFile = $node->parent->file . '.saved';
|
||||
|
@ -283,7 +299,7 @@ function doGetInheritedTemplateUpdates($node, $restoreTokens, $inherited = true,
|
|||
save($node->parent->file, $restoreTokens);
|
||||
}
|
||||
}
|
||||
$parentTokens = loadSaved($node->parent->file, $restoreTokens);
|
||||
$parentTokens = loadSaved($node->parent->file . '.saved', $restoreTokens);
|
||||
|
||||
} catch (ErrorException $e) {
|
||||
echo $e->getMessage();
|
||||
|
@ -431,7 +447,7 @@ function generateInherited($file, $restoreTokens)
|
|||
|
||||
function generateConstructors($file, $command)
|
||||
{
|
||||
echo $file;
|
||||
// echo $file;
|
||||
|
||||
$constructor = null;
|
||||
$token = 'GENERATED_CONSTRUCTOR';
|
||||
|
@ -485,80 +501,79 @@ function generateConstructors($file, $command)
|
|||
|
||||
}
|
||||
|
||||
function generateInitOptions($file, $tokens)
|
||||
function extractOption($item, $template)
|
||||
{
|
||||
$token = 'CUSTOM_OPTIONS';
|
||||
|
||||
$item = trim($item);
|
||||
|
||||
$key_value = preg_split('/=/', $item);
|
||||
if ($key_value === false) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$key = $key_value[0];
|
||||
$value = $key_value[1];
|
||||
|
||||
$comment_value = preg_split('/\s+-\s+/', $value);
|
||||
$comment = '';
|
||||
if ($comment_value != false) {
|
||||
$value = $comment_value[0];
|
||||
if (array_key_exists(1, $comment_value)) {
|
||||
$comment = $comment_value[1];
|
||||
} else {
|
||||
$comment = 'No comment';
|
||||
}
|
||||
$comment = wordwrap($comment, 100, "\n * ");
|
||||
}
|
||||
$updated = str_replace('COMMENT', $comment, $template);
|
||||
$updated = str_replace('KEY', $key, $updated);
|
||||
$updated = str_replace('VALUE', $value, $updated);
|
||||
return $updated;
|
||||
|
||||
}
|
||||
|
||||
function generateInitOptions($file, $tokens, $token, $section)
|
||||
{
|
||||
|
||||
$store = getTokenStore($token, $tokens);
|
||||
|
||||
if (sizeof($store) <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
echo "Will be building options for $token\n";
|
||||
// echo "Will be building options for $token\n";
|
||||
|
||||
$template = file_get_contents('src/templates/generated_custom_options_init.template');
|
||||
|
||||
$updates = '';
|
||||
|
||||
foreach ($store as $item) {
|
||||
$item = trim($item);
|
||||
$key_value = preg_split('/=/', $item);
|
||||
if ($key_value === false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$key = $key_value[0];
|
||||
$value = $key_value[1];
|
||||
|
||||
$comment_value = preg_split('/\s+-\s+/', $value);
|
||||
$comment = '';
|
||||
if ($comment_value != false) {
|
||||
$value = $comment_value[0];
|
||||
if (array_key_exists(1, $comment_value)) {
|
||||
$comment = $comment_value[1];
|
||||
} else {
|
||||
$comment = 'No comment';
|
||||
}
|
||||
$comment = wordwrap($comment, 100, "\n * ");
|
||||
}
|
||||
$updated = str_replace('COMMENT', $comment, $template);
|
||||
$updated = str_replace('KEY', $key, $updated);
|
||||
$updated = str_replace('VALUE', $value, $updated);
|
||||
$updates .= $updated;
|
||||
$updates .= extractOption($item, $template);
|
||||
}
|
||||
|
||||
updateSection($file, 'GENERATED_OPTIONS_INIT' , $updates);
|
||||
updateSection($file, $section , $updates);
|
||||
}
|
||||
|
||||
function generateInitStaticOptions($file, $tokens)
|
||||
function generateInitStaticOptions($file, $tokens, $token, $section)
|
||||
{
|
||||
$token = 'CUSTOM_STATIC_OPTIONS';
|
||||
|
||||
$store = getTokenStore($token, $tokens);
|
||||
|
||||
if (sizeof($store) <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
echo "Will be building static options for $token\n";
|
||||
// echo "Will be building static options for $token\n";
|
||||
|
||||
$template = file_get_contents('src/templates/generated_custom_static_options_init.template');
|
||||
|
||||
$updates = '';
|
||||
|
||||
foreach ($store as $item) {
|
||||
$item = trim($item);
|
||||
$key_value = preg_split('/=/', $item);
|
||||
if ($key_value === false) {
|
||||
continue;
|
||||
}
|
||||
$key = $key_value[0];
|
||||
$value = $key_value[1];
|
||||
$updated = str_replace('KEY', $key, $template);
|
||||
$updated = str_replace('VALUE', $value, $updated);
|
||||
$updates .= $updated;
|
||||
$updates .= extractOption($item, $template);
|
||||
}
|
||||
|
||||
updateSection($file, 'GENERATED_STATIC_OPTIONS_INIT' , $updates);
|
||||
updateSection($file, $section , $updates);
|
||||
}
|
||||
|
||||
function getTokenStore($tokenName, $tokens)
|
||||
|
@ -569,11 +584,11 @@ function getTokenStore($tokenName, $tokens)
|
|||
return [];
|
||||
}
|
||||
|
||||
function getInstanceMappings($tokens)
|
||||
function getInstanceMappings($tokens, $token)
|
||||
{
|
||||
$instanceMappings = [];
|
||||
|
||||
foreach (getTokenStore('CUSTOM_INSTANCE_OPTIONS_MAPPING', $tokens) as $mapping) {
|
||||
foreach (getTokenStore($token, $tokens) as $mapping) {
|
||||
|
||||
$mapping = trim($mapping);
|
||||
|
||||
|
@ -592,14 +607,14 @@ function getInstanceMappings($tokens)
|
|||
return $instanceMappings;
|
||||
}
|
||||
|
||||
function isExcluded($key, $tokens)
|
||||
function isExcluded($key, $tokens, $excludedToken)
|
||||
{
|
||||
|
||||
if (array_key_exists('CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS', $tokens)) {
|
||||
if (array_key_exists($excludedToken, $tokens)) {
|
||||
|
||||
$excluded = [];
|
||||
|
||||
foreach ($tokens['CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS'] as $exclude) {
|
||||
foreach ($tokens[$excludedToken] as $exclude) {
|
||||
array_push($excluded, trim($exclude));
|
||||
}
|
||||
|
||||
|
@ -612,23 +627,19 @@ function isExcluded($key, $tokens)
|
|||
return false;
|
||||
}
|
||||
|
||||
function doInstanceUpdate($template, $tokens, $asArray = false)
|
||||
function doInstanceUpdate($template, $tokens, $token, $mappingToken, $excludedToken)
|
||||
{
|
||||
$token = 'CUSTOM_OPTIONS';
|
||||
|
||||
$store = getTokenStore($token, $tokens);
|
||||
|
||||
if (sizeof($store) <= 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$instanceMappings = getInstanceMappings($tokens);
|
||||
$instanceMappings = getInstanceMappings($tokens, $mappingToken);
|
||||
|
||||
$updates = '';
|
||||
|
||||
if ($asArray) {
|
||||
$updates = [];
|
||||
}
|
||||
|
||||
foreach ($store as $item) {
|
||||
|
||||
$item = trim($item);
|
||||
|
@ -646,67 +657,49 @@ function doInstanceUpdate($template, $tokens, $asArray = false)
|
|||
$value = $instanceMappings[$key];
|
||||
}
|
||||
|
||||
if (isExcluded($key, $tokens)){
|
||||
if (isExcluded($key, $tokens, $excludedToken)){
|
||||
continue;
|
||||
}
|
||||
|
||||
$updated = str_replace('INSTANCE_KEY', $value, $template);
|
||||
$updated = str_replace('KEY', $key, $updated);
|
||||
if ($asArray) {
|
||||
array_push($updates, $updated);
|
||||
} else {
|
||||
$updates .= $updated;
|
||||
}
|
||||
$updates .= $updated;
|
||||
}
|
||||
|
||||
return $updates;
|
||||
}
|
||||
|
||||
function generateCreateInstanceOptions($file, $tokens)
|
||||
{
|
||||
$template = file_get_contents('src/templates/generated_create_instance_options.template');
|
||||
|
||||
$updates = doInstanceUpdate($template, $tokens, true);
|
||||
|
||||
if ($updates) {
|
||||
echo "Updating create instance options\n";
|
||||
updateSection($file, 'GENERATED_CREATE_INSTANCE_OPTIONS', $updates, ",\n");
|
||||
} else {
|
||||
echo "No create instance options found to generate\n";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Process updateInstance options
|
||||
*/
|
||||
function generateUpdateInstanceOptions($file, $tokens)
|
||||
function generateUpdateInstanceOptions($file, $tokens, $token, $section, $mappingToken, $excludedToken)
|
||||
{
|
||||
$template = file_get_contents('src/templates/generated_update_instance_options.template');
|
||||
|
||||
$updates = doInstanceUpdate($template, $tokens);
|
||||
$updates = doInstanceUpdate($template, $tokens, $token, $mappingToken, $excludedToken);
|
||||
|
||||
if ($updates) {
|
||||
echo "Updating update instance options\n";
|
||||
updateSection($file, 'GENERATED_UPDATE_INSTANCE_OPTIONS', $updates);
|
||||
// echo "Updating update instance options\n";
|
||||
updateSection($file, $section, $updates);
|
||||
} else {
|
||||
echo "No update instance options found to generate\n";
|
||||
// echo "No update instance options found to generate\n";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Process updateFromInstance options
|
||||
*/
|
||||
function generateUpdateFromInstanceOptions($file, $tokens)
|
||||
function generateUpdateFromInstanceOptions($file, $tokens, $token, $section, $mappingToken, $excludedToken)
|
||||
{
|
||||
$template = file_get_contents('src/templates/generated_update_from_instance_options.template');
|
||||
|
||||
$updates = doInstanceUpdate($template, $tokens);
|
||||
$updates = doInstanceUpdate($template, $tokens, $token, $mappingToken, $excludedToken);
|
||||
|
||||
if ($updates) {
|
||||
echo "Updating update from instance options\n";
|
||||
updateSection($file, 'GENERATED_UPDATE_FROM_INSTANCE_OPTIONS', $updates);
|
||||
// echo "Updating update from instance options\n";
|
||||
updateSection($file, $section, $updates);
|
||||
} else {
|
||||
echo "No update from instance options found to generate\n";
|
||||
// echo "No update from instance options found to generate\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -942,9 +935,9 @@ function doMethodUpdate($template, $tokens, $token)
|
|||
|
||||
$updated = $template;
|
||||
|
||||
if ($token === 'CUSTOM_METHODS') {
|
||||
if ($token === 'CUSTOM_METHODS' || $token === 'TEMPLATE_METHODS') {
|
||||
$potentialTemplate = strtolower('src/templates/' . $methodTokenName . '.template');
|
||||
} else {
|
||||
} else if ($token === 'CUSTOM_STATIC_METHODS' || $token === 'TEMPLATE_STATIC_METHODS') {
|
||||
$potentialTemplate = strtolower('src/templates/static_' . $methodTokenName . '.template');
|
||||
}
|
||||
|
||||
|
@ -966,19 +959,17 @@ function doMethodUpdate($template, $tokens, $token)
|
|||
return $updates;
|
||||
}
|
||||
|
||||
function generateStaticMethods($file, $tokens)
|
||||
function generateStaticMethods($file, $tokens, $token, $section)
|
||||
{
|
||||
$token = 'CUSTOM_STATIC_METHODS';
|
||||
|
||||
$template = file_get_contents('src/templates/generated_static_methods.template');
|
||||
|
||||
$updates = doMethodUpdate($template, $tokens, $token);
|
||||
|
||||
if ($updates) {
|
||||
echo "Updating static methods\n";
|
||||
updateSection($file, 'GENERATED_STATIC_METHODS', $updates);
|
||||
// echo "Updating static methods\n";
|
||||
updateSection($file, $section, $updates);
|
||||
} else {
|
||||
echo "No static methods found to generate\n";
|
||||
// echo "No static methods found to generate\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1102,10 +1093,10 @@ function generateEventListenerMethods($file, $tokens)
|
|||
$updates = getEventListenerUpdates($template, $tokens, $token);
|
||||
|
||||
if ($updates) {
|
||||
echo "Updating event listeners.. \n";
|
||||
// echo "Updating event listeners.. \n";
|
||||
updateSection($file, 'GENERATED_EVENT_LISTENER_METHODS', $updates);
|
||||
} else {
|
||||
echo "No event listeners found to generate\n";
|
||||
// echo "No event listeners found to generate\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1119,27 +1110,25 @@ function generateStaticEventListenerMethods($file, $tokens)
|
|||
$updates = getStaticEventListenerUpdates($template, $tokens, $token);
|
||||
|
||||
if ($updates) {
|
||||
echo "Updating static event listeners.. \n";
|
||||
// echo "Updating static event listeners.. \n";
|
||||
updateSection($file, 'GENERATED_STATIC_EVENT_LISTENER_METHODS', $updates);
|
||||
} else {
|
||||
echo "No static event listeners found to generate\n";
|
||||
// echo "No static event listeners found to generate\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function generateMethods($file, $tokens)
|
||||
function generateMethods($file, $tokens, $token, $section)
|
||||
{
|
||||
$token = 'CUSTOM_METHODS';
|
||||
|
||||
$template = file_get_contents('src/templates/generated_methods.template');
|
||||
|
||||
$updates = doMethodUpdate($template, $tokens, $token);
|
||||
|
||||
if ($updates) {
|
||||
echo "Updating methods\n";
|
||||
updateSection($file, 'GENERATED_METHODS', $updates);
|
||||
updateSection($file, $section, $updates);
|
||||
} else {
|
||||
echo "No methods found to generate\n";
|
||||
// echo "No methods found to generate\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1246,9 +1235,9 @@ function generateR3($nodes, $graph)
|
|||
|
||||
$r3File = 'src/r3/r3-r3.js';
|
||||
|
||||
save($r3File, getTokens('CUSTOM'));
|
||||
save($r3File, getTokens(['CUSTOM']));
|
||||
|
||||
$tokens = loadSaved($r3File, getTokens('CUSTOM'));
|
||||
$tokens = loadSaved($r3File . '.saved', getTokens(['CUSTOM']));
|
||||
|
||||
$template = file_get_contents('src/templates/r3_base.template');
|
||||
|
||||
|
@ -1298,6 +1287,9 @@ function generateR3($nodes, $graph)
|
|||
|
||||
function generateEvents()
|
||||
{
|
||||
|
||||
echo "Generating Events\n";
|
||||
|
||||
global $files;
|
||||
|
||||
$events = [];
|
||||
|
@ -1313,7 +1305,7 @@ function generateEvents()
|
|||
!preg_match('/r3\-event/', $file)
|
||||
) {
|
||||
|
||||
echo "processing file " . $file . "\n";
|
||||
// echo "processing file " . $file . "\n";
|
||||
|
||||
$fn = fopen($file, "r");
|
||||
|
||||
|
@ -1373,8 +1365,8 @@ function generateEvents()
|
|||
$eventFunction .= "\t}\n\n";
|
||||
$eventFunction .= "};\n";
|
||||
|
||||
echo $eventList;
|
||||
echo $eventFunction;
|
||||
// echo $eventList;
|
||||
// echo $eventFunction;
|
||||
|
||||
updateSection('./src/r3/r3-event.js', 'GENERATED_EVENTS' , $eventList . $eventFunction);
|
||||
|
||||
|
@ -1400,8 +1392,8 @@ function generateR3Dist($nodes)
|
|||
$template = str_replace('VERSION', $version, $template);
|
||||
fwrite($r3js, $template);
|
||||
|
||||
$generateTokens = getTokens('GENERATED');
|
||||
$customTokens = getTokens('CUSTOM');
|
||||
$generateTokens = getTokens(['GENERATED']);
|
||||
$customTokens = getTokens(['CUSTOM']);
|
||||
|
||||
$savedGenerate = save($r3jsSource, $generateTokens)[1];
|
||||
$savedCustom = save($r3jsSource, $customTokens)[1];
|
||||
|
@ -1503,7 +1495,7 @@ function generateR3Dist($nodes)
|
|||
function updateParentSystems($nodes)
|
||||
{
|
||||
foreach ($nodes as $node) {
|
||||
if (preg_match('/System/', $node->name)) {
|
||||
if (preg_match('/(System|Component|Entity|Runtime)/', $node->name)) {
|
||||
|
||||
$className = $node->name;
|
||||
$parentName = $node->parent->name;
|
||||
|
@ -1528,7 +1520,7 @@ function updateParentSystems($nodes)
|
|||
|
||||
function buildNodeList($file)
|
||||
{
|
||||
echo "loading file $file\n";
|
||||
// echo "loading file $file\n";
|
||||
|
||||
global $nodeList;
|
||||
|
||||
|
@ -1671,7 +1663,7 @@ foreach ($files as $file) {
|
|||
exit(0);
|
||||
}
|
||||
|
||||
$tokens = getTokens('CUSTOM');
|
||||
$tokens = getTokens(['CUSTOM']);
|
||||
|
||||
$result = save($file, $tokens);
|
||||
|
||||
|
@ -1681,17 +1673,27 @@ foreach ($files as $file) {
|
|||
|
||||
$saveFile = $file . '.saved';
|
||||
|
||||
$restoreTokens = getTokens('CUSTOM');
|
||||
$restoreTokens = getTokens(['CUSTOM']);
|
||||
|
||||
$restoreTokenKeys = array_keys($restoreTokens);
|
||||
|
||||
try {
|
||||
$tokens = loadSaved($file, $restoreTokens);
|
||||
$tokens = loadSaved($file . '.saved', $restoreTokens);
|
||||
} catch (ErrorException $e) {
|
||||
echo $e->getMessage();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
$templateTokens = getTokens(['TEMPLATE']);
|
||||
try {
|
||||
$tokenData = loadSaved($file, $templateTokens, true);
|
||||
} catch (ErrorException $e) {
|
||||
echo $e->getMessage();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
$tokens = array_merge($tokens, $tokenData);
|
||||
|
||||
$skipped = [];
|
||||
|
||||
foreach ($tokens as $token => $store) {
|
||||
|
@ -1700,38 +1702,45 @@ foreach ($files as $file) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if we have no saved custom methods but introduced them
|
||||
* from a template
|
||||
*/
|
||||
if (!in_array('CUSTOM_METHODS', array_keys($tokens))){
|
||||
$methodTokens = getTokens('CUSTOM_METHODS');
|
||||
getFileData($file, $methodTokens);
|
||||
|
||||
if (sizeof($methodTokens['CUSTOM_METHODS']) > 0) {
|
||||
$tokens['CUSTOM_METHODS'] = $methodTokens['CUSTOM_METHODS'];
|
||||
}
|
||||
}
|
||||
echo "Generating Constructors\n";
|
||||
|
||||
generateConstructors($file, $argv[3]);
|
||||
|
||||
generateMethods($file, $tokens);
|
||||
echo "Generating Methods\n";
|
||||
|
||||
generateStaticMethods($file, $tokens);
|
||||
generateMethods($file, $tokens, 'TEMPLATE_METHODS', 'GENERATED_TEMPLATE_METHODS');
|
||||
|
||||
generateMethods($file, $tokens, 'CUSTOM_METHODS', 'GENERATED_METHODS');
|
||||
|
||||
generateStaticMethods($file, $tokens, 'CUSTOM_STATIC_METHODS', 'GENERATED_STATIC_METHODS');
|
||||
|
||||
generateStaticMethods($file, $tokens, 'TEMPLATE_STATIC_METHODS', 'GENERATED_TEMPLATE_STATIC_METHODS');
|
||||
|
||||
generateEventListenerMethods($file, $tokens);
|
||||
|
||||
generateStaticEventListenerMethods($file, $tokens);
|
||||
|
||||
generateInitOptions($file, $tokens);
|
||||
echo "Generating Options\n";
|
||||
|
||||
generateInitStaticOptions($file, $tokens);
|
||||
generateInitOptions($file, $tokens, 'TEMPLATE_OPTIONS', 'GENERATED_TEMPLATE_OPTIONS_INIT');
|
||||
|
||||
generateCreateInstanceOptions($file, $tokens);
|
||||
generateInitOptions($file, $tokens, 'CUSTOM_OPTIONS', 'GENERATED_OPTIONS_INIT');
|
||||
|
||||
generateUpdateInstanceOptions($file, $tokens);
|
||||
generateInitStaticOptions($file, $tokens, 'CUSTOM_STATIC_OPTIONS', 'GENERATED_STATIC_OPTIONS_INIT');
|
||||
|
||||
generateUpdateFromInstanceOptions($file, $tokens);
|
||||
generateInitStaticOptions($file, $tokens, 'TEMPLATE_STATIC_OPTIONS', 'GENERATED_TEMPLATE_STATIC_OPTIONS_INIT');
|
||||
|
||||
// generateCreateInstanceOptions($file, $tokens);
|
||||
|
||||
generateUpdateInstanceOptions($file, $tokens, 'CUSTOM_OPTIONS', 'GENERATED_UPDATE_INSTANCE_OPTIONS', 'CUSTOM_INSTANCE_OPTIONS_MAPPING', 'CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS');
|
||||
|
||||
generateUpdateInstanceOptions($file, $tokens, 'TEMPLATE_OPTIONS', 'GENERATED_TEMPLATE_UPDATE_INSTANCE_OPTIONS', 'TEMPLATE_INSTANCE_OPTIONS_MAPPING', 'TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS');
|
||||
|
||||
generateUpdateFromInstanceOptions($file, $tokens, 'CUSTOM_OPTIONS', 'GENERATED_UPDATE_FROM_INSTANCE_OPTIONS', 'CUSTOM_INSTANCE_OPTIONS_MAPPING', 'CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS');
|
||||
|
||||
generateUpdateFromInstanceOptions($file, $tokens, 'TEMPLATE_OPTIONS', 'GENERATED_TEMPLATE_UPDATE_FROM_INSTANCE_OPTIONS', 'TEMPLATE_INSTANCE_OPTIONS_MAPPING', 'TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS');
|
||||
|
||||
echo "Generating Event Listeners\n";
|
||||
|
||||
generateEventListenersStart($file, $tokens);
|
||||
|
||||
|
@ -1786,7 +1795,7 @@ if ($argv[2] == 'build-dist') {
|
|||
$nodeList
|
||||
);
|
||||
|
||||
$restoreTokens = getTokens('CUSTOM');
|
||||
$restoreTokens = getTokens(['CUSTOM']);
|
||||
|
||||
$restoreTokenKeys = array_keys($restoreTokens);
|
||||
|
||||
|
@ -1824,6 +1833,8 @@ if ($argv[2] == 'build-dist') {
|
|||
]
|
||||
);
|
||||
|
||||
echo "Building Distribution\n";
|
||||
|
||||
generateR3($nodes, $graph);
|
||||
generateR3Dist($nodes);
|
||||
|
||||
|
|
|
@ -1,219 +0,0 @@
|
|||
const Event = require('.././r3-event');
|
||||
const Utils = require('.././r3-utils');
|
||||
const DOM = require('.././r3-d-o-m.js');
|
||||
|
||||
/**
|
||||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
Class R3.Event.Object.Component.DOM.Canvas
|
||||
[Inherited from Event]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
- initialize()
|
||||
Should raise an event(s) which indicates that this object initialized
|
||||
|
||||
- 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:
|
||||
|
||||
- id (Default value Utils.RandomId(10))
|
||||
- name (Default value 'Object ' + options.id)
|
||||
- register (Default value true)
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
- initialize()
|
||||
Overrides for R3.Event.initialize()
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from Component]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
- initialize()
|
||||
Should raises an event(s) which indicates that this object initialized
|
||||
|
||||
- createInstance()
|
||||
Creates an instance of this object based on the current runtime
|
||||
|
||||
- dispose()
|
||||
Disposes of this object by disposing the instance first.
|
||||
|
||||
- disposeInstance()
|
||||
Disposes of the runtime instance.
|
||||
|
||||
- updateFromInstance()
|
||||
Updates this object by copying the values of its instance into the current object.
|
||||
|
||||
- getRuntime()
|
||||
Gets the current runtime object
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from DOM]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
- initialize()
|
||||
In addition to firing an Event.OBJECT_INITIALIZED and Event.COMPONENT_INITIALIZED, it also fires an
|
||||
Event.DOM_COMPONENT_INITIALIZED
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to Canvas]
|
||||
|
||||
Properties:
|
||||
|
||||
<no properties>
|
||||
|
||||
Static Properties:
|
||||
|
||||
<no static properties>
|
||||
|
||||
Methods:
|
||||
|
||||
<no methods>
|
||||
|
||||
Static Methods:
|
||||
|
||||
<no static methods>
|
||||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
CUSTOM_INSTANCE_OPTIONS_MAPPING_START
|
||||
CUSTOM_INSTANCE_OPTIONS_MAPPING_END
|
||||
|
||||
CUSTOM_LINKED_OBJECTS_START
|
||||
CUSTOM_LINKED_OBJECTS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_METHODS_START
|
||||
CUSTOM_METHODS_END
|
||||
|
||||
CUSTOM_STATIC_METHODS_START
|
||||
CUSTOM_STATIC_METHODS_END
|
||||
|
||||
**/
|
||||
|
||||
class Canvas extends DOM {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
||||
if (typeof options === 'undefined') {
|
||||
options = {};
|
||||
}
|
||||
|
||||
if (typeof options.callDepth === 'undefined') {
|
||||
options.callDepth = 0;
|
||||
} else {
|
||||
options.callDepth++;
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
if (options.callDepth === 0) {
|
||||
this.initialize();
|
||||
} else {
|
||||
options.callDepth--;
|
||||
}
|
||||
|
||||
//CUSTOM_AFTER_INIT_START
|
||||
//CUSTOM_AFTER_INIT_END
|
||||
}
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
||||
//GENERATED_METHODS_START
|
||||
//GENERATED_METHODS_END
|
||||
|
||||
//GENERATED_STATIC_METHODS_START
|
||||
//GENERATED_STATIC_METHODS_END
|
||||
|
||||
//CUSTOM_IMPLEMENTATION_START
|
||||
//CUSTOM_IMPLEMENTATION_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 = Canvas;
|
|
@ -79,20 +79,7 @@ const ComponentDOM = require('.././r3-component-d-o-m.js');
|
|||
|
||||
Inherited Methods:
|
||||
|
||||
- initialize()
|
||||
Should raises an event(s) which indicates that this object initialized
|
||||
|
||||
- createInstance()
|
||||
Creates an instance of this object based on the current runtime
|
||||
|
||||
- dispose()
|
||||
Disposes of this object by disposing the instance first.
|
||||
|
||||
- disposeInstance()
|
||||
Disposes of the runtime instance.
|
||||
|
||||
- setRuntime()
|
||||
Sets the runtime property of this component required for constructing an instance of this component.
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
|
@ -123,8 +110,6 @@ const ComponentDOM = require('.././r3-component-d-o-m.js');
|
|||
|
||||
Properties:
|
||||
|
||||
- instance (Default value null - Holds the current instance of this object as determined (built) by
|
||||
the runtime object.)
|
||||
- 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))
|
||||
|
@ -136,11 +121,7 @@ const ComponentDOM = require('.././r3-component-d-o-m.js');
|
|||
|
||||
Methods:
|
||||
|
||||
- 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.
|
||||
<no methods>
|
||||
|
||||
Static Methods:
|
||||
|
||||
|
@ -148,29 +129,52 @@ const ComponentDOM = require('.././r3-component-d-o-m.js');
|
|||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
TEMPLATE_OPTIONS_START
|
||||
parent=null - The parent R3.Object of this component
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
name='hello'
|
||||
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 #000000;'
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
TEMPLATE_STATIC_OPTIONS_START
|
||||
ExtendsStaticOptionTest=true - A static test option
|
||||
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
|
||||
|
||||
CUSTOM_LINKED_OBJECTS_START
|
||||
CUSTOM_LINKED_OBJECTS_END
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
parent
|
||||
instance
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
instance
|
||||
type
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_METHODS_START
|
||||
TEMPLATE_METHODS_START
|
||||
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
|
||||
|
||||
|
@ -197,13 +201,28 @@ class ComponentCanvas extends ComponentDOM {
|
|||
|
||||
super(options);
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
/**
|
||||
* parent - The parent R3.Object of this component
|
||||
*/
|
||||
if (typeof options.parent === 'undefined') {
|
||||
options.parent = null;
|
||||
}
|
||||
/**
|
||||
* instance - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
*/
|
||||
if (typeof options.instance === 'undefined') {
|
||||
options.instance = null;
|
||||
}
|
||||
/**
|
||||
* name - No comment
|
||||
*/
|
||||
if (typeof options.name === 'undefined') {
|
||||
options.name = 'hello';
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
/**
|
||||
* type - No comment
|
||||
*/
|
||||
|
@ -249,7 +268,7 @@ class ComponentCanvas extends ComponentDOM {
|
|||
}
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
||||
//GENERATED_METHODS_START
|
||||
//GENERATED_TEMPLATE_METHODS_START
|
||||
|
||||
/**
|
||||
* updateInstance()
|
||||
|
@ -262,20 +281,6 @@ class ComponentCanvas extends ComponentDOM {
|
|||
this.emit(Event.UPDATE_INSTANCE_BEFORE, this);
|
||||
|
||||
//GENERATED_UPDATE_INSTANCE_OPTIONS_START
|
||||
if (property === 'type') {
|
||||
this.instance.type = this.type;
|
||||
this.emit(
|
||||
Event.UPDATE_INSTANCE_PROPERTY,
|
||||
{
|
||||
component : this,
|
||||
property : type,
|
||||
instanceProperty : type
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (property === 'width') {
|
||||
this.instance.width = this.width;
|
||||
this.emit(
|
||||
|
@ -320,6 +325,23 @@ class ComponentCanvas extends ComponentDOM {
|
|||
}
|
||||
//GENERATED_UPDATE_INSTANCE_OPTIONS_END
|
||||
|
||||
//GENERATED_TEMPLATE_UPDATE_INSTANCE_OPTIONS_START
|
||||
if (property === 'name') {
|
||||
this.instance.name = this.name;
|
||||
this.emit(
|
||||
Event.UPDATE_INSTANCE_PROPERTY,
|
||||
{
|
||||
component : this,
|
||||
property : name,
|
||||
instanceProperty : name
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//GENERATED_TEMPLATE_UPDATE_INSTANCE_OPTIONS_END
|
||||
|
||||
this.emit(Event.UPDATE_INSTANCE_AFTER, this);
|
||||
//GENERATED_UPDATE_INSTANCE_METHOD_END
|
||||
|
||||
|
@ -339,20 +361,6 @@ class ComponentCanvas extends ComponentDOM {
|
|||
this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this);
|
||||
|
||||
//GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_START
|
||||
if (property === 'type' || property === 'all') {
|
||||
this.type = this.instance.type;
|
||||
this.emit(
|
||||
Event.UPDATE_PROPERTY_FROM_INSTANCE,
|
||||
{
|
||||
component : this,
|
||||
property : type,
|
||||
instanceProperty : type
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (property === 'width' || property === 'all') {
|
||||
this.width = this.instance.width;
|
||||
this.emit(
|
||||
|
@ -397,6 +405,23 @@ class ComponentCanvas extends ComponentDOM {
|
|||
}
|
||||
//GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
//GENERATED_TEMPLATE_UPDATE_FROM_INSTANCE_OPTIONS_START
|
||||
if (property === 'name' || property === 'all') {
|
||||
this.name = this.instance.name;
|
||||
this.emit(
|
||||
Event.UPDATE_PROPERTY_FROM_INSTANCE,
|
||||
{
|
||||
component : this,
|
||||
property : name,
|
||||
instanceProperty : name
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//GENERATED_TEMPLATE_UPDATE_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this);
|
||||
|
||||
//GENERATED_UPDATE_FROM_INSTANCE_METHOD_END
|
||||
|
@ -405,8 +430,14 @@ class ComponentCanvas extends ComponentDOM {
|
|||
//CUSTOM_UPDATE_FROM_INSTANCE_METHOD_END
|
||||
|
||||
}
|
||||
//GENERATED_TEMPLATE_METHODS_END
|
||||
|
||||
//GENERATED_METHODS_START
|
||||
//GENERATED_METHODS_END
|
||||
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_START
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
//GENERATED_STATIC_METHODS_START
|
||||
//GENERATED_STATIC_METHODS_END
|
||||
|
||||
|
@ -414,6 +445,16 @@ class ComponentCanvas extends ComponentDOM {
|
|||
//CUSTOM_IMPLEMENTATION_END
|
||||
}
|
||||
|
||||
//GENERATED_TEMPLATE_STATIC_OPTIONS_INIT_START
|
||||
/**
|
||||
* static ExtendsStaticOptionTest - A static test option
|
||||
*/
|
||||
ComponentCanvas.ExtendsStaticOptionTest = true;
|
||||
//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
|
||||
|
||||
|
|
|
@ -79,20 +79,7 @@ const Component = require('.././r3-component.js');
|
|||
|
||||
Inherited Methods:
|
||||
|
||||
- initialize()
|
||||
Should raises an event(s) which indicates that this object initialized
|
||||
|
||||
- createInstance()
|
||||
Creates an instance of this object based on the current runtime
|
||||
|
||||
- dispose()
|
||||
Disposes of this object by disposing the instance first.
|
||||
|
||||
- disposeInstance()
|
||||
Disposes of the runtime instance.
|
||||
|
||||
- setRuntime()
|
||||
Sets the runtime property of this component required for constructing an instance of this component.
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
|
@ -121,24 +108,49 @@ const Component = require('.././r3-component.js');
|
|||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
parent=null - The parent R3.Object of this component
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
name='hello'
|
||||
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
|
||||
|
||||
TEMPLATE_STATIC_OPTIONS_START
|
||||
ExtendsStaticOptionTest=true - A static test option
|
||||
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
|
||||
|
||||
CUSTOM_LINKED_OBJECTS_START
|
||||
CUSTOM_LINKED_OBJECTS_END
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
parent
|
||||
instance
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
instance
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
TEMPLATE_METHODS_START
|
||||
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
|
||||
initialize() - In addition to firing an Event.OBJECT_INITIALIZED and Event.COMPONENT_INITIALIZED, it also fires an Event.DOM_COMPONENT_INITIALIZED
|
||||
CUSTOM_METHODS_END
|
||||
|
||||
TEMPLATE_STATIC_METHODS_START
|
||||
TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
CUSTOM_STATIC_METHODS_START
|
||||
CUSTOM_STATIC_METHODS_END
|
||||
|
||||
|
@ -165,6 +177,27 @@ class ComponentDOM extends Component {
|
|||
|
||||
super(options);
|
||||
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
/**
|
||||
* parent - The parent R3.Object of this component
|
||||
*/
|
||||
if (typeof options.parent === 'undefined') {
|
||||
options.parent = null;
|
||||
}
|
||||
/**
|
||||
* instance - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
*/
|
||||
if (typeof options.instance === 'undefined') {
|
||||
options.instance = null;
|
||||
}
|
||||
/**
|
||||
* name - No comment
|
||||
*/
|
||||
if (typeof options.name === 'undefined') {
|
||||
options.name = 'hello';
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
/**
|
||||
* instance - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
|
@ -193,6 +226,114 @@ class ComponentDOM extends Component {
|
|||
}
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
||||
//GENERATED_TEMPLATE_METHODS_START
|
||||
|
||||
/**
|
||||
* 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 === '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
|
||||
if (property === 'name') {
|
||||
this.instance.name = this.name;
|
||||
this.emit(
|
||||
Event.UPDATE_INSTANCE_PROPERTY,
|
||||
{
|
||||
component : this,
|
||||
property : name,
|
||||
instanceProperty : name
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//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
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 === '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
|
||||
if (property === 'name' || property === 'all') {
|
||||
this.name = this.instance.name;
|
||||
this.emit(
|
||||
Event.UPDATE_PROPERTY_FROM_INSTANCE,
|
||||
{
|
||||
component : this,
|
||||
property : name,
|
||||
instanceProperty : name
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//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_TEMPLATE_METHODS_END
|
||||
|
||||
//GENERATED_METHODS_START
|
||||
|
||||
/**
|
||||
|
@ -220,6 +361,9 @@ class ComponentDOM extends Component {
|
|||
}
|
||||
//GENERATED_METHODS_END
|
||||
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_START
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
//GENERATED_STATIC_METHODS_START
|
||||
//GENERATED_STATIC_METHODS_END
|
||||
|
||||
|
@ -227,6 +371,16 @@ class ComponentDOM extends Component {
|
|||
//CUSTOM_IMPLEMENTATION_END
|
||||
}
|
||||
|
||||
//GENERATED_TEMPLATE_STATIC_OPTIONS_INIT_START
|
||||
/**
|
||||
* static ExtendsStaticOptionTest - A static test option
|
||||
*/
|
||||
ComponentDOM.ExtendsStaticOptionTest = true;
|
||||
//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
|
||||
|
||||
|
|
|
@ -79,20 +79,7 @@ const Component = require('.././r3-component.js');
|
|||
|
||||
Inherited Methods:
|
||||
|
||||
- initialize()
|
||||
Should raises an event(s) which indicates that this object initialized
|
||||
|
||||
- createInstance()
|
||||
Creates an instance of this object based on the current runtime
|
||||
|
||||
- dispose()
|
||||
Disposes of this object by disposing the instance first.
|
||||
|
||||
- disposeInstance()
|
||||
Disposes of the runtime instance.
|
||||
|
||||
- setRuntime()
|
||||
Sets the runtime property of this component required for constructing an instance of this component.
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
|
@ -102,8 +89,7 @@ const Component = require('.././r3-component.js');
|
|||
|
||||
Properties:
|
||||
|
||||
- instance (Default value null - Holds the current instance of this object as determined (built) by
|
||||
the runtime object.)
|
||||
<no properties>
|
||||
|
||||
Static Properties:
|
||||
|
||||
|
@ -121,24 +107,48 @@ const Component = require('.././r3-component.js');
|
|||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
TEMPLATE_OPTIONS_START
|
||||
parent=null - The parent R3.Object of this component
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
name='hello'
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
TEMPLATE_STATIC_OPTIONS_START
|
||||
ExtendsStaticOptionTest=true - A static test option
|
||||
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
|
||||
|
||||
CUSTOM_LINKED_OBJECTS_START
|
||||
CUSTOM_LINKED_OBJECTS_END
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
parent
|
||||
instance
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
instance
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
TEMPLATE_METHODS_START
|
||||
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
|
||||
initialize() - In addition to firing an Event.OBJECT_INITIALIZED and Event.COMPONENT_INITIALIZED, it also fires an Event.GRAPHICS_COMPONENT_INITIALIZED
|
||||
CUSTOM_METHODS_END
|
||||
|
||||
TEMPLATE_STATIC_METHODS_START
|
||||
TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
CUSTOM_STATIC_METHODS_START
|
||||
CUSTOM_STATIC_METHODS_END
|
||||
|
||||
|
@ -165,13 +175,28 @@ class ComponentGraphics extends Component {
|
|||
|
||||
super(options);
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
/**
|
||||
* parent - The parent R3.Object of this component
|
||||
*/
|
||||
if (typeof options.parent === 'undefined') {
|
||||
options.parent = null;
|
||||
}
|
||||
/**
|
||||
* instance - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
*/
|
||||
if (typeof options.instance === 'undefined') {
|
||||
options.instance = null;
|
||||
}
|
||||
/**
|
||||
* name - No comment
|
||||
*/
|
||||
if (typeof options.name === 'undefined') {
|
||||
options.name = 'hello';
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
//CUSTOM_OPTIONS_INIT_START
|
||||
|
@ -193,6 +218,86 @@ class ComponentGraphics extends Component {
|
|||
}
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
||||
//GENERATED_TEMPLATE_METHODS_START
|
||||
|
||||
/**
|
||||
* 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
|
||||
if (property === 'name') {
|
||||
this.instance.name = this.name;
|
||||
this.emit(
|
||||
Event.UPDATE_INSTANCE_PROPERTY,
|
||||
{
|
||||
component : this,
|
||||
property : name,
|
||||
instanceProperty : name
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//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
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
if (property === 'name' || property === 'all') {
|
||||
this.name = this.instance.name;
|
||||
this.emit(
|
||||
Event.UPDATE_PROPERTY_FROM_INSTANCE,
|
||||
{
|
||||
component : this,
|
||||
property : name,
|
||||
instanceProperty : name
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//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_TEMPLATE_METHODS_END
|
||||
|
||||
//GENERATED_METHODS_START
|
||||
|
||||
/**
|
||||
|
@ -220,6 +325,9 @@ class ComponentGraphics extends Component {
|
|||
}
|
||||
//GENERATED_METHODS_END
|
||||
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_START
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
//GENERATED_STATIC_METHODS_START
|
||||
//GENERATED_STATIC_METHODS_END
|
||||
|
||||
|
@ -227,6 +335,16 @@ class ComponentGraphics extends Component {
|
|||
//CUSTOM_IMPLEMENTATION_END
|
||||
}
|
||||
|
||||
//GENERATED_TEMPLATE_STATIC_OPTIONS_INIT_START
|
||||
/**
|
||||
* static ExtendsStaticOptionTest - A static test option
|
||||
*/
|
||||
ComponentGraphics.ExtendsStaticOptionTest = true;
|
||||
//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
|
||||
|
||||
|
|
|
@ -79,20 +79,7 @@ const ComponentGraphics = require('.././r3-component-graphics.js');
|
|||
|
||||
Inherited Methods:
|
||||
|
||||
- initialize()
|
||||
Should raises an event(s) which indicates that this object initialized
|
||||
|
||||
- createInstance()
|
||||
Creates an instance of this object based on the current runtime
|
||||
|
||||
- dispose()
|
||||
Disposes of this object by disposing the instance first.
|
||||
|
||||
- disposeInstance()
|
||||
Disposes of the runtime instance.
|
||||
|
||||
- setRuntime()
|
||||
Sets the runtime property of this component required for constructing an instance of this component.
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
|
@ -102,8 +89,7 @@ const ComponentGraphics = require('.././r3-component-graphics.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:
|
||||
|
||||
|
@ -123,8 +109,7 @@ const ComponentGraphics = require('.././r3-component-graphics.js');
|
|||
|
||||
Properties:
|
||||
|
||||
- instance (Default value null - Holds the current instance of this object as determined (built) by
|
||||
the runtime object.)
|
||||
<no properties>
|
||||
|
||||
Static Properties:
|
||||
|
||||
|
@ -132,11 +117,7 @@ const ComponentGraphics = require('.././r3-component-graphics.js');
|
|||
|
||||
Methods:
|
||||
|
||||
- updateInstance()
|
||||
No comment
|
||||
|
||||
- updateFromInstance()
|
||||
No comment
|
||||
<no methods>
|
||||
|
||||
Static Methods:
|
||||
|
||||
|
@ -144,25 +125,47 @@ const ComponentGraphics = require('.././r3-component-graphics.js');
|
|||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
TEMPLATE_OPTIONS_START
|
||||
parent=null - The parent R3.Object of this component
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
name='hello'
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
TEMPLATE_STATIC_OPTIONS_START
|
||||
ExtendsStaticOptionTest=true - A static test option
|
||||
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
|
||||
|
||||
CUSTOM_LINKED_OBJECTS_START
|
||||
CUSTOM_LINKED_OBJECTS_END
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
parent
|
||||
instance
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
instance
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
TEMPLATE_METHODS_START
|
||||
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
|
||||
updateInstance()
|
||||
updateFromInstance()
|
||||
CUSTOM_METHODS_END
|
||||
|
||||
TEMPLATE_STATIC_METHODS_START
|
||||
TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
CUSTOM_STATIC_METHODS_START
|
||||
CUSTOM_STATIC_METHODS_END
|
||||
|
||||
|
@ -189,13 +192,28 @@ class ComponentImage extends ComponentGraphics {
|
|||
|
||||
super(options);
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
/**
|
||||
* parent - The parent R3.Object of this component
|
||||
*/
|
||||
if (typeof options.parent === 'undefined') {
|
||||
options.parent = null;
|
||||
}
|
||||
/**
|
||||
* instance - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
*/
|
||||
if (typeof options.instance === 'undefined') {
|
||||
options.instance = null;
|
||||
}
|
||||
/**
|
||||
* name - No comment
|
||||
*/
|
||||
if (typeof options.name === 'undefined') {
|
||||
options.name = 'hello';
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
//CUSTOM_OPTIONS_INIT_START
|
||||
|
@ -217,13 +235,14 @@ class ComponentImage extends ComponentGraphics {
|
|||
}
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
||||
//GENERATED_METHODS_START
|
||||
//GENERATED_TEMPLATE_METHODS_START
|
||||
|
||||
/**
|
||||
* updateInstance()
|
||||
* - No comment
|
||||
* - Updates this object by copying the values of the current object into it's instance object.
|
||||
* @param property
|
||||
*/
|
||||
updateInstance() {
|
||||
updateInstance(property) {
|
||||
|
||||
//GENERATED_UPDATE_INSTANCE_METHOD_START
|
||||
this.emit(Event.UPDATE_INSTANCE_BEFORE, this);
|
||||
|
@ -231,6 +250,23 @@ class ComponentImage extends ComponentGraphics {
|
|||
//GENERATED_UPDATE_INSTANCE_OPTIONS_START
|
||||
//GENERATED_UPDATE_INSTANCE_OPTIONS_END
|
||||
|
||||
//GENERATED_TEMPLATE_UPDATE_INSTANCE_OPTIONS_START
|
||||
if (property === 'name') {
|
||||
this.instance.name = this.name;
|
||||
this.emit(
|
||||
Event.UPDATE_INSTANCE_PROPERTY,
|
||||
{
|
||||
component : this,
|
||||
property : name,
|
||||
instanceProperty : name
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//GENERATED_TEMPLATE_UPDATE_INSTANCE_OPTIONS_END
|
||||
|
||||
this.emit(Event.UPDATE_INSTANCE_AFTER, this);
|
||||
//GENERATED_UPDATE_INSTANCE_METHOD_END
|
||||
|
||||
|
@ -241,9 +277,10 @@ class ComponentImage extends ComponentGraphics {
|
|||
|
||||
/**
|
||||
* updateFromInstance()
|
||||
* - No comment
|
||||
* - Updates this object by copying the values of its instance into the current object.
|
||||
* @param property
|
||||
*/
|
||||
updateFromInstance() {
|
||||
updateFromInstance(property) {
|
||||
|
||||
//GENERATED_UPDATE_FROM_INSTANCE_METHOD_START
|
||||
this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this);
|
||||
|
@ -251,6 +288,23 @@ class ComponentImage extends ComponentGraphics {
|
|||
//GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_START
|
||||
//GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
//GENERATED_TEMPLATE_UPDATE_FROM_INSTANCE_OPTIONS_START
|
||||
if (property === 'name' || property === 'all') {
|
||||
this.name = this.instance.name;
|
||||
this.emit(
|
||||
Event.UPDATE_PROPERTY_FROM_INSTANCE,
|
||||
{
|
||||
component : this,
|
||||
property : name,
|
||||
instanceProperty : name
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//GENERATED_TEMPLATE_UPDATE_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this);
|
||||
|
||||
//GENERATED_UPDATE_FROM_INSTANCE_METHOD_END
|
||||
|
@ -259,8 +313,14 @@ class ComponentImage extends ComponentGraphics {
|
|||
//CUSTOM_UPDATE_FROM_INSTANCE_METHOD_END
|
||||
|
||||
}
|
||||
//GENERATED_TEMPLATE_METHODS_END
|
||||
|
||||
//GENERATED_METHODS_START
|
||||
//GENERATED_METHODS_END
|
||||
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_START
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
//GENERATED_STATIC_METHODS_START
|
||||
//GENERATED_STATIC_METHODS_END
|
||||
|
||||
|
@ -268,6 +328,16 @@ class ComponentImage extends ComponentGraphics {
|
|||
//CUSTOM_IMPLEMENTATION_END
|
||||
}
|
||||
|
||||
//GENERATED_TEMPLATE_STATIC_OPTIONS_INIT_START
|
||||
/**
|
||||
* static ExtendsStaticOptionTest - A static test option
|
||||
*/
|
||||
ComponentImage.ExtendsStaticOptionTest = true;
|
||||
//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
|
||||
|
||||
|
|
|
@ -79,20 +79,7 @@ const Component = require('.././r3-component.js');
|
|||
|
||||
Inherited Methods:
|
||||
|
||||
- initialize()
|
||||
Should raises an event(s) which indicates that this object initialized
|
||||
|
||||
- createInstance()
|
||||
Creates an instance of this object based on the current runtime
|
||||
|
||||
- dispose()
|
||||
Disposes of this object by disposing the instance first.
|
||||
|
||||
- disposeInstance()
|
||||
Disposes of the runtime instance.
|
||||
|
||||
- setRuntime()
|
||||
Sets the runtime property of this component required for constructing an instance of this component.
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
|
@ -102,8 +89,7 @@ const Component = require('.././r3-component.js');
|
|||
|
||||
Properties:
|
||||
|
||||
- instance (Default value null - Holds the current instance of this object as determined (built) by
|
||||
the runtime object.)
|
||||
<no properties>
|
||||
|
||||
Static Properties:
|
||||
|
||||
|
@ -121,24 +107,48 @@ const Component = require('.././r3-component.js');
|
|||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
TEMPLATE_OPTIONS_START
|
||||
parent=null - The parent R3.Object of this component
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
name='hello'
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
TEMPLATE_STATIC_OPTIONS_START
|
||||
ExtendsStaticOptionTest=true - A static test option
|
||||
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
|
||||
|
||||
CUSTOM_LINKED_OBJECTS_START
|
||||
CUSTOM_LINKED_OBJECTS_END
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
parent
|
||||
instance
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
instance
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
TEMPLATE_METHODS_START
|
||||
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
|
||||
initialize() - In addition to firing an Event.OBJECT_INITIALIZED and Event.COMPONENT_INITIALIZED, it also fires an Event.INPUT_COMPONENT_INITIALIZED
|
||||
CUSTOM_METHODS_END
|
||||
|
||||
TEMPLATE_STATIC_METHODS_START
|
||||
TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
CUSTOM_STATIC_METHODS_START
|
||||
CUSTOM_STATIC_METHODS_END
|
||||
|
||||
|
@ -165,13 +175,28 @@ class ComponentInput extends Component {
|
|||
|
||||
super(options);
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
/**
|
||||
* parent - The parent R3.Object of this component
|
||||
*/
|
||||
if (typeof options.parent === 'undefined') {
|
||||
options.parent = null;
|
||||
}
|
||||
/**
|
||||
* instance - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
*/
|
||||
if (typeof options.instance === 'undefined') {
|
||||
options.instance = null;
|
||||
}
|
||||
/**
|
||||
* name - No comment
|
||||
*/
|
||||
if (typeof options.name === 'undefined') {
|
||||
options.name = 'hello';
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
//CUSTOM_OPTIONS_INIT_START
|
||||
|
@ -193,6 +218,86 @@ class ComponentInput extends Component {
|
|||
}
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
||||
//GENERATED_TEMPLATE_METHODS_START
|
||||
|
||||
/**
|
||||
* 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
|
||||
if (property === 'name') {
|
||||
this.instance.name = this.name;
|
||||
this.emit(
|
||||
Event.UPDATE_INSTANCE_PROPERTY,
|
||||
{
|
||||
component : this,
|
||||
property : name,
|
||||
instanceProperty : name
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//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
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
if (property === 'name' || property === 'all') {
|
||||
this.name = this.instance.name;
|
||||
this.emit(
|
||||
Event.UPDATE_PROPERTY_FROM_INSTANCE,
|
||||
{
|
||||
component : this,
|
||||
property : name,
|
||||
instanceProperty : name
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//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_TEMPLATE_METHODS_END
|
||||
|
||||
//GENERATED_METHODS_START
|
||||
|
||||
/**
|
||||
|
@ -220,6 +325,9 @@ class ComponentInput extends Component {
|
|||
}
|
||||
//GENERATED_METHODS_END
|
||||
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_START
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
//GENERATED_STATIC_METHODS_START
|
||||
//GENERATED_STATIC_METHODS_END
|
||||
|
||||
|
@ -227,6 +335,16 @@ class ComponentInput extends Component {
|
|||
//CUSTOM_IMPLEMENTATION_END
|
||||
}
|
||||
|
||||
//GENERATED_TEMPLATE_STATIC_OPTIONS_INIT_START
|
||||
/**
|
||||
* static ExtendsStaticOptionTest - A static test option
|
||||
*/
|
||||
ComponentInput.ExtendsStaticOptionTest = true;
|
||||
//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
|
||||
|
||||
|
|
|
@ -79,20 +79,7 @@ const ComponentGraphics = require('.././r3-component-graphics.js');
|
|||
|
||||
Inherited Methods:
|
||||
|
||||
- initialize()
|
||||
Should raises an event(s) which indicates that this object initialized
|
||||
|
||||
- createInstance()
|
||||
Creates an instance of this object based on the current runtime
|
||||
|
||||
- dispose()
|
||||
Disposes of this object by disposing the instance first.
|
||||
|
||||
- disposeInstance()
|
||||
Disposes of the runtime instance.
|
||||
|
||||
- setRuntime()
|
||||
Sets the runtime property of this component required for constructing an instance of this component.
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
|
@ -102,8 +89,7 @@ const ComponentGraphics = require('.././r3-component-graphics.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:
|
||||
|
||||
|
@ -123,8 +109,7 @@ const ComponentGraphics = require('.././r3-component-graphics.js');
|
|||
|
||||
Properties:
|
||||
|
||||
- instance (Default value null - Holds the current instance of this object as determined (built) by
|
||||
the runtime object.)
|
||||
<no properties>
|
||||
|
||||
Static Properties:
|
||||
|
||||
|
@ -132,11 +117,7 @@ const ComponentGraphics = require('.././r3-component-graphics.js');
|
|||
|
||||
Methods:
|
||||
|
||||
- updateInstance()
|
||||
No comment
|
||||
|
||||
- updateFromInstance()
|
||||
No comment
|
||||
<no methods>
|
||||
|
||||
Static Methods:
|
||||
|
||||
|
@ -144,25 +125,47 @@ const ComponentGraphics = require('.././r3-component-graphics.js');
|
|||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
TEMPLATE_OPTIONS_START
|
||||
parent=null - The parent R3.Object of this component
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
name='hello'
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
TEMPLATE_STATIC_OPTIONS_START
|
||||
ExtendsStaticOptionTest=true - A static test option
|
||||
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
|
||||
|
||||
CUSTOM_LINKED_OBJECTS_START
|
||||
CUSTOM_LINKED_OBJECTS_END
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
parent
|
||||
instance
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
instance
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
TEMPLATE_METHODS_START
|
||||
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
|
||||
updateInstance()
|
||||
updateFromInstance()
|
||||
CUSTOM_METHODS_END
|
||||
|
||||
TEMPLATE_STATIC_METHODS_START
|
||||
TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
CUSTOM_STATIC_METHODS_START
|
||||
CUSTOM_STATIC_METHODS_END
|
||||
|
||||
|
@ -189,13 +192,28 @@ class ComponentMaterial extends ComponentGraphics {
|
|||
|
||||
super(options);
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
/**
|
||||
* parent - The parent R3.Object of this component
|
||||
*/
|
||||
if (typeof options.parent === 'undefined') {
|
||||
options.parent = null;
|
||||
}
|
||||
/**
|
||||
* instance - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
*/
|
||||
if (typeof options.instance === 'undefined') {
|
||||
options.instance = null;
|
||||
}
|
||||
/**
|
||||
* name - No comment
|
||||
*/
|
||||
if (typeof options.name === 'undefined') {
|
||||
options.name = 'hello';
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
//CUSTOM_OPTIONS_INIT_START
|
||||
|
@ -217,13 +235,14 @@ class ComponentMaterial extends ComponentGraphics {
|
|||
}
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
||||
//GENERATED_METHODS_START
|
||||
//GENERATED_TEMPLATE_METHODS_START
|
||||
|
||||
/**
|
||||
* updateInstance()
|
||||
* - No comment
|
||||
* - Updates this object by copying the values of the current object into it's instance object.
|
||||
* @param property
|
||||
*/
|
||||
updateInstance() {
|
||||
updateInstance(property) {
|
||||
|
||||
//GENERATED_UPDATE_INSTANCE_METHOD_START
|
||||
this.emit(Event.UPDATE_INSTANCE_BEFORE, this);
|
||||
|
@ -231,6 +250,23 @@ class ComponentMaterial extends ComponentGraphics {
|
|||
//GENERATED_UPDATE_INSTANCE_OPTIONS_START
|
||||
//GENERATED_UPDATE_INSTANCE_OPTIONS_END
|
||||
|
||||
//GENERATED_TEMPLATE_UPDATE_INSTANCE_OPTIONS_START
|
||||
if (property === 'name') {
|
||||
this.instance.name = this.name;
|
||||
this.emit(
|
||||
Event.UPDATE_INSTANCE_PROPERTY,
|
||||
{
|
||||
component : this,
|
||||
property : name,
|
||||
instanceProperty : name
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//GENERATED_TEMPLATE_UPDATE_INSTANCE_OPTIONS_END
|
||||
|
||||
this.emit(Event.UPDATE_INSTANCE_AFTER, this);
|
||||
//GENERATED_UPDATE_INSTANCE_METHOD_END
|
||||
|
||||
|
@ -241,9 +277,10 @@ class ComponentMaterial extends ComponentGraphics {
|
|||
|
||||
/**
|
||||
* updateFromInstance()
|
||||
* - No comment
|
||||
* - Updates this object by copying the values of its instance into the current object.
|
||||
* @param property
|
||||
*/
|
||||
updateFromInstance() {
|
||||
updateFromInstance(property) {
|
||||
|
||||
//GENERATED_UPDATE_FROM_INSTANCE_METHOD_START
|
||||
this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this);
|
||||
|
@ -251,6 +288,23 @@ class ComponentMaterial extends ComponentGraphics {
|
|||
//GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_START
|
||||
//GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
//GENERATED_TEMPLATE_UPDATE_FROM_INSTANCE_OPTIONS_START
|
||||
if (property === 'name' || property === 'all') {
|
||||
this.name = this.instance.name;
|
||||
this.emit(
|
||||
Event.UPDATE_PROPERTY_FROM_INSTANCE,
|
||||
{
|
||||
component : this,
|
||||
property : name,
|
||||
instanceProperty : name
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//GENERATED_TEMPLATE_UPDATE_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this);
|
||||
|
||||
//GENERATED_UPDATE_FROM_INSTANCE_METHOD_END
|
||||
|
@ -259,8 +313,14 @@ class ComponentMaterial extends ComponentGraphics {
|
|||
//CUSTOM_UPDATE_FROM_INSTANCE_METHOD_END
|
||||
|
||||
}
|
||||
//GENERATED_TEMPLATE_METHODS_END
|
||||
|
||||
//GENERATED_METHODS_START
|
||||
//GENERATED_METHODS_END
|
||||
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_START
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
//GENERATED_STATIC_METHODS_START
|
||||
//GENERATED_STATIC_METHODS_END
|
||||
|
||||
|
@ -268,6 +328,16 @@ class ComponentMaterial extends ComponentGraphics {
|
|||
//CUSTOM_IMPLEMENTATION_END
|
||||
}
|
||||
|
||||
//GENERATED_TEMPLATE_STATIC_OPTIONS_INIT_START
|
||||
/**
|
||||
* static ExtendsStaticOptionTest - A static test option
|
||||
*/
|
||||
ComponentMaterial.ExtendsStaticOptionTest = true;
|
||||
//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
|
||||
|
||||
|
|
|
@ -79,20 +79,7 @@ const ComponentGraphics = require('.././r3-component-graphics.js');
|
|||
|
||||
Inherited Methods:
|
||||
|
||||
- initialize()
|
||||
Should raises an event(s) which indicates that this object initialized
|
||||
|
||||
- createInstance()
|
||||
Creates an instance of this object based on the current runtime
|
||||
|
||||
- dispose()
|
||||
Disposes of this object by disposing the instance first.
|
||||
|
||||
- disposeInstance()
|
||||
Disposes of the runtime instance.
|
||||
|
||||
- setRuntime()
|
||||
Sets the runtime property of this component required for constructing an instance of this component.
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
|
@ -102,8 +89,7 @@ const ComponentGraphics = require('.././r3-component-graphics.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:
|
||||
|
||||
|
@ -123,8 +109,7 @@ const ComponentGraphics = require('.././r3-component-graphics.js');
|
|||
|
||||
Properties:
|
||||
|
||||
- instance (Default value null - Holds the current instance of this object as determined (built) by
|
||||
the runtime object.)
|
||||
<no properties>
|
||||
|
||||
Static Properties:
|
||||
|
||||
|
@ -132,11 +117,7 @@ const ComponentGraphics = require('.././r3-component-graphics.js');
|
|||
|
||||
Methods:
|
||||
|
||||
- updateInstance()
|
||||
No comment
|
||||
|
||||
- updateFromInstance()
|
||||
No comment
|
||||
<no methods>
|
||||
|
||||
Static Methods:
|
||||
|
||||
|
@ -144,25 +125,47 @@ const ComponentGraphics = require('.././r3-component-graphics.js');
|
|||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
TEMPLATE_OPTIONS_START
|
||||
parent=null - The parent R3.Object of this component
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
name='hello'
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
TEMPLATE_STATIC_OPTIONS_START
|
||||
ExtendsStaticOptionTest=true - A static test option
|
||||
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
|
||||
|
||||
CUSTOM_LINKED_OBJECTS_START
|
||||
CUSTOM_LINKED_OBJECTS_END
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
parent
|
||||
instance
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
instance
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
TEMPLATE_METHODS_START
|
||||
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
|
||||
updateInstance()
|
||||
updateFromInstance()
|
||||
CUSTOM_METHODS_END
|
||||
|
||||
TEMPLATE_STATIC_METHODS_START
|
||||
TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
CUSTOM_STATIC_METHODS_START
|
||||
CUSTOM_STATIC_METHODS_END
|
||||
|
||||
|
@ -189,13 +192,28 @@ class ComponentMesh extends ComponentGraphics {
|
|||
|
||||
super(options);
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
/**
|
||||
* parent - The parent R3.Object of this component
|
||||
*/
|
||||
if (typeof options.parent === 'undefined') {
|
||||
options.parent = null;
|
||||
}
|
||||
/**
|
||||
* instance - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
*/
|
||||
if (typeof options.instance === 'undefined') {
|
||||
options.instance = null;
|
||||
}
|
||||
/**
|
||||
* name - No comment
|
||||
*/
|
||||
if (typeof options.name === 'undefined') {
|
||||
options.name = 'hello';
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
//CUSTOM_OPTIONS_INIT_START
|
||||
|
@ -217,13 +235,14 @@ class ComponentMesh extends ComponentGraphics {
|
|||
}
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
||||
//GENERATED_METHODS_START
|
||||
//GENERATED_TEMPLATE_METHODS_START
|
||||
|
||||
/**
|
||||
* updateInstance()
|
||||
* - No comment
|
||||
* - Updates this object by copying the values of the current object into it's instance object.
|
||||
* @param property
|
||||
*/
|
||||
updateInstance() {
|
||||
updateInstance(property) {
|
||||
|
||||
//GENERATED_UPDATE_INSTANCE_METHOD_START
|
||||
this.emit(Event.UPDATE_INSTANCE_BEFORE, this);
|
||||
|
@ -231,6 +250,23 @@ class ComponentMesh extends ComponentGraphics {
|
|||
//GENERATED_UPDATE_INSTANCE_OPTIONS_START
|
||||
//GENERATED_UPDATE_INSTANCE_OPTIONS_END
|
||||
|
||||
//GENERATED_TEMPLATE_UPDATE_INSTANCE_OPTIONS_START
|
||||
if (property === 'name') {
|
||||
this.instance.name = this.name;
|
||||
this.emit(
|
||||
Event.UPDATE_INSTANCE_PROPERTY,
|
||||
{
|
||||
component : this,
|
||||
property : name,
|
||||
instanceProperty : name
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//GENERATED_TEMPLATE_UPDATE_INSTANCE_OPTIONS_END
|
||||
|
||||
this.emit(Event.UPDATE_INSTANCE_AFTER, this);
|
||||
//GENERATED_UPDATE_INSTANCE_METHOD_END
|
||||
|
||||
|
@ -241,9 +277,10 @@ class ComponentMesh extends ComponentGraphics {
|
|||
|
||||
/**
|
||||
* updateFromInstance()
|
||||
* - No comment
|
||||
* - Updates this object by copying the values of its instance into the current object.
|
||||
* @param property
|
||||
*/
|
||||
updateFromInstance() {
|
||||
updateFromInstance(property) {
|
||||
|
||||
//GENERATED_UPDATE_FROM_INSTANCE_METHOD_START
|
||||
this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this);
|
||||
|
@ -251,6 +288,23 @@ class ComponentMesh extends ComponentGraphics {
|
|||
//GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_START
|
||||
//GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
//GENERATED_TEMPLATE_UPDATE_FROM_INSTANCE_OPTIONS_START
|
||||
if (property === 'name' || property === 'all') {
|
||||
this.name = this.instance.name;
|
||||
this.emit(
|
||||
Event.UPDATE_PROPERTY_FROM_INSTANCE,
|
||||
{
|
||||
component : this,
|
||||
property : name,
|
||||
instanceProperty : name
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//GENERATED_TEMPLATE_UPDATE_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this);
|
||||
|
||||
//GENERATED_UPDATE_FROM_INSTANCE_METHOD_END
|
||||
|
@ -259,8 +313,14 @@ class ComponentMesh extends ComponentGraphics {
|
|||
//CUSTOM_UPDATE_FROM_INSTANCE_METHOD_END
|
||||
|
||||
}
|
||||
//GENERATED_TEMPLATE_METHODS_END
|
||||
|
||||
//GENERATED_METHODS_START
|
||||
//GENERATED_METHODS_END
|
||||
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_START
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
//GENERATED_STATIC_METHODS_START
|
||||
//GENERATED_STATIC_METHODS_END
|
||||
|
||||
|
@ -268,6 +328,16 @@ class ComponentMesh extends ComponentGraphics {
|
|||
//CUSTOM_IMPLEMENTATION_END
|
||||
}
|
||||
|
||||
//GENERATED_TEMPLATE_STATIC_OPTIONS_INIT_START
|
||||
/**
|
||||
* static ExtendsStaticOptionTest - A static test option
|
||||
*/
|
||||
ComponentMesh.ExtendsStaticOptionTest = true;
|
||||
//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
|
||||
|
||||
|
|
|
@ -79,20 +79,7 @@ const ComponentGraphics = require('.././r3-component-graphics.js');
|
|||
|
||||
Inherited Methods:
|
||||
|
||||
- initialize()
|
||||
Should raises an event(s) which indicates that this object initialized
|
||||
|
||||
- createInstance()
|
||||
Creates an instance of this object based on the current runtime
|
||||
|
||||
- dispose()
|
||||
Disposes of this object by disposing the instance first.
|
||||
|
||||
- disposeInstance()
|
||||
Disposes of the runtime instance.
|
||||
|
||||
- setRuntime()
|
||||
Sets the runtime property of this component required for constructing an instance of this component.
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
|
@ -102,8 +89,7 @@ const ComponentGraphics = require('.././r3-component-graphics.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:
|
||||
|
||||
|
@ -123,8 +109,7 @@ const ComponentGraphics = require('.././r3-component-graphics.js');
|
|||
|
||||
Properties:
|
||||
|
||||
- instance (Default value null - Holds the current instance of this object as determined (built) by
|
||||
the runtime object.)
|
||||
<no properties>
|
||||
|
||||
Static Properties:
|
||||
|
||||
|
@ -132,11 +117,7 @@ const ComponentGraphics = require('.././r3-component-graphics.js');
|
|||
|
||||
Methods:
|
||||
|
||||
- updateInstance()
|
||||
No comment
|
||||
|
||||
- updateFromInstance()
|
||||
No comment
|
||||
<no methods>
|
||||
|
||||
Static Methods:
|
||||
|
||||
|
@ -144,25 +125,47 @@ const ComponentGraphics = require('.././r3-component-graphics.js');
|
|||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
TEMPLATE_OPTIONS_START
|
||||
parent=null - The parent R3.Object of this component
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
name='hello'
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
TEMPLATE_STATIC_OPTIONS_START
|
||||
ExtendsStaticOptionTest=true - A static test option
|
||||
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
|
||||
|
||||
CUSTOM_LINKED_OBJECTS_START
|
||||
CUSTOM_LINKED_OBJECTS_END
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
parent
|
||||
instance
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
instance
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
TEMPLATE_METHODS_START
|
||||
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
|
||||
updateInstance()
|
||||
updateFromInstance()
|
||||
CUSTOM_METHODS_END
|
||||
|
||||
TEMPLATE_STATIC_METHODS_START
|
||||
TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
CUSTOM_STATIC_METHODS_START
|
||||
CUSTOM_STATIC_METHODS_END
|
||||
|
||||
|
@ -189,13 +192,28 @@ class ComponentTexture extends ComponentGraphics {
|
|||
|
||||
super(options);
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
/**
|
||||
* parent - The parent R3.Object of this component
|
||||
*/
|
||||
if (typeof options.parent === 'undefined') {
|
||||
options.parent = null;
|
||||
}
|
||||
/**
|
||||
* instance - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
*/
|
||||
if (typeof options.instance === 'undefined') {
|
||||
options.instance = null;
|
||||
}
|
||||
/**
|
||||
* name - No comment
|
||||
*/
|
||||
if (typeof options.name === 'undefined') {
|
||||
options.name = 'hello';
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
//CUSTOM_OPTIONS_INIT_START
|
||||
|
@ -217,13 +235,14 @@ class ComponentTexture extends ComponentGraphics {
|
|||
}
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
||||
//GENERATED_METHODS_START
|
||||
//GENERATED_TEMPLATE_METHODS_START
|
||||
|
||||
/**
|
||||
* updateInstance()
|
||||
* - No comment
|
||||
* - Updates this object by copying the values of the current object into it's instance object.
|
||||
* @param property
|
||||
*/
|
||||
updateInstance() {
|
||||
updateInstance(property) {
|
||||
|
||||
//GENERATED_UPDATE_INSTANCE_METHOD_START
|
||||
this.emit(Event.UPDATE_INSTANCE_BEFORE, this);
|
||||
|
@ -231,6 +250,23 @@ class ComponentTexture extends ComponentGraphics {
|
|||
//GENERATED_UPDATE_INSTANCE_OPTIONS_START
|
||||
//GENERATED_UPDATE_INSTANCE_OPTIONS_END
|
||||
|
||||
//GENERATED_TEMPLATE_UPDATE_INSTANCE_OPTIONS_START
|
||||
if (property === 'name') {
|
||||
this.instance.name = this.name;
|
||||
this.emit(
|
||||
Event.UPDATE_INSTANCE_PROPERTY,
|
||||
{
|
||||
component : this,
|
||||
property : name,
|
||||
instanceProperty : name
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//GENERATED_TEMPLATE_UPDATE_INSTANCE_OPTIONS_END
|
||||
|
||||
this.emit(Event.UPDATE_INSTANCE_AFTER, this);
|
||||
//GENERATED_UPDATE_INSTANCE_METHOD_END
|
||||
|
||||
|
@ -241,9 +277,10 @@ class ComponentTexture extends ComponentGraphics {
|
|||
|
||||
/**
|
||||
* updateFromInstance()
|
||||
* - No comment
|
||||
* - Updates this object by copying the values of its instance into the current object.
|
||||
* @param property
|
||||
*/
|
||||
updateFromInstance() {
|
||||
updateFromInstance(property) {
|
||||
|
||||
//GENERATED_UPDATE_FROM_INSTANCE_METHOD_START
|
||||
this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this);
|
||||
|
@ -251,6 +288,23 @@ class ComponentTexture extends ComponentGraphics {
|
|||
//GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_START
|
||||
//GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
//GENERATED_TEMPLATE_UPDATE_FROM_INSTANCE_OPTIONS_START
|
||||
if (property === 'name' || property === 'all') {
|
||||
this.name = this.instance.name;
|
||||
this.emit(
|
||||
Event.UPDATE_PROPERTY_FROM_INSTANCE,
|
||||
{
|
||||
component : this,
|
||||
property : name,
|
||||
instanceProperty : name
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//GENERATED_TEMPLATE_UPDATE_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this);
|
||||
|
||||
//GENERATED_UPDATE_FROM_INSTANCE_METHOD_END
|
||||
|
@ -259,8 +313,14 @@ class ComponentTexture extends ComponentGraphics {
|
|||
//CUSTOM_UPDATE_FROM_INSTANCE_METHOD_END
|
||||
|
||||
}
|
||||
//GENERATED_TEMPLATE_METHODS_END
|
||||
|
||||
//GENERATED_METHODS_START
|
||||
//GENERATED_METHODS_END
|
||||
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_START
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
//GENERATED_STATIC_METHODS_START
|
||||
//GENERATED_STATIC_METHODS_END
|
||||
|
||||
|
@ -268,6 +328,16 @@ class ComponentTexture extends ComponentGraphics {
|
|||
//CUSTOM_IMPLEMENTATION_END
|
||||
}
|
||||
|
||||
//GENERATED_TEMPLATE_STATIC_OPTIONS_INIT_START
|
||||
/**
|
||||
* static ExtendsStaticOptionTest - A static test option
|
||||
*/
|
||||
ComponentTexture.ExtendsStaticOptionTest = true;
|
||||
//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
|
||||
|
||||
|
|
|
@ -79,20 +79,7 @@ const ComponentInput = require('.././r3-component-input.js');
|
|||
|
||||
Inherited Methods:
|
||||
|
||||
- initialize()
|
||||
Should raises an event(s) which indicates that this object initialized
|
||||
|
||||
- createInstance()
|
||||
Creates an instance of this object based on the current runtime
|
||||
|
||||
- dispose()
|
||||
Disposes of this object by disposing the instance first.
|
||||
|
||||
- disposeInstance()
|
||||
Disposes of the runtime instance.
|
||||
|
||||
- setRuntime()
|
||||
Sets the runtime property of this component required for constructing an instance of this component.
|
||||
<no inherited methods>
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
|
@ -102,8 +89,7 @@ const ComponentInput = require('.././r3-component-input.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:
|
||||
|
||||
|
@ -123,8 +109,7 @@ const ComponentInput = require('.././r3-component-input.js');
|
|||
|
||||
Properties:
|
||||
|
||||
- instance (Default value null - Holds the current instance of this object as determined (built) by
|
||||
the runtime object.)
|
||||
<no properties>
|
||||
|
||||
Static Properties:
|
||||
|
||||
|
@ -132,11 +117,7 @@ const ComponentInput = require('.././r3-component-input.js');
|
|||
|
||||
Methods:
|
||||
|
||||
- updateInstance()
|
||||
No comment
|
||||
|
||||
- updateFromInstance()
|
||||
No comment
|
||||
<no methods>
|
||||
|
||||
Static Methods:
|
||||
|
||||
|
@ -144,25 +125,47 @@ const ComponentInput = require('.././r3-component-input.js');
|
|||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
TEMPLATE_OPTIONS_START
|
||||
parent=null - The parent R3.Object of this component
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
name='hello'
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
TEMPLATE_STATIC_OPTIONS_START
|
||||
ExtendsStaticOptionTest=true - A static test option
|
||||
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
|
||||
|
||||
CUSTOM_LINKED_OBJECTS_START
|
||||
CUSTOM_LINKED_OBJECTS_END
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
parent
|
||||
instance
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
instance
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
TEMPLATE_METHODS_START
|
||||
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
|
||||
updateInstance()
|
||||
updateFromInstance()
|
||||
CUSTOM_METHODS_END
|
||||
|
||||
TEMPLATE_STATIC_METHODS_START
|
||||
TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
CUSTOM_STATIC_METHODS_START
|
||||
CUSTOM_STATIC_METHODS_END
|
||||
|
||||
|
@ -189,13 +192,28 @@ class ComponentTouch extends ComponentInput {
|
|||
|
||||
super(options);
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
/**
|
||||
* parent - The parent R3.Object of this component
|
||||
*/
|
||||
if (typeof options.parent === 'undefined') {
|
||||
options.parent = null;
|
||||
}
|
||||
/**
|
||||
* instance - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
*/
|
||||
if (typeof options.instance === 'undefined') {
|
||||
options.instance = null;
|
||||
}
|
||||
/**
|
||||
* name - No comment
|
||||
*/
|
||||
if (typeof options.name === 'undefined') {
|
||||
options.name = 'hello';
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
//CUSTOM_OPTIONS_INIT_START
|
||||
|
@ -217,13 +235,14 @@ class ComponentTouch extends ComponentInput {
|
|||
}
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
||||
//GENERATED_METHODS_START
|
||||
//GENERATED_TEMPLATE_METHODS_START
|
||||
|
||||
/**
|
||||
* updateInstance()
|
||||
* - No comment
|
||||
* - Updates this object by copying the values of the current object into it's instance object.
|
||||
* @param property
|
||||
*/
|
||||
updateInstance() {
|
||||
updateInstance(property) {
|
||||
|
||||
//GENERATED_UPDATE_INSTANCE_METHOD_START
|
||||
this.emit(Event.UPDATE_INSTANCE_BEFORE, this);
|
||||
|
@ -231,6 +250,23 @@ class ComponentTouch extends ComponentInput {
|
|||
//GENERATED_UPDATE_INSTANCE_OPTIONS_START
|
||||
//GENERATED_UPDATE_INSTANCE_OPTIONS_END
|
||||
|
||||
//GENERATED_TEMPLATE_UPDATE_INSTANCE_OPTIONS_START
|
||||
if (property === 'name') {
|
||||
this.instance.name = this.name;
|
||||
this.emit(
|
||||
Event.UPDATE_INSTANCE_PROPERTY,
|
||||
{
|
||||
component : this,
|
||||
property : name,
|
||||
instanceProperty : name
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//GENERATED_TEMPLATE_UPDATE_INSTANCE_OPTIONS_END
|
||||
|
||||
this.emit(Event.UPDATE_INSTANCE_AFTER, this);
|
||||
//GENERATED_UPDATE_INSTANCE_METHOD_END
|
||||
|
||||
|
@ -241,9 +277,10 @@ class ComponentTouch extends ComponentInput {
|
|||
|
||||
/**
|
||||
* updateFromInstance()
|
||||
* - No comment
|
||||
* - Updates this object by copying the values of its instance into the current object.
|
||||
* @param property
|
||||
*/
|
||||
updateFromInstance() {
|
||||
updateFromInstance(property) {
|
||||
|
||||
//GENERATED_UPDATE_FROM_INSTANCE_METHOD_START
|
||||
this.emit(Event.UPDATE_FROM_INSTANCE_BEFORE, this);
|
||||
|
@ -251,6 +288,23 @@ class ComponentTouch extends ComponentInput {
|
|||
//GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_START
|
||||
//GENERATED_UPDATE_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
//GENERATED_TEMPLATE_UPDATE_FROM_INSTANCE_OPTIONS_START
|
||||
if (property === 'name' || property === 'all') {
|
||||
this.name = this.instance.name;
|
||||
this.emit(
|
||||
Event.UPDATE_PROPERTY_FROM_INSTANCE,
|
||||
{
|
||||
component : this,
|
||||
property : name,
|
||||
instanceProperty : name
|
||||
}
|
||||
);
|
||||
if (property !== 'all') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//GENERATED_TEMPLATE_UPDATE_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
this.emit(Event.UPDATE_FROM_INSTANCE_AFTER, this);
|
||||
|
||||
//GENERATED_UPDATE_FROM_INSTANCE_METHOD_END
|
||||
|
@ -259,8 +313,14 @@ class ComponentTouch extends ComponentInput {
|
|||
//CUSTOM_UPDATE_FROM_INSTANCE_METHOD_END
|
||||
|
||||
}
|
||||
//GENERATED_TEMPLATE_METHODS_END
|
||||
|
||||
//GENERATED_METHODS_START
|
||||
//GENERATED_METHODS_END
|
||||
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_START
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
//GENERATED_STATIC_METHODS_START
|
||||
//GENERATED_STATIC_METHODS_END
|
||||
|
||||
|
@ -268,6 +328,16 @@ class ComponentTouch extends ComponentInput {
|
|||
//CUSTOM_IMPLEMENTATION_END
|
||||
}
|
||||
|
||||
//GENERATED_TEMPLATE_STATIC_OPTIONS_INIT_START
|
||||
/**
|
||||
* static ExtendsStaticOptionTest - A static test option
|
||||
*/
|
||||
ComponentTouch.ExtendsStaticOptionTest = true;
|
||||
//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
|
||||
|
||||
|
|
|
@ -79,20 +79,7 @@ const R3Object = require('.././r3-r3-object.js');
|
|||
|
||||
Methods:
|
||||
|
||||
- initialize()
|
||||
Should raises an event(s) which indicates that this object initialized
|
||||
|
||||
- createInstance()
|
||||
Creates an instance of this object based on the current runtime
|
||||
|
||||
- dispose()
|
||||
Disposes of this object by disposing the instance first.
|
||||
|
||||
- disposeInstance()
|
||||
Disposes of the runtime instance.
|
||||
|
||||
- setRuntime()
|
||||
Sets the runtime property of this component required for constructing an instance of this component.
|
||||
<no methods>
|
||||
|
||||
Static Methods:
|
||||
|
||||
|
@ -100,17 +87,35 @@ const R3Object = require('.././r3-r3-object.js');
|
|||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
register=true
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
CUSTOM_METHODS_START
|
||||
TEMPLATE_STATIC_OPTIONS_START
|
||||
StaticOptionTest=true - A static test option
|
||||
TEMPLATE_STATIC_OPTIONS_END
|
||||
|
||||
CUSTOM_STATIC_OPTIONS_START
|
||||
CUSTOM_STATIC_OPTIONS_END
|
||||
|
||||
TEMPLATE_METHODS_START
|
||||
initialize() - Should raises an event(s) which indicates that this object initialized
|
||||
createInstance() - Creates an instance of this object based on the current runtime
|
||||
dispose() - Disposes of this object by disposing the instance first.
|
||||
disposeInstance() - Disposes of the runtime instance.
|
||||
setRuntime() - Sets the runtime property of this component required for constructing an instance of this component.
|
||||
TEMPLATE_METHODS_END
|
||||
|
||||
CUSTOM_METHODS_START
|
||||
CUSTOM_METHODS_END
|
||||
|
||||
TEMPLATE_STATIC_METHODS_START
|
||||
Test() - A static template Test method
|
||||
TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
CUSTOM_STATIC_METHODS_START
|
||||
CUSTOM_STATIC_METHODS_END
|
||||
|
||||
|
@ -133,11 +138,21 @@ class Component extends R3Object {
|
|||
|
||||
super(options);
|
||||
|
||||
this.emit(Event.COMPONENT_CREATED, this);
|
||||
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
/**
|
||||
* register - No comment
|
||||
*/
|
||||
if (typeof options.register === 'undefined') {
|
||||
options.register = true;
|
||||
}
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
//CUSTOM_OPTIONS_INIT_START
|
||||
this.emit(Event.COMPONENT_CREATED, this);
|
||||
//CUSTOM_OPTIONS_INIT_END
|
||||
|
||||
Object.assign(this, options);
|
||||
|
@ -156,10 +171,7 @@ class Component extends R3Object {
|
|||
}
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
||||
//CUSTOM_IMPLEMENTATION_START
|
||||
//CUSTOM_IMPLEMENTATION_END
|
||||
|
||||
//GENERATED_METHODS_START
|
||||
//GENERATED_TEMPLATE_METHODS_START
|
||||
|
||||
/**
|
||||
* initialize()
|
||||
|
@ -265,13 +277,46 @@ class Component extends R3Object {
|
|||
//CUSTOM_SET_RUNTIME_METHOD_END
|
||||
|
||||
}
|
||||
//GENERATED_TEMPLATE_METHODS_END
|
||||
|
||||
//GENERATED_METHODS_START
|
||||
//GENERATED_METHODS_END
|
||||
|
||||
//GENERATED_TEMPLATE_STATIC_METHODS_START
|
||||
|
||||
/**
|
||||
* Test()
|
||||
* - A static template Test method
|
||||
*/
|
||||
static Test() {
|
||||
|
||||
//GENERATED_STATIC_TEST_METHOD_START
|
||||
//GENERATED_STATIC_TEST_METHOD_END
|
||||
|
||||
//CUSTOM_STATIC_TEST_METHOD_START
|
||||
//CUSTOM_STATIC_TEST_METHOD_END
|
||||
|
||||
}
|
||||
//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
|
||||
/**
|
||||
* static StaticOptionTest - A static test option
|
||||
*/
|
||||
Component.StaticOptionTest = true;
|
||||
//GENERATED_TEMPLATE_STATIC_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_STATIC_OPTIONS_INIT_START
|
||||
//GENERATED_STATIC_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
Component.COMPONENT_DOM = 0x0;
|
||||
Component.COMPONENT_CANVAS = 0x1;
|
||||
|
|
|
@ -6,8 +6,8 @@ const Entity = require('.././r3-entity.js');
|
|||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
Class R3.Entity.Slider
|
||||
[Inherited from Entity]
|
||||
Class R3.Event.Object.Entity.Slider
|
||||
[Inherited from Event]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
|
@ -22,6 +22,66 @@ const Entity = require('.././r3-entity.js');
|
|||
- initialize()
|
||||
Should raise an event(s) which indicates that this object initialized
|
||||
|
||||
- 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:
|
||||
|
||||
- id (Default value Utils.RandomId(10))
|
||||
- name (Default value 'Object ' + options.id)
|
||||
- register (Default value true)
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
- initialize()
|
||||
Overrides for R3.Event.initialize()
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Inherited from Entity]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
- initialize()
|
||||
Overrides for R3.Event.R3Object.initialize()
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
@ -30,7 +90,8 @@ const Entity = require('.././r3-entity.js');
|
|||
|
||||
Properties:
|
||||
|
||||
<no properties>
|
||||
- parent (Default value null)
|
||||
- components (Default value [] - A list of components that this entity is composed of)
|
||||
|
||||
Static Properties:
|
||||
|
||||
|
@ -47,6 +108,8 @@ const Entity = require('.././r3-entity.js');
|
|||
GENERATED_INHERITED_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
parent=null
|
||||
components=[] - A list of components that this entity is composed of
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
CUSTOM_INSTANCE_OPTIONS_MAPPING_START
|
||||
|
@ -88,6 +151,18 @@ class EntitySlider extends Entity {
|
|||
super(options);
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
/**
|
||||
* parent - No comment
|
||||
*/
|
||||
if (typeof options.parent === 'undefined') {
|
||||
options.parent = null;
|
||||
}
|
||||
/**
|
||||
* components - A list of components that this entity is composed of
|
||||
*/
|
||||
if (typeof options.components === 'undefined') {
|
||||
options.components = [];
|
||||
}
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
//CUSTOM_OPTIONS_INIT_START
|
||||
|
|
|
@ -1,10 +1,91 @@
|
|||
const Event = require('.././r3-event');
|
||||
const Utils = require('.././r3-utils');
|
||||
const R3Object = require('.././r3-r3-object.js');
|
||||
|
||||
/**
|
||||
|
||||
GENERATED_INHERITED_START
|
||||
|
||||
Class R3.Event.Object.Entity
|
||||
[Inherited from Event]
|
||||
|
||||
Inherited Properties:
|
||||
|
||||
<no inherited properties>
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
- initialize()
|
||||
Should raise an event(s) which indicates that this object initialized
|
||||
|
||||
- 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:
|
||||
|
||||
- id (Default value Utils.RandomId(10))
|
||||
- name (Default value 'Object ' + options.id)
|
||||
- register (Default value true)
|
||||
|
||||
Inherited Static Properties:
|
||||
|
||||
<no inherited static properties>
|
||||
|
||||
Inherited Methods:
|
||||
|
||||
- initialize()
|
||||
Overrides for R3.Event.initialize()
|
||||
|
||||
Inherited Static Methods:
|
||||
|
||||
<no inherited static methods>
|
||||
|
||||
[Belonging to Entity]
|
||||
|
||||
Properties:
|
||||
|
||||
<no properties>
|
||||
|
||||
Static Properties:
|
||||
|
||||
<no static properties>
|
||||
|
||||
Methods:
|
||||
|
||||
- initialize()
|
||||
Overrides for R3.Event.R3Object.initialize()
|
||||
|
||||
Static Methods:
|
||||
|
||||
<no static methods>
|
||||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
|
@ -19,13 +100,11 @@ const Utils = require('.././r3-utils');
|
|||
|
||||
**/
|
||||
|
||||
class Entity {
|
||||
class Entity extends R3Object {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
constructor(options) {
|
||||
|
||||
Event.Emit(Event.OBJECT_CREATED, this);
|
||||
|
||||
if (typeof options === 'undefined') {
|
||||
options = {};
|
||||
}
|
||||
|
@ -36,6 +115,10 @@ class Entity {
|
|||
options.callDepth++;
|
||||
}
|
||||
|
||||
super(options);
|
||||
|
||||
this.emit(Event.ENTITY_CREATED, this);
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
|
|
|
@ -342,13 +342,13 @@ class Event {
|
|||
//CUSTOM_OUT_OF_CLASS_IMPLEMENTATION_START
|
||||
|
||||
//GENERATED_EVENTS_START
|
||||
Event.BEFORE_RENDER = 0x1;
|
||||
Event.COMPONENT_CREATED = 0x2;
|
||||
Event.COMPONENT_INITIALIZED = 0x3;
|
||||
Event.CREATE_INSTANCE_BEFORE = 0x4;
|
||||
Event.DISPOSE_INSTANCE = 0x5;
|
||||
Event.DISPOSE_OBJECT = 0x6;
|
||||
Event.DOM_COMPONENT_INITIALIZED = 0x7;
|
||||
Event.COMPONENT_CREATED = 0x1;
|
||||
Event.COMPONENT_INITIALIZED = 0x2;
|
||||
Event.CREATE_INSTANCE_BEFORE = 0x3;
|
||||
Event.DISPOSE_INSTANCE = 0x4;
|
||||
Event.DISPOSE_OBJECT = 0x5;
|
||||
Event.DOM_COMPONENT_INITIALIZED = 0x6;
|
||||
Event.ENTITY_CREATED = 0x7;
|
||||
Event.ENTITY_INITIALIZED = 0x8;
|
||||
Event.GET_RUNTIME = 0x9;
|
||||
Event.GET_WINDOW_SIZE = 0xa;
|
||||
|
@ -383,13 +383,13 @@ Event.MAX_EVENTS = 0x25;
|
|||
Event.GetEventName = function(eventId) {
|
||||
|
||||
switch(eventId) {
|
||||
case 0x1 : return 'before_render';
|
||||
case 0x2 : return 'component_created';
|
||||
case 0x3 : return 'component_initialized';
|
||||
case 0x4 : return 'create_instance_before';
|
||||
case 0x5 : return 'dispose_instance';
|
||||
case 0x6 : return 'dispose_object';
|
||||
case 0x7 : return 'dom_component_initialized';
|
||||
case 0x1 : return 'component_created';
|
||||
case 0x2 : return 'component_initialized';
|
||||
case 0x3 : return 'create_instance_before';
|
||||
case 0x4 : return 'dispose_instance';
|
||||
case 0x5 : return 'dispose_object';
|
||||
case 0x6 : return 'dom_component_initialized';
|
||||
case 0x7 : return 'entity_created';
|
||||
case 0x8 : return 'entity_initialized';
|
||||
case 0x9 : return 'get_runtime';
|
||||
case 0xa : return 'get_window_size';
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
class R3 {
|
||||
static version = '2.0.579';
|
||||
static compileDate = '2021 Sep 11 - 06:49:25 am';
|
||||
static version = '2.0.645';
|
||||
static compileDate = '2021 Sep 13 - 09:34:27 am';
|
||||
}
|
||||
|
||||
//GENERATED_IMPORTS_START
|
||||
const Entity = require('./r3-entity/');
|
||||
const Runtime = require('./r3-runtime/');
|
||||
const System = require('./r3-system/');
|
||||
const Event = require('./r3-event.js');
|
||||
const Utils = require('./r3-utils.js');
|
||||
const R3Object = require('./r3-r3-object.js');
|
||||
const Entity = require('./r3-entity/');
|
||||
const Component = require('./r3-component/');
|
||||
const Project = require('./r3-project.js');
|
||||
//GENERATED_IMPORTS_END
|
||||
|
||||
//GENERATED_DEFINES_START
|
||||
R3.Entity = Entity;
|
||||
R3.Runtime = Runtime;
|
||||
R3.System = System;
|
||||
R3.Event = Event;
|
||||
R3.Utils = Utils;
|
||||
R3.Object = R3Object;
|
||||
R3.Entity = Entity;
|
||||
R3.Component = Component;
|
||||
R3.Project = Project;
|
||||
R3.DOM = ComponentDOM;
|
||||
|
|
|
@ -194,7 +194,13 @@ class SystemDOM extends System {
|
|||
}
|
||||
|
||||
//GENERATED_STATIC_OPTIONS_INIT_START
|
||||
/**
|
||||
* static Started - No comment
|
||||
*/
|
||||
SystemDOM.Started = false;
|
||||
/**
|
||||
* static Subscriptions - No comment
|
||||
*/
|
||||
SystemDOM.Subscriptions = {};
|
||||
//GENERATED_STATIC_OPTIONS_INIT_END
|
||||
|
||||
|
|
|
@ -418,7 +418,13 @@ class SystemInput extends System {
|
|||
}
|
||||
|
||||
//GENERATED_STATIC_OPTIONS_INIT_START
|
||||
/**
|
||||
* static Started - No comment
|
||||
*/
|
||||
SystemInput.Started = false;
|
||||
/**
|
||||
* static Subscriptions - No comment
|
||||
*/
|
||||
SystemInput.Subscriptions = {};
|
||||
//GENERATED_STATIC_OPTIONS_INIT_END
|
||||
|
||||
|
|
|
@ -247,7 +247,13 @@ class SystemLinking extends System {
|
|||
}
|
||||
|
||||
//GENERATED_STATIC_OPTIONS_INIT_START
|
||||
/**
|
||||
* static Started - No comment
|
||||
*/
|
||||
SystemLinking.Started = false;
|
||||
/**
|
||||
* static Subscriptions - No comment
|
||||
*/
|
||||
SystemLinking.Subscriptions = {};
|
||||
//GENERATED_STATIC_OPTIONS_INIT_END
|
||||
|
||||
|
|
|
@ -200,7 +200,13 @@ class SystemRender extends System {
|
|||
}
|
||||
|
||||
//GENERATED_STATIC_OPTIONS_INIT_START
|
||||
/**
|
||||
* static Started - No comment
|
||||
*/
|
||||
SystemRender.Started = false;
|
||||
/**
|
||||
* static Subscriptions - No comment
|
||||
*/
|
||||
SystemRender.Subscriptions = {};
|
||||
//GENERATED_STATIC_OPTIONS_INIT_END
|
||||
|
||||
|
|
|
@ -248,15 +248,45 @@ class SystemRuntime extends System {
|
|||
}
|
||||
|
||||
//GENERATED_STATIC_OPTIONS_INIT_START
|
||||
/**
|
||||
* static Started - No comment
|
||||
*/
|
||||
SystemRuntime.Started = false;
|
||||
/**
|
||||
* static Subscriptions - No comment
|
||||
*/
|
||||
SystemRuntime.Subscriptions = {};
|
||||
/**
|
||||
* static Projects - No comment
|
||||
*/
|
||||
SystemRuntime.Projects = [];
|
||||
/**
|
||||
* static CurrentProject - No comment
|
||||
*/
|
||||
SystemRuntime.CurrentProject = null;
|
||||
/**
|
||||
* static RuntimeCoder - No comment
|
||||
*/
|
||||
SystemRuntime.RuntimeCoder = {};
|
||||
/**
|
||||
* static RuntimeDOM - No comment
|
||||
*/
|
||||
SystemRuntime.RuntimeDOM = {};
|
||||
/**
|
||||
* static RuntimeGUI - No comment
|
||||
*/
|
||||
SystemRuntime.RuntimeGUI = {};
|
||||
/**
|
||||
* static RuntimeGraphics - No comment
|
||||
*/
|
||||
SystemRuntime.RuntimeGraphics = {};
|
||||
/**
|
||||
* static RuntimePhysics - No comment
|
||||
*/
|
||||
SystemRuntime.RuntimePhysics = {};
|
||||
/**
|
||||
* static RuntimeStatistics - No comment
|
||||
*/
|
||||
SystemRuntime.RuntimeStatistics = {};
|
||||
//GENERATED_STATIC_OPTIONS_INIT_END
|
||||
|
||||
|
|
|
@ -171,7 +171,13 @@ class SystemSocket extends System {
|
|||
}
|
||||
|
||||
//GENERATED_STATIC_OPTIONS_INIT_START
|
||||
/**
|
||||
* static Started - No comment
|
||||
*/
|
||||
SystemSocket.Started = false;
|
||||
/**
|
||||
* static Subscriptions - No comment
|
||||
*/
|
||||
SystemSocket.Subscriptions = {};
|
||||
//GENERATED_STATIC_OPTIONS_INIT_END
|
||||
|
||||
|
|
|
@ -8,17 +8,35 @@ const R3Object = require('.././r3-r3-object.js');
|
|||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
TEMPLATE_OPTIONS_START
|
||||
register=true
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
CUSTOM_METHODS_START
|
||||
TEMPLATE_STATIC_OPTIONS_START
|
||||
StaticOptionTest=true - A static test option
|
||||
TEMPLATE_STATIC_OPTIONS_END
|
||||
|
||||
CUSTOM_STATIC_OPTIONS_START
|
||||
CUSTOM_STATIC_OPTIONS_END
|
||||
|
||||
TEMPLATE_METHODS_START
|
||||
initialize() - Should raises an event(s) which indicates that this object initialized
|
||||
createInstance() - Creates an instance of this object based on the current runtime
|
||||
dispose() - Disposes of this object by disposing the instance first.
|
||||
disposeInstance() - Disposes of the runtime instance.
|
||||
setRuntime() - Sets the runtime property of this component required for constructing an instance of this component.
|
||||
TEMPLATE_METHODS_END
|
||||
|
||||
CUSTOM_METHODS_START
|
||||
CUSTOM_METHODS_END
|
||||
|
||||
TEMPLATE_STATIC_METHODS_START
|
||||
Test() - A static template Test method
|
||||
TEMPLATE_STATIC_METHODS_END
|
||||
|
||||
CUSTOM_STATIC_METHODS_START
|
||||
CUSTOM_STATIC_METHODS_END
|
||||
|
||||
|
@ -29,17 +47,29 @@ class CLASS_NAME extends R3Object {
|
|||
//GENERATED_CONSTRUCTOR_START
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
||||
//CUSTOM_IMPLEMENTATION_START
|
||||
//CUSTOM_IMPLEMENTATION_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
|
||||
|
||||
|
|
|
@ -12,6 +12,11 @@
|
|||
|
||||
super(options);
|
||||
|
||||
this.emit(Event.COMPONENT_CREATED, this);
|
||||
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
|
|
|
@ -8,25 +8,47 @@ const EXTEND_CLASS = require('INCLUDE_PATH/EXTEND_CLASS_FILE_NAME');
|
|||
|
||||
GENERATED_INHERITED_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
TEMPLATE_OPTIONS_START
|
||||
parent=null - The parent R3.Object of this component
|
||||
instance=null - Holds the current instance of this object as determined (built) by the runtime object.
|
||||
name='hello'
|
||||
TEMPLATE_OPTIONS_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
TEMPLATE_STATIC_OPTIONS_START
|
||||
ExtendsStaticOptionTest=true - A static test option
|
||||
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
|
||||
|
||||
CUSTOM_LINKED_OBJECTS_START
|
||||
CUSTOM_LINKED_OBJECTS_END
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
parent
|
||||
instance
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_START
|
||||
instance
|
||||
CUSTOM_EXCLUDED_FROM_INSTANCE_OPTIONS_END
|
||||
|
||||
CUSTOM_METHODS_START
|
||||
TEMPLATE_METHODS_START
|
||||
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
|
||||
|
||||
|
@ -37,9 +59,15 @@ class CLASS_NAME extends EXTEND_CLASS {
|
|||
//GENERATED_CONSTRUCTOR_START
|
||||
//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
|
||||
|
||||
|
@ -47,6 +75,12 @@ class CLASS_NAME extends EXTEND_CLASS {
|
|||
//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
|
||||
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
|
||||
super(options);
|
||||
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_START
|
||||
//GENERATED_TEMPLATE_OPTIONS_INIT_END
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
const Event = require('INCLUDE_PATH/r3-event');
|
||||
const Utils = require('INCLUDE_PATH/r3-utils');
|
||||
const R3Object = require('.././r3-r3-object.js');
|
||||
|
||||
/**
|
||||
|
||||
|
@ -19,7 +20,7 @@ const Utils = require('INCLUDE_PATH/r3-utils');
|
|||
|
||||
**/
|
||||
|
||||
class CLASS_NAME {
|
||||
class CLASS_NAME extends R3Object {
|
||||
|
||||
//GENERATED_CONSTRUCTOR_START
|
||||
//GENERATED_CONSTRUCTOR_END
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
constructor(options) {
|
||||
|
||||
Event.Emit(Event.OBJECT_CREATED, this);
|
||||
|
||||
if (typeof options === 'undefined') {
|
||||
options = {};
|
||||
}
|
||||
|
@ -12,6 +10,10 @@
|
|||
options.callDepth++;
|
||||
}
|
||||
|
||||
super(options);
|
||||
|
||||
this.emit(Event.ENTITY_CREATED, this);
|
||||
|
||||
//GENERATED_OPTIONS_INIT_START
|
||||
//GENERATED_OPTIONS_INIT_END
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@ const EXTEND_CLASS = require('INCLUDE_PATH/EXTEND_CLASS_FILE_NAME');
|
|||
GENERATED_INHERITED_END
|
||||
|
||||
CUSTOM_OPTIONS_START
|
||||
parent=null
|
||||
components=[] - A list of components that this entity is composed of
|
||||
CUSTOM_OPTIONS_END
|
||||
|
||||
CUSTOM_INSTANCE_OPTIONS_MAPPING_START
|
||||
|
|
|
@ -1 +1,4 @@
|
|||
/**
|
||||
* static KEY - COMMENT
|
||||
*/
|
||||
CLASS_NAME.KEY = VALUE;
|
||||
|
|
|
@ -47,7 +47,14 @@ GENERATED_STATIC_OPTIONS_INIT
|
|||
GENERATED_STATIC_START_METHOD
|
||||
GENERATED_STATIC_STOP_METHOD
|
||||
GENERATED_STATIC_SUBSCRIBE_METHOD
|
||||
GENERATED_STATIC_TEST_METHOD
|
||||
GENERATED_SUBSCRIBE_METHOD
|
||||
GENERATED_TEMPLATE_METHODS
|
||||
GENERATED_TEMPLATE_OPTIONS_INIT
|
||||
GENERATED_TEMPLATE_STATIC_METHODS
|
||||
GENERATED_TEMPLATE_STATIC_OPTIONS_INIT
|
||||
GENERATED_TEMPLATE_UPDATE_FROM_INSTANCE_OPTIONS
|
||||
GENERATED_TEMPLATE_UPDATE_INSTANCE_OPTIONS
|
||||
GENERATED_UPDATE_FROM_INSTANCE_METHOD
|
||||
GENERATED_UPDATE_FROM_INSTANCE_OPTIONS
|
||||
GENERATED_UPDATE_INSTANCE_METHOD
|
||||
|
@ -102,6 +109,13 @@ CUSTOM_STATIC_OPTIONS
|
|||
CUSTOM_STATIC_START_METHOD
|
||||
CUSTOM_STATIC_STOP_METHOD
|
||||
CUSTOM_STATIC_SUBSCRIBE_METHOD
|
||||
CUSTOM_STATIC_TEST_METHOD
|
||||
CUSTOM_SUBSCRIBE_METHOD
|
||||
CUSTOM_UPDATE_FROM_INSTANCE_METHOD
|
||||
CUSTOM_UPDATE_INSTANCE_METHOD
|
||||
TEMPLATE_EXCLUDED_FROM_INSTANCE_OPTIONS
|
||||
TEMPLATE_INSTANCE_OPTIONS_MAPPING
|
||||
TEMPLATE_METHODS
|
||||
TEMPLATE_OPTIONS
|
||||
TEMPLATE_STATIC_METHODS
|
||||
TEMPLATE_STATIC_OPTIONS
|
||||
|
|
|
@ -3,4 +3,7 @@
|
|||
//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);
|
||||
|
|
|
@ -3,4 +3,7 @@
|
|||
//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);
|
|
@ -23,7 +23,7 @@ function from_camel_case($input) {
|
|||
|
||||
if (isset($argc)) {
|
||||
for ($i = 0; $i < $argc; $i++) {
|
||||
echo "Argument #" . $i . " - " . $argv[$i] . "\n";
|
||||
// echo "Argument #" . $i . " - " . $argv[$i] . "\n";
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue