智慧水务管理系统 - 精河县供水工程综合管理平台

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807
  1. // @ts-check
  2. import AlphaMode from "./AlphaMode.js";
  3. import Cartesian3 from "../Core/Cartesian3.js";
  4. import Cartesian4 from "../Core/Cartesian4.js";
  5. import Matrix3 from "../Core/Matrix3.js";
  6. import Matrix4 from "../Core/Matrix4.js";
  7. /** @import { TypedArray } from "../Core/globalTypes.js"; */
  8. /** @import ArticulationStageType from "../Core/ArticulationStageType.js"; */
  9. /** @import AttributeType from "./AttributeType.js"; */
  10. /** @import Axis from "./Axis.js"; */
  11. /** @import Cartesian2 from "../Core/Cartesian2.js"; */
  12. /** @import ComponentDatatype from "../Core/ComponentDatatype.js"; */
  13. /** @import Credit from "../Core/Credit.js"; */
  14. /** @import IndexDatatype from "../Core/IndexDatatype.js"; */
  15. /** @import InstanceAttributeSemantic from "./InstanceAttributeSemantic.js"; */
  16. /** @import InterpolationType from "../Core/InterpolationType.js"; */
  17. /** @import Matrix2 from "../Core/Matrix2.js"; */
  18. /** @import ModelPrimitiveImagery from "./Model/ModelPrimitiveImagery.js"; */
  19. /** @import PrimitiveType from "../Core/PrimitiveType.js"; */
  20. /** @import Quaternion from "../Core/Quaternion.js"; */
  21. /** @import StructuralMetadata from "./StructuralMetadata.js"; */
  22. /** @import Texture from "../Renderer/Texture.js"; */
  23. /** @import VertexAttributeSemantic from "./VertexAttributeSemantic.js"; */
  24. /** @import Buffer from "../Renderer/Buffer.js"; */
  25. /**
  26. * Components for building models.
  27. *
  28. * @namespace ModelComponents
  29. *
  30. * @ignore
  31. */
  32. const ModelComponents = {};
  33. /**
  34. * Information about the quantized attribute.
  35. *
  36. * @ignore
  37. */
  38. export class Quantization {
  39. constructor() {
  40. /**
  41. * Whether the quantized attribute is oct-encoded.
  42. *
  43. * @type {boolean}
  44. * @ignore
  45. */
  46. this.octEncoded = false;
  47. /**
  48. * Whether the oct-encoded values are stored as ZXY instead of XYZ. This is true when decoding from Draco.
  49. *
  50. * @type {boolean}
  51. * @ignore
  52. */
  53. this.octEncodedZXY = false;
  54. /**
  55. * The range used to convert buffer values to normalized values [0.0, 1.0]
  56. * This is typically computed as (1 << quantizationBits) - 1.
  57. * For oct-encoded values this value is a single Number.
  58. *
  59. * @type {number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}
  60. * @ignore
  61. */
  62. this.normalizationRange = undefined;
  63. /**
  64. * The bottom-left corner of the quantization volume. Not applicable for oct encoded attributes.
  65. * The type should match the attribute type - e.g. if the attribute type
  66. * is AttributeType.VEC4 the offset should be a Cartesian4.
  67. *
  68. * @type {number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}
  69. * @ignore
  70. */
  71. this.quantizedVolumeOffset = undefined;
  72. /**
  73. * The dimensions of the quantization volume. Not applicable for oct encoded attributes.
  74. * The type should match the attribute type - e.g. if the attribute type
  75. * is AttributeType.VEC4 the dimensions should be a Cartesian4.
  76. *
  77. * @type {number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}
  78. * @ignore
  79. */
  80. this.quantizedVolumeDimensions = undefined;
  81. /**
  82. * The step size of the quantization volume, equal to
  83. * quantizedVolumeDimensions / normalizationRange (component-wise).
  84. * Not applicable for oct encoded attributes.
  85. * The type should match the attribute type - e.g. if the attribute type
  86. * is AttributeType.VEC4 the dimensions should be a Cartesian4.
  87. *
  88. * @type {number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}
  89. * @ignore
  90. */
  91. this.quantizedVolumeStepSize = undefined;
  92. /**
  93. * The component data type of the quantized attribute, e.g. ComponentDatatype.UNSIGNED_SHORT.
  94. *
  95. * <p>
  96. * The following component datatypes are not supported:
  97. * <ul>
  98. * <li>ComponentDatatype.INT</li>
  99. * <li>ComponentDatatype.UNSIGNED_INT</li>
  100. * <li>ComponentDatatype.DOUBLE</li>
  101. * </ul>
  102. * </p>
  103. *
  104. * @type {ComponentDatatype}
  105. * @ignore
  106. */
  107. this.componentDatatype = undefined;
  108. /**
  109. * The type of the quantized attribute, e.g. AttributeType.VEC2 for oct-encoded normals.
  110. *
  111. * @type {AttributeType}
  112. * @ignore
  113. */
  114. this.type = undefined;
  115. }
  116. }
  117. /**
  118. * A per-vertex or per-instance attribute.
  119. *
  120. * @ignore
  121. */
  122. export class Attribute {
  123. constructor() {
  124. /**
  125. * The attribute name. Must be unique within the attributes array.
  126. *
  127. * @type {string}
  128. * @ignore
  129. */
  130. this.name = undefined;
  131. /**
  132. * The attribute semantic. The combination of semantic and setIndex must be
  133. * unique within the attributes array.
  134. *
  135. * @type {VertexAttributeSemantic|InstanceAttributeSemantic}
  136. * @ignore
  137. */
  138. this.semantic = undefined;
  139. /**
  140. * The set index of the attribute. Only applicable when the attribute has one
  141. * of the following semantics:
  142. *
  143. * <ul>
  144. * <li>{@link VertexAttributeSemantic.TEXCOORD}</li>
  145. * <li>{@link VertexAttributeSemantic.COLOR}</li>
  146. * <li>{@link VertexAttributeSemantic.JOINTS}</li>
  147. * <li>{@link VertexAttributeSemantic.WEIGHTS}</li>
  148. * <li>{@link VertexAttributeSemantic.FEATURE_ID}</li>
  149. * <li>{@link InstanceAttributeSemantic.FEATURE_ID}</li>
  150. * </ul>
  151. */
  152. this.setIndex = undefined;
  153. /**
  154. * The component data type of the attribute.
  155. * <p>
  156. * When the data is quantized the componentDatatype should match the
  157. * dequantized data, which is typically ComponentDatatype.FLOAT.
  158. * </p>
  159. * <p>
  160. * The following component datatypes are not supported:
  161. * <ul>
  162. * <li>ComponentDatatype.INT</li>
  163. * <li>ComponentDatatype.UNSIGNED_INT</li>
  164. * <li>ComponentDatatype.DOUBLE</li>
  165. * </ul>
  166. * </p>
  167. *
  168. * @type {ComponentDatatype}
  169. * @ignore
  170. */
  171. this.componentDatatype = undefined;
  172. /**
  173. * The type of the attribute.
  174. * <p>
  175. * When the data is oct-encoded the type should match the decoded data, which
  176. * is typically AttributeType.VEC3.
  177. * </p>
  178. *
  179. * @type {AttributeType}
  180. * @ignore
  181. */
  182. this.type = undefined;
  183. /**
  184. * Whether the attribute is normalized.
  185. *
  186. * @type {boolean}
  187. * @default false
  188. * @ignore
  189. */
  190. this.normalized = false;
  191. /**
  192. * The number of elements.
  193. *
  194. * @type {number}
  195. * @ignore
  196. */
  197. this.count = undefined;
  198. /**
  199. * Minimum value of each component in the attribute.
  200. * <p>
  201. * When the data is quantized the min should match the dequantized data.
  202. * The normalized property has no effect on these values.
  203. * </p>
  204. * <p>
  205. * Must be defined for POSITION attributes.
  206. * </p>
  207. *
  208. * @type {number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}
  209. * @ignore
  210. */
  211. this.min = undefined;
  212. /**
  213. * Maximum value of each component in the attribute.
  214. * <p>
  215. * When the data is quantized the max should match the dequantized data.
  216. * The normalized property has no effect on these values.
  217. * </p>
  218. * <p>
  219. * Must be defined for POSITION attributes.
  220. * </p>
  221. *
  222. * @type {number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}
  223. * @ignore
  224. */
  225. this.max = undefined;
  226. /**
  227. * A constant value used for all elements when typed array and buffer are undefined.
  228. *
  229. * @type {number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}
  230. * @ignore
  231. */
  232. this.constant = undefined;
  233. /**
  234. * Information about the quantized attribute.
  235. *
  236. * @type {Quantization}
  237. * @ignore
  238. */
  239. this.quantization = undefined;
  240. /**
  241. * A typed array containing tightly-packed attribute values, as they appear
  242. * in the model file.
  243. *
  244. * @type {Uint8Array|Int8Array|Uint16Array|Int16Array|Uint32Array|Int32Array|Float32Array}
  245. * @ignore
  246. */
  247. this.typedArray = undefined;
  248. /**
  249. * A vertex buffer. Attribute values are accessed using byteOffset and byteStride.
  250. *
  251. * @type {Buffer}
  252. * @ignore
  253. */
  254. this.buffer = undefined;
  255. /**
  256. * The byte offset of elements in the buffer.
  257. *
  258. * @type {number}
  259. * @default 0
  260. * @ignore
  261. */
  262. this.byteOffset = 0;
  263. /**
  264. * The byte stride of elements in the buffer. When undefined the elements are tightly packed.
  265. *
  266. * @type {number}
  267. * @ignore
  268. */
  269. this.byteStride = undefined;
  270. }
  271. }
  272. /**
  273. * Indices used to select vertices for rendering.
  274. *
  275. * @ignore
  276. */
  277. export class Indices {
  278. constructor() {
  279. /**
  280. * The index data type of the attribute, e.g. IndexDatatype.UNSIGNED_SHORT.
  281. *
  282. * @type {IndexDatatype}
  283. * @ignore
  284. */
  285. this.indexDatatype = undefined;
  286. /**
  287. * The number of indices.
  288. *
  289. * @type {number}
  290. * @ignore
  291. */
  292. this.count = undefined;
  293. /**
  294. * An index buffer containing indices.
  295. *
  296. * @type {Buffer}
  297. * @ignore
  298. */
  299. this.buffer = undefined;
  300. /**
  301. * A typed array containing indices.
  302. *
  303. * @type {Uint8Array|Uint16Array|Uint32Array}
  304. * @ignore
  305. */
  306. this.typedArray = undefined;
  307. }
  308. }
  309. /**
  310. * Maps per-vertex or per-instance feature IDs to a property table. Feature
  311. * IDs are stored in an accessor.
  312. *
  313. * @ignore
  314. */
  315. export class FeatureIdAttribute {
  316. constructor() {
  317. /**
  318. * How many unique features are defined in this set of feature IDs
  319. *
  320. * @type {number}
  321. * @ignore
  322. */
  323. this.featureCount = undefined;
  324. /**
  325. * This value indicates that no feature is indicated with this vertex
  326. *
  327. * @type {number}
  328. * @ignore
  329. */
  330. this.nullFeatureId = undefined;
  331. /**
  332. * The ID of the property table that feature IDs index into. If undefined,
  333. * feature IDs are used for classification, but no metadata is associated.
  334. *
  335. *
  336. * @type {number}
  337. * @ignore
  338. */
  339. this.propertyTableId = undefined;
  340. /**
  341. * The set index of feature ID attribute containing feature IDs.
  342. *
  343. * @type {number}
  344. * @ignore
  345. */
  346. this.setIndex = undefined;
  347. /**
  348. * The label to identify this set of feature IDs. This is used in picking,
  349. * styling and shaders.
  350. *
  351. * @type {string}
  352. * @ignore
  353. */
  354. this.label = undefined;
  355. /**
  356. * Label to identify this set of feature IDs by its position in the array.
  357. * This will always be either "featureId_N" for primitives or
  358. * "instanceFeatureId_N" for instances.
  359. *
  360. * @type {string}
  361. * @ignore
  362. */
  363. this.positionalLabel = undefined;
  364. }
  365. }
  366. /**
  367. * Defines a range of implicitly-defined feature IDs, one for each vertex or
  368. * instance. Such feature IDs may optionally be associated with a property table
  369. * storing metadata
  370. *
  371. * @ignore
  372. */
  373. export class FeatureIdImplicitRange {
  374. constructor() {
  375. /**
  376. * How many unique features are defined in this set of feature IDs
  377. *
  378. * @type {number}
  379. * @ignore
  380. */
  381. this.featureCount = undefined;
  382. /**
  383. * This value indicates that no feature is indicated with this vertex
  384. *
  385. * @type {number}
  386. * @ignore
  387. */
  388. this.nullFeatureId = undefined;
  389. /**
  390. * The ID of the property table that feature IDs index into. If undefined,
  391. * feature IDs are used for classification, but no metadata is associated.
  392. *
  393. * @type {number}
  394. * @ignore
  395. */
  396. this.propertyTableId = undefined;
  397. /**
  398. * The first feature ID to use when setIndex is undefined
  399. *
  400. * @type {number}
  401. * @default 0
  402. * @ignore
  403. */
  404. this.offset = 0;
  405. /**
  406. * Number of times each feature ID is repeated before being incremented.
  407. *
  408. * @type {number}
  409. * @ignore
  410. */
  411. this.repeat = undefined;
  412. /**
  413. * The label to identify this set of feature IDs. This is used in picking,
  414. * styling and shaders.
  415. *
  416. * @type {string}
  417. * @ignore
  418. */
  419. this.label = undefined;
  420. /**
  421. * Label to identify this set of feature IDs by its position in the array.
  422. * This will always be either "featureId_N" for primitives or
  423. * "instanceFeatureId_N" for instances.
  424. *
  425. * @type {string}
  426. * @ignore
  427. */
  428. this.positionalLabel = undefined;
  429. }
  430. }
  431. /**
  432. * A texture that contains per-texel feature IDs that index into a property table.
  433. *
  434. * @ignore
  435. */
  436. export class FeatureIdTexture {
  437. constructor() {
  438. /**
  439. * How many unique features are defined in this set of feature IDs
  440. *
  441. * @type {number}
  442. * @ignore
  443. */
  444. this.featureCount = undefined;
  445. /**
  446. * This value indicates that no feature is indicated with this texel
  447. *
  448. * @type {number}
  449. * @ignore
  450. */
  451. this.nullFeatureId = undefined;
  452. /**
  453. * The ID of the property table that feature IDs index into. If undefined,
  454. * feature IDs are used for classification, but no metadata is associated.
  455. *
  456. * @type {number}
  457. * @ignore
  458. */
  459. this.propertyTableId = undefined;
  460. /**
  461. * The texture reader containing feature IDs.
  462. *
  463. * @type {TextureReader}
  464. * @ignore
  465. */
  466. this.textureReader = undefined;
  467. /**
  468. * The label to identify this set of feature IDs. This is used in picking,
  469. * styling and shaders.
  470. *
  471. * @type {string}
  472. * @ignore
  473. */
  474. this.label = undefined;
  475. /**
  476. * Label to identify this set of feature IDs by its position in the array.
  477. * This will always be either "featureId_N" for primitives or
  478. * "instanceFeatureId_N" for instances.
  479. *
  480. * @type {string}
  481. * @ignore
  482. */
  483. this.positionalLabel = undefined;
  484. }
  485. }
  486. /**
  487. * A morph target where each attribute contains attribute displacement data.
  488. *
  489. * @ignore
  490. */
  491. export class MorphTarget {
  492. constructor() {
  493. /**
  494. * Attributes that are part of the morph target, e.g. positions, normals, and tangents.
  495. *
  496. * @type {Attribute[]}
  497. * @ignore
  498. */
  499. this.attributes = [];
  500. }
  501. }
  502. /**
  503. * Geometry to be rendered with a material.
  504. *
  505. * @ignore
  506. */
  507. export class Primitive {
  508. constructor() {
  509. /**
  510. * The vertex attributes, e.g. positions, normals, etc.
  511. *
  512. * @type {Attribute[]}
  513. * @ignore
  514. */
  515. this.attributes = [];
  516. /**
  517. * The morph targets.
  518. *
  519. * @type {MorphTarget[]}
  520. * @ignore
  521. */
  522. this.morphTargets = [];
  523. /**
  524. * The indices.
  525. *
  526. * @type {Indices}
  527. * @ignore
  528. */
  529. this.indices = undefined;
  530. /**
  531. * The material.
  532. *
  533. * @type {Material}
  534. * @ignore
  535. */
  536. this.material = undefined;
  537. /**
  538. * The primitive type, e.g. PrimitiveType.TRIANGLES.
  539. *
  540. * @type {PrimitiveType}
  541. * @ignore
  542. */
  543. this.primitiveType = undefined;
  544. /**
  545. * The EXT_mesh_polygon extension data for this primitive.
  546. *
  547. * @type {Polygon}
  548. * @ignore
  549. */
  550. this.polygon = undefined;
  551. /**
  552. * The CESIUM_mesh_vector extension data for this primitive.
  553. *
  554. * @type {Vector}
  555. * @ignore
  556. * @deprecated To be removed after v1.142 release.
  557. */
  558. this.vector = undefined;
  559. /**
  560. * The feature IDs associated with this primitive. Feature ID types may
  561. * be interleaved
  562. *
  563. * @type {Array<FeatureIdAttribute|FeatureIdImplicitRange|FeatureIdTexture>}
  564. * @ignore
  565. */
  566. this.featureIds = [];
  567. /**
  568. * The property texture IDs. These indices correspond to the array of
  569. * property textures.
  570. *
  571. * @type {number[]}
  572. * @ignore
  573. */
  574. this.propertyTextureIds = [];
  575. /**
  576. * The property attribute IDs. These indices correspond to the array of
  577. * property attributes in the EXT_structural_metadata extension.
  578. *
  579. * @type {number[]}
  580. * @ignore
  581. */
  582. this.propertyAttributeIds = [];
  583. /**
  584. * If the CESIUM_primitive_outline glTF extension is used, this property
  585. * stores an additional attribute storing outline coordinates.
  586. *
  587. * @type {Attribute}
  588. * @ignore
  589. */
  590. this.outlineCoordinates = undefined;
  591. /**
  592. * If the model is part of a Model3DTileContent of a Cesium3DTileset that
  593. * has 'imageryLayers', then this will represent the information that is
  594. * required for draping the imagery over this primitive.
  595. *
  596. * @type {ModelPrimitiveImagery|undefined}
  597. * @ignore
  598. */
  599. this.modelPrimitiveImagery = undefined;
  600. /**
  601. * Data loaded from the EXT_mesh_primitive_edge_visibility extension.
  602. *
  603. * @type {Object}
  604. * @ignore
  605. */
  606. this.edgeVisibility = undefined;
  607. }
  608. }
  609. /**
  610. * Position and metadata information for instances of a node.
  611. *
  612. * @ignore
  613. */
  614. export class Instances {
  615. constructor() {
  616. /**
  617. * The instance attributes, e.g. translation, rotation, scale, feature id, etc.
  618. *
  619. * @type {Attribute[]}
  620. * @ignore
  621. */
  622. this.attributes = [];
  623. /**
  624. * The feature ID attributes associated with this set of instances.
  625. * Feature ID attribute types may be interleaved.
  626. *
  627. * @type {Array<ModelComponents.FeatureIdAttribute|ModelComponents.FeatureIdImplicitRange>}
  628. * @ignore
  629. */
  630. this.featureIds = [];
  631. /**
  632. * Whether the instancing transforms are applied in world space. For glTF models that
  633. * use EXT_mesh_gpu_instancing, the transform is applied in object space. For i3dm files,
  634. * the instance transform is in world space.
  635. *
  636. * @type {boolean}
  637. * @ignore
  638. */
  639. this.transformInWorldSpace = false;
  640. }
  641. }
  642. /**
  643. * Joints and matrices defining a skin.
  644. *
  645. * @ignore
  646. */
  647. export class Skin {
  648. constructor() {
  649. /**
  650. * The index of the skin in the glTF. This is useful for finding the skin
  651. * that applies to a node after the skin is instantiated at runtime.
  652. *
  653. * @type {number}
  654. * @ignore
  655. */
  656. this.index = undefined;
  657. /**
  658. * The joints.
  659. *
  660. * @type {Node[]}
  661. * @ignore
  662. */
  663. this.joints = [];
  664. /**
  665. * The inverse bind matrices of the joints.
  666. *
  667. * @type {Matrix4[]}
  668. * @ignore
  669. */
  670. this.inverseBindMatrices = [];
  671. }
  672. }
  673. /**
  674. * A node in the node hierarchy.
  675. *
  676. * @ignore
  677. */
  678. export class Node {
  679. constructor() {
  680. /**
  681. * The name of the node.
  682. *
  683. * @type {string}
  684. * @ignore
  685. */
  686. this.name = undefined;
  687. /**
  688. * The index of the node in the glTF. This is useful for finding the nodes
  689. * that belong to a skin after they have been instantiated at runtime.
  690. *
  691. * @type {number}
  692. * @ignore
  693. */
  694. this.index = undefined;
  695. /**
  696. * The children nodes.
  697. *
  698. * @type {Node[]}
  699. * @ignore
  700. */
  701. this.children = [];
  702. /**
  703. * The mesh primitives.
  704. *
  705. * @type {Primitive[]}
  706. * @ignore
  707. */
  708. this.primitives = [];
  709. /**
  710. * Instances of this node.
  711. *
  712. * @type {Instances}
  713. * @ignore
  714. */
  715. this.instances = undefined;
  716. /**
  717. * The skin.
  718. *
  719. * @type {Skin}
  720. * @ignore
  721. */
  722. this.skin = undefined;
  723. /**
  724. * The local transformation matrix. When matrix is defined translation,
  725. * rotation, and scale must be undefined. When matrix is undefined
  726. * translation, rotation, and scale must all be defined.
  727. *
  728. * @type {Matrix4}
  729. * @ignore
  730. */
  731. this.matrix = undefined;
  732. /**
  733. * The local translation.
  734. *
  735. * @type {Cartesian3}
  736. * @ignore
  737. */
  738. this.translation = undefined;
  739. /**
  740. * The local rotation.
  741. *
  742. * @type {Quaternion}
  743. * @ignore
  744. */
  745. this.rotation = undefined;
  746. /**
  747. * The local scale.
  748. *
  749. * @type {Cartesian3}
  750. * @ignore
  751. */
  752. this.scale = undefined;
  753. /**
  754. * An array of weights to be applied to the primitives' morph targets.
  755. * These are supplied by either the node or its mesh.
  756. *
  757. * @type {number[]}
  758. * @ignore
  759. */
  760. this.morphWeights = [];
  761. /**
  762. * The name of the articulation affecting this node, as defined by the
  763. * AGI_articulations extension.
  764. *
  765. * @type {string}
  766. * @ignore
  767. */
  768. this.articulationName = undefined;
  769. /**
  770. * The CESIUM_mesh_vector extension data for this node.
  771. *
  772. * @type {object}
  773. * @ignore
  774. */
  775. this.meshVector = undefined;
  776. }
  777. }
  778. /**
  779. * A scene containing nodes.
  780. *
  781. * @ignore
  782. */
  783. export class Scene {
  784. constructor() {
  785. /**
  786. * The nodes belonging to the scene.
  787. *
  788. * @type {Node[]}
  789. * @ignore
  790. */
  791. this.nodes = [];
  792. }
  793. }
  794. /**
  795. * The property of the node that is targeted by an animation. The values of
  796. * this enum are used to look up the appropriate property on the runtime node.
  797. *
  798. * @enum {string}
  799. *
  800. * @ignore
  801. */
  802. export const AnimatedPropertyType = {
  803. TRANSLATION: "translation",
  804. ROTATION: "rotation",
  805. SCALE: "scale",
  806. WEIGHTS: "weights",
  807. };
  808. /**
  809. * An animation sampler that describes the sources of animated keyframe data
  810. * and their interpolation.
  811. *
  812. * @ignore
  813. */
  814. export class AnimationSampler {
  815. constructor() {
  816. /**
  817. * The timesteps of the animation.
  818. *
  819. * @type {number[]}
  820. * @ignore
  821. */
  822. this.input = [];
  823. /**
  824. * The method used to interpolate between the animation's keyframe data.
  825. *
  826. * @type {InterpolationType}
  827. * @ignore
  828. */
  829. this.interpolation = undefined;
  830. /**
  831. * The keyframe data of the animation.
  832. *
  833. * @type {number[]|Cartesian3[]|Quaternion[]}
  834. * @ignore
  835. */
  836. this.output = [];
  837. }
  838. }
  839. /**
  840. * An animation target, which specifies the node and property to animate.
  841. *
  842. * @ignore
  843. */
  844. export class AnimationTarget {
  845. constructor() {
  846. /**
  847. * The node that will be affected by the animation.
  848. *
  849. * @type {Node}
  850. * @ignore
  851. */
  852. this.node = undefined;
  853. /**
  854. * The property of the node to be animated.
  855. *
  856. * @type {AnimatedPropertyType}
  857. * @ignore
  858. */
  859. this.path = undefined;
  860. }
  861. }
  862. /**
  863. * An animation channel linking an animation sampler and the target it animates.
  864. *
  865. * @ignore
  866. */
  867. export class AnimationChannel {
  868. constructor() {
  869. /**
  870. * The sampler used as the source of the animation data.
  871. *
  872. * @type {AnimationSampler}
  873. * @ignore
  874. */
  875. this.sampler = undefined;
  876. /**
  877. * The target of the animation.
  878. *
  879. * @type {AnimationTarget}
  880. * @ignore
  881. */
  882. this.target = undefined;
  883. }
  884. }
  885. /**
  886. * An animation in the model.
  887. *
  888. * @ignore
  889. */
  890. export class Animation {
  891. constructor() {
  892. /**
  893. * The name of the animation.
  894. *
  895. * @type {string}
  896. * @ignore
  897. */
  898. this.name = undefined;
  899. /**
  900. * The samplers used in this animation.
  901. *
  902. * @type {AnimationSampler[]}
  903. * @ignore
  904. */
  905. this.samplers = [];
  906. /**
  907. * The channels used in this animation.
  908. *
  909. * @type {AnimationChannel[]}
  910. * @ignore
  911. */
  912. this.channels = [];
  913. }
  914. }
  915. /**
  916. * An articulation stage belonging to an articulation from the
  917. * AGI_articulations extension.
  918. *
  919. * @ignore
  920. */
  921. export class ArticulationStage {
  922. constructor() {
  923. /**
  924. * The name of the articulation stage.
  925. *
  926. * @type {string}
  927. * @ignore
  928. */
  929. this.name = undefined;
  930. /**
  931. * The type of the articulation stage, defined by the type of motion it modifies.
  932. *
  933. * @type {ArticulationStageType}
  934. * @ignore
  935. */
  936. this.type = undefined;
  937. /**
  938. * The minimum value for the range of motion of this articulation stage.
  939. *
  940. * @type {number}
  941. * @ignore
  942. */
  943. this.minimumValue = undefined;
  944. /**
  945. * The maximum value for the range of motion of this articulation stage.
  946. *
  947. * @type {number}
  948. * @ignore
  949. */
  950. this.maximumValue = undefined;
  951. /**
  952. * The initial value for this articulation stage.
  953. *
  954. * @type {number}
  955. * @ignore
  956. */
  957. this.initialValue = undefined;
  958. }
  959. }
  960. /**
  961. * An articulation for the model, as defined by the AGI_articulations extension.
  962. *
  963. * @ignore
  964. */
  965. export class Articulation {
  966. constructor() {
  967. /**
  968. * The name of the articulation.
  969. *
  970. * @type {string}
  971. * @ignore
  972. */
  973. this.name = undefined;
  974. /**
  975. * The stages belonging to this articulation. The stages are applied to
  976. * the model in order of appearance.
  977. *
  978. * @type {ArticulationStage[]}
  979. * @ignore
  980. */
  981. this.stages = [];
  982. }
  983. }
  984. /**
  985. * The asset of the model.
  986. *
  987. * @ignore
  988. */
  989. export class Asset {
  990. constructor() {
  991. /**
  992. * The credits of the model.
  993. *
  994. * @type {Credit[]}
  995. * @ignore
  996. */
  997. this.credits = [];
  998. }
  999. }
  1000. /**
  1001. * The components that make up a model.
  1002. *
  1003. * @ignore
  1004. */
  1005. export class Components {
  1006. constructor() {
  1007. /**
  1008. * The asset of the model.
  1009. *
  1010. * @type {Asset}
  1011. * @ignore
  1012. */
  1013. this.asset = new Asset();
  1014. /**
  1015. * The default scene.
  1016. *
  1017. * @type {Scene}
  1018. * @ignore
  1019. */
  1020. this.scene = undefined;
  1021. /**
  1022. * All nodes in the model.
  1023. *
  1024. * @type {Node[]}
  1025. */
  1026. this.nodes = [];
  1027. /**
  1028. * All skins in the model.
  1029. *
  1030. * @type {Skin[]}
  1031. */
  1032. this.skins = [];
  1033. /**
  1034. * All animations in the model.
  1035. *
  1036. * @type {Animation[]}
  1037. */
  1038. this.animations = [];
  1039. /**
  1040. * All articulations in the model as defined by the AGI_articulations extension.
  1041. *
  1042. * @type {Articulation[]}
  1043. */
  1044. this.articulations = [];
  1045. /**
  1046. * Structural metadata containing the schema, property tables, property
  1047. * textures and property mappings
  1048. *
  1049. * @type {StructuralMetadata}
  1050. * @ignore
  1051. */
  1052. this.structuralMetadata = undefined;
  1053. /**
  1054. * The model's up axis.
  1055. *
  1056. * @type {Axis}
  1057. * @ignore
  1058. */
  1059. this.upAxis = undefined;
  1060. /**
  1061. * The model's forward axis.
  1062. *
  1063. * @type {Axis}
  1064. * @ignore
  1065. */
  1066. this.forwardAxis = undefined;
  1067. /**
  1068. * A world-space transform to apply to the primitives.
  1069. *
  1070. * @type {Matrix4}
  1071. * @ignore
  1072. */
  1073. this.transform = Matrix4.clone(Matrix4.IDENTITY);
  1074. /**
  1075. * A mapping from extension names like `"EXT_example_extension"` to
  1076. * the object that was created from the extension input
  1077. *
  1078. * @type {object}
  1079. * @ignore
  1080. */
  1081. this.extensions = {};
  1082. }
  1083. }
  1084. /**
  1085. * Information about a GPU texture, including the texture itself
  1086. *
  1087. * @ignore
  1088. */
  1089. export class TextureReader {
  1090. constructor() {
  1091. /**
  1092. * The underlying GPU texture. The {@link Texture} contains the sampler.
  1093. *
  1094. * @type {Texture}
  1095. * @ignore
  1096. */
  1097. this.texture = undefined;
  1098. /**
  1099. * The index of the texture in the glTF. This is useful for determining
  1100. * when textures are shared to avoid attaching a texture in multiple uniform
  1101. * slots in the shader.
  1102. *
  1103. * @type {number}
  1104. * @ignore
  1105. */
  1106. this.index = undefined;
  1107. /**
  1108. * The texture coordinate set.
  1109. *
  1110. * @type {number}
  1111. * @default 0
  1112. * @ignore
  1113. */
  1114. this.texCoord = 0;
  1115. /**
  1116. * Transformation matrix to apply to texture coordinates.
  1117. *
  1118. * @type {Matrix3}
  1119. * @default Matrix3.IDENTITY
  1120. */
  1121. this.transform = Matrix3.clone(Matrix3.IDENTITY);
  1122. /**
  1123. * Scale to apply to texture values.
  1124. *
  1125. * @type {number}
  1126. * @default 1.0
  1127. * @ignore
  1128. */
  1129. this.scale = 1.0;
  1130. /**
  1131. * The texture channels to read from. When undefined all channels are read.
  1132. *
  1133. * @type {string}
  1134. */
  1135. this.channels = undefined;
  1136. /**
  1137. * Constant level-of-detail parameters from the EXT_textureInfo_constant_lod extension.
  1138. *
  1139. * @type {object|undefined}
  1140. * @private
  1141. */
  1142. this.constantLod = undefined;
  1143. }
  1144. }
  1145. /**
  1146. * Material properties for the PBR metallic roughness shading model.
  1147. *
  1148. * @ignore
  1149. */
  1150. export class MetallicRoughness {
  1151. /**
  1152. * @ignore
  1153. */
  1154. static DEFAULT_BASE_COLOR_FACTOR = Cartesian4.ONE;
  1155. /**
  1156. * @ignore
  1157. */
  1158. static DEFAULT_METALLIC_FACTOR = 1.0;
  1159. /**
  1160. * @ignore
  1161. */
  1162. static DEFAULT_ROUGHNESS_FACTOR = 1.0;
  1163. constructor() {
  1164. /**
  1165. * The base color texture reader.
  1166. *
  1167. * @type {TextureReader}
  1168. * @ignore
  1169. */
  1170. this.baseColorTexture = undefined;
  1171. /**
  1172. * The metallic roughness texture reader.
  1173. *
  1174. * @type {TextureReader}
  1175. * @ignore
  1176. */
  1177. this.metallicRoughnessTexture = undefined;
  1178. /**
  1179. * The base color factor.
  1180. *
  1181. * @type {Cartesian4}
  1182. * @default new Cartesian4(1.0, 1.0, 1.0, 1.0)
  1183. * @ignore
  1184. */
  1185. this.baseColorFactor = Cartesian4.clone(
  1186. MetallicRoughness.DEFAULT_BASE_COLOR_FACTOR,
  1187. );
  1188. /**
  1189. * The metallic factor.
  1190. *
  1191. * @type {number}
  1192. * @default 1.0
  1193. * @ignore
  1194. */
  1195. this.metallicFactor = MetallicRoughness.DEFAULT_METALLIC_FACTOR;
  1196. /**
  1197. * The roughness factor.
  1198. *
  1199. * @type {number}
  1200. * @default 1.0
  1201. * @ignore
  1202. */
  1203. this.roughnessFactor = MetallicRoughness.DEFAULT_ROUGHNESS_FACTOR;
  1204. }
  1205. }
  1206. /**
  1207. * Material properties for the PBR specular glossiness shading model.
  1208. *
  1209. * @ignore
  1210. */
  1211. export class SpecularGlossiness {
  1212. /**
  1213. * @ignore
  1214. */
  1215. static DEFAULT_DIFFUSE_FACTOR = Cartesian4.ONE;
  1216. /**
  1217. * @ignore
  1218. */
  1219. static DEFAULT_SPECULAR_FACTOR = Cartesian3.ONE;
  1220. /**
  1221. * @ignore
  1222. */
  1223. static DEFAULT_GLOSSINESS_FACTOR = 1.0;
  1224. constructor() {
  1225. /**
  1226. * The diffuse texture reader.
  1227. *
  1228. * @type {TextureReader}
  1229. * @ignore
  1230. */
  1231. this.diffuseTexture = undefined;
  1232. /**
  1233. * The specular glossiness texture reader.
  1234. *
  1235. * @type {TextureReader}
  1236. * @ignore
  1237. */
  1238. this.specularGlossinessTexture = undefined;
  1239. /**
  1240. * The diffuse factor.
  1241. *
  1242. * @type {Cartesian4}
  1243. * @default new Cartesian4(1.0, 1.0, 1.0, 1.0)
  1244. * @ignore
  1245. */
  1246. this.diffuseFactor = Cartesian4.clone(
  1247. SpecularGlossiness.DEFAULT_DIFFUSE_FACTOR,
  1248. );
  1249. /**
  1250. * The specular factor.
  1251. *
  1252. * @type {Cartesian3}
  1253. * @default new Cartesian3(1.0, 1.0, 1.0)
  1254. * @ignore
  1255. */
  1256. this.specularFactor = Cartesian3.clone(
  1257. SpecularGlossiness.DEFAULT_SPECULAR_FACTOR,
  1258. );
  1259. /**
  1260. * The glossiness factor.
  1261. *
  1262. * @type {number}
  1263. * @default 1.0
  1264. * @ignore
  1265. */
  1266. this.glossinessFactor = SpecularGlossiness.DEFAULT_GLOSSINESS_FACTOR;
  1267. }
  1268. }
  1269. export class Specular {
  1270. /**
  1271. * @ignore
  1272. */
  1273. static DEFAULT_SPECULAR_FACTOR = 1.0;
  1274. /**
  1275. * @ignore
  1276. */
  1277. static DEFAULT_SPECULAR_COLOR_FACTOR = Cartesian3.ONE;
  1278. constructor() {
  1279. /**
  1280. * The specular factor.
  1281. *
  1282. * @type {number}
  1283. * @default 1.0
  1284. * @ignore
  1285. */
  1286. this.specularFactor = Specular.DEFAULT_SPECULAR_FACTOR;
  1287. /**
  1288. * The specular texture reader.
  1289. *
  1290. * @type {TextureReader}
  1291. * @ignore
  1292. */
  1293. this.specularTexture = undefined;
  1294. /**
  1295. * The specular color factor.
  1296. *
  1297. * @type {Cartesian3}
  1298. * @default new Cartesian3(1.0, 1.0, 1.0)
  1299. * @ignore
  1300. */
  1301. this.specularColorFactor = Cartesian3.clone(
  1302. Specular.DEFAULT_SPECULAR_COLOR_FACTOR,
  1303. );
  1304. /**
  1305. * The specular color texture reader.
  1306. *
  1307. * @type {TextureReader}
  1308. * @ignore
  1309. */
  1310. this.specularColorTexture = undefined;
  1311. }
  1312. }
  1313. export class Anisotropy {
  1314. /**
  1315. * @ignore
  1316. */
  1317. static DEFAULT_ANISOTROPY_STRENGTH = 0.0;
  1318. /**
  1319. * @ignore
  1320. */
  1321. static DEFAULT_ANISOTROPY_ROTATION = 0.0;
  1322. constructor() {
  1323. /**
  1324. * The anisotropy strength.
  1325. *
  1326. * @type {number}
  1327. * @default 0.0
  1328. * @ignore
  1329. */
  1330. this.anisotropyStrength = Anisotropy.DEFAULT_ANISOTROPY_STRENGTH;
  1331. /**
  1332. * The rotation of the anisotropy in tangent, bitangent space,
  1333. * measured in radians counter-clockwise from the tangent.
  1334. *
  1335. * @type {number}
  1336. * @default 0.0
  1337. * @ignore
  1338. */
  1339. this.anisotropyRotation = Anisotropy.DEFAULT_ANISOTROPY_ROTATION;
  1340. /**
  1341. * The anisotropy texture reader.
  1342. *
  1343. * @type {TextureReader}
  1344. * @ignore
  1345. */
  1346. this.anisotropyTexture = undefined;
  1347. }
  1348. }
  1349. export class Clearcoat {
  1350. /**
  1351. * @ignore
  1352. */
  1353. static DEFAULT_CLEARCOAT_FACTOR = 0.0;
  1354. /**
  1355. * @ignore
  1356. */
  1357. static DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR = 0.0;
  1358. constructor() {
  1359. /**
  1360. * The clearcoat layer intensity.
  1361. *
  1362. * @type {number}
  1363. * @default 0.0
  1364. * @ignore
  1365. */
  1366. this.clearcoatFactor = Clearcoat.DEFAULT_CLEARCOAT_FACTOR;
  1367. /**
  1368. * The clearcoat layer intensity texture reader.
  1369. *
  1370. * @type {TextureReader}
  1371. * @ignore
  1372. */
  1373. this.clearcoatTexture = undefined;
  1374. /**
  1375. * The clearcoat layer roughness.
  1376. *
  1377. * @type {number}
  1378. * @default 0.0
  1379. * @ignore
  1380. */
  1381. this.clearcoatRoughnessFactor =
  1382. Clearcoat.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR;
  1383. /**
  1384. * The clearcoat layer roughness texture.
  1385. *
  1386. * @type {TextureReader}
  1387. * @ignore
  1388. */
  1389. this.clearcoatRoughnessTexture = undefined;
  1390. /**
  1391. * The clearcoat normal map texture.
  1392. *
  1393. * @type {TextureReader}
  1394. * @ignore
  1395. */
  1396. this.clearcoatNormalTexture = undefined;
  1397. }
  1398. }
  1399. /**
  1400. * Material properties for the BENTLEY_materials_line_style extension.
  1401. *
  1402. * @alias ModelComponents.LineStyle
  1403. * @constructor
  1404. *
  1405. * @private
  1406. */
  1407. export class LineStyle {
  1408. /**
  1409. * The line width in pixels for LINES primitives.
  1410. *
  1411. * @type {number|undefined}
  1412. * @default undefined
  1413. */
  1414. width = undefined;
  1415. /**
  1416. * The line dash pattern for LINES primitives. Encoded as a 16-bit unsigned
  1417. * integer where each bit represents a pixel (1=on, 0=off).
  1418. *
  1419. * @type {number|undefined}
  1420. * @default undefined
  1421. */
  1422. pattern = undefined;
  1423. }
  1424. /**
  1425. * The material appearance of a primitive.
  1426. *
  1427. * @ignore
  1428. */
  1429. export class Material {
  1430. /**
  1431. * @ignore
  1432. */
  1433. static DEFAULT_EMISSIVE_FACTOR = Cartesian3.ZERO;
  1434. constructor() {
  1435. /**
  1436. * Material properties for the PBR metallic roughness shading model.
  1437. *
  1438. * @type {MetallicRoughness}
  1439. * @ignore
  1440. */
  1441. this.metallicRoughness = new MetallicRoughness();
  1442. /**
  1443. * Material properties for the PBR specular glossiness shading model.
  1444. *
  1445. * @type {SpecularGlossiness}
  1446. * @ignore
  1447. */
  1448. this.specularGlossiness = undefined;
  1449. /**
  1450. * Material properties for the PBR specular shading model.
  1451. *
  1452. * @type {Specular}
  1453. * @ignore
  1454. */
  1455. this.specular = undefined;
  1456. /**
  1457. * Material properties for the PBR anisotropy shading model.
  1458. *
  1459. * @type {Anisotropy}
  1460. * @ignore
  1461. */
  1462. this.anisotropy = undefined;
  1463. /**
  1464. * Material properties for the PBR clearcoat shading model.
  1465. *
  1466. * @type {Clearcoat}
  1467. * @ignore
  1468. */
  1469. this.clearcoat = undefined;
  1470. /**
  1471. * The emissive texture reader.
  1472. *
  1473. * @type {TextureReader}
  1474. * @ignore
  1475. */
  1476. this.emissiveTexture = undefined;
  1477. /**
  1478. * The normal texture reader.
  1479. *
  1480. * @type {TextureReader}
  1481. * @ignore
  1482. */
  1483. this.normalTexture = undefined;
  1484. /**
  1485. * The occlusion texture reader.
  1486. *
  1487. * @type {TextureReader}
  1488. * @ignore
  1489. */
  1490. this.occlusionTexture = undefined;
  1491. /**
  1492. * The emissive factor.
  1493. *
  1494. * @type {Cartesian3}
  1495. * @default Cartesian3.ZERO
  1496. * @ignore
  1497. */
  1498. this.emissiveFactor = Cartesian3.clone(Material.DEFAULT_EMISSIVE_FACTOR);
  1499. /**
  1500. * The alpha mode.
  1501. *
  1502. * @type {AlphaMode}
  1503. * @default AlphaMode.OPAQUE
  1504. * @ignore
  1505. */
  1506. this.alphaMode = AlphaMode.OPAQUE;
  1507. /**
  1508. * The alpha cutoff value of the material for the MASK alpha mode.
  1509. *
  1510. * @type {number}
  1511. * @default 0.5
  1512. * @ignore
  1513. */
  1514. this.alphaCutoff = 0.5;
  1515. /**
  1516. * Specifies whether the material is double sided.
  1517. *
  1518. * @type {boolean}
  1519. * @default false
  1520. * @ignore
  1521. */
  1522. this.doubleSided = false;
  1523. /**
  1524. * Specifies whether the material is unlit.
  1525. *
  1526. * @type {boolean}
  1527. * @default false
  1528. * @ignore
  1529. */
  1530. this.unlit = false;
  1531. /**
  1532. * The point diameter in pixels for POINTS primitives. This is set by the
  1533. * BENTLEY_materials_point_style extension.
  1534. *
  1535. * @type {number|undefined}
  1536. * @default undefined
  1537. * @ignore
  1538. */
  1539. this.pointDiameter = undefined;
  1540. /**
  1541. * Material properties for the BENTLEY_materials_line_style extension.
  1542. *
  1543. * @type {LineStyle}
  1544. * @ignore
  1545. */
  1546. this.lineStyle = undefined;
  1547. }
  1548. }
  1549. /**
  1550. * Polygon data in the model, as defined by the EXT_mesh_polygon extension.
  1551. *
  1552. * @ignore
  1553. */
  1554. export class Polygon {
  1555. /** @type {number} */
  1556. count = 0;
  1557. // Triangle indices are required for LINE_LOOP primitives, and loop indices
  1558. // are required for TRIANGLES primitives. The final spec will not keep both
  1559. // options, but while the questions is undecided, both are supported.
  1560. // See: https://github.com/KhronosGroup/glTF/pull/2570
  1561. /** @type {TypedArray|undefined} */
  1562. triangleIndices = undefined;
  1563. /** @type {TypedArray|undefined} */
  1564. triangleIndicesOffsets = undefined;
  1565. /** @type {TypedArray|undefined} */
  1566. loopIndices = undefined;
  1567. /** @type {TypedArray|undefined} */
  1568. loopIndicesOffsets = undefined;
  1569. }
  1570. /**
  1571. * Vector data in the model, as defined by the CESIUM_mesh_vector extension.
  1572. *
  1573. * @deprecated To be removed after v1.142 release.
  1574. * @ignore
  1575. */
  1576. export class Vector {
  1577. /** @type {true} */
  1578. vector = true;
  1579. /** @type {number} */
  1580. count = 0;
  1581. /** @type {TypedArray} */
  1582. polygonAttributeOffsets = undefined;
  1583. /** @type {TypedArray} */
  1584. polygonHoleCounts = undefined;
  1585. /** @type {TypedArray} */
  1586. polygonHoleOffsets = undefined;
  1587. /** @type {TypedArray} */
  1588. polygonIndicesOffsets = undefined;
  1589. }
  1590. ModelComponents.Quantization = Quantization;
  1591. ModelComponents.Attribute = Attribute;
  1592. ModelComponents.Indices = Indices;
  1593. ModelComponents.FeatureIdAttribute = FeatureIdAttribute;
  1594. ModelComponents.FeatureIdTexture = FeatureIdTexture;
  1595. ModelComponents.FeatureIdImplicitRange = FeatureIdImplicitRange;
  1596. ModelComponents.MorphTarget = MorphTarget;
  1597. ModelComponents.Primitive = Primitive;
  1598. ModelComponents.Instances = Instances;
  1599. ModelComponents.Skin = Skin;
  1600. ModelComponents.Node = Node;
  1601. ModelComponents.Scene = Scene;
  1602. ModelComponents.AnimatedPropertyType = Object.freeze(AnimatedPropertyType);
  1603. ModelComponents.AnimationSampler = AnimationSampler;
  1604. ModelComponents.AnimationTarget = AnimationTarget;
  1605. ModelComponents.AnimationChannel = AnimationChannel;
  1606. ModelComponents.Animation = Animation;
  1607. ModelComponents.ArticulationStage = ArticulationStage;
  1608. ModelComponents.Articulation = Articulation;
  1609. ModelComponents.Asset = Asset;
  1610. ModelComponents.Components = Components;
  1611. ModelComponents.TextureReader = TextureReader;
  1612. ModelComponents.MetallicRoughness = MetallicRoughness;
  1613. ModelComponents.SpecularGlossiness = SpecularGlossiness;
  1614. ModelComponents.Specular = Specular;
  1615. ModelComponents.Anisotropy = Anisotropy;
  1616. ModelComponents.Clearcoat = Clearcoat;
  1617. ModelComponents.LineStyle = LineStyle;
  1618. ModelComponents.Material = Material;
  1619. ModelComponents.Vector = Vector;
  1620. ModelComponents.Polygon = Polygon;
  1621. export default ModelComponents;