@cesium/engine 2.3.0 → 2.4.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/{AxisAlignedBoundingBox-31fadcf0.js → AxisAlignedBoundingBox-4bfd84f3.js} +1 -1
- package/Build/Workers/{BoundingRectangle-995f0079.js → BoundingRectangle-5fd6403a.js} +1 -1
- package/Build/Workers/{BoxGeometry-7eb1af60.js → BoxGeometry-af7d05ef.js} +1 -1
- package/Build/Workers/{Color-2dc49658.js → Color-e5bfda3f.js} +1 -1
- package/Build/Workers/{CoplanarPolygonGeometryLibrary-d7d972d6.js → CoplanarPolygonGeometryLibrary-59c69b0a.js} +1 -1
- package/Build/Workers/{CorridorGeometryLibrary-1f5ef7b3.js → CorridorGeometryLibrary-63907365.js} +1 -1
- package/Build/Workers/{CylinderGeometry-23c67a6c.js → CylinderGeometry-dbaa1678.js} +1 -1
- package/Build/Workers/{EllipseGeometry-37014da4.js → EllipseGeometry-6508b78b.js} +1 -1
- package/Build/Workers/{EllipseGeometryLibrary-92ab6b1e.js → EllipseGeometryLibrary-21262a28.js} +1 -1
- package/Build/Workers/{EllipseOutlineGeometry-12b6fef5.js → EllipseOutlineGeometry-2a2510bb.js} +1 -1
- package/Build/Workers/{EllipsoidGeometry-508da15c.js → EllipsoidGeometry-8155e3a2.js} +1 -1
- package/Build/Workers/{EllipsoidOutlineGeometry-40d97455.js → EllipsoidOutlineGeometry-c045678d.js} +1 -1
- package/Build/Workers/{EllipsoidTangentPlane-46d4d9c2.js → EllipsoidTangentPlane-546c0d5e.js} +1 -1
- package/Build/Workers/{FrustumGeometry-38605e69.js → FrustumGeometry-d3ff16d0.js} +1 -1
- package/Build/Workers/{GeometryAttribute-a466e9c7.js → GeometryAttribute-13da9466.js} +1 -1
- package/Build/Workers/{GeometryPipeline-dcf79306.js → GeometryPipeline-03bc5709.js} +1 -1
- package/Build/Workers/{IntersectionTests-88c49b2e.js → IntersectionTests-85350792.js} +1 -1
- package/Build/Workers/{OrientedBoundingBox-2dd47921.js → OrientedBoundingBox-29fb0fcd.js} +1 -1
- package/Build/Workers/{PolygonGeometryLibrary-59126025.js → PolygonGeometryLibrary-d447448d.js} +1 -1
- package/Build/Workers/{PolygonPipeline-1fe328c0.js → PolygonPipeline-460cce4e.js} +1 -1
- package/Build/Workers/{PolylinePipeline-896735cc.js → PolylinePipeline-7119eb3f.js} +1 -1
- package/Build/Workers/{PolylineVolumeGeometryLibrary-9c0639f7.js → PolylineVolumeGeometryLibrary-d25f0050.js} +1 -1
- package/Build/Workers/{PrimitivePipeline-fc1a47ff.js → PrimitivePipeline-e648752b.js} +1 -1
- package/Build/Workers/{RectangleGeometryLibrary-a23c9ebe.js → RectangleGeometryLibrary-bb378fb6.js} +1 -1
- package/Build/Workers/{TerrainEncoding-51b8b33b.js → TerrainEncoding-c8e029a2.js} +1 -1
- package/Build/Workers/{Transforms-bc45e707.js → Transforms-e2d4a55a.js} +14 -0
- package/Build/Workers/{WallGeometryLibrary-007e9883.js → WallGeometryLibrary-3e0819ec.js} +1 -1
- package/Build/Workers/cesiumWorkerBootstrapper.js +1 -1
- package/Build/Workers/combineGeometry.js +1 -1
- package/Build/Workers/createBoxGeometry.js +1 -1
- package/Build/Workers/createBoxOutlineGeometry.js +1 -1
- package/Build/Workers/createCircleGeometry.js +1 -1
- package/Build/Workers/createCircleOutlineGeometry.js +1 -1
- package/Build/Workers/createCoplanarPolygonGeometry.js +1 -1
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +1 -1
- package/Build/Workers/createCorridorGeometry.js +1 -1
- package/Build/Workers/createCorridorOutlineGeometry.js +1 -1
- package/Build/Workers/createCylinderGeometry.js +1 -1
- package/Build/Workers/createCylinderOutlineGeometry.js +1 -1
- package/Build/Workers/createEllipseGeometry.js +1 -1
- package/Build/Workers/createEllipseOutlineGeometry.js +1 -1
- package/Build/Workers/createEllipsoidGeometry.js +1 -1
- package/Build/Workers/createEllipsoidOutlineGeometry.js +1 -1
- package/Build/Workers/createFrustumGeometry.js +1 -1
- package/Build/Workers/createFrustumOutlineGeometry.js +1 -1
- package/Build/Workers/createGeometry.js +1 -1
- package/Build/Workers/createGroundPolylineGeometry.js +1 -1
- package/Build/Workers/createPlaneGeometry.js +1 -1
- package/Build/Workers/createPlaneOutlineGeometry.js +1 -1
- package/Build/Workers/createPolygonGeometry.js +1 -1
- package/Build/Workers/createPolygonOutlineGeometry.js +1 -1
- package/Build/Workers/createPolylineGeometry.js +1 -1
- package/Build/Workers/createPolylineVolumeGeometry.js +1 -1
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +1 -1
- package/Build/Workers/createRectangleGeometry.js +1 -1
- package/Build/Workers/createRectangleOutlineGeometry.js +1 -1
- package/Build/Workers/createSimplePolylineGeometry.js +1 -1
- package/Build/Workers/createSphereGeometry.js +1 -1
- package/Build/Workers/createSphereOutlineGeometry.js +1 -1
- package/Build/Workers/createVectorTileGeometries.js +1 -1
- package/Build/Workers/createVectorTilePolygons.js +1 -1
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
- package/Build/Workers/createVerticesFromHeightmap.js +1 -1
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +1 -1
- package/Build/Workers/createWallGeometry.js +1 -1
- package/Build/Workers/createWallOutlineGeometry.js +1 -1
- package/Build/Workers/package.js +1 -1
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +1 -1
- package/Source/Core/GoogleMaps.js +56 -0
- package/Source/Core/Ion.js +1 -0
- package/Source/Core/RequestScheduler.js +1 -0
- package/Source/Core/Resource.js +13 -0
- package/Source/Scene/ArcGisMapService.js +1 -0
- package/Source/Scene/Cesium3DTileset.js +2 -1
- package/Source/Scene/Model/Model.js +5 -3
- package/Source/Scene/ScreenSpaceCameraController.js +139 -31
- package/Source/Scene/createGooglePhotorealistic3DTileset.js +53 -0
- package/index.d.ts +37 -1
- package/index.js +329 -327
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './arrayRemoveDuplicates-d2061e85', './BoundingRectangle-
|
|
1
|
+
define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './arrayRemoveDuplicates-d2061e85', './BoundingRectangle-5fd6403a', './Transforms-e2d4a55a', './Matrix2-e1298525', './ComponentDatatype-cf1fa08e', './PolylineVolumeGeometryLibrary-d25f0050', './Check-6ede7e26', './GeometryAttribute-13da9466', './GeometryAttributes-ad136444', './GeometryPipeline-03bc5709', './IndexDatatype-2643aa47', './Math-0a2ac845', './PolygonPipeline-460cce4e', './VertexFormat-030f11ff', './combine-d9581036', './RuntimeError-ef395448', './WebGLConstants-0b1ce7ba', './EllipsoidTangentPlane-546c0d5e', './AxisAlignedBoundingBox-4bfd84f3', './IntersectionTests-85350792', './Plane-4c3d403b', './PolylinePipeline-7119eb3f', './EllipsoidGeodesic-5b3623dc', './EllipsoidRhumbLine-ef872433', './AttributeCompression-f9f6c717', './EncodedCartesian3-57415c8a'], (function (defaultValue, Matrix3, arrayRemoveDuplicates, BoundingRectangle, Transforms, Matrix2, ComponentDatatype, PolylineVolumeGeometryLibrary, Check, GeometryAttribute, GeometryAttributes, GeometryPipeline, IndexDatatype, Math, PolygonPipeline, VertexFormat, combine, RuntimeError, WebGLConstants, EllipsoidTangentPlane, AxisAlignedBoundingBox, IntersectionTests, Plane, PolylinePipeline, EllipsoidGeodesic, EllipsoidRhumbLine, AttributeCompression, EncodedCartesian3) { 'use strict';
|
|
2
2
|
|
|
3
3
|
function computeAttributes(
|
|
4
4
|
combinedPositions,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './arrayRemoveDuplicates-d2061e85', './BoundingRectangle-
|
|
1
|
+
define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './arrayRemoveDuplicates-d2061e85', './BoundingRectangle-5fd6403a', './Transforms-e2d4a55a', './Matrix2-e1298525', './ComponentDatatype-cf1fa08e', './PolylineVolumeGeometryLibrary-d25f0050', './Check-6ede7e26', './GeometryAttribute-13da9466', './GeometryAttributes-ad136444', './IndexDatatype-2643aa47', './Math-0a2ac845', './PolygonPipeline-460cce4e', './combine-d9581036', './RuntimeError-ef395448', './WebGLConstants-0b1ce7ba', './EllipsoidTangentPlane-546c0d5e', './AxisAlignedBoundingBox-4bfd84f3', './IntersectionTests-85350792', './Plane-4c3d403b', './PolylinePipeline-7119eb3f', './EllipsoidGeodesic-5b3623dc', './EllipsoidRhumbLine-ef872433'], (function (defaultValue, Matrix3, arrayRemoveDuplicates, BoundingRectangle, Transforms, Matrix2, ComponentDatatype, PolylineVolumeGeometryLibrary, Check, GeometryAttribute, GeometryAttributes, IndexDatatype, Math, PolygonPipeline, combine, RuntimeError, WebGLConstants, EllipsoidTangentPlane, AxisAlignedBoundingBox, IntersectionTests, Plane, PolylinePipeline, EllipsoidGeodesic, EllipsoidRhumbLine) { 'use strict';
|
|
2
2
|
|
|
3
3
|
function computeAttributes(positions, shape) {
|
|
4
4
|
const attributes = new GeometryAttributes.GeometryAttributes();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './Matrix2-e1298525', './Transforms-
|
|
1
|
+
define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './Matrix2-e1298525', './Transforms-e2d4a55a', './Check-6ede7e26', './ComponentDatatype-cf1fa08e', './GeometryAttribute-13da9466', './GeometryAttributes-ad136444', './GeometryInstance-34d9e21e', './GeometryOffsetAttribute-9ad0019c', './GeometryPipeline-03bc5709', './IndexDatatype-2643aa47', './Math-0a2ac845', './PolygonPipeline-460cce4e', './RectangleGeometryLibrary-bb378fb6', './VertexFormat-030f11ff', './RuntimeError-ef395448', './combine-d9581036', './WebGLConstants-0b1ce7ba', './AttributeCompression-f9f6c717', './EncodedCartesian3-57415c8a', './IntersectionTests-85350792', './Plane-4c3d403b', './EllipsoidRhumbLine-ef872433'], (function (defaultValue, Matrix3, Matrix2, Transforms, Check, ComponentDatatype, GeometryAttribute, GeometryAttributes, GeometryInstance, GeometryOffsetAttribute, GeometryPipeline, IndexDatatype, Math$1, PolygonPipeline, RectangleGeometryLibrary, VertexFormat, RuntimeError, combine, WebGLConstants, AttributeCompression, EncodedCartesian3, IntersectionTests, Plane, EllipsoidRhumbLine) { 'use strict';
|
|
2
2
|
|
|
3
3
|
const positionScratch = new Matrix3.Cartesian3();
|
|
4
4
|
const normalScratch = new Matrix3.Cartesian3();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './Matrix2-e1298525', './Transforms-
|
|
1
|
+
define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './Matrix2-e1298525', './Transforms-e2d4a55a', './ComponentDatatype-cf1fa08e', './Check-6ede7e26', './GeometryAttribute-13da9466', './GeometryAttributes-ad136444', './GeometryOffsetAttribute-9ad0019c', './IndexDatatype-2643aa47', './Math-0a2ac845', './PolygonPipeline-460cce4e', './RectangleGeometryLibrary-bb378fb6', './RuntimeError-ef395448', './combine-d9581036', './WebGLConstants-0b1ce7ba', './EllipsoidRhumbLine-ef872433'], (function (defaultValue, Matrix3, Matrix2, Transforms, ComponentDatatype, Check, GeometryAttribute, GeometryAttributes, GeometryOffsetAttribute, IndexDatatype, Math$1, PolygonPipeline, RectangleGeometryLibrary, RuntimeError, combine, WebGLConstants, EllipsoidRhumbLine) { 'use strict';
|
|
2
2
|
|
|
3
3
|
const bottomBoundingSphere = new Transforms.BoundingSphere();
|
|
4
4
|
const topBoundingSphere = new Transforms.BoundingSphere();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './ArcType-2d9abbbc', './Transforms-
|
|
1
|
+
define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './ArcType-2d9abbbc', './Transforms-e2d4a55a', './Color-e5bfda3f', './ComponentDatatype-cf1fa08e', './Check-6ede7e26', './GeometryAttribute-13da9466', './GeometryAttributes-ad136444', './IndexDatatype-2643aa47', './Math-0a2ac845', './PolylinePipeline-7119eb3f', './Matrix2-e1298525', './RuntimeError-ef395448', './combine-d9581036', './WebGLConstants-0b1ce7ba', './EllipsoidGeodesic-5b3623dc', './EllipsoidRhumbLine-ef872433', './IntersectionTests-85350792', './Plane-4c3d403b'], (function (defaultValue, Matrix3, ArcType, Transforms, Color, ComponentDatatype, Check, GeometryAttribute, GeometryAttributes, IndexDatatype, Math, PolylinePipeline, Matrix2, RuntimeError, combine, WebGLConstants, EllipsoidGeodesic, EllipsoidRhumbLine, IntersectionTests, Plane) { 'use strict';
|
|
2
2
|
|
|
3
3
|
function interpolateColors(p0, p1, color0, color1, minDistance, array, offset) {
|
|
4
4
|
const numPoints = PolylinePipeline.PolylinePipeline.numberOfPoints(p0, p1, minDistance);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './Check-6ede7e26', './EllipsoidGeometry-
|
|
1
|
+
define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './Check-6ede7e26', './EllipsoidGeometry-8155e3a2', './VertexFormat-030f11ff', './Math-0a2ac845', './Transforms-e2d4a55a', './Matrix2-e1298525', './RuntimeError-ef395448', './combine-d9581036', './ComponentDatatype-cf1fa08e', './WebGLConstants-0b1ce7ba', './GeometryAttribute-13da9466', './GeometryAttributes-ad136444', './GeometryOffsetAttribute-9ad0019c', './IndexDatatype-2643aa47'], (function (defaultValue, Matrix3, Check, EllipsoidGeometry, VertexFormat, Math, Transforms, Matrix2, RuntimeError, combine, ComponentDatatype, WebGLConstants, GeometryAttribute, GeometryAttributes, GeometryOffsetAttribute, IndexDatatype) { 'use strict';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A description of a sphere centered at the origin.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './Check-6ede7e26', './EllipsoidOutlineGeometry-
|
|
1
|
+
define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './Check-6ede7e26', './EllipsoidOutlineGeometry-c045678d', './Math-0a2ac845', './Transforms-e2d4a55a', './Matrix2-e1298525', './RuntimeError-ef395448', './combine-d9581036', './ComponentDatatype-cf1fa08e', './WebGLConstants-0b1ce7ba', './GeometryAttribute-13da9466', './GeometryAttributes-ad136444', './GeometryOffsetAttribute-9ad0019c', './IndexDatatype-2643aa47'], (function (defaultValue, Matrix3, Check, EllipsoidOutlineGeometry, Math, Transforms, Matrix2, RuntimeError, combine, ComponentDatatype, WebGLConstants, GeometryAttribute, GeometryAttributes, GeometryOffsetAttribute, IndexDatatype) { 'use strict';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A description of the outline of a sphere.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(['./Transforms-
|
|
1
|
+
define(['./Transforms-e2d4a55a', './BoxGeometry-af7d05ef', './Matrix3-41c58dde', './Color-e5bfda3f', './CylinderGeometry-dbaa1678', './defaultValue-fe22d8c0', './EllipsoidGeometry-8155e3a2', './IndexDatatype-2643aa47', './Matrix2-e1298525', './createTaskProcessorWorker', './Check-6ede7e26', './Math-0a2ac845', './combine-d9581036', './RuntimeError-ef395448', './ComponentDatatype-cf1fa08e', './WebGLConstants-0b1ce7ba', './GeometryAttribute-13da9466', './GeometryAttributes-ad136444', './GeometryOffsetAttribute-9ad0019c', './VertexFormat-030f11ff', './CylinderGeometryLibrary-7bf291b4'], (function (Transforms, BoxGeometry, Matrix3, Color, CylinderGeometry, defaultValue, EllipsoidGeometry, IndexDatatype, Matrix2, createTaskProcessorWorker, Check, Math$1, combine, RuntimeError, ComponentDatatype, WebGLConstants, GeometryAttribute, GeometryAttributes, GeometryOffsetAttribute, VertexFormat, CylinderGeometryLibrary) { 'use strict';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Describes a renderable batch of geometry.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(['./AttributeCompression-f9f6c717', './Matrix3-41c58dde', './Color-
|
|
1
|
+
define(['./AttributeCompression-f9f6c717', './Matrix3-41c58dde', './Color-e5bfda3f', './defaultValue-fe22d8c0', './IndexDatatype-2643aa47', './Math-0a2ac845', './OrientedBoundingBox-29fb0fcd', './Matrix2-e1298525', './createTaskProcessorWorker', './ComponentDatatype-cf1fa08e', './Check-6ede7e26', './WebGLConstants-0b1ce7ba', './Transforms-e2d4a55a', './combine-d9581036', './RuntimeError-ef395448', './EllipsoidTangentPlane-546c0d5e', './AxisAlignedBoundingBox-4bfd84f3', './IntersectionTests-85350792', './Plane-4c3d403b'], (function (AttributeCompression, Matrix3, Color, defaultValue, IndexDatatype, Math$1, OrientedBoundingBox, Matrix2, createTaskProcessorWorker, ComponentDatatype, Check, WebGLConstants, Transforms, combine, RuntimeError, EllipsoidTangentPlane, AxisAlignedBoundingBox, IntersectionTests, Plane) { 'use strict';
|
|
2
2
|
|
|
3
3
|
const scratchCenter = new Matrix3.Cartesian3();
|
|
4
4
|
const scratchEllipsoid = new Matrix3.Ellipsoid();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(['./AxisAlignedBoundingBox-
|
|
1
|
+
define(['./AxisAlignedBoundingBox-4bfd84f3', './Transforms-e2d4a55a', './Matrix2-e1298525', './Matrix3-41c58dde', './defaultValue-fe22d8c0', './TerrainEncoding-c8e029a2', './Math-0a2ac845', './OrientedBoundingBox-29fb0fcd', './RuntimeError-ef395448', './WebMercatorProjection-13ed1a6e', './createTaskProcessorWorker', './Check-6ede7e26', './combine-d9581036', './AttributeCompression-f9f6c717', './ComponentDatatype-cf1fa08e', './WebGLConstants-0b1ce7ba', './EllipsoidTangentPlane-546c0d5e', './IntersectionTests-85350792', './Plane-4c3d403b'], (function (AxisAlignedBoundingBox, Transforms, Matrix2, Matrix3, defaultValue, TerrainEncoding, Math$1, OrientedBoundingBox, RuntimeError, WebMercatorProjection, createTaskProcessorWorker, Check, combine, AttributeCompression, ComponentDatatype, WebGLConstants, EllipsoidTangentPlane, IntersectionTests, Plane) { 'use strict';
|
|
2
2
|
|
|
3
3
|
const sizeOfUint16 = Uint16Array.BYTES_PER_ELEMENT;
|
|
4
4
|
const sizeOfInt32 = Int32Array.BYTES_PER_ELEMENT;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(['./Matrix3-41c58dde', './AxisAlignedBoundingBox-
|
|
1
|
+
define(['./Matrix3-41c58dde', './AxisAlignedBoundingBox-4bfd84f3', './Transforms-e2d4a55a', './Matrix2-e1298525', './defaultValue-fe22d8c0', './Check-6ede7e26', './TerrainEncoding-c8e029a2', './Math-0a2ac845', './OrientedBoundingBox-29fb0fcd', './WebMercatorProjection-13ed1a6e', './RuntimeError-ef395448', './createTaskProcessorWorker', './combine-d9581036', './AttributeCompression-f9f6c717', './ComponentDatatype-cf1fa08e', './WebGLConstants-0b1ce7ba', './EllipsoidTangentPlane-546c0d5e', './IntersectionTests-85350792', './Plane-4c3d403b'], (function (Matrix3, AxisAlignedBoundingBox, Transforms, Matrix2, defaultValue, Check, TerrainEncoding, Math$1, OrientedBoundingBox, WebMercatorProjection, RuntimeError, createTaskProcessorWorker, combine, AttributeCompression, ComponentDatatype, WebGLConstants, EllipsoidTangentPlane, IntersectionTests, Plane) { 'use strict';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* The encoding that is used for a heightmap
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(['./AxisAlignedBoundingBox-
|
|
1
|
+
define(['./AxisAlignedBoundingBox-4bfd84f3', './Matrix2-e1298525', './Matrix3-41c58dde', './defaultValue-fe22d8c0', './TerrainEncoding-c8e029a2', './IndexDatatype-2643aa47', './Math-0a2ac845', './Check-6ede7e26', './Transforms-e2d4a55a', './WebMercatorProjection-13ed1a6e', './createTaskProcessorWorker', './RuntimeError-ef395448', './AttributeCompression-f9f6c717', './ComponentDatatype-cf1fa08e', './WebGLConstants-0b1ce7ba', './combine-d9581036'], (function (AxisAlignedBoundingBox, Matrix2, Matrix3, defaultValue, TerrainEncoding, IndexDatatype, Math$1, Check, Transforms, WebMercatorProjection, createTaskProcessorWorker, RuntimeError, AttributeCompression, ComponentDatatype, WebGLConstants, combine) { 'use strict';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Provides terrain or other geometry for the surface of an ellipsoid. The surface geometry is
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './Transforms-
|
|
1
|
+
define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './Transforms-e2d4a55a', './ComponentDatatype-cf1fa08e', './Check-6ede7e26', './GeometryAttribute-13da9466', './GeometryAttributes-ad136444', './IndexDatatype-2643aa47', './Math-0a2ac845', './VertexFormat-030f11ff', './WallGeometryLibrary-3e0819ec', './Matrix2-e1298525', './RuntimeError-ef395448', './combine-d9581036', './WebGLConstants-0b1ce7ba', './arrayRemoveDuplicates-d2061e85', './PolylinePipeline-7119eb3f', './EllipsoidGeodesic-5b3623dc', './EllipsoidRhumbLine-ef872433', './IntersectionTests-85350792', './Plane-4c3d403b'], (function (defaultValue, Matrix3, Transforms, ComponentDatatype, Check, GeometryAttribute, GeometryAttributes, IndexDatatype, Math, VertexFormat, WallGeometryLibrary, Matrix2, RuntimeError, combine, WebGLConstants, arrayRemoveDuplicates, PolylinePipeline, EllipsoidGeodesic, EllipsoidRhumbLine, IntersectionTests, Plane) { 'use strict';
|
|
2
2
|
|
|
3
3
|
const scratchCartesian3Position1 = new Matrix3.Cartesian3();
|
|
4
4
|
const scratchCartesian3Position2 = new Matrix3.Cartesian3();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './Transforms-
|
|
1
|
+
define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './Transforms-e2d4a55a', './ComponentDatatype-cf1fa08e', './Check-6ede7e26', './GeometryAttribute-13da9466', './GeometryAttributes-ad136444', './IndexDatatype-2643aa47', './Math-0a2ac845', './WallGeometryLibrary-3e0819ec', './Matrix2-e1298525', './RuntimeError-ef395448', './combine-d9581036', './WebGLConstants-0b1ce7ba', './arrayRemoveDuplicates-d2061e85', './PolylinePipeline-7119eb3f', './EllipsoidGeodesic-5b3623dc', './EllipsoidRhumbLine-ef872433', './IntersectionTests-85350792', './Plane-4c3d403b'], (function (defaultValue, Matrix3, Transforms, ComponentDatatype, Check, GeometryAttribute, GeometryAttributes, IndexDatatype, Math, WallGeometryLibrary, Matrix2, RuntimeError, combine, WebGLConstants, arrayRemoveDuplicates, PolylinePipeline, EllipsoidGeodesic, EllipsoidRhumbLine, IntersectionTests, Plane) { 'use strict';
|
|
2
2
|
|
|
3
3
|
const scratchCartesian3Position1 = new Matrix3.Cartesian3();
|
|
4
4
|
const scratchCartesian3Position2 = new Matrix3.Cartesian3();
|
package/Build/Workers/package.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(['./AttributeCompression-f9f6c717', './Transforms-
|
|
1
|
+
define(['./AttributeCompression-f9f6c717', './Transforms-e2d4a55a', './Matrix2-e1298525', './Matrix3-41c58dde', './defaultValue-fe22d8c0', './TerrainEncoding-c8e029a2', './IndexDatatype-2643aa47', './Check-6ede7e26', './Math-0a2ac845', './OrientedBoundingBox-29fb0fcd', './createTaskProcessorWorker', './ComponentDatatype-cf1fa08e', './WebGLConstants-0b1ce7ba', './combine-d9581036', './RuntimeError-ef395448', './EllipsoidTangentPlane-546c0d5e', './AxisAlignedBoundingBox-4bfd84f3', './IntersectionTests-85350792', './Plane-4c3d403b'], (function (AttributeCompression, Transforms, Matrix2, Matrix3, defaultValue, TerrainEncoding, IndexDatatype, Check, Math$1, OrientedBoundingBox, createTaskProcessorWorker, ComponentDatatype, WebGLConstants, combine, RuntimeError, EllipsoidTangentPlane, AxisAlignedBoundingBox, IntersectionTests, Plane) { 'use strict';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Contains functions for operating on 2D triangles.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import Credit from "./Credit.js";
|
|
2
|
+
import defined from "./defined.js";
|
|
3
|
+
import Resource from "./Resource.js";
|
|
4
|
+
|
|
5
|
+
let defaultKeyCredit;
|
|
6
|
+
const defaultKey = "AIzaSyBESBYnp1EcqtlAcjMTJ65GjUsJtaCWVXA";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Default settings for accessing the Google Maps API.
|
|
10
|
+
* <br/>
|
|
11
|
+
* An API key is only required if you are using any Google Maps APIs, such as {@link createGooglePhotorealistic3DTileset}.
|
|
12
|
+
* A default key is provided for evaluation purposes only.
|
|
13
|
+
* Follow instructions for managing API keys for the Google Maps Platform at {@link https://developers.google.com/maps/documentation/embed/get-api-key}
|
|
14
|
+
*
|
|
15
|
+
* @see createGooglePhotorealistic3DTileset
|
|
16
|
+
* @see https://developers.google.com/maps/documentation/embed/get-api-key
|
|
17
|
+
*
|
|
18
|
+
* @namespace GoogleMaps
|
|
19
|
+
*/
|
|
20
|
+
const GoogleMaps = {};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Gets or sets the default Google Maps API key.
|
|
24
|
+
*
|
|
25
|
+
* @type {string}
|
|
26
|
+
*/
|
|
27
|
+
GoogleMaps.defaultApiKey = defaultKey;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Gets or sets the default Google Map Tiles API endpoint.
|
|
31
|
+
*
|
|
32
|
+
* @type {string|Resource}
|
|
33
|
+
* @default https://tile.googleapis.com/v1/
|
|
34
|
+
*/
|
|
35
|
+
GoogleMaps.mapTilesApiEndpoint = new Resource({
|
|
36
|
+
url: "https://tile.googleapis.com/v1/",
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
GoogleMaps.getDefaultApiKeyCredit = function (providedKey) {
|
|
40
|
+
if (providedKey !== defaultKey) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (!defined(defaultKeyCredit)) {
|
|
45
|
+
const defaultKeyMessage =
|
|
46
|
+
'<b> \
|
|
47
|
+
This application is using CesiumJS\'s default Google Maps API key. Please assign <i>Cesium.GoogleMaps.defaultApiKey</i> \
|
|
48
|
+
with <a href="https://developers.google.com/maps/documentation/embed/get-api-key">your API key for the Google Maps Platform</a>.</b>';
|
|
49
|
+
|
|
50
|
+
defaultKeyCredit = new Credit(defaultKeyMessage, true);
|
|
51
|
+
defaultKeyCredit._isDefaultToken = true;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return defaultKeyCredit;
|
|
55
|
+
};
|
|
56
|
+
export default GoogleMaps;
|
package/Source/Core/Ion.js
CHANGED
|
@@ -49,6 +49,7 @@ Ion.getDefaultTokenCredit = function (providedKey) {
|
|
|
49
49
|
You can sign up for a free ion account at <a href="https://cesium.com">https://cesium.com</a>.</b>';
|
|
50
50
|
|
|
51
51
|
defaultTokenCredit = new Credit(defaultTokenMessage, true);
|
|
52
|
+
defaultTokenCredit._isDefaultToken = true;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
return defaultTokenCredit;
|
package/Source/Core/Resource.js
CHANGED
|
@@ -148,6 +148,8 @@ function Resource(options) {
|
|
|
148
148
|
} else {
|
|
149
149
|
this._url = options.url;
|
|
150
150
|
}
|
|
151
|
+
|
|
152
|
+
this._credits = options.credits;
|
|
151
153
|
}
|
|
152
154
|
|
|
153
155
|
/**
|
|
@@ -372,6 +374,16 @@ Object.defineProperties(Resource.prototype, {
|
|
|
372
374
|
return Object.keys(this.headers).length > 0;
|
|
373
375
|
},
|
|
374
376
|
},
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Gets the credits required for attribution of an asset.
|
|
380
|
+
* @private
|
|
381
|
+
*/
|
|
382
|
+
credits: {
|
|
383
|
+
get: function () {
|
|
384
|
+
return this._credits;
|
|
385
|
+
},
|
|
386
|
+
},
|
|
375
387
|
});
|
|
376
388
|
|
|
377
389
|
/**
|
|
@@ -732,6 +744,7 @@ Resource.prototype.clone = function (result) {
|
|
|
732
744
|
retryAttempts: this.retryAttempts,
|
|
733
745
|
request: this.request.clone(),
|
|
734
746
|
parseUrl: false,
|
|
747
|
+
credits: defined(this.credits) ? this.credits.slice() : undefined,
|
|
735
748
|
});
|
|
736
749
|
}
|
|
737
750
|
|
|
@@ -76,6 +76,7 @@ ArcGisMapService.getDefaultTokenCredit = function (providedKey) {
|
|
|
76
76
|
You can sign up for a free ArcGIS Developer account at <a href="https://developers.arcgis.com/">https://developers.arcgis.com/</a>.</b>';
|
|
77
77
|
|
|
78
78
|
defaultTokenCredit = new Credit(defaultTokenMessage, true);
|
|
79
|
+
defaultTokenCredit._isDefaultToken = true;
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
return defaultTokenCredit;
|
|
@@ -3211,7 +3211,8 @@ function update(tileset, frameState, passStatistics, passOptions) {
|
|
|
3211
3211
|
if (defined(credits) && statistics.selected !== 0) {
|
|
3212
3212
|
for (let i = 0; i < credits.length; ++i) {
|
|
3213
3213
|
const credit = credits[i];
|
|
3214
|
-
credit.showOnScreen =
|
|
3214
|
+
credit.showOnScreen =
|
|
3215
|
+
tileset._showCreditsOnScreen || credit._isDefaultToken;
|
|
3215
3216
|
frameState.creditDisplay.addCreditToNextFrame(credit);
|
|
3216
3217
|
}
|
|
3217
3218
|
}
|
|
@@ -2384,19 +2384,21 @@ function updateShowCreditsOnScreen(model) {
|
|
|
2384
2384
|
|
|
2385
2385
|
const showOnScreen = model._showCreditsOnScreen;
|
|
2386
2386
|
if (defined(model._credit)) {
|
|
2387
|
-
model._credit.showOnScreen = showOnScreen;
|
|
2387
|
+
model._credit.showOnScreen = showOnScreen || model._credit._isDefaultToken;
|
|
2388
2388
|
}
|
|
2389
2389
|
|
|
2390
2390
|
const resourceCredits = model._resourceCredits;
|
|
2391
2391
|
const resourceCreditsLength = resourceCredits.length;
|
|
2392
2392
|
for (let i = 0; i < resourceCreditsLength; i++) {
|
|
2393
|
-
resourceCredits[i].showOnScreen =
|
|
2393
|
+
resourceCredits[i].showOnScreen =
|
|
2394
|
+
showOnScreen || resourceCredits[i]._isDefaultToken;
|
|
2394
2395
|
}
|
|
2395
2396
|
|
|
2396
2397
|
const gltfCredits = model._gltfCredits;
|
|
2397
2398
|
const gltfCreditsLength = gltfCredits.length;
|
|
2398
2399
|
for (let i = 0; i < gltfCreditsLength; i++) {
|
|
2399
|
-
gltfCredits[i].showOnScreen =
|
|
2400
|
+
gltfCredits[i].showOnScreen =
|
|
2401
|
+
showOnScreen || gltfCredits[i]._isDefaultToken;
|
|
2400
2402
|
}
|
|
2401
2403
|
}
|
|
2402
2404
|
|
|
@@ -217,7 +217,7 @@ function ScreenSpaceCameraController(scene) {
|
|
|
217
217
|
modifier: KeyboardEventModifier.SHIFT,
|
|
218
218
|
};
|
|
219
219
|
/**
|
|
220
|
-
* The minimum height the camera must be before picking the terrain instead of the ellipsoid.
|
|
220
|
+
* The minimum height the camera must be before picking the terrain or scene content instead of the ellipsoid.
|
|
221
221
|
* @type {number}
|
|
222
222
|
* @default 150000.0
|
|
223
223
|
*/
|
|
@@ -291,6 +291,8 @@ function ScreenSpaceCameraController(scene) {
|
|
|
291
291
|
this._zoomMouseStart = new Cartesian2(-1.0, -1.0);
|
|
292
292
|
this._zoomWorldPosition = new Cartesian3();
|
|
293
293
|
this._useZoomWorldPosition = false;
|
|
294
|
+
this._panLastMousePosition = new Cartesian2();
|
|
295
|
+
this._panLastWorldPosition = new Cartesian3();
|
|
294
296
|
this._tiltCVOffMap = false;
|
|
295
297
|
this._looking = false;
|
|
296
298
|
this._rotating = false;
|
|
@@ -611,19 +613,22 @@ function handleZoom(
|
|
|
611
613
|
object._zoomMouseStart
|
|
612
614
|
);
|
|
613
615
|
|
|
614
|
-
if (defined(object._globe)) {
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
pickedPosition
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
616
|
+
if (defined(object._globe) && mode === SceneMode.SCENE2D) {
|
|
617
|
+
pickedPosition = camera.getPickRay(startPosition, scratchZoomPickRay)
|
|
618
|
+
.origin;
|
|
619
|
+
pickedPosition = Cartesian3.fromElements(
|
|
620
|
+
pickedPosition.y,
|
|
621
|
+
pickedPosition.z,
|
|
622
|
+
pickedPosition.x
|
|
623
|
+
);
|
|
624
|
+
} else {
|
|
625
|
+
pickedPosition = pickPosition(
|
|
626
|
+
object,
|
|
627
|
+
startPosition,
|
|
628
|
+
scratchPickCartesian
|
|
629
|
+
);
|
|
626
630
|
}
|
|
631
|
+
|
|
627
632
|
if (defined(pickedPosition)) {
|
|
628
633
|
object._useZoomWorldPosition = true;
|
|
629
634
|
object._zoomWorldPosition = Cartesian3.clone(
|
|
@@ -709,7 +714,7 @@ function handleZoom(
|
|
|
709
714
|
const centerPixel = scratchCenterPixel;
|
|
710
715
|
centerPixel.x = canvas.clientWidth / 2;
|
|
711
716
|
centerPixel.y = canvas.clientHeight / 2;
|
|
712
|
-
const centerPosition =
|
|
717
|
+
const centerPosition = pickPosition(
|
|
713
718
|
object,
|
|
714
719
|
centerPixel,
|
|
715
720
|
scratchCenterPosition
|
|
@@ -1107,17 +1112,11 @@ const pickGlobeScratchRay = new Ray();
|
|
|
1107
1112
|
const scratchDepthIntersection = new Cartesian3();
|
|
1108
1113
|
const scratchRayIntersection = new Cartesian3();
|
|
1109
1114
|
|
|
1110
|
-
function
|
|
1115
|
+
function pickPosition(controller, mousePosition, result) {
|
|
1111
1116
|
const scene = controller._scene;
|
|
1112
1117
|
const globe = controller._globe;
|
|
1113
1118
|
const camera = scene.camera;
|
|
1114
1119
|
|
|
1115
|
-
if (!defined(globe)) {
|
|
1116
|
-
return undefined;
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
|
-
const cullBackFaces = !controller._cameraUnderground;
|
|
1120
|
-
|
|
1121
1120
|
let depthIntersection;
|
|
1122
1121
|
if (scene.pickPositionSupported) {
|
|
1123
1122
|
depthIntersection = scene.pickPositionWorldCoordinates(
|
|
@@ -1126,6 +1125,11 @@ function pickGlobe(controller, mousePosition, result) {
|
|
|
1126
1125
|
);
|
|
1127
1126
|
}
|
|
1128
1127
|
|
|
1128
|
+
if (!defined(globe)) {
|
|
1129
|
+
return Cartesian3.clone(depthIntersection, result);
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
const cullBackFaces = !controller._cameraUnderground;
|
|
1129
1133
|
const ray = camera.getPickRay(mousePosition, pickGlobeScratchRay);
|
|
1130
1134
|
const rayIntersection = globe.pickWorldCoordinates(
|
|
1131
1135
|
ray,
|
|
@@ -1289,7 +1293,8 @@ function translateCV(controller, startPosition, movement) {
|
|
|
1289
1293
|
|
|
1290
1294
|
let globePos;
|
|
1291
1295
|
if (camera.position.z < controller._minimumPickingTerrainHeight) {
|
|
1292
|
-
globePos =
|
|
1296
|
+
globePos = pickPosition(controller, startMouse, translateCVStartPos);
|
|
1297
|
+
|
|
1293
1298
|
if (defined(globePos)) {
|
|
1294
1299
|
origin.x = globePos.x;
|
|
1295
1300
|
}
|
|
@@ -1476,7 +1481,7 @@ function rotateCVOnTerrain(controller, startPosition, movement) {
|
|
|
1476
1481
|
center = Cartesian3.clone(controller._tiltCenter, rotateCVCenter);
|
|
1477
1482
|
} else {
|
|
1478
1483
|
if (camera.position.z < controller._minimumPickingTerrainHeight) {
|
|
1479
|
-
center =
|
|
1484
|
+
center = pickPosition(controller, startPosition, rotateCVCenter);
|
|
1480
1485
|
}
|
|
1481
1486
|
|
|
1482
1487
|
if (!defined(center)) {
|
|
@@ -1711,7 +1716,7 @@ function zoomCV(controller, startPosition, movement) {
|
|
|
1711
1716
|
|
|
1712
1717
|
let intersection;
|
|
1713
1718
|
if (height < controller._minimumPickingTerrainHeight) {
|
|
1714
|
-
intersection =
|
|
1719
|
+
intersection = pickPosition(controller, windowPosition, zoomCVIntersection);
|
|
1715
1720
|
}
|
|
1716
1721
|
|
|
1717
1722
|
let distance;
|
|
@@ -1826,7 +1831,6 @@ const scratchStrafeRay = new Ray();
|
|
|
1826
1831
|
const scratchStrafePlane = new Plane(Cartesian3.UNIT_X, 0.0);
|
|
1827
1832
|
const scratchStrafeIntersection = new Cartesian3();
|
|
1828
1833
|
const scratchStrafeDirection = new Cartesian3();
|
|
1829
|
-
const scratchMousePos = new Cartesian3();
|
|
1830
1834
|
|
|
1831
1835
|
function strafe(controller, movement, strafeStartPosition) {
|
|
1832
1836
|
const scene = controller._scene;
|
|
@@ -1867,6 +1871,7 @@ const scratchRadii = new Cartesian3();
|
|
|
1867
1871
|
const scratchEllipsoid = new Ellipsoid();
|
|
1868
1872
|
const scratchLookUp = new Cartesian3();
|
|
1869
1873
|
const scratchNormal = new Cartesian3();
|
|
1874
|
+
const scratchMousePosition = new Cartesian3();
|
|
1870
1875
|
|
|
1871
1876
|
function spin3D(controller, startPosition, movement) {
|
|
1872
1877
|
const scene = controller._scene;
|
|
@@ -1918,10 +1923,10 @@ function spin3D(controller, startPosition, movement) {
|
|
|
1918
1923
|
const globe = controller._globe;
|
|
1919
1924
|
|
|
1920
1925
|
if (defined(globe) && height < controller._minimumPickingTerrainHeight) {
|
|
1921
|
-
const mousePos =
|
|
1926
|
+
const mousePos = pickPosition(
|
|
1922
1927
|
controller,
|
|
1923
1928
|
movement.startPosition,
|
|
1924
|
-
|
|
1929
|
+
scratchMousePosition
|
|
1925
1930
|
);
|
|
1926
1931
|
if (defined(mousePos)) {
|
|
1927
1932
|
let strafing = false;
|
|
@@ -2051,6 +2056,9 @@ const pan3DTemp2 = new Cartesian3();
|
|
|
2051
2056
|
const pan3DTemp3 = new Cartesian3();
|
|
2052
2057
|
const pan3DStartMousePosition = new Cartesian2();
|
|
2053
2058
|
const pan3DEndMousePosition = new Cartesian2();
|
|
2059
|
+
const pan3DDiffMousePosition = new Cartesian2();
|
|
2060
|
+
const pan3DPixelDimensions = new Cartesian2();
|
|
2061
|
+
const panRay = new Ray();
|
|
2054
2062
|
|
|
2055
2063
|
function pan3D(controller, startPosition, movement, ellipsoid) {
|
|
2056
2064
|
const scene = controller._scene;
|
|
@@ -2064,9 +2072,109 @@ function pan3D(controller, startPosition, movement, ellipsoid) {
|
|
|
2064
2072
|
movement.endPosition,
|
|
2065
2073
|
pan3DEndMousePosition
|
|
2066
2074
|
);
|
|
2075
|
+
const height = ellipsoid.cartesianToCartographic(
|
|
2076
|
+
camera.positionWC,
|
|
2077
|
+
scratchCartographic
|
|
2078
|
+
).height;
|
|
2079
|
+
|
|
2080
|
+
let p0, p1;
|
|
2081
|
+
|
|
2082
|
+
if (
|
|
2083
|
+
!movement.inertiaEnabled &&
|
|
2084
|
+
height < controller._minimumPickingTerrainHeight
|
|
2085
|
+
) {
|
|
2086
|
+
p0 = Cartesian3.clone(controller._panLastWorldPosition, pan3DP0);
|
|
2087
|
+
|
|
2088
|
+
// Use the last picked world position unless we're starting a new drag
|
|
2089
|
+
if (
|
|
2090
|
+
!defined(controller._globe) &&
|
|
2091
|
+
!Cartesian2.equalsEpsilon(
|
|
2092
|
+
startMousePosition,
|
|
2093
|
+
controller._panLastMousePosition
|
|
2094
|
+
)
|
|
2095
|
+
) {
|
|
2096
|
+
p0 = pickPosition(controller, startMousePosition, pan3DP0);
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
if (!defined(controller._globe) && defined(p0)) {
|
|
2100
|
+
const toCenter = Cartesian3.subtract(p0, camera.positionWC, pan3DTemp1);
|
|
2101
|
+
const toCenterProj = Cartesian3.multiplyByScalar(
|
|
2102
|
+
camera.directionWC,
|
|
2103
|
+
Cartesian3.dot(camera.directionWC, toCenter),
|
|
2104
|
+
pan3DTemp1
|
|
2105
|
+
);
|
|
2106
|
+
const distanceToNearPlane = Cartesian3.magnitude(toCenterProj);
|
|
2107
|
+
const pixelDimensions = camera.frustum.getPixelDimensions(
|
|
2108
|
+
scene.drawingBufferWidth,
|
|
2109
|
+
scene.drawingBufferHeight,
|
|
2110
|
+
distanceToNearPlane,
|
|
2111
|
+
scene.pixelRatio,
|
|
2112
|
+
pan3DPixelDimensions
|
|
2113
|
+
);
|
|
2067
2114
|
|
|
2068
|
-
|
|
2069
|
-
|
|
2115
|
+
const dragDelta = Cartesian2.subtract(
|
|
2116
|
+
endMousePosition,
|
|
2117
|
+
startMousePosition,
|
|
2118
|
+
pan3DDiffMousePosition
|
|
2119
|
+
);
|
|
2120
|
+
|
|
2121
|
+
// Move the camera to the the distance the cursor moved in worldspace
|
|
2122
|
+
const right = Cartesian3.multiplyByScalar(
|
|
2123
|
+
camera.rightWC,
|
|
2124
|
+
dragDelta.x * pixelDimensions.x,
|
|
2125
|
+
pan3DTemp1
|
|
2126
|
+
);
|
|
2127
|
+
|
|
2128
|
+
// Move the camera towards the picked position in worldspace as the camera is pointed towards a horizon view
|
|
2129
|
+
const cameraPositionNormal = Cartesian3.normalize(
|
|
2130
|
+
camera.positionWC,
|
|
2131
|
+
scratchCameraPositionNormal
|
|
2132
|
+
);
|
|
2133
|
+
const endPickDirection = camera.getPickRay(endMousePosition, panRay)
|
|
2134
|
+
.direction;
|
|
2135
|
+
const endPickProj = Cartesian3.subtract(
|
|
2136
|
+
endPickDirection,
|
|
2137
|
+
Cartesian3.projectVector(endPickDirection, camera.rightWC, pan3DTemp2),
|
|
2138
|
+
pan3DTemp2
|
|
2139
|
+
);
|
|
2140
|
+
const angle = Cartesian3.angleBetween(endPickProj, camera.directionWC);
|
|
2141
|
+
let forward = 1.0;
|
|
2142
|
+
if (defined(camera.frustum.fov)) {
|
|
2143
|
+
forward = Math.max(Math.tan(angle), 0.1); // Clamp so we don't make the magnitude infinitely large when the angle is small
|
|
2144
|
+
}
|
|
2145
|
+
let dot = Math.abs(
|
|
2146
|
+
Cartesian3.dot(camera.directionWC, cameraPositionNormal)
|
|
2147
|
+
);
|
|
2148
|
+
const magnitude =
|
|
2149
|
+
((-dragDelta.y * pixelDimensions.y * 2.0) / Math.sqrt(forward)) *
|
|
2150
|
+
(1.0 - dot);
|
|
2151
|
+
const direction = Cartesian3.multiplyByScalar(
|
|
2152
|
+
endPickDirection,
|
|
2153
|
+
magnitude,
|
|
2154
|
+
pan3DTemp2
|
|
2155
|
+
);
|
|
2156
|
+
|
|
2157
|
+
// Move the camera up the distance the cursor moved in worldspace as the camera is pointed towards the center
|
|
2158
|
+
dot = Math.abs(Cartesian3.dot(camera.upWC, cameraPositionNormal));
|
|
2159
|
+
const up = Cartesian3.multiplyByScalar(
|
|
2160
|
+
camera.upWC,
|
|
2161
|
+
-dragDelta.y * (1.0 - dot) * pixelDimensions.y,
|
|
2162
|
+
pan3DTemp3
|
|
2163
|
+
);
|
|
2164
|
+
|
|
2165
|
+
p1 = Cartesian3.add(p0, right, pan3DP1);
|
|
2166
|
+
p1 = Cartesian3.add(p1, direction, p1);
|
|
2167
|
+
p1 = Cartesian3.add(p1, up, p1);
|
|
2168
|
+
|
|
2169
|
+
Cartesian3.clone(p1, controller._panLastWorldPosition);
|
|
2170
|
+
Cartesian2.clone(endMousePosition, controller._panLastMousePosition);
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2174
|
+
if (!defined(p0) || !defined(p1)) {
|
|
2175
|
+
p0 = camera.pickEllipsoid(startMousePosition, ellipsoid, pan3DP0);
|
|
2176
|
+
p1 = camera.pickEllipsoid(endMousePosition, ellipsoid, pan3DP1);
|
|
2177
|
+
}
|
|
2070
2178
|
|
|
2071
2179
|
if (!defined(p0) || !defined(p1)) {
|
|
2072
2180
|
controller._rotating = true;
|
|
@@ -2205,7 +2313,7 @@ function zoom3D(controller, startPosition, movement) {
|
|
|
2205
2313
|
? approachingCollision
|
|
2206
2314
|
: height < controller._minimumPickingTerrainHeight;
|
|
2207
2315
|
if (needPickGlobe) {
|
|
2208
|
-
intersection =
|
|
2316
|
+
intersection = pickPosition(controller, windowPosition, zoomCVIntersection);
|
|
2209
2317
|
}
|
|
2210
2318
|
|
|
2211
2319
|
let distance;
|
|
@@ -2397,7 +2505,7 @@ function tilt3DOnTerrain(controller, startPosition, movement) {
|
|
|
2397
2505
|
if (Cartesian2.equals(startPosition, controller._tiltCenterMousePosition)) {
|
|
2398
2506
|
center = Cartesian3.clone(controller._tiltCenter, tilt3DCenter);
|
|
2399
2507
|
} else {
|
|
2400
|
-
center =
|
|
2508
|
+
center = pickPosition(controller, startPosition, tilt3DCenter);
|
|
2401
2509
|
|
|
2402
2510
|
if (!defined(center)) {
|
|
2403
2511
|
ray = camera.getPickRay(startPosition, tilt3DRay);
|