GeometryAttributes-aff51037.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /**
  2. * @license
  3. * Cesium - https://github.com/CesiumGS/cesium
  4. * Version 1.97
  5. *
  6. * Copyright 2011-2022 Cesium Contributors
  7. *
  8. * Licensed under the Apache License, Version 2.0 (the "License");
  9. * you may not use this file except in compliance with the License.
  10. * You may obtain a copy of the License at
  11. *
  12. * http://www.apache.org/licenses/LICENSE-2.0
  13. *
  14. * Unless required by applicable law or agreed to in writing, software
  15. * distributed under the License is distributed on an "AS IS" BASIS,
  16. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. * See the License for the specific language governing permissions and
  18. * limitations under the License.
  19. *
  20. * Columbus View (Pat. Pend.)
  21. *
  22. * Portions licensed separately.
  23. * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
  24. */
  25. define(['exports', './defaultValue-a6eb9f34'], (function (exports, defaultValue) { 'use strict';
  26. /**
  27. * Attributes, which make up a geometry's vertices. Each property in this object corresponds to a
  28. * {@link GeometryAttribute} containing the attribute's data.
  29. * <p>
  30. * Attributes are always stored non-interleaved in a Geometry.
  31. * </p>
  32. *
  33. * @alias GeometryAttributes
  34. * @constructor
  35. */
  36. function GeometryAttributes(options) {
  37. options = defaultValue.defaultValue(options, defaultValue.defaultValue.EMPTY_OBJECT);
  38. /**
  39. * The 3D position attribute.
  40. * <p>
  41. * 64-bit floating-point (for precision). 3 components per attribute.
  42. * </p>
  43. *
  44. * @type GeometryAttribute
  45. *
  46. * @default undefined
  47. */
  48. this.position = options.position;
  49. /**
  50. * The normal attribute (normalized), which is commonly used for lighting.
  51. * <p>
  52. * 32-bit floating-point. 3 components per attribute.
  53. * </p>
  54. *
  55. * @type GeometryAttribute
  56. *
  57. * @default undefined
  58. */
  59. this.normal = options.normal;
  60. /**
  61. * The 2D texture coordinate attribute.
  62. * <p>
  63. * 32-bit floating-point. 2 components per attribute
  64. * </p>
  65. *
  66. * @type GeometryAttribute
  67. *
  68. * @default undefined
  69. */
  70. this.st = options.st;
  71. /**
  72. * The bitangent attribute (normalized), which is used for tangent-space effects like bump mapping.
  73. * <p>
  74. * 32-bit floating-point. 3 components per attribute.
  75. * </p>
  76. *
  77. * @type GeometryAttribute
  78. *
  79. * @default undefined
  80. */
  81. this.bitangent = options.bitangent;
  82. /**
  83. * The tangent attribute (normalized), which is used for tangent-space effects like bump mapping.
  84. * <p>
  85. * 32-bit floating-point. 3 components per attribute.
  86. * </p>
  87. *
  88. * @type GeometryAttribute
  89. *
  90. * @default undefined
  91. */
  92. this.tangent = options.tangent;
  93. /**
  94. * The color attribute.
  95. * <p>
  96. * 8-bit unsigned integer. 4 components per attribute.
  97. * </p>
  98. *
  99. * @type GeometryAttribute
  100. *
  101. * @default undefined
  102. */
  103. this.color = options.color;
  104. }
  105. exports.GeometryAttributes = GeometryAttributes;
  106. }));