Class Index | File Index

Classes


Class HomeComponent3D


Defined in: HomeComponent3D.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
HomeComponent3D(canvasId, home, preferences, object3dFactory, controller)
Creates a 3D component that displays home walls, rooms and furniture.
Method Summary
Method Attributes Method Name and Description
 
Returns the 3D point matching the point (x, y) in component coordinates space.
 
Frees listeners and canvas data.
 
Returns the action map of this component.
 
Returns the closest home item displayed at client coordinates (x, y).
 
Returns the closest home item displayed at component coordinates (x, y), or null if not found.
 
Returns the HTML element used to view this component at screen.
 
Returns the input map of this component.
 
getVirtualWorldPointAt(x, y, elevation)
Returns the coordinates intersecting the floor of the selected level in the direction joining camera location and component coordinates (x, y).
 
groundChangeListener(ev)
Class Detail
HomeComponent3D(canvasId, home, preferences, object3dFactory, controller)
Creates a 3D component that displays home walls, rooms and furniture.
Author: Emmanuel Puybaret.
Parameters:
{string} canvasId
the id of the HTML canvas associated to this component
{Home} home
the home to display in this component
{UserPreferences} preferences
user preferences
{Object3DBranchFactory} object3dFactory
a factory able to create 3D objects from home items or null to use default one. The createObject3D method of this factory is expected to return an instance of Object3DBranch in current implementation.
{HomeController3D} controller
the controller that manages modifications in home (optional).
Method Detail
{Array} convertPixelLocationToVirtualWorld(x, y)
Returns the 3D point matching the point (x, y) in component coordinates space.
Parameters:
x
y
Returns:
{Array}

dispose()
Frees listeners and canvas data.

getActionMap()
Returns the action map of this component.

{Object} getClosestItemAt(x, y)
Returns the closest home item displayed at client coordinates (x, y).
Parameters:
{number} x
{number} y
Returns:
{Object}

{Selectable} getClosestSelectableItemAt(x, y)
Returns the closest home item displayed at component coordinates (x, y), or null if not found.
Parameters:
{number} x
{number} y
Returns:
{Selectable}

getHTMLElement()
Returns the HTML element used to view this component at screen.

getInputMap()
Returns the input map of this component.

getVirtualWorldPointAt(x, y, elevation)
Returns the coordinates intersecting the floor of the selected level in the direction joining camera location and component coordinates (x, y).
Parameters:
x
y
elevation

groundChangeListener(ev)
Parameters:
ev

© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Aug 21 2024 17:43:23 GMT+0200 (CEST)