Sic/frame2.as

From Organic Design wiki
Legacy.svg Legacy: This article describes a concept that has been superseded in the course of ongoing development on the Organic Design wiki. Please do not develop this any further or base work on this concept, this is only useful for a historic record of work done. You may find a link to the currently used concept or function in this article, if not you can contact the author to find out what has taken the place of this legacy item.
//
// Liscenced under LGPL: www.gnu.org/copyleft/lesser.html
//
// Nad - 2003 - SIC-Games
//
// Frame2: GENERAL INITIALISATION

//todo
// change shell path to /
// zbuff doesn't seem to be working! - do torus of balls round y-axis to test

//Stage.scaleMode = 'noScale';
Mouse.hide();
initialiseShell();
shell.state = 1;

// node - item in the network with GUID
// pNode - physical node
// uNode - user node
// gNode - group node
// iNode - interface node

// functions use __guid__ for local access name this way we can easily match and replace the content later
// functions could manipulate the items directly from this["__guid/guid/guid...__"] (?)
//   but the executioner would have to raise onChange events
//   so maybe better to manipulate space via accessor functions
//   get/set/create/destroy/path-access....
// - since we only ever access nodes in a local context by class, their class-guid is their key

// Nodal Core
// - every pNode has local tree of nodes as native object/hash refs
// - internally the node GUID(s) are not used, only their refs are used, their GUID is a property
// - when communicated, shared-context of huffman binary names map to GUIDs

A = function() {logAdd("A"); return B;};
B = function() {logAdd("B"); return C;};
C = function() {logAdd("C"); return;};

P = function() {logAdd("P"); return Q;};
Q = function() {logAdd("Q"); return R;};
R = function() {logAdd("R"); return;};

X = function() {logAdd("X"); return Y;};
Y = function() {logAdd("Y"); return Z;};
Z = function() {logAdd("Z"); return;};

someNode = {queue:[P,X]};
root = {queue:[A,someNode]};