/home/lindsay/xeolabs/xeogl-next/xeogl/src/objects/group.js
API Docs for:

File: /home/lindsay/xeolabs/xeogl-next/xeogl/src/objects/group.js

  1. /**
  2. A **Group** is an {{#crossLink "Object"}}{{/crossLink}} that groups other Objects.
  3.  
  4. Group is subclassed by (at least) {{#crossLink "Model"}}{{/crossLink}}, which is the abstract base class for {{#crossLink "GLTFModel"}}{{/crossLink}}, {{#crossLink "STLModel"}}{{/crossLink}} etc.
  5.  
  6. See {{#crossLink "Object"}}{{/crossLink}} for overall usage info.
  7.  
  8. @class Group
  9. @module xeogl
  10. @submodule objects
  11. @constructor
  12. @param [owner] {Component} Owner component. When destroyed, the owner will destroy this component as well. Creates this component within the default {{#crossLink "Scene"}}{{/crossLink}} when omitted.
  13. @param [cfg] {*} Configs
  14. @param [cfg.id] {String} Optional ID, unique among all components in the parent scene, generated automatically when omitted.
  15. @param [cfg.meta] {String:Object} Optional map of user-defined metadata.
  16. @param [cfg.entityType] {String} Optional entity classification when using within a semantic data model. See the {{#crossLink "Object"}}{{/crossLink}} documentation for usage.
  17. @param [cfg.parent] {Object} The parent.
  18. @param [cfg.position=[0,0,0]] {Float32Array} Local 3D position.
  19. @param [cfg.scale=[1,1,1]] {Float32Array} Local scale.
  20. @param [cfg.rotation=[0,0,0]] {Float32Array} Local rotation, as Euler angles given in degrees, for each of the X, Y and Z axis.
  21. @param [cfg.matrix=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1] {Float32Array} Local modelling transform matrix. Overrides the position, scale and rotation parameters.
  22. @param [cfg.visible=true] {Boolean} Indicates if visible.
  23. @param [cfg.culled=false] {Boolean} Indicates if culled from view.
  24. @param [cfg.pickable=true] {Boolean} Indicates if pickable.
  25. @param [cfg.clippable=true] {Boolean} Indicates if clippable.
  26. @param [cfg.collidable=true] {Boolean} Indicates if included in boundary calculations.
  27. @param [cfg.castShadow=true] {Boolean} Indicates if casting shadows.
  28. @param [cfg.receiveShadow=true] {Boolean} Indicates if receiving shadows.
  29. @param [cfg.outlined=false] {Boolean} Indicates if outline is rendered.
  30. @param [cfg.ghosted=false] {Boolean} Indicates if rendered as ghosted.
  31. @param [cfg.highlighted=false] {Boolean} Indicates if rendered as highlighted.
  32. @param [cfg.selected=false] {Boolean} Indicates if rendered as selected.
  33. @param [cfg.edges=false] {Boolean} Indicates if edges are emphasized.
  34. @param [cfg.aabbVisible=false] {Boolean} Indicates if axis-aligned World-space bounding box is visible.
  35. @param [cfg.obbVisible=false] {Boolean} Indicates if oriented World-space bounding box is visible.
  36. @param [cfg.colorize=[1.0,1.0,1.0]] {Float32Array} RGB colorize color, multiplies by the rendered fragment colors.
  37. @param [cfg.opacity=1.0] {Number} Opacity factor, multiplies by the rendered fragment alpha.
  38. @param [cfg.children] {Array(Object)} Children to add. Children must be in the same {{#crossLink "Scene"}}{{/crossLink}} and will be removed from whatever parents they may already have.
  39. @param [cfg.inheritStates=true] {Boolean} Indicates if children given to this constructor should inherit state from this parent as they are added. State includes {{#crossLink "Object/visible:property"}}{{/crossLink}}, {{#crossLink "Object/culled:property"}}{{/crossLink}}, {{#crossLink "Object/pickable:property"}}{{/crossLink}},
  40. {{#crossLink "Object/clippable:property"}}{{/crossLink}}, {{#crossLink "Object/castShadow:property"}}{{/crossLink}}, {{#crossLink "Object/receiveShadow:property"}}{{/crossLink}},
  41. {{#crossLink "Object/outlined:property"}}{{/crossLink}}, {{#crossLink "Object/ghosted:property"}}{{/crossLink}}, {{#crossLink "Object/highlighted:property"}}{{/crossLink}},
  42. {{#crossLink "Object/selected:property"}}{{/crossLink}}, {{#crossLink "Object/colorize:property"}}{{/crossLink}} and {{#crossLink "Object/opacity:property"}}{{/crossLink}}.
  43. @extends Object
  44. */
  45. import {xeoglObject} from "./object.js";
  46. import {componentClasses} from "./../componentClasses.js";
  47.  
  48. const type = "xeogl.Group";
  49.  
  50. class Group extends xeoglObject{
  51.  
  52. /**
  53. JavaScript class name for this Component.
  54.  
  55. For example: "xeogl.AmbientLight", "xeogl.MetallicMaterial" etc.
  56.  
  57. @property type
  58. @type String
  59. @final
  60. */
  61. get type() {
  62. return type;
  63. }
  64.  
  65. init(cfg) {
  66. super.init(cfg);
  67. }
  68. }
  69.  
  70. componentClasses[type] = Group;
  71.  
  72. export {Group};