@rtzh/engine 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/Build/Workers/chunk-2J26NSQJ.js +57 -0
  2. package/Build/Workers/chunk-2ZWJOYYZ.js +497 -0
  3. package/Build/Workers/chunk-3ENHMKKX.js +1800 -0
  4. package/Build/Workers/chunk-47CWFJX6.js +124 -0
  5. package/Build/Workers/chunk-4VAD4BJM.js +55 -0
  6. package/Build/Workers/chunk-5DTY5JIA.js +256 -0
  7. package/Build/Workers/chunk-623LOZW5.js +511 -0
  8. package/Build/Workers/chunk-6WNAMM2J.js +368 -0
  9. package/Build/Workers/chunk-7IJ6YJDR.js +439 -0
  10. package/Build/Workers/chunk-A44RSIOC.js +138 -0
  11. package/Build/Workers/chunk-ALHM5LNB.js +163 -0
  12. package/Build/Workers/chunk-ASKKSAO2.js +114 -0
  13. package/Build/Workers/chunk-AUOSJ7RD.js +1483 -0
  14. package/Build/Workers/chunk-BLMLQN3N.js +288 -0
  15. package/Build/Workers/chunk-BLPBGSIN.js +778 -0
  16. package/Build/Workers/chunk-BVMMZTO2.js +73 -0
  17. package/Build/Workers/chunk-DQLCJMOH.js +692 -0
  18. package/Build/Workers/chunk-DU24KQOE.js +352 -0
  19. package/Build/Workers/chunk-EAXGQLHV.js +102 -0
  20. package/Build/Workers/chunk-EPAJ4UIR.js +75 -0
  21. package/Build/Workers/chunk-F2MK22SO.js +198 -0
  22. package/Build/Workers/chunk-F4XSN4LN.js +642 -0
  23. package/Build/Workers/chunk-FAVFRMK5.js +1317 -0
  24. package/Build/Workers/chunk-FKKXVIQS.js +58 -0
  25. package/Build/Workers/chunk-FQBOVVHM.js +2719 -0
  26. package/Build/Workers/chunk-HTTTEW64.js +305 -0
  27. package/Build/Workers/chunk-HZQONEX2.js +241 -0
  28. package/Build/Workers/chunk-ILNFTW5Z.js +788 -0
  29. package/Build/Workers/chunk-J6DW5QIM.js +55 -0
  30. package/Build/Workers/chunk-JCJRAI2M.js +8366 -0
  31. package/Build/Workers/chunk-JEFN4ZPU.js +44 -0
  32. package/Build/Workers/chunk-KWI3TOQ3.js +1460 -0
  33. package/Build/Workers/chunk-L63MA7DS.js +299 -0
  34. package/Build/Workers/chunk-LKCPP73L.js +139 -0
  35. package/Build/Workers/chunk-MBKDVX63.js +1067 -0
  36. package/Build/Workers/chunk-ODIGZZ3R.js +682 -0
  37. package/Build/Workers/chunk-Q2GNXOAO.js +414 -0
  38. package/Build/Workers/chunk-QCRUW3OJ.js +387 -0
  39. package/Build/Workers/chunk-QG2AN7NK.js +2058 -0
  40. package/Build/Workers/chunk-RGAJSVVU.js +1045 -0
  41. package/Build/Workers/chunk-RJJMDQTR.js +455 -0
  42. package/Build/Workers/chunk-RMYM65KX.js +629 -0
  43. package/Build/Workers/chunk-S3QVNBQ2.js +837 -0
  44. package/Build/Workers/chunk-SL6RUOEJ.js +1443 -0
  45. package/Build/Workers/chunk-TDP5NGTP.js +171 -0
  46. package/Build/Workers/chunk-TDQUDFAH.js +940 -0
  47. package/Build/Workers/chunk-TVCOYHIQ.js +1054 -0
  48. package/Build/Workers/chunk-TVVFCSTW.js +162 -0
  49. package/Build/Workers/chunk-UCLPK6WA.js +101 -0
  50. package/Build/Workers/chunk-UR5UUI2S.js +280 -0
  51. package/Build/Workers/chunk-VH6ZXWXV.js +398 -0
  52. package/Build/Workers/chunk-VU5DFAMV.js +97 -0
  53. package/Build/Workers/chunk-WMSJG24O.js +352 -0
  54. package/Build/Workers/chunk-X7RJMQRF.js +476 -0
  55. package/Build/Workers/chunk-XOKZRQNH.js +219 -0
  56. package/Build/Workers/chunk-YF767F7T.js +37 -0
  57. package/Build/Workers/chunk-YLNURUBI.js +3514 -0
  58. package/Build/Workers/combineGeometry.js +24 -24
  59. package/Build/Workers/createBoxGeometry.js +18 -18
  60. package/Build/Workers/createBoxOutlineGeometry.js +16 -16
  61. package/Build/Workers/createCircleGeometry.js +26 -26
  62. package/Build/Workers/createCircleOutlineGeometry.js +19 -19
  63. package/Build/Workers/createCoplanarPolygonGeometry.js +33 -33
  64. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
  65. package/Build/Workers/createCorridorGeometry.js +29 -29
  66. package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
  67. package/Build/Workers/createCylinderGeometry.js +20 -20
  68. package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
  69. package/Build/Workers/createEllipseGeometry.js +26 -26
  70. package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
  71. package/Build/Workers/createEllipsoidGeometry.js +19 -19
  72. package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
  73. package/Build/Workers/createFrustumGeometry.js +18 -18
  74. package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
  75. package/Build/Workers/createGeometry.js +24 -24
  76. package/Build/Workers/createGroundPolylineGeometry.js +22 -22
  77. package/Build/Workers/createPlaneGeometry.js +16 -16
  78. package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
  79. package/Build/Workers/createPolygonGeometry.js +32 -32
  80. package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
  81. package/Build/Workers/createPolylineGeometry.js +25 -25
  82. package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
  83. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
  84. package/Build/Workers/createRectangleGeometry.js +27 -27
  85. package/Build/Workers/createRectangleOutlineGeometry.js +20 -20
  86. package/Build/Workers/createSimplePolylineGeometry.js +23 -23
  87. package/Build/Workers/createSphereGeometry.js +19 -19
  88. package/Build/Workers/createSphereOutlineGeometry.js +18 -18
  89. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  90. package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
  91. package/Build/Workers/createVectorTileGeometries.js +24 -24
  92. package/Build/Workers/createVectorTilePoints.js +13 -13
  93. package/Build/Workers/createVectorTilePolygons.js +22 -22
  94. package/Build/Workers/createVectorTilePolylines.js +14 -14
  95. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -25
  96. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
  97. package/Build/Workers/createVerticesFromHeightmap.js +22 -22
  98. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
  99. package/Build/Workers/createWallGeometry.js +24 -24
  100. package/Build/Workers/createWallOutlineGeometry.js +23 -23
  101. package/Build/Workers/decodeDraco.js +10 -10
  102. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  103. package/Build/Workers/decodeI3S.js +10 -10
  104. package/Build/Workers/gaussianSplatSorter.js +4 -4
  105. package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
  106. package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
  107. package/Build/Workers/transcodeKTX2.js +6 -6
  108. package/Build/Workers/transferTypedArrayTest.js +1 -1
  109. package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
  110. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
  111. package/Source/Scene/Model/CPUStylingPipelineStage.js +4 -1
  112. package/Source/Scene/Model/CustomShader.js +21 -0
  113. package/Source/Scene/Model/CustomShaderPipelineStage.js +9 -0
  114. package/Source/Scene/Model/ModelDrawCommand.js +52 -3
  115. package/Source/Shaders/Model/CPUStylingStageFS.glsl +4 -1
  116. package/Source/Shaders/Model/CPUStylingStageFS.js +4 -1
  117. package/Source/Shaders/Model/CPUStylingStageVS.glsl +4 -1
  118. package/Source/Shaders/Model/CPUStylingStageVS.js +4 -1
  119. package/Source/Shaders/Model/ModelFS.glsl +11 -9
  120. package/Source/Shaders/Model/ModelFS.js +11 -9
  121. package/index.d.ts +8 -0
  122. package/index.js +64 -64
  123. package/package.json +1 -1
@@ -0,0 +1,163 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.14
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
+
26
+ import {
27
+ defined_default
28
+ } from "./chunk-EPAJ4UIR.js";
29
+
30
+ // packages/engine/Source/Core/DeveloperError.js
31
+ function DeveloperError(message) {
32
+ this.name = "DeveloperError";
33
+ this.message = message;
34
+ let stack;
35
+ try {
36
+ throw new Error();
37
+ } catch (e) {
38
+ stack = e.stack;
39
+ }
40
+ this.stack = stack;
41
+ }
42
+ if (defined_default(Object.create)) {
43
+ DeveloperError.prototype = Object.create(Error.prototype);
44
+ DeveloperError.prototype.constructor = DeveloperError;
45
+ }
46
+ DeveloperError.prototype.toString = function() {
47
+ let str = `${this.name}: ${this.message}`;
48
+ if (defined_default(this.stack)) {
49
+ str += `
50
+ ${this.stack.toString()}`;
51
+ }
52
+ return str;
53
+ };
54
+ DeveloperError.throwInstantiationError = function() {
55
+ throw new DeveloperError(
56
+ "This function defines an interface and should not be called directly."
57
+ );
58
+ };
59
+ var DeveloperError_default = DeveloperError;
60
+
61
+ // packages/engine/Source/Core/Check.js
62
+ var Check = {};
63
+ Check.typeOf = {};
64
+ function getUndefinedErrorMessage(name) {
65
+ return `${name} is required, actual value was undefined`;
66
+ }
67
+ function getFailedTypeErrorMessage(actual, expected, name) {
68
+ return `Expected ${name} to be typeof ${expected}, actual typeof was ${actual}`;
69
+ }
70
+ Check.defined = function(name, test) {
71
+ if (!defined_default(test)) {
72
+ throw new DeveloperError_default(getUndefinedErrorMessage(name));
73
+ }
74
+ };
75
+ Check.typeOf.func = function(name, test) {
76
+ if (typeof test !== "function") {
77
+ throw new DeveloperError_default(
78
+ getFailedTypeErrorMessage(typeof test, "function", name)
79
+ );
80
+ }
81
+ };
82
+ Check.typeOf.string = function(name, test) {
83
+ if (typeof test !== "string") {
84
+ throw new DeveloperError_default(
85
+ getFailedTypeErrorMessage(typeof test, "string", name)
86
+ );
87
+ }
88
+ };
89
+ Check.typeOf.number = function(name, test) {
90
+ if (typeof test !== "number") {
91
+ throw new DeveloperError_default(
92
+ getFailedTypeErrorMessage(typeof test, "number", name)
93
+ );
94
+ }
95
+ };
96
+ Check.typeOf.number.lessThan = function(name, test, limit) {
97
+ Check.typeOf.number(name, test);
98
+ if (test >= limit) {
99
+ throw new DeveloperError_default(
100
+ `Expected ${name} to be less than ${limit}, actual value was ${test}`
101
+ );
102
+ }
103
+ };
104
+ Check.typeOf.number.lessThanOrEquals = function(name, test, limit) {
105
+ Check.typeOf.number(name, test);
106
+ if (test > limit) {
107
+ throw new DeveloperError_default(
108
+ `Expected ${name} to be less than or equal to ${limit}, actual value was ${test}`
109
+ );
110
+ }
111
+ };
112
+ Check.typeOf.number.greaterThan = function(name, test, limit) {
113
+ Check.typeOf.number(name, test);
114
+ if (test <= limit) {
115
+ throw new DeveloperError_default(
116
+ `Expected ${name} to be greater than ${limit}, actual value was ${test}`
117
+ );
118
+ }
119
+ };
120
+ Check.typeOf.number.greaterThanOrEquals = function(name, test, limit) {
121
+ Check.typeOf.number(name, test);
122
+ if (test < limit) {
123
+ throw new DeveloperError_default(
124
+ `Expected ${name} to be greater than or equal to ${limit}, actual value was ${test}`
125
+ );
126
+ }
127
+ };
128
+ Check.typeOf.object = function(name, test) {
129
+ if (typeof test !== "object") {
130
+ throw new DeveloperError_default(
131
+ getFailedTypeErrorMessage(typeof test, "object", name)
132
+ );
133
+ }
134
+ };
135
+ Check.typeOf.bool = function(name, test) {
136
+ if (typeof test !== "boolean") {
137
+ throw new DeveloperError_default(
138
+ getFailedTypeErrorMessage(typeof test, "boolean", name)
139
+ );
140
+ }
141
+ };
142
+ Check.typeOf.bigint = function(name, test) {
143
+ if (typeof test !== "bigint") {
144
+ throw new DeveloperError_default(
145
+ getFailedTypeErrorMessage(typeof test, "bigint", name)
146
+ );
147
+ }
148
+ };
149
+ Check.typeOf.number.equals = function(name1, name2, test1, test2) {
150
+ Check.typeOf.number(name1, test1);
151
+ Check.typeOf.number(name2, test2);
152
+ if (test1 !== test2) {
153
+ throw new DeveloperError_default(
154
+ `${name1} must be equal to ${name2}, the actual values are ${test1} and ${test2}`
155
+ );
156
+ }
157
+ };
158
+ var Check_default = Check;
159
+
160
+ export {
161
+ DeveloperError_default,
162
+ Check_default
163
+ };
@@ -0,0 +1,114 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.14
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
+
26
+ import {
27
+ Cartographic_default,
28
+ Ellipsoid_default
29
+ } from "./chunk-KWI3TOQ3.js";
30
+ import {
31
+ Cartesian3_default
32
+ } from "./chunk-SL6RUOEJ.js";
33
+ import {
34
+ Math_default
35
+ } from "./chunk-2ZWJOYYZ.js";
36
+ import {
37
+ DeveloperError_default
38
+ } from "./chunk-ALHM5LNB.js";
39
+ import {
40
+ defined_default
41
+ } from "./chunk-EPAJ4UIR.js";
42
+
43
+ // packages/engine/Source/Core/WebMercatorProjection.js
44
+ function WebMercatorProjection(ellipsoid) {
45
+ this._ellipsoid = ellipsoid ?? Ellipsoid_default.WGS84;
46
+ this._semimajorAxis = this._ellipsoid.maximumRadius;
47
+ this._oneOverSemimajorAxis = 1 / this._semimajorAxis;
48
+ }
49
+ Object.defineProperties(WebMercatorProjection.prototype, {
50
+ /**
51
+ * Gets the {@link Ellipsoid}.
52
+ *
53
+ * @memberof WebMercatorProjection.prototype
54
+ *
55
+ * @type {Ellipsoid}
56
+ * @readonly
57
+ */
58
+ ellipsoid: {
59
+ get: function() {
60
+ return this._ellipsoid;
61
+ }
62
+ }
63
+ });
64
+ WebMercatorProjection.mercatorAngleToGeodeticLatitude = function(mercatorAngle) {
65
+ return Math_default.PI_OVER_TWO - 2 * Math.atan(Math.exp(-mercatorAngle));
66
+ };
67
+ WebMercatorProjection.geodeticLatitudeToMercatorAngle = function(latitude) {
68
+ if (latitude > WebMercatorProjection.MaximumLatitude) {
69
+ latitude = WebMercatorProjection.MaximumLatitude;
70
+ } else if (latitude < -WebMercatorProjection.MaximumLatitude) {
71
+ latitude = -WebMercatorProjection.MaximumLatitude;
72
+ }
73
+ const sinLatitude = Math.sin(latitude);
74
+ return 0.5 * Math.log((1 + sinLatitude) / (1 - sinLatitude));
75
+ };
76
+ WebMercatorProjection.MaximumLatitude = WebMercatorProjection.mercatorAngleToGeodeticLatitude(Math.PI);
77
+ WebMercatorProjection.prototype.project = function(cartographic, result) {
78
+ const semimajorAxis = this._semimajorAxis;
79
+ const x = cartographic.longitude * semimajorAxis;
80
+ const y = WebMercatorProjection.geodeticLatitudeToMercatorAngle(
81
+ cartographic.latitude
82
+ ) * semimajorAxis;
83
+ const z = cartographic.height;
84
+ if (!defined_default(result)) {
85
+ return new Cartesian3_default(x, y, z);
86
+ }
87
+ result.x = x;
88
+ result.y = y;
89
+ result.z = z;
90
+ return result;
91
+ };
92
+ WebMercatorProjection.prototype.unproject = function(cartesian, result) {
93
+ if (!defined_default(cartesian)) {
94
+ throw new DeveloperError_default("cartesian is required");
95
+ }
96
+ const oneOverEarthSemimajorAxis = this._oneOverSemimajorAxis;
97
+ const longitude = cartesian.x * oneOverEarthSemimajorAxis;
98
+ const latitude = WebMercatorProjection.mercatorAngleToGeodeticLatitude(
99
+ cartesian.y * oneOverEarthSemimajorAxis
100
+ );
101
+ const height = cartesian.z;
102
+ if (!defined_default(result)) {
103
+ return new Cartographic_default(longitude, latitude, height);
104
+ }
105
+ result.longitude = longitude;
106
+ result.latitude = latitude;
107
+ result.height = height;
108
+ return result;
109
+ };
110
+ var WebMercatorProjection_default = WebMercatorProjection;
111
+
112
+ export {
113
+ WebMercatorProjection_default
114
+ };