IViewInfo
From Virtual World Web Wiki
Information about a server hosted view. A view is a piece of DOM that connected users receive updates about, and which can host scripts, custom abilities, interactions, etc. A running instance is one type of view. Components can also create views for things like avatar customization, object previews, etc.
Remarks [edit]
Properties
- DOMDocument Document {get;}
- The root document for the view
- Guid Identifier {get;}
- The server-unique ID for the view (usually the ID of the thing being viewed, like an instance ID)
- bool UseKeyFrames {get; set;}
- Enable or disable the use of keyframes for updates to be send to the client. By default keyframes are enabled.
- DOMView View {get;}
- The main DOMView that collects updates (changes) for delivery to the client and maintains a node index for high-speed lookups by ID
- long ViewID {get;}
- The ID of the view sent to the connected client
Events
- MemberAdded(EventHandler<ViewMemberEventArgs>)
- Fires when a connection joins the view
- MemberRemoved(EventHandler<ViewMemberEventArgs>)
- Fires when a connection leaves the view
- OnInteraction(EventHandler<OnInteractionEventArgs>)
- Fires when a connected user fires a registered interaction on an DOM object in the view
Methods
- IInteractionMapping AddInteractionMapping(string selector, Guid abilityID, Guid? entityID, string personaSelector = NULL)
- Creates a mapping between a runtime view ability and a set of DOM nodes identified by a CSS-Like selector
- IInteractionMapping AddInteractionMapping(IConnectionIdentity identity, string selector, Guid abilityID)
- Creates a mapping between a runtime view ability and a set of DOM nodes identified by a CSS-Like selector intended for a specific connection
- IViewMember AddMember(IConnectionIdentity identity)
- Adds a connection to the view
- IViewAbility CreateAbility(Guid abilityID, string identifier, Dictionary<string, object> initialMetadata, float? cooldown = NULL, Guid? entityID = NULL)
- Creates a run-time ability associated with a view. Participants of the view will see the available ability as long as they are in the view
- IViewAbility CreateAbility(IConnectionIdentity identity, Guid abilityID, string identifier, Dictionary<string, object> initialMetadata, float? cooldown = NULL)
- Creates a run-time ability associated with a view. The ability will be delivered to only one connected participant
- void Flush()
- Flush pending keyframe queue now
- IViewMember GetMember(IConnectionIdentity identity)
- Looks up an existing view member for this connection
- void RemoveMember(IConnectionIdentity identity)
- Removes a connection from the view
- void UIScriptNotify(IUIScript script, long? objectID = NULL)
- Hacky helper... needs refactoring. Sends a script message asking client script to have a mini-dom view focus on a particular object in the DOM (for previews)