Cesium3DContentGroup.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import Check from "../Core/Check.js";
  2. import defaultValue from "../Core/defaultValue.js";
  3. /**
  4. * Simple abstraction for a group. This class exists to make the metadata API
  5. * more consistent, i.e. metadata can be accessed via
  6. * <code>content.group.metadata</code> much like tile metadata is accessed as
  7. * <code>tile.metadata</code>.
  8. *
  9. * @param {object} options Object with the following properties:
  10. * @param {GroupMetadata} options.metadata The metadata associated with this group.
  11. *
  12. * @alias Cesium3DContentGroup
  13. * @constructor
  14. * @private
  15. * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
  16. */
  17. function Cesium3DContentGroup(options) {
  18. options = defaultValue(options, defaultValue.EMPTY_OBJECT);
  19. //>>includeStart('debug', pragmas.debug);
  20. Check.typeOf.object("options.metadata", options.metadata);
  21. //>>includeEnd('debug');
  22. this._metadata = options.metadata;
  23. }
  24. Object.defineProperties(Cesium3DContentGroup.prototype, {
  25. /**
  26. * Get the metadata for this group
  27. *
  28. * @memberof Cesium3DContentGroup.prototype
  29. *
  30. * @type {GroupMetadata}
  31. *
  32. * @readonly
  33. */
  34. metadata: {
  35. get: function () {
  36. return this._metadata;
  37. },
  38. },
  39. });
  40. export default Cesium3DContentGroup;