@cesium/engine 13.1.0 → 15.0.0
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.
- package/Build/Workers/{chunk-APCS5YJI.js → chunk-25TOENEE.js} +7 -7
- package/Build/Workers/{chunk-FNCXBBCF.js → chunk-2AVIUB5H.js} +2 -2
- package/Build/Workers/{chunk-OZTFRHA2.js → chunk-3JZGPJMZ.js} +6 -6
- package/Build/Workers/{chunk-5JY4LYO3.js → chunk-3LHBH4TC.js} +7 -7
- package/Build/Workers/{chunk-MGABCOOH.js → chunk-3LZF23RY.js} +6 -6
- package/Build/Workers/{chunk-AXYZUG4N.js → chunk-5S2B46UQ.js} +1 -1
- package/Build/Workers/{chunk-2SRHVCFD.js → chunk-67ONR44K.js} +6 -6
- package/Build/Workers/{chunk-PBJQFLKS.js → chunk-6EDBC234.js} +11 -11
- package/Build/Workers/{chunk-GSLKQJM2.js → chunk-6EV4VOET.js} +10 -10
- package/Build/Workers/{chunk-OGRXNUR2.js → chunk-7ITUZTFH.js} +1 -1
- package/Build/Workers/{chunk-IP7F2MVW.js → chunk-ARVZCY6X.js} +7 -7
- package/Build/Workers/{chunk-EYZFEJX3.js → chunk-B2UQN3DH.js} +6 -6
- package/Build/Workers/{chunk-WE4KF4AM.js → chunk-B2Y4ZS6X.js} +9 -9
- package/Build/Workers/{chunk-DWIKWWEE.js → chunk-BD2TPFGC.js} +5 -5
- package/Build/Workers/{chunk-5ICYLS6B.js → chunk-CHX2K5AC.js} +10 -10
- package/Build/Workers/{chunk-NQDKNE7V.js → chunk-CJGVEABL.js} +13 -13
- package/Build/Workers/{chunk-B34JXFHF.js → chunk-DYJHEP3B.js} +5 -5
- package/Build/Workers/{chunk-J7BMSSY7.js → chunk-E3H7AVMK.js} +13 -13
- package/Build/Workers/{chunk-TOHDFUJM.js → chunk-EZNAJPP5.js} +4 -4
- package/Build/Workers/{chunk-K62EHZFT.js → chunk-F7ZI463G.js} +15 -15
- package/Build/Workers/{chunk-EJ5DT5BP.js → chunk-FMZ5CX6V.js} +1 -1
- package/Build/Workers/{chunk-OARMSJUU.js → chunk-FRAWHNSR.js} +2 -2
- package/Build/Workers/{chunk-S3UM4OKP.js → chunk-GGV2XJHE.js} +7 -7
- package/Build/Workers/{chunk-SAKQO5NX.js → chunk-GK4QU6QI.js} +2 -2
- package/Build/Workers/{chunk-LFUFGHL3.js → chunk-HYPB7FAV.js} +10 -10
- package/Build/Workers/{chunk-3SCCWLZS.js → chunk-I4HO2ED2.js} +9 -9
- package/Build/Workers/{chunk-K6SQV4IS.js → chunk-IGINOLDX.js} +6 -6
- package/Build/Workers/{chunk-IXNXKVOB.js → chunk-ISQSYLZY.js} +4 -4
- package/Build/Workers/{chunk-PM76TX2X.js → chunk-JZAMRL5I.js} +6 -6
- package/Build/Workers/{chunk-CBE4HRBH.js → chunk-K5G2WELR.js} +7 -7
- package/Build/Workers/{chunk-EHGQQA7C.js → chunk-L5SO4Y5V.js} +1 -1
- package/Build/Workers/{chunk-M2AA2ARJ.js → chunk-LCMJQVIF.js} +11 -11
- package/Build/Workers/{chunk-HI73PIPQ.js → chunk-MWJW37I7.js} +2 -2
- package/Build/Workers/{chunk-WAJNX74N.js → chunk-NAGMYRDW.js} +27 -20
- package/Build/Workers/{chunk-WUIDEXAN.js → chunk-OYO6TKMU.js} +7 -7
- package/Build/Workers/{chunk-YVGU235V.js → chunk-PUTA3AE2.js} +4 -4
- package/Build/Workers/{chunk-ZWSWJYJP.js → chunk-Q5BHMNKU.js} +13 -13
- package/Build/Workers/{chunk-LQT2ZK7D.js → chunk-QTEX3Y4V.js} +17 -17
- package/Build/Workers/{chunk-UBAHTE4Q.js → chunk-QZKN2RXM.js} +1 -1
- package/Build/Workers/{chunk-T34EOLFR.js → chunk-RO2Z3LCR.js} +14 -14
- package/Build/Workers/{chunk-PTFIVVLX.js → chunk-RRN6LRDX.js} +12 -12
- package/Build/Workers/{chunk-B6IJY6AN.js → chunk-SLIA3GQP.js} +7 -7
- package/Build/Workers/{chunk-GIOZHX7U.js → chunk-TFCOEX3W.js} +2 -2
- package/Build/Workers/{chunk-KRVALCCI.js → chunk-TU6ZXHVU.js} +5 -5
- package/Build/Workers/{chunk-54I6VSRP.js → chunk-VJ2PDF64.js} +6 -6
- package/Build/Workers/{chunk-BMFWWTD7.js → chunk-VMVPONIV.js} +5 -5
- package/Build/Workers/{chunk-CNPP6TQ2.js → chunk-WPXU45PH.js} +4 -4
- package/Build/Workers/{chunk-2ONAV62A.js → chunk-XDHM4G3P.js} +7 -7
- package/Build/Workers/{chunk-KO232FLP.js → chunk-XED3RXKO.js} +2 -2
- package/Build/Workers/{chunk-5I3LPAS7.js → chunk-YNYCGTQH.js} +5 -5
- package/Build/Workers/{chunk-THDHWSEJ.js → chunk-Z4SI54EB.js} +4 -4
- package/Build/Workers/{chunk-R2KGFZBA.js → chunk-ZVDLC3T4.js} +13 -13
- package/Build/Workers/combineGeometry.js +22 -22
- package/Build/Workers/createBoxGeometry.js +16 -16
- package/Build/Workers/createBoxOutlineGeometry.js +14 -14
- package/Build/Workers/createCircleGeometry.js +24 -24
- package/Build/Workers/createCircleOutlineGeometry.js +17 -17
- package/Build/Workers/createCoplanarPolygonGeometry.js +31 -31
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +29 -29
- package/Build/Workers/createCorridorGeometry.js +27 -27
- package/Build/Workers/createCorridorOutlineGeometry.js +26 -26
- package/Build/Workers/createCylinderGeometry.js +18 -18
- package/Build/Workers/createCylinderOutlineGeometry.js +16 -16
- package/Build/Workers/createEllipseGeometry.js +24 -24
- package/Build/Workers/createEllipseOutlineGeometry.js +17 -17
- package/Build/Workers/createEllipsoidGeometry.js +17 -17
- package/Build/Workers/createEllipsoidOutlineGeometry.js +16 -16
- package/Build/Workers/createFrustumGeometry.js +16 -16
- package/Build/Workers/createFrustumOutlineGeometry.js +16 -16
- package/Build/Workers/createGeometry.js +22 -22
- package/Build/Workers/createGroundPolylineGeometry.js +20 -20
- package/Build/Workers/createPlaneGeometry.js +14 -14
- package/Build/Workers/createPlaneOutlineGeometry.js +13 -13
- package/Build/Workers/createPolygonGeometry.js +30 -30
- package/Build/Workers/createPolygonOutlineGeometry.js +28 -28
- package/Build/Workers/createPolylineGeometry.js +23 -23
- package/Build/Workers/createPolylineVolumeGeometry.js +29 -29
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +25 -25
- package/Build/Workers/createRectangleGeometry.js +25 -25
- package/Build/Workers/createRectangleOutlineGeometry.js +18 -18
- package/Build/Workers/createSimplePolylineGeometry.js +21 -21
- package/Build/Workers/createSphereGeometry.js +17 -17
- package/Build/Workers/createSphereOutlineGeometry.js +16 -16
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +13 -13
- package/Build/Workers/createVectorTileGeometries.js +22 -22
- package/Build/Workers/createVectorTilePoints.js +12 -12
- package/Build/Workers/createVectorTilePolygons.js +20 -20
- package/Build/Workers/createVectorTilePolylines.js +13 -13
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +20 -20
- package/Build/Workers/createVerticesFromHeightmap.js +20 -20
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +17 -17
- package/Build/Workers/createWallGeometry.js +22 -22
- package/Build/Workers/createWallOutlineGeometry.js +21 -21
- package/Build/Workers/decodeDraco.js +15 -14
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/Build/Workers/decodeI3S.js +10 -10
- package/Build/Workers/transcodeKTX2.js +50 -43
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +20 -20
- package/Source/Core/Color.js +3 -3
- package/Source/Core/Credit.js +3 -3
- package/Source/Core/DistanceDisplayCondition.js +3 -3
- package/Source/Core/EllipsoidRhumbLine.js +1 -1
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/OrientedBoundingBox.js +2 -2
- package/Source/Core/PolygonGeometryLibrary.js +26 -4
- package/Source/Core/Spherical.js +3 -3
- package/Source/Core/TexturePacker.js +166 -0
- package/Source/Core/writeTextToCanvas.js +0 -1
- package/Source/DataSources/BillboardVisualizer.js +3 -3
- package/Source/DataSources/BoundingSphereState.js +3 -3
- package/Source/DataSources/DataSourceClock.js +1 -1
- package/Source/DataSources/DataSourceDisplay.js +5 -2
- package/Source/DataSources/EntityCluster.js +44 -19
- package/Source/Renderer/AutomaticUniforms.js +2 -2
- package/Source/Renderer/Context.js +0 -4
- package/Source/Renderer/Texture.js +6 -5
- package/Source/Renderer/TextureAtlas.js +802 -0
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Billboard.js +87 -142
- package/Source/Scene/BillboardCollection.js +132 -202
- package/Source/Scene/BillboardLoadState.js +44 -0
- package/Source/Scene/BillboardTexture.js +348 -0
- package/Source/Scene/Camera.js +2 -2
- package/Source/Scene/Cesium3DTile.js +56 -28
- package/Source/Scene/Cesium3DTilesVoxelProvider.js +403 -132
- package/Source/Scene/Cesium3DTilesetStatistics.js +0 -1
- package/Source/Scene/ClippingPolygon.js +2 -2
- package/Source/Scene/Expression.js +1 -0
- package/Source/Scene/GltfDracoLoader.js +45 -0
- package/Source/Scene/GltfIndexBufferLoader.js +5 -0
- package/Source/Scene/GltfLoader.js +22 -9
- package/Source/Scene/GltfVertexBufferLoader.js +13 -0
- package/Source/Scene/ITwinData.js +47 -1
- package/Source/Scene/ImageryLayer.js +1 -1
- package/Source/Scene/ImplicitSubtree.js +2 -0
- package/Source/Scene/KeyframeNode.js +16 -2
- package/Source/Scene/Label.js +1 -1
- package/Source/Scene/LabelCollection.js +212 -193
- package/Source/Scene/Megatexture.js +145 -81
- package/Source/Scene/Model/CustomShader.js +0 -2
- package/Source/Scene/Model/Model.js +1 -1
- package/Source/Scene/Model/ModelUtility.js +5 -1
- package/Source/Scene/Multiple3DTileContent.js +21 -8
- package/Source/Scene/PointPrimitive.js +1 -1
- package/Source/Scene/ResourceCache.js +17 -1
- package/Source/Scene/Scene.js +39 -15
- package/Source/Scene/ScreenSpaceCameraController.js +0 -8
- package/Source/Scene/SpatialNode.js +4 -11
- package/Source/Scene/Vector3DTilePoints.js +2 -5
- package/Source/Scene/VoxelBoxShape.js +12 -5
- package/Source/Scene/VoxelCell.js +6 -5
- package/Source/Scene/VoxelContent.js +171 -107
- package/Source/Scene/VoxelCylinderShape.js +65 -58
- package/Source/Scene/VoxelEllipsoidShape.js +15 -5
- package/Source/Scene/VoxelMetadataOrder.js +12 -0
- package/Source/Scene/VoxelPrimitive.js +245 -53
- package/Source/Scene/VoxelProvider.js +44 -29
- package/Source/Scene/VoxelRenderResources.js +30 -7
- package/Source/Scene/VoxelShape.js +10 -3
- package/Source/Scene/VoxelTraversal.js +326 -166
- package/Source/Scene/WebMapTileServiceImageryProvider.js +2 -2
- package/Source/Scene/createGooglePhotorealistic3DTileset.js +5 -8
- package/Source/Scene/processVoxelProperties.js +3 -0
- package/Source/Shaders/GlobeFS.glsl +10 -1
- package/Source/Shaders/GlobeFS.js +10 -1
- package/Source/Shaders/PolylineCommon.glsl +1 -1
- package/Source/Shaders/PolylineCommon.js +1 -1
- package/Source/Shaders/Voxels/Megatexture.glsl +4 -16
- package/Source/Shaders/Voxels/Megatexture.js +4 -16
- package/Source/Shaders/Voxels/Octree.glsl +44 -7
- package/Source/Shaders/Voxels/Octree.js +44 -7
- package/Source/Shaders/Voxels/VoxelFS.glsl +9 -15
- package/Source/Shaders/Voxels/VoxelFS.js +9 -15
- package/Source/Shaders/Voxels/convertUvToCylinder.glsl +15 -15
- package/Source/Shaders/Voxels/convertUvToCylinder.js +15 -15
- package/Source/Widget/CesiumWidget.js +16 -10
- package/Source/Workers/decodeDraco.js +4 -4
- package/index.d.ts +321 -110
- package/index.js +209 -205
- package/package.json +2 -2
- package/Source/Scene/TextureAtlas.js +0 -558
|
@@ -1,27 +1,50 @@
|
|
|
1
1
|
import Cartesian3 from "../Core/Cartesian3.js";
|
|
2
|
+
import Cesium3DTilesetMetadata from "./Cesium3DTilesetMetadata.js";
|
|
2
3
|
import Check from "../Core/Check.js";
|
|
3
4
|
import defaultValue from "../Core/defaultValue.js";
|
|
4
5
|
import defined from "../Core/defined.js";
|
|
5
6
|
import Ellipsoid from "../Core/Ellipsoid.js";
|
|
6
|
-
import Matrix4 from "../Core/Matrix4.js";
|
|
7
|
-
import OrientedBoundingBox from "../Core/OrientedBoundingBox.js";
|
|
8
|
-
import Resource from "../Core/Resource.js";
|
|
9
|
-
import RuntimeError from "../Core/RuntimeError.js";
|
|
10
|
-
import Cesium3DTilesetMetadata from "./Cesium3DTilesetMetadata.js";
|
|
11
7
|
import hasExtension from "./hasExtension.js";
|
|
12
8
|
import ImplicitSubtree from "./ImplicitSubtree.js";
|
|
13
9
|
import ImplicitSubtreeCache from "./ImplicitSubtreeCache.js";
|
|
14
10
|
import ImplicitTileCoordinates from "./ImplicitTileCoordinates.js";
|
|
15
11
|
import ImplicitTileset from "./ImplicitTileset.js";
|
|
12
|
+
import Matrix4 from "../Core/Matrix4.js";
|
|
16
13
|
import MetadataSemantic from "./MetadataSemantic.js";
|
|
17
14
|
import MetadataType from "./MetadataType.js";
|
|
15
|
+
import OrientedBoundingBox from "../Core/OrientedBoundingBox.js";
|
|
18
16
|
import preprocess3DTileContent from "./preprocess3DTileContent.js";
|
|
17
|
+
import Resource from "../Core/Resource.js";
|
|
19
18
|
import ResourceCache from "./ResourceCache.js";
|
|
19
|
+
import RuntimeError from "../Core/RuntimeError.js";
|
|
20
20
|
import VoxelBoxShape from "./VoxelBoxShape.js";
|
|
21
21
|
import VoxelContent from "./VoxelContent.js";
|
|
22
22
|
import VoxelCylinderShape from "./VoxelCylinderShape.js";
|
|
23
|
+
import VoxelMetadataOrder from "./VoxelMetadataOrder.js";
|
|
23
24
|
import VoxelShapeType from "./VoxelShapeType.js";
|
|
24
25
|
|
|
26
|
+
/**
|
|
27
|
+
* @typedef {Object} Cesium3DTilesVoxelProvider.ConstructorOptions
|
|
28
|
+
*
|
|
29
|
+
* Initialization options for the Cesium3DTilesVoxelProvider constructor
|
|
30
|
+
*
|
|
31
|
+
* @property {string} className The class in the tileset schema describing voxel metadata.
|
|
32
|
+
* @property {string[]} names The metadata names.
|
|
33
|
+
* @property {MetadataType[]} types The metadata types.
|
|
34
|
+
* @property {MetadataComponentType[]} componentTypes The metadata component types.
|
|
35
|
+
* @property {VoxelShapeType} shape The {@link VoxelShapeType}.
|
|
36
|
+
* @property {Cartesian3} dimensions The number of voxels per dimension of a tile. This is the same for all tiles in the dataset.
|
|
37
|
+
* @property {Cartesian3} [paddingBefore=Cartesian3.ZERO] The number of padding voxels before the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
|
|
38
|
+
* @property {Cartesian3} [paddingAfter=Cartesian3.ZERO] The number of padding voxels after the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
|
|
39
|
+
* @property {Matrix4} [globalTransform=Matrix4.IDENTITY] A transform from local space to global space.
|
|
40
|
+
* @property {Matrix4} [shapeTransform=Matrix4.IDENTITY] A transform from shape space to local space.
|
|
41
|
+
* @property {Cartesian3} [minBounds] The minimum bounds.
|
|
42
|
+
* @property {Cartesian3} [maxBounds] The maximum bounds.
|
|
43
|
+
* @property {number[][]} [minimumValues] The metadata minimum values.
|
|
44
|
+
* @property {number[][]} [maximumValues] The metadata maximum values.
|
|
45
|
+
* @property {number} [maximumTileCount] The maximum number of tiles that exist for this provider. This value is used as a hint to the voxel renderer to allocate an appropriate amount of GPU memory. If this value is not known it can be undefined.
|
|
46
|
+
*/
|
|
47
|
+
|
|
25
48
|
/**
|
|
26
49
|
* A {@link VoxelProvider} that fetches voxel data from a 3D Tiles tileset.
|
|
27
50
|
* <p>
|
|
@@ -35,7 +58,7 @@ import VoxelShapeType from "./VoxelShapeType.js";
|
|
|
35
58
|
* @constructor
|
|
36
59
|
* @augments VoxelProvider
|
|
37
60
|
*
|
|
38
|
-
* @param {
|
|
61
|
+
* @param {Cesium3DTilesVoxelProvider.ConstructorOptions} options An object describing initialization options
|
|
39
62
|
*
|
|
40
63
|
* @see Cesium3DTilesVoxelProvider.fromUrl
|
|
41
64
|
* @see VoxelProvider
|
|
@@ -47,54 +70,287 @@ import VoxelShapeType from "./VoxelShapeType.js";
|
|
|
47
70
|
function Cesium3DTilesVoxelProvider(options) {
|
|
48
71
|
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
|
|
49
72
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
/** @inheritdoc */
|
|
69
|
-
this.paddingBefore = undefined;
|
|
70
|
-
|
|
71
|
-
/** @inheritdoc */
|
|
72
|
-
this.paddingAfter = undefined;
|
|
73
|
+
const {
|
|
74
|
+
className,
|
|
75
|
+
names,
|
|
76
|
+
types,
|
|
77
|
+
componentTypes,
|
|
78
|
+
shape,
|
|
79
|
+
dimensions,
|
|
80
|
+
paddingBefore = Cartesian3.ZERO.clone(),
|
|
81
|
+
paddingAfter = Cartesian3.ZERO.clone(),
|
|
82
|
+
globalTransform = Matrix4.IDENTITY.clone(),
|
|
83
|
+
shapeTransform = Matrix4.IDENTITY.clone(),
|
|
84
|
+
minBounds,
|
|
85
|
+
maxBounds,
|
|
86
|
+
minimumValues,
|
|
87
|
+
maximumValues,
|
|
88
|
+
maximumTileCount,
|
|
89
|
+
} = options;
|
|
73
90
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
/** @inheritdoc */
|
|
84
|
-
this.minimumValues = undefined;
|
|
85
|
-
|
|
86
|
-
/** @inheritdoc */
|
|
87
|
-
this.maximumValues = undefined;
|
|
88
|
-
|
|
89
|
-
/** @inheritdoc */
|
|
90
|
-
this.maximumTileCount = undefined;
|
|
91
|
+
//>>includeStart('debug', pragmas.debug);
|
|
92
|
+
Check.typeOf.string("className", className);
|
|
93
|
+
Check.typeOf.object("names", names);
|
|
94
|
+
Check.typeOf.object("types", types);
|
|
95
|
+
Check.typeOf.object("componentTypes", componentTypes);
|
|
96
|
+
Check.typeOf.string("shape", shape);
|
|
97
|
+
Check.typeOf.object("dimensions", dimensions);
|
|
98
|
+
//>>includeEnd('debug');
|
|
91
99
|
|
|
100
|
+
this._shapeTransform = shapeTransform;
|
|
101
|
+
this._globalTransform = globalTransform;
|
|
102
|
+
this._shape = shape;
|
|
103
|
+
this._minBounds = minBounds;
|
|
104
|
+
this._maxBounds = maxBounds;
|
|
105
|
+
this._dimensions = dimensions;
|
|
106
|
+
this._paddingBefore = paddingBefore;
|
|
107
|
+
this._paddingAfter = paddingAfter;
|
|
108
|
+
this._className = className;
|
|
109
|
+
this._names = names;
|
|
110
|
+
this._types = types;
|
|
111
|
+
this._componentTypes = componentTypes;
|
|
112
|
+
this._metadataOrder = VoxelMetadataOrder.GLTF;
|
|
113
|
+
this._minimumValues = minimumValues;
|
|
114
|
+
this._maximumValues = maximumValues;
|
|
115
|
+
this._maximumTileCount = maximumTileCount;
|
|
116
|
+
this._availableLevels = undefined;
|
|
92
117
|
this._implicitTileset = undefined;
|
|
93
118
|
this._subtreeCache = new ImplicitSubtreeCache();
|
|
94
119
|
}
|
|
95
120
|
|
|
121
|
+
Object.defineProperties(Cesium3DTilesVoxelProvider.prototype, {
|
|
122
|
+
/**
|
|
123
|
+
* A transform from local space to global space.
|
|
124
|
+
*
|
|
125
|
+
* @memberof Cesium3DTilesVoxelProvider.prototype
|
|
126
|
+
* @type {Matrix4}
|
|
127
|
+
* @default Matrix4.IDENTITY
|
|
128
|
+
* @readonly
|
|
129
|
+
*/
|
|
130
|
+
globalTransform: {
|
|
131
|
+
get: function () {
|
|
132
|
+
return this._globalTransform;
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* A transform from shape space to local space.
|
|
138
|
+
*
|
|
139
|
+
* @memberof Cesium3DTilesVoxelProvider.prototype
|
|
140
|
+
* @type {Matrix4}
|
|
141
|
+
* @default Matrix4.IDENTITY
|
|
142
|
+
* @readonly
|
|
143
|
+
*/
|
|
144
|
+
shapeTransform: {
|
|
145
|
+
get: function () {
|
|
146
|
+
return this._shapeTransform;
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Gets the {@link VoxelShapeType}
|
|
152
|
+
*
|
|
153
|
+
* @memberof Cesium3DTilesVoxelProvider.prototype
|
|
154
|
+
* @type {VoxelShapeType}
|
|
155
|
+
* @readonly
|
|
156
|
+
*/
|
|
157
|
+
shape: {
|
|
158
|
+
get: function () {
|
|
159
|
+
return this._shape;
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Gets the minimum bounds.
|
|
165
|
+
* If undefined, the shape's default minimum bounds will be used instead.
|
|
166
|
+
*
|
|
167
|
+
* @memberof Cesium3DTilesVoxelProvider.prototype
|
|
168
|
+
* @type {Cartesian3|undefined}
|
|
169
|
+
* @readonly
|
|
170
|
+
*/
|
|
171
|
+
minBounds: {
|
|
172
|
+
get: function () {
|
|
173
|
+
return this._minBounds;
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Gets the maximum bounds.
|
|
179
|
+
* If undefined, the shape's default maximum bounds will be used instead.
|
|
180
|
+
*
|
|
181
|
+
* @memberof Cesium3DTilesVoxelProvider.prototype
|
|
182
|
+
* @type {Cartesian3|undefined}
|
|
183
|
+
* @readonly
|
|
184
|
+
*/
|
|
185
|
+
maxBounds: {
|
|
186
|
+
get: function () {
|
|
187
|
+
return this._maxBounds;
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Gets the number of voxels per dimension of a tile. This is the same for all tiles in the dataset.
|
|
193
|
+
*
|
|
194
|
+
* @memberof Cesium3DTilesVoxelProvider.prototype
|
|
195
|
+
* @type {Cartesian3}
|
|
196
|
+
* @readonly
|
|
197
|
+
*/
|
|
198
|
+
dimensions: {
|
|
199
|
+
get: function () {
|
|
200
|
+
return this._dimensions;
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Gets the number of padding voxels before the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
|
|
206
|
+
*
|
|
207
|
+
* @memberof Cesium3DTilesVoxelProvider.prototype
|
|
208
|
+
* @type {Cartesian3}
|
|
209
|
+
* @default Cartesian3.ZERO
|
|
210
|
+
* @readonly
|
|
211
|
+
*/
|
|
212
|
+
paddingBefore: {
|
|
213
|
+
get: function () {
|
|
214
|
+
return this._paddingBefore;
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Gets the number of padding voxels after the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
|
|
220
|
+
*
|
|
221
|
+
* @memberof Cesium3DTilesVoxelProvider.prototype
|
|
222
|
+
* @type {Cartesian3}
|
|
223
|
+
* @default Cartesian3.ZERO
|
|
224
|
+
* @readonly
|
|
225
|
+
*/
|
|
226
|
+
paddingAfter: {
|
|
227
|
+
get: function () {
|
|
228
|
+
return this._paddingAfter;
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* The metadata class for this tileset.
|
|
234
|
+
*
|
|
235
|
+
* @memberof Cesium3DTilesVoxelProvider.prototype
|
|
236
|
+
* @type {string}
|
|
237
|
+
* @readonly
|
|
238
|
+
*/
|
|
239
|
+
className: {
|
|
240
|
+
get: function () {
|
|
241
|
+
return this._className;
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Gets the metadata names.
|
|
247
|
+
*
|
|
248
|
+
* @memberof Cesium3DTilesVoxelProvider.prototype
|
|
249
|
+
* @type {string[]}
|
|
250
|
+
* @readonly
|
|
251
|
+
*/
|
|
252
|
+
names: {
|
|
253
|
+
get: function () {
|
|
254
|
+
return this._names;
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Gets the metadata types.
|
|
260
|
+
*
|
|
261
|
+
* @memberof Cesium3DTilesVoxelProvider.prototype
|
|
262
|
+
* @type {MetadataType[]}
|
|
263
|
+
* @readonly
|
|
264
|
+
*/
|
|
265
|
+
types: {
|
|
266
|
+
get: function () {
|
|
267
|
+
return this._types;
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Gets the metadata component types.
|
|
273
|
+
*
|
|
274
|
+
* @memberof Cesium3DTilesVoxelProvider.prototype
|
|
275
|
+
* @type {MetadataComponentType[]}
|
|
276
|
+
* @readonly
|
|
277
|
+
*/
|
|
278
|
+
componentTypes: {
|
|
279
|
+
get: function () {
|
|
280
|
+
return this._componentTypes;
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Gets the ordering of the metadata in the buffers.
|
|
286
|
+
*
|
|
287
|
+
* @memberof Cesium3DTilesVoxelProvider.prototype
|
|
288
|
+
* @type {VoxelMetadataOrder}
|
|
289
|
+
* @readonly
|
|
290
|
+
*/
|
|
291
|
+
metadataOrder: {
|
|
292
|
+
get: function () {
|
|
293
|
+
return this._metadataOrder;
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Gets the metadata minimum values.
|
|
299
|
+
*
|
|
300
|
+
* @memberof Cesium3DTilesVoxelProvider.prototype
|
|
301
|
+
* @type {number[][]|undefined}
|
|
302
|
+
* @readonly
|
|
303
|
+
*/
|
|
304
|
+
minimumValues: {
|
|
305
|
+
get: function () {
|
|
306
|
+
return this._minimumValues;
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Gets the metadata maximum values.
|
|
312
|
+
*
|
|
313
|
+
* @memberof Cesium3DTilesVoxelProvider.prototype
|
|
314
|
+
* @type {number[][]|undefined}
|
|
315
|
+
* @readonly
|
|
316
|
+
*/
|
|
317
|
+
maximumValues: {
|
|
318
|
+
get: function () {
|
|
319
|
+
return this._maximumValues;
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* The maximum number of tiles that exist for this provider.
|
|
325
|
+
* This value is used as a hint to the voxel renderer to allocate an appropriate amount of GPU memory.
|
|
326
|
+
* If this value is not known it can be undefined.
|
|
327
|
+
*
|
|
328
|
+
* @memberof Cesium3DTilesVoxelProvider.prototype
|
|
329
|
+
* @type {number|undefined}
|
|
330
|
+
* @readonly
|
|
331
|
+
*/
|
|
332
|
+
maximumTileCount: {
|
|
333
|
+
get: function () {
|
|
334
|
+
return this._maximumTileCount;
|
|
335
|
+
},
|
|
336
|
+
},
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* The number of levels of detail containing available tiles in the tileset.
|
|
340
|
+
*
|
|
341
|
+
* @memberof Cesium3DTilesVoxelProvider.prototype
|
|
342
|
+
* @type {number|undefined}
|
|
343
|
+
* @readonly
|
|
344
|
+
*/
|
|
345
|
+
availableLevels: {
|
|
346
|
+
get: function () {
|
|
347
|
+
return this._availableLevels;
|
|
348
|
+
},
|
|
349
|
+
},
|
|
350
|
+
});
|
|
351
|
+
|
|
96
352
|
/**
|
|
97
|
-
* Creates a {@link
|
|
353
|
+
* Creates a {@link Cesium3DTilesVoxelProvider} that fetches voxel data from a 3D Tiles tileset.
|
|
98
354
|
*
|
|
99
355
|
* @param {Resource|string} url The URL to a tileset JSON file
|
|
100
356
|
* @returns {Promise<Cesium3DTilesVoxelProvider>} The created provider
|
|
@@ -104,6 +360,22 @@ function Cesium3DTilesVoxelProvider(options) {
|
|
|
104
360
|
* @exception {RuntimeException} Root tile must have implicit tiling
|
|
105
361
|
* @exception {RuntimeException} Tileset must have a metadata schema
|
|
106
362
|
* @exception {RuntimeException} Only box, region and 3DTILES_bounding_volume_cylinder are supported in Cesium3DTilesVoxelProvider
|
|
363
|
+
*
|
|
364
|
+
* @example
|
|
365
|
+
* try {
|
|
366
|
+
* const voxelProvider = await Cesium3DTilesVoxelProvider.fromUrl(
|
|
367
|
+
* "http://localhost:8002/tilesets/voxel/tileset.json"
|
|
368
|
+
* );
|
|
369
|
+
* const voxelPrimitive = new VoxelPrimitive({
|
|
370
|
+
* provider: voxelProvider,
|
|
371
|
+
* customShader: customShader,
|
|
372
|
+
* });
|
|
373
|
+
* scene.primitives.add(voxelPrimitive);
|
|
374
|
+
* } catch (error) {
|
|
375
|
+
* console.error(`Error creating voxel primitive: ${error}`);
|
|
376
|
+
* }
|
|
377
|
+
*
|
|
378
|
+
* @see {@link VoxelPrimitive}
|
|
107
379
|
*/
|
|
108
380
|
Cesium3DTilesVoxelProvider.fromUrl = async function (url) {
|
|
109
381
|
//>>includeStart('debug', pragmas.debug);
|
|
@@ -118,49 +390,40 @@ Cesium3DTilesVoxelProvider.fromUrl = async function (url) {
|
|
|
118
390
|
const schemaLoader = getMetadataSchemaLoader(tilesetJson, resource);
|
|
119
391
|
await schemaLoader.load();
|
|
120
392
|
|
|
121
|
-
const root = tilesetJson
|
|
122
|
-
const voxel = root.content.extensions["3DTILES_content_voxels"];
|
|
123
|
-
const className = voxel.class;
|
|
393
|
+
const { root } = tilesetJson;
|
|
124
394
|
|
|
125
395
|
const metadataJson = hasExtension(tilesetJson, "3DTILES_metadata")
|
|
126
396
|
? tilesetJson.extensions["3DTILES_metadata"]
|
|
127
397
|
: tilesetJson;
|
|
128
398
|
|
|
129
|
-
const
|
|
130
|
-
const metadata = new Cesium3DTilesetMetadata({
|
|
399
|
+
const tilesetMetadata = new Cesium3DTilesetMetadata({
|
|
131
400
|
metadataJson: metadataJson,
|
|
132
|
-
schema:
|
|
401
|
+
schema: schemaLoader.schema,
|
|
133
402
|
});
|
|
134
403
|
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
addAttributeInfo(provider, metadata, className);
|
|
138
|
-
|
|
139
|
-
const implicitTileset = new ImplicitTileset(resource, root, metadataSchema);
|
|
140
|
-
|
|
141
|
-
const { shape, minBounds, maxBounds, shapeTransform, globalTransform } =
|
|
142
|
-
getShape(root);
|
|
404
|
+
const voxel = root.content.extensions["3DTILES_content_voxels"];
|
|
405
|
+
const className = voxel.class;
|
|
143
406
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
provider.maxBounds = maxBounds;
|
|
147
|
-
provider.dimensions = Cartesian3.unpack(voxel.dimensions);
|
|
148
|
-
provider.shapeTransform = shapeTransform;
|
|
149
|
-
provider.globalTransform = globalTransform;
|
|
150
|
-
provider.maximumTileCount = getTileCount(metadata);
|
|
407
|
+
const providerOptions = getAttributeInfo(tilesetMetadata, className);
|
|
408
|
+
Object.assign(providerOptions, getShape(root));
|
|
151
409
|
|
|
152
|
-
|
|
153
|
-
|
|
410
|
+
providerOptions.dimensions = Cartesian3.unpack(voxel.dimensions);
|
|
411
|
+
providerOptions.maximumTileCount = getTileCount(tilesetMetadata);
|
|
154
412
|
|
|
155
413
|
if (defined(voxel.padding)) {
|
|
156
|
-
paddingBefore = Cartesian3.unpack(voxel.padding.before);
|
|
157
|
-
paddingAfter = Cartesian3.unpack(voxel.padding.after);
|
|
414
|
+
providerOptions.paddingBefore = Cartesian3.unpack(voxel.padding.before);
|
|
415
|
+
providerOptions.paddingAfter = Cartesian3.unpack(voxel.padding.after);
|
|
158
416
|
}
|
|
159
417
|
|
|
160
|
-
provider
|
|
161
|
-
provider.paddingAfter = paddingAfter;
|
|
418
|
+
const provider = new Cesium3DTilesVoxelProvider(providerOptions);
|
|
162
419
|
|
|
420
|
+
const implicitTileset = new ImplicitTileset(
|
|
421
|
+
resource,
|
|
422
|
+
root,
|
|
423
|
+
schemaLoader.schema,
|
|
424
|
+
);
|
|
163
425
|
provider._implicitTileset = implicitTileset;
|
|
426
|
+
provider._availableLevels = implicitTileset.availableLevels;
|
|
164
427
|
|
|
165
428
|
ResourceCache.unload(schemaLoader);
|
|
166
429
|
|
|
@@ -298,7 +561,7 @@ function getMetadataSchemaLoader(tilesetJson, resource) {
|
|
|
298
561
|
});
|
|
299
562
|
}
|
|
300
563
|
|
|
301
|
-
function
|
|
564
|
+
function getAttributeInfo(metadata, className) {
|
|
302
565
|
const { schema, statistics } = metadata;
|
|
303
566
|
const classStatistics = statistics?.classes[className];
|
|
304
567
|
const properties = schema.classes[className].properties;
|
|
@@ -314,16 +577,22 @@ function addAttributeInfo(provider, metadata, className) {
|
|
|
314
577
|
return { id, type, componentType, minValue, maxValue };
|
|
315
578
|
});
|
|
316
579
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
580
|
+
const names = propertyInfo.map((info) => info.id);
|
|
581
|
+
const types = propertyInfo.map((info) => info.type);
|
|
582
|
+
const componentTypes = propertyInfo.map((info) => info.componentType);
|
|
320
583
|
|
|
321
584
|
const minimumValues = propertyInfo.map((info) => info.minValue);
|
|
322
585
|
const maximumValues = propertyInfo.map((info) => info.maxValue);
|
|
323
586
|
const hasMinimumValues = minimumValues.some(defined);
|
|
324
587
|
|
|
325
|
-
|
|
326
|
-
|
|
588
|
+
return {
|
|
589
|
+
className,
|
|
590
|
+
names,
|
|
591
|
+
types,
|
|
592
|
+
componentTypes,
|
|
593
|
+
minimumValues: hasMinimumValues ? minimumValues : undefined,
|
|
594
|
+
maximumValues: hasMinimumValues ? maximumValues : undefined,
|
|
595
|
+
};
|
|
327
596
|
}
|
|
328
597
|
|
|
329
598
|
function copyArray(values, length) {
|
|
@@ -339,29 +608,14 @@ function copyArray(values, length) {
|
|
|
339
608
|
return Array.from({ length }, (v, i) => valuesArray[i]);
|
|
340
609
|
}
|
|
341
610
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
const arrayBuffer = await voxelResource.fetchArrayBuffer();
|
|
352
|
-
const preprocessed = preprocess3DTileContent(arrayBuffer);
|
|
353
|
-
|
|
354
|
-
const voxelContent = await VoxelContent.fromJson(
|
|
355
|
-
voxelResource,
|
|
356
|
-
preprocessed.jsonPayload,
|
|
357
|
-
preprocessed.binaryPayload,
|
|
358
|
-
implicitTileset.metadataSchema,
|
|
359
|
-
);
|
|
360
|
-
|
|
361
|
-
return voxelContent;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
async function getSubtreePromise(provider, subtreeCoord) {
|
|
611
|
+
/**
|
|
612
|
+
* Get the subtree at a given subtree coordinate
|
|
613
|
+
* @param {VoxelProvider} provider The voxel provider
|
|
614
|
+
* @param {ImplicitTileCoordinates} subtreeCoord The coordinate at which to retrieve the subtree
|
|
615
|
+
* @returns {Promise<ImplicitSubtree>} The subtree at the given coordinate
|
|
616
|
+
* @private
|
|
617
|
+
*/
|
|
618
|
+
async function getSubtree(provider, subtreeCoord) {
|
|
365
619
|
const implicitTileset = provider._implicitTileset;
|
|
366
620
|
const subtreeCache = provider._subtreeCache;
|
|
367
621
|
|
|
@@ -402,27 +656,38 @@ async function getSubtreePromise(provider, subtreeCoord) {
|
|
|
402
656
|
return subtree;
|
|
403
657
|
}
|
|
404
658
|
|
|
405
|
-
/**
|
|
406
|
-
|
|
659
|
+
/**
|
|
660
|
+
* Requests the data for a given tile.
|
|
661
|
+
*
|
|
662
|
+
* @param {object} [options] Object with the following properties:
|
|
663
|
+
* @param {number} [options.tileLevel=0] The tile's level.
|
|
664
|
+
* @param {number} [options.tileX=0] The tile's X coordinate.
|
|
665
|
+
* @param {number} [options.tileY=0] The tile's Y coordinate.
|
|
666
|
+
* @param {number} [options.tileZ=0] The tile's Z coordinate.
|
|
667
|
+
* @privateparam {number} [options.keyframe=0] The requested keyframe.
|
|
668
|
+
* @returns {Promise<VoxelContent>|undefined} A promise resolving to a VoxelContent containing the data for the tile, or undefined if the request could not be scheduled this frame.
|
|
669
|
+
*/
|
|
670
|
+
Cesium3DTilesVoxelProvider.prototype.requestData = async function (options) {
|
|
407
671
|
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
|
|
408
|
-
const
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
672
|
+
const {
|
|
673
|
+
tileLevel = 0,
|
|
674
|
+
tileX = 0,
|
|
675
|
+
tileY = 0,
|
|
676
|
+
tileZ = 0,
|
|
677
|
+
keyframe = 0,
|
|
678
|
+
} = options;
|
|
413
679
|
|
|
414
|
-
// 3D Tiles currently doesn't support time-dynamic data.
|
|
415
680
|
if (keyframe !== 0) {
|
|
416
|
-
return
|
|
681
|
+
return Promise.reject(
|
|
682
|
+
`3D Tiles currently doesn't support time-dynamic data.`,
|
|
683
|
+
);
|
|
417
684
|
}
|
|
418
685
|
|
|
419
686
|
// 1. Load the subtree that the tile belongs to (possibly from the subtree cache)
|
|
420
687
|
// 2. Load the voxel content if available
|
|
421
688
|
|
|
422
|
-
const implicitTileset = this._implicitTileset;
|
|
423
|
-
const names = this.names;
|
|
424
|
-
|
|
425
689
|
// Can't use a scratch variable here because the object is used inside the promise chain.
|
|
690
|
+
const implicitTileset = this._implicitTileset;
|
|
426
691
|
const tileCoordinates = new ImplicitTileCoordinates({
|
|
427
692
|
subdivisionScheme: implicitTileset.subdivisionScheme,
|
|
428
693
|
subtreeLevels: implicitTileset.subtreeLevels,
|
|
@@ -444,23 +709,29 @@ Cesium3DTilesVoxelProvider.prototype.requestData = function (options) {
|
|
|
444
709
|
|
|
445
710
|
const that = this;
|
|
446
711
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
712
|
+
const subtree = await getSubtree(that, subtreeCoord);
|
|
713
|
+
// NOTE: these two subtree methods are ONLY used by voxels!
|
|
714
|
+
const isAvailable = isSubtreeRoot
|
|
715
|
+
? subtree.childSubtreeIsAvailableAtCoordinates
|
|
716
|
+
: subtree.tileIsAvailableAtCoordinates;
|
|
717
|
+
|
|
718
|
+
const available = isAvailable.call(subtree, tileCoordinates);
|
|
719
|
+
|
|
720
|
+
if (!available) {
|
|
721
|
+
return Promise.reject(
|
|
722
|
+
`Tile is not available at level ${tileLevel}, x ${tileX}, y ${tileY}, z ${tileZ}.`,
|
|
723
|
+
);
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
const { contentUriTemplates, baseResource } = implicitTileset;
|
|
727
|
+
const gltfRelative = contentUriTemplates[0].getDerivedResource({
|
|
728
|
+
templateValues: tileCoordinates.getTemplateValues(),
|
|
729
|
+
});
|
|
730
|
+
const gltfResource = baseResource.getDerivedResource({
|
|
731
|
+
url: gltfRelative.url,
|
|
732
|
+
});
|
|
733
|
+
|
|
734
|
+
return VoxelContent.fromGltf(gltfResource);
|
|
464
735
|
};
|
|
465
736
|
|
|
466
737
|
export default Cesium3DTilesVoxelProvider;
|
|
@@ -170,7 +170,6 @@ Cesium3DTilesetStatistics.clone = function (statistics, result) {
|
|
|
170
170
|
result.selected = statistics.selected;
|
|
171
171
|
result.visited = statistics.visited;
|
|
172
172
|
result.numberOfCommands = statistics.numberOfCommands;
|
|
173
|
-
result.selected = statistics.selected;
|
|
174
173
|
result.numberOfAttemptedRequests = statistics.numberOfAttemptedRequests;
|
|
175
174
|
result.numberOfPendingRequests = statistics.numberOfPendingRequests;
|
|
176
175
|
result.numberOfTilesProcessing = statistics.numberOfTilesProcessing;
|
|
@@ -117,8 +117,8 @@ ClippingPolygon.clone = function (polygon, result) {
|
|
|
117
117
|
* Compares the provided ClippingPolygons and returns
|
|
118
118
|
* <code>true</code> if they are equal, <code>false</code> otherwise.
|
|
119
119
|
*
|
|
120
|
-
* @param {
|
|
121
|
-
* @param {
|
|
120
|
+
* @param {ClippingPolygon} left The first polygon.
|
|
121
|
+
* @param {ClippingPolygon} right The second polygon.
|
|
122
122
|
* @returns {boolean} <code>true</code> if left and right are equal, <code>false</code> otherwise.
|
|
123
123
|
*/
|
|
124
124
|
ClippingPolygon.equals = function (left, right) {
|
|
@@ -1225,6 +1225,7 @@ Node.prototype._evaluateVariableString = function (feature) {
|
|
|
1225
1225
|
property = "";
|
|
1226
1226
|
}
|
|
1227
1227
|
result = result.replace(placeholder, property);
|
|
1228
|
+
variableRegex.lastIndex += property.length - placeholder.length;
|
|
1228
1229
|
match = variableRegex.exec(result);
|
|
1229
1230
|
}
|
|
1230
1231
|
return result;
|