From b9596efb6b9e52a1cf8aecb5e655d0cc7bd2470b Mon Sep 17 00:00:00 2001
From: ggetz
Date: Tue, 4 Jun 2024 13:53:48 -0400
Subject: [PATCH 1/9] Add eslint-jsdoc-plugin, autofix
---
.../Sandcastle/gallery/Custom DataSource.html | 14 +-
Apps/Sandcastle/gallery/Custom Geocoder.html | 3 +-
.../gallery/development/Custom Primitive.html | 5 +
Specs/ImplicitTilingTester.js | 5 +-
Specs/getArguments.js | 2 +-
eslint.config.js | 23 +-
package.json | 1 +
.../Source/Core/ApproximateTerrainHeights.js | 10 +-
.../ArcGISTiledElevationTerrainProvider.js | 28 +-
packages/engine/Source/Core/ArcType.js | 4 -
.../Source/Core/ArticulationStageType.js | 2 -
.../engine/Source/Core/AssociativeArray.js | 8 +-
.../Source/Core/AttributeCompression.js | 52 +--
.../Source/Core/AxisAlignedBoundingBox.js | 18 +-
.../Source/Core/BingMapsGeocoderService.js | 4 +-
.../engine/Source/Core/BoundingRectangle.js | 31 +-
packages/engine/Source/Core/BoundingSphere.js | 70 +---
packages/engine/Source/Core/BoxGeometry.js | 32 +-
.../engine/Source/Core/BoxOutlineGeometry.js | 26 +-
packages/engine/Source/Core/Cartesian2.js | 69 +---
packages/engine/Source/Core/Cartesian3.js | 101 ++---
packages/engine/Source/Core/Cartesian4.js | 74 +---
packages/engine/Source/Core/Cartographic.js | 34 +-
.../Core/CartographicGeocoderService.js | 4 +-
.../engine/Source/Core/CatmullRomSpline.js | 34 +-
.../Source/Core/CesiumTerrainProvider.js | 53 +--
packages/engine/Source/Core/Check.js | 36 +-
packages/engine/Source/Core/CircleGeometry.js | 30 +-
.../Source/Core/CircleOutlineGeometry.js | 27 +-
packages/engine/Source/Core/Clock.js | 19 +-
packages/engine/Source/Core/ClockRange.js | 5 -
packages/engine/Source/Core/ClockStep.js | 5 -
packages/engine/Source/Core/Color.js | 250 ++----------
.../Core/ColorGeometryInstanceAttribute.js | 32 +-
.../engine/Source/Core/ComponentDatatype.js | 33 +-
.../Source/Core/CompressedTextureBuffer.js | 9 +-
packages/engine/Source/Core/ConstantSpline.js | 19 +-
.../Source/Core/CoplanarPolygonGeometry.js | 29 +-
.../Core/CoplanarPolygonOutlineGeometry.js | 15 +-
packages/engine/Source/Core/CornerType.js | 2 -
.../engine/Source/Core/CorridorGeometry.js | 34 +-
.../Source/Core/CorridorGeometryLibrary.js | 5 +
.../Source/Core/CorridorOutlineGeometry.js | 22 +-
packages/engine/Source/Core/Credit.js | 15 +-
.../engine/Source/Core/CubicRealPolynomial.js | 3 -
packages/engine/Source/Core/CullingVolume.js | 11 +-
.../Core/CustomHeightmapTerrainProvider.js | 11 +-
.../engine/Source/Core/CylinderGeometry.js | 22 +-
.../Source/Core/CylinderGeometryLibrary.js | 5 +
.../Source/Core/CylinderOutlineGeometry.js | 27 +-
packages/engine/Source/Core/DefaultProxy.js | 7 +-
packages/engine/Source/Core/DeveloperError.js | 7 +-
.../Source/Core/DistanceDisplayCondition.js | 28 +-
...splayConditionGeometryInstanceAttribute.js | 31 +-
.../Source/Core/DoubleEndedPriorityQueue.js | 18 +-
.../engine/Source/Core/DoublyLinkedList.js | 5 +-
.../Source/Core/EarthOrientationParameters.js | 16 +-
.../Core/EarthOrientationParametersSample.js | 5 +-
packages/engine/Source/Core/EasingFunction.js | 34 --
.../engine/Source/Core/EllipseGeometry.js | 38 +-
.../Source/Core/EllipseGeometryLibrary.js | 6 +
.../Source/Core/EllipseOutlineGeometry.js | 27 +-
packages/engine/Source/Core/Ellipsoid.js | 68 +---
.../engine/Source/Core/EllipsoidGeodesic.js | 12 +-
.../engine/Source/Core/EllipsoidGeometry.js | 29 +-
.../Source/Core/EllipsoidOutlineGeometry.js | 28 +-
.../engine/Source/Core/EllipsoidRhumbLine.js | 26 +-
.../Source/Core/EllipsoidTangentPlane.js | 19 +-
.../Source/Core/EllipsoidTerrainProvider.js | 10 +-
.../engine/Source/Core/EllipsoidalOccluder.js | 26 +-
.../engine/Source/Core/EncodedCartesian3.js | 15 +-
packages/engine/Source/Core/Event.js | 9 +-
packages/engine/Source/Core/EventHelper.js | 9 +-
.../engine/Source/Core/ExtrapolationType.js | 5 -
.../engine/Source/Core/FeatureDetection.js | 18 -
.../engine/Source/Core/FrustumGeometry.js | 14 +-
.../Source/Core/FrustumOutlineGeometry.js | 12 +-
packages/engine/Source/Core/Fullscreen.js | 5 -
packages/engine/Source/Core/GeocodeType.js | 2 -
.../engine/Source/Core/GeocoderService.js | 4 +-
.../Source/Core/GeographicProjection.js | 11 +-
.../Source/Core/GeographicTilingScheme.js | 18 +-
packages/engine/Source/Core/Geometry.js | 45 +--
.../engine/Source/Core/GeometryAttribute.js | 23 +-
.../engine/Source/Core/GeometryAttributes.js | 16 +-
.../engine/Source/Core/GeometryFactory.js | 4 +-
.../engine/Source/Core/GeometryInstance.js | 19 +-
.../Source/Core/GeometryInstanceAttribute.js | 23 +-
.../engine/Source/Core/GeometryPipeline.js | 92 ++---
.../Core/GoogleEarthEnterpriseMetadata.js | 29 +-
.../Core/GoogleEarthEnterpriseTerrainData.js | 23 +-
.../GoogleEarthEnterpriseTerrainProvider.js | 20 +-
.../GoogleEarthEnterpriseTileInformation.js | 11 -
packages/engine/Source/Core/GoogleMaps.js | 4 -
packages/engine/Source/Core/GregorianDate.js | 4 +-
.../Source/Core/GroundPolylineGeometry.js | 29 +-
.../engine/Source/Core/HeadingPitchRange.js | 10 +-
.../engine/Source/Core/HeadingPitchRoll.js | 26 +-
packages/engine/Source/Core/Heap.js | 23 +-
.../engine/Source/Core/HeightmapEncoding.js | 4 -
.../Source/Core/HeightmapTerrainData.js | 37 +-
.../Source/Core/HeightmapTessellator.js | 23 +-
.../Core/HermitePolynomialApproximation.js | 11 +-
packages/engine/Source/Core/HermiteSpline.js | 66 +---
packages/engine/Source/Core/HilbertOrder.js | 7 +-
.../engine/Source/Core/Iau2000Orientation.js | 5 +-
packages/engine/Source/Core/Iau2006XysData.js | 20 +-
.../engine/Source/Core/Iau2006XysSample.js | 5 +-
.../engine/Source/Core/IauOrientationAxes.js | 6 +-
.../Source/Core/IauOrientationParameters.js | 10 +-
packages/engine/Source/Core/IndexDatatype.js | 14 -
.../Source/Core/InterpolationAlgorithm.js | 5 -
.../engine/Source/Core/InterpolationType.js | 2 -
packages/engine/Source/Core/Intersect.js | 4 -
.../engine/Source/Core/IntersectionTests.js | 26 +-
.../engine/Source/Core/Intersections2D.js | 7 -
packages/engine/Source/Core/Interval.js | 7 +-
packages/engine/Source/Core/Ion.js | 3 -
.../engine/Source/Core/IonGeocoderService.js | 12 +-
packages/engine/Source/Core/IonResource.js | 21 +-
packages/engine/Source/Core/Iso8601.js | 5 -
packages/engine/Source/Core/JulianDate.js | 49 +--
packages/engine/Source/Core/KTX2Transcoder.js | 1 -
.../Source/Core/KeyboardEventModifier.js | 4 -
.../Core/LagrangePolynomialApproximation.js | 3 -
packages/engine/Source/Core/LeapSecond.js | 3 +-
.../engine/Source/Core/LinearApproximation.js | 3 -
packages/engine/Source/Core/LinearSpline.js | 30 +-
packages/engine/Source/Core/ManagedArray.js | 16 +-
packages/engine/Source/Core/MapProjection.js | 10 +-
packages/engine/Source/Core/Math.js | 113 ++----
packages/engine/Source/Core/Matrix2.js | 106 +----
packages/engine/Source/Core/Matrix3.js | 130 ++----
packages/engine/Source/Core/Matrix4.js | 183 ++-------
.../engine/Source/Core/MorphWeightSpline.js | 30 +-
packages/engine/Source/Core/MortonOrder.js | 49 +--
packages/engine/Source/Core/NearFarScalar.js | 23 +-
packages/engine/Source/Core/Occluder.js | 29 +-
.../Core/OffsetGeometryInstanceAttribute.js | 25 +-
.../Source/Core/OpenCageGeocoderService.js | 5 +-
.../engine/Source/Core/OrientedBoundingBox.js | 52 +--
.../engine/Source/Core/OrthographicFrustum.js | 32 +-
.../Core/OrthographicOffCenterFrustum.js | 25 +-
packages/engine/Source/Core/Packable.js | 4 -
.../Source/Core/PackableForInterpolation.js | 4 -
.../Source/Core/PeliasGeocoderService.js | 7 +-
.../engine/Source/Core/PerspectiveFrustum.js | 40 +-
.../Core/PerspectiveOffCenterFrustum.js | 29 +-
packages/engine/Source/Core/PinBuilder.js | 8 +-
packages/engine/Source/Core/PixelFormat.js | 56 +--
packages/engine/Source/Core/Plane.js | 26 +-
packages/engine/Source/Core/PlaneGeometry.js | 15 +-
.../Source/Core/PlaneOutlineGeometry.js | 10 +-
.../engine/Source/Core/PolygonGeometry.js | 57 ++-
.../Source/Core/PolygonGeometryLibrary.js | 6 -
.../engine/Source/Core/PolygonHierarchy.js | 3 +-
.../Source/Core/PolygonOutlineGeometry.js | 40 +-
.../engine/Source/Core/PolygonPipeline.js | 35 +-
.../engine/Source/Core/PolylineGeometry.js | 27 +-
.../engine/Source/Core/PolylinePipeline.js | 34 +-
.../Source/Core/PolylineVolumeGeometry.js | 23 +-
.../Core/PolylineVolumeOutlineGeometry.js | 20 +-
packages/engine/Source/Core/PrimitiveType.js | 11 +-
packages/engine/Source/Core/Proxy.js | 5 +-
.../Source/Core/QuadraticRealPolynomial.js | 3 -
.../Source/Core/QuantizedMeshTerrainData.js | 23 +-
.../Source/Core/QuarticRealPolynomial.js | 3 -
packages/engine/Source/Core/Quaternion.js | 75 +---
.../engine/Source/Core/QuaternionSpline.js | 30 +-
packages/engine/Source/Core/Queue.js | 12 +-
packages/engine/Source/Core/Ray.js | 10 +-
packages/engine/Source/Core/Rectangle.js | 89 ++---
.../Source/Core/RectangleCollisionChecker.js | 3 -
.../engine/Source/Core/RectangleGeometry.js | 41 +-
.../Source/Core/RectangleGeometryLibrary.js | 14 +
.../Source/Core/RectangleOutlineGeometry.js | 30 +-
packages/engine/Source/Core/ReferenceFrame.js | 3 -
packages/engine/Source/Core/Request.js | 33 +-
.../engine/Source/Core/RequestErrorEvent.js | 8 +-
.../engine/Source/Core/RequestScheduler.js | 24 +-
packages/engine/Source/Core/RequestState.js | 7 -
packages/engine/Source/Core/RequestType.js | 5 -
packages/engine/Source/Core/Resource.js | 233 +++--------
packages/engine/Source/Core/RuntimeError.js | 7 +-
packages/engine/Source/Core/S2Cell.js | 119 +++---
.../Source/Core/ScreenSpaceEventHandler.js | 31 +-
.../Source/Core/ScreenSpaceEventType.js | 16 -
.../Core/ShowGeometryInstanceAttribute.js | 22 +-
.../Core/Simon1994PlanetaryPositions.js | 3 -
.../Source/Core/SimplePolylineGeometry.js | 26 +-
packages/engine/Source/Core/SphereGeometry.js | 26 +-
.../Source/Core/SphereOutlineGeometry.js | 27 +-
packages/engine/Source/Core/Spherical.js | 21 +-
packages/engine/Source/Core/Spline.js | 23 +-
packages/engine/Source/Core/SteppedSpline.js | 29 +-
packages/engine/Source/Core/Stereographic.js | 7 +-
packages/engine/Source/Core/TaskProcessor.js | 18 +-
packages/engine/Source/Core/TerrainData.js | 11 +-
.../engine/Source/Core/TerrainEncoding.js | 13 +-
packages/engine/Source/Core/TerrainMesh.js | 7 +-
.../engine/Source/Core/TerrainProvider.js | 23 +-
.../engine/Source/Core/TerrainQuantization.js | 4 -
.../engine/Source/Core/TileAvailability.js | 26 +-
.../engine/Source/Core/TileProviderError.js | 8 +-
packages/engine/Source/Core/TilingScheme.js | 11 +-
packages/engine/Source/Core/TimeConstants.js | 3 -
packages/engine/Source/Core/TimeInterval.js | 37 +-
.../Source/Core/TimeIntervalCollection.js | 55 +--
packages/engine/Source/Core/TimeStandard.js | 4 -
packages/engine/Source/Core/Tipsify.js | 21 +-
packages/engine/Source/Core/Transforms.js | 60 +--
.../Source/Core/TranslationRotationScale.js | 10 +-
.../Source/Core/TridiagonalSystemSolver.js | 12 +-
packages/engine/Source/Core/TrustedServers.js | 10 -
.../Source/Core/VRTheWorldTerrainProvider.js | 24 +-
packages/engine/Source/Core/VertexFormat.js | 40 +-
.../Source/Core/VerticalExaggeration.js | 2 -
.../engine/Source/Core/VideoSynchronizer.js | 15 +-
packages/engine/Source/Core/Visibility.js | 4 -
.../engine/Source/Core/VulkanConstants.js | 1 -
packages/engine/Source/Core/WallGeometry.js | 34 +-
.../engine/Source/Core/WallGeometryLibrary.js | 6 +
.../engine/Source/Core/WallOutlineGeometry.js | 31 +-
packages/engine/Source/Core/WebGLConstants.js | 1 -
.../Source/Core/WebMercatorProjection.js | 16 +-
.../Source/Core/WebMercatorTilingScheme.js | 16 +-
packages/engine/Source/Core/WindingOrder.js | 4 +-
.../Source/Core/WireframeIndexGenerator.js | 10 +-
.../engine/Source/Core/appendForwardSlash.js | 1 +
.../Source/Core/arrayRemoveDuplicates.js | 8 +-
.../Source/Core/barycentricCoordinates.js | 3 -
packages/engine/Source/Core/binarySearch.js | 4 -
packages/engine/Source/Core/buildModuleUrl.js | 3 -
packages/engine/Source/Core/clone.js | 4 +-
packages/engine/Source/Core/combine.js | 5 +-
packages/engine/Source/Core/createGuid.js | 5 -
.../Source/Core/createWorldBathymetryAsync.js | 10 +-
.../Source/Core/createWorldTerrainAsync.js | 12 +-
.../Core/decodeGoogleEarthEnterpriseData.js | 2 -
packages/engine/Source/Core/defaultValue.js | 3 -
packages/engine/Source/Core/defer.js | 3 -
packages/engine/Source/Core/defined.js | 2 -
.../engine/Source/Core/deprecationWarning.js | 4 -
packages/engine/Source/Core/destroyObject.js | 5 -
packages/engine/Source/Core/formatError.js | 2 -
packages/engine/Source/Core/getAbsoluteUri.js | 2 -
packages/engine/Source/Core/getBaseUri.js | 4 +-
.../engine/Source/Core/getExtensionFromUri.js | 2 -
.../engine/Source/Core/getFilenameFromUri.js | 2 -
.../Source/Core/getImageFromTypedArray.js | 2 -
packages/engine/Source/Core/getImagePixels.js | 2 -
.../Source/Core/getJsonFromTypedArray.js | 5 +-
packages/engine/Source/Core/getMagic.js | 2 +
.../Source/Core/getStringFromTypedArray.js | 5 +-
packages/engine/Source/Core/getTimestamp.js | 2 -
packages/engine/Source/Core/isBitSet.js | 2 +
packages/engine/Source/Core/isBlobUri.js | 3 -
.../engine/Source/Core/isCrossOriginUrl.js | 2 +-
packages/engine/Source/Core/isDataUri.js | 3 -
packages/engine/Source/Core/isLeapYear.js | 3 -
.../Source/Core/loadAndExecuteScript.js | 1 +
.../Source/Core/loadImageFromTypedArray.js | 1 +
packages/engine/Source/Core/loadKTX2.js | 27 +-
packages/engine/Source/Core/mergeSort.js | 4 -
packages/engine/Source/Core/objectToQuery.js | 4 -
packages/engine/Source/Core/oneTimeWarning.js | 6 +-
.../Source/Core/parseResponseHeaders.js | 3 -
.../engine/Source/Core/pointInsideTriangle.js | 3 -
packages/engine/Source/Core/queryToObject.js | 4 -
.../Core/resizeImageToNextPowerOfTwo.js | 2 -
packages/engine/Source/Core/sampleTerrain.js | 8 +-
.../Source/Core/sampleTerrainMostDetailed.js | 5 +-
.../Source/Core/scaleToGeodeticSurface.js | 3 -
packages/engine/Source/Core/srgbToLinear.js | 3 -
packages/engine/Source/Core/subdivideArray.js | 5 +-
packages/engine/Source/Core/wrapFunction.js | 4 +-
.../engine/Source/Core/writeTextToCanvas.js | 19 +-
.../Source/DataSources/BillboardGraphics.js | 9 +-
.../Source/DataSources/BillboardVisualizer.js | 6 +-
.../Source/DataSources/BoxGeometryUpdater.js | 14 +-
.../engine/Source/DataSources/BoxGraphics.js | 9 +-
.../Source/DataSources/CallbackProperty.js | 10 +-
.../DataSources/Cesium3DTilesetGraphics.js | 7 +-
.../DataSources/Cesium3DTilesetVisualizer.js | 10 +-
.../CheckerboardMaterialProperty.js | 14 +-
.../DataSources/ColorMaterialProperty.js | 11 +-
.../DataSources/CompositeEntityCollection.js | 34 +-
.../DataSources/CompositeMaterialProperty.js | 9 +-
.../DataSources/CompositePositionProperty.js | 13 +-
.../Source/DataSources/CompositeProperty.js | 11 +-
.../DataSources/ConstantPositionProperty.js | 14 +-
.../Source/DataSources/ConstantProperty.js | 12 +-
.../DataSources/CorridorGeometryUpdater.js | 14 +-
.../Source/DataSources/CorridorGraphics.js | 8 +-
.../Source/DataSources/CustomDataSource.js | 7 +-
.../DataSources/CylinderGeometryUpdater.js | 14 +-
.../Source/DataSources/CylinderGraphics.js | 8 +-
.../Source/DataSources/CzmlDataSource.js | 17 +-
.../engine/Source/DataSources/DataSource.js | 7 +-
.../Source/DataSources/DataSourceClock.js | 9 +-
.../DataSources/DataSourceCollection.js | 45 +--
.../Source/DataSources/DataSourceDisplay.js | 18 +-
.../DataSources/DynamicGeometryBatch.js | 2 +
.../DataSources/DynamicGeometryUpdater.js | 12 +-
.../DataSources/EllipseGeometryUpdater.js | 14 +-
.../Source/DataSources/EllipseGraphics.js | 9 +-
.../DataSources/EllipsoidGeometryUpdater.js | 18 +-
.../Source/DataSources/EllipsoidGraphics.js | 9 +-
packages/engine/Source/DataSources/Entity.js | 31 +-
.../Source/DataSources/EntityCluster.js | 29 +-
.../Source/DataSources/EntityCollection.js | 16 +-
.../engine/Source/DataSources/EntityView.js | 5 +-
.../Source/DataSources/GeoJsonDataSource.js | 15 +-
.../Source/DataSources/GeometryUpdater.js | 38 +-
.../Source/DataSources/GeometryUpdaterSet.js | 1 -
.../Source/DataSources/GeometryVisualizer.js | 17 +-
.../Source/DataSources/GpxDataSource.js | 10 +-
.../DataSources/GridMaterialProperty.js | 19 +-
.../DataSources/GroundGeometryUpdater.js | 13 +-
.../DataSources/ImageMaterialProperty.js | 14 +-
.../engine/Source/DataSources/KmlCamera.js | 3 +-
.../Source/DataSources/KmlDataSource.js | 23 +-
.../engine/Source/DataSources/KmlLookAt.js | 3 +-
packages/engine/Source/DataSources/KmlTour.js | 8 +-
.../engine/Source/DataSources/KmlTourFlyTo.js | 8 +-
.../engine/Source/DataSources/KmlTourWait.js | 7 +-
.../Source/DataSources/LabelGraphics.js | 9 +-
.../Source/DataSources/LabelVisualizer.js | 6 +-
.../Source/DataSources/MaterialProperty.js | 12 +-
.../Source/DataSources/ModelGraphics.js | 8 +-
.../Source/DataSources/ModelVisualizer.js | 10 +-
.../DataSources/NodeTransformationProperty.js | 13 +-
.../engine/Source/DataSources/PathGraphics.js | 7 +-
.../Source/DataSources/PathVisualizer.js | 5 +-
.../DataSources/PlaneGeometryUpdater.js | 14 +-
.../Source/DataSources/PlaneGraphics.js | 10 +-
.../Source/DataSources/PointGraphics.js | 8 +-
.../Source/DataSources/PointVisualizer.js | 6 +-
.../DataSources/PolygonGeometryUpdater.js | 14 +-
.../Source/DataSources/PolygonGraphics.js | 9 +-
.../PolylineArrowMaterialProperty.js | 11 +-
.../PolylineDashMaterialProperty.js | 14 +-
.../DataSources/PolylineGeometryUpdater.js | 38 +-
.../PolylineGlowMaterialProperty.js | 12 +-
.../Source/DataSources/PolylineGraphics.js | 9 +-
.../PolylineOutlineMaterialProperty.js | 14 +-
.../Source/DataSources/PolylineVisualizer.js | 14 +-
.../PolylineVolumeGeometryUpdater.js | 14 +-
.../DataSources/PolylineVolumeGraphics.js | 9 +-
.../Source/DataSources/PositionProperty.js | 14 +-
.../DataSources/PositionPropertyArray.js | 12 +-
.../engine/Source/DataSources/Property.js | 24 +-
.../Source/DataSources/PropertyArray.js | 13 +-
.../engine/Source/DataSources/PropertyBag.js | 20 +-
.../DataSources/RectangleGeometryUpdater.js | 14 +-
.../Source/DataSources/RectangleGraphics.js | 9 +-
.../Source/DataSources/ReferenceProperty.js | 13 +-
.../engine/Source/DataSources/Rotation.js | 21 +-
.../DataSources/SampledPositionProperty.js | 26 +-
.../Source/DataSources/SampledProperty.js | 23 +-
.../DataSources/ScaledPositionProperty.js | 1 +
.../DataSources/StaticGeometryColorBatch.js | 5 +
.../StaticGeometryPerMaterialBatch.js | 5 +
.../StaticGroundGeometryColorBatch.js | 2 +
.../StaticGroundGeometryPerMaterialBatch.js | 3 +
.../StaticGroundPolylinePerMaterialBatch.js | 3 +
.../DataSources/StaticOutlineGeometryBatch.js | 3 +
.../DataSources/StripeMaterialProperty.js | 18 +-
.../Source/DataSources/StripeOrientation.js | 1 -
.../DataSources/TerrainOffsetProperty.js | 9 +-
.../TimeIntervalCollectionPositionProperty.js | 11 +-
.../TimeIntervalCollectionProperty.js | 9 +-
.../VelocityOrientationProperty.js | 13 +-
.../DataSources/VelocityVectorProperty.js | 16 +-
.../engine/Source/DataSources/Visualizer.js | 7 +-
.../Source/DataSources/WallGeometryUpdater.js | 14 +-
.../engine/Source/DataSources/WallGraphics.js | 9 +-
.../createMaterialPropertyDescriptor.js | 2 +
.../DataSources/createPropertyDescriptor.js | 3 +
.../createRawPropertyDescriptor.js | 2 +
.../engine/Source/DataSources/exportKml.js | 16 +-
.../engine/Source/DataSources/getElement.js | 5 +-
.../Source/Renderer/AutomaticUniforms.js | 119 ------
packages/engine/Source/Renderer/Buffer.js | 29 +-
.../engine/Source/Renderer/ClearCommand.js | 21 +-
.../engine/Source/Renderer/ComputeCommand.js | 17 +-
.../engine/Source/Renderer/ComputeEngine.js | 1 +
packages/engine/Source/Renderer/Context.js | 26 +-
.../engine/Source/Renderer/ContextLimits.js | 1 -
packages/engine/Source/Renderer/CubeMap.js | 14 +-
.../engine/Source/Renderer/CubeMapFace.js | 48 ++-
.../engine/Source/Renderer/DrawCommand.js | 32 +-
.../engine/Source/Renderer/Framebuffer.js | 22 +-
.../Source/Renderer/FramebufferManager.js | 20 +-
.../Source/Renderer/MultisampleFramebuffer.js | 9 +-
packages/engine/Source/Renderer/Pass.js | 1 -
packages/engine/Source/Renderer/PassState.js | 8 +-
.../engine/Source/Renderer/PixelDatatype.js | 14 +-
.../engine/Source/Renderer/RenderState.js | 22 +-
.../engine/Source/Renderer/Renderbuffer.js | 1 +
packages/engine/Source/Renderer/Sampler.js | 1 +
.../engine/Source/Renderer/ShaderBuilder.js | 35 +-
.../engine/Source/Renderer/ShaderCache.js | 50 ++-
.../Source/Renderer/ShaderDestination.js | 7 +-
.../engine/Source/Renderer/ShaderFunction.js | 7 +-
.../engine/Source/Renderer/ShaderProgram.js | 3 +-
.../engine/Source/Renderer/ShaderSource.js | 14 +-
.../engine/Source/Renderer/ShaderStruct.js | 7 +-
packages/engine/Source/Renderer/Texture.js | 75 ++--
.../Renderer/TextureMagnificationFilter.js | 5 -
.../Renderer/TextureMinificationFilter.js | 9 -
.../engine/Source/Renderer/UniformState.js | 15 +-
.../engine/Source/Renderer/VertexArray.js | 39 +-
.../Source/Renderer/VertexArrayFacade.js | 5 +
.../engine/Source/Renderer/createUniform.js | 78 +++-
.../Source/Renderer/createUniformArray.js | 78 +++-
.../Source/Renderer/demodernizeShader.js | 5 +-
.../Source/Renderer/freezeRenderState.js | 3 -
.../engine/Source/Renderer/loadCubeMap.js | 13 +-
packages/engine/Source/Scene/AlphaMode.js | 4 -
packages/engine/Source/Scene/Appearance.js | 31 +-
.../engine/Source/Scene/ArcGisBaseMapType.js | 1 -
.../Scene/ArcGisMapServerImageryProvider.js | 63 +--
.../engine/Source/Scene/ArcGisMapService.js | 7 +-
packages/engine/Source/Scene/Atmosphere.js | 17 +-
packages/engine/Source/Scene/AttributeType.js | 17 -
packages/engine/Source/Scene/AutoExposure.js | 15 +-
packages/engine/Source/Scene/Axis.js | 11 -
packages/engine/Source/Scene/B3dmParser.js | 5 +-
packages/engine/Source/Scene/BatchTable.js | 34 +-
.../Source/Scene/BatchTableHierarchy.js | 20 +-
packages/engine/Source/Scene/BatchTexture.js | 36 +-
packages/engine/Source/Scene/Billboard.js | 43 +-
.../Source/Scene/BillboardCollection.js | 73 +---
.../Source/Scene/BingMapsImageryProvider.js | 30 +-
packages/engine/Source/Scene/BingMapsStyle.js | 12 -
packages/engine/Source/Scene/BlendEquation.js | 6 -
packages/engine/Source/Scene/BlendFunction.js | 16 -
packages/engine/Source/Scene/BlendOption.js | 1 -
packages/engine/Source/Scene/BlendingState.js | 5 -
.../Source/Scene/BoundingVolumeSemantics.js | 15 +-
packages/engine/Source/Scene/BoxEmitter.js | 5 +-
packages/engine/Source/Scene/BufferLoader.js | 13 +-
packages/engine/Source/Scene/Camera.js | 130 +-----
.../Source/Scene/CameraEventAggregator.js | 22 +-
.../engine/Source/Scene/CameraEventType.js | 6 -
.../engine/Source/Scene/CameraFlightPath.js | 1 -
.../Source/Scene/Cesium3DContentGroup.js | 7 +-
packages/engine/Source/Scene/Cesium3DTile.js | 131 +------
.../Source/Scene/Cesium3DTileBatchTable.js | 10 +-
.../Scene/Cesium3DTileColorBlendMode.js | 20 +-
.../Source/Scene/Cesium3DTileContent.js | 76 +---
.../Scene/Cesium3DTileContentFactory.js | 1 -
.../Source/Scene/Cesium3DTileContentType.js | 19 +-
.../Source/Scene/Cesium3DTileFeature.js | 76 +---
.../Source/Scene/Cesium3DTileFeatureTable.js | 2 +
.../Scene/Cesium3DTileOptimizationHint.js | 2 -
.../Source/Scene/Cesium3DTileOptimizations.js | 3 -
.../engine/Source/Scene/Cesium3DTilePass.js | 1 -
.../Source/Scene/Cesium3DTilePassState.js | 9 +-
.../Source/Scene/Cesium3DTilePointFeature.js | 91 +----
.../engine/Source/Scene/Cesium3DTileRefine.js | 4 -
.../engine/Source/Scene/Cesium3DTileStyle.js | 205 ++--------
.../Scene/Cesium3DTilesVoxelProvider.js | 18 +-
.../engine/Source/Scene/Cesium3DTileset.js | 236 ++---------
.../Scene/Cesium3DTilesetBaseTraversal.js | 8 +-
.../Source/Scene/Cesium3DTilesetCache.js | 1 -
.../Source/Scene/Cesium3DTilesetHeatmap.js | 8 +-
.../Source/Scene/Cesium3DTilesetMetadata.js | 11 +-
.../Cesium3DTilesetMostDetailedTraversal.js | 5 +-
.../Scene/Cesium3DTilesetSkipTraversal.js | 12 +-
.../Source/Scene/Cesium3DTilesetTraversal.js | 12 +-
packages/engine/Source/Scene/CircleEmitter.js | 7 +-
.../Source/Scene/ClassificationPrimitive.js | 71 +---
.../engine/Source/Scene/ClassificationType.js | 4 -
packages/engine/Source/Scene/ClippingPlane.js | 10 +-
.../Source/Scene/ClippingPlaneCollection.js | 49 +--
.../engine/Source/Scene/ClippingPolygon.js | 13 +-
.../Source/Scene/ClippingPolygonCollection.js | 51 +--
.../engine/Source/Scene/CloudCollection.js | 73 +---
packages/engine/Source/Scene/CloudType.js | 4 -
.../engine/Source/Scene/ColorBlendMode.js | 4 +-
.../Source/Scene/Composite3DTileContent.js | 15 +-
.../Source/Scene/ConditionsExpression.js | 14 +-
packages/engine/Source/Scene/ConeEmitter.js | 7 +-
.../engine/Source/Scene/ContentMetadata.js | 14 +-
packages/engine/Source/Scene/CreditDisplay.js | 26 +-
packages/engine/Source/Scene/CullFace.js | 4 -
packages/engine/Source/Scene/CumulusCloud.js | 17 +-
.../engine/Source/Scene/DebugAppearance.js | 35 +-
.../Source/Scene/DebugCameraPrimitive.js | 22 +-
.../Source/Scene/DebugModelMatrixPrimitive.js | 27 +-
packages/engine/Source/Scene/DepthFunction.js | 9 -
packages/engine/Source/Scene/DepthPlane.js | 1 +
.../DeviceOrientationCameraController.js | 5 +-
.../engine/Source/Scene/DirectionalLight.js | 11 +-
.../Scene/DiscardEmptyTileImagePolicy.js | 6 +-
.../Scene/DiscardMissingTileImagePolicy.js | 10 +-
packages/engine/Source/Scene/DracoLoader.js | 9 +-
.../Scene/DynamicAtmosphereLightingType.js | 8 +-
.../engine/Source/Scene/EllipsoidPrimitive.js | 45 +--
.../Scene/EllipsoidSurfaceAppearance.js | 51 +--
.../engine/Source/Scene/Empty3DTileContent.js | 11 +-
packages/engine/Source/Scene/Expression.js | 19 +-
packages/engine/Source/Scene/Fog.js | 3 +-
.../engine/Source/Scene/FrameRateMonitor.js | 24 +-
packages/engine/Source/Scene/FrameState.js | 31 +-
.../engine/Source/Scene/FrustumCommands.js | 8 +-
.../Source/Scene/Geometry3DTileContent.js | 11 +-
.../Source/Scene/GetFeatureInfoFormat.js | 4 +-
packages/engine/Source/Scene/Globe.js | 63 +--
.../Source/Scene/GlobeSurfaceShaderSet.js | 1 -
.../engine/Source/Scene/GlobeSurfaceTile.js | 4 +-
.../Source/Scene/GlobeSurfaceTileProvider.js | 32 +-
.../engine/Source/Scene/GlobeTranslucency.js | 26 +-
.../Source/Scene/GltfBufferViewLoader.js | 9 +-
.../engine/Source/Scene/GltfDracoLoader.js | 10 +-
.../engine/Source/Scene/GltfImageLoader.js | 11 +-
.../Source/Scene/GltfIndexBufferLoader.js | 19 +-
.../engine/Source/Scene/GltfJsonLoader.js | 10 +-
packages/engine/Source/Scene/GltfLoader.js | 60 +--
.../engine/Source/Scene/GltfLoaderUtil.js | 10 +-
.../Scene/GltfStructuralMetadataLoader.js | 12 +-
.../engine/Source/Scene/GltfTextureLoader.js | 12 +-
.../Source/Scene/GltfVertexBufferLoader.js | 27 +-
.../GoogleEarthEnterpriseImageryProvider.js | 21 +-
.../GoogleEarthEnterpriseMapsProvider.js | 55 +--
.../Source/Scene/GridImageryProvider.js | 11 +-
.../Source/Scene/GroundPolylinePrimitive.js | 67 +---
.../engine/Source/Scene/GroundPrimitive.js | 78 +---
packages/engine/Source/Scene/GroupMetadata.js | 15 +-
.../engine/Source/Scene/HeightReference.js | 1 -
.../engine/Source/Scene/HorizontalOrigin.js | 5 -
.../engine/Source/Scene/I3SDataProvider.js | 32 +-
packages/engine/Source/Scene/I3SDecoder.js | 10 +-
packages/engine/Source/Scene/I3SFeature.js | 2 +
packages/engine/Source/Scene/I3SField.js | 12 +
packages/engine/Source/Scene/I3SGeometry.js | 10 +
packages/engine/Source/Scene/I3SLayer.js | 13 +-
packages/engine/Source/Scene/I3SNode.js | 7 +-
packages/engine/Source/Scene/I3SStatistics.js | 3 +
packages/engine/Source/Scene/I3SSublayer.js | 7 +
packages/engine/Source/Scene/I3SSymbology.js | 2 +
packages/engine/Source/Scene/I3dmParser.js | 5 +-
.../engine/Source/Scene/ImageBasedLighting.js | 39 +-
packages/engine/Source/Scene/Imagery.js | 6 +-
packages/engine/Source/Scene/ImageryLayer.js | 69 +---
.../Source/Scene/ImageryLayerCollection.js | 68 +---
.../Source/Scene/ImageryLayerFeatureInfo.js | 6 +-
.../engine/Source/Scene/ImageryProvider.js | 13 +-
.../Source/Scene/Implicit3DTileContent.js | 60 +--
.../Scene/ImplicitAvailabilityBitstream.js | 12 +-
.../Source/Scene/ImplicitMetadataView.js | 16 +-
.../Source/Scene/ImplicitSubdivisionScheme.js | 1 -
.../engine/Source/Scene/ImplicitSubtree.js | 70 +---
.../Source/Scene/ImplicitSubtreeCache.js | 10 +-
.../Source/Scene/ImplicitSubtreeMetadata.js | 14 +-
.../Source/Scene/ImplicitTileCoordinates.js | 27 +-
.../engine/Source/Scene/ImplicitTileset.js | 23 +-
.../Source/Scene/InstanceAttributeSemantic.js | 9 +-
.../engine/Source/Scene/IonImageryProvider.js | 22 +-
.../Source/Scene/IonWorldImageryStyle.js | 4 -
packages/engine/Source/Scene/JobScheduler.js | 29 +-
.../engine/Source/Scene/JsonMetadataTable.js | 14 +-
packages/engine/Source/Scene/KeyframeNode.js | 4 +-
packages/engine/Source/Scene/Label.js | 27 +-
.../engine/Source/Scene/LabelCollection.js | 68 +---
packages/engine/Source/Scene/LabelStyle.js | 5 -
packages/engine/Source/Scene/Light.js | 4 +-
packages/engine/Source/Scene/MapMode2D.js | 3 -
.../Source/Scene/MapboxImageryProvider.js | 12 +-
.../Scene/MapboxStyleImageryProvider.js | 13 +-
packages/engine/Source/Scene/Material.js | 371 +++++++++---------
.../engine/Source/Scene/MaterialAppearance.js | 100 ++---
packages/engine/Source/Scene/Megatexture.js | 15 +-
packages/engine/Source/Scene/MetadataClass.js | 16 +-
.../Source/Scene/MetadataClassProperty.js | 57 +--
.../Source/Scene/MetadataComponentType.js | 47 +--
.../engine/Source/Scene/MetadataEntity.js | 25 +-
packages/engine/Source/Scene/MetadataEnum.js | 20 +-
.../engine/Source/Scene/MetadataEnumValue.js | 12 +-
.../engine/Source/Scene/MetadataSchema.js | 15 +-
.../Source/Scene/MetadataSchemaLoader.js | 12 +-
.../engine/Source/Scene/MetadataSemantic.js | 21 -
packages/engine/Source/Scene/MetadataTable.js | 43 +-
.../Source/Scene/MetadataTableProperty.js | 17 +-
packages/engine/Source/Scene/MetadataType.js | 23 +-
.../Source/Scene/Model/AlphaPipelineStage.js | 2 -
.../Scene/Model/AtmospherePipelineStage.js | 2 -
.../engine/Source/Scene/Model/B3dmLoader.js | 26 +-
.../Scene/Model/BatchTexturePipelineStage.js | 6 +-
.../Scene/Model/CPUStylingPipelineStage.js | 10 +-
.../Model/ClassificationModelDrawCommand.js | 26 +-
.../Model/ClassificationPipelineStage.js | 8 +-
.../engine/Source/Scene/Model/CustomShader.js | 49 +--
.../Source/Scene/Model/CustomShaderMode.js | 7 +-
.../Scene/Model/CustomShaderPipelineStage.js | 17 +-
.../Model/CustomShaderTranslucencyMode.js | 5 -
.../Model/DequantizationPipelineStage.js | 8 +-
.../Scene/Model/FeatureIdPipelineStage.js | 12 +-
.../Source/Scene/Model/GeoJsonLoader.js | 17 +-
.../Scene/Model/GeometryPipelineStage.js | 14 +-
.../engine/Source/Scene/Model/I3dmLoader.js | 32 +-
.../Scene/Model/InstancingPipelineStage.js | 14 +-
.../Source/Scene/Model/LightingModel.js | 4 -
.../Scene/Model/LightingPipelineStage.js | 3 -
.../Scene/Model/MaterialPipelineStage.js | 20 +-
.../Scene/Model/MetadataPipelineStage.js | 17 +-
packages/engine/Source/Scene/Model/Model.js | 335 ++++------------
.../Source/Scene/Model/Model3DTileContent.js | 10 +-
.../Source/Scene/Model/ModelAlphaOptions.js | 6 +-
.../Source/Scene/Model/ModelAnimation.js | 54 +--
.../Scene/Model/ModelAnimationChannel.js | 19 +-
.../Scene/Model/ModelAnimationCollection.js | 58 +--
.../Source/Scene/Model/ModelArticulation.js | 18 +-
.../Scene/Model/ModelArticulationStage.js | 21 +-
.../Model/ModelClippingPlanesPipelineStage.js | 14 +-
.../ModelClippingPolygonsPipelineStage.js | 18 +-
.../Scene/Model/ModelColorPipelineStage.js | 14 +-
.../Source/Scene/Model/ModelDrawCommand.js | 31 +-
.../engine/Source/Scene/Model/ModelFeature.js | 39 +-
.../Source/Scene/Model/ModelFeatureTable.js | 28 +-
.../Scene/Model/ModelLightingOptions.js | 9 +-
.../Scene/Model/ModelMatrixUpdateStage.js | 15 +-
.../engine/Source/Scene/Model/ModelNode.js | 13 +-
.../Scene/Model/ModelRenderResources.js | 18 +-
.../Source/Scene/Model/ModelRuntimeNode.js | 74 +---
.../Scene/Model/ModelRuntimePrimitive.js | 33 +-
.../Source/Scene/Model/ModelSceneGraph.js | 59 +--
.../Model/ModelSilhouettePipelineStage.js | 19 +-
.../engine/Source/Scene/Model/ModelSkin.js | 16 +-
.../Scene/Model/ModelSplitterPipelineStage.js | 12 +-
.../Source/Scene/Model/ModelStatistics.js | 20 +-
.../engine/Source/Scene/Model/ModelType.js | 7 -
.../engine/Source/Scene/Model/ModelUtility.js | 30 +-
.../Scene/Model/MorphTargetsPipelineStage.js | 10 +-
.../Source/Scene/Model/NodeRenderResources.js | 31 +-
.../Model/NodeStatisticsPipelineStage.js | 2 -
.../Scene/Model/PickingPipelineStage.js | 3 +-
.../engine/Source/Scene/Model/PntsLoader.js | 12 +-
.../Model/PointCloudStylingPipelineStage.js | 16 +-
.../Scene/Model/PrimitiveOutlineGenerator.js | 61 +--
.../Model/PrimitiveOutlinePipelineStage.js | 2 -
.../Scene/Model/PrimitiveRenderResources.js | 52 +--
.../Model/PrimitiveStatisticsPipelineStage.js | 2 -
.../Scene/Model/SceneMode2DPipelineStage.js | 12 +-
.../Model/SelectedFeatureIdPipelineStage.js | 14 +-
.../Scene/Model/SkinningPipelineStage.js | 7 +-
.../Source/Scene/Model/StyleCommandsNeeded.js | 3 +-
.../Source/Scene/Model/TextureManager.js | 15 +-
.../Source/Scene/Model/TextureUniform.js | 17 +-
.../Scene/Model/TilesetPipelineStage.js | 10 +-
.../engine/Source/Scene/Model/UniformType.js | 17 -
.../engine/Source/Scene/Model/VaryingType.js | 9 -
.../VerticalExaggerationPipelineStage.js | 3 -
.../Scene/Model/WireframePipelineStage.js | 8 +-
.../Source/Scene/Model/buildDrawCommand.js | 4 +-
.../engine/Source/Scene/Model/pickModel.js | 8 +-
.../engine/Source/Scene/ModelAnimationLoop.js | 5 -
.../engine/Source/Scene/ModelComponents.js | 255 ++----------
packages/engine/Source/Scene/Moon.js | 27 +-
.../Source/Scene/Multiple3DTileContent.js | 41 +-
.../Source/Scene/NeverTileDiscardPolicy.js | 6 +-
packages/engine/Source/Scene/OIT.js | 2 +-
.../Scene/OctahedralProjectedCubeMap.js | 10 +-
.../Scene/OpenStreetMapImageryProvider.js | 12 +-
.../Scene/OrderedGroundPrimitiveCollection.js | 23 +-
packages/engine/Source/Scene/Particle.js | 22 +-
packages/engine/Source/Scene/ParticleBurst.js | 10 +-
.../engine/Source/Scene/ParticleEmitter.js | 7 +-
.../engine/Source/Scene/ParticleSystem.js | 30 +-
.../Scene/PerInstanceColorAppearance.js | 44 +--
.../engine/Source/Scene/PerformanceDisplay.js | 5 +-
.../engine/Source/Scene/PickFramebuffer.js | 3 +-
packages/engine/Source/Scene/Picking.js | 10 +-
packages/engine/Source/Scene/PntsParser.js | 5 +-
packages/engine/Source/Scene/PointCloud.js | 7 +-
.../Source/Scene/PointCloudEyeDomeLighting.js | 8 +-
.../engine/Source/Scene/PointCloudShading.js | 22 +-
.../engine/Source/Scene/PointPrimitive.js | 27 +-
.../Source/Scene/PointPrimitiveCollection.js | 66 +---
packages/engine/Source/Scene/Polyline.js | 7 +-
.../engine/Source/Scene/PolylineCollection.js | 97 ++---
.../Source/Scene/PolylineColorAppearance.js | 31 +-
.../Scene/PolylineMaterialAppearance.js | 35 +-
.../engine/Source/Scene/PostProcessStage.js | 44 +--
.../Scene/PostProcessStageCollection.js | 49 +--
.../Source/Scene/PostProcessStageComposite.js | 36 +-
.../Source/Scene/PostProcessStageLibrary.js | 56 +--
.../Scene/PostProcessStageSampleMode.js | 3 -
.../Scene/PostProcessStageTextureCache.js | 20 +-
packages/engine/Source/Scene/Primitive.js | 80 +---
.../Source/Scene/PrimitiveCollection.js | 85 ++--
.../engine/Source/Scene/PrimitiveLoadPlan.js | 27 +-
.../engine/Source/Scene/PrimitivePipeline.js | 10 +
.../engine/Source/Scene/PropertyAttribute.js | 18 +-
.../Source/Scene/PropertyAttributeProperty.js | 12 +-
packages/engine/Source/Scene/PropertyTable.js | 32 +-
.../engine/Source/Scene/PropertyTexture.js | 13 +-
.../Source/Scene/PropertyTextureProperty.js | 15 +-
.../engine/Source/Scene/QuadtreeOccluders.js | 7 +-
.../engine/Source/Scene/QuadtreePrimitive.js | 41 +-
packages/engine/Source/Scene/QuadtreeTile.js | 8 +-
.../Source/Scene/QuadtreeTileProvider.js | 31 +-
packages/engine/Source/Scene/ResourceCache.js | 64 +--
.../engine/Source/Scene/ResourceCacheKey.js | 39 +-
.../Source/Scene/ResourceCacheStatistics.js | 11 +-
.../engine/Source/Scene/ResourceLoader.js | 17 +-
.../Source/Scene/ResourceLoaderState.js | 9 +-
packages/engine/Source/Scene/SDFSettings.js | 5 -
packages/engine/Source/Scene/Scene.js | 277 +++----------
packages/engine/Source/Scene/SceneMode.js | 6 -
.../engine/Source/Scene/SceneTransforms.js | 22 +-
.../engine/Source/Scene/SceneTransitioner.js | 6 +-
.../Scene/ScreenSpaceCameraController.js | 11 +-
.../Scene/SensorVolumePortionToDisplay.js | 20 +-
packages/engine/Source/Scene/ShadowMap.js | 24 +-
packages/engine/Source/Scene/ShadowMode.js | 9 +-
.../Source/Scene/ShadowVolumeAppearance.js | 20 +-
.../Source/Scene/SingleTileImageryProvider.js | 19 +-
packages/engine/Source/Scene/SkyAtmosphere.js | 27 +-
packages/engine/Source/Scene/SkyBox.js | 26 +-
packages/engine/Source/Scene/SpatialNode.js | 5 +-
packages/engine/Source/Scene/SphereEmitter.js | 7 +-
.../engine/Source/Scene/SplitDirection.js | 5 -
packages/engine/Source/Scene/Splitter.js | 3 +-
.../engine/Source/Scene/StencilConstants.js | 1 -
.../engine/Source/Scene/StencilFunction.js | 9 -
.../engine/Source/Scene/StencilOperation.js | 9 -
.../engine/Source/Scene/StructuralMetadata.js | 17 +-
.../engine/Source/Scene/StyleExpression.js | 11 +-
packages/engine/Source/Scene/Sun.js | 19 +-
packages/engine/Source/Scene/SunLight.js | 8 +-
.../Source/Scene/SupportedImageFormats.js | 6 +-
packages/engine/Source/Scene/Terrain.js | 33 +-
packages/engine/Source/Scene/TextureAtlas.js | 29 +-
.../engine/Source/Scene/TileBoundingRegion.js | 28 +-
.../engine/Source/Scene/TileBoundingS2Cell.js | 39 +-
.../engine/Source/Scene/TileBoundingSphere.js | 23 +-
.../engine/Source/Scene/TileBoundingVolume.js | 14 +-
.../Scene/TileCoordinatesImageryProvider.js | 10 +-
.../engine/Source/Scene/TileDiscardPolicy.js | 7 +-
packages/engine/Source/Scene/TileImagery.js | 3 -
.../Scene/TileMapServiceImageryProvider.js | 25 +-
packages/engine/Source/Scene/TileMetadata.js | 14 +-
.../Source/Scene/TileOrientedBoundingBox.js | 18 +-
.../Source/Scene/TileReplacementQueue.js | 3 -
.../Source/Scene/TileSelectionResult.js | 1 -
.../Source/Scene/Tileset3DTileContent.js | 12 +-
.../engine/Source/Scene/TilesetMetadata.js | 14 +-
.../engine/Source/Scene/TimeDynamicImagery.js | 7 +-
.../Source/Scene/TimeDynamicPointCloud.js | 39 +-
packages/engine/Source/Scene/Tonemapper.js | 6 +-
.../Scene/TranslucentTileClassification.js | 3 +-
.../engine/Source/Scene/TweenCollection.js | 83 ++--
.../Scene/UrlTemplateImageryProvider.js | 13 +-
.../engine/Source/Scene/Vector3DTileBatch.js | 5 +-
.../Scene/Vector3DTileClampedPolylines.js | 20 +-
.../Source/Scene/Vector3DTileContent.js | 11 +-
.../Source/Scene/Vector3DTileGeometry.js | 18 +-
.../engine/Source/Scene/Vector3DTilePoints.js | 19 +-
.../Source/Scene/Vector3DTilePolygons.js | 22 +-
.../Source/Scene/Vector3DTilePolylines.js | 20 +-
.../Source/Scene/Vector3DTilePrimitive.js | 20 +-
.../Source/Scene/VertexAttributeSemantic.js | 25 --
.../engine/Source/Scene/VerticalOrigin.js | 6 -
packages/engine/Source/Scene/View.js | 3 +
packages/engine/Source/Scene/ViewportQuad.js | 25 +-
packages/engine/Source/Scene/VoxelBoxShape.js | 17 +-
packages/engine/Source/Scene/VoxelCell.js | 28 +-
packages/engine/Source/Scene/VoxelContent.js | 12 +-
.../engine/Source/Scene/VoxelCylinderShape.js | 19 +-
.../Source/Scene/VoxelEllipsoidShape.js | 17 +-
.../engine/Source/Scene/VoxelPrimitive.js | 75 +---
packages/engine/Source/Scene/VoxelProvider.js | 22 +-
.../Source/Scene/VoxelRenderResources.js | 6 +-
packages/engine/Source/Scene/VoxelShape.js | 16 +-
.../engine/Source/Scene/VoxelShapeType.js | 7 -
.../engine/Source/Scene/VoxelTraversal.js | 28 +-
.../Scene/WebMapServiceImageryProvider.js | 33 +-
.../Scene/WebMapTileServiceImageryProvider.js | 15 +-
.../Source/Scene/buildVoxelDrawCommands.js | 2 -
.../Scene/computeFlyToLocationForRectangle.js | 3 -
.../Scene/createBillboardPointCallback.js | 4 +-
.../Scene/createElevationBandMaterial.js | 7 -
.../createGooglePhotorealistic3DTileset.js | 7 +-
.../Source/Scene/createOsmBuildingsAsync.js | 11 +-
.../Scene/createTangentSpaceDebugPrimitive.js | 7 +-
.../Source/Scene/createWorldImageryAsync.js | 9 +-
.../Source/Scene/findContentMetadata.js | 4 +-
.../engine/Source/Scene/findGroupMetadata.js | 4 +-
.../engine/Source/Scene/findTileMetadata.js | 3 +-
.../engine/Source/Scene/getBinaryAccessor.js | 1 +
.../Source/Scene/getClipAndStyleCode.js | 1 -
.../Source/Scene/getClippingFunction.js | 1 -
.../engine/Source/Scene/parseBatchTable.js | 20 +-
.../Scene/parseFeatureMetadataLegacy.js | 3 +-
.../Source/Scene/parseStructuralMetadata.js | 3 +-
.../Source/Scene/preprocess3DTileContent.js | 4 +-
.../Source/Scene/processVoxelProperties.js | 17 -
packages/engine/Source/Widget/CesiumWidget.js | 36 +-
.../Workers/createTaskProcessorWorker.js | 8 -
packages/engine/Specs/Scene/GlobeSpec.js | 1 +
.../Scene/GlobeSurfaceTileProviderSpec.js | 1 +
packages/engine/Specs/Scene/GltfBuilder.js | 2 +-
.../Specs/Scene/ImageryLayerCollectionSpec.js | 6 +-
.../Scene/ImplicitTileCoordinatesSpec.js | 4 +-
.../engine/Specs/createWebglVersionHelper.js | 2 -
.../widgets/Source/Animation/Animation.js | 13 +-
.../Source/Animation/AnimationViewModel.js | 17 +-
.../Source/BaseLayerPicker/BaseLayerPicker.js | 16 +-
.../BaseLayerPickerViewModel.js | 14 +-
.../BaseLayerPicker/ProviderViewModel.js | 5 +-
.../Cesium3DTilesInspector.js | 6 +-
.../Cesium3DTilesInspectorViewModel.js | 48 +--
.../Source/CesiumInspector/CesiumInspector.js | 7 +-
.../CesiumInspectorViewModel.js | 26 +-
packages/widgets/Source/ClockViewModel.js | 4 +-
packages/widgets/Source/Command.js | 3 +-
.../FullscreenButton/FullscreenButton.js | 12 +-
.../FullscreenButtonViewModel.js | 10 +-
packages/widgets/Source/Geocoder/Geocoder.js | 13 +-
.../Source/Geocoder/GeocoderViewModel.js | 16 +-
.../widgets/Source/HomeButton/HomeButton.js | 6 +-
.../Source/HomeButton/HomeButtonViewModel.js | 7 +-
.../I3SBuildingSceneLayerExplorer.js | 5 +-
.../I3SBuildingSceneLayerExplorerViewModel.js | 3 +-
packages/widgets/Source/InfoBox/InfoBox.js | 10 +-
.../Source/InfoBox/InfoBoxViewModel.js | 2 +-
packages/widgets/Source/InspectorShared.js | 8 +-
.../NavigationHelpButton.js | 12 +-
.../NavigationHelpButtonViewModel.js | 6 +-
.../PerformanceWatchdog.js | 8 +-
.../PerformanceWatchdogViewModel.js | 6 +-
.../ProjectionPicker/ProjectionPicker.js | 10 +-
.../ProjectionPickerViewModel.js | 7 +-
.../Source/SceneModePicker/SceneModePicker.js | 12 +-
.../SceneModePickerViewModel.js | 9 +-
.../SelectionIndicator/SelectionIndicator.js | 9 +-
.../SelectionIndicatorViewModel.js | 10 +-
.../widgets/Source/SvgPathBindingHandler.js | 3 +-
packages/widgets/Source/Timeline/Timeline.js | 21 +-
.../Source/Timeline/TimelineHighlightRange.js | 3 +
.../widgets/Source/Timeline/TimelineTrack.js | 4 +
.../widgets/Source/ToggleButtonViewModel.js | 7 +-
packages/widgets/Source/VRButton/VRButton.js | 11 +-
.../Source/VRButton/VRButtonViewModel.js | 10 +-
packages/widgets/Source/Viewer/Viewer.js | 48 +--
.../viewerCesium3DTilesInspectorMixin.js | 2 -
.../Viewer/viewerCesiumInspectorMixin.js | 6 +-
.../Source/Viewer/viewerDragDropMixin.js | 16 +-
.../Viewer/viewerPerformanceWatchdogMixin.js | 7 +-
.../Viewer/viewerVoxelInspectorMixin.js | 2 -
.../Source/VoxelInspector/VoxelInspector.js | 6 +-
.../VoxelInspector/VoxelInspectorViewModel.js | 5 +-
packages/widgets/Source/createCommand.js | 4 +-
.../widgets/Source/subscribeAndEvaluate.js | 5 +-
857 files changed, 4255 insertions(+), 13392 deletions(-)
diff --git a/Apps/Sandcastle/gallery/Custom DataSource.html b/Apps/Sandcastle/gallery/Custom DataSource.html
index 1b24d40d6411..41b07bb8cab5 100644
--- a/Apps/Sandcastle/gallery/Custom DataSource.html
+++ b/Apps/Sandcastle/gallery/Custom DataSource.html
@@ -39,11 +39,9 @@
* This class is an example of a custom DataSource. It loads JSON data as
* defined by Google's WebGL Globe, https://github.com/dataarts/webgl-globe.
* @alias WebGLGlobeDataSource
- * @constructor
- *
+ * @class
* @param {string} [name] The name of this data source. If undefined, a name
* will be derived from the url.
- *
* @example
* const dataSource = new Cesium.WebGLGlobeDataSource();
* dataSource.loadUrl('sample.json');
@@ -70,7 +68,7 @@
/**
* Gets a human-readable name for this instance.
* @memberof WebGLGlobeDataSource.prototype
- * @type {String}
+ * @type {string}
*/
name: {
get: function () {
@@ -99,7 +97,7 @@
/**
* Gets a value indicating if the data source is currently loading data.
* @memberof WebGLGlobeDataSource.prototype
- * @type {Boolean}
+ * @type {boolean}
*/
isLoading: {
get: function () {
@@ -156,7 +154,7 @@
* so that only one series is viewed at a time. Valid values are defined
* in the seriesNames property.
* @memberof WebGLGlobeDataSource.prototype
- * @type {String}
+ * @type {string}
*/
seriesToDisplay: {
get: function () {
@@ -180,7 +178,7 @@
/**
* Gets or sets the scale factor applied to the height of each line.
* @memberof WebGLGlobeDataSource.prototype
- * @type {Number}
+ * @type {number}
*/
heightScale: {
get: function () {
@@ -196,7 +194,7 @@
/**
* Gets whether or not this data source should be displayed.
* @memberof WebGLGlobeDataSource.prototype
- * @type {Boolean}
+ * @type {boolean}
*/
show: {
get: function () {
diff --git a/Apps/Sandcastle/gallery/Custom Geocoder.html b/Apps/Sandcastle/gallery/Custom Geocoder.html
index 41b486948117..50ea8b934102 100644
--- a/Apps/Sandcastle/gallery/Custom Geocoder.html
+++ b/Apps/Sandcastle/gallery/Custom Geocoder.html
@@ -48,13 +48,12 @@
/**
* This class is an example of a custom geocoder. It provides geocoding through the OpenStreetMap Nominatim service.
* @alias OpenStreetMapNominatimGeocoder
- * @constructor
+ * @class
*/
function OpenStreetMapNominatimGeocoder() {}
/**
* The function called to geocode using this geocoder service.
- *
* @param {string} input The query to be sent to the geocoder service
* @returns {Promise}
*/
diff --git a/Apps/Sandcastle/gallery/development/Custom Primitive.html b/Apps/Sandcastle/gallery/development/Custom Primitive.html
index 7218987c7e94..ee89236af420 100644
--- a/Apps/Sandcastle/gallery/development/Custom Primitive.html
+++ b/Apps/Sandcastle/gallery/development/Custom Primitive.html
@@ -47,6 +47,7 @@
* Simple example of writing a Primitive from scratch. This
* primitive displays a procedurally-generated surface at a given
* position on the globe.
+ * @param cartographicPosition
*/
function CustomPrimitive(cartographicPosition) {
this.show = true;
@@ -84,6 +85,8 @@
/**
* generate a quad that's subdivided into faceResolution x faceResolution quads.
* The vertices will be adjusted in the vertex shader.
+ * @param faceResolution
+ * @param halfWidthMeters
*/
function generateVertices(faceResolution, halfWidthMeters) {
const vertexResolution = faceResolution + 1;
@@ -109,6 +112,7 @@
/**
* Tessellate a big square region into faceResolution x faceResolution quads
+ * @param faceResolution
*/
function generateIndices(faceResolution) {
const indicesPerQuad = 6;
@@ -141,6 +145,7 @@
const scratchColor = new Cesium.Color();
/**
* Generate a 1D texture for the color palette
+ * @param context
*/
function generateTexture(context) {
const width = 256;
diff --git a/Specs/ImplicitTilingTester.js b/Specs/ImplicitTilingTester.js
index 7513a4b497de..226c533cbc8e 100644
--- a/Specs/ImplicitTilingTester.js
+++ b/Specs/ImplicitTilingTester.js
@@ -45,15 +45,13 @@ function ImplicitTilingTester() {}
* @property {Uint8Array} [subtreeJson] The JSON portion of the subtree file. Mutually exclusive with subtreeBuffer.
* @property {Uint8Array} [subtreeBuffer] A typed array storing the contents of the subtree file (including the internal buffer). Mutually exclusive with subtreeJson.
* @property {Uint8Array} externalBuffer A typed array representing an external .bin file. This is always returned, but it may be an empty typed array.
-
*/
/**
* Generate a subtree buffer
* @param {SubtreeDescription} subtreeDescription A JSON description of the subtree's structure and values
* @param {boolean} constantOnly true if all the bitstreams are constant, i.e. no buffers/bufferViews are needed.
- * @return {GeneratedSubtree} The procedurally generated subtree and an external buffer.
- *
+ * @returns {GeneratedSubtree} The procedurally generated subtree and an external buffer.
* @example
* const subtreeDescription = {
* tileAvailability: {
@@ -80,7 +78,6 @@ function ImplicitTilingTester() {}
* const results = ImplicitTilingTester.generateSubtreeBuffers(
* subtreeDescription
* );
- *
* @private
*/
ImplicitTilingTester.generateSubtreeBuffers = function (
diff --git a/Specs/getArguments.js b/Specs/getArguments.js
index f33f457ea2f1..c4dc23cb028c 100644
--- a/Specs/getArguments.js
+++ b/Specs/getArguments.js
@@ -11,7 +11,7 @@
* constructor, so it never compares Jasmine-equal to an array. This function lets
* us create an arguments array.
* @alias getArguments
- * @return {Array} The arguments passed to the function.
+ * @returns {Array} The arguments passed to the function.
*/
function getArguments() {
return arguments;
diff --git a/eslint.config.js b/eslint.config.js
index c8ec3d9bd70c..91b4a9370e4c 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -1,6 +1,7 @@
import globals from "globals";
import html from "eslint-plugin-html";
import configCesium from "eslint-config-cesium";
+import jsdoc from "eslint-plugin-jsdoc";
export default [
{
@@ -42,13 +43,33 @@ export default [
{
files: ["packages/**/*.js", "Apps/**/*.js", "Specs/**/*.js", "**/*.html"],
...configCesium.configs.browser,
- plugins: { html },
+ plugins: { html, jsdoc },
rules: {
...configCesium.configs.browser.rules,
+ ...jsdoc.configs["flat/recommended-error"].rules,
"no-unused-vars": [
"error",
{ vars: "all", args: "none", caughtErrors: "none" },
],
+ "jsdoc/require-jsdoc": "off", // Only lint existing jsdoc
+ "jsdoc/no-undefined-types": "off", // Ignore types for now
+ "jsdoc/require-returns": "off",
+ "jsdoc/require-returns-description": "off",
+ "jsdoc/require-returns-type": "off",
+ "jsdoc/require-returns-check": "off",
+ "jsdoc/require-param-type": "off",
+ "jsdoc/require-param-description": "off",
+ "jsdoc/require-property-description": "off",
+ "jsdoc/require-description": "off",
+ "jsdoc/check-param-names": "off",
+ "jsdoc/check-property-names": "off",
+ "jsdoc/check-types": "off",
+ "jsdoc/valid-types": "off",
+ "jsdoc/tag-lines": "off",
+ "jsdoc/check-tag-names": "off",
+ "jsdoc/no-defaults": "off",
+ "jsdoc/no-multi-asterisks": "off",
+ "jsdoc/check-access": "off",
},
},
{
diff --git a/package.json b/package.json
index 3df63d5c8689..eea07b01b8a7 100644
--- a/package.json
+++ b/package.json
@@ -62,6 +62,7 @@
"eslint": "^9.1.1",
"eslint-config-cesium": "^11.0.1",
"eslint-plugin-html": "^8.1.1",
+ "eslint-plugin-jsdoc": "^48.2.7",
"express": "^4.17.1",
"globals": "^15.1.0",
"globby": "^14.0.0",
diff --git a/packages/engine/Source/Core/ApproximateTerrainHeights.js b/packages/engine/Source/Core/ApproximateTerrainHeights.js
index 6b1891ddc827..d8f4c49a7d9c 100644
--- a/packages/engine/Source/Core/ApproximateTerrainHeights.js
+++ b/packages/engine/Source/Core/ApproximateTerrainHeights.js
@@ -36,7 +36,7 @@ const ApproximateTerrainHeights = {};
/**
* Initializes the minimum and maximum terrain heights
- * @return {Promise}
+ * @returns {Promise}
*/
ApproximateTerrainHeights.initialize = function () {
let initPromise = ApproximateTerrainHeights._initPromise;
@@ -56,8 +56,8 @@ ApproximateTerrainHeights.initialize = function () {
/**
* Computes the minimum and maximum terrain heights for a given rectangle
* @param {Rectangle} rectangle The bounding rectangle
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid
- * @return {{minimumTerrainHeight: number, maximumTerrainHeight: number}}
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid
+ * @returns {{minimumTerrainHeight: number, maximumTerrainHeight: number}}
*/
ApproximateTerrainHeights.getMinimumMaximumHeights = function (
rectangle,
@@ -130,8 +130,8 @@ ApproximateTerrainHeights.getMinimumMaximumHeights = function (
/**
* Computes the bounding sphere based on the tile heights in the rectangle
* @param {Rectangle} rectangle The bounding rectangle
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid
- * @return {BoundingSphere} The result bounding sphere
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid
+ * @returns {BoundingSphere} The result bounding sphere
*/
ApproximateTerrainHeights.getBoundingSphere = function (rectangle, ellipsoid) {
//>>includeStart('debug', pragmas.debug);
diff --git a/packages/engine/Source/Core/ArcGISTiledElevationTerrainProvider.js b/packages/engine/Source/Core/ArcGISTiledElevationTerrainProvider.js
index 3c5fa226f157..f06c4da1b81e 100644
--- a/packages/engine/Source/Core/ArcGISTiledElevationTerrainProvider.js
+++ b/packages/engine/Source/Core/ArcGISTiledElevationTerrainProvider.js
@@ -22,10 +22,9 @@ import WebMercatorTilingScheme from "./WebMercatorTilingScheme.js";
const ALL_CHILDREN = 15;
/**
- * @typedef {Object} ArcGISTiledElevationTerrainProvider.ConstructorOptions
+ * @typedef {object} ArcGISTiledElevationTerrainProvider.ConstructorOptions
*
* Initialization options for the ArcGISTiledElevationTerrainProvider constructor
- *
* @property {string} [token] The authorization token to use to connect to the service.
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If the tilingScheme is specified,
* this parameter is ignored and the tiling scheme's ellipsoid is used instead.
@@ -34,10 +33,8 @@ const ALL_CHILDREN = 15;
/**
* Used to track creation details while fetching initial metadata
- *
- * @constructor
+ * @class
* @private
- *
* @param {ArcGISTiledElevationTerrainProvider.ConstructorOptions} [options] An object describing initialization options.
*/
function TerrainProviderBuilder(options) {
@@ -58,9 +55,7 @@ function TerrainProviderBuilder(options) {
/**
* Complete ArcGISTiledElevationTerrainProvider creation based on builder values.
- *
* @private
- *
* @param {ArcGISTiledElevationTerrainProvider} provider
*/
TerrainProviderBuilder.prototype.build = function (provider) {
@@ -217,18 +212,14 @@ async function requestMetadata(
*
* A {@link TerrainProvider} that produces terrain geometry by tessellating height maps
* retrieved from Elevation Tiles of an an ArcGIS ImageService.
- *
* @alias ArcGISTiledElevationTerrainProvider
- * @constructor
- *
+ * @class
* @param {CesiumTerrainProvider.ConstructorOptions} [options] A url or an object describing initialization options
- *
* @example
* const terrainProvider = await Cesium.ArcGISTiledElevationTerrainProvider.fromUrl("https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer", {
* token: "KED1aF_I4UzXOHy3BnhwyBHU4l5oY6rO6walkmHoYqGp4XyIWUd5YZUC1ZrLAzvV40pR6gBXQayh0eFA8m6vPg.."
* });
* viewer.terrainProvider = terrainProvider;
- *
* @see TerrainProvider
*/
function ArcGISTiledElevationTerrainProvider(options) {
@@ -336,19 +327,16 @@ Object.defineProperties(ArcGISTiledElevationTerrainProvider.prototype, {
/**
* Creates a {@link TerrainProvider} that produces terrain geometry by tessellating height maps
* retrieved from Elevation Tiles of an an ArcGIS ImageService.
- *
- * @param {Resource|String|Promise|Promise} url The URL of the ArcGIS ImageServer service.
+ * @param {Resource | string | Promise | Promise} url The URL of the ArcGIS ImageServer service.
* @param {ArcGISTiledElevationTerrainProvider.ConstructorOptions} [options] A url or an object describing initialization options.
* @returns {Promise}
- *
* @example
* const terrainProvider = await Cesium.ArcGISTiledElevationTerrainProvider.fromUrl("https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer", {
* token: "KED1aF_I4UzXOHy3BnhwyBHU4l5oY6rO6walkmHoYqGp4XyIWUd5YZUC1ZrLAzvV40pR6gBXQayh0eFA8m6vPg.."
* });
* viewer.terrainProvider = terrainProvider;
- *
- * @exception {RuntimeError} metadata specifies invalid spatial reference
- * @exception {RuntimeError} metadata does not specify tileInfo
+ * @throws {RuntimeError} metadata specifies invalid spatial reference
+ * @throws {RuntimeError} metadata does not specify tileInfo
*/
ArcGISTiledElevationTerrainProvider.fromUrl = async function (url, options) {
//>>includeStart('debug', pragmas.debug);
@@ -387,7 +375,6 @@ ArcGISTiledElevationTerrainProvider.fromUrl = async function (url, options) {
/**
* Requests the geometry for a given tile. The result includes terrain
* data and indicates that all child tiles are available.
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -491,7 +478,6 @@ function isTileAvailable(that, level, x, y) {
/**
* Gets the maximum geometric error allowed in a tile at a given level.
- *
* @param {number} level The tile level for which to get the maximum geometric error.
* @returns {number} The maximum geometric error.
*/
@@ -503,7 +489,6 @@ ArcGISTiledElevationTerrainProvider.prototype.getLevelMaximumGeometricError = fu
/**
* Determines whether data for a tile is available to be loaded.
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -530,7 +515,6 @@ ArcGISTiledElevationTerrainProvider.prototype.getTileDataAvailable = function (
/**
* Makes sure we load availability data for a tile
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
diff --git a/packages/engine/Source/Core/ArcType.js b/packages/engine/Source/Core/ArcType.js
index a1b9f80a8038..248c8c863031 100644
--- a/packages/engine/Source/Core/ArcType.js
+++ b/packages/engine/Source/Core/ArcType.js
@@ -1,12 +1,10 @@
/**
* ArcType defines the path that should be taken connecting vertices.
- *
* @enum {number}
*/
const ArcType = {
/**
* Straight line that does not conform to the surface of the ellipsoid.
- *
* @type {number}
* @constant
*/
@@ -14,7 +12,6 @@ const ArcType = {
/**
* Follow geodesic path.
- *
* @type {number}
* @constant
*/
@@ -22,7 +19,6 @@ const ArcType = {
/**
* Follow rhumb or loxodrome path.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/ArticulationStageType.js b/packages/engine/Source/Core/ArticulationStageType.js
index 7c4c64c303e9..6235937593f4 100644
--- a/packages/engine/Source/Core/ArticulationStageType.js
+++ b/packages/engine/Source/Core/ArticulationStageType.js
@@ -1,10 +1,8 @@
/**
* An enum describing the type of motion that is defined by an articulation stage
* in the AGI_articulations extension.
- *
* @alias {ArticulationStageType}
* @enum {string}
- *
* @private
*/
const ArticulationStageType = {
diff --git a/packages/engine/Source/Core/AssociativeArray.js b/packages/engine/Source/Core/AssociativeArray.js
index 1012807e8c09..bfb991359061 100644
--- a/packages/engine/Source/Core/AssociativeArray.js
+++ b/packages/engine/Source/Core/AssociativeArray.js
@@ -5,7 +5,7 @@ import DeveloperError from "./DeveloperError.js";
* A collection of key-value pairs that is stored as a hash for easy
* lookup but also provides an array for fast iteration.
* @alias AssociativeArray
- * @constructor
+ * @class
*/
function AssociativeArray() {
this._array = [];
@@ -16,7 +16,6 @@ Object.defineProperties(AssociativeArray.prototype, {
/**
* Gets the number of items in the collection.
* @memberof AssociativeArray.prototype
- *
* @type {number}
*/
length: {
@@ -29,7 +28,6 @@ Object.defineProperties(AssociativeArray.prototype, {
* This is a live array that will automatically reflect the values in the collection,
* it should not be modified directly.
* @memberof AssociativeArray.prototype
- *
* @type {Array}
*/
values: {
@@ -41,7 +39,6 @@ Object.defineProperties(AssociativeArray.prototype, {
/**
* Determines if the provided key is in the array.
- *
* @param {string|number} key The key to check.
* @returns {boolean} true
if the key is in the array, false
otherwise.
*/
@@ -57,7 +54,6 @@ AssociativeArray.prototype.contains = function (key) {
/**
* Associates the provided key with the provided value. If the key already
* exists, it is overwritten with the new value.
- *
* @param {string|number} key A unique identifier.
* @param {*} value The value to associate with the provided key.
*/
@@ -78,7 +74,6 @@ AssociativeArray.prototype.set = function (key, value) {
/**
* Retrieves the value associated with the provided key.
- *
* @param {string|number} key The key whose value is to be retrieved.
* @returns {*} The associated value, or undefined if the key does not exist in the collection.
*/
@@ -93,7 +88,6 @@ AssociativeArray.prototype.get = function (key) {
/**
* Removes a key-value pair from the collection.
- *
* @param {string|number} key The key to be removed.
* @returns {boolean} True if it was removed, false if the key was not in the collection.
*/
diff --git a/packages/engine/Source/Core/AttributeCompression.js b/packages/engine/Source/Core/AttributeCompression.js
index b6b521cc0097..2b3e111ad1d4 100644
--- a/packages/engine/Source/Core/AttributeCompression.js
+++ b/packages/engine/Source/Core/AttributeCompression.js
@@ -12,9 +12,7 @@ const LEFT_SHIFT = 256.0;
/**
* Attribute compression and decompression functions.
- *
* @namespace AttributeCompression
- *
* @private
*/
const AttributeCompression = {};
@@ -25,14 +23,11 @@ const AttributeCompression = {};
* Oct encoding is a compact representation of unit length vectors.
* The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
* Cigolle et al 2014: {@link http://jcgt.org/published/0003/02/01/}
- *
* @param {Cartesian3} vector The normalized vector to be compressed into 2 component 'oct' encoding.
* @param {Cartesian2} result The 2 component oct-encoded unit length vector.
* @param {number} rangeMax The maximum value of the SNORM range. The encoded vector is stored in log2(rangeMax+1) bits.
* @returns {Cartesian2} The 2 component oct-encoded unit length vector.
- *
- * @exception {DeveloperError} vector must be normalized.
- *
+ * @throws {DeveloperError} vector must be normalized.
* @see AttributeCompression.octDecodeInRange
*/
AttributeCompression.octEncodeInRange = function (vector, rangeMax, result) {
@@ -64,13 +59,10 @@ AttributeCompression.octEncodeInRange = function (vector, rangeMax, result) {
/**
* Encodes a normalized vector into 2 SNORM values in the range of [0-255] following the 'oct' encoding.
- *
* @param {Cartesian3} vector The normalized vector to be compressed into 2 byte 'oct' encoding.
* @param {Cartesian2} result The 2 byte oct-encoded unit length vector.
* @returns {Cartesian2} The 2 byte oct-encoded unit length vector.
- *
- * @exception {DeveloperError} vector must be normalized.
- *
+ * @throws {DeveloperError} vector must be normalized.
* @see AttributeCompression.octEncodeInRange
* @see AttributeCompression.octDecode
*/
@@ -88,9 +80,7 @@ function forceUint8(value) {
* @param {Cartesian3} vector The normalized vector to be compressed into 4 byte 'oct' encoding.
* @param {Cartesian4} result The 4 byte oct-encoded unit length vector.
* @returns {Cartesian4} The 4 byte oct-encoded unit length vector.
- *
- * @exception {DeveloperError} vector must be normalized.
- *
+ * @throws {DeveloperError} vector must be normalized.
* @see AttributeCompression.octEncodeInRange
* @see AttributeCompression.octDecodeFromCartesian4
*/
@@ -105,15 +95,12 @@ AttributeCompression.octEncodeToCartesian4 = function (vector, result) {
/**
* Decodes a unit-length vector in 'oct' encoding to a normalized 3-component vector.
- *
* @param {number} x The x component of the oct-encoded unit length vector.
* @param {number} y The y component of the oct-encoded unit length vector.
* @param {number} rangeMax The maximum value of the SNORM range. The encoded vector is stored in log2(rangeMax+1) bits.
* @param {Cartesian3} result The decoded and normalized vector
* @returns {Cartesian3} The decoded and normalized vector.
- *
- * @exception {DeveloperError} x and y must be unsigned normalized integers between 0 and rangeMax.
- *
+ * @throws {DeveloperError} x and y must be unsigned normalized integers between 0 and rangeMax.
* @see AttributeCompression.octEncodeInRange
*/
AttributeCompression.octDecodeInRange = function (x, y, rangeMax, result) {
@@ -141,14 +128,11 @@ AttributeCompression.octDecodeInRange = function (x, y, rangeMax, result) {
/**
* Decodes a unit-length vector in 2 byte 'oct' encoding to a normalized 3-component vector.
- *
* @param {number} x The x component of the oct-encoded unit length vector.
* @param {number} y The y component of the oct-encoded unit length vector.
* @param {Cartesian3} result The decoded and normalized vector.
* @returns {Cartesian3} The decoded and normalized vector.
- *
- * @exception {DeveloperError} x and y must be an unsigned normalized integer between 0 and 255.
- *
+ * @throws {DeveloperError} x and y must be an unsigned normalized integer between 0 and 255.
* @see AttributeCompression.octDecodeInRange
*/
AttributeCompression.octDecode = function (x, y, result) {
@@ -157,13 +141,10 @@ AttributeCompression.octDecode = function (x, y, result) {
/**
* Decodes a unit-length vector in 4 byte 'oct' encoding to a normalized 3-component vector.
- *
* @param {Cartesian4} encoded The oct-encoded unit length vector.
* @param {Cartesian3} result The decoded and normalized vector.
* @returns {Cartesian3} The decoded and normalized vector.
- *
- * @exception {DeveloperError} x, y, z, and w must be unsigned normalized integers between 0 and 255.
- *
+ * @throws {DeveloperError} x, y, z, and w must be unsigned normalized integers between 0 and 255.
* @see AttributeCompression.octDecodeInRange
* @see AttributeCompression.octEncodeToCartesian4
*/
@@ -200,10 +181,8 @@ AttributeCompression.octDecodeFromCartesian4 = function (encoded, result) {
/**
* Packs an oct encoded vector into a single floating-point number.
- *
* @param {Cartesian2} encoded The oct encoded vector.
* @returns {number} The oct encoded vector packed into a single float.
- *
*/
AttributeCompression.octPackFloat = function (encoded) {
//>>includeStart('debug', pragmas.debug);
@@ -217,11 +196,9 @@ const scratchEncodeCart2 = new Cartesian2();
/**
* Encodes a normalized vector into 2 SNORM values in the range of [0-255] following the 'oct' encoding and
* stores those values in a single float-point number.
- *
* @param {Cartesian3} vector The normalized vector to be compressed into 2 byte 'oct' encoding.
* @returns {number} The 2 byte oct-encoded unit length vector.
- *
- * @exception {DeveloperError} vector must be normalized.
+ * @throws {DeveloperError} vector must be normalized.
*/
AttributeCompression.octEncodeFloat = function (vector) {
AttributeCompression.octEncode(vector, scratchEncodeCart2);
@@ -230,11 +207,9 @@ AttributeCompression.octEncodeFloat = function (vector) {
/**
* Decodes a unit-length vector in 'oct' encoding packed in a floating-point number to a normalized 3-component vector.
- *
* @param {number} value The oct-encoded unit length vector stored as a single floating-point number.
* @param {Cartesian3} result The decoded and normalized vector
* @returns {Cartesian3} The decoded and normalized vector.
- *
*/
AttributeCompression.octDecodeFloat = function (value, result) {
//>>includeStart('debug', pragmas.debug);
@@ -251,13 +226,11 @@ AttributeCompression.octDecodeFloat = function (value, result) {
/**
* Encodes three normalized vectors into 6 SNORM values in the range of [0-255] following the 'oct' encoding and
* packs those into two floating-point numbers.
- *
* @param {Cartesian3} v1 A normalized vector to be compressed.
* @param {Cartesian3} v2 A normalized vector to be compressed.
* @param {Cartesian3} v3 A normalized vector to be compressed.
* @param {Cartesian2} result The 'oct' encoded vectors packed into two floating-point numbers.
* @returns {Cartesian2} The 'oct' encoded vectors packed into two floating-point numbers.
- *
*/
AttributeCompression.octPack = function (v1, v2, v3, result) {
//>>includeStart('debug', pragmas.debug);
@@ -278,7 +251,6 @@ AttributeCompression.octPack = function (v1, v2, v3, result) {
/**
* Decodes three unit-length vectors in 'oct' encoding packed into a floating-point number to a normalized 3-component vector.
- *
* @param {Cartesian2} packed The three oct-encoded unit length vectors stored as two floating-point number.
* @param {Cartesian3} v1 One decoded and normalized vector.
* @param {Cartesian3} v2 One decoded and normalized vector.
@@ -307,10 +279,8 @@ AttributeCompression.octUnpack = function (packed, v1, v2, v3) {
/**
* Pack texture coordinates into a single float. The texture coordinates will only preserve 12 bits of precision.
- *
* @param {Cartesian2} textureCoordinates The texture coordinates to compress. Both coordinates must be in the range 0.0-1.0.
* @returns {number} The packed texture coordinates.
- *
*/
AttributeCompression.compressTextureCoordinates = function (
textureCoordinates
@@ -327,11 +297,9 @@ AttributeCompression.compressTextureCoordinates = function (
/**
* Decompresses texture coordinates that were packed into a single float.
- *
* @param {number} compressed The compressed texture coordinates.
* @param {Cartesian2} result The decompressed texture coordinates.
* @returns {Cartesian2} The modified result parameter.
- *
*/
AttributeCompression.decompressTextureCoordinates = function (
compressed,
@@ -355,11 +323,9 @@ function zigZagDecode(value) {
/**
* Decodes delta and ZigZag encoded vertices. This modifies the buffers in place.
- *
* @param {Uint16Array} uBuffer The buffer view of u values.
* @param {Uint16Array} vBuffer The buffer view of v values.
* @param {Uint16Array} [heightBuffer] The buffer view of height values.
- *
* @see {@link https://github.com/CesiumGS/quantized-mesh|quantized-mesh-1.0 terrain format}
*/
AttributeCompression.zigZagDeltaDecode = function (
@@ -408,14 +374,11 @@ AttributeCompression.zigZagDeltaDecode = function (
/**
* Dequantizes a quantized typed array into a floating point typed array.
- *
* @see {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_mesh_quantization#encoding-quantized-data}
- *
* @param {Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array} typedArray The typed array for the quantized data.
* @param {ComponentDatatype} componentDatatype The component datatype of the quantized data.
* @param {AttributeType} type The attribute type of the quantized data.
* @param {number} count The number of attributes referenced in the dequantized array.
- *
* @returns {Float32Array} The dequantized array.
*/
AttributeCompression.dequantize = function (
@@ -481,7 +444,6 @@ AttributeCompression.dequantize = function (
/**
* Decode RGB565-encoded colors into a floating point typed array containing
* normalized RGB values.
- *
* @param {Uint16Array} typedArray Array of RGB565 values
* @param {Float32Array} [result] Array to store the normalized VEC3 result
*/
diff --git a/packages/engine/Source/Core/AxisAlignedBoundingBox.js b/packages/engine/Source/Core/AxisAlignedBoundingBox.js
index 41af002cd3c8..d388ac795bea 100644
--- a/packages/engine/Source/Core/AxisAlignedBoundingBox.js
+++ b/packages/engine/Source/Core/AxisAlignedBoundingBox.js
@@ -7,12 +7,10 @@ import Intersect from "./Intersect.js";
/**
* Creates an instance of an AxisAlignedBoundingBox from the minimum and maximum points along the x, y, and z axes.
* @alias AxisAlignedBoundingBox
- * @constructor
- *
- * @param {Cartesian3} [minimum=Cartesian3.ZERO] The minimum point along the x, y, and z axes.
- * @param {Cartesian3} [maximum=Cartesian3.ZERO] The maximum point along the x, y, and z axes.
+ * @class
+ * @param {Cartesian3} [minimum] The minimum point along the x, y, and z axes.
+ * @param {Cartesian3} [maximum] The maximum point along the x, y, and z axes.
* @param {Cartesian3} [center] The center of the box; automatically computed if not supplied.
- *
* @see BoundingSphere
* @see BoundingRectangle
*/
@@ -47,12 +45,10 @@ function AxisAlignedBoundingBox(minimum, maximum, center) {
/**
* Creates an instance of an AxisAlignedBoundingBox from its corners.
- *
* @param {Cartesian3} minimum The minimum point along the x, y, and z axes.
* @param {Cartesian3} maximum The maximum point along the x, y, and z axes.
* @param {AxisAlignedBoundingBox} [result] The object onto which to store the result.
* @returns {AxisAlignedBoundingBox} The modified result parameter or a new AxisAlignedBoundingBox instance if one was not provided.
- *
* @example
* // Compute an axis aligned bounding box from the two corners.
* const box = Cesium.AxisAlignedBoundingBox.fromCorners(new Cesium.Cartesian3(-1, -1, -1), new Cesium.Cartesian3(1, 1, 1));
@@ -77,11 +73,9 @@ AxisAlignedBoundingBox.fromCorners = function (minimum, maximum, result) {
/**
* Computes an instance of an AxisAlignedBoundingBox. The box is determined by
* finding the points spaced the farthest apart on the x, y, and z axes.
- *
* @param {Cartesian3[]} positions List of points that the bounding box will enclose. Each point must have a x
, y
, and z
properties.
* @param {AxisAlignedBoundingBox} [result] The object onto which to store the result.
* @returns {AxisAlignedBoundingBox} The modified result parameter or a new AxisAlignedBoundingBox instance if one was not provided.
- *
* @example
* // Compute an axis aligned bounding box enclosing two points.
* const box = Cesium.AxisAlignedBoundingBox.fromPoints([new Cesium.Cartesian3(2, 0, 0), new Cesium.Cartesian3(-2, 0, 0)]);
@@ -138,7 +132,6 @@ AxisAlignedBoundingBox.fromPoints = function (positions, result) {
/**
* Duplicates a AxisAlignedBoundingBox instance.
- *
* @param {AxisAlignedBoundingBox} box The bounding box to duplicate.
* @param {AxisAlignedBoundingBox} [result] The object onto which to store the result.
* @returns {AxisAlignedBoundingBox} The modified result parameter or a new AxisAlignedBoundingBox instance if none was provided. (Returns undefined if box is undefined)
@@ -161,7 +154,6 @@ AxisAlignedBoundingBox.clone = function (box, result) {
/**
* Compares the provided AxisAlignedBoundingBox componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {AxisAlignedBoundingBox} [left] The first AxisAlignedBoundingBox.
* @param {AxisAlignedBoundingBox} [right] The second AxisAlignedBoundingBox.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -180,7 +172,6 @@ AxisAlignedBoundingBox.equals = function (left, right) {
let intersectScratch = new Cartesian3();
/**
* Determines which side of a plane a box is located.
- *
* @param {AxisAlignedBoundingBox} box The bounding box to test.
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire box is on the side of the plane
@@ -225,7 +216,6 @@ AxisAlignedBoundingBox.intersectPlane = function (box, plane) {
/**
* Duplicates this AxisAlignedBoundingBox instance.
- *
* @param {AxisAlignedBoundingBox} [result] The object onto which to store the result.
* @returns {AxisAlignedBoundingBox} The modified result parameter or a new AxisAlignedBoundingBox instance if one was not provided.
*/
@@ -235,7 +225,6 @@ AxisAlignedBoundingBox.prototype.clone = function (result) {
/**
* Determines which side of a plane this box is located.
- *
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire box is on the side of the plane
* the normal is pointing, {@link Intersect.OUTSIDE} if the entire box is
@@ -249,7 +238,6 @@ AxisAlignedBoundingBox.prototype.intersectPlane = function (plane) {
/**
* Compares this AxisAlignedBoundingBox against the provided AxisAlignedBoundingBox componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {AxisAlignedBoundingBox} [right] The right hand side AxisAlignedBoundingBox.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/Core/BingMapsGeocoderService.js b/packages/engine/Source/Core/BingMapsGeocoderService.js
index a9292e57015d..4b2c4141360f 100644
--- a/packages/engine/Source/Core/BingMapsGeocoderService.js
+++ b/packages/engine/Source/Core/BingMapsGeocoderService.js
@@ -11,8 +11,7 @@ const url = "https://dev.virtualearth.net/REST/v1/Locations";
/**
* Provides geocoding through Bing Maps.
* @alias BingMapsGeocoderService
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {string} options.key A key to use with the Bing Maps geocoding service
* @param {string} [options.culture] A Bing Maps {@link https://docs.microsoft.com/en-us/bingmaps/rest-services/common-parameters-and-types/supported-culture-codes|Culture Code} to return results in a specific culture and language.
@@ -87,7 +86,6 @@ Object.defineProperties(BingMapsGeocoderService.prototype, {
/**
* @function
- *
* @param {string} query The query to be sent to the geocoder service
* @returns {Promise}
*/
diff --git a/packages/engine/Source/Core/BoundingRectangle.js b/packages/engine/Source/Core/BoundingRectangle.js
index f0a1881613ef..6c4b429698c8 100644
--- a/packages/engine/Source/Core/BoundingRectangle.js
+++ b/packages/engine/Source/Core/BoundingRectangle.js
@@ -10,13 +10,11 @@ import Rectangle from "./Rectangle.js";
/**
* A bounding rectangle given by a corner, width and height.
* @alias BoundingRectangle
- * @constructor
- *
- * @param {number} [x=0.0] The x coordinate of the rectangle.
- * @param {number} [y=0.0] The y coordinate of the rectangle.
- * @param {number} [width=0.0] The width of the rectangle.
- * @param {number} [height=0.0] The height of the rectangle.
- *
+ * @class
+ * @param {number} [x] The x coordinate of the rectangle.
+ * @param {number} [y] The y coordinate of the rectangle.
+ * @param {number} [width] The width of the rectangle.
+ * @param {number} [height] The height of the rectangle.
* @see BoundingSphere
* @see Packable
*/
@@ -58,11 +56,9 @@ BoundingRectangle.packedLength = 4;
/**
* Stores the provided instance into the provided array.
- *
* @param {BoundingRectangle} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
BoundingRectangle.pack = function (value, array, startingIndex) {
@@ -83,9 +79,8 @@ BoundingRectangle.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {BoundingRectangle} [result] The object into which to store the result.
* @returns {BoundingRectangle} The modified result parameter or a new BoundingRectangle instance if one was not provided.
*/
@@ -109,7 +104,6 @@ BoundingRectangle.unpack = function (array, startingIndex, result) {
/**
* Computes a bounding rectangle enclosing the list of 2D points.
* The rectangle is oriented with the corner at the bottom left.
- *
* @param {Cartesian2[]} positions List of points that the bounding rectangle will enclose. Each point must have x
and y
properties.
* @param {BoundingRectangle} [result] The object onto which to store the result.
* @returns {BoundingRectangle} The modified result parameter or a new BoundingRectangle instance if one was not provided.
@@ -158,9 +152,8 @@ const fromRectangleLowerLeft = new Cartographic();
const fromRectangleUpperRight = new Cartographic();
/**
* Computes a bounding rectangle from a rectangle.
- *
* @param {Rectangle} rectangle The valid rectangle used to create a bounding rectangle.
- * @param {object} [projection=GeographicProjection] The projection used to project the rectangle into 2D.
+ * @param {object} [projection] The projection used to project the rectangle into 2D.
* @param {BoundingRectangle} [result] The object onto which to store the result.
* @returns {BoundingRectangle} The modified result parameter or a new BoundingRectangle instance if one was not provided.
*/
@@ -197,7 +190,6 @@ BoundingRectangle.fromRectangle = function (rectangle, projection, result) {
/**
* Duplicates a BoundingRectangle instance.
- *
* @param {BoundingRectangle} rectangle The bounding rectangle to duplicate.
* @param {BoundingRectangle} [result] The object onto which to store the result.
* @returns {BoundingRectangle} The modified result parameter or a new BoundingRectangle instance if one was not provided. (Returns undefined if rectangle is undefined)
@@ -225,7 +217,6 @@ BoundingRectangle.clone = function (rectangle, result) {
/**
* Computes a bounding rectangle that is the union of the left and right bounding rectangles.
- *
* @param {BoundingRectangle} left A rectangle to enclose in bounding rectangle.
* @param {BoundingRectangle} right A rectangle to enclose in a bounding rectangle.
* @param {BoundingRectangle} [result] The object onto which to store the result.
@@ -255,7 +246,6 @@ BoundingRectangle.union = function (left, right, result) {
/**
* Computes a bounding rectangle by enlarging the provided rectangle until it contains the provided point.
- *
* @param {BoundingRectangle} rectangle A rectangle to expand.
* @param {Cartesian2} point A point to enclose in a bounding rectangle.
* @param {BoundingRectangle} [result] The object onto which to store the result.
@@ -291,7 +281,6 @@ BoundingRectangle.expand = function (rectangle, point, result) {
/**
* Determines if two rectangles intersect.
- *
* @param {BoundingRectangle} left A rectangle to check for intersection.
* @param {BoundingRectangle} right The other rectangle to check for intersection.
* @returns {Intersect} Intersect.INTERSECTING
if the rectangles intersect, Intersect.OUTSIDE
otherwise.
@@ -323,7 +312,6 @@ BoundingRectangle.intersect = function (left, right) {
/**
* Compares the provided BoundingRectangles componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {BoundingRectangle} [left] The first BoundingRectangle.
* @param {BoundingRectangle} [right] The second BoundingRectangle.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -342,7 +330,6 @@ BoundingRectangle.equals = function (left, right) {
/**
* Duplicates this BoundingRectangle instance.
- *
* @param {BoundingRectangle} [result] The object onto which to store the result.
* @returns {BoundingRectangle} The modified result parameter or a new BoundingRectangle instance if one was not provided.
*/
@@ -352,7 +339,6 @@ BoundingRectangle.prototype.clone = function (result) {
/**
* Determines if this rectangle intersects with another.
- *
* @param {BoundingRectangle} right A rectangle to check for intersection.
* @returns {Intersect} Intersect.INTERSECTING
if the rectangles intersect, Intersect.OUTSIDE
otherwise.
*/
@@ -363,7 +349,6 @@ BoundingRectangle.prototype.intersect = function (right) {
/**
* Compares this BoundingRectangle against the provided BoundingRectangle componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {BoundingRectangle} [right] The right hand side BoundingRectangle.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/Core/BoundingSphere.js b/packages/engine/Source/Core/BoundingSphere.js
index 3da2d739f67f..cc1495d53cbf 100644
--- a/packages/engine/Source/Core/BoundingSphere.js
+++ b/packages/engine/Source/Core/BoundingSphere.js
@@ -15,11 +15,9 @@ import Rectangle from "./Rectangle.js";
/**
* A bounding sphere with a center and a radius.
* @alias BoundingSphere
- * @constructor
- *
- * @param {Cartesian3} [center=Cartesian3.ZERO] The center of the bounding sphere.
- * @param {number} [radius=0.0] The radius of the bounding sphere.
- *
+ * @class
+ * @param {Cartesian3} [center] The center of the bounding sphere.
+ * @param {number} [radius] The radius of the bounding sphere.
* @see AxisAlignedBoundingBox
* @see BoundingRectangle
* @see Packable
@@ -58,11 +56,9 @@ const volumeConstant = (4.0 / 3.0) * CesiumMath.PI;
* Computes a tight-fitting bounding sphere enclosing a list of 3D Cartesian points.
* The bounding sphere is computed by running two algorithms, a naive algorithm and
* Ritter's algorithm. The smaller of the two spheres is used to ensure a tight fit.
- *
* @param {Cartesian3[]} [positions] An array of points that the bounding sphere will enclose. Each point must have x
, y
, and z
properties.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if one was not provided.
- *
* @see {@link http://help.agi.com/AGIComponents/html/BlogBoundingSphere.htm|Bounding Sphere computation article}
*/
BoundingSphere.fromPoints = function (positions, result) {
@@ -231,9 +227,8 @@ const fromRectangle2DNortheast = new Cartographic();
/**
* Computes a bounding sphere from a rectangle projected in 2D.
- *
* @param {Rectangle} [rectangle] The rectangle around which to create a bounding sphere.
- * @param {object} [projection=GeographicProjection] The projection used to project the rectangle into 2D.
+ * @param {object} [projection] The projection used to project the rectangle into 2D.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*/
@@ -250,11 +245,10 @@ BoundingSphere.fromRectangle2D = function (rectangle, projection, result) {
/**
* Computes a bounding sphere from a rectangle projected in 2D. The bounding sphere accounts for the
* object's minimum and maximum heights over the rectangle.
- *
* @param {Rectangle} [rectangle] The rectangle around which to create a bounding sphere.
- * @param {object} [projection=GeographicProjection] The projection used to project the rectangle into 2D.
- * @param {number} [minimumHeight=0.0] The minimum height over the rectangle.
- * @param {number} [maximumHeight=0.0] The maximum height over the rectangle.
+ * @param {object} [projection] The projection used to project the rectangle into 2D.
+ * @param {number} [minimumHeight] The minimum height over the rectangle.
+ * @param {number} [maximumHeight] The maximum height over the rectangle.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*/
@@ -309,10 +303,9 @@ const fromRectangle3DScratch = [];
/**
* Computes a bounding sphere from a rectangle in 3D. The bounding sphere is created using a subsample of points
* on the ellipsoid and contained in the rectangle. It may not be accurate for all rectangles on all types of ellipsoids.
- *
* @param {Rectangle} [rectangle] The valid rectangle used to create a bounding sphere.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid used to determine positions of the rectangle.
- * @param {number} [surfaceHeight=0.0] The height above the surface of the ellipsoid.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid used to determine positions of the rectangle.
+ * @param {number} [surfaceHeight] The height above the surface of the ellipsoid.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*/
@@ -349,13 +342,12 @@ BoundingSphere.fromRectangle3D = function (
* stored in a flat array in X, Y, Z, order. The bounding sphere is computed by running two
* algorithms, a naive algorithm and Ritter's algorithm. The smaller of the two spheres is used to
* ensure a tight fit.
- *
* @param {number[]} [positions] An array of points that the bounding sphere will enclose. Each point
* is formed from three elements in the array in the order X, Y, Z.
- * @param {Cartesian3} [center=Cartesian3.ZERO] The position to which the positions are relative, which need not be the
+ * @param {Cartesian3} [center] The position to which the positions are relative, which need not be the
* origin of the coordinate system. This is useful when the positions are to be used for
* relative-to-center (RTC) rendering.
- * @param {number} [stride=3] The number of array elements per vertex. It must be at least 3, but it may
+ * @param {number} [stride] The number of array elements per vertex. It must be at least 3, but it may
* be higher. Regardless of the value of this parameter, the X coordinate of the first position
* is at array index 0, the Y coordinate is at array index 1, and the Z coordinate is at array index
* 2. When stride is 3, the X coordinate of the next position then begins at array index 3. If
@@ -363,7 +355,6 @@ BoundingSphere.fromRectangle3D = function (
* index 5.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if one was not provided.
- *
* @example
* // Compute the bounding sphere from 3 positions, each specified relative to a center.
* // In addition to the X, Y, and Z coordinates, the points array contains two additional
@@ -373,7 +364,6 @@ BoundingSphere.fromRectangle3D = function (
* 4.0, 5.0, 6.0, 0.1, 0.2,
* 7.0, 8.0, 9.0, 0.1, 0.2];
* const sphere = Cesium.BoundingSphere.fromVertices(points, center, 5);
- *
* @see {@link http://blogs.agi.com/insight3d/index.php/2008/02/04/a-bounding/|Bounding Sphere computation article}
*/
BoundingSphere.fromVertices = function (positions, center, stride, result) {
@@ -554,14 +544,12 @@ BoundingSphere.fromVertices = function (positions, center, stride, result) {
* stored in parallel flat arrays in X, Y, Z, order. The bounding sphere is computed by running two
* algorithms, a naive algorithm and Ritter's algorithm. The smaller of the two spheres is used to
* ensure a tight fit.
- *
* @param {number[]} [positionsHigh] An array of high bits of the encoded cartesians that the bounding sphere will enclose. Each point
* is formed from three elements in the array in the order X, Y, Z.
* @param {number[]} [positionsLow] An array of low bits of the encoded cartesians that the bounding sphere will enclose. Each point
* is formed from three elements in the array in the order X, Y, Z.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if one was not provided.
- *
* @see {@link http://blogs.agi.com/insight3d/index.php/2008/02/04/a-bounding/|Bounding Sphere computation article}
*/
BoundingSphere.fromEncodedCartesianVertices = function (
@@ -741,12 +729,10 @@ BoundingSphere.fromEncodedCartesianVertices = function (
/**
* Computes a bounding sphere from the corner points of an axis-aligned bounding box. The sphere
* tightly and fully encompasses the box.
- *
* @param {Cartesian3} [corner] The minimum height over the rectangle.
* @param {Cartesian3} [oppositeCorner] The maximum height over the rectangle.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
- *
* @example
* // Create a bounding sphere around the unit cube
* const sphere = Cesium.BoundingSphere.fromCornerPoints(new Cesium.Cartesian3(-0.5, -0.5, -0.5), new Cesium.Cartesian3(0.5, 0.5, 0.5));
@@ -768,11 +754,9 @@ BoundingSphere.fromCornerPoints = function (corner, oppositeCorner, result) {
/**
* Creates a bounding sphere encompassing an ellipsoid.
- *
* @param {Ellipsoid} ellipsoid The ellipsoid around which to create a bounding sphere.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
- *
* @example
* const boundingSphere = Cesium.BoundingSphere.fromEllipsoid(ellipsoid);
*/
@@ -794,7 +778,6 @@ const fromBoundingSpheresScratch = new Cartesian3();
/**
* Computes a tight-fitting bounding sphere enclosing the provided array of bounding spheres.
- *
* @param {BoundingSphere[]} [boundingSpheres] The array of bounding spheres.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
@@ -848,7 +831,6 @@ const fromOrientedBoundingBoxScratchW = new Cartesian3();
/**
* Computes a tight-fitting bounding sphere enclosing the provided oriented bounding box.
- *
* @param {OrientedBoundingBox} orientedBoundingBox The oriented bounding box.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
@@ -884,7 +866,6 @@ const scratchFromTransformationScale = new Cartesian3();
/**
* Computes a tight-fitting bounding sphere enclosing the provided affine transformation.
- *
* @param {Matrix4} transformation The affine transformation.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
@@ -915,7 +896,6 @@ BoundingSphere.fromTransformation = function (transformation, result) {
/**
* Duplicates a BoundingSphere instance.
- *
* @param {BoundingSphere} sphere The bounding sphere to duplicate.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided. (Returns undefined if sphere is undefined)
@@ -942,11 +922,9 @@ BoundingSphere.packedLength = 4;
/**
* Stores the provided instance into the provided array.
- *
* @param {BoundingSphere} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
BoundingSphere.pack = function (value, array, startingIndex) {
@@ -968,9 +946,8 @@ BoundingSphere.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {BoundingSphere} [result] The object into which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if one was not provided.
*/
@@ -997,7 +974,6 @@ const unionScratch = new Cartesian3();
const unionScratchCenter = new Cartesian3();
/**
* Computes a bounding sphere that contains both the left and right bounding spheres.
- *
* @param {BoundingSphere} left A sphere to enclose in a bounding sphere.
* @param {BoundingSphere} right A sphere to enclose in a bounding sphere.
* @param {BoundingSphere} [result] The object onto which to store the result.
@@ -1057,7 +1033,6 @@ BoundingSphere.union = function (left, right, result) {
const expandScratch = new Cartesian3();
/**
* Computes a bounding sphere by enlarging the provided sphere to contain the provided point.
- *
* @param {BoundingSphere} sphere A sphere to expand.
* @param {Cartesian3} point A point to enclose in a bounding sphere.
* @param {BoundingSphere} [result] The object onto which to store the result.
@@ -1083,7 +1058,6 @@ BoundingSphere.expand = function (sphere, point, result) {
/**
* Determines which side of a plane a sphere is located.
- *
* @param {BoundingSphere} sphere The bounding sphere to test.
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire sphere is on the side of the plane
@@ -1114,7 +1088,6 @@ BoundingSphere.intersectPlane = function (sphere, plane) {
/**
* Applies a 4x4 affine transformation matrix to a bounding sphere.
- *
* @param {BoundingSphere} sphere The bounding sphere to apply the transformation to.
* @param {Matrix4} transform The transformation matrix to apply to the bounding sphere.
* @param {BoundingSphere} [result] The object onto which to store the result.
@@ -1144,11 +1117,9 @@ const distanceSquaredToScratch = new Cartesian3();
/**
* Computes the estimated distance squared from the closest point on a bounding sphere to a point.
- *
* @param {BoundingSphere} sphere The sphere.
* @param {Cartesian3} cartesian The point
* @returns {number} The distance squared from the bounding sphere to the point. Returns 0 if the point is inside the sphere.
- *
* @example
* // Sort bounding spheres from back to front
* spheres.sort(function(a, b) {
@@ -1179,12 +1150,10 @@ BoundingSphere.distanceSquaredTo = function (sphere, cartesian) {
* Applies a 4x4 affine transformation matrix to a bounding sphere where there is no scale
* The transformation matrix is not verified to have a uniform scale of 1.
* This method is faster than computing the general bounding sphere transform using {@link BoundingSphere.transform}.
- *
* @param {BoundingSphere} sphere The bounding sphere to apply the transformation to.
* @param {Matrix4} transform The transformation matrix to apply to the bounding sphere.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
- *
* @example
* const modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(positionOnEllipsoid);
* const boundingSphere = new Cesium.BoundingSphere();
@@ -1217,7 +1186,6 @@ const scratchCartesian3 = new Cartesian3();
*
* If you imagine the infinite number of planes with normal direction, this computes the smallest distance to the
* closest and farthest planes from position that intersect the bounding sphere.
- *
* @param {BoundingSphere} sphere The bounding sphere to calculate the distance to.
* @param {Cartesian3} position The position to calculate the distance from.
* @param {Cartesian3} direction The direction from position.
@@ -1266,9 +1234,8 @@ for (let n = 0; n < 8; ++n) {
const projectTo2DProjection = new GeographicProjection();
/**
* Creates a bounding sphere in 2D from a bounding sphere in 3D world coordinates.
- *
* @param {BoundingSphere} sphere The bounding sphere to transform to 2D.
- * @param {object} [projection=GeographicProjection] The projection to 2D.
+ * @param {object} [projection] The projection to 2D.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*/
@@ -1378,7 +1345,6 @@ BoundingSphere.projectTo2D = function (sphere, projection, result) {
/**
* Determines whether or not a sphere is hidden from view by the occluder.
- *
* @param {BoundingSphere} sphere The bounding sphere surrounding the occludee object.
* @param {Occluder} occluder The occluder.
* @returns {boolean} true
if the sphere is not visible; otherwise false
.
@@ -1394,7 +1360,6 @@ BoundingSphere.isOccluded = function (sphere, occluder) {
/**
* Compares the provided BoundingSphere componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {BoundingSphere} [left] The first BoundingSphere.
* @param {BoundingSphere} [right] The second BoundingSphere.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -1411,7 +1376,6 @@ BoundingSphere.equals = function (left, right) {
/**
* Determines which side of a plane the sphere is located.
- *
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire sphere is on the side of the plane
* the normal is pointing, {@link Intersect.OUTSIDE} if the entire sphere is
@@ -1424,10 +1388,8 @@ BoundingSphere.prototype.intersectPlane = function (plane) {
/**
* Computes the estimated distance squared from the closest point on a bounding sphere to a point.
- *
* @param {Cartesian3} cartesian The point
* @returns {number} The estimated distance squared from the bounding sphere to the point.
- *
* @example
* // Sort bounding spheres from back to front
* spheres.sort(function(a, b) {
@@ -1444,7 +1406,6 @@ BoundingSphere.prototype.distanceSquaredTo = function (cartesian) {
*
* If you imagine the infinite number of planes with normal direction, this computes the smallest distance to the
* closest and farthest planes from position that intersect the bounding sphere.
- *
* @param {Cartesian3} position The position to calculate the distance from.
* @param {Cartesian3} direction The direction from position.
* @param {Interval} [result] A Interval to store the nearest and farthest distances.
@@ -1465,7 +1426,6 @@ BoundingSphere.prototype.computePlaneDistances = function (
/**
* Determines whether or not a sphere is hidden from view by the occluder.
- *
* @param {Occluder} occluder The occluder.
* @returns {boolean} true
if the sphere is not visible; otherwise false
.
*/
@@ -1476,7 +1436,6 @@ BoundingSphere.prototype.isOccluded = function (occluder) {
/**
* Compares this BoundingSphere against the provided BoundingSphere componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {BoundingSphere} [right] The right hand side BoundingSphere.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -1486,7 +1445,6 @@ BoundingSphere.prototype.equals = function (right) {
/**
* Duplicates this BoundingSphere instance.
- *
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*/
diff --git a/packages/engine/Source/Core/BoxGeometry.js b/packages/engine/Source/Core/BoxGeometry.js
index 405107e0afd5..6a530d44c476 100644
--- a/packages/engine/Source/Core/BoxGeometry.js
+++ b/packages/engine/Source/Core/BoxGeometry.js
@@ -16,21 +16,16 @@ const diffScratch = new Cartesian3();
/**
* Describes a cube centered at the origin.
- *
* @alias BoxGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.minimum The minimum x, y, and z coordinates of the box.
* @param {Cartesian3} options.maximum The maximum x, y, and z coordinates of the box.
- * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- *
+ * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
* @see BoxGeometry.fromDimensions
* @see BoxGeometry.createGeometry
* @see Packable
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Box.html|Cesium Sandcastle Box Demo}
- *
* @example
* const box = new Cesium.BoxGeometry({
* vertexFormat : Cesium.VertexFormat.POSITION_ONLY,
@@ -69,22 +64,17 @@ function BoxGeometry(options) {
/**
* Creates a cube centered at the origin given its dimensions.
- *
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.dimensions The width, depth, and height of the box stored in the x, y, and z coordinates of the Cartesian3
, respectively.
- * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
+ * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
* @returns {BoxGeometry}
- *
- * @exception {DeveloperError} All dimensions components must be greater than or equal to zero.
- *
- *
+ * @throws {DeveloperError} All dimensions components must be greater than or equal to zero.
* @example
* const box = Cesium.BoxGeometry.fromDimensions({
* vertexFormat : Cesium.VertexFormat.POSITION_ONLY,
* dimensions : new Cesium.Cartesian3(500000.0, 500000.0, 500000.0)
* });
* const geometry = Cesium.BoxGeometry.createGeometry(box);
- *
* @see BoxGeometry.createGeometry
*/
BoxGeometry.fromDimensions = function (options) {
@@ -110,12 +100,8 @@ BoxGeometry.fromDimensions = function (options) {
/**
* Creates a cube from the dimensions of an AxisAlignedBoundingBox.
- *
* @param {AxisAlignedBoundingBox} boundingBox A description of the AxisAlignedBoundingBox.
* @returns {BoxGeometry}
- *
- *
- *
* @example
* const aabb = Cesium.AxisAlignedBoundingBox.fromPoints(Cesium.Cartesian3.fromDegreesArray([
* -72.0, 40.0,
@@ -125,7 +111,6 @@ BoxGeometry.fromDimensions = function (options) {
* -68.0, 40.0
* ]));
* const box = Cesium.BoxGeometry.fromAxisAlignedBoundingBox(aabb);
- *
* @see BoxGeometry.createGeometry
*/
BoxGeometry.fromAxisAlignedBoundingBox = function (boundingBox) {
@@ -148,11 +133,9 @@ BoxGeometry.packedLength =
/**
* Stores the provided instance into the provided array.
- *
* @param {BoxGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
BoxGeometry.pack = function (value, array, startingIndex) {
@@ -193,9 +176,8 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {BoxGeometry} [result] The object into which to store the result.
* @returns {BoxGeometry} The modified result parameter or a new BoxGeometry instance if one was not provided.
*/
@@ -239,7 +221,6 @@ BoxGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of a box, including its vertices, indices, and a bounding sphere.
- *
* @param {BoxGeometry} boxGeometry A description of the box.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
@@ -876,7 +857,6 @@ let unitBoxGeometry;
/**
* Returns the geometric representation of a unit box, including its vertices, indices, and a bounding sphere.
* @returns {Geometry} The computed vertices and indices.
- *
* @private
*/
BoxGeometry.getUnitBox = function () {
diff --git a/packages/engine/Source/Core/BoxOutlineGeometry.js b/packages/engine/Source/Core/BoxOutlineGeometry.js
index 5e18ee05e9b1..c546ac53de36 100644
--- a/packages/engine/Source/Core/BoxOutlineGeometry.js
+++ b/packages/engine/Source/Core/BoxOutlineGeometry.js
@@ -15,18 +15,14 @@ const diffScratch = new Cartesian3();
/**
* A description of the outline of a cube centered at the origin.
- *
* @alias BoxOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.minimum The minimum x, y, and z coordinates of the box.
* @param {Cartesian3} options.maximum The maximum x, y, and z coordinates of the box.
- *
* @see BoxOutlineGeometry.fromDimensions
* @see BoxOutlineGeometry.createGeometry
* @see Packable
- *
* @example
* const box = new Cesium.BoxOutlineGeometry({
* maximum : new Cesium.Cartesian3(250000.0, 250000.0, 250000.0),
@@ -61,20 +57,15 @@ function BoxOutlineGeometry(options) {
/**
* Creates an outline of a cube centered at the origin given its dimensions.
- *
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.dimensions The width, depth, and height of the box stored in the x, y, and z coordinates of the Cartesian3
, respectively.
* @returns {BoxOutlineGeometry}
- *
- * @exception {DeveloperError} All dimensions components must be greater than or equal to zero.
- *
- *
+ * @throws {DeveloperError} All dimensions components must be greater than or equal to zero.
* @example
* const box = Cesium.BoxOutlineGeometry.fromDimensions({
* dimensions : new Cesium.Cartesian3(500000.0, 500000.0, 500000.0)
* });
* const geometry = Cesium.BoxOutlineGeometry.createGeometry(box);
- *
* @see BoxOutlineGeometry.createGeometry
*/
BoxOutlineGeometry.fromDimensions = function (options) {
@@ -99,12 +90,8 @@ BoxOutlineGeometry.fromDimensions = function (options) {
/**
* Creates an outline of a cube from the dimensions of an AxisAlignedBoundingBox.
- *
* @param {AxisAlignedBoundingBox} boundingBox A description of the AxisAlignedBoundingBox.
* @returns {BoxOutlineGeometry}
- *
- *
- *
* @example
* const aabb = Cesium.AxisAlignedBoundingBox.fromPoints(Cesium.Cartesian3.fromDegreesArray([
* -72.0, 40.0,
@@ -114,7 +101,6 @@ BoxOutlineGeometry.fromDimensions = function (options) {
* -68.0, 40.0
* ]));
* const box = Cesium.BoxOutlineGeometry.fromAxisAlignedBoundingBox(aabb);
- *
* @see BoxOutlineGeometry.createGeometry
*/
BoxOutlineGeometry.fromAxisAlignedBoundingBox = function (boundingBox) {
@@ -136,11 +122,9 @@ BoxOutlineGeometry.packedLength = 2 * Cartesian3.packedLength + 1;
/**
* Stores the provided instance into the provided array.
- *
* @param {BoxOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
BoxOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -171,9 +155,8 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {BoxOutlineGeometry} [result] The object into which to store the result.
* @returns {BoxOutlineGeometry} The modified result parameter or a new BoxOutlineGeometry instance if one was not provided.
*/
@@ -208,7 +191,6 @@ BoxOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an outline of a box, including its vertices, indices, and a bounding sphere.
- *
* @param {BoxOutlineGeometry} boxGeometry A description of the box outline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/Cartesian2.js b/packages/engine/Source/Core/Cartesian2.js
index 9d7d8137359c..1ba0d086f7a2 100644
--- a/packages/engine/Source/Core/Cartesian2.js
+++ b/packages/engine/Source/Core/Cartesian2.js
@@ -7,11 +7,9 @@ import CesiumMath from "./Math.js";
/**
* A 2D Cartesian point.
* @alias Cartesian2
- * @constructor
- *
- * @param {number} [x=0.0] The X component.
- * @param {number} [y=0.0] The Y component.
- *
+ * @class
+ * @param {number} [x] The X component.
+ * @param {number} [y] The Y component.
* @see Cartesian3
* @see Cartesian4
* @see Packable
@@ -34,7 +32,6 @@ function Cartesian2(x, y) {
/**
* Creates a Cartesian2 instance from x and y coordinates.
- *
* @param {number} x The x coordinate.
* @param {number} y The y coordinate.
* @param {Cartesian2} [result] The object onto which to store the result.
@@ -52,7 +49,6 @@ Cartesian2.fromElements = function (x, y, result) {
/**
* Duplicates a Cartesian2 instance.
- *
* @param {Cartesian2} cartesian The Cartesian to duplicate.
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if one was not provided. (Returns undefined if cartesian is undefined)
@@ -74,7 +70,6 @@ Cartesian2.clone = function (cartesian, result) {
* Creates a Cartesian2 instance from an existing Cartesian3. This simply takes the
* x and y properties of the Cartesian3 and drops z.
* @function
- *
* @param {Cartesian3} cartesian The Cartesian3 instance to create a Cartesian2 instance from.
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if one was not provided.
@@ -85,7 +80,6 @@ Cartesian2.fromCartesian3 = Cartesian2.clone;
* Creates a Cartesian2 instance from an existing Cartesian4. This simply takes the
* x and y properties of the Cartesian4 and drops z and w.
* @function
- *
* @param {Cartesian4} cartesian The Cartesian4 instance to create a Cartesian2 instance from.
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if one was not provided.
@@ -100,11 +94,9 @@ Cartesian2.packedLength = 2;
/**
* Stores the provided instance into the provided array.
- *
* @param {Cartesian2} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
Cartesian2.pack = function (value, array, startingIndex) {
@@ -123,9 +115,8 @@ Cartesian2.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {Cartesian2} [result] The object into which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if one was not provided.
*/
@@ -146,7 +137,6 @@ Cartesian2.unpack = function (array, startingIndex, result) {
/**
* Flattens an array of Cartesian2s into an array of components.
- *
* @param {Cartesian2[]} array The array of cartesians to pack.
* @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 2 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 2) elements.
* @returns {number[]} The packed array.
@@ -178,7 +168,6 @@ Cartesian2.packArray = function (array, result) {
/**
* Unpacks an array of cartesian components into an array of Cartesian2s.
- *
* @param {number[]} array The array of components to unpack.
* @param {Cartesian2[]} [result] The array onto which to store the result.
* @returns {Cartesian2[]} The unpacked array.
@@ -209,12 +198,10 @@ Cartesian2.unpackArray = function (array, result) {
/**
* Creates a Cartesian2 from two consecutive elements in an array.
* @function
- *
* @param {number[]} array The array whose two consecutive elements correspond to the x and y components, respectively.
* @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to the x component.
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if one was not provided.
- *
* @example
* // Create a Cartesian2 with (1.0, 2.0)
* const v = [1.0, 2.0];
@@ -228,7 +215,6 @@ Cartesian2.fromArray = Cartesian2.unpack;
/**
* Computes the value of the maximum component for the supplied Cartesian.
- *
* @param {Cartesian2} cartesian The cartesian to use.
* @returns {number} The value of the maximum component.
*/
@@ -242,7 +228,6 @@ Cartesian2.maximumComponent = function (cartesian) {
/**
* Computes the value of the minimum component for the supplied Cartesian.
- *
* @param {Cartesian2} cartesian The cartesian to use.
* @returns {number} The value of the minimum component.
*/
@@ -256,7 +241,6 @@ Cartesian2.minimumComponent = function (cartesian) {
/**
* Compares two Cartesians and computes a Cartesian which contains the minimum components of the supplied Cartesians.
- *
* @param {Cartesian2} first A cartesian to compare.
* @param {Cartesian2} second A cartesian to compare.
* @param {Cartesian2} result The object into which to store the result.
@@ -277,7 +261,6 @@ Cartesian2.minimumByComponent = function (first, second, result) {
/**
* Compares two Cartesians and computes a Cartesian which contains the maximum components of the supplied Cartesians.
- *
* @param {Cartesian2} first A cartesian to compare.
* @param {Cartesian2} second A cartesian to compare.
* @param {Cartesian2} result The object into which to store the result.
@@ -297,7 +280,6 @@ Cartesian2.maximumByComponent = function (first, second, result) {
/**
* Constrain a value to lie between two values.
- *
* @param {Cartesian2} value The value to clamp.
* @param {Cartesian2} min The minimum bound.
* @param {Cartesian2} max The maximum bound.
@@ -323,7 +305,6 @@ Cartesian2.clamp = function (value, min, max, result) {
/**
* Computes the provided Cartesian's squared magnitude.
- *
* @param {Cartesian2} cartesian The Cartesian instance whose squared magnitude is to be computed.
* @returns {number} The squared magnitude.
*/
@@ -337,7 +318,6 @@ Cartesian2.magnitudeSquared = function (cartesian) {
/**
* Computes the Cartesian's magnitude (length).
- *
* @param {Cartesian2} cartesian The Cartesian instance whose magnitude is to be computed.
* @returns {number} The magnitude.
*/
@@ -349,11 +329,9 @@ const distanceScratch = new Cartesian2();
/**
* Computes the distance between two points.
- *
* @param {Cartesian2} left The first point to compute the distance from.
* @param {Cartesian2} right The second point to compute the distance to.
* @returns {number} The distance between two points.
- *
* @example
* // Returns 1.0
* const d = Cesium.Cartesian2.distance(new Cesium.Cartesian2(1.0, 0.0), new Cesium.Cartesian2(2.0, 0.0));
@@ -371,11 +349,9 @@ Cartesian2.distance = function (left, right) {
/**
* Computes the squared distance between two points. Comparing squared distances
* using this function is more efficient than comparing distances using {@link Cartesian2#distance}.
- *
* @param {Cartesian2} left The first point to compute the distance from.
* @param {Cartesian2} right The second point to compute the distance to.
* @returns {number} The distance between two points.
- *
* @example
* // Returns 4.0, not 2.0
* const d = Cesium.Cartesian2.distance(new Cesium.Cartesian2(1.0, 0.0), new Cesium.Cartesian2(3.0, 0.0));
@@ -392,7 +368,6 @@ Cartesian2.distanceSquared = function (left, right) {
/**
* Computes the normalized form of the supplied Cartesian.
- *
* @param {Cartesian2} cartesian The Cartesian to be normalized.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter.
@@ -419,7 +394,6 @@ Cartesian2.normalize = function (cartesian, result) {
/**
* Computes the dot (scalar) product of two Cartesians.
- *
* @param {Cartesian2} left The first Cartesian.
* @param {Cartesian2} right The second Cartesian.
* @returns {number} The dot product.
@@ -435,7 +409,6 @@ Cartesian2.dot = function (left, right) {
/**
* Computes the magnitude of the cross product that would result from implicitly setting the Z coordinate of the input vectors to 0
- *
* @param {Cartesian2} left The first Cartesian.
* @param {Cartesian2} right The second Cartesian.
* @returns {number} The cross product.
@@ -451,7 +424,6 @@ Cartesian2.cross = function (left, right) {
/**
* Computes the componentwise product of two Cartesians.
- *
* @param {Cartesian2} left The first Cartesian.
* @param {Cartesian2} right The second Cartesian.
* @param {Cartesian2} result The object onto which to store the result.
@@ -471,7 +443,6 @@ Cartesian2.multiplyComponents = function (left, right, result) {
/**
* Computes the componentwise quotient of two Cartesians.
- *
* @param {Cartesian2} left The first Cartesian.
* @param {Cartesian2} right The second Cartesian.
* @param {Cartesian2} result The object onto which to store the result.
@@ -491,7 +462,6 @@ Cartesian2.divideComponents = function (left, right, result) {
/**
* Computes the componentwise sum of two Cartesians.
- *
* @param {Cartesian2} left The first Cartesian.
* @param {Cartesian2} right The second Cartesian.
* @param {Cartesian2} result The object onto which to store the result.
@@ -511,7 +481,6 @@ Cartesian2.add = function (left, right, result) {
/**
* Computes the componentwise difference of two Cartesians.
- *
* @param {Cartesian2} left The first Cartesian.
* @param {Cartesian2} right The second Cartesian.
* @param {Cartesian2} result The object onto which to store the result.
@@ -531,7 +500,6 @@ Cartesian2.subtract = function (left, right, result) {
/**
* Multiplies the provided Cartesian componentwise by the provided scalar.
- *
* @param {Cartesian2} cartesian The Cartesian to be scaled.
* @param {number} scalar The scalar to multiply with.
* @param {Cartesian2} result The object onto which to store the result.
@@ -551,7 +519,6 @@ Cartesian2.multiplyByScalar = function (cartesian, scalar, result) {
/**
* Divides the provided Cartesian componentwise by the provided scalar.
- *
* @param {Cartesian2} cartesian The Cartesian to be divided.
* @param {number} scalar The scalar to divide by.
* @param {Cartesian2} result The object onto which to store the result.
@@ -571,7 +538,6 @@ Cartesian2.divideByScalar = function (cartesian, scalar, result) {
/**
* Negates the provided Cartesian.
- *
* @param {Cartesian2} cartesian The Cartesian to be negated.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter.
@@ -589,7 +555,6 @@ Cartesian2.negate = function (cartesian, result) {
/**
* Computes the absolute value of the provided Cartesian.
- *
* @param {Cartesian2} cartesian The Cartesian whose absolute value is to be computed.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter.
@@ -608,7 +573,6 @@ Cartesian2.abs = function (cartesian, result) {
const lerpScratch = new Cartesian2();
/**
* Computes the linear interpolation or extrapolation at t using the provided cartesians.
- *
* @param {Cartesian2} start The value corresponding to t at 0.0.
* @param {Cartesian2} end The value corresponding to t at 1.0.
* @param {number} t The point along t at which to interpolate.
@@ -632,7 +596,6 @@ const angleBetweenScratch = new Cartesian2();
const angleBetweenScratch2 = new Cartesian2();
/**
* Returns the angle, in radians, between the provided Cartesians.
- *
* @param {Cartesian2} left The first Cartesian.
* @param {Cartesian2} right The second Cartesian.
* @returns {number} The angle between the Cartesians.
@@ -653,7 +616,6 @@ Cartesian2.angleBetween = function (left, right) {
const mostOrthogonalAxisScratch = new Cartesian2();
/**
* Returns the axis that is most orthogonal to the provided Cartesian.
- *
* @param {Cartesian2} cartesian The Cartesian on which to find the most orthogonal axis.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The most orthogonal axis.
@@ -679,7 +641,6 @@ Cartesian2.mostOrthogonalAxis = function (cartesian, result) {
/**
* Compares the provided Cartesians componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {Cartesian2} [left] The first Cartesian.
* @param {Cartesian2} [right] The second Cartesian.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -695,6 +656,9 @@ Cartesian2.equals = function (left, right) {
};
/**
+ * @param cartesian
+ * @param array
+ * @param offset
* @private
*/
Cartesian2.equalsArray = function (cartesian, array, offset) {
@@ -705,11 +669,10 @@ Cartesian2.equalsArray = function (cartesian, array, offset) {
* Compares the provided Cartesians componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
- *
* @param {Cartesian2} [left] The first Cartesian.
* @param {Cartesian2} [right] The second Cartesian.
- * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [relativeEpsilon] The relative epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
*/
Cartesian2.equalsEpsilon = function (
@@ -739,7 +702,6 @@ Cartesian2.equalsEpsilon = function (
/**
* An immutable Cartesian2 instance initialized to (0.0, 0.0).
- *
* @type {Cartesian2}
* @constant
*/
@@ -747,7 +709,6 @@ Cartesian2.ZERO = Object.freeze(new Cartesian2(0.0, 0.0));
/**
* An immutable Cartesian2 instance initialized to (1.0, 1.0).
- *
* @type {Cartesian2}
* @constant
*/
@@ -755,7 +716,6 @@ Cartesian2.ONE = Object.freeze(new Cartesian2(1.0, 1.0));
/**
* An immutable Cartesian2 instance initialized to (1.0, 0.0).
- *
* @type {Cartesian2}
* @constant
*/
@@ -763,7 +723,6 @@ Cartesian2.UNIT_X = Object.freeze(new Cartesian2(1.0, 0.0));
/**
* An immutable Cartesian2 instance initialized to (0.0, 1.0).
- *
* @type {Cartesian2}
* @constant
*/
@@ -771,7 +730,6 @@ Cartesian2.UNIT_Y = Object.freeze(new Cartesian2(0.0, 1.0));
/**
* Duplicates this Cartesian2 instance.
- *
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if one was not provided.
*/
@@ -782,7 +740,6 @@ Cartesian2.prototype.clone = function (result) {
/**
* Compares this Cartesian against the provided Cartesian componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {Cartesian2} [right] The right hand side Cartesian.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -794,10 +751,9 @@ Cartesian2.prototype.equals = function (right) {
* Compares this Cartesian against the provided Cartesian componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
- *
* @param {Cartesian2} [right] The right hand side Cartesian.
- * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [relativeEpsilon] The relative epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if they are within the provided epsilon, false
otherwise.
*/
Cartesian2.prototype.equalsEpsilon = function (
@@ -815,7 +771,6 @@ Cartesian2.prototype.equalsEpsilon = function (
/**
* Creates a string representing this Cartesian in the format '(x, y)'.
- *
* @returns {string} A string representing the provided Cartesian in the format '(x, y)'.
*/
Cartesian2.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/Cartesian3.js b/packages/engine/Source/Core/Cartesian3.js
index 934917052da6..7a13e07a60d6 100644
--- a/packages/engine/Source/Core/Cartesian3.js
+++ b/packages/engine/Source/Core/Cartesian3.js
@@ -7,12 +7,10 @@ import CesiumMath from "./Math.js";
/**
* A 3D Cartesian point.
* @alias Cartesian3
- * @constructor
- *
- * @param {number} [x=0.0] The X component.
- * @param {number} [y=0.0] The Y component.
- * @param {number} [z=0.0] The Z component.
- *
+ * @class
+ * @param {number} [x] The X component.
+ * @param {number} [y] The Y component.
+ * @param {number} [z] The Z component.
* @see Cartesian2
* @see Cartesian4
* @see Packable
@@ -42,7 +40,6 @@ function Cartesian3(x, y, z) {
/**
* Converts the provided Spherical into Cartesian3 coordinates.
- *
* @param {Spherical} spherical The Spherical to be converted to Cartesian3.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.
@@ -68,7 +65,6 @@ Cartesian3.fromSpherical = function (spherical, result) {
/**
* Creates a Cartesian3 instance from x, y and z coordinates.
- *
* @param {number} x The x coordinate.
* @param {number} y The y coordinate.
* @param {number} z The z coordinate.
@@ -88,7 +84,6 @@ Cartesian3.fromElements = function (x, y, z, result) {
/**
* Duplicates a Cartesian3 instance.
- *
* @param {Cartesian3} cartesian The Cartesian to duplicate.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided. (Returns undefined if cartesian is undefined)
@@ -111,7 +106,6 @@ Cartesian3.clone = function (cartesian, result) {
* Creates a Cartesian3 instance from an existing Cartesian4. This simply takes the
* x, y, and z properties of the Cartesian4 and drops w.
* @function
- *
* @param {Cartesian4} cartesian The Cartesian4 instance to create a Cartesian3 instance from.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.
@@ -126,11 +120,9 @@ Cartesian3.packedLength = 3;
/**
* Stores the provided instance into the provided array.
- *
* @param {Cartesian3} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
Cartesian3.pack = function (value, array, startingIndex) {
@@ -150,9 +142,8 @@ Cartesian3.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {Cartesian3} [result] The object into which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.
*/
@@ -174,7 +165,6 @@ Cartesian3.unpack = function (array, startingIndex, result) {
/**
* Flattens an array of Cartesian3s into an array of components.
- *
* @param {Cartesian3[]} array The array of cartesians to pack.
* @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 3 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 3) elements.
* @returns {number[]} The packed array.
@@ -206,7 +196,6 @@ Cartesian3.packArray = function (array, result) {
/**
* Unpacks an array of cartesian components into an array of Cartesian3s.
- *
* @param {number[]} array The array of components to unpack.
* @param {Cartesian3[]} [result] The array onto which to store the result.
* @returns {Cartesian3[]} The unpacked array.
@@ -237,12 +226,10 @@ Cartesian3.unpackArray = function (array, result) {
/**
* Creates a Cartesian3 from three consecutive elements in an array.
* @function
- *
* @param {number[]} array The array whose three consecutive elements correspond to the x, y, and z components, respectively.
* @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to the x component.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.
- *
* @example
* // Create a Cartesian3 with (1.0, 2.0, 3.0)
* const v = [1.0, 2.0, 3.0];
@@ -256,7 +243,6 @@ Cartesian3.fromArray = Cartesian3.unpack;
/**
* Computes the value of the maximum component for the supplied Cartesian.
- *
* @param {Cartesian3} cartesian The cartesian to use.
* @returns {number} The value of the maximum component.
*/
@@ -270,7 +256,6 @@ Cartesian3.maximumComponent = function (cartesian) {
/**
* Computes the value of the minimum component for the supplied Cartesian.
- *
* @param {Cartesian3} cartesian The cartesian to use.
* @returns {number} The value of the minimum component.
*/
@@ -284,7 +269,6 @@ Cartesian3.minimumComponent = function (cartesian) {
/**
* Compares two Cartesians and computes a Cartesian which contains the minimum components of the supplied Cartesians.
- *
* @param {Cartesian3} first A cartesian to compare.
* @param {Cartesian3} second A cartesian to compare.
* @param {Cartesian3} result The object into which to store the result.
@@ -306,7 +290,6 @@ Cartesian3.minimumByComponent = function (first, second, result) {
/**
* Compares two Cartesians and computes a Cartesian which contains the maximum components of the supplied Cartesians.
- *
* @param {Cartesian3} first A cartesian to compare.
* @param {Cartesian3} second A cartesian to compare.
* @param {Cartesian3} result The object into which to store the result.
@@ -327,8 +310,8 @@ Cartesian3.maximumByComponent = function (first, second, result) {
/**
* Constrain a value to lie between two values.
- *
* @param {Cartesian3} cartesian The value to clamp.
+ * @param value
* @param {Cartesian3} min The minimum bound.
* @param {Cartesian3} max The maximum bound.
* @param {Cartesian3} result The object into which to store the result.
@@ -355,7 +338,6 @@ Cartesian3.clamp = function (value, min, max, result) {
/**
* Computes the provided Cartesian's squared magnitude.
- *
* @param {Cartesian3} cartesian The Cartesian instance whose squared magnitude is to be computed.
* @returns {number} The squared magnitude.
*/
@@ -373,7 +355,6 @@ Cartesian3.magnitudeSquared = function (cartesian) {
/**
* Computes the Cartesian's magnitude (length).
- *
* @param {Cartesian3} cartesian The Cartesian instance whose magnitude is to be computed.
* @returns {number} The magnitude.
*/
@@ -385,11 +366,9 @@ const distanceScratch = new Cartesian3();
/**
* Computes the distance between two points.
- *
* @param {Cartesian3} left The first point to compute the distance from.
* @param {Cartesian3} right The second point to compute the distance to.
* @returns {number} The distance between two points.
- *
* @example
* // Returns 1.0
* const d = Cesium.Cartesian3.distance(new Cesium.Cartesian3(1.0, 0.0, 0.0), new Cesium.Cartesian3(2.0, 0.0, 0.0));
@@ -407,11 +386,9 @@ Cartesian3.distance = function (left, right) {
/**
* Computes the squared distance between two points. Comparing squared distances
* using this function is more efficient than comparing distances using {@link Cartesian3#distance}.
- *
* @param {Cartesian3} left The first point to compute the distance from.
* @param {Cartesian3} right The second point to compute the distance to.
* @returns {number} The distance between two points.
- *
* @example
* // Returns 4.0, not 2.0
* const d = Cesium.Cartesian3.distanceSquared(new Cesium.Cartesian3(1.0, 0.0, 0.0), new Cesium.Cartesian3(3.0, 0.0, 0.0));
@@ -428,7 +405,6 @@ Cartesian3.distanceSquared = function (left, right) {
/**
* Computes the normalized form of the supplied Cartesian.
- *
* @param {Cartesian3} cartesian The Cartesian to be normalized.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
@@ -456,7 +432,6 @@ Cartesian3.normalize = function (cartesian, result) {
/**
* Computes the dot (scalar) product of two Cartesians.
- *
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @returns {number} The dot product.
@@ -472,7 +447,6 @@ Cartesian3.dot = function (left, right) {
/**
* Computes the componentwise product of two Cartesians.
- *
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @param {Cartesian3} result The object onto which to store the result.
@@ -493,7 +467,6 @@ Cartesian3.multiplyComponents = function (left, right, result) {
/**
* Computes the componentwise quotient of two Cartesians.
- *
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @param {Cartesian3} result The object onto which to store the result.
@@ -514,7 +487,6 @@ Cartesian3.divideComponents = function (left, right, result) {
/**
* Computes the componentwise sum of two Cartesians.
- *
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @param {Cartesian3} result The object onto which to store the result.
@@ -535,7 +507,6 @@ Cartesian3.add = function (left, right, result) {
/**
* Computes the componentwise difference of two Cartesians.
- *
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @param {Cartesian3} result The object onto which to store the result.
@@ -556,7 +527,6 @@ Cartesian3.subtract = function (left, right, result) {
/**
* Multiplies the provided Cartesian componentwise by the provided scalar.
- *
* @param {Cartesian3} cartesian The Cartesian to be scaled.
* @param {number} scalar The scalar to multiply with.
* @param {Cartesian3} result The object onto which to store the result.
@@ -577,7 +547,6 @@ Cartesian3.multiplyByScalar = function (cartesian, scalar, result) {
/**
* Divides the provided Cartesian componentwise by the provided scalar.
- *
* @param {Cartesian3} cartesian The Cartesian to be divided.
* @param {number} scalar The scalar to divide by.
* @param {Cartesian3} result The object onto which to store the result.
@@ -598,7 +567,6 @@ Cartesian3.divideByScalar = function (cartesian, scalar, result) {
/**
* Negates the provided Cartesian.
- *
* @param {Cartesian3} cartesian The Cartesian to be negated.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
@@ -617,7 +585,6 @@ Cartesian3.negate = function (cartesian, result) {
/**
* Computes the absolute value of the provided Cartesian.
- *
* @param {Cartesian3} cartesian The Cartesian whose absolute value is to be computed.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
@@ -637,7 +604,6 @@ Cartesian3.abs = function (cartesian, result) {
const lerpScratch = new Cartesian3();
/**
* Computes the linear interpolation or extrapolation at t using the provided cartesians.
- *
* @param {Cartesian3} start The value corresponding to t at 0.0.
* @param {Cartesian3} end The value corresponding to t at 1.0.
* @param {number} t The point along t at which to interpolate.
@@ -661,7 +627,6 @@ const angleBetweenScratch = new Cartesian3();
const angleBetweenScratch2 = new Cartesian3();
/**
* Returns the angle, in radians, between the provided Cartesians.
- *
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @returns {number} The angle between the Cartesians.
@@ -688,7 +653,6 @@ Cartesian3.angleBetween = function (left, right) {
const mostOrthogonalAxisScratch = new Cartesian3();
/**
* Returns the axis that is most orthogonal to the provided Cartesian.
- *
* @param {Cartesian3} cartesian The Cartesian on which to find the most orthogonal axis.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The most orthogonal axis.
@@ -738,7 +702,6 @@ Cartesian3.projectVector = function (a, b, result) {
/**
* Compares the provided Cartesians componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {Cartesian3} [left] The first Cartesian.
* @param {Cartesian3} [right] The second Cartesian.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -755,6 +718,9 @@ Cartesian3.equals = function (left, right) {
};
/**
+ * @param cartesian
+ * @param array
+ * @param offset
* @private
*/
Cartesian3.equalsArray = function (cartesian, array, offset) {
@@ -769,11 +735,10 @@ Cartesian3.equalsArray = function (cartesian, array, offset) {
* Compares the provided Cartesians componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
- *
* @param {Cartesian3} [left] The first Cartesian.
* @param {Cartesian3} [right] The second Cartesian.
- * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [relativeEpsilon] The relative epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
*/
Cartesian3.equalsEpsilon = function (
@@ -809,7 +774,6 @@ Cartesian3.equalsEpsilon = function (
/**
* Computes the cross (outer) product of two Cartesians.
- *
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @param {Cartesian3} result The object onto which to store the result.
@@ -862,14 +826,12 @@ Cartesian3.midpoint = function (left, right, result) {
/**
* Returns a Cartesian3 position from longitude and latitude values given in degrees.
- *
* @param {number} longitude The longitude, in degrees
* @param {number} latitude The latitude, in degrees
- * @param {number} [height=0.0] The height, in meters, above the ellipsoid.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
+ * @param {number} [height] The height, in meters, above the ellipsoid.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the position lies.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The position
- *
* @example
* const position = Cesium.Cartesian3.fromDegrees(-115.0, 37.0);
*/
@@ -900,14 +862,12 @@ const wgs84RadiiSquared = new Cartesian3(
/**
* Returns a Cartesian3 position from longitude and latitude values given in radians.
- *
* @param {number} longitude The longitude, in radians
* @param {number} latitude The latitude, in radians
- * @param {number} [height=0.0] The height, in meters, above the ellipsoid.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
+ * @param {number} [height] The height, in meters, above the ellipsoid.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the position lies.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The position
- *
* @example
* const position = Cesium.Cartesian3.fromRadians(-2.007, 0.645);
*/
@@ -947,12 +907,10 @@ Cartesian3.fromRadians = function (
/**
* Returns an array of Cartesian3 positions given an array of longitude and latitude values given in degrees.
- *
* @param {number[]} coordinates A list of longitude and latitude values. Values alternate [longitude, latitude, longitude, latitude...].
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the coordinates lie.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the coordinates lie.
* @param {Cartesian3[]} [result] An array of Cartesian3 objects to store the result.
* @returns {Cartesian3[]} The array of positions.
- *
* @example
* const positions = Cesium.Cartesian3.fromDegreesArray([-115.0, 37.0, -107.0, 33.0]);
*/
@@ -991,12 +949,10 @@ Cartesian3.fromDegreesArray = function (coordinates, ellipsoid, result) {
/**
* Returns an array of Cartesian3 positions given an array of longitude and latitude values given in radians.
- *
* @param {number[]} coordinates A list of longitude and latitude values. Values alternate [longitude, latitude, longitude, latitude...].
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the coordinates lie.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the coordinates lie.
* @param {Cartesian3[]} [result] An array of Cartesian3 objects to store the result.
* @returns {Cartesian3[]} The array of positions.
- *
* @example
* const positions = Cesium.Cartesian3.fromRadiansArray([-2.007, 0.645, -1.867, .575]);
*/
@@ -1035,12 +991,10 @@ Cartesian3.fromRadiansArray = function (coordinates, ellipsoid, result) {
/**
* Returns an array of Cartesian3 positions given an array of longitude, latitude and height values where longitude and latitude are given in degrees.
- *
* @param {number[]} coordinates A list of longitude, latitude and height values. Values alternate [longitude, latitude, height, longitude, latitude, height...].
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the position lies.
* @param {Cartesian3[]} [result] An array of Cartesian3 objects to store the result.
* @returns {Cartesian3[]} The array of positions.
- *
* @example
* const positions = Cesium.Cartesian3.fromDegreesArrayHeights([-115.0, 37.0, 100000.0, -107.0, 33.0, 150000.0]);
*/
@@ -1080,12 +1034,10 @@ Cartesian3.fromDegreesArrayHeights = function (coordinates, ellipsoid, result) {
/**
* Returns an array of Cartesian3 positions given an array of longitude, latitude and height values where longitude and latitude are given in radians.
- *
* @param {number[]} coordinates A list of longitude, latitude and height values. Values alternate [longitude, latitude, height, longitude, latitude, height...].
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the position lies.
* @param {Cartesian3[]} [result] An array of Cartesian3 objects to store the result.
* @returns {Cartesian3[]} The array of positions.
- *
* @example
* const positions = Cesium.Cartesian3.fromRadiansArrayHeights([-2.007, 0.645, 100000.0, -1.867, .575, 150000.0]);
*/
@@ -1125,7 +1077,6 @@ Cartesian3.fromRadiansArrayHeights = function (coordinates, ellipsoid, result) {
/**
* An immutable Cartesian3 instance initialized to (0.0, 0.0, 0.0).
- *
* @type {Cartesian3}
* @constant
*/
@@ -1133,7 +1084,6 @@ Cartesian3.ZERO = Object.freeze(new Cartesian3(0.0, 0.0, 0.0));
/**
* An immutable Cartesian3 instance initialized to (1.0, 1.0, 1.0).
- *
* @type {Cartesian3}
* @constant
*/
@@ -1141,7 +1091,6 @@ Cartesian3.ONE = Object.freeze(new Cartesian3(1.0, 1.0, 1.0));
/**
* An immutable Cartesian3 instance initialized to (1.0, 0.0, 0.0).
- *
* @type {Cartesian3}
* @constant
*/
@@ -1149,7 +1098,6 @@ Cartesian3.UNIT_X = Object.freeze(new Cartesian3(1.0, 0.0, 0.0));
/**
* An immutable Cartesian3 instance initialized to (0.0, 1.0, 0.0).
- *
* @type {Cartesian3}
* @constant
*/
@@ -1157,7 +1105,6 @@ Cartesian3.UNIT_Y = Object.freeze(new Cartesian3(0.0, 1.0, 0.0));
/**
* An immutable Cartesian3 instance initialized to (0.0, 0.0, 1.0).
- *
* @type {Cartesian3}
* @constant
*/
@@ -1165,7 +1112,6 @@ Cartesian3.UNIT_Z = Object.freeze(new Cartesian3(0.0, 0.0, 1.0));
/**
* Duplicates this Cartesian3 instance.
- *
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.
*/
@@ -1176,7 +1122,6 @@ Cartesian3.prototype.clone = function (result) {
/**
* Compares this Cartesian against the provided Cartesian componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {Cartesian3} [right] The right hand side Cartesian.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -1188,10 +1133,9 @@ Cartesian3.prototype.equals = function (right) {
* Compares this Cartesian against the provided Cartesian componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
- *
* @param {Cartesian3} [right] The right hand side Cartesian.
- * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [relativeEpsilon] The relative epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if they are within the provided epsilon, false
otherwise.
*/
Cartesian3.prototype.equalsEpsilon = function (
@@ -1209,7 +1153,6 @@ Cartesian3.prototype.equalsEpsilon = function (
/**
* Creates a string representing this Cartesian in the format '(x, y, z)'.
- *
* @returns {string} A string representing this Cartesian in the format '(x, y, z)'.
*/
Cartesian3.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/Cartesian4.js b/packages/engine/Source/Core/Cartesian4.js
index fa841cc9b2aa..3b008d6a0d3c 100644
--- a/packages/engine/Source/Core/Cartesian4.js
+++ b/packages/engine/Source/Core/Cartesian4.js
@@ -7,13 +7,11 @@ import CesiumMath from "./Math.js";
/**
* A 4D Cartesian point.
* @alias Cartesian4
- * @constructor
- *
- * @param {number} [x=0.0] The X component.
- * @param {number} [y=0.0] The Y component.
- * @param {number} [z=0.0] The Z component.
- * @param {number} [w=0.0] The W component.
- *
+ * @class
+ * @param {number} [x] The X component.
+ * @param {number} [y] The Y component.
+ * @param {number} [z] The Z component.
+ * @param {number} [w] The W component.
* @see Cartesian2
* @see Cartesian3
* @see Packable
@@ -50,7 +48,6 @@ function Cartesian4(x, y, z, w) {
/**
* Creates a Cartesian4 instance from x, y, z and w coordinates.
- *
* @param {number} x The x coordinate.
* @param {number} y The y coordinate.
* @param {number} z The z coordinate.
@@ -73,7 +70,6 @@ Cartesian4.fromElements = function (x, y, z, w, result) {
/**
* Creates a Cartesian4 instance from a {@link Color}. red
, green
, blue
,
* and alpha
map to x
, y
, z
, and w
, respectively.
- *
* @param {Color} color The source color.
* @param {Cartesian4} [result] The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.
@@ -95,7 +91,6 @@ Cartesian4.fromColor = function (color, result) {
/**
* Duplicates a Cartesian4 instance.
- *
* @param {Cartesian4} cartesian The Cartesian to duplicate.
* @param {Cartesian4} [result] The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided. (Returns undefined if cartesian is undefined)
@@ -124,11 +119,9 @@ Cartesian4.packedLength = 4;
/**
* Stores the provided instance into the provided array.
- *
* @param {Cartesian4} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
Cartesian4.pack = function (value, array, startingIndex) {
@@ -149,9 +142,8 @@ Cartesian4.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {Cartesian4} [result] The object into which to store the result.
* @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.
*/
@@ -174,7 +166,6 @@ Cartesian4.unpack = function (array, startingIndex, result) {
/**
* Flattens an array of Cartesian4s into an array of components.
- *
* @param {Cartesian4[]} array The array of cartesians to pack.
* @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 4 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 4) elements.
* @returns {number[]} The packed array.
@@ -206,7 +197,6 @@ Cartesian4.packArray = function (array, result) {
/**
* Unpacks an array of cartesian components into an array of Cartesian4s.
- *
* @param {number[]} array The array of components to unpack.
* @param {Cartesian4[]} [result] The array onto which to store the result.
* @returns {Cartesian4[]} The unpacked array.
@@ -237,12 +227,10 @@ Cartesian4.unpackArray = function (array, result) {
/**
* Creates a Cartesian4 from four consecutive elements in an array.
* @function
- *
* @param {number[]} array The array whose four consecutive elements correspond to the x, y, z, and w components, respectively.
* @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to the x component.
* @param {Cartesian4} [result] The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.
- *
* @example
* // Create a Cartesian4 with (1.0, 2.0, 3.0, 4.0)
* const v = [1.0, 2.0, 3.0, 4.0];
@@ -256,7 +244,6 @@ Cartesian4.fromArray = Cartesian4.unpack;
/**
* Computes the value of the maximum component for the supplied Cartesian.
- *
* @param {Cartesian4} cartesian The cartesian to use.
* @returns {number} The value of the maximum component.
*/
@@ -270,7 +257,6 @@ Cartesian4.maximumComponent = function (cartesian) {
/**
* Computes the value of the minimum component for the supplied Cartesian.
- *
* @param {Cartesian4} cartesian The cartesian to use.
* @returns {number} The value of the minimum component.
*/
@@ -284,7 +270,6 @@ Cartesian4.minimumComponent = function (cartesian) {
/**
* Compares two Cartesians and computes a Cartesian which contains the minimum components of the supplied Cartesians.
- *
* @param {Cartesian4} first A cartesian to compare.
* @param {Cartesian4} second A cartesian to compare.
* @param {Cartesian4} result The object into which to store the result.
@@ -307,7 +292,6 @@ Cartesian4.minimumByComponent = function (first, second, result) {
/**
* Compares two Cartesians and computes a Cartesian which contains the maximum components of the supplied Cartesians.
- *
* @param {Cartesian4} first A cartesian to compare.
* @param {Cartesian4} second A cartesian to compare.
* @param {Cartesian4} result The object into which to store the result.
@@ -330,7 +314,6 @@ Cartesian4.maximumByComponent = function (first, second, result) {
/**
* Constrain a value to lie between two values.
- *
* @param {Cartesian4} value The value to clamp.
* @param {Cartesian4} min The minimum bound.
* @param {Cartesian4} max The maximum bound.
@@ -360,7 +343,6 @@ Cartesian4.clamp = function (value, min, max, result) {
/**
* Computes the provided Cartesian's squared magnitude.
- *
* @param {Cartesian4} cartesian The Cartesian instance whose squared magnitude is to be computed.
* @returns {number} The squared magnitude.
*/
@@ -379,7 +361,6 @@ Cartesian4.magnitudeSquared = function (cartesian) {
/**
* Computes the Cartesian's magnitude (length).
- *
* @param {Cartesian4} cartesian The Cartesian instance whose magnitude is to be computed.
* @returns {number} The magnitude.
*/
@@ -391,11 +372,9 @@ const distanceScratch = new Cartesian4();
/**
* Computes the 4-space distance between two points.
- *
* @param {Cartesian4} left The first point to compute the distance from.
* @param {Cartesian4} right The second point to compute the distance to.
* @returns {number} The distance between two points.
- *
* @example
* // Returns 1.0
* const d = Cesium.Cartesian4.distance(
@@ -415,11 +394,9 @@ Cartesian4.distance = function (left, right) {
/**
* Computes the squared distance between two points. Comparing squared distances
* using this function is more efficient than comparing distances using {@link Cartesian4#distance}.
- *
* @param {Cartesian4} left The first point to compute the distance from.
* @param {Cartesian4} right The second point to compute the distance to.
* @returns {number} The distance between two points.
- *
* @example
* // Returns 4.0, not 2.0
* const d = Cesium.Cartesian4.distance(
@@ -438,7 +415,6 @@ Cartesian4.distanceSquared = function (left, right) {
/**
* Computes the normalized form of the supplied Cartesian.
- *
* @param {Cartesian4} cartesian The Cartesian to be normalized.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
@@ -472,7 +448,6 @@ Cartesian4.normalize = function (cartesian, result) {
/**
* Computes the dot (scalar) product of two Cartesians.
- *
* @param {Cartesian4} left The first Cartesian.
* @param {Cartesian4} right The second Cartesian.
* @returns {number} The dot product.
@@ -490,7 +465,6 @@ Cartesian4.dot = function (left, right) {
/**
* Computes the componentwise product of two Cartesians.
- *
* @param {Cartesian4} left The first Cartesian.
* @param {Cartesian4} right The second Cartesian.
* @param {Cartesian4} result The object onto which to store the result.
@@ -512,7 +486,6 @@ Cartesian4.multiplyComponents = function (left, right, result) {
/**
* Computes the componentwise quotient of two Cartesians.
- *
* @param {Cartesian4} left The first Cartesian.
* @param {Cartesian4} right The second Cartesian.
* @param {Cartesian4} result The object onto which to store the result.
@@ -534,7 +507,6 @@ Cartesian4.divideComponents = function (left, right, result) {
/**
* Computes the componentwise sum of two Cartesians.
- *
* @param {Cartesian4} left The first Cartesian.
* @param {Cartesian4} right The second Cartesian.
* @param {Cartesian4} result The object onto which to store the result.
@@ -556,7 +528,6 @@ Cartesian4.add = function (left, right, result) {
/**
* Computes the componentwise difference of two Cartesians.
- *
* @param {Cartesian4} left The first Cartesian.
* @param {Cartesian4} right The second Cartesian.
* @param {Cartesian4} result The object onto which to store the result.
@@ -578,7 +549,6 @@ Cartesian4.subtract = function (left, right, result) {
/**
* Multiplies the provided Cartesian componentwise by the provided scalar.
- *
* @param {Cartesian4} cartesian The Cartesian to be scaled.
* @param {number} scalar The scalar to multiply with.
* @param {Cartesian4} result The object onto which to store the result.
@@ -600,7 +570,6 @@ Cartesian4.multiplyByScalar = function (cartesian, scalar, result) {
/**
* Divides the provided Cartesian componentwise by the provided scalar.
- *
* @param {Cartesian4} cartesian The Cartesian to be divided.
* @param {number} scalar The scalar to divide by.
* @param {Cartesian4} result The object onto which to store the result.
@@ -622,7 +591,6 @@ Cartesian4.divideByScalar = function (cartesian, scalar, result) {
/**
* Negates the provided Cartesian.
- *
* @param {Cartesian4} cartesian The Cartesian to be negated.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
@@ -642,7 +610,6 @@ Cartesian4.negate = function (cartesian, result) {
/**
* Computes the absolute value of the provided Cartesian.
- *
* @param {Cartesian4} cartesian The Cartesian whose absolute value is to be computed.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
@@ -663,7 +630,6 @@ Cartesian4.abs = function (cartesian, result) {
const lerpScratch = new Cartesian4();
/**
* Computes the linear interpolation or extrapolation at t using the provided cartesians.
- *
* @param {Cartesian4} start The value corresponding to t at 0.0.
* @param {Cartesian4}end The value corresponding to t at 1.0.
* @param {number} t The point along t at which to interpolate.
@@ -686,7 +652,6 @@ Cartesian4.lerp = function (start, end, t, result) {
const mostOrthogonalAxisScratch = new Cartesian4();
/**
* Returns the axis that is most orthogonal to the provided Cartesian.
- *
* @param {Cartesian4} cartesian The Cartesian on which to find the most orthogonal axis.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The most orthogonal axis.
@@ -730,7 +695,6 @@ Cartesian4.mostOrthogonalAxis = function (cartesian, result) {
/**
* Compares the provided Cartesians componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {Cartesian4} [left] The first Cartesian.
* @param {Cartesian4} [right] The second Cartesian.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -748,6 +712,9 @@ Cartesian4.equals = function (left, right) {
};
/**
+ * @param cartesian
+ * @param array
+ * @param offset
* @private
*/
Cartesian4.equalsArray = function (cartesian, array, offset) {
@@ -763,11 +730,10 @@ Cartesian4.equalsArray = function (cartesian, array, offset) {
* Compares the provided Cartesians componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
- *
* @param {Cartesian4} [left] The first Cartesian.
* @param {Cartesian4} [right] The second Cartesian.
- * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [relativeEpsilon] The relative epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
*/
Cartesian4.equalsEpsilon = function (
@@ -809,7 +775,6 @@ Cartesian4.equalsEpsilon = function (
/**
* An immutable Cartesian4 instance initialized to (0.0, 0.0, 0.0, 0.0).
- *
* @type {Cartesian4}
* @constant
*/
@@ -817,7 +782,6 @@ Cartesian4.ZERO = Object.freeze(new Cartesian4(0.0, 0.0, 0.0, 0.0));
/**
* An immutable Cartesian4 instance initialized to (1.0, 1.0, 1.0, 1.0).
- *
* @type {Cartesian4}
* @constant
*/
@@ -825,7 +789,6 @@ Cartesian4.ONE = Object.freeze(new Cartesian4(1.0, 1.0, 1.0, 1.0));
/**
* An immutable Cartesian4 instance initialized to (1.0, 0.0, 0.0, 0.0).
- *
* @type {Cartesian4}
* @constant
*/
@@ -833,7 +796,6 @@ Cartesian4.UNIT_X = Object.freeze(new Cartesian4(1.0, 0.0, 0.0, 0.0));
/**
* An immutable Cartesian4 instance initialized to (0.0, 1.0, 0.0, 0.0).
- *
* @type {Cartesian4}
* @constant
*/
@@ -841,7 +803,6 @@ Cartesian4.UNIT_Y = Object.freeze(new Cartesian4(0.0, 1.0, 0.0, 0.0));
/**
* An immutable Cartesian4 instance initialized to (0.0, 0.0, 1.0, 0.0).
- *
* @type {Cartesian4}
* @constant
*/
@@ -849,7 +810,6 @@ Cartesian4.UNIT_Z = Object.freeze(new Cartesian4(0.0, 0.0, 1.0, 0.0));
/**
* An immutable Cartesian4 instance initialized to (0.0, 0.0, 0.0, 1.0).
- *
* @type {Cartesian4}
* @constant
*/
@@ -857,7 +817,6 @@ Cartesian4.UNIT_W = Object.freeze(new Cartesian4(0.0, 0.0, 0.0, 1.0));
/**
* Duplicates this Cartesian4 instance.
- *
* @param {Cartesian4} [result] The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.
*/
@@ -868,7 +827,6 @@ Cartesian4.prototype.clone = function (result) {
/**
* Compares this Cartesian against the provided Cartesian componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {Cartesian4} [right] The right hand side Cartesian.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -880,10 +838,9 @@ Cartesian4.prototype.equals = function (right) {
* Compares this Cartesian against the provided Cartesian componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
- *
* @param {Cartesian4} [right] The right hand side Cartesian.
- * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [relativeEpsilon] The relative epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if they are within the provided epsilon, false
otherwise.
*/
Cartesian4.prototype.equalsEpsilon = function (
@@ -901,7 +858,6 @@ Cartesian4.prototype.equalsEpsilon = function (
/**
* Creates a string representing this Cartesian in the format '(x, y, z, w)'.
- *
* @returns {string} A string representing the provided Cartesian in the format '(x, y, z, w)'.
*/
Cartesian4.prototype.toString = function () {
@@ -918,7 +874,6 @@ const littleEndian = testU8[0] === 0x44;
/**
* Packs an arbitrary floating point value to 4 values representable using uint8.
- *
* @param {number} value A floating point number.
* @param {Cartesian4} [result] The Cartesian4 that will contain the packed float.
* @returns {Cartesian4} A Cartesian4 representing the float packed to values in x, y, z, and w.
@@ -952,7 +907,6 @@ Cartesian4.packFloat = function (value, result) {
/**
* Unpacks a float packed using Cartesian4.packFloat.
- *
* @param {Cartesian4} packedFloat A Cartesian4 containing a float packed to 4 values representable using uint8.
* @returns {number} The unpacked float.
* @private
diff --git a/packages/engine/Source/Core/Cartographic.js b/packages/engine/Source/Core/Cartographic.js
index 87957c75bdce..992f6e264d8d 100644
--- a/packages/engine/Source/Core/Cartographic.js
+++ b/packages/engine/Source/Core/Cartographic.js
@@ -8,12 +8,10 @@ import scaleToGeodeticSurface from "./scaleToGeodeticSurface.js";
/**
* A position defined by longitude, latitude, and height.
* @alias Cartographic
- * @constructor
- *
- * @param {number} [longitude=0.0] The longitude, in radians.
- * @param {number} [latitude=0.0] The latitude, in radians.
- * @param {number} [height=0.0] The height, in meters, above the ellipsoid.
- *
+ * @class
+ * @param {number} [longitude] The longitude, in radians.
+ * @param {number} [latitude] The latitude, in radians.
+ * @param {number} [height] The height, in meters, above the ellipsoid.
* @see Ellipsoid
*/
function Cartographic(longitude, latitude, height) {
@@ -42,10 +40,9 @@ function Cartographic(longitude, latitude, height) {
/**
* Creates a new Cartographic instance from longitude and latitude
* specified in radians.
- *
* @param {number} longitude The longitude, in radians.
* @param {number} latitude The latitude, in radians.
- * @param {number} [height=0.0] The height, in meters, above the ellipsoid.
+ * @param {number} [height] The height, in meters, above the ellipsoid.
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided.
*/
@@ -71,10 +68,9 @@ Cartographic.fromRadians = function (longitude, latitude, height, result) {
* Creates a new Cartographic instance from longitude and latitude
* specified in degrees. The values in the resulting object will
* be in radians.
- *
* @param {number} longitude The longitude, in degrees.
* @param {number} latitude The latitude, in degrees.
- * @param {number} [height=0.0] The height, in meters, above the ellipsoid.
+ * @param {number} [height] The height, in meters, above the ellipsoid.
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided.
*/
@@ -107,9 +103,8 @@ const wgs84CenterToleranceSquared = CesiumMath.EPSILON1;
/**
* Creates a new Cartographic instance from a Cartesian position. The values in the
* resulting object will be in radians.
- *
* @param {Cartesian3} cartesian The Cartesian position to convert to cartographic representation.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the position lies.
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.
*/
@@ -163,9 +158,8 @@ Cartographic.fromCartesian = function (cartesian, ellipsoid, result) {
/**
* Creates a new Cartesian3 instance from a Cartographic input. The values in the inputted
* object should be in radians.
- *
* @param {Cartographic} cartographic Input to be converted into a Cartesian3 output.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the position lies.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The position
*/
@@ -185,7 +179,6 @@ Cartographic.toCartesian = function (cartographic, ellipsoid, result) {
/**
* Duplicates a Cartographic instance.
- *
* @param {Cartographic} cartographic The cartographic to duplicate.
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided. (Returns undefined if cartographic is undefined)
@@ -210,7 +203,6 @@ Cartographic.clone = function (cartographic, result) {
/**
* Compares the provided cartographics componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {Cartographic} [left] The first cartographic.
* @param {Cartographic} [right] The second cartographic.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -230,10 +222,9 @@ Cartographic.equals = function (left, right) {
* Compares the provided cartographics componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
- *
* @param {Cartographic} [left] The first cartographic.
* @param {Cartographic} [right] The second cartographic.
- * @param {number} [epsilon=0] The epsilon to use for equality testing.
+ * @param {number} [epsilon] The epsilon to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
*/
Cartographic.equalsEpsilon = function (left, right, epsilon) {
@@ -251,7 +242,6 @@ Cartographic.equalsEpsilon = function (left, right, epsilon) {
/**
* An immutable Cartographic instance initialized to (0.0, 0.0, 0.0).
- *
* @type {Cartographic}
* @constant
*/
@@ -259,7 +249,6 @@ Cartographic.ZERO = Object.freeze(new Cartographic(0.0, 0.0, 0.0));
/**
* Duplicates this instance.
- *
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided.
*/
@@ -270,7 +259,6 @@ Cartographic.prototype.clone = function (result) {
/**
* Compares the provided against this cartographic componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {Cartographic} [right] The second cartographic.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
@@ -282,9 +270,8 @@ Cartographic.prototype.equals = function (right) {
* Compares the provided against this cartographic componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
- *
* @param {Cartographic} [right] The second cartographic.
- * @param {number} [epsilon=0] The epsilon to use for equality testing.
+ * @param {number} [epsilon] The epsilon to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
*/
Cartographic.prototype.equalsEpsilon = function (right, epsilon) {
@@ -293,7 +280,6 @@ Cartographic.prototype.equalsEpsilon = function (right, epsilon) {
/**
* Creates a string representing this cartographic in the format '(longitude, latitude, height)'.
- *
* @returns {string} A string representing the provided cartographic in the format '(longitude, latitude, height)'.
*/
Cartographic.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/CartographicGeocoderService.js b/packages/engine/Source/Core/CartographicGeocoderService.js
index 149edc6270c7..a146d9541227 100644
--- a/packages/engine/Source/Core/CartographicGeocoderService.js
+++ b/packages/engine/Source/Core/CartographicGeocoderService.js
@@ -4,9 +4,8 @@ import Check from "./Check.js";
/**
* Geocodes queries containing longitude and latitude coordinates and an optional height.
* Query format: `longitude latitude (height)` with longitude/latitude in degrees and height in meters.
- *
* @alias CartographicGeocoderService
- * @constructor
+ * @class
*/
function CartographicGeocoderService() {}
@@ -27,7 +26,6 @@ Object.defineProperties(CartographicGeocoderService.prototype, {
/**
* @function
- *
* @param {string} query The query to be sent to the geocoder service
* @returns {Promise}
*/
diff --git a/packages/engine/Source/Core/CatmullRomSpline.js b/packages/engine/Source/Core/CatmullRomSpline.js
index 8f7c4ea6d9f2..017d44880006 100644
--- a/packages/engine/Source/Core/CatmullRomSpline.js
+++ b/packages/engine/Source/Core/CatmullRomSpline.js
@@ -107,10 +107,8 @@ const lastTangentScratch = new Cartesian3();
* A Catmull-Rom spline is a cubic spline where the tangent at control points,
* except the first and last, are computed using the previous and next control points.
* Catmull-Rom splines are in the class C1 .
- *
* @alias CatmullRomSpline
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {number[]} options.times An array of strictly increasing, unit-less, floating-point times at each point.
* The values are in no way connected to the clock time. They are the parameterization for the curve.
@@ -119,11 +117,8 @@ const lastTangentScratch = new Cartesian3();
* If the tangent is not given, it will be estimated.
* @param {Cartesian3} [options.lastTangent] The tangent of the curve at the last control point.
* If the tangent is not given, it will be estimated.
- *
- * @exception {DeveloperError} points.length must be greater than or equal to 2.
- * @exception {DeveloperError} times.length must be equal to points.length.
- *
- *
+ * @throws {DeveloperError} points.length must be greater than or equal to 2.
+ * @throws {DeveloperError} times.length must be equal to points.length.
* @example
* // spline above the earth from Philadelphia to Los Angeles
* const spline = new Cesium.CatmullRomSpline({
@@ -139,7 +134,6 @@ const lastTangentScratch = new Cartesian3();
*
* const p0 = spline.evaluate(times[i]); // equal to positions[i]
* const p1 = spline.evaluate(times[i] + delta); // interpolated value when delta < times[i + 1] - times[i]
- *
* @see ConstantSpline
* @see SteppedSpline
* @see HermiteSpline
@@ -198,9 +192,7 @@ function CatmullRomSpline(options) {
Object.defineProperties(CatmullRomSpline.prototype, {
/**
* An array of times for the control points.
- *
* @memberof CatmullRomSpline.prototype
- *
* @type {number[]}
* @readonly
*/
@@ -212,9 +204,7 @@ Object.defineProperties(CatmullRomSpline.prototype, {
/**
* An array of {@link Cartesian3} control points.
- *
* @memberof CatmullRomSpline.prototype
- *
* @type {Cartesian3[]}
* @readonly
*/
@@ -226,9 +216,7 @@ Object.defineProperties(CatmullRomSpline.prototype, {
/**
* The tangent at the first control point.
- *
* @memberof CatmullRomSpline.prototype
- *
* @type {Cartesian3}
* @readonly
*/
@@ -240,9 +228,7 @@ Object.defineProperties(CatmullRomSpline.prototype, {
/**
* The tangent at the last control point.
- *
* @memberof CatmullRomSpline.prototype
- *
* @type {Cartesian3}
* @readonly
*/
@@ -279,11 +265,9 @@ CatmullRomSpline.catmullRomCoefficientMatrix = new Matrix4(
* Finds an index i
in times
such that the parameter
* time
is in the interval [times[i], times[i + 1]]
.
* @function
- *
* @param {number} time The time.
* @returns {number} The index for the element at the start of the interval.
- *
- * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
@@ -292,29 +276,25 @@ CatmullRomSpline.prototype.findTimeInterval = Spline.prototype.findTimeInterval;
/**
* Wraps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, wrapped around to the updated animation.
+ * @returns {number} The time, wrapped around to the updated animation.
*/
CatmullRomSpline.prototype.wrapTime = Spline.prototype.wrapTime;
/**
* Clamps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, clamped to the animation period.
+ * @returns {number} The time, clamped to the animation period.
*/
CatmullRomSpline.prototype.clampTime = Spline.prototype.clampTime;
/**
* Evaluates the curve at a given time.
- *
* @param {number} time The time at which to evaluate the curve.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new instance of the point on the curve at the given time.
- *
- * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
diff --git a/packages/engine/Source/Core/CesiumTerrainProvider.js b/packages/engine/Source/Core/CesiumTerrainProvider.js
index c70769c02fcf..70baa6485d59 100644
--- a/packages/engine/Source/Core/CesiumTerrainProvider.js
+++ b/packages/engine/Source/Core/CesiumTerrainProvider.js
@@ -38,10 +38,9 @@ function LayerInformation(layer) {
}
/**
- * @typedef {Object} CesiumTerrainProvider.ConstructorOptions
+ * @typedef {object} CesiumTerrainProvider.ConstructorOptions
*
* Initialization options for the CesiumTerrainProvider constructor
- *
* @property {boolean} [requestVertexNormals=false] Flag that indicates if the client should request additional lighting information from the server, in the form of per vertex normals if available.
* @property {boolean} [requestWaterMask=false] Flag that indicates if the client should request per tile water masks from the server, if available.
* @property {boolean} [requestMetadata=true] Flag that indicates if the client should request per tile metadata from the server, if available.
@@ -51,10 +50,8 @@ function LayerInformation(layer) {
/**
* Used to track creation details while fetching initial metadata
- *
- * @constructor
+ * @class
* @private
- *
* @param {CesiumTerrainProvider.ConstructorOptions} options An object describing initialization options
*/
function TerrainProviderBuilder(options) {
@@ -86,9 +83,7 @@ function TerrainProviderBuilder(options) {
/**
* Complete CesiumTerrainProvider creation based on builder values.
- *
* @private
- *
* @param {CesiumTerrainProvider} provider
*/
TerrainProviderBuilder.prototype.build = function (provider) {
@@ -450,12 +445,9 @@ async function requestLayerJson(terrainProviderBuilder, provider) {
* {@link https://github.com/AnalyticalGraphicsInc/quantized-mesh Quantized Mesh}
* {@link https://github.com/AnalyticalGraphicsInc/cesium/wiki/heightmap-1.0 Height Map}
*
- *
* @alias CesiumTerrainProvider
- * @constructor
- *
+ * @class
* @param {CesiumTerrainProvider.ConstructorOptions} [options] An object describing initialization options
- *
* @example
* // Create Arctic DEM terrain with normals.
* try {
@@ -467,7 +459,6 @@ async function requestLayerJson(terrainProviderBuilder, provider) {
* } catch (error) {
* console.log(error);
* }
- *
* @see createWorldTerrain
* @see CesiumTerrainProvider.fromUrl
* @see CesiumTerrainProvider.fromIonAssetId
@@ -529,7 +520,6 @@ function CesiumTerrainProvider(options) {
/**
* When using the Quantized-Mesh format, a tile may be returned that includes additional extensions, such as PerVertexNormals, watermask, etc.
* This enumeration defines the unique identifiers for each type of extension data that has been appended to the standard mesh data.
- *
* @namespace QuantizedMeshExtensionIds
* @see CesiumTerrainProvider
* @private
@@ -537,7 +527,6 @@ function CesiumTerrainProvider(options) {
const QuantizedMeshExtensionIds = {
/**
* Oct-Encoded Per-Vertex Normals are included as an extension to the tile mesh
- *
* @type {number}
* @constant
* @default 1
@@ -545,7 +534,6 @@ const QuantizedMeshExtensionIds = {
OCT_VERTEX_NORMALS: 1,
/**
* A watermask is included as an extension to the tile mesh
- *
* @type {number}
* @constant
* @default 2
@@ -553,7 +541,6 @@ const QuantizedMeshExtensionIds = {
WATER_MASK: 2,
/**
* A json object contain metadata about the tile
- *
* @type {number}
* @constant
* @default 4
@@ -840,16 +827,13 @@ function createQuantizedMeshTerrainData(provider, buffer, level, x, y, layer) {
/**
* Requests the geometry for a given tile. The result must include terrain data and
* may optionally include a water mask and an indication of which child tiles are available.
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
* @param {Request} [request] The request object. Intended for internal use only.
- *
* @returns {Promise|undefined} A promise for the requested geometry. If this method
* returns undefined instead of a promise, it is an indication that too many requests are already
* pending and the request will be retried later.
- *
*/
CesiumTerrainProvider.prototype.requestTileGeometry = function (
x,
@@ -1144,7 +1128,6 @@ Object.defineProperties(CesiumTerrainProvider.prototype, {
/**
* Gets the maximum geometric error allowed in a tile at a given level.
- *
* @param {number} level The tile level for which to get the maximum geometric error.
* @returns {number} The maximum geometric error.
*/
@@ -1161,11 +1144,9 @@ CesiumTerrainProvider.prototype.getLevelMaximumGeometricError = function (
* {@link https://github.com/AnalyticalGraphicsInc/quantized-mesh Quantized Mesh}
* {@link https://github.com/AnalyticalGraphicsInc/cesium/wiki/heightmap-1.0 Height Map}
*
- *
* @param {number} assetId The Cesium ion asset id.
* @param {CesiumTerrainProvider.ConstructorOptions} [options] An object describing initialization options.
* @returns {Promise}
- *
* @example
* // Create Arctic DEM terrain with normals.
* try {
@@ -1177,12 +1158,11 @@ CesiumTerrainProvider.prototype.getLevelMaximumGeometricError = function (
* } catch (error) {
* console.log(error);
* }
- *
- * @exception {RuntimeError} layer.json does not specify a format
- * @exception {RuntimeError} layer.json specifies an unknown format
- * @exception {RuntimeError} layer.json specifies an unsupported quantized-mesh version
- * @exception {RuntimeError} layer.json does not specify a tiles property, or specifies an empty array
- * @exception {RuntimeError} layer.json does not specify any tile URL templates
+ * @throws {RuntimeError} layer.json does not specify a format
+ * @throws {RuntimeError} layer.json specifies an unknown format
+ * @throws {RuntimeError} layer.json specifies an unsupported quantized-mesh version
+ * @throws {RuntimeError} layer.json does not specify a tiles property, or specifies an empty array
+ * @throws {RuntimeError} layer.json does not specify any tile URL templates
*/
CesiumTerrainProvider.fromIonAssetId = async function (assetId, options) {
//>>includeStart('debug', pragmas.debug);
@@ -1200,11 +1180,9 @@ CesiumTerrainProvider.fromIonAssetId = async function (assetId, options) {
* {@link https://github.com/AnalyticalGraphicsInc/quantized-mesh Quantized Mesh}
* {@link https://github.com/AnalyticalGraphicsInc/cesium/wiki/heightmap-1.0 Height Map}
*
- *
- * @param {Resource|String|Promise|Promise} url The URL of the Cesium terrain server.
+ * @param {Resource | string | Promise | Promise} url The URL of the Cesium terrain server.
* @param {CesiumTerrainProvider.ConstructorOptions} [options] An object describing initialization options.
* @returns {Promise}
- *
* @example
* // Create Arctic DEM terrain with normals.
* try {
@@ -1217,12 +1195,11 @@ CesiumTerrainProvider.fromIonAssetId = async function (assetId, options) {
* } catch (error) {
* console.log(error);
* }
- *
- * @exception {RuntimeError} layer.json does not specify a format
- * @exception {RuntimeError} layer.json specifies an unknown format
- * @exception {RuntimeError} layer.json specifies an unsupported quantized-mesh version
- * @exception {RuntimeError} layer.json does not specify a tiles property, or specifies an empty array
- * @exception {RuntimeError} layer.json does not specify any tile URL templates
+ * @throws {RuntimeError} layer.json does not specify a format
+ * @throws {RuntimeError} layer.json specifies an unknown format
+ * @throws {RuntimeError} layer.json specifies an unsupported quantized-mesh version
+ * @throws {RuntimeError} layer.json does not specify a tiles property, or specifies an empty array
+ * @throws {RuntimeError} layer.json does not specify any tile URL templates
*/
CesiumTerrainProvider.fromUrl = async function (url, options) {
//>>includeStart('debug', pragmas.debug);
@@ -1253,7 +1230,6 @@ CesiumTerrainProvider.fromUrl = async function (url, options) {
/**
* Determines whether data for a tile is available to be loaded.
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -1291,7 +1267,6 @@ CesiumTerrainProvider.prototype.getTileDataAvailable = function (x, y, level) {
/**
* Makes sure we load availability data for a tile
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
diff --git a/packages/engine/Source/Core/Check.js b/packages/engine/Source/Core/Check.js
index 83f0c9ab0b11..72b46774841b 100644
--- a/packages/engine/Source/Core/Check.js
+++ b/packages/engine/Source/Core/Check.js
@@ -22,10 +22,9 @@ function getFailedTypeErrorMessage(actual, expected, name) {
/**
* Throws if test is not defined
- *
* @param {string} name The name of the variable being tested
* @param {*} test The value that is to be checked
- * @exception {DeveloperError} test must be defined
+ * @throws {DeveloperError} test must be defined
*/
Check.defined = function (name, test) {
if (!defined(test)) {
@@ -35,10 +34,9 @@ Check.defined = function (name, test) {
/**
* Throws if test is not typeof 'function'
- *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
- * @exception {DeveloperError} test must be typeof 'function'
+ * @throws {DeveloperError} test must be typeof 'function'
*/
Check.typeOf.func = function (name, test) {
if (typeof test !== "function") {
@@ -50,10 +48,9 @@ Check.typeOf.func = function (name, test) {
/**
* Throws if test is not typeof 'string'
- *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
- * @exception {DeveloperError} test must be typeof 'string'
+ * @throws {DeveloperError} test must be typeof 'string'
*/
Check.typeOf.string = function (name, test) {
if (typeof test !== "string") {
@@ -65,10 +62,9 @@ Check.typeOf.string = function (name, test) {
/**
* Throws if test is not typeof 'number'
- *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
- * @exception {DeveloperError} test must be typeof 'number'
+ * @throws {DeveloperError} test must be typeof 'number'
*/
Check.typeOf.number = function (name, test) {
if (typeof test !== "number") {
@@ -80,11 +76,10 @@ Check.typeOf.number = function (name, test) {
/**
* Throws if test is not typeof 'number' and less than limit
- *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
* @param {number} limit The limit value to compare against
- * @exception {DeveloperError} test must be typeof 'number' and less than limit
+ * @throws {DeveloperError} test must be typeof 'number' and less than limit
*/
Check.typeOf.number.lessThan = function (name, test, limit) {
Check.typeOf.number(name, test);
@@ -97,11 +92,10 @@ Check.typeOf.number.lessThan = function (name, test, limit) {
/**
* Throws if test is not typeof 'number' and less than or equal to limit
- *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
* @param {number} limit The limit value to compare against
- * @exception {DeveloperError} test must be typeof 'number' and less than or equal to limit
+ * @throws {DeveloperError} test must be typeof 'number' and less than or equal to limit
*/
Check.typeOf.number.lessThanOrEquals = function (name, test, limit) {
Check.typeOf.number(name, test);
@@ -114,11 +108,10 @@ Check.typeOf.number.lessThanOrEquals = function (name, test, limit) {
/**
* Throws if test is not typeof 'number' and greater than limit
- *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
* @param {number} limit The limit value to compare against
- * @exception {DeveloperError} test must be typeof 'number' and greater than limit
+ * @throws {DeveloperError} test must be typeof 'number' and greater than limit
*/
Check.typeOf.number.greaterThan = function (name, test, limit) {
Check.typeOf.number(name, test);
@@ -131,11 +124,10 @@ Check.typeOf.number.greaterThan = function (name, test, limit) {
/**
* Throws if test is not typeof 'number' and greater than or equal to limit
- *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
* @param {number} limit The limit value to compare against
- * @exception {DeveloperError} test must be typeof 'number' and greater than or equal to limit
+ * @throws {DeveloperError} test must be typeof 'number' and greater than or equal to limit
*/
Check.typeOf.number.greaterThanOrEquals = function (name, test, limit) {
Check.typeOf.number(name, test);
@@ -148,10 +140,9 @@ Check.typeOf.number.greaterThanOrEquals = function (name, test, limit) {
/**
* Throws if test is not typeof 'object'
- *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
- * @exception {DeveloperError} test must be typeof 'object'
+ * @throws {DeveloperError} test must be typeof 'object'
*/
Check.typeOf.object = function (name, test) {
if (typeof test !== "object") {
@@ -163,10 +154,9 @@ Check.typeOf.object = function (name, test) {
/**
* Throws if test is not typeof 'boolean'
- *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
- * @exception {DeveloperError} test must be typeof 'boolean'
+ * @throws {DeveloperError} test must be typeof 'boolean'
*/
Check.typeOf.bool = function (name, test) {
if (typeof test !== "boolean") {
@@ -178,10 +168,9 @@ Check.typeOf.bool = function (name, test) {
/**
* Throws if test is not typeof 'bigint'
- *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
- * @exception {DeveloperError} test must be typeof 'bigint'
+ * @throws {DeveloperError} test must be typeof 'bigint'
*/
Check.typeOf.bigint = function (name, test) {
if (typeof test !== "bigint") {
@@ -193,12 +182,11 @@ Check.typeOf.bigint = function (name, test) {
/**
* Throws if test1 and test2 is not typeof 'number' and not equal in value
- *
* @param {string} name1 The name of the first variable being tested
* @param {string} name2 The name of the second variable being tested against
* @param {*} test1 The value to test
* @param {*} test2 The value to test against
- * @exception {DeveloperError} test1 and test2 should be type of 'number' and be equal in value
+ * @throws {DeveloperError} test1 and test2 should be type of 'number' and be equal in value
*/
Check.typeOf.number.equals = function (name1, name2, test1, test2) {
Check.typeOf.number(name1, test1);
diff --git a/packages/engine/Source/Core/CircleGeometry.js b/packages/engine/Source/Core/CircleGeometry.js
index 78e6387c15a0..51100e6efd37 100644
--- a/packages/engine/Source/Core/CircleGeometry.js
+++ b/packages/engine/Source/Core/CircleGeometry.js
@@ -8,21 +8,18 @@ import VertexFormat from "./VertexFormat.js";
/**
* A description of a circle on the ellipsoid. Circle geometry can be rendered with both {@link Primitive} and {@link GroundPrimitive}.
- *
* @alias CircleGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.center The circle's center point in the fixed frame.
* @param {number} options.radius The radius in meters.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid the circle will be on.
- * @param {number} [options.height=0.0] The distance in meters between the circle and the ellipsoid surface.
- * @param {number} [options.granularity=0.02] The angular distance between points on the circle in radians.
- * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- * @param {number} [options.extrudedHeight=0.0] The distance in meters between the circle's extruded face and the ellipsoid surface.
- * @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
- *
- * @exception {DeveloperError} radius must be greater than zero.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid the circle will be on.
+ * @param {number} [options.height] The distance in meters between the circle and the ellipsoid surface.
+ * @param {number} [options.granularity] The angular distance between points on the circle in radians.
+ * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
+ * @param {number} [options.extrudedHeight] The distance in meters between the circle's extruded face and the ellipsoid surface.
+ * @param {number} [options.stRotation] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
+ * @throws {DeveloperError} radius must be greater than zero.
* @exception {DeveloperError} granularity must be greater than zero.
*
* @see CircleGeometry.createGeometry
@@ -68,11 +65,9 @@ CircleGeometry.packedLength = EllipseGeometry.packedLength;
/**
* Stores the provided instance into the provided array.
- *
* @param {CircleGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
CircleGeometry.pack = function (value, array, startingIndex) {
@@ -103,9 +98,8 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {CircleGeometry} [result] The object into which to store the result.
* @returns {CircleGeometry} The modified result parameter or a new CircleGeometry instance if one was not provided.
*/
@@ -146,7 +140,6 @@ CircleGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of a circle on an ellipsoid, including its vertices, indices, and a bounding sphere.
- *
* @param {CircleGeometry} circleGeometry A description of the circle.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
@@ -155,6 +148,9 @@ CircleGeometry.createGeometry = function (circleGeometry) {
};
/**
+ * @param circleGeometry
+ * @param minHeightFunc
+ * @param maxHeightFunc
* @private
*/
CircleGeometry.createShadowVolume = function (
diff --git a/packages/engine/Source/Core/CircleOutlineGeometry.js b/packages/engine/Source/Core/CircleOutlineGeometry.js
index 80e40987de19..f171685bc53a 100644
--- a/packages/engine/Source/Core/CircleOutlineGeometry.js
+++ b/packages/engine/Source/Core/CircleOutlineGeometry.js
@@ -7,21 +7,18 @@ import Ellipsoid from "./Ellipsoid.js";
/**
* A description of the outline of a circle on the ellipsoid.
- *
* @alias CircleOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.center The circle's center point in the fixed frame.
* @param {number} options.radius The radius in meters.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid the circle will be on.
- * @param {number} [options.height=0.0] The distance in meters between the circle and the ellipsoid surface.
- * @param {number} [options.granularity=0.02] The angular distance between points on the circle in radians.
- * @param {number} [options.extrudedHeight=0.0] The distance in meters between the circle's extruded face and the ellipsoid surface.
- * @param {number} [options.numberOfVerticalLines=16] Number of lines to draw between the top and bottom of an extruded circle.
- *
- * @exception {DeveloperError} radius must be greater than zero.
- * @exception {DeveloperError} granularity must be greater than zero.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid the circle will be on.
+ * @param {number} [options.height] The distance in meters between the circle and the ellipsoid surface.
+ * @param {number} [options.granularity] The angular distance between points on the circle in radians.
+ * @param {number} [options.extrudedHeight] The distance in meters between the circle's extruded face and the ellipsoid surface.
+ * @param {number} [options.numberOfVerticalLines] Number of lines to draw between the top and bottom of an extruded circle.
+ * @throws {DeveloperError} radius must be greater than zero.
+ * @throws {DeveloperError} granularity must be greater than zero.
*
* @see CircleOutlineGeometry.createGeometry
* @see Packable
@@ -64,11 +61,9 @@ CircleOutlineGeometry.packedLength = EllipseOutlineGeometry.packedLength;
/**
* Stores the provided instance into the provided array.
- *
* @param {CircleOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
CircleOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -101,9 +96,8 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {CircleOutlineGeometry} [result] The object into which to store the result.
* @returns {CircleOutlineGeometry} The modified result parameter or a new CircleOutlineGeometry instance if one was not provided.
*/
@@ -139,7 +133,6 @@ CircleOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an outline of a circle on an ellipsoid, including its vertices, indices, and a bounding sphere.
- *
* @param {CircleOutlineGeometry} circleGeometry A description of the circle.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/Clock.js b/packages/engine/Source/Core/Clock.js
index 8bdea4fbf34c..7bcf346e0cfe 100644
--- a/packages/engine/Source/Core/Clock.js
+++ b/packages/engine/Source/Core/Clock.js
@@ -9,22 +9,18 @@ import JulianDate from "./JulianDate.js";
/**
* A simple clock for keeping track of simulated time.
- *
* @alias Clock
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {JulianDate} [options.startTime] The start time of the clock.
* @param {JulianDate} [options.stopTime] The stop time of the clock.
* @param {JulianDate} [options.currentTime] The current time.
- * @param {number} [options.multiplier=1.0] Determines how much time advances when {@link Clock#tick} is called, negative values allow for advancing backwards.
- * @param {ClockStep} [options.clockStep=ClockStep.SYSTEM_CLOCK_MULTIPLIER] Determines if calls to {@link Clock#tick} are frame dependent or system clock dependent.
- * @param {ClockRange} [options.clockRange=ClockRange.UNBOUNDED] Determines how the clock should behave when {@link Clock#startTime} or {@link Clock#stopTime} is reached.
- * @param {boolean} [options.canAnimate=true] Indicates whether {@link Clock#tick} can advance time. This could be false if data is being buffered, for example. The clock will only tick when both {@link Clock#canAnimate} and {@link Clock#shouldAnimate} are true.
- * @param {boolean} [options.shouldAnimate=false] Indicates whether {@link Clock#tick} should attempt to advance time. The clock will only tick when both {@link Clock#canAnimate} and {@link Clock#shouldAnimate} are true.
- *
- * @exception {DeveloperError} startTime must come before stopTime.
- *
+ * @param {number} [options.multiplier] Determines how much time advances when {@link Clock#tick} is called, negative values allow for advancing backwards.
+ * @param {ClockStep} [options.clockStep] Determines if calls to {@link Clock#tick} are frame dependent or system clock dependent.
+ * @param {ClockRange} [options.clockRange] Determines how the clock should behave when {@link Clock#startTime} or {@link Clock#stopTime} is reached.
+ * @param {boolean} [options.canAnimate] Indicates whether {@link Clock#tick} can advance time. This could be false if data is being buffered, for example. The clock will only tick when both {@link Clock#canAnimate} and {@link Clock#shouldAnimate} are true.
+ * @param {boolean} [options.shouldAnimate] Indicates whether {@link Clock#tick} should attempt to advance time. The clock will only tick when both {@link Clock#canAnimate} and {@link Clock#shouldAnimate} are true.
+ * @throws {DeveloperError} startTime must come before stopTime.
*
* @example
* // Create a clock that loops on Christmas day 2013 and runs in real-time.
@@ -255,7 +251,6 @@ Object.defineProperties(Clock.prototype, {
* Advances the clock from the current time based on the current configuration options.
* tick should be called every frame, regardless of whether animation is taking place
* or not. To control animation, use the {@link Clock#shouldAnimate} property.
- *
* @returns {JulianDate} The new value of the {@link Clock#currentTime} property.
*/
Clock.prototype.tick = function () {
diff --git a/packages/engine/Source/Core/ClockRange.js b/packages/engine/Source/Core/ClockRange.js
index 8a8e83f76572..9b02a4b67e2f 100644
--- a/packages/engine/Source/Core/ClockRange.js
+++ b/packages/engine/Source/Core/ClockRange.js
@@ -1,16 +1,13 @@
/**
* Constants used by {@link Clock#tick} to determine behavior
* when {@link Clock#startTime} or {@link Clock#stopTime} is reached.
- *
* @enum {number}
- *
* @see Clock
* @see ClockStep
*/
const ClockRange = {
/**
* {@link Clock#tick} will always advances the clock in its current direction.
- *
* @type {number}
* @constant
*/
@@ -19,7 +16,6 @@ const ClockRange = {
/**
* When {@link Clock#startTime} or {@link Clock#stopTime} is reached,
* {@link Clock#tick} will not advance {@link Clock#currentTime} any further.
- *
* @type {number}
* @constant
*/
@@ -30,7 +26,6 @@ const ClockRange = {
* {@link Clock#currentTime} to the opposite end of the interval. When
* time is moving backwards, {@link Clock#tick} will not advance past
* {@link Clock#startTime}
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/ClockStep.js b/packages/engine/Source/Core/ClockStep.js
index 0494677f9d09..bc814af1fa4f 100644
--- a/packages/engine/Source/Core/ClockStep.js
+++ b/packages/engine/Source/Core/ClockStep.js
@@ -1,9 +1,7 @@
/**
* Constants to determine how much time advances with each call
* to {@link Clock#tick}.
- *
* @enum {number}
- *
* @see Clock
* @see ClockRange
*/
@@ -11,7 +9,6 @@ const ClockStep = {
/**
* {@link Clock#tick} advances the current time by a fixed step,
* which is the number of seconds specified by {@link Clock#multiplier}.
- *
* @type {number}
* @constant
*/
@@ -20,7 +17,6 @@ const ClockStep = {
/**
* {@link Clock#tick} advances the current time by the amount of system
* time elapsed since the previous call multiplied by {@link Clock#multiplier}.
- *
* @type {number}
* @constant
*/
@@ -29,7 +25,6 @@ const ClockStep = {
/**
* {@link Clock#tick} sets the clock to the current system time;
* ignoring all other settings.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/Color.js b/packages/engine/Source/Core/Color.js
index 23683732133b..b886fc6fd2f1 100644
--- a/packages/engine/Source/Core/Color.js
+++ b/packages/engine/Source/Core/Color.js
@@ -26,14 +26,12 @@ function hue2rgb(m1, m2, h) {
/**
* A color, specified using red, green, blue, and alpha values,
* which range from 0
(no intensity) to 1.0
(full intensity).
- * @param {number} [red=1.0] The red component.
- * @param {number} [green=1.0] The green component.
- * @param {number} [blue=1.0] The blue component.
- * @param {number} [alpha=1.0] The alpha component.
- *
- * @constructor
+ * @param {number} [red] The red component.
+ * @param {number} [green] The green component.
+ * @param {number} [blue] The blue component.
+ * @param {number} [alpha] The alpha component.
+ * @class
* @alias Color
- *
* @see Packable
*/
function Color(red, green, blue, alpha) {
@@ -66,7 +64,6 @@ function Color(red, green, blue, alpha) {
/**
* Creates a Color instance from a {@link Cartesian4}. x
, y
, z
,
* and w
map to red
, green
, blue
, and alpha
, respectively.
- *
* @param {Cartesian4} cartesian The source cartesian.
* @param {Color} [result] The object onto which to store the result.
* @returns {Color} The modified result parameter or a new Color instance if one was not provided.
@@ -90,11 +87,10 @@ Color.fromCartesian4 = function (cartesian, result) {
/**
* Creates a new Color specified using red, green, blue, and alpha values
* that are in the range of 0 to 255, converting them internally to a range of 0.0 to 1.0.
- *
- * @param {number} [red=255] The red component.
- * @param {number} [green=255] The green component.
- * @param {number} [blue=255] The blue component.
- * @param {number} [alpha=255] The alpha component.
+ * @param {number} [red] The red component.
+ * @param {number} [green] The green component.
+ * @param {number} [blue] The blue component.
+ * @param {number} [alpha] The alpha component.
* @param {Color} [result] The object onto which to store the result.
* @returns {Color} The modified result parameter or a new Color instance if one was not provided.
*/
@@ -118,12 +114,10 @@ Color.fromBytes = function (red, green, blue, alpha, result) {
/**
* Creates a new Color that has the same red, green, and blue components
* of the specified color, but with the specified alpha value.
- *
* @param {Color} color The base color
* @param {number} alpha The new alpha component.
* @param {Color} [result] The object onto which to store the result.
* @returns {Color} The modified result parameter or a new Color instance if one was not provided.
- *
* @example const translucentRed = Cesium.Color.fromAlpha(Cesium.Color.RED, 0.9);
*/
Color.fromAlpha = function (color, alpha, result) {
@@ -155,14 +149,11 @@ if (FeatureDetection.supportsTypedArrays()) {
/**
* Creates a new Color from a single numeric unsigned 32-bit RGBA value, using the endianness
* of the system.
- *
* @param {number} rgba A single numeric unsigned 32-bit RGBA value.
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The color object.
- *
* @example
* const color = Cesium.Color.fromRgba(0x67ADDFFF);
- *
* @see Color#toRgba
*/
Color.fromRgba = function (rgba, result) {
@@ -179,14 +170,12 @@ Color.fromRgba = function (rgba, result) {
/**
* Creates a Color instance from hue, saturation, and lightness.
- *
- * @param {number} [hue=0] The hue angle 0...1
- * @param {number} [saturation=0] The saturation value 0...1
- * @param {number} [lightness=0] The lightness value 0...1
- * @param {number} [alpha=1.0] The alpha component 0...1
+ * @param {number} [hue] The hue angle 0...1
+ * @param {number} [saturation] The saturation value 0...1
+ * @param {number} [lightness] The lightness value 0...1
+ * @param {number} [alpha] The alpha component 0...1
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The color object.
- *
* @see {@link http://www.w3.org/TR/css3-color/#hsl-color|CSS color values}
*/
Color.fromHsl = function (hue, saturation, lightness, alpha, result) {
@@ -227,24 +216,22 @@ Color.fromHsl = function (hue, saturation, lightness, alpha, result) {
/**
* Creates a random color using the provided options. For reproducible random colors, you should
* call {@link CesiumMath#setRandomNumberSeed} once at the beginning of your application.
- *
* @param {object} [options] Object with the following properties:
* @param {number} [options.red] If specified, the red component to use instead of a randomized value.
- * @param {number} [options.minimumRed=0.0] The maximum red value to generate if none was specified.
- * @param {number} [options.maximumRed=1.0] The minimum red value to generate if none was specified.
+ * @param {number} [options.minimumRed] The maximum red value to generate if none was specified.
+ * @param {number} [options.maximumRed] The minimum red value to generate if none was specified.
* @param {number} [options.green] If specified, the green component to use instead of a randomized value.
- * @param {number} [options.minimumGreen=0.0] The maximum green value to generate if none was specified.
- * @param {number} [options.maximumGreen=1.0] The minimum green value to generate if none was specified.
+ * @param {number} [options.minimumGreen] The maximum green value to generate if none was specified.
+ * @param {number} [options.maximumGreen] The minimum green value to generate if none was specified.
* @param {number} [options.blue] If specified, the blue component to use instead of a randomized value.
- * @param {number} [options.minimumBlue=0.0] The maximum blue value to generate if none was specified.
- * @param {number} [options.maximumBlue=1.0] The minimum blue value to generate if none was specified.
+ * @param {number} [options.minimumBlue] The maximum blue value to generate if none was specified.
+ * @param {number} [options.maximumBlue] The minimum blue value to generate if none was specified.
* @param {number} [options.alpha] If specified, the alpha component to use instead of a randomized value.
- * @param {number} [options.minimumAlpha=0.0] The maximum alpha value to generate if none was specified.
- * @param {number} [options.maximumAlpha=1.0] The minimum alpha value to generate if none was specified.
+ * @param {number} [options.minimumAlpha] The maximum alpha value to generate if none was specified.
+ * @param {number} [options.maximumAlpha] The minimum alpha value to generate if none was specified.
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The modified result parameter or a new instance if result was undefined.
- *
- * @exception {DeveloperError} minimumRed must be less than or equal to maximumRed.
+ * @throws {DeveloperError} minimumRed must be less than or equal to maximumRed.
* @exception {DeveloperError} minimumGreen must be less than or equal to maximumGreen.
* @exception {DeveloperError} minimumBlue must be less than or equal to maximumBlue.
* @exception {DeveloperError} minimumAlpha must be less than or equal to maximumAlpha.
@@ -358,16 +345,12 @@ const hslParenthesesMatcher = /^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[
/**
* Creates a Color instance from a CSS color value.
- *
* @param {string} color The CSS color value in #rgb, #rgba, #rrggbb, #rrggbbaa, rgb(), rgba(), hsl(), or hsla() format.
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The color object, or undefined if the string was not a valid CSS color.
- *
- *
* @example
* const cesiumBlue = Cesium.Color.fromCssColorString('#67ADDF');
* const green = Cesium.Color.fromCssColorString('green');
- *
* @see {@link http://www.w3.org/TR/css3-color|CSS color values}
*/
Color.fromCssColorString = function (color, result) {
@@ -441,11 +424,9 @@ Color.packedLength = 4;
/**
* Stores the provided instance into the provided array.
- *
* @param {Color} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
Color.pack = function (value, array, startingIndex) {
@@ -465,9 +446,8 @@ Color.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {Color} [result] The object into which to store the result.
* @returns {Color} The modified result parameter or a new Color instance if one was not provided.
*/
@@ -490,7 +470,6 @@ Color.unpack = function (array, startingIndex, result) {
/**
* Converts a 'byte' color component in the range of 0 to 255 into
* a 'float' color component in the range of 0 to 1.0.
- *
* @param {number} number The number to be converted.
* @returns {number} The converted number.
*/
@@ -501,7 +480,6 @@ Color.byteToFloat = function (number) {
/**
* Converts a 'float' color component in the range of 0 to 1.0 into
* a 'byte' color component in the range of 0 to 255.
- *
* @param {number} number The number to be converted.
* @returns {number} The converted number.
*/
@@ -511,7 +489,6 @@ Color.floatToByte = function (number) {
/**
* Duplicates a Color.
- *
* @param {Color} color The Color to duplicate.
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The modified result parameter or a new instance if result was undefined. (Returns undefined if color is undefined)
@@ -532,7 +509,6 @@ Color.clone = function (color, result) {
/**
* Returns true if the first Color equals the second color.
- *
* @param {Color} left The first Color to compare for equality.
* @param {Color} right The second Color to compare for equality.
* @returns {boolean} true
if the Colors are equal; otherwise, false
.
@@ -550,6 +526,9 @@ Color.equals = function (left, right) {
};
/**
+ * @param color
+ * @param array
+ * @param offset
* @private
*/
Color.equalsArray = function (color, array, offset) {
@@ -563,7 +542,6 @@ Color.equalsArray = function (color, array, offset) {
/**
* Returns a duplicate of a Color instance.
- *
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The modified result parameter or a new instance if result was undefined.
*/
@@ -573,7 +551,6 @@ Color.prototype.clone = function (result) {
/**
* Returns true if this Color equals other.
- *
* @param {Color} other The Color to compare for equality.
* @returns {boolean} true
if the Colors are equal; otherwise, false
.
*/
@@ -583,9 +560,8 @@ Color.prototype.equals = function (other) {
/**
* Returns true
if this Color equals other componentwise within the specified epsilon.
- *
* @param {Color} other The Color to compare for equality.
- * @param {number} [epsilon=0.0] The epsilon to use for equality testing.
+ * @param {number} [epsilon] The epsilon to use for equality testing.
* @returns {boolean} true
if the Colors are equal within the specified epsilon; otherwise, false
.
*/
Color.prototype.equalsEpsilon = function (other, epsilon) {
@@ -601,7 +577,6 @@ Color.prototype.equalsEpsilon = function (other, epsilon) {
/**
* Creates a string representing this Color in the format '(red, green, blue, alpha)'.
- *
* @returns {string} A string representing this Color in the format '(red, green, blue, alpha)'.
*/
Color.prototype.toString = function () {
@@ -610,9 +585,7 @@ Color.prototype.toString = function () {
/**
* Creates a string containing the CSS color value for this color.
- *
* @returns {string} The CSS equivalent of this color.
- *
* @see {@link http://www.w3.org/TR/css3-color/#rgba-color|CSS RGB or RGBA color values}
*/
Color.prototype.toCssColorString = function () {
@@ -627,7 +600,6 @@ Color.prototype.toCssColorString = function () {
/**
* Creates a string containing CSS hex string color value for this color.
- *
* @returns {string} The CSS hex string equivalent of this color.
*/
Color.prototype.toCssHexString = function () {
@@ -656,7 +628,6 @@ Color.prototype.toCssHexString = function () {
/**
* Converts this color to an array of red, green, blue, and alpha values
* that are in the range of 0 to 255.
- *
* @param {number[]} [result] The array to store the result in, if undefined a new instance will be created.
* @returns {number[]} The modified result parameter or a new instance if result was undefined.
*/
@@ -679,13 +650,9 @@ Color.prototype.toBytes = function (result) {
/**
* Converts this color to a single numeric unsigned 32-bit RGBA value, using the endianness
* of the system.
- *
* @returns {number} A single numeric unsigned 32-bit RGBA value.
- *
- *
* @example
* const rgba = Cesium.Color.BLUE.toRgba();
- *
* @see Color.fromRgba
*/
Color.prototype.toRgba = function () {
@@ -699,11 +666,9 @@ Color.prototype.toRgba = function () {
/**
* Brightens this color by the provided magnitude.
- *
* @param {number} magnitude A positive number indicating the amount to brighten.
* @param {Color} result The object onto which to store the result.
* @returns {Color} The modified result parameter.
- *
* @example
* const brightBlue = Cesium.Color.BLUE.brighten(0.5, new Cesium.Color());
*/
@@ -724,11 +689,9 @@ Color.prototype.brighten = function (magnitude, result) {
/**
* Darkens this color by the provided magnitude.
- *
* @param {number} magnitude A positive number indicating the amount to darken.
* @param {Color} result The object onto which to store the result.
* @returns {Color} The modified result parameter.
- *
* @example
* const darkBlue = Cesium.Color.BLUE.darken(0.5, new Cesium.Color());
*/
@@ -750,11 +713,9 @@ Color.prototype.darken = function (magnitude, result) {
/**
* Creates a new Color that has the same red, green, and blue components
* as this Color, but with the specified alpha value.
- *
* @param {number} alpha The new alpha component.
* @param {Color} [result] The object onto which to store the result.
* @returns {Color} The modified result parameter or a new Color instance if one was not provided.
- *
* @example const translucentRed = Cesium.Color.RED.withAlpha(0.9);
*/
Color.prototype.withAlpha = function (alpha, result) {
@@ -763,7 +724,6 @@ Color.prototype.withAlpha = function (alpha, result) {
/**
* Computes the componentwise sum of two Colors.
- *
* @param {Color} left The first Color.
* @param {Color} right The second Color.
* @param {Color} result The object onto which to store the result.
@@ -785,7 +745,6 @@ Color.add = function (left, right, result) {
/**
* Computes the componentwise difference of two Colors.
- *
* @param {Color} left The first Color.
* @param {Color} right The second Color.
* @param {Color} result The object onto which to store the result.
@@ -807,7 +766,6 @@ Color.subtract = function (left, right, result) {
/**
* Computes the componentwise product of two Colors.
- *
* @param {Color} left The first Color.
* @param {Color} right The second Color.
* @param {Color} result The object onto which to store the result.
@@ -829,7 +787,6 @@ Color.multiply = function (left, right, result) {
/**
* Computes the componentwise quotient of two Colors.
- *
* @param {Color} left The first Color.
* @param {Color} right The second Color.
* @param {Color} result The object onto which to store the result.
@@ -851,7 +808,6 @@ Color.divide = function (left, right, result) {
/**
* Computes the componentwise modulus of two Colors.
- *
* @param {Color} left The first Color.
* @param {Color} right The second Color.
* @param {Color} result The object onto which to store the result.
@@ -873,7 +829,6 @@ Color.mod = function (left, right, result) {
/**
* Computes the linear interpolation or extrapolation at t between the provided colors.
- *
* @param {Color} start The color corresponding to t at 0.0.
* @param {Color} end The color corresponding to t at 1.0.
* @param {number} t The point along t at which to interpolate.
@@ -897,7 +852,6 @@ Color.lerp = function (start, end, t, result) {
/**
* Multiplies the provided Color componentwise by the provided scalar.
- *
* @param {Color} color The Color to be scaled.
* @param {number} scalar The scalar to multiply with.
* @param {Color} result The object onto which to store the result.
@@ -919,7 +873,6 @@ Color.multiplyByScalar = function (color, scalar, result) {
/**
* Divides the provided Color componentwise by the provided scalar.
- *
* @param {Color} color The Color to be divided.
* @param {number} scalar The scalar to divide with.
* @param {Color} result The object onto which to store the result.
@@ -942,7 +895,6 @@ Color.divideByScalar = function (color, scalar, result) {
/**
* An immutable Color instance initialized to CSS color #F0F8FF
*
- *
* @constant
* @type {Color}
*/
@@ -951,7 +903,6 @@ Color.ALICEBLUE = Object.freeze(Color.fromCssColorString("#F0F8FF"));
/**
* An immutable Color instance initialized to CSS color #FAEBD7
*
- *
* @constant
* @type {Color}
*/
@@ -960,7 +911,6 @@ Color.ANTIQUEWHITE = Object.freeze(Color.fromCssColorString("#FAEBD7"));
/**
* An immutable Color instance initialized to CSS color #00FFFF
*
- *
* @constant
* @type {Color}
*/
@@ -969,7 +919,6 @@ Color.AQUA = Object.freeze(Color.fromCssColorString("#00FFFF"));
/**
* An immutable Color instance initialized to CSS color #7FFFD4
*
- *
* @constant
* @type {Color}
*/
@@ -978,7 +927,6 @@ Color.AQUAMARINE = Object.freeze(Color.fromCssColorString("#7FFFD4"));
/**
* An immutable Color instance initialized to CSS color #F0FFFF
*
- *
* @constant
* @type {Color}
*/
@@ -987,7 +935,6 @@ Color.AZURE = Object.freeze(Color.fromCssColorString("#F0FFFF"));
/**
* An immutable Color instance initialized to CSS color #F5F5DC
*
- *
* @constant
* @type {Color}
*/
@@ -996,7 +943,6 @@ Color.BEIGE = Object.freeze(Color.fromCssColorString("#F5F5DC"));
/**
* An immutable Color instance initialized to CSS color #FFE4C4
*
- *
* @constant
* @type {Color}
*/
@@ -1005,7 +951,6 @@ Color.BISQUE = Object.freeze(Color.fromCssColorString("#FFE4C4"));
/**
* An immutable Color instance initialized to CSS color #000000
*
- *
* @constant
* @type {Color}
*/
@@ -1014,7 +959,6 @@ Color.BLACK = Object.freeze(Color.fromCssColorString("#000000"));
/**
* An immutable Color instance initialized to CSS color #FFEBCD
*
- *
* @constant
* @type {Color}
*/
@@ -1023,7 +967,6 @@ Color.BLANCHEDALMOND = Object.freeze(Color.fromCssColorString("#FFEBCD"));
/**
* An immutable Color instance initialized to CSS color #0000FF
*
- *
* @constant
* @type {Color}
*/
@@ -1032,7 +975,6 @@ Color.BLUE = Object.freeze(Color.fromCssColorString("#0000FF"));
/**
* An immutable Color instance initialized to CSS color #8A2BE2
*
- *
* @constant
* @type {Color}
*/
@@ -1041,7 +983,6 @@ Color.BLUEVIOLET = Object.freeze(Color.fromCssColorString("#8A2BE2"));
/**
* An immutable Color instance initialized to CSS color #A52A2A
*
- *
* @constant
* @type {Color}
*/
@@ -1050,7 +991,6 @@ Color.BROWN = Object.freeze(Color.fromCssColorString("#A52A2A"));
/**
* An immutable Color instance initialized to CSS color #DEB887
*
- *
* @constant
* @type {Color}
*/
@@ -1059,7 +999,6 @@ Color.BURLYWOOD = Object.freeze(Color.fromCssColorString("#DEB887"));
/**
* An immutable Color instance initialized to CSS color #5F9EA0
*
- *
* @constant
* @type {Color}
*/
@@ -1067,7 +1006,6 @@ Color.CADETBLUE = Object.freeze(Color.fromCssColorString("#5F9EA0"));
/**
* An immutable Color instance initialized to CSS color #7FFF00
*
- *
* @constant
* @type {Color}
*/
@@ -1076,7 +1014,6 @@ Color.CHARTREUSE = Object.freeze(Color.fromCssColorString("#7FFF00"));
/**
* An immutable Color instance initialized to CSS color #D2691E
*
- *
* @constant
* @type {Color}
*/
@@ -1085,7 +1022,6 @@ Color.CHOCOLATE = Object.freeze(Color.fromCssColorString("#D2691E"));
/**
* An immutable Color instance initialized to CSS color #FF7F50
*
- *
* @constant
* @type {Color}
*/
@@ -1094,7 +1030,6 @@ Color.CORAL = Object.freeze(Color.fromCssColorString("#FF7F50"));
/**
* An immutable Color instance initialized to CSS color #6495ED
*
- *
* @constant
* @type {Color}
*/
@@ -1103,7 +1038,6 @@ Color.CORNFLOWERBLUE = Object.freeze(Color.fromCssColorString("#6495ED"));
/**
* An immutable Color instance initialized to CSS color #FFF8DC
*
- *
* @constant
* @type {Color}
*/
@@ -1112,7 +1046,6 @@ Color.CORNSILK = Object.freeze(Color.fromCssColorString("#FFF8DC"));
/**
* An immutable Color instance initialized to CSS color #DC143C
*
- *
* @constant
* @type {Color}
*/
@@ -1121,7 +1054,6 @@ Color.CRIMSON = Object.freeze(Color.fromCssColorString("#DC143C"));
/**
* An immutable Color instance initialized to CSS color #00FFFF
*
- *
* @constant
* @type {Color}
*/
@@ -1130,7 +1062,6 @@ Color.CYAN = Object.freeze(Color.fromCssColorString("#00FFFF"));
/**
* An immutable Color instance initialized to CSS color #00008B
*
- *
* @constant
* @type {Color}
*/
@@ -1139,7 +1070,6 @@ Color.DARKBLUE = Object.freeze(Color.fromCssColorString("#00008B"));
/**
* An immutable Color instance initialized to CSS color #008B8B
*
- *
* @constant
* @type {Color}
*/
@@ -1148,7 +1078,6 @@ Color.DARKCYAN = Object.freeze(Color.fromCssColorString("#008B8B"));
/**
* An immutable Color instance initialized to CSS color #B8860B
*
- *
* @constant
* @type {Color}
*/
@@ -1157,7 +1086,6 @@ Color.DARKGOLDENROD = Object.freeze(Color.fromCssColorString("#B8860B"));
/**
* An immutable Color instance initialized to CSS color #A9A9A9
*
- *
* @constant
* @type {Color}
*/
@@ -1166,7 +1094,6 @@ Color.DARKGRAY = Object.freeze(Color.fromCssColorString("#A9A9A9"));
/**
* An immutable Color instance initialized to CSS color #006400
*
- *
* @constant
* @type {Color}
*/
@@ -1175,7 +1102,6 @@ Color.DARKGREEN = Object.freeze(Color.fromCssColorString("#006400"));
/**
* An immutable Color instance initialized to CSS color #A9A9A9
*
- *
* @constant
* @type {Color}
*/
@@ -1184,7 +1110,6 @@ Color.DARKGREY = Color.DARKGRAY;
/**
* An immutable Color instance initialized to CSS color #BDB76B
*
- *
* @constant
* @type {Color}
*/
@@ -1193,7 +1118,6 @@ Color.DARKKHAKI = Object.freeze(Color.fromCssColorString("#BDB76B"));
/**
* An immutable Color instance initialized to CSS color #8B008B
*
- *
* @constant
* @type {Color}
*/
@@ -1202,7 +1126,6 @@ Color.DARKMAGENTA = Object.freeze(Color.fromCssColorString("#8B008B"));
/**
* An immutable Color instance initialized to CSS color #556B2F
*
- *
* @constant
* @type {Color}
*/
@@ -1211,7 +1134,6 @@ Color.DARKOLIVEGREEN = Object.freeze(Color.fromCssColorString("#556B2F"));
/**
* An immutable Color instance initialized to CSS color #FF8C00
*
- *
* @constant
* @type {Color}
*/
@@ -1220,7 +1142,6 @@ Color.DARKORANGE = Object.freeze(Color.fromCssColorString("#FF8C00"));
/**
* An immutable Color instance initialized to CSS color #9932CC
*
- *
* @constant
* @type {Color}
*/
@@ -1229,7 +1150,6 @@ Color.DARKORCHID = Object.freeze(Color.fromCssColorString("#9932CC"));
/**
* An immutable Color instance initialized to CSS color #8B0000
*
- *
* @constant
* @type {Color}
*/
@@ -1238,7 +1158,6 @@ Color.DARKRED = Object.freeze(Color.fromCssColorString("#8B0000"));
/**
* An immutable Color instance initialized to CSS color #E9967A
*
- *
* @constant
* @type {Color}
*/
@@ -1247,7 +1166,6 @@ Color.DARKSALMON = Object.freeze(Color.fromCssColorString("#E9967A"));
/**
* An immutable Color instance initialized to CSS color #8FBC8F
*
- *
* @constant
* @type {Color}
*/
@@ -1256,7 +1174,6 @@ Color.DARKSEAGREEN = Object.freeze(Color.fromCssColorString("#8FBC8F"));
/**
* An immutable Color instance initialized to CSS color #483D8B
*
- *
* @constant
* @type {Color}
*/
@@ -1265,7 +1182,6 @@ Color.DARKSLATEBLUE = Object.freeze(Color.fromCssColorString("#483D8B"));
/**
* An immutable Color instance initialized to CSS color #2F4F4F
*
- *
* @constant
* @type {Color}
*/
@@ -1274,7 +1190,6 @@ Color.DARKSLATEGRAY = Object.freeze(Color.fromCssColorString("#2F4F4F"));
/**
* An immutable Color instance initialized to CSS color #2F4F4F
*
- *
* @constant
* @type {Color}
*/
@@ -1283,7 +1198,6 @@ Color.DARKSLATEGREY = Color.DARKSLATEGRAY;
/**
* An immutable Color instance initialized to CSS color #00CED1
*
- *
* @constant
* @type {Color}
*/
@@ -1292,7 +1206,6 @@ Color.DARKTURQUOISE = Object.freeze(Color.fromCssColorString("#00CED1"));
/**
* An immutable Color instance initialized to CSS color #9400D3
*
- *
* @constant
* @type {Color}
*/
@@ -1301,7 +1214,6 @@ Color.DARKVIOLET = Object.freeze(Color.fromCssColorString("#9400D3"));
/**
* An immutable Color instance initialized to CSS color #FF1493
*
- *
* @constant
* @type {Color}
*/
@@ -1310,7 +1222,6 @@ Color.DEEPPINK = Object.freeze(Color.fromCssColorString("#FF1493"));
/**
* An immutable Color instance initialized to CSS color #00BFFF
*
- *
* @constant
* @type {Color}
*/
@@ -1319,7 +1230,6 @@ Color.DEEPSKYBLUE = Object.freeze(Color.fromCssColorString("#00BFFF"));
/**
* An immutable Color instance initialized to CSS color #696969
*
- *
* @constant
* @type {Color}
*/
@@ -1328,7 +1238,6 @@ Color.DIMGRAY = Object.freeze(Color.fromCssColorString("#696969"));
/**
* An immutable Color instance initialized to CSS color #696969
*
- *
* @constant
* @type {Color}
*/
@@ -1337,7 +1246,6 @@ Color.DIMGREY = Color.DIMGRAY;
/**
* An immutable Color instance initialized to CSS color #1E90FF
*
- *
* @constant
* @type {Color}
*/
@@ -1346,7 +1254,6 @@ Color.DODGERBLUE = Object.freeze(Color.fromCssColorString("#1E90FF"));
/**
* An immutable Color instance initialized to CSS color #B22222
*
- *
* @constant
* @type {Color}
*/
@@ -1355,7 +1262,6 @@ Color.FIREBRICK = Object.freeze(Color.fromCssColorString("#B22222"));
/**
* An immutable Color instance initialized to CSS color #FFFAF0
*
- *
* @constant
* @type {Color}
*/
@@ -1364,7 +1270,6 @@ Color.FLORALWHITE = Object.freeze(Color.fromCssColorString("#FFFAF0"));
/**
* An immutable Color instance initialized to CSS color #228B22
*
- *
* @constant
* @type {Color}
*/
@@ -1373,7 +1278,6 @@ Color.FORESTGREEN = Object.freeze(Color.fromCssColorString("#228B22"));
/**
* An immutable Color instance initialized to CSS color #FF00FF
*
- *
* @constant
* @type {Color}
*/
@@ -1382,7 +1286,6 @@ Color.FUCHSIA = Object.freeze(Color.fromCssColorString("#FF00FF"));
/**
* An immutable Color instance initialized to CSS color #DCDCDC
*
- *
* @constant
* @type {Color}
*/
@@ -1391,7 +1294,6 @@ Color.GAINSBORO = Object.freeze(Color.fromCssColorString("#DCDCDC"));
/**
* An immutable Color instance initialized to CSS color #F8F8FF
*
- *
* @constant
* @type {Color}
*/
@@ -1400,7 +1302,6 @@ Color.GHOSTWHITE = Object.freeze(Color.fromCssColorString("#F8F8FF"));
/**
* An immutable Color instance initialized to CSS color #FFD700
*
- *
* @constant
* @type {Color}
*/
@@ -1409,7 +1310,6 @@ Color.GOLD = Object.freeze(Color.fromCssColorString("#FFD700"));
/**
* An immutable Color instance initialized to CSS color #DAA520
*
- *
* @constant
* @type {Color}
*/
@@ -1418,7 +1318,6 @@ Color.GOLDENROD = Object.freeze(Color.fromCssColorString("#DAA520"));
/**
* An immutable Color instance initialized to CSS color #808080
*
- *
* @constant
* @type {Color}
*/
@@ -1427,7 +1326,6 @@ Color.GRAY = Object.freeze(Color.fromCssColorString("#808080"));
/**
* An immutable Color instance initialized to CSS color #008000
*
- *
* @constant
* @type {Color}
*/
@@ -1436,7 +1334,6 @@ Color.GREEN = Object.freeze(Color.fromCssColorString("#008000"));
/**
* An immutable Color instance initialized to CSS color #ADFF2F
*
- *
* @constant
* @type {Color}
*/
@@ -1445,7 +1342,6 @@ Color.GREENYELLOW = Object.freeze(Color.fromCssColorString("#ADFF2F"));
/**
* An immutable Color instance initialized to CSS color #808080
*
- *
* @constant
* @type {Color}
*/
@@ -1454,7 +1350,6 @@ Color.GREY = Color.GRAY;
/**
* An immutable Color instance initialized to CSS color #F0FFF0
*
- *
* @constant
* @type {Color}
*/
@@ -1463,7 +1358,6 @@ Color.HONEYDEW = Object.freeze(Color.fromCssColorString("#F0FFF0"));
/**
* An immutable Color instance initialized to CSS color #FF69B4
*
- *
* @constant
* @type {Color}
*/
@@ -1472,7 +1366,6 @@ Color.HOTPINK = Object.freeze(Color.fromCssColorString("#FF69B4"));
/**
* An immutable Color instance initialized to CSS color #CD5C5C
*
- *
* @constant
* @type {Color}
*/
@@ -1481,7 +1374,6 @@ Color.INDIANRED = Object.freeze(Color.fromCssColorString("#CD5C5C"));
/**
* An immutable Color instance initialized to CSS color #4B0082
*
- *
* @constant
* @type {Color}
*/
@@ -1490,7 +1382,6 @@ Color.INDIGO = Object.freeze(Color.fromCssColorString("#4B0082"));
/**
* An immutable Color instance initialized to CSS color #FFFFF0
*
- *
* @constant
* @type {Color}
*/
@@ -1499,7 +1390,6 @@ Color.IVORY = Object.freeze(Color.fromCssColorString("#FFFFF0"));
/**
* An immutable Color instance initialized to CSS color #F0E68C
*
- *
* @constant
* @type {Color}
*/
@@ -1508,7 +1398,6 @@ Color.KHAKI = Object.freeze(Color.fromCssColorString("#F0E68C"));
/**
* An immutable Color instance initialized to CSS color #E6E6FA
*
- *
* @constant
* @type {Color}
*/
@@ -1517,7 +1406,6 @@ Color.LAVENDER = Object.freeze(Color.fromCssColorString("#E6E6FA"));
/**
* An immutable Color instance initialized to CSS color #FFF0F5
*
- *
* @constant
* @type {Color}
*/
@@ -1526,7 +1414,6 @@ Color.LAVENDAR_BLUSH = Object.freeze(Color.fromCssColorString("#FFF0F5"));
/**
* An immutable Color instance initialized to CSS color #7CFC00
*
- *
* @constant
* @type {Color}
*/
@@ -1535,7 +1422,6 @@ Color.LAWNGREEN = Object.freeze(Color.fromCssColorString("#7CFC00"));
/**
* An immutable Color instance initialized to CSS color #FFFACD
*
- *
* @constant
* @type {Color}
*/
@@ -1544,7 +1430,6 @@ Color.LEMONCHIFFON = Object.freeze(Color.fromCssColorString("#FFFACD"));
/**
* An immutable Color instance initialized to CSS color #ADD8E6
*
- *
* @constant
* @type {Color}
*/
@@ -1553,7 +1438,6 @@ Color.LIGHTBLUE = Object.freeze(Color.fromCssColorString("#ADD8E6"));
/**
* An immutable Color instance initialized to CSS color #F08080
*
- *
* @constant
* @type {Color}
*/
@@ -1562,7 +1446,6 @@ Color.LIGHTCORAL = Object.freeze(Color.fromCssColorString("#F08080"));
/**
* An immutable Color instance initialized to CSS color #E0FFFF
*
- *
* @constant
* @type {Color}
*/
@@ -1571,7 +1454,6 @@ Color.LIGHTCYAN = Object.freeze(Color.fromCssColorString("#E0FFFF"));
/**
* An immutable Color instance initialized to CSS color #FAFAD2
*
- *
* @constant
* @type {Color}
*/
@@ -1580,7 +1462,6 @@ Color.LIGHTGOLDENRODYELLOW = Object.freeze(Color.fromCssColorString("#FAFAD2"));
/**
* An immutable Color instance initialized to CSS color #D3D3D3
*
- *
* @constant
* @type {Color}
*/
@@ -1589,7 +1470,6 @@ Color.LIGHTGRAY = Object.freeze(Color.fromCssColorString("#D3D3D3"));
/**
* An immutable Color instance initialized to CSS color #90EE90
*
- *
* @constant
* @type {Color}
*/
@@ -1598,7 +1478,6 @@ Color.LIGHTGREEN = Object.freeze(Color.fromCssColorString("#90EE90"));
/**
* An immutable Color instance initialized to CSS color #D3D3D3
*
- *
* @constant
* @type {Color}
*/
@@ -1607,7 +1486,6 @@ Color.LIGHTGREY = Color.LIGHTGRAY;
/**
* An immutable Color instance initialized to CSS color #FFB6C1
*
- *
* @constant
* @type {Color}
*/
@@ -1616,7 +1494,6 @@ Color.LIGHTPINK = Object.freeze(Color.fromCssColorString("#FFB6C1"));
/**
* An immutable Color instance initialized to CSS color #20B2AA
*
- *
* @constant
* @type {Color}
*/
@@ -1625,7 +1502,6 @@ Color.LIGHTSEAGREEN = Object.freeze(Color.fromCssColorString("#20B2AA"));
/**
* An immutable Color instance initialized to CSS color #87CEFA
*
- *
* @constant
* @type {Color}
*/
@@ -1634,7 +1510,6 @@ Color.LIGHTSKYBLUE = Object.freeze(Color.fromCssColorString("#87CEFA"));
/**
* An immutable Color instance initialized to CSS color #778899
*
- *
* @constant
* @type {Color}
*/
@@ -1643,7 +1518,6 @@ Color.LIGHTSLATEGRAY = Object.freeze(Color.fromCssColorString("#778899"));
/**
* An immutable Color instance initialized to CSS color #778899
*
- *
* @constant
* @type {Color}
*/
@@ -1652,7 +1526,6 @@ Color.LIGHTSLATEGREY = Color.LIGHTSLATEGRAY;
/**
* An immutable Color instance initialized to CSS color #B0C4DE
*
- *
* @constant
* @type {Color}
*/
@@ -1661,7 +1534,6 @@ Color.LIGHTSTEELBLUE = Object.freeze(Color.fromCssColorString("#B0C4DE"));
/**
* An immutable Color instance initialized to CSS color #FFFFE0
*
- *
* @constant
* @type {Color}
*/
@@ -1670,7 +1542,6 @@ Color.LIGHTYELLOW = Object.freeze(Color.fromCssColorString("#FFFFE0"));
/**
* An immutable Color instance initialized to CSS color #00FF00
*
- *
* @constant
* @type {Color}
*/
@@ -1679,7 +1550,6 @@ Color.LIME = Object.freeze(Color.fromCssColorString("#00FF00"));
/**
* An immutable Color instance initialized to CSS color #32CD32
*
- *
* @constant
* @type {Color}
*/
@@ -1688,7 +1558,6 @@ Color.LIMEGREEN = Object.freeze(Color.fromCssColorString("#32CD32"));
/**
* An immutable Color instance initialized to CSS color #FAF0E6
*
- *
* @constant
* @type {Color}
*/
@@ -1697,7 +1566,6 @@ Color.LINEN = Object.freeze(Color.fromCssColorString("#FAF0E6"));
/**
* An immutable Color instance initialized to CSS color #FF00FF
*
- *
* @constant
* @type {Color}
*/
@@ -1706,7 +1574,6 @@ Color.MAGENTA = Object.freeze(Color.fromCssColorString("#FF00FF"));
/**
* An immutable Color instance initialized to CSS color #800000
*
- *
* @constant
* @type {Color}
*/
@@ -1715,7 +1582,6 @@ Color.MAROON = Object.freeze(Color.fromCssColorString("#800000"));
/**
* An immutable Color instance initialized to CSS color #66CDAA
*
- *
* @constant
* @type {Color}
*/
@@ -1724,7 +1590,6 @@ Color.MEDIUMAQUAMARINE = Object.freeze(Color.fromCssColorString("#66CDAA"));
/**
* An immutable Color instance initialized to CSS color #0000CD
*
- *
* @constant
* @type {Color}
*/
@@ -1733,7 +1598,6 @@ Color.MEDIUMBLUE = Object.freeze(Color.fromCssColorString("#0000CD"));
/**
* An immutable Color instance initialized to CSS color #BA55D3
*
- *
* @constant
* @type {Color}
*/
@@ -1742,7 +1606,6 @@ Color.MEDIUMORCHID = Object.freeze(Color.fromCssColorString("#BA55D3"));
/**
* An immutable Color instance initialized to CSS color #9370DB
*
- *
* @constant
* @type {Color}
*/
@@ -1751,7 +1614,6 @@ Color.MEDIUMPURPLE = Object.freeze(Color.fromCssColorString("#9370DB"));
/**
* An immutable Color instance initialized to CSS color #3CB371
*
- *
* @constant
* @type {Color}
*/
@@ -1760,7 +1622,6 @@ Color.MEDIUMSEAGREEN = Object.freeze(Color.fromCssColorString("#3CB371"));
/**
* An immutable Color instance initialized to CSS color #7B68EE
*
- *
* @constant
* @type {Color}
*/
@@ -1769,7 +1630,6 @@ Color.MEDIUMSLATEBLUE = Object.freeze(Color.fromCssColorString("#7B68EE"));
/**
* An immutable Color instance initialized to CSS color #00FA9A
*
- *
* @constant
* @type {Color}
*/
@@ -1778,7 +1638,6 @@ Color.MEDIUMSPRINGGREEN = Object.freeze(Color.fromCssColorString("#00FA9A"));
/**
* An immutable Color instance initialized to CSS color #48D1CC
*
- *
* @constant
* @type {Color}
*/
@@ -1787,7 +1646,6 @@ Color.MEDIUMTURQUOISE = Object.freeze(Color.fromCssColorString("#48D1CC"));
/**
* An immutable Color instance initialized to CSS color #C71585
*
- *
* @constant
* @type {Color}
*/
@@ -1796,7 +1654,6 @@ Color.MEDIUMVIOLETRED = Object.freeze(Color.fromCssColorString("#C71585"));
/**
* An immutable Color instance initialized to CSS color #191970
*
- *
* @constant
* @type {Color}
*/
@@ -1805,7 +1662,6 @@ Color.MIDNIGHTBLUE = Object.freeze(Color.fromCssColorString("#191970"));
/**
* An immutable Color instance initialized to CSS color #F5FFFA
*
- *
* @constant
* @type {Color}
*/
@@ -1814,7 +1670,6 @@ Color.MINTCREAM = Object.freeze(Color.fromCssColorString("#F5FFFA"));
/**
* An immutable Color instance initialized to CSS color #FFE4E1
*
- *
* @constant
* @type {Color}
*/
@@ -1823,7 +1678,6 @@ Color.MISTYROSE = Object.freeze(Color.fromCssColorString("#FFE4E1"));
/**
* An immutable Color instance initialized to CSS color #FFE4B5
*
- *
* @constant
* @type {Color}
*/
@@ -1832,7 +1686,6 @@ Color.MOCCASIN = Object.freeze(Color.fromCssColorString("#FFE4B5"));
/**
* An immutable Color instance initialized to CSS color #FFDEAD
*
- *
* @constant
* @type {Color}
*/
@@ -1841,7 +1694,6 @@ Color.NAVAJOWHITE = Object.freeze(Color.fromCssColorString("#FFDEAD"));
/**
* An immutable Color instance initialized to CSS color #000080
*
- *
* @constant
* @type {Color}
*/
@@ -1850,7 +1702,6 @@ Color.NAVY = Object.freeze(Color.fromCssColorString("#000080"));
/**
* An immutable Color instance initialized to CSS color #FDF5E6
*
- *
* @constant
* @type {Color}
*/
@@ -1859,7 +1710,6 @@ Color.OLDLACE = Object.freeze(Color.fromCssColorString("#FDF5E6"));
/**
* An immutable Color instance initialized to CSS color #808000
*
- *
* @constant
* @type {Color}
*/
@@ -1868,7 +1718,6 @@ Color.OLIVE = Object.freeze(Color.fromCssColorString("#808000"));
/**
* An immutable Color instance initialized to CSS color #6B8E23
*
- *
* @constant
* @type {Color}
*/
@@ -1877,7 +1726,6 @@ Color.OLIVEDRAB = Object.freeze(Color.fromCssColorString("#6B8E23"));
/**
* An immutable Color instance initialized to CSS color #FFA500
*
- *
* @constant
* @type {Color}
*/
@@ -1886,7 +1734,6 @@ Color.ORANGE = Object.freeze(Color.fromCssColorString("#FFA500"));
/**
* An immutable Color instance initialized to CSS color #FF4500
*
- *
* @constant
* @type {Color}
*/
@@ -1895,7 +1742,6 @@ Color.ORANGERED = Object.freeze(Color.fromCssColorString("#FF4500"));
/**
* An immutable Color instance initialized to CSS color #DA70D6
*
- *
* @constant
* @type {Color}
*/
@@ -1904,7 +1750,6 @@ Color.ORCHID = Object.freeze(Color.fromCssColorString("#DA70D6"));
/**
* An immutable Color instance initialized to CSS color #EEE8AA
*
- *
* @constant
* @type {Color}
*/
@@ -1913,7 +1758,6 @@ Color.PALEGOLDENROD = Object.freeze(Color.fromCssColorString("#EEE8AA"));
/**
* An immutable Color instance initialized to CSS color #98FB98
*
- *
* @constant
* @type {Color}
*/
@@ -1922,7 +1766,6 @@ Color.PALEGREEN = Object.freeze(Color.fromCssColorString("#98FB98"));
/**
* An immutable Color instance initialized to CSS color #AFEEEE
*
- *
* @constant
* @type {Color}
*/
@@ -1931,7 +1774,6 @@ Color.PALETURQUOISE = Object.freeze(Color.fromCssColorString("#AFEEEE"));
/**
* An immutable Color instance initialized to CSS color #DB7093
*
- *
* @constant
* @type {Color}
*/
@@ -1940,7 +1782,6 @@ Color.PALEVIOLETRED = Object.freeze(Color.fromCssColorString("#DB7093"));
/**
* An immutable Color instance initialized to CSS color #FFEFD5
*
- *
* @constant
* @type {Color}
*/
@@ -1949,7 +1790,6 @@ Color.PAPAYAWHIP = Object.freeze(Color.fromCssColorString("#FFEFD5"));
/**
* An immutable Color instance initialized to CSS color #FFDAB9
*
- *
* @constant
* @type {Color}
*/
@@ -1958,7 +1798,6 @@ Color.PEACHPUFF = Object.freeze(Color.fromCssColorString("#FFDAB9"));
/**
* An immutable Color instance initialized to CSS color #CD853F
*
- *
* @constant
* @type {Color}
*/
@@ -1967,7 +1806,6 @@ Color.PERU = Object.freeze(Color.fromCssColorString("#CD853F"));
/**
* An immutable Color instance initialized to CSS color #FFC0CB
*
- *
* @constant
* @type {Color}
*/
@@ -1976,7 +1814,6 @@ Color.PINK = Object.freeze(Color.fromCssColorString("#FFC0CB"));
/**
* An immutable Color instance initialized to CSS color #DDA0DD
*
- *
* @constant
* @type {Color}
*/
@@ -1985,7 +1822,6 @@ Color.PLUM = Object.freeze(Color.fromCssColorString("#DDA0DD"));
/**
* An immutable Color instance initialized to CSS color #B0E0E6
*
- *
* @constant
* @type {Color}
*/
@@ -1994,7 +1830,6 @@ Color.POWDERBLUE = Object.freeze(Color.fromCssColorString("#B0E0E6"));
/**
* An immutable Color instance initialized to CSS color #800080
*
- *
* @constant
* @type {Color}
*/
@@ -2003,7 +1838,6 @@ Color.PURPLE = Object.freeze(Color.fromCssColorString("#800080"));
/**
* An immutable Color instance initialized to CSS color #FF0000
*
- *
* @constant
* @type {Color}
*/
@@ -2012,7 +1846,6 @@ Color.RED = Object.freeze(Color.fromCssColorString("#FF0000"));
/**
* An immutable Color instance initialized to CSS color #BC8F8F
*
- *
* @constant
* @type {Color}
*/
@@ -2021,7 +1854,6 @@ Color.ROSYBROWN = Object.freeze(Color.fromCssColorString("#BC8F8F"));
/**
* An immutable Color instance initialized to CSS color #4169E1
*
- *
* @constant
* @type {Color}
*/
@@ -2030,7 +1862,6 @@ Color.ROYALBLUE = Object.freeze(Color.fromCssColorString("#4169E1"));
/**
* An immutable Color instance initialized to CSS color #8B4513
*
- *
* @constant
* @type {Color}
*/
@@ -2039,7 +1870,6 @@ Color.SADDLEBROWN = Object.freeze(Color.fromCssColorString("#8B4513"));
/**
* An immutable Color instance initialized to CSS color #FA8072
*
- *
* @constant
* @type {Color}
*/
@@ -2048,7 +1878,6 @@ Color.SALMON = Object.freeze(Color.fromCssColorString("#FA8072"));
/**
* An immutable Color instance initialized to CSS color #F4A460
*
- *
* @constant
* @type {Color}
*/
@@ -2057,7 +1886,6 @@ Color.SANDYBROWN = Object.freeze(Color.fromCssColorString("#F4A460"));
/**
* An immutable Color instance initialized to CSS color #2E8B57
*
- *
* @constant
* @type {Color}
*/
@@ -2066,7 +1894,6 @@ Color.SEAGREEN = Object.freeze(Color.fromCssColorString("#2E8B57"));
/**
* An immutable Color instance initialized to CSS color #FFF5EE
*
- *
* @constant
* @type {Color}
*/
@@ -2075,7 +1902,6 @@ Color.SEASHELL = Object.freeze(Color.fromCssColorString("#FFF5EE"));
/**
* An immutable Color instance initialized to CSS color #A0522D
*
- *
* @constant
* @type {Color}
*/
@@ -2084,7 +1910,6 @@ Color.SIENNA = Object.freeze(Color.fromCssColorString("#A0522D"));
/**
* An immutable Color instance initialized to CSS color #C0C0C0
*
- *
* @constant
* @type {Color}
*/
@@ -2093,7 +1918,6 @@ Color.SILVER = Object.freeze(Color.fromCssColorString("#C0C0C0"));
/**
* An immutable Color instance initialized to CSS color #87CEEB
*
- *
* @constant
* @type {Color}
*/
@@ -2102,7 +1926,6 @@ Color.SKYBLUE = Object.freeze(Color.fromCssColorString("#87CEEB"));
/**
* An immutable Color instance initialized to CSS color #6A5ACD
*
- *
* @constant
* @type {Color}
*/
@@ -2111,7 +1934,6 @@ Color.SLATEBLUE = Object.freeze(Color.fromCssColorString("#6A5ACD"));
/**
* An immutable Color instance initialized to CSS color #708090
*
- *
* @constant
* @type {Color}
*/
@@ -2120,7 +1942,6 @@ Color.SLATEGRAY = Object.freeze(Color.fromCssColorString("#708090"));
/**
* An immutable Color instance initialized to CSS color #708090
*
- *
* @constant
* @type {Color}
*/
@@ -2129,7 +1950,6 @@ Color.SLATEGREY = Color.SLATEGRAY;
/**
* An immutable Color instance initialized to CSS color #FFFAFA
*
- *
* @constant
* @type {Color}
*/
@@ -2138,7 +1958,6 @@ Color.SNOW = Object.freeze(Color.fromCssColorString("#FFFAFA"));
/**
* An immutable Color instance initialized to CSS color #00FF7F
*
- *
* @constant
* @type {Color}
*/
@@ -2147,7 +1966,6 @@ Color.SPRINGGREEN = Object.freeze(Color.fromCssColorString("#00FF7F"));
/**
* An immutable Color instance initialized to CSS color #4682B4
*
- *
* @constant
* @type {Color}
*/
@@ -2156,7 +1974,6 @@ Color.STEELBLUE = Object.freeze(Color.fromCssColorString("#4682B4"));
/**
* An immutable Color instance initialized to CSS color #D2B48C
*
- *
* @constant
* @type {Color}
*/
@@ -2165,7 +1982,6 @@ Color.TAN = Object.freeze(Color.fromCssColorString("#D2B48C"));
/**
* An immutable Color instance initialized to CSS color #008080
*
- *
* @constant
* @type {Color}
*/
@@ -2174,7 +1990,6 @@ Color.TEAL = Object.freeze(Color.fromCssColorString("#008080"));
/**
* An immutable Color instance initialized to CSS color #D8BFD8
*
- *
* @constant
* @type {Color}
*/
@@ -2183,7 +1998,6 @@ Color.THISTLE = Object.freeze(Color.fromCssColorString("#D8BFD8"));
/**
* An immutable Color instance initialized to CSS color #FF6347
*
- *
* @constant
* @type {Color}
*/
@@ -2192,7 +2006,6 @@ Color.TOMATO = Object.freeze(Color.fromCssColorString("#FF6347"));
/**
* An immutable Color instance initialized to CSS color #40E0D0
*
- *
* @constant
* @type {Color}
*/
@@ -2201,7 +2014,6 @@ Color.TURQUOISE = Object.freeze(Color.fromCssColorString("#40E0D0"));
/**
* An immutable Color instance initialized to CSS color #EE82EE
*
- *
* @constant
* @type {Color}
*/
@@ -2210,7 +2022,6 @@ Color.VIOLET = Object.freeze(Color.fromCssColorString("#EE82EE"));
/**
* An immutable Color instance initialized to CSS color #F5DEB3
*
- *
* @constant
* @type {Color}
*/
@@ -2219,7 +2030,6 @@ Color.WHEAT = Object.freeze(Color.fromCssColorString("#F5DEB3"));
/**
* An immutable Color instance initialized to CSS color #FFFFFF
*
- *
* @constant
* @type {Color}
*/
@@ -2228,7 +2038,6 @@ Color.WHITE = Object.freeze(Color.fromCssColorString("#FFFFFF"));
/**
* An immutable Color instance initialized to CSS color #F5F5F5
*
- *
* @constant
* @type {Color}
*/
@@ -2237,7 +2046,6 @@ Color.WHITESMOKE = Object.freeze(Color.fromCssColorString("#F5F5F5"));
/**
* An immutable Color instance initialized to CSS color #FFFF00
*
- *
* @constant
* @type {Color}
*/
@@ -2246,7 +2054,6 @@ Color.YELLOW = Object.freeze(Color.fromCssColorString("#FFFF00"));
/**
* An immutable Color instance initialized to CSS color #9ACD32
*
- *
* @constant
* @type {Color}
*/
@@ -2255,7 +2062,6 @@ Color.YELLOWGREEN = Object.freeze(Color.fromCssColorString("#9ACD32"));
/**
* An immutable Color instance initialized to CSS transparent.
*
- *
* @constant
* @type {Color}
*/
diff --git a/packages/engine/Source/Core/ColorGeometryInstanceAttribute.js b/packages/engine/Source/Core/ColorGeometryInstanceAttribute.js
index 1b409b4255b3..47e3dca1e402 100644
--- a/packages/engine/Source/Core/ColorGeometryInstanceAttribute.js
+++ b/packages/engine/Source/Core/ColorGeometryInstanceAttribute.js
@@ -6,16 +6,12 @@ import DeveloperError from "./DeveloperError.js";
/**
* Value and type information for per-instance geometry color.
- *
* @alias ColorGeometryInstanceAttribute
- * @constructor
- *
- * @param {number} [red=1.0] The red component.
- * @param {number} [green=1.0] The green component.
- * @param {number} [blue=1.0] The blue component.
- * @param {number} [alpha=1.0] The alpha component.
- *
- *
+ * @class
+ * @param {number} [red] The red component.
+ * @param {number} [green] The green component.
+ * @param {number} [blue] The blue component.
+ * @param {number} [alpha] The alpha component.
* @example
* const instance = new Cesium.GeometryInstance({
* geometry : Cesium.BoxGeometry.fromDimensions({
@@ -28,7 +24,6 @@ import DeveloperError from "./DeveloperError.js";
* color : new Cesium.ColorGeometryInstanceAttribute(red, green, blue, alpha)
* }
* });
- *
* @see GeometryInstance
* @see GeometryInstanceAttribute
*/
@@ -40,9 +35,7 @@ function ColorGeometryInstanceAttribute(red, green, blue, alpha) {
/**
* The values for the attributes stored in a typed array.
- *
* @type Uint8Array
- *
* @default [255, 255, 255, 255]
*/
this.value = new Uint8Array([
@@ -57,12 +50,9 @@ Object.defineProperties(ColorGeometryInstanceAttribute.prototype, {
/**
* The datatype of each component in the attribute, e.g., individual elements in
* {@link ColorGeometryInstanceAttribute#value}.
- *
* @memberof ColorGeometryInstanceAttribute.prototype
- *
* @type {ComponentDatatype}
* @readonly
- *
* @default {@link ComponentDatatype.UNSIGNED_BYTE}
*/
componentDatatype: {
@@ -73,12 +63,9 @@ Object.defineProperties(ColorGeometryInstanceAttribute.prototype, {
/**
* The number of components in the attributes, i.e., {@link ColorGeometryInstanceAttribute#value}.
- *
* @memberof ColorGeometryInstanceAttribute.prototype
- *
* @type {number}
* @readonly
- *
* @default 4
*/
componentsPerAttribute: {
@@ -91,12 +78,9 @@ Object.defineProperties(ColorGeometryInstanceAttribute.prototype, {
* When true
and componentDatatype
is an integer format,
* indicate that the components should be mapped to the range [0, 1] (unsigned)
* or [-1, 1] (signed) when they are accessed as floating-point for rendering.
- *
* @memberof ColorGeometryInstanceAttribute.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
normalize: {
@@ -108,10 +92,8 @@ Object.defineProperties(ColorGeometryInstanceAttribute.prototype, {
/**
* Creates a new {@link ColorGeometryInstanceAttribute} instance given the provided {@link Color}.
- *
* @param {Color} color The color.
* @returns {ColorGeometryInstanceAttribute} The new {@link ColorGeometryInstanceAttribute} instance.
- *
* @example
* const instance = new Cesium.GeometryInstance({
* geometry : geometry,
@@ -137,12 +119,9 @@ ColorGeometryInstanceAttribute.fromColor = function (color) {
/**
* Converts a color to a typed array that can be used to assign a color attribute.
- *
* @param {Color} color The color.
* @param {Uint8Array} [result] The array to store the result in, if undefined a new instance will be created.
- *
* @returns {Uint8Array} The modified result parameter or a new instance if result was undefined.
- *
* @example
* const attributes = primitive.getGeometryInstanceAttributes('an id');
* attributes.color = Cesium.ColorGeometryInstanceAttribute.toValue(Cesium.Color.AQUA, attributes.color);
@@ -163,7 +142,6 @@ ColorGeometryInstanceAttribute.toValue = function (color, result) {
/**
* Compares the provided ColorGeometryInstanceAttributes and returns
* true
if they are equal, false
otherwise.
- *
* @param {ColorGeometryInstanceAttribute} [left] The first ColorGeometryInstanceAttribute.
* @param {ColorGeometryInstanceAttribute} [right] The second ColorGeometryInstanceAttribute.
* @returns {boolean} true
if left and right are equal, false
otherwise.
diff --git a/packages/engine/Source/Core/ComponentDatatype.js b/packages/engine/Source/Core/ComponentDatatype.js
index 9e92afe2696b..f1770918f815 100644
--- a/packages/engine/Source/Core/ComponentDatatype.js
+++ b/packages/engine/Source/Core/ComponentDatatype.js
@@ -6,14 +6,12 @@ import WebGLConstants from "./WebGLConstants.js";
/**
* WebGL component datatypes. Components are intrinsics,
* which form attributes, which form vertices.
- *
* @enum {number}
*/
const ComponentDatatype = {
/**
* 8-bit signed byte corresponding to gl.BYTE
and the type
* of an element in Int8Array
.
- *
* @type {number}
* @constant
*/
@@ -22,7 +20,6 @@ const ComponentDatatype = {
/**
* 8-bit unsigned byte corresponding to UNSIGNED_BYTE
and the type
* of an element in Uint8Array
.
- *
* @type {number}
* @constant
*/
@@ -31,7 +28,6 @@ const ComponentDatatype = {
/**
* 16-bit signed short corresponding to SHORT
and the type
* of an element in Int16Array
.
- *
* @type {number}
* @constant
*/
@@ -40,7 +36,6 @@ const ComponentDatatype = {
/**
* 16-bit unsigned short corresponding to UNSIGNED_SHORT
and the type
* of an element in Uint16Array
.
- *
* @type {number}
* @constant
*/
@@ -49,9 +44,7 @@ const ComponentDatatype = {
/**
* 32-bit signed int corresponding to INT
and the type
* of an element in Int32Array
.
- *
* @memberOf ComponentDatatype
- *
* @type {number}
* @constant
*/
@@ -60,9 +53,7 @@ const ComponentDatatype = {
/**
* 32-bit unsigned int corresponding to UNSIGNED_INT
and the type
* of an element in Uint32Array
.
- *
* @memberOf ComponentDatatype
- *
* @type {number}
* @constant
*/
@@ -71,7 +62,6 @@ const ComponentDatatype = {
/**
* 32-bit floating-point corresponding to FLOAT
and the type
* of an element in Float32Array
.
- *
* @type {number}
* @constant
*/
@@ -81,9 +71,7 @@ const ComponentDatatype = {
* 64-bit floating-point corresponding to gl.DOUBLE
(in Desktop OpenGL;
* this is not supported in WebGL, and is emulated in Cesium via {@link GeometryPipeline.encodeAttribute})
* and the type of an element in Float64Array
.
- *
* @memberOf ComponentDatatype
- *
* @type {number}
* @constant
* @default 0x140A
@@ -93,12 +81,9 @@ const ComponentDatatype = {
/**
* Returns the size, in bytes, of the corresponding datatype.
- *
* @param {ComponentDatatype} componentDatatype The component datatype to get the size of.
* @returns {number} The size in bytes.
- *
- * @exception {DeveloperError} componentDatatype is not a valid value.
- *
+ * @throws {DeveloperError} componentDatatype is not a valid value.
* @example
* // Returns Int8Array.BYTES_PER_ELEMENT
* const size = Cesium.ComponentDatatype.getSizeInBytes(Cesium.ComponentDatatype.BYTE);
@@ -136,7 +121,6 @@ ComponentDatatype.getSizeInBytes = function (componentDatatype) {
/**
* Gets the {@link ComponentDatatype} for the provided TypedArray instance.
- *
* @param {Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} array The typed array.
* @returns {ComponentDatatype} The ComponentDatatype for the provided array, or undefined if the array is not a TypedArray.
*/
@@ -175,10 +159,8 @@ ComponentDatatype.fromTypedArray = function (array) {
/**
* Validates that the provided component datatype is a valid {@link ComponentDatatype}
- *
* @param {ComponentDatatype} componentDatatype The component datatype to validate.
* @returns {boolean} true
if the provided component datatype is a valid value; otherwise, false
.
- *
* @example
* if (!Cesium.ComponentDatatype.validate(componentDatatype)) {
* throw new Cesium.DeveloperError('componentDatatype must be a valid value.');
@@ -200,13 +182,10 @@ ComponentDatatype.validate = function (componentDatatype) {
/**
* Creates a typed array corresponding to component data type.
- *
* @param {ComponentDatatype} componentDatatype The component data type.
* @param {number|Array} valuesOrLength The length of the array to create or an array.
* @returns {Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} A typed array.
- *
- * @exception {DeveloperError} componentDatatype is not a valid value.
- *
+ * @throws {DeveloperError} componentDatatype is not a valid value.
* @example
* // creates a Float32Array with length of 100
* const typedArray = Cesium.ComponentDatatype.createTypedArray(Cesium.ComponentDatatype.FLOAT, 100);
@@ -250,14 +229,12 @@ ComponentDatatype.createTypedArray = function (
/**
* Creates a typed view of an array of bytes.
- *
* @param {ComponentDatatype} componentDatatype The type of the view to create.
* @param {ArrayBuffer} buffer The buffer storage to use for the view.
* @param {number} [byteOffset] The offset, in bytes, to the first element in the view.
* @param {number} [length] The number of elements in the view.
* @returns {Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} A typed array view of the buffer.
- *
- * @exception {DeveloperError} componentDatatype is not a valid value.
+ * @throws {DeveloperError} componentDatatype is not a valid value.
*/
ComponentDatatype.createArrayBufferView = function (
componentDatatype,
@@ -307,11 +284,9 @@ ComponentDatatype.createArrayBufferView = function (
/**
* Get the ComponentDatatype from its name.
- *
* @param {string} name The name of the ComponentDatatype.
* @returns {ComponentDatatype} The ComponentDatatype.
- *
- * @exception {DeveloperError} name is not a valid value.
+ * @throws {DeveloperError} name is not a valid value.
*/
ComponentDatatype.fromName = function (name) {
switch (name) {
diff --git a/packages/engine/Source/Core/CompressedTextureBuffer.js b/packages/engine/Source/Core/CompressedTextureBuffer.js
index 632c4b9a757f..e313b89fccb8 100644
--- a/packages/engine/Source/Core/CompressedTextureBuffer.js
+++ b/packages/engine/Source/Core/CompressedTextureBuffer.js
@@ -3,8 +3,7 @@ import defined from "./defined.js";
/**
* Describes a compressed texture and contains a compressed texture buffer.
* @alias CompressedTextureBuffer
- * @constructor
- *
+ * @class
* @param {PixelFormat} internalFormat The pixel format of the compressed texture.
* @param {PixelDatatype} pixelDatatype The pixel datatype of the compressed texture.
* @param {number} width The width of the texture.
@@ -85,9 +84,8 @@ Object.defineProperties(CompressedTextureBuffer.prototype, {
/**
* Creates a shallow clone of a compressed texture buffer.
- *
* @param {CompressedTextureBuffer} object The compressed texture buffer to be cloned.
- * @return {CompressedTextureBuffer} A shallow clone of the compressed texture buffer.
+ * @returns {CompressedTextureBuffer} A shallow clone of the compressed texture buffer.
*/
CompressedTextureBuffer.clone = function (object) {
if (!defined(object)) {
@@ -105,8 +103,7 @@ CompressedTextureBuffer.clone = function (object) {
/**
* Creates a shallow clone of this compressed texture buffer.
- *
- * @return {CompressedTextureBuffer} A shallow clone of the compressed texture buffer.
+ * @returns {CompressedTextureBuffer} A shallow clone of the compressed texture buffer.
*/
CompressedTextureBuffer.prototype.clone = function () {
return CompressedTextureBuffer.clone(this);
diff --git a/packages/engine/Source/Core/ConstantSpline.js b/packages/engine/Source/Core/ConstantSpline.js
index 032003de3a3f..745104c71a82 100644
--- a/packages/engine/Source/Core/ConstantSpline.js
+++ b/packages/engine/Source/Core/ConstantSpline.js
@@ -5,18 +5,14 @@ import Spline from "./Spline.js";
/**
* A spline that evaluates to a constant value. Although this follows the {@link Spline} interface,
* it does not maintain an internal array of times since its value never changes.
- *
* @alias ConstantSpline
- * @constructor
- *
+ * @class
* @param {number|Cartesian3|Quaternion} value The constant value that the spline evaluates to.
- *
* @example
* const position = new Cesium.Cartesian3(1.0, 2.0, 3.0);
* const spline = new Cesium.ConstantSpline(position);
*
* const p0 = spline.evaluate(0.0);
- *
* @see LinearSpline
* @see HermiteSpline
* @see CatmullRomSpline
@@ -31,9 +27,7 @@ function ConstantSpline(value) {
Object.defineProperties(ConstantSpline.prototype, {
/**
* The constant value that the spline evaluates to.
- *
* @memberof ConstantSpline.prototype
- *
* @type {number|Cartesian3|Quaternion}
* @readonly
*/
@@ -50,10 +44,8 @@ Object.defineProperties(ConstantSpline.prototype, {
*
* Since a constant spline has no internal times array, this will throw an error.
* @function
- *
* @param {number} time The time.
- *
- * @exception {DeveloperError} findTimeInterval cannot be called on a ConstantSpline.
+ * @throws {DeveloperError} findTimeInterval cannot be called on a ConstantSpline.
*/
ConstantSpline.prototype.findTimeInterval = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -66,9 +58,8 @@ ConstantSpline.prototype.findTimeInterval = function (time) {
/**
* Wraps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, wrapped around to the updated animation.
+ * @returns {number} The time, wrapped around to the updated animation.
*/
ConstantSpline.prototype.wrapTime = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -81,9 +72,8 @@ ConstantSpline.prototype.wrapTime = function (time) {
/**
* Clamps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, clamped to the animation period.
+ * @returns {number} The time, clamped to the animation period.
*/
ConstantSpline.prototype.clampTime = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -96,7 +86,6 @@ ConstantSpline.prototype.clampTime = function (time) {
/**
* Evaluates the curve at a given time.
* @function
- *
* @param {number} time The time at which to evaluate the curve.
* @param {Cartesian3|Quaternion} [result] The object onto which to store the result.
* @returns {number|Cartesian3|Quaternion} The modified result parameter or the value that the constant spline represents.
diff --git a/packages/engine/Source/Core/CoplanarPolygonGeometry.js b/packages/engine/Source/Core/CoplanarPolygonGeometry.js
index 208a1059e051..9f460ff7d569 100644
--- a/packages/engine/Source/Core/CoplanarPolygonGeometry.js
+++ b/packages/engine/Source/Core/CoplanarPolygonGeometry.js
@@ -223,17 +223,14 @@ function createGeometryFromPolygon(
/**
* A description of a polygon composed of arbitrary coplanar positions.
- *
* @alias CoplanarPolygonGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {PolygonHierarchy} options.polygonHierarchy A polygon hierarchy that can include holes.
- * @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
- * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
+ * @param {number} [options.stRotation] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
+ * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
* @param {PolygonHierarchy} [options.textureCoordinates] Texture coordinates as a {@link PolygonHierarchy} of {@link Cartesian2} points.
- *
* @example
* const polygonGeometry = new Cesium.CoplanarPolygonGeometry({
* polygonHierarchy: new Cesium.PolygonHierarchy(
@@ -244,7 +241,6 @@ function createGeometryFromPolygon(
* -80.0, 30.0, 0.0
* ]))
* });
- *
*/
function CoplanarPolygonGeometry(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -286,15 +282,13 @@ function CoplanarPolygonGeometry(options) {
/**
* A description of a coplanar polygon from an array of positions.
- *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of positions that defined the corner points of the polygon.
- * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- * @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
+ * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
+ * @param {number} [options.stRotation] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
* @param {PolygonHierarchy} [options.textureCoordinates] Texture coordinates as a {@link PolygonHierarchy} of {@link Cartesian2} points.
* @returns {CoplanarPolygonGeometry}
- *
* @example
* // create a polygon from points
* const polygon = Cesium.CoplanarPolygonGeometry.fromPositions({
@@ -307,7 +301,6 @@ function CoplanarPolygonGeometry(options) {
* ])
* });
* const geometry = Cesium.PolygonGeometry.createGeometry(polygon);
- *
* @see PolygonGeometry#createGeometry
*/
CoplanarPolygonGeometry.fromPositions = function (options) {
@@ -331,11 +324,9 @@ CoplanarPolygonGeometry.fromPositions = function (options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {CoplanarPolygonGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
CoplanarPolygonGeometry.pack = function (value, array, startingIndex) {
@@ -382,9 +373,8 @@ const scratchOptions = {
};
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {CoplanarPolygonGeometry} [result] The object into which to store the result.
* @returns {CoplanarPolygonGeometry} The modified result parameter or a new CoplanarPolygonGeometry instance if one was not provided.
*/
@@ -446,7 +436,6 @@ CoplanarPolygonGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an arbitrary coplanar polygon, including its vertices, indices, and a bounding sphere.
- *
* @param {CoplanarPolygonGeometry} polygonGeometry A description of the polygon.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/CoplanarPolygonOutlineGeometry.js b/packages/engine/Source/Core/CoplanarPolygonOutlineGeometry.js
index 0f9009676708..c7dd4cf3e507 100644
--- a/packages/engine/Source/Core/CoplanarPolygonOutlineGeometry.js
+++ b/packages/engine/Source/Core/CoplanarPolygonOutlineGeometry.js
@@ -50,15 +50,11 @@ function createGeometryFromPositions(positions) {
/**
* A description of the outline of a polygon composed of arbitrary coplanar positions.
- *
* @alias CoplanarPolygonOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {PolygonHierarchy} options.polygonHierarchy A polygon hierarchy that can include holes.
- *
* @see CoplanarPolygonOutlineGeometry.createGeometry
- *
* @example
* const polygonOutline = new Cesium.CoplanarPolygonOutlineGeometry({
* positions : Cesium.Cartesian3.fromDegreesArrayHeights([
@@ -93,7 +89,6 @@ function CoplanarPolygonOutlineGeometry(options) {
/**
* A description of a coplanar polygon outline from an array of positions.
- *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of positions that defined the corner points of the polygon.
* @returns {CoplanarPolygonOutlineGeometry}
@@ -115,11 +110,9 @@ CoplanarPolygonOutlineGeometry.fromPositions = function (options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {CoplanarPolygonOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
CoplanarPolygonOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -147,9 +140,8 @@ const scratchOptions = {
};
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {CoplanarPolygonOutlineGeometry} [result] The object into which to store the result.
* @returns {CoplanarPolygonOutlineGeometry} The modified result parameter or a new CoplanarPolygonOutlineGeometry instance if one was not provided.
*/
@@ -185,7 +177,6 @@ CoplanarPolygonOutlineGeometry.unpack = function (
/**
* Computes the geometric representation of an arbitrary coplanar polygon, including its vertices, indices, and a bounding sphere.
- *
* @param {CoplanarPolygonOutlineGeometry} polygonGeometry A description of the polygon.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/CornerType.js b/packages/engine/Source/Core/CornerType.js
index c2c4ed23e41f..cd3939763eb6 100644
--- a/packages/engine/Source/Core/CornerType.js
+++ b/packages/engine/Source/Core/CornerType.js
@@ -1,9 +1,7 @@
/**
* Style options for corners.
- *
* @demo The {@link https://sandcastle.cesium.com/index.html?src=Corridor.html&label=Geometries|Corridor Demo}
* demonstrates the three corner types, as used by {@link CorridorGraphics}.
- *
* @enum {number}
*/
const CornerType = {
diff --git a/packages/engine/Source/Core/CorridorGeometry.js b/packages/engine/Source/Core/CorridorGeometry.js
index e5dd6af5ab53..c21731407acc 100644
--- a/packages/engine/Source/Core/CorridorGeometry.js
+++ b/packages/engine/Source/Core/CorridorGeometry.js
@@ -1043,25 +1043,20 @@ function computeRectangle(positions, ellipsoid, width, cornerType, result) {
/**
* A description of a corridor. Corridor geometry can be rendered with both {@link Primitive} and {@link GroundPrimitive}.
- *
* @alias CorridorGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of positions that define the center of the corridor.
* @param {number} options.width The distance between the edges of the corridor in meters.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
- * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {number} [options.height=0] The distance in meters between the ellipsoid surface and the positions.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
+ * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {number} [options.height] The distance in meters between the ellipsoid surface and the positions.
* @param {number} [options.extrudedHeight] The distance in meters between the ellipsoid surface and the extruded face.
- * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- * @param {CornerType} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
- *
+ * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
+ * @param {CornerType} [options.cornerType] Determines the style of the corners.
* @see CorridorGeometry.createGeometry
* @see Packable
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Corridor.html|Cesium Sandcastle Corridor Demo}
- *
* @example
* const corridor = new Cesium.CorridorGeometry({
* vertexFormat : Cesium.VertexFormat.POSITION_ONLY,
@@ -1116,11 +1111,9 @@ function CorridorGeometry(options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {CorridorGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
CorridorGeometry.pack = function (value, array, startingIndex) {
@@ -1173,9 +1166,8 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {CorridorGeometry} [result] The object into which to store the result.
* @returns {CorridorGeometry} The modified result parameter or a new CorridorGeometry instance if one was not provided.
*/
@@ -1242,14 +1234,12 @@ CorridorGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the bounding rectangle given the provided options
- *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of positions that define the center of the corridor.
* @param {number} options.width The distance between the edges of the corridor in meters.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
- * @param {CornerType} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
+ * @param {CornerType} [options.cornerType] Determines the style of the corners.
* @param {Rectangle} [result] An object in which to store the result.
- *
* @returns {Rectangle} The result rectangle.
*/
CorridorGeometry.computeRectangle = function (options, result) {
@@ -1270,7 +1260,6 @@ CorridorGeometry.computeRectangle = function (options, result) {
/**
* Computes the geometric representation of a corridor, including its vertices, indices, and a bounding sphere.
- *
* @param {CorridorGeometry} corridorGeometry A description of the corridor.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
@@ -1357,6 +1346,9 @@ CorridorGeometry.createGeometry = function (corridorGeometry) {
};
/**
+ * @param corridorGeometry
+ * @param minHeightFunc
+ * @param maxHeightFunc
* @private
*/
CorridorGeometry.createShadowVolume = function (
diff --git a/packages/engine/Source/Core/CorridorGeometryLibrary.js b/packages/engine/Source/Core/CorridorGeometryLibrary.js
index f564f6b85513..fb6fa0da93c4 100644
--- a/packages/engine/Source/Core/CorridorGeometryLibrary.js
+++ b/packages/engine/Source/Core/CorridorGeometryLibrary.js
@@ -178,6 +178,10 @@ function addShiftedPositions(positions, left, scalar, calculatedPositions) {
}
/**
+ * @param attribute
+ * @param value
+ * @param front
+ * @param back
* @private
*/
CorridorGeometryLibrary.addAttribute = function (
@@ -205,6 +209,7 @@ const scratchForwardProjection = new Cartesian3();
const scratchBackwardProjection = new Cartesian3();
/**
+ * @param params
* @private
*/
CorridorGeometryLibrary.computePositions = function (params) {
diff --git a/packages/engine/Source/Core/CorridorOutlineGeometry.js b/packages/engine/Source/Core/CorridorOutlineGeometry.js
index 66a39d04bd3b..884e9f5664ee 100644
--- a/packages/engine/Source/Core/CorridorOutlineGeometry.js
+++ b/packages/engine/Source/Core/CorridorOutlineGeometry.js
@@ -354,21 +354,17 @@ function computePositionsExtruded(params) {
/**
* A description of a corridor outline.
- *
* @alias CorridorOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of positions that define the center of the corridor outline.
* @param {number} options.width The distance between the edges of the corridor outline.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
- * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {number} [options.height=0] The distance in meters between the positions and the ellipsoid surface.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
+ * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {number} [options.height] The distance in meters between the positions and the ellipsoid surface.
* @param {number} [options.extrudedHeight] The distance in meters between the extruded face and the ellipsoid surface.
- * @param {CornerType} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
- *
+ * @param {CornerType} [options.cornerType] Determines the style of the corners.
* @see CorridorOutlineGeometry.createGeometry
- *
* @example
* const corridor = new Cesium.CorridorOutlineGeometry({
* positions : Cesium.Cartesian3.fromDegreesArray([-72.0, 40.0, -70.0, 35.0]),
@@ -413,11 +409,9 @@ function CorridorOutlineGeometry(options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {CorridorOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
CorridorOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -463,9 +457,8 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {CorridorOutlineGeometry} [result] The object into which to store the result.
* @returns {CorridorOutlineGeometry} The modified result parameter or a new CorridorOutlineGeometry instance if one was not provided.
*/
@@ -520,7 +513,6 @@ CorridorOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of a corridor, including its vertices, indices, and a bounding sphere.
- *
* @param {CorridorOutlineGeometry} corridorOutlineGeometry A description of the corridor.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/Credit.js b/packages/engine/Source/Core/Credit.js
index 8a00b3fc993f..5ee6aa74a1d3 100644
--- a/packages/engine/Source/Core/Credit.js
+++ b/packages/engine/Source/Core/Credit.js
@@ -9,13 +9,10 @@ const creditToId = {};
/**
* A credit contains data pertaining to how to display attributions/credits for certain content on the screen.
* @param {string} html An string representing an html code snippet
- * @param {boolean} [showOnScreen=false] If true, the credit will be visible in the main credit container. Otherwise, it will appear in a popover
- *
+ * @param {boolean} [showOnScreen] If true, the credit will be visible in the main credit container. Otherwise, it will appear in a popover
* @alias Credit
- * @constructor
- *
- * @exception {DeveloperError} html is required.
- *
+ * @class
+ * @throws {DeveloperError} html is required.
* @example
* // Create a credit with a tooltip, image and link
* const credit = new Cesium.Credit(' ');
@@ -60,7 +57,6 @@ Object.defineProperties(Credit.prototype, {
* @memberof Credit.prototype
* @type {number}
* @readonly
- *
* @private
*/
id: {
@@ -113,7 +109,6 @@ Object.defineProperties(Credit.prototype, {
/**
* Returns true if the credits are equal
- *
* @param {Credit} left The first credit
* @param {Credit} right The second credit
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -130,7 +125,6 @@ Credit.equals = function (left, right) {
/**
* Returns true if the credits are equal
- *
* @param {Credit} credit The credit to compare to.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
@@ -148,7 +142,7 @@ Credit.prototype.isIon = function () {
/**
* @private
* @param attribution
- * @return {Credit}
+ * @returns {Credit}
*/
Credit.getIonCredit = function (attribution) {
const showOnScreen =
@@ -160,7 +154,6 @@ Credit.getIonCredit = function (attribution) {
/**
* Duplicates a Credit instance.
- *
* @param {Credit} [credit] The Credit to duplicate.
* @returns {Credit} A new Credit instance that is a duplicate of the one provided. (Returns undefined if the credit is undefined)
*/
diff --git a/packages/engine/Source/Core/CubicRealPolynomial.js b/packages/engine/Source/Core/CubicRealPolynomial.js
index b199a322dcb4..04bf04ff5cbf 100644
--- a/packages/engine/Source/Core/CubicRealPolynomial.js
+++ b/packages/engine/Source/Core/CubicRealPolynomial.js
@@ -3,14 +3,12 @@ import QuadraticRealPolynomial from "./QuadraticRealPolynomial.js";
/**
* Defines functions for 3rd order polynomial functions of one variable with only real coefficients.
- *
* @namespace CubicRealPolynomial
*/
const CubicRealPolynomial = {};
/**
* Provides the discriminant of the cubic equation from the supplied coefficients.
- *
* @param {number} a The coefficient of the 3rd order monomial.
* @param {number} b The coefficient of the 2nd order monomial.
* @param {number} c The coefficient of the 1st order monomial.
@@ -154,7 +152,6 @@ function computeRealRoots(a, b, c, d) {
/**
* Provides the real valued roots of the cubic polynomial with the provided coefficients.
- *
* @param {number} a The coefficient of the 3rd order monomial.
* @param {number} b The coefficient of the 2nd order monomial.
* @param {number} c The coefficient of the 1st order monomial.
diff --git a/packages/engine/Source/Core/CullingVolume.js b/packages/engine/Source/Core/CullingVolume.js
index 080d4a0a7688..301b9b9885d1 100644
--- a/packages/engine/Source/Core/CullingVolume.js
+++ b/packages/engine/Source/Core/CullingVolume.js
@@ -8,10 +8,8 @@ import Plane from "./Plane.js";
/**
* The culling volume defined by planes.
- *
* @alias CullingVolume
- * @constructor
- *
+ * @class
* @param {Cartesian4[]} [planes] An array of clipping planes.
*/
function CullingVolume(planes) {
@@ -37,7 +35,6 @@ const scratchPlane = new Plane(new Cartesian3(1.0, 0.0, 0.0), 0.0);
/**
* Constructs a culling volume from a bounding sphere. Creates six planes that create a box containing the sphere.
* The planes are aligned to the x, y, and z axes in world coordinates.
- *
* @param {BoundingSphere} boundingSphere The bounding sphere used to create the culling volume.
* @param {CullingVolume} [result] The object onto which to store the result.
* @returns {CullingVolume} The culling volume created from the bounding sphere.
@@ -102,7 +99,6 @@ CullingVolume.fromBoundingSphere = function (boundingSphere, result) {
/**
* Determines whether a bounding volume intersects the culling volume.
- *
* @param {object} boundingVolume The bounding volume whose intersection with the culling volume is to be tested.
* @returns {Intersect} Intersect.OUTSIDE, Intersect.INTERSECTING, or Intersect.INSIDE.
*/
@@ -131,14 +127,12 @@ CullingVolume.prototype.computeVisibility = function (boundingVolume) {
/**
* Determines whether a bounding volume intersects the culling volume.
- *
* @param {object} boundingVolume The bounding volume whose intersection with the culling volume is to be tested.
* @param {number} parentPlaneMask A bit mask from the boundingVolume's parent's check against the same culling
* volume, such that if (planeMask & (1 << planeIndex) === 0), for k < 31, then
* the parent (and therefore this) volume is completely inside plane[planeIndex]
* and that plane check can be skipped.
* @returns {number} A plane mask as described above (which can be applied to this boundingVolume's children).
- *
* @private
*/
CullingVolume.prototype.computeVisibilityWithPlaneMask = function (
@@ -191,7 +185,6 @@ CullingVolume.prototype.computeVisibilityWithPlaneMask = function (
/**
* For plane masks (as used in {@link CullingVolume#computeVisibilityWithPlaneMask}), this special value
* represents the case where the object bounding volume is entirely outside the culling volume.
- *
* @type {number}
* @private
*/
@@ -200,7 +193,6 @@ CullingVolume.MASK_OUTSIDE = 0xffffffff;
/**
* For plane masks (as used in {@link CullingVolume.prototype.computeVisibilityWithPlaneMask}), this value
* represents the case where the object bounding volume is entirely inside the culling volume.
- *
* @type {number}
* @private
*/
@@ -209,7 +201,6 @@ CullingVolume.MASK_INSIDE = 0x00000000;
/**
* For plane masks (as used in {@link CullingVolume.prototype.computeVisibilityWithPlaneMask}), this value
* represents the case where the object bounding volume (may) intersect all planes of the culling volume.
- *
* @type {number}
* @private
*/
diff --git a/packages/engine/Source/Core/CustomHeightmapTerrainProvider.js b/packages/engine/Source/Core/CustomHeightmapTerrainProvider.js
index 75400c584831..e8ddb1a3f280 100644
--- a/packages/engine/Source/Core/CustomHeightmapTerrainProvider.js
+++ b/packages/engine/Source/Core/CustomHeightmapTerrainProvider.js
@@ -24,10 +24,8 @@ import TerrainProvider from "./TerrainProvider.js";
* There are some limitations such as no water mask, no vertex normals, and no
* availability, so a full-fledged {@link TerrainProvider} subclass is better suited
* for these more sophisticated use cases.
- *
* @alias CustomHeightmapTerrainProvider
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {CustomHeightmapTerrainProvider.GeometryCallback} options.callback The callback function for requesting tile geometry.
* @param {number} options.width The number of columns per heightmap tile.
@@ -39,7 +37,6 @@ import TerrainProvider from "./TerrainProvider.js";
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
* parameter is specified, the WGS84 ellipsoid is used.
* @param {Credit|string} [options.credit] A credit for the data source, which is displayed on the canvas.
- *
* @example
* const viewer = new Cesium.Viewer("cesiumContainer", {
* terrainProvider: new Cesium.CustomHeightmapTerrainProvider({
@@ -50,7 +47,6 @@ import TerrainProvider from "./TerrainProvider.js";
* },
* }),
* });
- *
* @see TerrainProvider
*/
function CustomHeightmapTerrainProvider(options) {
@@ -188,12 +184,10 @@ Object.defineProperties(CustomHeightmapTerrainProvider.prototype, {
/**
* Requests the geometry for a given tile. The result includes terrain
* data and indicates that all child tiles are available.
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
* @param {Request} [request] The request object. Intended for internal use only.
- *
* @returns {Promise|undefined} A promise for the requested geometry. If this method
* returns undefined instead of a promise, it is an indication that too many requests are already
* pending and the request will be retried later.
@@ -229,7 +223,6 @@ CustomHeightmapTerrainProvider.prototype.requestTileGeometry = function (
/**
* Gets the maximum geometric error allowed in a tile at a given level.
- *
* @param {number} level The tile level for which to get the maximum geometric error.
* @returns {number} The maximum geometric error.
*/
@@ -241,7 +234,6 @@ CustomHeightmapTerrainProvider.prototype.getLevelMaximumGeometricError = functio
/**
* Determines whether data for a tile is available to be loaded.
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -257,7 +249,6 @@ CustomHeightmapTerrainProvider.prototype.getTileDataAvailable = function (
/**
* Makes sure we load availability data for a tile
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
diff --git a/packages/engine/Source/Core/CylinderGeometry.js b/packages/engine/Source/Core/CylinderGeometry.js
index a2b620c57a72..aeaeb16b8c58 100644
--- a/packages/engine/Source/Core/CylinderGeometry.js
+++ b/packages/engine/Source/Core/CylinderGeometry.js
@@ -23,21 +23,16 @@ const positionScratch = new Cartesian3();
/**
* A description of a cylinder.
- *
* @alias CylinderGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {number} options.length The length of the cylinder.
* @param {number} options.topRadius The radius of the top of the cylinder.
* @param {number} options.bottomRadius The radius of the bottom of the cylinder.
- * @param {number} [options.slices=128] The number of edges around the perimeter of the cylinder.
- * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- *
- * @exception {DeveloperError} options.slices must be greater than or equal to 3.
- *
+ * @param {number} [options.slices] The number of edges around the perimeter of the cylinder.
+ * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
+ * @throws {DeveloperError} options.slices must be greater than or equal to 3.
* @see CylinderGeometry.createGeometry
- *
* @example
* // create cylinder geometry
* const cylinder = new Cesium.CylinderGeometry({
@@ -98,11 +93,9 @@ CylinderGeometry.packedLength = VertexFormat.packedLength + 5;
/**
* Stores the provided instance into the provided array.
- *
* @param {CylinderGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
CylinderGeometry.pack = function (value, array, startingIndex) {
@@ -141,9 +134,8 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {CylinderGeometry} [result] The object into which to store the result.
* @returns {CylinderGeometry} The modified result parameter or a new CylinderGeometry instance if one was not provided.
*/
@@ -192,7 +184,6 @@ CylinderGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of a cylinder, including its vertices, indices, and a bounding sphere.
- *
* @param {CylinderGeometry} cylinderGeometry A description of the cylinder.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
@@ -460,7 +451,6 @@ let unitCylinderGeometry;
/**
* Returns the geometric representation of a unit cylinder, including its vertices, indices, and a bounding sphere.
* @returns {Geometry} The computed vertices and indices.
- *
* @private
*/
CylinderGeometry.getUnitCylinder = function () {
diff --git a/packages/engine/Source/Core/CylinderGeometryLibrary.js b/packages/engine/Source/Core/CylinderGeometryLibrary.js
index c6784a518572..2684aa44f582 100644
--- a/packages/engine/Source/Core/CylinderGeometryLibrary.js
+++ b/packages/engine/Source/Core/CylinderGeometryLibrary.js
@@ -6,6 +6,11 @@ import CesiumMath from "./Math.js";
const CylinderGeometryLibrary = {};
/**
+ * @param length
+ * @param topRadius
+ * @param bottomRadius
+ * @param slices
+ * @param fill
* @private
*/
CylinderGeometryLibrary.computePositions = function (
diff --git a/packages/engine/Source/Core/CylinderOutlineGeometry.js b/packages/engine/Source/Core/CylinderOutlineGeometry.js
index bd587dcb4084..ed13ebcf451c 100644
--- a/packages/engine/Source/Core/CylinderOutlineGeometry.js
+++ b/packages/engine/Source/Core/CylinderOutlineGeometry.js
@@ -18,22 +18,19 @@ const radiusScratch = new Cartesian2();
/**
* A description of the outline of a cylinder.
- *
* @alias CylinderOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {number} options.length The length of the cylinder.
* @param {number} options.topRadius The radius of the top of the cylinder.
* @param {number} options.bottomRadius The radius of the bottom of the cylinder.
- * @param {number} [options.slices=128] The number of edges around the perimeter of the cylinder.
- * @param {number} [options.numberOfVerticalLines=16] Number of lines to draw between the top and bottom surfaces of the cylinder.
- *
- * @exception {DeveloperError} options.length must be greater than 0.
- * @exception {DeveloperError} options.topRadius must be greater than 0.
- * @exception {DeveloperError} options.bottomRadius must be greater than 0.
- * @exception {DeveloperError} bottomRadius and topRadius cannot both equal 0.
- * @exception {DeveloperError} options.slices must be greater than or equal to 3.
+ * @param {number} [options.slices] The number of edges around the perimeter of the cylinder.
+ * @param {number} [options.numberOfVerticalLines] Number of lines to draw between the top and bottom surfaces of the cylinder.
+ * @throws {DeveloperError} options.length must be greater than 0.
+ * @throws {DeveloperError} options.topRadius must be greater than 0.
+ * @throws {DeveloperError} options.bottomRadius must be greater than 0.
+ * @throws {DeveloperError} bottomRadius and topRadius cannot both equal 0.
+ * @throws {DeveloperError} options.slices must be greater than or equal to 3.
*
* @see CylinderOutlineGeometry.createGeometry
*
@@ -90,11 +87,9 @@ CylinderOutlineGeometry.packedLength = 6;
/**
* Stores the provided instance into the provided array.
- *
* @param {CylinderOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
CylinderOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -126,9 +121,8 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {CylinderOutlineGeometry} [result] The object into which to store the result.
* @returns {CylinderOutlineGeometry} The modified result parameter or a new CylinderOutlineGeometry instance if one was not provided.
*/
@@ -170,7 +164,6 @@ CylinderOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an outline of a cylinder, including its vertices, indices, and a bounding sphere.
- *
* @param {CylinderOutlineGeometry} cylinderGeometry A description of the cylinder outline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/DefaultProxy.js b/packages/engine/Source/Core/DefaultProxy.js
index 8000b305da2a..3fc521247bb7 100644
--- a/packages/engine/Source/Core/DefaultProxy.js
+++ b/packages/engine/Source/Core/DefaultProxy.js
@@ -1,11 +1,9 @@
/**
* A simple proxy that appends the desired resource as the sole query parameter
* to the given proxy URL.
- *
* @alias DefaultProxy
- * @constructor
- * @extends {Proxy}
- *
+ * @class
+ * @augments {Proxy}
* @param {string} proxy The proxy URL that will be used to requests all resources.
*/
function DefaultProxy(proxy) {
@@ -14,7 +12,6 @@ function DefaultProxy(proxy) {
/**
* Get the final URL to use to request a given resource.
- *
* @param {string} resource The resource to request.
* @returns {string} proxied resource
*/
diff --git a/packages/engine/Source/Core/DeveloperError.js b/packages/engine/Source/Core/DeveloperError.js
index a330471eef23..c6978a64bb7c 100644
--- a/packages/engine/Source/Core/DeveloperError.js
+++ b/packages/engine/Source/Core/DeveloperError.js
@@ -9,13 +9,10 @@ import defined from "./defined.js";
* On the other hand, a {@link RuntimeError} indicates an exception that may
* be thrown at runtime, e.g., out of memory, that the calling code should be prepared
* to catch.
- *
* @alias DeveloperError
- * @constructor
- * @extends Error
- *
+ * @class
+ * @augments Error
* @param {string} [message] The error message for this exception.
- *
* @see RuntimeError
*/
function DeveloperError(message) {
diff --git a/packages/engine/Source/Core/DistanceDisplayCondition.js b/packages/engine/Source/Core/DistanceDisplayCondition.js
index e00e08aec341..95b658426199 100644
--- a/packages/engine/Source/Core/DistanceDisplayCondition.js
+++ b/packages/engine/Source/Core/DistanceDisplayCondition.js
@@ -4,13 +4,10 @@ import DeveloperError from "./DeveloperError.js";
/**
* Determines visibility based on the distance to the camera.
- *
* @alias DistanceDisplayCondition
- * @constructor
- *
- * @param {number} [near=0.0] The smallest distance in the interval where the object is visible.
- * @param {number} [far=Number.MAX_VALUE] The largest distance in the interval where the object is visible.
- *
+ * @class
+ * @param {number} [near] The smallest distance in the interval where the object is visible.
+ * @param {number} [far] The largest distance in the interval where the object is visible.
* @example
* // Make a billboard that is only visible when the distance to the camera is between 10 and 20 meters.
* billboard.distanceDisplayCondition = new Cesium.DistanceDisplayCondition(10.0, 20.0);
@@ -62,11 +59,9 @@ DistanceDisplayCondition.packedLength = 2;
/**
* Stores the provided instance into the provided array.
- *
* @param {DistanceDisplayCondition} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
DistanceDisplayCondition.pack = function (value, array, startingIndex) {
@@ -89,9 +84,8 @@ DistanceDisplayCondition.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {DistanceDisplayCondition} [result] The object into which to store the result.
* @returns {DistanceDisplayCondition} The modified result parameter or a new DistanceDisplayCondition instance if one was not provided.
*/
@@ -114,10 +108,9 @@ DistanceDisplayCondition.unpack = function (array, startingIndex, result) {
/**
* Determines if two distance display conditions are equal.
- *
* @param {DistanceDisplayCondition} left A distance display condition.
* @param {DistanceDisplayCondition} right Another distance display condition.
- * @return {boolean} Whether the two distance display conditions are equal.
+ * @returns {boolean} Whether the two distance display conditions are equal.
*/
DistanceDisplayCondition.equals = function (left, right) {
return (
@@ -131,10 +124,9 @@ DistanceDisplayCondition.equals = function (left, right) {
/**
* Duplicates a distance display condition instance.
- *
* @param {DistanceDisplayCondition} [value] The distance display condition to duplicate.
* @param {DistanceDisplayCondition} [result] The result onto which to store the result.
- * @return {DistanceDisplayCondition} The duplicated instance.
+ * @returns {DistanceDisplayCondition} The duplicated instance.
*/
DistanceDisplayCondition.clone = function (value, result) {
if (!defined(value)) {
@@ -152,9 +144,8 @@ DistanceDisplayCondition.clone = function (value, result) {
/**
* Duplicates this instance.
- *
* @param {DistanceDisplayCondition} [result] The result onto which to store the result.
- * @return {DistanceDisplayCondition} The duplicated instance.
+ * @returns {DistanceDisplayCondition} The duplicated instance.
*/
DistanceDisplayCondition.prototype.clone = function (result) {
return DistanceDisplayCondition.clone(this, result);
@@ -162,9 +153,8 @@ DistanceDisplayCondition.prototype.clone = function (result) {
/**
* Determines if this distance display condition is equal to another.
- *
* @param {DistanceDisplayCondition} other Another distance display condition.
- * @return {boolean} Whether this distance display condition is equal to the other.
+ * @returns {boolean} Whether this distance display condition is equal to the other.
*/
DistanceDisplayCondition.prototype.equals = function (other) {
return DistanceDisplayCondition.equals(this, other);
diff --git a/packages/engine/Source/Core/DistanceDisplayConditionGeometryInstanceAttribute.js b/packages/engine/Source/Core/DistanceDisplayConditionGeometryInstanceAttribute.js
index 6bf81bd70db0..13e90c7d85d5 100644
--- a/packages/engine/Source/Core/DistanceDisplayConditionGeometryInstanceAttribute.js
+++ b/packages/engine/Source/Core/DistanceDisplayConditionGeometryInstanceAttribute.js
@@ -5,15 +5,11 @@ import DeveloperError from "./DeveloperError.js";
/**
* Value and type information for per-instance geometry attribute that determines if the geometry instance has a distance display condition.
- *
* @alias DistanceDisplayConditionGeometryInstanceAttribute
- * @constructor
- *
- * @param {number} [near=0.0] The near distance.
- * @param {number} [far=Number.MAX_VALUE] The far distance.
- *
- * @exception {DeveloperError} far must be greater than near.
- *
+ * @class
+ * @param {number} [near] The near distance.
+ * @param {number} [far] The far distance.
+ * @throws {DeveloperError} far must be greater than near.
* @example
* const instance = new Cesium.GeometryInstance({
* geometry : new Cesium.BoxGeometry({
@@ -28,7 +24,6 @@ import DeveloperError from "./DeveloperError.js";
* distanceDisplayCondition : new Cesium.DistanceDisplayConditionGeometryInstanceAttribute(100.0, 10000.0)
* }
* });
- *
* @see GeometryInstance
* @see GeometryInstanceAttribute
*/
@@ -46,9 +41,7 @@ function DistanceDisplayConditionGeometryInstanceAttribute(near, far) {
/**
* The values for the attributes stored in a typed array.
- *
* @type {Float32Array}
- *
* @default [0.0, 0.0, Number.MAX_VALUE]
*/
this.value = new Float32Array([near, far]);
@@ -60,12 +53,9 @@ Object.defineProperties(
/**
* The datatype of each component in the attribute, e.g., individual elements in
* {@link DistanceDisplayConditionGeometryInstanceAttribute#value}.
- *
* @memberof DistanceDisplayConditionGeometryInstanceAttribute.prototype
- *
* @type {ComponentDatatype}
* @readonly
- *
* @default {@link ComponentDatatype.FLOAT}
*/
componentDatatype: {
@@ -76,12 +66,9 @@ Object.defineProperties(
/**
* The number of components in the attributes, i.e., {@link DistanceDisplayConditionGeometryInstanceAttribute#value}.
- *
* @memberof DistanceDisplayConditionGeometryInstanceAttribute.prototype
- *
* @type {number}
* @readonly
- *
* @default 3
*/
componentsPerAttribute: {
@@ -94,12 +81,9 @@ Object.defineProperties(
* When true
and componentDatatype
is an integer format,
* indicate that the components should be mapped to the range [0, 1] (unsigned)
* or [-1, 1] (signed) when they are accessed as floating-point for rendering.
- *
* @memberof DistanceDisplayConditionGeometryInstanceAttribute.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
normalize: {
@@ -112,12 +96,9 @@ Object.defineProperties(
/**
* Creates a new {@link DistanceDisplayConditionGeometryInstanceAttribute} instance given the provided an enabled flag and {@link DistanceDisplayCondition}.
- *
* @param {DistanceDisplayCondition} distanceDisplayCondition The distance display condition.
* @returns {DistanceDisplayConditionGeometryInstanceAttribute} The new {@link DistanceDisplayConditionGeometryInstanceAttribute} instance.
- *
- * @exception {DeveloperError} distanceDisplayCondition.far must be greater than distanceDisplayCondition.near
- *
+ * @throws {DeveloperError} distanceDisplayCondition.far must be greater than distanceDisplayCondition.near
* @example
* const distanceDisplayCondition = new Cesium.DistanceDisplayCondition(100.0, 10000.0);
* const instance = new Cesium.GeometryInstance({
@@ -149,11 +130,9 @@ DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition =
/**
* Converts a distance display condition to a typed array that can be used to assign a distance display condition attribute.
- *
* @param {DistanceDisplayCondition} distanceDisplayCondition The distance display condition value.
* @param {Float32Array} [result] The array to store the result in, if undefined a new instance will be created.
* @returns {Float32Array} The modified result parameter or a new instance if result was undefined.
- *
* @example
* const attributes = primitive.getGeometryInstanceAttributes('an id');
* attributes.distanceDisplayCondition = Cesium.DistanceDisplayConditionGeometryInstanceAttribute.toValue(distanceDisplayCondition, attributes.distanceDisplayCondition);
diff --git a/packages/engine/Source/Core/DoubleEndedPriorityQueue.js b/packages/engine/Source/Core/DoubleEndedPriorityQueue.js
index e0abcf5f6e0f..adcaee3713e2 100644
--- a/packages/engine/Source/Core/DoubleEndedPriorityQueue.js
+++ b/packages/engine/Source/Core/DoubleEndedPriorityQueue.js
@@ -5,11 +5,9 @@ import defined from "./defined.js";
/**
* Array-backed min-max heap implementation of a double-ended priority queue.
* This data structure allows for efficient removal of minimum and maximum elements.
- *
* @alias DoubleEndedPriorityQueue
- * @constructor
+ * @class
* @private
- *
* @param {object} options Object with the following properties:
* @param {DoubleEndedPriorityQueue.ComparatorCallback} options.comparator The comparator to use for the queue. If comparator(a, b) is less than 0, a is lower priority than b.
* @param {number} [options.maximumLength] The maximum length of the queue. If an element is inserted when the queue is at full capacity, the minimum element is removed. By default, the size of the queue is unlimited.
@@ -38,9 +36,7 @@ function DoubleEndedPriorityQueue(options) {
Object.defineProperties(DoubleEndedPriorityQueue.prototype, {
/**
* Gets the number of elements in the queue.
- *
* @memberof DoubleEndedPriorityQueue.prototype
- *
* @type {number}
* @readonly
*/
@@ -55,9 +51,7 @@ Object.defineProperties(DoubleEndedPriorityQueue.prototype, {
* If set to a smaller value than the current length of the queue, the lowest priority elements are removed.
* If an element is inserted when the queue is at full capacity, the minimum element is removed.
* If set to undefined, the size of the queue is unlimited.
- *
* @memberof DoubleEndedPriorityQueue.prototype
- *
* @type {number}
* @readonly
*/
@@ -85,9 +79,7 @@ Object.defineProperties(DoubleEndedPriorityQueue.prototype, {
/**
* Gets the internal array.
- *
* @memberof DoubleEndedPriorityQueue.prototype
- *
* @type {Array}
* @readonly
*/
@@ -100,9 +92,7 @@ Object.defineProperties(DoubleEndedPriorityQueue.prototype, {
/**
* The comparator used by the queue.
* If comparator(a, b) is less than 0, a is lower priority than b.
- *
* @memberof DoubleEndedPriorityQueue.prototype
- *
* @type {DoubleEndedPriorityQueue.ComparatorCallback}
* @readonly
*/
@@ -115,7 +105,6 @@ Object.defineProperties(DoubleEndedPriorityQueue.prototype, {
/**
* Clones the double ended priority queue.
- *
* @returns {DoubleEndedPriorityQueue} The cloned double ended priority queue.
*/
DoubleEndedPriorityQueue.prototype.clone = function () {
@@ -172,7 +161,6 @@ DoubleEndedPriorityQueue.prototype.resort = function () {
* Inserts an element into the queue.
* If the queue is at full capacity, the minimum element is removed.
* The new element is returned (and not added) if it is less than or equal priority to the minimum element.
- *
* @param {*} element
* @returns {*|undefined} The minimum element if the queue is at full capacity. Returns undefined if there is no maximum length.
*/
@@ -207,7 +195,6 @@ DoubleEndedPriorityQueue.prototype.insert = function (element) {
/**
* Removes the minimum element from the queue and returns it.
* If the queue is empty, the return value is undefined.
- *
* @returns {*|undefined} The minimum element, or undefined if the queue is empty.
*/
DoubleEndedPriorityQueue.prototype.removeMinimum = function () {
@@ -235,7 +222,6 @@ DoubleEndedPriorityQueue.prototype.removeMinimum = function () {
/**
* Removes the maximum element from the queue and returns it.
* If the queue is empty, the return value is undefined.
- *
* @returns {*|undefined} The maximum element, or undefined if the queue is empty.
*/
DoubleEndedPriorityQueue.prototype.removeMaximum = function () {
@@ -272,7 +258,6 @@ DoubleEndedPriorityQueue.prototype.removeMaximum = function () {
/**
* Gets the minimum element in the queue.
* If the queue is empty, the result is undefined.
- *
* @returns {*|undefined} element
*/
@@ -289,7 +274,6 @@ DoubleEndedPriorityQueue.prototype.getMinimum = function () {
/**
* Gets the maximum element in the queue.
* If the queue is empty, the result is undefined.
- *
* @returns {*|undefined} element
*/
DoubleEndedPriorityQueue.prototype.getMaximum = function () {
diff --git a/packages/engine/Source/Core/DoublyLinkedList.js b/packages/engine/Source/Core/DoublyLinkedList.js
index a8f17a7b0e93..af7ebfc093bb 100644
--- a/packages/engine/Source/Core/DoublyLinkedList.js
+++ b/packages/engine/Source/Core/DoublyLinkedList.js
@@ -18,6 +18,9 @@ Object.defineProperties(DoublyLinkedList.prototype, {
});
/**
+ * @param item
+ * @param previous
+ * @param next
* @private
*/
function DoublyLinkedListNode(item, previous, next) {
@@ -29,7 +32,7 @@ function DoublyLinkedListNode(item, previous, next) {
/**
* Adds the item to the end of the list
* @param {*} [item]
- * @return {DoublyLinkedListNode}
+ * @returns {DoublyLinkedListNode}
*/
DoublyLinkedList.prototype.add = function (item) {
const node = new DoublyLinkedListNode(item, this.tail, undefined);
diff --git a/packages/engine/Source/Core/EarthOrientationParameters.js b/packages/engine/Source/Core/EarthOrientationParameters.js
index 514d9284a584..3c1ddb5ed2b3 100644
--- a/packages/engine/Source/Core/EarthOrientationParameters.js
+++ b/packages/engine/Source/Core/EarthOrientationParameters.js
@@ -16,20 +16,17 @@ import TimeStandard from "./TimeStandard.js";
* the International Celestial Reference Frame (ICRF) to the International Terrestrial
* Reference Frame (ITRF).
* This object is normally not instantiated directly, use {@link EarthOrientationParameters.fromUrl}.
- *
* @alias EarthOrientationParameters
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {object} [options.data] The actual EOP data. If neither this
* parameter nor options.data is specified, all EOP values are assumed
* to be 0.0.
- * @param {boolean} [options.addNewLeapSeconds=true] True if leap seconds that
+ * @param {boolean} [options.addNewLeapSeconds] True if leap seconds that
* are specified in the EOP data but not in {@link JulianDate.leapSeconds}
* should be added to {@link JulianDate.leapSeconds}. False if
* new leap seconds should be handled correctly in the context
* of the EOP data but otherwise ignored.
- *
* @private
*/
function EarthOrientationParameters(options) {
@@ -80,12 +77,11 @@ function EarthOrientationParameters(options) {
* to be 0.0. If options.data is specified, this parameter is
* ignored.
* @param {object} [options] Object with the following properties:
- * @param {boolean} [options.addNewLeapSeconds=true] True if leap seconds that
+ * @param {boolean} [options.addNewLeapSeconds] True if leap seconds that
* are specified in the EOP data but not in {@link JulianDate.leapSeconds}
* should be added to {@link JulianDate.leapSeconds}. False if
* new leap seconds should be handled correctly in the context
* of the EOP data but otherwise ignored.
- *
* @example
* // An example EOP data file, EOP.json:
* {
@@ -96,7 +92,6 @@ function EarthOrientationParameters(options) {
* "2011-07-03T00:00:00Z",55745.0,2.262286080161428e-7,2.1191157519929706e-6,-0.2905572,1.9e-6,-3.490658503988659e-10,6.981317007977318e-10,34.0
* ]
* }
- *
* @example
* // Loading the EOP data
* const eop = await Cesium.EarthOrientationParameters.fromUrl('Data/EOP.json');
@@ -148,16 +143,13 @@ EarthOrientationParameters.NONE = Object.freeze({
/**
* Computes the Earth Orientation Parameters (EOP) for a given date by interpolating.
* If the EOP data has not yet been download, this method returns undefined.
- *
* @param {JulianDate} date The date for each to evaluate the EOP.
* @param {EarthOrientationParametersSample} [result] The instance to which to copy the result.
* If this parameter is undefined, a new instance is created and returned.
* @returns {EarthOrientationParametersSample} The EOP evaluated at the given date, or
* undefined if the data necessary to evaluate EOP at the date has not yet been
* downloaded.
- *
- * @exception {RuntimeError} The loaded EOP data has an error and cannot be used.
- *
+ * @throws {RuntimeError} The loaded EOP data has an error and cannot be used.
* @see EarthOrientationParameters#fromUrl
*/
EarthOrientationParameters.prototype.compute = function (date, result) {
diff --git a/packages/engine/Source/Core/EarthOrientationParametersSample.js b/packages/engine/Source/Core/EarthOrientationParametersSample.js
index 336e564da4b8..37c41a992617 100644
--- a/packages/engine/Source/Core/EarthOrientationParametersSample.js
+++ b/packages/engine/Source/Core/EarthOrientationParametersSample.js
@@ -1,15 +1,12 @@
/**
* A set of Earth Orientation Parameters (EOP) sampled at a time.
- *
* @alias EarthOrientationParametersSample
- * @constructor
- *
+ * @class
* @param {number} xPoleWander The pole wander about the X axis, in radians.
* @param {number} yPoleWander The pole wander about the Y axis, in radians.
* @param {number} xPoleOffset The offset to the Celestial Intermediate Pole (CIP) about the X axis, in radians.
* @param {number} yPoleOffset The offset to the Celestial Intermediate Pole (CIP) about the Y axis, in radians.
* @param {number} ut1MinusUtc The difference in time standards, UT1 - UTC, in seconds.
- *
* @private
*/
function EarthOrientationParametersSample(
diff --git a/packages/engine/Source/Core/EasingFunction.js b/packages/engine/Source/Core/EasingFunction.js
index 0b8cc00c2e86..cf93b832ce27 100644
--- a/packages/engine/Source/Core/EasingFunction.js
+++ b/packages/engine/Source/Core/EasingFunction.js
@@ -4,13 +4,11 @@ import { Easing } from "@tweenjs/tween.js";
* Easing functions for use with TweenCollection. These function are from
* {@link https://github.com/sole/tween.js/|Tween.js} and Robert Penner. See the
* {@link http://sole.github.io/tween.js/examples/03_graphs.html|Tween.js graphs for each function}.
- *
* @namespace
*/
const EasingFunction = {
/**
* Linear easing.
- *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -18,21 +16,18 @@ const EasingFunction = {
/**
* Quadratic in.
- *
* @type {EasingFunction.Callback}
* @constant
*/
QUADRATIC_IN: Easing.Quadratic.In,
/**
* Quadratic out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
QUADRATIC_OUT: Easing.Quadratic.Out,
/**
* Quadratic in then out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -40,21 +35,18 @@ const EasingFunction = {
/**
* Cubic in.
- *
* @type {EasingFunction.Callback}
* @constant
*/
CUBIC_IN: Easing.Cubic.In,
/**
* Cubic out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
CUBIC_OUT: Easing.Cubic.Out,
/**
* Cubic in then out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -62,21 +54,18 @@ const EasingFunction = {
/**
* Quartic in.
- *
* @type {EasingFunction.Callback}
* @constant
*/
QUARTIC_IN: Easing.Quartic.In,
/**
* Quartic out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
QUARTIC_OUT: Easing.Quartic.Out,
/**
* Quartic in then out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -84,21 +73,18 @@ const EasingFunction = {
/**
* Quintic in.
- *
* @type {EasingFunction.Callback}
* @constant
*/
QUINTIC_IN: Easing.Quintic.In,
/**
* Quintic out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
QUINTIC_OUT: Easing.Quintic.Out,
/**
* Quintic in then out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -106,21 +92,18 @@ const EasingFunction = {
/**
* Sinusoidal in.
- *
* @type {EasingFunction.Callback}
* @constant
*/
SINUSOIDAL_IN: Easing.Sinusoidal.In,
/**
* Sinusoidal out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
SINUSOIDAL_OUT: Easing.Sinusoidal.Out,
/**
* Sinusoidal in then out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -128,21 +111,18 @@ const EasingFunction = {
/**
* Exponential in.
- *
* @type {EasingFunction.Callback}
* @constant
*/
EXPONENTIAL_IN: Easing.Exponential.In,
/**
* Exponential out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
EXPONENTIAL_OUT: Easing.Exponential.Out,
/**
* Exponential in then out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -150,21 +130,18 @@ const EasingFunction = {
/**
* Circular in.
- *
* @type {EasingFunction.Callback}
* @constant
*/
CIRCULAR_IN: Easing.Circular.In,
/**
* Circular out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
CIRCULAR_OUT: Easing.Circular.Out,
/**
* Circular in then out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -172,21 +149,18 @@ const EasingFunction = {
/**
* Elastic in.
- *
* @type {EasingFunction.Callback}
* @constant
*/
ELASTIC_IN: Easing.Elastic.In,
/**
* Elastic out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
ELASTIC_OUT: Easing.Elastic.Out,
/**
* Elastic in then out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -194,21 +168,18 @@ const EasingFunction = {
/**
* Back in.
- *
* @type {EasingFunction.Callback}
* @constant
*/
BACK_IN: Easing.Back.In,
/**
* Back out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
BACK_OUT: Easing.Back.Out,
/**
* Back in then out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -216,21 +187,18 @@ const EasingFunction = {
/**
* Bounce in.
- *
* @type {EasingFunction.Callback}
* @constant
*/
BOUNCE_IN: Easing.Bounce.In,
/**
* Bounce out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
BOUNCE_OUT: Easing.Bounce.Out,
/**
* Bounce in then out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -242,12 +210,10 @@ const EasingFunction = {
* @callback EasingFunction.Callback
* @param {number} time The time in the range [0, 1]
.
* @returns {number} The value of the function at the given time.
- *
* @example
* function quadraticIn(time) {
* return time * time;
* }
- *
* @example
* function quadraticOut(time) {
* return time * (2.0 - time);
diff --git a/packages/engine/Source/Core/EllipseGeometry.js b/packages/engine/Source/Core/EllipseGeometry.js
index 483ec135780b..e5b60828be6b 100644
--- a/packages/engine/Source/Core/EllipseGeometry.js
+++ b/packages/engine/Source/Core/EllipseGeometry.js
@@ -884,23 +884,20 @@ function computeRectangle(
/**
* A description of an ellipse on an ellipsoid. Ellipse geometry can be rendered with both {@link Primitive} and {@link GroundPrimitive}.
- *
* @alias EllipseGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.center The ellipse's center point in the fixed frame.
* @param {number} options.semiMajorAxis The length of the ellipse's semi-major axis in meters.
* @param {number} options.semiMinorAxis The length of the ellipse's semi-minor axis in meters.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid the ellipse will be on.
- * @param {number} [options.height=0.0] The distance in meters between the ellipse and the ellipsoid surface.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid the ellipse will be on.
+ * @param {number} [options.height] The distance in meters between the ellipse and the ellipsoid surface.
* @param {number} [options.extrudedHeight] The distance in meters between the ellipse's extruded face and the ellipsoid surface.
- * @param {number} [options.rotation=0.0] The angle of rotation counter-clockwise from north.
- * @param {number} [options.stRotation=0.0] The rotation of the texture coordinates counter-clockwise from north.
- * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The angular distance between points on the ellipse in radians.
- * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- *
- * @exception {DeveloperError} semiMajorAxis and semiMinorAxis must be greater than zero.
+ * @param {number} [options.rotation] The angle of rotation counter-clockwise from north.
+ * @param {number} [options.stRotation] The rotation of the texture coordinates counter-clockwise from north.
+ * @param {number} [options.granularity] The angular distance between points on the ellipse in radians.
+ * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
+ * @throws {DeveloperError} semiMajorAxis and semiMinorAxis must be greater than zero.
* @exception {DeveloperError} semiMajorAxis must be greater than or equal to the semiMinorAxis.
* @exception {DeveloperError} granularity must be greater than zero.
*
@@ -977,11 +974,9 @@ EllipseGeometry.packedLength =
/**
* Stores the provided instance into the provided array.
- *
* @param {EllipseGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
EllipseGeometry.pack = function (value, array, startingIndex) {
@@ -1034,9 +1029,8 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {EllipseGeometry} [result] The object into which to store the result.
* @returns {EllipseGeometry} The modified result parameter or a new EllipseGeometry instance if one was not provided.
*/
@@ -1104,16 +1098,14 @@ EllipseGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the bounding rectangle based on the provided options
- *
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.center The ellipse's center point in the fixed frame.
* @param {number} options.semiMajorAxis The length of the ellipse's semi-major axis in meters.
* @param {number} options.semiMinorAxis The length of the ellipse's semi-minor axis in meters.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid the ellipse will be on.
- * @param {number} [options.rotation=0.0] The angle of rotation counter-clockwise from north.
- * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The angular distance between points on the ellipse in radians.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid the ellipse will be on.
+ * @param {number} [options.rotation] The angle of rotation counter-clockwise from north.
+ * @param {number} [options.granularity] The angular distance between points on the ellipse in radians.
* @param {Rectangle} [result] An object in which to store the result
- *
* @returns {Rectangle} The result rectangle
*/
EllipseGeometry.computeRectangle = function (options, result) {
@@ -1156,7 +1148,6 @@ EllipseGeometry.computeRectangle = function (options, result) {
/**
* Computes the geometric representation of a ellipse on an ellipsoid, including its vertices, indices, and a bounding sphere.
- *
* @param {EllipseGeometry} ellipseGeometry A description of the ellipse.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
@@ -1226,6 +1217,9 @@ EllipseGeometry.createGeometry = function (ellipseGeometry) {
};
/**
+ * @param ellipseGeometry
+ * @param minHeightFunc
+ * @param maxHeightFunc
* @private
*/
EllipseGeometry.createShadowVolume = function (
diff --git a/packages/engine/Source/Core/EllipseGeometryLibrary.js b/packages/engine/Source/Core/EllipseGeometryLibrary.js
index acf09c2a2f33..b0ea2b26247d 100644
--- a/packages/engine/Source/Core/EllipseGeometryLibrary.js
+++ b/packages/engine/Source/Core/EllipseGeometryLibrary.js
@@ -54,6 +54,9 @@ const scratchCartesian3 = new Cartesian3();
const scratchNormal = new Cartesian3();
/**
* Returns the positions raised to the given heights
+ * @param positions
+ * @param options
+ * @param extrude
* @private
*/
EllipseGeometryLibrary.raisePositionsToHeight = function (
@@ -108,6 +111,9 @@ const eastVecScratch = new Cartesian3();
const northVecScratch = new Cartesian3();
/**
* Returns an array of positions that make up the ellipse.
+ * @param options
+ * @param addFillPositions
+ * @param addEdgePositions
* @private
*/
EllipseGeometryLibrary.computeEllipsePositions = function (
diff --git a/packages/engine/Source/Core/EllipseOutlineGeometry.js b/packages/engine/Source/Core/EllipseOutlineGeometry.js
index 3593c2db0b9c..b711e6c2ddd2 100644
--- a/packages/engine/Source/Core/EllipseOutlineGeometry.js
+++ b/packages/engine/Source/Core/EllipseOutlineGeometry.js
@@ -180,23 +180,20 @@ function computeExtrudedEllipse(options) {
/**
* A description of the outline of an ellipse on an ellipsoid.
- *
* @alias EllipseOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.center The ellipse's center point in the fixed frame.
* @param {number} options.semiMajorAxis The length of the ellipse's semi-major axis in meters.
* @param {number} options.semiMinorAxis The length of the ellipse's semi-minor axis in meters.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid the ellipse will be on.
- * @param {number} [options.height=0.0] The distance in meters between the ellipse and the ellipsoid surface.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid the ellipse will be on.
+ * @param {number} [options.height] The distance in meters between the ellipse and the ellipsoid surface.
* @param {number} [options.extrudedHeight] The distance in meters between the ellipse's extruded face and the ellipsoid surface.
- * @param {number} [options.rotation=0.0] The angle from north (counter-clockwise) in radians.
- * @param {number} [options.granularity=0.02] The angular distance between points on the ellipse in radians.
- * @param {number} [options.numberOfVerticalLines=16] Number of lines to draw between the top and bottom surface of an extruded ellipse.
- *
- * @exception {DeveloperError} semiMajorAxis and semiMinorAxis must be greater than zero.
- * @exception {DeveloperError} semiMajorAxis must be greater than or equal to the semiMinorAxis.
+ * @param {number} [options.rotation] The angle from north (counter-clockwise) in radians.
+ * @param {number} [options.granularity] The angular distance between points on the ellipse in radians.
+ * @param {number} [options.numberOfVerticalLines] Number of lines to draw between the top and bottom surface of an extruded ellipse.
+ * @throws {DeveloperError} semiMajorAxis and semiMinorAxis must be greater than zero.
+ * @throws {DeveloperError} semiMajorAxis must be greater than or equal to the semiMinorAxis.
* @exception {DeveloperError} granularity must be greater than zero.
*
* @see EllipseOutlineGeometry.createGeometry
@@ -270,11 +267,9 @@ EllipseOutlineGeometry.packedLength =
/**
* Stores the provided instance into the provided array.
- *
* @param {EllipseOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
EllipseOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -324,9 +319,8 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {EllipseOutlineGeometry} [result] The object into which to store the result.
* @returns {EllipseOutlineGeometry} The modified result parameter or a new EllipseOutlineGeometry instance if one was not provided.
*/
@@ -385,7 +379,6 @@ EllipseOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an outline of an ellipse on an ellipsoid, including its vertices, indices, and a bounding sphere.
- *
* @param {EllipseOutlineGeometry} ellipseGeometry A description of the ellipse.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/Ellipsoid.js b/packages/engine/Source/Core/Ellipsoid.js
index 22cdecd06d79..d07c10c6e013 100644
--- a/packages/engine/Source/Core/Ellipsoid.js
+++ b/packages/engine/Source/Core/Ellipsoid.js
@@ -61,14 +61,11 @@ function initialize(ellipsoid, x, y, z) {
* Rather than constructing this object directly, one of the provided
* constants is normally used.
* @alias Ellipsoid
- * @constructor
- *
- * @param {number} [x=0] The radius in the x direction.
- * @param {number} [y=0] The radius in the y direction.
- * @param {number} [z=0] The radius in the z direction.
- *
- * @exception {DeveloperError} All radii components must be greater than or equal to zero.
- *
+ * @class
+ * @param {number} [x] The radius in the x direction.
+ * @param {number} [y] The radius in the y direction.
+ * @param {number} [z] The radius in the z direction.
+ * @throws {DeveloperError} All radii components must be greater than or equal to zero.
* @see Ellipsoid.fromCartesian3
* @see Ellipsoid.WGS84
* @see Ellipsoid.UNIT_SPHERE
@@ -169,7 +166,6 @@ Object.defineProperties(Ellipsoid.prototype, {
/**
* Duplicates an Ellipsoid instance.
- *
* @param {Ellipsoid} ellipsoid The ellipsoid to duplicate.
* @param {Ellipsoid} [result] The object onto which to store the result, or undefined if a new
* instance should be created.
@@ -199,14 +195,11 @@ Ellipsoid.clone = function (ellipsoid, result) {
/**
* Computes an Ellipsoid from a Cartesian specifying the radii in x, y, and z directions.
- *
- * @param {Cartesian3} [cartesian=Cartesian3.ZERO] The ellipsoid's radius in the x, y, and z directions.
+ * @param {Cartesian3} [cartesian] The ellipsoid's radius in the x, y, and z directions.
* @param {Ellipsoid} [result] The object onto which to store the result, or undefined if a new
* instance should be created.
* @returns {Ellipsoid} A new Ellipsoid instance.
- *
- * @exception {DeveloperError} All radii components must be greater than or equal to zero.
- *
+ * @throws {DeveloperError} All radii components must be greater than or equal to zero.
* @see Ellipsoid.WGS84
* @see Ellipsoid.UNIT_SPHERE
*/
@@ -225,7 +218,6 @@ Ellipsoid.fromCartesian3 = function (cartesian, result) {
/**
* An Ellipsoid instance initialized to the WGS84 standard.
- *
* @type {Ellipsoid}
* @constant
*/
@@ -235,7 +227,6 @@ Ellipsoid.WGS84 = Object.freeze(
/**
* An Ellipsoid instance initialized to radii of (1.0, 1.0, 1.0).
- *
* @type {Ellipsoid}
* @constant
*/
@@ -243,7 +234,6 @@ Ellipsoid.UNIT_SPHERE = Object.freeze(new Ellipsoid(1.0, 1.0, 1.0));
/**
* An Ellipsoid instance initialized to a sphere with the lunar radius.
- *
* @type {Ellipsoid}
* @constant
*/
@@ -257,7 +247,6 @@ Ellipsoid.MOON = Object.freeze(
/**
* Duplicates an Ellipsoid instance.
- *
* @param {Ellipsoid} [result] The object onto which to store the result, or undefined if a new
* instance should be created.
* @returns {Ellipsoid} The cloned Ellipsoid.
@@ -274,11 +263,9 @@ Ellipsoid.packedLength = Cartesian3.packedLength;
/**
* Stores the provided instance into the provided array.
- *
* @param {Ellipsoid} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
Ellipsoid.pack = function (value, array, startingIndex) {
@@ -296,9 +283,8 @@ Ellipsoid.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {Ellipsoid} [result] The object into which to store the result.
* @returns {Ellipsoid} The modified result parameter or a new Ellipsoid instance if one was not provided.
*/
@@ -316,7 +302,6 @@ Ellipsoid.unpack = function (array, startingIndex, result) {
/**
* Computes the unit vector directed from the center of this ellipsoid toward the provided Cartesian position.
* @function
- *
* @param {Cartesian3} cartesian The Cartesian for which to to determine the geocentric normal.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.
@@ -325,7 +310,6 @@ Ellipsoid.prototype.geocentricSurfaceNormal = Cartesian3.normalize;
/**
* Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.
- *
* @param {Cartographic} cartographic The cartographic position for which to to determine the geodetic normal.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.
@@ -357,7 +341,6 @@ Ellipsoid.prototype.geodeticSurfaceNormalCartographic = function (
/**
* Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.
- *
* @param {Cartesian3} cartesian The Cartesian position for which to to determine the surface normal.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided, or undefined if a normal cannot be found.
@@ -390,11 +373,9 @@ const cartographicToCartesianK = new Cartesian3();
/**
* Converts the provided cartographic to Cartesian representation.
- *
* @param {Cartographic} cartographic The cartographic position.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.
- *
* @example
* //Create a Cartographic and determine it's Cartesian representation on a WGS84 ellipsoid.
* const position = new Cesium.Cartographic(Cesium.Math.toRadians(21), Cesium.Math.toRadians(78), 5000);
@@ -418,11 +399,9 @@ Ellipsoid.prototype.cartographicToCartesian = function (cartographic, result) {
/**
* Converts the provided array of cartographics to an array of Cartesians.
- *
* @param {Cartographic[]} cartographics An array of cartographic positions.
* @param {Cartesian3[]} [result] The object onto which to store the result.
* @returns {Cartesian3[]} The modified result parameter or a new Array instance if none was provided.
- *
* @example
* //Convert an array of Cartographics and determine their Cartesian representation on a WGS84 ellipsoid.
* const positions = [new Cesium.Cartographic(Cesium.Math.toRadians(21), Cesium.Math.toRadians(78), 0),
@@ -457,11 +436,9 @@ const cartesianToCartographicH = new Cartesian3();
/**
* Converts the provided cartesian to cartographic representation.
* The cartesian is undefined at the center of the ellipsoid.
- *
* @param {Cartesian3} cartesian The Cartesian position to convert to cartographic representation.
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.
- *
* @example
* //Create a Cartesian and determine it's Cartographic representation on a WGS84 ellipsoid.
* const position = new Cesium.Cartesian3(17832.12, 83234.52, 952313.73);
@@ -494,11 +471,9 @@ Ellipsoid.prototype.cartesianToCartographic = function (cartesian, result) {
/**
* Converts the provided array of cartesians to an array of cartographics.
- *
* @param {Cartesian3[]} cartesians An array of Cartesian positions.
* @param {Cartographic[]} [result] The object onto which to store the result.
* @returns {Cartographic[]} The modified result parameter or a new Array instance if none was provided.
- *
* @example
* //Create an array of Cartesians and determine their Cartographic representation on a WGS84 ellipsoid.
* const positions = [new Cesium.Cartesian3(17832.12, 83234.52, 952313.73),
@@ -530,7 +505,6 @@ Ellipsoid.prototype.cartesianArrayToCartographicArray = function (
* Scales the provided Cartesian position along the geodetic surface normal
* so that it is on the surface of this ellipsoid. If the position is
* at the center of the ellipsoid, this function returns undefined.
- *
* @param {Cartesian3} cartesian The Cartesian position to scale.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter, a new Cartesian3 instance if none was provided, or undefined if the position is at the center.
@@ -548,7 +522,6 @@ Ellipsoid.prototype.scaleToGeodeticSurface = function (cartesian, result) {
/**
* Scales the provided Cartesian position along the geocentric surface normal
* so that it is on the surface of this ellipsoid.
- *
* @param {Cartesian3} cartesian The Cartesian position to scale.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.
@@ -581,7 +554,6 @@ Ellipsoid.prototype.scaleToGeocentricSurface = function (cartesian, result) {
/**
* Transforms a Cartesian X, Y, Z position to the ellipsoid-scaled space by multiplying
* its components by the result of {@link Ellipsoid#oneOverRadii}.
- *
* @param {Cartesian3} position The position to transform.
* @param {Cartesian3} [result] The position to which to copy the result, or undefined to create and
* return a new instance.
@@ -602,7 +574,6 @@ Ellipsoid.prototype.transformPositionToScaledSpace = function (
/**
* Transforms a Cartesian X, Y, Z position from the ellipsoid-scaled space by multiplying
* its components by the result of {@link Ellipsoid#radii}.
- *
* @param {Cartesian3} position The position to transform.
* @param {Cartesian3} [result] The position to which to copy the result, or undefined to create and
* return a new instance.
@@ -623,7 +594,6 @@ Ellipsoid.prototype.transformPositionFromScaledSpace = function (
/**
* Compares this Ellipsoid against the provided Ellipsoid componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {Ellipsoid} [right] The other Ellipsoid.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -636,7 +606,6 @@ Ellipsoid.prototype.equals = function (right) {
/**
* Creates a string representing this Ellipsoid in the format '(radii.x, radii.y, radii.z)'.
- *
* @returns {string} A string representing this ellipsoid in the format '(radii.x, radii.y, radii.z)'.
*/
Ellipsoid.prototype.toString = function () {
@@ -645,19 +614,17 @@ Ellipsoid.prototype.toString = function () {
/**
* Computes a point which is the intersection of the surface normal with the z-axis.
- *
* @param {Cartesian3} position the position. must be on the surface of the ellipsoid.
- * @param {number} [buffer = 0.0] A buffer to subtract from the ellipsoid size when checking if the point is inside the ellipsoid.
+ * @param {number} [buffer] A buffer to subtract from the ellipsoid size when checking if the point is inside the ellipsoid.
* In earth case, with common earth datums, there is no need for this buffer since the intersection point is always (relatively) very close to the center.
* In WGS84 datum, intersection point is at max z = +-42841.31151331382 (0.673% of z-axis).
* Intersection point could be outside the ellipsoid if the ratio of MajorAxis / AxisOfRotation is bigger than the square root of 2
* @param {Cartesian3} [result] The cartesian to which to copy the result, or undefined to create and
* return a new instance.
* @returns {Cartesian3 | undefined} the intersection point if it's inside the ellipsoid, undefined otherwise
- *
- * @exception {DeveloperError} position is required.
- * @exception {DeveloperError} Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y).
- * @exception {DeveloperError} Ellipsoid.radii.z must be greater than 0.
+ * @throws {DeveloperError} position is required.
+ * @throws {DeveloperError} Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y).
+ * @throws {DeveloperError} Ellipsoid.radii.z must be greater than 0.
*/
Ellipsoid.prototype.getSurfaceNormalIntersectionWithZAxis = function (
position,
@@ -705,12 +672,10 @@ const scratchEndpoint = new Cartesian3();
/**
* Computes the ellipsoid curvatures at a given position on the surface.
- *
* @param {Cartesian3} surfacePosition The position on the ellipsoid surface where curvatures will be calculated.
* @param {Cartesian2} [result] The cartesian to which to copy the result, or undefined to create and return a new instance.
* @returns {Cartesian2} The local curvature of the ellipsoid surface at the provided position, in east and north directions.
- *
- * @exception {DeveloperError} position is required.
+ * @throws {DeveloperError} position is required.
*/
Ellipsoid.prototype.getLocalCurvature = function (surfacePosition, result) {
//>>includeStart('debug', pragmas.debug);
@@ -764,12 +729,10 @@ const weights = [
/**
* Compute the 10th order Gauss-Legendre Quadrature of the given definite integral.
- *
* @param {number} a The lower bound for the integration.
* @param {number} b The upper bound for the integration.
* @param {Ellipsoid~RealValuedScalarFunction} func The function to integrate.
* @returns {number} The value of the integral of the given function over the given domain.
- *
* @private
*/
function gaussLegendreQuadrature(a, b, func) {
@@ -798,17 +761,14 @@ function gaussLegendreQuadrature(a, b, func) {
/**
* A real valued scalar function.
* @callback Ellipsoid~RealValuedScalarFunction
- *
* @param {number} x The value used to evaluate the function.
* @returns {number} The value of the function at x.
- *
* @private
*/
/**
* Computes an approximation of the surface area of a rectangle on the surface of an ellipsoid using
* Gauss-Legendre 10th order quadrature.
- *
* @param {Rectangle} rectangle The rectangle used for computing the surface area.
* @returns {number} The approximate area of the rectangle on the surface of this ellipsoid.
*/
diff --git a/packages/engine/Source/Core/EllipsoidGeodesic.js b/packages/engine/Source/Core/EllipsoidGeodesic.js
index 6416b8241149..4657522f04a9 100644
--- a/packages/engine/Source/Core/EllipsoidGeodesic.js
+++ b/packages/engine/Source/Core/EllipsoidGeodesic.js
@@ -274,13 +274,11 @@ function computeProperties(ellipsoidGeodesic, start, end, ellipsoid) {
/**
* Initializes a geodesic on the ellipsoid connecting the two provided planetodetic points.
- *
* @alias EllipsoidGeodesic
- * @constructor
- *
+ * @class
* @param {Cartographic} [start] The initial planetodetic point on the path.
* @param {Cartographic} [end] The final planetodetic point on the path.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the geodesic lies.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the geodesic lies.
*/
function EllipsoidGeodesic(start, end, ellipsoid) {
const e = defaultValue(ellipsoid, Ellipsoid.WGS84);
@@ -387,7 +385,6 @@ Object.defineProperties(EllipsoidGeodesic.prototype, {
/**
* Sets the start and end points of the geodesic
- *
* @param {Cartographic} start The initial planetodetic point on the path.
* @param {Cartographic} end The final planetodetic point on the path.
*/
@@ -402,7 +399,6 @@ EllipsoidGeodesic.prototype.setEndPoints = function (start, end) {
/**
* Provides the location of a point at the indicated portion along the geodesic.
- *
* @param {number} fraction The portion of the distance between the initial and final points.
* @param {Cartographic} [result] The object in which to store the result.
* @returns {Cartographic} The location of the point along the geodesic.
@@ -419,12 +415,10 @@ EllipsoidGeodesic.prototype.interpolateUsingFraction = function (
/**
* Provides the location of a point at the indicated distance along the geodesic.
- *
* @param {number} distance The distance from the inital point to the point of interest along the geodesic
* @param {Cartographic} [result] The object in which to store the result.
* @returns {Cartographic} The location of the point along the geodesic.
- *
- * @exception {DeveloperError} start and end must be set before calling function interpolateUsingSurfaceDistance
+ * @throws {DeveloperError} start and end must be set before calling function interpolateUsingSurfaceDistance
*/
EllipsoidGeodesic.prototype.interpolateUsingSurfaceDistance = function (
distance,
diff --git a/packages/engine/Source/Core/EllipsoidGeometry.js b/packages/engine/Source/Core/EllipsoidGeometry.js
index e6a8409dc78b..b06c3471cff2 100644
--- a/packages/engine/Source/Core/EllipsoidGeometry.js
+++ b/packages/engine/Source/Core/EllipsoidGeometry.js
@@ -27,19 +27,17 @@ const sin = Math.sin;
/**
* A description of an ellipsoid centered at the origin.
- *
* @alias EllipsoidGeometry
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {Cartesian3} [options.radii=Cartesian3(1.0, 1.0, 1.0)] The radii of the ellipsoid in the x, y, and z directions.
- * @param {Cartesian3} [options.innerRadii=options.radii] The inner radii of the ellipsoid in the x, y, and z directions.
- * @param {number} [options.minimumClock=0.0] The minimum angle lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
- * @param {number} [options.maximumClock=2*PI] The maximum angle lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
- * @param {number} [options.minimumCone=0.0] The minimum angle measured from the positive z-axis and toward the negative z-axis.
- * @param {number} [options.maximumCone=PI] The maximum angle measured from the positive z-axis and toward the negative z-axis.
- * @param {number} [options.stackPartitions=64] The number of times to partition the ellipsoid into stacks.
- * @param {number} [options.slicePartitions=64] The number of times to partition the ellipsoid into radial slices.
+ * @param {Cartesian3} [options.radii] The radii of the ellipsoid in the x, y, and z directions.
+ * @param {Cartesian3} [options.innerRadii] The inner radii of the ellipsoid in the x, y, and z directions.
+ * @param {number} [options.minimumClock] The minimum angle lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
+ * @param {number} [options.maximumClock] The maximum angle lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
+ * @param {number} [options.minimumCone] The minimum angle measured from the positive z-axis and toward the negative z-axis.
+ * @param {number} [options.maximumCone] The maximum angle measured from the positive z-axis and toward the negative z-axis.
+ * @param {number} [options.stackPartitions] The number of times to partition the ellipsoid into stacks.
+ * @param {number} [options.slicePartitions] The number of times to partition the ellipsoid into radial slices.
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
*
* @exception {DeveloperError} options.slicePartitions cannot be less than three.
@@ -102,11 +100,9 @@ EllipsoidGeometry.packedLength =
/**
* Stores the provided instance into the provided array.
- *
* @param {EllipsoidGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
EllipsoidGeometry.pack = function (value, array, startingIndex) {
@@ -159,9 +155,8 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {EllipsoidGeometry} [result] The object into which to store the result.
* @returns {EllipsoidGeometry} The modified result parameter or a new EllipsoidGeometry instance if one was not provided.
*/
@@ -224,7 +219,6 @@ EllipsoidGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an ellipsoid, including its vertices, indices, and a bounding sphere.
- *
* @param {EllipsoidGeometry} ellipsoidGeometry A description of the ellipsoid.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
@@ -632,7 +626,6 @@ let unitEllipsoidGeometry;
/**
* Returns the geometric representation of a unit ellipsoid, including its vertices, indices, and a bounding sphere.
* @returns {Geometry} The computed vertices and indices.
- *
* @private
*/
EllipsoidGeometry.getUnitEllipsoid = function () {
diff --git a/packages/engine/Source/Core/EllipsoidOutlineGeometry.js b/packages/engine/Source/Core/EllipsoidOutlineGeometry.js
index 53b1fd403a97..6d90aad9ecd2 100644
--- a/packages/engine/Source/Core/EllipsoidOutlineGeometry.js
+++ b/packages/engine/Source/Core/EllipsoidOutlineGeometry.js
@@ -19,19 +19,17 @@ const sin = Math.sin;
/**
* A description of the outline of an ellipsoid centered at the origin.
- *
* @alias EllipsoidOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {Cartesian3} [options.radii=Cartesian3(1.0, 1.0, 1.0)] The radii of the ellipsoid in the x, y, and z directions.
- * @param {Cartesian3} [options.innerRadii=options.radii] The inner radii of the ellipsoid in the x, y, and z directions.
- * @param {number} [options.minimumClock=0.0] The minimum angle lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
- * @param {number} [options.maximumClock=2*PI] The maximum angle lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
- * @param {number} [options.minimumCone=0.0] The minimum angle measured from the positive z-axis and toward the negative z-axis.
- * @param {number} [options.maximumCone=PI] The maximum angle measured from the positive z-axis and toward the negative z-axis.
- * @param {number} [options.stackPartitions=10] The count of stacks for the ellipsoid (1 greater than the number of parallel lines).
- * @param {number} [options.slicePartitions=8] The count of slices for the ellipsoid (Equal to the number of radial lines).
+ * @param {Cartesian3} [options.radii] The radii of the ellipsoid in the x, y, and z directions.
+ * @param {Cartesian3} [options.innerRadii] The inner radii of the ellipsoid in the x, y, and z directions.
+ * @param {number} [options.minimumClock] The minimum angle lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
+ * @param {number} [options.maximumClock] The maximum angle lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
+ * @param {number} [options.minimumCone] The minimum angle measured from the positive z-axis and toward the negative z-axis.
+ * @param {number} [options.maximumCone] The maximum angle measured from the positive z-axis and toward the negative z-axis.
+ * @param {number} [options.stackPartitions] The count of stacks for the ellipsoid (1 greater than the number of parallel lines).
+ * @param {number} [options.slicePartitions] The count of slices for the ellipsoid (Equal to the number of radial lines).
* @param {number} [options.subdivisions=128] The number of points per line, determining the granularity of the curvature.
*
* @exception {DeveloperError} options.stackPartitions must be greater than or equal to one.
@@ -102,11 +100,9 @@ EllipsoidOutlineGeometry.packedLength = 2 * Cartesian3.packedLength + 8;
/**
* Stores the provided instance into the provided array.
- *
* @param {EllipsoidOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
EllipsoidOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -156,9 +152,8 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {EllipsoidOutlineGeometry} [result] The object into which to store the result.
* @returns {EllipsoidOutlineGeometry} The modified result parameter or a new EllipsoidOutlineGeometry instance if one was not provided.
*/
@@ -216,7 +211,6 @@ EllipsoidOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an outline of an ellipsoid, including its vertices, indices, and a bounding sphere.
- *
* @param {EllipsoidOutlineGeometry} ellipsoidGeometry A description of the ellipsoid outline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/EllipsoidRhumbLine.js b/packages/engine/Source/Core/EllipsoidRhumbLine.js
index 51b410622677..f533b4eef245 100644
--- a/packages/engine/Source/Core/EllipsoidRhumbLine.js
+++ b/packages/engine/Source/Core/EllipsoidRhumbLine.js
@@ -379,15 +379,12 @@ function interpolateUsingSurfaceDistance(
/**
* Initializes a rhumb line on the ellipsoid connecting the two provided planetodetic points.
- *
* @alias EllipsoidRhumbLine
- * @constructor
- *
+ * @class
* @param {Cartographic} [start] The initial planetodetic point on the path.
* @param {Cartographic} [end] The final planetodetic point on the path.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rhumb line lies.
- *
- * @exception {DeveloperError} angle between start and end must be at least 0.0125 radians.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the rhumb line lies.
+ * @throws {DeveloperError} angle between start and end must be at least 0.0125 radians.
*/
function EllipsoidRhumbLine(start, end, ellipsoid) {
const e = defaultValue(ellipsoid, Ellipsoid.WGS84);
@@ -477,11 +474,10 @@ Object.defineProperties(EllipsoidRhumbLine.prototype, {
/**
* Create a rhumb line using an initial position with a heading and distance.
- *
* @param {Cartographic} start The initial planetodetic point on the path.
* @param {number} heading The heading in radians.
* @param {number} distance The rhumb line distance between the start and end point.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rhumb line lies.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the rhumb line lies.
* @param {EllipsoidRhumbLine} [result] The object in which to store the result.
* @returns {EllipsoidRhumbLine} The EllipsoidRhumbLine object.
*/
@@ -528,7 +524,6 @@ EllipsoidRhumbLine.fromStartHeadingDistance = function (
/**
* Sets the start and end points of the rhumb line.
- *
* @param {Cartographic} start The initial planetodetic point on the path.
* @param {Cartographic} end The final planetodetic point on the path.
*/
@@ -543,7 +538,6 @@ EllipsoidRhumbLine.prototype.setEndPoints = function (start, end) {
/**
* Provides the location of a point at the indicated portion along the rhumb line.
- *
* @param {number} fraction The portion of the distance between the initial and final points.
* @param {Cartographic} [result] The object in which to store the result.
* @returns {Cartographic} The location of the point along the rhumb line.
@@ -560,12 +554,10 @@ EllipsoidRhumbLine.prototype.interpolateUsingFraction = function (
/**
* Provides the location of a point at the indicated distance along the rhumb line.
- *
* @param {number} distance The distance from the inital point to the point of interest along the rhumbLine.
* @param {Cartographic} [result] The object in which to store the result.
* @returns {Cartographic} The location of the point along the rhumb line.
- *
- * @exception {DeveloperError} start and end must be set before calling function interpolateUsingSurfaceDistance
+ * @throws {DeveloperError} start and end must be set before calling function interpolateUsingSurfaceDistance
*/
EllipsoidRhumbLine.prototype.interpolateUsingSurfaceDistance = function (
distance,
@@ -593,12 +585,10 @@ EllipsoidRhumbLine.prototype.interpolateUsingSurfaceDistance = function (
/**
* Provides the location of a point at the indicated longitude along the rhumb line.
* If the longitude is outside the range of start and end points, the first intersection with the longitude from the start point in the direction of the heading is returned. This follows the spiral property of a rhumb line.
- *
* @param {number} intersectionLongitude The longitude, in radians, at which to find the intersection point from the starting point using the heading.
* @param {Cartographic} [result] The object in which to store the result.
* @returns {Cartographic} The location of the intersection point along the rhumb line, undefined if there is no intersection or infinite intersections.
- *
- * @exception {DeveloperError} start and end must be set before calling function findIntersectionWithLongitude.
+ * @throws {DeveloperError} start and end must be set before calling function findIntersectionWithLongitude.
*/
EllipsoidRhumbLine.prototype.findIntersectionWithLongitude = function (
intersectionLongitude,
@@ -697,12 +687,10 @@ EllipsoidRhumbLine.prototype.findIntersectionWithLongitude = function (
/**
* Provides the location of a point at the indicated latitude along the rhumb line.
* If the latitude is outside the range of start and end points, the first intersection with the latitude from that start point in the direction of the heading is returned. This follows the spiral property of a rhumb line.
- *
* @param {number} intersectionLatitude The latitude, in radians, at which to find the intersection point from the starting point using the heading.
* @param {Cartographic} [result] The object in which to store the result.
* @returns {Cartographic} The location of the intersection point along the rhumb line, undefined if there is no intersection or infinite intersections.
- *
- * @exception {DeveloperError} start and end must be set before calling function findIntersectionWithLongitude.
+ * @throws {DeveloperError} start and end must be set before calling function findIntersectionWithLongitude.
*/
EllipsoidRhumbLine.prototype.findIntersectionWithLatitude = function (
intersectionLatitude,
diff --git a/packages/engine/Source/Core/EllipsoidTangentPlane.js b/packages/engine/Source/Core/EllipsoidTangentPlane.js
index 47157fe0f4b5..83086f28df79 100644
--- a/packages/engine/Source/Core/EllipsoidTangentPlane.js
+++ b/packages/engine/Source/Core/EllipsoidTangentPlane.js
@@ -19,12 +19,10 @@ const scratchCart4 = new Cartesian4();
* If origin is not on the surface of the ellipsoid, it's surface projection will be used.
* If origin is at the center of the ellipsoid, an exception will be thrown.
* @alias EllipsoidTangentPlane
- * @constructor
- *
+ * @class
* @param {Cartesian3} origin The point on the surface of the ellipsoid where the tangent plane touches.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to use.
- *
- * @exception {DeveloperError} origin must not be at the center of the ellipsoid.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid to use.
+ * @throws {DeveloperError} origin must not be at the center of the ellipsoid.
*/
function EllipsoidTangentPlane(origin, ellipsoid) {
//>>includeStart('debug', pragmas.debug);
@@ -134,9 +132,8 @@ const tmp = new AxisAlignedBoundingBox();
/**
* Creates a new instance from the provided ellipsoid and the center
* point of the provided Cartesians.
- *
* @param {Cartesian3[]} cartesians The list of positions surrounding the center point.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to use.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid to use.
* @returns {EllipsoidTangentPlane} The new instance of EllipsoidTangentPlane.
*/
EllipsoidTangentPlane.fromPoints = function (cartesians, ellipsoid) {
@@ -153,7 +150,6 @@ const scratchProjectPointOntoPlaneCartesian3 = new Cartesian3();
/**
* Computes the projection of the provided 3D position onto the 2D plane, radially outward from the {@link EllipsoidTangentPlane.ellipsoid} coordinate system origin.
- *
* @param {Cartesian3} cartesian The point to project.
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if none was provided. Undefined if there is no intersection point
@@ -206,9 +202,7 @@ EllipsoidTangentPlane.prototype.projectPointOntoPlane = function (
/**
* Computes the projection of the provided 3D positions onto the 2D plane (where possible), radially outward from the global origin.
* The resulting array may be shorter than the input array - if a single projection is impossible it will not be included.
- *
* @see EllipsoidTangentPlane.projectPointOntoPlane
- *
* @param {Cartesian3[]} cartesians The array of points to project.
* @param {Cartesian2[]} [result] The array of Cartesian2 instances onto which to store results.
* @returns {Cartesian2[]} The modified result parameter or a new array of Cartesian2 instances if none was provided.
@@ -240,7 +234,6 @@ EllipsoidTangentPlane.prototype.projectPointsOntoPlane = function (
/**
* Computes the projection of the provided 3D position onto the 2D plane, along the plane normal.
- *
* @param {Cartesian3} cartesian The point to project.
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if none was provided.
@@ -290,9 +283,7 @@ EllipsoidTangentPlane.prototype.projectPointToNearestOnPlane = function (
/**
* Computes the projection of the provided 3D positions onto the 2D plane, along the plane normal.
- *
* @see EllipsoidTangentPlane.projectPointToNearestOnPlane
- *
* @param {Cartesian3[]} cartesians The array of points to project.
* @param {Cartesian2[]} [result] The array of Cartesian2 instances onto which to store results.
* @returns {Cartesian2[]} The modified result parameter or a new array of Cartesian2 instances if none was provided. This will have the same length as cartesians
.
@@ -320,7 +311,6 @@ EllipsoidTangentPlane.prototype.projectPointsToNearestOnPlane = function (
const projectPointsOntoEllipsoidScratch = new Cartesian3();
/**
* Computes the projection of the provided 2D position onto the 3D ellipsoid.
- *
* @param {Cartesian2} cartesian The points to project.
* @param {Cartesian3} [result] The Cartesian3 instance to store result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.
@@ -354,7 +344,6 @@ EllipsoidTangentPlane.prototype.projectPointOntoEllipsoid = function (
/**
* Computes the projection of the provided 2D positions onto the 3D ellipsoid.
- *
* @param {Cartesian2[]} cartesians The array of points to project.
* @param {Cartesian3[]} [result] The array of Cartesian3 instances onto which to store results.
* @returns {Cartesian3[]} The modified result parameter or a new array of Cartesian3 instances if none was provided.
diff --git a/packages/engine/Source/Core/EllipsoidTerrainProvider.js b/packages/engine/Source/Core/EllipsoidTerrainProvider.js
index 659918c58221..7cbf46d3847c 100644
--- a/packages/engine/Source/Core/EllipsoidTerrainProvider.js
+++ b/packages/engine/Source/Core/EllipsoidTerrainProvider.js
@@ -9,10 +9,8 @@ import TerrainProvider from "./TerrainProvider.js";
/**
* A very simple {@link TerrainProvider} that produces geometry by tessellating an ellipsoidal
* surface.
- *
* @alias EllipsoidTerrainProvider
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {TilingScheme} [options.tilingScheme] The tiling scheme specifying how the ellipsoidal
* surface is broken into tiles. If this parameter is not provided, a {@link GeographicTilingScheme}
@@ -20,7 +18,6 @@ import TerrainProvider from "./TerrainProvider.js";
* @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If the tilingScheme is specified,
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
* parameter is specified, the WGS84 ellipsoid is used.
- *
* @see TerrainProvider
*/
function EllipsoidTerrainProvider(options) {
@@ -127,12 +124,10 @@ Object.defineProperties(EllipsoidTerrainProvider.prototype, {
/**
* Requests the geometry for a given tile. The result includes terrain
* data and indicates that all child tiles are available.
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
* @param {Request} [request] The request object. Intended for internal use only.
- *
* @returns {Promise|undefined} A promise for the requested geometry. If this method
* returns undefined instead of a promise, it is an indication that too many requests are already
* pending and the request will be retried later.
@@ -156,7 +151,6 @@ EllipsoidTerrainProvider.prototype.requestTileGeometry = function (
/**
* Gets the maximum geometric error allowed in a tile at a given level.
- *
* @param {number} level The tile level for which to get the maximum geometric error.
* @returns {number} The maximum geometric error.
*/
@@ -168,7 +162,6 @@ EllipsoidTerrainProvider.prototype.getLevelMaximumGeometricError = function (
/**
* Determines whether data for a tile is available to be loaded.
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -184,7 +177,6 @@ EllipsoidTerrainProvider.prototype.getTileDataAvailable = function (
/**
* Makes sure we load availability data for a tile
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
diff --git a/packages/engine/Source/Core/EllipsoidalOccluder.js b/packages/engine/Source/Core/EllipsoidalOccluder.js
index e94d8bbcbf3d..9bbf825ca778 100644
--- a/packages/engine/Source/Core/EllipsoidalOccluder.js
+++ b/packages/engine/Source/Core/EllipsoidalOccluder.js
@@ -11,22 +11,17 @@ import Rectangle from "./Rectangle.js";
* an {@link Ellipsoid} and a camera position. The ellipsoid is assumed to be located at the
* origin of the coordinate system. This class uses the algorithm described in the
* {@link https://cesium.com/blog/2013/04/25/Horizon-culling/|Horizon Culling} blog post.
- *
* @alias EllipsoidalOccluder
- *
* @param {Ellipsoid} ellipsoid The ellipsoid to use as an occluder.
* @param {Cartesian3} [cameraPosition] The coordinate of the viewer/camera. If this parameter is not
* specified, {@link EllipsoidalOccluder#cameraPosition} must be called before
* testing visibility.
- *
- * @constructor
- *
+ * @class
* @example
* // Construct an ellipsoidal occluder with radii 1.0, 1.1, and 0.9.
* const cameraPosition = new Cesium.Cartesian3(5.0, 6.0, 7.0);
* const occluderEllipsoid = new Cesium.Ellipsoid(1.0, 1.1, 0.9);
* const occluder = new Cesium.EllipsoidalOccluder(occluderEllipsoid, cameraPosition);
- *
* @private
*/
function EllipsoidalOccluder(ellipsoid, cameraPosition) {
@@ -85,10 +80,8 @@ const scratchCartesian = new Cartesian3();
/**
* Determines whether or not a point, the occludee
, is hidden from view by the occluder.
- *
* @param {Cartesian3} occludee The point to test for visibility.
* @returns {boolean} true
if the occludee is visible; otherwise false
.
- *
* @example
* const cameraPosition = new Cesium.Cartesian3(0, 0, 2.5);
* const ellipsoid = new Cesium.Ellipsoid(1.0, 1.1, 0.9);
@@ -113,10 +106,8 @@ EllipsoidalOccluder.prototype.isPointVisible = function (occludee) {
* Determines whether or not a point expressed in the ellipsoid scaled space, is hidden from view by the
* occluder. To transform a Cartesian X, Y, Z position in the coordinate system aligned with the ellipsoid
* into the scaled space, call {@link Ellipsoid#transformPositionToScaledSpace}.
- *
* @param {Cartesian3} occludeeScaledSpacePosition The point to test for visibility, represented in the scaled space.
* @returns {boolean} true
if the occludee is visible; otherwise false
.
- *
* @example
* const cameraPosition = new Cesium.Cartesian3(0, 0, 2.5);
* const ellipsoid = new Cesium.Ellipsoid(1.0, 1.1, 0.9);
@@ -143,8 +134,8 @@ const scratchCameraPositionInScaledSpaceShrunk = new Cartesian3();
* the ellipsoid. This is intended to be used with points generated by
* {@link EllipsoidalOccluder#computeHorizonCullingPointPossiblyUnderEllipsoid} or
* {@link EllipsoidalOccluder#computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid}.
- *
* @param {Cartesian3} occludeeScaledSpacePosition The point to test for visibility, represented in the scaled space of the possibly-shrunk ellipsoid.
+ * @param minimumHeight
* @returns {boolean} true
if the occludee is visible; otherwise false
.
*/
EllipsoidalOccluder.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid = function (
@@ -183,7 +174,6 @@ EllipsoidalOccluder.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid =
* the horizon, all of the positions are guaranteed to be below the horizon as well. The returned point
* is expressed in the ellipsoid-scaled space and is suitable for use with
* {@link EllipsoidalOccluder#isScaledSpacePointVisible}.
- *
* @param {Cartesian3} directionToPoint The direction that the computed point will lie along.
* A reasonable direction to use is the direction from the center of the ellipsoid to
* the center of the bounding sphere computed from the positions. The direction need not
@@ -214,7 +204,6 @@ const scratchEllipsoidShrunk = Ellipsoid.clone(Ellipsoid.UNIT_SPHERE);
* point relative to an ellipsoid that has been shrunk by the minimum height when the minimum height is below
* the ellipsoid. The returned point is expressed in the possibly-shrunk ellipsoid-scaled space and is suitable
* for use with {@link EllipsoidalOccluder#isScaledSpacePointVisiblePossiblyUnderEllipsoid}.
- *
* @param {Cartesian3} directionToPoint The direction that the computed point will lie along.
* A reasonable direction to use is the direction from the center of the ellipsoid to
* the center of the bounding sphere computed from the positions. The direction need not
@@ -249,7 +238,6 @@ EllipsoidalOccluder.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid =
* the horizon, all of the positions are guaranteed to be below the horizon as well. The returned point
* is expressed in the ellipsoid-scaled space and is suitable for use with
* {@link EllipsoidalOccluder#isScaledSpacePointVisible}.
- *
* @param {Cartesian3} directionToPoint The direction that the computed point will lie along.
* A reasonable direction to use is the direction from the center of the ellipsoid to
* the center of the bounding sphere computed from the positions. The direction need not
@@ -257,8 +245,8 @@ EllipsoidalOccluder.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid =
* @param {number[]} vertices The vertices from which to compute the horizon culling point. The positions
* must be expressed in a reference frame centered at the ellipsoid and aligned with the
* ellipsoid's axes.
- * @param {number} [stride=3]
- * @param {Cartesian3} [center=Cartesian3.ZERO]
+ * @param {number} [stride]
+ * @param {Cartesian3} [center]
* @param {Cartesian3} [result] The instance on which to store the result instead of allocating a new instance.
* @returns {Cartesian3} The computed horizon culling point, expressed in the ellipsoid-scaled space.
*/
@@ -284,7 +272,6 @@ EllipsoidalOccluder.prototype.computeHorizonCullingPointFromVertices = function
* point relative to an ellipsoid that has been shrunk by the minimum height when the minimum height is below
* the ellipsoid. The returned point is expressed in the possibly-shrunk ellipsoid-scaled space and is suitable
* for use with {@link EllipsoidalOccluder#isScaledSpacePointVisiblePossiblyUnderEllipsoid}.
- *
* @param {Cartesian3} directionToPoint The direction that the computed point will lie along.
* A reasonable direction to use is the direction from the center of the ellipsoid to
* the center of the bounding sphere computed from the positions. The direction need not
@@ -292,8 +279,8 @@ EllipsoidalOccluder.prototype.computeHorizonCullingPointFromVertices = function
* @param {number[]} vertices The vertices from which to compute the horizon culling point. The positions
* must be expressed in a reference frame centered at the ellipsoid and aligned with the
* ellipsoid's axes.
- * @param {number} [stride=3]
- * @param {Cartesian3} [center=Cartesian3.ZERO]
+ * @param {number} [stride]
+ * @param {Cartesian3} [center]
* @param {number} [minimumHeight] The minimum height of all vertices. If this value is undefined, all vertices are assumed to be above the ellipsoid.
* @param {Cartesian3} [result] The instance on which to store the result instead of allocating a new instance.
* @returns {Cartesian3} The computed horizon culling point, expressed in the possibly-shrunk ellipsoid-scaled space.
@@ -328,7 +315,6 @@ const subsampleScratch = [];
* the horizon, the ellipsoid-conforming rectangle is guaranteed to be below the horizon as well.
* The returned point is expressed in the ellipsoid-scaled space and is suitable for use with
* {@link EllipsoidalOccluder#isScaledSpacePointVisible}.
- *
* @param {Rectangle} rectangle The rectangle for which to compute the horizon culling point.
* @param {Ellipsoid} ellipsoid The ellipsoid on which the rectangle is defined. This may be different from
* the ellipsoid used by this instance for occlusion testing.
diff --git a/packages/engine/Source/Core/EncodedCartesian3.js b/packages/engine/Source/Core/EncodedCartesian3.js
index b6df42a5ffd4..b623102ee6ec 100644
--- a/packages/engine/Source/Core/EncodedCartesian3.js
+++ b/packages/engine/Source/Core/EncodedCartesian3.js
@@ -9,16 +9,13 @@ import defined from "./defined.js";
* This is used to encode positions in vertex buffers for rendering without jittering artifacts
* as described in {@link http://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.
*
- *
* @alias EncodedCartesian3
- * @constructor
- *
+ * @class
* @private
*/
function EncodedCartesian3() {
/**
* The high bits for each component. Bits 0 to 22 store the whole value. Bits 23 to 31 are not used.
- *
* @type {Cartesian3}
* @default {@link Cartesian3.ZERO}
*/
@@ -26,7 +23,6 @@ function EncodedCartesian3() {
/**
* The low bits for each component. Bits 7 to 22 store the whole value, and bits 0 to 6 store the fraction. Bits 23 to 31 are not used.
- *
* @type {Cartesian3}
* @default {@link Cartesian3.ZERO}
*/
@@ -40,11 +36,9 @@ function EncodedCartesian3() {
*
* The fixed-point encoding follows {@link http://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.
*
- *
* @param {number} value The floating-point value to encode.
* @param {object} [result] The object onto which to store the result.
* @returns {object} The modified result parameter or a new instance if one was not provided.
- *
* @example
* const value = 1234567.1234567;
* const splitValue = Cesium.EncodedCartesian3.encode(value);
@@ -86,11 +80,9 @@ const scratchEncode = {
*
* The fixed-point encoding follows {@link https://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.
*
- *
* @param {Cartesian3} cartesian The cartesian to encode.
* @param {EncodedCartesian3} [result] The object onto which to store the result.
* @returns {EncodedCartesian3} The modified result parameter or a new EncodedCartesian3 instance if one was not provided.
- *
* @example
* const cart = new Cesium.Cartesian3(-10000000.0, 0.0, 10000000.0);
* const encoded = Cesium.EncodedCartesian3.fromCartesian(cart);
@@ -130,13 +122,10 @@ const encodedP = new EncodedCartesian3();
*
* This is used to create interleaved high-precision position vertex attributes.
*
- *
* @param {Cartesian3} cartesian The cartesian to encode.
* @param {number[]} cartesianArray The array to write to.
* @param {number} index The index into the array to start writing. Six elements will be written.
- *
- * @exception {DeveloperError} index must be a number greater than or equal to 0.
- *
+ * @throws {DeveloperError} index must be a number greater than or equal to 0.
* @example
* const positions = [
* new Cesium.Cartesian3(),
diff --git a/packages/engine/Source/Core/Event.js b/packages/engine/Source/Core/Event.js
index cf53ef966052..307ffdd84efd 100644
--- a/packages/engine/Source/Core/Event.js
+++ b/packages/engine/Source/Core/Event.js
@@ -5,10 +5,9 @@ import defined from "./defined.js";
* A generic utility class for managing subscribers for a particular event.
* This class is usually instantiated inside of a container class and
* exposed as a property for others to subscribe to.
- *
* @alias Event
* @template Listener extends (...args: any[]) => void = (...args: any[]) => void
- * @constructor
+ * @class
* @example
* MyObject.prototype.myListener = function(arg1, arg2) {
* this.myArg1Copy = arg1;
@@ -46,12 +45,10 @@ Object.defineProperties(Event.prototype, {
* Registers a callback function to be executed whenever the event is raised.
* An optional scope can be provided to serve as the this
pointer
* in which the function will execute.
- *
* @param {Listener} listener The function to be executed when the event is raised.
* @param {object} [scope] An optional object scope to serve as the this
* pointer in which the listener function will execute.
* @returns {Event.RemoveCallback} A function that will remove this event listener when invoked.
- *
* @see Event#raiseEvent
* @see Event#removeEventListener
*/
@@ -71,11 +68,9 @@ Event.prototype.addEventListener = function (listener, scope) {
/**
* Unregisters a previously registered callback.
- *
* @param {Listener} listener The function to be unregistered.
* @param {object} [scope] The scope that was originally passed to addEventListener.
* @returns {boolean} true
if the listener was removed; false
if the listener and scope are not registered with the event.
- *
* @see Event#addEventListener
* @see Event#raiseEvent
*/
@@ -119,9 +114,7 @@ function compareNumber(a, b) {
/**
* Raises the event by calling each registered listener with all supplied arguments.
- *
* @param {...Parameters} arguments This method takes any number of parameters and passes them through to the listener functions.
- *
* @see Event#addEventListener
* @see Event#removeEventListener
*/
diff --git a/packages/engine/Source/Core/EventHelper.js b/packages/engine/Source/Core/EventHelper.js
index e9a024c64597..4065ebcfc17a 100644
--- a/packages/engine/Source/Core/EventHelper.js
+++ b/packages/engine/Source/Core/EventHelper.js
@@ -5,11 +5,8 @@ import DeveloperError from "./DeveloperError.js";
* A convenience object that simplifies the common pattern of attaching event listeners
* to several events, then removing all those listeners at once later, for example, in
* a destroy method.
- *
* @alias EventHelper
- * @constructor
- *
- *
+ * @class
* @example
* const helper = new Cesium.EventHelper();
*
@@ -18,7 +15,6 @@ import DeveloperError from "./DeveloperError.js";
*
* // later...
* helper.removeAll();
- *
* @see Event
*/
function EventHelper() {
@@ -27,13 +23,11 @@ function EventHelper() {
/**
* Adds a listener to an event, and records the registration to be cleaned up later.
- *
* @param {Event} event The event to attach to.
* @param {Function} listener The function to be executed when the event is raised.
* @param {object} [scope] An optional object scope to serve as the this
* pointer in which the listener function will execute.
* @returns {EventHelper.RemoveCallback} A function that will remove this event listener when invoked.
- *
* @see Event#addEventListener
*/
EventHelper.prototype.add = function (event, listener, scope) {
@@ -56,7 +50,6 @@ EventHelper.prototype.add = function (event, listener, scope) {
/**
* Unregisters all previously added listeners.
- *
* @see Event#removeEventListener
*/
EventHelper.prototype.removeAll = function () {
diff --git a/packages/engine/Source/Core/ExtrapolationType.js b/packages/engine/Source/Core/ExtrapolationType.js
index a62b453818a4..cf47de17cac1 100644
--- a/packages/engine/Source/Core/ExtrapolationType.js
+++ b/packages/engine/Source/Core/ExtrapolationType.js
@@ -1,15 +1,12 @@
/**
* Constants to determine how an interpolated value is extrapolated
* when querying outside the bounds of available data.
- *
* @enum {number}
- *
* @see SampledProperty
*/
const ExtrapolationType = {
/**
* No extrapolation occurs.
- *
* @type {number}
* @constant
*/
@@ -17,7 +14,6 @@ const ExtrapolationType = {
/**
* The first or last value is used when outside the range of sample data.
- *
* @type {number}
* @constant
*/
@@ -25,7 +21,6 @@ const ExtrapolationType = {
/**
* The value is extrapolated.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/FeatureDetection.js b/packages/engine/Source/Core/FeatureDetection.js
index 795f79e34e4b..53adf83059d1 100644
--- a/packages/engine/Source/Core/FeatureDetection.js
+++ b/packages/engine/Source/Core/FeatureDetection.js
@@ -296,7 +296,6 @@ if (typeof ArrayBuffer !== "undefined") {
/**
* A set of functions to detect whether the current browser supports
* various features.
- *
* @namespace FeatureDetection
*/
const FeatureDetection = {
@@ -324,7 +323,6 @@ const FeatureDetection = {
/**
* Detects whether the current browser supports Basis Universal textures and the web assembly modules needed to transcode them.
- *
* @param {Scene} scene
* @returns {boolean} true if the browser supports web assembly modules and the scene supports Basis Universal textures, false if not.
*/
@@ -334,9 +332,7 @@ FeatureDetection.supportsBasis = function (scene) {
/**
* Detects whether the current browser supports the full screen standard.
- *
* @returns {boolean} true if the browser supports the full screen standard, false if not.
- *
* @see Fullscreen
* @see {@link http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html|W3C Fullscreen Living Specification}
*/
@@ -346,9 +342,7 @@ FeatureDetection.supportsFullscreen = function () {
/**
* Detects whether the current browser supports typed arrays.
- *
* @returns {boolean} true if the browser supports typed arrays, false if not.
- *
* @see {@link https://tc39.es/ecma262/#sec-typedarray-objects|Typed Array Specification}
*/
FeatureDetection.supportsTypedArrays = function () {
@@ -357,9 +351,7 @@ FeatureDetection.supportsTypedArrays = function () {
/**
* Detects whether the current browser supports BigInt64Array typed arrays.
- *
* @returns {boolean} true if the browser supports BigInt64Array typed arrays, false if not.
- *
* @see {@link https://tc39.es/ecma262/#sec-typedarray-objects|Typed Array Specification}
*/
FeatureDetection.supportsBigInt64Array = function () {
@@ -368,9 +360,7 @@ FeatureDetection.supportsBigInt64Array = function () {
/**
* Detects whether the current browser supports BigUint64Array typed arrays.
- *
* @returns {boolean} true if the browser supports BigUint64Array typed arrays, false if not.
- *
* @see {@link https://tc39.es/ecma262/#sec-typedarray-objects|Typed Array Specification}
*/
FeatureDetection.supportsBigUint64Array = function () {
@@ -379,9 +369,7 @@ FeatureDetection.supportsBigUint64Array = function () {
/**
* Detects whether the current browser supports BigInt.
- *
* @returns {boolean} true if the browser supports BigInt, false if not.
- *
* @see {@link https://tc39.es/ecma262/#sec-bigint-objects|BigInt Specification}
*/
FeatureDetection.supportsBigInt = function () {
@@ -390,9 +378,7 @@ FeatureDetection.supportsBigInt = function () {
/**
* Detects whether the current browser supports Web Workers.
- *
* @returns {boolean} true if the browsers supports Web Workers, false if not.
- *
* @see {@link http://www.w3.org/TR/workers/}
*/
FeatureDetection.supportsWebWorkers = function () {
@@ -401,9 +387,7 @@ FeatureDetection.supportsWebWorkers = function () {
/**
* Detects whether the current browser supports Web Assembly.
- *
* @returns {boolean} true if the browsers supports Web Assembly, false if not.
- *
* @see {@link https://developer.mozilla.org/en-US/docs/WebAssembly}
*/
FeatureDetection.supportsWebAssembly = function () {
@@ -412,10 +396,8 @@ FeatureDetection.supportsWebAssembly = function () {
/**
* Detects whether the current browser supports a WebGL2 rendering context for the specified scene.
- *
* @param {Scene} scene the Cesium scene specifying the rendering context
* @returns {boolean} true if the browser supports a WebGL2 rendering context, false if not.
- *
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext|WebGL2RenderingContext}
*/
FeatureDetection.supportsWebgl2 = function (scene) {
diff --git a/packages/engine/Source/Core/FrustumGeometry.js b/packages/engine/Source/Core/FrustumGeometry.js
index 46fcb8cfb785..2fd553f49804 100644
--- a/packages/engine/Source/Core/FrustumGeometry.js
+++ b/packages/engine/Source/Core/FrustumGeometry.js
@@ -21,15 +21,13 @@ const ORTHOGRAPHIC = 1;
/**
* Describes a frustum at the given the origin and orientation.
- *
* @alias FrustumGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {PerspectiveFrustum|OrthographicFrustum} options.frustum The frustum.
* @param {Cartesian3} options.origin The origin of the frustum.
* @param {Quaternion} options.orientation The orientation of the frustum.
- * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
+ * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
*/
function FrustumGeometry(options) {
//>>includeStart('debug', pragmas.debug);
@@ -81,11 +79,9 @@ function FrustumGeometry(options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {FrustumGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
FrustumGeometry.pack = function (value, array, startingIndex) {
@@ -128,9 +124,8 @@ const scratchVertexFormat = new VertexFormat();
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {FrustumGeometry} [result] The object into which to store the result.
*/
FrustumGeometry.unpack = function (array, startingIndex, result) {
@@ -377,7 +372,6 @@ FrustumGeometry._computeNearFarPlanes = function (
/**
* Computes the geometric representation of a frustum, including its vertices, indices, and a bounding sphere.
- *
* @param {FrustumGeometry} frustumGeometry A description of the frustum.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/FrustumOutlineGeometry.js b/packages/engine/Source/Core/FrustumOutlineGeometry.js
index e49aea1bd141..2bfa020fa3d5 100644
--- a/packages/engine/Source/Core/FrustumOutlineGeometry.js
+++ b/packages/engine/Source/Core/FrustumOutlineGeometry.js
@@ -18,10 +18,8 @@ const ORTHOGRAPHIC = 1;
/**
* A description of the outline of a frustum with the given the origin and orientation.
- *
* @alias FrustumOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {PerspectiveFrustum|OrthographicFrustum} options.frustum The frustum.
* @param {Cartesian3} options.origin The origin of the frustum.
@@ -71,11 +69,9 @@ function FrustumOutlineGeometry(options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {FrustumOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
FrustumOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -115,9 +111,8 @@ const scratchPackorigin = new Cartesian3();
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {FrustumOutlineGeometry} [result] The object into which to store the result.
*/
FrustumOutlineGeometry.unpack = function (array, startingIndex, result) {
@@ -179,7 +174,6 @@ FrustumOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of a frustum outline, including its vertices, indices, and a bounding sphere.
- *
* @param {FrustumOutlineGeometry} frustumGeometry A description of the frustum.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/Fullscreen.js b/packages/engine/Source/Core/Fullscreen.js
index 3b18de25a213..c94a16eb7a8f 100644
--- a/packages/engine/Source/Core/Fullscreen.js
+++ b/packages/engine/Source/Core/Fullscreen.js
@@ -12,9 +12,7 @@ const _names = {
/**
* Browser-independent functions for working with the standard fullscreen API.
- *
* @namespace Fullscreen
- *
* @see {@link http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html|W3C Fullscreen Living Specification}
*/
const Fullscreen = {};
@@ -110,7 +108,6 @@ Object.defineProperties(Fullscreen, {
/**
* Detects whether the browser supports the standard fullscreen API.
- *
* @returns {boolean} true
if the browser supports the standard fullscreen API,
* false
otherwise.
*/
@@ -213,10 +210,8 @@ Fullscreen.supportsFullscreen = function () {
/**
* Asynchronously requests the browser to enter fullscreen mode on the given element.
* If fullscreen mode is not supported by the browser, does nothing.
- *
* @param {object} element The HTML element which will be placed into fullscreen mode.
* @param {object} [vrDevice] The HMDVRDevice device.
- *
* @example
* // Put the entire page into fullscreen.
* Cesium.Fullscreen.requestFullscreen(document.body)
diff --git a/packages/engine/Source/Core/GeocodeType.js b/packages/engine/Source/Core/GeocodeType.js
index 3348b6d5ffbf..b27bf22cb149 100644
--- a/packages/engine/Source/Core/GeocodeType.js
+++ b/packages/engine/Source/Core/GeocodeType.js
@@ -6,7 +6,6 @@
const GeocodeType = {
/**
* Perform a search where the input is considered complete.
- *
* @type {number}
* @constant
*/
@@ -15,7 +14,6 @@ const GeocodeType = {
/**
* Perform an auto-complete using partial input, typically
* reserved for providing possible results as a user is typing.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/GeocoderService.js b/packages/engine/Source/Core/GeocoderService.js
index 5c02ec2bdff8..a5b93a6599c3 100644
--- a/packages/engine/Source/Core/GeocoderService.js
+++ b/packages/engine/Source/Core/GeocoderService.js
@@ -13,8 +13,7 @@ import DeveloperError from "./DeveloperError.js";
* Provides geocoding through an external service. This type describes an interface and
* is not intended to be used.
* @alias GeocoderService
- * @constructor
- *
+ * @class
* @see BingMapsGeocoderService
* @see PeliasGeocoderService
* @see OpenCageGeocoderService
@@ -51,7 +50,6 @@ GeocoderService.getCreditsFromResult = function (geocoderResult) {
/**
* @function
- *
* @param {string} query The query to be sent to the geocoder service
* @param {GeocodeType} [type=GeocodeType.SEARCH] The type of geocode to perform.
* @returns {Promise}
diff --git a/packages/engine/Source/Core/GeographicProjection.js b/packages/engine/Source/Core/GeographicProjection.js
index f6ac972c6272..ec274e1254f3 100644
--- a/packages/engine/Source/Core/GeographicProjection.js
+++ b/packages/engine/Source/Core/GeographicProjection.js
@@ -10,12 +10,9 @@ import Ellipsoid from "./Ellipsoid.js";
* them by the {@link Ellipsoid#maximumRadius}. This projection
* is commonly known as geographic, equirectangular, equidistant cylindrical, or plate carrée. It
* is also known as EPSG:4326.
- *
* @alias GeographicProjection
- * @constructor
- *
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid.
- *
+ * @class
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid.
* @see WebMercatorProjection
*/
function GeographicProjection(ellipsoid) {
@@ -27,9 +24,7 @@ function GeographicProjection(ellipsoid) {
Object.defineProperties(GeographicProjection.prototype, {
/**
* Gets the {@link Ellipsoid}.
- *
* @memberof GeographicProjection.prototype
- *
* @type {Ellipsoid}
* @readonly
*/
@@ -44,7 +39,6 @@ Object.defineProperties(GeographicProjection.prototype, {
* Projects a set of {@link Cartographic} coordinates, in radians, to map coordinates, in meters.
* X and Y are the longitude and latitude, respectively, multiplied by the maximum radius of the
* ellipsoid. Z is the unmodified height.
- *
* @param {Cartographic} cartographic The coordinates to project.
* @param {Cartesian3} [result] An instance into which to copy the result. If this parameter is
* undefined, a new instance is created and returned.
@@ -73,7 +67,6 @@ GeographicProjection.prototype.project = function (cartographic, result) {
* Unprojects a set of projected {@link Cartesian3} coordinates, in meters, to {@link Cartographic}
* coordinates, in radians. Longitude and Latitude are the X and Y coordinates, respectively,
* divided by the maximum radius of the ellipsoid. Height is the unmodified Z coordinate.
- *
* @param {Cartesian3} cartesian The Cartesian position to unproject with height (z) in meters.
* @param {Cartographic} [result] An instance into which to copy the result. If this parameter is
* undefined, a new instance is created and returned.
diff --git a/packages/engine/Source/Core/GeographicTilingScheme.js b/packages/engine/Source/Core/GeographicTilingScheme.js
index 0b2ce78a3576..cea6b8af90d7 100644
--- a/packages/engine/Source/Core/GeographicTilingScheme.js
+++ b/packages/engine/Source/Core/GeographicTilingScheme.js
@@ -11,17 +11,15 @@ import Rectangle from "./Rectangle.js";
* A tiling scheme for geometry referenced to a simple {@link GeographicProjection} where
* longitude and latitude are directly mapped to X and Y. This projection is commonly
* known as geographic, equirectangular, equidistant cylindrical, or plate carrée.
- *
* @alias GeographicTilingScheme
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid whose surface is being tiled. Defaults to
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid whose surface is being tiled. Defaults to
* the WGS84 ellipsoid.
- * @param {Rectangle} [options.rectangle=Rectangle.MAX_VALUE] The rectangle, in radians, covered by the tiling scheme.
- * @param {number} [options.numberOfLevelZeroTilesX=2] The number of tiles in the X direction at level zero of
+ * @param {Rectangle} [options.rectangle] The rectangle, in radians, covered by the tiling scheme.
+ * @param {number} [options.numberOfLevelZeroTilesX] The number of tiles in the X direction at level zero of
* the tile tree.
- * @param {number} [options.numberOfLevelZeroTilesY=1] The number of tiles in the Y direction at level zero of
+ * @param {number} [options.numberOfLevelZeroTilesY] The number of tiles in the Y direction at level zero of
* the tile tree.
*/
function GeographicTilingScheme(options) {
@@ -77,7 +75,6 @@ Object.defineProperties(GeographicTilingScheme.prototype, {
/**
* Gets the total number of tiles in the X direction at a specified level-of-detail.
- *
* @param {number} level The level-of-detail.
* @returns {number} The number of tiles in the X direction at the given level.
*/
@@ -87,7 +84,6 @@ GeographicTilingScheme.prototype.getNumberOfXTilesAtLevel = function (level) {
/**
* Gets the total number of tiles in the Y direction at a specified level-of-detail.
- *
* @param {number} level The level-of-detail.
* @returns {number} The number of tiles in the Y direction at the given level.
*/
@@ -98,7 +94,6 @@ GeographicTilingScheme.prototype.getNumberOfYTilesAtLevel = function (level) {
/**
* Transforms a rectangle specified in geodetic radians to the native coordinate system
* of this tiling scheme.
- *
* @param {Rectangle} rectangle The rectangle to transform.
* @param {Rectangle} [result] The instance to which to copy the result, or undefined if a new instance
* should be created.
@@ -132,7 +127,6 @@ GeographicTilingScheme.prototype.rectangleToNativeRectangle = function (
/**
* Converts tile x, y coordinates and level to a rectangle expressed in the native coordinates
* of the tiling scheme.
- *
* @param {number} x The integer x coordinate of the tile.
* @param {number} y The integer y coordinate of the tile.
* @param {number} level The tile level-of-detail. Zero is the least detailed.
@@ -157,7 +151,6 @@ GeographicTilingScheme.prototype.tileXYToNativeRectangle = function (
/**
* Converts tile x, y coordinates and level to a cartographic rectangle in radians.
- *
* @param {number} x The integer x coordinate of the tile.
* @param {number} y The integer y coordinate of the tile.
* @param {number} level The tile level-of-detail. Zero is the least detailed.
@@ -199,7 +192,6 @@ GeographicTilingScheme.prototype.tileXYToRectangle = function (
/**
* Calculates the tile x, y coordinates of the tile containing
* a given cartographic position.
- *
* @param {Cartographic} position The position.
* @param {number} level The tile level-of-detail. Zero is the least detailed.
* @param {Cartesian2} [result] The instance to which to copy the result, or undefined if a new instance
diff --git a/packages/engine/Source/Core/Geometry.js b/packages/engine/Source/Core/Geometry.js
index d9e6873a919a..65f01a60c2a1 100644
--- a/packages/engine/Source/Core/Geometry.js
+++ b/packages/engine/Source/Core/Geometry.js
@@ -22,16 +22,13 @@ import Transforms from "./Transforms.js";
*
* Geometries can be transformed and optimized using functions in {@link GeometryPipeline}.
*
- *
* @alias Geometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {GeometryAttributes} options.attributes Attributes, which make up the geometry's vertices.
- * @param {PrimitiveType} [options.primitiveType=PrimitiveType.TRIANGLES] The type of primitives in the geometry.
+ * @param {PrimitiveType} [options.primitiveType] The type of primitives in the geometry.
* @param {Uint16Array|Uint32Array} [options.indices] Optional index data that determines the primitives in the geometry.
* @param {BoundingSphere} [options.boundingSphere] An optional bounding sphere that fully enclosed the geometry.
- *
* @see PolygonGeometry
* @see RectangleGeometry
* @see EllipseGeometry
@@ -40,9 +37,7 @@ import Transforms from "./Transforms.js";
* @see SimplePolylineGeometry
* @see BoxGeometry
* @see EllipsoidGeometry
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Geometry%20and%20Appearances.html|Geometry and Appearances Demo}
- *
* @example
* // Create geometry with a position attribute and indexed lines.
* const positions = new Float64Array([
@@ -81,11 +76,11 @@ function Geometry(options) {
* There are reserved attribute names with well-known semantics. The following attributes
* are created by a Geometry (depending on the provided {@link VertexFormat}.
*
- * position
- 3D vertex position. 64-bit floating-point (for precision). 3 components per attribute. See {@link VertexFormat#position}.
- * normal
- Normal (normalized), commonly used for lighting. 32-bit floating-point. 3 components per attribute. See {@link VertexFormat#normal}.
- * st
- 2D texture coordinate. 32-bit floating-point. 2 components per attribute. See {@link VertexFormat#st}.
- * bitangent
- Bitangent (normalized), used for tangent-space effects like bump mapping. 32-bit floating-point. 3 components per attribute. See {@link VertexFormat#bitangent}.
- * tangent
- Tangent (normalized), used for tangent-space effects like bump mapping. 32-bit floating-point. 3 components per attribute. See {@link VertexFormat#tangent}.
+ * position
- 3D vertex position. 64-bit floating-point (for precision). 3 components per attribute. See {@link VertexFormat#position}.
+ * normal
- Normal (normalized), commonly used for lighting. 32-bit floating-point. 3 components per attribute. See {@link VertexFormat#normal}.
+ * st
- 2D texture coordinate. 32-bit floating-point. 2 components per attribute. See {@link VertexFormat#st}.
+ * bitangent
- Bitangent (normalized), used for tangent-space effects like bump mapping. 32-bit floating-point. 3 components per attribute. See {@link VertexFormat#bitangent}.
+ * tangent
- Tangent (normalized), used for tangent-space effects like bump mapping. 32-bit floating-point. 3 components per attribute. See {@link VertexFormat#tangent}.
*
*
*
@@ -93,27 +88,22 @@ function Geometry(options) {
* to a Geometry by a {@link Primitive} or {@link GeometryPipeline} functions to prepare
* the geometry for rendering.
*
- * position3DHigh
- High 32 bits for encoded 64-bit position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
- * position3DLow
- Low 32 bits for encoded 64-bit position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
- * position2DHigh
- High 32 bits for encoded 64-bit 2D (Columbus view) position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
- * position2DLow
- Low 32 bits for encoded 64-bit 2D (Columbus view) position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
- * color
- RGBA color (normalized) usually from {@link GeometryInstance#color}. 32-bit floating-point. 4 components per attribute.
- * pickColor
- RGBA color used for picking. 32-bit floating-point. 4 components per attribute.
+ * position3DHigh
- High 32 bits for encoded 64-bit position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
+ * position3DLow
- Low 32 bits for encoded 64-bit position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
+ * position2DHigh
- High 32 bits for encoded 64-bit 2D (Columbus view) position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
+ * position2DLow
- Low 32 bits for encoded 64-bit 2D (Columbus view) position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
+ * color
- RGBA color (normalized) usually from {@link GeometryInstance#color}. 32-bit floating-point. 4 components per attribute.
+ * pickColor
- RGBA color used for picking. 32-bit floating-point. 4 components per attribute.
*
*
- *
* @type GeometryAttributes
- *
* @default undefined
- *
- *
* @example
* geometry.attributes.position = new Cesium.GeometryAttribute({
* componentDatatype : Cesium.ComponentDatatype.FLOAT,
* componentsPerAttribute : 3,
* values : new Float32Array(0)
* });
- *
* @see GeometryAttribute
* @see VertexFormat
*/
@@ -122,9 +112,7 @@ function Geometry(options) {
/**
* Optional index data that - along with {@link Geometry#primitiveType} -
* determines the primitives in the geometry.
- *
* @type {Array}
- *
* @default undefined
*/
this.indices = options.indices;
@@ -132,9 +120,7 @@ function Geometry(options) {
/**
* The type of primitives in the geometry. This is most often {@link PrimitiveType.TRIANGLES},
* but can varying based on the specific geometry.
- *
* @type PrimitiveType
- *
* @default undefined
*/
this.primitiveType = defaultValue(
@@ -145,9 +131,7 @@ function Geometry(options) {
/**
* An optional bounding sphere that fully encloses the geometry. This is
* commonly used for culling.
- *
* @type BoundingSphere
- *
* @default undefined
*/
this.boundingSphere = options.boundingSphere;
@@ -172,10 +156,8 @@ function Geometry(options) {
/**
* Computes the number of vertices in a geometry. The runtime is linear with
* respect to the number of attributes in a vertex, not the number of vertices.
- *
* @param {Geometry} geometry The geometry.
* @returns {number} The number of vertices in the geometry.
- *
* @example
* const numVertices = Cesium.Geometry.computeNumberOfVertices(geometry);
*/
@@ -242,7 +224,6 @@ const rotation2DScratch = new Matrix2();
*
* RectangleGeometry has its own version of this method that computes remapping coordinates using cartographic space
* as an intermediary instead of local ENU, which is more accurate for large-area rectangles.
- *
* @param {Cartesian3[]} positions Array of positions outlining the geometry
* @param {number} stRotation Texture coordinate rotation.
* @param {Ellipsoid} ellipsoid Ellipsoid for projecting and generating local vectors.
diff --git a/packages/engine/Source/Core/GeometryAttribute.js b/packages/engine/Source/Core/GeometryAttribute.js
index 18c27af5d07e..d3606b058295 100644
--- a/packages/engine/Source/Core/GeometryAttribute.js
+++ b/packages/engine/Source/Core/GeometryAttribute.js
@@ -6,19 +6,14 @@ import DeveloperError from "./DeveloperError.js";
* Values and type information for geometry attributes. A {@link Geometry}
* generally contains one or more attributes. All attributes together form
* the geometry's vertices.
- *
* @alias GeometryAttribute
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {ComponentDatatype} [options.componentDatatype] The datatype of each component in the attribute, e.g., individual elements in values.
* @param {number} [options.componentsPerAttribute] A number between 1 and 4 that defines the number of components in an attributes.
- * @param {boolean} [options.normalize=false] When true
and componentDatatype
is an integer format, indicate that the components should be mapped to the range [0, 1] (unsigned) or [-1, 1] (signed) when they are accessed as floating-point for rendering.
+ * @param {boolean} [options.normalize] When true
and componentDatatype
is an integer format, indicate that the components should be mapped to the range [0, 1] (unsigned) or [-1, 1] (signed) when they are accessed as floating-point for rendering.
* @param {number[]|Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} [options.values] The values for the attributes stored in a typed array.
- *
- * @exception {DeveloperError} options.componentsPerAttribute must be between 1 and 4.
- *
- *
+ * @throws {DeveloperError} options.componentsPerAttribute must be between 1 and 4.
* @example
* const geometry = new Cesium.Geometry({
* attributes : {
@@ -34,7 +29,6 @@ import DeveloperError from "./DeveloperError.js";
* },
* primitiveType : Cesium.PrimitiveType.LINE_LOOP
* });
- *
* @see Geometry
*/
function GeometryAttribute(options) {
@@ -63,9 +57,7 @@ function GeometryAttribute(options) {
/**
* The datatype of each component in the attribute, e.g., individual elements in
* {@link GeometryAttribute#values}.
- *
* @type {ComponentDatatype}
- *
* @default undefined
*/
this.componentDatatype = options.componentDatatype;
@@ -74,11 +66,8 @@ function GeometryAttribute(options) {
* A number between 1 and 4 that defines the number of components in an attributes.
* For example, a position attribute with x, y, and z components would have 3 as
* shown in the code example.
- *
* @type {number}
- *
* @default undefined
- *
* @example
* attribute.componentDatatype = Cesium.ComponentDatatype.FLOAT;
* attribute.componentsPerAttribute = 3;
@@ -97,11 +86,8 @@ function GeometryAttribute(options) {
*
* This is commonly used when storing colors using {@link ComponentDatatype.UNSIGNED_BYTE}.
*
- *
* @type {boolean}
- *
* @default false
- *
* @example
* attribute.componentDatatype = Cesium.ComponentDatatype.UNSIGNED_BYTE;
* attribute.componentsPerAttribute = 4;
@@ -119,11 +105,8 @@ function GeometryAttribute(options) {
* The values for the attributes stored in a typed array. In the code example,
* every three elements in values
defines one attributes since
* componentsPerAttribute
is 3.
- *
* @type {number[]|Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array}
- *
* @default undefined
- *
* @example
* attribute.componentDatatype = Cesium.ComponentDatatype.FLOAT;
* attribute.componentsPerAttribute = 3;
diff --git a/packages/engine/Source/Core/GeometryAttributes.js b/packages/engine/Source/Core/GeometryAttributes.js
index a681ded710bd..bc78bccf09d0 100644
--- a/packages/engine/Source/Core/GeometryAttributes.js
+++ b/packages/engine/Source/Core/GeometryAttributes.js
@@ -6,9 +6,9 @@ import defaultValue from "./defaultValue.js";
*
* Attributes are always stored non-interleaved in a Geometry.
*
- *
+ * @param options
* @alias GeometryAttributes
- * @constructor
+ * @class
*/
function GeometryAttributes(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -18,9 +18,7 @@ function GeometryAttributes(options) {
*
* 64-bit floating-point (for precision). 3 components per attribute.
*
- *
* @type GeometryAttribute
- *
* @default undefined
*/
this.position = options.position;
@@ -30,9 +28,7 @@ function GeometryAttributes(options) {
*
* 32-bit floating-point. 3 components per attribute.
*
- *
* @type GeometryAttribute
- *
* @default undefined
*/
this.normal = options.normal;
@@ -42,9 +38,7 @@ function GeometryAttributes(options) {
*
* 32-bit floating-point. 2 components per attribute
*
- *
* @type GeometryAttribute
- *
* @default undefined
*/
this.st = options.st;
@@ -54,9 +48,7 @@ function GeometryAttributes(options) {
*
* 32-bit floating-point. 3 components per attribute.
*
- *
* @type GeometryAttribute
- *
* @default undefined
*/
this.bitangent = options.bitangent;
@@ -66,9 +58,7 @@ function GeometryAttributes(options) {
*
* 32-bit floating-point. 3 components per attribute.
*
- *
* @type GeometryAttribute
- *
* @default undefined
*/
this.tangent = options.tangent;
@@ -78,9 +68,7 @@ function GeometryAttributes(options) {
*
* 8-bit unsigned integer. 4 components per attribute.
*
- *
* @type GeometryAttribute
- *
* @default undefined
*/
this.color = options.color;
diff --git a/packages/engine/Source/Core/GeometryFactory.js b/packages/engine/Source/Core/GeometryFactory.js
index 10ee22d3cf1e..0658e4e758f9 100644
--- a/packages/engine/Source/Core/GeometryFactory.js
+++ b/packages/engine/Source/Core/GeometryFactory.js
@@ -3,8 +3,7 @@ import DeveloperError from "../Core/DeveloperError.js";
/**
* Base class for all geometry creation utility classes that can be passed to {@link GeometryInstance}
* for asynchronous geometry creation.
- *
- * @constructor
+ * @class
* @class
* @abstract
*/
@@ -14,7 +13,6 @@ function GeometryFactory() {
/**
* Returns a geometry.
- *
* @param {GeometryFactory} geometryFactory A description of the circle.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/GeometryInstance.js b/packages/engine/Source/Core/GeometryInstance.js
index 572d9b81ef68..c51d297f318a 100644
--- a/packages/engine/Source/Core/GeometryInstance.js
+++ b/packages/engine/Source/Core/GeometryInstance.js
@@ -8,17 +8,13 @@ import Matrix4 from "./Matrix4.js";
* different locations and colored uniquely. For example, one {@link BoxGeometry} can
* be instanced several times, each with a different modelMatrix
to change
* its position, rotation, and scale.
- *
* @alias GeometryInstance
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Geometry|GeometryFactory} options.geometry The geometry to instance.
- * @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The model matrix that transforms to transform the geometry from model to world coordinates.
+ * @param {Matrix4} [options.modelMatrix] The model matrix that transforms to transform the geometry from model to world coordinates.
* @param {object} [options.id] A user-defined object to return when the instance is picked with {@link Scene#pick} or get/set per-instance attributes with {@link Primitive#getGeometryInstanceAttributes}.
* @param {object} [options.attributes] Per-instance attributes like a show or color attribute shown in the example below.
- *
- *
* @example
* // Create geometry for a box, and two instances that refer to it.
* // One instance positions the box on the bottom and colored aqua.
@@ -45,7 +41,6 @@ import Matrix4 from "./Matrix4.js";
* },
* id : 'top'
* });
- *
* @see Geometry
*/
function GeometryInstance(options) {
@@ -59,9 +54,7 @@ function GeometryInstance(options) {
/**
* The geometry being instanced.
- *
* @type Geometry
- *
* @default undefined
*/
this.geometry = options.geometry;
@@ -71,9 +64,7 @@ function GeometryInstance(options) {
* When this is the identity matrix, the geometry is drawn in world coordinates, i.e., Earth's WGS84 coordinates.
* Local reference frames can be used by providing a different transformation matrix, like that returned
* by {@link Transforms.eastNorthUpToFixedFrame}.
- *
* @type Matrix4
- *
* @default Matrix4.IDENTITY
*/
this.modelMatrix = Matrix4.clone(
@@ -82,11 +73,8 @@ function GeometryInstance(options) {
/**
* User-defined object returned when the instance is picked or used to get/set per-instance attributes.
- *
* @type {object}
- *
* @default undefined
- *
* @see Scene#pick
* @see Primitive#getGeometryInstanceAttributes
*/
@@ -94,7 +82,6 @@ function GeometryInstance(options) {
/**
* Used for picking primitives that wrap geometry instances.
- *
* @private
*/
this.pickPrimitive = options.pickPrimitive;
@@ -102,9 +89,7 @@ function GeometryInstance(options) {
/**
* Per-instance attributes like {@link ColorGeometryInstanceAttribute} or {@link ShowGeometryInstanceAttribute}.
* {@link Geometry} attributes varying per vertex; these attributes are constant for the entire instance.
- *
* @type {object}
- *
* @default undefined
*/
this.attributes = defaultValue(options.attributes, {});
diff --git a/packages/engine/Source/Core/GeometryInstanceAttribute.js b/packages/engine/Source/Core/GeometryInstanceAttribute.js
index f857326cf747..18c35a7614b9 100644
--- a/packages/engine/Source/Core/GeometryInstanceAttribute.js
+++ b/packages/engine/Source/Core/GeometryInstanceAttribute.js
@@ -4,19 +4,14 @@ import DeveloperError from "./DeveloperError.js";
/**
* Values and type information for per-instance geometry attributes.
- *
* @alias GeometryInstanceAttribute
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {ComponentDatatype} options.componentDatatype The datatype of each component in the attribute, e.g., individual elements in values.
* @param {number} options.componentsPerAttribute A number between 1 and 4 that defines the number of components in an attributes.
- * @param {boolean} [options.normalize=false] When true
and componentDatatype
is an integer format, indicate that the components should be mapped to the range [0, 1] (unsigned) or [-1, 1] (signed) when they are accessed as floating-point for rendering.
+ * @param {boolean} [options.normalize] When true
and componentDatatype
is an integer format, indicate that the components should be mapped to the range [0, 1] (unsigned) or [-1, 1] (signed) when they are accessed as floating-point for rendering.
* @param {number[]} options.value The value for the attribute.
- *
- * @exception {DeveloperError} options.componentsPerAttribute must be between 1 and 4.
- *
- *
+ * @throws {DeveloperError} options.componentsPerAttribute must be between 1 and 4.
* @example
* const instance = new Cesium.GeometryInstance({
* geometry : Cesium.BoxGeometry.fromDimensions({
@@ -34,7 +29,6 @@ import DeveloperError from "./DeveloperError.js";
* })
* }
* });
- *
* @see ColorGeometryInstanceAttribute
* @see ShowGeometryInstanceAttribute
* @see DistanceDisplayConditionGeometryInstanceAttribute
@@ -65,9 +59,7 @@ function GeometryInstanceAttribute(options) {
/**
* The datatype of each component in the attribute, e.g., individual elements in
* {@link GeometryInstanceAttribute#value}.
- *
* @type ComponentDatatype
- *
* @default undefined
*/
this.componentDatatype = options.componentDatatype;
@@ -76,11 +68,8 @@ function GeometryInstanceAttribute(options) {
* A number between 1 and 4 that defines the number of components in an attributes.
* For example, a position attribute with x, y, and z components would have 3 as
* shown in the code example.
- *
* @type {number}
- *
* @default undefined
- *
* @example
* show : new Cesium.GeometryInstanceAttribute({
* componentDatatype : Cesium.ComponentDatatype.UNSIGNED_BYTE,
@@ -98,11 +87,8 @@ function GeometryInstanceAttribute(options) {
*
* This is commonly used when storing colors using {@link ComponentDatatype.UNSIGNED_BYTE}.
*
- *
* @type {boolean}
- *
* @default false
- *
* @example
* attribute.componentDatatype = Cesium.ComponentDatatype.UNSIGNED_BYTE;
* attribute.componentsPerAttribute = 4;
@@ -120,11 +106,8 @@ function GeometryInstanceAttribute(options) {
* The values for the attributes stored in a typed array. In the code example,
* every three elements in values
defines one attributes since
* componentsPerAttribute
is 3.
- *
* @type {number[]}
- *
* @default undefined
- *
* @example
* show : new Cesium.GeometryInstanceAttribute({
* componentDatatype : Cesium.ComponentDatatype.UNSIGNED_BYTE,
diff --git a/packages/engine/Source/Core/GeometryPipeline.js b/packages/engine/Source/Core/GeometryPipeline.js
index 37e56ec2a16b..d7633ca5dcd2 100644
--- a/packages/engine/Source/Core/GeometryPipeline.js
+++ b/packages/engine/Source/Core/GeometryPipeline.js
@@ -26,9 +26,7 @@ import Tipsify from "./Tipsify.js";
/**
* Content pipeline functions for geometries.
- *
* @namespace GeometryPipeline
- *
* @see Geometry
*/
const GeometryPipeline = {};
@@ -107,12 +105,9 @@ function triangleFanToLines(triangles) {
*
* This is commonly used to create a wireframe geometry for visual debugging.
*
- *
* @param {Geometry} geometry The geometry to modify.
* @returns {Geometry} The modified geometry
argument, with its triangle indices converted to lines.
- *
- * @exception {DeveloperError} geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN.
- *
+ * @throws {DeveloperError} geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN.
* @example
* geometry = Cesium.GeometryPipeline.toWireframe(geometry);
*/
@@ -153,14 +148,11 @@ GeometryPipeline.toWireframe = function (geometry) {
* Creates a new {@link Geometry} with LINES
representing the provided
* attribute (attributeName
) for the provided geometry. This is used to
* visualize vector attributes like normals, tangents, and bitangents.
- *
* @param {Geometry} geometry The Geometry
instance with the attribute.
- * @param {string} [attributeName='normal'] The name of the attribute.
- * @param {number} [length=10000.0] The length of each line segment in meters. This can be negative to point the vector in the opposite direction.
+ * @param {string} [attributeName] The name of the attribute.
+ * @param {number} [length] The length of each line segment in meters. This can be negative to point the vector in the opposite direction.
* @returns {Geometry} A new Geometry
instance with line segments for the vector.
- *
- * @exception {DeveloperError} geometry.attributes must have an attribute with the same name as the attributeName parameter.
- *
+ * @throws {DeveloperError} geometry.attributes must have an attribute with the same name as the attributeName parameter.
* @example
* const geometry = Cesium.GeometryPipeline.createLineSegmentsForVectors(instance.geometry, 'bitangent', 100000.0);
*/
@@ -226,10 +218,8 @@ GeometryPipeline.createLineSegmentsForVectors = function (
/**
* Creates an object that maps attribute names to unique locations (indices)
* for matching vertex attributes and shader programs.
- *
* @param {Geometry} geometry The geometry, which is not modified, to create the object for.
* @returns {object} An object with attribute name / index pairs.
- *
* @example
* const attributeLocations = Cesium.GeometryPipeline.createAttributeLocations(geometry);
* // Example output
@@ -301,16 +291,11 @@ GeometryPipeline.createAttributeLocations = function (geometry) {
/**
* Reorders a geometry's attributes and indices
to achieve better performance from the GPU's pre-vertex-shader cache.
- *
* @param {Geometry} geometry The geometry to modify.
* @returns {Geometry} The modified geometry
argument, with its attributes and indices reordered for the GPU's pre-vertex-shader cache.
- *
- * @exception {DeveloperError} Each attribute array in geometry.attributes must have the same number of attributes.
- *
- *
+ * @throws {DeveloperError} Each attribute array in geometry.attributes must have the same number of attributes.
* @example
* geometry = Cesium.GeometryPipeline.reorderForPreVertexCache(geometry);
- *
* @see GeometryPipeline.reorderForPostVertexCache
*/
GeometryPipeline.reorderForPreVertexCache = function (geometry) {
@@ -392,17 +377,12 @@ GeometryPipeline.reorderForPreVertexCache = function (geometry) {
* Reorders a geometry's indices
to achieve better performance from the GPU's
* post vertex-shader cache by using the Tipsify algorithm. If the geometry primitiveType
* is not TRIANGLES
or the geometry does not have an indices
, this function has no effect.
- *
* @param {Geometry} geometry The geometry to modify.
- * @param {number} [cacheCapacity=24] The number of vertices that can be held in the GPU's vertex cache.
+ * @param {number} [cacheCapacity] The number of vertices that can be held in the GPU's vertex cache.
* @returns {Geometry} The modified geometry
argument, with its indices reordered for the post-vertex-shader cache.
- *
- * @exception {DeveloperError} cacheCapacity must be greater than two.
- *
- *
+ * @throws {DeveloperError} cacheCapacity must be greater than two.
* @example
* geometry = Cesium.GeometryPipeline.reorderForPostVertexCache(geometry);
- *
* @see GeometryPipeline.reorderForPreVertexCache
* @see {@link http://gfx.cs.princ0eton.edu/pubs/Sander_2007_%3ETR/tipsy.pdf|Fast Triangle Reordering for Vertex Locality and Reduced Overdraw}
* by Sander, Nehab, and Barczak
@@ -483,13 +463,10 @@ function copyVertex(destinationAttributes, sourceAttributes, index) {
*
* If the geometry does not have any indices
, this function has no effect.
*
- *
* @param {Geometry} geometry The geometry to be split into multiple geometries.
* @returns {Geometry[]} An array of geometries, each with indices that fit into unsigned shorts.
- *
- * @exception {DeveloperError} geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS
- * @exception {DeveloperError} All geometry attribute lists must have the same number of attributes.
- *
+ * @throws {DeveloperError} geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS
+ * @throws {DeveloperError} All geometry attribute lists must have the same number of attributes.
* @example
* const geometries = Cesium.GeometryPipeline.fitToUnsignedShortIndices(geometry);
*/
@@ -599,18 +576,15 @@ const scratchProjectTo2DCartographic = new Cartographic();
*
* If the geometry does not have a position
, this function has no effect.
*
- *
* @param {Geometry} geometry The geometry to modify.
* @param {string} attributeName The name of the attribute.
* @param {string} attributeName3D The name of the attribute in 3D.
* @param {string} attributeName2D The name of the attribute in 2D.
- * @param {object} [projection=new GeographicProjection()] The projection to use.
+ * @param {object} [projection] The projection to use.
* @returns {Geometry} The modified geometry
argument with position3D
and position2D
attributes.
- *
- * @exception {DeveloperError} geometry must have attribute matching the attributeName argument.
- * @exception {DeveloperError} The attribute componentDatatype must be ComponentDatatype.DOUBLE.
- * @exception {DeveloperError} Could not project a point to 2D.
- *
+ * @throws {DeveloperError} geometry must have attribute matching the attributeName argument.
+ * @throws {DeveloperError} The attribute componentDatatype must be ComponentDatatype.DOUBLE.
+ * @throws {DeveloperError} Could not project a point to 2D.
* @example
* geometry = Cesium.GeometryPipeline.projectTo2D(geometry, 'position', 'position3D', 'position2D');
*/
@@ -712,16 +686,13 @@ const encodedResult = {
*
* This is commonly used to create high-precision position vertex attributes.
*
- *
* @param {Geometry} geometry The geometry to modify.
* @param {string} attributeName The name of the attribute.
* @param {string} attributeHighName The name of the attribute for the encoded high bits.
* @param {string} attributeLowName The name of the attribute for the encoded low bits.
* @returns {Geometry} The modified geometry
argument, with its encoded attribute.
- *
- * @exception {DeveloperError} geometry must have attribute matching the attributeName argument.
- * @exception {DeveloperError} The attribute componentDatatype must be ComponentDatatype.DOUBLE.
- *
+ * @throws {DeveloperError} geometry must have attribute matching the attributeName argument.
+ * @throws {DeveloperError} The attribute componentDatatype must be ComponentDatatype.DOUBLE.
* @example
* geometry = Cesium.GeometryPipeline.encodeAttribute(geometry, 'position3D', 'position3DHigh', 'position3DLow');
*/
@@ -826,10 +797,8 @@ const normalMatrix = new Matrix3();
* the instance's modelMatrix
to {@link Matrix4.IDENTITY} and transforms the
* following attributes if they are present: position
, normal
,
* tangent
, and bitangent
.
- *
* @param {GeometryInstance} instance The geometry instance to modify.
* @returns {GeometryInstance} The modified instance
argument, with its attributes transforms to world coordinates.
- *
* @example
* Cesium.GeometryPipeline.transformToWorldCoordinates(instance);
*/
@@ -1080,23 +1049,17 @@ function combineGeometries(instances, propertyName) {
*
* This is used by {@link Primitive} to efficiently render a large amount of static data.
*
- *
* @private
- *
* @param {GeometryInstance[]} [instances] The array of {@link GeometryInstance} objects whose geometry will be combined.
* @returns {Geometry} A single geometry created from the provided geometry instances.
- *
- * @exception {DeveloperError} All instances must have the same modelMatrix.
- * @exception {DeveloperError} All instance geometries must have an indices or not have one.
- * @exception {DeveloperError} All instance geometries must have the same primitiveType.
- *
- *
+ * @throws {DeveloperError} All instances must have the same modelMatrix.
+ * @throws {DeveloperError} All instance geometries must have an indices or not have one.
+ * @throws {DeveloperError} All instance geometries must have the same primitiveType.
* @example
* for (let i = 0; i < instances.length; ++i) {
* Cesium.GeometryPipeline.transformToWorldCoordinates(instances[i]);
* }
* const geometries = Cesium.GeometryPipeline.combineInstances(instances);
- *
* @see GeometryPipeline.transformToWorldCoordinates
*/
GeometryPipeline.combineInstances = function (instances) {
@@ -1150,13 +1113,10 @@ const v2 = new Cartesian3();
* Computes per-vertex normals for a geometry containing TRIANGLES
by averaging the normals of
* all triangles incident to the vertex. The result is a new normal
attribute added to the geometry.
* This assumes a counter-clockwise winding order.
- *
* @param {Geometry} geometry The geometry to modify.
* @returns {Geometry} The modified geometry
argument with the computed normal
attribute.
- *
- * @exception {DeveloperError} geometry.indices length must be greater than 0 and be a multiple of 3.
- * @exception {DeveloperError} geometry.primitiveType must be {@link PrimitiveType.TRIANGLES}.
- *
+ * @throws {DeveloperError} geometry.indices length must be greater than 0 and be a multiple of 3.
+ * @throws {DeveloperError} geometry.primitiveType must be {@link PrimitiveType.TRIANGLES}.
* @example
* Cesium.GeometryPipeline.computeNormal(geometry);
*/
@@ -1321,13 +1281,10 @@ const tScratch = new Cartesian3();
* Based on Computing Tangent Space Basis Vectors
* for an Arbitrary Mesh by Eric Lengyel.
*
- *
* @param {Geometry} geometry The geometry to modify.
* @returns {Geometry} The modified geometry
argument with the computed tangent
and bitangent
attributes.
- *
- * @exception {DeveloperError} geometry.indices length must be greater than 0 and be a multiple of 3.
- * @exception {DeveloperError} geometry.primitiveType must be {@link PrimitiveType.TRIANGLES}.
- *
+ * @throws {DeveloperError} geometry.indices length must be greater than 0 and be a multiple of 3.
+ * @throws {DeveloperError} geometry.primitiveType must be {@link PrimitiveType.TRIANGLES}.
* @example
* Cesium.GeometryPipeline.computeTangentAndBiTangent(geometry);
*/
@@ -1471,10 +1428,8 @@ const toEncode3 = new Cartesian3();
let encodeResult2 = new Cartesian2();
/**
* Compresses and packs geometry normal attribute values to save memory.
- *
* @param {Geometry} geometry The geometry to modify.
* @returns {Geometry} The modified geometry
argument, with its normals compressed and packed.
- *
* @example
* geometry = Cesium.GeometryPipeline.compressVertices(geometry);
*/
@@ -3241,12 +3196,9 @@ function splitLongitudePolyline(instance) {
* intersect the International Date Line and Prime Meridian so that no primitives cross longitude
* -180/180 degrees. This is not required for 3D drawing, but is required for
* correcting drawing in 2D and Columbus view.
- *
* @private
- *
* @param {GeometryInstance} instance The instance to modify.
* @returns {GeometryInstance} The modified instance
argument, with it's geometry split at the International Date Line.
- *
* @example
* instance = Cesium.GeometryPipeline.splitLongitude(instance);
*/
diff --git a/packages/engine/Source/Core/GoogleEarthEnterpriseMetadata.js b/packages/engine/Source/Core/GoogleEarthEnterpriseMetadata.js
index 4cbb8c58a9fa..81e30cbeae43 100644
--- a/packages/engine/Source/Core/GoogleEarthEnterpriseMetadata.js
+++ b/packages/engine/Source/Core/GoogleEarthEnterpriseMetadata.js
@@ -35,14 +35,12 @@ const defaultKey = stringToBuffer(
*
*
* Provides metadata using the Google Earth Enterprise REST API. This is used by the GoogleEarthEnterpriseImageryProvider
- * and GoogleEarthEnterpriseTerrainProvider to share metadata requests.
- *
+ * and GoogleEarthEnterpriseTerrainProvider to share metadata requests.
+ * @param resourceOrUrl
* @alias GoogleEarthEnterpriseMetadata
- * @constructor
- *
+ * @class
* @see GoogleEarthEnterpriseImageryProvider
* @see GoogleEarthEnterpriseTerrainProvider
- *
*/
function GoogleEarthEnterpriseMetadata(resourceOrUrl) {
/**
@@ -140,9 +138,7 @@ Object.defineProperties(GoogleEarthEnterpriseMetadata.prototype, {
/**
* Creates a metadata object using the Google Earth Enterprise REST API. This is used by the GoogleEarthEnterpriseImageryProvider
* and GoogleEarthEnterpriseTerrainProvider to share metadata requests.
- *
- * @param {Resource|String} resourceOrUrl The url of the Google Earth Enterprise server hosting the imagery.
- *
+ * @param {Resource | string} resourceOrUrl The url of the Google Earth Enterprise server hosting the imagery.
* @returns {Promise} A promise which resolves to the created GoogleEarthEnterpriseMetadata instance/
*/
GoogleEarthEnterpriseMetadata.fromUrl = async function (resourceOrUrl) {
@@ -182,11 +178,9 @@ GoogleEarthEnterpriseMetadata.fromUrl = async function (resourceOrUrl) {
/**
* Converts a tiles (x, y, level) position into a quadkey used to request an image
* from a Google Earth Enterprise server.
- *
* @param {number} x The tile's x coordinate.
* @param {number} y The tile's y coordinate.
* @param {number} level The tile's zoom level.
- *
* @see GoogleEarthEnterpriseMetadata#quadKeyToTileXY
*/
GoogleEarthEnterpriseMetadata.tileXYToQuadKey = function (x, y, level) {
@@ -224,9 +218,7 @@ GoogleEarthEnterpriseMetadata.tileXYToQuadKey = function (x, y, level) {
/**
* Converts a tile's quadkey used to request an image from a Google Earth Enterprise server into the
* (x, y, level) position.
- *
* @param {string} quadkey The tile's quad key
- *
* @see GoogleEarthEnterpriseMetadata#tileXYToQuadKey
*/
GoogleEarthEnterpriseMetadata.quadKeyToTileXY = function (quadkey) {
@@ -292,11 +284,9 @@ const taskProcessor = new TaskProcessor("decodeGoogleEarthEnterprisePacket");
/**
* Retrieves a Google Earth Enterprise quadtree packet.
- *
- * @param {string} [quadKey=''] The quadkey to retrieve the packet for.
- * @param {number} [version=1] The cnode version to be used in the request.
+ * @param {string} [quadKey] The quadkey to retrieve the packet for.
+ * @param {number} [version] The cnode version to be used in the request.
* @param {Request} [request] The request object. Intended for internal use only.
- *
* @private
*/
GoogleEarthEnterpriseMetadata.prototype.getQuadTreePacket = function (
@@ -371,14 +361,11 @@ GoogleEarthEnterpriseMetadata.prototype.getQuadTreePacket = function (
/**
* Populates the metadata subtree down to the specified tile.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
* @param {Request} [request] The request object. Intended for internal use only.
- *
* @returns {Promise} A promise that resolves to the tile info for the requested quad key
- *
* @private
*/
GoogleEarthEnterpriseMetadata.prototype.populateSubtree = function (
@@ -458,12 +445,10 @@ function populateSubtree(that, quadKey, request) {
/**
* Gets information about a tile
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
* @returns {GoogleEarthEnterpriseTileInformation|undefined} Information about the tile or undefined if it isn't loaded.
- *
* @private
*/
GoogleEarthEnterpriseMetadata.prototype.getTileInformation = function (
@@ -477,10 +462,8 @@ GoogleEarthEnterpriseMetadata.prototype.getTileInformation = function (
/**
* Gets information about a tile from a quadKey
- *
* @param {string} quadkey The quadkey for the tile
* @returns {GoogleEarthEnterpriseTileInformation|undefined} Information about the tile or undefined if it isn't loaded.
- *
* @private
*/
GoogleEarthEnterpriseMetadata.prototype.getTileInformationFromQuadKey = function (
diff --git a/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainData.js b/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainData.js
index f343aff99575..3438c0018f76 100644
--- a/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainData.js
+++ b/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainData.js
@@ -18,15 +18,13 @@ import TerrainMesh from "./TerrainMesh.js";
/**
* Terrain data for a single tile from a Google Earth Enterprise server.
- *
* @alias GoogleEarthEnterpriseTerrainData
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {ArrayBuffer} options.buffer The buffer containing terrain data.
* @param {number} options.negativeAltitudeExponentBias Multiplier for negative terrain heights that are encoded as very small positive values.
* @param {number} options.negativeElevationThreshold Threshold for negative values
- * @param {number} [options.childTileMask=15] A bit mask indicating which of this tile's four children exist.
+ * @param {number} [options.childTileMask] A bit mask indicating which of this tile's four children exist.
* If a child's bit is set, geometry will be requested for that tile as well when it
* is needed. If the bit is cleared, the child tile is not requested and geometry is
* instead upsampled from the parent. The bit values are as follows:
@@ -37,11 +35,9 @@ import TerrainMesh from "./TerrainMesh.js";
* 2 4 Northeast
* 3 8 Northwest
*
- * @param {boolean} [options.createdByUpsampling=false] True if this instance was created by upsampling another instance;
+ * @param {boolean} [options.createdByUpsampling] True if this instance was created by upsampling another instance;
* otherwise, false.
* @param {Credit[]} [options.credits] Array of credits for this tile.
- *
- *
* @example
* const buffer = ...
* const childTileMask = ...
@@ -49,7 +45,6 @@ import TerrainMesh from "./TerrainMesh.js";
* buffer : heightBuffer,
* childTileMask : childTileMask
* });
- *
* @see TerrainData
* @see HeightmapTerrainData
* @see QuantizedMeshTerrainData
@@ -129,17 +124,15 @@ const rectangleScratch = new Rectangle();
/**
* Creates a {@link TerrainMesh} from this terrain data.
- *
* @private
- *
* @param {object} options Object with the following properties:
* @param {TilingScheme} options.tilingScheme The tiling scheme to which this tile belongs.
* @param {number} options.x The X coordinate of the tile for which to create the terrain data.
* @param {number} options.y The Y coordinate of the tile for which to create the terrain data.
* @param {number} options.level The level of the tile for which to create the terrain data.
- * @param {number} [options.exaggeration=1.0] The scale used to exaggerate the terrain.
- * @param {number} [options.exaggerationRelativeHeight=0.0] The height from which terrain is exaggerated.
- * @param {boolean} [options.throttle=true] If true, indicates that this operation will need to be retried if too many asynchronous mesh creations are already in progress.
+ * @param {number} [options.exaggeration] The scale used to exaggerate the terrain.
+ * @param {number} [options.exaggerationRelativeHeight] The height from which terrain is exaggerated.
+ * @param {boolean} [options.throttle] If true, indicates that this operation will need to be retried if too many asynchronous mesh creations are already in progress.
* @returns {Promise|undefined} A promise for the terrain mesh, or undefined if too many
* asynchronous mesh creations are already in progress and the operation should
* be retried later.
@@ -235,7 +228,6 @@ GoogleEarthEnterpriseTerrainData.prototype.createMesh = function (options) {
/**
* Computes the terrain height at a specified longitude and latitude.
- *
* @param {Rectangle} rectangle The rectangle covered by this terrain data.
* @param {number} longitude The longitude in radians.
* @param {number} latitude The latitude in radians.
@@ -274,7 +266,6 @@ const upsampleTaskProcessor = new TaskProcessor(
/**
* Upsamples this terrain data for use by a descendant tile. The resulting instance will contain a subset of the
* height samples in this instance, interpolated if necessary.
- *
* @param {TilingScheme} tilingScheme The tiling scheme of this terrain data.
* @param {number} thisX The X coordinate of this tile in the tiling scheme.
* @param {number} thisY The Y coordinate of this tile in the tiling scheme.
@@ -386,7 +377,6 @@ GoogleEarthEnterpriseTerrainData.prototype.upsample = function (
* {@link HeightmapTerrainData.childTileMask}. The given child tile coordinates are assumed
* to be one of the four children of this tile. If non-child tile coordinates are
* given, the availability of the southeast child tile is returned.
- *
* @param {number} thisX The tile X coordinate of this (the parent) tile.
* @param {number} thisY The tile Y coordinate of this (the parent) tile.
* @param {number} childX The tile X coordinate of the child tile to check for availability.
@@ -422,7 +412,6 @@ GoogleEarthEnterpriseTerrainData.prototype.isChildAvailable = function (
* terrain data. If this value is false, the data was obtained from some other source, such
* as by downloading it from a remote server. This method should return true for instances
* returned from a call to {@link HeightmapTerrainData#upsample}.
- *
* @returns {boolean} True if this instance was created by upsampling; otherwise, false.
*/
GoogleEarthEnterpriseTerrainData.prototype.wasCreatedByUpsampling = function () {
diff --git a/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainProvider.js b/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainProvider.js
index acfb9349ad40..1e54829da9df 100644
--- a/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainProvider.js
+++ b/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainProvider.js
@@ -65,10 +65,9 @@ TerrainCache.prototype.tidy = function () {
};
/**
- * @typedef {Object} GoogleEarthEnterpriseTerrainProvider.ConstructorOptions
+ * @typedef {object} GoogleEarthEnterpriseTerrainProvider.ConstructorOptions
*
* Initialization options for GoogleEarthEnterpriseTerrainProvider constructor
- *
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
* @property {Credit|string} [credit] A credit for the data source, which is displayed on the canvas.
*/
@@ -79,21 +78,16 @@ TerrainCache.prototype.tidy = function () {
*
*
* Provides tiled terrain using the Google Earth Enterprise REST API.
- *
* @alias GoogleEarthEnterpriseTerrainProvider
- * @constructor
- *
+ * @class
* @param {GoogleEarthEnterpriseTerrainProvider.ConstructorOptions} [options] An object describing initialization options
- *
* @see GoogleEarthEnterpriseTerrainProvider.fromMetadata
* @see GoogleEarthEnterpriseMetadata.fromUrl
* @see GoogleEarthEnterpriseImageryProvider
* @see CesiumTerrainProvider
- *
* @example
* const geeMetadata = await GoogleEarthEnterpriseMetadata.fromUrl("http://www.example.com");
* const gee = Cesium.GoogleEarthEnterpriseTerrainProvider.fromMetadata(geeMetadata);
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
*/
function GoogleEarthEnterpriseTerrainProvider(options) {
@@ -234,15 +228,11 @@ Object.defineProperties(GoogleEarthEnterpriseTerrainProvider.prototype, {
/**
* Creates a GoogleEarthTerrainProvider from GoogleEarthEnterpriseMetadata
- *
* @param {GoogleEarthEnterpriseMetadata} metadata A metadata object that can be used to share metadata requests with a GoogleEarthEnterpriseImageryProvider.
* @param {GoogleEarthEnterpriseTerrainProvider.ConstructorOptions} options An object describing initialization options
* @returns {GoogleEarthEnterpriseTerrainProvider}
- *
* @see GoogleEarthEnterpriseMetadata.fromUrl
- *
- * @exception {RuntimeError} metadata does not specify terrain
- *
+ * @throws {RuntimeError} metadata does not specify terrain
* @example
* const geeMetadata = await GoogleEarthEnterpriseMetadata.fromUrl("http://www.example.com");
* const gee = Cesium.GoogleEarthEnterpriseTerrainProvider.fromMetadata(geeMetadata);
@@ -289,7 +279,6 @@ function computeChildMask(quadKey, info, metadata) {
/**
* Requests the geometry for a given tile. The result must include terrain data and
* may optionally include a water mask and an indication of which child tiles are available.
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -482,7 +471,6 @@ GoogleEarthEnterpriseTerrainProvider.prototype.requestTileGeometry = function (
/**
* Gets the maximum geometric error allowed in a tile at a given level.
- *
* @param {number} level The tile level for which to get the maximum geometric error.
* @returns {number} The maximum geometric error.
*/
@@ -494,7 +482,6 @@ GoogleEarthEnterpriseTerrainProvider.prototype.getLevelMaximumGeometricError = f
/**
* Determines whether data for a tile is available to be loaded.
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -551,7 +538,6 @@ GoogleEarthEnterpriseTerrainProvider.prototype.getTileDataAvailable = function (
/**
* Makes sure we load availability data for a tile
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
diff --git a/packages/engine/Source/Core/GoogleEarthEnterpriseTileInformation.js b/packages/engine/Source/Core/GoogleEarthEnterpriseTileInformation.js
index e1caecb56ae5..8172c7462a08 100644
--- a/packages/engine/Source/Core/GoogleEarthEnterpriseTileInformation.js
+++ b/packages/engine/Source/Core/GoogleEarthEnterpriseTileInformation.js
@@ -10,14 +10,12 @@ const terrainBitmask = 0x80;
/**
* Contains information about each tile from a Google Earth Enterprise server
- *
* @param {number} bits Bitmask that contains the type of data and available children for each tile.
* @param {number} cnodeVersion Version of the request for subtree metadata.
* @param {number} imageryVersion Version of the request for imagery tile.
* @param {number} terrainVersion Version of the request for terrain tile.
* @param {number} imageryProvider Id of imagery provider.
* @param {number} terrainProvider Id of terrain provider.
- *
* @private
*/
function GoogleEarthEnterpriseTileInformation(
@@ -40,7 +38,6 @@ function GoogleEarthEnterpriseTileInformation(
/**
* Creates GoogleEarthEnterpriseTileInformation from an object
- *
* @param {object} info Object to be cloned
* @param {GoogleEarthEnterpriseTileInformation} [result] The object onto which to store the result.
* @returns {GoogleEarthEnterpriseTileInformation} The modified result parameter or a new GoogleEarthEnterpriseTileInformation instance if none was provided.
@@ -71,7 +68,6 @@ GoogleEarthEnterpriseTileInformation.clone = function (info, result) {
/**
* Sets the parent for the tile
- *
* @param {GoogleEarthEnterpriseTileInformation} parent Parent tile
*/
GoogleEarthEnterpriseTileInformation.prototype.setParent = function (parent) {
@@ -80,7 +76,6 @@ GoogleEarthEnterpriseTileInformation.prototype.setParent = function (parent) {
/**
* Gets whether a subtree is available
- *
* @returns {boolean} true if subtree is available, false otherwise.
*/
GoogleEarthEnterpriseTileInformation.prototype.hasSubtree = function () {
@@ -89,7 +84,6 @@ GoogleEarthEnterpriseTileInformation.prototype.hasSubtree = function () {
/**
* Gets whether imagery is available
- *
* @returns {boolean} true if imagery is available, false otherwise.
*/
GoogleEarthEnterpriseTileInformation.prototype.hasImagery = function () {
@@ -98,7 +92,6 @@ GoogleEarthEnterpriseTileInformation.prototype.hasImagery = function () {
/**
* Gets whether terrain is available
- *
* @returns {boolean} true if terrain is available, false otherwise.
*/
GoogleEarthEnterpriseTileInformation.prototype.hasTerrain = function () {
@@ -107,7 +100,6 @@ GoogleEarthEnterpriseTileInformation.prototype.hasTerrain = function () {
/**
* Gets whether any children are present
- *
* @returns {boolean} true if any children are available, false otherwise.
*/
GoogleEarthEnterpriseTileInformation.prototype.hasChildren = function () {
@@ -116,9 +108,7 @@ GoogleEarthEnterpriseTileInformation.prototype.hasChildren = function () {
/**
* Gets whether a specified child is available
- *
* @param {number} index Index of child tile
- *
* @returns {boolean} true if child is available, false otherwise
*/
GoogleEarthEnterpriseTileInformation.prototype.hasChild = function (index) {
@@ -127,7 +117,6 @@ GoogleEarthEnterpriseTileInformation.prototype.hasChild = function (index) {
/**
* Gets bitmask containing children
- *
* @returns {number} Children bitmask
*/
GoogleEarthEnterpriseTileInformation.prototype.getChildBitmask = function () {
diff --git a/packages/engine/Source/Core/GoogleMaps.js b/packages/engine/Source/Core/GoogleMaps.js
index 6a15e5d0d509..0bce7a3c79d9 100644
--- a/packages/engine/Source/Core/GoogleMaps.js
+++ b/packages/engine/Source/Core/GoogleMaps.js
@@ -6,24 +6,20 @@ import Resource from "./Resource.js";
*
* An API key is only required if you are directly using any Google Maps APIs, such as through {@link createGooglePhotorealistic3DTileset}.
* Follow instructions for managing API keys for the Google Maps Platform at {@link https://developers.google.com/maps/documentation/embed/get-api-key}
- *
* @see createGooglePhotorealistic3DTileset
* @see https://developers.google.com/maps/documentation/embed/get-api-key
- *
* @namespace GoogleMaps
*/
const GoogleMaps = {};
/**
* Gets or sets the default Google Maps API key.
- *
* @type {undefined|string}
*/
GoogleMaps.defaultApiKey = undefined;
/**
* Gets or sets the default Google Map Tiles API endpoint.
- *
* @type {string|Resource}
* @default https://tile.googleapis.com/v1/
*/
diff --git a/packages/engine/Source/Core/GregorianDate.js b/packages/engine/Source/Core/GregorianDate.js
index 4fb7446d61db..d49132df5e3c 100644
--- a/packages/engine/Source/Core/GregorianDate.js
+++ b/packages/engine/Source/Core/GregorianDate.js
@@ -9,8 +9,7 @@ const daysInYear = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
* Represents a Gregorian date in a more precise format than the JavaScript Date object.
* In addition to submillisecond precision, this object can also represent leap seconds.
* @alias GregorianDate
- * @constructor
- *
+ * @class
* @param {number} [year] The year as a whole number.
* @param {number} [month] The month as a whole number with range [1, 12].
* @param {number} [day] The day of the month as a whole number starting at 1.
@@ -19,7 +18,6 @@ const daysInYear = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
* @param {number} [second] The second of the minute as a whole number with range [0, 60], with 60 representing a leap second.
* @param {number} [millisecond] The millisecond of the second as a floating point number with range [0.0, 1000.0).
* @param {boolean} [isLeapSecond] Whether this time is during a leap second.
- *
* @see JulianDate#toGregorianDate
*/
function GregorianDate(
diff --git a/packages/engine/Source/Core/GroundPolylineGeometry.js b/packages/engine/Source/Core/GroundPolylineGeometry.js
index 6e05f930f4bb..cb7afce3afa8 100644
--- a/packages/engine/Source/Core/GroundPolylineGeometry.js
+++ b/packages/engine/Source/Core/GroundPolylineGeometry.js
@@ -45,21 +45,16 @@ const WALL_INITIAL_MAX_HEIGHT = 1000.0;
/**
* A description of a polyline on terrain or 3D Tiles. Only to be used with {@link GroundPolylinePrimitive}.
- *
* @alias GroundPolylineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Options with the following properties:
* @param {Cartesian3[]} options.positions An array of {@link Cartesian3} defining the polyline's points. Heights above the ellipsoid will be ignored.
- * @param {number} [options.width=1.0] The screen space width in pixels.
- * @param {number} [options.granularity=9999.0] The distance interval in meters used for interpolating options.points. Defaults to 9999.0 meters. Zero indicates no interpolation.
- * @param {boolean} [options.loop=false] Whether during geometry creation a line segment will be added between the last and first line positions to make this Polyline a loop.
- * @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polyline segments must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
- *
- * @exception {DeveloperError} At least two positions are required.
- *
+ * @param {number} [options.width] The screen space width in pixels.
+ * @param {number} [options.granularity] The distance interval in meters used for interpolating options.points. Defaults to 9999.0 meters. Zero indicates no interpolation.
+ * @param {boolean} [options.loop] Whether during geometry creation a line segment will be added between the last and first line positions to make this Polyline a loop.
+ * @param {ArcType} [options.arcType] The type of line the polyline segments must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
+ * @throws {DeveloperError} At least two positions are required.
* @see GroundPolylinePrimitive
- *
* @example
* const positions = Cesium.Cartesian3.fromDegreesArray([
* -112.1340164450331, 36.05494287836128,
@@ -158,7 +153,6 @@ Object.defineProperties(GroundPolylineGeometry.prototype, {
/**
* Set the GroundPolylineGeometry's projection and ellipsoid.
* Used by GroundPolylinePrimitive to signal scene information to the geometry for generating 2D attributes.
- *
* @param {GroundPolylineGeometry} groundPolylineGeometry GroundPolylinGeometry describing a polyline on terrain or 3D Tiles.
* @param {Projection} mapProjection A MapProjection used for projecting cartographic coordinates to 2D.
* @private
@@ -283,11 +277,9 @@ function getPosition(ellipsoid, cartographic, height, result) {
/**
* Stores the provided instance into the provided array.
- *
* @param {PolygonGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
GroundPolylineGeometry.pack = function (value, array, startingIndex) {
@@ -324,9 +316,8 @@ GroundPolylineGeometry.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {PolygonGeometry} [result] The object into which to store the result.
*/
GroundPolylineGeometry.unpack = function (array, startingIndex, result) {
@@ -451,7 +442,6 @@ const cartographicIntersectionScratch = new Cartographic();
* Computes shadow volumes for the ground polyline, consisting of its vertices, indices, and a bounding sphere.
* Vertices are "fat," packing all the data needed in each volume to describe a line on terrain or 3D Tiles.
* Should not be called independent of {@link GroundPolylinePrimitive}.
- *
* @param {GroundPolylineGeometry} groundPolylineGeometry
* @private
*/
@@ -1384,7 +1374,7 @@ function generateGeometryAttributes(
texcoordNormalization2DX = segmentLength2D / length2D;
texcoordNormalization2DY = lengthSoFar2D / length2D;
}
- /** Pack **/
+ /** Pack */
for (j = 0; j < 8; j++) {
const vec4Index = vec4sWriteIndex + j * 4;
const vec2Index = vec2sWriteIndex + j * 2;
@@ -1646,7 +1636,6 @@ function getVec4GeometryAttribute(typedArray) {
/**
* Approximates an ellipsoid-tangent vector in 2D by projecting the end point into 2D.
* Exposed for testing.
- *
* @param {MapProjection} projection Map Projection for projecting coordinates to 2D.
* @param {Cartographic} cartographic The cartographic origin point of the normal.
* Used to check if the normal crosses the IDL during projection.
diff --git a/packages/engine/Source/Core/HeadingPitchRange.js b/packages/engine/Source/Core/HeadingPitchRange.js
index 6d9ae0e71ee7..0c312952eb1f 100644
--- a/packages/engine/Source/Core/HeadingPitchRange.js
+++ b/packages/engine/Source/Core/HeadingPitchRange.js
@@ -7,11 +7,10 @@ import defined from "./defined.js";
* Pitch is the rotation from the local xy-plane. Positive pitch angles are above the plane. Negative pitch
* angles are below the plane. Range is the distance from the center of the frame.
* @alias HeadingPitchRange
- * @constructor
- *
- * @param {number} [heading=0.0] The heading angle in radians.
- * @param {number} [pitch=0.0] The pitch angle in radians.
- * @param {number} [range=0.0] The distance from the center in meters.
+ * @class
+ * @param {number} [heading] The heading angle in radians.
+ * @param {number} [pitch] The pitch angle in radians.
+ * @param {number} [range] The distance from the center in meters.
*/
function HeadingPitchRange(heading, pitch, range) {
/**
@@ -39,7 +38,6 @@ function HeadingPitchRange(heading, pitch, range) {
/**
* Duplicates a HeadingPitchRange instance.
- *
* @param {HeadingPitchRange} hpr The HeadingPitchRange to duplicate.
* @param {HeadingPitchRange} [result] The object onto which to store the result.
* @returns {HeadingPitchRange} The modified result parameter or a new HeadingPitchRange instance if one was not provided. (Returns undefined if hpr is undefined)
diff --git a/packages/engine/Source/Core/HeadingPitchRoll.js b/packages/engine/Source/Core/HeadingPitchRoll.js
index 92a3dadfefc2..cdbfaef6bb54 100644
--- a/packages/engine/Source/Core/HeadingPitchRoll.js
+++ b/packages/engine/Source/Core/HeadingPitchRoll.js
@@ -8,11 +8,10 @@ import CesiumMath from "./Math.js";
* negative z axis. Pitch is the rotation about the negative y axis. Roll is the rotation about
* the positive x axis.
* @alias HeadingPitchRoll
- * @constructor
- *
- * @param {number} [heading=0.0] The heading component in radians.
- * @param {number} [pitch=0.0] The pitch component in radians.
- * @param {number} [roll=0.0] The roll component in radians.
+ * @class
+ * @param {number} [heading] The heading component in radians.
+ * @param {number} [pitch] The pitch component in radians.
+ * @param {number} [roll] The roll component in radians.
*/
function HeadingPitchRoll(heading, pitch, roll) {
/**
@@ -37,7 +36,6 @@ function HeadingPitchRoll(heading, pitch, roll) {
/**
* Computes the heading, pitch and roll from a quaternion (see http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles )
- *
* @param {Quaternion} quaternion The quaternion from which to retrieve heading, pitch, and roll, all expressed in radians.
* @param {HeadingPitchRoll} [result] The object in which to store the result. If not provided, a new instance is created and returned.
* @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if one was not provided.
@@ -68,7 +66,6 @@ HeadingPitchRoll.fromQuaternion = function (quaternion, result) {
/**
* Returns a new HeadingPitchRoll instance from angles given in degrees.
- *
* @param {number} heading the heading in degrees
* @param {number} pitch the pitch in degrees
* @param {number} roll the heading in degrees
@@ -98,7 +95,6 @@ HeadingPitchRoll.fromDegrees = function (heading, pitch, roll, result) {
/**
* Duplicates a HeadingPitchRoll instance.
- *
* @param {HeadingPitchRoll} headingPitchRoll The HeadingPitchRoll to duplicate.
* @param {HeadingPitchRoll} [result] The object onto which to store the result.
* @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if one was not provided. (Returns undefined if headingPitchRoll is undefined)
@@ -123,7 +119,6 @@ HeadingPitchRoll.clone = function (headingPitchRoll, result) {
/**
* Compares the provided HeadingPitchRolls componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {HeadingPitchRoll} [left] The first HeadingPitchRoll.
* @param {HeadingPitchRoll} [right] The second HeadingPitchRoll.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -143,11 +138,10 @@ HeadingPitchRoll.equals = function (left, right) {
* Compares the provided HeadingPitchRolls componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
- *
* @param {HeadingPitchRoll} [left] The first HeadingPitchRoll.
* @param {HeadingPitchRoll} [right] The second HeadingPitchRoll.
- * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [relativeEpsilon] The relative epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
*/
HeadingPitchRoll.equalsEpsilon = function (
@@ -183,7 +177,6 @@ HeadingPitchRoll.equalsEpsilon = function (
/**
* Duplicates this HeadingPitchRoll instance.
- *
* @param {HeadingPitchRoll} [result] The object onto which to store the result.
* @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if one was not provided.
*/
@@ -194,7 +187,6 @@ HeadingPitchRoll.prototype.clone = function (result) {
/**
* Compares this HeadingPitchRoll against the provided HeadingPitchRoll componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {HeadingPitchRoll} [right] The right hand side HeadingPitchRoll.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -206,10 +198,9 @@ HeadingPitchRoll.prototype.equals = function (right) {
* Compares this HeadingPitchRoll against the provided HeadingPitchRoll componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
- *
* @param {HeadingPitchRoll} [right] The right hand side HeadingPitchRoll.
- * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [relativeEpsilon] The relative epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if they are within the provided epsilon, false
otherwise.
*/
HeadingPitchRoll.prototype.equalsEpsilon = function (
@@ -227,7 +218,6 @@ HeadingPitchRoll.prototype.equalsEpsilon = function (
/**
* Creates a string representing this HeadingPitchRoll in the format '(heading, pitch, roll)' in radians.
- *
* @returns {string} A string representing the provided HeadingPitchRoll in the format '(heading, pitch, roll)'.
*/
HeadingPitchRoll.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/Heap.js b/packages/engine/Source/Core/Heap.js
index 700475cedc55..f93b11d92827 100644
--- a/packages/engine/Source/Core/Heap.js
+++ b/packages/engine/Source/Core/Heap.js
@@ -4,11 +4,9 @@ import defined from "./defined.js";
/**
* Array implementation of a heap.
- *
* @alias Heap
- * @constructor
+ * @class
* @private
- *
* @param {object} options Object with the following properties:
* @param {Heap.ComparatorCallback} options.comparator The comparator to use for the heap. If comparator(a, b) is less than 0, sort a to a lower index than b, otherwise sort to a higher index.
*/
@@ -27,9 +25,7 @@ function Heap(options) {
Object.defineProperties(Heap.prototype, {
/**
* Gets the length of the heap.
- *
* @memberof Heap.prototype
- *
* @type {number}
* @readonly
*/
@@ -41,9 +37,7 @@ Object.defineProperties(Heap.prototype, {
/**
* Gets the internal array.
- *
* @memberof Heap.prototype
- *
* @type {Array}
* @readonly
*/
@@ -55,9 +49,7 @@ Object.defineProperties(Heap.prototype, {
/**
* Gets and sets the maximum length of the heap.
- *
* @memberof Heap.prototype
- *
* @type {number}
*/
maximumLength: {
@@ -84,9 +76,7 @@ Object.defineProperties(Heap.prototype, {
/**
* The comparator to use for the heap. If comparator(a, b) is less than 0, sort a to a lower index than b, otherwise sort to a higher index.
- *
* @memberof Heap.prototype
- *
* @type {Heap.ComparatorCallback}
*/
comparator: {
@@ -104,7 +94,6 @@ function swap(array, a, b) {
/**
* Resizes the internal array of the heap.
- *
* @param {number} [length] The length to resize internal array to. Defaults to the current length of the heap.
*/
Heap.prototype.reserve = function (length) {
@@ -114,8 +103,7 @@ Heap.prototype.reserve = function (length) {
/**
* Update the heap so that index and all descendants satisfy the heap property.
- *
- * @param {number} [index=0] The starting index to heapify from.
+ * @param {number} [index] The starting index to heapify from.
*/
Heap.prototype.heapify = function (index) {
index = defaultValue(index, 0);
@@ -160,10 +148,8 @@ Heap.prototype.resort = function () {
/**
* Insert an element into the heap. If the length would grow greater than maximumLength
* of the heap, extra elements are removed.
- *
* @param {*} element The element to insert
- *
- * @return {*} The element that was removed from the heap if the heap is at full capacity.
+ * @returns {*} The element that was removed from the heap if the heap is at full capacity.
*/
Heap.prototype.insert = function (element) {
//>>includeStart('debug', pragmas.debug);
@@ -203,8 +189,7 @@ Heap.prototype.insert = function (element) {
/**
* Remove the element specified by index from the heap and return it.
- *
- * @param {number} [index=0] The index to remove.
+ * @param {number} [index] The index to remove.
* @returns {*} The specified element of the heap.
*/
Heap.prototype.pop = function (index) {
diff --git a/packages/engine/Source/Core/HeightmapEncoding.js b/packages/engine/Source/Core/HeightmapEncoding.js
index ba66c785b839..433f6251da22 100644
--- a/packages/engine/Source/Core/HeightmapEncoding.js
+++ b/packages/engine/Source/Core/HeightmapEncoding.js
@@ -1,12 +1,10 @@
/**
* The encoding that is used for a heightmap
- *
* @enum {number}
*/
const HeightmapEncoding = {
/**
* No encoding
- *
* @type {number}
* @constant
*/
@@ -14,10 +12,8 @@ const HeightmapEncoding = {
/**
* LERC encoding
- *
* @type {number}
* @constant
- *
* @see {@link https://github.com/Esri/lerc|The LERC specification}
*/
LERC: 1,
diff --git a/packages/engine/Source/Core/HeightmapTerrainData.js b/packages/engine/Source/Core/HeightmapTerrainData.js
index fab32e682b89..724863c7b060 100644
--- a/packages/engine/Source/Core/HeightmapTerrainData.js
+++ b/packages/engine/Source/Core/HeightmapTerrainData.js
@@ -19,15 +19,13 @@ import TerrainProvider from "./TerrainProvider.js";
/**
* Terrain data for a single tile where the terrain data is represented as a heightmap. A heightmap
* is a rectangular array of heights in row-major order from north to south and west to east.
- *
* @alias HeightmapTerrainData
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} options.buffer The buffer containing height data.
* @param {number} options.width The width (longitude direction) of the heightmap, in samples.
* @param {number} options.height The height (latitude direction) of the heightmap, in samples.
- * @param {number} [options.childTileMask=15] A bit mask indicating which of this tile's four children exist.
+ * @param {number} [options.childTileMask] A bit mask indicating which of this tile's four children exist.
* If a child's bit is set, geometry will be requested for that tile as well when it
* is needed. If the bit is cleared, the child tile is not requested and geometry is
* instead upsampled from the parent. The bit values are as follows:
@@ -42,25 +40,25 @@ import TerrainProvider from "./TerrainProvider.js";
* Uint8Array or image where a value of 255 indicates water and a value of 0 indicates land.
* Values in between 0 and 255 are allowed as well to smoothly blend between land and water.
* @param {object} [options.structure] An object describing the structure of the height data.
- * @param {number} [options.structure.heightScale=1.0] The factor by which to multiply height samples in order to obtain
+ * @param {number} [options.structure.heightScale] The factor by which to multiply height samples in order to obtain
* the height above the heightOffset, in meters. The heightOffset is added to the resulting
* height after multiplying by the scale.
- * @param {number} [options.structure.heightOffset=0.0] The offset to add to the scaled height to obtain the final
+ * @param {number} [options.structure.heightOffset] The offset to add to the scaled height to obtain the final
* height in meters. The offset is added after the height sample is multiplied by the
* heightScale.
- * @param {number} [options.structure.elementsPerHeight=1] The number of elements in the buffer that make up a single height
+ * @param {number} [options.structure.elementsPerHeight] The number of elements in the buffer that make up a single height
* sample. This is usually 1, indicating that each element is a separate height sample. If
* it is greater than 1, that number of elements together form the height sample, which is
* computed according to the structure.elementMultiplier and structure.isBigEndian properties.
- * @param {number} [options.structure.stride=1] The number of elements to skip to get from the first element of
+ * @param {number} [options.structure.stride] The number of elements to skip to get from the first element of
* one height to the first element of the next height.
- * @param {number} [options.structure.elementMultiplier=256.0] The multiplier used to compute the height value when the
+ * @param {number} [options.structure.elementMultiplier] The multiplier used to compute the height value when the
* stride property is greater than 1. For example, if the stride is 4 and the strideMultiplier
* is 256, the height is computed as follows:
* `height = buffer[index] + buffer[index + 1] * 256 + buffer[index + 2] * 256 * 256 + buffer[index + 3] * 256 * 256 * 256`
* This is assuming that the isBigEndian property is false. If it is true, the order of the
* elements is reversed.
- * @param {boolean} [options.structure.isBigEndian=false] Indicates endianness of the elements in the buffer when the
+ * @param {boolean} [options.structure.isBigEndian] Indicates endianness of the elements in the buffer when the
* stride property is greater than 1. If this property is false, the first element is the
* low-order element. If it is true, the first element is the high-order element.
* @param {number} [options.structure.lowestEncodedHeight] The lowest value that can be stored in the height buffer. Any heights that are lower
@@ -71,7 +69,7 @@ import TerrainProvider from "./TerrainProvider.js";
* than this value after encoding with the `heightScale` and `heightOffset` are clamped to this value. For example, if the height
* buffer is a `Uint16Array`, this value should be `256 * 256 - 1` or 65535 because a `Uint16Array` cannot store numbers larger
* than 65535. If this parameter is not specified, no maximum value is enforced.
- * @param {HeightmapEncoding} [options.encoding=HeightmapEncoding.NONE] The encoding that is used on the buffer.
+ * @param {HeightmapEncoding} [options.encoding] The encoding that is used on the buffer.
* @param {boolean} [options.createdByUpsampling=false] True if this instance was created by upsampling another instance;
* otherwise, false.
*
@@ -192,17 +190,15 @@ const createMeshTaskProcessorThrottle = new TaskProcessor(
/**
* Creates a {@link TerrainMesh} from this terrain data.
- *
* @private
- *
* @param {object} options Object with the following properties:
* @param {TilingScheme} options.tilingScheme The tiling scheme to which this tile belongs.
* @param {number} options.x The X coordinate of the tile for which to create the terrain data.
* @param {number} options.y The Y coordinate of the tile for which to create the terrain data.
* @param {number} options.level The level of the tile for which to create the terrain data.
- * @param {number} [options.exaggeration=1.0] The scale used to exaggerate the terrain.
- * @param {number} [options.exaggerationRelativeHeight=0.0] The height relative to which terrain is exaggerated.
- * @param {boolean} [options.throttle=true] If true, indicates that this operation will need to be retried if too many asynchronous mesh creations are already in progress.
+ * @param {number} [options.exaggeration] The scale used to exaggerate the terrain.
+ * @param {number} [options.exaggerationRelativeHeight] The height relative to which terrain is exaggerated.
+ * @param {boolean} [options.throttle] If true, indicates that this operation will need to be retried if too many asynchronous mesh creations are already in progress.
* @returns {Promise|undefined} A promise for the terrain mesh, or undefined if too many
* asynchronous mesh creations are already in progress and the operation should
* be retried later.
@@ -321,9 +317,8 @@ HeightmapTerrainData.prototype.createMesh = function (options) {
* @param {number} options.x The X coordinate of the tile for which to create the terrain data.
* @param {number} options.y The Y coordinate of the tile for which to create the terrain data.
* @param {number} options.level The level of the tile for which to create the terrain data.
- * @param {number} [options.exaggeration=1.0] The scale used to exaggerate the terrain.
- * @param {number} [options.exaggerationRelativeHeight=0.0] The height relative to which terrain is exaggerated.
- *
+ * @param {number} [options.exaggeration] The scale used to exaggerate the terrain.
+ * @param {number} [options.exaggerationRelativeHeight] The height relative to which terrain is exaggerated.
* @private
*/
HeightmapTerrainData.prototype._createMeshSync = function (options) {
@@ -421,7 +416,6 @@ HeightmapTerrainData.prototype._createMeshSync = function (options) {
/**
* Computes the terrain height at a specified longitude and latitude.
- *
* @param {Rectangle} rectangle The rectangle covered by this terrain data.
* @param {number} longitude The longitude in radians.
* @param {number} latitude The latitude in radians.
@@ -492,7 +486,6 @@ HeightmapTerrainData.prototype.interpolateHeight = function (
/**
* Upsamples this terrain data for use by a descendant tile. The resulting instance will contain a subset of the
* height samples in this instance, interpolated if necessary.
- *
* @param {TilingScheme} tilingScheme The tiling scheme of this terrain data.
* @param {number} thisX The X coordinate of this tile in the tiling scheme.
* @param {number} thisY The Y coordinate of this tile in the tiling scheme.
@@ -643,7 +636,6 @@ HeightmapTerrainData.prototype.upsample = function (
* {@link HeightmapTerrainData.childTileMask}. The given child tile coordinates are assumed
* to be one of the four children of this tile. If non-child tile coordinates are
* given, the availability of the southeast child tile is returned.
- *
* @param {number} thisX The tile X coordinate of this (the parent) tile.
* @param {number} thisY The tile Y coordinate of this (the parent) tile.
* @param {number} childX The tile X coordinate of the child tile to check for availability.
@@ -687,7 +679,6 @@ HeightmapTerrainData.prototype.isChildAvailable = function (
* terrain data. If this value is false, the data was obtained from some other source, such
* as by downloading it from a remote server. This method should return true for instances
* returned from a call to {@link HeightmapTerrainData#upsample}.
- *
* @returns {boolean} True if this instance was created by upsampling; otherwise, false.
*/
HeightmapTerrainData.prototype.wasCreatedByUpsampling = function () {
diff --git a/packages/engine/Source/Core/HeightmapTessellator.js b/packages/engine/Source/Core/HeightmapTessellator.js
index be566f845e34..09e203f06eca 100644
--- a/packages/engine/Source/Core/HeightmapTessellator.js
+++ b/packages/engine/Source/Core/HeightmapTessellator.js
@@ -17,16 +17,13 @@ import WebMercatorProjection from "./WebMercatorProjection.js";
/**
* Contains functions to create a mesh from a heightmap image.
- *
* @namespace HeightmapTessellator
- *
* @private
*/
const HeightmapTessellator = {};
/**
* The default structure of a heightmap, as given to {@link HeightmapTessellator.computeVertices}.
- *
* @constant
*/
HeightmapTessellator.DEFAULT_STRUCTURE = Object.freeze({
@@ -45,7 +42,6 @@ const maximumScratch = new Cartesian3();
/**
* Fills an array of vertices from a heightmap image.
- *
* @param {object} options Object with the following properties:
* @param {Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} options.heightmap The heightmap to tessellate.
* @param {number} options.width The width of the heightmap, in height samples.
@@ -54,27 +50,27 @@ const maximumScratch = new Cartesian3();
* @param {Rectangle} options.nativeRectangle A rectangle in the native coordinates of the heightmap's projection. For
* a heightmap with a geographic projection, this is degrees. For the web mercator
* projection, this is meters.
- * @param {number} [options.exaggeration=1.0] The scale used to exaggerate the terrain.
- * @param {number} [options.exaggerationRelativeHeight=0.0] The height from which terrain is exaggerated.
+ * @param {number} [options.exaggeration] The scale used to exaggerate the terrain.
+ * @param {number} [options.exaggerationRelativeHeight] The height from which terrain is exaggerated.
* @param {Rectangle} [options.rectangle] The rectangle covered by the heightmap, in geodetic coordinates with north, south, east and
* west properties in radians. Either rectangle or nativeRectangle must be provided. If both
* are provided, they're assumed to be consistent.
- * @param {boolean} [options.isGeographic=true] True if the heightmap uses a {@link GeographicProjection}, or false if it uses
+ * @param {boolean} [options.isGeographic] True if the heightmap uses a {@link GeographicProjection}, or false if it uses
* a {@link WebMercatorProjection}.
- * @param {Cartesian3} [options.relativeToCenter=Cartesian3.ZERO] The positions will be computed as Cartesian3.subtract(worldPosition, relativeToCenter)
.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to which the heightmap applies.
+ * @param {Cartesian3} [options.relativeToCenter] The positions will be computed as Cartesian3.subtract(worldPosition, relativeToCenter)
.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to which the heightmap applies.
* @param {object} [options.structure] An object describing the structure of the height data.
- * @param {number} [options.structure.heightScale=1.0] The factor by which to multiply height samples in order to obtain
+ * @param {number} [options.structure.heightScale] The factor by which to multiply height samples in order to obtain
* the height above the heightOffset, in meters. The heightOffset is added to the resulting
* height after multiplying by the scale.
- * @param {number} [options.structure.heightOffset=0.0] The offset to add to the scaled height to obtain the final
+ * @param {number} [options.structure.heightOffset] The offset to add to the scaled height to obtain the final
* height in meters. The offset is added after the height sample is multiplied by the
* heightScale.
- * @param {number} [options.structure.elementsPerHeight=1] The number of elements in the buffer that make up a single height
+ * @param {number} [options.structure.elementsPerHeight] The number of elements in the buffer that make up a single height
* sample. This is usually 1, indicating that each element is a separate height sample. If
* it is greater than 1, that number of elements together form the height sample, which is
* computed according to the structure.elementMultiplier and structure.isBigEndian properties.
- * @param {number} [options.structure.stride=1] The number of elements to skip to get from the first element of
+ * @param {number} [options.structure.stride] The number of elements to skip to get from the first element of
* one height to the first element of the next height.
* @param {number} [options.structure.elementMultiplier=256.0] The multiplier used to compute the height value when the
* stride property is greater than 1. For example, if the stride is 4 and the strideMultiplier
@@ -93,7 +89,6 @@ const maximumScratch = new Cartesian3();
* @param {boolean} [options.structure.isBigEndian=false] Indicates endianness of the elements in the buffer when the
* stride property is greater than 1. If this property is false, the first element is the
* low-order element. If it is true, the first element is the high-order element.
- *
* @example
* const width = 5;
* const height = 5;
diff --git a/packages/engine/Source/Core/HermitePolynomialApproximation.js b/packages/engine/Source/Core/HermitePolynomialApproximation.js
index c2737cd26d28..f74d04bdb202 100644
--- a/packages/engine/Source/Core/HermitePolynomialApproximation.js
+++ b/packages/engine/Source/Core/HermitePolynomialApproximation.js
@@ -63,7 +63,6 @@ function calculateCoefficientTerm(
/**
* An {@link InterpolationAlgorithm} for performing Hermite interpolation.
- *
* @namespace HermitePolynomialApproximation
*/
const HermitePolynomialApproximation = {
@@ -72,12 +71,11 @@ const HermitePolynomialApproximation = {
/**
* Given the desired degree, returns the number of data points required for interpolation.
- *
* @param {number} degree The desired degree of interpolation.
- * @param {number} [inputOrder=0] The order of the inputs (0 means just the data, 1 means the data and its derivative, etc).
+ * @param {number} [inputOrder] The order of the inputs (0 means just the data, 1 means the data and its derivative, etc).
* @returns {number} The number of required data points needed for the desired degree of interpolation.
- * @exception {DeveloperError} degree must be 0 or greater.
- * @exception {DeveloperError} inputOrder must be 0 or greater.
+ * @throws {DeveloperError} degree must be 0 or greater.
+ * @throws {DeveloperError} inputOrder must be 0 or greater.
*/
HermitePolynomialApproximation.getRequiredDataPoints = function (
degree,
@@ -102,7 +100,6 @@ HermitePolynomialApproximation.getRequiredDataPoints = function (
/**
* Interpolates values using Hermite Polynomial Approximation.
- *
* @param {number} x The independent variable for which the dependent variables will be interpolated.
* @param {number[]} xTable The array of independent variables to use to interpolate. The values
* in this array must be in increasing order and the same value must not occur twice in the array.
@@ -198,7 +195,6 @@ const arrayScratch = [];
/**
* Interpolates values using Hermite Polynomial Approximation.
- *
* @param {number} x The independent variable for which the dependent variables will be interpolated.
* @param {number[]} xTable The array of independent variables to use to interpolate. The values
* in this array must be in increasing order and the same value must not occur twice in the array.
@@ -209,7 +205,6 @@ const arrayScratch = [];
* @param {number} inputOrder The number of derivatives supplied for input.
* @param {number} outputOrder The number of derivatives desired for output.
* @param {number[]} [result] An existing array into which to store the result.
- *
* @returns {number[]} The array of interpolated values, or the result parameter if one was provided.
*/
HermitePolynomialApproximation.interpolate = function (
diff --git a/packages/engine/Source/Core/HermiteSpline.js b/packages/engine/Source/Core/HermiteSpline.js
index 629e81e7687a..6c01aad24e96 100644
--- a/packages/engine/Source/Core/HermiteSpline.js
+++ b/packages/engine/Source/Core/HermiteSpline.js
@@ -115,22 +115,18 @@ function generateNatural(points) {
* tangents are defined for points [1, n - 1]. For example, when interpolating a segment of the curve between points[i]
and
* points[i + 1]
, the tangents at the points will be outTangents[i]
and inTangents[i]
,
* respectively.
- *
* @alias HermiteSpline
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {number[]} options.times An array of strictly increasing, unit-less, floating-point times at each point.
* The values are in no way connected to the clock time. They are the parameterization for the curve.
* @param {Cartesian3[]} options.points The array of control points.
* @param {Cartesian3[]} options.inTangents The array of incoming tangents at each control point.
* @param {Cartesian3[]} options.outTangents The array of outgoing tangents at each control point.
- *
- * @exception {DeveloperError} points.length must be greater than or equal to 2.
- * @exception {DeveloperError} times.length must be equal to points.length.
- * @exception {DeveloperError} inTangents and outTangents must have a length equal to points.length - 1.
- * @exception {DeveloperError} inTangents and outTangents must be of the same type as points.
- *
+ * @throws {DeveloperError} points.length must be greater than or equal to 2.
+ * @throws {DeveloperError} times.length must be equal to points.length.
+ * @throws {DeveloperError} inTangents and outTangents must have a length equal to points.length - 1.
+ * @throws {DeveloperError} inTangents and outTangents must be of the same type as points.
* @example
* // Create a G1 continuous Hermite spline
* const times = [ 0.0, 1.5, 3.0, 4.5, 6.0 ];
@@ -158,7 +154,6 @@ function generateNatural(points) {
* });
*
* const p0 = spline.evaluate(times[0]);
- *
* @see ConstantSpline
* @see SteppedSpline
* @see LinearSpline
@@ -226,9 +221,7 @@ function HermiteSpline(options) {
Object.defineProperties(HermiteSpline.prototype, {
/**
* An array of times for the control points.
- *
* @memberof HermiteSpline.prototype
- *
* @type {number[]}
* @readonly
*/
@@ -240,9 +233,7 @@ Object.defineProperties(HermiteSpline.prototype, {
/**
* An array of control points.
- *
* @memberof HermiteSpline.prototype
- *
* @type {Cartesian3[]}
* @readonly
*/
@@ -254,9 +245,7 @@ Object.defineProperties(HermiteSpline.prototype, {
/**
* An array of incoming tangents at each control point.
- *
* @memberof HermiteSpline.prototype
- *
* @type {Cartesian3[]}
* @readonly
*/
@@ -268,9 +257,7 @@ Object.defineProperties(HermiteSpline.prototype, {
/**
* An array of outgoing tangents at each control point.
- *
* @memberof HermiteSpline.prototype
- *
* @type {Cartesian3[]}
* @readonly
*/
@@ -284,17 +271,14 @@ Object.defineProperties(HermiteSpline.prototype, {
/**
* Creates a spline where the tangents at each control point are the same.
* The curves are guaranteed to be at least in the class C1 .
- *
* @param {object} options Object with the following properties:
* @param {number[]} options.times The array of control point times.
* @param {Cartesian3[]} options.points The array of control points.
* @param {Cartesian3[]} options.tangents The array of tangents at the control points.
* @returns {HermiteSpline} A hermite spline.
- *
- * @exception {DeveloperError} points, times and tangents are required.
- * @exception {DeveloperError} points.length must be greater than or equal to 2.
- * @exception {DeveloperError} times, points and tangents must have the same length.
- *
+ * @throws {DeveloperError} points, times and tangents are required.
+ * @throws {DeveloperError} points.length must be greater than or equal to 2.
+ * @throws {DeveloperError} times, points and tangents must have the same length.
* @example
* const points = [
* new Cesium.Cartesian3(1235398.0, -4810983.0, 4146266.0),
@@ -356,16 +340,13 @@ HermiteSpline.createC1 = function (options) {
/**
* Creates a natural cubic spline. The tangents at the control points are generated
* to create a curve in the class C2 .
- *
* @param {object} options Object with the following properties:
* @param {number[]} options.times The array of control point times.
* @param {Cartesian3[]} options.points The array of control points.
* @returns {HermiteSpline|LinearSpline} A hermite spline, or a linear spline if less than 3 control points were given.
- *
- * @exception {DeveloperError} points and times are required.
- * @exception {DeveloperError} points.length must be greater than or equal to 2.
- * @exception {DeveloperError} times.length must be equal to points.length.
- *
+ * @throws {DeveloperError} points and times are required.
+ * @throws {DeveloperError} points.length must be greater than or equal to 2.
+ * @throws {DeveloperError} times.length must be equal to points.length.
* @example
* // Create a natural cubic spline above the earth from Philadelphia to Los Angeles.
* const spline = Cesium.HermiteSpline.createNaturalCubic({
@@ -421,19 +402,16 @@ HermiteSpline.createNaturalCubic = function (options) {
/**
* Creates a clamped cubic spline. The tangents at the interior control points are generated
* to create a curve in the class C2 .
- *
* @param {object} options Object with the following properties:
* @param {number[]} options.times The array of control point times.
* @param {number[]|Cartesian3[]} options.points The array of control points.
* @param {Cartesian3} options.firstTangent The outgoing tangent of the first control point.
* @param {Cartesian3} options.lastTangent The incoming tangent of the last control point.
* @returns {HermiteSpline|LinearSpline} A hermite spline, or a linear spline if less than 3 control points were given.
- *
- * @exception {DeveloperError} points, times, firstTangent and lastTangent are required.
- * @exception {DeveloperError} points.length must be greater than or equal to 2.
- * @exception {DeveloperError} times.length must be equal to points.length.
- * @exception {DeveloperError} firstTangent and lastTangent must be of the same type as points.
- *
+ * @throws {DeveloperError} points, times, firstTangent and lastTangent are required.
+ * @throws {DeveloperError} points.length must be greater than or equal to 2.
+ * @throws {DeveloperError} times.length must be equal to points.length.
+ * @throws {DeveloperError} firstTangent and lastTangent must be of the same type as points.
* @example
* // Create a clamped cubic spline above the earth from Philadelphia to Los Angeles.
* const spline = Cesium.HermiteSpline.createClampedCubic({
@@ -522,11 +500,9 @@ HermiteSpline.hermiteCoefficientMatrix = new Matrix4(
* Finds an index i
in times
such that the parameter
* time
is in the interval [times[i], times[i + 1]]
.
* @function
- *
* @param {number} time The time.
* @returns {number} The index for the element at the start of the interval.
- *
- * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
@@ -538,29 +514,25 @@ const scratchTemp = new Cartesian3();
/**
* Wraps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, wrapped around to the updated animation.
+ * @returns {number} The time, wrapped around to the updated animation.
*/
HermiteSpline.prototype.wrapTime = Spline.prototype.wrapTime;
/**
* Clamps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, clamped to the animation period.
+ * @returns {number} The time, clamped to the animation period.
*/
HermiteSpline.prototype.clampTime = Spline.prototype.clampTime;
/**
* Evaluates the curve at a given time.
- *
* @param {number} time The time at which to evaluate the curve.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new instance of the point on the curve at the given time.
- *
- * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
diff --git a/packages/engine/Source/Core/HilbertOrder.js b/packages/engine/Source/Core/HilbertOrder.js
index 540a1ea493b4..335fb936a217 100644
--- a/packages/engine/Source/Core/HilbertOrder.js
+++ b/packages/engine/Source/Core/HilbertOrder.js
@@ -3,14 +3,12 @@ import DeveloperError from "./DeveloperError.js";
/**
* Hilbert Order helper functions.
- *
* @namespace HilbertOrder
*/
const HilbertOrder = {};
/**
* Computes the Hilbert index at the given level from 2D coordinates.
- *
* @param {number} level The level of the curve
* @param {number} x The X coordinate
* @param {number} y The Y coordinate
@@ -54,7 +52,6 @@ HilbertOrder.encode2D = function (level, x, y) {
/**
* Computes the 2D coordinates from the Hilbert index at the given level.
- *
* @param {number} level The level of the curve
* @param {bigint} index The Hilbert index
* @returns {number[]} An array containing the 2D coordinates ([x, y]) corresponding to the Morton index.
@@ -98,6 +95,10 @@ HilbertOrder.decode2D = function (level, index) {
};
/**
+ * @param n
+ * @param p
+ * @param rx
+ * @param ry
* @private
*/
function rotate(n, p, rx, ry) {
diff --git a/packages/engine/Source/Core/Iau2000Orientation.js b/packages/engine/Source/Core/Iau2000Orientation.js
index e9595a481194..7dc5d50b8024 100644
--- a/packages/engine/Source/Core/Iau2000Orientation.js
+++ b/packages/engine/Source/Core/Iau2000Orientation.js
@@ -8,9 +8,7 @@ import TimeConstants from "./TimeConstants.js";
* This is a collection of the orientation information available for central bodies.
* The data comes from the Report of the IAU/IAG Working Group on Cartographic
* Coordinates and Rotational Elements: 2000.
- *
* @namespace Iau2000Orientation
- *
* @private
*/
const Iau2000Orientation = {};
@@ -35,8 +33,7 @@ let dateTT = new JulianDate();
/**
* Compute the orientation parameters for the Moon.
- *
- * @param {JulianDate} [date=JulianDate.now()] The date to evaluate the parameters.
+ * @param {JulianDate} [date] The date to evaluate the parameters.
* @param {IauOrientationParameters} [result] The object onto which to store the result.
* @returns {IauOrientationParameters} The modified result parameter or a new instance representing the orientation of the Earth's Moon.
* @private
diff --git a/packages/engine/Source/Core/Iau2006XysData.js b/packages/engine/Source/Core/Iau2006XysData.js
index c09aec64a55c..04399d65776d 100644
--- a/packages/engine/Source/Core/Iau2006XysData.js
+++ b/packages/engine/Source/Core/Iau2006XysData.js
@@ -9,20 +9,17 @@ import TimeStandard from "./TimeStandard.js";
/**
* A set of IAU2006 XYS data that is used to evaluate the transformation between the International
* Celestial Reference Frame (ICRF) and the International Terrestrial Reference Frame (ITRF).
- *
* @alias Iau2006XysData
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {Resource|string} [options.xysFileUrlTemplate='Assets/IAU2006_XYS/IAU2006_XYS_{0}.json'] A template URL for obtaining the XYS data. In the template,
+ * @param {Resource|string} [options.xysFileUrlTemplate] A template URL for obtaining the XYS data. In the template,
* `{0}` will be replaced with the file index.
- * @param {number} [options.interpolationOrder=9] The order of interpolation to perform on the XYS data.
- * @param {number} [options.sampleZeroJulianEphemerisDate=2442396.5] The Julian ephemeris date (JED) of the
+ * @param {number} [options.interpolationOrder] The order of interpolation to perform on the XYS data.
+ * @param {number} [options.sampleZeroJulianEphemerisDate] The Julian ephemeris date (JED) of the
* first XYS sample.
- * @param {number} [options.stepSizeDays=1.0] The step size, in days, between successive XYS samples.
- * @param {number} [options.samplesPerXysFile=1000] The number of samples in each XYS file.
- * @param {number} [options.totalSamples=27426] The total number of samples in all XYS files.
- *
+ * @param {number} [options.stepSizeDays] The step size, in days, between successive XYS samples.
+ * @param {number} [options.samplesPerXysFile] The number of samples in each XYS file.
+ * @param {number} [options.totalSamples] The total number of samples in all XYS files.
* @private
*/
function Iau2006XysData(options) {
@@ -84,7 +81,6 @@ function getDaysSinceEpoch(xys, dayTT, secondTT) {
/**
* Preloads XYS data for a specified date range.
- *
* @param {number} startDayTT The Julian day number of the beginning of the interval to preload, expressed in
* the Terrestrial Time (TT) time standard.
* @param {number} startSecondTT The seconds past noon of the beginning of the interval to preload, expressed in
@@ -137,7 +133,6 @@ Iau2006XysData.prototype.preload = function (
/**
* Computes the XYS values for a given date by interpolating. If the required data is not yet downloaded,
* this method will return undefined.
- *
* @param {number} dayTT The Julian day number for which to compute the XYS value, expressed in
* the Terrestrial Time (TT) time standard.
* @param {number} secondTT The seconds past noon of the date for which to compute the XYS value, expressed in
@@ -146,7 +141,6 @@ Iau2006XysData.prototype.preload = function (
* is undefined, a new instance is allocated and returned.
* @returns {Iau2006XysSample} The interpolated XYS values, or undefined if the required data for this
* computation has not yet been downloaded.
- *
* @see Iau2006XysData#preload
*/
Iau2006XysData.prototype.computeXysRadians = function (
diff --git a/packages/engine/Source/Core/Iau2006XysSample.js b/packages/engine/Source/Core/Iau2006XysSample.js
index e0a83e0c3258..b09244db62b9 100644
--- a/packages/engine/Source/Core/Iau2006XysSample.js
+++ b/packages/engine/Source/Core/Iau2006XysSample.js
@@ -1,13 +1,10 @@
/**
* An IAU 2006 XYS value sampled at a particular time.
- *
* @alias Iau2006XysSample
- * @constructor
- *
+ * @class
* @param {number} x The X value.
* @param {number} y The Y value.
* @param {number} s The S value.
- *
* @private
*/
function Iau2006XysSample(x, y, s) {
diff --git a/packages/engine/Source/Core/IauOrientationAxes.js b/packages/engine/Source/Core/IauOrientationAxes.js
index 098867325578..c6b6cd4b130f 100644
--- a/packages/engine/Source/Core/IauOrientationAxes.js
+++ b/packages/engine/Source/Core/IauOrientationAxes.js
@@ -10,12 +10,9 @@ import Quaternion from "./Quaternion.js";
* The Axes representing the orientation of a Globe as represented by the data
* from the IAU/IAG Working Group reports on rotational elements.
* @alias IauOrientationAxes
- * @constructor
- *
+ * @class
* @param {IauOrientationAxes.ComputeFunction} [computeFunction] The function that computes the {@link IauOrientationParameters} given a {@link JulianDate}.
- *
* @see Iau2000Orientation
- *
* @private
*/
function IauOrientationAxes(computeFunction) {
@@ -67,7 +64,6 @@ const quatScratch = new Quaternion();
/**
* Computes a rotation from ICRF to a Globe's Fixed axes.
- *
* @param {JulianDate} date The date to evaluate the matrix.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter or a new instance of the rotation from ICRF to Fixed.
diff --git a/packages/engine/Source/Core/IauOrientationParameters.js b/packages/engine/Source/Core/IauOrientationParameters.js
index ba72c47384e6..2dff5eadeeee 100644
--- a/packages/engine/Source/Core/IauOrientationParameters.js
+++ b/packages/engine/Source/Core/IauOrientationParameters.js
@@ -5,9 +5,11 @@
* These parameters correspond to the parameters in the Report from the IAU/IAG Working Group
* except that they are expressed in radians.
*
- *
+ * @param rightAscension
+ * @param declination
+ * @param rotation
+ * @param rotationRate
* @namespace IauOrientationParameters
- *
* @private
*/
function IauOrientationParameters(
@@ -20,7 +22,6 @@ function IauOrientationParameters(
* The right ascension of the north pole of the body with respect to
* the International Celestial Reference Frame, in radians.
* @type {number}
- *
* @private
*/
this.rightAscension = rightAscension;
@@ -29,7 +30,6 @@ function IauOrientationParameters(
* The declination of the north pole of the body with respect to
* the International Celestial Reference Frame, in radians.
* @type {number}
- *
* @private
*/
this.declination = declination;
@@ -38,7 +38,6 @@ function IauOrientationParameters(
* The rotation about the north pole used to align a set of axes with
* the meridian defined by the IAU report, in radians.
* @type {number}
- *
* @private
*/
this.rotation = rotation;
@@ -46,7 +45,6 @@ function IauOrientationParameters(
/**
* The instantaneous rotation rate about the north pole, in radians per second.
* @type {number}
- *
* @private
*/
this.rotationRate = rotationRate;
diff --git a/packages/engine/Source/Core/IndexDatatype.js b/packages/engine/Source/Core/IndexDatatype.js
index 6a31e2ce9426..a77dcf5a0e63 100644
--- a/packages/engine/Source/Core/IndexDatatype.js
+++ b/packages/engine/Source/Core/IndexDatatype.js
@@ -6,14 +6,12 @@ import WebGLConstants from "./WebGLConstants.js";
/**
* Constants for WebGL index datatypes. These corresponds to the
* type
parameter of {@link http://www.khronos.org/opengles/sdk/docs/man/xhtml/glDrawElements.xml|drawElements}.
- *
* @enum {number}
*/
const IndexDatatype = {
/**
* 8-bit unsigned byte corresponding to UNSIGNED_BYTE
and the type
* of an element in Uint8Array
.
- *
* @type {number}
* @constant
*/
@@ -22,7 +20,6 @@ const IndexDatatype = {
/**
* 16-bit unsigned short corresponding to UNSIGNED_SHORT
and the type
* of an element in Uint16Array
.
- *
* @type {number}
* @constant
*/
@@ -31,7 +28,6 @@ const IndexDatatype = {
/**
* 32-bit unsigned int corresponding to UNSIGNED_INT
and the type
* of an element in Uint32Array
.
- *
* @type {number}
* @constant
*/
@@ -40,10 +36,8 @@ const IndexDatatype = {
/**
* Returns the size, in bytes, of the corresponding datatype.
- *
* @param {IndexDatatype} indexDatatype The index datatype to get the size of.
* @returns {number} The size in bytes.
- *
* @example
* // Returns 2
* const size = Cesium.IndexDatatype.getSizeInBytes(Cesium.IndexDatatype.UNSIGNED_SHORT);
@@ -67,7 +61,6 @@ IndexDatatype.getSizeInBytes = function (indexDatatype) {
/**
* Gets the datatype with a given size in bytes.
- *
* @param {number} sizeInBytes The size of a single index in bytes.
* @returns {IndexDatatype} The index datatype with the given size.
*/
@@ -90,10 +83,8 @@ IndexDatatype.fromSizeInBytes = function (sizeInBytes) {
/**
* Validates that the provided index datatype is a valid {@link IndexDatatype}.
- *
* @param {IndexDatatype} indexDatatype The index datatype to validate.
* @returns {boolean} true
if the provided index datatype is a valid value; otherwise, false
.
- *
* @example
* if (!Cesium.IndexDatatype.validate(indexDatatype)) {
* throw new Cesium.DeveloperError('indexDatatype must be a valid value.');
@@ -111,11 +102,9 @@ IndexDatatype.validate = function (indexDatatype) {
/**
* Creates a typed array that will store indices, using either
* or Uint32Array
depending on the number of vertices.
- *
* @param {number} numberOfVertices Number of vertices that the indices will reference.
* @param {number|Array} indicesLengthOrArray Passed through to the typed array constructor.
* @returns {Uint16Array|Uint32Array} A Uint16Array
or Uint32Array
constructed with indicesLengthOrArray
.
- *
* @example
* this.indices = Cesium.IndexDatatype.createTypedArray(positions.length / 3, numberOfIndices);
*/
@@ -139,13 +128,11 @@ IndexDatatype.createTypedArray = function (
/**
* Creates a typed array from a source array buffer. The resulting typed array will store indices, using either
* or Uint32Array
depending on the number of vertices.
- *
* @param {number} numberOfVertices Number of vertices that the indices will reference.
* @param {ArrayBuffer} sourceArray Passed through to the typed array constructor.
* @param {number} byteOffset Passed through to the typed array constructor.
* @param {number} length Passed through to the typed array constructor.
* @returns {Uint16Array|Uint32Array} A Uint16Array
or Uint32Array
constructed with sourceArray
, byteOffset
, and length
.
- *
*/
IndexDatatype.createTypedArrayFromArrayBuffer = function (
numberOfVertices,
@@ -174,7 +161,6 @@ IndexDatatype.createTypedArrayFromArrayBuffer = function (
/**
* Gets the {@link IndexDatatype} for the provided TypedArray instance.
- *
* @param {Uint8Array|Uint16Array|Uint32Array} array The typed array.
* @returns {IndexDatatype} The IndexDatatype for the provided array, or undefined if the array is not a Uint8Array, Uint16Array, or Uint32Array.
*/
diff --git a/packages/engine/Source/Core/InterpolationAlgorithm.js b/packages/engine/Source/Core/InterpolationAlgorithm.js
index b050eda4ddb8..d2ef9c5ad8b3 100644
--- a/packages/engine/Source/Core/InterpolationAlgorithm.js
+++ b/packages/engine/Source/Core/InterpolationAlgorithm.js
@@ -2,9 +2,7 @@ import DeveloperError from "./DeveloperError.js";
/**
* The interface for interpolation algorithms.
- *
* @interface InterpolationAlgorithm
- *
* @see LagrangePolynomialApproximation
* @see LinearApproximation
* @see HermitePolynomialApproximation
@@ -20,7 +18,6 @@ InterpolationAlgorithm.type = undefined;
/**
* Given the desired degree, returns the number of data points required for interpolation.
* @function
- *
* @param {number} degree The desired degree of interpolation.
* @returns {number} The number of required data points needed for the desired degree of interpolation.
*/
@@ -30,7 +27,6 @@ InterpolationAlgorithm.getRequiredDataPoints =
/**
* Performs zero order interpolation.
* @function
- *
* @param {number} x The independent variable for which the dependent variables will be interpolated.
* @param {number[]} xTable The array of independent variables to use to interpolate. The values
* in this array must be in increasing order and the same value must not occur twice in the array.
@@ -39,7 +35,6 @@ InterpolationAlgorithm.getRequiredDataPoints =
* @param {number} yStride The number of dependent variable values in yTable corresponding to
* each independent variable value in xTable.
* @param {number[]} [result] An existing array into which to store the result.
- *
* @returns {number[]} The array of interpolated values, or the result parameter if one was provided.
*/
InterpolationAlgorithm.interpolateOrderZero =
diff --git a/packages/engine/Source/Core/InterpolationType.js b/packages/engine/Source/Core/InterpolationType.js
index 50b6e4b3fc8f..cbc2dea864e2 100644
--- a/packages/engine/Source/Core/InterpolationType.js
+++ b/packages/engine/Source/Core/InterpolationType.js
@@ -1,8 +1,6 @@
/**
* An enum describing the type of interpolation used in a glTF animation.
- *
* @enum {number}
- *
* @private
*/
const InterpolationType = {
diff --git a/packages/engine/Source/Core/Intersect.js b/packages/engine/Source/Core/Intersect.js
index dada0889bd41..37b812ad1788 100644
--- a/packages/engine/Source/Core/Intersect.js
+++ b/packages/engine/Source/Core/Intersect.js
@@ -3,13 +3,11 @@
* object is located. The object can either be fully contained within the frustum (INSIDE),
* partially inside the frustum and partially outside (INTERSECTING), or somewhere entirely
* outside of the frustum's 6 planes (OUTSIDE).
- *
* @enum {number}
*/
const Intersect = {
/**
* Represents that an object is not contained within the frustum.
- *
* @type {number}
* @constant
*/
@@ -17,7 +15,6 @@ const Intersect = {
/**
* Represents that an object intersects one of the frustum's planes.
- *
* @type {number}
* @constant
*/
@@ -25,7 +22,6 @@ const Intersect = {
/**
* Represents that an object is fully within the frustum.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/IntersectionTests.js b/packages/engine/Source/Core/IntersectionTests.js
index 295b467bdb45..35d930556be1 100644
--- a/packages/engine/Source/Core/IntersectionTests.js
+++ b/packages/engine/Source/Core/IntersectionTests.js
@@ -12,14 +12,12 @@ import Ray from "./Ray.js";
/**
* Functions for computing the intersection between geometries such as rays, planes, triangles, and ellipsoids.
- *
* @namespace IntersectionTests
*/
const IntersectionTests = {};
/**
* Computes the intersection of a ray and a plane.
- *
* @param {Ray} ray The ray.
* @param {Plane} plane The plane.
* @param {Cartesian3} [result] The object onto which to store the result.
@@ -70,14 +68,12 @@ const scratchQVec = new Cartesian3();
*
* Implements {@link https://cadxfem.org/inf/Fast%20MinimumStorage%20RayTriangle%20Intersection.pdf|
* Fast Minimum Storage Ray/Triangle Intersection} by Tomas Moller and Ben Trumbore.
- *
* @memberof IntersectionTests
- *
* @param {Ray} ray The ray.
* @param {Cartesian3} p0 The first vertex of the triangle.
* @param {Cartesian3} p1 The second vertex of the triangle.
* @param {Cartesian3} p2 The third vertex of the triangle.
- * @param {boolean} [cullBackFaces=false] If true
, will only compute an intersection with the front face of the triangle
+ * @param {boolean} [cullBackFaces] If true
, will only compute an intersection with the front face of the triangle
* and return undefined for intersections with the back face.
* @returns {number} The intersection as a parametric distance along the ray, or undefined if there is no intersection.
*/
@@ -170,14 +166,12 @@ IntersectionTests.rayTriangleParametric = function (
*
* Implements {@link https://cadxfem.org/inf/Fast%20MinimumStorage%20RayTriangle%20Intersection.pdf|
* Fast Minimum Storage Ray/Triangle Intersection} by Tomas Moller and Ben Trumbore.
- *
* @memberof IntersectionTests
- *
* @param {Ray} ray The ray.
* @param {Cartesian3} p0 The first vertex of the triangle.
* @param {Cartesian3} p1 The second vertex of the triangle.
* @param {Cartesian3} p2 The third vertex of the triangle.
- * @param {boolean} [cullBackFaces=false] If true
, will only compute an intersection with the front face of the triangle
+ * @param {boolean} [cullBackFaces] If true
, will only compute an intersection with the front face of the triangle
* and return undefined for intersections with the back face.
* @param {Cartesian3} [result] The Cartesian3
onto which to store the result.
* @returns {Cartesian3} The intersection point or undefined if there is no intersections.
@@ -214,13 +208,12 @@ const scratchLineSegmentTriangleRay = new Ray();
/**
* Computes the intersection of a line segment and a triangle.
* @memberof IntersectionTests
- *
* @param {Cartesian3} v0 The an end point of the line segment.
* @param {Cartesian3} v1 The other end point of the line segment.
* @param {Cartesian3} p0 The first vertex of the triangle.
* @param {Cartesian3} p1 The second vertex of the triangle.
* @param {Cartesian3} p2 The third vertex of the triangle.
- * @param {boolean} [cullBackFaces=false] If true
, will only compute an intersection with the front face of the triangle
+ * @param {boolean} [cullBackFaces] If true
, will only compute an intersection with the front face of the triangle
* and return undefined for intersections with the back face.
* @param {Cartesian3} [result] The Cartesian3
onto which to store the result.
* @returns {Cartesian3} The intersection point or undefined if there is no intersections.
@@ -341,7 +334,6 @@ function raySphere(ray, sphere, result) {
/**
* Computes the intersection points of a ray with a sphere.
* @memberof IntersectionTests
- *
* @param {Ray} ray The ray.
* @param {BoundingSphere} sphere The sphere.
* @param {Interval} [result] The result onto which to store the result.
@@ -371,7 +363,6 @@ const scratchLineSegmentRay = new Ray();
/**
* Computes the intersection points of a line segment with a sphere.
* @memberof IntersectionTests
- *
* @param {Cartesian3} p0 An end point of the line segment.
* @param {Cartesian3} p1 The other end point of the line segment.
* @param {BoundingSphere} sphere The sphere.
@@ -413,7 +404,6 @@ const scratchW = new Cartesian3();
/**
* Computes the intersection points of a ray with an ellipsoid.
- *
* @param {Ray} ray The ray.
* @param {Ellipsoid} ellipsoid The ellipsoid.
* @returns {Interval} The interval containing scalar points along the ray or undefined if there are no intersections.
@@ -509,6 +499,11 @@ function addWithCancellationCheck(left, right, tolerance) {
}
/**
+ * @param A
+ * @param b
+ * @param c
+ * @param x
+ * @param w
* @private
*/
IntersectionTests.quadraticVectorExpression = function (A, b, c, x, w) {
@@ -657,7 +652,6 @@ const surfPointScratch = new Cartographic();
/**
* Provides the point along the ray which is nearest to the ellipsoid.
- *
* @param {Ray} ray The ray.
* @param {Ellipsoid} ellipsoid The ellipsoid.
* @returns {Cartesian3} The nearest planetodetic point on the ray.
@@ -797,13 +791,11 @@ const lineSegmentPlaneDifference = new Cartesian3();
/**
* Computes the intersection of a line segment and a plane.
- *
* @param {Cartesian3} endPoint0 An end point of the line segment.
* @param {Cartesian3} endPoint1 The other end point of the line segment.
* @param {Plane} plane The plane.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The intersection point or undefined if there is no intersection.
- *
* @example
* const origin = Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883);
* const normal = ellipsoid.geodeticSurfaceNormal(origin);
@@ -866,13 +858,11 @@ IntersectionTests.lineSegmentPlane = function (
/**
* Computes the intersection of a triangle and a plane
- *
* @param {Cartesian3} p0 First point of the triangle
* @param {Cartesian3} p1 Second point of the triangle
* @param {Cartesian3} p2 Third point of the triangle
* @param {Plane} plane Intersection plane
* @returns {object} An object with properties positions
and indices
, which are arrays that represent three triangles that do not cross the plane. (Undefined if no intersection exists)
- *
* @example
* const origin = Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883);
* const normal = ellipsoid.geodeticSurfaceNormal(origin);
diff --git a/packages/engine/Source/Core/Intersections2D.js b/packages/engine/Source/Core/Intersections2D.js
index df98e06093db..8beab6cfed0c 100644
--- a/packages/engine/Source/Core/Intersections2D.js
+++ b/packages/engine/Source/Core/Intersections2D.js
@@ -6,7 +6,6 @@ import DeveloperError from "./DeveloperError.js";
/**
* Contains functions for operating on 2D triangles.
- *
* @namespace Intersections2D
*/
const Intersections2D = {};
@@ -15,7 +14,6 @@ const Intersections2D = {};
* Splits a 2D triangle at given axis-aligned threshold value and returns the resulting
* polygon on a given side of the threshold. The resulting polygon may have 0, 1, 2,
* 3, or 4 vertices.
- *
* @param {number} threshold The threshold coordinate value at which to clip the triangle.
* @param {boolean} keepAbove true to keep the portion of the triangle above the threshold, or false
* to keep the portion below.
@@ -32,7 +30,6 @@ const Intersections2D = {};
* index of each of the two original vertices forming the line segment that
* the new vertex lies on, and the fraction of the distance from the first
* vertex to the second one.
- *
* @example
* const result = Cesium.Intersections2D.clipTriangleAtAxisAlignedThreshold(0.5, false, 0.2, 0.6, 0.4);
* // result === [2, 0, -1, 1, 0, 0.25, -1, 1, 2, 0.5]
@@ -216,7 +213,6 @@ Intersections2D.clipTriangleAtAxisAlignedThreshold = function (
/**
* Compute the barycentric coordinates of a 2D position within a 2D triangle.
- *
* @param {number} x The x coordinate of the position for which to find the barycentric coordinates.
* @param {number} y The y coordinate of the position for which to find the barycentric coordinates.
* @param {number} x1 The x coordinate of the triangle's first vertex.
@@ -228,7 +224,6 @@ Intersections2D.clipTriangleAtAxisAlignedThreshold = function (
* @param {Cartesian3} [result] The instance into to which to copy the result. If this parameter
* is undefined, a new instance is created and returned.
* @returns {Cartesian3} The barycentric coordinates of the position within the triangle.
- *
* @example
* const result = Cesium.Intersections2D.computeBarycentricCoordinates(0.0, 0.0, 0.0, 1.0, -1, -0.5, 1, -0.5);
* // result === new Cesium.Cartesian3(1.0 / 3.0, 1.0 / 3.0, 1.0 / 3.0);
@@ -293,7 +288,6 @@ Intersections2D.computeBarycentricCoordinates = function (
/**
* Compute the intersection between 2 line segments
- *
* @param {number} x00 The x coordinate of the first line's first vertex.
* @param {number} y00 The y coordinate of the first line's first vertex.
* @param {number} x01 The x coordinate of the first line's second vertex.
@@ -305,7 +299,6 @@ Intersections2D.computeBarycentricCoordinates = function (
* @param {Cartesian2} [result] The instance into to which to copy the result. If this parameter
* is undefined, a new instance is created and returned.
* @returns {Cartesian2} The intersection point, undefined if there is no intersection point or lines are coincident.
- *
* @example
* const result = Cesium.Intersections2D.computeLineSegmentLineSegmentIntersection(0.0, 0.0, 0.0, 2.0, -1, 1, 1, 1);
* // result === new Cesium.Cartesian2(0.0, 1.0);
diff --git a/packages/engine/Source/Core/Interval.js b/packages/engine/Source/Core/Interval.js
index 4f8f99c8b962..abfa8bc72d6f 100644
--- a/packages/engine/Source/Core/Interval.js
+++ b/packages/engine/Source/Core/Interval.js
@@ -3,10 +3,9 @@ import defaultValue from "./defaultValue.js";
/**
* Represents the closed interval [start, stop].
* @alias Interval
- * @constructor
- *
- * @param {number} [start=0.0] The beginning of the interval.
- * @param {number} [stop=0.0] The end of the interval.
+ * @class
+ * @param {number} [start] The beginning of the interval.
+ * @param {number} [stop] The end of the interval.
*/
function Interval(start, stop) {
/**
diff --git a/packages/engine/Source/Core/Ion.js b/packages/engine/Source/Core/Ion.js
index a0a4bba815e1..249e70fe315f 100644
--- a/packages/engine/Source/Core/Ion.js
+++ b/packages/engine/Source/Core/Ion.js
@@ -11,7 +11,6 @@ const defaultAccessToken =
* An ion access token is only required if you are using any ion related APIs.
* A default access token is provided for evaluation purposes only.
* Sign up for a free ion account and get your own access token at {@link https://cesium.com}
- *
* @see IonResource
* @see IonImageryProvider
* @see IonGeocoderService
@@ -23,14 +22,12 @@ const Ion = {};
/**
* Gets or sets the default Cesium ion access token.
- *
* @type {string}
*/
Ion.defaultAccessToken = defaultAccessToken;
/**
* Gets or sets the default Cesium ion server.
- *
* @type {string|Resource}
* @default https://api.cesium.com
*/
diff --git a/packages/engine/Source/Core/IonGeocoderService.js b/packages/engine/Source/Core/IonGeocoderService.js
index 7ff6f6260d2d..2a71001b0d12 100644
--- a/packages/engine/Source/Core/IonGeocoderService.js
+++ b/packages/engine/Source/Core/IonGeocoderService.js
@@ -9,13 +9,11 @@ import Resource from "./Resource.js";
/**
* Provides geocoding through Cesium ion.
* @alias IonGeocoderService
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Scene} options.scene The scene
- * @param {string} [options.accessToken=Ion.defaultAccessToken] The access token to use.
- * @param {string|Resource} [options.server=Ion.defaultServer] The resource to the Cesium ion API server.
- *
+ * @param {string} [options.accessToken] The access token to use.
+ * @param {string|Resource} [options.server] The resource to the Cesium ion API server.
* @see Ion
*/
function IonGeocoderService(options) {
@@ -68,9 +66,9 @@ Object.defineProperties(IonGeocoderService.prototype, {
/**
* @function
- *
+ * @param geocodeType
* @param {string} query The query to be sent to the geocoder service
- * @param {GeocodeType} [type=GeocodeType.SEARCH] The type of geocode to perform.
+ * @param {GeocodeType} [type] The type of geocode to perform.
* @returns {Promise}
*/
IonGeocoderService.prototype.geocode = async function (query, geocodeType) {
diff --git a/packages/engine/Source/Core/IonResource.js b/packages/engine/Source/Core/IonResource.js
index b0dfe6bd43ff..550c163d26ff 100644
--- a/packages/engine/Source/Core/IonResource.js
+++ b/packages/engine/Source/Core/IonResource.js
@@ -10,14 +10,11 @@ import RuntimeError from "./RuntimeError.js";
/**
* A {@link Resource} instance that encapsulates Cesium ion asset access.
* This object is normally not instantiated directly, use {@link IonResource.fromAssetId}.
- *
* @alias IonResource
- * @constructor
+ * @class
* @augments Resource
- *
* @param {object} endpoint The result of the Cesium ion asset endpoint service.
* @param {Resource} endpointResource The resource used to retrieve the endpoint.
- *
* @see Ion
* @see IonImageryProvider
* @see createWorldTerrain
@@ -79,13 +76,11 @@ if (defined(Object.create)) {
/**
* Asynchronously creates an instance.
- *
* @param {number} assetId The Cesium ion asset id.
* @param {object} [options] An object with the following properties:
- * @param {string} [options.accessToken=Ion.defaultAccessToken] The access token to use.
- * @param {string|Resource} [options.server=Ion.defaultServer] The resource to the Cesium ion API server.
+ * @param {string} [options.accessToken] The access token to use.
+ * @param {string|Resource} [options.server] The resource to the Cesium ion API server.
* @returns {Promise} A Promise to am instance representing the Cesium ion Asset.
- *
* @example
* // Load a Cesium3DTileset with asset ID of 124624234
* try {
@@ -95,7 +90,6 @@ if (defined(Object.create)) {
* } catch (error) {
* console.error(`Error creating tileset: ${error}`);
* }
- *
* @example
* //Load a CZML file with asset ID of 10890
* Cesium.IonResource.fromAssetId(10890)
@@ -117,7 +111,6 @@ IonResource.fromAssetId = function (assetId, options) {
Object.defineProperties(IonResource.prototype, {
/**
* Gets the credits required for attribution of the asset.
- *
* @memberof IonResource.prototype
* @type {Credit[]}
* @readonly
@@ -144,7 +137,11 @@ Object.defineProperties(IonResource.prototype, {
},
});
-/** @private */
+/**
+ * @param endpoint
+ * @param endpointResource
+ * @private
+ */
IonResource.getCreditsFromEndpoint = function (endpoint, endpointResource) {
const credits = endpoint.attributions.map(Credit.getIonCredit);
const defaultTokenCredit = Ion.getDefaultTokenCredit(
@@ -213,6 +210,8 @@ IonResource.prototype._makeRequest = function (options) {
};
/**
+ * @param assetId
+ * @param options
* @private
*/
IonResource._createEndpointResource = function (assetId, options) {
diff --git a/packages/engine/Source/Core/Iso8601.js b/packages/engine/Source/Core/Iso8601.js
index 3b491f54c380..b477550baa14 100644
--- a/packages/engine/Source/Core/Iso8601.js
+++ b/packages/engine/Source/Core/Iso8601.js
@@ -16,9 +16,7 @@ const MAXIMUM_INTERVAL = Object.freeze(
/**
* Constants related to ISO8601 support.
- *
* @namespace
- *
* @see {@link http://en.wikipedia.org/wiki/ISO_8601|ISO 8601 on Wikipedia}
* @see JulianDate
* @see TimeInterval
@@ -27,7 +25,6 @@ const Iso8601 = {
/**
* A {@link JulianDate} representing the earliest time representable by an ISO8601 date.
* This is equivalent to the date string '0000-01-01T00:00:00Z'
- *
* @type {JulianDate}
* @constant
*/
@@ -36,7 +33,6 @@ const Iso8601 = {
/**
* A {@link JulianDate} representing the latest time representable by an ISO8601 date.
* This is equivalent to the date string '9999-12-31T24:00:00Z'
- *
* @type {JulianDate}
* @constant
*/
@@ -45,7 +41,6 @@ const Iso8601 = {
/**
* A {@link TimeInterval} representing the largest interval representable by an ISO8601 interval.
* This is equivalent to the interval string '0000-01-01T00:00:00Z/9999-12-31T24:00:00Z'
- *
* @type {TimeInterval}
* @constant
*/
diff --git a/packages/engine/Source/Core/JulianDate.js b/packages/engine/Source/Core/JulianDate.js
index 3e8a6ec24d5e..fe08e5009f48 100644
--- a/packages/engine/Source/Core/JulianDate.js
+++ b/packages/engine/Source/Core/JulianDate.js
@@ -197,11 +197,10 @@ const iso8601ErrorMessage = "Invalid ISO 8601 date.";
* leap seconds, the date is always stored in the International Atomic Time standard
* {@link TimeStandard.TAI}.
* @alias JulianDate
- * @constructor
- *
- * @param {number} [julianDayNumber=0.0] The Julian Day Number representing the number of whole days. Fractional days will also be handled correctly.
- * @param {number} [secondsOfDay=0.0] The number of seconds into the current Julian Day Number. Fractional seconds, negative seconds and seconds greater than a day will be handled correctly.
- * @param {TimeStandard} [timeStandard=TimeStandard.UTC] The time standard in which the first two parameters are defined.
+ * @class
+ * @param {number} [julianDayNumber] The Julian Day Number representing the number of whole days. Fractional days will also be handled correctly.
+ * @param {number} [secondsOfDay] The number of seconds into the current Julian Day Number. Fractional seconds, negative seconds and seconds greater than a day will be handled correctly.
+ * @param {TimeStandard} [timeStandard] The time standard in which the first two parameters are defined.
*/
function JulianDate(julianDayNumber, secondsOfDay, timeStandard) {
/**
@@ -235,12 +234,10 @@ function JulianDate(julianDayNumber, secondsOfDay, timeStandard) {
/**
* Creates a new instance from a GregorianDate.
- *
* @param {GregorianDate} date A GregorianDate.
* @param {JulianDate} [result] An existing instance to use for the result.
* @returns {JulianDate} The modified result parameter or a new instance if none was provided.
- *
- * @exception {DeveloperError} date must be a valid GregorianDate.
+ * @throws {DeveloperError} date must be a valid GregorianDate.
*/
JulianDate.fromGregorianDate = function (date, result) {
//>>includeStart('debug', pragmas.debug);
@@ -268,12 +265,10 @@ JulianDate.fromGregorianDate = function (date, result) {
/**
* Creates a new instance from a JavaScript Date.
- *
* @param {Date} date A JavaScript Date.
* @param {JulianDate} [result] An existing instance to use for the result.
* @returns {JulianDate} The modified result parameter or a new instance if none was provided.
- *
- * @exception {DeveloperError} date must be a valid JavaScript Date.
+ * @throws {DeveloperError} date must be a valid JavaScript Date.
*/
JulianDate.fromDate = function (date, result) {
//>>includeStart('debug', pragmas.debug);
@@ -303,12 +298,10 @@ JulianDate.fromDate = function (date, result) {
* Creates a new instance from a from an {@link http://en.wikipedia.org/wiki/ISO_8601|ISO 8601} date.
* This method is superior to Date.parse
because it will handle all valid formats defined by the ISO 8601
* specification, including leap seconds and sub-millisecond times, which discarded by most JavaScript implementations.
- *
* @param {string} iso8601String An ISO 8601 date.
* @param {JulianDate} [result] An existing instance to use for the result.
* @returns {JulianDate} The modified result parameter or a new instance if none was provided.
- *
- * @exception {DeveloperError} Invalid ISO 8601 date.
+ * @throws {DeveloperError} Invalid ISO 8601 date.
*/
JulianDate.fromIso8601 = function (iso8601String, result) {
//>>includeStart('debug', pragmas.debug);
@@ -608,7 +601,6 @@ JulianDate.fromIso8601 = function (iso8601String, result) {
/**
* Creates a new instance that represents the current system time.
* This is equivalent to calling JulianDate.fromDate(new Date());
.
- *
* @param {JulianDate} [result] An existing instance to use for the result.
* @returns {JulianDate} The modified result parameter or a new instance if none was provided.
*/
@@ -620,7 +612,6 @@ const toGregorianDateScratch = new JulianDate(0, 0, TimeStandard.TAI);
/**
* Creates a {@link GregorianDate} from the provided instance.
- *
* @param {JulianDate} julianDate The date to be converted.
* @param {GregorianDate} [result] An existing instance to use for the result.
* @returns {GregorianDate} The modified result parameter or a new instance if none was provided.
@@ -712,7 +703,6 @@ JulianDate.toGregorianDate = function (julianDate, result) {
* Since JavaScript dates are only accurate to the nearest millisecond and
* cannot represent a leap second, consider using {@link JulianDate.toGregorianDate} instead.
* If the provided JulianDate is during a leap second, the previous second is used.
- *
* @param {JulianDate} julianDate The date to be converted.
* @returns {Date} A new instance representing the provided date.
*/
@@ -743,7 +733,6 @@ JulianDate.toDate = function (julianDate) {
/**
* Creates an ISO8601 representation of the provided date.
- *
* @param {JulianDate} julianDate The date to be converted.
* @param {number} [precision] The number of fractional digits used to represent the seconds component. By default, the most precise representation is used.
* @returns {string} The ISO8601 representation of the provided date.
@@ -832,7 +821,6 @@ JulianDate.toIso8601 = function (julianDate, precision) {
/**
* Duplicates a JulianDate instance.
- *
* @param {JulianDate} julianDate The date to duplicate.
* @param {JulianDate} [result] An existing instance to use for the result.
* @returns {JulianDate} The modified result parameter or a new instance if none was provided. Returns undefined if julianDate is undefined.
@@ -855,7 +843,6 @@ JulianDate.clone = function (julianDate, result) {
/**
* Compares two instances.
- *
* @param {JulianDate} left The first instance.
* @param {JulianDate} right The second instance.
* @returns {number} A negative value if left is less than right, a positive value if left is greater than right, or zero if left and right are equal.
@@ -879,7 +866,6 @@ JulianDate.compare = function (left, right) {
/**
* Compares two instances and returns true
if they are equal, false
otherwise.
- *
* @param {JulianDate} [left] The first instance.
* @param {JulianDate} [right] The second instance.
* @returns {boolean} true
if the dates are equal; otherwise, false
.
@@ -899,10 +885,9 @@ JulianDate.equals = function (left, right) {
* each other. That is, in order for the dates to be considered equal (and for
* this function to return true
), the absolute value of the difference between them, in
* seconds, must be less than epsilon
.
- *
* @param {JulianDate} [left] The first instance.
* @param {JulianDate} [right] The second instance.
- * @param {number} [epsilon=0] The maximum number of seconds that should separate the two instances.
+ * @param {number} [epsilon] The maximum number of seconds that should separate the two instances.
* @returns {boolean} true
if the two dates are within epsilon
seconds of each other; otherwise false
.
*/
JulianDate.equalsEpsilon = function (left, right, epsilon) {
@@ -918,7 +903,6 @@ JulianDate.equalsEpsilon = function (left, right, epsilon) {
/**
* Computes the total number of whole and fractional days represented by the provided instance.
- *
* @param {JulianDate} julianDate The date.
* @returns {number} The Julian date as single floating point number.
*/
@@ -936,7 +920,6 @@ JulianDate.totalDays = function (julianDate) {
/**
* Computes the difference in seconds between the provided instance.
- *
* @param {JulianDate} left The first instance.
* @param {JulianDate} right The second instance.
* @returns {number} The difference, in seconds, when subtracting right
from left
.
@@ -958,7 +941,6 @@ JulianDate.secondsDifference = function (left, right) {
/**
* Computes the difference in days between the provided instance.
- *
* @param {JulianDate} left The first instance.
* @param {JulianDate} right The second instance.
* @returns {number} The difference, in days, when subtracting right
from left
.
@@ -981,7 +963,6 @@ JulianDate.daysDifference = function (left, right) {
/**
* Computes the number of seconds the provided instance is ahead of UTC.
- *
* @param {JulianDate} julianDate The date.
* @returns {number} The number of seconds the provided instance is ahead of UTC
*/
@@ -1005,7 +986,6 @@ JulianDate.computeTaiMinusUtc = function (julianDate) {
/**
* Adds the provided number of seconds to the provided date instance.
- *
* @param {JulianDate} julianDate The date.
* @param {number} seconds The number of seconds to add or subtract.
* @param {JulianDate} result An existing instance to use for the result.
@@ -1033,7 +1013,6 @@ JulianDate.addSeconds = function (julianDate, seconds, result) {
/**
* Adds the provided number of minutes to the provided date instance.
- *
* @param {JulianDate} julianDate The date.
* @param {number} minutes The number of minutes to add or subtract.
* @param {JulianDate} result An existing instance to use for the result.
@@ -1059,7 +1038,6 @@ JulianDate.addMinutes = function (julianDate, minutes, result) {
/**
* Adds the provided number of hours to the provided date instance.
- *
* @param {JulianDate} julianDate The date.
* @param {number} hours The number of hours to add or subtract.
* @param {JulianDate} result An existing instance to use for the result.
@@ -1085,7 +1063,6 @@ JulianDate.addHours = function (julianDate, hours, result) {
/**
* Adds the provided number of days to the provided date instance.
- *
* @param {JulianDate} julianDate The date.
* @param {number} days The number of days to add or subtract.
* @param {JulianDate} result An existing instance to use for the result.
@@ -1110,7 +1087,6 @@ JulianDate.addDays = function (julianDate, days, result) {
/**
* Compares the provided instances and returns true
if left
is earlier than right
, false
otherwise.
- *
* @param {JulianDate} left The first instance.
* @param {JulianDate} right The second instance.
* @returns {boolean} true
if left
is earlier than right
, false
otherwise.
@@ -1121,7 +1097,6 @@ JulianDate.lessThan = function (left, right) {
/**
* Compares the provided instances and returns true
if left
is earlier than or equal to right
, false
otherwise.
- *
* @param {JulianDate} left The first instance.
* @param {JulianDate} right The second instance.
* @returns {boolean} true
if left
is earlier than or equal to right
, false
otherwise.
@@ -1132,7 +1107,6 @@ JulianDate.lessThanOrEquals = function (left, right) {
/**
* Compares the provided instances and returns true
if left
is later than right
, false
otherwise.
- *
* @param {JulianDate} left The first instance.
* @param {JulianDate} right The second instance.
* @returns {boolean} true
if left
is later than right
, false
otherwise.
@@ -1143,7 +1117,6 @@ JulianDate.greaterThan = function (left, right) {
/**
* Compares the provided instances and returns true
if left
is later than or equal to right
, false
otherwise.
- *
* @param {JulianDate} left The first instance.
* @param {JulianDate} right The second instance.
* @returns {boolean} true
if left
is later than or equal to right
, false
otherwise.
@@ -1154,7 +1127,6 @@ JulianDate.greaterThanOrEquals = function (left, right) {
/**
* Duplicates this instance.
- *
* @param {JulianDate} [result] An existing instance to use for the result.
* @returns {JulianDate} The modified result parameter or a new instance if none was provided.
*/
@@ -1164,7 +1136,6 @@ JulianDate.prototype.clone = function (result) {
/**
* Compares this and the provided instance and returns true
if they are equal, false
otherwise.
- *
* @param {JulianDate} [right] The second instance.
* @returns {boolean} true
if the dates are equal; otherwise, false
.
*/
@@ -1177,9 +1148,8 @@ JulianDate.prototype.equals = function (right) {
* each other. That is, in order for the dates to be considered equal (and for
* this function to return true
), the absolute value of the difference between them, in
* seconds, must be less than epsilon
.
- *
* @param {JulianDate} [right] The second instance.
- * @param {number} [epsilon=0] The maximum number of seconds that should separate the two instances.
+ * @param {number} [epsilon] The maximum number of seconds that should separate the two instances.
* @returns {boolean} true
if the two dates are within epsilon
seconds of each other; otherwise false
.
*/
JulianDate.prototype.equalsEpsilon = function (right, epsilon) {
@@ -1188,7 +1158,6 @@ JulianDate.prototype.equalsEpsilon = function (right, epsilon) {
/**
* Creates a string representing this date in ISO8601 format.
- *
* @returns {string} A string representing this date in ISO8601 format.
*/
JulianDate.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/KTX2Transcoder.js b/packages/engine/Source/Core/KTX2Transcoder.js
index f570a32dc691..61d23848b760 100644
--- a/packages/engine/Source/Core/KTX2Transcoder.js
+++ b/packages/engine/Source/Core/KTX2Transcoder.js
@@ -6,7 +6,6 @@ import TaskProcessor from "./TaskProcessor.js";
/**
* Transcodes KTX2 textures using web workers.
- *
* @private
*/
function KTX2Transcoder() {}
diff --git a/packages/engine/Source/Core/KeyboardEventModifier.js b/packages/engine/Source/Core/KeyboardEventModifier.js
index ede05482c421..bb9e7106c299 100644
--- a/packages/engine/Source/Core/KeyboardEventModifier.js
+++ b/packages/engine/Source/Core/KeyboardEventModifier.js
@@ -1,13 +1,11 @@
/**
* This enumerated type is for representing keyboard modifiers. These are keys
* that are held down in addition to other event types.
- *
* @enum {number}
*/
const KeyboardEventModifier = {
/**
* Represents the shift key being held down.
- *
* @type {number}
* @constant
*/
@@ -15,7 +13,6 @@ const KeyboardEventModifier = {
/**
* Represents the control key being held down.
- *
* @type {number}
* @constant
*/
@@ -23,7 +20,6 @@ const KeyboardEventModifier = {
/**
* Represents the alt key being held down.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/LagrangePolynomialApproximation.js b/packages/engine/Source/Core/LagrangePolynomialApproximation.js
index 67c15aa28fb1..8e2fcd83a3e0 100644
--- a/packages/engine/Source/Core/LagrangePolynomialApproximation.js
+++ b/packages/engine/Source/Core/LagrangePolynomialApproximation.js
@@ -2,7 +2,6 @@ import defined from "./defined.js";
/**
* An {@link InterpolationAlgorithm} for performing Lagrange interpolation.
- *
* @namespace LagrangePolynomialApproximation
*/
const LagrangePolynomialApproximation = {
@@ -11,7 +10,6 @@ const LagrangePolynomialApproximation = {
/**
* Given the desired degree, returns the number of data points required for interpolation.
- *
* @param {number} degree The desired degree of interpolation.
* @returns {number} The number of required data points needed for the desired degree of interpolation.
*/
@@ -21,7 +19,6 @@ LagrangePolynomialApproximation.getRequiredDataPoints = function (degree) {
/**
* Interpolates values using Lagrange Polynomial Approximation.
- *
* @param {number} x The independent variable for which the dependent variables will be interpolated.
* @param {number[]} xTable The array of independent variables to use to interpolate. The values
* in this array must be in increasing order and the same value must not occur twice in the array.
diff --git a/packages/engine/Source/Core/LeapSecond.js b/packages/engine/Source/Core/LeapSecond.js
index dbcf62cd453f..eb6b39d7e05f 100644
--- a/packages/engine/Source/Core/LeapSecond.js
+++ b/packages/engine/Source/Core/LeapSecond.js
@@ -2,8 +2,7 @@
* Describes a single leap second, which is constructed from a {@link JulianDate} and a
* numerical offset representing the number of seconds TAI is ahead of the UTC time standard.
* @alias LeapSecond
- * @constructor
- *
+ * @class
* @param {JulianDate} [date] A Julian date representing the time of the leap second.
* @param {number} [offset] The cumulative number of seconds that TAI is ahead of UTC at the provided date.
*/
diff --git a/packages/engine/Source/Core/LinearApproximation.js b/packages/engine/Source/Core/LinearApproximation.js
index c605a7f4fb39..b36168e60722 100644
--- a/packages/engine/Source/Core/LinearApproximation.js
+++ b/packages/engine/Source/Core/LinearApproximation.js
@@ -3,7 +3,6 @@ import DeveloperError from "./DeveloperError.js";
/**
* An {@link InterpolationAlgorithm} for performing linear interpolation.
- *
* @namespace LinearApproximation
*/
const LinearApproximation = {
@@ -16,7 +15,6 @@ const LinearApproximation = {
* always returns 2.
* @param {number} degree The desired degree of interpolation.
* @returns {number} This function always returns 2.
- *
*/
LinearApproximation.getRequiredDataPoints = function (degree) {
return 2;
@@ -24,7 +22,6 @@ LinearApproximation.getRequiredDataPoints = function (degree) {
/**
* Interpolates values using linear approximation.
- *
* @param {number} x The independent variable for which the dependent variables will be interpolated.
* @param {number[]} xTable The array of independent variables to use to interpolate. The values
* in this array must be in increasing order and the same value must not occur twice in the array.
diff --git a/packages/engine/Source/Core/LinearSpline.js b/packages/engine/Source/Core/LinearSpline.js
index d067d318cc26..0b5adb604489 100644
--- a/packages/engine/Source/Core/LinearSpline.js
+++ b/packages/engine/Source/Core/LinearSpline.js
@@ -6,19 +6,14 @@ import Spline from "./Spline.js";
/**
* A spline that uses piecewise linear interpolation to create a curve.
- *
* @alias LinearSpline
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {number[]} options.times An array of strictly increasing, unit-less, floating-point times at each point.
* The values are in no way connected to the clock time. They are the parameterization for the curve.
* @param {number[]|Cartesian3[]} options.points The array of control points.
- *
- * @exception {DeveloperError} points.length must be greater than or equal to 2.
- * @exception {DeveloperError} times.length must be equal to points.length.
- *
- *
+ * @throws {DeveloperError} points.length must be greater than or equal to 2.
+ * @throws {DeveloperError} times.length must be equal to points.length.
* @example
* const times = [ 0.0, 1.5, 3.0, 4.5, 6.0 ];
* const spline = new Cesium.LinearSpline({
@@ -33,7 +28,6 @@ import Spline from "./Spline.js";
* });
*
* const p0 = spline.evaluate(times[0]);
- *
* @see ConstantSpline
* @see SteppedSpline
* @see HermiteSpline
@@ -71,9 +65,7 @@ function LinearSpline(options) {
Object.defineProperties(LinearSpline.prototype, {
/**
* An array of times for the control points.
- *
* @memberof LinearSpline.prototype
- *
* @type {number[]}
* @readonly
*/
@@ -85,9 +77,7 @@ Object.defineProperties(LinearSpline.prototype, {
/**
* An array of {@link Cartesian3} control points.
- *
* @memberof LinearSpline.prototype
- *
* @type {number[]|Cartesian3[]}
* @readonly
*/
@@ -102,11 +92,9 @@ Object.defineProperties(LinearSpline.prototype, {
* Finds an index i
in times
such that the parameter
* time
is in the interval [times[i], times[i + 1]]
.
* @function
- *
* @param {number} time The time.
* @returns {number} The index for the element at the start of the interval.
- *
- * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
@@ -115,29 +103,25 @@ LinearSpline.prototype.findTimeInterval = Spline.prototype.findTimeInterval;
/**
* Wraps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, wrapped around to the updated animation.
+ * @returns {number} The time, wrapped around to the updated animation.
*/
LinearSpline.prototype.wrapTime = Spline.prototype.wrapTime;
/**
* Clamps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, clamped to the animation period.
+ * @returns {number} The time, clamped to the animation period.
*/
LinearSpline.prototype.clampTime = Spline.prototype.clampTime;
/**
* Evaluates the curve at a given time.
- *
* @param {number} time The time at which to evaluate the curve.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {number|Cartesian3} The modified result parameter or a new instance of the point on the curve at the given time.
- *
- * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
diff --git a/packages/engine/Source/Core/ManagedArray.js b/packages/engine/Source/Core/ManagedArray.js
index 9eeb280e5ffd..1a7499115ac4 100644
--- a/packages/engine/Source/Core/ManagedArray.js
+++ b/packages/engine/Source/Core/ManagedArray.js
@@ -3,12 +3,10 @@ import defaultValue from "./defaultValue.js";
/**
* A wrapper around arrays so that the internal length of the array can be manually managed.
- *
* @alias ManagedArray
- * @constructor
+ * @class
* @private
- *
- * @param {number} [length=0] The initial length of the array.
+ * @param {number} [length] The initial length of the array.
*/
function ManagedArray(length) {
length = defaultValue(length, 0);
@@ -20,7 +18,6 @@ Object.defineProperties(ManagedArray.prototype, {
/**
* Gets or sets the length of the array.
* If the set length is greater than the length of the internal array, the internal array is resized.
- *
* @memberof ManagedArray.prototype
* @type {number}
*/
@@ -48,7 +45,6 @@ Object.defineProperties(ManagedArray.prototype, {
/**
* Gets the internal array.
- *
* @memberof ManagedArray.prototype
* @type {Array}
* @readonly
@@ -62,7 +58,6 @@ Object.defineProperties(ManagedArray.prototype, {
/**
* Gets the element at an index.
- *
* @param {number} index The index to get.
*/
ManagedArray.prototype.get = function (index) {
@@ -75,7 +70,6 @@ ManagedArray.prototype.get = function (index) {
/**
* Sets the element at an index. Resizes the array if index is greater than the length of the array.
- *
* @param {number} index The index to set.
* @param {*} element The element to set at index.
*/
@@ -92,7 +86,6 @@ ManagedArray.prototype.set = function (index, element) {
/**
* Returns the last element in the array without modifying the array.
- *
* @returns {*} The last element in the array.
*/
ManagedArray.prototype.peek = function () {
@@ -101,7 +94,6 @@ ManagedArray.prototype.peek = function () {
/**
* Push an element into the array.
- *
* @param {*} element The element to push.
*/
ManagedArray.prototype.push = function (element) {
@@ -111,7 +103,6 @@ ManagedArray.prototype.push = function (element) {
/**
* Pop an element from the array.
- *
* @returns {*} The last element in the array.
*/
ManagedArray.prototype.pop = function () {
@@ -125,7 +116,6 @@ ManagedArray.prototype.pop = function () {
/**
* Resize the internal array if length > _array.length.
- *
* @param {number} length The length.
*/
ManagedArray.prototype.reserve = function (length) {
@@ -140,7 +130,6 @@ ManagedArray.prototype.reserve = function (length) {
/**
* Resize the array.
- *
* @param {number} length The length.
*/
ManagedArray.prototype.resize = function (length) {
@@ -153,7 +142,6 @@ ManagedArray.prototype.resize = function (length) {
/**
* Trim the internal array to the specified length. Defaults to the current length.
- *
* @param {number} [length] The length.
*/
ManagedArray.prototype.trim = function (length) {
diff --git a/packages/engine/Source/Core/MapProjection.js b/packages/engine/Source/Core/MapProjection.js
index f630e69575d8..58364facc6dc 100644
--- a/packages/engine/Source/Core/MapProjection.js
+++ b/packages/engine/Source/Core/MapProjection.js
@@ -3,11 +3,9 @@ import DeveloperError from "./DeveloperError.js";
/**
* Defines how geodetic ellipsoid coordinates ({@link Cartographic}) project to a
* flat map like Cesium's 2D and Columbus View modes.
- *
* @alias MapProjection
- * @constructor
+ * @class
* @abstract
- *
* @see GeographicProjection
* @see WebMercatorProjection
*/
@@ -18,9 +16,7 @@ function MapProjection() {
Object.defineProperties(MapProjection.prototype, {
/**
* Gets the {@link Ellipsoid}.
- *
* @memberof MapProjection.prototype
- *
* @type {Ellipsoid}
* @readonly
*/
@@ -31,10 +27,8 @@ Object.defineProperties(MapProjection.prototype, {
/**
* Projects {@link Cartographic} coordinates, in radians, to projection-specific map coordinates, in meters.
- *
* @memberof MapProjection
* @function
- *
* @param {Cartographic} cartographic The coordinates to project.
* @param {Cartesian3} [result] An instance into which to copy the result. If this parameter is
* undefined, a new instance is created and returned.
@@ -47,10 +41,8 @@ MapProjection.prototype.project = DeveloperError.throwInstantiationError;
/**
* Unprojects projection-specific map {@link Cartesian3} coordinates, in meters, to {@link Cartographic}
* coordinates, in radians.
- *
* @memberof MapProjection
* @function
- *
* @param {Cartesian3} cartesian The Cartesian position to unproject with height (z) in meters.
* @param {Cartographic} [result] An instance into which to copy the result. If this parameter is
* undefined, a new instance is created and returned.
diff --git a/packages/engine/Source/Core/Math.js b/packages/engine/Source/Core/Math.js
index 59ae199d8dc0..f33e984740d8 100644
--- a/packages/engine/Source/Core/Math.js
+++ b/packages/engine/Source/Core/Math.js
@@ -6,7 +6,6 @@ import DeveloperError from "./DeveloperError.js";
/**
* Math functions.
- *
* @exports CesiumMath
* @alias Math
*/
@@ -200,7 +199,6 @@ CesiumMath.FOUR_GIGABYTES = 4 * 1024 * 1024 * 1024;
/**
* Returns the sign of the value; 1 if the value is positive, -1 if the value is
* negative, or 0 if the value is 0.
- *
* @function
* @param {number} value The value to return the sign of.
* @returns {number} The sign of value.
@@ -228,9 +226,8 @@ CesiumMath.signNotZero = function (value) {
/**
* Converts a scalar value in the range [-1.0, 1.0] to a SNORM in the range [0, rangeMaximum]
* @param {number} value The scalar value in the range [-1.0, 1.0]
- * @param {number} [rangeMaximum=255] The maximum value in the mapped range, 255 by default.
+ * @param {number} [rangeMaximum] The maximum value in the mapped range, 255 by default.
* @returns {number} A SNORM value, where 0 maps to -1.0 and rangeMaximum maps to 1.0.
- *
* @see CesiumMath.fromSNorm
*/
CesiumMath.toSNorm = function (value, rangeMaximum) {
@@ -243,9 +240,8 @@ CesiumMath.toSNorm = function (value, rangeMaximum) {
/**
* Converts a SNORM value in the range [0, rangeMaximum] to a scalar in the range [-1.0, 1.0].
* @param {number} value SNORM value in the range [0, rangeMaximum]
- * @param {number} [rangeMaximum=255] The maximum value in the SNORM range, 255 by default.
+ * @param {number} [rangeMaximum] The maximum value in the SNORM range, 255 by default.
* @returns {number} Scalar in the range [-1.0, 1.0].
- *
* @see CesiumMath.toSNorm
*/
CesiumMath.fromSNorm = function (value, rangeMaximum) {
@@ -276,17 +272,16 @@ CesiumMath.normalize = function (value, rangeMinimum, rangeMaximum) {
* where e is Euler's number, approximately 2.71828183.
*
* Special cases:
- *
- * If the argument is NaN, then the result is NaN.
+ *
+ * If the argument is NaN, then the result is NaN.
*
- * If the argument is infinite, then the result is an infinity
- * with the same sign as the argument.
- *
- * If the argument is zero, then the result is a zero with the
- * same sign as the argument.
- *
- *
+ * If the argument is infinite, then the result is an infinity
+ * with the same sign as the argument.
*
+ * If the argument is zero, then the result is a zero with the
+ * same sign as the argument.
+ *
+ *
* @function
* @param {number} value The number whose hyperbolic sine is to be returned.
* @returns {number} The hyperbolic sine of value
.
@@ -302,15 +297,14 @@ CesiumMath.sinh = defaultValue(Math.sinh, function sinh(value) {
* where e is Euler's number, approximately 2.71828183.
*
* Special cases:
- *
- * If the argument is NaN, then the result is NaN.
- *
- * If the argument is infinite, then the result is positive infinity.
+ *
+ * If the argument is NaN, then the result is NaN.
*
- * If the argument is zero, then the result is 1.0.
- *
- *
+ * If the argument is infinite, then the result is positive infinity.
*
+ * If the argument is zero, then the result is 1.0.
+ *
+ *
* @function
* @param {number} value The number whose hyperbolic cosine is to be returned.
* @returns {number} The hyperbolic cosine of value
.
@@ -321,12 +315,10 @@ CesiumMath.cosh = defaultValue(Math.cosh, function cosh(value) {
/**
* Computes the linear interpolation of two values.
- *
* @param {number} p The start value to interpolate.
* @param {number} q The end value to interpolate.
* @param {number} time The time of interpolation generally in the range [0.0, 1.0]
.
* @returns {number} The linearly interpolated value.
- *
* @example
* const n = Cesium.Math.lerp(0.0, 2.0, 0.5); // returns 1.0
*/
@@ -336,7 +328,6 @@ CesiumMath.lerp = function (p, q, time) {
/**
* pi
- *
* @type {number}
* @constant
*/
@@ -344,7 +335,6 @@ CesiumMath.PI = Math.PI;
/**
* 1/pi
- *
* @type {number}
* @constant
*/
@@ -352,7 +342,6 @@ CesiumMath.ONE_OVER_PI = 1.0 / Math.PI;
/**
* pi/2
- *
* @type {number}
* @constant
*/
@@ -360,7 +349,6 @@ CesiumMath.PI_OVER_TWO = Math.PI / 2.0;
/**
* pi/3
- *
* @type {number}
* @constant
*/
@@ -368,7 +356,6 @@ CesiumMath.PI_OVER_THREE = Math.PI / 3.0;
/**
* pi/4
- *
* @type {number}
* @constant
*/
@@ -376,7 +363,6 @@ CesiumMath.PI_OVER_FOUR = Math.PI / 4.0;
/**
* pi/6
- *
* @type {number}
* @constant
*/
@@ -384,7 +370,6 @@ CesiumMath.PI_OVER_SIX = Math.PI / 6.0;
/**
* 3pi/2
- *
* @type {number}
* @constant
*/
@@ -392,7 +377,6 @@ CesiumMath.THREE_PI_OVER_TWO = (3.0 * Math.PI) / 2.0;
/**
* 2pi
- *
* @type {number}
* @constant
*/
@@ -400,7 +384,6 @@ CesiumMath.TWO_PI = 2.0 * Math.PI;
/**
* 1/2pi
- *
* @type {number}
* @constant
*/
@@ -408,7 +391,6 @@ CesiumMath.ONE_OVER_TWO_PI = 1.0 / (2.0 * Math.PI);
/**
* The number of radians in a degree.
- *
* @type {number}
* @constant
*/
@@ -416,7 +398,6 @@ CesiumMath.RADIANS_PER_DEGREE = Math.PI / 180.0;
/**
* The number of degrees in a radian.
- *
* @type {number}
* @constant
*/
@@ -424,7 +405,6 @@ CesiumMath.DEGREES_PER_RADIAN = 180.0 / Math.PI;
/**
* The number of radians in an arc second.
- *
* @type {number}
* @constant
*/
@@ -460,10 +440,8 @@ CesiumMath.toDegrees = function (radians) {
/**
* Converts a longitude value, in radians, to the range [-Math.PI
, Math.PI
).
- *
* @param {number} angle The longitude value, in radians, to convert to the range [-Math.PI
, Math.PI
).
* @returns {number} The equivalent longitude value in the range [-Math.PI
, Math.PI
).
- *
* @example
* // Convert 270 degrees to -90 degrees longitude
* const longitude = Cesium.Math.convertLongitudeRange(Cesium.Math.toRadians(270.0));
@@ -491,10 +469,8 @@ CesiumMath.convertLongitudeRange = function (angle) {
/**
* Convenience function that clamps a latitude value, in radians, to the range [-Math.PI/2
, Math.PI/2
).
* Useful for sanitizing data before use in objects requiring correct range.
- *
* @param {number} angle The latitude value, in radians, to clamp to the range [-Math.PI/2
, Math.PI/2
).
* @returns {number} The latitude value clamped to the range [-Math.PI/2
, Math.PI/2
).
- *
* @example
* // Clamp 108 degrees latitude to 90 degrees latitude
* const latitude = Cesium.Math.clampToLatitudeRange(Cesium.Math.toRadians(108.0));
@@ -515,7 +491,6 @@ CesiumMath.clampToLatitudeRange = function (angle) {
/**
* Produces an angle in the range -Pi <= angle <= Pi which is equivalent to the provided angle.
- *
* @param {number} angle in radians
* @returns {number} The angle in the range [-CesiumMath.PI
, CesiumMath.PI
].
*/
@@ -535,7 +510,6 @@ CesiumMath.negativePiToPi = function (angle) {
/**
* Produces an angle in the range 0 <= angle <= 2Pi which is equivalent to the provided angle.
- *
* @param {number} angle in radians
* @returns {number} The angle in the range [0, CesiumMath.TWO_PI
].
*/
@@ -562,7 +536,6 @@ CesiumMath.zeroToTwoPi = function (angle) {
/**
* The modulo operation that also works for negative dividends.
- *
* @param {number} m The dividend.
* @param {number} n The divisor.
* @returns {number} The remainder.
@@ -593,13 +566,11 @@ CesiumMath.mod = function (m, n) {
* to avoid problems due to roundoff error when comparing floating-point values directly. The values are
* first compared using an absolute tolerance test. If that fails, a relative tolerance test is performed.
* Use this test if you are unsure of the magnitudes of left and right.
- *
* @param {number} left The first value to compare.
* @param {number} right The other value to compare.
- * @param {number} [relativeEpsilon=0] The maximum inclusive delta between left
and right
for the relative tolerance test.
- * @param {number} [absoluteEpsilon=relativeEpsilon] The maximum inclusive delta between left
and right
for the absolute tolerance test.
+ * @param {number} [relativeEpsilon] The maximum inclusive delta between left
and right
for the relative tolerance test.
+ * @param {number} [absoluteEpsilon] The maximum inclusive delta between left
and right
for the absolute tolerance test.
* @returns {boolean} true
if the values are equal within the epsilon; otherwise, false
.
- *
* @example
* const a = Cesium.Math.equalsEpsilon(0.0, 0.01, Cesium.Math.EPSILON2); // true
* const b = Cesium.Math.equalsEpsilon(0.0, 0.1, Cesium.Math.EPSILON2); // false
@@ -633,7 +604,6 @@ CesiumMath.equalsEpsilon = function (
/**
* Determines if the left value is less than the right value. If the two values are within
* absoluteEpsilon
of each other, they are considered equal and this function returns false.
- *
* @param {number} left The first number to compare.
* @param {number} right The second number to compare.
* @param {number} absoluteEpsilon The absolute epsilon to use in comparison.
@@ -659,7 +629,6 @@ CesiumMath.lessThan = function (left, right, absoluteEpsilon) {
/**
* Determines if the left value is less than or equal to the right value. If the two values are within
* absoluteEpsilon
of each other, they are considered equal and this function returns true.
- *
* @param {number} left The first number to compare.
* @param {number} right The second number to compare.
* @param {number} absoluteEpsilon The absolute epsilon to use in comparison.
@@ -684,7 +653,6 @@ CesiumMath.lessThanOrEquals = function (left, right, absoluteEpsilon) {
/**
* Determines if the left value is greater the right value. If the two values are within
* absoluteEpsilon
of each other, they are considered equal and this function returns false.
- *
* @param {number} left The first number to compare.
* @param {number} right The second number to compare.
* @param {number} absoluteEpsilon The absolute epsilon to use in comparison.
@@ -710,7 +678,6 @@ CesiumMath.greaterThan = function (left, right, absoluteEpsilon) {
/**
* Determines if the left value is greater than or equal to the right value. If the two values are within
* absoluteEpsilon
of each other, they are considered equal and this function returns true.
- *
* @param {number} left The first number to compare.
* @param {number} right The second number to compare.
* @param {number} absoluteEpsilon The absolute epsilon to use in comparison.
@@ -736,17 +703,12 @@ const factorials = [1];
/**
* Computes the factorial of the provided number.
- *
* @param {number} n The number whose factorial is to be computed.
* @returns {number} The factorial of the provided number or undefined if the number is less than 0.
- *
- * @exception {DeveloperError} A number greater than or equal to 0 is required.
- *
- *
+ * @throws {DeveloperError} A number greater than or equal to 0 is required.
* @example
* //Compute 7!, which is equal to 5040
* const computedFactorial = Cesium.Math.factorial(7);
- *
* @see {@link http://en.wikipedia.org/wiki/Factorial|Factorial on Wikipedia}
*/
CesiumMath.factorial = function (n) {
@@ -772,14 +734,11 @@ CesiumMath.factorial = function (n) {
/**
* Increments a number with a wrapping to a minimum value if the number exceeds the maximum value.
- *
* @param {number} [n] The number to be incremented.
* @param {number} [maximumValue] The maximum incremented value before rolling over to the minimum value.
- * @param {number} [minimumValue=0.0] The number reset to after the maximum value has been exceeded.
+ * @param {number} [minimumValue] The number reset to after the maximum value has been exceeded.
* @returns {number} The incremented number.
- *
- * @exception {DeveloperError} Maximum value must be greater than minimum value.
- *
+ * @throws {DeveloperError} Maximum value must be greater than minimum value.
* @example
* const n = Cesium.Math.incrementWrap(5, 10, 0); // returns 6
* const m = Cesium.Math.incrementWrap(10, 10, 0); // returns 0
@@ -806,12 +765,9 @@ CesiumMath.incrementWrap = function (n, maximumValue, minimumValue) {
/**
* Determines if a non-negative integer is a power of two.
* The maximum allowed input is (2^32)-1 due to 32-bit bitwise operator limitation in Javascript.
- *
* @param {number} n The integer to test in the range [0, (2^32)-1].
* @returns {boolean} true
if the number if a power of two; otherwise, false
.
- *
- * @exception {DeveloperError} A number between 0 and (2^32)-1 is required.
- *
+ * @throws {DeveloperError} A number between 0 and (2^32)-1 is required.
* @example
* const t = Cesium.Math.isPowerOfTwo(16); // true
* const f = Cesium.Math.isPowerOfTwo(20); // false
@@ -829,12 +785,9 @@ CesiumMath.isPowerOfTwo = function (n) {
/**
* Computes the next power-of-two integer greater than or equal to the provided non-negative integer.
* The maximum allowed input is 2^31 due to 32-bit bitwise operator limitation in Javascript.
- *
* @param {number} n The integer to test in the range [0, 2^31].
* @returns {number} The next power-of-two integer.
- *
- * @exception {DeveloperError} A number between 0 and 2^31 is required.
- *
+ * @throws {DeveloperError} A number between 0 and 2^31 is required.
* @example
* const n = Cesium.Math.nextPowerOfTwo(29); // 32
* const m = Cesium.Math.nextPowerOfTwo(32); // 32
@@ -861,12 +814,9 @@ CesiumMath.nextPowerOfTwo = function (n) {
/**
* Computes the previous power-of-two integer less than or equal to the provided non-negative integer.
* The maximum allowed input is (2^32)-1 due to 32-bit bitwise operator limitation in Javascript.
- *
* @param {number} n The integer to test in the range [0, (2^32)-1].
* @returns {number} The previous power-of-two integer.
- *
- * @exception {DeveloperError} A number between 0 and (2^32)-1 is required.
- *
+ * @throws {DeveloperError} A number between 0 and (2^32)-1 is required.
* @example
* const n = Cesium.Math.previousPowerOfTwo(29); // 16
* const m = Cesium.Math.previousPowerOfTwo(32); // 32
@@ -893,7 +843,6 @@ CesiumMath.previousPowerOfTwo = function (n) {
/**
* Constraint a value to lie between two values.
- *
* @param {number} value The value to clamp.
* @param {number} min The minimum value.
* @param {number} max The maximum value.
@@ -914,7 +863,6 @@ let randomNumberGenerator = new MersenneTwister();
/**
* Sets the seed used by the random number generator
* in {@link CesiumMath#nextRandomNumber}.
- *
* @param {number} seed An integer used as the seed.
*/
CesiumMath.setRandomNumberSeed = function (seed) {
@@ -930,9 +878,7 @@ CesiumMath.setRandomNumberSeed = function (seed) {
/**
* Generates a random floating point number in the range of [0.0, 1.0)
* using a Mersenne twister.
- *
* @returns {number} A random number in the range of [0.0, 1.0).
- *
* @see CesiumMath.setRandomNumberSeed
* @see {@link http://en.wikipedia.org/wiki/Mersenne_twister|Mersenne twister on Wikipedia}
*/
@@ -942,7 +888,6 @@ CesiumMath.nextRandomNumber = function () {
/**
* Generates a random number between two numbers.
- *
* @param {number} min The minimum value.
* @param {number} max The maximum value.
* @returns {number} A random number between the min and max.
@@ -954,7 +899,6 @@ CesiumMath.randomBetween = function (min, max) {
/**
* Computes Math.acos(value)
, but first clamps value
to the range [-1.0, 1.0]
* so that the function will never return NaN.
- *
* @param {number} value The value for which to compute acos.
* @returns {number} The acos of the value if the value is in the range [-1.0, 1.0], or the acos of -1.0 or 1.0,
* whichever is closer, if the value is outside the range.
@@ -971,7 +915,6 @@ CesiumMath.acosClamped = function (value) {
/**
* Computes Math.asin(value)
, but first clamps value
to the range [-1.0, 1.0]
* so that the function will never return NaN.
- *
* @param {number} value The value for which to compute asin.
* @returns {number} The asin of the value if the value is in the range [-1.0, 1.0], or the asin of -1.0 or 1.0,
* whichever is closer, if the value is outside the range.
@@ -987,7 +930,6 @@ CesiumMath.asinClamped = function (value) {
/**
* Finds the chord length between two points given the circle's radius and the angle between the points.
- *
* @param {number} angle The angle between the two points.
* @param {number} radius The radius of the circle.
* @returns {number} The chord length.
@@ -1006,7 +948,6 @@ CesiumMath.chordLength = function (angle, radius) {
/**
* Finds the logarithm of a number to a base.
- *
* @param {number} number The number.
* @param {number} base The base.
* @returns {number} The result.
@@ -1026,7 +967,6 @@ CesiumMath.logBase = function (number, base) {
/**
* Finds the cube root of a number.
* Returns NaN if number
is not provided.
- *
* @function
* @param {number} [number] The number.
* @returns {number} The result.
@@ -1038,7 +978,6 @@ CesiumMath.cbrt = defaultValue(Math.cbrt, function cbrt(number) {
/**
* Finds the base 2 logarithm of a number.
- *
* @function
* @param {number} number The number.
* @returns {number} The result.
@@ -1048,6 +987,8 @@ CesiumMath.log2 = defaultValue(Math.log2, function log2(number) {
});
/**
+ * @param distanceToCamera
+ * @param density
* @private
*/
CesiumMath.fog = function (distanceToCamera, density) {
@@ -1062,7 +1003,6 @@ CesiumMath.fog = function (distanceToCamera, density) {
* which in turn is based on "Efficient approximations for the arctangent function,"
* Rajan, S. Sichun Wang Inkol, R. Joyal, A., May 2006.
* Adapted from ShaderFastLibs under MIT License.
- *
* @param {number} x An input number in the range [-1, 1]
* @returns {number} An approximation of atan(x)
*/
@@ -1078,7 +1018,6 @@ CesiumMath.fastApproximateAtan = function (x) {
* Computes a fast approximation of Atan2(x, y) for arbitrary input scalars.
*
* Range reduction math based on nvidia's cg reference implementation: http://developer.download.nvidia.com/cg/atan2.html
- *
* @param {number} x An input number that isn't zero if y is zero.
* @param {number} y An input number that isn't zero if x is zero.
* @returns {number} An approximation of atan2(x, y)
diff --git a/packages/engine/Source/Core/Matrix2.js b/packages/engine/Source/Core/Matrix2.js
index 7f0cba621c0d..a75390436979 100644
--- a/packages/engine/Source/Core/Matrix2.js
+++ b/packages/engine/Source/Core/Matrix2.js
@@ -8,14 +8,12 @@ import DeveloperError from "./DeveloperError.js";
* A 2x2 matrix, indexable as a column-major order array.
* Constructor parameters are in row-major order for code readability.
* @alias Matrix2
- * @constructor
+ * @class
* @implements {ArrayLike}
- *
- * @param {number} [column0Row0=0.0] The value for column 0, row 0.
- * @param {number} [column1Row0=0.0] The value for column 1, row 0.
- * @param {number} [column0Row1=0.0] The value for column 0, row 1.
- * @param {number} [column1Row1=0.0] The value for column 1, row 1.
- *
+ * @param {number} [column0Row0] The value for column 0, row 0.
+ * @param {number} [column1Row0] The value for column 1, row 0.
+ * @param {number} [column0Row1] The value for column 0, row 1.
+ * @param {number} [column1Row1] The value for column 1, row 1.
* @see Matrix2.fromArray
* @see Matrix2.fromColumnMajorArray
* @see Matrix2.fromRowMajorArray
@@ -40,11 +38,9 @@ Matrix2.packedLength = 4;
/**
* Stores the provided instance into the provided array.
- *
* @param {Matrix2} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
Matrix2.pack = function (value, array, startingIndex) {
@@ -65,9 +61,8 @@ Matrix2.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {Matrix2} [result] The object into which to store the result.
* @returns {Matrix2} The modified result parameter or a new Matrix2 instance if one was not provided.
*/
@@ -92,7 +87,6 @@ Matrix2.unpack = function (array, startingIndex, result) {
/**
* Flattens an array of Matrix2s into an array of components. The components
* are stored in column-major order.
- *
* @param {Matrix2[]} array The array of matrices to pack.
* @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 4 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 4) elements.
* @returns {number[]} The packed array.
@@ -124,7 +118,6 @@ Matrix2.packArray = function (array, result) {
/**
* Unpacks an array of column-major matrix components into an array of Matrix2s.
- *
* @param {number[]} array The array of components to unpack.
* @param {Matrix2[]} [result] The array onto which to store the result.
* @returns {Matrix2[]} The unpacked array.
@@ -154,7 +147,6 @@ Matrix2.unpackArray = function (array, result) {
/**
* Duplicates a Matrix2 instance.
- *
* @param {Matrix2} matrix The matrix to duplicate.
* @param {Matrix2} [result] The object onto which to store the result.
* @returns {Matrix2} The modified result parameter or a new Matrix2 instance if one was not provided. (Returns undefined if matrix is undefined)
@@ -175,13 +167,11 @@ Matrix2.clone = function (matrix, result) {
/**
* Creates a Matrix2 from 4 consecutive elements in an array.
- *
* @function
* @param {number[]} array The array whose 4 consecutive elements correspond to the positions of the matrix. Assumes column-major order.
* @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to first column first row position in the matrix.
* @param {Matrix2} [result] The object onto which to store the result.
* @returns {Matrix2} The modified result parameter or a new Matrix2 instance if one was not provided.
- *
* @example
* // Create the Matrix2:
* // [1.0, 2.0]
@@ -197,7 +187,6 @@ Matrix2.clone = function (matrix, result) {
Matrix2.fromArray = Matrix2.unpack;
/**
* Creates a Matrix2 instance from a column-major order array.
- *
* @param {number[]} values The column-major order array.
* @param {Matrix2} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix2} The modified result parameter, or a new Matrix2 instance if one was not provided.
@@ -213,7 +202,6 @@ Matrix2.fromColumnMajorArray = function (values, result) {
/**
* Creates a Matrix2 instance from a row-major order array.
* The resulting matrix will be in column-major order.
- *
* @param {number[]} values The row-major order array.
* @param {Matrix2} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix2} The modified result parameter, or a new Matrix2 instance if one was not provided.
@@ -235,11 +223,9 @@ Matrix2.fromRowMajorArray = function (values, result) {
/**
* Computes a Matrix2 instance representing a non-uniform scale.
- *
* @param {Cartesian2} scale The x and y scale factors.
* @param {Matrix2} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix2} The modified result parameter, or a new Matrix2 instance if one was not provided.
- *
* @example
* // Creates
* // [7.0, 0.0]
@@ -264,11 +250,9 @@ Matrix2.fromScale = function (scale, result) {
/**
* Computes a Matrix2 instance representing a uniform scale.
- *
* @param {number} scale The uniform scale factor.
* @param {Matrix2} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix2} The modified result parameter, or a new Matrix2 instance if one was not provided.
- *
* @example
* // Creates
* // [2.0, 0.0]
@@ -293,11 +277,9 @@ Matrix2.fromUniformScale = function (scale, result) {
/**
* Creates a rotation matrix.
- *
* @param {number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.
* @param {Matrix2} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix2} The modified result parameter, or a new Matrix2 instance if one was not provided.
- *
* @example
* // Rotate a point 45 degrees counterclockwise.
* const p = new Cesium.Cartesian2(5, 6);
@@ -325,7 +307,6 @@ Matrix2.fromRotation = function (angle, result) {
/**
* Creates an Array from the provided Matrix2 instance.
* The array will be in column-major order.
- *
* @param {Matrix2} matrix The matrix to use..
* @param {number[]} [result] The Array onto which to store the result.
* @returns {number[]} The modified Array parameter or a new Array instance if one was not provided.
@@ -347,14 +328,11 @@ Matrix2.toArray = function (matrix, result) {
/**
* Computes the array index of the element at the provided row and column.
- *
* @param {number} row The zero-based index of the row.
* @param {number} column The zero-based index of the column.
* @returns {number} The index of the element at the provided row and column.
- *
- * @exception {DeveloperError} row must be 0 or 1.
- * @exception {DeveloperError} column must be 0 or 1.
- *
+ * @throws {DeveloperError} row must be 0 or 1.
+ * @throws {DeveloperError} column must be 0 or 1.
* @example
* const myMatrix = new Cesium.Matrix2();
* const column1Row0Index = Cesium.Matrix2.getElementIndex(1, 0);
@@ -375,13 +353,11 @@ Matrix2.getElementIndex = function (column, row) {
/**
* Retrieves a copy of the matrix column at the provided index as a Cartesian2 instance.
- *
* @param {Matrix2} matrix The matrix to use.
* @param {number} index The zero-based index of the column to retrieve.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0 or 1.
+ * @throws {DeveloperError} index must be 0 or 1.
*/
Matrix2.getColumn = function (matrix, index, result) {
//>>includeStart('debug', pragmas.debug);
@@ -404,14 +380,12 @@ Matrix2.getColumn = function (matrix, index, result) {
/**
* Computes a new matrix that replaces the specified column in the provided matrix with the provided Cartesian2 instance.
- *
* @param {Matrix2} matrix The matrix to use.
* @param {number} index The zero-based index of the column to set.
* @param {Cartesian2} cartesian The Cartesian whose values will be assigned to the specified column.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0 or 1.
+ * @throws {DeveloperError} index must be 0 or 1.
*/
Matrix2.setColumn = function (matrix, index, cartesian, result) {
//>>includeStart('debug', pragmas.debug);
@@ -433,13 +407,11 @@ Matrix2.setColumn = function (matrix, index, cartesian, result) {
/**
* Retrieves a copy of the matrix row at the provided index as a Cartesian2 instance.
- *
* @param {Matrix2} matrix The matrix to use.
* @param {number} index The zero-based index of the row to retrieve.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0 or 1.
+ * @throws {DeveloperError} index must be 0 or 1.
*/
Matrix2.getRow = function (matrix, index, result) {
//>>includeStart('debug', pragmas.debug);
@@ -461,14 +433,12 @@ Matrix2.getRow = function (matrix, index, result) {
/**
* Computes a new matrix that replaces the specified row in the provided matrix with the provided Cartesian2 instance.
- *
* @param {Matrix2} matrix The matrix to use.
* @param {number} index The zero-based index of the row to set.
* @param {Cartesian2} cartesian The Cartesian whose values will be assigned to the specified row.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0 or 1.
+ * @throws {DeveloperError} index must be 0 or 1.
*/
Matrix2.setRow = function (matrix, index, cartesian, result) {
//>>includeStart('debug', pragmas.debug);
@@ -492,12 +462,10 @@ const scaleScratch1 = new Cartesian2();
/**
* Computes a new matrix that replaces the scale with the provided scale.
* This assumes the matrix is an affine transformation.
- *
* @param {Matrix2} matrix The matrix to use.
* @param {Cartesian2} scale The scale that replaces the scale of the provided matrix.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
- *
* @see Matrix2.setUniformScale
* @see Matrix2.fromScale
* @see Matrix2.fromUniformScale
@@ -529,12 +497,10 @@ const scaleScratch2 = new Cartesian2();
/**
* Computes a new matrix that replaces the scale with the provided uniform scale.
* This assumes the matrix is an affine transformation.
- *
* @param {Matrix2} matrix The matrix to use.
* @param {number} scale The uniform scale that replaces the scale of the provided matrix.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
- *
* @see Matrix2.setScale
* @see Matrix2.fromScale
* @see Matrix2.fromUniformScale
@@ -565,11 +531,9 @@ const scratchColumn = new Cartesian2();
/**
* Extracts the non-uniform scale assuming the matrix is an affine transformation.
- *
* @param {Matrix2} matrix The matrix.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter.
- *
* @see Matrix2.multiplyByScale
* @see Matrix2.multiplyByUniformScale
* @see Matrix2.fromScale
@@ -597,7 +561,6 @@ const scaleScratch3 = new Cartesian2();
/**
* Computes the maximum scale assuming the matrix is an affine transformation.
* The maximum scale is the maximum length of the column vectors.
- *
* @param {Matrix2} matrix The matrix.
* @returns {number} The maximum scale.
*/
@@ -610,12 +573,10 @@ const scaleScratch4 = new Cartesian2();
/**
* Sets the rotation assuming the matrix is an affine transformation.
- *
* @param {Matrix2} matrix The matrix.
* @param {Matrix2} rotation The rotation matrix.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
- *
* @see Matrix2.fromRotation
* @see Matrix2.getRotation
*/
@@ -639,11 +600,9 @@ const scaleScratch5 = new Cartesian2();
/**
* Extracts the rotation matrix assuming the matrix is an affine transformation.
- *
* @param {Matrix2} matrix The matrix.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
- *
* @see Matrix2.setRotation
* @see Matrix2.fromRotation
*/
@@ -665,7 +624,6 @@ Matrix2.getRotation = function (matrix, result) {
/**
* Computes the product of two matrices.
- *
* @param {Matrix2} left The first matrix.
* @param {Matrix2} right The second matrix.
* @param {Matrix2} result The object onto which to store the result.
@@ -692,7 +650,6 @@ Matrix2.multiply = function (left, right, result) {
/**
* Computes the sum of two matrices.
- *
* @param {Matrix2} left The first matrix.
* @param {Matrix2} right The second matrix.
* @param {Matrix2} result The object onto which to store the result.
@@ -714,7 +671,6 @@ Matrix2.add = function (left, right, result) {
/**
* Computes the difference of two matrices.
- *
* @param {Matrix2} left The first matrix.
* @param {Matrix2} right The second matrix.
* @param {Matrix2} result The object onto which to store the result.
@@ -736,7 +692,6 @@ Matrix2.subtract = function (left, right, result) {
/**
* Computes the product of a matrix and a column vector.
- *
* @param {Matrix2} matrix The matrix.
* @param {Cartesian2} cartesian The column.
* @param {Cartesian2} result The object onto which to store the result.
@@ -759,7 +714,6 @@ Matrix2.multiplyByVector = function (matrix, cartesian, result) {
/**
* Computes the product of a matrix and a scalar.
- *
* @param {Matrix2} matrix The matrix.
* @param {number} scalar The number to multiply by.
* @param {Matrix2} result The object onto which to store the result.
@@ -781,17 +735,13 @@ Matrix2.multiplyByScalar = function (matrix, scalar, result) {
/**
* Computes the product of a matrix times a (non-uniform) scale, as if the scale were a scale matrix.
- *
* @param {Matrix2} matrix The matrix on the left-hand side.
* @param {Cartesian2} scale The non-uniform scale on the right-hand side.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
- *
- *
* @example
* // Instead of Cesium.Matrix2.multiply(m, Cesium.Matrix2.fromScale(scale), m);
* Cesium.Matrix2.multiplyByScale(m, scale, m);
- *
* @see Matrix2.multiplyByUniformScale
* @see Matrix2.fromScale
* @see Matrix2.fromUniformScale
@@ -816,16 +766,13 @@ Matrix2.multiplyByScale = function (matrix, scale, result) {
/**
* Computes the product of a matrix times a uniform scale, as if the scale were a scale matrix.
- *
* @param {Matrix2} matrix The matrix on the left-hand side.
* @param {number} scale The uniform scale on the right-hand side.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
- *
* @example
* // Instead of Cesium.Matrix2.multiply(m, Cesium.Matrix2.fromUniformScale(scale), m);
* Cesium.Matrix2.multiplyByUniformScale(m, scale, m);
- *
* @see Matrix2.multiplyByScale
* @see Matrix2.fromScale
* @see Matrix2.fromUniformScale
@@ -850,7 +797,6 @@ Matrix2.multiplyByUniformScale = function (matrix, scale, result) {
/**
* Creates a negated copy of the provided matrix.
- *
* @param {Matrix2} matrix The matrix to negate.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
@@ -870,7 +816,6 @@ Matrix2.negate = function (matrix, result) {
/**
* Computes the transpose of the provided matrix.
- *
* @param {Matrix2} matrix The matrix to transpose.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
@@ -895,7 +840,6 @@ Matrix2.transpose = function (matrix, result) {
/**
* Computes a matrix, which contains the absolute (unsigned) values of the provided matrix's elements.
- *
* @param {Matrix2} matrix The matrix with signed elements.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
@@ -917,7 +861,6 @@ Matrix2.abs = function (matrix, result) {
/**
* Compares the provided matrices componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {Matrix2} [left] The first matrix.
* @param {Matrix2} [right] The second matrix.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -935,6 +878,9 @@ Matrix2.equals = function (left, right) {
};
/**
+ * @param matrix
+ * @param array
+ * @param offset
* @private
*/
Matrix2.equalsArray = function (matrix, array, offset) {
@@ -950,10 +896,9 @@ Matrix2.equalsArray = function (matrix, array, offset) {
* Compares the provided matrices componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
- *
* @param {Matrix2} [left] The first matrix.
* @param {Matrix2} [right] The second matrix.
- * @param {number} [epsilon=0] The epsilon to use for equality testing.
+ * @param {number} [epsilon] The epsilon to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
*/
Matrix2.equalsEpsilon = function (left, right, epsilon) {
@@ -971,7 +916,6 @@ Matrix2.equalsEpsilon = function (left, right, epsilon) {
/**
* An immutable Matrix2 instance initialized to the identity matrix.
- *
* @type {Matrix2}
* @constant
*/
@@ -979,7 +923,6 @@ Matrix2.IDENTITY = Object.freeze(new Matrix2(1.0, 0.0, 0.0, 1.0));
/**
* An immutable Matrix2 instance initialized to the zero matrix.
- *
* @type {Matrix2}
* @constant
*/
@@ -987,10 +930,8 @@ Matrix2.ZERO = Object.freeze(new Matrix2(0.0, 0.0, 0.0, 0.0));
/**
* The index into Matrix2 for column 0, row 0.
- *
* @type {number}
* @constant
- *
* @example
* const matrix = new Cesium.Matrix2();
* matrix[Cesium.Matrix2.COLUMN0ROW0] = 5.0; // set column 0, row 0 to 5.0
@@ -999,10 +940,8 @@ Matrix2.COLUMN0ROW0 = 0;
/**
* The index into Matrix2 for column 0, row 1.
- *
* @type {number}
* @constant
- *
* @example
* const matrix = new Cesium.Matrix2();
* matrix[Cesium.Matrix2.COLUMN0ROW1] = 5.0; // set column 0, row 1 to 5.0
@@ -1011,10 +950,8 @@ Matrix2.COLUMN0ROW1 = 1;
/**
* The index into Matrix2 for column 1, row 0.
- *
* @type {number}
* @constant
- *
* @example
* const matrix = new Cesium.Matrix2();
* matrix[Cesium.Matrix2.COLUMN1ROW0] = 5.0; // set column 1, row 0 to 5.0
@@ -1023,10 +960,8 @@ Matrix2.COLUMN1ROW0 = 2;
/**
* The index into Matrix2 for column 1, row 1.
- *
* @type {number}
* @constant
- *
* @example
* const matrix = new Cesium.Matrix2();
* matrix[Cesium.Matrix2.COLUMN1ROW1] = 5.0; // set column 1, row 1 to 5.0
@@ -1037,7 +972,6 @@ Object.defineProperties(Matrix2.prototype, {
/**
* Gets the number of items in the collection.
* @memberof Matrix2.prototype
- *
* @type {number}
*/
length: {
@@ -1049,7 +983,6 @@ Object.defineProperties(Matrix2.prototype, {
/**
* Duplicates the provided Matrix2 instance.
- *
* @param {Matrix2} [result] The object onto which to store the result.
* @returns {Matrix2} The modified result parameter or a new Matrix2 instance if one was not provided.
*/
@@ -1060,7 +993,6 @@ Matrix2.prototype.clone = function (result) {
/**
* Compares this matrix to the provided matrix componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {Matrix2} [right] The right hand side matrix.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -1072,9 +1004,8 @@ Matrix2.prototype.equals = function (right) {
* Compares this matrix to the provided matrix componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
- *
* @param {Matrix2} [right] The right hand side matrix.
- * @param {number} [epsilon=0] The epsilon to use for equality testing.
+ * @param {number} [epsilon] The epsilon to use for equality testing.
* @returns {boolean} true
if they are within the provided epsilon, false
otherwise.
*/
Matrix2.prototype.equalsEpsilon = function (right, epsilon) {
@@ -1084,7 +1015,6 @@ Matrix2.prototype.equalsEpsilon = function (right, epsilon) {
/**
* Creates a string representing this Matrix with each row being
* on a separate line and in the format '(column0, column1)'.
- *
* @returns {string} A string representing the provided Matrix with each row being on a separate line and in the format '(column0, column1)'.
*/
Matrix2.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/Matrix3.js b/packages/engine/Source/Core/Matrix3.js
index 80b4a5185c24..082a9dc4b17f 100644
--- a/packages/engine/Source/Core/Matrix3.js
+++ b/packages/engine/Source/Core/Matrix3.js
@@ -9,17 +9,16 @@ import CesiumMath from "./Math.js";
* A 3x3 matrix, indexable as a column-major order array.
* Constructor parameters are in row-major order for code readability.
* @alias Matrix3
- * @constructor
+ * @class
* @implements {ArrayLike}
- *
- * @param {number} [column0Row0=0.0] The value for column 0, row 0.
- * @param {number} [column1Row0=0.0] The value for column 1, row 0.
- * @param {number} [column2Row0=0.0] The value for column 2, row 0.
- * @param {number} [column0Row1=0.0] The value for column 0, row 1.
- * @param {number} [column1Row1=0.0] The value for column 1, row 1.
- * @param {number} [column2Row1=0.0] The value for column 2, row 1.
- * @param {number} [column0Row2=0.0] The value for column 0, row 2.
- * @param {number} [column1Row2=0.0] The value for column 1, row 2.
+ * @param {number} [column0Row0] The value for column 0, row 0.
+ * @param {number} [column1Row0] The value for column 1, row 0.
+ * @param {number} [column2Row0] The value for column 2, row 0.
+ * @param {number} [column0Row1] The value for column 0, row 1.
+ * @param {number} [column1Row1] The value for column 1, row 1.
+ * @param {number} [column2Row1] The value for column 2, row 1.
+ * @param {number} [column0Row2] The value for column 0, row 2.
+ * @param {number} [column1Row2] The value for column 1, row 2.
* @param {number} [column2Row2=0.0] The value for column 2, row 2.
*
* @see Matrix3.fromArray
@@ -66,11 +65,9 @@ Matrix3.packedLength = 9;
/**
* Stores the provided instance into the provided array.
- *
* @param {Matrix3} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
Matrix3.pack = function (value, array, startingIndex) {
@@ -96,9 +93,8 @@ Matrix3.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {Matrix3} [result] The object into which to store the result.
* @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided.
*/
@@ -128,7 +124,6 @@ Matrix3.unpack = function (array, startingIndex, result) {
/**
* Flattens an array of Matrix3s into an array of components. The components
* are stored in column-major order.
- *
* @param {Matrix3[]} array The array of matrices to pack.
* @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 9 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 9) elements.
* @returns {number[]} The packed array.
@@ -160,7 +155,6 @@ Matrix3.packArray = function (array, result) {
/**
* Unpacks an array of column-major matrix components into an array of Matrix3s.
- *
* @param {number[]} array The array of components to unpack.
* @param {Matrix3[]} [result] The array onto which to store the result.
* @returns {Matrix3[]} The unpacked array.
@@ -190,7 +184,6 @@ Matrix3.unpackArray = function (array, result) {
/**
* Duplicates a Matrix3 instance.
- *
* @param {Matrix3} matrix The matrix to duplicate.
* @param {Matrix3} [result] The object onto which to store the result.
* @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided. (Returns undefined if matrix is undefined)
@@ -226,13 +219,11 @@ Matrix3.clone = function (matrix, result) {
/**
* Creates a Matrix3 from 9 consecutive elements in an array.
- *
* @function
* @param {number[]} array The array whose 9 consecutive elements correspond to the positions of the matrix. Assumes column-major order.
* @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to first column first row position in the matrix.
* @param {Matrix3} [result] The object onto which to store the result.
* @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided.
- *
* @example
* // Create the Matrix3:
* // [1.0, 2.0, 3.0]
@@ -250,7 +241,6 @@ Matrix3.fromArray = Matrix3.unpack;
/**
* Creates a Matrix3 instance from a column-major order array.
- *
* @param {number[]} values The column-major order array.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
@@ -266,7 +256,6 @@ Matrix3.fromColumnMajorArray = function (values, result) {
/**
* Creates a Matrix3 instance from a row-major order array.
* The resulting matrix will be in column-major order.
- *
* @param {number[]} values The row-major order array.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
@@ -303,7 +292,6 @@ Matrix3.fromRowMajorArray = function (values, result) {
/**
* Computes a 3x3 rotation matrix from the provided quaternion.
- *
* @param {Quaternion} quaternion the quaternion to use.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The 3x3 rotation matrix from this quaternion.
@@ -353,7 +341,6 @@ Matrix3.fromQuaternion = function (quaternion, result) {
/**
* Computes a 3x3 rotation matrix from the provided headingPitchRoll. (see http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles )
- *
* @param {HeadingPitchRoll} headingPitchRoll the headingPitchRoll to use.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The 3x3 rotation matrix from this headingPitchRoll.
@@ -399,11 +386,9 @@ Matrix3.fromHeadingPitchRoll = function (headingPitchRoll, result) {
/**
* Computes a Matrix3 instance representing a non-uniform scale.
- *
* @param {Cartesian3} scale The x, y, and z scale factors.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
- *
* @example
* // Creates
* // [7.0, 0.0, 0.0]
@@ -434,11 +419,9 @@ Matrix3.fromScale = function (scale, result) {
/**
* Computes a Matrix3 instance representing a uniform scale.
- *
* @param {number} scale The uniform scale factor.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
- *
* @example
* // Creates
* // [2.0, 0.0, 0.0]
@@ -469,11 +452,9 @@ Matrix3.fromUniformScale = function (scale, result) {
/**
* Computes a Matrix3 instance representing the cross product equivalent matrix of a Cartesian3 vector.
- *
* @param {Cartesian3} vector the vector on the left hand side of the cross product operation.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
- *
* @example
* // Creates
* // [0.0, -9.0, 8.0]
@@ -514,11 +495,9 @@ Matrix3.fromCrossProduct = function (vector, result) {
/**
* Creates a rotation matrix around the x-axis.
- *
* @param {number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
- *
* @example
* // Rotate a point 45 degrees counterclockwise around the x-axis.
* const p = new Cesium.Cartesian3(5, 6, 7);
@@ -562,11 +541,9 @@ Matrix3.fromRotationX = function (angle, result) {
/**
* Creates a rotation matrix around the y-axis.
- *
* @param {number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
- *
* @example
* // Rotate a point 45 degrees counterclockwise around the y-axis.
* const p = new Cesium.Cartesian3(5, 6, 7);
@@ -610,11 +587,9 @@ Matrix3.fromRotationY = function (angle, result) {
/**
* Creates a rotation matrix around the z-axis.
- *
* @param {number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
- *
* @example
* // Rotate a point 45 degrees counterclockwise around the z-axis.
* const p = new Cesium.Cartesian3(5, 6, 7);
@@ -659,7 +634,6 @@ Matrix3.fromRotationZ = function (angle, result) {
/**
* Creates an Array from the provided Matrix3 instance.
* The array will be in column-major order.
- *
* @param {Matrix3} matrix The matrix to use..
* @param {number[]} [result] The Array onto which to store the result.
* @returns {number[]} The modified Array parameter or a new Array instance if one was not provided.
@@ -696,14 +670,11 @@ Matrix3.toArray = function (matrix, result) {
/**
* Computes the array index of the element at the provided row and column.
- *
* @param {number} column The zero-based index of the column.
* @param {number} row The zero-based index of the row.
* @returns {number} The index of the element at the provided row and column.
- *
- * @exception {DeveloperError} row must be 0, 1, or 2.
- * @exception {DeveloperError} column must be 0, 1, or 2.
- *
+ * @throws {DeveloperError} row must be 0, 1, or 2.
+ * @throws {DeveloperError} column must be 0, 1, or 2.
* @example
* const myMatrix = new Cesium.Matrix3();
* const column1Row0Index = Cesium.Matrix3.getElementIndex(1, 0);
@@ -723,13 +694,11 @@ Matrix3.getElementIndex = function (column, row) {
/**
* Retrieves a copy of the matrix column at the provided index as a Cartesian3 instance.
- *
* @param {Matrix3} matrix The matrix to use.
* @param {number} index The zero-based index of the column to retrieve.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0, 1, or 2.
+ * @throws {DeveloperError} index must be 0, 1, or 2.
*/
Matrix3.getColumn = function (matrix, index, result) {
//>>includeStart('debug', pragmas.debug);
@@ -752,14 +721,12 @@ Matrix3.getColumn = function (matrix, index, result) {
/**
* Computes a new matrix that replaces the specified column in the provided matrix with the provided Cartesian3 instance.
- *
* @param {Matrix3} matrix The matrix to use.
* @param {number} index The zero-based index of the column to set.
* @param {Cartesian3} cartesian The Cartesian whose values will be assigned to the specified column.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0, 1, or 2.
+ * @throws {DeveloperError} index must be 0, 1, or 2.
*/
Matrix3.setColumn = function (matrix, index, cartesian, result) {
//>>includeStart('debug', pragmas.debug);
@@ -780,13 +747,11 @@ Matrix3.setColumn = function (matrix, index, cartesian, result) {
/**
* Retrieves a copy of the matrix row at the provided index as a Cartesian3 instance.
- *
* @param {Matrix3} matrix The matrix to use.
* @param {number} index The zero-based index of the row to retrieve.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0, 1, or 2.
+ * @throws {DeveloperError} index must be 0, 1, or 2.
*/
Matrix3.getRow = function (matrix, index, result) {
//>>includeStart('debug', pragmas.debug);
@@ -808,14 +773,12 @@ Matrix3.getRow = function (matrix, index, result) {
/**
* Computes a new matrix that replaces the specified row in the provided matrix with the provided Cartesian3 instance.
- *
* @param {Matrix3} matrix The matrix to use.
* @param {number} index The zero-based index of the row to set.
* @param {Cartesian3} cartesian The Cartesian whose values will be assigned to the specified row.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0, 1, or 2.
+ * @throws {DeveloperError} index must be 0, 1, or 2.
*/
Matrix3.setRow = function (matrix, index, cartesian, result) {
//>>includeStart('debug', pragmas.debug);
@@ -838,12 +801,10 @@ const scaleScratch1 = new Cartesian3();
/**
* Computes a new matrix that replaces the scale with the provided scale.
* This assumes the matrix is an affine transformation.
- *
* @param {Matrix3} matrix The matrix to use.
* @param {Cartesian3} scale The scale that replaces the scale of the provided matrix.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- *
* @see Matrix3.setUniformScale
* @see Matrix3.fromScale
* @see Matrix3.fromUniformScale
@@ -881,12 +842,10 @@ const scaleScratch2 = new Cartesian3();
/**
* Computes a new matrix that replaces the scale with the provided uniform scale.
* This assumes the matrix is an affine transformation.
- *
* @param {Matrix3} matrix The matrix to use.
* @param {number} scale The uniform scale that replaces the scale of the provided matrix.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- *
* @see Matrix3.setScale
* @see Matrix3.fromScale
* @see Matrix3.fromUniformScale
@@ -923,11 +882,9 @@ const scratchColumn = new Cartesian3();
/**
* Extracts the non-uniform scale assuming the matrix is an affine transformation.
- *
* @param {Matrix3} matrix The matrix.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
- *
* @see Matrix3.multiplyByScale
* @see Matrix3.multiplyByUniformScale
* @see Matrix3.fromScale
@@ -958,7 +915,6 @@ const scaleScratch3 = new Cartesian3();
/**
* Computes the maximum scale assuming the matrix is an affine transformation.
* The maximum scale is the maximum length of the column vectors.
- *
* @param {Matrix3} matrix The matrix.
* @returns {number} The maximum scale.
*/
@@ -971,12 +927,10 @@ const scaleScratch4 = new Cartesian3();
/**
* Sets the rotation assuming the matrix is an affine transformation.
- *
* @param {Matrix3} matrix The matrix.
* @param {Matrix3} rotation The rotation matrix.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- *
* @see Matrix3.getRotation
*/
Matrix3.setRotation = function (matrix, rotation, result) {
@@ -1004,11 +958,9 @@ const scaleScratch5 = new Cartesian3();
/**
* Extracts the rotation matrix assuming the matrix is an affine transformation.
- *
* @param {Matrix3} matrix The matrix.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- *
* @see Matrix3.setRotation
*/
Matrix3.getRotation = function (matrix, result) {
@@ -1034,7 +986,6 @@ Matrix3.getRotation = function (matrix, result) {
/**
* Computes the product of two matrices.
- *
* @param {Matrix3} left The first matrix.
* @param {Matrix3} right The second matrix.
* @param {Matrix3} result The object onto which to store the result.
@@ -1082,7 +1033,6 @@ Matrix3.multiply = function (left, right, result) {
/**
* Computes the sum of two matrices.
- *
* @param {Matrix3} left The first matrix.
* @param {Matrix3} right The second matrix.
* @param {Matrix3} result The object onto which to store the result.
@@ -1109,7 +1059,6 @@ Matrix3.add = function (left, right, result) {
/**
* Computes the difference of two matrices.
- *
* @param {Matrix3} left The first matrix.
* @param {Matrix3} right The second matrix.
* @param {Matrix3} result The object onto which to store the result.
@@ -1136,7 +1085,6 @@ Matrix3.subtract = function (left, right, result) {
/**
* Computes the product of a matrix and a column vector.
- *
* @param {Matrix3} matrix The matrix.
* @param {Cartesian3} cartesian The column.
* @param {Cartesian3} result The object onto which to store the result.
@@ -1165,7 +1113,6 @@ Matrix3.multiplyByVector = function (matrix, cartesian, result) {
/**
* Computes the product of a matrix and a scalar.
- *
* @param {Matrix3} matrix The matrix.
* @param {number} scalar The number to multiply by.
* @param {Matrix3} result The object onto which to store the result.
@@ -1192,17 +1139,13 @@ Matrix3.multiplyByScalar = function (matrix, scalar, result) {
/**
* Computes the product of a matrix times a (non-uniform) scale, as if the scale were a scale matrix.
- *
* @param {Matrix3} matrix The matrix on the left-hand side.
* @param {Cartesian3} scale The non-uniform scale on the right-hand side.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- *
- *
* @example
* // Instead of Cesium.Matrix3.multiply(m, Cesium.Matrix3.fromScale(scale), m);
* Cesium.Matrix3.multiplyByScale(m, scale, m);
- *
* @see Matrix3.multiplyByUniformScale
* @see Matrix3.fromScale
* @see Matrix3.fromUniformScale
@@ -1232,16 +1175,13 @@ Matrix3.multiplyByScale = function (matrix, scale, result) {
/**
* Computes the product of a matrix times a uniform scale, as if the scale were a scale matrix.
- *
* @param {Matrix3} matrix The matrix on the left-hand side.
* @param {number} scale The uniform scale on the right-hand side.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- *
* @example
* // Instead of Cesium.Matrix3.multiply(m, Cesium.Matrix3.fromUniformScale(scale), m);
* Cesium.Matrix3.multiplyByUniformScale(m, scale, m);
- *
* @see Matrix3.multiplyByScale
* @see Matrix3.fromScale
* @see Matrix3.fromUniformScale
@@ -1271,7 +1211,6 @@ Matrix3.multiplyByUniformScale = function (matrix, scale, result) {
/**
* Creates a negated copy of the provided matrix.
- *
* @param {Matrix3} matrix The matrix to negate.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
@@ -1296,7 +1235,6 @@ Matrix3.negate = function (matrix, result) {
/**
* Computes the transpose of the provided matrix.
- *
* @param {Matrix3} matrix The matrix to transpose.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
@@ -1427,11 +1365,9 @@ const jMatrixTranspose = new Matrix3();
* The values along the diagonal of the diagonal matrix are the eigenvalues. The columns
* of the unitary matrix are the corresponding eigenvectors.
*
- *
* @param {Matrix3} matrix The matrix to decompose into diagonal and unitary matrix. Expected to be symmetric.
* @param {object} [result] An object with unitary and diagonal properties which are matrices onto which to store the result.
* @returns {object} An object with unitary and diagonal properties which are the unitary and diagonal matrices, respectively.
- *
* @example
* const a = //... symetric matrix
* const result = {
@@ -1492,7 +1428,6 @@ Matrix3.computeEigenDecomposition = function (matrix, result) {
/**
* Computes a matrix, which contains the absolute (unsigned) values of the provided matrix's elements.
- *
* @param {Matrix3} matrix The matrix with signed elements.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
@@ -1518,7 +1453,6 @@ Matrix3.abs = function (matrix, result) {
/**
* Computes the determinant of the provided matrix.
- *
* @param {Matrix3} matrix The matrix to use.
* @returns {number} The value of the determinant of the matrix.
*/
@@ -1546,12 +1480,10 @@ Matrix3.determinant = function (matrix) {
/**
* Computes the inverse of the provided matrix.
- *
* @param {Matrix3} matrix The matrix to invert.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- *
- * @exception {DeveloperError} matrix is not invertible.
+ * @throws {DeveloperError} matrix is not invertible.
*/
Matrix3.inverse = function (matrix, result) {
//>>includeStart('debug', pragmas.debug);
@@ -1595,7 +1527,6 @@ const scratchTransposeMatrix = new Matrix3();
/**
* Computes the inverse transpose of a matrix.
- *
* @param {Matrix3} matrix The matrix to transpose and invert.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
@@ -1615,7 +1546,6 @@ Matrix3.inverseTranspose = function (matrix, result) {
/**
* Compares the provided matrices componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {Matrix3} [left] The first matrix.
* @param {Matrix3} [right] The second matrix.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -1641,10 +1571,9 @@ Matrix3.equals = function (left, right) {
* Compares the provided matrices componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
- *
* @param {Matrix3} [left] The first matrix.
* @param {Matrix3} [right] The second matrix.
- * @param {number} [epsilon=0] The epsilon to use for equality testing.
+ * @param {number} [epsilon] The epsilon to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
*/
Matrix3.equalsEpsilon = function (left, right, epsilon) {
@@ -1668,7 +1597,6 @@ Matrix3.equalsEpsilon = function (left, right, epsilon) {
/**
* An immutable Matrix3 instance initialized to the identity matrix.
- *
* @type {Matrix3}
* @constant
*/
@@ -1678,7 +1606,6 @@ Matrix3.IDENTITY = Object.freeze(
/**
* An immutable Matrix3 instance initialized to the zero matrix.
- *
* @type {Matrix3}
* @constant
*/
@@ -1688,7 +1615,6 @@ Matrix3.ZERO = Object.freeze(
/**
* The index into Matrix3 for column 0, row 0.
- *
* @type {number}
* @constant
*/
@@ -1696,7 +1622,6 @@ Matrix3.COLUMN0ROW0 = 0;
/**
* The index into Matrix3 for column 0, row 1.
- *
* @type {number}
* @constant
*/
@@ -1704,7 +1629,6 @@ Matrix3.COLUMN0ROW1 = 1;
/**
* The index into Matrix3 for column 0, row 2.
- *
* @type {number}
* @constant
*/
@@ -1712,7 +1636,6 @@ Matrix3.COLUMN0ROW2 = 2;
/**
* The index into Matrix3 for column 1, row 0.
- *
* @type {number}
* @constant
*/
@@ -1720,7 +1643,6 @@ Matrix3.COLUMN1ROW0 = 3;
/**
* The index into Matrix3 for column 1, row 1.
- *
* @type {number}
* @constant
*/
@@ -1728,7 +1650,6 @@ Matrix3.COLUMN1ROW1 = 4;
/**
* The index into Matrix3 for column 1, row 2.
- *
* @type {number}
* @constant
*/
@@ -1736,7 +1657,6 @@ Matrix3.COLUMN1ROW2 = 5;
/**
* The index into Matrix3 for column 2, row 0.
- *
* @type {number}
* @constant
*/
@@ -1744,7 +1664,6 @@ Matrix3.COLUMN2ROW0 = 6;
/**
* The index into Matrix3 for column 2, row 1.
- *
* @type {number}
* @constant
*/
@@ -1752,7 +1671,6 @@ Matrix3.COLUMN2ROW1 = 7;
/**
* The index into Matrix3 for column 2, row 2.
- *
* @type {number}
* @constant
*/
@@ -1762,7 +1680,6 @@ Object.defineProperties(Matrix3.prototype, {
/**
* Gets the number of items in the collection.
* @memberof Matrix3.prototype
- *
* @type {number}
*/
length: {
@@ -1774,7 +1691,6 @@ Object.defineProperties(Matrix3.prototype, {
/**
* Duplicates the provided Matrix3 instance.
- *
* @param {Matrix3} [result] The object onto which to store the result.
* @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided.
*/
@@ -1785,7 +1701,6 @@ Matrix3.prototype.clone = function (result) {
/**
* Compares this matrix to the provided matrix componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {Matrix3} [right] The right hand side matrix.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -1794,6 +1709,9 @@ Matrix3.prototype.equals = function (right) {
};
/**
+ * @param matrix
+ * @param array
+ * @param offset
* @private
*/
Matrix3.equalsArray = function (matrix, array, offset) {
@@ -1814,9 +1732,8 @@ Matrix3.equalsArray = function (matrix, array, offset) {
* Compares this matrix to the provided matrix componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
- *
* @param {Matrix3} [right] The right hand side matrix.
- * @param {number} [epsilon=0] The epsilon to use for equality testing.
+ * @param {number} [epsilon] The epsilon to use for equality testing.
* @returns {boolean} true
if they are within the provided epsilon, false
otherwise.
*/
Matrix3.prototype.equalsEpsilon = function (right, epsilon) {
@@ -1826,7 +1743,6 @@ Matrix3.prototype.equalsEpsilon = function (right, epsilon) {
/**
* Creates a string representing this Matrix with each row being
* on a separate line and in the format '(column0, column1, column2)'.
- *
* @returns {string} A string representing the provided Matrix with each row being on a separate line and in the format '(column0, column1, column2)'.
*/
Matrix3.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/Matrix4.js b/packages/engine/Source/Core/Matrix4.js
index ecdaa3c0d001..a6052a47cbe2 100644
--- a/packages/engine/Source/Core/Matrix4.js
+++ b/packages/engine/Source/Core/Matrix4.js
@@ -12,17 +12,16 @@ import RuntimeError from "./RuntimeError.js";
* A 4x4 matrix, indexable as a column-major order array.
* Constructor parameters are in row-major order for code readability.
* @alias Matrix4
- * @constructor
+ * @class
* @implements {ArrayLike}
- *
- * @param {number} [column0Row0=0.0] The value for column 0, row 0.
- * @param {number} [column1Row0=0.0] The value for column 1, row 0.
- * @param {number} [column2Row0=0.0] The value for column 2, row 0.
- * @param {number} [column3Row0=0.0] The value for column 3, row 0.
- * @param {number} [column0Row1=0.0] The value for column 0, row 1.
- * @param {number} [column1Row1=0.0] The value for column 1, row 1.
- * @param {number} [column2Row1=0.0] The value for column 2, row 1.
- * @param {number} [column3Row1=0.0] The value for column 3, row 1.
+ * @param {number} [column0Row0] The value for column 0, row 0.
+ * @param {number} [column1Row0] The value for column 1, row 0.
+ * @param {number} [column2Row0] The value for column 2, row 0.
+ * @param {number} [column3Row0] The value for column 3, row 0.
+ * @param {number} [column0Row1] The value for column 0, row 1.
+ * @param {number} [column1Row1] The value for column 1, row 1.
+ * @param {number} [column2Row1] The value for column 2, row 1.
+ * @param {number} [column3Row1] The value for column 3, row 1.
* @param {number} [column0Row2=0.0] The value for column 0, row 2.
* @param {number} [column1Row2=0.0] The value for column 1, row 2.
* @param {number} [column2Row2=0.0] The value for column 2, row 2.
@@ -97,11 +96,9 @@ Matrix4.packedLength = 16;
/**
* Stores the provided instance into the provided array.
- *
* @param {Matrix4} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
Matrix4.pack = function (value, array, startingIndex) {
@@ -134,9 +131,8 @@ Matrix4.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {Matrix4} [result] The object into which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided.
*/
@@ -173,7 +169,6 @@ Matrix4.unpack = function (array, startingIndex, result) {
/**
* Flattens an array of Matrix4s into an array of components. The components
* are stored in column-major order.
- *
* @param {Matrix4[]} array The array of matrices to pack.
* @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 16 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 16) elements.
* @returns {number[]} The packed array.
@@ -205,7 +200,6 @@ Matrix4.packArray = function (array, result) {
/**
* Unpacks an array of column-major matrix components into an array of Matrix4s.
- *
* @param {number[]} array The array of components to unpack.
* @param {Matrix4[]} [result] The array onto which to store the result.
* @returns {Matrix4[]} The unpacked array.
@@ -235,7 +229,6 @@ Matrix4.unpackArray = function (array, result) {
/**
* Duplicates a Matrix4 instance.
- *
* @param {Matrix4} matrix The matrix to duplicate.
* @param {Matrix4} [result] The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided. (Returns undefined if matrix is undefined)
@@ -286,12 +279,10 @@ Matrix4.clone = function (matrix, result) {
/**
* Creates a Matrix4 from 16 consecutive elements in an array.
* @function
- *
* @param {number[]} array The array whose 16 consecutive elements correspond to the positions of the matrix. Assumes column-major order.
* @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to first column first row position in the matrix.
* @param {Matrix4} [result] The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided.
- *
* @example
* // Create the Matrix4:
* // [1.0, 2.0, 3.0, 4.0]
@@ -310,7 +301,6 @@ Matrix4.fromArray = Matrix4.unpack;
/**
* Computes a Matrix4 instance from a column-major order array.
- *
* @param {number[]} values The column-major order array.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
@@ -326,7 +316,6 @@ Matrix4.fromColumnMajorArray = function (values, result) {
/**
* Computes a Matrix4 instance from a row-major order array.
* The resulting matrix will be in column-major order.
- *
* @param {number[]} values The row-major order array.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
@@ -378,9 +367,8 @@ Matrix4.fromRowMajorArray = function (values, result) {
/**
* Computes a Matrix4 instance from a Matrix3 representing the rotation
* and a Cartesian3 representing the translation.
- *
* @param {Matrix3} rotation The upper left portion of the matrix representing the rotation.
- * @param {Cartesian3} [translation=Cartesian3.ZERO] The upper right portion of the matrix representing the translation.
+ * @param {Cartesian3} [translation] The upper right portion of the matrix representing the translation.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
*/
@@ -434,13 +422,11 @@ Matrix4.fromRotationTranslation = function (rotation, translation, result) {
/**
* Computes a Matrix4 instance from a translation, rotation, and scale (TRS)
* representation with the rotation represented as a quaternion.
- *
* @param {Cartesian3} translation The translation transformation.
* @param {Quaternion} rotation The rotation transformation.
* @param {Cartesian3} scale The non-uniform scale transformation.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
- *
* @example
* const result = Cesium.Matrix4.fromTranslationQuaternionRotationScale(
* new Cesium.Cartesian3(1.0, 2.0, 3.0), // translation
@@ -513,7 +499,6 @@ Matrix4.fromTranslationQuaternionRotationScale = function (
/**
* Creates a Matrix4 instance from a {@link TranslationRotationScale} instance.
- *
* @param {TranslationRotationScale} translationRotationScale The instance.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
@@ -536,11 +521,9 @@ Matrix4.fromTranslationRotationScale = function (
/**
* Creates a Matrix4 instance from a Cartesian3 representing the translation.
- *
* @param {Cartesian3} translation The upper right portion of the matrix representing the translation.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
- *
* @see Matrix4.multiplyByTranslation
*/
Matrix4.fromTranslation = function (translation, result) {
@@ -553,11 +536,9 @@ Matrix4.fromTranslation = function (translation, result) {
/**
* Computes a Matrix4 instance representing a non-uniform scale.
- *
* @param {Cartesian3} scale The x, y, and z scale factors.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
- *
* @example
* // Creates
* // [7.0, 0.0, 0.0, 0.0]
@@ -613,11 +594,9 @@ Matrix4.fromScale = function (scale, result) {
/**
* Computes a Matrix4 instance representing a uniform scale.
- *
* @param {number} scale The uniform scale factor.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
- *
* @example
* // Creates
* // [2.0, 0.0, 0.0, 0.0]
@@ -673,7 +652,6 @@ Matrix4.fromUniformScale = function (scale, result) {
/**
* Creates a rotation matrix.
- *
* @param {Matrix3} rotation The rotation matrix.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
@@ -715,7 +693,6 @@ const fromCameraU = new Cartesian3();
/**
* Computes a Matrix4 instance from a Camera.
- *
* @param {Camera} camera The camera to use.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
@@ -817,18 +794,16 @@ Matrix4.fromCamera = function (camera, result) {
/**
* Computes a Matrix4 instance representing a perspective transformation matrix.
- *
* @param {number} fovY The field of view along the Y axis in radians.
* @param {number} aspectRatio The aspect ratio.
* @param {number} near The distance to the near plane in meters.
* @param {number} far The distance to the far plane in meters.
* @param {Matrix4} result The object in which the result will be stored.
* @returns {Matrix4} The modified result parameter.
- *
- * @exception {DeveloperError} fovY must be in (0, PI].
- * @exception {DeveloperError} aspectRatio must be greater than zero.
- * @exception {DeveloperError} near must be greater than zero.
- * @exception {DeveloperError} far must be greater than zero.
+ * @throws {DeveloperError} fovY must be in (0, PI].
+ * @throws {DeveloperError} aspectRatio must be greater than zero.
+ * @throws {DeveloperError} near must be greater than zero.
+ * @throws {DeveloperError} far must be greater than zero.
*/
Matrix4.computePerspectiveFieldOfView = function (
fovY,
@@ -873,7 +848,6 @@ Matrix4.computePerspectiveFieldOfView = function (
/**
* Computes a Matrix4 instance representing an orthographic transformation matrix.
- *
* @param {number} left The number of meters to the left of the camera that will be in view.
* @param {number} right The number of meters to the right of the camera that will be in view.
* @param {number} bottom The number of meters below of the camera that will be in view.
@@ -934,7 +908,6 @@ Matrix4.computeOrthographicOffCenter = function (
/**
* Computes a Matrix4 instance representing an off center perspective transformation.
- *
* @param {number} left The number of meters to the left of the camera that will be in view.
* @param {number} right The number of meters to the right of the camera that will be in view.
* @param {number} bottom The number of meters below of the camera that will be in view.
@@ -992,7 +965,6 @@ Matrix4.computePerspectiveOffCenter = function (
/**
* Computes a Matrix4 instance representing an infinite off center perspective transformation.
- *
* @param {number} left The number of meters to the left of the camera that will be in view.
* @param {number} right The number of meters to the right of the camera that will be in view.
* @param {number} bottom The number of meters below of the camera that will be in view.
@@ -1047,13 +1019,11 @@ Matrix4.computeInfinitePerspectiveOffCenter = function (
/**
* Computes a Matrix4 instance that transforms from normalized device coordinates to window coordinates.
- *
- * @param {object} [viewport = { x : 0.0, y : 0.0, width : 0.0, height : 0.0 }] The viewport's corners as shown in Example 1.
- * @param {number} [nearDepthRange=0.0] The near plane distance in window coordinates.
- * @param {number} [farDepthRange=1.0] The far plane distance in window coordinates.
+ * @param {object} [viewport] The viewport's corners as shown in Example 1.
+ * @param {number} [nearDepthRange] The near plane distance in window coordinates.
+ * @param {number} [farDepthRange] The far plane distance in window coordinates.
* @param {Matrix4} [result] The object in which the result will be stored.
* @returns {Matrix4} The modified result parameter.
- *
* @example
* // Create viewport transformation using an explicit viewport and depth range.
* const m = Cesium.Matrix4.computeViewportTransformation({
@@ -1115,7 +1085,6 @@ Matrix4.computeViewportTransformation = function (
/**
* Computes a Matrix4 instance that transforms from world space to view space.
- *
* @param {Cartesian3} position The position of the camera.
* @param {Cartesian3} direction The forward direction.
* @param {Cartesian3} up The up direction.
@@ -1154,11 +1123,9 @@ Matrix4.computeView = function (position, direction, up, right, result) {
/**
* Computes an Array from the provided Matrix4 instance.
* The array will be in column-major order.
- *
* @param {Matrix4} matrix The matrix to use..
* @param {number[]} [result] The Array onto which to store the result.
* @returns {number[]} The modified Array parameter or a new Array instance if one was not provided.
- *
* @example
* //create an array from an instance of Matrix4
* // m = [10.0, 14.0, 18.0, 22.0]
@@ -1216,14 +1183,11 @@ Matrix4.toArray = function (matrix, result) {
/**
* Computes the array index of the element at the provided row and column.
- *
* @param {number} row The zero-based index of the row.
* @param {number} column The zero-based index of the column.
* @returns {number} The index of the element at the provided row and column.
- *
- * @exception {DeveloperError} row must be 0, 1, 2, or 3.
- * @exception {DeveloperError} column must be 0, 1, 2, or 3.
- *
+ * @throws {DeveloperError} row must be 0, 1, 2, or 3.
+ * @throws {DeveloperError} column must be 0, 1, 2, or 3.
* @example
* const myMatrix = new Cesium.Matrix4();
* const column1Row0Index = Cesium.Matrix4.getElementIndex(1, 0);
@@ -1244,14 +1208,11 @@ Matrix4.getElementIndex = function (column, row) {
/**
* Retrieves a copy of the matrix column at the provided index as a Cartesian4 instance.
- *
* @param {Matrix4} matrix The matrix to use.
* @param {number} index The zero-based index of the column to retrieve.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0, 1, 2, or 3.
- *
+ * @throws {DeveloperError} index must be 0, 1, 2, or 3.
* @example
* //returns a Cartesian4 instance with values from the specified column
* // m = [10.0, 11.0, 12.0, 13.0]
@@ -1261,7 +1222,6 @@ Matrix4.getElementIndex = function (column, row) {
*
* //Example 1: Creates an instance of Cartesian
* const a = Cesium.Matrix4.getColumn(m, 2, new Cesium.Cartesian4());
- *
* @example
* //Example 2: Sets values for Cartesian instance
* const a = new Cesium.Cartesian4();
@@ -1294,15 +1254,12 @@ Matrix4.getColumn = function (matrix, index, result) {
/**
* Computes a new matrix that replaces the specified column in the provided matrix with the provided Cartesian4 instance.
- *
* @param {Matrix4} matrix The matrix to use.
* @param {number} index The zero-based index of the column to set.
* @param {Cartesian4} cartesian The Cartesian whose values will be assigned to the specified column.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0, 1, 2, or 3.
- *
+ * @throws {DeveloperError} index must be 0, 1, 2, or 3.
* @example
* //creates a new Matrix4 instance with new column values from the Cartesian4 instance
* // m = [10.0, 11.0, 12.0, 13.0]
@@ -1340,14 +1297,11 @@ Matrix4.setColumn = function (matrix, index, cartesian, result) {
/**
* Retrieves a copy of the matrix row at the provided index as a Cartesian4 instance.
- *
* @param {Matrix4} matrix The matrix to use.
* @param {number} index The zero-based index of the row to retrieve.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0, 1, 2, or 3.
- *
+ * @throws {DeveloperError} index must be 0, 1, 2, or 3.
* @example
* //returns a Cartesian4 instance with values from the specified column
* // m = [10.0, 11.0, 12.0, 13.0]
@@ -1357,7 +1311,6 @@ Matrix4.setColumn = function (matrix, index, cartesian, result) {
*
* //Example 1: Returns an instance of Cartesian
* const a = Cesium.Matrix4.getRow(m, 2, new Cesium.Cartesian4());
- *
* @example
* //Example 2: Sets values for a Cartesian instance
* const a = new Cesium.Cartesian4();
@@ -1389,15 +1342,12 @@ Matrix4.getRow = function (matrix, index, result) {
/**
* Computes a new matrix that replaces the specified row in the provided matrix with the provided Cartesian4 instance.
- *
* @param {Matrix4} matrix The matrix to use.
* @param {number} index The zero-based index of the row to set.
* @param {Cartesian4} cartesian The Cartesian whose values will be assigned to the specified row.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0, 1, 2, or 3.
- *
+ * @throws {DeveloperError} index must be 0, 1, 2, or 3.
* @example
* //create a new Matrix4 instance with new row values from the Cartesian4 instance
* // m = [10.0, 11.0, 12.0, 13.0]
@@ -1435,7 +1385,6 @@ Matrix4.setRow = function (matrix, index, cartesian, result) {
/**
* Computes a new matrix that replaces the translation in the rightmost column of the provided
* matrix with the provided translation. This assumes the matrix is an affine transformation.
- *
* @param {Matrix4} matrix The matrix to use.
* @param {Cartesian3} translation The translation that replaces the translation of the provided matrix.
* @param {Matrix4} result The object onto which to store the result.
@@ -1476,12 +1425,10 @@ const scaleScratch1 = new Cartesian3();
/**
* Computes a new matrix that replaces the scale with the provided scale.
* This assumes the matrix is an affine transformation.
- *
* @param {Matrix4} matrix The matrix to use.
* @param {Cartesian3} scale The scale that replaces the scale of the provided matrix.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
* @see Matrix4.setUniformScale
* @see Matrix4.fromScale
* @see Matrix4.fromUniformScale
@@ -1529,12 +1476,10 @@ const scaleScratch2 = new Cartesian3();
/**
* Computes a new matrix that replaces the scale with the provided uniform scale.
* This assumes the matrix is an affine transformation.
- *
* @param {Matrix4} matrix The matrix to use.
* @param {number} scale The uniform scale that replaces the scale of the provided matrix.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
* @see Matrix4.setScale
* @see Matrix4.fromScale
* @see Matrix4.fromUniformScale
@@ -1581,11 +1526,9 @@ const scratchColumn = new Cartesian3();
/**
* Extracts the non-uniform scale assuming the matrix is an affine transformation.
- *
* @param {Matrix4} matrix The matrix.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter
- *
* @see Matrix4.multiplyByScale
* @see Matrix4.multiplyByUniformScale
* @see Matrix4.fromScale
@@ -1617,7 +1560,6 @@ const scaleScratch3 = new Cartesian3();
* Computes the maximum scale assuming the matrix is an affine transformation.
* The maximum scale is the maximum length of the column vectors in the upper-left
* 3x3 matrix.
- *
* @param {Matrix4} matrix The matrix.
* @returns {number} The maximum scale.
*/
@@ -1630,12 +1572,10 @@ const scaleScratch4 = new Cartesian3();
/**
* Sets the rotation assuming the matrix is an affine transformation.
- *
* @param {Matrix4} matrix The matrix.
* @param {Matrix3} rotation The rotation matrix.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
* @see Matrix4.fromRotation
* @see Matrix4.getRotation
*/
@@ -1674,11 +1614,9 @@ const scaleScratch5 = new Cartesian3();
/**
* Extracts the rotation matrix assuming the matrix is an affine transformation.
- *
* @param {Matrix4} matrix The matrix.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- *
* @see Matrix4.setRotation
* @see Matrix4.fromRotation
*/
@@ -1707,7 +1645,6 @@ Matrix4.getRotation = function (matrix, result) {
/**
* Computes the product of two matrices.
- *
* @param {Matrix4} left The first matrix.
* @param {Matrix4} right The second matrix.
* @param {Matrix4} result The object onto which to store the result.
@@ -1811,7 +1748,6 @@ Matrix4.multiply = function (left, right, result) {
/**
* Computes the sum of two matrices.
- *
* @param {Matrix4} left The first matrix.
* @param {Matrix4} right The second matrix.
* @param {Matrix4} result The object onto which to store the result.
@@ -1845,7 +1781,6 @@ Matrix4.add = function (left, right, result) {
/**
* Computes the difference of two matrices.
- *
* @param {Matrix4} left The first matrix.
* @param {Matrix4} right The second matrix.
* @param {Matrix4} result The object onto which to store the result.
@@ -1885,12 +1820,10 @@ Matrix4.subtract = function (left, right, result) {
* The matrix is not verified to be in the proper form.
* This method is faster than computing the product for general 4x4
* matrices using {@link Matrix4.multiply}.
- *
* @param {Matrix4} left The first matrix.
* @param {Matrix4} right The second matrix.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
* @example
* const m1 = new Cesium.Matrix4(1.0, 6.0, 7.0, 0.0, 2.0, 5.0, 8.0, 0.0, 3.0, 4.0, 9.0, 0.0, 0.0, 0.0, 0.0, 1.0);
* const m2 = Cesium.Transforms.eastNorthUpToFixedFrame(new Cesium.Cartesian3(1.0, 1.0, 1.0));
@@ -1971,12 +1904,10 @@ Matrix4.multiplyTransformation = function (left, right, result) {
* Multiplies a transformation matrix (with a bottom row of [0.0, 0.0, 0.0, 1.0]
)
* by a 3x3 rotation matrix. This is an optimization
* for Matrix4.multiply(m, Matrix4.fromRotationTranslation(rotation), m);
with less allocations and arithmetic operations.
- *
* @param {Matrix4} matrix The matrix on the left-hand side.
* @param {Matrix3} rotation The 3x3 rotation matrix on the right-hand side.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
* @example
* // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromRotationTranslation(rotation), m);
* Cesium.Matrix4.multiplyByMatrix3(m, rotation, m);
@@ -2043,12 +1974,10 @@ Matrix4.multiplyByMatrix3 = function (matrix, rotation, result) {
* Multiplies a transformation matrix (with a bottom row of [0.0, 0.0, 0.0, 1.0]
)
* by an implicit translation matrix defined by a {@link Cartesian3}. This is an optimization
* for Matrix4.multiply(m, Matrix4.fromTranslation(position), m);
with less allocations and arithmetic operations.
- *
* @param {Matrix4} matrix The matrix on the left-hand side.
* @param {Cartesian3} translation The translation on the right-hand side.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
* @example
* // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromTranslation(position), m);
* Cesium.Matrix4.multiplyByTranslation(m, position, m);
@@ -2093,17 +2022,13 @@ Matrix4.multiplyByTranslation = function (matrix, translation, result) {
* for Matrix4.multiply(m, Matrix4.fromUniformScale(scale), m);
, where
* m
must be an affine matrix.
* This function performs fewer allocations and arithmetic operations.
- *
* @param {Matrix4} matrix The affine matrix on the left-hand side.
* @param {Cartesian3} scale The non-uniform scale on the right-hand side.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
- *
* @example
* // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromScale(scale), m);
* Cesium.Matrix4.multiplyByScale(m, scale, m);
- *
* @see Matrix4.multiplyByUniformScale
* @see Matrix4.fromScale
* @see Matrix4.fromUniformScale
@@ -2152,16 +2077,13 @@ Matrix4.multiplyByScale = function (matrix, scale, result) {
/**
* Computes the product of a matrix times a uniform scale, as if the scale were a scale matrix.
- *
* @param {Matrix4} matrix The matrix on the left-hand side.
* @param {number} scale The uniform scale on the right-hand side.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
* @example
* // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromUniformScale(scale), m);
* Cesium.Matrix4.multiplyByUniformScale(m, scale, m);
- *
* @see Matrix4.multiplyByScale
* @see Matrix4.fromScale
* @see Matrix4.fromUniformScale
@@ -2201,7 +2123,6 @@ Matrix4.multiplyByUniformScale = function (matrix, scale, result) {
/**
* Computes the product of a matrix and a column vector.
- *
* @param {Matrix4} matrix The matrix.
* @param {Cartesian4} cartesian The vector.
* @param {Cartesian4} result The object onto which to store the result.
@@ -2234,12 +2155,10 @@ Matrix4.multiplyByVector = function (matrix, cartesian, result) {
/**
* Computes the product of a matrix and a {@link Cartesian3}. This is equivalent to calling {@link Matrix4.multiplyByVector}
* with a {@link Cartesian4} with a w
component of zero.
- *
* @param {Matrix4} matrix The matrix.
* @param {Cartesian3} cartesian The point.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
- *
* @example
* const p = new Cesium.Cartesian3(1.0, 2.0, 3.0);
* const result = Cesium.Matrix4.multiplyByPointAsVector(matrix, p, new Cesium.Cartesian3());
@@ -2271,12 +2190,10 @@ Matrix4.multiplyByPointAsVector = function (matrix, cartesian, result) {
/**
* Computes the product of a matrix and a {@link Cartesian3}. This is equivalent to calling {@link Matrix4.multiplyByVector}
* with a {@link Cartesian4} with a w
component of 1, but returns a {@link Cartesian3} instead of a {@link Cartesian4}.
- *
* @param {Matrix4} matrix The matrix.
* @param {Cartesian3} cartesian The point.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
- *
* @example
* const p = new Cesium.Cartesian3(1.0, 2.0, 3.0);
* const result = Cesium.Matrix4.multiplyByPoint(matrix, p, new Cesium.Cartesian3());
@@ -2304,12 +2221,10 @@ Matrix4.multiplyByPoint = function (matrix, cartesian, result) {
/**
* Computes the product of a matrix and a scalar.
- *
* @param {Matrix4} matrix The matrix.
* @param {number} scalar The number to multiply by.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
* @example
* //create a Matrix4 instance which is a scaled version of the supplied Matrix4
* // m = [10.0, 11.0, 12.0, 13.0]
@@ -2353,11 +2268,9 @@ Matrix4.multiplyByScalar = function (matrix, scalar, result) {
/**
* Computes a negated copy of the provided matrix.
- *
* @param {Matrix4} matrix The matrix to negate.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
* @example
* //create a new Matrix4 instance which is a negation of a Matrix4
* // m = [10.0, 11.0, 12.0, 13.0]
@@ -2400,11 +2313,9 @@ Matrix4.negate = function (matrix, result) {
/**
* Computes the transpose of the provided matrix.
- *
* @param {Matrix4} matrix The matrix to transpose.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
* @example
* //returns transpose of a Matrix4
* // m = [10.0, 11.0, 12.0, 13.0]
@@ -2454,7 +2365,6 @@ Matrix4.transpose = function (matrix, result) {
/**
* Computes a matrix, which contains the absolute (unsigned) values of the provided matrix's elements.
- *
* @param {Matrix4} matrix The matrix with signed elements.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
@@ -2488,11 +2398,9 @@ Matrix4.abs = function (matrix, result) {
/**
* Compares the provided matrices componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {Matrix4} [left] The first matrix.
* @param {Matrix4} [right] The second matrix.
* @returns {boolean} true
if left and right are equal, false
otherwise.
- *
* @example
* //compares two Matrix4 instances
*
@@ -2549,12 +2457,10 @@ Matrix4.equals = function (left, right) {
* Compares the provided matrices componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
- *
* @param {Matrix4} [left] The first matrix.
* @param {Matrix4} [right] The second matrix.
- * @param {number} [epsilon=0] The epsilon to use for equality testing.
+ * @param {number} [epsilon] The epsilon to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
- *
* @example
* //compares two Matrix4 instances
*
@@ -2604,7 +2510,6 @@ Matrix4.equalsEpsilon = function (left, right, epsilon) {
/**
* Gets the translation portion of the provided matrix, assuming the matrix is an affine transformation matrix.
- *
* @param {Matrix4} matrix The matrix to use.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
@@ -2623,11 +2528,9 @@ Matrix4.getTranslation = function (matrix, result) {
/**
* Gets the upper left 3x3 matrix of the provided matrix.
- *
* @param {Matrix4} matrix The matrix to use.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- *
* @example
* // returns a Matrix3 instance from a Matrix4 instance
*
@@ -2671,12 +2574,10 @@ const scratchExpectedBottomRow = new Cartesian4(0.0, 0.0, 0.0, 1.0);
* If the determinant is zero, the matrix can not be inverted, and an exception is thrown.
* If the matrix is a proper rigid transformation, it is more efficient
* to invert it with {@link Matrix4.inverseTransformation}.
- *
* @param {Matrix4} matrix The matrix to invert.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
- * @exception {RuntimeError} matrix is not invertible because its determinate is zero.
+ * @throws {RuntimeError} matrix is not invertible because its determinate is zero.
*/
Matrix4.inverse = function (matrix, result) {
//>>includeStart('debug', pragmas.debug);
@@ -2887,7 +2788,6 @@ Matrix4.inverse = function (matrix, result) {
* The matrix is not verified to be in the proper form.
* This method is faster than computing the inverse for a general 4x4
* matrix using {@link Matrix4.inverse}.
- *
* @param {Matrix4} matrix The matrix to invert.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
@@ -2945,7 +2845,6 @@ const scratchTransposeMatrix = new Matrix4();
/**
* Computes the inverse transpose of a matrix.
- *
* @param {Matrix4} matrix The matrix to transpose and invert.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
@@ -2964,7 +2863,6 @@ Matrix4.inverseTranspose = function (matrix, result) {
/**
* An immutable Matrix4 instance initialized to the identity matrix.
- *
* @type {Matrix4}
* @constant
*/
@@ -2991,7 +2889,6 @@ Matrix4.IDENTITY = Object.freeze(
/**
* An immutable Matrix4 instance initialized to the zero matrix.
- *
* @type {Matrix4}
* @constant
*/
@@ -3018,7 +2915,6 @@ Matrix4.ZERO = Object.freeze(
/**
* The index into Matrix4 for column 0, row 0.
- *
* @type {number}
* @constant
*/
@@ -3026,7 +2922,6 @@ Matrix4.COLUMN0ROW0 = 0;
/**
* The index into Matrix4 for column 0, row 1.
- *
* @type {number}
* @constant
*/
@@ -3034,7 +2929,6 @@ Matrix4.COLUMN0ROW1 = 1;
/**
* The index into Matrix4 for column 0, row 2.
- *
* @type {number}
* @constant
*/
@@ -3042,7 +2936,6 @@ Matrix4.COLUMN0ROW2 = 2;
/**
* The index into Matrix4 for column 0, row 3.
- *
* @type {number}
* @constant
*/
@@ -3050,7 +2943,6 @@ Matrix4.COLUMN0ROW3 = 3;
/**
* The index into Matrix4 for column 1, row 0.
- *
* @type {number}
* @constant
*/
@@ -3058,7 +2950,6 @@ Matrix4.COLUMN1ROW0 = 4;
/**
* The index into Matrix4 for column 1, row 1.
- *
* @type {number}
* @constant
*/
@@ -3066,7 +2957,6 @@ Matrix4.COLUMN1ROW1 = 5;
/**
* The index into Matrix4 for column 1, row 2.
- *
* @type {number}
* @constant
*/
@@ -3074,7 +2964,6 @@ Matrix4.COLUMN1ROW2 = 6;
/**
* The index into Matrix4 for column 1, row 3.
- *
* @type {number}
* @constant
*/
@@ -3082,7 +2971,6 @@ Matrix4.COLUMN1ROW3 = 7;
/**
* The index into Matrix4 for column 2, row 0.
- *
* @type {number}
* @constant
*/
@@ -3090,7 +2978,6 @@ Matrix4.COLUMN2ROW0 = 8;
/**
* The index into Matrix4 for column 2, row 1.
- *
* @type {number}
* @constant
*/
@@ -3098,7 +2985,6 @@ Matrix4.COLUMN2ROW1 = 9;
/**
* The index into Matrix4 for column 2, row 2.
- *
* @type {number}
* @constant
*/
@@ -3106,7 +2992,6 @@ Matrix4.COLUMN2ROW2 = 10;
/**
* The index into Matrix4 for column 2, row 3.
- *
* @type {number}
* @constant
*/
@@ -3114,7 +2999,6 @@ Matrix4.COLUMN2ROW3 = 11;
/**
* The index into Matrix4 for column 3, row 0.
- *
* @type {number}
* @constant
*/
@@ -3122,7 +3006,6 @@ Matrix4.COLUMN3ROW0 = 12;
/**
* The index into Matrix4 for column 3, row 1.
- *
* @type {number}
* @constant
*/
@@ -3130,7 +3013,6 @@ Matrix4.COLUMN3ROW1 = 13;
/**
* The index into Matrix4 for column 3, row 2.
- *
* @type {number}
* @constant
*/
@@ -3138,7 +3020,6 @@ Matrix4.COLUMN3ROW2 = 14;
/**
* The index into Matrix4 for column 3, row 3.
- *
* @type {number}
* @constant
*/
@@ -3148,7 +3029,6 @@ Object.defineProperties(Matrix4.prototype, {
/**
* Gets the number of items in the collection.
* @memberof Matrix4.prototype
- *
* @type {number}
*/
length: {
@@ -3160,7 +3040,6 @@ Object.defineProperties(Matrix4.prototype, {
/**
* Duplicates the provided Matrix4 instance.
- *
* @param {Matrix4} [result] The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided.
*/
@@ -3171,7 +3050,6 @@ Matrix4.prototype.clone = function (result) {
/**
* Compares this matrix to the provided matrix componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {Matrix4} [right] The right hand side matrix.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -3180,6 +3058,9 @@ Matrix4.prototype.equals = function (right) {
};
/**
+ * @param matrix
+ * @param array
+ * @param offset
* @private
*/
Matrix4.equalsArray = function (matrix, array, offset) {
@@ -3207,9 +3088,8 @@ Matrix4.equalsArray = function (matrix, array, offset) {
* Compares this matrix to the provided matrix componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
- *
* @param {Matrix4} [right] The right hand side matrix.
- * @param {number} [epsilon=0] The epsilon to use for equality testing.
+ * @param {number} [epsilon] The epsilon to use for equality testing.
* @returns {boolean} true
if they are within the provided epsilon, false
otherwise.
*/
Matrix4.prototype.equalsEpsilon = function (right, epsilon) {
@@ -3219,7 +3099,6 @@ Matrix4.prototype.equalsEpsilon = function (right, epsilon) {
/**
* Computes a string representing this Matrix with each row being
* on a separate line and in the format '(column0, column1, column2, column3)'.
- *
* @returns {string} A string representing the provided Matrix with each row being on a separate line and in the format '(column0, column1, column2, column3)'.
*/
Matrix4.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/MorphWeightSpline.js b/packages/engine/Source/Core/MorphWeightSpline.js
index d566c1e604f7..ec94d11df1bf 100644
--- a/packages/engine/Source/Core/MorphWeightSpline.js
+++ b/packages/engine/Source/Core/MorphWeightSpline.js
@@ -6,10 +6,8 @@ import Spline from "./Spline.js";
/**
* A spline that linearly interpolates over an array of weight values used by morph targets.
- *
* @alias MorphWeightSpline
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {number[]} options.times An array of strictly increasing, unit-less, floating-point times at each point.
* The values are in no way connected to the clock time. They are the parameterization for the curve.
@@ -17,11 +15,8 @@ import Spline from "./Spline.js";
* that all weights for the targets are given in chronological order and order in which they appear in
* the glTF from which the morph targets come. This means for 2 targets, weights = [w(0,0), w(0,1), w(1,0), w(1,1) ...]
* where i and j in w(i,j) are the time indices and target indices, respectively.
- *
- * @exception {DeveloperError} weights.length must be greater than or equal to 2.
- * @exception {DeveloperError} times.length must be a factor of weights.length.
- *
- *
+ * @throws {DeveloperError} weights.length must be greater than or equal to 2.
+ * @throws {DeveloperError} times.length must be a factor of weights.length.
* @example
* const times = [ 0.0, 1.5, 3.0, 4.5, 6.0 ];
* const weights = [0.0, 1.0, 0.25, 0.75, 0.5, 0.5, 0.75, 0.25, 1.0, 0.0]; //Two targets
@@ -31,7 +26,6 @@ import Spline from "./Spline.js";
* });
*
* const p0 = spline.evaluate(times[0]);
- *
* @see ConstantSpline
* @see SteppedSpline
* @see LinearSpline
@@ -66,9 +60,7 @@ function MorphWeightSpline(options) {
Object.defineProperties(MorphWeightSpline.prototype, {
/**
* An array of times for the control weights.
- *
* @memberof WeightSpline.prototype
- *
* @type {number[]}
* @readonly
*/
@@ -80,9 +72,7 @@ Object.defineProperties(MorphWeightSpline.prototype, {
/**
* An array of floating-point array control weights.
- *
* @memberof WeightSpline.prototype
- *
* @type {number[]}
* @readonly
*/
@@ -97,11 +87,9 @@ Object.defineProperties(MorphWeightSpline.prototype, {
* Finds an index i
in times
such that the parameter
* time
is in the interval [times[i], times[i + 1]]
.
* @function
- *
* @param {number} time The time.
* @returns {number} The index for the element at the start of the interval.
- *
- * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
@@ -111,29 +99,25 @@ MorphWeightSpline.prototype.findTimeInterval =
/**
* Wraps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, wrapped around to the updated animation.
+ * @returns {number} The time, wrapped around to the updated animation.
*/
MorphWeightSpline.prototype.wrapTime = Spline.prototype.wrapTime;
/**
* Clamps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, clamped to the animation period.
+ * @returns {number} The time, clamped to the animation period.
*/
MorphWeightSpline.prototype.clampTime = Spline.prototype.clampTime;
/**
* Evaluates the curve at a given time.
- *
* @param {number} time The time at which to evaluate the curve.
* @param {number[]} [result] The object onto which to store the result.
* @returns {number[]} The modified result parameter or a new instance of the point on the curve at the given time.
- *
- * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
diff --git a/packages/engine/Source/Core/MortonOrder.js b/packages/engine/Source/Core/MortonOrder.js
index 390abf913957..94b67d7afd90 100644
--- a/packages/engine/Source/Core/MortonOrder.js
+++ b/packages/engine/Source/Core/MortonOrder.js
@@ -5,7 +5,6 @@ import DeveloperError from "./DeveloperError.js";
/**
* Morton Order (aka Z-Order Curve) helper functions.
* @see {@link https://en.wikipedia.org/wiki/Z-order_curve}
- *
* @namespace MortonOrder
* @private
*/
@@ -15,12 +14,11 @@ const MortonOrder = {};
* Inserts one 0 bit of spacing between a number's bits. This is the opposite of removeOneSpacing.
*
* Example:
- * input: 6
- * input (binary): 110
- * output (binary): 10100
- * ^ ^ (added)
- * output: 20
- *
+ * input: 6
+ * input (binary): 110
+ * output (binary): 10100
+ * ^ ^ (added)
+ * output: 20
* @private
* @param {number} v A 16-bit unsigned integer.
* @returns {number} A 32-bit unsigned integer.
@@ -39,12 +37,11 @@ function insertOneSpacing(v) {
* Inserts two 0 bits of spacing between a number's bits. This is the opposite of removeTwoSpacing.
*
* Example:
- * input: 6
- * input (binary): 110
- * output (binary): 1001000
- * ^^ ^^ (added)
- * output: 72
- *
+ * input: 6
+ * input (binary): 110
+ * output (binary): 1001000
+ * ^^ ^^ (added)
+ * output: 72
* @private
* @param {number} v A 10-bit unsigned integer.
* @returns {number} A 30-bit unsigned integer.
@@ -62,12 +59,11 @@ function insertTwoSpacing(v) {
* Removes one bit of spacing between bits. This is the opposite of insertOneSpacing.
*
* Example:
- * input: 20
- * input (binary): 10100
- * ^ ^ (removed)
- * output (binary): 110
- * output: 6
- *
+ * input: 20
+ * input (binary): 10100
+ * ^ ^ (removed)
+ * output (binary): 110
+ * output: 6
* @private
* @param {number} v A 32-bit unsigned integer.
* @returns {number} A 16-bit unsigned integer.
@@ -86,12 +82,11 @@ function removeOneSpacing(v) {
* Removes two bits of spacing between bits. This is the opposite of insertTwoSpacing.
*
* Example:
- * input: 72
- * input (binary): 1001000
- * ^^ ^^ (removed)
- * output (binary): 110
- * output: 6
- *
+ * input: 72
+ * input (binary): 1001000
+ * ^^ ^^ (removed)
+ * output (binary): 110
+ * output: 6
* @private
* @param {number} v A 30-bit unsigned integer.
* @returns {number} A 10-bit unsigned integer.
@@ -109,7 +104,6 @@ function removeTwoSpacing(v) {
/**
* Computes the Morton index from 2D coordinates. This is equivalent to interleaving their bits.
* The inputs must be 16-bit unsigned integers (resulting in 32-bit Morton index) due to 32-bit bitwise operator limitation in JavaScript.
- *
* @param {number} x The X coordinate in the range [0, (2^16)-1].
* @param {number} y The Y coordinate in the range [0, (2^16)-1].
* @returns {number} The Morton index.
@@ -134,7 +128,6 @@ MortonOrder.encode2D = function (x, y) {
/**
* Computes the 2D coordinates from a Morton index. This is equivalent to deinterleaving their bits.
* The input must be a 32-bit unsigned integer (resulting in 16 bits per coordinate) due to 32-bit bitwise operator limitation in JavaScript.
- *
* @param {number} mortonIndex The Morton index in the range [0, (2^32)-1].
* @param {number[]} [result] The array onto which to store the result.
* @returns {number[]} An array containing the 2D coordinates correspoding to the Morton index.
@@ -160,7 +153,6 @@ MortonOrder.decode2D = function (mortonIndex, result) {
/**
* Computes the Morton index from 3D coordinates. This is equivalent to interleaving their bits.
* The inputs must be 10-bit unsigned integers (resulting in 30-bit Morton index) due to 32-bit bitwise operator limitation in JavaScript.
- *
* @param {number} x The X coordinate in the range [0, (2^10)-1].
* @param {number} y The Y coordinate in the range [0, (2^10)-1].
* @param {number} z The Z coordinate in the range [0, (2^10)-1].
@@ -187,7 +179,6 @@ MortonOrder.encode3D = function (x, y, z) {
/**
* Computes the 3D coordinates from a Morton index. This is equivalent to deinterleaving their bits.
* The input must be a 30-bit unsigned integer (resulting in 10 bits per coordinate) due to 32-bit bitwise operator limitation in JavaScript.
- *
* @param {number} mortonIndex The Morton index in the range [0, (2^30)-1].
* @param {number[]} [result] The array onto which to store the result.
* @returns {number[]} An array containing the 3D coordinates corresponding to the Morton index.
diff --git a/packages/engine/Source/Core/NearFarScalar.js b/packages/engine/Source/Core/NearFarScalar.js
index 9b693fcc6387..e681b9fda726 100644
--- a/packages/engine/Source/Core/NearFarScalar.js
+++ b/packages/engine/Source/Core/NearFarScalar.js
@@ -5,13 +5,11 @@ import DeveloperError from "./DeveloperError.js";
/**
* Represents a scalar value's lower and upper bound at a near distance and far distance in eye space.
* @alias NearFarScalar
- * @constructor
- *
- * @param {number} [near=0.0] The lower bound of the camera range.
- * @param {number} [nearValue=0.0] The value at the lower bound of the camera range.
- * @param {number} [far=1.0] The upper bound of the camera range.
- * @param {number} [farValue=0.0] The value at the upper bound of the camera range.
- *
+ * @class
+ * @param {number} [near] The lower bound of the camera range.
+ * @param {number} [nearValue] The value at the lower bound of the camera range.
+ * @param {number} [far] The upper bound of the camera range.
+ * @param {number} [farValue] The value at the upper bound of the camera range.
* @see Packable
*/
function NearFarScalar(near, nearValue, far, farValue) {
@@ -43,7 +41,6 @@ function NearFarScalar(near, nearValue, far, farValue) {
/**
* Duplicates a NearFarScalar instance.
- *
* @param {NearFarScalar} nearFarScalar The NearFarScalar to duplicate.
* @param {NearFarScalar} [result] The object onto which to store the result.
* @returns {NearFarScalar} The modified result parameter or a new NearFarScalar instance if one was not provided. (Returns undefined if nearFarScalar is undefined)
@@ -77,11 +74,9 @@ NearFarScalar.packedLength = 4;
/**
* Stores the provided instance into the provided array.
- *
* @param {NearFarScalar} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
NearFarScalar.pack = function (value, array, startingIndex) {
@@ -106,9 +101,8 @@ NearFarScalar.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {NearFarScalar} [result] The object into which to store the result.
* @returns {NearFarScalar} The modified result parameter or a new NearFarScalar instance if one was not provided.
*/
@@ -134,7 +128,6 @@ NearFarScalar.unpack = function (array, startingIndex, result) {
/**
* Compares the provided NearFarScalar and returns true
if they are equal,
* false
otherwise.
- *
* @param {NearFarScalar} [left] The first NearFarScalar.
* @param {NearFarScalar} [right] The second NearFarScalar.
* @returns {boolean} true
if left and right are equal; otherwise false
.
@@ -153,7 +146,6 @@ NearFarScalar.equals = function (left, right) {
/**
* Duplicates this instance.
- *
* @param {NearFarScalar} [result] The object onto which to store the result.
* @returns {NearFarScalar} The modified result parameter or a new NearFarScalar instance if one was not provided.
*/
@@ -164,7 +156,6 @@ NearFarScalar.prototype.clone = function (result) {
/**
* Compares this instance to the provided NearFarScalar and returns true
if they are equal,
* false
otherwise.
- *
* @param {NearFarScalar} [right] The right hand side NearFarScalar.
* @returns {boolean} true
if left and right are equal; otherwise false
.
*/
diff --git a/packages/engine/Source/Core/Occluder.js b/packages/engine/Source/Core/Occluder.js
index cf247a0c3600..e6603c3469f5 100644
--- a/packages/engine/Source/Core/Occluder.js
+++ b/packages/engine/Source/Core/Occluder.js
@@ -12,14 +12,10 @@ import Visibility from "./Visibility.js";
* Creates an Occluder derived from an object's position and radius, as well as the camera position.
* The occluder can be used to determine whether or not other objects are visible or hidden behind the
* visible horizon defined by the occluder and camera position.
- *
* @alias Occluder
- *
* @param {BoundingSphere} occluderBoundingSphere The bounding sphere surrounding the occluder.
* @param {Cartesian3} cameraPosition The coordinate of the viewer/camera.
- *
- * @constructor
- *
+ * @class
* @example
* // Construct an occluder one unit away from the origin with a radius of one.
* const cameraPosition = Cesium.Cartesian3.ZERO;
@@ -137,7 +133,6 @@ Object.defineProperties(Occluder.prototype, {
/**
* Creates an occluder from a bounding sphere and the camera position.
- *
* @param {BoundingSphere} occluderBoundingSphere The bounding sphere surrounding the occluder.
* @param {Cartesian3} cameraPosition The coordinate of the viewer/camera.
* @param {Occluder} [result] The object onto which to store the result.
@@ -173,18 +168,14 @@ const tempVecScratch = new Cartesian3();
/**
* Determines whether or not a point, the occludee
, is hidden from view by the occluder.
- *
* @param {Cartesian3} occludee The point surrounding the occludee object.
* @returns {boolean} true
if the occludee is visible; otherwise false
.
- *
- *
* @example
* const cameraPosition = new Cesium.Cartesian3(0, 0, 0);
* const littleSphere = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -1), 0.25);
* const occluder = new Cesium.Occluder(littleSphere, cameraPosition);
* const point = new Cesium.Cartesian3(0, 0, -3);
* occluder.isPointVisible(point); //returns true
- *
* @see Occluder#computeVisibility
*/
Occluder.prototype.isPointVisible = function (occludee) {
@@ -209,18 +200,14 @@ const occludeePositionScratch = new Cartesian3();
/**
* Determines whether or not a sphere, the occludee
, is hidden from view by the occluder.
- *
* @param {BoundingSphere} occludee The bounding sphere surrounding the occludee object.
* @returns {boolean} true
if the occludee is visible; otherwise false
.
- *
- *
* @example
* const cameraPosition = new Cesium.Cartesian3(0, 0, 0);
* const littleSphere = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -1), 0.25);
* const occluder = new Cesium.Occluder(littleSphere, cameraPosition);
* const bigSphere = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -3), 1);
* occluder.isBoundingSphereVisible(bigSphere); //returns true
- *
* @see Occluder#computeVisibility
*/
Occluder.prototype.isBoundingSphereVisible = function (occludee) {
@@ -288,20 +275,16 @@ Occluder.prototype.isBoundingSphereVisible = function (occludee) {
const tempScratch = new Cartesian3();
/**
* Determine to what extent an occludee is visible (not visible, partially visible, or fully visible).
- *
* @param {BoundingSphere} occludeeBS The bounding sphere of the occludee.
* @returns {Visibility} Visibility.NONE if the occludee is not visible,
* Visibility.PARTIAL if the occludee is partially visible, or
* Visibility.FULL if the occludee is fully visible.
- *
- *
* @example
* const sphere1 = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -1.5), 0.5);
* const sphere2 = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -2.5), 0.5);
* const cameraPosition = new Cesium.Cartesian3(0, 0, 0);
* const occluder = new Cesium.Occluder(sphere1, cameraPosition);
* occluder.computeVisibility(sphere2); //returns Visibility.NONE
- *
* @see Occluder#isVisible
*/
Occluder.prototype.computeVisibility = function (occludeeBS) {
@@ -385,16 +368,13 @@ const occludeePointScratch = new Cartesian3();
* called for objects that do not move relative to the occluder and is large, such as a chunk of
* terrain. You are better off not calling this and using the object's bounding sphere for objects
* such as a satellite or ground vehicle.
- *
* @param {BoundingSphere} occluderBoundingSphere The bounding sphere surrounding the occluder.
* @param {Cartesian3} occludeePosition The point where the occludee (bounding sphere of radius 0) is located.
* @param {Cartesian3[]} positions List of altitude points on the horizon near the surface of the occluder.
* @returns {object} An object containing two attributes: occludeePoint
and valid
* which is a boolean value.
- *
- * @exception {DeveloperError} positions
must contain at least one element.
- * @exception {DeveloperError} occludeePosition
must have a value other than occluderBoundingSphere.center
.
- *
+ * @throws {DeveloperError} positions
must contain at least one element.
+ * @throws {DeveloperError} occludeePosition
must have a value other than occluderBoundingSphere.center
.
* @example
* const cameraPosition = new Cesium.Cartesian3(0, 0, 0);
* const occluderBoundingSphere = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -8), 2);
@@ -497,9 +477,8 @@ Occluder.computeOccludeePoint = function (
const computeOccludeePointFromRectangleScratch = [];
/**
* Computes a point that can be used as the occludee position to the visibility functions from a rectangle.
- *
* @param {Rectangle} rectangle The rectangle used to create a bounding sphere.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid used to determine positions of the rectangle.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid used to determine positions of the rectangle.
* @returns {object} An object containing two attributes: occludeePoint
and valid
* which is a boolean value.
*/
diff --git a/packages/engine/Source/Core/OffsetGeometryInstanceAttribute.js b/packages/engine/Source/Core/OffsetGeometryInstanceAttribute.js
index 039d0b2136af..7518e755a6d3 100644
--- a/packages/engine/Source/Core/OffsetGeometryInstanceAttribute.js
+++ b/packages/engine/Source/Core/OffsetGeometryInstanceAttribute.js
@@ -5,16 +5,12 @@ import defined from "./defined.js";
/**
* Value and type information for per-instance geometry attribute that determines the geometry instance offset
- *
* @alias OffsetGeometryInstanceAttribute
- * @constructor
- *
- * @param {number} [x=0] The x translation
- * @param {number} [y=0] The y translation
- * @param {number} [z=0] The z translation
- *
+ * @class
+ * @param {number} [x] The x translation
+ * @param {number} [y] The y translation
+ * @param {number} [z] The z translation
* @private
- *
* @see GeometryInstance
* @see GeometryInstanceAttribute
*/
@@ -25,7 +21,6 @@ function OffsetGeometryInstanceAttribute(x, y, z) {
/**
* The values for the attributes stored in a typed array.
- *
* @type Float32Array
*/
this.value = new Float32Array([x, y, z]);
@@ -35,12 +30,9 @@ Object.defineProperties(OffsetGeometryInstanceAttribute.prototype, {
/**
* The datatype of each component in the attribute, e.g., individual elements in
* {@link OffsetGeometryInstanceAttribute#value}.
- *
* @memberof OffsetGeometryInstanceAttribute.prototype
- *
* @type {ComponentDatatype}
* @readonly
- *
* @default {@link ComponentDatatype.FLOAT}
*/
componentDatatype: {
@@ -51,12 +43,9 @@ Object.defineProperties(OffsetGeometryInstanceAttribute.prototype, {
/**
* The number of components in the attributes, i.e., {@link OffsetGeometryInstanceAttribute#value}.
- *
* @memberof OffsetGeometryInstanceAttribute.prototype
- *
* @type {number}
* @readonly
- *
* @default 3
*/
componentsPerAttribute: {
@@ -69,12 +58,9 @@ Object.defineProperties(OffsetGeometryInstanceAttribute.prototype, {
* When true
and componentDatatype
is an integer format,
* indicate that the components should be mapped to the range [0, 1] (unsigned)
* or [-1, 1] (signed) when they are accessed as floating-point for rendering.
- *
* @memberof OffsetGeometryInstanceAttribute.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
normalize: {
@@ -86,7 +72,6 @@ Object.defineProperties(OffsetGeometryInstanceAttribute.prototype, {
/**
* Creates a new {@link OffsetGeometryInstanceAttribute} instance given the provided an enabled flag and {@link DistanceDisplayCondition}.
- *
* @param {Cartesian3} offset The cartesian offset
* @returns {OffsetGeometryInstanceAttribute} The new {@link OffsetGeometryInstanceAttribute} instance.
*/
@@ -100,11 +85,9 @@ OffsetGeometryInstanceAttribute.fromCartesian3 = function (offset) {
/**
* Converts a distance display condition to a typed array that can be used to assign a distance display condition attribute.
- *
* @param {Cartesian3} offset The cartesian offset
* @param {Float32Array} [result] The array to store the result in, if undefined a new instance will be created.
* @returns {Float32Array} The modified result parameter or a new instance if result was undefined.
- *
* @example
* const attributes = primitive.getGeometryInstanceAttributes('an id');
* attributes.modelMatrix = Cesium.OffsetGeometryInstanceAttribute.toValue(modelMatrix, attributes.modelMatrix);
diff --git a/packages/engine/Source/Core/OpenCageGeocoderService.js b/packages/engine/Source/Core/OpenCageGeocoderService.js
index 139a7f194f2d..7ba7f631e808 100644
--- a/packages/engine/Source/Core/OpenCageGeocoderService.js
+++ b/packages/engine/Source/Core/OpenCageGeocoderService.js
@@ -10,8 +10,7 @@ import Resource from "./Resource.js";
/**
* Provides geocoding via a {@link https://opencagedata.com/|OpenCage} server.
* @alias OpenCageGeocoderService
- * @constructor
- *
+ * @class
* @param {Resource|string} url The endpoint to the OpenCage server.
* @param {string} apiKey The OpenCage API Key.
* @param {object} [params] An object with the following properties (See https://opencagedata.com/api#forward-opt):
@@ -28,7 +27,6 @@ import Resource from "./Resource.js";
* @param {number} [options.no_record] When set to 1 the query contents are not logged.
* @param {number} [options.pretty] When set to 1 results are 'pretty' printed for easier reading. Useful for debugging.
* @param {string} [options.proximity] Provides the geocoder with a hint to bias results in favour of those closer to the specified location (For example: 41.40139,2.12870).
- *
* @example
* // Configure a Viewer to use the OpenCage Geocoder
* const viewer = new Cesium.Viewer('cesiumContainer', {
@@ -94,7 +92,6 @@ Object.defineProperties(OpenCageGeocoderService.prototype, {
/**
* @function
- *
* @param {string} query The query to be sent to the geocoder service
* @returns {Promise}
*/
diff --git a/packages/engine/Source/Core/OrientedBoundingBox.js b/packages/engine/Source/Core/OrientedBoundingBox.js
index c7fe3c292285..2f34973ef945 100644
--- a/packages/engine/Source/Core/OrientedBoundingBox.js
+++ b/packages/engine/Source/Core/OrientedBoundingBox.js
@@ -20,21 +20,17 @@ import Rectangle from "./Rectangle.js";
* Creates an instance of an OrientedBoundingBox.
* An OrientedBoundingBox of some object is a closed and convex rectangular cuboid. It can provide a tighter bounding volume than {@link BoundingSphere} or {@link AxisAlignedBoundingBox} in many cases.
* @alias OrientedBoundingBox
- * @constructor
- *
- * @param {Cartesian3} [center=Cartesian3.ZERO] The center of the box.
- * @param {Matrix3} [halfAxes=Matrix3.ZERO] The three orthogonal half-axes of the bounding box.
+ * @class
+ * @param {Cartesian3} [center] The center of the box.
+ * @param {Matrix3} [halfAxes] The three orthogonal half-axes of the bounding box.
* Equivalently, the transformation matrix, to rotate and scale a 2x2x2
* cube centered at the origin.
- *
- *
* @example
* // Create an OrientedBoundingBox using a transformation matrix, a position where the box will be translated, and a scale.
* const center = new Cesium.Cartesian3(1.0, 0.0, 0.0);
* const halfAxes = Cesium.Matrix3.fromScale(new Cesium.Cartesian3(1.0, 3.0, 2.0), new Cesium.Matrix3());
*
* const obb = new Cesium.OrientedBoundingBox(center, halfAxes);
- *
* @see BoundingSphere
* @see BoundingRectangle
*/
@@ -64,11 +60,9 @@ OrientedBoundingBox.packedLength =
/**
* Stores the provided instance into the provided array.
- *
* @param {OrientedBoundingBox} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
OrientedBoundingBox.pack = function (value, array, startingIndex) {
@@ -87,9 +81,8 @@ OrientedBoundingBox.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {OrientedBoundingBox} [result] The object into which to store the result.
* @returns {OrientedBoundingBox} The modified result parameter or a new OrientedBoundingBox instance if one was not provided.
*/
@@ -129,11 +122,9 @@ const scratchEigenResult = {
* Computes an instance of an OrientedBoundingBox of the given positions.
* This is an implementation of Stefan Gottschalk's Collision Queries using Oriented Bounding Boxes solution (PHD thesis).
* Reference: http://gamma.cs.unc.edu/users/gottschalk/main.pdf
- *
* @param {Cartesian3[]} [positions] List of {@link Cartesian3} points that the bounding box will enclose.
* @param {OrientedBoundingBox} [result] The object onto which to store the result.
* @returns {OrientedBoundingBox} The modified result parameter or a new OrientedBoundingBox instance if one was not provided.
- *
* @example
* // Compute an object oriented bounding box enclosing two points.
* const box = Cesium.OrientedBoundingBox.fromPoints([new Cesium.Cartesian3(2, 0, 0), new Cesium.Cartesian3(-2, 0, 0)]);
@@ -328,17 +319,15 @@ const scratchPlane = new Plane(Cartesian3.UNIT_X, 0.0);
/**
* Computes an OrientedBoundingBox that bounds a {@link Rectangle} on the surface of an {@link Ellipsoid}.
* There are no guarantees about the orientation of the bounding box.
- *
* @param {Rectangle} rectangle The cartographic rectangle on the surface of the ellipsoid.
- * @param {number} [minimumHeight=0.0] The minimum height (elevation) within the tile.
- * @param {number} [maximumHeight=0.0] The maximum height (elevation) within the tile.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rectangle is defined.
+ * @param {number} [minimumHeight] The minimum height (elevation) within the tile.
+ * @param {number} [maximumHeight] The maximum height (elevation) within the tile.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the rectangle is defined.
* @param {OrientedBoundingBox} [result] The object onto which to store the result.
* @returns {OrientedBoundingBox} The modified result parameter or a new OrientedBoundingBox instance if none was provided.
- *
- * @exception {DeveloperError} rectangle.width must be between 0 and 2 * pi.
- * @exception {DeveloperError} rectangle.height must be between 0 and pi.
- * @exception {DeveloperError} ellipsoid must be an ellipsoid of revolution (radii.x == radii.y
)
+ * @throws {DeveloperError} rectangle.width must be between 0 and 2 * pi.
+ * @throws {DeveloperError} rectangle.height must be between 0 and pi.
+ * @throws {DeveloperError} ellipsoid must be an ellipsoid of revolution (radii.x == radii.y
)
*/
OrientedBoundingBox.fromRectangle = function (
rectangle,
@@ -612,7 +601,6 @@ OrientedBoundingBox.fromRectangle = function (
/**
* Computes an OrientedBoundingBox that bounds an affine transformation.
- *
* @param {Matrix4} transformation The affine transformation.
* @param {OrientedBoundingBox} [result] The object onto which to store the result.
* @returns {OrientedBoundingBox} The modified result parameter or a new OrientedBoundingBox instance if none was provided.
@@ -638,7 +626,6 @@ OrientedBoundingBox.fromTransformation = function (transformation, result) {
/**
* Duplicates a OrientedBoundingBox instance.
- *
* @param {OrientedBoundingBox} box The bounding box to duplicate.
* @param {OrientedBoundingBox} [result] The object onto which to store the result.
* @returns {OrientedBoundingBox} The modified result parameter or a new OrientedBoundingBox instance if none was provided. (Returns undefined if box is undefined)
@@ -660,7 +647,6 @@ OrientedBoundingBox.clone = function (box, result) {
/**
* Determines which side of a plane the oriented bounding box is located.
- *
* @param {OrientedBoundingBox} box The oriented bounding box to test.
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire box is on the side of the plane
@@ -723,11 +709,9 @@ const scratchPPrime = new Cartesian3();
/**
* Computes the estimated distance squared from the closest point on a bounding box to a point.
- *
* @param {OrientedBoundingBox} box The box.
* @param {Cartesian3} cartesian The point
* @returns {number} The distance squared from the oriented bounding box to the point. Returns 0 if the point is inside the box.
- *
* @example
* // Sort bounding boxes from back to front
* boxes.sort(function(a, b) {
@@ -882,7 +866,6 @@ const scratchToCenter = new Cartesian3();
*
* If you imagine the infinite number of planes with normal direction, this computes the smallest distance to the
* closest and farthest planes from position that intersect the bounding box.
- *
* @param {OrientedBoundingBox} box The bounding box to calculate the distance to.
* @param {Cartesian3} position The position to calculate the distance from.
* @param {Cartesian3} direction The direction from position.
@@ -1022,7 +1005,6 @@ const scratchZAxis = new Cartesian3();
/**
* Computes the eight corners of an oriented bounding box. The corners are ordered by (-X, -Y, -Z), (-X, -Y, +Z), (-X, +Y, -Z), (-X, +Y, +Z), (+X, -Y, -Z), (+X, -Y, +Z), (+X, +Y, -Z), (+X, +Y, +Z).
- *
* @param {OrientedBoundingBox} box The oriented bounding box.
* @param {Cartesian3[]} [result] An array of eight {@link Cartesian3} instances onto which to store the corners.
* @returns {Cartesian3[]} The modified result parameter or a new array if none was provided.
@@ -1098,7 +1080,6 @@ const scratchRotationScale = new Matrix3();
/**
* Computes a transformation matrix from an oriented bounding box.
- *
* @param {OrientedBoundingBox} box The oriented bounding box.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new {@link Matrix4} instance if none was provided.
@@ -1125,7 +1106,6 @@ const scratchBoundingSphere = new BoundingSphere();
/**
* Determines whether or not a bounding box is hidden from view by the occluder.
- *
* @param {OrientedBoundingBox} box The bounding box surrounding the occludee object.
* @param {Occluder} occluder The occluder.
* @returns {boolean} true
if the box is not visible; otherwise false
.
@@ -1150,7 +1130,6 @@ OrientedBoundingBox.isOccluded = function (box, occluder) {
/**
* Determines which side of a plane the oriented bounding box is located.
- *
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire box is on the side of the plane
* the normal is pointing, {@link Intersect.OUTSIDE} if the entire box is
@@ -1163,10 +1142,8 @@ OrientedBoundingBox.prototype.intersectPlane = function (plane) {
/**
* Computes the estimated distance squared from the closest point on a bounding box to a point.
- *
* @param {Cartesian3} cartesian The point
* @returns {number} The estimated distance squared from the bounding sphere to the point.
- *
* @example
* // Sort bounding boxes from back to front
* boxes.sort(function(a, b) {
@@ -1182,7 +1159,6 @@ OrientedBoundingBox.prototype.distanceSquaredTo = function (cartesian) {
*
* If you imagine the infinite number of planes with normal direction, this computes the smallest distance to the
* closest and farthest planes from position that intersect the bounding box.
- *
* @param {Cartesian3} position The position to calculate the distance from.
* @param {Cartesian3} direction The direction from position.
* @param {Interval} [result] A Interval to store the nearest and farthest distances.
@@ -1203,7 +1179,6 @@ OrientedBoundingBox.prototype.computePlaneDistances = function (
/**
* Computes the eight corners of an oriented bounding box. The corners are ordered by (-X, -Y, -Z), (-X, -Y, +Z), (-X, +Y, -Z), (-X, +Y, +Z), (+X, -Y, -Z), (+X, -Y, +Z), (+X, +Y, -Z), (+X, +Y, +Z).
- *
* @param {Cartesian3[]} [result] An array of eight {@link Cartesian3} instances onto which to store the corners.
* @returns {Cartesian3[]} The modified result parameter or a new array if none was provided.
*/
@@ -1213,7 +1188,6 @@ OrientedBoundingBox.prototype.computeCorners = function (result) {
/**
* Computes a transformation matrix from an oriented bounding box.
- *
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new {@link Matrix4} instance if none was provided.
*/
@@ -1223,7 +1197,6 @@ OrientedBoundingBox.prototype.computeTransformation = function (result) {
/**
* Determines whether or not a bounding box is hidden from view by the occluder.
- *
* @param {Occluder} occluder The occluder.
* @returns {boolean} true
if the sphere is not visible; otherwise false
.
*/
@@ -1234,7 +1207,6 @@ OrientedBoundingBox.prototype.isOccluded = function (occluder) {
/**
* Compares the provided OrientedBoundingBox componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {OrientedBoundingBox} left The first OrientedBoundingBox.
* @param {OrientedBoundingBox} right The second OrientedBoundingBox.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -1251,7 +1223,6 @@ OrientedBoundingBox.equals = function (left, right) {
/**
* Duplicates this OrientedBoundingBox instance.
- *
* @param {OrientedBoundingBox} [result] The object onto which to store the result.
* @returns {OrientedBoundingBox} The modified result parameter or a new OrientedBoundingBox instance if one was not provided.
*/
@@ -1262,7 +1233,6 @@ OrientedBoundingBox.prototype.clone = function (result) {
/**
* Compares this OrientedBoundingBox against the provided OrientedBoundingBox componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {OrientedBoundingBox} [right] The right hand side OrientedBoundingBox.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/Core/OrthographicFrustum.js b/packages/engine/Source/Core/OrthographicFrustum.js
index e94dcb868101..bea3ce1112a8 100644
--- a/packages/engine/Source/Core/OrthographicFrustum.js
+++ b/packages/engine/Source/Core/OrthographicFrustum.js
@@ -10,16 +10,13 @@ import OrthographicOffCenterFrustum from "./OrthographicOffCenterFrustum.js";
* Each plane is represented by a {@link Cartesian4} object, where the x, y, and z components
* define the unit vector normal to the plane, and the w component is the distance of the
* plane from the origin/camera position.
- *
* @alias OrthographicFrustum
- * @constructor
- *
+ * @class
* @param {object} [options] An object with the following properties:
* @param {number} [options.width] The width of the frustum in meters.
* @param {number} [options.aspectRatio] The aspect ratio of the frustum's width to it's height.
- * @param {number} [options.near=1.0] The distance of the near plane.
- * @param {number} [options.far=500000000.0] The distance of the far plane.
- *
+ * @param {number} [options.near] The distance of the near plane.
+ * @param {number} [options.far] The distance of the far plane.
* @example
* const maxRadii = ellipsoid.maximumRadius;
*
@@ -73,11 +70,9 @@ OrthographicFrustum.packedLength = 4;
/**
* Stores the provided instance into the provided array.
- *
* @param {OrthographicFrustum} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
OrthographicFrustum.pack = function (value, array, startingIndex) {
@@ -98,9 +93,8 @@ OrthographicFrustum.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {OrthographicFrustum} [result] The object into which to store the result.
* @returns {OrthographicFrustum} The modified result parameter or a new OrthographicFrustum instance if one was not provided.
*/
@@ -201,12 +195,10 @@ Object.defineProperties(OrthographicFrustum.prototype, {
/**
* Creates a culling volume for this frustum.
- *
* @param {Cartesian3} position The eye position.
* @param {Cartesian3} direction The view direction.
* @param {Cartesian3} up The up direction.
* @returns {CullingVolume} A culling volume at the given position and orientation.
- *
* @example
* // Check if a bounding volume intersects the frustum.
* const cullingVolume = frustum.computeCullingVolume(cameraPosition, cameraDirection, cameraUp);
@@ -223,18 +215,15 @@ OrthographicFrustum.prototype.computeCullingVolume = function (
/**
* Returns the pixel's width and height in meters.
- *
* @param {number} drawingBufferWidth The width of the drawing buffer.
* @param {number} drawingBufferHeight The height of the drawing buffer.
* @param {number} distance The distance to the near plane in meters.
* @param {number} pixelRatio The scaling factor from pixel space to coordinate space.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new instance of {@link Cartesian2} with the pixel's width and height in the x and y properties, respectively.
- *
- * @exception {DeveloperError} drawingBufferWidth must be greater than zero.
- * @exception {DeveloperError} drawingBufferHeight must be greater than zero.
- * @exception {DeveloperError} pixelRatio must be greater than zero.
- *
+ * @throws {DeveloperError} drawingBufferWidth must be greater than zero.
+ * @throws {DeveloperError} drawingBufferHeight must be greater than zero.
+ * @throws {DeveloperError} pixelRatio must be greater than zero.
* @example
* // Example 1
* // Get the width and height of a pixel.
@@ -259,7 +248,6 @@ OrthographicFrustum.prototype.getPixelDimensions = function (
/**
* Returns a duplicate of a OrthographicFrustum instance.
- *
* @param {OrthographicFrustum} [result] The object onto which to store the result.
* @returns {OrthographicFrustum} The modified result parameter or a new OrthographicFrustum instance if one was not provided.
*/
@@ -287,7 +275,6 @@ OrthographicFrustum.prototype.clone = function (result) {
/**
* Compares the provided OrthographicFrustum componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {OrthographicFrustum} [other] The right hand side OrthographicFrustum.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -310,10 +297,9 @@ OrthographicFrustum.prototype.equals = function (other) {
* Compares the provided OrthographicFrustum componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
- *
* @param {OrthographicFrustum} other The right hand side OrthographicFrustum.
* @param {number} relativeEpsilon The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if this and other are within the provided epsilon, false
otherwise.
*/
OrthographicFrustum.prototype.equalsEpsilon = function (
diff --git a/packages/engine/Source/Core/OrthographicOffCenterFrustum.js b/packages/engine/Source/Core/OrthographicOffCenterFrustum.js
index b99d0c5065bf..a2f6335a5468 100644
--- a/packages/engine/Source/Core/OrthographicOffCenterFrustum.js
+++ b/packages/engine/Source/Core/OrthographicOffCenterFrustum.js
@@ -12,18 +12,15 @@ import Matrix4 from "./Matrix4.js";
* Each plane is represented by a {@link Cartesian4} object, where the x, y, and z components
* define the unit vector normal to the plane, and the w component is the distance of the
* plane from the origin/camera position.
- *
* @alias OrthographicOffCenterFrustum
- * @constructor
- *
+ * @class
* @param {object} [options] An object with the following properties:
* @param {number} [options.left] The left clipping plane distance.
* @param {number} [options.right] The right clipping plane distance.
* @param {number} [options.top] The top clipping plane distance.
* @param {number} [options.bottom] The bottom clipping plane distance.
- * @param {number} [options.near=1.0] The near clipping plane distance.
- * @param {number} [options.far=500000000.0] The far clipping plane distance.
- *
+ * @param {number} [options.near] The near clipping plane distance.
+ * @param {number} [options.far] The far clipping plane distance.
* @example
* const maxRadii = ellipsoid.maximumRadius;
*
@@ -168,12 +165,10 @@ const negateScratch = new Cartesian3();
/**
* Creates a culling volume for this frustum.
- *
* @param {Cartesian3} position The eye position.
* @param {Cartesian3} direction The view direction.
* @param {Cartesian3} up The up direction.
* @returns {CullingVolume} A culling volume at the given position and orientation.
- *
* @example
* // Check if a bounding volume intersects the frustum.
* const cullingVolume = frustum.computeCullingVolume(cameraPosition, cameraDirection, cameraUp);
@@ -292,18 +287,15 @@ OrthographicOffCenterFrustum.prototype.computeCullingVolume = function (
/**
* Returns the pixel's width and height in meters.
- *
* @param {number} drawingBufferWidth The width of the drawing buffer.
* @param {number} drawingBufferHeight The height of the drawing buffer.
* @param {number} distance The distance to the near plane in meters.
* @param {number} pixelRatio The scaling factor from pixel space to coordinate space.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new instance of {@link Cartesian2} with the pixel's width and height in the x and y properties, respectively.
- *
- * @exception {DeveloperError} drawingBufferWidth must be greater than zero.
- * @exception {DeveloperError} drawingBufferHeight must be greater than zero.
- * @exception {DeveloperError} pixelRatio must be greater than zero.
- *
+ * @throws {DeveloperError} drawingBufferWidth must be greater than zero.
+ * @throws {DeveloperError} drawingBufferHeight must be greater than zero.
+ * @throws {DeveloperError} pixelRatio must be greater than zero.
* @example
* // Example 1
* // Get the width and height of a pixel.
@@ -356,7 +348,6 @@ OrthographicOffCenterFrustum.prototype.getPixelDimensions = function (
/**
* Returns a duplicate of a OrthographicOffCenterFrustum instance.
- *
* @param {OrthographicOffCenterFrustum} [result] The object onto which to store the result.
* @returns {OrthographicOffCenterFrustum} The modified result parameter or a new OrthographicOffCenterFrustum instance if one was not provided.
*/
@@ -386,7 +377,6 @@ OrthographicOffCenterFrustum.prototype.clone = function (result) {
/**
* Compares the provided OrthographicOffCenterFrustum componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {OrthographicOffCenterFrustum} [other] The right hand side OrthographicOffCenterFrustum.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -407,10 +397,9 @@ OrthographicOffCenterFrustum.prototype.equals = function (other) {
* Compares the provided OrthographicOffCenterFrustum componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
- *
* @param {OrthographicOffCenterFrustum} other The right hand side OrthographicOffCenterFrustum.
* @param {number} relativeEpsilon The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if this and other are within the provided epsilon, false
otherwise.
*/
OrthographicOffCenterFrustum.prototype.equalsEpsilon = function (
diff --git a/packages/engine/Source/Core/Packable.js b/packages/engine/Source/Core/Packable.js
index ef167bed20d1..4ec3aad0171e 100644
--- a/packages/engine/Source/Core/Packable.js
+++ b/packages/engine/Source/Core/Packable.js
@@ -4,9 +4,7 @@ import DeveloperError from "./DeveloperError.js";
* Static interface for types which can store their values as packed
* elements in an array. These methods and properties are expected to be
* defined on a constructor function.
- *
* @interface Packable
- *
* @see PackableForInterpolation
*/
const Packable = {
@@ -19,7 +17,6 @@ const Packable = {
/**
* Stores the provided instance into the provided array.
* @function
- *
* @param {*} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
@@ -29,7 +26,6 @@ const Packable = {
/**
* Retrieves an instance from a packed array.
* @function
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {object} [result] The object into which to store the result.
diff --git a/packages/engine/Source/Core/PackableForInterpolation.js b/packages/engine/Source/Core/PackableForInterpolation.js
index 11e4a3885884..bb0de34fed5c 100644
--- a/packages/engine/Source/Core/PackableForInterpolation.js
+++ b/packages/engine/Source/Core/PackableForInterpolation.js
@@ -4,9 +4,7 @@ import DeveloperError from "./DeveloperError.js";
* Static interface for {@link Packable} types which are interpolated in a
* different representation than their packed value. These methods and
* properties are expected to be defined on a constructor function.
- *
* @namespace PackableForInterpolation
- *
* @see Packable
*/
const PackableForInterpolation = {
@@ -19,7 +17,6 @@ const PackableForInterpolation = {
/**
* Converts a packed array into a form suitable for interpolation.
* @function
- *
* @param {number[]} packedArray The packed array.
* @param {number} [startingIndex=0] The index of the first element to be converted.
* @param {number} [lastIndex=packedArray.length] The index of the last element to be converted.
@@ -30,7 +27,6 @@ const PackableForInterpolation = {
/**
* Retrieves an instance from a packed array converted with {@link PackableForInterpolation.convertPackedArrayForInterpolation}.
* @function
- *
* @param {number[]} array The array previously packed for interpolation.
* @param {number[]} sourceArray The original packed array.
* @param {number} [startingIndex=0] The startingIndex used to convert the array.
diff --git a/packages/engine/Source/Core/PeliasGeocoderService.js b/packages/engine/Source/Core/PeliasGeocoderService.js
index 30da8c2c43c1..195f638e3cf3 100644
--- a/packages/engine/Source/Core/PeliasGeocoderService.js
+++ b/packages/engine/Source/Core/PeliasGeocoderService.js
@@ -8,10 +8,8 @@ import Resource from "./Resource.js";
/**
* Provides geocoding via a {@link https://pelias.io/|Pelias} server.
* @alias PeliasGeocoderService
- * @constructor
- *
+ * @class
* @param {Resource|string} url The endpoint to the Pelias server.
- *
* @example
* // Configure a Viewer to use the Pelias server hosted by https://geocode.earth/
* const viewer = new Cesium.Viewer('cesiumContainer', {
@@ -60,9 +58,8 @@ Object.defineProperties(PeliasGeocoderService.prototype, {
/**
* @function
- *
* @param {string} query The query to be sent to the geocoder service
- * @param {GeocodeType} [type=GeocodeType.SEARCH] The type of geocode to perform.
+ * @param {GeocodeType} [type] The type of geocode to perform.
* @returns {Promise}
*/
PeliasGeocoderService.prototype.geocode = async function (query, type) {
diff --git a/packages/engine/Source/Core/PerspectiveFrustum.js b/packages/engine/Source/Core/PerspectiveFrustum.js
index 0442961c533f..0d3273305898 100644
--- a/packages/engine/Source/Core/PerspectiveFrustum.js
+++ b/packages/engine/Source/Core/PerspectiveFrustum.js
@@ -10,18 +10,15 @@ import PerspectiveOffCenterFrustum from "./PerspectiveOffCenterFrustum.js";
* Each plane is represented by a {@link Cartesian4} object, where the x, y, and z components
* define the unit vector normal to the plane, and the w component is the distance of the
* plane from the origin/camera position.
- *
* @alias PerspectiveFrustum
- * @constructor
- *
+ * @class
* @param {object} [options] An object with the following properties:
* @param {number} [options.fov] The angle of the field of view (FOV), in radians.
* @param {number} [options.aspectRatio] The aspect ratio of the frustum's width to it's height.
- * @param {number} [options.near=1.0] The distance of the near plane.
- * @param {number} [options.far=500000000.0] The distance of the far plane.
- * @param {number} [options.xOffset=0.0] The offset in the x direction.
- * @param {number} [options.yOffset=0.0] The offset in the y direction.
- *
+ * @param {number} [options.near] The distance of the near plane.
+ * @param {number} [options.far] The distance of the far plane.
+ * @param {number} [options.xOffset] The offset in the x direction.
+ * @param {number} [options.yOffset] The offset in the y direction.
* @example
* const frustum = new Cesium.PerspectiveFrustum({
* fov : Cesium.Math.PI_OVER_THREE,
@@ -29,7 +26,6 @@ import PerspectiveOffCenterFrustum from "./PerspectiveOffCenterFrustum.js";
* near : 1.0,
* far : 1000.0
* });
- *
* @see PerspectiveOffCenterFrustum
*/
function PerspectiveFrustum(options) {
@@ -99,11 +95,9 @@ PerspectiveFrustum.packedLength = 6;
/**
* Stores the provided instance into the provided array.
- *
* @param {PerspectiveFrustum} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
PerspectiveFrustum.pack = function (value, array, startingIndex) {
@@ -126,9 +120,8 @@ PerspectiveFrustum.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {PerspectiveFrustum} [result] The object into which to store the result.
* @returns {PerspectiveFrustum} The modified result parameter or a new PerspectiveFrustum instance if one was not provided.
*/
@@ -225,7 +218,6 @@ Object.defineProperties(PerspectiveFrustum.prototype, {
* @memberof PerspectiveFrustum.prototype
* @type {Matrix4}
* @readonly
- *
* @see PerspectiveFrustum#infiniteProjectionMatrix
*/
projectionMatrix: {
@@ -240,7 +232,6 @@ Object.defineProperties(PerspectiveFrustum.prototype, {
* @memberof PerspectiveFrustum.prototype
* @type {Matrix4}
* @readonly
- *
* @see PerspectiveFrustum#projectionMatrix
*/
infiniteProjectionMatrix: {
@@ -292,12 +283,10 @@ Object.defineProperties(PerspectiveFrustum.prototype, {
/**
* Creates a culling volume for this frustum.
- *
* @param {Cartesian3} position The eye position.
* @param {Cartesian3} direction The view direction.
* @param {Cartesian3} up The up direction.
* @returns {CullingVolume} A culling volume at the given position and orientation.
- *
* @example
* // Check if a bounding volume intersects the frustum.
* const cullingVolume = frustum.computeCullingVolume(cameraPosition, cameraDirection, cameraUp);
@@ -314,23 +303,19 @@ PerspectiveFrustum.prototype.computeCullingVolume = function (
/**
* Returns the pixel's width and height in meters.
- *
* @param {number} drawingBufferWidth The width of the drawing buffer.
* @param {number} drawingBufferHeight The height of the drawing buffer.
* @param {number} distance The distance to the near plane in meters.
* @param {number} pixelRatio The scaling factor from pixel space to coordinate space.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new instance of {@link Cartesian2} with the pixel's width and height in the x and y properties, respectively.
- *
- * @exception {DeveloperError} drawingBufferWidth must be greater than zero.
- * @exception {DeveloperError} drawingBufferHeight must be greater than zero.
- * @exception {DeveloperError} pixelRatio must be greater than zero.
- *
+ * @throws {DeveloperError} drawingBufferWidth must be greater than zero.
+ * @throws {DeveloperError} drawingBufferHeight must be greater than zero.
+ * @throws {DeveloperError} pixelRatio must be greater than zero.
* @example
* // Example 1
* // Get the width and height of a pixel.
* const pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 1.0, scene.pixelRatio, new Cesium.Cartesian2());
- *
* @example
* // Example 2
* // Get the width and height of a pixel if the near plane was set to 'distance'.
@@ -361,7 +346,6 @@ PerspectiveFrustum.prototype.getPixelDimensions = function (
/**
* Returns a duplicate of a PerspectiveFrustum instance.
- *
* @param {PerspectiveFrustum} [result] The object onto which to store the result.
* @returns {PerspectiveFrustum} The modified result parameter or a new PerspectiveFrustum instance if one was not provided.
*/
@@ -389,7 +373,6 @@ PerspectiveFrustum.prototype.clone = function (result) {
/**
* Compares the provided PerspectiveFrustum componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {PerspectiveFrustum} [other] The right hand side PerspectiveFrustum.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -412,10 +395,9 @@ PerspectiveFrustum.prototype.equals = function (other) {
* Compares the provided PerspectiveFrustum componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
- *
* @param {PerspectiveFrustum} other The right hand side PerspectiveFrustum.
* @param {number} relativeEpsilon The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if this and other are within the provided epsilon, false
otherwise.
*/
PerspectiveFrustum.prototype.equalsEpsilon = function (
diff --git a/packages/engine/Source/Core/PerspectiveOffCenterFrustum.js b/packages/engine/Source/Core/PerspectiveOffCenterFrustum.js
index 00339b199d60..84ba0ac5b536 100644
--- a/packages/engine/Source/Core/PerspectiveOffCenterFrustum.js
+++ b/packages/engine/Source/Core/PerspectiveOffCenterFrustum.js
@@ -12,18 +12,15 @@ import Matrix4 from "./Matrix4.js";
* Each plane is represented by a {@link Cartesian4} object, where the x, y, and z components
* define the unit vector normal to the plane, and the w component is the distance of the
* plane from the origin/camera position.
- *
* @alias PerspectiveOffCenterFrustum
- * @constructor
- *
+ * @class
* @param {object} [options] An object with the following properties:
* @param {number} [options.left] The left clipping plane distance.
* @param {number} [options.right] The right clipping plane distance.
* @param {number} [options.top] The top clipping plane distance.
* @param {number} [options.bottom] The bottom clipping plane distance.
- * @param {number} [options.near=1.0] The near clipping plane distance.
- * @param {number} [options.far=500000000.0] The far clipping plane distance.
- *
+ * @param {number} [options.near] The near clipping plane distance.
+ * @param {number} [options.far] The far clipping plane distance.
* @example
* const frustum = new Cesium.PerspectiveOffCenterFrustum({
* left : -1.0,
@@ -33,7 +30,6 @@ import Matrix4 from "./Matrix4.js";
* near : 1.0,
* far : 100.0
* });
- *
* @see PerspectiveFrustum
*/
function PerspectiveOffCenterFrustum(options) {
@@ -163,7 +159,6 @@ Object.defineProperties(PerspectiveOffCenterFrustum.prototype, {
* @memberof PerspectiveOffCenterFrustum.prototype
* @type {Matrix4}
* @readonly
- *
* @see PerspectiveOffCenterFrustum#infiniteProjectionMatrix
*/
projectionMatrix: {
@@ -178,7 +173,6 @@ Object.defineProperties(PerspectiveOffCenterFrustum.prototype, {
* @memberof PerspectiveOffCenterFrustum.prototype
* @type {Matrix4}
* @readonly
- *
* @see PerspectiveOffCenterFrustum#projectionMatrix
*/
infiniteProjectionMatrix: {
@@ -195,12 +189,10 @@ const getPlanesFarCenter = new Cartesian3();
const getPlanesNormal = new Cartesian3();
/**
* Creates a culling volume for this frustum.
- *
* @param {Cartesian3} position The eye position.
* @param {Cartesian3} direction The view direction.
* @param {Cartesian3} up The up direction.
* @returns {CullingVolume} A culling volume at the given position and orientation.
- *
* @example
* // Check if a bounding volume intersects the frustum.
* const cullingVolume = frustum.computeCullingVolume(cameraPosition, cameraDirection, cameraUp);
@@ -338,23 +330,19 @@ PerspectiveOffCenterFrustum.prototype.computeCullingVolume = function (
/**
* Returns the pixel's width and height in meters.
- *
* @param {number} drawingBufferWidth The width of the drawing buffer.
* @param {number} drawingBufferHeight The height of the drawing buffer.
* @param {number} distance The distance to the near plane in meters.
* @param {number} pixelRatio The scaling factor from pixel space to coordinate space.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new instance of {@link Cartesian2} with the pixel's width and height in the x and y properties, respectively.
- *
- * @exception {DeveloperError} drawingBufferWidth must be greater than zero.
- * @exception {DeveloperError} drawingBufferHeight must be greater than zero.
- * @exception {DeveloperError} pixelRatio must be greater than zero.
- *
+ * @throws {DeveloperError} drawingBufferWidth must be greater than zero.
+ * @throws {DeveloperError} drawingBufferHeight must be greater than zero.
+ * @throws {DeveloperError} pixelRatio must be greater than zero.
* @example
* // Example 1
* // Get the width and height of a pixel.
* const pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 1.0, scene.pixelRatio, new Cesium.Cartesian2());
- *
* @example
* // Example 2
* // Get the width and height of a pixel if the near plane was set to 'distance'.
@@ -416,7 +404,6 @@ PerspectiveOffCenterFrustum.prototype.getPixelDimensions = function (
/**
* Returns a duplicate of a PerspectiveOffCenterFrustum instance.
- *
* @param {PerspectiveOffCenterFrustum} [result] The object onto which to store the result.
* @returns {PerspectiveOffCenterFrustum} The modified result parameter or a new PerspectiveFrustum instance if one was not provided.
*/
@@ -446,7 +433,6 @@ PerspectiveOffCenterFrustum.prototype.clone = function (result) {
/**
* Compares the provided PerspectiveOffCenterFrustum componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {PerspectiveOffCenterFrustum} [other] The right hand side PerspectiveOffCenterFrustum.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -467,10 +453,9 @@ PerspectiveOffCenterFrustum.prototype.equals = function (other) {
* Compares the provided PerspectiveOffCenterFrustum componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
- *
* @param {PerspectiveOffCenterFrustum} other The right hand side PerspectiveOffCenterFrustum.
* @param {number} relativeEpsilon The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if this and other are within the provided epsilon, false
otherwise.
*/
PerspectiveOffCenterFrustum.prototype.equalsEpsilon = function (
diff --git a/packages/engine/Source/Core/PinBuilder.js b/packages/engine/Source/Core/PinBuilder.js
index 143477b41c9d..56cd4b554faf 100644
--- a/packages/engine/Source/Core/PinBuilder.js
+++ b/packages/engine/Source/Core/PinBuilder.js
@@ -12,10 +12,8 @@ import writeTextToCanvas from "./writeTextToCanvas.js";
*
* Example pins generated using both the maki icon set, which ships with Cesium, and single character text.
*
- *
* @alias PinBuilder
- * @constructor
- *
+ * @class
* @demo {@link https://sandcastle.cesium.com/index.html?src=Map%20Pins.html|Cesium Sandcastle PinBuilder Demo}
*/
function PinBuilder() {
@@ -24,7 +22,6 @@ function PinBuilder() {
/**
* Creates an empty pin of the specified color and size.
- *
* @param {Color} color The color of the pin.
* @param {number} size The size of the pin, in pixels.
* @returns {HTMLCanvasElement} The canvas element that represents the generated pin.
@@ -43,7 +40,6 @@ PinBuilder.prototype.fromColor = function (color, size) {
/**
* Creates a pin with the specified icon, color, and size.
- *
* @param {Resource|string} url The url of the image to be stamped onto the pin.
* @param {Color} color The color of the pin.
* @param {number} size The size of the pin, in pixels.
@@ -66,7 +62,6 @@ PinBuilder.prototype.fromUrl = function (url, color, size) {
/**
* Creates a pin with the specified {@link https://www.mapbox.com/maki/|maki} icon identifier, color, and size.
- *
* @param {string} id The id of the maki icon to be stamped onto the pin.
* @param {Color} color The color of the pin.
* @param {number} size The size of the pin, in pixels.
@@ -96,7 +91,6 @@ PinBuilder.prototype.fromMakiIconId = function (id, color, size) {
/**
* Creates a pin with the specified text, color, and size. The text will be sized to be as large as possible
* while still being contained completely within the pin.
- *
* @param {string} text The text to be stamped onto the pin.
* @param {Color} color The color of the pin.
* @param {number} size The size of the pin, in pixels.
diff --git a/packages/engine/Source/Core/PixelFormat.js b/packages/engine/Source/Core/PixelFormat.js
index 6f7061252aa7..9e849149a2e5 100644
--- a/packages/engine/Source/Core/PixelFormat.js
+++ b/packages/engine/Source/Core/PixelFormat.js
@@ -3,13 +3,11 @@ import WebGLConstants from "./WebGLConstants.js";
/**
* The format of a pixel, i.e., the number of components it has and what they represent.
- *
* @enum {number}
*/
const PixelFormat = {
/**
* A pixel format containing a depth value.
- *
* @type {number}
* @constant
*/
@@ -17,7 +15,6 @@ const PixelFormat = {
/**
* A pixel format containing a depth and stencil value, most often used with {@link PixelDatatype.UNSIGNED_INT_24_8}.
- *
* @type {number}
* @constant
*/
@@ -25,7 +22,6 @@ const PixelFormat = {
/**
* A pixel format containing an alpha channel.
- *
* @type {number}
* @constant
*/
@@ -33,7 +29,6 @@ const PixelFormat = {
/**
* A pixel format containing a red channel
- *
* @type {number}
* @constant
*/
@@ -41,7 +36,6 @@ const PixelFormat = {
/**
* A pixel format containing red and green channels.
- *
* @type {number}
* @constant
*/
@@ -49,7 +43,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, and blue channels.
- *
* @type {number}
* @constant
*/
@@ -57,7 +50,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels.
- *
* @type {number}
* @constant
*/
@@ -65,7 +57,6 @@ const PixelFormat = {
/**
* A pixel format containing a luminance (intensity) channel.
- *
* @type {number}
* @constant
*/
@@ -73,7 +64,6 @@ const PixelFormat = {
/**
* A pixel format containing luminance (intensity) and alpha channels.
- *
* @type {number}
* @constant
*/
@@ -81,7 +71,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, and blue channels that is DXT1 compressed.
- *
* @type {number}
* @constant
*/
@@ -89,7 +78,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is DXT1 compressed.
- *
* @type {number}
* @constant
*/
@@ -97,7 +85,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is DXT3 compressed.
- *
* @type {number}
* @constant
*/
@@ -105,7 +92,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is DXT5 compressed.
- *
* @type {number}
* @constant
*/
@@ -113,7 +99,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, and blue channels that is PVR 4bpp compressed.
- *
* @type {number}
* @constant
*/
@@ -121,7 +106,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, and blue channels that is PVR 2bpp compressed.
- *
* @type {number}
* @constant
*/
@@ -129,7 +113,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is PVR 4bpp compressed.
- *
* @type {number}
* @constant
*/
@@ -137,7 +120,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is PVR 2bpp compressed.
- *
* @type {number}
* @constant
*/
@@ -145,7 +127,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is ASTC compressed.
- *
* @type {number}
* @constant
*/
@@ -153,7 +134,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, and blue channels that is ETC1 compressed.
- *
* @type {number}
* @constant
*/
@@ -161,7 +141,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, and blue channels that is ETC2 compressed.
- *
* @type {number}
* @constant
*/
@@ -169,7 +148,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is ETC2 compressed.
- *
* @type {number}
* @constant
*/
@@ -177,7 +155,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is BC7 compressed.
- *
* @type {number}
* @constant
*/
@@ -185,6 +162,7 @@ const PixelFormat = {
};
/**
+ * @param pixelFormat
* @private
*/
PixelFormat.componentsLength = function (pixelFormat) {
@@ -206,6 +184,7 @@ PixelFormat.componentsLength = function (pixelFormat) {
};
/**
+ * @param pixelFormat
* @private
*/
PixelFormat.validate = function (pixelFormat) {
@@ -236,6 +215,7 @@ PixelFormat.validate = function (pixelFormat) {
};
/**
+ * @param pixelFormat
* @private
*/
PixelFormat.isColorFormat = function (pixelFormat) {
@@ -250,6 +230,7 @@ PixelFormat.isColorFormat = function (pixelFormat) {
};
/**
+ * @param pixelFormat
* @private
*/
PixelFormat.isDepthFormat = function (pixelFormat) {
@@ -260,6 +241,7 @@ PixelFormat.isDepthFormat = function (pixelFormat) {
};
/**
+ * @param pixelFormat
* @private
*/
PixelFormat.isCompressedFormat = function (pixelFormat) {
@@ -281,6 +263,7 @@ PixelFormat.isCompressedFormat = function (pixelFormat) {
};
/**
+ * @param pixelFormat
* @private
*/
PixelFormat.isDXTFormat = function (pixelFormat) {
@@ -293,6 +276,7 @@ PixelFormat.isDXTFormat = function (pixelFormat) {
};
/**
+ * @param pixelFormat
* @private
*/
PixelFormat.isPVRTCFormat = function (pixelFormat) {
@@ -305,6 +289,7 @@ PixelFormat.isPVRTCFormat = function (pixelFormat) {
};
/**
+ * @param pixelFormat
* @private
*/
PixelFormat.isASTCFormat = function (pixelFormat) {
@@ -312,6 +297,7 @@ PixelFormat.isASTCFormat = function (pixelFormat) {
};
/**
+ * @param pixelFormat
* @private
*/
PixelFormat.isETC1Format = function (pixelFormat) {
@@ -319,6 +305,7 @@ PixelFormat.isETC1Format = function (pixelFormat) {
};
/**
+ * @param pixelFormat
* @private
*/
PixelFormat.isETC2Format = function (pixelFormat) {
@@ -329,6 +316,7 @@ PixelFormat.isETC2Format = function (pixelFormat) {
};
/**
+ * @param pixelFormat
* @private
*/
PixelFormat.isBC7Format = function (pixelFormat) {
@@ -336,6 +324,9 @@ PixelFormat.isBC7Format = function (pixelFormat) {
};
/**
+ * @param pixelFormat
+ * @param width
+ * @param height
* @private
*/
PixelFormat.compressedTextureSizeInBytes = function (
@@ -375,6 +366,10 @@ PixelFormat.compressedTextureSizeInBytes = function (
};
/**
+ * @param pixelFormat
+ * @param pixelDatatype
+ * @param width
+ * @param height
* @private
*/
PixelFormat.textureSizeInBytes = function (
@@ -393,6 +388,9 @@ PixelFormat.textureSizeInBytes = function (
};
/**
+ * @param pixelFormat
+ * @param pixelDatatype
+ * @param width
* @private
*/
PixelFormat.alignmentInBytes = function (pixelFormat, pixelDatatype, width) {
@@ -405,8 +403,8 @@ PixelFormat.alignmentInBytes = function (pixelFormat, pixelDatatype, width) {
* @private
* @param {PixelFormat} pixelFormat The pixel format.
* @param {PixelDatatype} pixelDatatype The pixel datatype.
- * @param {Number} width The width of the texture.
- * @param {Number} height The height of the texture.
+ * @param {number} width The width of the texture.
+ * @param {number} height The height of the texture.
* @returns {TypedArray} The typed array.
*/
PixelFormat.createTypedArray = function (
@@ -435,6 +433,11 @@ PixelFormat.createTypedArray = function (
};
/**
+ * @param bufferView
+ * @param pixelFormat
+ * @param pixelDatatype
+ * @param width
+ * @param height
* @private
*/
PixelFormat.flipY = function (
@@ -466,6 +469,9 @@ PixelFormat.flipY = function (
};
/**
+ * @param pixelFormat
+ * @param pixelDatatype
+ * @param context
* @private
*/
PixelFormat.toInternalFormat = function (pixelFormat, pixelDatatype, context) {
diff --git a/packages/engine/Source/Core/Plane.js b/packages/engine/Source/Core/Plane.js
index ab9ee77567c9..39397903b8fb 100644
--- a/packages/engine/Source/Core/Plane.js
+++ b/packages/engine/Source/Core/Plane.js
@@ -14,22 +14,18 @@ import Matrix4 from "./Matrix4.js";
* where (a, b, c) is the plane's normal
, d is the signed
* distance
to the plane, and (x, y, z) is any point on
* the plane.
- *
* @alias Plane
- * @constructor
- *
+ * @class
* @param {Cartesian3} normal The plane's normal (normalized).
* @param {number} distance The shortest distance from the origin to the plane. The sign of
* distance
determines which side of the plane the origin
* is on. If distance
is positive, the origin is in the half-space
* in the direction of the normal; if negative, the origin is in the half-space
* opposite to the normal; if zero, the plane passes through the origin.
- *
* @example
* // The plane x=0
* const plane = new Cesium.Plane(Cesium.Cartesian3.UNIT_X, 0.0);
- *
- * @exception {DeveloperError} Normal must be normalized
+ * @throws {DeveloperError} Normal must be normalized
*/
function Plane(normal, distance) {
//>>includeStart('debug', pragmas.debug);
@@ -48,7 +44,6 @@ function Plane(normal, distance) {
/**
* The plane's normal.
- *
* @type {Cartesian3}
*/
this.normal = Cartesian3.clone(normal);
@@ -59,7 +54,6 @@ function Plane(normal, distance) {
* is on. If distance
is positive, the origin is in the half-space
* in the direction of the normal; if negative, the origin is in the half-space
* opposite to the normal; if zero, the plane passes through the origin.
- *
* @type {number}
*/
this.distance = distance;
@@ -67,18 +61,15 @@ function Plane(normal, distance) {
/**
* Creates a plane from a normal and a point on the plane.
- *
* @param {Cartesian3} point The point on the plane.
* @param {Cartesian3} normal The plane's normal (normalized).
* @param {Plane} [result] The object onto which to store the result.
* @returns {Plane} A new plane instance or the modified result parameter.
- *
* @example
* const point = Cesium.Cartesian3.fromDegrees(-72.0, 40.0);
* const normal = ellipsoid.geodeticSurfaceNormal(point);
* const tangentPlane = Cesium.Plane.fromPointNormal(point, normal);
- *
- * @exception {DeveloperError} Normal must be normalized
+ * @throws {DeveloperError} Normal must be normalized
*/
Plane.fromPointNormal = function (point, normal, result) {
//>>includeStart('debug', pragmas.debug);
@@ -109,12 +100,10 @@ Plane.fromPointNormal = function (point, normal, result) {
const scratchNormal = new Cartesian3();
/**
* Creates a plane from the general equation
- *
* @param {Cartesian4} coefficients The plane's normal (normalized).
* @param {Plane} [result] The object onto which to store the result.
* @returns {Plane} A new plane instance or the modified result parameter.
- *
- * @exception {DeveloperError} Normal must be normalized
+ * @throws {DeveloperError} Normal must be normalized
*/
Plane.fromCartesian4 = function (coefficients, result) {
//>>includeStart('debug', pragmas.debug);
@@ -150,7 +139,6 @@ Plane.fromCartesian4 = function (coefficients, result) {
* is on. If the distance is positive, the point is in the half-space
* in the direction of the normal; if negative, the point is in the half-space
* opposite to the normal; if zero, the plane passes through the point.
- *
* @param {Plane} plane The plane.
* @param {Cartesian3} point The point.
* @returns {number} The signed shortest distance of the point to the plane.
@@ -198,7 +186,6 @@ const scratchPlaneCartesian4 = new Cartesian4();
const scratchTransformNormal = new Cartesian3();
/**
* Transforms the plane by the given transformation matrix.
- *
* @param {Plane} plane The plane.
* @param {Matrix4} transform The transformation matrix.
* @param {Plane} [result] The object into which to store the result.
@@ -246,7 +233,6 @@ Plane.transform = function (plane, transform, result) {
/**
* Duplicates a Plane instance.
- *
* @param {Plane} plane The plane to duplicate.
* @param {Plane} [result] The object onto which to store the result.
* @returns {Plane} The modified result parameter or a new Plane instance if one was not provided.
@@ -269,7 +255,6 @@ Plane.clone = function (plane, result) {
/**
* Compares the provided Planes by normal and distance and returns
* true
if they are equal, false
otherwise.
- *
* @param {Plane} left The first plane.
* @param {Plane} right The second plane.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -288,7 +273,6 @@ Plane.equals = function (left, right) {
/**
* A constant initialized to the XY plane passing through the origin, with normal in positive Z.
- *
* @type {Plane}
* @constant
*/
@@ -296,7 +280,6 @@ Plane.ORIGIN_XY_PLANE = Object.freeze(new Plane(Cartesian3.UNIT_Z, 0.0));
/**
* A constant initialized to the YZ plane passing through the origin, with normal in positive X.
- *
* @type {Plane}
* @constant
*/
@@ -304,7 +287,6 @@ Plane.ORIGIN_YZ_PLANE = Object.freeze(new Plane(Cartesian3.UNIT_X, 0.0));
/**
* A constant initialized to the ZX plane passing through the origin, with normal in positive Y.
- *
* @type {Plane}
* @constant
*/
diff --git a/packages/engine/Source/Core/PlaneGeometry.js b/packages/engine/Source/Core/PlaneGeometry.js
index 8bc861fd149f..6d21a0962bce 100644
--- a/packages/engine/Source/Core/PlaneGeometry.js
+++ b/packages/engine/Source/Core/PlaneGeometry.js
@@ -12,13 +12,10 @@ import VertexFormat from "./VertexFormat.js";
/**
* Describes geometry representing a plane centered at the origin, with a unit width and length.
- *
* @alias PlaneGeometry
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- *
+ * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
* @example
* const planeGeometry = new Cesium.PlaneGeometry({
* vertexFormat : Cesium.VertexFormat.POSITION_ONLY
@@ -41,11 +38,9 @@ PlaneGeometry.packedLength = VertexFormat.packedLength;
/**
* Stores the provided instance into the provided array.
- *
* @param {PlaneGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
PlaneGeometry.pack = function (value, array, startingIndex) {
@@ -68,9 +63,8 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {PlaneGeometry} [result] The object into which to store the result.
* @returns {PlaneGeometry} The modified result parameter or a new PlaneGeometry instance if one was not provided.
*/
@@ -101,7 +95,6 @@ const max = new Cartesian3(0.5, 0.5, 0.0);
/**
* Computes the geometric representation of a plane, including its vertices, indices, and a bounding sphere.
- *
* @param {PlaneGeometry} planeGeometry A description of the plane.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/PlaneOutlineGeometry.js b/packages/engine/Source/Core/PlaneOutlineGeometry.js
index e116db3d6fe2..d2d1d81a1b85 100644
--- a/packages/engine/Source/Core/PlaneOutlineGeometry.js
+++ b/packages/engine/Source/Core/PlaneOutlineGeometry.js
@@ -10,10 +10,8 @@ import PrimitiveType from "./PrimitiveType.js";
/**
* Describes geometry representing the outline of a plane centered at the origin, with a unit width and length.
- *
* @alias PlaneOutlineGeometry
- * @constructor
- *
+ * @class
*/
function PlaneOutlineGeometry() {
this._workerName = "createPlaneOutlineGeometry";
@@ -27,10 +25,8 @@ PlaneOutlineGeometry.packedLength = 0;
/**
* Stores the provided instance into the provided array.
- *
* @param {PlaneOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- *
* @returns {number[]} The array that was packed into
*/
PlaneOutlineGeometry.pack = function (value, array) {
@@ -44,9 +40,8 @@ PlaneOutlineGeometry.pack = function (value, array) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {PlaneOutlineGeometry} [result] The object into which to store the result.
* @returns {PlaneOutlineGeometry} The modified result parameter or a new PlaneOutlineGeometry instance if one was not provided.
*/
@@ -67,7 +62,6 @@ const max = new Cartesian3(0.5, 0.5, 0.0);
/**
* Computes the geometric representation of an outline of a plane, including its vertices, indices, and a bounding sphere.
- *
* @returns {Geometry|undefined} The computed vertices and indices.
*/
PlaneOutlineGeometry.createGeometry = function () {
diff --git a/packages/engine/Source/Core/PolygonGeometry.js b/packages/engine/Source/Core/PolygonGeometry.js
index 6e8e9988dead..b7dd6d59b48f 100644
--- a/packages/engine/Source/Core/PolygonGeometry.js
+++ b/packages/engine/Source/Core/PolygonGeometry.js
@@ -575,21 +575,19 @@ function createGeometryFromPositionsExtruded(
/**
* A description of a polygon on the ellipsoid. The polygon is defined by a polygon hierarchy. Polygon geometry can be rendered with both {@link Primitive} and {@link GroundPrimitive}.
- *
* @alias PolygonGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {PolygonHierarchy} options.polygonHierarchy A polygon hierarchy that can include holes.
- * @param {number} [options.height=0.0] The distance in meters between the polygon and the ellipsoid surface.
+ * @param {number} [options.height] The distance in meters between the polygon and the ellipsoid surface.
* @param {number} [options.extrudedHeight] The distance in meters between the polygon's extruded face and the ellipsoid surface.
- * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- * @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
- * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {boolean} [options.perPositionHeight=false] Use the height of options.positions for each position instead of using options.height to determine the height.
- * @param {boolean} [options.closeTop=true] When false, leaves off the top of an extruded polygon open.
- * @param {boolean} [options.closeBottom=true] When false, leaves off the bottom of an extruded polygon open.
+ * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
+ * @param {number} [options.stRotation] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
+ * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {boolean} [options.perPositionHeight] Use the height of options.positions for each position instead of using options.height to determine the height.
+ * @param {boolean} [options.closeTop] When false, leaves off the top of an extruded polygon open.
+ * @param {boolean} [options.closeBottom] When false, leaves off the bottom of an extruded polygon open.
* @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polygon edges must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
* @param {PolygonHierarchy} [options.textureCoordinates] Texture coordinates as a {@link PolygonHierarchy} of {@link Cartesian2} points. Has no effect for ground primitives.
*
@@ -752,22 +750,20 @@ function PolygonGeometry(options) {
/**
* A description of a polygon from an array of positions. Polygon geometry can be rendered with both {@link Primitive} and {@link GroundPrimitive}.
- *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of positions that defined the corner points of the polygon.
- * @param {number} [options.height=0.0] The height of the polygon.
+ * @param {number} [options.height] The height of the polygon.
* @param {number} [options.extrudedHeight] The height of the polygon extrusion.
- * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- * @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
- * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {boolean} [options.perPositionHeight=false] Use the height of options.positions for each position instead of using options.height to determine the height.
- * @param {boolean} [options.closeTop=true] When false, leaves off the top of an extruded polygon open.
- * @param {boolean} [options.closeBottom=true] When false, leaves off the bottom of an extruded polygon open.
- * @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polygon edges must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
+ * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
+ * @param {number} [options.stRotation] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
+ * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {boolean} [options.perPositionHeight] Use the height of options.positions for each position instead of using options.height to determine the height.
+ * @param {boolean} [options.closeTop] When false, leaves off the top of an extruded polygon open.
+ * @param {boolean} [options.closeBottom] When false, leaves off the bottom of an extruded polygon open.
+ * @param {ArcType} [options.arcType] The type of line the polygon edges must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
* @param {PolygonHierarchy} [options.textureCoordinates] Texture coordinates as a {@link PolygonHierarchy} of {@link Cartesian2} points. Has no effect for ground primitives.
* @returns {PolygonGeometry}
- *
* @example
* // create a polygon from points
* const polygon = Cesium.PolygonGeometry.fromPositions({
@@ -812,11 +808,9 @@ PolygonGeometry.fromPositions = function (options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {PolygonGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
PolygonGeometry.pack = function (value, array, startingIndex) {
@@ -875,9 +869,8 @@ const dummyOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {PolygonGeometry} [result] The object into which to store the result.
*/
PolygonGeometry.unpack = function (array, startingIndex, result) {
@@ -1038,12 +1031,10 @@ const polygon = {
/**
* Computes a rectangle which encloses the polygon defined by the list of positions, including cases over the international date line and the poles.
- *
* @param {Cartesian3[]} positions A linear ring defining the outer boundary of the polygon.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
- * @param {ArcType} [arcType=ArcType.GEODESIC] The type of line the polygon edges must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid to be used as a reference.
+ * @param {ArcType} [arcType] The type of line the polygon edges must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
* @param {Rectangle} [result] An object in which to store the result.
- *
* @returns {Rectangle} The result rectangle
*/
PolygonGeometry.computeRectangleFromPositions = function (
@@ -1271,7 +1262,6 @@ function computeBoundingRectangle(outerRing, rectangle, ellipsoid, stRotation) {
/**
* Computes the geometric representation of a polygon, including its vertices, indices, and a bounding sphere.
- *
* @param {PolygonGeometry} polygonGeometry A description of the polygon.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
@@ -1502,6 +1492,9 @@ PolygonGeometry.createGeometry = function (polygonGeometry) {
};
/**
+ * @param polygonGeometry
+ * @param minHeightFunc
+ * @param maxHeightFunc
* @private
*/
PolygonGeometry.createShadowVolume = function (
diff --git a/packages/engine/Source/Core/PolygonGeometryLibrary.js b/packages/engine/Source/Core/PolygonGeometryLibrary.js
index 2381d80d4e73..287d1f72b25a 100644
--- a/packages/engine/Source/Core/PolygonGeometryLibrary.js
+++ b/packages/engine/Source/Core/PolygonGeometryLibrary.js
@@ -190,14 +190,12 @@ PolygonGeometryLibrary.subdivideRhumbLineCount = function (
/**
* Subdivides texture coordinates based on the subdivision of the associated world positions.
- *
* @param {Cartesian2} t0 First texture coordinate.
* @param {Cartesian2} t1 Second texture coordinate.
* @param {Cartesian3} p0 First world position.
* @param {Cartesian3} p1 Second world position.
* @param {number} minDistance Minimum distance for a segment.
* @param {Cartesian2[]} result The subdivided texture coordinates.
- *
* @private
*/
PolygonGeometryLibrary.subdivideTexcoordLine = function (
@@ -263,7 +261,6 @@ PolygonGeometryLibrary.subdivideLine = function (p0, p1, minDistance, result) {
/**
* Subdivides texture coordinates based on the subdivision of the associated world positions using a rhumb line.
- *
* @param {Cartesian2} t0 First texture coordinate.
* @param {Cartesian2} t1 Second texture coordinate.
* @param {Ellipsoid} ellipsoid The ellipsoid.
@@ -271,7 +268,6 @@ PolygonGeometryLibrary.subdivideLine = function (p0, p1, minDistance, result) {
* @param {Cartesian3} p1 Second world position.
* @param {number} minDistance Minimum distance for a segment.
* @param {Cartesian2[]} result The subdivided texture coordinates.
- *
* @private
*/
PolygonGeometryLibrary.subdivideTexcoordRhumbLine = function (
@@ -687,12 +683,10 @@ function wirePolygon(
/**
* Splits an array of polygons, defined as a list of Cartesian3 positions in counter-clockwise winding order, along the equator.
- *
* @param {Array} outerRings An array of polygons, defined as a list of Cartesian3 positions in counter-clockwise winding order.
* @param {Ellipsoid} ellipsoid The ellipsoid to be used as a reference.
* @param {ArcType} arcType The type of line the polygon edges must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
* @param {Array} [result] An array of split polygons.
- *
* @returns {Array} An array of split polygons.
*/
PolygonGeometryLibrary.splitPolygonsOnEquator = function (
diff --git a/packages/engine/Source/Core/PolygonHierarchy.js b/packages/engine/Source/Core/PolygonHierarchy.js
index a1751f6f7284..92aff2c5f4c3 100644
--- a/packages/engine/Source/Core/PolygonHierarchy.js
+++ b/packages/engine/Source/Core/PolygonHierarchy.js
@@ -4,8 +4,7 @@ import defined from "./defined.js";
* An hierarchy of linear rings which define a polygon and its holes.
* The holes themselves may also have holes which nest inner polygons.
* @alias PolygonHierarchy
- * @constructor
- *
+ * @class
* @param {Cartesian3[]} [positions] A linear ring defining the outer boundary of the polygon or hole.
* @param {PolygonHierarchy[]} [holes] An array of polygon hierarchies defining holes in the polygon.
*/
diff --git a/packages/engine/Source/Core/PolygonOutlineGeometry.js b/packages/engine/Source/Core/PolygonOutlineGeometry.js
index 14c235d55c48..a236749970ef 100644
--- a/packages/engine/Source/Core/PolygonOutlineGeometry.js
+++ b/packages/engine/Source/Core/PolygonOutlineGeometry.js
@@ -264,23 +264,19 @@ function createGeometryFromPositionsExtruded(
/**
* A description of the outline of a polygon on the ellipsoid. The polygon is defined by a polygon hierarchy.
- *
* @alias PolygonOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {PolygonHierarchy} options.polygonHierarchy A polygon hierarchy that can include holes.
- * @param {number} [options.height=0.0] The distance in meters between the polygon and the ellipsoid surface.
+ * @param {number} [options.height] The distance in meters between the polygon and the ellipsoid surface.
* @param {number} [options.extrudedHeight] The distance in meters between the polygon's extruded face and the ellipsoid surface.
- * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
- * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {boolean} [options.perPositionHeight=false] Use the height of options.positions for each position instead of using options.height to determine the height.
- * @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of path the outline must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
- *
+ * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
+ * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {boolean} [options.perPositionHeight] Use the height of options.positions for each position instead of using options.height to determine the height.
+ * @param {ArcType} [options.arcType] The type of path the outline must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
* @see PolygonOutlineGeometry#createGeometry
* @see PolygonOutlineGeometry#fromPositions
- *
* @example
* // 1. create a polygon outline from points
* const polygon = new Cesium.PolygonOutlineGeometry({
@@ -415,11 +411,9 @@ function PolygonOutlineGeometry(options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {PolygonOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
PolygonOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -459,9 +453,8 @@ const dummyOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {PolygonOutlineGeometry} [result] The object into which to store the result.
* @returns {PolygonOutlineGeometry} The modified result parameter or a new PolygonOutlineGeometry instance if one was not provided.
*/
@@ -513,18 +506,15 @@ PolygonOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* A description of a polygon outline from an array of positions.
- *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of positions that defined the corner points of the polygon.
- * @param {number} [options.height=0.0] The height of the polygon.
+ * @param {number} [options.height] The height of the polygon.
* @param {number} [options.extrudedHeight] The height of the polygon extrusion.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
- * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {boolean} [options.perPositionHeight=false] Use the height of options.positions for each position instead of using options.height to determine the height.
- * @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of path the outline must follow. Valid options are {@link LinkType.GEODESIC} and {@link ArcType.RHUMB}.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
+ * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {boolean} [options.perPositionHeight] Use the height of options.positions for each position instead of using options.height to determine the height.
+ * @param {ArcType} [options.arcType] The type of path the outline must follow. Valid options are {@link LinkType.GEODESIC} and {@link ArcType.RHUMB}.
* @returns {PolygonOutlineGeometry}
- *
- *
* @example
* // create a polygon from points
* const polygon = Cesium.PolygonOutlineGeometry.fromPositions({
@@ -537,7 +527,6 @@ PolygonOutlineGeometry.unpack = function (array, startingIndex, result) {
* ])
* });
* const geometry = Cesium.PolygonOutlineGeometry.createGeometry(polygon);
- *
* @see PolygonOutlineGeometry#createGeometry
*/
PolygonOutlineGeometry.fromPositions = function (options) {
@@ -564,7 +553,6 @@ PolygonOutlineGeometry.fromPositions = function (options) {
/**
* Computes the geometric representation of a polygon outline, including its vertices, indices, and a bounding sphere.
- *
* @param {PolygonOutlineGeometry} polygonGeometry A description of the polygon outline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/PolygonPipeline.js b/packages/engine/Source/Core/PolygonPipeline.js
index 539c656f8d29..4275266fb0bf 100644
--- a/packages/engine/Source/Core/PolygonPipeline.js
+++ b/packages/engine/Source/Core/PolygonPipeline.js
@@ -23,7 +23,8 @@ const scaleToGeodeticHeightP = new Cartesian3();
const PolygonPipeline = {};
/**
- * @exception {DeveloperError} At least three positions are required.
+ * @param positions
+ * @throws {DeveloperError} At least three positions are required.
*/
PolygonPipeline.computeArea2D = function (positions) {
//>>includeStart('debug', pragmas.debug);
@@ -49,9 +50,9 @@ PolygonPipeline.computeArea2D = function (positions) {
};
/**
+ * @param positions
* @returns {WindingOrder} The winding order.
- *
- * @exception {DeveloperError} At least three positions are required.
+ * @throws {DeveloperError} At least three positions are required.
*/
PolygonPipeline.computeWindingOrder2D = function (positions) {
const area = PolygonPipeline.computeArea2D(positions);
@@ -60,7 +61,6 @@ PolygonPipeline.computeWindingOrder2D = function (positions) {
/**
* Triangulate a polygon.
- *
* @param {Cartesian2[]} positions Cartesian2 array containing the vertices of the polygon
* @param {number[]} [holes] An array of the staring indices of the holes.
* @returns {number[]} Index array representing triangles that fill the polygon
@@ -88,16 +88,14 @@ const subdivisionTexcoordMidScratch = new Cartesian2();
/**
* Subdivides positions and raises points to the surface of the ellipsoid.
- *
* @param {Ellipsoid} ellipsoid The ellipsoid the polygon in on.
* @param {Cartesian3[]} positions An array of {@link Cartesian3} positions of the polygon.
* @param {number[]} indices An array of indices that determines the triangles in the polygon.
* @param {Cartesian2[]} texcoords An optional array of {@link Cartesian2} texture coordinates of the polygon.
- * @param {number} [granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- *
- * @exception {DeveloperError} At least three indices are required.
- * @exception {DeveloperError} The number of indices must be divisable by three.
- * @exception {DeveloperError} Granularity must be greater than zero.
+ * @param {number} [granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @throws {DeveloperError} At least three indices are required.
+ * @throws {DeveloperError} The number of indices must be divisable by three.
+ * @throws {DeveloperError} Granularity must be greater than zero.
*/
PolygonPipeline.computeSubdivision = function (
ellipsoid,
@@ -323,16 +321,14 @@ const subdivisionCartographicScratch = new Cartographic();
/**
* Subdivides positions on rhumb lines and raises points to the surface of the ellipsoid.
- *
* @param {Ellipsoid} ellipsoid The ellipsoid the polygon in on.
* @param {Cartesian3[]} positions An array of {@link Cartesian3} positions of the polygon.
* @param {number[]} indices An array of indices that determines the triangles in the polygon.
* @param {Cartesian2[]} texcoords An optional array of {@link Cartesian2} texture coordinates of the polygon.
- * @param {number} [granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- *
- * @exception {DeveloperError} At least three indices are required.
- * @exception {DeveloperError} The number of indices must be divisable by three.
- * @exception {DeveloperError} Granularity must be greater than zero.
+ * @param {number} [granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @throws {DeveloperError} At least three indices are required.
+ * @throws {DeveloperError} The number of indices must be divisable by three.
+ * @throws {DeveloperError} Granularity must be greater than zero.
*/
PolygonPipeline.computeRhumbLineSubdivision = function (
ellipsoid,
@@ -584,11 +580,10 @@ PolygonPipeline.computeRhumbLineSubdivision = function (
/**
* Scales each position of a geometry's position attribute to a height, in place.
- *
* @param {number[]} positions The array of numbers representing the positions to be scaled
- * @param {number} [height=0.0] The desired height to add to the positions
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
- * @param {boolean} [scaleToSurface=true] true
if the positions need to be scaled to the surface before the height is added.
+ * @param {number} [height] The desired height to add to the positions
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the positions lie.
+ * @param {boolean} [scaleToSurface] true
if the positions need to be scaled to the surface before the height is added.
* @returns {number[]} The input array of positions, scaled to height
*/
PolygonPipeline.scaleToGeodeticHeight = function (
diff --git a/packages/engine/Source/Core/PolylineGeometry.js b/packages/engine/Source/Core/PolylineGeometry.js
index a5f50ef1680a..8add1544210f 100644
--- a/packages/engine/Source/Core/PolylineGeometry.js
+++ b/packages/engine/Source/Core/PolylineGeometry.js
@@ -63,21 +63,18 @@ function interpolateColors(p0, p1, color0, color1, numPoints) {
* A description of a polyline modeled as a line strip; the first two positions define a line segment,
* and each additional position defines a line segment from the previous position. The polyline is capable of
* displaying with a material.
- *
* @alias PolylineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of {@link Cartesian3} defining the positions in the polyline as a line strip.
- * @param {number} [options.width=1.0] The width in pixels.
+ * @param {number} [options.width] The width in pixels.
* @param {Color[]} [options.colors] An Array of {@link Color} defining the per vertex or per segment colors.
- * @param {boolean} [options.colorsPerVertex=false] A boolean that determines whether the colors will be flat across each segment of the line or interpolated across the vertices.
- * @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polyline segments must follow.
- * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude if options.arcType is not ArcType.NONE. Determines the number of positions in the buffer.
- * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
- *
- * @exception {DeveloperError} At least two positions are required.
+ * @param {boolean} [options.colorsPerVertex] A boolean that determines whether the colors will be flat across each segment of the line or interpolated across the vertices.
+ * @param {ArcType} [options.arcType] The type of line the polyline segments must follow.
+ * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude if options.arcType is not ArcType.NONE. Determines the number of positions in the buffer.
+ * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
+ * @throws {DeveloperError} At least two positions are required.
* @exception {DeveloperError} width must be greater than or equal to one.
* @exception {DeveloperError} colors has an invalid length.
*
@@ -151,11 +148,9 @@ function PolylineGeometry(options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {PolylineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
PolylineGeometry.pack = function (value, array, startingIndex) {
@@ -217,9 +212,8 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {PolylineGeometry} [result] The object into which to store the result.
* @returns {PolylineGeometry} The modified result parameter or a new PolylineGeometry instance if one was not provided.
*/
@@ -292,7 +286,6 @@ const scratchNextPosition = new Cartesian3();
/**
* Computes the geometric representation of a polyline, including its vertices, indices, and a bounding sphere.
- *
* @param {PolylineGeometry} polylineGeometry A description of the polyline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/PolylinePipeline.js b/packages/engine/Source/Core/PolylinePipeline.js
index dccbae1ec08f..5c7338f3f7f0 100644
--- a/packages/engine/Source/Core/PolylinePipeline.js
+++ b/packages/engine/Source/Core/PolylinePipeline.js
@@ -182,23 +182,19 @@ function generateCartesianRhumbArc(
/**
* Breaks a {@link Polyline} into segments such that it does not cross the ±180 degree meridian of an ellipsoid.
- *
* @param {Cartesian3[]} positions The polyline's Cartesian positions.
- * @param {Matrix4} [modelMatrix=Matrix4.IDENTITY] The polyline's model matrix. Assumed to be an affine
+ * @param {Matrix4} [modelMatrix] The polyline's model matrix. Assumed to be an affine
* transformation matrix, where the upper left 3x3 elements are a rotation matrix, and
* the upper three elements in the fourth column are the translation. The bottom row is assumed to be [0, 0, 0, 1].
* The matrix is not verified to be in the proper form.
* @returns {object} An object with a positions
property that is an array of positions and a
* segments
property.
- *
- *
* @example
* const polylines = new Cesium.PolylineCollection();
* const polyline = polylines.add(...);
* const positions = polyline.positions;
* const modelMatrix = polylines.modelMatrix;
* const segments = Cesium.PolylinePipeline.wrapLongitude(positions, modelMatrix);
- *
* @see PolygonPipeline.wrapLongitude
* @see Polyline
* @see PolylineCollection
@@ -309,11 +305,10 @@ PolylinePipeline.wrapLongitude = function (positions, modelMatrix) {
* Subdivides polyline and raises all points to the specified height. Returns an array of numbers to represent the positions.
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions The array of type {Cartesian3} representing positions.
- * @param {number|number[]} [options.height=0.0] A number or array of numbers representing the heights of each position.
- * @param {number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
+ * @param {number|number[]} [options.height] A number or array of numbers representing the heights of each position.
+ * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid on which the positions lie.
* @returns {number[]} A new array of positions of type {number} that have been subdivided and raised to the surface of the ellipsoid.
- *
* @example
* const positions = Cesium.Cartesian3.fromDegreesArray([
* -105.0, 40.0,
@@ -416,11 +411,10 @@ const scratchCartographic1 = new Cartographic();
* Subdivides polyline and raises all points to the specified height using Rhumb lines. Returns an array of numbers to represent the positions.
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions The array of type {Cartesian3} representing positions.
- * @param {number|number[]} [options.height=0.0] A number or array of numbers representing the heights of each position.
- * @param {number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
+ * @param {number|number[]} [options.height] A number or array of numbers representing the heights of each position.
+ * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid on which the positions lie.
* @returns {number[]} A new array of positions of type {number} that have been subdivided and raised to the surface of the ellipsoid.
- *
* @example
* const positions = Cesium.Cartesian3.fromDegreesArray([
* -105.0, 40.0,
@@ -522,11 +516,10 @@ PolylinePipeline.generateRhumbArc = function (options) {
* Subdivides polyline and raises all points to the specified height. Returns an array of new {Cartesian3} positions.
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions The array of type {Cartesian3} representing positions.
- * @param {number|number[]} [options.height=0.0] A number or array of numbers representing the heights of each position.
- * @param {number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
+ * @param {number|number[]} [options.height] A number or array of numbers representing the heights of each position.
+ * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid on which the positions lie.
* @returns {Cartesian3[]} A new array of cartesian3 positions that have been subdivided and raised to the surface of the ellipsoid.
- *
* @example
* const positions = Cesium.Cartesian3.fromDegreesArray([
* -105.0, 40.0,
@@ -552,11 +545,10 @@ PolylinePipeline.generateCartesianArc = function (options) {
* Subdivides polyline and raises all points to the specified height using Rhumb Lines. Returns an array of new {Cartesian3} positions.
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions The array of type {Cartesian3} representing positions.
- * @param {number|number[]} [options.height=0.0] A number or array of numbers representing the heights of each position.
- * @param {number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
+ * @param {number|number[]} [options.height] A number or array of numbers representing the heights of each position.
+ * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid on which the positions lie.
* @returns {Cartesian3[]} A new array of cartesian3 positions that have been subdivided and raised to the surface of the ellipsoid.
- *
* @example
* const positions = Cesium.Cartesian3.fromDegreesArray([
* -105.0, 40.0,
diff --git a/packages/engine/Source/Core/PolylineVolumeGeometry.js b/packages/engine/Source/Core/PolylineVolumeGeometry.js
index fe5aa704bbfc..94e5cd355736 100644
--- a/packages/engine/Source/Core/PolylineVolumeGeometry.js
+++ b/packages/engine/Source/Core/PolylineVolumeGeometry.js
@@ -171,22 +171,17 @@ function computeAttributes(
/**
* A description of a polyline with a volume (a 2D shape extruded along a polyline).
- *
* @alias PolylineVolumeGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.polylinePositions An array of {@link Cartesian3} positions that define the center of the polyline volume.
* @param {Cartesian2[]} options.shapePositions An array of {@link Cartesian2} positions that define the shape to be extruded along the polyline
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
- * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- * @param {CornerType} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
- *
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
+ * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
+ * @param {CornerType} [options.cornerType] Determines the style of the corners.
* @see PolylineVolumeGeometry#createGeometry
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Polyline%20Volume.html|Cesium Sandcastle Polyline Volume Demo}
- *
* @example
* function computeCircle(radius) {
* const positions = [];
@@ -248,11 +243,9 @@ function PolylineVolumeGeometry(options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {PolylineVolumeGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
PolylineVolumeGeometry.pack = function (value, array, startingIndex) {
@@ -310,9 +303,8 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {PolylineVolumeGeometry} [result] The object into which to store the result.
* @returns {PolylineVolumeGeometry} The modified result parameter or a new PolylineVolumeGeometry instance if one was not provided.
*/
@@ -376,7 +368,6 @@ const brScratch = new BoundingRectangle();
/**
* Computes the geometric representation of a polyline with a volume, including its vertices, indices, and a bounding sphere.
- *
* @param {PolylineVolumeGeometry} polylineVolumeGeometry A description of the polyline volume.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/PolylineVolumeOutlineGeometry.js b/packages/engine/Source/Core/PolylineVolumeOutlineGeometry.js
index facd80c11dfd..e06e8c135126 100644
--- a/packages/engine/Source/Core/PolylineVolumeOutlineGeometry.js
+++ b/packages/engine/Source/Core/PolylineVolumeOutlineGeometry.js
@@ -76,19 +76,15 @@ function computeAttributes(positions, shape) {
/**
* A description of a polyline with a volume (a 2D shape extruded along a polyline).
- *
* @alias PolylineVolumeOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.polylinePositions An array of positions that define the center of the polyline volume.
* @param {Cartesian2[]} options.shapePositions An array of positions that define the shape to be extruded along the polyline
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
- * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {CornerType} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
- *
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
+ * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {CornerType} [options.cornerType] Determines the style of the corners.
* @see PolylineVolumeOutlineGeometry#createGeometry
- *
* @example
* function computeCircle(radius) {
* const positions = [];
@@ -145,11 +141,9 @@ function PolylineVolumeOutlineGeometry(options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {PolylineVolumeOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
PolylineVolumeOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -203,9 +197,8 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {PolylineVolumeOutlineGeometry} [result] The object into which to store the result.
* @returns {PolylineVolumeOutlineGeometry} The modified result parameter or a new PolylineVolumeOutlineGeometry instance if one was not provided.
*/
@@ -261,7 +254,6 @@ const brScratch = new BoundingRectangle();
/**
* Computes the geometric representation of the outline of a polyline with a volume, including its vertices, indices, and a bounding sphere.
- *
* @param {PolylineVolumeOutlineGeometry} polylineVolumeOutlineGeometry A description of the polyline volume outline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/PrimitiveType.js b/packages/engine/Source/Core/PrimitiveType.js
index 9be8354aa0b7..b1e464032a11 100644
--- a/packages/engine/Source/Core/PrimitiveType.js
+++ b/packages/engine/Source/Core/PrimitiveType.js
@@ -2,13 +2,11 @@ import WebGLConstants from "./WebGLConstants.js";
/**
* The type of a geometric primitive, i.e., points, lines, and triangles.
- *
* @enum {number}
*/
const PrimitiveType = {
/**
* Points primitive where each vertex (or index) is a separate point.
- *
* @type {number}
* @constant
*/
@@ -16,7 +14,6 @@ const PrimitiveType = {
/**
* Lines primitive where each two vertices (or indices) is a line segment. Line segments are not necessarily connected.
- *
* @type {number}
* @constant
*/
@@ -25,7 +22,6 @@ const PrimitiveType = {
/**
* Line loop primitive where each vertex (or index) after the first connects a line to
* the previous vertex, and the last vertex implicitly connects to the first.
- *
* @type {number}
* @constant
*/
@@ -33,7 +29,6 @@ const PrimitiveType = {
/**
* Line strip primitive where each vertex (or index) after the first connects a line to the previous vertex.
- *
* @type {number}
* @constant
*/
@@ -41,7 +36,6 @@ const PrimitiveType = {
/**
* Triangles primitive where each three vertices (or indices) is a triangle. Triangles do not necessarily share edges.
- *
* @type {number}
* @constant
*/
@@ -50,7 +44,6 @@ const PrimitiveType = {
/**
* Triangle strip primitive where each vertex (or index) after the first two connect to
* the previous two vertices forming a triangle. For example, this can be used to model a wall.
- *
* @type {number}
* @constant
*/
@@ -60,7 +53,6 @@ const PrimitiveType = {
* Triangle fan primitive where each vertex (or index) after the first two connect to
* the previous vertex and the first vertex forming a triangle. For example, this can be used
* to model a cone or circle.
- *
* @type {number}
* @constant
*/
@@ -68,6 +60,7 @@ const PrimitiveType = {
};
/**
+ * @param primitiveType
* @private
*/
PrimitiveType.isLines = function (primitiveType) {
@@ -79,6 +72,7 @@ PrimitiveType.isLines = function (primitiveType) {
};
/**
+ * @param primitiveType
* @private
*/
PrimitiveType.isTriangles = function (primitiveType) {
@@ -90,6 +84,7 @@ PrimitiveType.isTriangles = function (primitiveType) {
};
/**
+ * @param primitiveType
* @private
*/
PrimitiveType.validate = function (primitiveType) {
diff --git a/packages/engine/Source/Core/Proxy.js b/packages/engine/Source/Core/Proxy.js
index c16a27f1ad1f..775cb7ce30aa 100644
--- a/packages/engine/Source/Core/Proxy.js
+++ b/packages/engine/Source/Core/Proxy.js
@@ -2,10 +2,8 @@ import DeveloperError from "./DeveloperError.js";
/**
* Base class for proxying requested made by {@link Resource}.
- *
* @alias Proxy
- * @constructor
- *
+ * @class
* @see DefaultProxy
*/
function Proxy() {
@@ -14,7 +12,6 @@ function Proxy() {
/**
* Get the final URL to use to request a given resource.
- *
* @param {string} resource The resource to request.
* @returns {string} proxied resource
* @function
diff --git a/packages/engine/Source/Core/QuadraticRealPolynomial.js b/packages/engine/Source/Core/QuadraticRealPolynomial.js
index 17a0fe1031f8..14515354dc0d 100644
--- a/packages/engine/Source/Core/QuadraticRealPolynomial.js
+++ b/packages/engine/Source/Core/QuadraticRealPolynomial.js
@@ -3,14 +3,12 @@ import CesiumMath from "./Math.js";
/**
* Defines functions for 2nd order polynomial functions of one variable with only real coefficients.
- *
* @namespace QuadraticRealPolynomial
*/
const QuadraticRealPolynomial = {};
/**
* Provides the discriminant of the quadratic equation from the supplied coefficients.
- *
* @param {number} a The coefficient of the 2nd order monomial.
* @param {number} b The coefficient of the 1st order monomial.
* @param {number} c The coefficient of the 0th order monomial.
@@ -47,7 +45,6 @@ function addWithCancellationCheck(left, right, tolerance) {
/**
* Provides the real valued roots of the quadratic polynomial with the provided coefficients.
- *
* @param {number} a The coefficient of the 2nd order monomial.
* @param {number} b The coefficient of the 1st order monomial.
* @param {number} c The coefficient of the 0th order monomial.
diff --git a/packages/engine/Source/Core/QuantizedMeshTerrainData.js b/packages/engine/Source/Core/QuantizedMeshTerrainData.js
index f3c8d45d7cad..056d76b855fa 100644
--- a/packages/engine/Source/Core/QuantizedMeshTerrainData.js
+++ b/packages/engine/Source/Core/QuantizedMeshTerrainData.js
@@ -20,10 +20,8 @@ import TerrainMesh from "./TerrainMesh.js";
* as 16-bit values in the range 0 to 32767. Longitude and latitude are zero at the southwest corner
* of the tile and 32767 at the northeast corner. Height is zero at the minimum height in the tile
* and 32767 at the maximum height in the tile.
- *
* @alias QuantizedMeshTerrainData
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Uint16Array} options.quantizedVertices The buffer containing the quantized mesh.
* @param {Uint16Array|Uint32Array} options.indices The indices specifying how the quantized vertices are linked
@@ -43,7 +41,7 @@ import TerrainMesh from "./TerrainMesh.js";
* @param {number} options.southSkirtHeight The height of the skirt to add on the southern edge of the tile.
* @param {number} options.eastSkirtHeight The height of the skirt to add on the eastern edge of the tile.
* @param {number} options.northSkirtHeight The height of the skirt to add on the northern edge of the tile.
- * @param {number} [options.childTileMask=15] A bit mask indicating which of this tile's four children exist.
+ * @param {number} [options.childTileMask] A bit mask indicating which of this tile's four children exist.
* If a child's bit is set, geometry will be requested for that tile as well when it
* is needed. If the bit is cleared, the child tile is not requested and geometry is
* instead upsampled from the parent. The bit values are as follows:
@@ -54,13 +52,11 @@ import TerrainMesh from "./TerrainMesh.js";
* 2 4 Northwest
* 3 8 Northeast
*
- * @param {boolean} [options.createdByUpsampling=false] True if this instance was created by upsampling another instance;
+ * @param {boolean} [options.createdByUpsampling] True if this instance was created by upsampling another instance;
* otherwise, false.
* @param {Uint8Array} [options.encodedNormals] The buffer containing per vertex normals, encoded using 'oct' encoding
* @param {Uint8Array} [options.waterMask] The buffer containing the watermask.
* @param {Credit[]} [options.credits] Array of credits for this tile.
- *
- *
* @example
* const data = new Cesium.QuantizedMeshTerrainData({
* minimumHeight : -100,
@@ -86,7 +82,6 @@ import TerrainMesh from "./TerrainMesh.js";
* eastSkirtHeight : 1.0,
* northSkirtHeight : 1.0
* });
- *
* @see TerrainData
* @see HeightmapTerrainData
* @see GoogleEarthEnterpriseTerrainData
@@ -272,17 +267,15 @@ const createMeshTaskProcessorThrottle = new TaskProcessor(
/**
* Creates a {@link TerrainMesh} from this terrain data.
- *
* @private
- *
* @param {object} options Object with the following properties:
* @param {TilingScheme} options.tilingScheme The tiling scheme to which this tile belongs.
* @param {number} options.x The X coordinate of the tile for which to create the terrain data.
* @param {number} options.y The Y coordinate of the tile for which to create the terrain data.
* @param {number} options.level The level of the tile for which to create the terrain data.
- * @param {number} [options.exaggeration=1.0] The scale used to exaggerate the terrain.
- * @param {number} [options.exaggerationRelativeHeight=0.0] The height relative to which terrain is exaggerated.
- * @param {boolean} [options.throttle=true] If true, indicates that this operation will need to be retried if too many asynchronous mesh creations are already in progress.
+ * @param {number} [options.exaggeration] The scale used to exaggerate the terrain.
+ * @param {number} [options.exaggerationRelativeHeight] The height relative to which terrain is exaggerated.
+ * @param {boolean} [options.throttle] If true, indicates that this operation will need to be retried if too many asynchronous mesh creations are already in progress.
* @returns {Promise|undefined} A promise for the terrain mesh, or undefined if too many
* asynchronous mesh creations are already in progress and the operation should
* be retried later.
@@ -416,7 +409,6 @@ const upsampleTaskProcessor = new TaskProcessor(
/**
* Upsamples this terrain data for use by a descendant tile. The resulting instance will contain a subset of the
* vertices in this instance, interpolated if necessary.
- *
* @param {TilingScheme} tilingScheme The tiling scheme of this terrain data.
* @param {number} thisX The X coordinate of this tile in the tiling scheme.
* @param {number} thisY The Y coordinate of this tile in the tiling scheme.
@@ -561,7 +553,6 @@ const barycentricCoordinateScratch = new Cartesian3();
/**
* Computes the terrain height at a specified longitude and latitude.
- *
* @param {Rectangle} rectangle The rectangle covered by this terrain data.
* @param {number} longitude The longitude in radians.
* @param {number} latitude The latitude in radians.
@@ -719,7 +710,6 @@ function interpolateHeight(terrainData, u, v) {
* {@link HeightmapTerrainData.childTileMask}. The given child tile coordinates are assumed
* to be one of the four children of this tile. If non-child tile coordinates are
* given, the availability of the southeast child tile is returned.
- *
* @param {number} thisX The tile X coordinate of this (the parent) tile.
* @param {number} thisY The tile Y coordinate of this (the parent) tile.
* @param {number} childX The tile X coordinate of the child tile to check for availability.
@@ -763,7 +753,6 @@ QuantizedMeshTerrainData.prototype.isChildAvailable = function (
* terrain data. If this value is false, the data was obtained from some other source, such
* as by downloading it from a remote server. This method should return true for instances
* returned from a call to {@link HeightmapTerrainData#upsample}.
- *
* @returns {boolean} True if this instance was created by upsampling; otherwise, false.
*/
QuantizedMeshTerrainData.prototype.wasCreatedByUpsampling = function () {
diff --git a/packages/engine/Source/Core/QuarticRealPolynomial.js b/packages/engine/Source/Core/QuarticRealPolynomial.js
index c71888ad4fae..9d81a95087b7 100644
--- a/packages/engine/Source/Core/QuarticRealPolynomial.js
+++ b/packages/engine/Source/Core/QuarticRealPolynomial.js
@@ -5,14 +5,12 @@ import QuadraticRealPolynomial from "./QuadraticRealPolynomial.js";
/**
* Defines functions for 4th order polynomial functions of one variable with only real coefficients.
- *
* @namespace QuarticRealPolynomial
*/
const QuarticRealPolynomial = {};
/**
* Provides the discriminant of the quartic equation from the supplied coefficients.
- *
* @param {number} a The coefficient of the 4th order monomial.
* @param {number} b The coefficient of the 3rd order monomial.
* @param {number} c The coefficient of the 2nd order monomial.
@@ -262,7 +260,6 @@ function neumark(a3, a2, a1, a0) {
/**
* Provides the real valued roots of the quartic polynomial with the provided coefficients.
- *
* @param {number} a The coefficient of the 4th order monomial.
* @param {number} b The coefficient of the 3rd order monomial.
* @param {number} c The coefficient of the 2nd order monomial.
diff --git a/packages/engine/Source/Core/Quaternion.js b/packages/engine/Source/Core/Quaternion.js
index 333e353b7816..81a4db2f9234 100644
--- a/packages/engine/Source/Core/Quaternion.js
+++ b/packages/engine/Source/Core/Quaternion.js
@@ -9,13 +9,11 @@ import Matrix3 from "./Matrix3.js";
/**
* A set of 4-dimensional coordinates used to represent rotation in 3-dimensional space.
* @alias Quaternion
- * @constructor
- *
- * @param {number} [x=0.0] The X component.
- * @param {number} [y=0.0] The Y component.
- * @param {number} [z=0.0] The Z component.
- * @param {number} [w=0.0] The W component.
- *
+ * @class
+ * @param {number} [x] The X component.
+ * @param {number} [y] The Y component.
+ * @param {number} [z] The Z component.
+ * @param {number} [w] The W component.
* @see PackableForInterpolation
*/
function Quaternion(x, y, z, w) {
@@ -52,7 +50,6 @@ let fromAxisAngleScratch = new Cartesian3();
/**
* Computes a quaternion representing a rotation around an axis.
- *
* @param {Cartesian3} axis The axis of rotation.
* @param {number} angle The angle in radians to rotate around the axis.
* @param {Quaternion} [result] The object onto which to store the result.
@@ -86,11 +83,9 @@ const fromRotationMatrixNext = [1, 2, 0];
const fromRotationMatrixQuat = new Array(3);
/**
* Computes a Quaternion from the provided Matrix3 instance.
- *
* @param {Matrix3} matrix The rotation matrix.
* @param {Quaternion} [result] The object onto which to store the result.
* @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.
- *
* @see Matrix3.fromQuaternion
*/
Quaternion.fromRotationMatrix = function (matrix, result) {
@@ -179,7 +174,6 @@ let scratchRollQuaternion = new Quaternion();
* Computes a rotation from the given heading, pitch and roll angles. Heading is the rotation about the
* negative z axis. Pitch is the rotation about the negative y axis. Roll is the rotation about
* the positive x axis.
- *
* @param {HeadingPitchRoll} headingPitchRoll The rotation expressed as a heading, pitch and roll.
* @param {Quaternion} [result] The object onto which to store the result.
* @returns {Quaternion} The modified result parameter or a new Quaternion instance if none was provided.
@@ -226,11 +220,9 @@ Quaternion.packedLength = 4;
/**
* Stores the provided instance into the provided array.
- *
* @param {Quaternion} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
Quaternion.pack = function (value, array, startingIndex) {
@@ -251,9 +243,8 @@ Quaternion.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {Quaternion} [result] The object into which to store the result.
* @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.
*/
@@ -282,10 +273,9 @@ Quaternion.packedInterpolationLength = 3;
/**
* Converts a packed array into a form suitable for interpolation.
- *
* @param {number[]} packedArray The packed array.
- * @param {number} [startingIndex=0] The index of the first element to be converted.
- * @param {number} [lastIndex=packedArray.length] The index of the last element to be converted.
+ * @param {number} [startingIndex] The index of the first element to be converted.
+ * @param {number} [lastIndex] The index of the last element to be converted.
* @param {number[]} [result] The object into which to store the result.
*/
Quaternion.convertPackedArrayForInterpolation = function (
@@ -341,11 +331,10 @@ Quaternion.convertPackedArrayForInterpolation = function (
/**
* Retrieves an instance from a packed array converted with {@link convertPackedArrayForInterpolation}.
- *
* @param {number[]} array The array previously packed for interpolation.
* @param {number[]} sourceArray The original packed array.
- * @param {number} [firstIndex=0] The firstIndex used to convert the array.
- * @param {number} [lastIndex=packedArray.length] The lastIndex used to convert the array.
+ * @param {number} [firstIndex] The firstIndex used to convert the array.
+ * @param {number} [lastIndex] The lastIndex used to convert the array.
* @param {Quaternion} [result] The object into which to store the result.
* @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.
*/
@@ -383,7 +372,6 @@ Quaternion.unpackInterpolationResult = function (
/**
* Duplicates a Quaternion instance.
- *
* @param {Quaternion} quaternion The quaternion to duplicate.
* @param {Quaternion} [result] The object onto which to store the result.
* @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided. (Returns undefined if quaternion is undefined)
@@ -411,7 +399,6 @@ Quaternion.clone = function (quaternion, result) {
/**
* Computes the conjugate of the provided quaternion.
- *
* @param {Quaternion} quaternion The quaternion to conjugate.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
@@ -431,7 +418,6 @@ Quaternion.conjugate = function (quaternion, result) {
/**
* Computes magnitude squared for the provided quaternion.
- *
* @param {Quaternion} quaternion The quaternion to conjugate.
* @returns {number} The magnitude squared.
*/
@@ -450,7 +436,6 @@ Quaternion.magnitudeSquared = function (quaternion) {
/**
* Computes magnitude for the provided quaternion.
- *
* @param {Quaternion} quaternion The quaternion to conjugate.
* @returns {number} The magnitude.
*/
@@ -460,7 +445,6 @@ Quaternion.magnitude = function (quaternion) {
/**
* Computes the normalized form of the provided quaternion.
- *
* @param {Quaternion} quaternion The quaternion to normalize.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
@@ -485,7 +469,6 @@ Quaternion.normalize = function (quaternion, result) {
/**
* Computes the inverse of the provided quaternion.
- *
* @param {Quaternion} quaternion The quaternion to normalize.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
@@ -502,7 +485,6 @@ Quaternion.inverse = function (quaternion, result) {
/**
* Computes the componentwise sum of two quaternions.
- *
* @param {Quaternion} left The first quaternion.
* @param {Quaternion} right The second quaternion.
* @param {Quaternion} result The object onto which to store the result.
@@ -524,7 +506,6 @@ Quaternion.add = function (left, right, result) {
/**
* Computes the componentwise difference of two quaternions.
- *
* @param {Quaternion} left The first quaternion.
* @param {Quaternion} right The second quaternion.
* @param {Quaternion} result The object onto which to store the result.
@@ -546,7 +527,6 @@ Quaternion.subtract = function (left, right, result) {
/**
* Negates the provided quaternion.
- *
* @param {Quaternion} quaternion The quaternion to be negated.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
@@ -566,7 +546,6 @@ Quaternion.negate = function (quaternion, result) {
/**
* Computes the dot (scalar) product of two quaternions.
- *
* @param {Quaternion} left The first quaternion.
* @param {Quaternion} right The second quaternion.
* @returns {number} The dot product.
@@ -584,7 +563,6 @@ Quaternion.dot = function (left, right) {
/**
* Computes the product of two quaternions.
- *
* @param {Quaternion} left The first quaternion.
* @param {Quaternion} right The second quaternion.
* @param {Quaternion} result The object onto which to store the result.
@@ -621,7 +599,6 @@ Quaternion.multiply = function (left, right, result) {
/**
* Multiplies the provided quaternion componentwise by the provided scalar.
- *
* @param {Quaternion} quaternion The quaternion to be scaled.
* @param {number} scalar The scalar to multiply with.
* @param {Quaternion} result The object onto which to store the result.
@@ -643,7 +620,6 @@ Quaternion.multiplyByScalar = function (quaternion, scalar, result) {
/**
* Divides the provided quaternion componentwise by the provided scalar.
- *
* @param {Quaternion} quaternion The quaternion to be divided.
* @param {number} scalar The scalar to divide by.
* @param {Quaternion} result The object onto which to store the result.
@@ -665,7 +641,6 @@ Quaternion.divideByScalar = function (quaternion, scalar, result) {
/**
* Computes the axis of rotation of the provided quaternion.
- *
* @param {Quaternion} quaternion The quaternion to use.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
@@ -696,7 +671,6 @@ Quaternion.computeAxis = function (quaternion, result) {
/**
* Computes the angle of rotation of the provided quaternion.
- *
* @param {Quaternion} quaternion The quaternion to use.
* @returns {number} The angle of rotation.
*/
@@ -714,7 +688,6 @@ Quaternion.computeAngle = function (quaternion) {
let lerpScratch = new Quaternion();
/**
* Computes the linear interpolation or extrapolation at t using the provided quaternions.
- *
* @param {Quaternion} start The value corresponding to t at 0.0.
* @param {Quaternion} end The value corresponding to t at 1.0.
* @param {number} t The point along t at which to interpolate.
@@ -739,13 +712,11 @@ let slerpScaledP = new Quaternion();
let slerpScaledR = new Quaternion();
/**
* Computes the spherical linear interpolation or extrapolation at t using the provided quaternions.
- *
* @param {Quaternion} start The value corresponding to t at 0.0.
* @param {Quaternion} end The value corresponding to t at 1.0.
* @param {number} t The point along t at which to interpolate.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
- *
* @see Quaternion#fastSlerp
*/
Quaternion.slerp = function (start, end, t, result) {
@@ -789,7 +760,6 @@ Quaternion.slerp = function (start, end, t, result) {
/**
* The logarithmic quaternion function.
- *
* @param {Quaternion} quaternion The unit quaternion.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
@@ -812,7 +782,6 @@ Quaternion.log = function (quaternion, result) {
/**
* The exponential quaternion function.
- *
* @param {Cartesian3} cartesian The cartesian.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
@@ -846,13 +815,11 @@ const squadScratchQuaternion1 = new Quaternion();
/**
* Computes an inner quadrangle point.
* This will compute quaternions that ensure a squad curve is C1 .
- *
* @param {Quaternion} q0 The first quaternion.
* @param {Quaternion} q1 The second quaternion.
* @param {Quaternion} q2 The third quaternion.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
- *
* @see Quaternion#squad
*/
Quaternion.computeInnerQuadrangle = function (q0, q1, q2, result) {
@@ -880,7 +847,6 @@ Quaternion.computeInnerQuadrangle = function (q0, q1, q2, result) {
/**
* Computes the spherical quadrangle interpolation between quaternions.
- *
* @param {Quaternion} q0 The first quaternion.
* @param {Quaternion} q1 The second quaternion.
* @param {Quaternion} s0 The first inner quadrangle.
@@ -888,8 +854,6 @@ Quaternion.computeInnerQuadrangle = function (q0, q1, q2, result) {
* @param {number} t The time in [0,1] used to interpolate.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
- *
- *
* @example
* // 1. compute the squad interpolation between two quaternions on a curve
* const s0 = Cesium.Quaternion.computeInnerQuadrangle(quaternions[i - 1], quaternions[i], quaternions[i + 1], new Cesium.Quaternion());
@@ -899,7 +863,6 @@ Quaternion.computeInnerQuadrangle = function (q0, q1, q2, result) {
* // 2. compute the squad interpolation as above but where the first quaternion is a end point.
* const s1 = Cesium.Quaternion.computeInnerQuadrangle(quaternions[0], quaternions[1], quaternions[2], new Cesium.Quaternion());
* const q = Cesium.Quaternion.squad(quaternions[0], quaternions[1], quaternions[0], s1, t, new Cesium.Quaternion());
- *
* @see Quaternion#computeInnerQuadrangle
*/
Quaternion.squad = function (q0, q1, s0, s1, t, result) {
@@ -938,13 +901,11 @@ v[7] = (opmu * 8.0) / 17.0;
/**
* Computes the spherical linear interpolation or extrapolation at t using the provided quaternions.
* This implementation is faster than {@link Quaternion#slerp}, but is only accurate up to 10-6 .
- *
* @param {Quaternion} start The value corresponding to t at 0.0.
* @param {Quaternion} end The value corresponding to t at 1.0.
* @param {number} t The point along t at which to interpolate.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
- *
* @see Quaternion#slerp
*/
Quaternion.fastSlerp = function (start, end, t, result) {
@@ -1015,7 +976,6 @@ Quaternion.fastSlerp = function (start, end, t, result) {
/**
* Computes the spherical quadrangle interpolation between quaternions.
* An implementation that is faster than {@link Quaternion#squad}, but less accurate.
- *
* @param {Quaternion} q0 The first quaternion.
* @param {Quaternion} q1 The second quaternion.
* @param {Quaternion} s0 The first inner quadrangle.
@@ -1023,7 +983,6 @@ Quaternion.fastSlerp = function (start, end, t, result) {
* @param {number} t The time in [0,1] used to interpolate.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter or a new instance if none was provided.
- *
* @see Quaternion#squad
*/
Quaternion.fastSquad = function (q0, q1, s0, s1, t, result) {
@@ -1044,7 +1003,6 @@ Quaternion.fastSquad = function (q0, q1, s0, s1, t, result) {
/**
* Compares the provided quaternions componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {Quaternion} [left] The first quaternion.
* @param {Quaternion} [right] The second quaternion.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -1065,10 +1023,9 @@ Quaternion.equals = function (left, right) {
* Compares the provided quaternions componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
- *
* @param {Quaternion} [left] The first quaternion.
* @param {Quaternion} [right] The second quaternion.
- * @param {number} [epsilon=0] The epsilon to use for equality testing.
+ * @param {number} [epsilon] The epsilon to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
*/
Quaternion.equalsEpsilon = function (left, right, epsilon) {
@@ -1087,7 +1044,6 @@ Quaternion.equalsEpsilon = function (left, right, epsilon) {
/**
* An immutable Quaternion instance initialized to (0.0, 0.0, 0.0, 0.0).
- *
* @type {Quaternion}
* @constant
*/
@@ -1095,7 +1051,6 @@ Quaternion.ZERO = Object.freeze(new Quaternion(0.0, 0.0, 0.0, 0.0));
/**
* An immutable Quaternion instance initialized to (0.0, 0.0, 0.0, 1.0).
- *
* @type {Quaternion}
* @constant
*/
@@ -1103,7 +1058,6 @@ Quaternion.IDENTITY = Object.freeze(new Quaternion(0.0, 0.0, 0.0, 1.0));
/**
* Duplicates this Quaternion instance.
- *
* @param {Quaternion} [result] The object onto which to store the result.
* @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.
*/
@@ -1114,7 +1068,6 @@ Quaternion.prototype.clone = function (result) {
/**
* Compares this and the provided quaternion componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {Quaternion} [right] The right hand side quaternion.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
@@ -1126,9 +1079,8 @@ Quaternion.prototype.equals = function (right) {
* Compares this and the provided quaternion componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
- *
* @param {Quaternion} [right] The right hand side quaternion.
- * @param {number} [epsilon=0] The epsilon to use for equality testing.
+ * @param {number} [epsilon] The epsilon to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
*/
Quaternion.prototype.equalsEpsilon = function (right, epsilon) {
@@ -1137,7 +1089,6 @@ Quaternion.prototype.equalsEpsilon = function (right, epsilon) {
/**
* Returns a string representing this quaternion in the format (x, y, z, w).
- *
* @returns {string} A string representing this Quaternion.
*/
Quaternion.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/QuaternionSpline.js b/packages/engine/Source/Core/QuaternionSpline.js
index a469c068c92f..1a236c4845cf 100644
--- a/packages/engine/Source/Core/QuaternionSpline.js
+++ b/packages/engine/Source/Core/QuaternionSpline.js
@@ -29,19 +29,15 @@ function createEvaluateFunction(spline) {
/**
* A spline that uses spherical linear (slerp) interpolation to create a quaternion curve.
* The generated curve is in the class C1 .
- *
* @alias QuaternionSpline
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {number[]} options.times An array of strictly increasing, unit-less, floating-point times at each point.
* The values are in no way connected to the clock time. They are the parameterization for the curve.
* @param {Quaternion[]} options.points The array of {@link Quaternion} control points.
- *
- * @exception {DeveloperError} points and times are required
- * @exception {DeveloperError} points.length must be greater than or equal to 2.
- * @exception {DeveloperError} times.length must be equal to points.length.
-
+ * @throws {DeveloperError} points and times are required
+ * @throws {DeveloperError} points.length must be greater than or equal to 2.
+ * @throws {DeveloperError} times.length must be equal to points.length.
* @see ConstantSpline
* @see SteppedSpline
* @see HermiteSpline
@@ -79,9 +75,7 @@ function QuaternionSpline(options) {
Object.defineProperties(QuaternionSpline.prototype, {
/**
* An array of times for the control points.
- *
* @memberof QuaternionSpline.prototype
- *
* @type {number[]}
* @readonly
*/
@@ -93,9 +87,7 @@ Object.defineProperties(QuaternionSpline.prototype, {
/**
* An array of {@link Quaternion} control points.
- *
* @memberof QuaternionSpline.prototype
- *
* @type {Quaternion[]}
* @readonly
*/
@@ -110,11 +102,9 @@ Object.defineProperties(QuaternionSpline.prototype, {
* Finds an index i
in times
such that the parameter
* time
is in the interval [times[i], times[i + 1]]
.
* @function
- *
* @param {number} time The time.
* @returns {number} The index for the element at the start of the interval.
- *
- * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
@@ -123,29 +113,25 @@ QuaternionSpline.prototype.findTimeInterval = Spline.prototype.findTimeInterval;
/**
* Wraps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, wrapped around to the updated animation.
+ * @returns {number} The time, wrapped around to the updated animation.
*/
QuaternionSpline.prototype.wrapTime = Spline.prototype.wrapTime;
/**
* Clamps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, clamped to the animation period.
+ * @returns {number} The time, clamped to the animation period.
*/
QuaternionSpline.prototype.clampTime = Spline.prototype.clampTime;
/**
* Evaluates the curve at a given time.
- *
* @param {number} time The time at which to evaluate the curve.
* @param {Quaternion} [result] The object onto which to store the result.
* @returns {Quaternion} The modified result parameter or a new instance of the point on the curve at the given time.
- *
- * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
diff --git a/packages/engine/Source/Core/Queue.js b/packages/engine/Source/Core/Queue.js
index b21cff76d1a4..6d46f8cc14d8 100644
--- a/packages/engine/Source/Core/Queue.js
+++ b/packages/engine/Source/Core/Queue.js
@@ -1,8 +1,7 @@
/**
* A queue that can enqueue items at the end, and dequeue items from the front.
- *
* @alias Queue
- * @constructor
+ * @class
*/
function Queue() {
this._array = [];
@@ -13,9 +12,7 @@ function Queue() {
Object.defineProperties(Queue.prototype, {
/**
* The length of the queue.
- *
* @memberof Queue.prototype
- *
* @type {number}
* @readonly
*/
@@ -28,7 +25,6 @@ Object.defineProperties(Queue.prototype, {
/**
* Enqueues the specified item.
- *
* @param {*} item The item to enqueue.
*/
Queue.prototype.enqueue = function (item) {
@@ -38,7 +34,6 @@ Queue.prototype.enqueue = function (item) {
/**
* Dequeues an item. Returns undefined if the queue is empty.
- *
* @returns {*} The the dequeued item.
*/
Queue.prototype.dequeue = function () {
@@ -66,7 +61,6 @@ Queue.prototype.dequeue = function () {
/**
* Returns the item at the front of the queue. Returns undefined if the queue is empty.
- *
* @returns {*} The item at the front of the queue.
*/
Queue.prototype.peek = function () {
@@ -79,7 +73,6 @@ Queue.prototype.peek = function () {
/**
* Check whether this queue contains the specified item.
- *
* @param {*} item The item to search for.
*/
Queue.prototype.contains = function (item) {
@@ -95,7 +88,6 @@ Queue.prototype.clear = function () {
/**
* Sort the items in the queue in-place.
- *
* @param {Queue.Comparator} compareFunction A function that defines the sort order.
*/
Queue.prototype.sort = function (compareFunction) {
@@ -111,13 +103,11 @@ Queue.prototype.sort = function (compareFunction) {
/**
* A function used to compare two items while sorting a queue.
* @callback Queue.Comparator
- *
* @param {*} a An item in the array.
* @param {*} b An item in the array.
* @returns {number} Returns a negative value if a
is less than b
,
* a positive value if a
is greater than b
, or
* 0 if a
is equal to b
.
- *
* @example
* function compareNumbers(a, b) {
* return a - b;
diff --git a/packages/engine/Source/Core/Ray.js b/packages/engine/Source/Core/Ray.js
index 6b63229d65b0..fb6440ee718d 100644
--- a/packages/engine/Source/Core/Ray.js
+++ b/packages/engine/Source/Core/Ray.js
@@ -6,10 +6,9 @@ import defined from "./defined.js";
/**
* Represents a ray that extends infinitely from the provided origin in the provided direction.
* @alias Ray
- * @constructor
- *
- * @param {Cartesian3} [origin=Cartesian3.ZERO] The origin of the ray.
- * @param {Cartesian3} [direction=Cartesian3.ZERO] The direction of the ray.
+ * @class
+ * @param {Cartesian3} [origin] The origin of the ray.
+ * @param {Cartesian3} [direction] The direction of the ray.
*/
function Ray(origin, direction) {
direction = Cartesian3.clone(defaultValue(direction, Cartesian3.ZERO));
@@ -33,7 +32,6 @@ function Ray(origin, direction) {
/**
* Duplicates a Ray instance.
- *
* @param {Ray} ray The ray to duplicate.
* @param {Ray} [result] The object onto which to store the result.
* @returns {Ray} The modified result parameter or a new Ray instance if one was not provided. (Returns undefined if ray is undefined)
@@ -53,12 +51,10 @@ Ray.clone = function (ray, result) {
/**
* Computes the point along the ray given by r(t) = o + t*d,
* where o is the origin of the ray and d is the direction.
- *
* @param {Ray} ray The ray.
* @param {number} t A scalar value.
* @param {Cartesian3} [result] The object in which the result will be stored.
* @returns {Cartesian3} The modified result parameter, or a new instance if none was provided.
- *
* @example
* //Get the first intersection point of a ray and an ellipsoid.
* const intersection = Cesium.IntersectionTests.rayEllipsoid(ray, ellipsoid);
diff --git a/packages/engine/Source/Core/Rectangle.js b/packages/engine/Source/Core/Rectangle.js
index ffbcf09b4684..8ab21c504211 100644
--- a/packages/engine/Source/Core/Rectangle.js
+++ b/packages/engine/Source/Core/Rectangle.js
@@ -10,21 +10,17 @@ import Matrix4 from "./Matrix4.js";
/**
* A two dimensional region specified as longitude and latitude coordinates.
- *
* @alias Rectangle
- * @constructor
- *
- * @param {number} [west=0.0] The westernmost longitude, in radians, in the range [-Pi, Pi].
- * @param {number} [south=0.0] The southernmost latitude, in radians, in the range [-Pi/2, Pi/2].
- * @param {number} [east=0.0] The easternmost longitude, in radians, in the range [-Pi, Pi].
- * @param {number} [north=0.0] The northernmost latitude, in radians, in the range [-Pi/2, Pi/2].
- *
+ * @class
+ * @param {number} [west] The westernmost longitude, in radians, in the range [-Pi, Pi].
+ * @param {number} [south] The southernmost latitude, in radians, in the range [-Pi/2, Pi/2].
+ * @param {number} [east] The easternmost longitude, in radians, in the range [-Pi, Pi].
+ * @param {number} [north] The northernmost latitude, in radians, in the range [-Pi/2, Pi/2].
* @see Packable
*/
function Rectangle(west, south, east, north) {
/**
* The westernmost longitude in radians in the range [-Pi, Pi].
- *
* @type {number}
* @default 0.0
*/
@@ -32,7 +28,6 @@ function Rectangle(west, south, east, north) {
/**
* The southernmost latitude in radians in the range [-Pi/2, Pi/2].
- *
* @type {number}
* @default 0.0
*/
@@ -40,7 +35,6 @@ function Rectangle(west, south, east, north) {
/**
* The easternmost longitude in radians in the range [-Pi, Pi].
- *
* @type {number}
* @default 0.0
*/
@@ -48,7 +42,6 @@ function Rectangle(west, south, east, north) {
/**
* The northernmost latitude in radians in the range [-Pi/2, Pi/2].
- *
* @type {number}
* @default 0.0
*/
@@ -89,11 +82,9 @@ Rectangle.packedLength = 4;
/**
* Stores the provided instance into the provided array.
- *
* @param {Rectangle} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
Rectangle.pack = function (value, array, startingIndex) {
@@ -114,9 +105,8 @@ Rectangle.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {Rectangle} [result] The object into which to store the result.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if one was not provided.
*/
@@ -169,14 +159,12 @@ Rectangle.computeHeight = function (rectangle) {
/**
* Creates a rectangle given the boundary longitude and latitude in degrees.
- *
- * @param {number} [west=0.0] The westernmost longitude in degrees in the range [-180.0, 180.0].
- * @param {number} [south=0.0] The southernmost latitude in degrees in the range [-90.0, 90.0].
- * @param {number} [east=0.0] The easternmost longitude in degrees in the range [-180.0, 180.0].
- * @param {number} [north=0.0] The northernmost latitude in degrees in the range [-90.0, 90.0].
+ * @param {number} [west] The westernmost longitude in degrees in the range [-180.0, 180.0].
+ * @param {number} [south] The southernmost latitude in degrees in the range [-90.0, 90.0].
+ * @param {number} [east] The easternmost longitude in degrees in the range [-180.0, 180.0].
+ * @param {number} [north] The northernmost latitude in degrees in the range [-90.0, 90.0].
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
- *
* @example
* const rectangle = Cesium.Rectangle.fromDegrees(0.0, 20.0, 10.0, 30.0);
*/
@@ -200,14 +188,12 @@ Rectangle.fromDegrees = function (west, south, east, north, result) {
/**
* Creates a rectangle given the boundary longitude and latitude in radians.
- *
- * @param {number} [west=0.0] The westernmost longitude in radians in the range [-Math.PI, Math.PI].
- * @param {number} [south=0.0] The southernmost latitude in radians in the range [-Math.PI/2, Math.PI/2].
- * @param {number} [east=0.0] The easternmost longitude in radians in the range [-Math.PI, Math.PI].
- * @param {number} [north=0.0] The northernmost latitude in radians in the range [-Math.PI/2, Math.PI/2].
+ * @param {number} [west] The westernmost longitude in radians in the range [-Math.PI, Math.PI].
+ * @param {number} [south] The southernmost latitude in radians in the range [-Math.PI/2, Math.PI/2].
+ * @param {number} [east] The easternmost longitude in radians in the range [-Math.PI, Math.PI].
+ * @param {number} [north] The northernmost latitude in radians in the range [-Math.PI/2, Math.PI/2].
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
- *
* @example
* const rectangle = Cesium.Rectangle.fromRadians(0.0, Math.PI/4, Math.PI/8, 3*Math.PI/4);
*/
@@ -226,7 +212,6 @@ Rectangle.fromRadians = function (west, south, east, north, result) {
/**
* Creates the smallest possible Rectangle that encloses all positions in the provided array.
- *
* @param {Cartographic[]} cartographics The list of Cartographic instances.
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
@@ -283,9 +268,8 @@ Rectangle.fromCartographicArray = function (cartographics, result) {
/**
* Creates the smallest possible Rectangle that encloses all positions in the provided array.
- *
* @param {Cartesian3[]} cartesians The list of Cartesian instances.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid the cartesians are on.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid the cartesians are on.
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
*/
@@ -351,10 +335,8 @@ for (let n = 0; n < fromBoundingSpherePositionsScratch.length; ++n) {
}
/**
* Create a rectangle from a bounding sphere, ignoring height.
- *
- *
* @param {BoundingSphere} boundingSphere The bounding sphere.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid.
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
*/
@@ -428,7 +410,6 @@ Rectangle.fromBoundingSphere = function (boundingSphere, ellipsoid, result) {
/**
* Duplicates a Rectangle.
- *
* @param {Rectangle} rectangle The rectangle to clone.
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided. (Returns undefined if rectangle is undefined)
@@ -458,10 +439,9 @@ Rectangle.clone = function (rectangle, result) {
* Compares the provided Rectangles componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
- *
* @param {Rectangle} [left] The first Rectangle.
* @param {Rectangle} [right] The second Rectangle.
- * @param {number} [absoluteEpsilon=0] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
*/
Rectangle.equalsEpsilon = function (left, right, absoluteEpsilon) {
@@ -480,7 +460,6 @@ Rectangle.equalsEpsilon = function (left, right, absoluteEpsilon) {
/**
* Duplicates this Rectangle.
- *
* @param {Rectangle} [result] The object onto which to store the result.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
*/
@@ -491,7 +470,6 @@ Rectangle.prototype.clone = function (result) {
/**
* Compares the provided Rectangle with this Rectangle componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {Rectangle} [other] The Rectangle to compare.
* @returns {boolean} true
if the Rectangles are equal, false
otherwise.
*/
@@ -502,7 +480,6 @@ Rectangle.prototype.equals = function (other) {
/**
* Compares the provided rectangles and returns true
if they are equal,
* false
otherwise.
- *
* @param {Rectangle} [left] The first Rectangle.
* @param {Rectangle} [right] The second Rectangle.
* @returns {boolean} true
if left and right are equal; otherwise false
.
@@ -523,9 +500,8 @@ Rectangle.equals = function (left, right) {
* Compares the provided Rectangle with this Rectangle componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
- *
* @param {Rectangle} [other] The Rectangle to compare.
- * @param {number} [epsilon=0] The epsilon to use for equality testing.
+ * @param {number} [epsilon] The epsilon to use for equality testing.
* @returns {boolean} true
if the Rectangles are within the provided epsilon, false
otherwise.
*/
Rectangle.prototype.equalsEpsilon = function (other, epsilon) {
@@ -534,13 +510,11 @@ Rectangle.prototype.equalsEpsilon = function (other, epsilon) {
/**
* Checks a Rectangle's properties and throws if they are not in valid ranges.
- *
* @param {Rectangle} rectangle The rectangle to validate
- *
- * @exception {DeveloperError} north
must be in the interval [-Pi/2
, Pi/2
].
- * @exception {DeveloperError} south
must be in the interval [-Pi/2
, Pi/2
].
- * @exception {DeveloperError} east
must be in the interval [-Pi
, Pi
].
- * @exception {DeveloperError} west
must be in the interval [-Pi
, Pi
].
+ * @throws {DeveloperError} north
must be in the interval [-Pi/2
, Pi/2
].
+ * @throws {DeveloperError} south
must be in the interval [-Pi/2
, Pi/2
].
+ * @throws {DeveloperError} east
must be in the interval [-Pi
, Pi
].
+ * @throws {DeveloperError} west
must be in the interval [-Pi
, Pi
].
*/
Rectangle.validate = function (rectangle) {
//>>includeStart('debug', pragmas.debug);
@@ -574,7 +548,6 @@ Rectangle.validate = function (rectangle) {
/**
* Computes the southwest corner of a rectangle.
- *
* @param {Rectangle} rectangle The rectangle for which to find the corner
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if none was provided.
@@ -595,7 +568,6 @@ Rectangle.southwest = function (rectangle, result) {
/**
* Computes the northwest corner of a rectangle.
- *
* @param {Rectangle} rectangle The rectangle for which to find the corner
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if none was provided.
@@ -616,7 +588,6 @@ Rectangle.northwest = function (rectangle, result) {
/**
* Computes the northeast corner of a rectangle.
- *
* @param {Rectangle} rectangle The rectangle for which to find the corner
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if none was provided.
@@ -637,7 +608,6 @@ Rectangle.northeast = function (rectangle, result) {
/**
* Computes the southeast corner of a rectangle.
- *
* @param {Rectangle} rectangle The rectangle for which to find the corner
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if none was provided.
@@ -658,7 +628,6 @@ Rectangle.southeast = function (rectangle, result) {
/**
* Computes the center of a rectangle.
- *
* @param {Rectangle} rectangle The rectangle for which to find the center
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if none was provided.
@@ -694,7 +663,6 @@ Rectangle.center = function (rectangle, result) {
* the same angle can be represented with multiple values as well as the wrapping of longitude at the
* anti-meridian. For a simple intersection that ignores these factors and can be used with projected
* coordinates, see {@link Rectangle.simpleIntersection}.
- *
* @param {Rectangle} rectangle On rectangle to find an intersection
* @param {Rectangle} otherRectangle Another rectangle to find an intersection
* @param {Rectangle} [result] The object onto which to store the result.
@@ -761,7 +729,6 @@ Rectangle.intersection = function (rectangle, otherRectangle, result) {
* does not attempt to put the angular coordinates into a consistent range or to account for crossing the
* anti-meridian. As such, it can be used for rectangles where the coordinates are not simply latitude
* and longitude (i.e. projected coordinates).
- *
* @param {Rectangle} rectangle On rectangle to find an intersection
* @param {Rectangle} otherRectangle Another rectangle to find an intersection
* @param {Rectangle} [result] The object onto which to store the result.
@@ -795,7 +762,6 @@ Rectangle.simpleIntersection = function (rectangle, otherRectangle, result) {
/**
* Computes a rectangle that is the union of two rectangles.
- *
* @param {Rectangle} rectangle A rectangle to enclose in rectangle.
* @param {Rectangle} otherRectangle A rectangle to enclose in a rectangle.
* @param {Rectangle} [result] The object onto which to store the result.
@@ -846,7 +812,6 @@ Rectangle.union = function (rectangle, otherRectangle, result) {
/**
* Computes a rectangle by enlarging the provided rectangle until it contains the provided cartographic.
- *
* @param {Rectangle} rectangle A rectangle to expand.
* @param {Cartographic} cartographic A cartographic to enclose in a rectangle.
* @param {Rectangle} [result] The object onto which to store the result.
@@ -872,7 +837,6 @@ Rectangle.expand = function (rectangle, cartographic, result) {
/**
* Returns true if the cartographic is on or inside the rectangle, false otherwise.
- *
* @param {Rectangle} rectangle The rectangle
* @param {Cartographic} cartographic The cartographic to test.
* @returns {boolean} true if the provided cartographic is inside the rectangle, false otherwise.
@@ -910,10 +874,9 @@ const subsampleLlaScratch = new Cartographic();
* Samples a rectangle so that it includes a list of Cartesian points suitable for passing to
* {@link BoundingSphere#fromPoints}. Sampling is necessary to account
* for rectangles that cover the poles or cross the equator.
- *
* @param {Rectangle} rectangle The rectangle to subsample.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to use.
- * @param {number} [surfaceHeight=0.0] The height of the rectangle above the ellipsoid.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid to use.
+ * @param {number} [surfaceHeight] The height of the rectangle above the ellipsoid.
* @param {Cartesian3[]} [result] The array of Cartesians onto which to store the result.
* @returns {Cartesian3[]} The modified result parameter or a new Array of Cartesians instances if none was provided.
*/
@@ -985,7 +948,6 @@ Rectangle.subsample = function (rectangle, ellipsoid, surfaceHeight, result) {
/**
* Computes a subsection of a rectangle from normalized coordinates in the range [0.0, 1.0].
- *
* @param {Rectangle} rectangle The rectangle to subsection.
* @param {number} westLerp The west interpolation factor in the range [0.0, 1.0]. Must be less than or equal to eastLerp.
* @param {number} southLerp The south interpolation factor in the range [0.0, 1.0]. Must be less than or equal to northLerp.
@@ -1056,7 +1018,6 @@ Rectangle.subsection = function (
/**
* The largest possible rectangle.
- *
* @type {Rectangle}
* @constant
*/
diff --git a/packages/engine/Source/Core/RectangleCollisionChecker.js b/packages/engine/Source/Core/RectangleCollisionChecker.js
index bb8cdb516840..01075d6f2c1e 100644
--- a/packages/engine/Source/Core/RectangleCollisionChecker.js
+++ b/packages/engine/Source/Core/RectangleCollisionChecker.js
@@ -28,7 +28,6 @@ RectangleWithId.fromRectangleAndId = function (id, rectangle, result) {
/**
* Insert a rectangle into the collision checker.
- *
* @param {string} id Unique string ID for the rectangle being inserted.
* @param {Rectangle} rectangle A Rectangle
* @private
@@ -54,7 +53,6 @@ function idCompare(a, b) {
const removalScratch = new RectangleWithId();
/**
* Remove a rectangle from the collision checker.
- *
* @param {string} id Unique string ID for the rectangle being removed.
* @param {Rectangle} rectangle A Rectangle
* @private
@@ -76,7 +74,6 @@ RectangleCollisionChecker.prototype.remove = function (id, rectangle) {
const collisionScratch = new RectangleWithId();
/**
* Checks if a given rectangle collides with any of the rectangles in the collection.
- *
* @param {Rectangle} rectangle A Rectangle that should be checked against the rectangles in the collision checker.
* @returns {boolean} Whether the rectangle collides with any of the rectangles in the collision checker.
*/
diff --git a/packages/engine/Source/Core/RectangleGeometry.js b/packages/engine/Source/Core/RectangleGeometry.js
index 7e0b8d5ae7d7..aab7af87757c 100644
--- a/packages/engine/Source/Core/RectangleGeometry.js
+++ b/packages/engine/Source/Core/RectangleGeometry.js
@@ -971,21 +971,18 @@ function computeRectangle(rectangle, granularity, rotation, ellipsoid, result) {
/**
* A description of a cartographic rectangle on an ellipsoid centered at the origin. Rectangle geometry can be rendered with both {@link Primitive} and {@link GroundPrimitive}.
- *
* @alias RectangleGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Rectangle} options.rectangle A cartographic rectangle with north, south, east and west properties in radians.
- * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rectangle lies.
- * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {number} [options.height=0.0] The distance in meters between the rectangle and the ellipsoid surface.
- * @param {number} [options.rotation=0.0] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
- * @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
+ * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid on which the rectangle lies.
+ * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {number} [options.height] The distance in meters between the rectangle and the ellipsoid surface.
+ * @param {number} [options.rotation] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
+ * @param {number} [options.stRotation] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
* @param {number} [options.extrudedHeight] The distance in meters between the rectangle's extruded face and the ellipsoid surface.
- *
- * @exception {DeveloperError} options.rectangle.north
must be in the interval [-Pi/2
, Pi/2
].
+ * @throws {DeveloperError} options.rectangle.north
must be in the interval [-Pi/2
, Pi/2
].
* @exception {DeveloperError} options.rectangle.south
must be in the interval [-Pi/2
, Pi/2
].
* @exception {DeveloperError} options.rectangle.east
must be in the interval [-Pi
, Pi
].
* @exception {DeveloperError} options.rectangle.west
must be in the interval [-Pi
, Pi
].
@@ -1066,11 +1063,9 @@ RectangleGeometry.packedLength =
/**
* Stores the provided instance into the provided array.
- *
* @param {RectangleGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
RectangleGeometry.pack = function (value, array, startingIndex) {
@@ -1118,9 +1113,8 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {RectangleGeometry} [result] The object into which to store the result.
* @returns {RectangleGeometry} The modified result parameter or a new RectangleGeometry instance if one was not provided.
*/
@@ -1182,14 +1176,12 @@ RectangleGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the bounding rectangle based on the provided options
- *
* @param {object} options Object with the following properties:
* @param {Rectangle} options.rectangle A cartographic rectangle with north, south, east and west properties in radians.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rectangle lies.
- * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {number} [options.rotation=0.0] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid on which the rectangle lies.
+ * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {number} [options.rotation] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
* @param {Rectangle} [result] An object in which to store the result.
- *
* @returns {Rectangle} The result rectangle
*/
RectangleGeometry.computeRectangle = function (options, result) {
@@ -1222,11 +1214,9 @@ const quaternionScratch = new Quaternion();
const centerScratch = new Cartographic();
/**
* Computes the geometric representation of a rectangle, including its vertices, indices, and a bounding sphere.
- *
* @param {RectangleGeometry} rectangleGeometry A description of the rectangle.
* @returns {Geometry|undefined} The computed vertices and indices.
- *
- * @exception {DeveloperError} Rotated rectangle is invalid.
+ * @throws {DeveloperError} Rotated rectangle is invalid.
*/
RectangleGeometry.createGeometry = function (rectangleGeometry) {
if (
@@ -1345,6 +1335,9 @@ RectangleGeometry.createGeometry = function (rectangleGeometry) {
};
/**
+ * @param rectangleGeometry
+ * @param minHeightFunc
+ * @param maxHeightFunc
* @private
*/
RectangleGeometry.createShadowVolume = function (
diff --git a/packages/engine/Source/Core/RectangleGeometryLibrary.js b/packages/engine/Source/Core/RectangleGeometryLibrary.js
index a413d08c82da..6e17ca2546d1 100644
--- a/packages/engine/Source/Core/RectangleGeometryLibrary.js
+++ b/packages/engine/Source/Core/RectangleGeometryLibrary.js
@@ -17,6 +17,13 @@ const sqrt = Math.sqrt;
const RectangleGeometryLibrary = {};
/**
+ * @param computedOptions
+ * @param ellipsoid
+ * @param computeST
+ * @param row
+ * @param col
+ * @param position
+ * @param st
* @private
*/
RectangleGeometryLibrary.computePosition = function (
@@ -145,6 +152,13 @@ function getRotationOptions(
}
/**
+ * @param rectangle
+ * @param granularity
+ * @param rotation
+ * @param stRotation
+ * @param boundingRectangleScratch
+ * @param nwCornerResult
+ * @param stNwCornerResult
* @private
*/
RectangleGeometryLibrary.computeOptions = function (
diff --git a/packages/engine/Source/Core/RectangleOutlineGeometry.js b/packages/engine/Source/Core/RectangleOutlineGeometry.js
index 35988cb7daf8..f79569dcabe4 100644
--- a/packages/engine/Source/Core/RectangleOutlineGeometry.js
+++ b/packages/engine/Source/Core/RectangleOutlineGeometry.js
@@ -241,21 +241,18 @@ function constructExtrudedRectangle(rectangleGeometry, computedOptions) {
/**
* A description of the outline of a a cartographic rectangle on an ellipsoid centered at the origin.
- *
* @alias RectangleOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Rectangle} options.rectangle A cartographic rectangle with north, south, east and west properties in radians.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rectangle lies.
- * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {number} [options.height=0.0] The distance in meters between the rectangle and the ellipsoid surface.
- * @param {number} [options.rotation=0.0] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid on which the rectangle lies.
+ * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {number} [options.height] The distance in meters between the rectangle and the ellipsoid surface.
+ * @param {number} [options.rotation] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
* @param {number} [options.extrudedHeight] The distance in meters between the rectangle's extruded face and the ellipsoid surface.
- *
- * @exception {DeveloperError} options.rectangle.north
must be in the interval [-Pi/2
, Pi/2
].
- * @exception {DeveloperError} options.rectangle.south
must be in the interval [-Pi/2
, Pi/2
].
- * @exception {DeveloperError} options.rectangle.east
must be in the interval [-Pi
, Pi
].
+ * @throws {DeveloperError} options.rectangle.north
must be in the interval [-Pi/2
, Pi/2
].
+ * @throws {DeveloperError} options.rectangle.south
must be in the interval [-Pi/2
, Pi/2
].
+ * @throws {DeveloperError} options.rectangle.east
must be in the interval [-Pi
, Pi
].
* @exception {DeveloperError} options.rectangle.west
must be in the interval [-Pi
, Pi
].
* @exception {DeveloperError} options.rectangle.north
must be greater than rectangle.south
.
*
@@ -314,11 +311,9 @@ RectangleOutlineGeometry.packedLength =
/**
* Stores the provided instance into the provided array.
- *
* @param {RectangleOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
RectangleOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -363,9 +358,8 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {RectangleOutlineGeometry} [result] The object into which to store the result.
* @returns {RectangleOutlineGeometry} The modified result parameter or a new Quaternion instance if one was not provided.
*/
@@ -415,11 +409,9 @@ RectangleOutlineGeometry.unpack = function (array, startingIndex, result) {
const nwScratch = new Cartographic();
/**
* Computes the geometric representation of an outline of a rectangle, including its vertices, indices, and a bounding sphere.
- *
* @param {RectangleOutlineGeometry} rectangleGeometry A description of the rectangle outline.
* @returns {Geometry|undefined} The computed vertices and indices.
- *
- * @exception {DeveloperError} Rotated rectangle is invalid.
+ * @throws {DeveloperError} Rotated rectangle is invalid.
*/
RectangleOutlineGeometry.createGeometry = function (rectangleGeometry) {
const rectangle = rectangleGeometry._rectangle;
diff --git a/packages/engine/Source/Core/ReferenceFrame.js b/packages/engine/Source/Core/ReferenceFrame.js
index fdc899040355..5f84dab72422 100644
--- a/packages/engine/Source/Core/ReferenceFrame.js
+++ b/packages/engine/Source/Core/ReferenceFrame.js
@@ -1,12 +1,10 @@
/**
* Constants for identifying well-known reference frames.
- *
* @enum {number}
*/
const ReferenceFrame = {
/**
* The fixed frame.
- *
* @type {number}
* @constant
*/
@@ -14,7 +12,6 @@ const ReferenceFrame = {
/**
* The inertial frame.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/Request.js b/packages/engine/Source/Core/Request.js
index 0274ab3e4d55..0a5b82030e19 100644
--- a/packages/engine/Source/Core/Request.js
+++ b/packages/engine/Source/Core/Request.js
@@ -5,19 +5,17 @@ import RequestType from "./RequestType.js";
/**
* Stores information for making a request. In general this does not need to be constructed directly.
- *
* @alias Request
- * @constructor
-
+ * @class
* @param {object} [options] An object with the following properties:
* @param {string} [options.url] The url to request.
* @param {Request.RequestCallback} [options.requestFunction] The function that makes the actual data request.
* @param {Request.CancelCallback} [options.cancelFunction] The function that is called when the request is cancelled.
* @param {Request.PriorityCallback} [options.priorityFunction] The function that is called to update the request's priority, which occurs once per frame.
- * @param {number} [options.priority=0.0] The initial priority of the request.
- * @param {boolean} [options.throttle=false] Whether to throttle and prioritize the request. If false, the request will be sent immediately. If true, the request will be throttled and sent based on priority.
- * @param {boolean} [options.throttleByServer=false] Whether to throttle the request by server.
- * @param {RequestType} [options.type=RequestType.OTHER] The type of request.
+ * @param {number} [options.priority] The initial priority of the request.
+ * @param {boolean} [options.throttle] Whether to throttle and prioritize the request. If false, the request will be sent immediately. If true, the request will be throttled and sent based on priority.
+ * @param {boolean} [options.throttleByServer] Whether to throttle the request by server.
+ * @param {RequestType} [options.type] The type of request.
* @param {string} [options.serverKey] A key used to identify the server that a request is going to.
*/
function Request(options) {
@@ -28,28 +26,24 @@ function Request(options) {
/**
* The URL to request.
- *
* @type {string}
*/
this.url = options.url;
/**
* The function that makes the actual data request.
- *
* @type {Request.RequestCallback}
*/
this.requestFunction = options.requestFunction;
/**
* The function that is called when the request is cancelled.
- *
* @type {Request.CancelCallback}
*/
this.cancelFunction = options.cancelFunction;
/**
* The function that is called to update the request's priority, which occurs once per frame.
- *
* @type {Request.PriorityCallback}
*/
this.priorityFunction = options.priorityFunction;
@@ -60,7 +54,6 @@ function Request(options) {
* A request that does not have a priority function defaults to a priority of 0.
*
* If priorityFunction is defined, this value is updated every frame with the result of that call.
- *
* @type {number}
* @default 0.0
*/
@@ -69,10 +62,8 @@ function Request(options) {
/**
* Whether to throttle and prioritize the request. If false, the request will be sent immediately. If true, the
* request will be throttled and sent based on priority.
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
this.throttle = throttle;
@@ -81,36 +72,29 @@ function Request(options) {
* Whether to throttle the request by server. Browsers typically support about 6-8 parallel connections
* for HTTP/1 servers, and an unlimited amount of connections for HTTP/2 servers. Setting this value
* to true
is preferable for requests going through HTTP/1 servers.
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
this.throttleByServer = throttleByServer;
/**
* Type of request.
- *
* @type {RequestType}
* @readonly
- *
* @default RequestType.OTHER
*/
this.type = defaultValue(options.type, RequestType.OTHER);
/**
* A key used to identify the server that a request is going to. It is derived from the url's authority and scheme.
- *
* @type {string}
- *
* @private
*/
this.serverKey = options.serverKey;
/**
* The current state of the request.
- *
* @type {RequestState}
* @readonly
*/
@@ -118,18 +102,14 @@ function Request(options) {
/**
* The requests's deferred promise.
- *
* @type {object}
- *
* @private
*/
this.deferred = undefined;
/**
* Whether the request was explicitly cancelled.
- *
* @type {boolean}
- *
* @private
*/
this.cancelled = false;
@@ -137,7 +117,6 @@ function Request(options) {
/**
* Mark the request as cancelled.
- *
* @private
*/
Request.prototype.cancel = function () {
@@ -146,9 +125,7 @@ Request.prototype.cancel = function () {
/**
* Duplicates a Request instance.
- *
* @param {Request} [result] The object onto which to store the result.
- *
* @returns {Request} The modified result parameter or a new Resource instance if one was not provided.
*/
Request.prototype.clone = function (result) {
diff --git a/packages/engine/Source/Core/RequestErrorEvent.js b/packages/engine/Source/Core/RequestErrorEvent.js
index 41f0e685e550..a62cc2ffaed4 100644
--- a/packages/engine/Source/Core/RequestErrorEvent.js
+++ b/packages/engine/Source/Core/RequestErrorEvent.js
@@ -3,10 +3,8 @@ import parseResponseHeaders from "./parseResponseHeaders.js";
/**
* An event that is raised when a request encounters an error.
- *
- * @constructor
+ * @class
* @alias RequestErrorEvent
- *
* @param {number} [statusCode] The HTTP error status code, such as 404.
* @param {object} [response] The response included along with the error.
* @param {string|object} [responseHeaders] The response headers, represented either as an object literal or as a
@@ -16,7 +14,6 @@ function RequestErrorEvent(statusCode, response, responseHeaders) {
/**
* The HTTP error status code, such as 404. If the error does not have a particular
* HTTP code, this property will be undefined.
- *
* @type {number}
*/
this.statusCode = statusCode;
@@ -24,7 +21,6 @@ function RequestErrorEvent(statusCode, response, responseHeaders) {
/**
* The response included along with the error. If the error does not include a response,
* this property will be undefined.
- *
* @type {object}
*/
this.response = response;
@@ -32,7 +28,6 @@ function RequestErrorEvent(statusCode, response, responseHeaders) {
/**
* The headers included in the response, represented as an object literal of key/value pairs.
* If the error does not include any headers, this property will be undefined.
- *
* @type {object}
*/
this.responseHeaders = responseHeaders;
@@ -45,7 +40,6 @@ function RequestErrorEvent(statusCode, response, responseHeaders) {
/**
* Creates a string representing this RequestErrorEvent.
* @memberof RequestErrorEvent
- *
* @returns {string} A string representing the provided RequestErrorEvent.
*/
RequestErrorEvent.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/RequestScheduler.js b/packages/engine/Source/Core/RequestScheduler.js
index 2caded8f67b9..615fc5dae9a1 100644
--- a/packages/engine/Source/Core/RequestScheduler.js
+++ b/packages/engine/Source/Core/RequestScheduler.js
@@ -43,9 +43,7 @@ const requestCompletedEvent = new Event();
* to retain control over the number of requests in CesiumJS is important because due to events such as changes in the camera position,
* a lot of new requests may be generated and a lot of in-flight requests may become redundant. The request scheduler manually constrains the
* number of requests so that newer requests wait in a shorter queue and don't have to compete for bandwidth with requests that have expired.
- *
* @namespace RequestScheduler
- *
*/
function RequestScheduler() {}
@@ -68,10 +66,8 @@ RequestScheduler.maximumRequestsPerServer = 18;
* A per server key list of overrides to use for throttling instead of maximumRequestsPerServer
.
* Useful when streaming data from a known HTTP/2 or HTTP/3 server.
* @type {object}
- *
* @example
* RequestScheduler.requestsByServer["myserver.com:443"] = 18;
- *
* @example
* RequestScheduler.requestsByServer = {
* "api.cesium.com:443": 18,
@@ -98,7 +94,6 @@ RequestScheduler.debugShowStatistics = false;
/**
* An event that's raised when a request is completed. Event handlers are passed
* the error object if the request fails.
- *
* @type {Event}
* @default Event()
* @private
@@ -108,9 +103,7 @@ RequestScheduler.requestCompletedEvent = requestCompletedEvent;
Object.defineProperties(RequestScheduler, {
/**
* Returns the statistics used by the request scheduler.
- *
* @memberof RequestScheduler
- *
* @type {object}
* @readonly
* @private
@@ -123,9 +116,7 @@ Object.defineProperties(RequestScheduler, {
/**
* The maximum size of the priority heap. This limits the number of requests that are sorted by priority. Only applies to requests that are not yet active.
- *
* @memberof RequestScheduler
- *
* @type {number}
* @default 20
* @private
@@ -159,8 +150,8 @@ function updatePriority(request) {
/**
* Check if there are open slots for a particular server key. If desiredRequests is greater than 1, this checks if the queue has room for scheduling multiple requests.
* @param {string} serverKey The server key returned by {@link RequestScheduler.getServerKey}.
- * @param {number} [desiredRequests=1] How many requests the caller plans to request
- * @return {boolean} True if there are enough open slots for desiredRequests
more requests.
+ * @param {number} [desiredRequests] How many requests the caller plans to request
+ * @returns {boolean} True if there are enough open slots for desiredRequests
more requests.
* @private
*/
RequestScheduler.serverHasOpenSlots = function (serverKey, desiredRequests) {
@@ -181,8 +172,7 @@ RequestScheduler.serverHasOpenSlots = function (serverKey, desiredRequests) {
* are from. This is used in {@link Multiple3DTileContent} for determining when
* all requests can be scheduled
* @param {number} desiredRequests The number of requests the caller intends to make
- * @return {boolean} true
if the heap has enough available slots to meet the desiredRequests. false
otherwise.
- *
+ * @returns {boolean} true
if the heap has enough available slots to meet the desiredRequests. false
otherwise.
* @private
*/
RequestScheduler.heapHasOpenSlots = function (desiredRequests) {
@@ -341,7 +331,6 @@ RequestScheduler.update = function () {
/**
* Get the server key from a given url.
- *
* @param {string} url The url.
* @returns {string} The server key.
* @private
@@ -374,11 +363,8 @@ RequestScheduler.getServerKey = function (url) {
/**
* Issue a request. If request.throttle is false, the request is sent immediately. Otherwise the request will be
* queued and sorted by priority before being sent.
- *
* @param {Request} request The request object.
- *
* @returns {Promise|undefined} A Promise for the requested data, or undefined if this request does not have high enough priority to be issued.
- *
* @private
*/
RequestScheduler.request = function (request) {
@@ -478,7 +464,6 @@ function updateStatistics() {
/**
* For testing only. Clears any requests that may not have completed from previous tests.
- *
* @private
*/
RequestScheduler.clearForSpecs = function () {
@@ -505,7 +490,7 @@ RequestScheduler.clearForSpecs = function () {
/**
* For testing only.
- *
+ * @param serverKey
* @private
*/
RequestScheduler.numberOfActiveRequestsByServer = function (serverKey) {
@@ -514,7 +499,6 @@ RequestScheduler.numberOfActiveRequestsByServer = function (serverKey) {
/**
* For testing only.
- *
* @private
*/
RequestScheduler.requestHeap = requestHeap;
diff --git a/packages/engine/Source/Core/RequestState.js b/packages/engine/Source/Core/RequestState.js
index fe83c4ffb640..1f33e7dc7516 100644
--- a/packages/engine/Source/Core/RequestState.js
+++ b/packages/engine/Source/Core/RequestState.js
@@ -1,12 +1,10 @@
/**
* State of the request.
- *
* @enum {number}
*/
const RequestState = {
/**
* Initial unissued state.
- *
* @type {number}
* @constant
*/
@@ -14,7 +12,6 @@ const RequestState = {
/**
* Issued but not yet active. Will become active when open slots are available.
- *
* @type {number}
* @constant
*/
@@ -22,7 +19,6 @@ const RequestState = {
/**
* Actual http request has been sent.
- *
* @type {number}
* @constant
*/
@@ -30,7 +26,6 @@ const RequestState = {
/**
* Request completed successfully.
- *
* @type {number}
* @constant
*/
@@ -38,7 +33,6 @@ const RequestState = {
/**
* Request was cancelled, either explicitly or automatically because of low priority.
- *
* @type {number}
* @constant
*/
@@ -46,7 +40,6 @@ const RequestState = {
/**
* Request failed.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/RequestType.js b/packages/engine/Source/Core/RequestType.js
index e8cda3d64974..6b8da515c836 100644
--- a/packages/engine/Source/Core/RequestType.js
+++ b/packages/engine/Source/Core/RequestType.js
@@ -1,12 +1,10 @@
/**
* An enum identifying the type of request. Used for finer grained logging and priority sorting.
- *
* @enum {number}
*/
const RequestType = {
/**
* Terrain request.
- *
* @type {number}
* @constant
*/
@@ -14,7 +12,6 @@ const RequestType = {
/**
* Imagery request.
- *
* @type {number}
* @constant
*/
@@ -22,7 +19,6 @@ const RequestType = {
/**
* 3D Tiles request.
- *
* @type {number}
* @constant
*/
@@ -30,7 +26,6 @@ const RequestType = {
/**
* Other request.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/Resource.js b/packages/engine/Source/Core/Resource.js
index cec46808118d..ef0613d6d31c 100644
--- a/packages/engine/Source/Core/Resource.js
+++ b/packages/engine/Source/Core/Resource.js
@@ -40,7 +40,6 @@ const xhrBlobSupported = (function () {
* @typedef {object} Resource.ConstructorOptions
*
* Initialization options for the Resource constructor
- *
* @property {string} url The url of the resource.
* @property {object} [queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @property {object} [templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
@@ -54,12 +53,9 @@ const xhrBlobSupported = (function () {
/**
* A resource that includes the location and any other parameters we need to retrieve it or create derived resources. It also provides the ability to retry requests.
- *
* @alias Resource
- * @constructor
- *
+ * @class
* @param {string|Resource.ConstructorOptions} options A url or an object describing initialization options
- *
* @example
* function refreshTokenRetryCallback(resource, error) {
* if (error.statusCode === 403) {
@@ -108,35 +104,30 @@ function Resource(options) {
/**
* Additional HTTP headers that will be sent with the request.
- *
* @type {object}
*/
this.headers = defaultClone(options.headers, {});
/**
* A Request object that will be used. Intended for internal use only.
- *
* @type {Request}
*/
this.request = defaultValue(options.request, new Request());
/**
* A proxy to be used when loading the resource.
- *
* @type {Proxy}
*/
this.proxy = options.proxy;
/**
* Function to call when a request for this resource fails. If it returns true or a Promise that resolves to true, the request will be retried.
- *
* @type {Function}
*/
this.retryCallback = options.retryCallback;
/**
* The number of times the retryCallback should be called before giving up.
- *
* @type {number}
*/
this.retryAttempts = defaultValue(options.retryAttempts, 0);
@@ -154,12 +145,9 @@ function Resource(options) {
/**
* Clones a value if it is defined, otherwise returns the default value
- *
* @param {object} [value] The value to clone.
* @param {object} [defaultValue] The default value.
- *
* @returns {object} A clone of value or the defaultValue.
- *
* @private
*/
function defaultClone(value, defaultValue) {
@@ -168,11 +156,8 @@ function defaultClone(value, defaultValue) {
/**
* A helper function to create a resource depending on whether we have a String or a Resource
- *
* @param {Resource|string} resource A Resource or a String to use when creating a new Resource.
- *
* @returns {Resource} If resource is a String, a Resource constructed with the url and options. Otherwise the resource parameter is returned.
- *
* @private
*/
Resource.createIfNeeded = function (resource) {
@@ -198,9 +183,7 @@ Resource.createIfNeeded = function (resource) {
let supportsImageBitmapOptionsPromise;
/**
* A helper function to check whether createImageBitmap supports passing ImageBitmapOptions.
- *
* @returns {Promise} A promise that resolves to true if this browser supports creating an ImageBitmap with options.
- *
* @private
*/
Resource.supportsImageBitmapOptions = function () {
@@ -256,10 +239,8 @@ Resource.supportsImageBitmapOptions = function () {
Object.defineProperties(Resource, {
/**
* Returns true if blobs are supported.
- *
* @memberof Resource
* @type {boolean}
- *
* @readonly
*/
isBlobSupported: {
@@ -272,10 +253,8 @@ Object.defineProperties(Resource, {
Object.defineProperties(Resource.prototype, {
/**
* Query parameters appended to the url.
- *
* @memberof Resource.prototype
* @type {object}
- *
* @readonly
*/
queryParameters: {
@@ -286,10 +265,8 @@ Object.defineProperties(Resource.prototype, {
/**
* The key/value pairs used to replace template parameters in the url.
- *
* @memberof Resource.prototype
* @type {object}
- *
* @readonly
*/
templateValues: {
@@ -300,7 +277,6 @@ Object.defineProperties(Resource.prototype, {
/**
* The url to the resource with template values replaced, query string appended and encoded by proxy if one was set.
- *
* @memberof Resource.prototype
* @type {string}
*/
@@ -315,10 +291,8 @@ Object.defineProperties(Resource.prototype, {
/**
* The file extension of the resource.
- *
* @memberof Resource.prototype
* @type {string}
- *
* @readonly
*/
extension: {
@@ -329,7 +303,6 @@ Object.defineProperties(Resource.prototype, {
/**
* True if the Resource refers to a data URI.
- *
* @memberof Resource.prototype
* @type {boolean}
*/
@@ -341,7 +314,6 @@ Object.defineProperties(Resource.prototype, {
/**
* True if the Resource refers to a blob URI.
- *
* @memberof Resource.prototype
* @type {boolean}
*/
@@ -353,7 +325,6 @@ Object.defineProperties(Resource.prototype, {
/**
* True if the Resource refers to a cross origin URL.
- *
* @memberof Resource.prototype
* @type {boolean}
*/
@@ -365,7 +336,6 @@ Object.defineProperties(Resource.prototype, {
/**
* True if the Resource has request headers. This is equivalent to checking if the headers property has any keys.
- *
* @memberof Resource.prototype
* @type {boolean}
*/
@@ -389,7 +359,6 @@ Object.defineProperties(Resource.prototype, {
/**
* Override Object#toString so that implicit string conversion gives the
* complete URL represented by this Resource.
- *
* @returns {string} The URL represented by this Resource
*/
Resource.prototype.toString = function () {
@@ -398,12 +367,10 @@ Resource.prototype.toString = function () {
/**
* Parse a url string, and store its info
- *
* @param {string} url The input url string.
* @param {boolean} merge If true, we'll merge with the resource's existing queryParameters. Otherwise they will be replaced.
* @param {boolean} preserveQuery If true duplicate parameters will be concatenated into an array. If false, keys in url will take precedence.
* @param {string} [baseUrl] If supplied, and input url is a relative url, it will be made absolute relative to baseUrl
- *
* @private
*/
Resource.prototype.parseUrl = function (url, merge, preserveQuery, baseUrl) {
@@ -427,10 +394,8 @@ Resource.prototype.parseUrl = function (url, merge, preserveQuery, baseUrl) {
/**
* Parses a query string and returns the object equivalent.
- *
* @param {string} queryString The query string
* @returns {object}
- *
* @private
*/
function parseQueryString(queryString) {
@@ -448,13 +413,10 @@ function parseQueryString(queryString) {
/**
* This combines a map of query parameters.
- *
* @param {object} q1 The first map of query parameters. Values in this map will take precedence if preserveQueryParameters is false.
* @param {object} q2 The second map of query parameters.
* @param {boolean} preserveQueryParameters If true duplicate parameters will be concatenated into an array. If false, keys in q1 will take precedence.
- *
* @returns {object} The combined map of query parameters.
- *
* @example
* const q1 = {
* a: 1,
@@ -500,7 +462,6 @@ function parseQueryString(queryString) {
* // d: 7
* // };
* combineQueryParameters(q1, q3, false);
- *
* @private
*/
function combineQueryParameters(q1, q2, preserveQueryParameters) {
@@ -530,10 +491,8 @@ function combineQueryParameters(q1, q2, preserveQueryParameters) {
/**
* Returns the url, optional with the query string and processed by a proxy.
- *
- * @param {boolean} [query=false] If true, the query string is included.
- * @param {boolean} [proxy=false] If true, the url is processed by the proxy object, if defined.
- *
+ * @param {boolean} [query] If true, the query string is included.
+ * @param {boolean} [proxy] If true, the url is processed by the proxy object, if defined.
* @returns {string} The url with all the requested components.
*/
Resource.prototype.getUrlComponent = function (query, proxy) {
@@ -571,10 +530,8 @@ Resource.prototype.getUrlComponent = function (query, proxy) {
/**
* Converts a query object into a string.
- *
* @param {object} queryObject The object with query parameters
* @returns {string}
- *
* @private
*/
function stringifyQuery(queryObject) {
@@ -593,10 +550,9 @@ function stringifyQuery(queryObject) {
/**
* Combines the specified object and the existing query parameters. This allows you to add many parameters at once,
- * as opposed to adding them one at a time to the queryParameters property. If a value is already set, it will be replaced with the new value.
- *
+ * as opposed to adding them one at a time to the queryParameters property. If a value is already set, it will be replaced with the new value.
* @param {object} params The query parameters
- * @param {boolean} [useAsDefault=false] If true the params will be used as the default values, so they will only be set if they are undefined.
+ * @param {boolean} [useAsDefault] If true the params will be used as the default values, so they will only be set if they are undefined.
*/
Resource.prototype.setQueryParameters = function (params, useAsDefault) {
if (useAsDefault) {
@@ -616,8 +572,7 @@ Resource.prototype.setQueryParameters = function (params, useAsDefault) {
/**
* Combines the specified object and the existing query parameters. This allows you to add many parameters at once,
- * as opposed to adding them one at a time to the queryParameters property.
- *
+ * as opposed to adding them one at a time to the queryParameters property.
* @param {object} params The query parameters
*/
Resource.prototype.appendQueryParameters = function (params) {
@@ -630,10 +585,9 @@ Resource.prototype.appendQueryParameters = function (params) {
/**
* Combines the specified object and the existing template values. This allows you to add many values at once,
- * as opposed to adding them one at a time to the templateValues property. If a value is already set, it will become an array and the new value will be appended.
- *
+ * as opposed to adding them one at a time to the templateValues property. If a value is already set, it will become an array and the new value will be appended.
* @param {object} template The template values
- * @param {boolean} [useAsDefault=false] If true the values will be used as the default values, so they will only be set if they are undefined.
+ * @param {boolean} [useAsDefault] If true the values will be used as the default values, so they will only be set if they are undefined.
*/
Resource.prototype.setTemplateValues = function (template, useAsDefault) {
if (useAsDefault) {
@@ -645,18 +599,16 @@ Resource.prototype.setTemplateValues = function (template, useAsDefault) {
/**
* Returns a resource relative to the current instance. All properties remain the same as the current instance unless overridden in options.
- *
* @param {object} options An object with the following properties
* @param {string} [options.url] The url that will be resolved relative to the url of the current instance.
* @param {object} [options.queryParameters] An object containing query parameters that will be combined with those of the current instance.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}). These will be combined with those of the current instance.
- * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The function to call when loading the resource fails.
* @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
- * @param {boolean} [options.preserveQueryParameters=false] If true, this will keep all query parameters from the current resource and derived resource. If false, derived parameters will replace those of the current resource.
- *
+ * @param {boolean} [options.preserveQueryParameters] If true, this will keep all query parameters from the current resource and derived resource. If false, derived parameters will replace those of the current resource.
* @returns {Resource} The resource derived from the current one.
*/
Resource.prototype.getDerivedResource = function (options) {
@@ -701,11 +653,8 @@ Resource.prototype.getDerivedResource = function (options) {
/**
* Called when a resource fails to load. This will call the retryCallback function if defined until retryAttempts is reached.
- *
* @param {RequestErrorEvent} [error] The error that was encountered.
- *
* @returns {Promise} A promise to a boolean, that if true will cause the resource request to be retried.
- *
* @private
*/
Resource.prototype.retryOnError = function (error) {
@@ -727,9 +676,7 @@ Resource.prototype.retryOnError = function (error) {
/**
* Duplicates a Resource instance.
- *
* @param {Resource} [result] The object onto which to store the result.
- *
* @returns {Resource} The modified result parameter or a new Resource instance if one was not provided.
*/
Resource.prototype.clone = function (result) {
@@ -763,9 +710,7 @@ Resource.prototype.clone = function (result) {
/**
* Returns the base path of the Resource.
- *
- * @param {boolean} [includeQuery = false] Whether or not to include the query string and fragment form the uri
- *
+ * @param {boolean} [includeQuery] Whether or not to include the query string and fragment form the uri
* @returns {string} The base URI of the resource
*/
Resource.prototype.getBaseUri = function (includeQuery) {
@@ -784,9 +729,7 @@ Resource.prototype.appendForwardSlash = function () {
* an ArrayBuffer once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
- *
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
- *
* @example
* // load a single URL asynchronously
* resource.fetchArrayBuffer().then(function(arrayBuffer) {
@@ -794,7 +737,6 @@ Resource.prototype.appendForwardSlash = function () {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -806,15 +748,14 @@ Resource.prototype.fetchArrayBuffer = function () {
/**
* Creates a Resource and calls fetchArrayBuffer() on it.
- *
* @param {string|object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
*/
@@ -828,9 +769,7 @@ Resource.fetchArrayBuffer = function (options) {
* a Blob once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
- *
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
- *
* @example
* // load a single URL asynchronously
* resource.fetchBlob().then(function(blob) {
@@ -838,7 +777,6 @@ Resource.fetchArrayBuffer = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -850,15 +788,14 @@ Resource.prototype.fetchBlob = function () {
/**
* Creates a Resource and calls fetchBlob() on it.
- *
* @param {string|object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
*/
@@ -871,15 +808,12 @@ Resource.fetchBlob = function (options) {
* Asynchronously loads the given image resource. Returns a promise that will resolve to
* an {@link https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap|ImageBitmap} if preferImageBitmap
is true and the browser supports createImageBitmap
or otherwise an
* {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement|Image} once loaded, or reject if the image failed to load.
- *
* @param {object} [options] An object with the following properties.
- * @param {boolean} [options.preferBlob=false] If true, we will load the image via a blob.
- * @param {boolean} [options.preferImageBitmap=false] If true, image will be decoded during fetch and an ImageBitmap
is returned.
- * @param {boolean} [options.flipY=false] If true, image will be vertically flipped during decode. Only applies if the browser supports createImageBitmap
.
- * @param {boolean} [options.skipColorSpaceConversion=false] If true, any custom gamma or color profiles in the image will be ignored. Only applies if the browser supports createImageBitmap
.
+ * @param {boolean} [options.preferBlob] If true, we will load the image via a blob.
+ * @param {boolean} [options.preferImageBitmap] If true, image will be decoded during fetch and an ImageBitmap
is returned.
+ * @param {boolean} [options.flipY] If true, image will be vertically flipped during decode. Only applies if the browser supports createImageBitmap
.
+ * @param {boolean} [options.skipColorSpaceConversion] If true, any custom gamma or color profiles in the image will be ignored. Only applies if the browser supports createImageBitmap
.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
- *
- *
* @example
* // load a single image asynchronously
* resource.fetchImage().then(function(image) {
@@ -892,7 +826,6 @@ Resource.fetchBlob = function (options) {
* Promise.all([resource1.fetchImage(), resource2.fetchImage()]).then(function(images) {
* // images is an array containing all the loaded images
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -998,12 +931,11 @@ Resource.prototype.fetchImage = function (options) {
/**
* Fetches an image and returns a promise to it.
- *
* @param {object} [options] An object with the following properties.
* @param {Resource} [options.resource] Resource object that points to an image to fetch.
* @param {boolean} [options.preferImageBitmap] If true, image will be decoded during fetch and an ImageBitmap
is returned.
* @param {boolean} [options.flipY] If true, image will be vertically flipped during decode. Only applies if the browser supports createImageBitmap
.
- * @param {boolean} [options.skipColorSpaceConversion=false] If true, any custom gamma or color profiles in the image will be ignored. Only applies if the browser supports createImageBitmap
.
+ * @param {boolean} [options.skipColorSpaceConversion] If true, any custom gamma or color profiles in the image will be ignored. Only applies if the browser supports createImageBitmap
.
* @private
*/
function fetchImage(options) {
@@ -1065,20 +997,19 @@ function fetchImage(options) {
/**
* Creates a Resource and calls fetchImage() on it.
- *
* @param {string|object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
- * @param {boolean} [options.flipY=false] Whether to vertically flip the image during fetch and decode. Only applies when requesting an image and the browser supports createImageBitmap
.
+ * @param {boolean} [options.flipY] Whether to vertically flip the image during fetch and decode. Only applies when requesting an image and the browser supports createImageBitmap
.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
- * @param {boolean} [options.preferBlob=false] If true, we will load the image via a blob.
- * @param {boolean} [options.preferImageBitmap=false] If true, image will be decoded during fetch and an ImageBitmap
is returned.
- * @param {boolean} [options.skipColorSpaceConversion=false] If true, any custom gamma or color profiles in the image will be ignored. Only applies when requesting an image and the browser supports createImageBitmap
.
+ * @param {boolean} [options.preferBlob] If true, we will load the image via a blob.
+ * @param {boolean} [options.preferImageBitmap] If true, image will be decoded during fetch and an ImageBitmap
is returned.
+ * @param {boolean} [options.skipColorSpaceConversion] If true, any custom gamma or color profiles in the image will be ignored. Only applies when requesting an image and the browser supports createImageBitmap
.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
*/
Resource.fetchImage = function (options) {
@@ -1096,9 +1027,7 @@ Resource.fetchImage = function (options) {
* a String once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
- *
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
- *
* @example
* // load text from a URL, setting a custom header
* const resource = new Resource({
@@ -1112,7 +1041,6 @@ Resource.fetchImage = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest|XMLHttpRequest}
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
@@ -1125,15 +1053,14 @@ Resource.prototype.fetchText = function () {
/**
* Creates a Resource and calls fetchText() on it.
- *
* @param {string|object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
*/
@@ -1150,17 +1077,13 @@ Resource.fetchText = function (options) {
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled. This function
* adds 'Accept: application/json,*/*;q=0.01' to the request headers, if not
* already specified.
- *
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
- *
- *
* @example
* resource.fetchJson().then(function(jsonData) {
* // Do something with the JSON object
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1186,15 +1109,14 @@ Resource.prototype.fetchJson = function () {
/**
* Creates a Resource and calls fetchJson() on it.
- *
* @param {string|object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
*/
@@ -1208,10 +1130,7 @@ Resource.fetchJson = function (options) {
* an XML Document once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
- *
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
- *
- *
* @example
* // load XML from a URL, setting a custom header
* Cesium.loadXML('http://someUrl.com/someXML.xml', {
@@ -1221,7 +1140,6 @@ Resource.fetchJson = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest|XMLHttpRequest}
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
@@ -1235,15 +1153,14 @@ Resource.prototype.fetchXML = function () {
/**
* Creates a Resource and calls fetchXML() on it.
- *
* @param {string|object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
*/
@@ -1254,11 +1171,8 @@ Resource.fetchXML = function (options) {
/**
* Requests a resource using JSONP.
- *
- * @param {string} [callbackParameterName='callback'] The callback parameter name that the server expects.
+ * @param {string} [callbackParameterName] The callback parameter name that the server expects.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
- *
- *
* @example
* // load a data asynchronously
* resource.fetchJsonp().then(function(data) {
@@ -1266,7 +1180,6 @@ Resource.fetchXML = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
Resource.prototype.fetchJsonp = function (callbackParameterName) {
@@ -1337,17 +1250,16 @@ function fetchJsonp(resource, callbackParameterName, functionName) {
/**
* Creates a Resource from a URL and calls fetchJsonp() on it.
- *
* @param {string|object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
- * @param {string} [options.callbackParameterName='callback'] The callback parameter name that the server expects.
+ * @param {string} [options.callbackParameterName] The callback parameter name that the server expects.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
*/
Resource.fetchJsonp = function (options) {
@@ -1356,6 +1268,7 @@ Resource.fetchJsonp = function (options) {
};
/**
+ * @param options
* @private
*/
Resource.prototype._makeRequest = function (options) {
@@ -1423,9 +1336,7 @@ Resource.prototype._makeRequest = function (options) {
/**
* Checks to make sure the Resource isn't already being requested.
- *
* @param {Request} request The request to check.
- *
* @private
*/
function checkAndResetRequest(request) {
@@ -1500,14 +1411,11 @@ function decodeDataUri(dataUriRegexResult, responseType) {
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled. It's recommended that you use
* the more specific functions eg. fetchJson, fetchBlob, etc.
- *
* @param {object} [options] Object with the following properties:
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {object} [options.headers] Additional HTTP headers to send with the request, if any.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
- *
- *
* @example
* resource.fetch()
* .then(function(body) {
@@ -1515,7 +1423,6 @@ function decodeDataUri(dataUriRegexResult, responseType) {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1528,15 +1435,14 @@ Resource.prototype.fetch = function (options) {
/**
* Creates a Resource from a URL and calls fetch() on it.
- *
* @param {string|object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
@@ -1556,14 +1462,11 @@ Resource.fetch = function (options) {
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
- *
* @param {object} [options] Object with the following properties:
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {object} [options.headers] Additional HTTP headers to send with the request, if any.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
- *
- *
* @example
* resource.delete()
* .then(function(body) {
@@ -1571,7 +1474,6 @@ Resource.fetch = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1584,16 +1486,15 @@ Resource.prototype.delete = function (options) {
/**
* Creates a Resource from a URL and calls delete() on it.
- *
* @param {string|object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} [options.data] Data that is posted with the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
@@ -1614,14 +1515,11 @@ Resource.delete = function (options) {
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
- *
* @param {object} [options] Object with the following properties:
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {object} [options.headers] Additional HTTP headers to send with the request, if any.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
- *
- *
* @example
* resource.head()
* .then(function(headers) {
@@ -1629,7 +1527,6 @@ Resource.delete = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1642,15 +1539,14 @@ Resource.prototype.head = function (options) {
/**
* Creates a Resource from a URL and calls head() on it.
- *
* @param {string|object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
@@ -1670,14 +1566,11 @@ Resource.head = function (options) {
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
- *
* @param {object} [options] Object with the following properties:
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {object} [options.headers] Additional HTTP headers to send with the request, if any.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
- *
- *
* @example
* resource.options()
* .then(function(headers) {
@@ -1685,7 +1578,6 @@ Resource.head = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1698,15 +1590,14 @@ Resource.prototype.options = function (options) {
/**
* Creates a Resource from a URL and calls options() on it.
- *
* @param {string|object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
@@ -1726,7 +1617,6 @@ Resource.options = function (options) {
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
- *
* @param {object} data Data that is posted with the resource.
* @param {object} [options] Object with the following properties:
* @param {object} [options.data] Data that is posted with the resource.
@@ -1734,8 +1624,6 @@ Resource.options = function (options) {
* @param {object} [options.headers] Additional HTTP headers to send with the request, if any.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
- *
- *
* @example
* resource.post(data)
* .then(function(result) {
@@ -1743,7 +1631,6 @@ Resource.options = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1759,16 +1646,15 @@ Resource.prototype.post = function (data, options) {
/**
* Creates a Resource from a URL and calls post() on it.
- *
* @param {object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} options.data Data that is posted with the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
@@ -1788,15 +1674,12 @@ Resource.post = function (options) {
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
- *
* @param {object} data Data that is posted with the resource.
* @param {object} [options] Object with the following properties:
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {object} [options.headers] Additional HTTP headers to send with the request, if any.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
- *
- *
* @example
* resource.put(data)
* .then(function(result) {
@@ -1804,7 +1687,6 @@ Resource.post = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1820,16 +1702,15 @@ Resource.prototype.put = function (data, options) {
/**
* Creates a Resource from a URL and calls put() on it.
- *
* @param {object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} options.data Data that is posted with the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
@@ -1849,15 +1730,12 @@ Resource.put = function (options) {
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
- *
* @param {object} data Data that is posted with the resource.
* @param {object} [options] Object with the following properties:
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {object} [options.headers] Additional HTTP headers to send with the request, if any.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
- *
- *
* @example
* resource.patch(data)
* .then(function(result) {
@@ -1865,7 +1743,6 @@ Resource.put = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1881,16 +1758,15 @@ Resource.prototype.patch = function (data, options) {
/**
* Creates a Resource from a URL and calls patch() on it.
- *
* @param {object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} options.data Data that is posted with the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
@@ -1907,7 +1783,6 @@ Resource.patch = function (options) {
/**
* Contains implementations of functions that can be replaced for testing
- *
* @private
*/
Resource._Implementations = {};
@@ -2026,7 +1901,8 @@ Resource._Implementations.createImage = function (
/**
* Wrapper for createImageBitmap
- *
+ * @param blob
+ * @param options
* @private
*/
Resource.createImageBitmapFromBlob = function (blob, options) {
@@ -2238,7 +2114,6 @@ Resource._Implementations.loadAndExecuteScript = function (
/**
* The default implementations
- *
* @private
*/
Resource._DefaultImplementations = {};
@@ -2251,7 +2126,6 @@ Resource._DefaultImplementations.loadAndExecuteScript =
/**
* A resource instance initialized to the current browser location
- *
* @type {Resource}
* @constant
*/
@@ -2267,7 +2141,6 @@ Resource.DEFAULT = Object.freeze(
/**
* A function that returns the value of the property.
* @callback Resource.RetryCallback
- *
* @param {Resource} [resource] The resource that failed to load.
* @param {RequestErrorEvent} [error] The error that occurred during the loading of the resource.
* @returns {boolean|Promise} If true or a promise that resolved to true, the resource will be retried. Otherwise the failure will be returned.
diff --git a/packages/engine/Source/Core/RuntimeError.js b/packages/engine/Source/Core/RuntimeError.js
index 8bbd56d74efe..ccf62acbce0d 100644
--- a/packages/engine/Source/Core/RuntimeError.js
+++ b/packages/engine/Source/Core/RuntimeError.js
@@ -8,13 +8,10 @@ import defined from "./defined.js";
* On the other hand, a {@link DeveloperError} indicates an exception due
* to a developer error, e.g., invalid argument, that usually indicates a bug in the
* calling code.
- *
* @alias RuntimeError
- * @constructor
- * @extends Error
- *
+ * @class
+ * @augments Error
* @param {string} [message] The error message for this exception.
- *
* @see DeveloperError
*/
function RuntimeError(message) {
diff --git a/packages/engine/Source/Core/S2Cell.js b/packages/engine/Source/Core/S2Cell.js
index 67a05266fce4..ed9da916afa5 100644
--- a/packages/engine/Source/Core/S2Cell.js
+++ b/packages/engine/Source/Core/S2Cell.js
@@ -32,13 +32,13 @@ import RuntimeError from "./RuntimeError.js";
* of the cell along the Hilbert curve. After the positions bits is the sentinel bit, which is always set to 1, and it indicates the level of the
* cell. Again, the level can be between 0 and 30 in S2.
*
- * Note: In the illustration below, the face bits are marked with 'f', the position bits are marked with 'p', the zero bits are marked with '-'.
+ * Note: In the illustration below, the face bits are marked with 'f', the position bits are marked with 'p', the zero bits are marked with '-'.
*
- * Cell ID (base 10): 3170534137668829184
- * Cell ID (base 2) : 0010110000000000000000000000000000000000000000000000000000000000
+ * Cell ID (base 10): 3170534137668829184
+ * Cell ID (base 2) : 0010110000000000000000000000000000000000000000000000000000000000
*
- * 001 0110000000000000000000000000000000000000000000000000000000000
- * fff pps----------------------------------------------------------
+ * 001 0110000000000000000000000000000000000000000000000000000000000
+ * fff pps----------------------------------------------------------
*
* For the cell above, we can see that it lies on face 1 (01), with a Hilbert index of 1 (1).
*
@@ -48,43 +48,43 @@ import RuntimeError from "./RuntimeError.js";
* Cells in S2 subdivide recursively using quadtree subdivision. For each cell, you can get a child of index [0-3]. To compute the child at index i,
* insert the base 2 representation of i to the right of the parent's position bits. Ensure that the sentinel bit is also shifted two places to the right.
*
- * Parent Cell ID (base 10) : 3170534137668829184
- * Parent Cell ID (base 2) : 0010110000000000000000000000000000000000000000000000000000000000
+ * Parent Cell ID (base 10) : 3170534137668829184
+ * Parent Cell ID (base 2) : 0010110000000000000000000000000000000000000000000000000000000000
*
- * 001 0110000000000000000000000000000000000000000000000000000000000
- * fff pps----------------------------------------------------------
+ * 001 0110000000000000000000000000000000000000000000000000000000000
+ * fff pps----------------------------------------------------------
*
- * To get the 3rd child of the cell above, we insert the binary representation of 3 to the right of the parent's position bits:
+ * To get the 3rd child of the cell above, we insert the binary representation of 3 to the right of the parent's position bits:
*
- * Note: In the illustration below, the bits to be added are highlighted with '^'.
+ * Note: In the illustration below, the bits to be added are highlighted with '^'.
*
- * 001 0111100000000000000000000000000000000000000000000000000000000
- * fff pppps--------------------------------------------------------
- * ^^
+ * 001 0111100000000000000000000000000000000000000000000000000000000
+ * fff pppps--------------------------------------------------------
+ * ^^
*
- * Child(3) Cell ID (base 10) : 3386706919782612992
- * Child(3) Cell ID (base 2) : 0010111100000000000000000000000000000000000000000000000000000000
+ * Child(3) Cell ID (base 10) : 3386706919782612992
+ * Child(3) Cell ID (base 2) : 0010111100000000000000000000000000000000000000000000000000000000
*
* Cell Token:
* -----------
* To provide a more concise representation of the S2 cell ID, we can use their hexadecimal representation.
*
- * Cell ID (base 10): 3170534137668829184
- * Cell ID (base 2) : 0010110000000000000000000000000000000000000000000000000000000000
+ * Cell ID (base 10): 3170534137668829184
+ * Cell ID (base 2) : 0010110000000000000000000000000000000000000000000000000000000000
*
- * We remove all trailing zero bits, until we reach the nybble (4 bits) that contains the sentinel bit.
+ * We remove all trailing zero bits, until we reach the nybble (4 bits) that contains the sentinel bit.
*
- * Note: In the illustration below, the bits to be removed are highlighted with 'X'.
+ * Note: In the illustration below, the bits to be removed are highlighted with 'X'.
*
- * 0010110000000000000000000000000000000000000000000000000000000000
- * fffpps--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+ * 0010110000000000000000000000000000000000000000000000000000000000
+ * fffpps--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*
- * We convert the remaining bits to their hexadecimal representation.
+ * We convert the remaining bits to their hexadecimal representation.
*
- * Base 2: 0010 1100
- * Base 16: "2" "c"
+ * Base 2: 0010 1100
+ * Base 16: "2" "c"
*
- * Cell Token: "2c"
+ * Cell Token: "2c"
*
* To compute the cell ID from the token, we simply add enough zeros to the right to make the ID span 64 bits.
*
@@ -93,14 +93,13 @@ import RuntimeError from "./RuntimeError.js";
*
* To go from a cell in S2 to a point on the ellipsoid, the following order of transforms is applied:
*
- * 1. (Cell ID): S2 cell ID
- * 2. (Face, I, J): Leaf cell coordinates, where i and j are in range [0, 2^30 - 1]
- * 3. (Face, S, T): Cell space coordinates, where s and t are in range [0, 1].
- * 4. (Face, Si, Ti): Discrete cell space coordinates, where si and ti are in range [0, 2^31]
- * 5. (Face, U, V): Cube space coordinates, where u and v are in range [-1, 1]. We apply the non-linear quadratic transform here.
- * 6. (X, Y, Z): Direction vector, where vector may not be unit length. Can be normalized to obtain point on unit sphere
- * 7. (Latitude, Longitude): Direction vector, where latitude is in range [-90, 90] and longitude is in range [-180, 180]
- *
+ * 1. (Cell ID): S2 cell ID
+ * 2. (Face, I, J): Leaf cell coordinates, where i and j are in range [0, 2^30 - 1]
+ * 3. (Face, S, T): Cell space coordinates, where s and t are in range [0, 1].
+ * 4. (Face, Si, Ti): Discrete cell space coordinates, where si and ti are in range [0, 2^31]
+ * 5. (Face, U, V): Cube space coordinates, where u and v are in range [-1, 1]. We apply the non-linear quadratic transform here.
+ * 6. (X, Y, Z): Direction vector, where vector may not be unit length. Can be normalized to obtain point on unit sphere
+ * 7. (Latitude, Longitude): Direction vector, where latitude is in range [-90, 90] and longitude is in range [-180, 180]
* @ignore
*/
@@ -150,10 +149,8 @@ const S2_POSITION_TO_ORIENTATION_MASK = [
/**
* Represents a cell in the S2 geometry library.
- *
* @alias S2Cell
- * @constructor
- *
+ * @class
* @param {bigint} [cellId] The 64-bit S2CellId.
* @private
*/
@@ -176,7 +173,6 @@ function S2Cell(cellId) {
/**
* Creates a new S2Cell from a token. A token is a hexadecimal representation of the 64-bit S2CellId.
- *
* @param {string} token The token for the S2 Cell.
* @returns {S2Cell} Returns a new S2Cell.
* @private
@@ -194,7 +190,6 @@ S2Cell.fromToken = function (token) {
/**
* Validates an S2 cell ID.
- *
* @param {bigint} [cellId] The S2CellId.
* @returns {boolean} Returns true if the cell ID is valid, returns false otherwise.
* @private
@@ -228,7 +223,6 @@ S2Cell.isValidId = function (cellId) {
/**
* Validates an S2 cell token.
- *
* @param {string} [token] The hexadecimal representation of an S2CellId.
* @returns {boolean} Returns true if the token is valid, returns false otherwise.
* @private
@@ -247,7 +241,6 @@ S2Cell.isValidToken = function (token) {
/**
* Converts an S2 cell token to a 64-bit S2 cell ID.
- *
* @param {string} [token] The hexadecimal representation of an S2CellId. Expected to be a valid S2 token.
* @returns {bigint} Returns the S2 cell ID.
* @private
@@ -262,7 +255,6 @@ S2Cell.getIdFromToken = function (token) {
/**
* Converts a 64-bit S2 cell ID to an S2 cell token.
- *
* @param {bigint} [cellId] The S2 cell ID.
* @returns {string} Returns hexadecimal representation of an S2CellId.
* @private
@@ -283,7 +275,6 @@ S2Cell.getTokenFromId = function (cellId) {
/**
* Gets the level of the cell from the cell ID.
- *
* @param {bigint} [cellId] The S2 cell ID.
* @returns {number} Returns the level of the cell.
* @private
@@ -313,7 +304,6 @@ S2Cell.getLevel = function (cellId) {
/**
* Gets the child cell of the cell at the given index.
- *
* @param {number} index An integer index of the child.
* @returns {S2Cell} The child of the S2Cell.
* @private
@@ -340,7 +330,6 @@ S2Cell.prototype.getChild = function (index) {
/**
* Gets the parent cell of an S2Cell.
- *
* @returns {S2Cell} Returns the parent of the S2Cell.
* @private
*/
@@ -360,7 +349,7 @@ S2Cell.prototype.getParent = function () {
/**
* Gets the parent cell at the given level.
- *
+ * @param level
* @returns {S2Cell} Returns the parent of the S2Cell.
* @private
*/
@@ -376,8 +365,8 @@ S2Cell.prototype.getParentAtLevel = function (level) {
/**
* Get center of the S2 cell.
- *
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid.
+ * @param ellipsoid
* @returns {Cartesian3} The position of center of the S2 cell.
* @private
*/
@@ -397,9 +386,9 @@ S2Cell.prototype.getCenter = function (ellipsoid) {
/**
* Get vertex of the S2 cell. Vertices are indexed in CCW order.
- *
* @param {number} index An integer index of the vertex. Must be in the range [0-3].
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid.
+ * @param ellipsoid
* @returns {Cartesian3} The position of the vertex of the S2 cell.
* @private
*/
@@ -426,7 +415,6 @@ S2Cell.prototype.getVertex = function (index, ellipsoid) {
/**
* Creates an S2Cell from its face, position along the Hilbert curve for a given level.
- *
* @param {number} face The root face of S2 this cell is on. Must be in the range [0-5].
* @param {bigint} position The position along the Hilbert curve. Must be in the range [0-4**level).
* @param {number} level The level of the S2 curve. Must be in the range [0-30].
@@ -467,6 +455,8 @@ S2Cell.fromFacePositionLevel = function (face, position, level) {
};
/**
+ * @param cellId
+ * @param level
* @private
*/
function getS2Center(cellId, level) {
@@ -474,6 +464,9 @@ function getS2Center(cellId, level) {
return convertFaceSiTitoXYZ(faceSiTi[0], faceSiTi[1], faceSiTi[2]);
}
/**
+ * @param cellId
+ * @param level
+ * @param index
* @private
*/
function getS2Vertex(cellId, level, index) {
@@ -487,6 +480,8 @@ function getS2Vertex(cellId, level, index) {
// S2 Coordinate Conversions
/**
+ * @param cellId
+ * @param level
* @private
*/
function convertCellIdToFaceSiTi(cellId, level) {
@@ -509,6 +504,7 @@ function convertCellIdToFaceSiTi(cellId, level) {
}
/**
+ * @param cellId
* @private
*/
function convertCellIdToFaceIJ(cellId) {
@@ -546,6 +542,9 @@ function convertCellIdToFaceIJ(cellId) {
}
/**
+ * @param face
+ * @param si
+ * @param ti
* @private
*/
function convertFaceSiTitoXYZ(face, si, ti) {
@@ -558,6 +557,9 @@ function convertFaceSiTitoXYZ(face, si, ti) {
}
/**
+ * @param face
+ * @param u
+ * @param v
* @private
*/
function convertFaceUVtoXYZ(face, u, v) {
@@ -584,6 +586,7 @@ function convertFaceUVtoXYZ(face, u, v) {
*
* For a more detailed comparison of these transform methods, see
* {@link https://github.com/google/s2geometry/blob/0c4c460bdfe696da303641771f9def900b3e440f/src/s2/s2metrics.cc}
+ * @param s
* @private
*/
function convertSTtoUV(s) {
@@ -594,6 +597,7 @@ function convertSTtoUV(s) {
}
/**
+ * @param si
* @private
*/
function convertSiTitoST(si) {
@@ -601,6 +605,8 @@ function convertSiTitoST(si) {
}
/**
+ * @param ij
+ * @param level
* @private
*/
function convertIJLeveltoBoundUV(ij, level) {
@@ -616,6 +622,7 @@ function convertIJLeveltoBoundUV(ij, level) {
}
/**
+ * @param level
* @private
*/
function getSizeIJ(level) {
@@ -623,6 +630,7 @@ function getSizeIJ(level) {
}
/**
+ * @param i
* @private
*/
function convertIJtoSTMinimum(i) {
@@ -637,6 +645,12 @@ function convertIJtoSTMinimum(i) {
* recursively.
*
* See {@link https://github.com/google/s2geometry/blob/c59d0ca01ae3976db7f8abdc83fcc871a3a95186/src/s2/s2cell_id.cc#L75-L109}
+ * @param level
+ * @param i
+ * @param j
+ * @param originalOrientation
+ * @param position
+ * @param orientation
* @private
*/
function generateLookupCell(
@@ -713,6 +727,7 @@ function generateLookupTable() {
/**
* Return the lowest-numbered bit that is on for this cell id
+ * @param cellId
* @private
*/
function lsb(cellId) {
@@ -721,6 +736,7 @@ function lsb(cellId) {
/**
* Return the lowest-numbered bit that is on for cells at the given level.
+ * @param level
* @private
*/
function lsbForLevel(level) {
@@ -802,6 +818,7 @@ const Mod67BitPosition = [
/**
* Return the number of trailing zeros in number.
+ * @param x
* @private
*/
function countTrailingZeroBits(x) {
diff --git a/packages/engine/Source/Core/ScreenSpaceEventHandler.js b/packages/engine/Source/Core/ScreenSpaceEventHandler.js
index 0c2fb86c6079..bcaf7ff2abcd 100644
--- a/packages/engine/Source/Core/ScreenSpaceEventHandler.js
+++ b/packages/engine/Source/Core/ScreenSpaceEventHandler.js
@@ -896,7 +896,6 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @typedef {object} ScreenSpaceEventHandler.PositionedEvent
*
* An Event that occurs at a single position on screen.
- *
* @property {Cartesian2} position
*/
@@ -904,7 +903,6 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @callback ScreenSpaceEventHandler.PositionedEventCallback
*
* The callback invoked when a positioned event triggers an event listener.
- *
* @param {ScreenSpaceEventHandler.PositionedEvent} event The event which triggered the listener
*/
@@ -912,7 +910,6 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @typedef {object} ScreenSpaceEventHandler.MotionEvent
*
* An Event that starts at one position and ends at another.
- *
* @property {Cartesian2} startPosition
* @property {Cartesian2} endPosition
*/
@@ -921,7 +918,6 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @callback ScreenSpaceEventHandler.MotionEventCallback
*
* The callback invoked when a motion event triggers an event listener.
- *
* @param {ScreenSpaceEventHandler.MotionEvent} event The event which triggered the listener
*/
@@ -929,7 +925,6 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @typedef {object} ScreenSpaceEventHandler.TwoPointEvent
*
* An Event that occurs at a two positions on screen.
- *
* @property {Cartesian2} position1
* @property {Cartesian2} position2
*/
@@ -938,7 +933,6 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @callback ScreenSpaceEventHandler.TwoPointEventCallback
*
* The callback invoked when a two-point event triggers an event listener.
- *
* @param {ScreenSpaceEventHandler.TwoPointEvent} event The event which triggered the listener
*/
@@ -946,7 +940,6 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @typedef {object} ScreenSpaceEventHandler.TwoPointMotionEvent
*
* An Event that starts at a two positions on screen and moves to two other positions.
- *
* @property {Cartesian2} position1
* @property {Cartesian2} position2
* @property {Cartesian2} previousPosition1
@@ -957,7 +950,6 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @callback ScreenSpaceEventHandler.TwoPointMotionEventCallback
*
* The callback invoked when a two-point motion event triggers an event listener.
- *
* @param {ScreenSpaceEventHandler.TwoPointMotionEvent} event The event which triggered the listener
*/
@@ -965,19 +957,15 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @callback ScreenSpaceEventHandler.WheelEventCallback
*
* The callback invoked when a mouse-wheel event triggers an event listener.
- *
* @param {number} delta The amount that the mouse wheel moved
*/
/**
* Handles user input events. Custom functions can be added to be executed on
* when the user enters input.
- *
* @alias ScreenSpaceEventHandler
- *
- * @param {HTMLCanvasElement} [element=document] The element to add events to.
- *
- * @constructor
+ * @param {HTMLCanvasElement} [element] The element to add events to.
+ * @class
*/
function ScreenSpaceEventHandler(element) {
this._inputEvents = {};
@@ -1013,12 +1001,10 @@ function ScreenSpaceEventHandler(element) {
/**
* Set a function to be executed on an input event.
- *
* @param {ScreenSpaceEventHandler.PositionedEventCallback|ScreenSpaceEventHandler.MotionEventCallback|ScreenSpaceEventHandler.WheelEventCallback|ScreenSpaceEventHandler.TwoPointEventCallback|ScreenSpaceEventHandler.TwoPointMotionEventCallback} action Function to be executed when the input event occurs.
* @param {ScreenSpaceEventType} type The ScreenSpaceEventType of input event.
* @param {KeyboardEventModifier} [modifier] A KeyboardEventModifier key that is held when a type
* event occurs.
- *
* @see ScreenSpaceEventHandler#getInputAction
* @see ScreenSpaceEventHandler#removeInputAction
*/
@@ -1042,13 +1028,10 @@ ScreenSpaceEventHandler.prototype.setInputAction = function (
/**
* Returns the function to be executed on an input event.
- *
* @param {ScreenSpaceEventType} type The ScreenSpaceEventType of input event.
* @param {KeyboardEventModifier} [modifier] A KeyboardEventModifier key that is held when a type
* event occurs.
- *
* @returns {ScreenSpaceEventHandler.PositionedEventCallback|ScreenSpaceEventHandler.MotionEventCallback|ScreenSpaceEventHandler.WheelEventCallback|ScreenSpaceEventHandler.TwoPointEventCallback|ScreenSpaceEventHandler.TwoPointMotionEventCallback} The function to be executed on an input event.
- *
* @see ScreenSpaceEventHandler#setInputAction
* @see ScreenSpaceEventHandler#removeInputAction
*/
@@ -1065,11 +1048,9 @@ ScreenSpaceEventHandler.prototype.getInputAction = function (type, modifier) {
/**
* Removes the function to be executed on an input event.
- *
* @param {ScreenSpaceEventType} type The ScreenSpaceEventType of input event.
* @param {KeyboardEventModifier} [modifier] A KeyboardEventModifier key that is held when a type
* event occurs.
- *
* @see ScreenSpaceEventHandler#getInputAction
* @see ScreenSpaceEventHandler#setInputAction
*/
@@ -1092,9 +1073,7 @@ ScreenSpaceEventHandler.prototype.removeInputAction = function (
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see ScreenSpaceEventHandler#destroy
*/
ScreenSpaceEventHandler.prototype.isDestroyed = function () {
@@ -1107,13 +1086,9 @@ ScreenSpaceEventHandler.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* handler = handler && handler.destroy();
- *
* @see ScreenSpaceEventHandler#isDestroyed
*/
ScreenSpaceEventHandler.prototype.destroy = function () {
diff --git a/packages/engine/Source/Core/ScreenSpaceEventType.js b/packages/engine/Source/Core/ScreenSpaceEventType.js
index cb5f633f39b4..b55f4b7d6648 100644
--- a/packages/engine/Source/Core/ScreenSpaceEventType.js
+++ b/packages/engine/Source/Core/ScreenSpaceEventType.js
@@ -1,12 +1,10 @@
/**
* This enumerated type is for classifying mouse events: down, up, click, double click, move and move while a button is held down.
- *
* @enum {number}
*/
const ScreenSpaceEventType = {
/**
* Represents a mouse left button down event.
- *
* @type {number}
* @constant
*/
@@ -14,7 +12,6 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse left button up event.
- *
* @type {number}
* @constant
*/
@@ -22,7 +19,6 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse left click event.
- *
* @type {number}
* @constant
*/
@@ -30,7 +26,6 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse left double click event.
- *
* @type {number}
* @constant
*/
@@ -38,7 +33,6 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse left button down event.
- *
* @type {number}
* @constant
*/
@@ -46,7 +40,6 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse right button up event.
- *
* @type {number}
* @constant
*/
@@ -54,7 +47,6 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse right click event.
- *
* @type {number}
* @constant
*/
@@ -62,7 +54,6 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse middle button down event.
- *
* @type {number}
* @constant
*/
@@ -70,7 +61,6 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse middle button up event.
- *
* @type {number}
* @constant
*/
@@ -78,7 +68,6 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse middle click event.
- *
* @type {number}
* @constant
*/
@@ -86,7 +75,6 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse move event.
- *
* @type {number}
* @constant
*/
@@ -94,7 +82,6 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse wheel event.
- *
* @type {number}
* @constant
*/
@@ -102,7 +89,6 @@ const ScreenSpaceEventType = {
/**
* Represents the start of a two-finger event on a touch surface.
- *
* @type {number}
* @constant
*/
@@ -110,7 +96,6 @@ const ScreenSpaceEventType = {
/**
* Represents the end of a two-finger event on a touch surface.
- *
* @type {number}
* @constant
*/
@@ -118,7 +103,6 @@ const ScreenSpaceEventType = {
/**
* Represents a change of a two-finger event on a touch surface.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/ShowGeometryInstanceAttribute.js b/packages/engine/Source/Core/ShowGeometryInstanceAttribute.js
index ddef78ca7af9..1fc3d308dba8 100644
--- a/packages/engine/Source/Core/ShowGeometryInstanceAttribute.js
+++ b/packages/engine/Source/Core/ShowGeometryInstanceAttribute.js
@@ -5,13 +5,9 @@ import DeveloperError from "./DeveloperError.js";
/**
* Value and type information for per-instance geometry attribute that determines if the geometry instance will be shown.
- *
* @alias ShowGeometryInstanceAttribute
- * @constructor
- *
- * @param {boolean} [show=true] Determines if the geometry instance will be shown.
- *
- *
+ * @class
+ * @param {boolean} [show] Determines if the geometry instance will be shown.
* @example
* const instance = new Cesium.GeometryInstance({
* geometry : new Cesium.BoxGeometry({
@@ -26,7 +22,6 @@ import DeveloperError from "./DeveloperError.js";
* show : new Cesium.ShowGeometryInstanceAttribute(false)
* }
* });
- *
* @see GeometryInstance
* @see GeometryInstanceAttribute
*/
@@ -35,9 +30,7 @@ function ShowGeometryInstanceAttribute(show) {
/**
* The values for the attributes stored in a typed array.
- *
* @type Uint8Array
- *
* @default [1.0]
*/
this.value = ShowGeometryInstanceAttribute.toValue(show);
@@ -47,12 +40,9 @@ Object.defineProperties(ShowGeometryInstanceAttribute.prototype, {
/**
* The datatype of each component in the attribute, e.g., individual elements in
* {@link ColorGeometryInstanceAttribute#value}.
- *
* @memberof ShowGeometryInstanceAttribute.prototype
- *
* @type {ComponentDatatype}
* @readonly
- *
* @default {@link ComponentDatatype.UNSIGNED_BYTE}
*/
componentDatatype: {
@@ -63,12 +53,9 @@ Object.defineProperties(ShowGeometryInstanceAttribute.prototype, {
/**
* The number of components in the attributes, i.e., {@link ColorGeometryInstanceAttribute#value}.
- *
* @memberof ShowGeometryInstanceAttribute.prototype
- *
* @type {number}
* @readonly
- *
* @default 1
*/
componentsPerAttribute: {
@@ -81,12 +68,9 @@ Object.defineProperties(ShowGeometryInstanceAttribute.prototype, {
* When true
and componentDatatype
is an integer format,
* indicate that the components should be mapped to the range [0, 1] (unsigned)
* or [-1, 1] (signed) when they are accessed as floating-point for rendering.
- *
* @memberof ShowGeometryInstanceAttribute.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
normalize: {
@@ -98,11 +82,9 @@ Object.defineProperties(ShowGeometryInstanceAttribute.prototype, {
/**
* Converts a boolean show to a typed array that can be used to assign a show attribute.
- *
* @param {boolean} show The show value.
* @param {Uint8Array} [result] The array to store the result in, if undefined a new instance will be created.
* @returns {Uint8Array} The modified result parameter or a new instance if result was undefined.
- *
* @example
* const attributes = primitive.getGeometryInstanceAttributes('an id');
* attributes.show = Cesium.ShowGeometryInstanceAttribute.toValue(true, attributes.show);
diff --git a/packages/engine/Source/Core/Simon1994PlanetaryPositions.js b/packages/engine/Source/Core/Simon1994PlanetaryPositions.js
index 9a26ab3eb886..cc71bc65191b 100644
--- a/packages/engine/Source/Core/Simon1994PlanetaryPositions.js
+++ b/packages/engine/Source/Core/Simon1994PlanetaryPositions.js
@@ -10,7 +10,6 @@ import TimeStandard from "./TimeStandard.js";
/**
* Contains functions for finding the Cartesian coordinates of the sun and the moon in the
* Earth-centered inertial frame.
- *
* @namespace Simon1994PlanetaryPositions
*/
const Simon1994PlanetaryPositions = {};
@@ -629,7 +628,6 @@ const axesTransformation = new Matrix3(
let translation = new Cartesian3();
/**
* Computes the position of the Sun in the Earth-centered inertial frame
- *
* @param {JulianDate} [julianDate] The time at which to compute the Sun's position, if not provided the current system time is used.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} Calculated sun position
@@ -661,7 +659,6 @@ Simon1994PlanetaryPositions.computeSunPositionInEarthInertialFrame = function (
/**
* Computes the position of the Moon in the Earth-centered inertial frame
- *
* @param {JulianDate} [julianDate] The time at which to compute the Sun's position, if not provided the current system time is used.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} Calculated moon position
diff --git a/packages/engine/Source/Core/SimplePolylineGeometry.js b/packages/engine/Source/Core/SimplePolylineGeometry.js
index cabcb2312d4b..dbfcb8eebc3f 100644
--- a/packages/engine/Source/Core/SimplePolylineGeometry.js
+++ b/packages/engine/Source/Core/SimplePolylineGeometry.js
@@ -58,21 +58,17 @@ function interpolateColors(p0, p1, color0, color1, minDistance, array, offset) {
/**
* A description of a polyline modeled as a line strip; the first two positions define a line segment,
* and each additional position defines a line segment from the previous position.
- *
* @alias SimplePolylineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of {@link Cartesian3} defining the positions in the polyline as a line strip.
* @param {Color[]} [options.colors] An Array of {@link Color} defining the per vertex or per segment colors.
- * @param {boolean} [options.colorsPerVertex=false] A boolean that determines whether the colors will be flat across each segment of the line or interpolated across the vertices.
- * @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polyline segments must follow.
- * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude if options.arcType is not ArcType.NONE. Determines the number of positions in the buffer.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
- *
- * @exception {DeveloperError} At least two positions are required.
- * @exception {DeveloperError} colors has an invalid length.
- *
+ * @param {boolean} [options.colorsPerVertex] A boolean that determines whether the colors will be flat across each segment of the line or interpolated across the vertices.
+ * @param {ArcType} [options.arcType] The type of line the polyline segments must follow.
+ * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude if options.arcType is not ArcType.NONE. Determines the number of positions in the buffer.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
+ * @throws {DeveloperError} At least two positions are required.
+ * @throws {DeveloperError} colors has an invalid length.
* @see SimplePolylineGeometry#createGeometry
*
* @example
@@ -129,11 +125,9 @@ function SimplePolylineGeometry(options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {SimplePolylineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
SimplePolylineGeometry.pack = function (value, array, startingIndex) {
@@ -178,9 +172,8 @@ SimplePolylineGeometry.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {SimplePolylineGeometry} [result] The object into which to store the result.
* @returns {SimplePolylineGeometry} The modified result parameter or a new SimplePolylineGeometry instance if one was not provided.
*/
@@ -249,7 +242,6 @@ const generateArcOptionsScratch = {
/**
* Computes the geometric representation of a simple polyline, including its vertices, indices, and a bounding sphere.
- *
* @param {SimplePolylineGeometry} simplePolylineGeometry A description of the polyline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/SphereGeometry.js b/packages/engine/Source/Core/SphereGeometry.js
index 14246063e2f2..9ea5bbe79440 100644
--- a/packages/engine/Source/Core/SphereGeometry.js
+++ b/packages/engine/Source/Core/SphereGeometry.js
@@ -7,19 +7,15 @@ import VertexFormat from "./VertexFormat.js";
/**
* A description of a sphere centered at the origin.
- *
* @alias SphereGeometry
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {number} [options.radius=1.0] The radius of the sphere.
- * @param {number} [options.stackPartitions=64] The number of times to partition the ellipsoid into stacks.
- * @param {number} [options.slicePartitions=64] The number of times to partition the ellipsoid into radial slices.
- * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- *
- * @exception {DeveloperError} options.slicePartitions cannot be less than three.
- * @exception {DeveloperError} options.stackPartitions cannot be less than three.
- *
+ * @param {number} [options.radius] The radius of the sphere.
+ * @param {number} [options.stackPartitions] The number of times to partition the ellipsoid into stacks.
+ * @param {number} [options.slicePartitions] The number of times to partition the ellipsoid into radial slices.
+ * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
+ * @throws {DeveloperError} options.slicePartitions cannot be less than three.
+ * @throws {DeveloperError} options.stackPartitions cannot be less than three.
* @see SphereGeometry#createGeometry
*
* @example
@@ -51,11 +47,9 @@ SphereGeometry.packedLength = EllipsoidGeometry.packedLength;
/**
* Stores the provided instance into the provided array.
- *
* @param {SphereGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
SphereGeometry.pack = function (value, array, startingIndex) {
@@ -77,9 +71,8 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {SphereGeometry} [result] The object into which to store the result.
* @returns {SphereGeometry} The modified result parameter or a new SphereGeometry instance if one was not provided.
*/
@@ -108,7 +101,6 @@ SphereGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of a sphere, including its vertices, indices, and a bounding sphere.
- *
* @param {SphereGeometry} sphereGeometry A description of the sphere.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/SphereOutlineGeometry.js b/packages/engine/Source/Core/SphereOutlineGeometry.js
index f8a182129a04..7018885fad84 100644
--- a/packages/engine/Source/Core/SphereOutlineGeometry.js
+++ b/packages/engine/Source/Core/SphereOutlineGeometry.js
@@ -6,19 +6,16 @@ import EllipsoidOutlineGeometry from "./EllipsoidOutlineGeometry.js";
/**
* A description of the outline of a sphere.
- *
* @alias SphereOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {number} [options.radius=1.0] The radius of the sphere.
- * @param {number} [options.stackPartitions=10] The count of stacks for the sphere (1 greater than the number of parallel lines).
- * @param {number} [options.slicePartitions=8] The count of slices for the sphere (Equal to the number of radial lines).
- * @param {number} [options.subdivisions=200] The number of points per line, determining the granularity of the curvature .
- *
- * @exception {DeveloperError} options.stackPartitions must be greater than or equal to one.
- * @exception {DeveloperError} options.slicePartitions must be greater than or equal to zero.
- * @exception {DeveloperError} options.subdivisions must be greater than or equal to zero.
+ * @param {number} [options.radius] The radius of the sphere.
+ * @param {number} [options.stackPartitions] The count of stacks for the sphere (1 greater than the number of parallel lines).
+ * @param {number} [options.slicePartitions] The count of slices for the sphere (Equal to the number of radial lines).
+ * @param {number} [options.subdivisions] The number of points per line, determining the granularity of the curvature .
+ * @throws {DeveloperError} options.stackPartitions must be greater than or equal to one.
+ * @throws {DeveloperError} options.slicePartitions must be greater than or equal to zero.
+ * @throws {DeveloperError} options.subdivisions must be greater than or equal to zero.
*
* @example
* const sphere = new Cesium.SphereOutlineGeometry({
@@ -50,11 +47,9 @@ SphereOutlineGeometry.packedLength = EllipsoidOutlineGeometry.packedLength;
/**
* Stores the provided instance into the provided array.
- *
* @param {SphereOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
SphereOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -80,9 +75,8 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {SphereOutlineGeometry} [result] The object into which to store the result.
* @returns {SphereOutlineGeometry} The modified result parameter or a new SphereOutlineGeometry instance if one was not provided.
*/
@@ -108,7 +102,6 @@ SphereOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an outline of a sphere, including its vertices, indices, and a bounding sphere.
- *
* @param {SphereOutlineGeometry} sphereGeometry A description of the sphere outline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/Spherical.js b/packages/engine/Source/Core/Spherical.js
index 57dca19407fd..7a96d35c639e 100644
--- a/packages/engine/Source/Core/Spherical.js
+++ b/packages/engine/Source/Core/Spherical.js
@@ -4,13 +4,11 @@ import defined from "./defined.js";
/**
* A set of curvilinear 3-dimensional coordinates.
- *
* @alias Spherical
- * @constructor
- *
- * @param {number} [clock=0.0] The angular coordinate lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
- * @param {number} [cone=0.0] The angular coordinate measured from the positive z-axis and toward the negative z-axis.
- * @param {number} [magnitude=1.0] The linear coordinate measured from the origin.
+ * @class
+ * @param {number} [clock] The angular coordinate lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
+ * @param {number} [cone] The angular coordinate measured from the positive z-axis and toward the negative z-axis.
+ * @param {number} [magnitude] The linear coordinate measured from the origin.
*/
function Spherical(clock, cone, magnitude) {
/**
@@ -35,7 +33,6 @@ function Spherical(clock, cone, magnitude) {
/**
* Converts the provided Cartesian3 into Spherical coordinates.
- *
* @param {Cartesian3} cartesian3 The Cartesian3 to be converted to Spherical.
* @param {Spherical} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Spherical} The modified result parameter, or a new instance if one was not provided.
@@ -62,7 +59,6 @@ Spherical.fromCartesian3 = function (cartesian3, result) {
/**
* Creates a duplicate of a Spherical.
- *
* @param {Spherical} spherical The spherical to clone.
* @param {Spherical} [result] The object to store the result into, if undefined a new instance will be created.
* @returns {Spherical} The modified result parameter or a new instance if result was undefined. (Returns undefined if spherical is undefined)
@@ -84,7 +80,6 @@ Spherical.clone = function (spherical, result) {
/**
* Computes the normalized version of the provided spherical.
- *
* @param {Spherical} spherical The spherical to be normalized.
* @param {Spherical} [result] The object to store the result into, if undefined a new instance will be created.
* @returns {Spherical} The modified result parameter or a new instance if result was undefined.
@@ -106,7 +101,6 @@ Spherical.normalize = function (spherical, result) {
/**
* Returns true if the first spherical is equal to the second spherical, false otherwise.
- *
* @param {Spherical} left The first Spherical to be compared.
* @param {Spherical} right The second Spherical to be compared.
* @returns {boolean} true if the first spherical is equal to the second spherical, false otherwise.
@@ -124,10 +118,9 @@ Spherical.equals = function (left, right) {
/**
* Returns true if the first spherical is within the provided epsilon of the second spherical, false otherwise.
- *
* @param {Spherical} left The first Spherical to be compared.
* @param {Spherical} right The second Spherical to be compared.
- * @param {number} [epsilon=0.0] The epsilon to compare against.
+ * @param {number} [epsilon] The epsilon to compare against.
* @returns {boolean} true if the first spherical is within the provided epsilon of the second spherical, false otherwise.
*/
Spherical.equalsEpsilon = function (left, right, epsilon) {
@@ -144,7 +137,6 @@ Spherical.equalsEpsilon = function (left, right, epsilon) {
/**
* Returns true if this spherical is equal to the provided spherical, false otherwise.
- *
* @param {Spherical} other The Spherical to be compared.
* @returns {boolean} true if this spherical is equal to the provided spherical, false otherwise.
*/
@@ -154,7 +146,6 @@ Spherical.prototype.equals = function (other) {
/**
* Creates a duplicate of this Spherical.
- *
* @param {Spherical} [result] The object to store the result into, if undefined a new instance will be created.
* @returns {Spherical} The modified result parameter or a new instance if result was undefined.
*/
@@ -164,7 +155,6 @@ Spherical.prototype.clone = function (result) {
/**
* Returns true if this spherical is within the provided epsilon of the provided spherical, false otherwise.
- *
* @param {Spherical} other The Spherical to be compared.
* @param {number} epsilon The epsilon to compare against.
* @returns {boolean} true if this spherical is within the provided epsilon of the provided spherical, false otherwise.
@@ -175,7 +165,6 @@ Spherical.prototype.equalsEpsilon = function (other, epsilon) {
/**
* Returns a string representing this instance in the format (clock, cone, magnitude).
- *
* @returns {string} A string representing this instance.
*/
Spherical.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/Spline.js b/packages/engine/Source/Core/Spline.js
index 5dba9c6d77e6..5e47d72067e1 100644
--- a/packages/engine/Source/Core/Spline.js
+++ b/packages/engine/Source/Core/Spline.js
@@ -8,10 +8,8 @@ import Quaternion from "./Quaternion.js";
/**
* Creates a curve parameterized and evaluated by time. This type describes an interface
* and is not intended to be instantiated directly.
- *
* @alias Spline
- * @constructor
- *
+ * @class
* @see CatmullRomSpline
* @see LinearSpline
* @see HermiteSpline
@@ -39,12 +37,9 @@ function Spline() {
/**
* Gets the type of the point. This helps a spline determine how to interpolate
* and return its values.
- *
* @param {number|Cartesian3|Quaternion} point
* @returns {*} The type of the point.
- *
- * @exception {DeveloperError} value must be a Cartesian3, Quaternion, or number.
- *
+ * @throws {DeveloperError} value must be a Cartesian3, Quaternion, or number.
* @private
*/
Spline.getPointType = function (point) {
@@ -68,12 +63,10 @@ Spline.getPointType = function (point) {
/**
* Evaluates the curve at a given time.
* @function
- *
* @param {number} time The time at which to evaluate the curve.
* @param {Cartesian3|Quaternion|number[]} [result] The object onto which to store the result.
* @returns {Cartesian3|Quaternion|number[]} The modified result parameter or a new instance of the point on the curve at the given time.
- *
- * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
@@ -82,12 +75,10 @@ Spline.prototype.evaluate = DeveloperError.throwInstantiationError;
/**
* Finds an index i
in times
such that the parameter
* time
is in the interval [times[i], times[i + 1]]
.
- *
* @param {number} time The time.
* @param {number} startIndex The index from which to start the search.
* @returns {number} The index for the element at the start of the interval.
- *
- * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
@@ -145,9 +136,8 @@ Spline.prototype.findTimeInterval = function (time, startIndex) {
/**
* Wraps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, wrapped around the animation period.
+ * @returns {number} The time, wrapped around the animation period.
*/
Spline.prototype.wrapTime = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -173,9 +163,8 @@ Spline.prototype.wrapTime = function (time) {
/**
* Clamps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, clamped to the animation period.
+ * @returns {number} The time, clamped to the animation period.
*/
Spline.prototype.clampTime = function (time) {
//>>includeStart('debug', pragmas.debug);
diff --git a/packages/engine/Source/Core/SteppedSpline.js b/packages/engine/Source/Core/SteppedSpline.js
index 4f3242a2f0db..f69c6e96f4c8 100644
--- a/packages/engine/Source/Core/SteppedSpline.js
+++ b/packages/engine/Source/Core/SteppedSpline.js
@@ -5,17 +5,13 @@ import Spline from "./Spline.js";
/**
* A spline that is composed of piecewise constants representing a step function.
- *
* @alias SteppedSpline
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {number[]} options.times An array of strictly increasing, unit-less, floating-point times at each point. The values are in no way connected to the clock time. They are the parameterization for the curve.
* @param {number[]|Cartesian3[]|Quaternion[]} options.points The array of control points.
- *
- * @exception {DeveloperError} points.length must be greater than or equal to 2.
- * @exception {DeveloperError} times.length must be equal to points.length.
- *
+ * @throws {DeveloperError} points.length must be greater than or equal to 2.
+ * @throws {DeveloperError} times.length must be equal to points.length.
* @example
* const times = [ 0.0, 1.5, 3.0, 4.5, 6.0 ];
* const spline = new Cesium.SteppedSpline({
@@ -30,7 +26,6 @@ import Spline from "./Spline.js";
* });
*
* const p0 = spline.evaluate(times[0]);
- *
* @see ConstantSpline
* @see CatmullRomSpline
* @see HermiteSpline
@@ -68,9 +63,7 @@ function SteppedSpline(options) {
Object.defineProperties(SteppedSpline.prototype, {
/**
* An array of times for the control points.
- *
* @memberof SteppedSpline.prototype
- *
* @type {number[]}
* @readonly
*/
@@ -82,9 +75,7 @@ Object.defineProperties(SteppedSpline.prototype, {
/**
* An array of control points.
- *
* @memberof SteppedSpline.prototype
- *
* @type {number[]|Cartesian3[]|Quaternion[]}
* @readonly
*/
@@ -99,12 +90,10 @@ Object.defineProperties(SteppedSpline.prototype, {
* Finds an index i
in times
such that the parameter
* time
is in the interval [times[i], times[i + 1]]
.
* @function
- *
* @param {number} time The time.
* @param {number} startIndex The index from which to start the search.
* @returns {number} The index for the element at the start of the interval.
- *
- * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
@@ -113,29 +102,25 @@ SteppedSpline.prototype.findTimeInterval = Spline.prototype.findTimeInterval;
/**
* Wraps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, wrapped around to the updated animation.
+ * @returns {number} The time, wrapped around to the updated animation.
*/
SteppedSpline.prototype.wrapTime = Spline.prototype.wrapTime;
/**
* Clamps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, clamped to the animation period.
+ * @returns {number} The time, clamped to the animation period.
*/
SteppedSpline.prototype.clampTime = Spline.prototype.clampTime;
/**
* Evaluates the curve at a given time.
- *
* @param {number} time The time at which to evaluate the curve.
* @param {Cartesian3|Quaternion} [result] The object onto which to store the result.
* @returns {number|Cartesian3|Quaternion} The modified result parameter or a new instance of the point on the curve at the given time.
- *
- * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
diff --git a/packages/engine/Source/Core/Stereographic.js b/packages/engine/Source/Core/Stereographic.js
index d632ab326c44..c679469935f3 100644
--- a/packages/engine/Source/Core/Stereographic.js
+++ b/packages/engine/Source/Core/Stereographic.js
@@ -98,8 +98,7 @@ const scratchCartesian = new Cartesian3();
/**
* Computes the latitude based on an ellipsoid.
- *
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which to compute the longitude.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid on which to compute the longitude.
* @returns {number} The latitude
*/
Stereographic.prototype.getLatitude = function (ellipsoid) {
@@ -124,7 +123,6 @@ const scratchProjectPointOntoPlaneCartesian3 = new Cartesian3();
/**
* Computes the projection of the provided 3D position onto the 2D polar plane, radially outward from the provided origin.
- *
* @param {Cartesian3} cartesian The point to project.
* @param {Stereographic} [result] The object onto which to store the result.
* @returns {Sterographic} The modified result parameter or a new Sterographic instance if none was provided.
@@ -174,7 +172,6 @@ Stereographic.fromCartesian = function (cartesian, result) {
/**
* Computes the projection of the provided 3D positions onto the 2D polar plane, radially outward from the provided origin.
- *
* @param {Cartesian3[]} cartesians The points to project.
* @param {Stereographic[]} [result] The object onto which to store the result.
* @returns {Sterographic[]} The modified result parameter or a new Sterographic instance if none was provided.
@@ -198,7 +195,6 @@ Stereographic.fromCartesianArray = function (cartesians, result) {
/**
* Duplicates a Stereographic instance.
- *
* @param {Stereographic} stereographic The Stereographic to duplicate.
* @param {Stereographic} [result] The object onto which to store the result.
* @returns {Stereographic} The modified result parameter or a new Stereographic instance if one was not provided. (Returns undefined if stereographic is undefined)
@@ -222,7 +218,6 @@ Stereographic.clone = function (stereographic, result) {
/**
* An Ellipsoid instance initialized to radii of (0.5, 0.5, 0.5).
- *
* @type {Stereographic}
* @constant
*/
diff --git a/packages/engine/Source/Core/TaskProcessor.js b/packages/engine/Source/Core/TaskProcessor.js
index 9eca8d863e1b..31e3e32a89f8 100644
--- a/packages/engine/Source/Core/TaskProcessor.js
+++ b/packages/engine/Source/Core/TaskProcessor.js
@@ -173,12 +173,10 @@ async function getWebAssemblyLoaderConfig(processor, wasmOptions) {
* returning results asynchronously via a promise.
*
* The Worker is not constructed until a task is scheduled.
- *
* @alias TaskProcessor
- * @constructor
- *
+ * @class
* @param {string} workerPath The Url to the worker. This can either be an absolute path or relative to the Cesium Workers folder.
- * @param {number} [maximumActiveTasks=Number.POSITIVE_INFINITY] The maximum number of active tasks. Once exceeded,
+ * @param {number} [maximumActiveTasks] The maximum number of active tasks. Once exceeded,
* scheduleTask will not queue any more tasks, allowing
* work to be rescheduled in future frames.
*/
@@ -272,13 +270,11 @@ async function scheduleTask(processor, parameters, transferableObjects) {
* tasks active than the maximum set by the constructor, will immediately return undefined.
* Otherwise, returns a promise that will resolve to the result posted back by the worker when
* finished.
- *
* @param {object} parameters Any input data that will be posted to the worker.
- * @param {Object[]} [transferableObjects] An array of objects contained in parameters that should be
+ * @param {object[]} [transferableObjects] An array of objects contained in parameters that should be
* transferred to the worker instead of copied.
* @returns {Promise|undefined} Either a promise that will resolve to the result when available, or undefined
* if there are too many active tasks,
- *
* @example
* const taskProcessor = new Cesium.TaskProcessor('myWorkerPath');
* const promise = taskProcessor.scheduleTask({
@@ -312,14 +308,12 @@ TaskProcessor.prototype.scheduleTask = function (
* Posts a message to a web worker with configuration to initialize loading
* and compiling a web assembly module asynchronously, as well as an optional
* fallback JavaScript module to use if Web Assembly is not supported.
- *
* @param {object} [webAssemblyOptions] An object with the following properties:
* @param {string} [webAssemblyOptions.modulePath] The path of the web assembly JavaScript wrapper module.
* @param {string} [webAssemblyOptions.wasmBinaryFile] The path of the web assembly binary file.
* @param {string} [webAssemblyOptions.fallbackModulePath] The path of the fallback JavaScript module to use if web assembly is not supported.
* @returns {Promise<*>} A promise that resolves to the result when the web worker has loaded and compiled the web assembly module and is ready to process tasks.
- *
- * @exception {RuntimeError} This browser does not support Web Assembly, and no backup module was provided
+ * @throws {RuntimeError} This browser does not support Web Assembly, and no backup module was provided
*/
TaskProcessor.prototype.initWebAssemblyModule = async function (
webAssemblyOptions
@@ -371,9 +365,7 @@ TaskProcessor.prototype.initWebAssemblyModule = async function (
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
- *
* @see TaskProcessor#destroy
*/
TaskProcessor.prototype.isDestroyed = function () {
@@ -396,9 +388,7 @@ TaskProcessor.prototype.destroy = function () {
/**
* An event that's raised when a task is completed successfully. Event handlers are passed
* the error object is a task fails.
- *
* @type {Event}
- *
* @private
*/
TaskProcessor.taskCompletedEvent = taskCompletedEvent;
diff --git a/packages/engine/Source/Core/TerrainData.js b/packages/engine/Source/Core/TerrainData.js
index 029c30687e1e..7e632d67e3e3 100644
--- a/packages/engine/Source/Core/TerrainData.js
+++ b/packages/engine/Source/Core/TerrainData.js
@@ -3,10 +3,8 @@ import DeveloperError from "./DeveloperError.js";
/**
* Terrain data for a single tile. This type describes an
* interface and is not intended to be instantiated directly.
- *
* @alias TerrainData
- * @constructor
- *
+ * @class
* @see HeightmapTerrainData
* @see QuantizedMeshTerrainData
* @see GoogleEarthEnterpriseTerrainData
@@ -39,7 +37,6 @@ Object.defineProperties(TerrainData.prototype, {
/**
* Computes the terrain height at a specified longitude and latitude.
* @function
- *
* @param {Rectangle} rectangle The rectangle covered by this terrain data.
* @param {number} longitude The longitude in radians.
* @param {number} latitude The latitude in radians.
@@ -56,7 +53,6 @@ TerrainData.prototype.interpolateHeight =
* to be one of the four children of this tile. If non-child tile coordinates are
* given, the availability of the southeast child tile is returned.
* @function
- *
* @param {number} thisX The tile X coordinate of this (the parent) tile.
* @param {number} thisY The tile Y coordinate of this (the parent) tile.
* @param {number} childX The tile X coordinate of the child tile to check for availability.
@@ -68,9 +64,7 @@ TerrainData.prototype.isChildAvailable = DeveloperError.throwInstantiationError;
/**
* Creates a {@link TerrainMesh} from this terrain data.
* @function
- *
* @private
- *
* @param {object} options Object with the following properties:
* @param {TilingScheme} options.tilingScheme The tiling scheme to which this tile belongs.
* @param {number} options.x The X coordinate of the tile for which to create the terrain data.
@@ -88,7 +82,6 @@ TerrainData.prototype.createMesh = DeveloperError.throwInstantiationError;
/**
* Upsamples this terrain data for use by a descendant tile.
* @function
- *
* @param {TilingScheme} tilingScheme The tiling scheme of this terrain data.
* @param {number} thisX The X coordinate of this tile in the tiling scheme.
* @param {number} thisY The Y coordinate of this tile in the tiling scheme.
@@ -108,7 +101,6 @@ TerrainData.prototype.upsample = DeveloperError.throwInstantiationError;
* as by downloading it from a remote server. This method should return true for instances
* returned from a call to {@link TerrainData#upsample}.
* @function
- *
* @returns {boolean} True if this instance was created by upsampling; otherwise, false.
*/
TerrainData.prototype.wasCreatedByUpsampling =
@@ -116,7 +108,6 @@ TerrainData.prototype.wasCreatedByUpsampling =
/**
* The maximum number of asynchronous tasks used for terrain processing.
- *
* @type {number}
* @private
*/
diff --git a/packages/engine/Source/Core/TerrainEncoding.js b/packages/engine/Source/Core/TerrainEncoding.js
index d688341f25b9..1aa3dca5bd92 100644
--- a/packages/engine/Source/Core/TerrainEncoding.js
+++ b/packages/engine/Source/Core/TerrainEncoding.js
@@ -20,21 +20,18 @@ const SHIFT_LEFT_12 = Math.pow(2.0, 12.0);
/**
* Data used to quantize and pack the terrain mesh. The position can be unpacked for picking and all attributes
* are unpacked in the vertex shader.
- *
* @alias TerrainEncoding
- * @constructor
- *
+ * @class
* @param {Cartesian3} center The center point of the vertices.
* @param {AxisAlignedBoundingBox} axisAlignedBoundingBox The bounds of the tile in the east-north-up coordinates at the tiles center.
* @param {number} minimumHeight The minimum height.
* @param {number} maximumHeight The maximum height.
* @param {Matrix4} fromENU The east-north-up to fixed frame matrix at the center of the terrain mesh.
* @param {boolean} hasVertexNormals If the mesh has vertex normals.
- * @param {boolean} [hasWebMercatorT=false] true if the terrain data includes a Web Mercator texture coordinate; otherwise, false.
- * @param {boolean} [hasGeodeticSurfaceNormals=false] true if the terrain data includes geodetic surface normals; otherwise, false.
- * @param {number} [exaggeration=1.0] A scalar used to exaggerate terrain.
- * @param {number} [exaggerationRelativeHeight=0.0] The relative height from which terrain is exaggerated.
- *
+ * @param {boolean} [hasWebMercatorT] true if the terrain data includes a Web Mercator texture coordinate; otherwise, false.
+ * @param {boolean} [hasGeodeticSurfaceNormals] true if the terrain data includes geodetic surface normals; otherwise, false.
+ * @param {number} [exaggeration] A scalar used to exaggerate terrain.
+ * @param {number} [exaggerationRelativeHeight] The relative height from which terrain is exaggerated.
* @private
*/
function TerrainEncoding(
diff --git a/packages/engine/Source/Core/TerrainMesh.js b/packages/engine/Source/Core/TerrainMesh.js
index 60a939b5404b..04e1a7e51b47 100644
--- a/packages/engine/Source/Core/TerrainMesh.js
+++ b/packages/engine/Source/Core/TerrainMesh.js
@@ -3,10 +3,8 @@ import defaultValue from "./defaultValue.js";
/**
* A mesh plus related metadata for a single tile of terrain. Instances of this type are
* usually created from raw {@link TerrainData}.
- *
* @alias TerrainMesh
- * @constructor
- *
+ * @class
* @param {Cartesian3} center The center of the tile. Vertex positions are specified relative to this center.
* @param {Float32Array} vertices The vertex data, including positions, texture coordinates, and heights.
* The vertex data is in the order [X, Y, Z, H, U, V], where X, Y, and Z represent
@@ -21,14 +19,13 @@ import defaultValue from "./defaultValue.js";
* @param {Cartesian3} occludeePointInScaledSpace The occludee point of the tile, represented in ellipsoid-
* scaled space, and used for horizon culling. If this point is below the horizon,
* the tile is considered to be entirely below the horizon.
- * @param {number} [vertexStride=6] The number of components in each vertex.
+ * @param {number} [vertexStride] The number of components in each vertex.
* @param {OrientedBoundingBox} [orientedBoundingBox] A bounding box that completely contains the tile.
* @param {TerrainEncoding} encoding Information used to decode the mesh.
* @param {number[]} westIndicesSouthToNorth The indices of the vertices on the Western edge of the tile, ordered from South to North (clockwise).
* @param {number[]} southIndicesEastToWest The indices of the vertices on the Southern edge of the tile, ordered from East to West (clockwise).
* @param {number[]} eastIndicesNorthToSouth The indices of the vertices on the Eastern edge of the tile, ordered from North to South (clockwise).
* @param {number[]} northIndicesWestToEast The indices of the vertices on the Northern edge of the tile, ordered from West to East (clockwise).
- *
* @private
*/
function TerrainMesh(
diff --git a/packages/engine/Source/Core/TerrainProvider.js b/packages/engine/Source/Core/TerrainProvider.js
index 6478b2eeb3a4..cc14f89bdb77 100644
--- a/packages/engine/Source/Core/TerrainProvider.js
+++ b/packages/engine/Source/Core/TerrainProvider.js
@@ -7,10 +7,8 @@ import CesiumMath from "./Math.js";
* Provides terrain or other geometry for the surface of an ellipsoid. The surface geometry is
* organized into a pyramid of tiles according to a {@link TilingScheme}. This type describes an
* interface and is not intended to be instantiated directly.
- *
* @alias TerrainProvider
- * @constructor
- *
+ * @class
* @see EllipsoidTerrainProvider
* @see CesiumTerrainProvider
* @see VRTheWorldTerrainProvider
@@ -96,7 +94,6 @@ const regularGridIndicesCache = [];
* this function multiple times with the same grid width and height returns the
* same list of indices. The total number of vertices must be less than or equal
* to 65536.
- *
* @param {number} width The number of vertices in the regular grid in the horizontal direction.
* @param {number} height The number of vertices in the regular grid in the vertical direction.
* @returns {Uint16Array|Uint32Array} The list of indices. Uint16Array gets returned for 64KB or less and Uint32Array for 4GB or less.
@@ -135,6 +132,8 @@ TerrainProvider.getRegularGridIndices = function (width, height) {
const regularGridAndEdgeIndicesCache = [];
/**
+ * @param width
+ * @param height
* @private
*/
TerrainProvider.getRegularGridIndicesAndEdgeIndices = function (width, height) {
@@ -176,6 +175,8 @@ TerrainProvider.getRegularGridIndicesAndEdgeIndices = function (width, height) {
const regularGridAndSkirtAndEdgeIndicesCache = [];
/**
+ * @param width
+ * @param height
* @private
*/
TerrainProvider.getRegularGridAndSkirtIndicesAndEdgeIndices = function (
@@ -236,6 +237,13 @@ TerrainProvider.getRegularGridAndSkirtIndicesAndEdgeIndices = function (
};
/**
+ * @param westIndicesSouthToNorth
+ * @param southIndicesEastToWest
+ * @param eastIndicesNorthToSouth
+ * @param northIndicesWestToEast
+ * @param vertexCount
+ * @param indices
+ * @param offset
* @private
*/
TerrainProvider.addSkirtIndices = function (
@@ -353,7 +361,6 @@ TerrainProvider.heightmapTerrainQuality = 0.25;
/**
* Determines an appropriate geometric error estimate when the geometry comes from a heightmap.
- *
* @param {Ellipsoid} ellipsoid The ellipsoid to which the terrain is attached.
* @param {number} tileImageWidth The width, in pixels, of the heightmap associated with a single tile.
* @param {number} numberOfTilesAtLevelZero The number of tiles in the horizontal direction at tile level zero.
@@ -377,12 +384,10 @@ TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap = function (
* Requests the geometry for a given tile. The result must include terrain data and
* may optionally include a water mask and an indication of which child tiles are available.
* @function
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
* @param {Request} [request] The request object. Intended for internal use only.
- *
* @returns {Promise|undefined} A promise for the requested geometry. If this method
* returns undefined instead of a promise, it is an indication that too many requests are already
* pending and the request will be retried later.
@@ -393,7 +398,6 @@ TerrainProvider.prototype.requestTileGeometry =
/**
* Gets the maximum geometric error allowed in a tile at a given level.
* @function
- *
* @param {number} level The tile level for which to get the maximum geometric error.
* @returns {number} The maximum geometric error.
*/
@@ -403,7 +407,6 @@ TerrainProvider.prototype.getLevelMaximumGeometricError =
/**
* Determines whether data for a tile is available to be loaded.
* @function
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -415,7 +418,6 @@ TerrainProvider.prototype.getTileDataAvailable =
/**
* Makes sure we load availability data for a tile
* @function
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -428,7 +430,6 @@ export default TerrainProvider;
/**
* A function that is called when an error occurs.
* @callback TerrainProvider.ErrorEvent
- *
* @this TerrainProvider
* @param {TileProviderError} err An object holding details about the error that occurred.
*/
diff --git a/packages/engine/Source/Core/TerrainQuantization.js b/packages/engine/Source/Core/TerrainQuantization.js
index 8e623e6ca988..5c867e4f1aff 100644
--- a/packages/engine/Source/Core/TerrainQuantization.js
+++ b/packages/engine/Source/Core/TerrainQuantization.js
@@ -1,14 +1,11 @@
/**
* This enumerated type is used to determine how the vertices of the terrain mesh are compressed.
- *
* @enum {number}
- *
* @private
*/
const TerrainQuantization = {
/**
* The vertices are not compressed.
- *
* @type {number}
* @constant
*/
@@ -16,7 +13,6 @@ const TerrainQuantization = {
/**
* The vertices are compressed to 12 bits.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/TileAvailability.js b/packages/engine/Source/Core/TileAvailability.js
index 0a6a74a3eed7..5d97d4e95352 100644
--- a/packages/engine/Source/Core/TileAvailability.js
+++ b/packages/engine/Source/Core/TileAvailability.js
@@ -5,10 +5,8 @@ import Rectangle from "./Rectangle.js";
/**
* Reports the availability of tiles in a {@link TilingScheme}.
- *
* @alias TileAvailability
- * @constructor
- *
+ * @class
* @param {TilingScheme} tilingScheme The tiling scheme in which to report availability.
* @param {number} maximumLevel The maximum tile level that is potentially available.
*/
@@ -36,7 +34,6 @@ function findNode(level, x, y, nodes) {
/**
* Marks a rectangular range of tiles in a particular level as being available. For best performance,
* add your ranges in order of increasing level.
- *
* @param {number} level The level.
* @param {number} startX The X coordinate of the first available tiles at the level.
* @param {number} startY The Y coordinate of the first available tiles at the level.
@@ -91,9 +88,8 @@ TileAvailability.prototype.addAvailableTileRange = function (
* Determines the level of the most detailed tile covering the position. This function
* usually completes in time logarithmic to the number of rectangles added with
* {@link TileAvailability#addAvailableTileRange}.
- *
* @param {Cartographic} position The position for which to determine the maximum available level. The height component is ignored.
- * @return {number} The level of the most detailed tile covering the position.
+ * @returns {number} The level of the most detailed tile covering the position.
* @throws {DeveloperError} If position is outside any tile according to the tiling scheme.
*/
TileAvailability.prototype.computeMaximumLevelAtPosition = function (position) {
@@ -125,9 +121,8 @@ const eastScratch = new Rectangle();
* function may be safely passed to {@link sampleTerrain} for any position within the rectangle. This function
* usually completes in time logarithmic to the number of rectangles added with
* {@link TileAvailability#addAvailableTileRange}.
- *
* @param {Rectangle} rectangle The rectangle.
- * @return {number} The best available level for the entire rectangle.
+ * @returns {number} The best available level for the entire rectangle.
*/
TileAvailability.prototype.computeBestAvailableLevelOverRectangle = function (
rectangle
@@ -190,7 +185,7 @@ const cartographicScratch = new Cartographic();
* @param {number} level The tile level to check.
* @param {number} x The X coordinate of the tile to check.
* @param {number} y The Y coordinate of the tile to check.
- * @return {boolean} True if the tile is available; otherwise, false.
+ * @returns {boolean} True if the tile is available; otherwise, false.
*/
TileAvailability.prototype.isTileAvailable = function (level, x, y) {
// Get the center of the tile and find the maximum level at that position.
@@ -213,17 +208,16 @@ TileAvailability.prototype.isTileAvailable = function (level, x, y) {
* If a child's bit is set, a tile is available for that child. If it is cleared,
* the tile is not available. The bit values are as follows:
*
- * Bit Position Bit Value Child Tile
- * 0 1 Southwest
- * 1 2 Southeast
- * 2 4 Northwest
- * 3 8 Northeast
+ * Bit Position Bit Value Child Tile
+ * 0 1 Southwest
+ * 1 2 Southeast
+ * 2 4 Northwest
+ * 3 8 Northeast
*
- *
* @param {number} level The level of the parent tile.
* @param {number} x The X coordinate of the parent tile.
* @param {number} y The Y coordinate of the parent tile.
- * @return {number} The bit mask indicating child availability.
+ * @returns {number} The bit mask indicating child availability.
*/
TileAvailability.prototype.computeChildMaskForTile = function (level, x, y) {
const childLevel = level + 1;
diff --git a/packages/engine/Source/Core/TileProviderError.js b/packages/engine/Source/Core/TileProviderError.js
index 97fd0320dcb3..ccba271261be 100644
--- a/packages/engine/Source/Core/TileProviderError.js
+++ b/packages/engine/Source/Core/TileProviderError.js
@@ -4,10 +4,8 @@ import formatError from "./formatError.js";
/**
* Provides details about an error that occurred in an {@link ImageryProvider} or a {@link TerrainProvider}.
- *
* @alias TileProviderError
- * @constructor
- *
+ * @class
* @param {ImageryProvider|TerrainProvider} provider The imagery or terrain provider that experienced the error.
* @param {string} message A message describing the error.
* @param {number} [x] The X coordinate of the tile that experienced the error, or undefined if the error
@@ -16,7 +14,7 @@ import formatError from "./formatError.js";
* is not specific to a particular tile.
* @param {number} [level] The level of the tile that experienced the error, or undefined if the error
* is not specific to a particular tile.
- * @param {number} [timesRetried=0] The number of times this operation has been retried.
+ * @param {number} [timesRetried] The number of times this operation has been retried.
* @param {Error} [error] The error or exception that occurred, if any.
*/
function TileProviderError(
@@ -88,7 +86,6 @@ function TileProviderError(
* Reports an error in an {@link ImageryProvider} or {@link TerrainProvider} by raising an event if it has any listeners, or by
* logging the error to the console if the event has no listeners. This method also tracks the number
* of times the operation has been retried.
- *
* @param {TileProviderError} previousError The error instance returned by this function the last
* time it was called for this error, or undefined if this is the first time this error has
* occurred.
@@ -154,7 +151,6 @@ TileProviderError.reportError = function (
/**
* Reports success of an operation by resetting the retry count of a previous error, if any. This way,
* if the error occurs again in the future, the listeners will be informed that it has not yet been retried.
- *
* @param {TileProviderError} previousError The previous error, or undefined if this operation has
* not previously resulted in an error.
*/
diff --git a/packages/engine/Source/Core/TilingScheme.js b/packages/engine/Source/Core/TilingScheme.js
index 7429de380a95..014258ee054b 100644
--- a/packages/engine/Source/Core/TilingScheme.js
+++ b/packages/engine/Source/Core/TilingScheme.js
@@ -6,10 +6,9 @@ import DeveloperError from "./DeveloperError.js";
* At level of detail one, each of the level zero tiles has four children, two in each direction.
* At level of detail two, each of the level one tiles has four children, two in each direction.
* This continues for as many levels as are present in the geometry or imagery source.
- *
+ * @param options
* @alias TilingScheme
- * @constructor
- *
+ * @class
* @see WebMercatorTilingScheme
* @see GeographicTilingScheme
*/
@@ -53,7 +52,6 @@ Object.defineProperties(TilingScheme.prototype, {
/**
* Gets the total number of tiles in the X direction at a specified level-of-detail.
* @function
- *
* @param {number} level The level-of-detail.
* @returns {number} The number of tiles in the X direction at the given level.
*/
@@ -63,7 +61,6 @@ TilingScheme.prototype.getNumberOfXTilesAtLevel =
/**
* Gets the total number of tiles in the Y direction at a specified level-of-detail.
* @function
- *
* @param {number} level The level-of-detail.
* @returns {number} The number of tiles in the Y direction at the given level.
*/
@@ -74,7 +71,6 @@ TilingScheme.prototype.getNumberOfYTilesAtLevel =
* Transforms a rectangle specified in geodetic radians to the native coordinate system
* of this tiling scheme.
* @function
- *
* @param {Rectangle} rectangle The rectangle to transform.
* @param {Rectangle} [result] The instance to which to copy the result, or undefined if a new instance
* should be created.
@@ -88,7 +84,6 @@ TilingScheme.prototype.rectangleToNativeRectangle =
* Converts tile x, y coordinates and level to a rectangle expressed in the native coordinates
* of the tiling scheme.
* @function
- *
* @param {number} x The integer x coordinate of the tile.
* @param {number} y The integer y coordinate of the tile.
* @param {number} level The tile level-of-detail. Zero is the least detailed.
@@ -103,7 +98,6 @@ TilingScheme.prototype.tileXYToNativeRectangle =
/**
* Converts tile x, y coordinates and level to a cartographic rectangle in radians.
* @function
- *
* @param {number} x The integer x coordinate of the tile.
* @param {number} y The integer y coordinate of the tile.
* @param {number} level The tile level-of-detail. Zero is the least detailed.
@@ -119,7 +113,6 @@ TilingScheme.prototype.tileXYToRectangle =
* Calculates the tile x, y coordinates of the tile containing
* a given cartographic position.
* @function
- *
* @param {Cartographic} position The position.
* @param {number} level The tile level-of-detail. Zero is the least detailed.
* @param {Cartesian2} [result] The instance to which to copy the result, or undefined if a new instance
diff --git a/packages/engine/Source/Core/TimeConstants.js b/packages/engine/Source/Core/TimeConstants.js
index 72ae3cad38d7..ee0798f86074 100644
--- a/packages/engine/Source/Core/TimeConstants.js
+++ b/packages/engine/Source/Core/TimeConstants.js
@@ -1,10 +1,7 @@
/**
* Constants for time conversions like those done by {@link JulianDate}.
- *
* @namespace TimeConstants
- *
* @see JulianDate
- *
* @private
*/
const TimeConstants = {
diff --git a/packages/engine/Source/Core/TimeInterval.js b/packages/engine/Source/Core/TimeInterval.js
index 6350ce23ca35..8b474b13bb52 100644
--- a/packages/engine/Source/Core/TimeInterval.js
+++ b/packages/engine/Source/Core/TimeInterval.js
@@ -7,17 +7,14 @@ import JulianDate from "./JulianDate.js";
/**
* An interval defined by a start and a stop time; optionally including those times as part of the interval.
* Arbitrary data can optionally be associated with each instance for used with {@link TimeIntervalCollection}.
- *
* @alias TimeInterval
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {JulianDate} [options.start=new JulianDate()] The start time of the interval.
- * @param {JulianDate} [options.stop=new JulianDate()] The stop time of the interval.
- * @param {boolean} [options.isStartIncluded=true] true
if options.start
is included in the interval, false
otherwise.
- * @param {boolean} [options.isStopIncluded=true] true
if options.stop
is included in the interval, false
otherwise.
+ * @param {JulianDate} [options.start] The start time of the interval.
+ * @param {JulianDate} [options.stop] The stop time of the interval.
+ * @param {boolean} [options.isStartIncluded] true
if options.start
is included in the interval, false
otherwise.
+ * @param {boolean} [options.isStopIncluded] true
if options.stop
is included in the interval, false
otherwise.
* @param {object} [options.data] Arbitrary data associated with this interval.
- *
* @example
* // Create an instance that spans August 1st, 1980 and is associated
* // with a Cartesian position.
@@ -28,7 +25,6 @@ import JulianDate from "./JulianDate.js";
* isStopIncluded : false,
* data : Cesium.Cartesian3.fromDegrees(39.921037, -75.170082)
* });
- *
* @example
* // Create two instances from ISO 8601 intervals with associated numeric data
* // then compute their intersection, summing the data they contain.
@@ -51,7 +47,6 @@ import JulianDate from "./JulianDate.js";
* Cesium.TimeInterval.intersect(left, right, intersection, function(leftData, rightData) {
* return leftData + rightData;
* });
- *
* @example
* // Check if an interval contains a specific time.
* const dateToCheck = Cesium.JulianDate.fromIso8601('1982-09-08T11:30:00Z');
@@ -125,13 +120,11 @@ const scratchInterval = {
/**
* Creates a new instance from a {@link http://en.wikipedia.org/wiki/ISO_8601|ISO 8601} interval.
- *
* @throws DeveloperError if options.iso8601 does not match proper formatting.
- *
* @param {object} options Object with the following properties:
* @param {string} options.iso8601 An ISO 8601 interval.
- * @param {boolean} [options.isStartIncluded=true] true
if options.start
is included in the interval, false
otherwise.
- * @param {boolean} [options.isStopIncluded=true] true
if options.stop
is included in the interval, false
otherwise.
+ * @param {boolean} [options.isStartIncluded] true
if options.start
is included in the interval, false
otherwise.
+ * @param {boolean} [options.isStopIncluded] true
if options.stop
is included in the interval, false
otherwise.
* @param {object} [options.data] Arbitrary data associated with this interval.
* @param {TimeInterval} [result] An existing instance to use for the result.
* @returns {TimeInterval} The modified result parameter or a new instance if none was provided.
@@ -173,7 +166,6 @@ TimeInterval.fromIso8601 = function (options, result) {
/**
* Creates an ISO8601 representation of the provided interval.
- *
* @param {TimeInterval} timeInterval The interval to be converted.
* @param {number} [precision] The number of fractional digits used to represent the seconds component. By default, the most precise representation is used.
* @returns {string} The ISO8601 representation of the provided interval.
@@ -191,7 +183,6 @@ TimeInterval.toIso8601 = function (timeInterval, precision) {
/**
* Duplicates the provided instance.
- *
* @param {TimeInterval} [timeInterval] The instance to clone.
* @param {TimeInterval} [result] An existing instance to use for the result.
* @returns {TimeInterval} The modified result parameter or a new instance if none was provided.
@@ -213,7 +204,6 @@ TimeInterval.clone = function (timeInterval, result) {
/**
* Compares two instances and returns true
if they are equal, false
otherwise.
- *
* @param {TimeInterval} [left] The first instance.
* @param {TimeInterval} [right] The second instance.
* @param {TimeInterval.DataComparer} [dataComparer] A function which compares the data of the two intervals. If omitted, reference equality is used.
@@ -239,10 +229,9 @@ TimeInterval.equals = function (left, right, dataComparer) {
* each other. That is, in order for the dates to be considered equal (and for
* this function to return true
), the absolute value of the difference between them, in
* seconds, must be less than epsilon
.
- *
* @param {TimeInterval} [left] The first instance.
* @param {TimeInterval} [right] The second instance.
- * @param {number} [epsilon=0] The maximum number of seconds that should separate the two instances.
+ * @param {number} [epsilon] The maximum number of seconds that should separate the two instances.
* @param {TimeInterval.DataComparer} [dataComparer] A function which compares the data of the two intervals. If omitted, reference equality is used.
* @returns {boolean} true
if the two dates are within epsilon
seconds of each other; otherwise false
.
*/
@@ -265,7 +254,6 @@ TimeInterval.equalsEpsilon = function (left, right, epsilon, dataComparer) {
/**
* Computes the intersection of two intervals, optionally merging their data.
- *
* @param {TimeInterval} left The first interval.
* @param {TimeInterval} [right] The second interval.
* @param {TimeInterval} [result] An existing instance to use for the result.
@@ -328,7 +316,6 @@ TimeInterval.intersect = function (left, right, result, mergeCallback) {
/**
* Checks if the specified date is inside the provided interval.
- *
* @param {TimeInterval} timeInterval The interval.
* @param {JulianDate} julianDate The date to check.
* @returns {boolean} true
if the interval contains the specified date, false
otherwise.
@@ -361,7 +348,6 @@ TimeInterval.contains = function (timeInterval, julianDate) {
/**
* Duplicates this instance.
- *
* @param {TimeInterval} [result] An existing instance to use for the result.
* @returns {TimeInterval} The modified result parameter or a new instance if none was provided.
*/
@@ -372,7 +358,6 @@ TimeInterval.prototype.clone = function (result) {
/**
* Compares this instance against the provided instance componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {TimeInterval} [right] The right hand side interval.
* @param {TimeInterval.DataComparer} [dataComparer] A function which compares the data of the two intervals. If omitted, reference equality is used.
* @returns {boolean} true
if they are equal, false
otherwise.
@@ -385,9 +370,8 @@ TimeInterval.prototype.equals = function (right, dataComparer) {
* Compares this instance against the provided instance componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
- *
* @param {TimeInterval} [right] The right hand side interval.
- * @param {number} [epsilon=0] The epsilon to use for equality testing.
+ * @param {number} [epsilon] The epsilon to use for equality testing.
* @param {TimeInterval.DataComparer} [dataComparer] A function which compares the data of the two intervals. If omitted, reference equality is used.
* @returns {boolean} true
if they are within the provided epsilon, false
otherwise.
*/
@@ -397,7 +381,6 @@ TimeInterval.prototype.equalsEpsilon = function (right, epsilon, dataComparer) {
/**
* Creates a string representing this TimeInterval in ISO8601 format.
- *
* @returns {string} A string representing this TimeInterval in ISO8601 format.
*/
TimeInterval.prototype.toString = function () {
@@ -406,7 +389,6 @@ TimeInterval.prototype.toString = function () {
/**
* An immutable empty interval.
- *
* @type {TimeInterval}
* @constant
*/
@@ -422,7 +404,6 @@ TimeInterval.EMPTY = Object.freeze(
/**
* Function interface for merging interval data.
* @callback TimeInterval.MergeCallback
- *
* @param {*} leftData The first data instance.
* @param {*} rightData The second data instance.
* @returns {*} The result of merging the two data instances.
diff --git a/packages/engine/Source/Core/TimeIntervalCollection.js b/packages/engine/Source/Core/TimeIntervalCollection.js
index 0d17ace07214..fba4812d475f 100644
--- a/packages/engine/Source/Core/TimeIntervalCollection.js
+++ b/packages/engine/Source/Core/TimeIntervalCollection.js
@@ -16,8 +16,7 @@ function compareIntervalStartTimes(left, right) {
/**
* A non-overlapping collection of {@link TimeInterval} instances sorted by start time.
* @alias TimeIntervalCollection
- * @constructor
- *
+ * @class
* @param {TimeInterval[]} [intervals] An array of intervals to add to the collection.
*/
function TimeIntervalCollection(intervals) {
@@ -127,7 +126,6 @@ Object.defineProperties(TimeIntervalCollection.prototype, {
/**
* Compares this instance against the provided instance componentwise and returns
* true
if they are equal, false
otherwise.
- *
* @param {TimeIntervalCollection} [right] The right hand side collection.
* @param {TimeInterval.DataComparer} [dataComparer] A function which compares the data of the two intervals. If omitted, reference equality is used.
* @returns {boolean} true
if they are equal, false
otherwise.
@@ -155,7 +153,6 @@ TimeIntervalCollection.prototype.equals = function (right, dataComparer) {
/**
* Gets the interval at the specified index.
- *
* @param {number} index The index of the interval to retrieve.
* @returns {TimeInterval|undefined} The interval at the specified index, or undefined
if no interval exists as that index.
*/
@@ -181,7 +178,6 @@ TimeIntervalCollection.prototype.removeAll = function () {
/**
* Finds and returns the interval that contains the specified date.
- *
* @param {JulianDate} date The date to search for.
* @returns {TimeInterval|undefined} The interval containing the specified date, undefined
if no such interval exists.
*/
@@ -192,7 +188,6 @@ TimeIntervalCollection.prototype.findIntervalContainingDate = function (date) {
/**
* Finds and returns the data for the interval that contains the specified date.
- *
* @param {JulianDate} date The date to search for.
* @returns {object} The data for the interval containing the specified date, or undefined
if no such interval exists.
*/
@@ -205,7 +200,6 @@ TimeIntervalCollection.prototype.findDataForIntervalContainingDate = function (
/**
* Checks if the specified date is inside this collection.
- *
* @param {JulianDate} julianDate The date to check.
* @returns {boolean} true
if the collection contains the specified date, false
otherwise.
*/
@@ -217,7 +211,6 @@ const indexOfScratch = new TimeInterval();
/**
* Finds and returns the index of the interval in the collection that contains the specified date.
- *
* @param {JulianDate} date The date to search for.
* @returns {number} The index of the interval that contains the specified date, if no such interval exists,
* it returns a negative number which is the bitwise complement of the index of the next interval that
@@ -268,7 +261,6 @@ TimeIntervalCollection.prototype.indexOf = function (date) {
/**
* Returns the first interval in the collection that matches the specified parameters.
* All parameters are optional and undefined
parameters are treated as a don't care condition.
- *
* @param {object} [options] Object with the following properties:
* @param {JulianDate} [options.start] The start time of the interval.
* @param {JulianDate} [options.stop] The stop time of the interval.
@@ -303,7 +295,6 @@ TimeIntervalCollection.prototype.findInterval = function (options) {
* Adds an interval to the collection, merging intervals that contain the same data and
* splitting intervals of different data as needed in order to maintain a non-overlapping collection.
* The data in the new interval takes precedence over any existing intervals in the collection.
- *
* @param {TimeInterval} interval The interval to add.
* @param {TimeInterval.DataComparer} [dataComparer] A function which compares the data of the two intervals. If omitted, reference equality is used.
*/
@@ -503,7 +494,6 @@ TimeIntervalCollection.prototype.addInterval = function (
/**
* Removes the specified interval from this interval collection, creating a hole over the specified interval.
* The data property of the input interval is ignored.
- *
* @param {TimeInterval} interval The interval to remove.
* @returns {boolean} true
if the interval was removed, false
if no part of the interval was in the collection.
*/
@@ -662,7 +652,6 @@ TimeIntervalCollection.prototype.removeInterval = function (interval) {
/**
* Creates a new instance that is the intersection of this collection and the provided collection.
- *
* @param {TimeIntervalCollection} other The collection to intersect with.
* @param {TimeInterval.DataComparer} [dataComparer] A function which compares the data of the two intervals. If omitted, reference equality is used.
* @param {TimeInterval.MergeCallback} [mergeCallback] A function which merges the data of the two intervals. If omitted, the data from the left interval will be used.
@@ -730,13 +719,12 @@ TimeIntervalCollection.prototype.intersect = function (
/**
* Creates a new instance from a JulianDate array.
- *
* @param {object} options Object with the following properties:
* @param {JulianDate[]} options.julianDates An array of ISO 8601 dates.
- * @param {boolean} [options.isStartIncluded=true] true
if start time is included in the interval, false
otherwise.
- * @param {boolean} [options.isStopIncluded=true] true
if stop time is included in the interval, false
otherwise.
- * @param {boolean} [options.leadingInterval=false] true
if you want to add a interval from Iso8601.MINIMUM_VALUE to start time, false
otherwise.
- * @param {boolean} [options.trailingInterval=false] true
if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, false
otherwise.
+ * @param {boolean} [options.isStartIncluded] true
if start time is included in the interval, false
otherwise.
+ * @param {boolean} [options.isStopIncluded] true
if stop time is included in the interval, false
otherwise.
+ * @param {boolean} [options.leadingInterval] true
if you want to add a interval from Iso8601.MINIMUM_VALUE to start time, false
otherwise.
+ * @param {boolean} [options.trailingInterval] true
if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, false
otherwise.
* @param {Function} [options.dataCallback] A function that will be return the data that is called with each interval before it is added to the collection. If unspecified, the data will be the index in the collection.
* @param {TimeIntervalCollection} [result] An existing instance to use for the result.
* @returns {TimeIntervalCollection} The modified result parameter or a new instance if none was provided.
@@ -820,12 +808,10 @@ const monthLengths = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
/**
* Adds duration represented as a GregorianDate to a JulianDate
- *
* @param {JulianDate} julianDate The date.
* @param {GregorianDate} duration An duration represented as a GregorianDate.
* @param {JulianDate} result An existing instance to use for the result.
* @returns {JulianDate} The modified result parameter.
- *
* @private
*/
function addToDate(julianDate, duration, result) {
@@ -897,11 +883,9 @@ const durationRegex = /P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+
/**
* Parses ISO8601 duration string
- *
* @param {string} iso8601 An ISO 8601 duration.
* @param {GregorianDate} result An existing instance to use for the result.
* @returns {boolean} True is parsing succeeded, false otherwise
- *
* @private
*/
function parseDuration(iso8601, result) {
@@ -980,13 +964,12 @@ function parseDuration(iso8601, result) {
const scratchDuration = new GregorianDate();
/**
* Creates a new instance from an {@link http://en.wikipedia.org/wiki/ISO_8601|ISO 8601} time interval (start/end/duration).
- *
* @param {object} options Object with the following properties:
* @param {string} options.iso8601 An ISO 8601 interval.
- * @param {boolean} [options.isStartIncluded=true] true
if start time is included in the interval, false
otherwise.
- * @param {boolean} [options.isStopIncluded=true] true
if stop time is included in the interval, false
otherwise.
- * @param {boolean} [options.leadingInterval=false] true
if you want to add a interval from Iso8601.MINIMUM_VALUE to start time, false
otherwise.
- * @param {boolean} [options.trailingInterval=false] true
if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, false
otherwise.
+ * @param {boolean} [options.isStartIncluded] true
if start time is included in the interval, false
otherwise.
+ * @param {boolean} [options.isStopIncluded] true
if stop time is included in the interval, false
otherwise.
+ * @param {boolean} [options.leadingInterval] true
if you want to add a interval from Iso8601.MINIMUM_VALUE to start time, false
otherwise.
+ * @param {boolean} [options.trailingInterval] true
if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, false
otherwise.
* @param {Function} [options.dataCallback] A function that will be return the data that is called with each interval before it is added to the collection. If unspecified, the data will be the index in the collection.
* @param {TimeIntervalCollection} [result] An existing instance to use for the result.
* @returns {TimeIntervalCollection} The modified result parameter or a new instance if none was provided.
@@ -1037,13 +1020,12 @@ TimeIntervalCollection.fromIso8601 = function (options, result) {
/**
* Creates a new instance from a {@link http://en.wikipedia.org/wiki/ISO_8601|ISO 8601} date array.
- *
* @param {object} options Object with the following properties:
* @param {string[]} options.iso8601Dates An array of ISO 8601 dates.
- * @param {boolean} [options.isStartIncluded=true] true
if start time is included in the interval, false
otherwise.
- * @param {boolean} [options.isStopIncluded=true] true
if stop time is included in the interval, false
otherwise.
- * @param {boolean} [options.leadingInterval=false] true
if you want to add a interval from Iso8601.MINIMUM_VALUE to start time, false
otherwise.
- * @param {boolean} [options.trailingInterval=false] true
if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, false
otherwise.
+ * @param {boolean} [options.isStartIncluded] true
if start time is included in the interval, false
otherwise.
+ * @param {boolean} [options.isStopIncluded] true
if stop time is included in the interval, false
otherwise.
+ * @param {boolean} [options.leadingInterval] true
if you want to add a interval from Iso8601.MINIMUM_VALUE to start time, false
otherwise.
+ * @param {boolean} [options.trailingInterval] true
if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, false
otherwise.
* @param {Function} [options.dataCallback] A function that will be return the data that is called with each interval before it is added to the collection. If unspecified, the data will be the index in the collection.
* @param {TimeIntervalCollection} [result] An existing instance to use for the result.
* @returns {TimeIntervalCollection} The modified result parameter or a new instance if none was provided.
@@ -1075,15 +1057,14 @@ TimeIntervalCollection.fromIso8601DateArray = function (options, result) {
/**
* Creates a new instance from a {@link http://en.wikipedia.org/wiki/ISO_8601|ISO 8601} duration array.
- *
* @param {object} options Object with the following properties:
* @param {JulianDate} options.epoch An date that the durations are relative to.
* @param {string} options.iso8601Durations An array of ISO 8601 durations.
- * @param {boolean} [options.relativeToPrevious=false] true
if durations are relative to previous date, false
if always relative to the epoch.
- * @param {boolean} [options.isStartIncluded=true] true
if start time is included in the interval, false
otherwise.
- * @param {boolean} [options.isStopIncluded=true] true
if stop time is included in the interval, false
otherwise.
- * @param {boolean} [options.leadingInterval=false] true
if you want to add a interval from Iso8601.MINIMUM_VALUE to start time, false
otherwise.
- * @param {boolean} [options.trailingInterval=false] true
if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, false
otherwise.
+ * @param {boolean} [options.relativeToPrevious] true
if durations are relative to previous date, false
if always relative to the epoch.
+ * @param {boolean} [options.isStartIncluded] true
if start time is included in the interval, false
otherwise.
+ * @param {boolean} [options.isStopIncluded] true
if stop time is included in the interval, false
otherwise.
+ * @param {boolean} [options.leadingInterval] true
if you want to add a interval from Iso8601.MINIMUM_VALUE to start time, false
otherwise.
+ * @param {boolean} [options.trailingInterval] true
if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, false
otherwise.
* @param {Function} [options.dataCallback] A function that will be return the data that is called with each interval before it is added to the collection. If unspecified, the data will be the index in the collection.
* @param {TimeIntervalCollection} [result] An existing instance to use for the result.
* @returns {TimeIntervalCollection} The modified result parameter or a new instance if none was provided.
diff --git a/packages/engine/Source/Core/TimeStandard.js b/packages/engine/Source/Core/TimeStandard.js
index 022772f8f3ee..020e66c89477 100644
--- a/packages/engine/Source/Core/TimeStandard.js
+++ b/packages/engine/Source/Core/TimeStandard.js
@@ -1,8 +1,6 @@
/**
* Provides the type of time standards which JulianDate can take as input.
- *
* @enum {number}
- *
* @see JulianDate
*/
const TimeStandard = {
@@ -12,7 +10,6 @@ const TimeStandard = {
* UTC is related to TAI according to the relationship
* UTC = TAI - deltaT
where deltaT
is the number of leap
* seconds which have been introduced as of the time in TAI.
- *
* @type {number}
* @constant
*/
@@ -21,7 +18,6 @@ const TimeStandard = {
/**
* Represents the International Atomic Time (TAI) time standard.
* TAI is the principal time standard to which the other time standards are related.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/Tipsify.js b/packages/engine/Source/Core/Tipsify.js
index d40e9ac5cfa7..c94a3dca33a6 100644
--- a/packages/engine/Source/Core/Tipsify.js
+++ b/packages/engine/Source/Core/Tipsify.js
@@ -7,31 +7,25 @@ import DeveloperError from "./DeveloperError.js";
* vertex-shader cache. This is based on the 2007 SIGGRAPH paper
* 'Fast Triangle Reordering for Vertex Locality and Reduced Overdraw.'
* The runtime is linear but several passes are made.
- *
* @namespace Tipsify
- *
* @see
* Fast Triangle Reordering for Vertex Locality and Reduced Overdraw
* by Sander, Nehab, and Barczak
- *
* @private
*/
const Tipsify = {};
/**
* Calculates the average cache miss ratio (ACMR) for a given set of indices.
- *
* @param {object} options Object with the following properties:
* @param {number[]} options.indices Lists triads of numbers corresponding to the indices of the vertices
* in the vertex buffer that define the geometry's triangles.
* @param {number} [options.maximumIndex] The maximum value of the elements in args.indices
.
* If not supplied, this value will be computed.
- * @param {number} [options.cacheSize=24] The number of vertices that can be stored in the cache at any one time.
+ * @param {number} [options.cacheSize] The number of vertices that can be stored in the cache at any one time.
* @returns {number} The average cache miss ratio (ACMR).
- *
- * @exception {DeveloperError} indices length must be a multiple of three.
- * @exception {DeveloperError} cacheSize must be greater than two.
- *
+ * @throws {DeveloperError} indices length must be a multiple of three.
+ * @throws {DeveloperError} cacheSize must be greater than two.
* @example
* const indices = [0, 1, 2, 3, 4, 5];
* const maxIndex = 5;
@@ -98,18 +92,15 @@ Tipsify.calculateACMR = function (options) {
/**
* Optimizes triangles for the post-vertex shader cache.
- *
* @param {object} options Object with the following properties:
* @param {number[]} options.indices Lists triads of numbers corresponding to the indices of the vertices
* in the vertex buffer that define the geometry's triangles.
* @param {number} [options.maximumIndex] The maximum value of the elements in args.indices
.
* If not supplied, this value will be computed.
- * @param {number} [options.cacheSize=24] The number of vertices that can be stored in the cache at any one time.
+ * @param {number} [options.cacheSize] The number of vertices that can be stored in the cache at any one time.
* @returns {number[]} A list of the input indices in an optimized order.
- *
- * @exception {DeveloperError} indices length must be a multiple of three.
- * @exception {DeveloperError} cacheSize must be greater than two.
- *
+ * @throws {DeveloperError} indices length must be a multiple of three.
+ * @throws {DeveloperError} cacheSize must be greater than two.
* @example
* const indices = [0, 1, 2, 3, 4, 5];
* const maxIndex = 5;
diff --git a/packages/engine/Source/Core/Transforms.js b/packages/engine/Source/Core/Transforms.js
index 8cd38f391f64..8042b7d5c8a9 100644
--- a/packages/engine/Source/Core/Transforms.js
+++ b/packages/engine/Source/Core/Transforms.js
@@ -21,7 +21,6 @@ import TimeConstants from "./TimeConstants.js";
/**
* Contains functions for transforming positions to various reference frames.
- *
* @namespace Transforms
*/
const Transforms = {};
@@ -94,7 +93,7 @@ let scratchThirdCartesian = new Cartesian3();
* 'east', 'north', 'up', 'west', 'south' or 'down'.
* @param {string} secondAxis name of the second axis of the local reference frame. Must be
* 'east', 'north', 'up', 'west', 'south' or 'down'.
- * @return {Transforms.LocalFrameToFixedFrame} The function that will computes a
+ * @returns {Transforms.LocalFrameToFixedFrame} The function that will computes a
* 4x4 transformation matrix from a reference frame, with first axis and second axis compliant with the parameters,
*/
Transforms.localFrameToFixedFrameGenerator = function (firstAxis, secondAxis) {
@@ -262,13 +261,11 @@ Transforms.localFrameToFixedFrameGenerator = function (firstAxis, secondAxis) {
* The y
axis points in the local north direction.
* The z
axis points in the direction of the ellipsoid surface normal which passes through the position.
*
- *
* @function
* @param {Cartesian3} origin The center point of the local reference frame.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
* @param {Matrix4} [result] The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
- *
* @example
* // Get the transform from local east-north-up at cartographic (0.0, 0.0) to Earth's fixed frame.
* const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);
@@ -288,13 +285,11 @@ Transforms.eastNorthUpToFixedFrame = Transforms.localFrameToFixedFrameGenerator(
* The y
axis points in the local east direction.
* The z
axis points in the opposite direction of the ellipsoid surface normal which passes through the position.
*
- *
* @function
* @param {Cartesian3} origin The center point of the local reference frame.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
* @param {Matrix4} [result] The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
- *
* @example
* // Get the transform from local north-east-down at cartographic (0.0, 0.0) to Earth's fixed frame.
* const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);
@@ -314,13 +309,11 @@ Transforms.northEastDownToFixedFrame = Transforms.localFrameToFixedFrameGenerato
* The y
axis points in the direction of the ellipsoid surface normal which passes through the position.
* The z
axis points in the local east direction.
*
- *
* @function
* @param {Cartesian3} origin The center point of the local reference frame.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
* @param {Matrix4} [result] The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
- *
* @example
* // Get the transform from local north-up-east at cartographic (0.0, 0.0) to Earth's fixed frame.
* const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);
@@ -340,13 +333,11 @@ Transforms.northUpEastToFixedFrame = Transforms.localFrameToFixedFrameGenerator(
* The y
axis points in the local west direction.
* The z
axis points in the direction of the ellipsoid surface normal which passes through the position.
*
- *
* @function
* @param {Cartesian3} origin The center point of the local reference frame.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
* @param {Matrix4} [result] The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
- *
* @example
* // Get the transform from local north-West-Up at cartographic (0.0, 0.0) to Earth's fixed frame.
* const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);
@@ -366,15 +357,13 @@ const scratchHPRMatrix4 = new Matrix4();
* centered at the provided origin to the provided ellipsoid's fixed reference frame. Heading is the rotation from the local east
* direction where a positive angle is increasing eastward. Pitch is the rotation from the local east-north plane. Positive pitch angles
* are above the plane. Negative pitch angles are below the plane. Roll is the first rotation applied about the local east axis.
- *
* @param {Cartesian3} origin The center point of the local reference frame.
* @param {HeadingPitchRoll} headingPitchRoll The heading, pitch, and roll.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
- * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid whose fixed frame is used in the transformation.
+ * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform] A 4x4 transformation
* matrix from a reference frame to the provided ellipsoid's fixed reference frame
* @param {Matrix4} [result] The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
- *
* @example
* // Get the transform from local heading-pitch-roll at cartographic (0.0, 0.0) to Earth's fixed frame.
* const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);
@@ -421,15 +410,13 @@ const scratchHPRMatrix3 = new Matrix3();
* centered at the provided origin. Heading is the rotation from the local east
* direction where a positive angle is increasing eastward. Pitch is the rotation from the local east-north plane. Positive pitch angles
* are above the plane. Negative pitch angles are below the plane. Roll is the first rotation applied about the local east axis.
- *
* @param {Cartesian3} origin The center point of the local reference frame.
* @param {HeadingPitchRoll} headingPitchRoll The heading, pitch, and roll.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
- * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid whose fixed frame is used in the transformation.
+ * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform] A 4x4 transformation
* matrix from a reference frame to the provided ellipsoid's fixed reference frame
* @param {Quaternion} [result] The object onto which to store the result.
* @returns {Quaternion} The modified result parameter or a new Quaternion instance if none was provided.
- *
* @example
* // Get the quaternion from local heading-pitch-roll at cartographic (0.0, 0.0) to Earth's fixed frame.
* const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);
@@ -471,10 +458,9 @@ const hprQuaternionScratch = new Quaternion();
* Computes heading-pitch-roll angles from a transform in a particular reference frame. Heading is the rotation from the local east
* direction where a positive angle is increasing eastward. Pitch is the rotation from the local east-north plane. Positive pitch angles
* are above the plane. Negative pitch angles are below the plane. Roll is the first rotation applied about the local east axis.
- *
* @param {Matrix4} transform The transform
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
- * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid whose fixed frame is used in the transformation.
+ * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform] A 4x4 transformation
* matrix from a reference frame to the provided ellipsoid's fixed reference frame
* @param {HeadingPitchRoll} [result] The object onto which to store the result.
* @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if none was provided.
@@ -541,11 +527,9 @@ let dateInUtc = new JulianDate();
/**
* Computes a rotation matrix to transform a point or vector from True Equator Mean Equinox (TEME) axes to the
* pseudo-fixed axes at a given time. This method treats the UT1 time standard as equivalent to UTC.
- *
* @param {JulianDate} date The time at which to compute the rotation matrix.
* @param {Matrix3} [result] The object onto which to store the result.
* @returns {Matrix3} The modified result parameter or a new Matrix3 instance if none was provided.
- *
* @example
* //Set the view to the inertial frame.
* scene.postUpdate.addEventListener(function(scene, time) {
@@ -625,10 +609,8 @@ Transforms.computeTemeToPseudoFixedMatrix = function (date, result) {
* The source of IAU 2006 XYS data, used for computing the transformation between the
* Fixed and ICRF axes.
* @type {Iau2006XysData}
- *
* @see Transforms.computeIcrfToFixedMatrix
* @see Transforms.computeFixedToIcrfMatrix
- *
* @private
*/
Transforms.iau2006XysData = new Iau2006XysData();
@@ -638,10 +620,8 @@ Transforms.iau2006XysData = new Iau2006XysData();
* between the Fixed and ICRF axes. By default, zero values are used for all EOP values,
* yielding a reasonable but not completely accurate representation of the ICRF axes.
* @type {EarthOrientationParameters}
- *
* @see Transforms.computeIcrfToFixedMatrix
* @see Transforms.computeFixedToIcrfMatrix
- *
* @private
*/
Transforms.earthOrientationParameters = EarthOrientationParameters.NONE;
@@ -653,18 +633,14 @@ const j2000ttDays = 2451545.0;
* Preloads the data necessary to transform between the ICRF and Fixed axes, in either
* direction, over a given interval. This function returns a promise that, when resolved,
* indicates that the preload has completed.
- *
* @param {TimeInterval} timeInterval The interval to preload.
* @returns {Promise} A promise that, when resolved, indicates that the preload has completed
* and evaluation of the transformation between the fixed and ICRF axes will
* no longer return undefined for a time inside the interval.
- *
- *
* @example
* const interval = new Cesium.TimeInterval(...);
* await Cesium.Transforms.preloadIcrfFixed(interval));
* // the data is now loaded
- *
* @see Transforms.computeIcrfToFixedMatrix
* @see Transforms.computeFixedToIcrfMatrix
*/
@@ -687,14 +663,11 @@ Transforms.preloadIcrfFixed = function (timeInterval) {
* Reference Frame (GCRF/ICRF) inertial frame axes to the Earth-Fixed frame axes (ITRF)
* at a given time. This function may return undefined if the data necessary to
* do the transformation is not yet loaded.
- *
* @param {JulianDate} date The time at which to compute the rotation matrix.
* @param {Matrix3} [result] The object onto which to store the result. If this parameter is
* not specified, a new instance is created and returned.
* @returns {Matrix3} The rotation matrix, or undefined if the data necessary to do the
* transformation is not yet loaded.
- *
- *
* @example
* scene.postUpdate.addEventListener(function(scene, time) {
* // View in ICRF.
@@ -705,7 +678,6 @@ Transforms.preloadIcrfFixed = function (timeInterval) {
* camera.lookAtTransform(transform, offset);
* }
* });
- *
* @see Transforms.preloadIcrfFixed
*/
Transforms.computeIcrfToFixedMatrix = function (date, result) {
@@ -743,14 +715,11 @@ const rotation2Scratch = new Matrix3();
* to the International Celestial Reference Frame (GCRF/ICRF) inertial frame axes
* at a given time. This function may return undefined if the data necessary to
* do the transformation is not yet loaded.
- *
* @param {JulianDate} date The time at which to compute the rotation matrix.
* @param {Matrix3} [result] The object onto which to store the result. If this parameter is
* not specified, a new instance is created and returned.
* @returns {Matrix3} The rotation matrix, or undefined if the data necessary to do the
* transformation is not yet loaded.
- *
- *
* @example
* // Transform a point from the Fixed axes to the ICRF axes.
* const now = Cesium.JulianDate.now();
@@ -760,7 +729,6 @@ const rotation2Scratch = new Matrix3();
* if (Cesium.defined(fixedToIcrf)) {
* pointInInertial = Cesium.Matrix3.multiplyByVector(fixedToIcrf, pointInFixed, pointInInertial);
* }
- *
* @see Transforms.preloadIcrfFixed
*/
Transforms.computeFixedToIcrfMatrix = function (date, result) {
@@ -879,7 +847,6 @@ const pointToWindowCoordinatesTemp = new Cartesian4();
/**
* Transform a point from model coordinates to window coordinates.
- *
* @param {Matrix4} modelViewProjectionMatrix The 4x4 model-view-projection matrix.
* @param {Matrix4} viewportTransformation The 4x4 viewport transformation.
* @param {Cartesian3} point The point to transform.
@@ -903,6 +870,10 @@ Transforms.pointToWindowCoordinates = function (
};
/**
+ * @param modelViewProjectionMatrix
+ * @param viewportTransformation
+ * @param point
+ * @param result
* @private
*/
Transforms.pointToGLWindowCoordinates = function (
@@ -947,10 +918,9 @@ const upScratch = new Cartesian3();
/**
* Transform a position and velocity to a rotation matrix.
- *
* @param {Cartesian3} position The position to transform.
* @param {Cartesian3} velocity The velocity vector to transform.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid whose fixed frame is used in the transformation.
* @param {Matrix3} [result] The object onto which to store the result.
* @returns {Matrix3} The modified result parameter or a new Matrix3 instance if none was provided.
*/
@@ -1030,6 +1000,9 @@ const scratchFromENU = new Matrix4();
const scratchToENU = new Matrix4();
/**
+ * @param projection
+ * @param matrix
+ * @param result
* @private
*/
Transforms.basisTo2D = function (projection, matrix, result) {
@@ -1089,6 +1062,9 @@ Transforms.basisTo2D = function (projection, matrix, result) {
};
/**
+ * @param projection
+ * @param center
+ * @param result
* @private
*/
Transforms.wgs84To2DModelMatrix = function (projection, center, result) {
diff --git a/packages/engine/Source/Core/TranslationRotationScale.js b/packages/engine/Source/Core/TranslationRotationScale.js
index f3ce144596a3..154e25a4e172 100644
--- a/packages/engine/Source/Core/TranslationRotationScale.js
+++ b/packages/engine/Source/Core/TranslationRotationScale.js
@@ -10,11 +10,10 @@ const defaultRotation = Quaternion.IDENTITY;
/**
* An affine transformation defined by a translation, rotation, and scale.
* @alias TranslationRotationScale
- * @constructor
- *
- * @param {Cartesian3} [translation=Cartesian3.ZERO] A {@link Cartesian3} specifying the (x, y, z) translation to apply to the node.
- * @param {Quaternion} [rotation=Quaternion.IDENTITY] A {@link Quaternion} specifying the (x, y, z, w) rotation to apply to the node.
- * @param {Cartesian3} [scale=new Cartesian3(1.0, 1.0, 1.0)] A {@link Cartesian3} specifying the (x, y, z) scaling to apply to the node.
+ * @class
+ * @param {Cartesian3} [translation] A {@link Cartesian3} specifying the (x, y, z) translation to apply to the node.
+ * @param {Quaternion} [rotation] A {@link Quaternion} specifying the (x, y, z, w) rotation to apply to the node.
+ * @param {Cartesian3} [scale] A {@link Cartesian3} specifying the (x, y, z) scaling to apply to the node.
*/
function TranslationRotationScale(translation, rotation, scale) {
/**
@@ -44,7 +43,6 @@ function TranslationRotationScale(translation, rotation, scale) {
/**
* Compares this instance against the provided instance and returns
* true
if they are equal, false
otherwise.
- *
* @param {TranslationRotationScale} [right] The right hand side TranslationRotationScale.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/Core/TridiagonalSystemSolver.js b/packages/engine/Source/Core/TridiagonalSystemSolver.js
index b53dabc7e3e4..4d2df23da9a1 100644
--- a/packages/engine/Source/Core/TridiagonalSystemSolver.js
+++ b/packages/engine/Source/Core/TridiagonalSystemSolver.js
@@ -5,25 +5,20 @@ import DeveloperError from "./DeveloperError.js";
/**
* Uses the Tridiagonal Matrix Algorithm, also known as the Thomas Algorithm, to solve
* a system of linear equations where the coefficient matrix is a tridiagonal matrix.
- *
* @namespace TridiagonalSystemSolver
*/
const TridiagonalSystemSolver = {};
/**
* Solves a tridiagonal system of linear equations.
- *
* @param {number[]} diagonal An array with length n
that contains the diagonal of the coefficient matrix.
* @param {number[]} lower An array with length n - 1
that contains the lower diagonal of the coefficient matrix.
* @param {number[]} upper An array with length n - 1
that contains the upper diagonal of the coefficient matrix.
* @param {Cartesian3[]} right An array of Cartesians with length n
that is the right side of the system of equations.
- *
- * @exception {DeveloperError} diagonal and right must have the same lengths.
- * @exception {DeveloperError} lower and upper must have the same lengths.
- * @exception {DeveloperError} lower and upper must be one less than the length of diagonal.
- *
+ * @throws {DeveloperError} diagonal and right must have the same lengths.
+ * @throws {DeveloperError} lower and upper must have the same lengths.
+ * @throws {DeveloperError} lower and upper must be one less than the length of diagonal.
* @performance Linear time.
- *
* @example
* const lowerDiagonal = [1.0, 1.0, 1.0, 1.0];
* const diagonal = [2.0, 4.0, 4.0, 4.0, 2.0];
@@ -37,7 +32,6 @@ const TridiagonalSystemSolver = {};
* ];
*
* const solution = Cesium.TridiagonalSystemSolver.solve(lowerDiagonal, diagonal, upperDiagonal, rightHandSide);
- *
* @returns {Cartesian3[]} An array of Cartesians with length n
that is the solution to the tridiagonal system of equations.
*/
TridiagonalSystemSolver.solve = function (lower, diagonal, upper, right) {
diff --git a/packages/engine/Source/Core/TrustedServers.js b/packages/engine/Source/Core/TrustedServers.js
index 92b24ae7cef5..bbd857a300d7 100644
--- a/packages/engine/Source/Core/TrustedServers.js
+++ b/packages/engine/Source/Core/TrustedServers.js
@@ -5,9 +5,7 @@ import DeveloperError from "./DeveloperError.js";
/**
* A singleton that contains all of the servers that are trusted. Credentials will be sent with
* any requests to these servers.
- *
* @namespace TrustedServers
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
*/
const TrustedServers = {};
@@ -15,10 +13,8 @@ let _servers = {};
/**
* Adds a trusted server to the registry
- *
* @param {string} host The host to be added.
* @param {number} port The port used to access the host.
- *
* @example
* // Add a trusted server
* TrustedServers.add('my.server.com', 80);
@@ -41,10 +37,8 @@ TrustedServers.add = function (host, port) {
/**
* Removes a trusted server from the registry
- *
* @param {string} host The host to be removed.
* @param {number} port The port used to access the host.
- *
* @example
* // Remove a trusted server
* TrustedServers.remove('my.server.com', 80);
@@ -102,11 +96,8 @@ function getAuthority(url) {
/**
* Tests whether a server is trusted or not. The server must have been added with the port if it is included in the url.
- *
* @param {string} url The url to be tested against the trusted list
- *
* @returns {boolean} Returns true if url is trusted, false otherwise.
- *
* @example
* // Add server
* TrustedServers.add('my.server.com', 81);
@@ -135,7 +126,6 @@ TrustedServers.contains = function (url) {
/**
* Clears the registry
- *
* @example
* // Remove a trusted server
* TrustedServers.clear();
diff --git a/packages/engine/Source/Core/VRTheWorldTerrainProvider.js b/packages/engine/Source/Core/VRTheWorldTerrainProvider.js
index 9586c423571f..4f1eccca6673 100644
--- a/packages/engine/Source/Core/VRTheWorldTerrainProvider.js
+++ b/packages/engine/Source/Core/VRTheWorldTerrainProvider.js
@@ -20,20 +20,17 @@ function DataRectangle(rectangle, maxLevel) {
}
/**
- * @typedef {Object} VRTheWorldTerrainProvider.ConstructorOptions
+ * @typedef {object} VRTheWorldTerrainProvider.ConstructorOptions
*
* Initialization options for the VRTheWorldTerrainProvider constructor
- *
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
* @property {Credit|string} [credit] A credit for the data source, which is displayed on the canvas.
*/
/**
* Used to track creation details while fetching initial metadata
- *
- * @constructor
+ * @class
* @private
- *
* @param {VRTheWorldTerrainProvider.ConstructorOptions} options An object describing initialization options
*/
function TerrainProviderBuilder(options) {
@@ -139,18 +136,14 @@ async function requestMetadata(terrainProviderBuilder, resource, provider) {
*
* A {@link TerrainProvider} that produces terrain geometry by tessellating height maps
* retrieved from a {@link http://vr-theworld.com/|VT MÄK VR-TheWorld server}.
- *
* @alias VRTheWorldTerrainProvider
- * @constructor
- *
+ * @class
* @param {VRTheWorldTerrainProvider.ConstructorOptions} [options] An object describing initialization options.
- *
* @example
* const terrainProvider = await Cesium.VRTheWorldTerrainProvider.fromUrl(
* "https://www.vr-theworld.com/vr-theworld/tiles1.0.0/73/"
* );
* viewer.terrainProvider = terrainProvider;
- *
* @see TerrainProvider
*/
function VRTheWorldTerrainProvider(options) {
@@ -262,18 +255,15 @@ Object.defineProperties(VRTheWorldTerrainProvider.prototype, {
/**
* Creates a {@link TerrainProvider} that produces terrain geometry by tessellating height maps
* retrieved from a {@link http://vr-theworld.com/|VT MÄK VR-TheWorld server}.
- *
- * @param {Resource|String} url The URL of the VR-TheWorld TileMap.
+ * @param {Resource | string} url The URL of the VR-TheWorld TileMap.
* @param {VRTheWorldTerrainProvider.ConstructorOptions} [options] An object describing initialization options.
* @returns {Promise}
- *
* @example
* const terrainProvider = await Cesium.VRTheWorldTerrainProvider.fromUrl(
* "https://www.vr-theworld.com/vr-theworld/tiles1.0.0/73/"
* );
* viewer.terrainProvider = terrainProvider;
- *
- * @exception {RuntimeError} metadata specifies and unknown SRS
+ * @throws {RuntimeError} metadata specifies and unknown SRS
*/
VRTheWorldTerrainProvider.fromUrl = async function (url, options) {
//>>includeStart('debug', pragmas.debug);
@@ -297,7 +287,6 @@ VRTheWorldTerrainProvider.fromUrl = async function (url, options) {
/**
* Requests the geometry for a given tile. The result includes terrain
* data and indicates that all child tiles are available.
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -341,7 +330,6 @@ VRTheWorldTerrainProvider.prototype.requestTileGeometry = function (
/**
* Gets the maximum geometric error allowed in a tile at a given level.
- *
* @param {number} level The tile level for which to get the maximum geometric error.
* @returns {number} The maximum geometric error.
*/
@@ -428,7 +416,6 @@ function isTileInRectangle(tilingScheme, rectangle, x, y, level) {
/**
* Determines whether data for a tile is available to be loaded.
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -444,7 +431,6 @@ VRTheWorldTerrainProvider.prototype.getTileDataAvailable = function (
/**
* Makes sure we load availability data for a tile
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
diff --git a/packages/engine/Source/Core/VertexFormat.js b/packages/engine/Source/Core/VertexFormat.js
index 9754d06ba676..18ab1444cbde 100644
--- a/packages/engine/Source/Core/VertexFormat.js
+++ b/packages/engine/Source/Core/VertexFormat.js
@@ -6,19 +6,15 @@ import DeveloperError from "./DeveloperError.js";
* A vertex format defines what attributes make up a vertex. A VertexFormat can be provided
* to a {@link Geometry} to request that certain properties be computed, e.g., just position,
* position and normal, etc.
- *
* @param {object} [options] An object with boolean properties corresponding to VertexFormat properties as shown in the code example.
- *
* @alias VertexFormat
- * @constructor
- *
+ * @class
* @example
* // Create a vertex format with position and 2D texture coordinate attributes.
* const format = new Cesium.VertexFormat({
* position : true,
* st : true
* });
- *
* @see Geometry#attributes
* @see Packable
*/
@@ -30,9 +26,7 @@ function VertexFormat(options) {
*
* 64-bit floating-point (for precision). 3 components per attribute.
*
- *
* @type {boolean}
- *
* @default false
*/
this.position = defaultValue(options.position, false);
@@ -42,9 +36,7 @@ function VertexFormat(options) {
*
* 32-bit floating-point. 3 components per attribute.
*
- *
* @type {boolean}
- *
* @default false
*/
this.normal = defaultValue(options.normal, false);
@@ -54,9 +46,7 @@ function VertexFormat(options) {
*
* 32-bit floating-point. 2 components per attribute
*
- *
* @type {boolean}
- *
* @default false
*/
this.st = defaultValue(options.st, false);
@@ -66,9 +56,7 @@ function VertexFormat(options) {
*
* 32-bit floating-point. 3 components per attribute.
*
- *
* @type {boolean}
- *
* @default false
*/
this.bitangent = defaultValue(options.bitangent, false);
@@ -78,9 +66,7 @@ function VertexFormat(options) {
*
* 32-bit floating-point. 3 components per attribute.
*
- *
* @type {boolean}
- *
* @default false
*/
this.tangent = defaultValue(options.tangent, false);
@@ -90,9 +76,7 @@ function VertexFormat(options) {
*
* 8-bit unsigned byte. 3 components per attribute.
*
- *
* @type {boolean}
- *
* @default false
*/
this.color = defaultValue(options.color, false);
@@ -100,10 +84,8 @@ function VertexFormat(options) {
/**
* An immutable vertex format with only a position attribute.
- *
* @type {VertexFormat}
* @constant
- *
* @see VertexFormat#position
*/
VertexFormat.POSITION_ONLY = Object.freeze(
@@ -115,10 +97,8 @@ VertexFormat.POSITION_ONLY = Object.freeze(
/**
* An immutable vertex format with position and normal attributes.
* This is compatible with per-instance color appearances like {@link PerInstanceColorAppearance}.
- *
* @type {VertexFormat}
* @constant
- *
* @see VertexFormat#position
* @see VertexFormat#normal
*/
@@ -133,10 +113,8 @@ VertexFormat.POSITION_AND_NORMAL = Object.freeze(
* An immutable vertex format with position, normal, and st attributes.
* This is compatible with {@link MaterialAppearance} when {@link MaterialAppearance#materialSupport}
* is TEXTURED/code>.
- *
* @type {VertexFormat}
* @constant
- *
* @see VertexFormat#position
* @see VertexFormat#normal
* @see VertexFormat#st
@@ -152,10 +130,8 @@ VertexFormat.POSITION_NORMAL_AND_ST = Object.freeze(
/**
* An immutable vertex format with position and st attributes.
* This is compatible with {@link EllipsoidSurfaceAppearance}.
- *
* @type {VertexFormat}
* @constant
- *
* @see VertexFormat#position
* @see VertexFormat#st
*/
@@ -168,10 +144,8 @@ VertexFormat.POSITION_AND_ST = Object.freeze(
/**
* An immutable vertex format with position and color attributes.
- *
* @type {VertexFormat}
* @constant
- *
* @see VertexFormat#position
* @see VertexFormat#color
*/
@@ -184,10 +158,8 @@ VertexFormat.POSITION_AND_COLOR = Object.freeze(
/**
* An immutable vertex format with well-known attributes: position, normal, st, tangent, and bitangent.
- *
* @type {VertexFormat}
* @constant
- *
* @see VertexFormat#position
* @see VertexFormat#normal
* @see VertexFormat#st
@@ -209,10 +181,8 @@ VertexFormat.ALL = Object.freeze(
* This is compatible with most appearances and materials; however
* normal and st attributes are not always required. When this is
* known in advance, another VertexFormat
should be used.
- *
* @type {VertexFormat}
* @constant
- *
* @see VertexFormat#position
* @see VertexFormat#normal
*/
@@ -226,11 +196,9 @@ VertexFormat.packedLength = 6;
/**
* Stores the provided instance into the provided array.
- *
* @param {VertexFormat} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
VertexFormat.pack = function (value, array, startingIndex) {
@@ -257,9 +225,8 @@ VertexFormat.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {VertexFormat} [result] The object into which to store the result.
* @returns {VertexFormat} The modified result parameter or a new VertexFormat instance if one was not provided.
*/
@@ -287,7 +254,6 @@ VertexFormat.unpack = function (array, startingIndex, result) {
/**
* Duplicates a VertexFormat instance.
- *
* @param {VertexFormat} vertexFormat The vertex format to duplicate.
* @param {VertexFormat} [result] The object onto which to store the result.
* @returns {VertexFormat} The modified result parameter or a new VertexFormat instance if one was not provided. (Returns undefined if vertexFormat is undefined)
diff --git a/packages/engine/Source/Core/VerticalExaggeration.js b/packages/engine/Source/Core/VerticalExaggeration.js
index 5a9744691e29..1d67f45aad0e 100644
--- a/packages/engine/Source/Core/VerticalExaggeration.js
+++ b/packages/engine/Source/Core/VerticalExaggeration.js
@@ -10,7 +10,6 @@ const VerticalExaggeration = {};
/**
* Scales a height relative to an offset.
- *
* @param {number} height The height.
* @param {number} scale A scalar used to exaggerate the terrain. If the value is 1.0 there will be no effect.
* @param {number} relativeHeight The height relative to which terrain is exaggerated. If the value is 0.0 terrain will be exaggerated relative to the ellipsoid surface.
@@ -31,7 +30,6 @@ const scratchCartographic = new Cartographic();
/**
* Scales a position by exaggeration.
- *
* @param {Cartesian3} position The position.
* @param {Ellipsoid} ellipsoid The ellipsoid.
* @param {number} verticalExaggeration A scalar used to exaggerate the terrain. If the value is 1.0 there will be no effect.
diff --git a/packages/engine/Source/Core/VideoSynchronizer.js b/packages/engine/Source/Core/VideoSynchronizer.js
index 5599dcae75cf..04ec918a6f4a 100644
--- a/packages/engine/Source/Core/VideoSynchronizer.js
+++ b/packages/engine/Source/Core/VideoSynchronizer.js
@@ -6,16 +6,13 @@ import JulianDate from "./JulianDate.js";
/**
* Synchronizes a video element with a simulation clock.
- *
* @alias VideoSynchronizer
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {Clock} [options.clock] The clock instance used to drive the video.
* @param {HTMLVideoElement} [options.element] The video element to be synchronized.
- * @param {JulianDate} [options.epoch=Iso8601.MINIMUM_VALUE] The simulation time that marks the start of the video.
- * @param {number} [options.tolerance=1.0] The maximum amount of time, in seconds, that the clock and video can diverge.
- *
+ * @param {JulianDate} [options.epoch] The simulation time that marks the start of the video.
+ * @param {number} [options.tolerance] The maximum amount of time, in seconds, that the clock and video can diverge.
* @demo {@link https://sandcastle.cesium.com/index.html?src=Video.html|Video Material Demo}
*/
function VideoSynchronizer(options) {
@@ -56,7 +53,6 @@ function VideoSynchronizer(options) {
Object.defineProperties(VideoSynchronizer.prototype, {
/**
* Gets or sets the clock used to drive the video element.
- *
* @memberof VideoSynchronizer.prototype
* @type {Clock}
*/
@@ -88,7 +84,6 @@ Object.defineProperties(VideoSynchronizer.prototype, {
},
/**
* Gets or sets the video element to synchronize.
- *
* @memberof VideoSynchronizer.prototype
* @type {HTMLVideoElement}
*/
@@ -122,8 +117,7 @@ Object.defineProperties(VideoSynchronizer.prototype, {
/**
* Destroys and resources used by the object. Once an object is destroyed, it should not be used.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
*/
VideoSynchronizer.prototype.destroy = function () {
this.element = undefined;
@@ -133,7 +127,6 @@ VideoSynchronizer.prototype.destroy = function () {
/**
* Returns true if this object was destroyed; otherwise, false.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
*/
VideoSynchronizer.prototype.isDestroyed = function () {
diff --git a/packages/engine/Source/Core/Visibility.js b/packages/engine/Source/Core/Visibility.js
index 21c80db3db8e..4dc02fa487e1 100644
--- a/packages/engine/Source/Core/Visibility.js
+++ b/packages/engine/Source/Core/Visibility.js
@@ -3,13 +3,11 @@
* is visible during horizon culling. An occluder may fully block an occludee, in which case
* it has no visibility, may partially block an occludee from view, or may not block it at all,
* leading to full visibility.
- *
* @enum {number}
*/
const Visibility = {
/**
* Represents that no part of an object is visible.
- *
* @type {number}
* @constant
*/
@@ -17,7 +15,6 @@ const Visibility = {
/**
* Represents that part, but not all, of an object is visible
- *
* @type {number}
* @constant
*/
@@ -25,7 +22,6 @@ const Visibility = {
/**
* Represents that an object is visible in its entirety.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/VulkanConstants.js b/packages/engine/Source/Core/VulkanConstants.js
index 5252ff1df36d..08b3eb00d931 100644
--- a/packages/engine/Source/Core/VulkanConstants.js
+++ b/packages/engine/Source/Core/VulkanConstants.js
@@ -2,7 +2,6 @@
* Enum containing Vulkan Constant values by name.
*
* These match the constants from the {@link https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-definition|Vulkan 1.2 specification}.
- *
* @enum {number}
* @private
*/
diff --git a/packages/engine/Source/Core/WallGeometry.js b/packages/engine/Source/Core/WallGeometry.js
index a67e0a882268..7f78cd56b556 100644
--- a/packages/engine/Source/Core/WallGeometry.js
+++ b/packages/engine/Source/Core/WallGeometry.js
@@ -25,24 +25,20 @@ const scratchNormal = new Cartesian3();
/**
* A description of a wall, which is similar to a KML line string. A wall is defined by a series of points,
* which extrude down to the ground. Optionally, they can extrude downwards to a specified height.
- *
* @alias WallGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of Cartesian objects, which are the points of the wall.
- * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
* @param {number[]} [options.maximumHeights] An array parallel to positions
that give the maximum height of the
* wall at positions
. If undefined, the height of each position in used.
* @param {number[]} [options.minimumHeights] An array parallel to positions
that give the minimum height of the
* wall at positions
. If undefined, the height at each position is 0.0.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid for coordinate manipulation
- * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- *
- * @exception {DeveloperError} positions length must be greater than or equal to 2.
- * @exception {DeveloperError} positions and maximumHeights must have the same length.
- * @exception {DeveloperError} positions and minimumHeights must have the same length.
- *
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid for coordinate manipulation
+ * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
+ * @throws {DeveloperError} positions length must be greater than or equal to 2.
+ * @throws {DeveloperError} positions and maximumHeights must have the same length.
+ * @throws {DeveloperError} positions and minimumHeights must have the same length.
* @see WallGeometry#createGeometry
* @see WallGeometry#fromConstantHeight
*
@@ -123,11 +119,9 @@ function WallGeometry(options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {WallGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
WallGeometry.pack = function (value, array, startingIndex) {
@@ -196,9 +190,8 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {WallGeometry} [result] The object into which to store the result.
* @returns {WallGeometry} The modified result parameter or a new WallGeometry instance if one was not provided.
*/
@@ -273,18 +266,15 @@ WallGeometry.unpack = function (array, startingIndex, result) {
/**
* A description of a wall, which is similar to a KML line string. A wall is defined by a series of points,
* which extrude down to the ground. Optionally, they can extrude downwards to a specified height.
- *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of Cartesian objects, which are the points of the wall.
* @param {number} [options.maximumHeight] A constant that defines the maximum height of the
* wall at positions
. If undefined, the height of each position in used.
* @param {number} [options.minimumHeight] A constant that defines the minimum height of the
* wall at positions
. If undefined, the height at each position is 0.0.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid for coordinate manipulation
- * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid for coordinate manipulation
+ * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
* @returns {WallGeometry}
- *
- *
* @example
* // create a wall that spans from 10000 meters to 20000 meters
* const wall = Cesium.WallGeometry.fromConstantHeights({
@@ -299,7 +289,6 @@ WallGeometry.unpack = function (array, startingIndex, result) {
* maximumHeight : 10000.0
* });
* const geometry = Cesium.WallGeometry.createGeometry(wall);
- *
* @see WallGeometry#createGeometry
*/
WallGeometry.fromConstantHeights = function (options) {
@@ -348,7 +337,6 @@ WallGeometry.fromConstantHeights = function (options) {
/**
* Computes the geometric representation of a wall, including its vertices, indices, and a bounding sphere.
- *
* @param {WallGeometry} wallGeometry A description of the wall.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/WallGeometryLibrary.js b/packages/engine/Source/Core/WallGeometryLibrary.js
index 679cf4114e4b..cfb10ad94e34 100644
--- a/packages/engine/Source/Core/WallGeometryLibrary.js
+++ b/packages/engine/Source/Core/WallGeometryLibrary.js
@@ -109,6 +109,12 @@ const generateArcOptionsScratch = {
};
/**
+ * @param ellipsoid
+ * @param wallPositions
+ * @param maximumHeights
+ * @param minimumHeights
+ * @param granularity
+ * @param duplicateCorners
* @private
*/
WallGeometryLibrary.computePositions = function (
diff --git a/packages/engine/Source/Core/WallOutlineGeometry.js b/packages/engine/Source/Core/WallOutlineGeometry.js
index e68299c14144..56fc3fd5ee62 100644
--- a/packages/engine/Source/Core/WallOutlineGeometry.js
+++ b/packages/engine/Source/Core/WallOutlineGeometry.js
@@ -19,26 +19,21 @@ const scratchCartesian3Position2 = new Cartesian3();
/**
* A description of a wall outline. A wall is defined by a series of points,
* which extrude down to the ground. Optionally, they can extrude downwards to a specified height.
- *
* @alias WallOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of Cartesian objects, which are the points of the wall.
- * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
* @param {number[]} [options.maximumHeights] An array parallel to positions
that give the maximum height of the
* wall at positions
. If undefined, the height of each position in used.
* @param {number[]} [options.minimumHeights] An array parallel to positions
that give the minimum height of the
* wall at positions
. If undefined, the height at each position is 0.0.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid for coordinate manipulation
- *
- * @exception {DeveloperError} positions length must be greater than or equal to 2.
- * @exception {DeveloperError} positions and maximumHeights must have the same length.
- * @exception {DeveloperError} positions and minimumHeights must have the same length.
- *
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid for coordinate manipulation
+ * @throws {DeveloperError} positions length must be greater than or equal to 2.
+ * @throws {DeveloperError} positions and maximumHeights must have the same length.
+ * @throws {DeveloperError} positions and minimumHeights must have the same length.
* @see WallGeometry#createGeometry
* @see WallGeometry#fromConstantHeight
- *
* @example
* // create a wall outline that spans from ground level to 10000 meters
* const wall = new Cesium.WallOutlineGeometry({
@@ -111,11 +106,9 @@ function WallOutlineGeometry(options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {WallOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
WallOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -179,9 +172,8 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {WallOutlineGeometry} [result] The object into which to store the result.
* @returns {WallOutlineGeometry} The modified result parameter or a new WallOutlineGeometry instance if one was not provided.
*/
@@ -248,17 +240,14 @@ WallOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* A description of a walloutline. A wall is defined by a series of points,
* which extrude down to the ground. Optionally, they can extrude downwards to a specified height.
- *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of Cartesian objects, which are the points of the wall.
* @param {number} [options.maximumHeight] A constant that defines the maximum height of the
* wall at positions
. If undefined, the height of each position in used.
* @param {number} [options.minimumHeight] A constant that defines the minimum height of the
* wall at positions
. If undefined, the height at each position is 0.0.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid for coordinate manipulation
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid for coordinate manipulation
* @returns {WallOutlineGeometry}
- *
- *
* @example
* // create a wall that spans from 10000 meters to 20000 meters
* const wall = Cesium.WallOutlineGeometry.fromConstantHeights({
@@ -273,7 +262,6 @@ WallOutlineGeometry.unpack = function (array, startingIndex, result) {
* maximumHeight : 10000.0
* });
* const geometry = Cesium.WallOutlineGeometry.createGeometry(wall);
- *
* @see WallOutlineGeometry#createGeometry
*/
WallOutlineGeometry.fromConstantHeights = function (options) {
@@ -321,7 +309,6 @@ WallOutlineGeometry.fromConstantHeights = function (options) {
/**
* Computes the geometric representation of a wall outline, including its vertices, indices, and a bounding sphere.
- *
* @param {WallOutlineGeometry} wallGeometry A description of the wall outline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/WebGLConstants.js b/packages/engine/Source/Core/WebGLConstants.js
index 8e99cd67b542..3416c2ecc45d 100644
--- a/packages/engine/Source/Core/WebGLConstants.js
+++ b/packages/engine/Source/Core/WebGLConstants.js
@@ -6,7 +6,6 @@
* These match the constants from the [WebGL 1.0]{@link https://www.khronos.org/registry/webgl/specs/latest/1.0/}
* and [WebGL 2.0]{@link https://www.khronos.org/registry/webgl/specs/latest/2.0/}
* specifications.
- *
* @enum {number}
*/
const WebGLConstants = {
diff --git a/packages/engine/Source/Core/WebMercatorProjection.js b/packages/engine/Source/Core/WebMercatorProjection.js
index 79a7cb309ec2..3228c69d2bcc 100644
--- a/packages/engine/Source/Core/WebMercatorProjection.js
+++ b/packages/engine/Source/Core/WebMercatorProjection.js
@@ -10,12 +10,9 @@ import CesiumMath from "./Math.js";
* The map projection used by Google Maps, Bing Maps, and most of ArcGIS Online, EPSG:3857. This
* projection use longitude and latitude expressed with the WGS84 and transforms them to Mercator using
* the spherical (rather than ellipsoidal) equations.
- *
* @alias WebMercatorProjection
- * @constructor
- *
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid.
- *
+ * @class
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid.
* @see GeographicProjection
*/
function WebMercatorProjection(ellipsoid) {
@@ -27,9 +24,7 @@ function WebMercatorProjection(ellipsoid) {
Object.defineProperties(WebMercatorProjection.prototype, {
/**
* Gets the {@link Ellipsoid}.
- *
* @memberof WebMercatorProjection.prototype
- *
* @type {Ellipsoid}
* @readonly
*/
@@ -43,7 +38,6 @@ Object.defineProperties(WebMercatorProjection.prototype, {
/**
* Converts a Mercator angle, in the range -PI to PI, to a geodetic latitude
* in the range -PI/2 to PI/2.
- *
* @param {number} mercatorAngle The angle to convert.
* @returns {number} The geodetic latitude in radians.
*/
@@ -56,7 +50,6 @@ WebMercatorProjection.mercatorAngleToGeodeticLatitude = function (
/**
* Converts a geodetic latitude in radians, in the range -PI/2 to PI/2, to a Mercator
* angle in the range -PI to PI.
- *
* @param {number} latitude The geodetic latitude in radians.
* @returns {number} The Mercator angle.
*/
@@ -81,8 +74,7 @@ WebMercatorProjection.geodeticLatitudeToMercatorAngle = function (latitude) {
* square. That is, the rectangle is equal in the X and Y directions.
*
* The constant value is computed by calling:
- * WebMercatorProjection.mercatorAngleToGeodeticLatitude(Math.PI)
- *
+ * WebMercatorProjection.mercatorAngleToGeodeticLatitude(Math.PI)
* @type {number}
*/
WebMercatorProjection.MaximumLatitude = WebMercatorProjection.mercatorAngleToGeodeticLatitude(
@@ -93,7 +85,6 @@ WebMercatorProjection.MaximumLatitude = WebMercatorProjection.mercatorAngleToGeo
* Converts geodetic ellipsoid coordinates, in radians, to the equivalent Web Mercator
* X, Y, Z coordinates expressed in meters and returned in a {@link Cartesian3}. The height
* is copied unmodified to the Z coordinate.
- *
* @param {Cartographic} cartographic The cartographic coordinates in radians.
* @param {Cartesian3} [result] The instance to which to copy the result, or undefined if a
* new instance should be created.
@@ -122,7 +113,6 @@ WebMercatorProjection.prototype.project = function (cartographic, result) {
* Converts Web Mercator X, Y coordinates, expressed in meters, to a {@link Cartographic}
* containing geodetic ellipsoid coordinates. The Z coordinate is copied unmodified to the
* height.
- *
* @param {Cartesian3} cartesian The web mercator Cartesian position to unrproject with height (z) in meters.
* @param {Cartographic} [result] The instance to which to copy the result, or undefined if a
* new instance should be created.
diff --git a/packages/engine/Source/Core/WebMercatorTilingScheme.js b/packages/engine/Source/Core/WebMercatorTilingScheme.js
index 2266870b131e..f3af8fcc5077 100644
--- a/packages/engine/Source/Core/WebMercatorTilingScheme.js
+++ b/packages/engine/Source/Core/WebMercatorTilingScheme.js
@@ -8,16 +8,14 @@ import WebMercatorProjection from "./WebMercatorProjection.js";
/**
* A tiling scheme for geometry referenced to a {@link WebMercatorProjection}, EPSG:3857. This is
* the tiling scheme used by Google Maps, Microsoft Bing Maps, and most of ESRI ArcGIS Online.
- *
* @alias WebMercatorTilingScheme
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid whose surface is being tiled. Defaults to
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid whose surface is being tiled. Defaults to
* the WGS84 ellipsoid.
- * @param {number} [options.numberOfLevelZeroTilesX=1] The number of tiles in the X direction at level zero of
+ * @param {number} [options.numberOfLevelZeroTilesX] The number of tiles in the X direction at level zero of
* the tile tree.
- * @param {number} [options.numberOfLevelZeroTilesY=1] The number of tiles in the Y direction at level zero of
+ * @param {number} [options.numberOfLevelZeroTilesY] The number of tiles in the Y direction at level zero of
* the tile tree.
* @param {Cartesian2} [options.rectangleSouthwestInMeters] The southwest corner of the rectangle covered by the
* tiling scheme, in meters. If this parameter or rectangleNortheastInMeters is not specified, the entire
@@ -112,7 +110,6 @@ Object.defineProperties(WebMercatorTilingScheme.prototype, {
/**
* Gets the total number of tiles in the X direction at a specified level-of-detail.
- *
* @param {number} level The level-of-detail.
* @returns {number} The number of tiles in the X direction at the given level.
*/
@@ -122,7 +119,6 @@ WebMercatorTilingScheme.prototype.getNumberOfXTilesAtLevel = function (level) {
/**
* Gets the total number of tiles in the Y direction at a specified level-of-detail.
- *
* @param {number} level The level-of-detail.
* @returns {number} The number of tiles in the Y direction at the given level.
*/
@@ -133,7 +129,6 @@ WebMercatorTilingScheme.prototype.getNumberOfYTilesAtLevel = function (level) {
/**
* Transforms a rectangle specified in geodetic radians to the native coordinate system
* of this tiling scheme.
- *
* @param {Rectangle} rectangle The rectangle to transform.
* @param {Rectangle} [result] The instance to which to copy the result, or undefined if a new instance
* should be created.
@@ -162,7 +157,6 @@ WebMercatorTilingScheme.prototype.rectangleToNativeRectangle = function (
/**
* Converts tile x, y coordinates and level to a rectangle expressed in the native coordinates
* of the tiling scheme.
- *
* @param {number} x The integer x coordinate of the tile.
* @param {number} y The integer y coordinate of the tile.
* @param {number} level The tile level-of-detail. Zero is the least detailed.
@@ -205,7 +199,6 @@ WebMercatorTilingScheme.prototype.tileXYToNativeRectangle = function (
/**
* Converts tile x, y coordinates and level to a cartographic rectangle in radians.
- *
* @param {number} x The integer x coordinate of the tile.
* @param {number} y The integer y coordinate of the tile.
* @param {number} level The tile level-of-detail. Zero is the least detailed.
@@ -240,7 +233,6 @@ WebMercatorTilingScheme.prototype.tileXYToRectangle = function (
/**
* Calculates the tile x, y coordinates of the tile containing
* a given cartographic position.
- *
* @param {Cartographic} position The position.
* @param {number} level The tile level-of-detail. Zero is the least detailed.
* @param {Cartesian2} [result] The instance to which to copy the result, or undefined if a new instance
diff --git a/packages/engine/Source/Core/WindingOrder.js b/packages/engine/Source/Core/WindingOrder.js
index e9696c5ebb53..c4ae3f9d0f31 100644
--- a/packages/engine/Source/Core/WindingOrder.js
+++ b/packages/engine/Source/Core/WindingOrder.js
@@ -2,13 +2,11 @@ import WebGLConstants from "./WebGLConstants.js";
/**
* Winding order defines the order of vertices for a triangle to be considered front-facing.
- *
* @enum {number}
*/
const WindingOrder = {
/**
* Vertices are in clockwise order.
- *
* @type {number}
* @constant
*/
@@ -16,7 +14,6 @@ const WindingOrder = {
/**
* Vertices are in counter-clockwise order.
- *
* @type {number}
* @constant
*/
@@ -24,6 +21,7 @@ const WindingOrder = {
};
/**
+ * @param windingOrder
* @private
*/
WindingOrder.validate = function (windingOrder) {
diff --git a/packages/engine/Source/Core/WireframeIndexGenerator.js b/packages/engine/Source/Core/WireframeIndexGenerator.js
index 6100dad6effd..7d05ea2d6897 100644
--- a/packages/engine/Source/Core/WireframeIndexGenerator.js
+++ b/packages/engine/Source/Core/WireframeIndexGenerator.js
@@ -5,7 +5,6 @@ import PrimitiveType from "./PrimitiveType.js";
/**
* Functions for generating indices for model wireframes. The indices are
* outputted as typed arrays, which can then be put into buffers for rendering.
- *
* @namespace WireframeIndexGenerator
* @private
*/
@@ -162,13 +161,10 @@ function createWireframeFromTriangleFanIndices(vertexCount, originalIndices) {
/**
* Generates a wireframe index buffer for a primitive, either by reindexing the existing indices
* or creating them from scratch if the model had none.
- *
* @param {PrimitiveType} primitiveType The primitive type.
* @param {number} vertexCount The number of vertices in the primitive.
* @param {Uint8Array|Uint16Array|Uint32Array} [originalIndices] A typed array containing the original indices of the primitive.
- *
- * @return {Uint16Array|Uint32Array} A typed array with the wireframe indices, or undefined if the primitive type does not use triangles.
- *
+ * @returns {Uint16Array|Uint32Array} A typed array with the wireframe indices, or undefined if the primitive type does not use triangles.
* @private
*/
WireframeIndexGenerator.createWireframeIndices = function (
@@ -200,11 +196,9 @@ WireframeIndexGenerator.createWireframeIndices = function (
/**
* Gets the number of indices in the wireframe index buffer of a primitive type.
- *
* @param {PrimitiveType} primitiveType The primitive type.
* @param {number} originalCount The original number of vertices or indices in the primitive.
- * @return {number} The number of indices in the primitive's wireframe.
- *
+ * @returns {number} The number of indices in the primitive's wireframe.
* @private
*/
WireframeIndexGenerator.getWireframeIndicesCount = function (
diff --git a/packages/engine/Source/Core/appendForwardSlash.js b/packages/engine/Source/Core/appendForwardSlash.js
index 0bfeb2cf357a..f69589dc528f 100644
--- a/packages/engine/Source/Core/appendForwardSlash.js
+++ b/packages/engine/Source/Core/appendForwardSlash.js
@@ -1,4 +1,5 @@
/**
+ * @param url
* @private
*/
function appendForwardSlash(url) {
diff --git a/packages/engine/Source/Core/arrayRemoveDuplicates.js b/packages/engine/Source/Core/arrayRemoveDuplicates.js
index c001def63001..be614a001c36 100644
--- a/packages/engine/Source/Core/arrayRemoveDuplicates.js
+++ b/packages/engine/Source/Core/arrayRemoveDuplicates.js
@@ -7,13 +7,11 @@ const removeDuplicatesEpsilon = CesiumMath.EPSILON10;
/**
* Removes adjacent duplicate values in an array of values.
- *
* @param {any[]} [values] The array of values.
* @param {Function} equalsEpsilon Function to compare values with an epsilon. Boolean equalsEpsilon(left, right, epsilon).
- * @param {boolean} [wrapAround=false] Compare the last value in the array against the first value. If they are equal, the last value is removed.
- * @param {number[]} [removedIndices=undefined] Store the indices that correspond to the duplicate items removed from the array, if there were any.
+ * @param {boolean} [wrapAround] Compare the last value in the array against the first value. If they are equal, the last value is removed.
+ * @param {number[]} [removedIndices] Store the indices that correspond to the duplicate items removed from the array, if there were any.
* @returns {any[]|undefined} A new array of values with no adjacent duplicate values or the input array if no duplicates were found.
- *
* @example
* // Returns [(1.0, 1.0, 1.0), (2.0, 2.0, 2.0), (3.0, 3.0, 3.0), (1.0, 1.0, 1.0)]
* const values = [
@@ -23,7 +21,6 @@ const removeDuplicatesEpsilon = CesiumMath.EPSILON10;
* new Cesium.Cartesian3(3.0, 3.0, 3.0),
* new Cesium.Cartesian3(1.0, 1.0, 1.0)];
* const nonDuplicatevalues = Cesium.PolylinePipeline.removeDuplicates(values, Cartesian3.equalsEpsilon);
- *
* @example
* // Returns [(1.0, 1.0, 1.0), (2.0, 2.0, 2.0), (3.0, 3.0, 3.0)]
* const values = [
@@ -33,7 +30,6 @@ const removeDuplicatesEpsilon = CesiumMath.EPSILON10;
* new Cesium.Cartesian3(3.0, 3.0, 3.0),
* new Cesium.Cartesian3(1.0, 1.0, 1.0)];
* const nonDuplicatevalues = Cesium.PolylinePipeline.removeDuplicates(values, Cartesian3.equalsEpsilon, true);
- *
* @example
* // Returns [(1.0, 1.0, 1.0), (2.0, 2.0, 2.0), (3.0, 3.0, 3.0)]
* // removedIndices will be equal to [1, 3, 5]
diff --git a/packages/engine/Source/Core/barycentricCoordinates.js b/packages/engine/Source/Core/barycentricCoordinates.js
index 0e8f7930cb17..8a424d0c5f2c 100644
--- a/packages/engine/Source/Core/barycentricCoordinates.js
+++ b/packages/engine/Source/Core/barycentricCoordinates.js
@@ -10,16 +10,13 @@ const scratchCartesian3 = new Cartesian3();
/**
* Computes the barycentric coordinates for a point with respect to a triangle.
- *
* @function
- *
* @param {Cartesian2|Cartesian3} point The point to test.
* @param {Cartesian2|Cartesian3} p0 The first point of the triangle, corresponding to the barycentric x-axis.
* @param {Cartesian2|Cartesian3} p1 The second point of the triangle, corresponding to the barycentric y-axis.
* @param {Cartesian2|Cartesian3} p2 The third point of the triangle, corresponding to the barycentric z-axis.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3|undefined} The modified result parameter or a new Cartesian3 instance if one was not provided. If the triangle is degenerate the function will return undefined.
- *
* @example
* // Returns Cartesian3.UNIT_X
* const p = new Cesium.Cartesian3(-1.0, 0.0, 0.0);
diff --git a/packages/engine/Source/Core/binarySearch.js b/packages/engine/Source/Core/binarySearch.js
index 5cbb2890b96a..55ab469cb7c1 100644
--- a/packages/engine/Source/Core/binarySearch.js
+++ b/packages/engine/Source/Core/binarySearch.js
@@ -2,7 +2,6 @@ import Check from "./Check.js";
/**
* Finds an item in a sorted array.
- *
* @function
* @param {Array} array The sorted array to search.
* @param {*} itemToFind The item to find in the array.
@@ -12,7 +11,6 @@ import Check from "./Check.js";
* does not exist, the return value is a negative number which is the bitwise complement (~)
* of the index before which the itemToFind should be inserted in order to maintain the
* sorted order of the array.
- *
* @example
* // Create a comparator function to search through an array of numbers.
* function comparator(a, b) {
@@ -52,13 +50,11 @@ function binarySearch(array, itemToFind, comparator) {
/**
* A function used to compare two items while performing a binary search.
* @callback binarySearchComparator
- *
* @param {*} a An item in the array.
* @param {*} b The item being searched for.
* @returns {number} Returns a negative value if a
is less than b
,
* a positive value if a
is greater than b
, or
* 0 if a
is equal to b
.
- *
* @example
* function compareNumbers(a, b) {
* return a - b;
diff --git a/packages/engine/Source/Core/buildModuleUrl.js b/packages/engine/Source/Core/buildModuleUrl.js
index 88a1982fbb7f..f19816477449 100644
--- a/packages/engine/Source/Core/buildModuleUrl.js
+++ b/packages/engine/Source/Core/buildModuleUrl.js
@@ -93,10 +93,8 @@ let implementation;
/**
* Given a relative URL under the Cesium base URL, returns an absolute URL.
* @function
- *
* @param {string} relativeUrl The relative path.
* @returns {string} The absolutely URL representation of the provided path.
- *
* @example
* const viewer = new Cesium.Viewer("cesiumContainer", {
* baseLayer: Cesium.ImageryLayer.fromProviderAsync(
@@ -144,7 +142,6 @@ buildModuleUrl.setBaseUrl = function (value) {
/**
* Gets the base URL for resolving modules.
- *
* @function
* @returns {string} The configured base URL
*/
diff --git a/packages/engine/Source/Core/clone.js b/packages/engine/Source/Core/clone.js
index f366c04b1826..aab8184b09f6 100644
--- a/packages/engine/Source/Core/clone.js
+++ b/packages/engine/Source/Core/clone.js
@@ -2,11 +2,9 @@ import defaultValue from "./defaultValue.js";
/**
* Clones an object, returning a new object containing the same properties.
- *
* @function
- *
* @param {object} object The object to clone.
- * @param {boolean} [deep=false] If true, all properties will be deep cloned recursively.
+ * @param {boolean} [deep] If true, all properties will be deep cloned recursively.
* @returns {object} The cloned object.
*/
function clone(object, deep) {
diff --git a/packages/engine/Source/Core/combine.js b/packages/engine/Source/Core/combine.js
index 98d5cf74c6d0..8a1224896877 100644
--- a/packages/engine/Source/Core/combine.js
+++ b/packages/engine/Source/Core/combine.js
@@ -5,7 +5,6 @@ import defined from "./defined.js";
* Merges two objects, copying their properties onto a new combined object. When two objects have the same
* property, the value of the property on the first object is used. If either object is undefined,
* it will be treated as an empty object.
- *
* @example
* const object1 = {
* propOne : 1,
@@ -24,12 +23,10 @@ import defined from "./defined.js";
* // value1 : 10
* // }
* // }
- *
* @param {object} [object1] The first object to merge.
* @param {object} [object2] The second object to merge.
- * @param {boolean} [deep=false] Perform a recursive merge.
+ * @param {boolean} [deep] Perform a recursive merge.
* @returns {object} The combined object containing all properties from both objects.
- *
* @function
*/
function combine(object1, object2, deep) {
diff --git a/packages/engine/Source/Core/createGuid.js b/packages/engine/Source/Core/createGuid.js
index f11200d302a2..c01d60f1c5a3 100644
--- a/packages/engine/Source/Core/createGuid.js
+++ b/packages/engine/Source/Core/createGuid.js
@@ -1,14 +1,9 @@
/**
* Creates a Globally unique identifier (GUID) string. A GUID is 128 bits long, and can guarantee uniqueness across space and time.
- *
* @function
- *
* @returns {string}
- *
- *
* @example
* this.guid = Cesium.createGuid();
- *
* @see {@link http://www.ietf.org/rfc/rfc4122.txt|RFC 4122 A Universally Unique IDentifier (UUID) URN Namespace}
*/
function createGuid() {
diff --git a/packages/engine/Source/Core/createWorldBathymetryAsync.js b/packages/engine/Source/Core/createWorldBathymetryAsync.js
index b01fa3626571..5e17eb3d6332 100644
--- a/packages/engine/Source/Core/createWorldBathymetryAsync.js
+++ b/packages/engine/Source/Core/createWorldBathymetryAsync.js
@@ -3,15 +3,11 @@ import defaultValue from "./defaultValue.js";
/**
* Creates a {@link CesiumTerrainProvider} instance for the {@link https://cesium.com/content/#cesium-world-bathymetry|Cesium World Bathymetry}.
- *
* @function
- *
- * @param {Object} [options] Object with the following properties:
- * @param {Boolean} [options.requestVertexNormals=false] Flag that indicates if the client should request additional lighting information from the server if available.
+ * @param {object} [options] Object with the following properties:
+ * @param {boolean} [options.requestVertexNormals] Flag that indicates if the client should request additional lighting information from the server if available.
* @returns {Promise} A promise that resolves to the created CesiumTerrainProvider
- *
* @see Ion
- *
* @example
* // Create Cesium World Bathymetry with default settings
* try {
@@ -21,7 +17,6 @@ import defaultValue from "./defaultValue.js";
* } catch (error) {
* console.log(error);
* }
- *
* @example
* // Create Cesium World Bathymetry with normals.
* try {
@@ -33,7 +28,6 @@ import defaultValue from "./defaultValue.js";
* } catch (error) {
* console.log(error);
* }
- *
*/
function createWorldBathymetryAsync(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
diff --git a/packages/engine/Source/Core/createWorldTerrainAsync.js b/packages/engine/Source/Core/createWorldTerrainAsync.js
index ec931a8ed4e6..a8a3b846244b 100644
--- a/packages/engine/Source/Core/createWorldTerrainAsync.js
+++ b/packages/engine/Source/Core/createWorldTerrainAsync.js
@@ -3,16 +3,12 @@ import defaultValue from "./defaultValue.js";
/**
* Creates a {@link CesiumTerrainProvider} instance for the {@link https://cesium.com/content/#cesium-world-terrain|Cesium World Terrain}.
- *
* @function
- *
- * @param {Object} [options] Object with the following properties:
- * @param {Boolean} [options.requestVertexNormals=false] Flag that indicates if the client should request additional lighting information from the server if available.
- * @param {Boolean} [options.requestWaterMask=false] Flag that indicates if the client should request per tile water masks from the server if available.
+ * @param {object} [options] Object with the following properties:
+ * @param {boolean} [options.requestVertexNormals] Flag that indicates if the client should request additional lighting information from the server if available.
+ * @param {boolean} [options.requestWaterMask] Flag that indicates if the client should request per tile water masks from the server if available.
* @returns {Promise} A promise that resolves to the created CesiumTerrainProvider
- *
* @see Ion
- *
* @example
* // Create Cesium World Terrain with default settings
* try {
@@ -22,7 +18,6 @@ import defaultValue from "./defaultValue.js";
* } catch (error) {
* console.log(error);
* }
- *
* @example
* // Create Cesium World Terrain with water and normals.
* try {
@@ -35,7 +30,6 @@ import defaultValue from "./defaultValue.js";
* } catch (error) {
* console.log(error);
* }
- *
*/
function createWorldTerrainAsync(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
diff --git a/packages/engine/Source/Core/decodeGoogleEarthEnterpriseData.js b/packages/engine/Source/Core/decodeGoogleEarthEnterpriseData.js
index 46d76894f5b9..c138d0c79e05 100644
--- a/packages/engine/Source/Core/decodeGoogleEarthEnterpriseData.js
+++ b/packages/engine/Source/Core/decodeGoogleEarthEnterpriseData.js
@@ -6,10 +6,8 @@ const compressedMagicSwap = 0xadde6874;
/**
* Decodes data that is received from the Google Earth Enterprise server.
- *
* @param {ArrayBuffer} key The key used during decoding.
* @param {ArrayBuffer} data The data to be decoded.
- *
* @private
*/
function decodeGoogleEarthEnterpriseData(key, data) {
diff --git a/packages/engine/Source/Core/defaultValue.js b/packages/engine/Source/Core/defaultValue.js
index 50c20d554986..47dcf05cf643 100644
--- a/packages/engine/Source/Core/defaultValue.js
+++ b/packages/engine/Source/Core/defaultValue.js
@@ -1,13 +1,10 @@
/**
* Returns the first parameter if not undefined, otherwise the second parameter.
* Useful for setting a default value for a parameter.
- *
* @function
- *
* @param {*} a
* @param {*} b
* @returns {*} Returns the first parameter if not undefined, otherwise the second parameter.
- *
* @example
* param = Cesium.defaultValue(param, 'default');
*/
diff --git a/packages/engine/Source/Core/defer.js b/packages/engine/Source/Core/defer.js
index 2e6c510fc22c..f23180b2b3e1 100644
--- a/packages/engine/Source/Core/defer.js
+++ b/packages/engine/Source/Core/defer.js
@@ -1,20 +1,17 @@
/**
* A function used to resolve a promise upon completion .
* @callback defer.resolve
- *
* @param {*} value The resulting value.
*/
/**
* A function used to reject a promise upon failure.
* @callback defer.reject
- *
* @param {*} error The error.
*/
/**
* An object which contains a promise object, and functions to resolve or reject the promise.
- *
* @typedef {object} defer.deferred
* @property {defer.resolve} resolve Resolves the promise when called.
* @property {defer.reject} reject Rejects the promise when called.
diff --git a/packages/engine/Source/Core/defined.js b/packages/engine/Source/Core/defined.js
index 5040c613e7c3..06cd99b7a0af 100644
--- a/packages/engine/Source/Core/defined.js
+++ b/packages/engine/Source/Core/defined.js
@@ -1,9 +1,7 @@
/**
* @function
- *
* @param {*} value The object.
* @returns {boolean} Returns true if the object is defined, returns false otherwise.
- *
* @example
* if (Cesium.defined(positions)) {
* doSomething();
diff --git a/packages/engine/Source/Core/deprecationWarning.js b/packages/engine/Source/Core/deprecationWarning.js
index 0b9c727b8290..e6e7d335cb37 100644
--- a/packages/engine/Source/Core/deprecationWarning.js
+++ b/packages/engine/Source/Core/deprecationWarning.js
@@ -6,12 +6,9 @@ import oneTimeWarning from "./oneTimeWarning.js";
* Logs a deprecation message to the console. Use this function instead of
* console.log
directly since this does not log duplicate messages
* unless it is called from multiple workers.
- *
* @function deprecationWarning
- *
* @param {string} identifier The unique identifier for this deprecated API.
* @param {string} message The message to log to the console.
- *
* @example
* // Deprecated function or class
* function Foo() {
@@ -38,7 +35,6 @@ import oneTimeWarning from "./oneTimeWarning.js";
* }
* }
* });
- *
* @private
*/
function deprecationWarning(identifier, message) {
diff --git a/packages/engine/Source/Core/destroyObject.js b/packages/engine/Source/Core/destroyObject.js
index 40093a8ba362..550d54f0d66f 100644
--- a/packages/engine/Source/Core/destroyObject.js
+++ b/packages/engine/Source/Core/destroyObject.js
@@ -15,21 +15,16 @@ function returnTrue() {
* need to be explicitly released. Client code calls an object's destroy
function,
* which then releases the native resource and calls destroyObject
to put itself
* in a destroyed state.
- *
* @function
- *
* @param {object} object The object to destroy.
* @param {string} [message] The message to include in the exception that is thrown if
* a destroyed object's function is called.
- *
- *
* @example
* // How a texture would destroy itself.
* this.destroy = function () {
* _gl.deleteTexture(_texture);
* return Cesium.destroyObject(this);
* };
- *
* @see DeveloperError
*/
function destroyObject(object, message) {
diff --git a/packages/engine/Source/Core/formatError.js b/packages/engine/Source/Core/formatError.js
index 3ef17614f97a..2eb5cfc07eda 100644
--- a/packages/engine/Source/Core/formatError.js
+++ b/packages/engine/Source/Core/formatError.js
@@ -3,9 +3,7 @@ import defined from "./defined.js";
/**
* Formats an error object into a String. If available, uses name, message, and stack
* properties, otherwise, falls back on toString().
- *
* @function
- *
* @param {*} object The item to find in the array.
* @returns {string} A string containing the formatted error.
*/
diff --git a/packages/engine/Source/Core/getAbsoluteUri.js b/packages/engine/Source/Core/getAbsoluteUri.js
index 63f5e7cb9d92..b9c3fbce69a6 100644
--- a/packages/engine/Source/Core/getAbsoluteUri.js
+++ b/packages/engine/Source/Core/getAbsoluteUri.js
@@ -6,11 +6,9 @@ import DeveloperError from "./DeveloperError.js";
/**
* Given a relative Uri and a base Uri, returns the absolute Uri of the relative Uri.
* @function
- *
* @param {string} relative The relative Uri.
* @param {string} [base] The base Uri.
* @returns {string} The absolute Uri of the given relative Uri.
- *
* @example
* //absolute Uri will be "https://test.com/awesome.png";
* const absoluteUri = Cesium.getAbsoluteUri('awesome.png', 'https://test.com');
diff --git a/packages/engine/Source/Core/getBaseUri.js b/packages/engine/Source/Core/getBaseUri.js
index 78c600cafbcb..79753b47b935 100644
--- a/packages/engine/Source/Core/getBaseUri.js
+++ b/packages/engine/Source/Core/getBaseUri.js
@@ -5,11 +5,9 @@ import DeveloperError from "./DeveloperError.js";
/**
* Given a URI, returns the base path of the URI.
* @function
- *
* @param {string} uri The Uri.
- * @param {boolean} [includeQuery = false] Whether or not to include the query string and fragment form the uri
+ * @param {boolean} [includeQuery] Whether or not to include the query string and fragment form the uri
* @returns {string} The base path of the Uri.
- *
* @example
* // basePath will be "/Gallery/";
* const basePath = Cesium.getBaseUri('/Gallery/simple.czml?value=true&example=false');
diff --git a/packages/engine/Source/Core/getExtensionFromUri.js b/packages/engine/Source/Core/getExtensionFromUri.js
index f51ea912d353..0994dd8e0024 100644
--- a/packages/engine/Source/Core/getExtensionFromUri.js
+++ b/packages/engine/Source/Core/getExtensionFromUri.js
@@ -5,10 +5,8 @@ import DeveloperError from "./DeveloperError.js";
/**
* Given a URI, returns the extension of the URI.
* @function getExtensionFromUri
- *
* @param {string} uri The Uri.
* @returns {string} The extension of the Uri.
- *
* @example
* //extension will be "czml";
* const extension = Cesium.getExtensionFromUri('/Gallery/simple.czml?value=true&example=false');
diff --git a/packages/engine/Source/Core/getFilenameFromUri.js b/packages/engine/Source/Core/getFilenameFromUri.js
index ee250c0173ec..a721010e6068 100644
--- a/packages/engine/Source/Core/getFilenameFromUri.js
+++ b/packages/engine/Source/Core/getFilenameFromUri.js
@@ -5,10 +5,8 @@ import DeveloperError from "./DeveloperError.js";
/**
* Given a URI, returns the last segment of the URI, removing any path or query information.
* @function getFilenameFromUri
- *
* @param {string} uri The Uri.
* @returns {string} The last segment of the Uri.
- *
* @example
* //fileName will be"simple.czml";
* const fileName = Cesium.getFilenameFromUri('/Gallery/simple.czml?value=true&example=false');
diff --git a/packages/engine/Source/Core/getImageFromTypedArray.js b/packages/engine/Source/Core/getImageFromTypedArray.js
index 43d32b93d780..12b1a75aa837 100644
--- a/packages/engine/Source/Core/getImageFromTypedArray.js
+++ b/packages/engine/Source/Core/getImageFromTypedArray.js
@@ -1,11 +1,9 @@
/**
* Constructs an image from a TypedArray of pixel values
- *
* @param {Uint8Array} typedArray The array of pixel values
* @param {number} width The width of the image to create
* @param {number} height The height of the image to create
* @returns {HTMLCanvasElement} A new canvas containing the constructed image
- *
* @private
*/
function getImageFromTypedArray(typedArray, width, height) {
diff --git a/packages/engine/Source/Core/getImagePixels.js b/packages/engine/Source/Core/getImagePixels.js
index 055ab47c85bd..a31cfcfc46cf 100644
--- a/packages/engine/Source/Core/getImagePixels.js
+++ b/packages/engine/Source/Core/getImagePixels.js
@@ -5,9 +5,7 @@ const context2DsByWidthAndHeight = {};
/**
* Extract a pixel array from a loaded image. Draws the image
* into a canvas so it can read the pixels back.
- *
* @function getImagePixels
- *
* @param {HTMLImageElement|ImageBitmap} image The image to extract pixels from.
* @param {number} width The width of the image. If not defined, then image.width is assigned.
* @param {number} height The height of the image. If not defined, then image.height is assigned.
diff --git a/packages/engine/Source/Core/getJsonFromTypedArray.js b/packages/engine/Source/Core/getJsonFromTypedArray.js
index ff5e2f4c51f9..863d001ff10b 100644
--- a/packages/engine/Source/Core/getJsonFromTypedArray.js
+++ b/packages/engine/Source/Core/getJsonFromTypedArray.js
@@ -2,14 +2,11 @@ import getStringFromTypedArray from "./getStringFromTypedArray.js";
/**
* Parses JSON from a Uint8Array.
- *
* @function
- *
* @param {Uint8Array} uint8Array The Uint8Array to read from.
- * @param {number} [byteOffset=0] The byte offset to start reading from.
+ * @param {number} [byteOffset] The byte offset to start reading from.
* @param {number} [byteLength] The byte length to read. If byteLength is omitted the remainder of the buffer is read.
* @returns {object} An object containing the parsed JSON.
- *
* @private
*/
function getJsonFromTypedArray(uint8Array, byteOffset, byteLength) {
diff --git a/packages/engine/Source/Core/getMagic.js b/packages/engine/Source/Core/getMagic.js
index ffad591f4477..77e706812f30 100644
--- a/packages/engine/Source/Core/getMagic.js
+++ b/packages/engine/Source/Core/getMagic.js
@@ -2,6 +2,8 @@ import defaultValue from "./defaultValue.js";
import getStringFromTypedArray from "./getStringFromTypedArray.js";
/**
+ * @param uint8Array
+ * @param byteOffset
* @private
*/
function getMagic(uint8Array, byteOffset) {
diff --git a/packages/engine/Source/Core/getStringFromTypedArray.js b/packages/engine/Source/Core/getStringFromTypedArray.js
index 2b3c04fe394b..9e5cd8df8c60 100644
--- a/packages/engine/Source/Core/getStringFromTypedArray.js
+++ b/packages/engine/Source/Core/getStringFromTypedArray.js
@@ -5,14 +5,11 @@ import RuntimeError from "./RuntimeError.js";
/**
* Reads a string from a Uint8Array.
- *
* @function
- *
* @param {Uint8Array} uint8Array The Uint8Array to read from.
- * @param {number} [byteOffset=0] The byte offset to start reading from.
+ * @param {number} [byteOffset] The byte offset to start reading from.
* @param {number} [byteLength] The byte length to read. If byteLength is omitted the remainder of the buffer is read.
* @returns {string} The string.
- *
* @private
*/
function getStringFromTypedArray(uint8Array, byteOffset, byteLength) {
diff --git a/packages/engine/Source/Core/getTimestamp.js b/packages/engine/Source/Core/getTimestamp.js
index 6c1ce26a1874..1dde356e120f 100644
--- a/packages/engine/Source/Core/getTimestamp.js
+++ b/packages/engine/Source/Core/getTimestamp.js
@@ -3,9 +3,7 @@
* are expressed in milliseconds, but it is not specified what the milliseconds are
* measured from. This function uses performance.now() if it is available, or Date.now()
* otherwise.
- *
* @function getTimestamp
- *
* @returns {number} The timestamp in milliseconds since some unspecified reference time.
*/
let getTimestamp;
diff --git a/packages/engine/Source/Core/isBitSet.js b/packages/engine/Source/Core/isBitSet.js
index ebeedbd473ed..72bb942a3072 100644
--- a/packages/engine/Source/Core/isBitSet.js
+++ b/packages/engine/Source/Core/isBitSet.js
@@ -1,4 +1,6 @@
/**
+ * @param bits
+ * @param mask
* @private
*/
function isBitSet(bits, mask) {
diff --git a/packages/engine/Source/Core/isBlobUri.js b/packages/engine/Source/Core/isBlobUri.js
index 9e3f6c384599..cc7447d763bd 100644
--- a/packages/engine/Source/Core/isBlobUri.js
+++ b/packages/engine/Source/Core/isBlobUri.js
@@ -4,12 +4,9 @@ const blobUriRegex = /^blob:/i;
/**
* Determines if the specified uri is a blob uri.
- *
* @function isBlobUri
- *
* @param {string} uri The uri to test.
* @returns {boolean} true when the uri is a blob uri; otherwise, false.
- *
* @private
*/
function isBlobUri(uri) {
diff --git a/packages/engine/Source/Core/isCrossOriginUrl.js b/packages/engine/Source/Core/isCrossOriginUrl.js
index 45570389c956..bc8cfaa0f8a7 100644
--- a/packages/engine/Source/Core/isCrossOriginUrl.js
+++ b/packages/engine/Source/Core/isCrossOriginUrl.js
@@ -4,7 +4,7 @@ let a;
/**
* Given a URL, determine whether that URL is considered cross-origin to the current page.
- *
+ * @param url
* @private
*/
function isCrossOriginUrl(url) {
diff --git a/packages/engine/Source/Core/isDataUri.js b/packages/engine/Source/Core/isDataUri.js
index bb5ef14bef0f..aea5d78d888a 100644
--- a/packages/engine/Source/Core/isDataUri.js
+++ b/packages/engine/Source/Core/isDataUri.js
@@ -4,12 +4,9 @@ const dataUriRegex = /^data:/i;
/**
* Determines if the specified uri is a data uri.
- *
* @function isDataUri
- *
* @param {string} uri The uri to test.
* @returns {boolean} true when the uri is a data uri; otherwise, false.
- *
* @private
*/
function isDataUri(uri) {
diff --git a/packages/engine/Source/Core/isLeapYear.js b/packages/engine/Source/Core/isLeapYear.js
index 404b3725b9e8..742a5211ece6 100644
--- a/packages/engine/Source/Core/isLeapYear.js
+++ b/packages/engine/Source/Core/isLeapYear.js
@@ -2,12 +2,9 @@ import DeveloperError from "./DeveloperError.js";
/**
* Determines if a given date is a leap year.
- *
* @function isLeapYear
- *
* @param {number} year The year to be tested.
* @returns {boolean} True if year
is a leap year.
- *
* @example
* const leapYear = Cesium.isLeapYear(2000); // true
*/
diff --git a/packages/engine/Source/Core/loadAndExecuteScript.js b/packages/engine/Source/Core/loadAndExecuteScript.js
index fbf52cf7370f..41af6b9724c5 100644
--- a/packages/engine/Source/Core/loadAndExecuteScript.js
+++ b/packages/engine/Source/Core/loadAndExecuteScript.js
@@ -1,4 +1,5 @@
/**
+ * @param url
* @private
*/
function loadAndExecuteScript(url) {
diff --git a/packages/engine/Source/Core/loadImageFromTypedArray.js b/packages/engine/Source/Core/loadImageFromTypedArray.js
index 3c0bd64cc9d4..db3a91ca7f9f 100644
--- a/packages/engine/Source/Core/loadImageFromTypedArray.js
+++ b/packages/engine/Source/Core/loadImageFromTypedArray.js
@@ -4,6 +4,7 @@ import defined from "./defined.js";
import Resource from "./Resource.js";
/**
+ * @param options
* @private
*/
function loadImageFromTypedArray(options) {
diff --git a/packages/engine/Source/Core/loadKTX2.js b/packages/engine/Source/Core/loadKTX2.js
index 8359640fc854..27ae392a6a81 100644
--- a/packages/engine/Source/Core/loadKTX2.js
+++ b/packages/engine/Source/Core/loadKTX2.js
@@ -4,7 +4,6 @@ import KTX2Transcoder from "./KTX2Transcoder.js";
/**
* Stores the supported formats that KTX2 can transcode to. Called during context creation.
- *
* @param {boolean} s3tc Whether or not S3TC is supported
* @param {boolean} pvrtc Whether or not PVRTC is supported
* @param {boolean} astc Whether or not ASTC is supported
@@ -42,26 +41,22 @@ loadKTX2.setKTX2SupportedFormats = function (
*
* The following are part of the KTX2 format specification but are not supported:
*
- * Metadata
- * 3D textures
- * Texture Arrays
- * Video
+ * Metadata
+ * 3D textures
+ * Texture Arrays
+ * Video
*
*
- *
* @function loadKTX2
- *
* @param {Resource|string|ArrayBuffer} resourceOrUrlOrBuffer The URL of the binary data or an ArrayBuffer.
* @returns {Promise|undefined} A promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
- *
- * @exception {RuntimeError} Invalid KTX2 file.
- * @exception {RuntimeError} KTX2 texture arrays are not supported.
- * @exception {RuntimeError} KTX2 3D textures are unsupported.
- * @exception {RuntimeError} No transcoding format target available for ETC1S compressed ktx2s.
- * @exception {RuntimeError} No transcoding format target available for UASTC compressed ktx2s.
- * @exception {RuntimeError} startTranscoding() failed.
- * @exception {RuntimeError} transcodeImage() failed.
- *
+ * @throws {RuntimeError} Invalid KTX2 file.
+ * @throws {RuntimeError} KTX2 texture arrays are not supported.
+ * @throws {RuntimeError} KTX2 3D textures are unsupported.
+ * @throws {RuntimeError} No transcoding format target available for ETC1S compressed ktx2s.
+ * @throws {RuntimeError} No transcoding format target available for UASTC compressed ktx2s.
+ * @throws {RuntimeError} startTranscoding() failed.
+ * @throws {RuntimeError} transcodeImage() failed.
* @example
* // load a single URL asynchronously
* Cesium.loadKTX2('some/url').then(function (ktx2Data) {
diff --git a/packages/engine/Source/Core/mergeSort.js b/packages/engine/Source/Core/mergeSort.js
index ea60bd763811..25a651f18a33 100644
--- a/packages/engine/Source/Core/mergeSort.js
+++ b/packages/engine/Source/Core/mergeSort.js
@@ -54,12 +54,10 @@ function sort(array, compare, userDefinedObject, start, end) {
/**
* A stable merge sort.
- *
* @function mergeSort
* @param {Array} array The array to sort.
* @param {mergeSortComparator} comparator The function to use to compare elements in the array.
* @param {*} [userDefinedObject] Any item to pass as the third parameter to comparator
.
- *
* @example
* // Assume array contains BoundingSpheres in world coordinates.
* // Sort them in ascending order of distance from the camera.
@@ -95,14 +93,12 @@ function mergeSort(array, comparator, userDefinedObject) {
/**
* A function used to compare two items while performing a merge sort.
* @callback mergeSortComparator
- *
* @param {*} a An item in the array.
* @param {*} b An item in the array.
* @param {*} [userDefinedObject] An object that was passed to {@link mergeSort}.
* @returns {number} Returns a negative value if a
is less than b
,
* a positive value if a
is greater than b
, or
* 0 if a
is equal to b
.
- *
* @example
* function compareNumbers(a, b, userDefinedObject) {
* return a - b;
diff --git a/packages/engine/Source/Core/objectToQuery.js b/packages/engine/Source/Core/objectToQuery.js
index c9a6e960f338..e8daa8ed3fca 100644
--- a/packages/engine/Source/Core/objectToQuery.js
+++ b/packages/engine/Source/Core/objectToQuery.js
@@ -6,18 +6,14 @@ import DeveloperError from "./DeveloperError.js";
* with names and values encoded properly for use in a URL. Values that are arrays
* will produce multiple values with the same name.
* @function objectToQuery
- *
* @param {object} obj The object containing data to encode.
* @returns {string} An encoded query string.
- *
- *
* @example
* const str = Cesium.objectToQuery({
* key1 : 'some value',
* key2 : 'a/b',
* key3 : ['x', 'y']
* });
- *
* @see queryToObject
* // str will be:
* // 'key1=some%20value&key2=a%2Fb&key3=x&key3=y'
diff --git a/packages/engine/Source/Core/oneTimeWarning.js b/packages/engine/Source/Core/oneTimeWarning.js
index 4231bd3eae41..306e49aed6bc 100644
--- a/packages/engine/Source/Core/oneTimeWarning.js
+++ b/packages/engine/Source/Core/oneTimeWarning.js
@@ -8,12 +8,9 @@ const warnings = {};
* Logs a one time message to the console. Use this function instead of
* console.log
directly since this does not log duplicate messages
* unless it is called from multiple workers.
- *
* @function oneTimeWarning
- *
* @param {string} identifier The unique identifier for this warning.
- * @param {string} [message=identifier] The message to log to the console.
- *
+ * @param {string} [message] The message to log to the console.
* @example
* for(let i=0;itrue
if the point is inside the triangle; otherwise, false
.
- *
* @example
* // Returns true
* const p = new Cesium.Cartesian2(0.25, 0.25);
diff --git a/packages/engine/Source/Core/queryToObject.js b/packages/engine/Source/Core/queryToObject.js
index 0aa374bab876..3cb875493341 100644
--- a/packages/engine/Source/Core/queryToObject.js
+++ b/packages/engine/Source/Core/queryToObject.js
@@ -6,11 +6,8 @@ import DeveloperError from "./DeveloperError.js";
* name/value pairs from the query string, decoded. If a name appears multiple times,
* the value in the object will be an array of values.
* @function queryToObject
- *
* @param {string} queryString The query string.
* @returns {object} An object containing the parameters parsed from the query string.
- *
- *
* @example
* const obj = Cesium.queryToObject('key1=some%20value&key2=a%2Fb&key3=x&key3=y');
* // obj will be:
@@ -19,7 +16,6 @@ import DeveloperError from "./DeveloperError.js";
* // key2 : 'a/b',
* // key3 : ['x', 'y']
* // }
- *
* @see objectToQuery
*/
function queryToObject(queryString) {
diff --git a/packages/engine/Source/Core/resizeImageToNextPowerOfTwo.js b/packages/engine/Source/Core/resizeImageToNextPowerOfTwo.js
index 3c213365e3f4..79489d633da4 100644
--- a/packages/engine/Source/Core/resizeImageToNextPowerOfTwo.js
+++ b/packages/engine/Source/Core/resizeImageToNextPowerOfTwo.js
@@ -4,10 +4,8 @@ import CesiumMath from "./Math.js";
* Resizes an image to ensure both width and height are powers of 2.
* NOTE: The input image is resampled larger, rather than padded.
* The aspect ratio of the image may change.
- *
* @param {HTMLImageElement|HTMLCanvasElement} image The image to be resized
* @returns {HTMLCanvasElement} A new canvas with the resized image drawn to it
- *
* @private
*/
function resizeImageToNextPowerOfTwo(image) {
diff --git a/packages/engine/Source/Core/sampleTerrain.js b/packages/engine/Source/Core/sampleTerrain.js
index cd2f2dee82f7..b8d8afbc2dfe 100644
--- a/packages/engine/Source/Core/sampleTerrain.js
+++ b/packages/engine/Source/Core/sampleTerrain.js
@@ -14,17 +14,13 @@ import defined from "./defined.js";
* words, it will not necessarily be 0.0 if sampled in the ocean. This function needs the
* terrain level of detail as input, if you need to get the altitude of the terrain as precisely
* as possible (i.e. with maximum level of detail) use {@link sampleTerrainMostDetailed}.
- *
* @function sampleTerrain
- *
* @param {TerrainProvider} terrainProvider The terrain provider from which to query heights.
* @param {number} level The terrain level-of-detail from which to query terrain heights.
* @param {Cartographic[]} positions The positions to update with terrain heights.
- * @param {boolean} [rejectOnTileFail=false] If true, for any failed terrain tile requests, the promise will be rejected. If false, returned heights will be undefined.
+ * @param {boolean} [rejectOnTileFail] If true, for any failed terrain tile requests, the promise will be rejected. If false, returned heights will be undefined.
* @returns {Promise} A promise that resolves to the provided list of positions when terrain the query has completed.
- *
* @see sampleTerrainMostDetailed
- *
* @example
* // Query the terrain height of two Cartographic positions
* const terrainProvider = await Cesium.createWorldTerrainAsync();
@@ -68,7 +64,6 @@ async function sampleTerrain(
* @param {boolean} rejectOnTileFail If true, the promise will be rejected. If false, returned heights will be undefined.
* @returns {boolean} true if the request was made, and we are okay to attempt the next item immediately,
* or false if we were throttled and should wait awhile before retrying.
- *
* @private
*/
function attemptConsumeNextQueueItem(tileRequests, results, rejectOnTileFail) {
@@ -121,7 +116,6 @@ function delay(ms) {
* @param {Array>} results The list to put all the result promises into
* @param {boolean} rejectOnTileFail If true, the promise will be rejected. If false, returned heights will be undefined.
* @returns {Promise} A promise which resolves once all requests have been started
- *
* @private
*/
function drainTileRequestQueue(tileRequests, results, rejectOnTileFail) {
diff --git a/packages/engine/Source/Core/sampleTerrainMostDetailed.js b/packages/engine/Source/Core/sampleTerrainMostDetailed.js
index 61c5e092b165..385d4e7a77f5 100644
--- a/packages/engine/Source/Core/sampleTerrainMostDetailed.js
+++ b/packages/engine/Source/Core/sampleTerrainMostDetailed.js
@@ -7,15 +7,12 @@ const scratchCartesian2 = new Cartesian2();
/**
* Initiates a sampleTerrain() request at the maximum available tile level for a terrain dataset.
- *
* @function sampleTerrainMostDetailed
- *
* @param {TerrainProvider} terrainProvider The terrain provider from which to query heights.
* @param {Cartographic[]} positions The positions to update with terrain heights.
- * @param {boolean} [rejectOnTileFail=false] If true, for a failed terrain tile request the promise will be rejected. If false, returned heights will be undefined.
+ * @param {boolean} [rejectOnTileFail] If true, for a failed terrain tile request the promise will be rejected. If false, returned heights will be undefined.
* @returns {Promise} A promise that resolves to the provided list of positions when terrain the query has completed. This
* promise will reject if the terrain provider's `availability` property is undefined.
- *
* @example
* // Query the terrain height of two Cartographic positions
* const terrainProvider = await Cesium.createWorldTerrainAsync();
diff --git a/packages/engine/Source/Core/scaleToGeodeticSurface.js b/packages/engine/Source/Core/scaleToGeodeticSurface.js
index 99b2a8b75b60..ae90e9aa77d1 100644
--- a/packages/engine/Source/Core/scaleToGeodeticSurface.js
+++ b/packages/engine/Source/Core/scaleToGeodeticSurface.js
@@ -10,16 +10,13 @@ const scaleToGeodeticSurfaceGradient = new Cartesian3();
* Scales the provided Cartesian position along the geodetic surface normal
* so that it is on the surface of this ellipsoid. If the position is
* at the center of the ellipsoid, this function returns undefined.
- *
* @param {Cartesian3} cartesian The Cartesian position to scale.
* @param {Cartesian3} oneOverRadii One over radii of the ellipsoid.
* @param {Cartesian3} oneOverRadiiSquared One over radii squared of the ellipsoid.
* @param {number} centerToleranceSquared Tolerance for closeness to the center.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter, a new Cartesian3 instance if none was provided, or undefined if the position is at the center.
- *
* @function scaleToGeodeticSurface
- *
* @private
*/
function scaleToGeodeticSurface(
diff --git a/packages/engine/Source/Core/srgbToLinear.js b/packages/engine/Source/Core/srgbToLinear.js
index f3bc68f6a40b..42e351e21e8a 100644
--- a/packages/engine/Source/Core/srgbToLinear.js
+++ b/packages/engine/Source/Core/srgbToLinear.js
@@ -2,12 +2,9 @@ import Check from "./Check.js";
/**
* Converts the value from sRGB color space to linear color space.
- *
* @function
- *
* @param {number} value The color value in sRGB color space.
* @returns {number} Returns the color value in linear color space.
- *
* @example
* const srgbColor = [0.5, 0.5, 0.5];
* const linearColor = srgbColor.map(function (c) {
diff --git a/packages/engine/Source/Core/subdivideArray.js b/packages/engine/Source/Core/subdivideArray.js
index 9404c76f43c4..d865cb771a2f 100644
--- a/packages/engine/Source/Core/subdivideArray.js
+++ b/packages/engine/Source/Core/subdivideArray.js
@@ -3,13 +3,10 @@ import DeveloperError from "./DeveloperError.js";
/**
* Subdivides an array into a number of smaller, equal sized arrays.
- *
* @function subdivideArray
- *
* @param {Array} array The array to divide.
* @param {number} numberOfArrays The number of arrays to divide the provided array into.
- *
- * @exception {DeveloperError} numberOfArrays must be greater than 0.
+ * @throws {DeveloperError} numberOfArrays must be greater than 0.
*/
function subdivideArray(array, numberOfArrays) {
//>>includeStart('debug', pragmas.debug);
diff --git a/packages/engine/Source/Core/wrapFunction.js b/packages/engine/Source/Core/wrapFunction.js
index 56781e037ae4..bb00fec398a5 100644
--- a/packages/engine/Source/Core/wrapFunction.js
+++ b/packages/engine/Source/Core/wrapFunction.js
@@ -4,7 +4,9 @@ import DeveloperError from "./DeveloperError.js";
* Wraps a function on the provided objects with another function called in the
* object's context so that the new function is always called immediately
* before the old one.
- *
+ * @param obj
+ * @param oldFunction
+ * @param newFunction
* @private
*/
function wrapFunction(obj, oldFunction, newFunction) {
diff --git a/packages/engine/Source/Core/writeTextToCanvas.js b/packages/engine/Source/Core/writeTextToCanvas.js
index 1db8a0ba0d1f..b48ed036d046 100644
--- a/packages/engine/Source/Core/writeTextToCanvas.js
+++ b/packages/engine/Source/Core/writeTextToCanvas.js
@@ -100,18 +100,17 @@ let imageSmoothingEnabledName;
/**
* Writes the given text into a new canvas. The canvas will be sized to fit the text.
* If text is blank, returns undefined.
- *
* @param {string} text The text to write.
* @param {object} [options] Object with the following properties:
- * @param {string} [options.font='10px sans-serif'] The CSS font to use.
- * @param {string} [options.textBaseline='bottom'] The baseline of the text.
- * @param {boolean} [options.fill=true] Whether to fill the text.
- * @param {boolean} [options.stroke=false] Whether to stroke the text.
- * @param {Color} [options.fillColor=Color.WHITE] The fill color.
- * @param {Color} [options.strokeColor=Color.BLACK] The stroke color.
- * @param {number} [options.strokeWidth=1] The stroke width.
- * @param {Color} [options.backgroundColor=Color.TRANSPARENT] The background color of the canvas.
- * @param {number} [options.padding=0] The pixel size of the padding to add around the text.
+ * @param {string} [options.font] The CSS font to use.
+ * @param {string} [options.textBaseline] The baseline of the text.
+ * @param {boolean} [options.fill] Whether to fill the text.
+ * @param {boolean} [options.stroke] Whether to stroke the text.
+ * @param {Color} [options.fillColor] The fill color.
+ * @param {Color} [options.strokeColor] The stroke color.
+ * @param {number} [options.strokeWidth] The stroke width.
+ * @param {Color} [options.backgroundColor] The background color of the canvas.
+ * @param {number} [options.padding] The pixel size of the padding to add around the text.
* @returns {HTMLCanvasElement|undefined} A new canvas with the given text drawn into it. The dimensions object
* from measureText will also be added to the returned canvas. If text is
* blank, returns undefined.
diff --git a/packages/engine/Source/DataSources/BillboardGraphics.js b/packages/engine/Source/DataSources/BillboardGraphics.js
index e6686ecaf4ff..2220c5f2af84 100644
--- a/packages/engine/Source/DataSources/BillboardGraphics.js
+++ b/packages/engine/Source/DataSources/BillboardGraphics.js
@@ -8,7 +8,6 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @typedef {object} BillboardGraphics.ConstructorOptions
*
* Initialization options for the BillboardGraphics constructor
- *
* @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the billboard.
* @property {Property | string | HTMLCanvasElement} [image] A Property specifying the Image, URI, or Canvas to use for the billboard.
* @property {Property | number} [scale=1.0] A numeric Property specifying the scale to apply to the image size.
@@ -39,12 +38,9 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* Example billboards
*
*
- *
* @alias BillboardGraphics
- * @constructor
- *
+ * @class
* @param {BillboardGraphics.ConstructorOptions} [options] Object describing initialization options
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Billboards.html|Cesium Sandcastle Billboard Demo}
*/
function BillboardGraphics(options) {
@@ -97,7 +93,6 @@ Object.defineProperties(BillboardGraphics.prototype, {
/**
* Gets the event that is raised whenever a property or sub-property is changed or modified.
* @memberof BillboardGraphics.prototype
- *
* @type {Event}
* @readonly
*/
@@ -334,7 +329,6 @@ Object.defineProperties(BillboardGraphics.prototype, {
/**
* Duplicates this instance.
- *
* @param {BillboardGraphics} [result] The object onto which to store the result.
* @returns {BillboardGraphics} The modified result parameter or a new instance if one was not provided.
*/
@@ -368,7 +362,6 @@ BillboardGraphics.prototype.clone = function (result) {
/**
* Assigns each unassigned property on this object to the value
* of the same property on the provided source object.
- *
* @param {BillboardGraphics} source The object to be merged into this object.
*/
BillboardGraphics.prototype.merge = function (source) {
diff --git a/packages/engine/Source/DataSources/BillboardVisualizer.js b/packages/engine/Source/DataSources/BillboardVisualizer.js
index 954e72047a6a..ddb43641d3b8 100644
--- a/packages/engine/Source/DataSources/BillboardVisualizer.js
+++ b/packages/engine/Source/DataSources/BillboardVisualizer.js
@@ -44,8 +44,7 @@ function EntityData(entity) {
/**
* A {@link Visualizer} which maps {@link Entity#billboard} to a {@link Billboard}.
* @alias BillboardVisualizer
- * @constructor
- *
+ * @class
* @param {EntityCluster} entityCluster The entity cluster to manage the collection of billboards and optionally cluster with other entities.
* @param {EntityCollection} entityCollection The entityCollection to visualize.
*/
@@ -73,7 +72,6 @@ function BillboardVisualizer(entityCluster, entityCollection) {
/**
* Updates the primitives created by this visualizer to match their
* Entity counterpart at the given time.
- *
* @param {JulianDate} time The time to update to.
* @returns {boolean} This function always returns true.
*/
@@ -235,7 +233,6 @@ BillboardVisualizer.prototype.update = function (time) {
/**
* Computes a bounding sphere which encloses the visualization produced for the specified entity.
* The bounding sphere is in the fixed frame of the scene's globe.
- *
* @param {Entity} entity The entity whose bounding sphere to compute.
* @param {BoundingSphere} result The bounding sphere onto which to store the result.
* @returns {BoundingSphereState} BoundingSphereState.DONE if the result contains the bounding sphere,
@@ -273,7 +270,6 @@ BillboardVisualizer.prototype.getBoundingSphere = function (entity, result) {
/**
* Returns true if this object was destroyed; otherwise, false.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
*/
BillboardVisualizer.prototype.isDestroyed = function () {
diff --git a/packages/engine/Source/DataSources/BoxGeometryUpdater.js b/packages/engine/Source/DataSources/BoxGeometryUpdater.js
index 93ef88ef93b7..098a2e310875 100644
--- a/packages/engine/Source/DataSources/BoxGeometryUpdater.js
+++ b/packages/engine/Source/DataSources/BoxGeometryUpdater.js
@@ -38,8 +38,7 @@ function BoxGeometryOptions(entity) {
* A {@link GeometryUpdater} for boxes.
* Clients do not normally create this class directly, but instead rely on {@link DataSourceDisplay}.
* @alias BoxGeometryUpdater
- * @constructor
- *
+ * @class
* @param {Entity} entity The entity containing the geometry to be visualized.
* @param {Scene} scene The scene where visualization is taking place.
*/
@@ -77,11 +76,9 @@ Object.defineProperties(BoxGeometryUpdater.prototype, {
/**
* Creates the geometry instance which represents the fill of the geometry.
- *
* @param {JulianDate} time The time to use when retrieving initial attribute values.
* @returns {GeometryInstance} The geometry instance representing the filled portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent a filled geometry.
+ * @throws {DeveloperError} This instance does not represent a filled geometry.
*/
BoxGeometryUpdater.prototype.createFillGeometryInstance = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -155,11 +152,9 @@ BoxGeometryUpdater.prototype.createFillGeometryInstance = function (time) {
/**
* Creates the geometry instance which represents the outline of the geometry.
- *
* @param {JulianDate} time The time to use when retrieving initial attribute values.
* @returns {GeometryInstance} The geometry instance representing the outline portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent an outlined geometry.
+ * @throws {DeveloperError} This instance does not represent an outlined geometry.
*/
BoxGeometryUpdater.prototype.createOutlineGeometryInstance = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -269,6 +264,9 @@ BoxGeometryUpdater.prototype._onEntityPropertyChanged = heightReferenceOnEntityP
BoxGeometryUpdater.DynamicGeometryUpdater = DynamicBoxGeometryUpdater;
/**
+ * @param geometryUpdater
+ * @param primitives
+ * @param groundPrimitives
* @private
*/
function DynamicBoxGeometryUpdater(
diff --git a/packages/engine/Source/DataSources/BoxGraphics.js b/packages/engine/Source/DataSources/BoxGraphics.js
index d922d1022850..4a8a2f060989 100644
--- a/packages/engine/Source/DataSources/BoxGraphics.js
+++ b/packages/engine/Source/DataSources/BoxGraphics.js
@@ -9,7 +9,6 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @typedef {object} BoxGraphics.ConstructorOptions
*
* Initialization options for the BoxGraphics constructor
- *
* @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the box.
* @property {Property | Cartesian3} [dimensions] A {@link Cartesian3} Property specifying the length, width, and height of the box.
* @property {Property | HeightReference} [heightReference=HeightReference.NONE] A Property specifying what the height from the entity position is relative to.
@@ -20,17 +19,13 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @property {Property | number} [outlineWidth=1.0] A numeric Property specifying the width of the outline.
* @property {Property | ShadowMode} [shadows=ShadowMode.DISABLED] An enum Property specifying whether the box casts or receives shadows from light sources.
* @property {Property | DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this box will be displayed.
- *
*/
/**
* Describes a box. The center position and orientation are determined by the containing {@link Entity}.
- *
* @alias BoxGraphics
- * @constructor
- *
+ * @class
* @param {BoxGraphics.ConstructorOptions} [options] Object describing initialization options
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Box.html|Cesium Sandcastle Box Demo}
*/
function BoxGraphics(options) {
@@ -159,7 +154,6 @@ Object.defineProperties(BoxGraphics.prototype, {
/**
* Duplicates this instance.
- *
* @param {BoxGraphics} [result] The object onto which to store the result.
* @returns {BoxGraphics} The modified result parameter or a new instance if one was not provided.
*/
@@ -183,7 +177,6 @@ BoxGraphics.prototype.clone = function (result) {
/**
* Assigns each unassigned property on this object to the value
* of the same property on the provided source object.
- *
* @param {BoxGraphics} source The object to be merged into this object.
*/
BoxGraphics.prototype.merge = function (source) {
diff --git a/packages/engine/Source/DataSources/CallbackProperty.js b/packages/engine/Source/DataSources/CallbackProperty.js
index c3609030cd92..2549eeec0b82 100644
--- a/packages/engine/Source/DataSources/CallbackProperty.js
+++ b/packages/engine/Source/DataSources/CallbackProperty.js
@@ -4,10 +4,8 @@ import Event from "../Core/Event.js";
/**
* A {@link Property} whose value is lazily evaluated by a callback function.
- *
* @alias CallbackProperty
- * @constructor
- *
+ * @class
* @param {CallbackProperty.Callback} callback The function to be called when the property is evaluated.
* @param {boolean} isConstant true
when the callback function returns the same value every time, false
if the value will change.
*/
@@ -22,7 +20,6 @@ Object.defineProperties(CallbackProperty.prototype, {
/**
* Gets a value indicating if this property is constant.
* @memberof CallbackProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -35,7 +32,6 @@ Object.defineProperties(CallbackProperty.prototype, {
* Gets the event that is raised whenever the definition of this property changes.
* The definition is changed whenever setCallback is called.
* @memberof CallbackProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -48,7 +44,6 @@ Object.defineProperties(CallbackProperty.prototype, {
/**
* Gets the value of the property.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied or is unsupported.
@@ -59,7 +54,6 @@ CallbackProperty.prototype.getValue = function (time, result) {
/**
* Sets the callback to be used.
- *
* @param {CallbackProperty.Callback} callback The function to be called when the property is evaluated.
* @param {boolean} isConstant true
when the callback function returns the same value every time, false
if the value will change.
*/
@@ -87,7 +81,6 @@ CallbackProperty.prototype.setCallback = function (callback, isConstant) {
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
@@ -103,7 +96,6 @@ CallbackProperty.prototype.equals = function (other) {
/**
* A function that returns the value of the property.
* @callback CallbackProperty.Callback
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {object} [result] The object to store the value into. If omitted, the function must create and return a new instance.
* @returns {object} The modified result parameter, or a new instance if the result parameter was not supplied or is unsupported.
diff --git a/packages/engine/Source/DataSources/Cesium3DTilesetGraphics.js b/packages/engine/Source/DataSources/Cesium3DTilesetGraphics.js
index 6eb239dd7e6b..481294b40c84 100644
--- a/packages/engine/Source/DataSources/Cesium3DTilesetGraphics.js
+++ b/packages/engine/Source/DataSources/Cesium3DTilesetGraphics.js
@@ -8,7 +8,6 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @typedef {object} Cesium3DTilesetGraphics.ConstructorOptions
*
* Initialization options for the Cesium3DTilesetGraphics constructor
- *
* @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the tileset.
* @property {Property | string | Resource} [uri] A string or Resource Property specifying the URI of the tileset.
* @property {Property | number} [maximumScreenSpaceError] A number or Property specifying the maximum screen space error used to drive level of detail refinement.
@@ -18,10 +17,8 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* A 3D Tiles tileset represented by an {@link Entity}.
* The tileset modelMatrix is determined by the containing Entity position and orientation
* or is left unset if position is undefined.
- *
* @alias Cesium3DTilesetGraphics
- * @constructor
- *
+ * @class
* @param {Cesium3DTilesetGraphics.ConstructorOptions} [options] Object describing initialization options
*/
function Cesium3DTilesetGraphics(options) {
@@ -74,7 +71,6 @@ Object.defineProperties(Cesium3DTilesetGraphics.prototype, {
/**
* Duplicates this instance.
- *
* @param {Cesium3DTilesetGraphics} [result] The object onto which to store the result.
* @returns {Cesium3DTilesetGraphics} The modified result parameter or a new instance if one was not provided.
*/
@@ -92,7 +88,6 @@ Cesium3DTilesetGraphics.prototype.clone = function (result) {
/**
* Assigns each unassigned property on this object to the value
* of the same property on the provided source object.
- *
* @param {Cesium3DTilesetGraphics} source The object to be merged into this object.
*/
Cesium3DTilesetGraphics.prototype.merge = function (source) {
diff --git a/packages/engine/Source/DataSources/Cesium3DTilesetVisualizer.js b/packages/engine/Source/DataSources/Cesium3DTilesetVisualizer.js
index 2578ba67ade5..2d66cf4cb514 100644
--- a/packages/engine/Source/DataSources/Cesium3DTilesetVisualizer.js
+++ b/packages/engine/Source/DataSources/Cesium3DTilesetVisualizer.js
@@ -14,8 +14,7 @@ const modelMatrixScratch = new Matrix4();
/**
* A {@link Visualizer} which maps {@link Entity#tileset} to a {@link Cesium3DTileset}.
* @alias Cesium3DTilesetVisualizer
- * @constructor
- *
+ * @class
* @param {Scene} scene The scene the primitives will be rendered in.
* @param {EntityCollection} entityCollection The entityCollection to visualize.
*/
@@ -45,7 +44,6 @@ function Cesium3DTilesetVisualizer(scene, entityCollection) {
/**
* Updates models created this visualizer to match their
* Entity counterpart at the given time.
- *
* @param {JulianDate} time The time to update to.
* @returns {boolean} This function always returns true.
*/
@@ -120,7 +118,6 @@ Cesium3DTilesetVisualizer.prototype.update = function (time) {
/**
* Returns true if this object was destroyed; otherwise, false.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
*/
Cesium3DTilesetVisualizer.prototype.isDestroyed = function () {
@@ -147,7 +144,6 @@ Cesium3DTilesetVisualizer.prototype.destroy = function () {
/**
* Computes a bounding sphere which encloses the visualization produced for the specified entity.
* The bounding sphere is in the fixed frame of the scene's globe.
- *
* @param {Entity} entity The entity whose bounding sphere to compute.
* @param {BoundingSphere} result The bounding sphere onto which to store the result.
* @returns {BoundingSphereState} BoundingSphereState.DONE if the result contains the bounding sphere,
@@ -188,6 +184,10 @@ Cesium3DTilesetVisualizer.prototype.getBoundingSphere = function (
};
/**
+ * @param entityCollection
+ * @param added
+ * @param removed
+ * @param changed
* @private
*/
Cesium3DTilesetVisualizer.prototype._onCollectionChanged = function (
diff --git a/packages/engine/Source/DataSources/CheckerboardMaterialProperty.js b/packages/engine/Source/DataSources/CheckerboardMaterialProperty.js
index 547e29eafba4..956efe04f315 100644
--- a/packages/engine/Source/DataSources/CheckerboardMaterialProperty.js
+++ b/packages/engine/Source/DataSources/CheckerboardMaterialProperty.js
@@ -13,12 +13,11 @@ const defaultRepeat = new Cartesian2(2.0, 2.0);
/**
* A {@link MaterialProperty} that maps to checkerboard {@link Material} uniforms.
* @alias CheckerboardMaterialProperty
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {Property|Color} [options.evenColor=Color.WHITE] A Property specifying the first {@link Color}.
- * @param {Property|Color} [options.oddColor=Color.BLACK] A Property specifying the second {@link Color}.
- * @param {Property|Cartesian2} [options.repeat=new Cartesian2(2.0, 2.0)] A {@link Cartesian2} Property specifying how many times the tiles repeat in each direction.
+ * @param {Property|Color} [options.evenColor] A Property specifying the first {@link Color}.
+ * @param {Property|Color} [options.oddColor] A Property specifying the second {@link Color}.
+ * @param {Property|Cartesian2} [options.repeat] A {@link Cartesian2} Property specifying how many times the tiles repeat in each direction.
*/
function CheckerboardMaterialProperty(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -41,7 +40,6 @@ Object.defineProperties(CheckerboardMaterialProperty.prototype, {
* Gets a value indicating if this property is constant. A property is considered
* constant if getValue always returns the same result for the current definition.
* @memberof CheckerboardMaterialProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -60,7 +58,6 @@ Object.defineProperties(CheckerboardMaterialProperty.prototype, {
* The definition is considered to have changed if a call to getValue would return
* a different result for the same time.
* @memberof CheckerboardMaterialProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -97,7 +94,6 @@ Object.defineProperties(CheckerboardMaterialProperty.prototype, {
/**
* Gets the {@link Material} type at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the type.
* @returns {string} The type of material.
*/
@@ -107,7 +103,6 @@ CheckerboardMaterialProperty.prototype.getType = function (time) {
/**
* Gets the value of the property at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -135,7 +130,6 @@ CheckerboardMaterialProperty.prototype.getValue = function (time, result) {
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/ColorMaterialProperty.js b/packages/engine/Source/DataSources/ColorMaterialProperty.js
index c6abf36e56d4..a84400f6b07a 100644
--- a/packages/engine/Source/DataSources/ColorMaterialProperty.js
+++ b/packages/engine/Source/DataSources/ColorMaterialProperty.js
@@ -6,11 +6,9 @@ import Property from "./Property.js";
/**
* A {@link MaterialProperty} that maps to solid color {@link Material} uniforms.
- *
- * @param {Property|Color} [color=Color.WHITE] The {@link Color} Property to be used.
- *
+ * @param {Property|Color} [color] The {@link Color} Property to be used.
* @alias ColorMaterialProperty
- * @constructor
+ * @class
*/
function ColorMaterialProperty(color) {
this._definitionChanged = new Event();
@@ -25,7 +23,6 @@ Object.defineProperties(ColorMaterialProperty.prototype, {
* Gets a value indicating if this property is constant. A property is considered
* constant if getValue always returns the same result for the current definition.
* @memberof ColorMaterialProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -40,7 +37,6 @@ Object.defineProperties(ColorMaterialProperty.prototype, {
* The definition is considered to have changed if a call to getValue would return
* a different result for the same time.
* @memberof ColorMaterialProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -61,7 +57,6 @@ Object.defineProperties(ColorMaterialProperty.prototype, {
/**
* Gets the {@link Material} type at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the type.
* @returns {string} The type of material.
*/
@@ -71,7 +66,6 @@ ColorMaterialProperty.prototype.getType = function (time) {
/**
* Gets the value of the property at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -92,7 +86,6 @@ ColorMaterialProperty.prototype.getValue = function (time, result) {
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/CompositeEntityCollection.js b/packages/engine/Source/DataSources/CompositeEntityCollection.js
index 56dcf75fc3cd..50061ad5cf0e 100644
--- a/packages/engine/Source/DataSources/CompositeEntityCollection.js
+++ b/packages/engine/Source/DataSources/CompositeEntityCollection.js
@@ -121,10 +121,8 @@ function recomposite(that) {
* collections, the property of the Entity in the last collection of the list it
* belongs to is used. CompositeEntityCollection can be used almost anywhere that a
* EntityCollection is used.
- *
* @alias CompositeEntityCollection
- * @constructor
- *
+ * @class
* @param {EntityCollection[]} [collections] The initial list of EntityCollection instances to merge.
* @param {DataSource|CompositeEntityCollection} [owner] The data source (or composite entity collection) which created this collection.
*/
@@ -191,12 +189,10 @@ Object.defineProperties(CompositeEntityCollection.prototype, {
/**
* Adds a collection to the composite.
- *
* @param {EntityCollection} collection the collection to add.
* @param {number} [index] the index to add the collection at. If omitted, the collection will
* added on top of all existing collections.
- *
- * @exception {DeveloperError} index, if supplied, must be greater than or equal to zero and less than or equal to the number of collections.
+ * @throws {DeveloperError} index, if supplied, must be greater than or equal to zero and less than or equal to the number of collections.
*/
CompositeEntityCollection.prototype.addCollection = function (
collection,
@@ -230,7 +226,6 @@ CompositeEntityCollection.prototype.addCollection = function (
/**
* Removes a collection from this composite, if present.
- *
* @param {EntityCollection} collection The collection to remove.
* @returns {boolean} true if the collection was in the composite and was removed,
* false if the collection was not in the composite.
@@ -255,7 +250,6 @@ CompositeEntityCollection.prototype.removeAllCollections = function () {
/**
* Checks to see if the composite contains a given collection.
- *
* @param {EntityCollection} collection the collection to check for.
* @returns {boolean} true if the composite contains the collection, false otherwise.
*/
@@ -265,7 +259,6 @@ CompositeEntityCollection.prototype.containsCollection = function (collection) {
/**
* Returns true if the provided entity is in this collection, false otherwise.
- *
* @param {Entity} entity The entity.
* @returns {boolean} true if the provided entity is in this collection, false otherwise.
*/
@@ -275,7 +268,6 @@ CompositeEntityCollection.prototype.contains = function (entity) {
/**
* Determines the index of a given collection in the composite.
- *
* @param {EntityCollection} collection The collection to find the index of.
* @returns {number} The index of the collection in the composite, or -1 if the collection does not exist in the composite.
*/
@@ -285,7 +277,6 @@ CompositeEntityCollection.prototype.indexOfCollection = function (collection) {
/**
* Gets a collection by index from the composite.
- *
* @param {number} index the index to retrieve.
*/
CompositeEntityCollection.prototype.getCollection = function (index) {
@@ -341,10 +332,8 @@ function swapCollections(composite, i, j) {
/**
* Raises a collection up one position in the composite.
- *
* @param {EntityCollection} collection the collection to move.
- *
- * @exception {DeveloperError} collection is not in this composite.
+ * @throws {DeveloperError} collection is not in this composite.
*/
CompositeEntityCollection.prototype.raiseCollection = function (collection) {
const index = getCollectionIndex(this._collections, collection);
@@ -353,10 +342,8 @@ CompositeEntityCollection.prototype.raiseCollection = function (collection) {
/**
* Lowers a collection down one position in the composite.
- *
* @param {EntityCollection} collection the collection to move.
- *
- * @exception {DeveloperError} collection is not in this composite.
+ * @throws {DeveloperError} collection is not in this composite.
*/
CompositeEntityCollection.prototype.lowerCollection = function (collection) {
const index = getCollectionIndex(this._collections, collection);
@@ -365,10 +352,8 @@ CompositeEntityCollection.prototype.lowerCollection = function (collection) {
/**
* Raises a collection to the top of the composite.
- *
* @param {EntityCollection} collection the collection to move.
- *
- * @exception {DeveloperError} collection is not in this composite.
+ * @throws {DeveloperError} collection is not in this composite.
*/
CompositeEntityCollection.prototype.raiseCollectionToTop = function (
collection
@@ -385,10 +370,8 @@ CompositeEntityCollection.prototype.raiseCollectionToTop = function (
/**
* Lowers a collection to the bottom of the composite.
- *
* @param {EntityCollection} collection the collection to move.
- *
- * @exception {DeveloperError} collection is not in this composite.
+ * @throws {DeveloperError} collection is not in this composite.
*/
CompositeEntityCollection.prototype.lowerCollectionToBottom = function (
collection
@@ -425,8 +408,7 @@ CompositeEntityCollection.prototype.suspendEvents = function () {
* the collection is recomposited if events are also resumed.
* This function is reference counted and can safely be called multiple times as long as there
* are corresponding calls to {@link EntityCollection#resumeEvents}.
- *
- * @exception {DeveloperError} resumeEvents can not be called before suspendEvents.
+ * @throws {DeveloperError} resumeEvents can not be called before suspendEvents.
*/
CompositeEntityCollection.prototype.resumeEvents = function () {
//>>includeStart('debug', pragmas.debug);
@@ -452,7 +434,6 @@ CompositeEntityCollection.prototype.resumeEvents = function () {
* If the collection contains a mix of infinitely available data and non-infinite data,
* It will return the interval pertaining to the non-infinite data only. If all
* data is infinite, an infinite interval will be returned.
- *
* @returns {TimeInterval} The availability of entities in the collection.
*/
CompositeEntityCollection.prototype.computeAvailability = function () {
@@ -461,7 +442,6 @@ CompositeEntityCollection.prototype.computeAvailability = function () {
/**
* Gets an entity with the specified id.
- *
* @param {string} id The id of the entity to retrieve.
* @returns {Entity|undefined} The entity with the provided id or undefined if the id did not exist in the collection.
*/
diff --git a/packages/engine/Source/DataSources/CompositeMaterialProperty.js b/packages/engine/Source/DataSources/CompositeMaterialProperty.js
index 7827c7ad61f6..433f8eba2c84 100644
--- a/packages/engine/Source/DataSources/CompositeMaterialProperty.js
+++ b/packages/engine/Source/DataSources/CompositeMaterialProperty.js
@@ -6,9 +6,8 @@ import Property from "./Property.js";
/**
* A {@link CompositeProperty} which is also a {@link MaterialProperty}.
- *
* @alias CompositeMaterialProperty
- * @constructor
+ * @class
*/
function CompositeMaterialProperty() {
this._definitionChanged = new Event();
@@ -24,7 +23,6 @@ Object.defineProperties(CompositeMaterialProperty.prototype, {
* Gets a value indicating if this property is constant. A property is considered
* constant if getValue always returns the same result for the current definition.
* @memberof CompositeMaterialProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -38,7 +36,6 @@ Object.defineProperties(CompositeMaterialProperty.prototype, {
* The definition is changed whenever setValue is called with data different
* than the current value.
* @memberof CompositeMaterialProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -50,7 +47,6 @@ Object.defineProperties(CompositeMaterialProperty.prototype, {
/**
* Gets the interval collection.
* @memberof CompositeMaterialProperty.prototype
- *
* @type {TimeIntervalCollection}
*/
intervals: {
@@ -62,7 +58,6 @@ Object.defineProperties(CompositeMaterialProperty.prototype, {
/**
* Gets the {@link Material} type at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the type.
* @returns {string} The type of material.
*/
@@ -84,7 +79,6 @@ CompositeMaterialProperty.prototype.getType = function (time) {
/**
* Gets the value of the property at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -108,7 +102,6 @@ CompositeMaterialProperty.prototype.getValue = function (time, result) {
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/CompositePositionProperty.js b/packages/engine/Source/DataSources/CompositePositionProperty.js
index e5e74a7951eb..974316c182f2 100644
--- a/packages/engine/Source/DataSources/CompositePositionProperty.js
+++ b/packages/engine/Source/DataSources/CompositePositionProperty.js
@@ -8,11 +8,9 @@ import Property from "./Property.js";
/**
* A {@link CompositeProperty} which is also a {@link PositionProperty}.
- *
* @alias CompositePositionProperty
- * @constructor
- *
- * @param {ReferenceFrame} [referenceFrame=ReferenceFrame.FIXED] The reference frame in which the position is defined.
+ * @class
+ * @param {ReferenceFrame} [referenceFrame] The reference frame in which the position is defined.
*/
function CompositePositionProperty(referenceFrame) {
this._referenceFrame = defaultValue(referenceFrame, ReferenceFrame.FIXED);
@@ -29,7 +27,6 @@ Object.defineProperties(CompositePositionProperty.prototype, {
* Gets a value indicating if this property is constant. A property is considered
* constant if getValue always returns the same result for the current definition.
* @memberof CompositePositionProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -43,7 +40,6 @@ Object.defineProperties(CompositePositionProperty.prototype, {
* The definition is changed whenever setValue is called with data different
* than the current value.
* @memberof CompositePositionProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -55,7 +51,6 @@ Object.defineProperties(CompositePositionProperty.prototype, {
/**
* Gets the interval collection.
* @memberof CompositePositionProperty.prototype
- *
* @type {TimeIntervalCollection}
*/
intervals: {
@@ -69,7 +64,6 @@ Object.defineProperties(CompositePositionProperty.prototype, {
* so this property merely exposes a "preferred" reference frame for clients
* to use.
* @memberof CompositePositionProperty.prototype
- *
* @type {ReferenceFrame}
*/
referenceFrame: {
@@ -84,7 +78,6 @@ Object.defineProperties(CompositePositionProperty.prototype, {
/**
* Gets the value of the property at the provided time in the fixed frame.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {Cartesian3} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {Cartesian3 | undefined} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -95,7 +88,6 @@ CompositePositionProperty.prototype.getValue = function (time, result) {
/**
* Gets the value of the property at the provided time and in the provided reference frame.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {ReferenceFrame} referenceFrame The desired referenceFrame of the result.
* @param {Cartesian3} [result] The object to store the value into, if omitted, a new instance is created and returned.
@@ -127,7 +119,6 @@ CompositePositionProperty.prototype.getValueInReferenceFrame = function (
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/CompositeProperty.js b/packages/engine/Source/DataSources/CompositeProperty.js
index 703d7d5df478..85b86e1df830 100644
--- a/packages/engine/Source/DataSources/CompositeProperty.js
+++ b/packages/engine/Source/DataSources/CompositeProperty.js
@@ -24,11 +24,8 @@ function subscribeAll(property, eventHelper, definitionChanged, intervals) {
* A {@link Property} which is defined by a {@link TimeIntervalCollection}, where the
* data property of each {@link TimeInterval} is another Property instance which is
* evaluated at the provided time.
- *
* @alias CompositeProperty
- * @constructor
- *
- *
+ * @class
* @example
* const constantProperty = ...;
* const sampledProperty = ...;
@@ -48,7 +45,6 @@ function subscribeAll(property, eventHelper, definitionChanged, intervals) {
* isStopIncluded : false,
* data : sampledProperty
* }));
- *
* @see CompositeMaterialProperty
* @see CompositePositionProperty
*/
@@ -67,7 +63,6 @@ Object.defineProperties(CompositeProperty.prototype, {
* Gets a value indicating if this property is constant. A property is considered
* constant if getValue always returns the same result for the current definition.
* @memberof CompositeProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -81,7 +76,6 @@ Object.defineProperties(CompositeProperty.prototype, {
* The definition is changed whenever setValue is called with data different
* than the current value.
* @memberof CompositeProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -93,7 +87,6 @@ Object.defineProperties(CompositeProperty.prototype, {
/**
* Gets the interval collection.
* @memberof CompositeProperty.prototype
- *
* @type {TimeIntervalCollection}
*/
intervals: {
@@ -105,7 +98,6 @@ Object.defineProperties(CompositeProperty.prototype, {
/**
* Gets the value of the property at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -127,7 +119,6 @@ CompositeProperty.prototype.getValue = function (time, result) {
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/ConstantPositionProperty.js b/packages/engine/Source/DataSources/ConstantPositionProperty.js
index 7fe47c720e81..e06d12fe4426 100644
--- a/packages/engine/Source/DataSources/ConstantPositionProperty.js
+++ b/packages/engine/Source/DataSources/ConstantPositionProperty.js
@@ -9,12 +9,10 @@ import PositionProperty from "./PositionProperty.js";
/**
* A {@link PositionProperty} whose value does not change in respect to the
* {@link ReferenceFrame} in which is it defined.
- *
* @alias ConstantPositionProperty
- * @constructor
- *
+ * @class
* @param {Cartesian3} [value] The property value.
- * @param {ReferenceFrame} [referenceFrame=ReferenceFrame.FIXED] The reference frame in which the position is defined.
+ * @param {ReferenceFrame} [referenceFrame] The reference frame in which the position is defined.
*/
function ConstantPositionProperty(value, referenceFrame) {
this._definitionChanged = new Event();
@@ -27,7 +25,6 @@ Object.defineProperties(ConstantPositionProperty.prototype, {
* Gets a value indicating if this property is constant. A property is considered
* constant if getValue always returns the same result for the current definition.
* @memberof ConstantPositionProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -43,7 +40,6 @@ Object.defineProperties(ConstantPositionProperty.prototype, {
* The definition is considered to have changed if a call to getValue would return
* a different result for the same time.
* @memberof ConstantPositionProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -67,7 +63,6 @@ Object.defineProperties(ConstantPositionProperty.prototype, {
/**
* Gets the value of the property at the provided time in the fixed frame.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -78,9 +73,8 @@ ConstantPositionProperty.prototype.getValue = function (time, result) {
/**
* Sets the value of the property.
- *
* @param {Cartesian3} value The property value.
- * @param {ReferenceFrame} [referenceFrame=this.referenceFrame] The reference frame in which the position is defined.
+ * @param {ReferenceFrame} [referenceFrame] The reference frame in which the position is defined.
*/
ConstantPositionProperty.prototype.setValue = function (value, referenceFrame) {
let definitionChanged = false;
@@ -99,7 +93,6 @@ ConstantPositionProperty.prototype.setValue = function (value, referenceFrame) {
/**
* Gets the value of the property at the provided time and in the provided reference frame.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {ReferenceFrame} referenceFrame The desired referenceFrame of the result.
* @param {Cartesian3} [result] The object to store the value into, if omitted, a new instance is created and returned.
@@ -131,7 +124,6 @@ ConstantPositionProperty.prototype.getValueInReferenceFrame = function (
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/ConstantProperty.js b/packages/engine/Source/DataSources/ConstantProperty.js
index 79cbec143a33..80ebada7cd54 100644
--- a/packages/engine/Source/DataSources/ConstantProperty.js
+++ b/packages/engine/Source/DataSources/ConstantProperty.js
@@ -3,12 +3,9 @@ import Event from "../Core/Event.js";
/**
* A {@link Property} whose value does not change with respect to simulation time.
- *
* @alias ConstantProperty
- * @constructor
- *
+ * @class
* @param {*} [value] The property value.
- *
* @see ConstantPositionProperty
*/
function ConstantProperty(value) {
@@ -24,7 +21,6 @@ Object.defineProperties(ConstantProperty.prototype, {
* Gets a value indicating if this property is constant.
* This property always returns true
.
* @memberof ConstantProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -36,7 +32,6 @@ Object.defineProperties(ConstantProperty.prototype, {
* The definition is changed whenever setValue is called with data different
* than the current value.
* @memberof ConstantProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -49,7 +44,6 @@ Object.defineProperties(ConstantProperty.prototype, {
/**
* Gets the value of the property.
- *
* @param {JulianDate} [time] The time for which to retrieve the value. This parameter is unused since the value does not change with respect to time.
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -60,7 +54,6 @@ ConstantProperty.prototype.getValue = function (time, result) {
/**
* Sets the value of the property.
- *
* @param {*} value The property value.
*/
ConstantProperty.prototype.setValue = function (value) {
@@ -83,7 +76,6 @@ ConstantProperty.prototype.setValue = function (value) {
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
@@ -98,7 +90,6 @@ ConstantProperty.prototype.equals = function (other) {
/**
* Gets this property's value.
- *
* @returns {*} This property's value.
*/
ConstantProperty.prototype.valueOf = function () {
@@ -107,7 +98,6 @@ ConstantProperty.prototype.valueOf = function () {
/**
* Creates a string representing this property's value.
- *
* @returns {string} A string representing the property's value.
*/
ConstantProperty.prototype.toString = function () {
diff --git a/packages/engine/Source/DataSources/CorridorGeometryUpdater.js b/packages/engine/Source/DataSources/CorridorGeometryUpdater.js
index 74cb9d3aeaf6..fce8c5ab21ef 100644
--- a/packages/engine/Source/DataSources/CorridorGeometryUpdater.js
+++ b/packages/engine/Source/DataSources/CorridorGeometryUpdater.js
@@ -43,8 +43,7 @@ function CorridorGeometryOptions(entity) {
* A {@link GeometryUpdater} for corridors.
* Clients do not normally create this class directly, but instead rely on {@link DataSourceDisplay}.
* @alias CorridorGeometryUpdater
- * @constructor
- *
+ * @class
* @param {Entity} entity The entity containing the geometry to be visualized.
* @param {Scene} scene The scene where visualization is taking place.
*/
@@ -69,11 +68,9 @@ if (defined(Object.create)) {
/**
* Creates the geometry instance which represents the fill of the geometry.
- *
* @param {JulianDate} time The time to use when retrieving initial attribute values.
* @returns {GeometryInstance} The geometry instance representing the filled portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent a filled geometry.
+ * @throws {DeveloperError} This instance does not represent a filled geometry.
*/
CorridorGeometryUpdater.prototype.createFillGeometryInstance = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -137,11 +134,9 @@ CorridorGeometryUpdater.prototype.createFillGeometryInstance = function (time) {
/**
* Creates the geometry instance which represents the outline of the geometry.
- *
* @param {JulianDate} time The time to use when retrieving initial attribute values.
* @returns {GeometryInstance} The geometry instance representing the outline portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent an outlined geometry.
+ * @throws {DeveloperError} This instance does not represent an outlined geometry.
*/
CorridorGeometryUpdater.prototype.createOutlineGeometryInstance = function (
time
@@ -306,6 +301,9 @@ CorridorGeometryUpdater.prototype._setStaticOptions = function (
CorridorGeometryUpdater.DynamicGeometryUpdater = DynamicCorridorGeometryUpdater;
/**
+ * @param geometryUpdater
+ * @param primitives
+ * @param groundPrimitives
* @private
*/
function DynamicCorridorGeometryUpdater(
diff --git a/packages/engine/Source/DataSources/CorridorGraphics.js b/packages/engine/Source/DataSources/CorridorGraphics.js
index b33c6ee21cd0..135f6ade0537 100644
--- a/packages/engine/Source/DataSources/CorridorGraphics.js
+++ b/packages/engine/Source/DataSources/CorridorGraphics.js
@@ -9,7 +9,6 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @typedef {object} CorridorGraphics.ConstructorOptions
*
* Initialization options for the CorridorGraphics constructor
- *
* @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the corridor.
* @property {Property | Cartesian3[]} [positions] A Property specifying the array of {@link Cartesian3} positions that define the centerline of the corridor.
* @property {Property | number} [width] A numeric Property specifying the distance between the edges of the corridor.
@@ -34,12 +33,9 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* Describes a corridor, which is a shape defined by a centerline and width that
* conforms to the curvature of the globe. It can be placed on the surface or at altitude
* and can optionally be extruded into a volume.
- *
* @alias CorridorGraphics
- * @constructor
- *
+ * @class
* @param {CorridorGraphics.ConstructorOptions} [options] Object describing initialization options
- *
* @see Entity
* @demo {@link https://sandcastle.cesium.com/index.html?src=Corridor.html|Cesium Sandcastle Corridor Demo}
*/
@@ -249,7 +245,6 @@ Object.defineProperties(CorridorGraphics.prototype, {
/**
* Duplicates this instance.
- *
* @param {CorridorGraphics} [result] The object onto which to store the result.
* @returns {CorridorGraphics} The modified result parameter or a new instance if one was not provided.
*/
@@ -281,7 +276,6 @@ CorridorGraphics.prototype.clone = function (result) {
/**
* Assigns each unassigned property on this object to the value
* of the same property on the provided source object.
- *
* @param {CorridorGraphics} source The object to be merged into this object.
*/
CorridorGraphics.prototype.merge = function (source) {
diff --git a/packages/engine/Source/DataSources/CustomDataSource.js b/packages/engine/Source/DataSources/CustomDataSource.js
index a853be4c438a..0baf2998ba5d 100644
--- a/packages/engine/Source/DataSources/CustomDataSource.js
+++ b/packages/engine/Source/DataSources/CustomDataSource.js
@@ -7,12 +7,9 @@ import EntityCollection from "./EntityCollection.js";
/**
* A {@link DataSource} implementation which can be used to manually manage a group of entities.
- *
* @alias CustomDataSource
- * @constructor
- *
+ * @class
* @param {string} [name] A human-readable name for this instance.
- *
* @example
* const dataSource = new Cesium.CustomDataSource('myData');
*
@@ -138,7 +135,6 @@ Object.defineProperties(CustomDataSource.prototype, {
/**
* Gets or sets the clustering options for this data source. This object can be shared between multiple data sources.
- *
* @memberof CustomDataSource.prototype
* @type {EntityCluster}
*/
@@ -162,7 +158,6 @@ Object.defineProperties(CustomDataSource.prototype, {
* is not required to be implemented. It is provided for data sources which
* retrieve data based on the current animation time or scene state.
* If implemented, update will be called by {@link DataSourceDisplay} once a frame.
- *
* @param {JulianDate} time The simulation time.
* @returns {boolean} True if this data source is ready to be displayed at the provided time, false otherwise.
*/
diff --git a/packages/engine/Source/DataSources/CylinderGeometryUpdater.js b/packages/engine/Source/DataSources/CylinderGeometryUpdater.js
index 4845c50283d3..fc5d8c99f938 100644
--- a/packages/engine/Source/DataSources/CylinderGeometryUpdater.js
+++ b/packages/engine/Source/DataSources/CylinderGeometryUpdater.js
@@ -42,8 +42,7 @@ function CylinderGeometryOptions(entity) {
* A {@link GeometryUpdater} for cylinders.
* Clients do not normally create this class directly, but instead rely on {@link DataSourceDisplay}.
* @alias CylinderGeometryUpdater
- * @constructor
- *
+ * @class
* @param {Entity} entity The entity containing the geometry to be visualized.
* @param {Scene} scene The scene where visualization is taking place.
*/
@@ -86,11 +85,9 @@ Object.defineProperties(CylinderGeometryUpdater.prototype, {
/**
* Creates the geometry instance which represents the fill of the geometry.
- *
* @param {JulianDate} time The time to use when retrieving initial attribute values.
* @returns {GeometryInstance} The geometry instance representing the filled portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent a filled geometry.
+ * @throws {DeveloperError} This instance does not represent a filled geometry.
*/
CylinderGeometryUpdater.prototype.createFillGeometryInstance = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -165,11 +162,9 @@ CylinderGeometryUpdater.prototype.createFillGeometryInstance = function (time) {
/**
* Creates the geometry instance which represents the outline of the geometry.
- *
* @param {JulianDate} time The time to use when retrieving initial attribute values.
* @returns {GeometryInstance} The geometry instance representing the outline portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent an outlined geometry.
+ * @throws {DeveloperError} This instance does not represent an outlined geometry.
*/
CylinderGeometryUpdater.prototype.createOutlineGeometryInstance = function (
time
@@ -296,6 +291,9 @@ CylinderGeometryUpdater.prototype._onEntityPropertyChanged = heightReferenceOnEn
CylinderGeometryUpdater.DynamicGeometryUpdater = DynamicCylinderGeometryUpdater;
/**
+ * @param geometryUpdater
+ * @param primitives
+ * @param groundPrimitives
* @private
*/
function DynamicCylinderGeometryUpdater(
diff --git a/packages/engine/Source/DataSources/CylinderGraphics.js b/packages/engine/Source/DataSources/CylinderGraphics.js
index 9f25286c042f..dad8f480d5b3 100644
--- a/packages/engine/Source/DataSources/CylinderGraphics.js
+++ b/packages/engine/Source/DataSources/CylinderGraphics.js
@@ -9,7 +9,6 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @typedef {object} CylinderGraphics.ConstructorOptions
*
* Initialization options for the CylinderGraphics constructor
- *
* @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the cylinder.
* @property {Property | number} [length] A numeric Property specifying the length of the cylinder.
* @property {Property | number} [topRadius] A numeric Property specifying the radius of the top of the cylinder.
@@ -29,10 +28,8 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
/**
* Describes a cylinder, truncated cone, or cone defined by a length, top radius, and bottom radius.
* The center position and orientation are determined by the containing {@link Entity}.
- *
* @alias CylinderGraphics
- * @constructor
- *
+ * @class
* @param {CylinderGraphics.ConstructorOptions} [options] Object describing initialization options
*/
function CylinderGraphics(options) {
@@ -73,7 +70,6 @@ Object.defineProperties(CylinderGraphics.prototype, {
/**
* Gets the event that is raised whenever a property or sub-property is changed or modified.
* @memberof CylinderGraphics.prototype
- *
* @type {Event}
* @readonly
*/
@@ -200,7 +196,6 @@ Object.defineProperties(CylinderGraphics.prototype, {
/**
* Duplicates this instance.
- *
* @param {CylinderGraphics} [result] The object onto which to store the result.
* @returns {CylinderGraphics} The modified result parameter or a new instance if one was not provided.
*/
@@ -228,7 +223,6 @@ CylinderGraphics.prototype.clone = function (result) {
/**
* Assigns each unassigned property on this object to the value
* of the same property on the provided source object.
- *
* @param {CylinderGraphics} source The object to be merged into this object.
*/
CylinderGraphics.prototype.merge = function (source) {
diff --git a/packages/engine/Source/DataSources/CzmlDataSource.js b/packages/engine/Source/DataSources/CzmlDataSource.js
index 6bcf7006b3ee..15bbf1884235 100644
--- a/packages/engine/Source/DataSources/CzmlDataSource.js
+++ b/packages/engine/Source/DataSources/CzmlDataSource.js
@@ -4834,7 +4834,6 @@ function DocumentPacket() {
* @typedef {object} CzmlDataSource.LoadOptions
*
* Initialization options for the load
method.
- *
* @property {Resource|string} [sourceUri] Overrides the url to use for resolving relative links.
* @property {Credit|string} [credit] A credit for the data source, which is displayed on the canvas.
*/
@@ -4842,10 +4841,8 @@ function DocumentPacket() {
/**
* A {@link DataSource} which processes {@link https://github.com/AnalyticalGraphicsInc/czml-writer/wiki/CZML-Guide|CZML}.
* @alias CzmlDataSource
- * @constructor
- *
+ * @class
* @param {string} [name] An optional name for the data source. This value will be overwritten if a loaded document contains a name.
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=CZML.html|Cesium Sandcastle CZML Demo}
*/
function CzmlDataSource(name) {
@@ -4865,10 +4862,8 @@ function CzmlDataSource(name) {
/**
* Creates a Promise to a new instance loaded with the provided CZML data.
- *
* @param {Resource|string|object} czml A url or CZML object to be processed.
* @param {CzmlDataSource.LoadOptions} [options] An object specifying configuration options
- *
* @returns {Promise} A promise that resolves to the new instance once the data is processed.
*/
CzmlDataSource.load = function (czml, options) {
@@ -4964,7 +4959,6 @@ Object.defineProperties(CzmlDataSource.prototype, {
/**
* Gets or sets the clustering options for this data source. This object can be shared between multiple data sources.
- *
* @memberof CzmlDataSource.prototype
* @type {EntityCluster}
*/
@@ -4998,7 +4992,6 @@ Object.defineProperties(CzmlDataSource.prototype, {
*
* A CZML processing function that adds or updates entities in the provided
* collection based on the provided CZML packet.
- *
* @param {Entity} entity
* @param {object} packet
* @param {EntityCollection} entityCollection
@@ -5061,10 +5054,8 @@ CzmlDataSource.unregisterUpdater = function (updater) {
/**
* Processes the provided url or CZML object without clearing any existing data.
- *
* @param {Resource|string|object} czml A url or CZML object to be processed.
* @param {CzmlDataSource.LoadOptions} [options] An object specifying configuration options
- *
* @returns {Promise} A promise that resolves to this instances once the data is processed.
*/
CzmlDataSource.prototype.process = function (czml, options) {
@@ -5073,10 +5064,8 @@ CzmlDataSource.prototype.process = function (czml, options) {
/**
* Loads the provided url or CZML object, replacing any existing data.
- *
* @param {Resource|string|object} czml A url or CZML object to be processed.
* @param {CzmlDataSource.LoadOptions} [options] An object specifying configuration options
- *
* @returns {Promise} A promise that resolves to this instances once the data is processed.
*/
CzmlDataSource.prototype.load = function (czml, options) {
@@ -5088,7 +5077,6 @@ CzmlDataSource.prototype.load = function (czml, options) {
* is not required to be implemented. It is provided for data sources which
* retrieve data based on the current animation time or scene state.
* If implemented, update will be called by {@link DataSourceDisplay} once a frame.
- *
* @param {JulianDate} time The simulation time.
* @returns {boolean} True if this data source is ready to be displayed at the provided time, false otherwise.
*/
@@ -5100,7 +5088,6 @@ CzmlDataSource.prototype.update = function (time) {
* A helper function used by custom CZML updater functions
* which creates or updates a {@link Property} from a CZML packet.
* @function
- *
* @param {Function} type The constructor function for the property being processed.
* @param {object} object The object on which the property will be added or updated.
* @param {string} propertyName The name of the property on the object.
@@ -5115,7 +5102,6 @@ CzmlDataSource.processPacketData = processPacketData;
* A helper function used by custom CZML updater functions
* which creates or updates a {@link PositionProperty} from a CZML packet.
* @function
- *
* @param {object} object The object on which the property will be added or updated.
* @param {string} propertyName The name of the property on the object.
* @param {object} packetData The CZML packet being processed.
@@ -5129,7 +5115,6 @@ CzmlDataSource.processPositionPacketData = processPositionPacketData;
* A helper function used by custom CZML updater functions
* which creates or updates a {@link MaterialProperty} from a CZML packet.
* @function
- *
* @param {object} object The object on which the property will be added or updated.
* @param {string} propertyName The name of the property on the object.
* @param {object} packetData The CZML packet being processed.
diff --git a/packages/engine/Source/DataSources/DataSource.js b/packages/engine/Source/DataSources/DataSource.js
index 8f72f258ae59..4882cc2fe503 100644
--- a/packages/engine/Source/DataSources/DataSource.js
+++ b/packages/engine/Source/DataSources/DataSource.js
@@ -5,8 +5,7 @@ import DeveloperError from "../Core/DeveloperError.js";
* {@link EntityCollection} for generic consumption. This object is an interface
* for documentation purposes and is not intended to be instantiated directly.
* @alias DataSource
- * @constructor
- *
+ * @class
* @see Entity
* @see DataSourceDisplay
*/
@@ -82,7 +81,6 @@ Object.defineProperties(DataSource.prototype, {
/**
* Gets or sets the clustering options for this data source. This object can be shared between multiple data sources.
- *
* @memberof DataSource.prototype
* @type {EntityCluster}
*/
@@ -96,7 +94,6 @@ Object.defineProperties(DataSource.prototype, {
* is not required to be implemented. It is provided for data sources which
* retrieve data based on the current animation time or scene state.
* If implemented, update will be called by {@link DataSourceDisplay} once a frame.
- *
* @param {JulianDate} time The simulation time.
* @returns {boolean} True if this data source is ready to be displayed at the provided time, false otherwise.
*/
@@ -105,6 +102,8 @@ DataSource.prototype.update = function (time) {
};
/**
+ * @param dataSource
+ * @param isLoading
* @private
*/
DataSource.setLoading = function (dataSource, isLoading) {
diff --git a/packages/engine/Source/DataSources/DataSourceClock.js b/packages/engine/Source/DataSources/DataSourceClock.js
index 58d55e2a3f0f..a9dd9637c43d 100644
--- a/packages/engine/Source/DataSources/DataSourceClock.js
+++ b/packages/engine/Source/DataSources/DataSourceClock.js
@@ -9,9 +9,8 @@ import createRawPropertyDescriptor from "./createRawPropertyDescriptor.js";
/**
* Represents desired clock settings for a particular {@link DataSource}. These settings may be applied
* to the {@link Clock} when the DataSource is loaded.
- *
* @alias DataSourceClock
- * @constructor
+ * @class
*/
function DataSourceClock() {
this._definitionChanged = new Event();
@@ -27,7 +26,6 @@ Object.defineProperties(DataSourceClock.prototype, {
/**
* Gets the event that is raised whenever a new property is assigned.
* @memberof DataSourceClock.prototype
- *
* @type {Event}
* @readonly
*/
@@ -88,7 +86,6 @@ Object.defineProperties(DataSourceClock.prototype, {
/**
* Duplicates a DataSourceClock instance.
- *
* @param {DataSourceClock} [result] The object onto which to store the result.
* @returns {DataSourceClock} The modified result parameter or a new instance if one was not provided.
*/
@@ -107,7 +104,6 @@ DataSourceClock.prototype.clone = function (result) {
/**
* Returns true if this DataSourceClock is equivalent to the other
- *
* @param {DataSourceClock} other The other DataSourceClock to compare to.
* @returns {boolean} true
if the DataSourceClocks are equal; otherwise, false
.
*/
@@ -127,7 +123,6 @@ DataSourceClock.prototype.equals = function (other) {
/**
* Assigns each unassigned property on this object to the value
* of the same property on the provided source object.
- *
* @param {DataSourceClock} source The object to be merged into this object.
*/
DataSourceClock.prototype.merge = function (source) {
@@ -147,7 +142,7 @@ DataSourceClock.prototype.merge = function (source) {
/**
* Gets the value of this clock instance as a {@link Clock} object.
- *
+ * @param result
* @returns {Clock} The modified result parameter or a new instance if one was not provided.
*/
DataSourceClock.prototype.getValue = function (result) {
diff --git a/packages/engine/Source/DataSources/DataSourceCollection.js b/packages/engine/Source/DataSources/DataSourceCollection.js
index 17e33f50b45a..db55d922eaa7 100644
--- a/packages/engine/Source/DataSources/DataSourceCollection.js
+++ b/packages/engine/Source/DataSources/DataSourceCollection.js
@@ -8,7 +8,7 @@ import CesiumMath from "../Core/Math.js";
/**
* A collection of {@link DataSource} instances.
* @alias DataSourceCollection
- * @constructor
+ * @class
*/
function DataSourceCollection() {
this._dataSources = [];
@@ -72,7 +72,6 @@ Object.defineProperties(DataSourceCollection.prototype, {
/**
* Adds a data source to the collection.
- *
* @param {DataSource|Promise} dataSource A data source or a promise to a data source to add to the collection.
* When passing a promise, the data source will not actually be added
* to the collection until the promise resolves successfully.
@@ -100,9 +99,8 @@ DataSourceCollection.prototype.add = function (dataSource) {
/**
* Removes a data source from this collection, if present.
- *
* @param {DataSource} dataSource The data source to remove.
- * @param {boolean} [destroy=false] Whether to destroy the data source in addition to removing it.
+ * @param {boolean} [destroy] Whether to destroy the data source in addition to removing it.
* @returns {boolean} true if the data source was in the collection and was removed,
* false if the data source was not in the collection.
*/
@@ -126,8 +124,7 @@ DataSourceCollection.prototype.remove = function (dataSource, destroy) {
/**
* Removes all data sources from this collection.
- *
- * @param {boolean} [destroy=false] whether to destroy the data sources in addition to removing them.
+ * @param {boolean} [destroy] whether to destroy the data sources in addition to removing them.
*/
DataSourceCollection.prototype.removeAll = function (destroy) {
destroy = defaultValue(destroy, false);
@@ -146,7 +143,6 @@ DataSourceCollection.prototype.removeAll = function (destroy) {
/**
* Checks to see if the collection contains a given data source.
- *
* @param {DataSource} dataSource The data source to check for.
* @returns {boolean} true if the collection contains the data source, false otherwise.
*/
@@ -156,7 +152,6 @@ DataSourceCollection.prototype.contains = function (dataSource) {
/**
* Determines the index of a given data source in the collection.
- *
* @param {DataSource} dataSource The data source to find the index of.
* @returns {number} The index of the data source in the collection, or -1 if the data source does not exist in the collection.
*/
@@ -166,7 +161,6 @@ DataSourceCollection.prototype.indexOf = function (dataSource) {
/**
* Gets a data source by index from the collection.
- *
* @param {number} index the index to retrieve.
* @returns {DataSource} The data source at the specified index.
*/
@@ -182,7 +176,6 @@ DataSourceCollection.prototype.get = function (index) {
/**
* Gets a data source by name from the collection.
- *
* @param {string} name The name to retrieve.
* @returns {DataSource[]} A list of all data sources matching the provided name.
*/
@@ -235,11 +228,9 @@ function swapDataSources(collection, i, j) {
/**
* Raises a data source up one position in the collection.
- *
* @param {DataSource} dataSource The data source to move.
- *
- * @exception {DeveloperError} dataSource is not in this collection.
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} dataSource is not in this collection.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
*/
DataSourceCollection.prototype.raise = function (dataSource) {
const index = getIndex(this._dataSources, dataSource);
@@ -248,11 +239,9 @@ DataSourceCollection.prototype.raise = function (dataSource) {
/**
* Lowers a data source down one position in the collection.
- *
* @param {DataSource} dataSource The data source to move.
- *
- * @exception {DeveloperError} dataSource is not in this collection.
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} dataSource is not in this collection.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
*/
DataSourceCollection.prototype.lower = function (dataSource) {
const index = getIndex(this._dataSources, dataSource);
@@ -261,11 +250,9 @@ DataSourceCollection.prototype.lower = function (dataSource) {
/**
* Raises a data source to the top of the collection.
- *
* @param {DataSource} dataSource The data source to move.
- *
- * @exception {DeveloperError} dataSource is not in this collection.
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} dataSource is not in this collection.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
*/
DataSourceCollection.prototype.raiseToTop = function (dataSource) {
const index = getIndex(this._dataSources, dataSource);
@@ -284,11 +271,9 @@ DataSourceCollection.prototype.raiseToTop = function (dataSource) {
/**
* Lowers a data source to the bottom of the collection.
- *
* @param {DataSource} dataSource The data source to move.
- *
- * @exception {DeveloperError} dataSource is not in this collection.
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} dataSource is not in this collection.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
*/
DataSourceCollection.prototype.lowerToBottom = function (dataSource) {
const index = getIndex(this._dataSources, dataSource);
@@ -305,9 +290,7 @@ DataSourceCollection.prototype.lowerToBottom = function (dataSource) {
* Returns true if this object was destroyed; otherwise, false.
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true if this object was destroyed; otherwise, false.
- *
* @see DataSourceCollection#destroy
*/
DataSourceCollection.prototype.isDestroyed = function () {
@@ -320,13 +303,9 @@ DataSourceCollection.prototype.isDestroyed = function () {
* collector. Once this object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* dataSourceCollection = dataSourceCollection && dataSourceCollection.destroy();
- *
* @see DataSourceCollection#isDestroyed
*/
DataSourceCollection.prototype.destroy = function () {
diff --git a/packages/engine/Source/DataSources/DataSourceDisplay.js b/packages/engine/Source/DataSources/DataSourceDisplay.js
index be83ae2685ea..39d4ee70bf5c 100644
--- a/packages/engine/Source/DataSources/DataSourceDisplay.js
+++ b/packages/engine/Source/DataSources/DataSourceDisplay.js
@@ -23,12 +23,11 @@ import PolylineVisualizer from "./PolylineVisualizer.js";
/**
* Visualizes a collection of {@link DataSource} instances.
* @alias DataSourceDisplay
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Scene} options.scene The scene in which to display the data.
* @param {DataSourceCollection} options.dataSourceCollection The data sources to display.
- * @param {DataSourceDisplay.VisualizersCallback} [options.visualizersCallback=DataSourceDisplay.defaultVisualizersCallback]
+ * @param {DataSourceDisplay.VisualizersCallback} [options.visualizersCallback]
* A function which creates an array of visualizers used for visualization.
* If undefined, all standard visualizers are used.
*/
@@ -147,7 +146,6 @@ DataSourceDisplay.unregisterVisualizer = function (visualizer) {
/**
* Gets or sets the default function which creates an array of visualizers used for visualization.
* By default, this function uses all standard visualizers.
- *
* @type {DataSourceDisplay.VisualizersCallback}
*/
DataSourceDisplay.defaultVisualizersCallback = function (
@@ -234,9 +232,7 @@ Object.defineProperties(DataSourceDisplay.prototype, {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
- *
* @see DataSourceDisplay#destroy
*/
DataSourceDisplay.prototype.isDestroyed = function () {
@@ -250,13 +246,9 @@ DataSourceDisplay.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* dataSourceDisplay = dataSourceDisplay.destroy();
- *
* @see DataSourceDisplay#isDestroyed
*/
DataSourceDisplay.prototype.destroy = function () {
@@ -284,7 +276,6 @@ DataSourceDisplay.prototype.destroy = function () {
/**
* Updates the display to the provided time.
- *
* @param {JulianDate} time The simulation time.
* @returns {boolean} True if all data sources are ready to be displayed, false otherwise.
*/
@@ -365,7 +356,6 @@ const getBoundingSphereBoundingSphereScratch = new BoundingSphere();
/**
* Computes a bounding sphere which encloses the visualization produced for the specified entity.
* The bounding sphere is in the fixed frame of the scene's globe.
- *
* @param {Entity} entity The entity whose bounding sphere to compute.
* @param {boolean} allowPartial If true, pending bounding spheres are ignored and an answer will be returned from the currently available data.
* If false, the the function will halt and return pending if any of the bounding spheres are pending.
@@ -529,12 +519,10 @@ DataSourceDisplay.prototype._onDataSourceMoved = function (
/**
* A function which creates an array of visualizers used for visualization.
* @callback DataSourceDisplay.VisualizersCallback
- *
* @param {Scene} scene The scene to create visualizers for.
* @param {EntityCluster} entityCluster The entity cluster to create visualizers for.
* @param {DataSource} dataSource The data source to create visualizers for.
* @returns {Visualizer[]} An array of visualizers used for visualization.
- *
* @example
* function createVisualizers(scene, entityCluster, dataSource) {
* return [new Cesium.BillboardVisualizer(entityCluster, dataSource.entities)];
diff --git a/packages/engine/Source/DataSources/DynamicGeometryBatch.js b/packages/engine/Source/DataSources/DynamicGeometryBatch.js
index 38c36bcd3d85..44e02d98b3ff 100644
--- a/packages/engine/Source/DataSources/DynamicGeometryBatch.js
+++ b/packages/engine/Source/DataSources/DynamicGeometryBatch.js
@@ -3,6 +3,8 @@ import defined from "../Core/defined.js";
import BoundingSphereState from "./BoundingSphereState.js";
/**
+ * @param primitives
+ * @param orderedGroundPrimitives
* @private
*/
function DynamicGeometryBatch(primitives, orderedGroundPrimitives) {
diff --git a/packages/engine/Source/DataSources/DynamicGeometryUpdater.js b/packages/engine/Source/DataSources/DynamicGeometryUpdater.js
index 23963ef14faf..bd1b59c968d0 100644
--- a/packages/engine/Source/DataSources/DynamicGeometryUpdater.js
+++ b/packages/engine/Source/DataSources/DynamicGeometryUpdater.js
@@ -20,9 +20,11 @@ import Property from "./Property.js";
* {@link GeometryUpdater} implementations which contain dynamic geometry.
*
* This type defines an interface and cannot be instantiated directly.
- *
+ * @param geometryUpdater
+ * @param primitives
+ * @param orderedGroundPrimitives
* @alias DynamicGeometryUpdater
- * @constructor
+ * @class
* @private
* @abstract
*/
@@ -62,7 +64,6 @@ DynamicGeometryUpdater.prototype._setOptions =
* Updates the geometry to the specified time.
* @memberof DynamicGeometryUpdater
* @function
- *
* @param {JulianDate} time The current time.
*/
DynamicGeometryUpdater.prototype.update = function (time) {
@@ -192,7 +193,6 @@ DynamicGeometryUpdater.prototype.update = function (time) {
* Computes a bounding sphere which encloses the visualization produced for the specified entity.
* The bounding sphere is in the fixed frame of the scene's globe.
* @function
- *
* @param {BoundingSphere} result The bounding sphere onto which to store the result.
* @returns {BoundingSphereState} BoundingSphereState.DONE if the result contains the bounding sphere,
* BoundingSphereState.PENDING if the result is still being computed, or
@@ -246,7 +246,6 @@ DynamicGeometryUpdater.prototype.getBoundingSphere = function (result) {
* Returns true if this object was destroyed; otherwise, false.
* @memberof DynamicGeometryUpdater
* @function
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
*/
DynamicGeometryUpdater.prototype.isDestroyed = function () {
@@ -257,8 +256,7 @@ DynamicGeometryUpdater.prototype.isDestroyed = function () {
* Destroys and resources used by the object. Once an object is destroyed, it should not be used.
* @memberof DynamicGeometryUpdater
* @function
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
*/
DynamicGeometryUpdater.prototype.destroy = function () {
const primitives = this._primitives;
diff --git a/packages/engine/Source/DataSources/EllipseGeometryUpdater.js b/packages/engine/Source/DataSources/EllipseGeometryUpdater.js
index 15e65434f462..de207b88e1e6 100644
--- a/packages/engine/Source/DataSources/EllipseGeometryUpdater.js
+++ b/packages/engine/Source/DataSources/EllipseGeometryUpdater.js
@@ -46,8 +46,7 @@ function EllipseGeometryOptions(entity) {
* A {@link GeometryUpdater} for ellipses.
* Clients do not normally create this class directly, but instead rely on {@link DataSourceDisplay}.
* @alias EllipseGeometryUpdater
- * @constructor
- *
+ * @class
* @param {Entity} entity The entity containing the geometry to be visualized.
* @param {Scene} scene The scene where visualization is taking place.
*/
@@ -72,11 +71,9 @@ if (defined(Object.create)) {
/**
* Creates the geometry instance which represents the fill of the geometry.
- *
* @param {JulianDate} time The time to use when retrieving initial attribute values.
* @returns {GeometryInstance} The geometry instance representing the filled portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent a filled geometry.
+ * @throws {DeveloperError} This instance does not represent a filled geometry.
*/
EllipseGeometryUpdater.prototype.createFillGeometryInstance = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -140,11 +137,9 @@ EllipseGeometryUpdater.prototype.createFillGeometryInstance = function (time) {
/**
* Creates the geometry instance which represents the outline of the geometry.
- *
* @param {JulianDate} time The time to use when retrieving initial attribute values.
* @returns {GeometryInstance} The geometry instance representing the outline portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent an outlined geometry.
+ * @throws {DeveloperError} This instance does not represent an outlined geometry.
*/
EllipseGeometryUpdater.prototype.createOutlineGeometryInstance = function (
time
@@ -323,6 +318,9 @@ EllipseGeometryUpdater.prototype._setStaticOptions = function (
EllipseGeometryUpdater.DynamicGeometryUpdater = DynamicEllipseGeometryUpdater;
/**
+ * @param geometryUpdater
+ * @param primitives
+ * @param groundPrimitives
* @private
*/
function DynamicEllipseGeometryUpdater(
diff --git a/packages/engine/Source/DataSources/EllipseGraphics.js b/packages/engine/Source/DataSources/EllipseGraphics.js
index 4c85aee9acf0..bb09ac0aa092 100644
--- a/packages/engine/Source/DataSources/EllipseGraphics.js
+++ b/packages/engine/Source/DataSources/EllipseGraphics.js
@@ -9,7 +9,6 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @typedef {object} EllipseGraphics.ConstructorOptions
*
* Initialization options for the EllipseGraphics constructor
- *
* @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the ellipse.
* @property {Property | number} [semiMajorAxis] The numeric Property specifying the semi-major axis.
* @property {Property | number} [semiMinorAxis] The numeric Property specifying the semi-minor axis.
@@ -37,12 +36,9 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* The ellipse conforms to the curvature of the globe and can be placed on the surface or
* at altitude and can optionally be extruded into a volume.
* The center point is determined by the containing {@link Entity}.
- *
* @alias EllipseGraphics
- * @constructor
- *
+ * @class
* @param {EllipseGraphics.ConstructorOptions} [options] Object describing initialization options
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Circles and Ellipses.html|Cesium Sandcastle Circles and Ellipses Demo}
*/
function EllipseGraphics(options) {
@@ -95,7 +91,6 @@ Object.defineProperties(EllipseGraphics.prototype, {
/**
* Gets the event that is raised whenever a property or sub-property is changed or modified.
* @memberof EllipseGraphics.prototype
- *
* @type {Event}
* @readonly
*/
@@ -271,7 +266,6 @@ Object.defineProperties(EllipseGraphics.prototype, {
/**
* Duplicates this instance.
- *
* @param {EllipseGraphics} [result] The object onto which to store the result.
* @returns {EllipseGraphics} The modified result parameter or a new instance if one was not provided.
*/
@@ -305,7 +299,6 @@ EllipseGraphics.prototype.clone = function (result) {
/**
* Assigns each unassigned property on this object to the value
* of the same property on the provided source object.
- *
* @param {EllipseGraphics} source The object to be merged into this object.
*/
EllipseGraphics.prototype.merge = function (source) {
diff --git a/packages/engine/Source/DataSources/EllipsoidGeometryUpdater.js b/packages/engine/Source/DataSources/EllipsoidGeometryUpdater.js
index 877f84a6ac1e..1b5973053dfe 100644
--- a/packages/engine/Source/DataSources/EllipsoidGeometryUpdater.js
+++ b/packages/engine/Source/DataSources/EllipsoidGeometryUpdater.js
@@ -54,8 +54,7 @@ function EllipsoidGeometryOptions(entity) {
* A {@link GeometryUpdater} for ellipsoids.
* Clients do not normally create this class directly, but instead rely on {@link DataSourceDisplay}.
* @alias EllipsoidGeometryUpdater
- * @constructor
- *
+ * @class
* @param {Entity} entity The entity containing the geometry to be visualized.
* @param {Scene} scene The scene where visualization is taking place.
*/
@@ -103,13 +102,11 @@ Object.defineProperties(EllipsoidGeometryUpdater.prototype, {
/**
* Creates the geometry instance which represents the fill of the geometry.
- *
* @param {JulianDate} time The time to use when retrieving initial attribute values.
- * @param {boolean} [skipModelMatrix=false] Whether to compute a model matrix for the geometry instance
+ * @param {boolean} [skipModelMatrix] Whether to compute a model matrix for the geometry instance
* @param {Matrix4} [modelMatrixResult] Used to store the result of the model matrix calculation
* @returns {GeometryInstance} The geometry instance representing the filled portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent a filled geometry.
+ * @throws {DeveloperError} This instance does not represent a filled geometry.
*/
EllipsoidGeometryUpdater.prototype.createFillGeometryInstance = function (
time,
@@ -187,13 +184,11 @@ EllipsoidGeometryUpdater.prototype.createFillGeometryInstance = function (
/**
* Creates the geometry instance which represents the outline of the geometry.
- *
* @param {JulianDate} time The time to use when retrieving initial attribute values.
- * @param {boolean} [skipModelMatrix=false] Whether to compute a model matrix for the geometry instance
+ * @param {boolean} [skipModelMatrix] Whether to compute a model matrix for the geometry instance
* @param {Matrix4} [modelMatrixResult] Used to store the result of the model matrix calculation
* @returns {GeometryInstance} The geometry instance representing the outline portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent an outlined geometry.
+ * @throws {DeveloperError} This instance does not represent an outlined geometry.
*/
EllipsoidGeometryUpdater.prototype.createOutlineGeometryInstance = function (
time,
@@ -347,6 +342,9 @@ EllipsoidGeometryUpdater.prototype._onEntityPropertyChanged = heightReferenceOnE
EllipsoidGeometryUpdater.DynamicGeometryUpdater = DynamicEllipsoidGeometryUpdater;
/**
+ * @param geometryUpdater
+ * @param primitives
+ * @param groundPrimitives
* @private
*/
function DynamicEllipsoidGeometryUpdater(
diff --git a/packages/engine/Source/DataSources/EllipsoidGraphics.js b/packages/engine/Source/DataSources/EllipsoidGraphics.js
index ea68b330a751..fdb88c566ed3 100644
--- a/packages/engine/Source/DataSources/EllipsoidGraphics.js
+++ b/packages/engine/Source/DataSources/EllipsoidGraphics.js
@@ -9,7 +9,6 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @typedef {object} EllipsoidGraphics.ConstructorOptions
*
* Initialization options for the EllipsoidGraphics constructor
- *
* @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the ellipsoid.
* @property {Property | Cartesian3} [radii] A {@link Cartesian3} Property specifying the radii of the ellipsoid.
* @property {Property | Cartesian3} [innerRadii] A {@link Cartesian3} Property specifying the inner radii of the ellipsoid.
@@ -32,12 +31,9 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
/**
* Describe an ellipsoid or sphere. The center position and orientation are determined by the containing {@link Entity}.
- *
* @alias EllipsoidGraphics
- * @constructor
- *
+ * @class
* @param {EllipsoidGraphics.ConstructorOptions} [options] Object describing initialization options
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Spheres%20and%20Ellipsoids.html|Cesium Sandcastle Spheres and Ellipsoids Demo}
*/
function EllipsoidGraphics(options) {
@@ -86,7 +82,6 @@ Object.defineProperties(EllipsoidGraphics.prototype, {
/**
* Gets the event that is raised whenever a property or sub-property is changed or modified.
* @memberof EllipsoidGraphics.prototype
- *
* @type {Event}
* @readonly
*/
@@ -247,7 +242,6 @@ Object.defineProperties(EllipsoidGraphics.prototype, {
/**
* Duplicates this instance.
- *
* @param {EllipsoidGraphics} [result] The object onto which to store the result.
* @returns {EllipsoidGraphics} The modified result parameter or a new instance if one was not provided.
*/
@@ -279,7 +273,6 @@ EllipsoidGraphics.prototype.clone = function (result) {
/**
* Assigns each unassigned property on this object to the value
* of the same property on the provided source object.
- *
* @param {EllipsoidGraphics} source The object to be merged into this object.
*/
EllipsoidGraphics.prototype.merge = function (source) {
diff --git a/packages/engine/Source/DataSources/Entity.js b/packages/engine/Source/DataSources/Entity.js
index 998108671b35..8c0a7a2850d9 100644
--- a/packages/engine/Source/DataSources/Entity.js
+++ b/packages/engine/Source/DataSources/Entity.js
@@ -68,7 +68,6 @@ function createPropertyTypeDescriptor(name, Type) {
* @typedef {object} Entity.ConstructorOptions
*
* Initialization options for the Entity constructor
- *
* @property {string} [id] A unique identifier for this object. If none is provided, a GUID is generated.
* @property {string} [name] A human readable name to display to users. It does not have to be unique.
* @property {TimeIntervalCollection} [availability] The availability, if any, associated with this object.
@@ -103,10 +102,8 @@ function createPropertyTypeDescriptor(name, Type) {
* They can be created manually and added to {@link Viewer#entities} or be produced by
* data sources, such as {@link CzmlDataSource} and {@link GeoJsonDataSource}.
* @alias Entity
- * @constructor
- *
+ * @class
* @param {Entity.ConstructorOptions} [options] Object describing initialization options
- *
* @see {@link https://cesium.com/learn/cesiumjs-learn/cesiumjs-creating-entities/|Creating Entities}
*/
function Entity(options) {
@@ -248,7 +245,6 @@ Object.defineProperties(Entity.prototype, {
/**
* Gets the event that is raised whenever a property or sub-property is changed or modified.
* @memberof Entity.prototype
- *
* @type {Event}
* @readonly
*/
@@ -501,7 +497,7 @@ Object.defineProperties(Entity.prototype, {
* Add the specified type and construct the properties for it in the Entity class
* @private
* @param {string} propertyName name of the property that controls/accesses this entity type
- * @param {{ constructor: function }} Type The Graphics class to associate with this entity type
+ * @param {{constructor: Function}} Type The Graphics class to associate with this entity type
*/
Entity.registerEntityType = function (propertyName, Type) {
Object.defineProperties(Entity.prototype, {
@@ -514,7 +510,6 @@ Entity.registerEntityType = function (propertyName, Type) {
/**
* Given a time, returns true if this object should have data during that time.
- *
* @param {JulianDate} time The time to check availability for.
* @returns {boolean} true if the object should have data during the provided time, false otherwise.
*/
@@ -533,11 +528,9 @@ Entity.prototype.isAvailable = function (time) {
* Adds a property to this object. Once a property is added, it can be
* observed with {@link Entity#definitionChanged} and composited
* with {@link CompositeEntityCollection}
- *
* @param {string} propertyName The name of the property to add.
- *
- * @exception {DeveloperError} "propertyName" is a reserved property name.
- * @exception {DeveloperError} "propertyName" is already a registered property.
+ * @throws {DeveloperError} "propertyName" is a reserved property name.
+ * @throws {DeveloperError} "propertyName" is already a registered property.
*/
Entity.prototype.addProperty = function (propertyName) {
const propertyNames = this._propertyNames;
@@ -566,11 +559,9 @@ Entity.prototype.addProperty = function (propertyName) {
/**
* Removed a property previously added with addProperty.
- *
* @param {string} propertyName The name of the property to remove.
- *
- * @exception {DeveloperError} "propertyName" is a reserved property name.
- * @exception {DeveloperError} "propertyName" is not a registered property.
+ * @throws {DeveloperError} "propertyName" is a reserved property name.
+ * @throws {DeveloperError} "propertyName" is not a registered property.
*/
Entity.prototype.removeProperty = function (propertyName) {
const propertyNames = this._propertyNames;
@@ -592,7 +583,6 @@ Entity.prototype.removeProperty = function (propertyName) {
/**
* Assigns each unassigned property on this object to the value
* of the same property on the provided source object.
- *
* @param {Entity} source The object to be merged into this object.
*/
Entity.prototype.merge = function (source) {
@@ -659,10 +649,8 @@ const orientationScratch = new Quaternion();
/**
* Computes the model matrix for the entity's transform at specified time. Returns undefined if position is undefined
- *
* @param {JulianDate} time The time to retrieve model matrix for.
* @param {Matrix4} [result] The object onto which to store the result.
- *
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided. Result is undefined if position is undefined.
*/
Entity.prototype.computeModelMatrix = function (time, result) {
@@ -696,6 +684,11 @@ Entity.prototype.computeModelMatrix = function (time, result) {
};
/**
+ * @param time
+ * @param heightReferenceProperty
+ * @param heightOffset
+ * @param ellipsoid
+ * @param result
* @private
*/
Entity.prototype.computeModelMatrixForHeightReference = function (
@@ -755,7 +748,6 @@ Entity.prototype.computeModelMatrixForHeightReference = function (
* Checks if the given Scene supports materials besides Color on Entities draped on terrain or 3D Tiles.
* If this feature is not supported, Entities with non-color materials but no `height` will
* instead be rendered as if height is 0.
- *
* @param {Scene} scene The current scene.
* @returns {boolean} Whether or not the current scene supports materials for entities on terrain.
*/
@@ -767,7 +759,6 @@ Entity.supportsMaterialsforEntitiesOnTerrain = function (scene) {
* Checks if the given Scene supports polylines clamped to terrain or 3D Tiles.
* If this feature is not supported, Entities with PolylineGraphics will be rendered with vertices at
* the provided heights and using the `arcType` parameter instead of clamped to the ground.
- *
* @param {Scene} scene The current scene.
* @returns {boolean} Whether or not the current scene supports polylines on terrain or 3D TIles.
*/
diff --git a/packages/engine/Source/DataSources/EntityCluster.js b/packages/engine/Source/DataSources/EntityCluster.js
index 965e19f74a08..a3c50e242eb5 100644
--- a/packages/engine/Source/DataSources/EntityCluster.js
+++ b/packages/engine/Source/DataSources/EntityCluster.js
@@ -17,19 +17,16 @@ import KDBush from "kdbush";
/**
* Defines how screen space objects (billboards, points, labels) are clustered.
- *
* @param {object} [options] An object with the following properties:
- * @param {boolean} [options.enabled=false] Whether or not to enable clustering.
- * @param {number} [options.pixelRange=80] The pixel range to extend the screen space bounding box.
- * @param {number} [options.minimumClusterSize=2] The minimum number of screen space objects that can be clustered.
- * @param {boolean} [options.clusterBillboards=true] Whether or not to cluster the billboards of an entity.
- * @param {boolean} [options.clusterLabels=true] Whether or not to cluster the labels of an entity.
- * @param {boolean} [options.clusterPoints=true] Whether or not to cluster the points of an entity.
- * @param {boolean} [options.show=true] Determines if the entities in the cluster will be shown.
- *
+ * @param {boolean} [options.enabled] Whether or not to enable clustering.
+ * @param {number} [options.pixelRange] The pixel range to extend the screen space bounding box.
+ * @param {number} [options.minimumClusterSize] The minimum number of screen space objects that can be clustered.
+ * @param {boolean} [options.clusterBillboards] Whether or not to cluster the billboards of an entity.
+ * @param {boolean} [options.clusterLabels] Whether or not to cluster the labels of an entity.
+ * @param {boolean} [options.clusterPoints] Whether or not to cluster the points of an entity.
+ * @param {boolean} [options.show] Determines if the entities in the cluster will be shown.
* @alias EntityCluster
- * @constructor
- *
+ * @class
* @demo {@link https://sandcastle.cesium.com/index.html?src=Clustering.html|Cesium Sandcastle Clustering Demo}
*/
function EntityCluster(options) {
@@ -69,7 +66,6 @@ function EntityCluster(options) {
/**
* Determines if entities in this collection will be shown.
- *
* @type {boolean}
* @default true
*/
@@ -682,7 +678,6 @@ function removeEntityIndicesIfUnused(entityCluster, entityId) {
* Returns a new {@link Label}.
* @param {Entity} entity The entity that will use the returned {@link Label} for visualization.
* @returns {Label} The label that will be used to visualize an entity.
- *
* @private
*/
EntityCluster.prototype.getLabel = createGetEntity(
@@ -695,7 +690,6 @@ EntityCluster.prototype.getLabel = createGetEntity(
/**
* Removes the {@link Label} associated with an entity so it can be reused by another entity.
* @param {Entity} entity The entity that will uses the returned {@link Label} for visualization.
- *
* @private
*/
EntityCluster.prototype.removeLabel = function (entity) {
@@ -728,7 +722,6 @@ EntityCluster.prototype.removeLabel = function (entity) {
* Returns a new {@link Billboard}.
* @param {Entity} entity The entity that will use the returned {@link Billboard} for visualization.
* @returns {Billboard} The label that will be used to visualize an entity.
- *
* @private
*/
EntityCluster.prototype.getBillboard = createGetEntity(
@@ -741,7 +734,6 @@ EntityCluster.prototype.getBillboard = createGetEntity(
/**
* Removes the {@link Billboard} associated with an entity so it can be reused by another entity.
* @param {Entity} entity The entity that will uses the returned {@link Billboard} for visualization.
- *
* @private
*/
EntityCluster.prototype.removeBillboard = function (entity) {
@@ -774,7 +766,6 @@ EntityCluster.prototype.removeBillboard = function (entity) {
* Returns a new {@link Point}.
* @param {Entity} entity The entity that will use the returned {@link Point} for visualization.
* @returns {Point} The label that will be used to visualize an entity.
- *
* @private
*/
EntityCluster.prototype.getPoint = createGetEntity(
@@ -787,7 +778,6 @@ EntityCluster.prototype.getPoint = createGetEntity(
/**
* Removes the {@link Point} associated with an entity so it can be reused by another entity.
* @param {Entity} entity The entity that will uses the returned {@link Point} for visualization.
- *
* @private
*/
EntityCluster.prototype.removePoint = function (entity) {
@@ -853,6 +843,7 @@ function updateEnable(entityCluster) {
/**
* Gets the draw commands for the clustered billboards/points/labels if enabled, otherwise,
* queues the draw commands for billboards/points/labels created for entities.
+ * @param frameState
* @private
*/
EntityCluster.prototype.update = function (frameState) {
@@ -977,14 +968,12 @@ EntityCluster.prototype.destroy = function () {
/**
* A event listener function used to style clusters.
* @callback EntityCluster.newClusterCallback
- *
* @param {Entity[]} clusteredEntities An array of the entities contained in the cluster.
* @param {object} cluster An object containing the Billboard, Label, and Point
* primitives that represent this cluster of entities.
* @param {Billboard} cluster.billboard
* @param {Label} cluster.label
* @param {PointPrimitive} cluster.point
- *
* @example
* // The default cluster values.
* dataSource.clustering.clusterEvent.addEventListener(function(entities, cluster) {
diff --git a/packages/engine/Source/DataSources/EntityCollection.js b/packages/engine/Source/DataSources/EntityCollection.js
index 67c125ff9911..f19bc488900d 100644
--- a/packages/engine/Source/DataSources/EntityCollection.js
+++ b/packages/engine/Source/DataSources/EntityCollection.js
@@ -48,8 +48,7 @@ function fireChangedEvent(collection) {
/**
* An observable collection of {@link Entity} instances where each entity has a unique id.
* @alias EntityCollection
- * @constructor
- *
+ * @class
* @param {DataSource|CompositeEntityCollection} [owner] The data source (or composite entity collection) which created this collection.
*/
function EntityCollection(owner) {
@@ -84,8 +83,7 @@ EntityCollection.prototype.suspendEvents = function () {
* will be triggered as a single event when this function is called.
* This function is reference counted and can safely be called multiple times as long as there
* are corresponding calls to {@link EntityCollection#resumeEvents}.
- *
- * @exception {DeveloperError} resumeEvents can not be called before suspendEvents.
+ * @throws {DeveloperError} resumeEvents can not be called before suspendEvents.
*/
EntityCollection.prototype.resumeEvents = function () {
//>>includeStart('debug', pragmas.debug);
@@ -103,7 +101,6 @@ EntityCollection.prototype.resumeEvents = function () {
/**
* The signature of the event generated by {@link EntityCollection#collectionChanged}.
* @callback EntityCollection.CollectionChangedEventCallback
- *
* @param {EntityCollection} collection The collection that triggered the event.
* @param {Entity[]} added The array of {@link Entity} instances that have been added to the collection.
* @param {Entity[]} removed The array of {@link Entity} instances that have been removed from the collection.
@@ -219,7 +216,6 @@ Object.defineProperties(EntityCollection.prototype, {
* If the collection contains a mix of infinitely available data and non-infinite data,
* it will return the interval pertaining to the non-infinite data only. If all
* data is infinite, an infinite interval will be returned.
- *
* @returns {TimeInterval} The availability of entities in the collection.
*/
EntityCollection.prototype.computeAvailability = function () {
@@ -261,10 +257,9 @@ EntityCollection.prototype.computeAvailability = function () {
/**
* Add an entity to the collection.
- *
* @param {Entity | Entity.ConstructorOptions} entity The entity to be added.
* @returns {Entity} The entity that was added.
- * @exception {DeveloperError} An entity with already exists in this collection.
+ * @throws {DeveloperError} An entity with already exists in this collection.
*/
EntityCollection.prototype.add = function (entity) {
//>>includeStart('debug', pragmas.debug);
@@ -302,7 +297,6 @@ EntityCollection.prototype.add = function (entity) {
/**
* Removes an entity from the collection.
- *
* @param {Entity} entity The entity to be removed.
* @returns {boolean} true if the item was removed, false if it did not exist in the collection.
*/
@@ -315,7 +309,6 @@ EntityCollection.prototype.remove = function (entity) {
/**
* Returns true if the provided entity is in this collection, false otherwise.
- *
* @param {Entity} entity The entity.
* @returns {boolean} true if the provided entity is in this collection, false otherwise.
*/
@@ -330,7 +323,6 @@ EntityCollection.prototype.contains = function (entity) {
/**
* Removes an entity with the provided id from the collection.
- *
* @param {string} id The id of the entity to remove.
* @returns {boolean} true if the item was removed, false if no item with the provided id existed in the collection.
*/
@@ -393,7 +385,6 @@ EntityCollection.prototype.removeAll = function () {
/**
* Gets an entity with the specified id.
- *
* @param {string} id The id of the entity to retrieve.
* @returns {Entity|undefined} The entity with the provided id or undefined if the id did not exist in the collection.
*/
@@ -409,7 +400,6 @@ EntityCollection.prototype.getById = function (id) {
/**
* Gets an entity with the specified id or creates it and adds it to the collection if it does not exist.
- *
* @param {string} id The id of the entity to retrieve or create.
* @returns {Entity} The new or existing object.
*/
diff --git a/packages/engine/Source/DataSources/EntityView.js b/packages/engine/Source/DataSources/EntityView.js
index 3885c7e532f4..1bab8aac0d4d 100644
--- a/packages/engine/Source/DataSources/EntityView.js
+++ b/packages/engine/Source/DataSources/EntityView.js
@@ -273,11 +273,10 @@ function updateTransform(
/**
* A utility object for tracking an entity with the camera.
* @alias EntityView
- * @constructor
- *
+ * @class
* @param {Entity} entity The entity to track with the camera.
* @param {Scene} scene The scene to use.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to use for orienting the camera.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid to use for orienting the camera.
*/
function EntityView(entity, scene, ellipsoid) {
//>>includeStart('debug', pragmas.debug);
diff --git a/packages/engine/Source/DataSources/GeoJsonDataSource.js b/packages/engine/Source/DataSources/GeoJsonDataSource.js
index ce8429d476ed..2240c31718c0 100644
--- a/packages/engine/Source/DataSources/GeoJsonDataSource.js
+++ b/packages/engine/Source/DataSources/GeoJsonDataSource.js
@@ -553,7 +553,6 @@ function processTopology(dataSource, geoJson, geometry, crsFunction, options) {
* @typedef {object} GeoJsonDataSource.LoadOptions
*
* Initialization options for the load
method.
- *
* @property {string} [sourceUri] Overrides the url to use for resolving relative links.
* @property {GeoJsonDataSource.describe} [describe=GeoJsonDataSource.defaultDescribeProperty] A function which returns a Property object (or just a string).
* @property {number} [markerSize=GeoJsonDataSource.markerSize] The default size of the map pin created for each point, in pixels.
@@ -571,16 +570,12 @@ function processTopology(dataSource, geoJson, geometry, crsFunction, options) {
* {@link http://www.geojson.org/|GeoJSON} and {@link https://github.com/mbostock/topojson|TopoJSON} data.
* {@link https://github.com/mapbox/simplestyle-spec|simplestyle-spec} properties will also be used if they
* are present.
- *
* @alias GeoJsonDataSource
- * @constructor
- *
+ * @class
* @param {string} [name] The name of this data source. If undefined, a name will be taken from
* the name of the GeoJSON file.
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=GeoJSON%20and%20TopoJSON.html|Cesium Sandcastle GeoJSON and TopoJSON Demo}
* @demo {@link https://sandcastle.cesium.com/index.html?src=GeoJSON%20simplestyle.html|Cesium Sandcastle GeoJSON simplestyle Demo}
- *
* @example
* const viewer = new Cesium.Viewer('cesiumContainer');
* viewer.dataSources.add(Cesium.GeoJsonDataSource.load('../../SampleData/ne_10m_us_states.topojson', {
@@ -606,10 +601,8 @@ function GeoJsonDataSource(name) {
/**
* Creates a Promise to a new instance loaded with the provided GeoJSON or TopoJSON data.
- *
* @param {Resource|string|object} data A url, GeoJSON object, or TopoJSON object to be loaded.
* @param {GeoJsonDataSource.LoadOptions} [options] An object specifying configuration options
- *
* @returns {Promise} A promise that will resolve when the data is loaded.
*/
GeoJsonDataSource.load = function (data, options) {
@@ -853,7 +846,6 @@ Object.defineProperties(GeoJsonDataSource.prototype, {
/**
* Gets or sets the clustering options for this data source. This object can be shared between multiple data sources.
- *
* @memberof GeoJsonDataSource.prototype
* @type {EntityCluster}
*/
@@ -884,10 +876,8 @@ Object.defineProperties(GeoJsonDataSource.prototype, {
/**
* Asynchronously loads the provided GeoJSON or TopoJSON data, replacing any existing data.
- *
* @param {Resource|string|object} data A url, GeoJSON object, or TopoJSON object to be loaded.
* @param {GeoJsonDataSource.LoadOptions} [options] An object specifying configuration options
- *
* @returns {Promise} a promise that will resolve when the GeoJSON is loaded.
*/
GeoJsonDataSource.prototype.load = function (data, options) {
@@ -896,10 +886,8 @@ GeoJsonDataSource.prototype.load = function (data, options) {
/**
* Asynchronously loads the provided GeoJSON or TopoJSON data, without replacing any existing data.
- *
* @param {Resource|string|object} data A url, GeoJSON object, or TopoJSON object to be loaded.
* @param {GeoJsonDataSource.LoadOptions} [options] An object specifying configuration options
- *
* @returns {Promise} a promise that will resolve when the GeoJSON is loaded.
*/
GeoJsonDataSource.prototype.process = function (data, options) {
@@ -974,7 +962,6 @@ function preload(that, data, options, clear) {
* is not required to be implemented. It is provided for data sources which
* retrieve data based on the current animation time or scene state.
* If implemented, update will be called by {@link DataSourceDisplay} once a frame.
- *
* @param {JulianDate} time The simulation time.
* @returns {boolean} True if this data source is ready to be displayed at the provided time, false otherwise.
*/
diff --git a/packages/engine/Source/DataSources/GeometryUpdater.js b/packages/engine/Source/DataSources/GeometryUpdater.js
index ebfeefac0768..5376681509d2 100644
--- a/packages/engine/Source/DataSources/GeometryUpdater.js
+++ b/packages/engine/Source/DataSources/GeometryUpdater.js
@@ -29,8 +29,7 @@ const defaultClassificationType = new ConstantProperty(ClassificationType.BOTH);
/**
* An abstract class for updating geometry entities.
* @alias GeometryUpdater
- * @constructor
- *
+ * @class
* @param {object} options An object with the following properties:
* @param {Entity} options.entity The entity containing the geometry to be visualized.
* @param {Scene} options.scene The scene where visualization is taking place.
@@ -90,7 +89,6 @@ Object.defineProperties(GeometryUpdater.prototype, {
/**
* Gets the entity associated with this geometry.
* @memberof GeometryUpdater.prototype
- *
* @type {Entity}
* @readonly
*/
@@ -102,7 +100,6 @@ Object.defineProperties(GeometryUpdater.prototype, {
/**
* Gets a value indicating if the geometry has a fill component.
* @memberof GeometryUpdater.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -114,7 +111,6 @@ Object.defineProperties(GeometryUpdater.prototype, {
/**
* Gets a value indicating if fill visibility varies with simulation time.
* @memberof GeometryUpdater.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -131,7 +127,6 @@ Object.defineProperties(GeometryUpdater.prototype, {
/**
* Gets the material property used to fill the geometry.
* @memberof GeometryUpdater.prototype
- *
* @type {MaterialProperty}
* @readonly
*/
@@ -143,7 +138,6 @@ Object.defineProperties(GeometryUpdater.prototype, {
/**
* Gets a value indicating if the geometry has an outline component.
* @memberof GeometryUpdater.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -155,7 +149,6 @@ Object.defineProperties(GeometryUpdater.prototype, {
/**
* Gets a value indicating if the geometry has an outline component.
* @memberof GeometryUpdater.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -172,7 +165,6 @@ Object.defineProperties(GeometryUpdater.prototype, {
/**
* Gets the {@link Color} property for the geometry outline.
* @memberof GeometryUpdater.prototype
- *
* @type {Property}
* @readonly
*/
@@ -185,7 +177,6 @@ Object.defineProperties(GeometryUpdater.prototype, {
* Gets the constant with of the geometry outline, in pixels.
* This value is only valid if isDynamic is false.
* @memberof GeometryUpdater.prototype
- *
* @type {number}
* @readonly
*/
@@ -198,7 +189,6 @@ Object.defineProperties(GeometryUpdater.prototype, {
* Gets the property specifying whether the geometry
* casts or receives shadows from light sources.
* @memberof GeometryUpdater.prototype
- *
* @type {Property}
* @readonly
*/
@@ -210,7 +200,6 @@ Object.defineProperties(GeometryUpdater.prototype, {
/**
* Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this geometry will be displayed.
* @memberof GeometryUpdater.prototype
- *
* @type {Property}
* @readonly
*/
@@ -222,7 +211,6 @@ Object.defineProperties(GeometryUpdater.prototype, {
/**
* Gets or sets the {@link ClassificationType} Property specifying if this geometry will classify terrain, 3D Tiles, or both when on the ground.
* @memberof GeometryUpdater.prototype
- *
* @type {Property}
* @readonly
*/
@@ -233,9 +221,7 @@ Object.defineProperties(GeometryUpdater.prototype, {
},
/**
* Gets a value indicating if the geometry is time-varying.
- *
* @memberof GeometryUpdater.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -248,7 +234,6 @@ Object.defineProperties(GeometryUpdater.prototype, {
* Gets a value indicating if the geometry is closed.
* This property is only valid for static geometry.
* @memberof GeometryUpdater.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -260,7 +245,6 @@ Object.defineProperties(GeometryUpdater.prototype, {
/**
* Gets a value indicating if the geometry should be drawn on terrain.
* @memberof EllipseGeometryUpdater.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -273,7 +257,6 @@ Object.defineProperties(GeometryUpdater.prototype, {
* Gets an event that is raised whenever the public properties
* of this updater change.
* @memberof GeometryUpdater.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -286,7 +269,6 @@ Object.defineProperties(GeometryUpdater.prototype, {
/**
* Checks if the geometry is outlined at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve visibility.
* @returns {boolean} true if geometry is outlined at the provided time, false otherwise.
*/
@@ -302,7 +284,6 @@ GeometryUpdater.prototype.isOutlineVisible = function (time) {
/**
* Checks if the geometry is filled at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve visibility.
* @returns {boolean} true if geometry is filled at the provided time, false otherwise.
*/
@@ -318,31 +299,26 @@ GeometryUpdater.prototype.isFilled = function (time) {
/**
* Creates the geometry instance which represents the fill of the geometry.
- *
* @function
* @param {JulianDate} time The time to use when retrieving initial attribute values.
* @returns {GeometryInstance} The geometry instance representing the filled portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent a filled geometry.
+ * @throws {DeveloperError} This instance does not represent a filled geometry.
*/
GeometryUpdater.prototype.createFillGeometryInstance =
DeveloperError.throwInstantiationError;
/**
* Creates the geometry instance which represents the outline of the geometry.
- *
* @function
* @param {JulianDate} time The time to use when retrieving initial attribute values.
* @returns {GeometryInstance} The geometry instance representing the outline portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent an outlined geometry.
+ * @throws {DeveloperError} This instance does not represent an outlined geometry.
*/
GeometryUpdater.prototype.createOutlineGeometryInstance =
DeveloperError.throwInstantiationError;
/**
* Returns true if this object was destroyed; otherwise, false.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
*/
GeometryUpdater.prototype.isDestroyed = function () {
@@ -351,8 +327,7 @@ GeometryUpdater.prototype.isDestroyed = function () {
/**
* Destroys and resources used by the object. Once an object is destroyed, it should not be used.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
*/
GeometryUpdater.prototype.destroy = function () {
destroyObject(this);
@@ -511,13 +486,10 @@ GeometryUpdater.prototype._onEntityPropertyChanged = function (
/**
* Creates the dynamic updater to be used when GeometryUpdater#isDynamic is true.
- *
* @param {PrimitiveCollection} primitives The primitive collection to use.
* @param {PrimitiveCollection} [groundPrimitives] The primitive collection to use for ground primitives.
- *
* @returns {DynamicGeometryUpdater} The dynamic updater used to update the geometry each frame.
- *
- * @exception {DeveloperError} This instance does not represent dynamic geometry.
+ * @throws {DeveloperError} This instance does not represent dynamic geometry.
* @private
*/
GeometryUpdater.prototype.createDynamicUpdater = function (
diff --git a/packages/engine/Source/DataSources/GeometryUpdaterSet.js b/packages/engine/Source/DataSources/GeometryUpdaterSet.js
index 6dd0ba4ec90e..61d3c2d1cc2c 100644
--- a/packages/engine/Source/DataSources/GeometryUpdaterSet.js
+++ b/packages/engine/Source/DataSources/GeometryUpdaterSet.js
@@ -28,7 +28,6 @@ const geometryUpdaters = [
/**
* Manages a set of "updater" classes for the {@link GeometryVisualizer} for each entity
- *
* @private
* @param {Entity} entity
* @param {Scene} scene
diff --git a/packages/engine/Source/DataSources/GeometryVisualizer.js b/packages/engine/Source/DataSources/GeometryVisualizer.js
index e2d1ed306a0f..bd485c927170 100644
--- a/packages/engine/Source/DataSources/GeometryVisualizer.js
+++ b/packages/engine/Source/DataSources/GeometryVisualizer.js
@@ -24,12 +24,11 @@ const emptyArray = [];
/**
* A general purpose visualizer for geometry represented by {@link Primitive} instances.
* @alias GeometryVisualizer
- * @constructor
- *
+ * @class
* @param {Scene} scene The scene the primitives will be rendered in.
* @param {EntityCollection} entityCollection The entityCollection to visualize.
- * @param {PrimitiveCollection} [primitives=scene.primitives] A collection to add primitives related to the entities
- * @param {PrimitiveCollection} [groundPrimitives=scene.groundPrimitives] A collection to add ground primitives related to the entities
+ * @param {PrimitiveCollection} [primitives] A collection to add primitives related to the entities
+ * @param {PrimitiveCollection} [groundPrimitives] A collection to add ground primitives related to the entities
*/
function GeometryVisualizer(
scene,
@@ -232,7 +231,6 @@ GeometryVisualizer.unregisterUpdater = function (updater) {
/**
* Updates all of the primitives created by this visualizer to match their
* Entity counterpart at the given time.
- *
* @param {JulianDate} time The time to update to.
* @returns {boolean} True if the visualizer successfully updated to the provided time,
* false if the visualizer is waiting for asynchronous primitives to be created.
@@ -324,7 +322,6 @@ const getBoundingSphereBoundingSphereScratch = new BoundingSphere();
/**
* Computes a bounding sphere which encloses the visualization produced for the specified entity.
* The bounding sphere is in the fixed frame of the scene's globe.
- *
* @param {Entity} entity The entity whose bounding sphere to compute.
* @param {BoundingSphere} result The bounding sphere onto which to store the result.
* @returns {BoundingSphereState} BoundingSphereState.DONE if the result contains the bounding sphere,
@@ -376,7 +373,6 @@ GeometryVisualizer.prototype.getBoundingSphere = function (entity, result) {
/**
* Returns true if this object was destroyed; otherwise, false.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
*/
GeometryVisualizer.prototype.isDestroyed = function () {
@@ -418,6 +414,7 @@ GeometryVisualizer.prototype.destroy = function () {
};
/**
+ * @param updater
* @private
*/
GeometryVisualizer.prototype._removeUpdater = function (updater) {
@@ -430,6 +427,8 @@ GeometryVisualizer.prototype._removeUpdater = function (updater) {
};
/**
+ * @param time
+ * @param updater
* @private
*/
GeometryVisualizer.prototype._insertUpdaterIntoBatch = function (
@@ -505,6 +504,7 @@ GeometryVisualizer.prototype._insertUpdaterIntoBatch = function (
};
/**
+ * @param updater
* @private
*/
GeometryVisualizer._onGeometryChanged = function (updater) {
@@ -520,6 +520,9 @@ GeometryVisualizer._onGeometryChanged = function (updater) {
};
/**
+ * @param entityCollection
+ * @param added
+ * @param removed
* @private
*/
GeometryVisualizer.prototype._onCollectionChanged = function (
diff --git a/packages/engine/Source/DataSources/GpxDataSource.js b/packages/engine/Source/DataSources/GpxDataSource.js
index 887af0f2c47d..cd5a58ed9aad 100644
--- a/packages/engine/Source/DataSources/GpxDataSource.js
+++ b/packages/engine/Source/DataSources/GpxDataSource.js
@@ -734,15 +734,11 @@ function load(dataSource, entityCollection, data, options) {
/**
* A {@link DataSource} which processes the GPS Exchange Format (GPX).
- *
* @alias GpxDataSource
- * @constructor
- *
+ * @class
* @see {@link http://www.topografix.com/gpx.asp|Topografix GPX Standard}
* @see {@link http://www.topografix.com/gpx/1/1/|Topografix GPX Documentation}
- *
* @demo {@link http://sandcastle.cesium.com/index.html?src=GPX.html}
- *
* @example
* const viewer = new Cesium.Viewer('cesiumContainer');
* viewer.dataSources.add(Cesium.GpxDataSource.load('../../SampleData/track.gpx'));
@@ -764,7 +760,6 @@ function GpxDataSource() {
/**
* Creates a Promise to a new instance loaded with the provided GPX data.
- *
* @param {string|Document|Blob} data A url, parsed GPX document, or Blob containing binary GPX data.
* @param {object} [options] An object with the following properties:
* @param {boolean} [options.clampToGround] True if the symbols should be rendered at the same height as the terrain
@@ -898,7 +893,6 @@ Object.defineProperties(GpxDataSource.prototype, {
/**
* Gets or sets the clustering options for this data source. This object can be shared between multiple data sources.
- *
* @memberof GpxDataSource.prototype
* @type {EntityCluster}
*/
@@ -922,7 +916,6 @@ Object.defineProperties(GpxDataSource.prototype, {
* is not required to be implemented. It is provided for data sources which
* retrieve data based on the current animation time or scene state.
* If implemented, update will be called by {@link DataSourceDisplay} once a frame.
- *
* @param {JulianDate} time The simulation time.
* @returns {boolean} True if this data source is ready to be displayed at the provided time, false otherwise.
*/
@@ -932,7 +925,6 @@ GpxDataSource.prototype.update = function (time) {
/**
* Asynchronously loads the provided GPX data, replacing any existing data.
- *
* @param {string|Document|Blob} data A url, parsed GPX document, or Blob containing binary GPX data or a parsed GPX document.
* @param {object} [options] An object with the following properties:
* @param {boolean} [options.clampToGround] True if the symbols should be rendered at the same height as the terrain
diff --git a/packages/engine/Source/DataSources/GridMaterialProperty.js b/packages/engine/Source/DataSources/GridMaterialProperty.js
index 1304ddd745e0..b80acadf594d 100644
--- a/packages/engine/Source/DataSources/GridMaterialProperty.js
+++ b/packages/engine/Source/DataSources/GridMaterialProperty.js
@@ -15,15 +15,13 @@ const defaultLineThickness = new Cartesian2(1, 1);
/**
* A {@link MaterialProperty} that maps to grid {@link Material} uniforms.
* @alias GridMaterialProperty
- *
* @param {object} [options] Object with the following properties:
- * @param {Property|Color} [options.color=Color.WHITE] A Property specifying the grid {@link Color}.
- * @param {Property|number} [options.cellAlpha=0.1] A numeric Property specifying cell alpha values.
- * @param {Property|Cartesian2} [options.lineCount=new Cartesian2(8, 8)] A {@link Cartesian2} Property specifying the number of grid lines along each axis.
- * @param {Property|Cartesian2} [options.lineThickness=new Cartesian2(1.0, 1.0)] A {@link Cartesian2} Property specifying the thickness of grid lines along each axis.
- * @param {Property|Cartesian2} [options.lineOffset=new Cartesian2(0.0, 0.0)] A {@link Cartesian2} Property specifying starting offset of grid lines along each axis.
- *
- * @constructor
+ * @param {Property|Color} [options.color] A Property specifying the grid {@link Color}.
+ * @param {Property|number} [options.cellAlpha] A numeric Property specifying cell alpha values.
+ * @param {Property|Cartesian2} [options.lineCount] A {@link Cartesian2} Property specifying the number of grid lines along each axis.
+ * @param {Property|Cartesian2} [options.lineThickness] A {@link Cartesian2} Property specifying the thickness of grid lines along each axis.
+ * @param {Property|Cartesian2} [options.lineOffset] A {@link Cartesian2} Property specifying starting offset of grid lines along each axis.
+ * @class
*/
function GridMaterialProperty(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -52,7 +50,6 @@ Object.defineProperties(GridMaterialProperty.prototype, {
* Gets a value indicating if this property is constant. A property is considered
* constant if getValue always returns the same result for the current definition.
* @memberof GridMaterialProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -73,7 +70,6 @@ Object.defineProperties(GridMaterialProperty.prototype, {
* The definition is considered to have changed if a call to getValue would return
* a different result for the same time.
* @memberof GridMaterialProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -126,7 +122,6 @@ Object.defineProperties(GridMaterialProperty.prototype, {
/**
* Gets the {@link Material} type at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the type.
* @returns {string} The type of material.
*/
@@ -136,7 +131,6 @@ GridMaterialProperty.prototype.getType = function (time) {
/**
* Gets the value of the property at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -180,7 +174,6 @@ GridMaterialProperty.prototype.getValue = function (time, result) {
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/GroundGeometryUpdater.js b/packages/engine/Source/DataSources/GroundGeometryUpdater.js
index 438b483dd0ae..883c688a7635 100644
--- a/packages/engine/Source/DataSources/GroundGeometryUpdater.js
+++ b/packages/engine/Source/DataSources/GroundGeometryUpdater.js
@@ -17,7 +17,7 @@ const defaultZIndex = new ConstantProperty(0);
/**
* An abstract class for updating ground geometry entities.
- * @constructor
+ * @class
* @alias GroundGeometryUpdater
* @param {object} options An object with the following properties:
* @param {Entity} options.entity The entity containing the geometry to be visualized.
@@ -140,8 +140,7 @@ GroundGeometryUpdater.prototype._onEntityPropertyChanged = function (
/**
* Destroys and resources used by the object. Once an object is destroyed, it should not be used.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
*/
GroundGeometryUpdater.prototype.destroy = function () {
if (defined(this._terrainOffsetProperty)) {
@@ -153,6 +152,8 @@ GroundGeometryUpdater.prototype.destroy = function () {
};
/**
+ * @param height
+ * @param heightReference
* @private
*/
GroundGeometryUpdater.getGeometryHeight = function (height, heightReference) {
@@ -174,6 +175,8 @@ GroundGeometryUpdater.getGeometryHeight = function (height, heightReference) {
};
/**
+ * @param extrudedHeight
+ * @param extrudedHeightReference
* @private
*/
GroundGeometryUpdater.getGeometryExtrudedHeight = function (
@@ -202,6 +205,10 @@ GroundGeometryUpdater.getGeometryExtrudedHeight = function (
GroundGeometryUpdater.CLAMP_TO_GROUND = "clamp";
/**
+ * @param height
+ * @param heightReference
+ * @param extrudedHeight
+ * @param extrudedHeightReference
* @private
*/
GroundGeometryUpdater.computeGeometryOffsetAttribute = function (
diff --git a/packages/engine/Source/DataSources/ImageMaterialProperty.js b/packages/engine/Source/DataSources/ImageMaterialProperty.js
index 5aa8c5b713fa..b353bfb5b9c9 100644
--- a/packages/engine/Source/DataSources/ImageMaterialProperty.js
+++ b/packages/engine/Source/DataSources/ImageMaterialProperty.js
@@ -13,13 +13,12 @@ const defaultColor = Color.WHITE;
/**
* A {@link MaterialProperty} that maps to image {@link Material} uniforms.
* @alias ImageMaterialProperty
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {Property|string|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} [options.image] A Property specifying the Image, URL, Canvas, or Video.
- * @param {Property|Cartesian2} [options.repeat=new Cartesian2(1.0, 1.0)] A {@link Cartesian2} Property specifying the number of times the image repeats in each direction.
- * @param {Property|Color} [options.color=Color.WHITE] The color applied to the image
- * @param {Property|boolean} [options.transparent=false] Set to true when the image has transparency (for example, when a png has transparent sections)
+ * @param {Property|Cartesian2} [options.repeat] A {@link Cartesian2} Property specifying the number of times the image repeats in each direction.
+ * @param {Property|Color} [options.color] The color applied to the image
+ * @param {Property|boolean} [options.transparent] Set to true when the image has transparency (for example, when a png has transparent sections)
*/
function ImageMaterialProperty(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -45,7 +44,6 @@ Object.defineProperties(ImageMaterialProperty.prototype, {
* Gets a value indicating if this property is constant. A property is considered
* constant if getValue always returns the same result for the current definition.
* @memberof ImageMaterialProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -62,7 +60,6 @@ Object.defineProperties(ImageMaterialProperty.prototype, {
* The definition is considered to have changed if a call to getValue would return
* a different result for the same time.
* @memberof ImageMaterialProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -106,7 +103,6 @@ Object.defineProperties(ImageMaterialProperty.prototype, {
/**
* Gets the {@link Material} type at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the type.
* @returns {string} The type of material.
*/
@@ -116,7 +112,6 @@ ImageMaterialProperty.prototype.getType = function (time) {
/**
* Gets the value of the property at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -149,7 +144,6 @@ ImageMaterialProperty.prototype.getValue = function (time, result) {
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/KmlCamera.js b/packages/engine/Source/DataSources/KmlCamera.js
index 35aabf645666..0a5827d59b4f 100644
--- a/packages/engine/Source/DataSources/KmlCamera.js
+++ b/packages/engine/Source/DataSources/KmlCamera.js
@@ -1,8 +1,7 @@
/**
* Representation of from KML
* @alias KmlCamera
- * @constructor
- *
+ * @class
* @param {Cartesian3} position camera position
* @param {HeadingPitchRoll} headingPitchRoll camera orientation
*/
diff --git a/packages/engine/Source/DataSources/KmlDataSource.js b/packages/engine/Source/DataSources/KmlDataSource.js
index 474f252406bf..a6fa1465c667 100644
--- a/packages/engine/Source/DataSources/KmlDataSource.js
+++ b/packages/engine/Source/DataSources/KmlDataSource.js
@@ -3542,7 +3542,6 @@ function load(dataSource, entityCollection, data, options) {
* @typedef {object} KmlDataSource.LoadOptions
*
* Initialization options for the `load` method.
- *
* @property {string} [sourceUri] Overrides the url to use for resolving relative links and other KML network features.
* @property {boolean} [clampToGround=false] true if we want the geometry features (Polygons, LineStrings and LinearRings) clamped to the ground.
* @property {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The global ellipsoid used for geographical calculations.
@@ -3553,17 +3552,14 @@ function load(dataSource, entityCollection, data, options) {
* @typedef {object} KmlDataSource.ConstructorOptions
*
* Options for constructing a new KmlDataSource, or calling the static `load` method.
- *
* @property {Camera} [camera] The camera that is used for viewRefreshModes and sending camera properties to network links.
* @property {HTMLCanvasElement} [canvas] The canvas that is used for sending viewer properties to network links.
* @property {Credit|string} [credit] A credit for the data source, which is displayed on the canvas.
- *
* @property {string} [sourceUri] Overrides the url to use for resolving relative links and other KML network features.
* @property {boolean} [clampToGround=false] true if we want the geometry features (Polygons, LineStrings and LinearRings) clamped to the ground.
* @property {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The global ellipsoid used for geographical calculations.
* @property {Element|string} [screenOverlayContainer] A container for ScreenOverlay images.
-
-*/
+ */
/**
* A {@link DataSource} which processes Keyhole Markup Language 2.2 (KML).
@@ -3579,17 +3575,12 @@ function load(dataSource, entityCollection, data, options) {
* is exposed via an instance of {@link KmlFeatureData}, which is added to each {@link Entity}
* under the kml
property.
*
- *
* @alias KmlDataSource
- * @constructor
- *
+ * @class
* @param {KmlDataSource.ConstructorOptions} [options] Object describing initialization options
- *
* @see {@link http://www.opengeospatial.org/standards/kml/|Open Geospatial Consortium KML Standard}
* @see {@link https://developers.google.com/kml/|Google KML Documentation}
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=KML.html|Cesium Sandcastle KML Demo}
- *
* @example
* const viewer = new Cesium.Viewer('cesiumContainer');
* viewer.dataSources.add(Cesium.KmlDataSource.load('../../SampleData/facilities.kmz',
@@ -3621,7 +3612,6 @@ function KmlDataSource(options) {
/**
* The current size of this Canvas will be used to populate the Link parameters
* for client height and width.
- *
* @type {HTMLCanvasElement | undefined}
*/
this.canvas = canvas;
@@ -3631,7 +3621,6 @@ function KmlDataSource(options) {
* populate various camera parameters when making network requests.
* Camera movement will determine when to trigger NetworkLink refresh if
* viewRefreshMode
is onStop
.
- *
* @type {Camera | undefined}
*/
this.camera = camera;
@@ -3666,10 +3655,8 @@ function KmlDataSource(options) {
/**
* Creates a Promise to a new instance loaded with the provided KML data.
- *
* @param {Resource|string|Document|Blob} data A url, parsed KML document, or Blob containing binary KMZ data or a parsed KML document.
* @param {KmlDataSource.ConstructorOptions} [options] An object specifying configuration options
- *
* @returns {Promise} A promise that will resolve to a new KmlDataSource instance once the KML is loaded.
*/
KmlDataSource.load = function (data, options) {
@@ -3794,7 +3781,6 @@ Object.defineProperties(KmlDataSource.prototype, {
/**
* Gets or sets the clustering options for this data source. This object can be shared between multiple data sources.
- *
* @memberof KmlDataSource.prototype
* @type {EntityCluster}
*/
@@ -3835,10 +3821,8 @@ Object.defineProperties(KmlDataSource.prototype, {
/**
* Asynchronously loads the provided KML data, replacing any existing data.
- *
* @param {Resource|string|Document|Blob} data A url, parsed KML document, or Blob containing binary KMZ data or a parsed KML document.
* @param {KmlDataSource.LoadOptions} [options] An object specifying configuration options
- *
* @returns {Promise} A promise that will resolve to this instances once the KML is loaded.
*/
KmlDataSource.prototype.load = function (data, options) {
@@ -4111,7 +4095,6 @@ const entitiesToIgnore = new AssociativeArray();
/**
* Updates any NetworkLink that require updating.
- *
* @param {JulianDate} time The simulation time.
* @returns {boolean} True if this data source is ready to be displayed at the provided time, false otherwise.
*/
@@ -4248,7 +4231,7 @@ KmlDataSource.prototype.update = function (time) {
/**
* Contains KML Feature data loaded into the Entity.kml
property by {@link KmlDataSource}.
* @alias KmlFeatureData
- * @constructor
+ * @class
*/
function KmlFeatureData() {
/**
diff --git a/packages/engine/Source/DataSources/KmlLookAt.js b/packages/engine/Source/DataSources/KmlLookAt.js
index acd94ec56614..53e53960c069 100644
--- a/packages/engine/Source/DataSources/KmlLookAt.js
+++ b/packages/engine/Source/DataSources/KmlLookAt.js
@@ -1,7 +1,6 @@
/**
* @alias KmlLookAt
- * @constructor
- *
+ * @class
* @param {Cartesian3} position camera position
* @param {HeadingPitchRange} headingPitchRange camera orientation
*/
diff --git a/packages/engine/Source/DataSources/KmlTour.js b/packages/engine/Source/DataSources/KmlTour.js
index 80aa7ad4678e..0de7feee8da8 100644
--- a/packages/engine/Source/DataSources/KmlTour.js
+++ b/packages/engine/Source/DataSources/KmlTour.js
@@ -3,17 +3,13 @@ import Event from "../Core/Event.js";
/**
* Describes a KmlTour, which uses KmlTourFlyTo, and KmlTourWait to
* guide the camera to a specified destinations on given time intervals.
- *
* @alias KmlTour
- * @constructor
- *
+ * @class
* @param {string} name name parsed from KML
* @param {string} id id parsed from KML
* @param {Array} playlist array with KmlTourFlyTos and KmlTourWaits
- *
* @see KmlTourFlyTo
* @see KmlTourWait
- *
* @demo {@link https://sandcastle.cesium.com/?src=KML%20Tours.html|KML Tours}
*/
function KmlTour(name, id) {
@@ -74,7 +70,6 @@ function KmlTour(name, id) {
/**
* Add entry to this tour playlist.
- *
* @param {KmlTourFlyTo|KmlTourWait} entry an entry to add to the playlist.
*/
KmlTour.prototype.addPlaylistEntry = function (entry) {
@@ -83,7 +78,6 @@ KmlTour.prototype.addPlaylistEntry = function (entry) {
/**
* Play this tour.
- *
* @param {CesiumWidget} widget The widget.
* @param {object} [cameraOptions] these options will be merged with {@link Camera#flyTo}
* options for FlyTo playlist entries.
diff --git a/packages/engine/Source/DataSources/KmlTourFlyTo.js b/packages/engine/Source/DataSources/KmlTourFlyTo.js
index 405279eb5668..766163c4ae61 100644
--- a/packages/engine/Source/DataSources/KmlTourFlyTo.js
+++ b/packages/engine/Source/DataSources/KmlTourFlyTo.js
@@ -5,14 +5,11 @@ import EasingFunction from "../Core/EasingFunction.js";
/**
* Transitions the KmlTour to the next destination. This transition is facilitated
* using a specified flyToMode over a given number of seconds.
- *
* @alias KmlTourFlyTo
- * @constructor
- *
+ * @class
* @param {number} duration entry duration
* @param {string} flyToMode KML fly to mode: bounce, smooth, etc
* @param {KmlCamera|KmlLookAt} view KmlCamera or KmlLookAt
- *
* @see KmlTour
* @see KmlTourWait
*/
@@ -29,7 +26,6 @@ function KmlTourFlyTo(duration, flyToMode, view) {
/**
* Play this playlist entry
- *
* @param {KmlTourFlyTo.DoneCallback} done function which will be called when playback ends
* @param {Camera} camera Cesium camera
* @param {object} [cameraOptions] which will be merged with camera flyTo options. See {@link Camera#flyTo}
@@ -69,7 +65,6 @@ KmlTourFlyTo.prototype.stop = function () {
/**
* Returns options for {@link Camera#flyTo} or {@link Camera#flyToBoundingSphere}
* depends on this.view type.
- *
* @param {object} cameraOptions options to merge with generated. See {@link Camera#flyTo}
* @returns {object} {@link Camera#flyTo} or {@link Camera#flyToBoundingSphere} options
*/
@@ -102,7 +97,6 @@ KmlTourFlyTo.prototype.getCameraOptions = function (cameraOptions) {
/**
* A function that will be executed when the flight completes.
* @callback KmlTourFlyTo.DoneCallback
- *
* @param {boolean} terminated true if {@link KmlTourFlyTo#stop} was
* called before entry done playback.
*/
diff --git a/packages/engine/Source/DataSources/KmlTourWait.js b/packages/engine/Source/DataSources/KmlTourWait.js
index d59da1e50557..5d7151cdba22 100644
--- a/packages/engine/Source/DataSources/KmlTourWait.js
+++ b/packages/engine/Source/DataSources/KmlTourWait.js
@@ -1,12 +1,9 @@
import defined from "../Core/defined.js";
/**
* Pauses the KmlTour for a given number of seconds.
- *
* @alias KmlTourWait
- * @constructor
- *
+ * @class
* @param {number} duration entry duration
- *
* @see KmlTour
* @see KmlTourFlyTo
*/
@@ -20,7 +17,6 @@ function KmlTourWait(duration) {
/**
* Play this playlist entry
- *
* @param {KmlTourWait.DoneCallback} done function which will be called when playback ends
*/
KmlTourWait.prototype.play = function (done) {
@@ -44,7 +40,6 @@ KmlTourWait.prototype.stop = function () {
/**
* A function which will be called when playback ends.
- *
* @callback KmlTourWait.DoneCallback
* @param {boolean} terminated true if {@link KmlTourWait#stop} was
* called before entry done playback.
diff --git a/packages/engine/Source/DataSources/LabelGraphics.js b/packages/engine/Source/DataSources/LabelGraphics.js
index 0622b72bb66c..85a7c8343a0d 100644
--- a/packages/engine/Source/DataSources/LabelGraphics.js
+++ b/packages/engine/Source/DataSources/LabelGraphics.js
@@ -8,7 +8,6 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @typedef {object} LabelGraphics.ConstructorOptions
*
* Initialization options for the LabelGraphics constructor
- *
* @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the label.
* @property {Property | string} [text] A Property specifying the text. Explicit newlines '\n' are supported.
* @property {Property | string} [font='30px sans-serif'] A Property specifying the CSS font.
@@ -40,12 +39,9 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* Example labels
*
*
- *
* @alias LabelGraphics
- * @constructor
- *
+ * @class
* @param {LabelGraphics.ConstructorOptions} [options] Object describing initialization options
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Labels.html|Cesium Sandcastle Labels Demo}
*/
function LabelGraphics(options) {
@@ -100,7 +96,6 @@ Object.defineProperties(LabelGraphics.prototype, {
/**
* Gets the event that is raised whenever a property or sub-property is changed or modified.
* @memberof LabelGraphics.prototype
- *
* @type {Event}
* @readonly
*/
@@ -327,7 +322,6 @@ Object.defineProperties(LabelGraphics.prototype, {
/**
* Duplicates this instance.
- *
* @param {LabelGraphics} [result] The object onto which to store the result.
* @returns {LabelGraphics} The modified result parameter or a new instance if one was not provided.
*/
@@ -362,7 +356,6 @@ LabelGraphics.prototype.clone = function (result) {
/**
* Assigns each unassigned property on this object to the value
* of the same property on the provided source object.
- *
* @param {LabelGraphics} source The object to be merged into this object.
*/
LabelGraphics.prototype.merge = function (source) {
diff --git a/packages/engine/Source/DataSources/LabelVisualizer.js b/packages/engine/Source/DataSources/LabelVisualizer.js
index e88281164f29..0760d9d081ca 100644
--- a/packages/engine/Source/DataSources/LabelVisualizer.js
+++ b/packages/engine/Source/DataSources/LabelVisualizer.js
@@ -52,8 +52,7 @@ function EntityData(entity) {
* A {@link Visualizer} which maps the {@link LabelGraphics} instance
* in {@link Entity#label} to a {@link Label}.
* @alias LabelVisualizer
- * @constructor
- *
+ * @class
* @param {EntityCluster} entityCluster The entity cluster to manage the collection of billboards and optionally cluster with other entities.
* @param {EntityCollection} entityCollection The entityCollection to visualize.
*/
@@ -82,7 +81,6 @@ function LabelVisualizer(entityCluster, entityCollection) {
/**
* Updates the primitives created by this visualizer to match their
* Entity counterpart at the given time.
- *
* @param {JulianDate} time The time to update to.
* @returns {boolean} This function always returns true.
*/
@@ -258,7 +256,6 @@ LabelVisualizer.prototype.update = function (time) {
/**
* Computes a bounding sphere which encloses the visualization produced for the specified entity.
* The bounding sphere is in the fixed frame of the scene's globe.
- *
* @param {Entity} entity The entity whose bounding sphere to compute.
* @param {BoundingSphere} result The bounding sphere onto which to store the result.
* @returns {BoundingSphereState} BoundingSphereState.DONE if the result contains the bounding sphere,
@@ -292,7 +289,6 @@ LabelVisualizer.prototype.getBoundingSphere = function (entity, result) {
/**
* Returns true if this object was destroyed; otherwise, false.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
*/
LabelVisualizer.prototype.isDestroyed = function () {
diff --git a/packages/engine/Source/DataSources/MaterialProperty.js b/packages/engine/Source/DataSources/MaterialProperty.js
index c6a957f79e77..5555b340cef0 100644
--- a/packages/engine/Source/DataSources/MaterialProperty.js
+++ b/packages/engine/Source/DataSources/MaterialProperty.js
@@ -6,11 +6,9 @@ import Material from "../Scene/Material.js";
/**
* The interface for all {@link Property} objects that represent {@link Material} uniforms.
* This type defines an interface and cannot be instantiated directly.
- *
* @alias MaterialProperty
- * @constructor
+ * @class
* @abstract
- *
* @see ColorMaterialProperty
* @see CompositeMaterialProperty
* @see GridMaterialProperty
@@ -28,7 +26,6 @@ Object.defineProperties(MaterialProperty.prototype, {
* Gets a value indicating if this property is constant. A property is considered
* constant if getValue always returns the same result for the current definition.
* @memberof MaterialProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -40,7 +37,6 @@ Object.defineProperties(MaterialProperty.prototype, {
* The definition is considered to have changed if a call to getValue would return
* a different result for the same time.
* @memberof MaterialProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -52,7 +48,6 @@ Object.defineProperties(MaterialProperty.prototype, {
/**
* Gets the {@link Material} type at the provided time.
* @function
- *
* @param {JulianDate} time The time for which to retrieve the type.
* @returns {string} The type of material.
*/
@@ -61,7 +56,6 @@ MaterialProperty.prototype.getType = DeveloperError.throwInstantiationError;
/**
* Gets the value of the property at the provided time.
* @function
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -72,13 +66,15 @@ MaterialProperty.prototype.getValue = DeveloperError.throwInstantiationError;
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
* @function
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
MaterialProperty.prototype.equals = DeveloperError.throwInstantiationError;
/**
+ * @param time
+ * @param materialProperty
+ * @param material
* @private
*/
MaterialProperty.getValue = function (time, materialProperty, material) {
diff --git a/packages/engine/Source/DataSources/ModelGraphics.js b/packages/engine/Source/DataSources/ModelGraphics.js
index 2c4f33792469..ff7dd47bcd6b 100644
--- a/packages/engine/Source/DataSources/ModelGraphics.js
+++ b/packages/engine/Source/DataSources/ModelGraphics.js
@@ -22,7 +22,6 @@ function createArticulationStagePropertyBag(value) {
* @typedef {object} ModelGraphics.ConstructorOptions
*
* Initialization options for the ModelGraphics constructor
- *
* @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the model.
* @property {Property | string | Resource} [uri] A string or Resource Property specifying the URI of the glTF asset.
* @property {Property | number} [scale=1.0] A numeric Property specifying a uniform linear scale.
@@ -54,12 +53,9 @@ function createArticulationStagePropertyBag(value) {
* Cesium includes support for glTF geometry, materials, animations, and skinning.
* Cameras and lights are not currently supported.
*
- *
* @alias ModelGraphics
- * @constructor
- *
+ * @class
* @param {ModelGraphics.ConstructorOptions} [options] Object describing initialization options
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=3D%20Models.html|Cesium Sandcastle 3D Models Demo}
*/
function ModelGraphics(options) {
@@ -322,7 +318,6 @@ Object.defineProperties(ModelGraphics.prototype, {
/**
* Duplicates this instance.
- *
* @param {ModelGraphics} [result] The object onto which to store the result.
* @returns {ModelGraphics} The modified result parameter or a new instance if one was not provided.
*/
@@ -357,7 +352,6 @@ ModelGraphics.prototype.clone = function (result) {
/**
* Assigns each unassigned property on this object to the value
* of the same property on the provided source object.
- *
* @param {ModelGraphics} source The object to be merged into this object.
*/
ModelGraphics.prototype.merge = function (source) {
diff --git a/packages/engine/Source/DataSources/ModelVisualizer.js b/packages/engine/Source/DataSources/ModelVisualizer.js
index 1e2b7a0a2c6c..e54f46c4d359 100644
--- a/packages/engine/Source/DataSources/ModelVisualizer.js
+++ b/packages/engine/Source/DataSources/ModelVisualizer.js
@@ -45,8 +45,7 @@ const scratchCartesian = new Cartesian3();
/**
* A {@link Visualizer} which maps {@link Entity#model} to a {@link Model}.
* @alias ModelVisualizer
- * @constructor
- *
+ * @class
* @param {Scene} scene The scene the primitives will be rendered in.
* @param {EntityCollection} entityCollection The entityCollection to visualize.
*/
@@ -119,7 +118,6 @@ async function createModelPrimitive(
/**
* Updates models created this visualizer to match their
* Entity counterpart at the given time.
- *
* @param {JulianDate} time The time to update to.
* @returns {boolean} This function always returns true.
*/
@@ -375,7 +373,6 @@ ModelVisualizer.prototype.update = function (time) {
/**
* Returns true if this object was destroyed; otherwise, false.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
*/
ModelVisualizer.prototype.isDestroyed = function () {
@@ -404,7 +401,6 @@ const scratchCartographic = new Cartographic();
/**
* Computes a bounding sphere which encloses the visualization produced for the specified entity.
* The bounding sphere is in the fixed frame of the scene's globe.
- *
* @param {Entity} entity The entity whose bounding sphere to compute.
* @param {BoundingSphere} result The bounding sphere onto which to store the result.
* @returns {BoundingSphereState} BoundingSphereState.DONE if the result contains the bounding sphere,
@@ -474,6 +470,10 @@ ModelVisualizer.prototype.getBoundingSphere = function (entity, result) {
};
/**
+ * @param entityCollection
+ * @param added
+ * @param removed
+ * @param changed
* @private
*/
ModelVisualizer.prototype._onCollectionChanged = function (
diff --git a/packages/engine/Source/DataSources/NodeTransformationProperty.js b/packages/engine/Source/DataSources/NodeTransformationProperty.js
index f6513cd05972..063678dc5902 100644
--- a/packages/engine/Source/DataSources/NodeTransformationProperty.js
+++ b/packages/engine/Source/DataSources/NodeTransformationProperty.js
@@ -10,12 +10,11 @@ const defaultNodeTransformation = new TranslationRotationScale();
/**
* A {@link Property} that produces {@link TranslationRotationScale} data.
* @alias NodeTransformationProperty
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {Property|Cartesian3} [options.translation=Cartesian3.ZERO] A {@link Cartesian3} Property specifying the (x, y, z) translation to apply to the node.
- * @param {Property|Quaternion} [options.rotation=Quaternion.IDENTITY] A {@link Quaternion} Property specifying the (x, y, z, w) rotation to apply to the node.
- * @param {Property|Cartesian3} [options.scale=new Cartesian3(1.0, 1.0, 1.0)] A {@link Cartesian3} Property specifying the (x, y, z) scaling to apply to the node.
+ * @param {Property|Cartesian3} [options.translation] A {@link Cartesian3} Property specifying the (x, y, z) translation to apply to the node.
+ * @param {Property|Quaternion} [options.rotation] A {@link Quaternion} Property specifying the (x, y, z, w) rotation to apply to the node.
+ * @param {Property|Cartesian3} [options.scale] A {@link Cartesian3} Property specifying the (x, y, z) scaling to apply to the node.
*/
function NodeTransformationProperty(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -38,7 +37,6 @@ Object.defineProperties(NodeTransformationProperty.prototype, {
* Gets a value indicating if this property is constant. A property is considered
* constant if getValue always returns the same result for the current definition.
* @memberof NodeTransformationProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -57,7 +55,6 @@ Object.defineProperties(NodeTransformationProperty.prototype, {
* The definition is considered to have changed if a call to getValue would return
* a different result for the same time.
* @memberof NodeTransformationProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -94,7 +91,6 @@ Object.defineProperties(NodeTransformationProperty.prototype, {
/**
* Gets the value of the property at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {TranslationRotationScale} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {TranslationRotationScale} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -128,7 +124,6 @@ NodeTransformationProperty.prototype.getValue = function (time, result) {
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/PathGraphics.js b/packages/engine/Source/DataSources/PathGraphics.js
index d914bb4424e6..f14931c4b816 100644
--- a/packages/engine/Source/DataSources/PathGraphics.js
+++ b/packages/engine/Source/DataSources/PathGraphics.js
@@ -9,7 +9,6 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @typedef {object} PathGraphics.ConstructorOptions
*
* Initialization options for the PathGraphics constructor
- *
* @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the path.
* @property {Property | number} [leadTime] A Property specifying the number of seconds in front the object to show.
* @property {Property | number} [trailTime] A Property specifying the number of seconds behind of the object to show.
@@ -21,10 +20,8 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
/**
* Describes a polyline defined as the path made by an {@link Entity} as it moves over time.
- *
* @alias PathGraphics
- * @constructor
- *
+ * @class
* @param {PathGraphics.ConstructorOptions} [options] Object describing initialization options
*/
function PathGraphics(options) {
@@ -118,7 +115,6 @@ Object.defineProperties(PathGraphics.prototype, {
/**
* Duplicates this instance.
- *
* @param {PathGraphics} [result] The object onto which to store the result.
* @returns {PathGraphics} The modified result parameter or a new instance if one was not provided.
*/
@@ -139,7 +135,6 @@ PathGraphics.prototype.clone = function (result) {
/**
* Assigns each unassigned property on this object to the value
* of the same property on the provided source object.
- *
* @param {PathGraphics} source The object to be merged into this object.
*/
PathGraphics.prototype.merge = function (source) {
diff --git a/packages/engine/Source/DataSources/PathVisualizer.js b/packages/engine/Source/DataSources/PathVisualizer.js
index 47aac6026255..63a287573911 100644
--- a/packages/engine/Source/DataSources/PathVisualizer.js
+++ b/packages/engine/Source/DataSources/PathVisualizer.js
@@ -579,8 +579,7 @@ PolylineUpdater.prototype.destroy = function () {
/**
* A {@link Visualizer} which maps {@link Entity#path} to a {@link Polyline}.
* @alias PathVisualizer
- * @constructor
- *
+ * @class
* @param {Scene} scene The scene the primitives will be rendered in.
* @param {EntityCollection} entityCollection The entityCollection to visualize.
*/
@@ -610,7 +609,6 @@ function PathVisualizer(scene, entityCollection) {
/**
* Updates all of the primitives created by this visualizer to match their
* Entity counterpart at the given time.
- *
* @param {JulianDate} time The time to update to.
* @returns {boolean} This function always returns true.
*/
@@ -681,7 +679,6 @@ PathVisualizer.prototype.update = function (time) {
/**
* Returns true if this object was destroyed; otherwise, false.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
*/
PathVisualizer.prototype.isDestroyed = function () {
diff --git a/packages/engine/Source/DataSources/PlaneGeometryUpdater.js b/packages/engine/Source/DataSources/PlaneGeometryUpdater.js
index b700e57663ab..668449acb9c9 100644
--- a/packages/engine/Source/DataSources/PlaneGeometryUpdater.js
+++ b/packages/engine/Source/DataSources/PlaneGeometryUpdater.js
@@ -34,8 +34,7 @@ function PlaneGeometryOptions(entity) {
* A {@link GeometryUpdater} for planes.
* Clients do not normally create this class directly, but instead rely on {@link DataSourceDisplay}.
* @alias PlaneGeometryUpdater
- * @constructor
- *
+ * @class
* @param {Entity} entity The entity containing the geometry to be visualized.
* @param {Scene} scene The scene where visualization is taking place.
*/
@@ -58,11 +57,9 @@ if (defined(Object.create)) {
/**
* Creates the geometry instance which represents the fill of the geometry.
- *
* @param {JulianDate} time The time to use when retrieving initial attribute values.
* @returns {GeometryInstance} The geometry instance representing the filled portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent a filled geometry.
+ * @throws {DeveloperError} This instance does not represent a filled geometry.
*/
PlaneGeometryUpdater.prototype.createFillGeometryInstance = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -151,11 +148,9 @@ PlaneGeometryUpdater.prototype.createFillGeometryInstance = function (time) {
/**
* Creates the geometry instance which represents the outline of the geometry.
- *
* @param {JulianDate} time The time to use when retrieving initial attribute values.
* @returns {GeometryInstance} The geometry instance representing the outline portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent an outlined geometry.
+ * @throws {DeveloperError} This instance does not represent an outlined geometry.
*/
PlaneGeometryUpdater.prototype.createOutlineGeometryInstance = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -264,6 +259,9 @@ PlaneGeometryUpdater.prototype._setStaticOptions = function (entity, plane) {
PlaneGeometryUpdater.DynamicGeometryUpdater = DynamicPlaneGeometryUpdater;
/**
+ * @param geometryUpdater
+ * @param primitives
+ * @param groundPrimitives
* @private
*/
function DynamicPlaneGeometryUpdater(
diff --git a/packages/engine/Source/DataSources/PlaneGraphics.js b/packages/engine/Source/DataSources/PlaneGraphics.js
index 519ff7d449f1..4828fa36a9dc 100644
--- a/packages/engine/Source/DataSources/PlaneGraphics.js
+++ b/packages/engine/Source/DataSources/PlaneGraphics.js
@@ -9,7 +9,6 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @typedef {object} PlaneGraphics.ConstructorOptions
*
* Initialization options for the PlaneGraphics constructor
- *
* @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the plane.
* @property {Property | Plane} [plane] A {@link Plane} Property specifying the normal and distance for the plane.
* @property {Property | Cartesian2} [dimensions] A {@link Cartesian2} Property specifying the width and height of the plane.
@@ -24,12 +23,9 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
/**
* Describes a plane. The center position and orientation are determined by the containing {@link Entity}.
- *
* @alias PlaneGraphics
- * @constructor
- *
+ * @class
* @param {PlaneGraphics.ConstructorOptions} [options] Object describing initialization options
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Plane.html|Cesium Sandcastle Plane Demo}
*/
function PlaneGraphics(options) {
@@ -81,7 +77,6 @@ Object.defineProperties(PlaneGraphics.prototype, {
/**
* Gets or sets the {@link Plane} Property specifying the normal and distance of the plane.
- *
* @memberof PlaneGraphics.prototype
* @type {Property|undefined}
*/
@@ -89,7 +84,6 @@ Object.defineProperties(PlaneGraphics.prototype, {
/**
* Gets or sets the {@link Cartesian2} Property specifying the width and height of the plane.
- *
* @memberof PlaneGraphics.prototype
* @type {Property|undefined}
*/
@@ -159,7 +153,6 @@ Object.defineProperties(PlaneGraphics.prototype, {
/**
* Duplicates this instance.
- *
* @param {PlaneGraphics} [result] The object onto which to store the result.
* @returns {PlaneGraphics} The modified result parameter or a new instance if one was not provided.
*/
@@ -183,7 +176,6 @@ PlaneGraphics.prototype.clone = function (result) {
/**
* Assigns each unassigned property on this object to the value
* of the same property on the provided source object.
- *
* @param {PlaneGraphics} source The object to be merged into this object.
*/
PlaneGraphics.prototype.merge = function (source) {
diff --git a/packages/engine/Source/DataSources/PointGraphics.js b/packages/engine/Source/DataSources/PointGraphics.js
index 6f1cbba104eb..aa2df1649da3 100644
--- a/packages/engine/Source/DataSources/PointGraphics.js
+++ b/packages/engine/Source/DataSources/PointGraphics.js
@@ -8,7 +8,6 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @typedef {object} PointGraphics.ConstructorOptions
*
* Initialization options for the PointGraphics constructor
- *
* @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the point.
* @property {Property | number} [pixelSize=1] A numeric Property specifying the size in pixels.
* @property {Property | HeightReference} [heightReference=HeightReference.NONE] A Property specifying what the height is relative to.
@@ -23,10 +22,8 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
/**
* Describes a graphical point located at the position of the containing {@link Entity}.
- *
* @alias PointGraphics
- * @constructor
- *
+ * @class
* @param {PointGraphics.ConstructorOptions} [options] Object describing initialization options
*/
function PointGraphics(options) {
@@ -59,7 +56,6 @@ Object.defineProperties(PointGraphics.prototype, {
/**
* Gets the event that is raised whenever a property or sub-property is changed or modified.
* @memberof PointGraphics.prototype
- *
* @type {Event}
* @readonly
*/
@@ -158,7 +154,6 @@ Object.defineProperties(PointGraphics.prototype, {
/**
* Duplicates this instance.
- *
* @param {PointGraphics} [result] The object onto which to store the result.
* @returns {PointGraphics} The modified result parameter or a new instance if one was not provided.
*/
@@ -182,7 +177,6 @@ PointGraphics.prototype.clone = function (result) {
/**
* Assigns each unassigned property on this object to the value
* of the same property on the provided source object.
- *
* @param {PointGraphics} source The object to be merged into this object.
*/
PointGraphics.prototype.merge = function (source) {
diff --git a/packages/engine/Source/DataSources/PointVisualizer.js b/packages/engine/Source/DataSources/PointVisualizer.js
index 2210646daa9a..6b0041f806e4 100644
--- a/packages/engine/Source/DataSources/PointVisualizer.js
+++ b/packages/engine/Source/DataSources/PointVisualizer.js
@@ -37,8 +37,7 @@ function EntityData(entity) {
/**
* A {@link Visualizer} which maps {@link Entity#point} to a {@link PointPrimitive}.
* @alias PointVisualizer
- * @constructor
- *
+ * @class
* @param {EntityCluster} entityCluster The entity cluster to manage the collection of billboards and optionally cluster with other entities.
* @param {EntityCollection} entityCollection The entityCollection to visualize.
*/
@@ -66,7 +65,6 @@ function PointVisualizer(entityCluster, entityCollection) {
/**
* Updates the primitives created by this visualizer to match their
* Entity counterpart at the given time.
- *
* @param {JulianDate} time The time to update to.
* @returns {boolean} This function always returns true.
*/
@@ -304,7 +302,6 @@ PointVisualizer.prototype.update = function (time) {
/**
* Computes a bounding sphere which encloses the visualization produced for the specified entity.
* The bounding sphere is in the fixed frame of the scene's globe.
- *
* @param {Entity} entity The entity whose bounding sphere to compute.
* @param {BoundingSphere} result The bounding sphere onto which to store the result.
* @returns {BoundingSphereState} BoundingSphereState.DONE if the result contains the bounding sphere,
@@ -349,7 +346,6 @@ PointVisualizer.prototype.getBoundingSphere = function (entity, result) {
/**
* Returns true if this object was destroyed; otherwise, false.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
*/
PointVisualizer.prototype.isDestroyed = function () {
diff --git a/packages/engine/Source/DataSources/PolygonGeometryUpdater.js b/packages/engine/Source/DataSources/PolygonGeometryUpdater.js
index f764fb175b9a..21d7b9dbde1d 100644
--- a/packages/engine/Source/DataSources/PolygonGeometryUpdater.js
+++ b/packages/engine/Source/DataSources/PolygonGeometryUpdater.js
@@ -60,8 +60,7 @@ function PolygonGeometryOptions(entity) {
* A {@link GeometryUpdater} for polygons.
* Clients do not normally create this class directly, but instead rely on {@link DataSourceDisplay}.
* @alias PolygonGeometryUpdater
- * @constructor
- *
+ * @class
* @param {Entity} entity The entity containing the geometry to be visualized.
* @param {Scene} scene The scene where visualization is taking place.
*/
@@ -86,11 +85,9 @@ if (defined(Object.create)) {
/**
* Creates the geometry instance which represents the fill of the geometry.
- *
* @param {JulianDate} time The time to use when retrieving initial attribute values.
* @returns {GeometryInstance} The geometry instance representing the filled portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent a filled geometry.
+ * @throws {DeveloperError} This instance does not represent a filled geometry.
*/
PolygonGeometryUpdater.prototype.createFillGeometryInstance = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -161,11 +158,9 @@ PolygonGeometryUpdater.prototype.createFillGeometryInstance = function (time) {
/**
* Creates the geometry instance which represents the outline of the geometry.
- *
* @param {JulianDate} time The time to use when retrieving initial attribute values.
* @returns {GeometryInstance} The geometry instance representing the outline portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent an outlined geometry.
+ * @throws {DeveloperError} This instance does not represent an outlined geometry.
*/
PolygonGeometryUpdater.prototype.createOutlineGeometryInstance = function (
time
@@ -446,6 +441,9 @@ PolygonGeometryUpdater.prototype._getIsClosed = function (options) {
PolygonGeometryUpdater.DynamicGeometryUpdater = DyanmicPolygonGeometryUpdater;
/**
+ * @param geometryUpdater
+ * @param primitives
+ * @param groundPrimitives
* @private
*/
function DyanmicPolygonGeometryUpdater(
diff --git a/packages/engine/Source/DataSources/PolygonGraphics.js b/packages/engine/Source/DataSources/PolygonGraphics.js
index 8e45da5edd5c..d3d603804222 100644
--- a/packages/engine/Source/DataSources/PolygonGraphics.js
+++ b/packages/engine/Source/DataSources/PolygonGraphics.js
@@ -19,7 +19,6 @@ function createPolygonHierarchyProperty(value) {
* @typedef {object} PolygonGraphics.ConstructorOptions
*
* Initialization options for the PolygonGraphics constructor
- *
* @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the polygon.
* @property {Property | PolygonHierarchy | Cartesian3[]} [hierarchy] A Property specifying the {@link PolygonHierarchy}.
* @property {Property | number} [height=0] A numeric Property specifying the altitude of the polygon relative to the ellipsoid surface.
@@ -48,12 +47,9 @@ function createPolygonHierarchyProperty(value) {
* Describes a polygon defined by an hierarchy of linear rings which make up the outer shape and any nested holes.
* The polygon conforms to the curvature of the globe and can be placed on the surface or
* at altitude and can optionally be extruded into a volume.
- *
* @alias PolygonGraphics
- * @constructor
- *
+ * @class
* @param {PolygonGraphics.ConstructorOptions} [options] Object describing initialization options
- *
* @see Entity
* @demo {@link https://sandcastle.cesium.com/index.html?src=Polygon.html|Cesium Sandcastle Polygon Demo}
*/
@@ -111,7 +107,6 @@ Object.defineProperties(PolygonGraphics.prototype, {
/**
* Gets the event that is raised whenever a property or sub-property is changed or modified.
* @memberof PolygonGraphics.prototype
- *
* @type {Event}
* @readonly
*/
@@ -307,7 +302,6 @@ Object.defineProperties(PolygonGraphics.prototype, {
/**
* Duplicates this instance.
- *
* @param {PolygonGraphics} [result] The object onto which to store the result.
* @returns {PolygonGraphics} The modified result parameter or a new instance if one was not provided.
*/
@@ -343,7 +337,6 @@ PolygonGraphics.prototype.clone = function (result) {
/**
* Assigns each unassigned property on this object to the value
* of the same property on the provided source object.
- *
* @param {PolygonGraphics} source The object to be merged into this object.
*/
PolygonGraphics.prototype.merge = function (source) {
diff --git a/packages/engine/Source/DataSources/PolylineArrowMaterialProperty.js b/packages/engine/Source/DataSources/PolylineArrowMaterialProperty.js
index 78ad0b87c94d..b0fbd943dd7c 100644
--- a/packages/engine/Source/DataSources/PolylineArrowMaterialProperty.js
+++ b/packages/engine/Source/DataSources/PolylineArrowMaterialProperty.js
@@ -6,11 +6,9 @@ import Property from "./Property.js";
/**
* A {@link MaterialProperty} that maps to PolylineArrow {@link Material} uniforms.
- *
- * @param {Property|Color} [color=Color.WHITE] The {@link Color} Property to be used.
- *
+ * @param {Property|Color} [color] The {@link Color} Property to be used.
* @alias PolylineArrowMaterialProperty
- * @constructor
+ * @class
*/
function PolylineArrowMaterialProperty(color) {
this._definitionChanged = new Event();
@@ -25,7 +23,6 @@ Object.defineProperties(PolylineArrowMaterialProperty.prototype, {
* Gets a value indicating if this property is constant. A property is considered
* constant if getValue always returns the same result for the current definition.
* @memberof PolylineArrowMaterialProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -39,7 +36,6 @@ Object.defineProperties(PolylineArrowMaterialProperty.prototype, {
* The definition is considered to have changed if a call to getValue would return
* a different result for the same time.
* @memberof PolylineArrowMaterialProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -59,7 +55,6 @@ Object.defineProperties(PolylineArrowMaterialProperty.prototype, {
/**
* Gets the {@link Material} type at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the type.
* @returns {string} The type of material.
*/
@@ -69,7 +64,6 @@ PolylineArrowMaterialProperty.prototype.getType = function (time) {
/**
* Gets the value of the property at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -90,7 +84,6 @@ PolylineArrowMaterialProperty.prototype.getValue = function (time, result) {
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/PolylineDashMaterialProperty.js b/packages/engine/Source/DataSources/PolylineDashMaterialProperty.js
index 1ff9c6675f99..a5f3a6cc4a0c 100644
--- a/packages/engine/Source/DataSources/PolylineDashMaterialProperty.js
+++ b/packages/engine/Source/DataSources/PolylineDashMaterialProperty.js
@@ -13,13 +13,12 @@ const defaultDashPattern = 255.0;
/**
* A {@link MaterialProperty} that maps to polyline dash {@link Material} uniforms.
* @alias PolylineDashMaterialProperty
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {Property|Color} [options.color=Color.WHITE] A Property specifying the {@link Color} of the line.
- * @param {Property|Color} [options.gapColor=Color.TRANSPARENT] A Property specifying the {@link Color} of the gaps in the line.
- * @param {Property|number} [options.dashLength=16.0] A numeric Property specifying the length of the dash pattern in pixels.
- * @param {Property|number} [options.dashPattern=255.0] A numeric Property specifying a 16 bit pattern for the dash
+ * @param {Property|Color} [options.color] A Property specifying the {@link Color} of the line.
+ * @param {Property|Color} [options.gapColor] A Property specifying the {@link Color} of the gaps in the line.
+ * @param {Property|number} [options.dashLength] A numeric Property specifying the length of the dash pattern in pixels.
+ * @param {Property|number} [options.dashPattern] A numeric Property specifying a 16 bit pattern for the dash
*/
function PolylineDashMaterialProperty(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -102,7 +101,6 @@ Object.defineProperties(PolylineDashMaterialProperty.prototype, {
/**
* Gets the {@link Material} type at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the type.
* @returns {string} The type of material.
*/
@@ -112,7 +110,6 @@ PolylineDashMaterialProperty.prototype.getType = function (time) {
/**
* Gets the value of the property at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -151,7 +148,6 @@ PolylineDashMaterialProperty.prototype.getValue = function (time, result) {
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/PolylineGeometryUpdater.js b/packages/engine/Source/DataSources/PolylineGeometryUpdater.js
index 816bc85e047b..35349ed61370 100644
--- a/packages/engine/Source/DataSources/PolylineGeometryUpdater.js
+++ b/packages/engine/Source/DataSources/PolylineGeometryUpdater.js
@@ -63,8 +63,7 @@ function GroundGeometryOptions() {
* A {@link GeometryUpdater} for polylines.
* Clients do not normally create this class directly, but instead rely on {@link DataSourceDisplay}.
* @alias PolylineGeometryUpdater
- * @constructor
- *
+ * @class
* @param {Entity} entity The entity containing the geometry to be visualized.
* @param {Scene} scene The scene where visualization is taking place.
*/
@@ -119,7 +118,6 @@ Object.defineProperties(PolylineGeometryUpdater.prototype, {
/**
* Gets the entity associated with this geometry.
* @memberof PolylineGeometryUpdater.prototype
- *
* @type {Entity}
* @readonly
*/
@@ -131,7 +129,6 @@ Object.defineProperties(PolylineGeometryUpdater.prototype, {
/**
* Gets a value indicating if the geometry has a fill component.
* @memberof PolylineGeometryUpdater.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -143,7 +140,6 @@ Object.defineProperties(PolylineGeometryUpdater.prototype, {
/**
* Gets a value indicating if fill visibility varies with simulation time.
* @memberof PolylineGeometryUpdater.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -159,7 +155,6 @@ Object.defineProperties(PolylineGeometryUpdater.prototype, {
/**
* Gets the material property used to fill the geometry.
* @memberof PolylineGeometryUpdater.prototype
- *
* @type {MaterialProperty}
* @readonly
*/
@@ -171,7 +166,6 @@ Object.defineProperties(PolylineGeometryUpdater.prototype, {
/**
* Gets the material property used to fill the geometry when it fails the depth test.
* @memberof PolylineGeometryUpdater.prototype
- *
* @type {MaterialProperty}
* @readonly
*/
@@ -183,7 +177,6 @@ Object.defineProperties(PolylineGeometryUpdater.prototype, {
/**
* Gets a value indicating if the geometry has an outline component.
* @memberof PolylineGeometryUpdater.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -193,7 +186,6 @@ Object.defineProperties(PolylineGeometryUpdater.prototype, {
/**
* Gets a value indicating if outline visibility varies with simulation time.
* @memberof PolylineGeometryUpdater.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -203,7 +195,6 @@ Object.defineProperties(PolylineGeometryUpdater.prototype, {
/**
* Gets the {@link Color} property for the geometry outline.
* @memberof PolylineGeometryUpdater.prototype
- *
* @type {Property}
* @readonly
*/
@@ -214,7 +205,6 @@ Object.defineProperties(PolylineGeometryUpdater.prototype, {
* Gets the property specifying whether the geometry
* casts or receives shadows from light sources.
* @memberof PolylineGeometryUpdater.prototype
- *
* @type {Property}
* @readonly
*/
@@ -226,7 +216,6 @@ Object.defineProperties(PolylineGeometryUpdater.prototype, {
/**
* Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this geometry will be displayed.
* @memberof PolylineGeometryUpdater.prototype
- *
* @type {Property}
* @readonly
*/
@@ -238,7 +227,6 @@ Object.defineProperties(PolylineGeometryUpdater.prototype, {
/**
* Gets or sets the {@link ClassificationType} Property specifying if this geometry will classify terrain, 3D Tiles, or both when on the ground.
* @memberof PolylineGeometryUpdater.prototype
- *
* @type {Property}
* @readonly
*/
@@ -249,9 +237,7 @@ Object.defineProperties(PolylineGeometryUpdater.prototype, {
},
/**
* Gets a value indicating if the geometry is time-varying.
- *
* @memberof PolylineGeometryUpdater.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -264,7 +250,6 @@ Object.defineProperties(PolylineGeometryUpdater.prototype, {
* Gets a value indicating if the geometry is closed.
* This property is only valid for static geometry.
* @memberof PolylineGeometryUpdater.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -275,7 +260,6 @@ Object.defineProperties(PolylineGeometryUpdater.prototype, {
* Gets an event that is raised whenever the public properties
* of this updater change.
* @memberof PolylineGeometryUpdater.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -288,7 +272,6 @@ Object.defineProperties(PolylineGeometryUpdater.prototype, {
/**
* Gets a value indicating if the path of the line.
* @memberof PolylineGeometryUpdater.prototype
- *
* @type {ArcType}
* @readonly
*/
@@ -302,7 +285,6 @@ Object.defineProperties(PolylineGeometryUpdater.prototype, {
* Gets a value indicating if the geometry is clamped to the ground.
* Returns false if polylines on terrain is not supported.
* @memberof PolylineGeometryUpdater.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -327,7 +309,6 @@ Object.defineProperties(PolylineGeometryUpdater.prototype, {
/**
* Checks if the geometry is outlined at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve visibility.
* @returns {boolean} true if geometry is outlined at the provided time, false otherwise.
*/
@@ -337,7 +318,6 @@ PolylineGeometryUpdater.prototype.isOutlineVisible = function (time) {
/**
* Checks if the geometry is filled at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve visibility.
* @returns {boolean} true if geometry is filled at the provided time, false otherwise.
*/
@@ -352,11 +332,9 @@ PolylineGeometryUpdater.prototype.isFilled = function (time) {
/**
* Creates the geometry instance which represents the fill of the geometry.
- *
* @param {JulianDate} time The time to use when retrieving initial attribute values.
* @returns {GeometryInstance} The geometry instance representing the filled portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent a filled geometry.
+ * @throws {DeveloperError} This instance does not represent a filled geometry.
*/
PolylineGeometryUpdater.prototype.createFillGeometryInstance = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -440,11 +418,9 @@ PolylineGeometryUpdater.prototype.createFillGeometryInstance = function (time) {
/**
* Creates the geometry instance which represents the outline of the geometry.
- *
* @param {JulianDate} time The time to use when retrieving initial attribute values.
* @returns {GeometryInstance} The geometry instance representing the outline portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent an outlined geometry.
+ * @throws {DeveloperError} This instance does not represent an outlined geometry.
*/
PolylineGeometryUpdater.prototype.createOutlineGeometryInstance = function (
time
@@ -458,7 +434,6 @@ PolylineGeometryUpdater.prototype.createOutlineGeometryInstance = function (
/**
* Returns true if this object was destroyed; otherwise, false.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
*/
PolylineGeometryUpdater.prototype.isDestroyed = function () {
@@ -467,8 +442,7 @@ PolylineGeometryUpdater.prototype.isDestroyed = function () {
/**
* Destroys and resources used by the object. Once an object is destroyed, it should not be used.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
*/
PolylineGeometryUpdater.prototype.destroy = function () {
this._entitySubscription();
@@ -609,12 +583,10 @@ PolylineGeometryUpdater.prototype._onEntityPropertyChanged = function (
/**
* Creates the dynamic updater to be used when GeometryUpdater#isDynamic is true.
- *
* @param {PrimitiveCollection} primitives The primitive collection to use.
* @param {PrimitiveCollection|OrderedGroundPrimitiveCollection} groundPrimitives The primitive collection to use for ordered ground primitives.
* @returns {DynamicGeometryUpdater} The dynamic updater used to update the geometry each frame.
- *
- * @exception {DeveloperError} This instance does not represent dynamic geometry.
+ * @throws {DeveloperError} This instance does not represent dynamic geometry.
* @private
*/
PolylineGeometryUpdater.prototype.createDynamicUpdater = function (
diff --git a/packages/engine/Source/DataSources/PolylineGlowMaterialProperty.js b/packages/engine/Source/DataSources/PolylineGlowMaterialProperty.js
index 11ac0f10a9e8..8f4cfa74e84e 100644
--- a/packages/engine/Source/DataSources/PolylineGlowMaterialProperty.js
+++ b/packages/engine/Source/DataSources/PolylineGlowMaterialProperty.js
@@ -12,12 +12,11 @@ const defaultTaperPower = 1.0;
/**
* A {@link MaterialProperty} that maps to polyline glow {@link Material} uniforms.
* @alias PolylineGlowMaterialProperty
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {Property|Color} [options.color=Color.WHITE] A Property specifying the {@link Color} of the line.
- * @param {Property|number} [options.glowPower=0.25] A numeric Property specifying the strength of the glow, as a percentage of the total line width.
- * @param {Property|number} [options.taperPower=1.0] A numeric Property specifying the strength of the tapering effect, as a percentage of the total line length. If 1.0 or higher, no taper effect is used.
+ * @param {Property|Color} [options.color] A Property specifying the {@link Color} of the line.
+ * @param {Property|number} [options.glowPower] A numeric Property specifying the strength of the glow, as a percentage of the total line width.
+ * @param {Property|number} [options.taperPower] A numeric Property specifying the strength of the tapering effect, as a percentage of the total line length. If 1.0 or higher, no taper effect is used.
*/
function PolylineGlowMaterialProperty(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -87,7 +86,6 @@ Object.defineProperties(PolylineGlowMaterialProperty.prototype, {
/**
* Gets the {@link Material} type at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the type.
* @returns {string} The type of material.
*/
@@ -97,7 +95,6 @@ PolylineGlowMaterialProperty.prototype.getType = function (time) {
/**
* Gets the value of the property at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -130,7 +127,6 @@ PolylineGlowMaterialProperty.prototype.getValue = function (time, result) {
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/PolylineGraphics.js b/packages/engine/Source/DataSources/PolylineGraphics.js
index 68c00789e036..c6bad4779f12 100644
--- a/packages/engine/Source/DataSources/PolylineGraphics.js
+++ b/packages/engine/Source/DataSources/PolylineGraphics.js
@@ -9,7 +9,6 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @typedef {object} PolylineGraphics.ConstructorOptions
*
* Initialization options for the PolylineGraphics constructor
- *
* @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the polyline.
* @property {Property | Cartesian3[]} [positions] A Property specifying the array of {@link Cartesian3} positions that define the line strip.
* @property {Property | number} [width=1.0] A numeric Property specifying the width in pixels.
@@ -28,12 +27,9 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* Describes a polyline. The first two positions define a line segment,
* and each additional position defines a line segment from the previous position. The segments
* can be linear connected points, great arcs, or clamped to terrain.
- *
* @alias PolylineGraphics
- * @constructor
- *
+ * @class
* @param {PolylineGraphics.ConstructorOptions} [options] Object describing initialization options
- *
* @see Entity
* @demo {@link https://sandcastle.cesium.com/index.html?src=Polyline.html|Cesium Sandcastle Polyline Demo}
*/
@@ -71,7 +67,6 @@ Object.defineProperties(PolylineGraphics.prototype, {
/**
* Gets the event that is raised whenever a property or sub-property is changed or modified.
* @memberof PolylineGraphics.prototype
- *
* @type {Event}
* @readonly
*/
@@ -187,7 +182,6 @@ Object.defineProperties(PolylineGraphics.prototype, {
/**
* Duplicates this instance.
- *
* @param {PolylineGraphics} [result] The object onto which to store the result.
* @returns {PolylineGraphics} The modified result parameter or a new instance if one was not provided.
*/
@@ -213,7 +207,6 @@ PolylineGraphics.prototype.clone = function (result) {
/**
* Assigns each unassigned property on this object to the value
* of the same property on the provided source object.
- *
* @param {PolylineGraphics} source The object to be merged into this object.
*/
PolylineGraphics.prototype.merge = function (source) {
diff --git a/packages/engine/Source/DataSources/PolylineOutlineMaterialProperty.js b/packages/engine/Source/DataSources/PolylineOutlineMaterialProperty.js
index 27851e59ba78..9cfa11a64bbc 100644
--- a/packages/engine/Source/DataSources/PolylineOutlineMaterialProperty.js
+++ b/packages/engine/Source/DataSources/PolylineOutlineMaterialProperty.js
@@ -12,12 +12,11 @@ const defaultOutlineWidth = 1.0;
/**
* A {@link MaterialProperty} that maps to polyline outline {@link Material} uniforms.
* @alias PolylineOutlineMaterialProperty
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {Property|Color} [options.color=Color.WHITE] A Property specifying the {@link Color} of the line.
- * @param {Property|Color} [options.outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
- * @param {Property|number} [options.outlineWidth=1.0] A numeric Property specifying the width of the outline, in pixels.
+ * @param {Property|Color} [options.color] A Property specifying the {@link Color} of the line.
+ * @param {Property|Color} [options.outlineColor] A Property specifying the {@link Color} of the outline.
+ * @param {Property|number} [options.outlineWidth] A numeric Property specifying the width of the outline, in pixels.
*/
function PolylineOutlineMaterialProperty(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -40,7 +39,6 @@ Object.defineProperties(PolylineOutlineMaterialProperty.prototype, {
* Gets a value indicating if this property is constant. A property is considered
* constant if getValue always returns the same result for the current definition.
* @memberof PolylineOutlineMaterialProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -58,7 +56,6 @@ Object.defineProperties(PolylineOutlineMaterialProperty.prototype, {
* The definition is considered to have changed if a call to getValue would return
* a different result for the same time.
* @memberof PolylineOutlineMaterialProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -94,7 +91,6 @@ Object.defineProperties(PolylineOutlineMaterialProperty.prototype, {
/**
* Gets the {@link Material} type at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the type.
* @returns {string} The type of material.
*/
@@ -104,7 +100,6 @@ PolylineOutlineMaterialProperty.prototype.getType = function (time) {
/**
* Gets the value of the property at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -136,7 +131,6 @@ PolylineOutlineMaterialProperty.prototype.getValue = function (time, result) {
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/PolylineVisualizer.js b/packages/engine/Source/DataSources/PolylineVisualizer.js
index a30fb2fad7be..20318107086f 100644
--- a/packages/engine/Source/DataSources/PolylineVisualizer.js
+++ b/packages/engine/Source/DataSources/PolylineVisualizer.js
@@ -72,12 +72,11 @@ function insertUpdaterIntoBatch(that, time, updater) {
/**
* A visualizer for polylines represented by {@link Primitive} instances.
* @alias PolylineVisualizer
- * @constructor
- *
+ * @class
* @param {Scene} scene The scene the primitives will be rendered in.
* @param {EntityCollection} entityCollection The entityCollection to visualize.
- * @param {PrimitiveCollection} [primitives=scene.primitives] A collection to add primitives related to the entities
- * @param {PrimitiveCollection} [groundPrimitives=scene.groundPrimitives] A collection to add ground primitives related to the entities
+ * @param {PrimitiveCollection} [primitives] A collection to add primitives related to the entities
+ * @param {PrimitiveCollection} [groundPrimitives] A collection to add ground primitives related to the entities
*/
function PolylineVisualizer(
scene,
@@ -195,7 +194,6 @@ function PolylineVisualizer(
/**
* Updates all of the primitives created by this visualizer to match their
* Entity counterpart at the given time.
- *
* @param {JulianDate} time The time to update to.
* @returns {boolean} True if the visualizer successfully updated to the provided time,
* false if the visualizer is waiting for asynchronous primitives to be created.
@@ -282,7 +280,6 @@ const getBoundingSphereBoundingSphereScratch = new BoundingSphere();
/**
* Computes a bounding sphere which encloses the visualization produced for the specified entity.
* The bounding sphere is in the fixed frame of the scene's globe.
- *
* @param {Entity} entity The entity whose bounding sphere to compute.
* @param {BoundingSphere} result The bounding sphere onto which to store the result.
* @returns {BoundingSphereState} BoundingSphereState.DONE if the result contains the bounding sphere,
@@ -328,7 +325,6 @@ PolylineVisualizer.prototype.getBoundingSphere = function (entity, result) {
/**
* Returns true if this object was destroyed; otherwise, false.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
*/
PolylineVisualizer.prototype.isDestroyed = function () {
@@ -363,6 +359,7 @@ PolylineVisualizer.prototype.destroy = function () {
};
/**
+ * @param updater
* @private
*/
PolylineVisualizer._onGeometryChanged = function (updater) {
@@ -378,6 +375,9 @@ PolylineVisualizer._onGeometryChanged = function (updater) {
};
/**
+ * @param entityCollection
+ * @param added
+ * @param removed
* @private
*/
PolylineVisualizer.prototype._onCollectionChanged = function (
diff --git a/packages/engine/Source/DataSources/PolylineVolumeGeometryUpdater.js b/packages/engine/Source/DataSources/PolylineVolumeGeometryUpdater.js
index 1d8aca1a3d94..ea3e1cc351b0 100644
--- a/packages/engine/Source/DataSources/PolylineVolumeGeometryUpdater.js
+++ b/packages/engine/Source/DataSources/PolylineVolumeGeometryUpdater.js
@@ -31,8 +31,7 @@ function PolylineVolumeGeometryOptions(entity) {
* A {@link GeometryUpdater} for polyline volumes.
* Clients do not normally create this class directly, but instead rely on {@link DataSourceDisplay}.
* @alias PolylineVolumeGeometryUpdater
- * @constructor
- *
+ * @class
* @param {Entity} entity The entity containing the geometry to be visualized.
* @param {Scene} scene The scene where visualization is taking place.
*/
@@ -62,11 +61,9 @@ if (defined(Object.create)) {
/**
* Creates the geometry instance which represents the fill of the geometry.
- *
* @param {JulianDate} time The time to use when retrieving initial attribute values.
* @returns {GeometryInstance} The geometry instance representing the filled portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent a filled geometry.
+ * @throws {DeveloperError} This instance does not represent a filled geometry.
*/
PolylineVolumeGeometryUpdater.prototype.createFillGeometryInstance = function (
time
@@ -132,11 +129,9 @@ PolylineVolumeGeometryUpdater.prototype.createFillGeometryInstance = function (
/**
* Creates the geometry instance which represents the outline of the geometry.
- *
* @param {JulianDate} time The time to use when retrieving initial attribute values.
* @returns {GeometryInstance} The geometry instance representing the outline portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent an outlined geometry.
+ * @throws {DeveloperError} This instance does not represent an outlined geometry.
*/
PolylineVolumeGeometryUpdater.prototype.createOutlineGeometryInstance = function (
time
@@ -237,6 +232,9 @@ PolylineVolumeGeometryUpdater.prototype._setStaticOptions = function (
PolylineVolumeGeometryUpdater.DynamicGeometryUpdater = DynamicPolylineVolumeGeometryUpdater;
/**
+ * @param geometryUpdater
+ * @param primitives
+ * @param groundPrimitives
* @private
*/
function DynamicPolylineVolumeGeometryUpdater(
diff --git a/packages/engine/Source/DataSources/PolylineVolumeGraphics.js b/packages/engine/Source/DataSources/PolylineVolumeGraphics.js
index 19ff7e271c99..9926ecc22564 100644
--- a/packages/engine/Source/DataSources/PolylineVolumeGraphics.js
+++ b/packages/engine/Source/DataSources/PolylineVolumeGraphics.js
@@ -9,7 +9,6 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @typedef {object} PolylineVolumeGraphics.ConstructorOptions
*
* Initialization options for the PolylineVolumeGraphics constructor
- *
* @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the volume.
* @property {Property | Cartesian3[]} [positions] A Property specifying the array of {@link Cartesian3} positions which define the line strip.
* @property {Property | Cartesian2[]} [shape] A Property specifying the array of {@link Cartesian2} positions which define the shape to be extruded.
@@ -27,12 +26,9 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
/**
* Describes a polyline volume defined as a line strip and corresponding two dimensional shape which is extruded along it.
* The resulting volume conforms to the curvature of the globe.
- *
* @alias PolylineVolumeGraphics
- * @constructor
- *
+ * @class
* @param {PolylineVolumeGraphics.ConstructorOptions} [options] Object describing initialization options
- *
* @see Entity
* @demo {@link https://sandcastle.cesium.com/index.html?src=Polyline%20Volume.html|Cesium Sandcastle Polyline Volume Demo}
*/
@@ -70,7 +66,6 @@ Object.defineProperties(PolylineVolumeGraphics.prototype, {
/**
* Gets the event that is raised whenever a property or sub-property is changed or modified.
* @memberof PolylineVolumeGraphics.prototype
- *
* @type {Event}
* @readonly
*/
@@ -182,7 +177,6 @@ Object.defineProperties(PolylineVolumeGraphics.prototype, {
/**
* Duplicates this instance.
- *
* @param {PolylineVolumeGraphics} [result] The object onto which to store the result.
* @returns {PolylineVolumeGraphics} The modified result parameter or a new instance if one was not provided.
*/
@@ -208,7 +202,6 @@ PolylineVolumeGraphics.prototype.clone = function (result) {
/**
* Assigns each unassigned property on this object to the value
* of the same property on the provided source object.
- *
* @param {PolylineVolumeGraphics} source The object to be merged into this object.
*/
PolylineVolumeGraphics.prototype.merge = function (source) {
diff --git a/packages/engine/Source/DataSources/PositionProperty.js b/packages/engine/Source/DataSources/PositionProperty.js
index 88b0e2371a64..127ec99f2ca2 100644
--- a/packages/engine/Source/DataSources/PositionProperty.js
+++ b/packages/engine/Source/DataSources/PositionProperty.js
@@ -9,11 +9,9 @@ import Transforms from "../Core/Transforms.js";
* The interface for all {@link Property} objects that define a world
* location as a {@link Cartesian3} with an associated {@link ReferenceFrame}.
* This type defines an interface and cannot be instantiated directly.
- *
* @alias PositionProperty
- * @constructor
+ * @class
* @abstract
- *
* @see CompositePositionProperty
* @see ConstantPositionProperty
* @see SampledPositionProperty
@@ -28,7 +26,6 @@ Object.defineProperties(PositionProperty.prototype, {
* Gets a value indicating if this property is constant. A property is considered
* constant if getValue always returns the same result for the current definition.
* @memberof PositionProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -40,7 +37,6 @@ Object.defineProperties(PositionProperty.prototype, {
* The definition is considered to have changed if a call to getValue would return
* a different result for the same time.
* @memberof PositionProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -60,7 +56,6 @@ Object.defineProperties(PositionProperty.prototype, {
/**
* Gets the value of the property at the provided time in the fixed frame.
* @function
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {Cartesian3} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {Cartesian3 | undefined} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -70,7 +65,6 @@ PositionProperty.prototype.getValue = DeveloperError.throwInstantiationError;
/**
* Gets the value of the property at the provided time and in the provided reference frame.
* @function
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {ReferenceFrame} referenceFrame The desired referenceFrame of the result.
* @param {Cartesian3} [result] The object to store the value into, if omitted, a new instance is created and returned.
@@ -83,7 +77,6 @@ PositionProperty.prototype.getValueInReferenceFrame =
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
* @function
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
@@ -92,6 +85,11 @@ PositionProperty.prototype.equals = DeveloperError.throwInstantiationError;
const scratchMatrix3 = new Matrix3();
/**
+ * @param time
+ * @param value
+ * @param inputFrame
+ * @param outputFrame
+ * @param result
* @private
*/
PositionProperty.convertToReferenceFrame = function (
diff --git a/packages/engine/Source/DataSources/PositionPropertyArray.js b/packages/engine/Source/DataSources/PositionPropertyArray.js
index ac8853533a67..c4df153ab47d 100644
--- a/packages/engine/Source/DataSources/PositionPropertyArray.js
+++ b/packages/engine/Source/DataSources/PositionPropertyArray.js
@@ -9,12 +9,10 @@ import Property from "./Property.js";
/**
* A {@link Property} whose value is an array whose items are the computed value
* of other PositionProperty instances.
- *
* @alias PositionPropertyArray
- * @constructor
- *
+ * @class
* @param {Property[]} [value] An array of Property instances.
- * @param {ReferenceFrame} [referenceFrame=ReferenceFrame.FIXED] The reference frame in which the position is defined.
+ * @param {ReferenceFrame} [referenceFrame] The reference frame in which the position is defined.
*/
function PositionPropertyArray(value, referenceFrame) {
this._value = undefined;
@@ -29,7 +27,6 @@ Object.defineProperties(PositionPropertyArray.prototype, {
* Gets a value indicating if this property is constant. This property
* is considered constant if all property items in the array are constant.
* @memberof PositionPropertyArray.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -54,7 +51,6 @@ Object.defineProperties(PositionPropertyArray.prototype, {
* The definition is changed whenever setValue is called with data different
* than the current value or one of the properties in the array also changes.
* @memberof PositionPropertyArray.prototype
- *
* @type {Event}
* @readonly
*/
@@ -78,7 +74,6 @@ Object.defineProperties(PositionPropertyArray.prototype, {
/**
* Gets the value of the property.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {Cartesian3[]} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {Cartesian3[]} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -89,7 +84,6 @@ PositionPropertyArray.prototype.getValue = function (time, result) {
/**
* Gets the value of the property at the provided time and in the provided reference frame.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {ReferenceFrame} referenceFrame The desired referenceFrame of the result.
* @param {Cartesian3[]} [result] The object to store the value into, if omitted, a new instance is created and returned.
@@ -139,7 +133,6 @@ PositionPropertyArray.prototype.getValueInReferenceFrame = function (
/**
* Sets the value of the property.
- *
* @param {Property[]} value An array of Property instances.
*/
PositionPropertyArray.prototype.setValue = function (value) {
@@ -168,7 +161,6 @@ PositionPropertyArray.prototype.setValue = function (value) {
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/Property.js b/packages/engine/Source/DataSources/Property.js
index 5bb13ab71b49..2c9381111d41 100644
--- a/packages/engine/Source/DataSources/Property.js
+++ b/packages/engine/Source/DataSources/Property.js
@@ -5,11 +5,9 @@ import DeveloperError from "../Core/DeveloperError.js";
/**
* The interface for all properties, which represent a value that can optionally vary over time.
* This type defines an interface and cannot be instantiated directly.
- *
* @alias Property
- * @constructor
+ * @class
* @abstract
- *
* @see CompositeProperty
* @see ConstantProperty
* @see SampledProperty
@@ -27,7 +25,6 @@ Object.defineProperties(Property.prototype, {
* Gets a value indicating if this property is constant. A property is considered
* constant if getValue always returns the same result for the current definition.
* @memberof Property.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -39,7 +36,6 @@ Object.defineProperties(Property.prototype, {
* The definition is considered to have changed if a call to getValue would return
* a different result for the same time.
* @memberof Property.prototype
- *
* @type {Event}
* @readonly
*/
@@ -51,7 +47,6 @@ Object.defineProperties(Property.prototype, {
/**
* Gets the value of the property at the provided time.
* @function
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -62,13 +57,14 @@ Property.prototype.getValue = DeveloperError.throwInstantiationError;
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
* @function
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
Property.prototype.equals = DeveloperError.throwInstantiationError;
/**
+ * @param left
+ * @param right
* @private
*/
Property.equals = function (left, right) {
@@ -76,6 +72,8 @@ Property.equals = function (left, right) {
};
/**
+ * @param left
+ * @param right
* @private
*/
Property.arrayEquals = function (left, right) {
@@ -95,6 +93,7 @@ Property.arrayEquals = function (left, right) {
};
/**
+ * @param property
* @private
*/
Property.isConstant = function (property) {
@@ -102,6 +101,9 @@ Property.isConstant = function (property) {
};
/**
+ * @param property
+ * @param time
+ * @param result
* @private
*/
Property.getValueOrUndefined = function (property, time, result) {
@@ -109,6 +111,10 @@ Property.getValueOrUndefined = function (property, time, result) {
};
/**
+ * @param property
+ * @param time
+ * @param valueDefault
+ * @param result
* @private
*/
Property.getValueOrDefault = function (property, time, valueDefault, result) {
@@ -118,6 +124,10 @@ Property.getValueOrDefault = function (property, time, valueDefault, result) {
};
/**
+ * @param property
+ * @param time
+ * @param valueDefault
+ * @param result
* @private
*/
Property.getValueOrClonedDefault = function (
diff --git a/packages/engine/Source/DataSources/PropertyArray.js b/packages/engine/Source/DataSources/PropertyArray.js
index 305e3c0c9401..17ebf15f9fc1 100644
--- a/packages/engine/Source/DataSources/PropertyArray.js
+++ b/packages/engine/Source/DataSources/PropertyArray.js
@@ -7,10 +7,8 @@ import Property from "./Property.js";
/**
* A {@link Property} whose value is an array whose items are the computed value
* of other property instances.
- *
* @alias PropertyArray
- * @constructor
- *
+ * @class
* @param {Property[]} [value] An array of Property instances.
*/
function PropertyArray(value) {
@@ -25,7 +23,6 @@ Object.defineProperties(PropertyArray.prototype, {
* Gets a value indicating if this property is constant. This property
* is considered constant if all property items in the array are constant.
* @memberof PropertyArray.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -49,7 +46,6 @@ Object.defineProperties(PropertyArray.prototype, {
* The definition is changed whenever setValue is called with data different
* than the current value or one of the properties in the array also changes.
* @memberof PropertyArray.prototype
- *
* @type {Event}
* @readonly
*/
@@ -62,10 +58,9 @@ Object.defineProperties(PropertyArray.prototype, {
/**
* Gets the value of the property.
- *
* @param {JulianDate} time The time for which to retrieve the value.
- * @param {Object[]} [result] The object to store the value into, if omitted, a new instance is created and returned.
- * @returns {Object[]} The modified result parameter, which is an array of values produced by evaluating each of the contained properties at the given time or a new instance if the result parameter was not supplied.
+ * @param {object[]} [result] The object to store the value into, if omitted, a new instance is created and returned.
+ * @returns {object[]} The modified result parameter, which is an array of values produced by evaluating each of the contained properties at the given time or a new instance if the result parameter was not supplied.
*/
PropertyArray.prototype.getValue = function (time, result) {
//>>includeStart('debug', pragmas.debug);
@@ -100,7 +95,6 @@ PropertyArray.prototype.getValue = function (time, result) {
/**
* Sets the value of the property.
- *
* @param {Property[]} value An array of Property instances.
*/
PropertyArray.prototype.setValue = function (value) {
@@ -129,7 +123,6 @@ PropertyArray.prototype.setValue = function (value) {
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/PropertyBag.js b/packages/engine/Source/DataSources/PropertyBag.js
index a5b0220f400b..b40295e599a4 100644
--- a/packages/engine/Source/DataSources/PropertyBag.js
+++ b/packages/engine/Source/DataSources/PropertyBag.js
@@ -8,11 +8,9 @@ import Property from "./Property.js";
/**
* A {@link Property} whose value is a key-value mapping of property names to the computed value of other properties.
- *
* @alias PropertyBag
* @implements Record
- * @constructor
- *
+ * @class
* @param {object} [value] An object, containing key-value mapping of property names to properties.
* @param {Function} [createPropertyCallback] A function that will be called when the value of any of the properties in value are not a Property.
*/
@@ -40,7 +38,6 @@ Object.defineProperties(PropertyBag.prototype, {
* Gets a value indicating if this property is constant. This property
* is considered constant if all property items in this object are constant.
* @memberof PropertyBag.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -58,9 +55,7 @@ Object.defineProperties(PropertyBag.prototype, {
/**
* Gets the event that is raised whenever the set of properties contained in this
* object changes, or one of the properties itself changes.
- *
* @memberof PropertyBag.prototype
- *
* @type {Event}
* @readonly
*/
@@ -73,9 +68,7 @@ Object.defineProperties(PropertyBag.prototype, {
/**
* Determines if this object has defined a property with the given name.
- *
* @param {string} propertyName The name of the property to check for.
- *
* @returns {boolean} True if this object has defined a property with the given name, false otherwise.
*/
PropertyBag.prototype.hasProperty = function (propertyName) {
@@ -88,12 +81,10 @@ function createConstantProperty(value) {
/**
* Adds a property to this object.
- *
* @param {string} propertyName The name of the property to add.
* @param {*} [value] The value of the new property, if provided.
* @param {Function} [createPropertyCallback] A function that will be called when the value of this new property is set to a value that is not a Property.
- *
- * @exception {DeveloperError} "propertyName" is already a registered property.
+ * @throws {DeveloperError} "propertyName" is already a registered property.
*/
PropertyBag.prototype.addProperty = function (
propertyName,
@@ -133,10 +124,8 @@ PropertyBag.prototype.addProperty = function (
/**
* Removed a property previously added with addProperty.
- *
* @param {string} propertyName The name of the property to remove.
- *
- * @exception {DeveloperError} "propertyName" is not a registered property.
+ * @throws {DeveloperError} "propertyName" is not a registered property.
*/
PropertyBag.prototype.removeProperty = function (propertyName) {
const propertyNames = this._propertyNames;
@@ -160,7 +149,6 @@ PropertyBag.prototype.removeProperty = function (propertyName) {
/**
* Gets the value of this property. Each contained property will be evaluated at the given time, and the overall
* result will be an object, mapping property names to those values.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
* Note that any properties in result which are not part of this PropertyBag will be left as-is.
@@ -192,7 +180,6 @@ PropertyBag.prototype.getValue = function (time, result) {
/**
* Assigns each unassigned property on this object to the value
* of the same property on the provided source object.
- *
* @param {object} source The object to be merged into this object.
* @param {Function} [createPropertyCallback] A function that will be called when the value of any of the properties in value are not a Property.
*/
@@ -261,7 +248,6 @@ function propertiesEqual(a, b) {
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/RectangleGeometryUpdater.js b/packages/engine/Source/DataSources/RectangleGeometryUpdater.js
index 8c1d1f702c5d..332550ac1448 100644
--- a/packages/engine/Source/DataSources/RectangleGeometryUpdater.js
+++ b/packages/engine/Source/DataSources/RectangleGeometryUpdater.js
@@ -47,8 +47,7 @@ function RectangleGeometryOptions(entity) {
* A {@link GeometryUpdater} for rectangles.
* Clients do not normally create this class directly, but instead rely on {@link DataSourceDisplay}.
* @alias RectangleGeometryUpdater
- * @constructor
- *
+ * @class
* @param {Entity} entity The entity containing the geometry to be visualized.
* @param {Scene} scene The scene where visualization is taking place.
*/
@@ -78,11 +77,9 @@ if (defined(Object.create)) {
/**
* Creates the geometry instance which represents the fill of the geometry.
- *
* @param {JulianDate} time The time to use when retrieving initial attribute values.
* @returns {GeometryInstance} The geometry instance representing the filled portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent a filled geometry.
+ * @throws {DeveloperError} This instance does not represent a filled geometry.
*/
RectangleGeometryUpdater.prototype.createFillGeometryInstance = function (
time
@@ -147,11 +144,9 @@ RectangleGeometryUpdater.prototype.createFillGeometryInstance = function (
/**
* Creates the geometry instance which represents the outline of the geometry.
- *
* @param {JulianDate} time The time to use when retrieving initial attribute values.
* @returns {GeometryInstance} The geometry instance representing the outline portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent an outlined geometry.
+ * @throws {DeveloperError} This instance does not represent an outlined geometry.
*/
RectangleGeometryUpdater.prototype.createOutlineGeometryInstance = function (
time
@@ -322,6 +317,9 @@ RectangleGeometryUpdater.prototype._setStaticOptions = function (
RectangleGeometryUpdater.DynamicGeometryUpdater = DynamicRectangleGeometryUpdater;
/**
+ * @param geometryUpdater
+ * @param primitives
+ * @param groundPrimitives
* @private
*/
function DynamicRectangleGeometryUpdater(
diff --git a/packages/engine/Source/DataSources/RectangleGraphics.js b/packages/engine/Source/DataSources/RectangleGraphics.js
index 020f96e56d14..61e9aa023041 100644
--- a/packages/engine/Source/DataSources/RectangleGraphics.js
+++ b/packages/engine/Source/DataSources/RectangleGraphics.js
@@ -9,7 +9,6 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @typedef {object} RectangleGraphics.ConstructorOptions
*
* Initialization options for the RectangleGraphics constructor
- *
* @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the rectangle.
* @property {Property | Rectangle} [coordinates] The Property specifying the {@link Rectangle}.
* @property {Property | number} [height=0] A numeric Property specifying the altitude of the rectangle relative to the ellipsoid surface.
@@ -34,12 +33,9 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* Describes graphics for a {@link Rectangle}.
* The rectangle conforms to the curvature of the globe and can be placed on the surface or
* at altitude and can optionally be extruded into a volume.
- *
* @alias RectangleGraphics
- * @constructor
- *
+ * @class
* @param {RectangleGraphics.ConstructorOptions} [options] Object describing initialization options
- *
* @see Entity
* @demo {@link https://sandcastle.cesium.com/index.html?src=Rectangle.html|Cesium Sandcastle Rectangle Demo}
*/
@@ -89,7 +85,6 @@ Object.defineProperties(RectangleGraphics.prototype, {
/**
* Gets the event that is raised whenever a property or sub-property is changed or modified.
* @memberof RectangleGraphics.prototype
- *
* @type {Event}
* @readonly
*/
@@ -250,7 +245,6 @@ Object.defineProperties(RectangleGraphics.prototype, {
/**
* Duplicates this instance.
- *
* @param {RectangleGraphics} [result] The object onto which to store the result.
* @returns {RectangleGraphics} The modified result parameter or a new instance if one was not provided.
*/
@@ -282,7 +276,6 @@ RectangleGraphics.prototype.clone = function (result) {
/**
* Assigns each unassigned property on this object to the value
* of the same property on the provided source object.
- *
* @param {RectangleGraphics} source The object to be merged into this object.
*/
RectangleGraphics.prototype.merge = function (source) {
diff --git a/packages/engine/Source/DataSources/ReferenceProperty.js b/packages/engine/Source/DataSources/ReferenceProperty.js
index 88218e81d0db..980389288dc3 100644
--- a/packages/engine/Source/DataSources/ReferenceProperty.js
+++ b/packages/engine/Source/DataSources/ReferenceProperty.js
@@ -46,14 +46,11 @@ function resolve(that) {
/**
* A {@link Property} which transparently links to another property on a provided object.
- *
* @alias ReferenceProperty
- * @constructor
- *
+ * @class
* @param {EntityCollection} targetCollection The entity collection which will be used to resolve the reference.
* @param {string} targetId The id of the entity which is being referenced.
* @param {string[]} targetPropertyNames The names of the property on the target entity which we will use.
- *
* @example
* const collection = new Cesium.EntityCollection();
*
@@ -207,12 +204,10 @@ Object.defineProperties(ReferenceProperty.prototype, {
* The format of the string is "objectId#foo.bar", where # separates the id from
* property path and . separates sub-properties. If the reference identifier or
* or any sub-properties contains a # . or \ they must be escaped.
- *
* @param {EntityCollection} targetCollection
* @param {string} referenceString
* @returns {ReferenceProperty} A new instance of ReferenceProperty.
- *
- * @exception {DeveloperError} invalid referenceString.
+ * @throws {DeveloperError} invalid referenceString.
*/
ReferenceProperty.fromString = function (targetCollection, referenceString) {
//>>includeStart('debug', pragmas.debug);
@@ -256,7 +251,6 @@ ReferenceProperty.fromString = function (targetCollection, referenceString) {
/**
* Gets the value of the property at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -269,7 +263,6 @@ ReferenceProperty.prototype.getValue = function (time, result) {
/**
* Gets the value of the property at the provided time and in the provided reference frame.
* This method is only valid if the property being referenced is a {@link PositionProperty}.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {ReferenceFrame} referenceFrame The desired referenceFrame of the result.
* @param {Cartesian3} [result] The object to store the value into, if omitted, a new instance is created and returned.
@@ -289,7 +282,6 @@ ReferenceProperty.prototype.getValueInReferenceFrame = function (
/**
* Gets the {@link Material} type at the provided time.
* This method is only valid if the property being referenced is a {@link MaterialProperty}.
- *
* @param {JulianDate} time The time for which to retrieve the type.
* @returns {string} The type of material.
*/
@@ -301,7 +293,6 @@ ReferenceProperty.prototype.getType = function (time) {
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/Rotation.js b/packages/engine/Source/DataSources/Rotation.js
index 5f60a4a92fe8..366206ee3e78 100644
--- a/packages/engine/Source/DataSources/Rotation.js
+++ b/packages/engine/Source/DataSources/Rotation.js
@@ -8,10 +8,7 @@ import CesiumMath from "../Core/Math.js";
* towards the shortest angle of rotation. This object is never used directly
* but is instead passed to the constructor of {@link SampledProperty}
* in order to represent a two-dimensional angle of rotation.
- *
* @interface Rotation
- *
- *
* @example
* const time1 = Cesium.JulianDate.fromIso8601('2010-05-07T00:00:00');
* const time2 = Cesium.JulianDate.fromIso8601('2010-05-07T00:01:00');
@@ -26,7 +23,6 @@ import CesiumMath from "../Core/Math.js";
* //a SampledProperty(Number) instead. Note, the actual
* //return value is in radians, not degrees.
* property.getValue(time2);
- *
* @see PackableForInterpolation
*/
const Rotation = {
@@ -38,11 +34,9 @@ const Rotation = {
/**
* Stores the provided instance into the provided array.
- *
* @param {Rotation} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
+ * @param {number} [startingIndex] The index into the array at which to start packing the elements.
* @returns {number[]} The array that was packed into
*/
pack: function (value, array, startingIndex) {
@@ -64,9 +58,8 @@ const Rotation = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex] The starting index of the element to be unpacked.
* @param {Rotation} [result] The object into which to store the result.
* @returns {Rotation} The modified result parameter or a new Rotation instance if one was not provided.
*/
@@ -83,10 +76,9 @@ const Rotation = {
/**
* Converts a packed array into a form suitable for interpolation.
- *
* @param {number[]} packedArray The packed array.
- * @param {number} [startingIndex=0] The index of the first element to be converted.
- * @param {number} [lastIndex=packedArray.length] The index of the last element to be converted.
+ * @param {number} [startingIndex] The index of the first element to be converted.
+ * @param {number} [lastIndex] The index of the last element to be converted.
* @param {number[]} [result] The object into which to store the result.
*/
convertPackedArrayForInterpolation: function (
@@ -122,11 +114,10 @@ const Rotation = {
/**
* Retrieves an instance from a packed array converted with {@link Rotation.convertPackedArrayForInterpolation}.
- *
* @param {number[]} array The array previously packed for interpolation.
* @param {number[]} sourceArray The original packed array.
- * @param {number} [firstIndex=0] The firstIndex used to convert the array.
- * @param {number} [lastIndex=packedArray.length] The lastIndex used to convert the array.
+ * @param {number} [firstIndex] The firstIndex used to convert the array.
+ * @param {number} [lastIndex] The lastIndex used to convert the array.
* @param {Rotation} [result] The object into which to store the result.
* @returns {Rotation} The modified result parameter or a new Rotation instance if one was not provided.
*/
diff --git a/packages/engine/Source/DataSources/SampledPositionProperty.js b/packages/engine/Source/DataSources/SampledPositionProperty.js
index 001fba3465bc..87bb0d65b55f 100644
--- a/packages/engine/Source/DataSources/SampledPositionProperty.js
+++ b/packages/engine/Source/DataSources/SampledPositionProperty.js
@@ -11,12 +11,10 @@ import SampledProperty from "./SampledProperty.js";
/**
* A {@link SampledProperty} which is also a {@link PositionProperty}.
- *
* @alias SampledPositionProperty
- * @constructor
- *
- * @param {ReferenceFrame} [referenceFrame=ReferenceFrame.FIXED] The reference frame in which the position is defined.
- * @param {number} [numberOfDerivatives=0] The number of derivatives that accompany each position; i.e. velocity, acceleration, etc...
+ * @class
+ * @param {ReferenceFrame} [referenceFrame] The reference frame in which the position is defined.
+ * @param {number} [numberOfDerivatives] The number of derivatives that accompany each position; i.e. velocity, acceleration, etc...
*/
function SampledPositionProperty(referenceFrame, numberOfDerivatives) {
numberOfDerivatives = defaultValue(numberOfDerivatives, 0);
@@ -44,7 +42,6 @@ Object.defineProperties(SampledPositionProperty.prototype, {
* Gets a value indicating if this property is constant. A property is considered
* constant if getValue always returns the same result for the current definition.
* @memberof SampledPositionProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -58,7 +55,6 @@ Object.defineProperties(SampledPositionProperty.prototype, {
* The definition is considered to have changed if a call to getValue would return
* a different result for the same time.
* @memberof SampledPositionProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -81,7 +77,6 @@ Object.defineProperties(SampledPositionProperty.prototype, {
/**
* Gets the degree of interpolation to perform when retrieving a value. Call setInterpolationOptions
to set this.
* @memberof SampledPositionProperty.prototype
- *
* @type {number}
* @default 1
* @readonly
@@ -94,7 +89,6 @@ Object.defineProperties(SampledPositionProperty.prototype, {
/**
* Gets the interpolation algorithm to use when retrieving a value. Call setInterpolationOptions
to set this.
* @memberof SampledPositionProperty.prototype
- *
* @type {InterpolationAlgorithm}
* @default LinearApproximation
* @readonly
@@ -107,7 +101,6 @@ Object.defineProperties(SampledPositionProperty.prototype, {
/**
* The number of derivatives contained by this property; i.e. 0 for just position, 1 for velocity, etc.
* @memberof SampledPositionProperty.prototype
- *
* @type {number}
* @default 0
*/
@@ -180,7 +173,6 @@ Object.defineProperties(SampledPositionProperty.prototype, {
/**
* Gets the position at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {Cartesian3} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {Cartesian3 | undefined} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -191,7 +183,6 @@ SampledPositionProperty.prototype.getValue = function (time, result) {
/**
* Gets the position at the provided time and in the provided reference frame.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {ReferenceFrame} referenceFrame The desired referenceFrame of the result.
* @param {Cartesian3} [result] The object to store the value into, if omitted, a new instance is created and returned.
@@ -222,7 +213,6 @@ SampledPositionProperty.prototype.getValueInReferenceFrame = function (
/**
* Sets the algorithm and degree to use when interpolating a position.
- *
* @param {object} [options] Object with the following properties:
* @param {InterpolationAlgorithm} [options.interpolationAlgorithm] The new interpolation algorithm. If undefined, the existing property will be unchanged.
* @param {number} [options.interpolationDegree] The new interpolation degree. If undefined, the existing property will be unchanged.
@@ -233,7 +223,6 @@ SampledPositionProperty.prototype.setInterpolationOptions = function (options) {
/**
* Adds a new sample.
- *
* @param {JulianDate} time The sample time.
* @param {Cartesian3} position The position at the provided time.
* @param {Cartesian3[]} [derivatives] The array of derivative values at the provided time.
@@ -259,12 +248,10 @@ SampledPositionProperty.prototype.addSample = function (
/**
* Adds multiple samples via parallel arrays.
- *
* @param {JulianDate[]} times An array of JulianDate instances where each index is a sample time.
* @param {Cartesian3[]} positions An array of Cartesian3 position instances, where each value corresponds to the provided time index.
* @param {Array[]} [derivatives] An array where each value is another array containing derivatives for the corresponding time index.
- *
- * @exception {DeveloperError} All arrays must be the same length.
+ * @throws {DeveloperError} All arrays must be the same length.
*/
SampledPositionProperty.prototype.addSamples = function (
times,
@@ -277,7 +264,6 @@ SampledPositionProperty.prototype.addSamples = function (
/**
* Adds samples as a single packed array where each new sample is represented as a date,
* followed by the packed representation of the corresponding value and derivatives.
- *
* @param {number[]} packedSamples The array of packed samples.
* @param {JulianDate} [epoch] If any of the dates in packedSamples are numbers, they are considered an offset from this epoch, in seconds.
*/
@@ -290,7 +276,6 @@ SampledPositionProperty.prototype.addSamplesPackedArray = function (
/**
* Removes a sample at the given time, if present.
- *
* @param {JulianDate} time The sample time.
* @returns {boolean} true
if a sample at time was removed, false
otherwise.
*/
@@ -300,8 +285,8 @@ SampledPositionProperty.prototype.removeSample = function (time) {
/**
* Removes all samples for the given time interval.
- *
* @param {TimeInterval} time The time interval for which to remove all samples.
+ * @param timeInterval
*/
SampledPositionProperty.prototype.removeSamples = function (timeInterval) {
this._property.removeSamples(timeInterval);
@@ -310,7 +295,6 @@ SampledPositionProperty.prototype.removeSamples = function (timeInterval) {
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/SampledProperty.js b/packages/engine/Source/DataSources/SampledProperty.js
index 39248a3a39e3..7932590afddf 100644
--- a/packages/engine/Source/DataSources/SampledProperty.js
+++ b/packages/engine/Source/DataSources/SampledProperty.js
@@ -116,12 +116,9 @@ function mergeNewSamples(epoch, times, values, newData, packedLength) {
* A {@link Property} whose value is interpolated for a given time from the
* provided set of samples and specified interpolation algorithm and degree.
* @alias SampledProperty
- * @constructor
- *
+ * @class
* @param {number|Packable} type The type of property.
* @param {Packable[]} [derivativeTypes] When supplied, indicates that samples will contain derivative information of the specified types.
- *
- *
* @example
* //Create a linearly interpolated Cartesian2
* const property = new Cesium.SampledProperty(Cesium.Cartesian2);
@@ -132,7 +129,6 @@ function mergeNewSamples(epoch, times, values, newData, packedLength) {
*
* //Retrieve an interpolated value
* const result = property.getValue(Cesium.JulianDate.fromIso8601('2012-08-01T12:00:00.00Z'));
- *
* @example
* //Create a simple numeric SampledProperty that uses third degree Hermite Polynomial Approximation
* const property = new Cesium.SampledProperty(Number);
@@ -153,7 +149,6 @@ function mergeNewSamples(epoch, times, values, newData, packedLength) {
*
* //Retrieve an interpolated value
* const result = property.getValue(Cesium.JulianDate.fromIso8601('2012-08-01T00:02:34.00Z'));
- *
* @see SampledPositionProperty
*/
function SampledProperty(type, derivativeTypes) {
@@ -220,7 +215,6 @@ Object.defineProperties(SampledProperty.prototype, {
* Gets a value indicating if this property is constant. A property is considered
* constant if getValue always returns the same result for the current definition.
* @memberof SampledProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -234,7 +228,6 @@ Object.defineProperties(SampledProperty.prototype, {
* The definition is considered to have changed if a call to getValue would return
* a different result for the same time.
* @memberof SampledProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -361,7 +354,6 @@ Object.defineProperties(SampledProperty.prototype, {
/**
* Gets the value of the property at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -534,7 +526,6 @@ SampledProperty.prototype.getValue = function (time, result) {
/**
* Sets the algorithm and degree to use when interpolating a value.
- *
* @param {object} [options] Object with the following properties:
* @param {InterpolationAlgorithm} [options.interpolationAlgorithm] The new interpolation algorithm. If undefined, the existing property will be unchanged.
* @param {number} [options.interpolationDegree] The new interpolation degree. If undefined, the existing property will be unchanged.
@@ -573,7 +564,6 @@ SampledProperty.prototype.setInterpolationOptions = function (options) {
/**
* Adds a new sample.
- *
* @param {JulianDate} time The sample time.
* @param {Packable} value The value at the provided time.
* @param {Packable[]} [derivatives] The array of derivatives at the provided time.
@@ -614,13 +604,11 @@ SampledProperty.prototype.addSample = function (time, value, derivatives) {
/**
* Adds an array of samples.
- *
* @param {JulianDate[]} times An array of JulianDate instances where each index is a sample time.
* @param {Packable[]} values The array of values, where each value corresponds to the provided times index.
* @param {Array[]} [derivativeValues] An array where each item is the array of derivatives at the equivalent time index.
- *
- * @exception {DeveloperError} times and values must be the same length.
- * @exception {DeveloperError} times and derivativeValues must be the same length.
+ * @throws {DeveloperError} times and values must be the same length.
+ * @throws {DeveloperError} times and derivativeValues must be the same length.
*/
SampledProperty.prototype.addSamples = function (
times,
@@ -675,7 +663,6 @@ SampledProperty.prototype.addSamples = function (
/**
* Adds samples as a single packed array where each new sample is represented as a date,
* followed by the packed representation of the corresponding value and derivatives.
- *
* @param {number[]} packedSamples The array of packed samples.
* @param {JulianDate} [epoch] If any of the dates in packedSamples are numbers, they are considered an offset from this epoch, in seconds.
*/
@@ -700,7 +687,6 @@ SampledProperty.prototype.addSamplesPackedArray = function (
/**
* Removes a sample at the given time, if present.
- *
* @param {JulianDate} time The sample time.
* @returns {boolean} true
if a sample at time was removed, false
otherwise.
*/
@@ -730,8 +716,8 @@ function removeSamples(property, startIndex, numberToRemove) {
/**
* Removes all samples for the given time interval.
- *
* @param {TimeInterval} time The time interval for which to remove all samples.
+ * @param timeInterval
*/
SampledProperty.prototype.removeSamples = function (timeInterval) {
//>>includeStart('debug', pragmas.debug);
@@ -758,7 +744,6 @@ SampledProperty.prototype.removeSamples = function (timeInterval) {
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/ScaledPositionProperty.js b/packages/engine/Source/DataSources/ScaledPositionProperty.js
index 36f70b46247c..710c9b9644d6 100644
--- a/packages/engine/Source/DataSources/ScaledPositionProperty.js
+++ b/packages/engine/Source/DataSources/ScaledPositionProperty.js
@@ -8,6 +8,7 @@ import Property from "./Property.js";
/**
* This is a temporary class for scaling position properties to the WGS84 surface.
* It will go away or be refactored to support data with arbitrary height references.
+ * @param value
* @private
*/
function ScaledPositionProperty(value) {
diff --git a/packages/engine/Source/DataSources/StaticGeometryColorBatch.js b/packages/engine/Source/DataSources/StaticGeometryColorBatch.js
index fde70acb1b51..3717f06074fc 100644
--- a/packages/engine/Source/DataSources/StaticGeometryColorBatch.js
+++ b/packages/engine/Source/DataSources/StaticGeometryColorBatch.js
@@ -397,6 +397,11 @@ Batch.prototype.destroy = function () {
};
/**
+ * @param primitives
+ * @param appearanceType
+ * @param depthFailAppearanceType
+ * @param closed
+ * @param shadows
* @private
*/
function StaticGeometryColorBatch(
diff --git a/packages/engine/Source/DataSources/StaticGeometryPerMaterialBatch.js b/packages/engine/Source/DataSources/StaticGeometryPerMaterialBatch.js
index 0efdf9ac7aae..7de5bb37a50a 100644
--- a/packages/engine/Source/DataSources/StaticGeometryPerMaterialBatch.js
+++ b/packages/engine/Source/DataSources/StaticGeometryPerMaterialBatch.js
@@ -382,6 +382,11 @@ Batch.prototype.destroy = function () {
};
/**
+ * @param primitives
+ * @param appearanceType
+ * @param depthFailAppearanceType
+ * @param closed
+ * @param shadows
* @private
*/
function StaticGeometryPerMaterialBatch(
diff --git a/packages/engine/Source/DataSources/StaticGroundGeometryColorBatch.js b/packages/engine/Source/DataSources/StaticGroundGeometryColorBatch.js
index 54c5a9ee95a9..cb199ed75916 100644
--- a/packages/engine/Source/DataSources/StaticGroundGeometryColorBatch.js
+++ b/packages/engine/Source/DataSources/StaticGroundGeometryColorBatch.js
@@ -280,6 +280,8 @@ Batch.prototype.removeAllPrimitives = function () {
};
/**
+ * @param primitives
+ * @param classificationType
* @private
*/
function StaticGroundGeometryColorBatch(primitives, classificationType) {
diff --git a/packages/engine/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js b/packages/engine/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js
index c162597ec714..cdd550b26ff0 100644
--- a/packages/engine/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js
+++ b/packages/engine/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js
@@ -309,6 +309,9 @@ Batch.prototype.destroy = function () {
};
/**
+ * @param primitives
+ * @param classificationType
+ * @param appearanceType
* @private
*/
function StaticGroundGeometryPerMaterialBatch(
diff --git a/packages/engine/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js b/packages/engine/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js
index c1284c71d9ed..85c9424ef8aa 100644
--- a/packages/engine/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js
+++ b/packages/engine/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js
@@ -330,6 +330,9 @@ Batch.prototype.destroy = function () {
};
/**
+ * @param orderedGroundPrimitives
+ * @param classificationType
+ * @param asynchronous
* @private
*/
function StaticGroundPolylinePerMaterialBatch(
diff --git a/packages/engine/Source/DataSources/StaticOutlineGeometryBatch.js b/packages/engine/Source/DataSources/StaticOutlineGeometryBatch.js
index 5464a56a7886..ec9dc8102248 100644
--- a/packages/engine/Source/DataSources/StaticOutlineGeometryBatch.js
+++ b/packages/engine/Source/DataSources/StaticOutlineGeometryBatch.js
@@ -312,6 +312,9 @@ Batch.prototype.removeAllPrimitives = function () {
};
/**
+ * @param primitives
+ * @param scene
+ * @param shadows
* @private
*/
function StaticOutlineGeometryBatch(primitives, scene, shadows) {
diff --git a/packages/engine/Source/DataSources/StripeMaterialProperty.js b/packages/engine/Source/DataSources/StripeMaterialProperty.js
index c778483802a2..58b263842cc0 100644
--- a/packages/engine/Source/DataSources/StripeMaterialProperty.js
+++ b/packages/engine/Source/DataSources/StripeMaterialProperty.js
@@ -15,14 +15,13 @@ const defaultRepeat = 1;
/**
* A {@link MaterialProperty} that maps to stripe {@link Material} uniforms.
* @alias StripeMaterialProperty
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {Property|StripeOrientation} [options.orientation=StripeOrientation.HORIZONTAL] A Property specifying the {@link StripeOrientation}.
- * @param {Property|Color} [options.evenColor=Color.WHITE] A Property specifying the first {@link Color}.
- * @param {Property|Color} [options.oddColor=Color.BLACK] A Property specifying the second {@link Color}.
- * @param {Property|number} [options.offset=0] A numeric Property specifying how far into the pattern to start the material.
- * @param {Property|number} [options.repeat=1] A numeric Property specifying how many times the stripes repeat.
+ * @param {Property|StripeOrientation} [options.orientation] A Property specifying the {@link StripeOrientation}.
+ * @param {Property|Color} [options.evenColor] A Property specifying the first {@link Color}.
+ * @param {Property|Color} [options.oddColor] A Property specifying the second {@link Color}.
+ * @param {Property|number} [options.offset] A numeric Property specifying how far into the pattern to start the material.
+ * @param {Property|number} [options.repeat] A numeric Property specifying how many times the stripes repeat.
*/
function StripeMaterialProperty(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -51,7 +50,6 @@ Object.defineProperties(StripeMaterialProperty.prototype, {
* Gets a value indicating if this property is constant. A property is considered
* constant if getValue always returns the same result for the current definition.
* @memberof StripeMaterialProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -71,7 +69,6 @@ Object.defineProperties(StripeMaterialProperty.prototype, {
* The definition is considered to have changed if a call to getValue would return
* a different result for the same time.
* @memberof StripeMaterialProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -127,7 +124,6 @@ Object.defineProperties(StripeMaterialProperty.prototype, {
/**
* Gets the {@link Material} type at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the type.
* @returns {string} The type of material.
*/
@@ -137,7 +133,6 @@ StripeMaterialProperty.prototype.getType = function (time) {
/**
* Gets the value of the property at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -169,7 +164,6 @@ StripeMaterialProperty.prototype.getValue = function (time, result) {
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/StripeOrientation.js b/packages/engine/Source/DataSources/StripeOrientation.js
index 5ad1b6369921..de3623082956 100644
--- a/packages/engine/Source/DataSources/StripeOrientation.js
+++ b/packages/engine/Source/DataSources/StripeOrientation.js
@@ -1,6 +1,5 @@
/**
* Defined the orientation of stripes in {@link StripeMaterialProperty}.
- *
* @enum {number}
*/
const StripeOrientation = {
diff --git a/packages/engine/Source/DataSources/TerrainOffsetProperty.js b/packages/engine/Source/DataSources/TerrainOffsetProperty.js
index 662d108eed26..cefa460b8fc0 100644
--- a/packages/engine/Source/DataSources/TerrainOffsetProperty.js
+++ b/packages/engine/Source/DataSources/TerrainOffsetProperty.js
@@ -14,6 +14,10 @@ import Property from "./Property.js";
const scratchPosition = new Cartesian3();
/**
+ * @param scene
+ * @param positionProperty
+ * @param heightReferenceProperty
+ * @param extrudedHeightReferenceProperty
* @private
*/
function TerrainOffsetProperty(
@@ -83,7 +87,6 @@ Object.defineProperties(TerrainOffsetProperty.prototype, {
/**
* Gets a value indicating if this property is constant.
* @memberof TerrainOffsetProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -95,7 +98,6 @@ Object.defineProperties(TerrainOffsetProperty.prototype, {
/**
* Gets the event that is raised whenever the definition of this property changes.
* @memberof TerrainOffsetProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -149,7 +151,8 @@ TerrainOffsetProperty.prototype._updateClamping = function () {
/**
* Gets the height relative to the terrain based on the positions.
- *
+ * @param time
+ * @param result
* @returns {Cartesian3} The offset
*/
TerrainOffsetProperty.prototype.getValue = function (time, result) {
diff --git a/packages/engine/Source/DataSources/TimeIntervalCollectionPositionProperty.js b/packages/engine/Source/DataSources/TimeIntervalCollectionPositionProperty.js
index 9fd6a16a7a4a..ce324eaf2947 100644
--- a/packages/engine/Source/DataSources/TimeIntervalCollectionPositionProperty.js
+++ b/packages/engine/Source/DataSources/TimeIntervalCollectionPositionProperty.js
@@ -9,11 +9,9 @@ import Property from "./Property.js";
/**
* A {@link TimeIntervalCollectionProperty} which is also a {@link PositionProperty}.
- *
* @alias TimeIntervalCollectionPositionProperty
- * @constructor
- *
- * @param {ReferenceFrame} [referenceFrame=ReferenceFrame.FIXED] The reference frame in which the position is defined.
+ * @class
+ * @param {ReferenceFrame} [referenceFrame] The reference frame in which the position is defined.
*/
function TimeIntervalCollectionPositionProperty(referenceFrame) {
this._definitionChanged = new Event();
@@ -30,7 +28,6 @@ Object.defineProperties(TimeIntervalCollectionPositionProperty.prototype, {
* Gets a value indicating if this property is constant. A property is considered
* constant if getValue always returns the same result for the current definition.
* @memberof TimeIntervalCollectionPositionProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -44,7 +41,6 @@ Object.defineProperties(TimeIntervalCollectionPositionProperty.prototype, {
* The definition is considered to have changed if a call to getValue would return
* a different result for the same time.
* @memberof TimeIntervalCollectionPositionProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -80,7 +76,6 @@ Object.defineProperties(TimeIntervalCollectionPositionProperty.prototype, {
/**
* Gets the value of the property at the provided time in the fixed frame.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {Cartesian3 | undefined} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -94,7 +89,6 @@ TimeIntervalCollectionPositionProperty.prototype.getValue = function (
/**
* Gets the value of the property at the provided time and in the provided reference frame.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {ReferenceFrame} referenceFrame The desired referenceFrame of the result.
* @param {Cartesian3} [result] The object to store the value into, if omitted, a new instance is created and returned.
@@ -130,7 +124,6 @@ TimeIntervalCollectionPositionProperty.prototype.getValueInReferenceFrame = func
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/TimeIntervalCollectionProperty.js b/packages/engine/Source/DataSources/TimeIntervalCollectionProperty.js
index 3c7f5a4b8f82..1e0f631683d9 100644
--- a/packages/engine/Source/DataSources/TimeIntervalCollectionProperty.js
+++ b/packages/engine/Source/DataSources/TimeIntervalCollectionProperty.js
@@ -7,10 +7,8 @@ import Property from "./Property.js";
/**
* A {@link Property} which is defined by a {@link TimeIntervalCollection}, where the
* data property of each {@link TimeInterval} represents the value at time.
- *
* @alias TimeIntervalCollectionProperty
- * @constructor
- *
+ * @class
* @example
* //Create a Cartesian2 interval property which contains data on August 1st, 2012
* //and uses a different value every 6 hours.
@@ -54,7 +52,6 @@ Object.defineProperties(TimeIntervalCollectionProperty.prototype, {
* Gets a value indicating if this property is constant. A property is considered
* constant if getValue always returns the same result for the current definition.
* @memberof TimeIntervalCollectionProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -68,7 +65,6 @@ Object.defineProperties(TimeIntervalCollectionProperty.prototype, {
* The definition is changed whenever setValue is called with data different
* than the current value.
* @memberof TimeIntervalCollectionProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -80,7 +76,6 @@ Object.defineProperties(TimeIntervalCollectionProperty.prototype, {
/**
* Gets the interval collection.
* @memberof TimeIntervalCollectionProperty.prototype
- *
* @type {TimeIntervalCollection}
* @readonly
*/
@@ -93,7 +88,6 @@ Object.defineProperties(TimeIntervalCollectionProperty.prototype, {
/**
* Gets the value of the property at the provided time.
- *
* @param {JulianDate} time The time for which to retrieve the value.
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -115,7 +109,6 @@ TimeIntervalCollectionProperty.prototype.getValue = function (time, result) {
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/VelocityOrientationProperty.js b/packages/engine/Source/DataSources/VelocityOrientationProperty.js
index f6b2788542ba..5b1fc53255a5 100644
--- a/packages/engine/Source/DataSources/VelocityOrientationProperty.js
+++ b/packages/engine/Source/DataSources/VelocityOrientationProperty.js
@@ -12,13 +12,10 @@ import VelocityVectorProperty from "./VelocityVectorProperty.js";
/**
* A {@link Property} which evaluates to a {@link Quaternion} rotation
* based on the velocity of the provided {@link PositionProperty}.
- *
* @alias VelocityOrientationProperty
- * @constructor
- *
+ * @class
* @param {PositionProperty} [position] The position property used to compute the orientation.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid used to determine which way is up.
- *
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid used to determine which way is up.
* @example
* //Create an entity with position and orientation.
* const position = new Cesium.SampledProperty();
@@ -46,7 +43,6 @@ Object.defineProperties(VelocityOrientationProperty.prototype, {
/**
* Gets a value indicating if this property is constant.
* @memberof VelocityOrientationProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -58,7 +54,6 @@ Object.defineProperties(VelocityOrientationProperty.prototype, {
/**
* Gets the event that is raised whenever the definition of this property changes.
* @memberof VelocityOrientationProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -70,7 +65,6 @@ Object.defineProperties(VelocityOrientationProperty.prototype, {
/**
* Gets or sets the position property used to compute orientation.
* @memberof VelocityOrientationProperty.prototype
- *
* @type {Property|undefined}
*/
position: {
@@ -84,7 +78,6 @@ Object.defineProperties(VelocityOrientationProperty.prototype, {
/**
* Gets or sets the ellipsoid used to determine which way is up.
* @memberof VelocityOrientationProperty.prototype
- *
* @type {Property|undefined}
*/
ellipsoid: {
@@ -107,7 +100,6 @@ const rotationScratch = new Matrix3();
/**
* Gets the value of the property at the provided time.
- *
* @param {JulianDate} [time] The time for which to retrieve the value.
* @param {Quaternion} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {Quaternion} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -135,7 +127,6 @@ VelocityOrientationProperty.prototype.getValue = function (time, result) {
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/VelocityVectorProperty.js b/packages/engine/Source/DataSources/VelocityVectorProperty.js
index 0184422ffd05..d061617c0749 100644
--- a/packages/engine/Source/DataSources/VelocityVectorProperty.js
+++ b/packages/engine/Source/DataSources/VelocityVectorProperty.js
@@ -9,13 +9,10 @@ import Property from "./Property.js";
/**
* A {@link Property} which evaluates to a {@link Cartesian3} vector
* based on the velocity of the provided {@link PositionProperty}.
- *
* @alias VelocityVectorProperty
- * @constructor
- *
+ * @class
* @param {PositionProperty} [position] The position property used to compute the velocity.
- * @param {boolean} [normalize=true] Whether to normalize the computed velocity vector.
- *
+ * @param {boolean} [normalize] Whether to normalize the computed velocity vector.
* @example
* //Create an entity with a billboard rotated to match its velocity.
* const position = new Cesium.SampledProperty();
@@ -41,7 +38,6 @@ Object.defineProperties(VelocityVectorProperty.prototype, {
/**
* Gets a value indicating if this property is constant.
* @memberof VelocityVectorProperty.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -53,7 +49,6 @@ Object.defineProperties(VelocityVectorProperty.prototype, {
/**
* Gets the event that is raised whenever the definition of this property changes.
* @memberof VelocityVectorProperty.prototype
- *
* @type {Event}
* @readonly
*/
@@ -65,7 +60,6 @@ Object.defineProperties(VelocityVectorProperty.prototype, {
/**
* Gets or sets the position property used to compute the velocity vector.
* @memberof VelocityVectorProperty.prototype
- *
* @type {Property|undefined}
*/
position: {
@@ -98,7 +92,6 @@ Object.defineProperties(VelocityVectorProperty.prototype, {
* Gets or sets whether the vector produced by this property
* will be normalized or not.
* @memberof VelocityVectorProperty.prototype
- *
* @type {boolean}
*/
normalize: {
@@ -123,7 +116,6 @@ const step = 1.0 / 60.0;
/**
* Gets the value of the property at the provided time.
- *
* @param {JulianDate} [time] The time for which to retrieve the value.
* @param {Cartesian3} [result] The object to store the value into, if omitted, a new instance is created and returned.
* @returns {Cartesian3} The modified result parameter or a new instance if the result parameter was not supplied.
@@ -133,6 +125,9 @@ VelocityVectorProperty.prototype.getValue = function (time, result) {
};
/**
+ * @param time
+ * @param velocityResult
+ * @param positionResult
* @private
*/
VelocityVectorProperty.prototype._getValue = function (
@@ -202,7 +197,6 @@ VelocityVectorProperty.prototype._getValue = function (
/**
* Compares this property to the provided property and returns
* true
if they are equal, false
otherwise.
- *
* @param {Property} [other] The other property.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/DataSources/Visualizer.js b/packages/engine/Source/DataSources/Visualizer.js
index fc9331513f97..e871d5f91e3d 100644
--- a/packages/engine/Source/DataSources/Visualizer.js
+++ b/packages/engine/Source/DataSources/Visualizer.js
@@ -7,8 +7,7 @@ import DeveloperError from "../Core/DeveloperError.js";
* This object is an interface for documentation purposes and is not intended
* to be instantiated directly.
* @alias Visualizer
- * @constructor
- *
+ * @class
* @see BillboardVisualizer
* @see LabelVisualizer
* @see ModelVisualizer
@@ -23,9 +22,7 @@ function Visualizer() {
/**
* Updates the visualization to the provided time.
* @function
- *
* @param {JulianDate} time The time.
- *
* @returns {boolean} True if the display was updated to the provided time,
* false if the visualizer is waiting for an asynchronous operation to
* complete before data can be updated.
@@ -35,7 +32,6 @@ Visualizer.prototype.update = DeveloperError.throwInstantiationError;
/**
* Computes a bounding sphere which encloses the visualization produced for the specified entity.
* The bounding sphere is in the fixed frame of the scene's globe.
- *
* @param {Entity} entity The entity whose bounding sphere to compute.
* @param {BoundingSphere} result The bounding sphere onto which to store the result.
* @returns {BoundingSphereState} BoundingSphereState.DONE if the result contains the bounding sphere,
@@ -48,7 +44,6 @@ Visualizer.prototype.getBoundingSphere = DeveloperError.throwInstantiationError;
/**
* Returns true if this object was destroyed; otherwise, false.
* @function
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
*/
Visualizer.prototype.isDestroyed = DeveloperError.throwInstantiationError;
diff --git a/packages/engine/Source/DataSources/WallGeometryUpdater.js b/packages/engine/Source/DataSources/WallGeometryUpdater.js
index 45c01e0cd742..ba3d30026f6a 100644
--- a/packages/engine/Source/DataSources/WallGeometryUpdater.js
+++ b/packages/engine/Source/DataSources/WallGeometryUpdater.js
@@ -31,8 +31,7 @@ function WallGeometryOptions(entity) {
* A {@link GeometryUpdater} for walls.
* Clients do not normally create this class directly, but instead rely on {@link DataSourceDisplay}.
* @alias WallGeometryUpdater
- * @constructor
- *
+ * @class
* @param {Entity} entity The entity containing the geometry to be visualized.
* @param {Scene} scene The scene where visualization is taking place.
*/
@@ -55,11 +54,9 @@ if (defined(Object.create)) {
/**
* Creates the geometry instance which represents the fill of the geometry.
- *
* @param {JulianDate} time The time to use when retrieving initial attribute values.
* @returns {GeometryInstance} The geometry instance representing the filled portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent a filled geometry.
+ * @throws {DeveloperError} This instance does not represent a filled geometry.
*/
WallGeometryUpdater.prototype.createFillGeometryInstance = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -123,11 +120,9 @@ WallGeometryUpdater.prototype.createFillGeometryInstance = function (time) {
/**
* Creates the geometry instance which represents the outline of the geometry.
- *
* @param {JulianDate} time The time to use when retrieving initial attribute values.
* @returns {GeometryInstance} The geometry instance representing the outline portion of the geometry.
- *
- * @exception {DeveloperError} This instance does not represent an outlined geometry.
+ * @throws {DeveloperError} This instance does not represent an outlined geometry.
*/
WallGeometryUpdater.prototype.createOutlineGeometryInstance = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -220,6 +215,9 @@ WallGeometryUpdater.prototype._setStaticOptions = function (entity, wall) {
WallGeometryUpdater.DynamicGeometryUpdater = DynamicWallGeometryUpdater;
/**
+ * @param geometryUpdater
+ * @param primitives
+ * @param groundPrimitives
* @private
*/
function DynamicWallGeometryUpdater(
diff --git a/packages/engine/Source/DataSources/WallGraphics.js b/packages/engine/Source/DataSources/WallGraphics.js
index 05653c9225bf..319eed157b09 100644
--- a/packages/engine/Source/DataSources/WallGraphics.js
+++ b/packages/engine/Source/DataSources/WallGraphics.js
@@ -9,7 +9,6 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @typedef {object} WallGraphics.ConstructorOptions
*
* Initialization options for the WallGraphics constructor
- *
* @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the wall.
* @property {Property | Cartesian3[]} [positions] A Property specifying the array of {@link Cartesian3} positions which define the top of the wall.
* @property {Property | number[]} [minimumHeights] A Property specifying an array of heights to be used for the bottom of the wall instead of the globe surface.
@@ -27,12 +26,9 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
/**
* Describes a two dimensional wall defined as a line strip and optional maximum and minimum heights.
* The wall conforms to the curvature of the globe and can be placed along the surface or at altitude.
- *
* @alias WallGraphics
- * @constructor
- *
+ * @class
* @param {WallGraphics.ConstructorOptions} [options] Object describing initialization options
- *
* @see Entity
* @demo {@link https://sandcastle.cesium.com/index.html?src=Wall.html|Cesium Sandcastle Wall Demo}
*/
@@ -70,7 +66,6 @@ Object.defineProperties(WallGraphics.prototype, {
/**
* Gets the event that is raised whenever a property or sub-property is changed or modified.
* @memberof WallGraphics.prototype
- *
* @type {Event}
* @readonly
*/
@@ -183,7 +178,6 @@ Object.defineProperties(WallGraphics.prototype, {
/**
* Duplicates this instance.
- *
* @param {WallGraphics} [result] The object onto which to store the result.
* @returns {WallGraphics} The modified result parameter or a new instance if one was not provided.
*/
@@ -209,7 +203,6 @@ WallGraphics.prototype.clone = function (result) {
/**
* Assigns each unassigned property on this object to the value
* of the same property on the provided source object.
- *
* @param {WallGraphics} source The object to be merged into this object.
*/
WallGraphics.prototype.merge = function (source) {
diff --git a/packages/engine/Source/DataSources/createMaterialPropertyDescriptor.js b/packages/engine/Source/DataSources/createMaterialPropertyDescriptor.js
index 59273a451682..79e4cd4f7e2a 100644
--- a/packages/engine/Source/DataSources/createMaterialPropertyDescriptor.js
+++ b/packages/engine/Source/DataSources/createMaterialPropertyDescriptor.js
@@ -27,6 +27,8 @@ function createMaterialProperty(value) {
}
/**
+ * @param name
+ * @param configurable
* @private
*/
function createMaterialPropertyDescriptor(name, configurable) {
diff --git a/packages/engine/Source/DataSources/createPropertyDescriptor.js b/packages/engine/Source/DataSources/createPropertyDescriptor.js
index 689757dba97b..94bb2d7e3edf 100644
--- a/packages/engine/Source/DataSources/createPropertyDescriptor.js
+++ b/packages/engine/Source/DataSources/createPropertyDescriptor.js
@@ -56,6 +56,9 @@ function createConstantProperty(value) {
* Used to consistently define all DataSources graphics objects.
* This is broken into two functions because the Chrome profiler does a better
* job of optimizing lookups if it notices that the string is constant throughout the function.
+ * @param name
+ * @param configurable
+ * @param createPropertyCallback
* @private
*/
function createPropertyDescriptor(name, configurable, createPropertyCallback) {
diff --git a/packages/engine/Source/DataSources/createRawPropertyDescriptor.js b/packages/engine/Source/DataSources/createRawPropertyDescriptor.js
index 2d13d922e8c5..31df7b1a9fb9 100644
--- a/packages/engine/Source/DataSources/createRawPropertyDescriptor.js
+++ b/packages/engine/Source/DataSources/createRawPropertyDescriptor.js
@@ -5,6 +5,8 @@ function createRawProperty(value) {
}
/**
+ * @param name
+ * @param configurable
* @private
*/
function createRawPropertyDescriptor(name, configurable) {
diff --git a/packages/engine/Source/DataSources/exportKml.js b/packages/engine/Source/DataSources/exportKml.js
index 9cfb3fa10a29..80eab6aa3307 100644
--- a/packages/engine/Source/DataSources/exportKml.js
+++ b/packages/engine/Source/DataSources/exportKml.js
@@ -244,18 +244,15 @@ IdManager.prototype.get = function (id) {
* the options.sampleDuration. Point, Billboard, Model and Path geometries with time-dynamic positions will be exported
* as gx:Track Features. Not all Materials are representable in KML, so for more advanced Materials just the primary
* color is used. Canvas objects are exported as PNG images.
- *
* @function exportKml
- *
* @param {object} options An object with the following properties:
* @param {EntityCollection} options.entities The EntityCollection to export as KML.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid for the output file.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid for the output file.
* @param {exportKmlModelCallback} [options.modelCallback] A callback that will be called with a {@link ModelGraphics} instance and should return the URI to use in the KML. Required if a model exists in the entity collection.
- * @param {JulianDate} [options.time=entities.computeAvailability().start] The time value to use to get properties that are not time varying in KML.
- * @param {TimeInterval} [options.defaultAvailability=entities.computeAvailability()] The interval that will be sampled if an entity doesn't have an availability.
- * @param {number} [options.sampleDuration=60] The number of seconds to sample properties that are varying in KML.
- * @param {boolean} [options.kmz=false] If true KML and external files will be compressed into a kmz file.
- *
+ * @param {JulianDate} [options.time] The time value to use to get properties that are not time varying in KML.
+ * @param {TimeInterval} [options.defaultAvailability] The interval that will be sampled if an entity doesn't have an availability.
+ * @param {number} [options.sampleDuration] The number of seconds to sample properties that are varying in KML.
+ * @param {boolean} [options.kmz] If true KML and external files will be compressed into a kmz file.
* @returns {Promise} A promise that resolved to an object containing the KML string and a dictionary of external file blobs, or a kmz file as a blob if options.kmz is true.
* @demo {@link https://sandcastle.cesium.com/index.html?src=Export%20KML.html|Cesium Sandcastle KML Export Demo}
* @example
@@ -271,7 +268,6 @@ IdManager.prototype.get = function (id) {
* // externalFiles[file] is a blob with the contents of the file
* }
* });
- *
*/
function exportKml(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -1508,9 +1504,7 @@ function colorToString(color) {
* Since KML does not support glTF models, this callback is required to specify what URL to use for the model in the KML document.
* It can also be used to add additional files to the externalFiles
object, which is the list of files embedded in the exported KMZ,
* or otherwise returned with the KML string when exporting.
- *
* @callback exportKmlModelCallback
- *
* @param {ModelGraphics} model The ModelGraphics instance for an Entity.
* @param {JulianDate} time The time that any properties should use to get the value.
* @param {object} externalFiles An object that maps a filename to a Blob or a Promise that resolves to a Blob.
diff --git a/packages/engine/Source/DataSources/getElement.js b/packages/engine/Source/DataSources/getElement.js
index 987275ff8e59..8c32e6557511 100644
--- a/packages/engine/Source/DataSources/getElement.js
+++ b/packages/engine/Source/DataSources/getElement.js
@@ -2,10 +2,9 @@ import DeveloperError from "../Core/DeveloperError.js";
/**
* If element is a string, look up the element in the DOM by ID. Otherwise return element.
- *
+ * @param element
* @private
- *
- * @exception {DeveloperError} Element with id "id" does not exist in the document.
+ * @throws {DeveloperError} Element with id "id" does not exist in the document.
*/
function getElement(element) {
if (typeof element === "string") {
diff --git a/packages/engine/Source/Renderer/AutomaticUniforms.js b/packages/engine/Source/Renderer/AutomaticUniforms.js
index 0b16c23ae9a3..e9d644bf9761 100644
--- a/packages/engine/Source/Renderer/AutomaticUniforms.js
+++ b/packages/engine/Source/Renderer/AutomaticUniforms.js
@@ -50,7 +50,6 @@ const AutomaticUniforms = {
* An automatic GLSL uniform containing the viewport's x
, y
, width
,
* and height
properties in an vec4
's x
, y
, z
,
* and w
components, respectively.
- *
* @example
* // GLSL declaration
* uniform vec4 czm_viewport;
@@ -58,7 +57,6 @@ const AutomaticUniforms = {
* // Scale the window coordinate components to [0, 1] by dividing
* // by the viewport's width and height.
* vec2 v = gl_FragCoord.xy / czm_viewport.zw;
- *
* @see Context#getViewport
*/
czm_viewport: new AutomaticUniform({
@@ -80,14 +78,12 @@ const AutomaticUniforms = {
* Do not confuse {@link czm_viewportTransformation} with czm_viewportOrthographic
.
* The former transforms from normalized device coordinates to window coordinates; the later transforms
* from window coordinates to clip coordinates, and is often used to assign to gl_Position
.
- *
* @example
* // GLSL declaration
* uniform mat4 czm_viewportOrthographic;
*
* // Example
* gl_Position = czm_viewportOrthographic * vec4(windowPosition, 0.0, 1.0);
- *
* @see UniformState#viewportOrthographic
* @see czm_viewport
* @see czm_viewportTransformation
@@ -115,7 +111,6 @@ const AutomaticUniforms = {
* Do not confuse czm_viewportTransformation
with {@link czm_viewportOrthographic}.
* The former transforms from normalized device coordinates to window coordinates; the later transforms
* from window coordinates to clip coordinates, and is often used to assign to gl_Position
.
- *
* @example
* // GLSL declaration
* uniform mat4 czm_viewportTransformation;
@@ -125,7 +120,6 @@ const AutomaticUniforms = {
* vec4 q = czm_modelViewProjection * positionMC; // model to clip coordinates
* q.xyz /= q.w; // clip to normalized device coordinates (ndc)
* q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // ndc to window coordinates
- *
* @see UniformState#viewportTransformation
* @see czm_viewport
* @see czm_viewportOrthographic
@@ -144,7 +138,6 @@ const AutomaticUniforms = {
* An automatic GLSL uniform representing the depth of the scene
* after the globe pass and then updated after the 3D Tiles pass.
* The depth is packed into an RGBA texture.
- *
* @example
* // GLSL declaration
* uniform sampler2D czm_globeDepthTexture;
@@ -164,14 +157,12 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing a 4x4 model transformation matrix that
* transforms model coordinates to world coordinates.
- *
* @example
* // GLSL declaration
* uniform mat4 czm_model;
*
* // Example
* vec4 worldPosition = czm_model * modelPosition;
- *
* @see UniformState#model
* @see czm_inverseModel
* @see czm_modelView
@@ -188,14 +179,12 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing a 4x4 model transformation matrix that
* transforms world coordinates to model coordinates.
- *
* @example
* // GLSL declaration
* uniform mat4 czm_inverseModel;
*
* // Example
* vec4 modelPosition = czm_inverseModel * worldPosition;
- *
* @see UniformState#inverseModel
* @see czm_model
* @see czm_inverseModelView
@@ -211,14 +200,12 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing a 4x4 view transformation matrix that
* transforms world coordinates to eye coordinates.
- *
* @example
* // GLSL declaration
* uniform mat4 czm_view;
*
* // Example
* vec4 eyePosition = czm_view * worldPosition;
- *
* @see UniformState#view
* @see czm_viewRotation
* @see czm_modelView
@@ -240,14 +227,12 @@ const AutomaticUniforms = {
* {@link czm_view}, but in 2D and Columbus View it represents the view matrix
* as if the camera were at an equivalent location in 3D mode. This is useful for lighting
* 2D and Columbus View in the same way that 3D is lit.
- *
* @example
* // GLSL declaration
* uniform mat4 czm_view3D;
*
* // Example
* vec4 eyePosition3D = czm_view3D * worldPosition3D;
- *
* @see UniformState#view3D
* @see czm_view
*/
@@ -262,14 +247,12 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing a 3x3 view rotation matrix that
* transforms vectors in world coordinates to eye coordinates.
- *
* @example
* // GLSL declaration
* uniform mat3 czm_viewRotation;
*
* // Example
* vec3 eyeVector = czm_viewRotation * worldVector;
- *
* @see UniformState#viewRotation
* @see czm_view
* @see czm_inverseView
@@ -289,14 +272,12 @@ const AutomaticUniforms = {
* {@link czm_viewRotation}, but in 2D and Columbus View it represents the view matrix
* as if the camera were at an equivalent location in 3D mode. This is useful for lighting
* 2D and Columbus View in the same way that 3D is lit.
- *
* @example
* // GLSL declaration
* uniform mat3 czm_viewRotation3D;
*
* // Example
* vec3 eyeVector = czm_viewRotation3D * worldVector;
- *
* @see UniformState#viewRotation3D
* @see czm_viewRotation
*/
@@ -311,14 +292,12 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing a 4x4 transformation matrix that
* transforms from eye coordinates to world coordinates.
- *
* @example
* // GLSL declaration
* uniform mat4 czm_inverseView;
*
* // Example
* vec4 worldPosition = czm_inverseView * eyePosition;
- *
* @see UniformState#inverseView
* @see czm_view
* @see czm_inverseNormal
@@ -337,14 +316,12 @@ const AutomaticUniforms = {
* {@link czm_inverseView}, but in 2D and Columbus View it represents the inverse view matrix
* as if the camera were at an equivalent location in 3D mode. This is useful for lighting
* 2D and Columbus View in the same way that 3D is lit.
- *
* @example
* // GLSL declaration
* uniform mat4 czm_inverseView3D;
*
* // Example
* vec4 worldPosition = czm_inverseView3D * eyePosition;
- *
* @see UniformState#inverseView3D
* @see czm_inverseView
*/
@@ -359,14 +336,12 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing a 3x3 rotation matrix that
* transforms vectors from eye coordinates to world coordinates.
- *
* @example
* // GLSL declaration
* uniform mat3 czm_inverseViewRotation;
*
* // Example
* vec4 worldVector = czm_inverseViewRotation * eyeVector;
- *
* @see UniformState#inverseView
* @see czm_view
* @see czm_viewRotation
@@ -386,14 +361,12 @@ const AutomaticUniforms = {
* {@link czm_inverseViewRotation}, but in 2D and Columbus View it represents the inverse view matrix
* as if the camera were at an equivalent location in 3D mode. This is useful for lighting
* 2D and Columbus View in the same way that 3D is lit.
- *
* @example
* // GLSL declaration
* uniform mat3 czm_inverseViewRotation3D;
*
* // Example
* vec4 worldVector = czm_inverseViewRotation3D * eyeVector;
- *
* @see UniformState#inverseView3D
* @see czm_inverseViewRotation
*/
@@ -409,14 +382,12 @@ const AutomaticUniforms = {
* An automatic GLSL uniform representing a 4x4 projection transformation matrix that
* transforms eye coordinates to clip coordinates. Clip coordinates is the
* coordinate system for a vertex shader's gl_Position
output.
- *
* @example
* // GLSL declaration
* uniform mat4 czm_projection;
*
* // Example
* gl_Position = czm_projection * eyePosition;
- *
* @see UniformState#projection
* @see czm_viewProjection
* @see czm_modelViewProjection
@@ -434,14 +405,12 @@ const AutomaticUniforms = {
* An automatic GLSL uniform representing a 4x4 inverse projection transformation matrix that
* transforms from clip coordinates to eye coordinates. Clip coordinates is the
* coordinate system for a vertex shader's gl_Position
output.
- *
* @example
* // GLSL declaration
* uniform mat4 czm_inverseProjection;
*
* // Example
* vec4 eyePosition = czm_inverseProjection * clipPosition;
- *
* @see UniformState#inverseProjection
* @see czm_projection
*/
@@ -459,14 +428,12 @@ const AutomaticUniforms = {
* coordinate system for a vertex shader's gl_Position
output. An infinite far plane is used
* in algorithms like shadow volumes and GPU ray casting with proxy geometry to ensure that triangles
* are not clipped by the far plane.
- *
* @example
* // GLSL declaration
* uniform mat4 czm_infiniteProjection;
*
* // Example
* gl_Position = czm_infiniteProjection * eyePosition;
- *
* @see UniformState#infiniteProjection
* @see czm_projection
* @see czm_modelViewInfiniteProjection
@@ -485,7 +452,6 @@ const AutomaticUniforms = {
*
* Positions should be transformed to eye coordinates using czm_modelView
and
* normals should be transformed using {@link czm_normal}.
- *
* @example
* // GLSL declaration
* uniform mat4 czm_modelView;
@@ -495,7 +461,6 @@ const AutomaticUniforms = {
*
* // The above is equivalent to, but more efficient than:
* vec4 eyePosition = czm_view * czm_model * modelPosition;
- *
* @see UniformState#modelView
* @see czm_model
* @see czm_view
@@ -519,7 +484,6 @@ const AutomaticUniforms = {
*
* Positions should be transformed to eye coordinates using czm_modelView3D
and
* normals should be transformed using {@link czm_normal3D}.
- *
* @example
* // GLSL declaration
* uniform mat4 czm_modelView3D;
@@ -529,7 +493,6 @@ const AutomaticUniforms = {
*
* // The above is equivalent to, but more efficient than:
* vec4 eyePosition = czm_view3D * czm_model * modelPosition;
- *
* @see UniformState#modelView3D
* @see czm_modelView
*/
@@ -545,7 +508,6 @@ const AutomaticUniforms = {
* An automatic GLSL uniform representing a 4x4 model-view transformation matrix that
* transforms model coordinates, relative to the eye, to eye coordinates. This is used
* in conjunction with {@link czm_translateRelativeToEye}.
- *
* @example
* // GLSL declaration
* uniform mat4 czm_modelViewRelativeToEye;
@@ -559,7 +521,6 @@ const AutomaticUniforms = {
* vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
* gl_Position = czm_projection * (czm_modelViewRelativeToEye * p);
* }
- *
* @see czm_modelViewProjectionRelativeToEye
* @see czm_translateRelativeToEye
* @see EncodedCartesian3
@@ -575,14 +536,12 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing a 4x4 transformation matrix that
* transforms from eye coordinates to model coordinates.
- *
* @example
* // GLSL declaration
* uniform mat4 czm_inverseModelView;
*
* // Example
* vec4 modelPosition = czm_inverseModelView * eyePosition;
- *
* @see UniformState#inverseModelView
* @see czm_modelView
*/
@@ -600,14 +559,12 @@ const AutomaticUniforms = {
* {@link czm_inverseModelView}, but in 2D and Columbus View it represents the inverse model-view matrix
* as if the camera were at an equivalent location in 3D mode. This is useful for lighting
* 2D and Columbus View in the same way that 3D is lit.
- *
* @example
* // GLSL declaration
* uniform mat4 czm_inverseModelView3D;
*
* // Example
* vec4 modelPosition = czm_inverseModelView3D * eyePosition;
- *
* @see UniformState#inverseModelView
* @see czm_inverseModelView
* @see czm_modelView3D
@@ -624,7 +581,6 @@ const AutomaticUniforms = {
* An automatic GLSL uniform representing a 4x4 view-projection transformation matrix that
* transforms world coordinates to clip coordinates. Clip coordinates is the
* coordinate system for a vertex shader's gl_Position
output.
- *
* @example
* // GLSL declaration
* uniform mat4 czm_viewProjection;
@@ -634,7 +590,6 @@ const AutomaticUniforms = {
*
* // The above is equivalent to, but more efficient than:
* gl_Position = czm_projection * czm_view * czm_model * modelPosition;
- *
* @see UniformState#viewProjection
* @see czm_view
* @see czm_projection
@@ -653,14 +608,12 @@ const AutomaticUniforms = {
* An automatic GLSL uniform representing a 4x4 view-projection transformation matrix that
* transforms clip coordinates to world coordinates. Clip coordinates is the
* coordinate system for a vertex shader's gl_Position
output.
- *
* @example
* // GLSL declaration
* uniform mat4 czm_inverseViewProjection;
*
* // Example
* vec4 worldPosition = czm_inverseViewProjection * clipPosition;
- *
* @see UniformState#inverseViewProjection
* @see czm_viewProjection
*/
@@ -676,7 +629,6 @@ const AutomaticUniforms = {
* An automatic GLSL uniform representing a 4x4 model-view-projection transformation matrix that
* transforms model coordinates to clip coordinates. Clip coordinates is the
* coordinate system for a vertex shader's gl_Position
output.
- *
* @example
* // GLSL declaration
* uniform mat4 czm_modelViewProjection;
@@ -686,7 +638,6 @@ const AutomaticUniforms = {
*
* // The above is equivalent to, but more efficient than:
* gl_Position = czm_projection * czm_view * czm_model * modelPosition;
- *
* @see UniformState#modelViewProjection
* @see czm_model
* @see czm_view
@@ -708,14 +659,12 @@ const AutomaticUniforms = {
* An automatic GLSL uniform representing a 4x4 inverse model-view-projection transformation matrix that
* transforms clip coordinates to model coordinates. Clip coordinates is the
* coordinate system for a vertex shader's gl_Position
output.
- *
* @example
* // GLSL declaration
* uniform mat4 czm_inverseModelViewProjection;
*
* // Example
* vec4 modelPosition = czm_inverseModelViewProjection * clipPosition;
- *
* @see UniformState#modelViewProjection
* @see czm_modelViewProjection
*/
@@ -732,7 +681,6 @@ const AutomaticUniforms = {
* transforms model coordinates, relative to the eye, to clip coordinates. Clip coordinates is the
* coordinate system for a vertex shader's gl_Position
output. This is used in
* conjunction with {@link czm_translateRelativeToEye}.
- *
* @example
* // GLSL declaration
* uniform mat4 czm_modelViewProjectionRelativeToEye;
@@ -746,7 +694,6 @@ const AutomaticUniforms = {
* vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
* gl_Position = czm_modelViewProjectionRelativeToEye * p;
* }
- *
* @see czm_modelViewRelativeToEye
* @see czm_translateRelativeToEye
* @see EncodedCartesian3
@@ -765,7 +712,6 @@ const AutomaticUniforms = {
* coordinate system for a vertex shader's gl_Position
output. The projection matrix places
* the far plane at infinity. This is useful in algorithms like shadow volumes and GPU ray casting with
* proxy geometry to ensure that triangles are not clipped by the far plane.
- *
* @example
* // GLSL declaration
* uniform mat4 czm_modelViewInfiniteProjection;
@@ -775,7 +721,6 @@ const AutomaticUniforms = {
*
* // The above is equivalent to, but more efficient than:
* gl_Position = czm_infiniteProjection * czm_view * czm_model * modelPosition;
- *
* @see UniformState#modelViewInfiniteProjection
* @see czm_model
* @see czm_view
@@ -792,7 +737,6 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform that indicates if the current camera is orthographic in 3D.
- *
* @see UniformState#orthographicIn3D
*/
czm_orthographicIn3D: new AutomaticUniform({
@@ -809,14 +753,12 @@ const AutomaticUniforms = {
*
* Positions should be transformed to eye coordinates using {@link czm_modelView} and
* normals should be transformed using czm_normal
.
- *
* @example
* // GLSL declaration
* uniform mat3 czm_normal;
*
* // Example
* vec3 eyeNormal = czm_normal * normal;
- *
* @see UniformState#normal
* @see czm_inverseNormal
* @see czm_modelView
@@ -839,14 +781,12 @@ const AutomaticUniforms = {
*
* Positions should be transformed to eye coordinates using {@link czm_modelView3D} and
* normals should be transformed using czm_normal3D
.
- *
* @example
* // GLSL declaration
* uniform mat3 czm_normal3D;
*
* // Example
* vec3 eyeNormal = czm_normal3D * normal;
- *
* @see UniformState#normal3D
* @see czm_normal
*/
@@ -862,14 +802,12 @@ const AutomaticUniforms = {
* An automatic GLSL uniform representing a 3x3 normal transformation matrix that
* transforms normal vectors in eye coordinates to model coordinates. This is
* the opposite of the transform provided by {@link czm_normal}.
- *
* @example
* // GLSL declaration
* uniform mat3 czm_inverseNormal;
*
* // Example
* vec3 normalMC = czm_inverseNormal * normalEC;
- *
* @see UniformState#inverseNormal
* @see czm_normal
* @see czm_modelView
@@ -891,14 +829,12 @@ const AutomaticUniforms = {
* {@link czm_inverseNormal}, but in 2D and Columbus View it represents the inverse normal transformation
* matrix as if the camera were at an equivalent location in 3D mode. This is useful for lighting
* 2D and Columbus View in the same way that 3D is lit.
- *
* @example
* // GLSL declaration
* uniform mat3 czm_inverseNormal3D;
*
* // Example
* vec3 normalMC = czm_inverseNormal3D * normalEC;
- *
* @see UniformState#inverseNormal3D
* @see czm_inverseNormal
*/
@@ -913,7 +849,6 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform containing the height in meters of the
* eye (camera) above or below the ellipsoid.
- *
* @see UniformState#eyeHeight
*/
czm_eyeHeight: new AutomaticUniform({
@@ -928,7 +863,6 @@ const AutomaticUniforms = {
* An automatic GLSL uniform containing height (x
) and height squared (y
)
* in meters of the eye (camera) above the 2D world plane. This uniform is only valid
* when the {@link SceneMode} is SCENE2D
.
- *
* @see UniformState#eyeHeight2D
*/
czm_eyeHeight2D: new AutomaticUniform({
@@ -997,14 +931,12 @@ const AutomaticUniforms = {
* An automatic GLSL uniform containing the near distance (x
) and the far distance (y
)
* of the frustum defined by the camera. This is the largest possible frustum, not an individual
* frustum used for multi-frustum rendering.
- *
* @example
* // GLSL declaration
* uniform vec2 czm_entireFrustum;
*
* // Example
* float frustumLength = czm_entireFrustum.y - czm_entireFrustum.x;
- *
* @see UniformState#entireFrustum
* @see czm_currentFrustum
*/
@@ -1020,14 +952,12 @@ const AutomaticUniforms = {
* An automatic GLSL uniform containing the near distance (x
) and the far distance (y
)
* of the frustum defined by the camera. This is the individual
* frustum used for multi-frustum rendering.
- *
* @example
* // GLSL declaration
* uniform vec2 czm_currentFrustum;
*
* // Example
* float frustumLength = czm_currentFrustum.y - czm_currentFrustum.x;
- *
* @see UniformState#currentFrustum
* @see czm_entireFrustum
*/
@@ -1086,11 +1016,9 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing the sun position in world coordinates.
- *
* @example
* // GLSL declaration
* uniform vec3 czm_sunPositionWC;
- *
* @see UniformState#sunPositionWC
* @see czm_sunPositionColumbusView
* @see czm_sunDirectionWC
@@ -1105,11 +1033,9 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing the sun position in Columbus view world coordinates.
- *
* @example
* // GLSL declaration
* uniform vec3 czm_sunPositionColumbusView;
- *
* @see UniformState#sunPositionColumbusView
* @see czm_sunPositionWC
*/
@@ -1123,14 +1049,12 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing the normalized direction to the sun in eye coordinates.
- *
* @example
* // GLSL declaration
* uniform vec3 czm_sunDirectionEC;
*
* // Example
* float diffuse = max(dot(czm_sunDirectionEC, normalEC), 0.0);
- *
* @see UniformState#sunDirectionEC
* @see czm_moonDirectionEC
* @see czm_sunDirectionWC
@@ -1145,14 +1069,12 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing the normalized direction to the sun in world coordinates.
- *
* @example
* // GLSL declaration
* uniform vec3 czm_sunDirectionWC;
*
* // Example
* float diffuse = max(dot(czm_sunDirectionWC, normalWC), 0.0);
- *
* @see UniformState#sunDirectionWC
* @see czm_sunPositionWC
* @see czm_sunDirectionEC
@@ -1167,14 +1089,12 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing the normalized direction to the moon in eye coordinates.
- *
* @example
* // GLSL declaration
* uniform vec3 czm_moonDirectionEC;
*
* // Example
* float diffuse = max(dot(czm_moonDirectionEC, normalEC), 0.0);
- *
* @see UniformState#moonDirectionEC
* @see czm_sunDirectionEC
*/
@@ -1189,14 +1109,12 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing the normalized direction to the scene's light source in eye coordinates.
* This is commonly used for directional lighting computations.
- *
* @example
* // GLSL declaration
* uniform vec3 czm_lightDirectionEC;
*
* // Example
* float diffuse = max(dot(czm_lightDirectionEC, normalEC), 0.0);
- *
* @see UniformState#lightDirectionEC
* @see czm_lightDirectionWC
*/
@@ -1211,14 +1129,12 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing the normalized direction to the scene's light source in world coordinates.
* This is commonly used for directional lighting computations.
- *
* @example
* // GLSL declaration
* uniform vec3 czm_lightDirectionWC;
*
* // Example
* float diffuse = max(dot(czm_lightDirectionWC, normalWC), 0.0);
- *
* @see UniformState#lightDirectionWC
* @see czm_lightDirectionEC
*/
@@ -1234,14 +1150,12 @@ const AutomaticUniforms = {
* An automatic GLSL uniform that represents the color of light emitted by the scene's light source. This
* is equivalent to the light color multiplied by the light intensity limited to a maximum luminance of 1.0
* suitable for non-HDR lighting.
- *
* @example
* // GLSL declaration
* uniform vec3 czm_lightColor;
*
* // Example
* vec3 diffuseColor = czm_lightColor * max(dot(czm_lightDirectionWC, normalWC), 0.0);
- *
* @see UniformState#lightColor
* @see czm_lightColorHdr
*/
@@ -1256,14 +1170,12 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform that represents the high dynamic range color of light emitted by the scene's light
* source. This is equivalent to the light color multiplied by the light intensity suitable for HDR lighting.
- *
* @example
* // GLSL declaration
* uniform vec3 czm_lightColorHdr;
*
* // Example
* vec3 diffuseColor = czm_lightColorHdr * max(dot(czm_lightDirectionWC, normalWC), 0.0);
- *
* @see UniformState#lightColorHdr
* @see czm_lightColor
*/
@@ -1279,11 +1191,9 @@ const AutomaticUniforms = {
* An automatic GLSL uniform representing the high bits of the camera position in model
* coordinates. This is used for GPU RTE to eliminate jittering artifacts when rendering
* as described in {@link http://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.
- *
* @example
* // GLSL declaration
* uniform vec3 czm_encodedCameraPositionMCHigh;
- *
* @see czm_encodedCameraPositionMCLow
* @see czm_modelViewRelativeToEye
* @see czm_modelViewProjectionRelativeToEye
@@ -1300,11 +1210,9 @@ const AutomaticUniforms = {
* An automatic GLSL uniform representing the low bits of the camera position in model
* coordinates. This is used for GPU RTE to eliminate jittering artifacts when rendering
* as described in {@linkhttp://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.
- *
* @example
* // GLSL declaration
* uniform vec3 czm_encodedCameraPositionMCLow;
- *
* @see czm_encodedCameraPositionMCHigh
* @see czm_modelViewRelativeToEye
* @see czm_modelViewProjectionRelativeToEye
@@ -1319,7 +1227,6 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing the position of the viewer (camera) in world coordinates.
- *
* @example
* // GLSL declaration
* uniform vec3 czm_viewerPositionWC;
@@ -1338,7 +1245,6 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing the frame number. This uniform is automatically incremented
* every frame.
- *
* @example
* // GLSL declaration
* uniform float czm_frameNumber;
@@ -1354,7 +1260,6 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing the current morph transition time between
* 2D/Columbus View and 3D, with 0.0 being 2D or Columbus View and 1.0 being 3D.
- *
* @example
* // GLSL declaration
* uniform float czm_morphTime;
@@ -1373,7 +1278,6 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing the current {@link SceneMode}, expressed
* as a float.
- *
* @example
* // GLSL declaration
* uniform float czm_sceneMode;
@@ -1383,7 +1287,6 @@ const AutomaticUniforms = {
* {
* eyeHeightSq = czm_eyeHeight2D.y;
* }
- *
* @see czm_sceneMode2D
* @see czm_sceneModeColumbusView
* @see czm_sceneMode3D
@@ -1399,7 +1302,6 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing the current rendering pass.
- *
* @example
* // GLSL declaration
* uniform float czm_pass;
@@ -1420,7 +1322,6 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing the current scene background color.
- *
* @example
* // GLSL declaration
* uniform vec4 czm_backgroundColor;
@@ -1446,7 +1347,6 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform containing the BRDF look up texture used for image-based lighting computations.
- *
* @example
* // GLSL declaration
* uniform sampler2D czm_brdfLut;
@@ -1466,7 +1366,6 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform containing the environment map used within the scene.
- *
* @example
* // GLSL declaration
* uniform samplerCube czm_environmentMap;
@@ -1485,7 +1384,6 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform containing the specular environment map atlas used within the scene.
- *
* @example
* // GLSL declaration
* uniform sampler2D czm_specularEnvironmentMaps;
@@ -1500,7 +1398,6 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform containing the size of the specular environment map atlas used within the scene.
- *
* @example
* // GLSL declaration
* uniform vec2 czm_specularEnvironmentMapSize;
@@ -1515,7 +1412,6 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform containing the maximum level-of-detail of the specular environment map atlas used within the scene.
- *
* @example
* // GLSL declaration
* uniform float czm_specularEnvironmentMapsMaximumLOD;
@@ -1530,7 +1426,6 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform containing the spherical harmonic coefficients used within the scene.
- *
* @example
* // GLSL declaration
* uniform vec3[9] czm_sphericalHarmonicCoefficients;
@@ -1546,14 +1441,12 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing a 3x3 rotation matrix that transforms
* from True Equator Mean Equinox (TEME) axes to the pseudo-fixed axes at the current scene time.
- *
* @example
* // GLSL declaration
* uniform mat3 czm_temeToPseudoFixed;
*
* // Example
* vec3 pseudoFixed = czm_temeToPseudoFixed * teme;
- *
* @see UniformState#temeToPseudoFixedMatrix
* @see Transforms.computeTemeToPseudoFixedMatrix
*/
@@ -1567,7 +1460,6 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing the ratio of canvas coordinate space to canvas pixel space.
- *
* @example
* uniform float czm_pixelRatio;
*/
@@ -1581,7 +1473,6 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform scalar used to mix a color with the fog color based on the distance to the camera.
- *
* @see czm_fog
*/
czm_fogDensity: new AutomaticUniform({
@@ -1594,7 +1485,6 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform scalar used to set a minimum brightness when dynamic lighting is applied to fog.
- *
* @see czm_fog
*/
czm_fogMinimumBrightness: new AutomaticUniform({
@@ -1607,7 +1497,6 @@ const AutomaticUniforms = {
/**
* An automatic uniform representing the color shift for the atmosphere in HSB color space
- *
* @example
* uniform vec3 czm_atmosphereHsbShift;
*/
@@ -1620,7 +1509,6 @@ const AutomaticUniforms = {
}),
/**
* An automatic uniform representing the intensity of the light that is used for computing the atmosphere color
- *
* @example
* uniform float czm_atmosphereLightIntensity;
*/
@@ -1633,7 +1521,6 @@ const AutomaticUniforms = {
}),
/**
* An automatic uniform representing the Rayleigh scattering coefficient used when computing the atmosphere scattering
- *
* @example
* uniform vec3 czm_atmosphereRayleighCoefficient;
*/
@@ -1646,7 +1533,6 @@ const AutomaticUniforms = {
}),
/**
* An automatic uniform representing the Rayleigh scale height in meters used for computing atmosphere scattering.
- *
* @example
* uniform vec3 czm_atmosphereRayleighScaleHeight;
*/
@@ -1659,7 +1545,6 @@ const AutomaticUniforms = {
}),
/**
* An automatic uniform representing the Mie scattering coefficient used when computing atmosphere scattering.
- *
* @example
* uniform vec3 czm_atmosphereMieCoefficient;
*/
@@ -1672,7 +1557,6 @@ const AutomaticUniforms = {
}),
/**
* An automatic uniform storign the Mie scale height used when computing atmosphere scattering.
- *
* @example
* uniform float czm_atmosphereMieScaleHeight;
*/
@@ -1685,7 +1569,6 @@ const AutomaticUniforms = {
}),
/**
* An automatic uniform representing the anisotropy of the medium to consider for Mie scattering.
- *
* @example
* uniform float czm_atmosphereAnisotropy;
*/
@@ -1699,7 +1582,6 @@ const AutomaticUniforms = {
/**
* An automatic uniform representing which light source to use for dynamic lighting
- *
* @example
* uniform float czm_atmosphereDynamicLighting
*/
@@ -1714,7 +1596,6 @@ const AutomaticUniforms = {
/**
* An automatic GLSL uniform representing the splitter position to use when rendering with a splitter.
* This will be in pixel coordinates relative to the canvas.
- *
* @example
* // GLSL declaration
* uniform float czm_splitPosition;
diff --git a/packages/engine/Source/Renderer/Buffer.js b/packages/engine/Source/Renderer/Buffer.js
index 641e8cc5c967..60bd2030c30b 100644
--- a/packages/engine/Source/Renderer/Buffer.js
+++ b/packages/engine/Source/Renderer/Buffer.js
@@ -9,6 +9,7 @@ import WebGLConstants from "../Core/WebGLConstants.js";
import BufferUsage from "./BufferUsage.js";
/**
+ * @param options
* @private
*/
function Buffer(options) {
@@ -77,19 +78,15 @@ function Buffer(options) {
*
* A vertex array defines the actual makeup of a vertex, e.g., positions, normals, texture coordinates,
* etc., by interpreting the raw data in one or more vertex buffers.
- *
* @param {object} options An object containing the following properties:
* @param {Context} options.context The context in which to create the buffer
* @param {ArrayBufferView} [options.typedArray] A typed array containing the data to copy to the buffer.
* @param {number} [options.sizeInBytes] A Number
defining the size of the buffer in bytes. Required if options.typedArray is not given.
* @param {BufferUsage} options.usage Specifies the expected usage pattern of the buffer. On some GL implementations, this can significantly affect performance. See {@link BufferUsage}.
* @returns {VertexBuffer} The vertex buffer, ready to be attached to a vertex array.
- *
- * @exception {DeveloperError} Must specify either or , but not both.
- * @exception {DeveloperError} The buffer size must be greater than zero.
- * @exception {DeveloperError} Invalid usage
.
- *
- *
+ * @throws {DeveloperError} Must specify either or , but not both.
+ * @throws {DeveloperError} The buffer size must be greater than zero.
+ * @throws {DeveloperError} Invalid usage
.
* @example
* // Example 1. Create a dynamic vertex buffer 16 bytes in size.
* const buffer = Buffer.createVertexBuffer({
@@ -97,7 +94,6 @@ function Buffer(options) {
* sizeInBytes : 16,
* usage : BufferUsage.DYNAMIC_DRAW
* });
- *
* @example
* // Example 2. Create a dynamic vertex buffer from three floating-point values.
* // The data copied to the vertex buffer is considered raw bytes until it is
@@ -107,7 +103,6 @@ function Buffer(options) {
* typedArray : new Float32Array([0, 0, 0]),
* usage : BufferUsage.STATIC_DRAW
* });
- *
* @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGenBuffer.xml|glGenBuffer}
* @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glBindBuffer.xml|glBindBuffer} with ARRAY_BUFFER
* @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glBufferData.xml|glBufferData} with ARRAY_BUFFER
@@ -132,7 +127,6 @@ Buffer.createVertexBuffer = function (options) {
* An index buffer can be attached to a vertex array to select vertices for rendering.
* Context.draw
can render using the entire index buffer or a subset
* of the index buffer defined by an offset and count.
- *
* @param {object} options An object containing the following properties:
* @param {Context} options.context The context in which to create the buffer
* @param {ArrayBufferView} [options.typedArray] A typed array containing the data to copy to the buffer.
@@ -140,14 +134,11 @@ Buffer.createVertexBuffer = function (options) {
* @param {BufferUsage} options.usage Specifies the expected usage pattern of the buffer. On some GL implementations, this can significantly affect performance. See {@link BufferUsage}.
* @param {IndexDatatype} options.indexDatatype The datatype of indices in the buffer.
* @returns {IndexBuffer} The index buffer, ready to be attached to a vertex array.
- *
- * @exception {DeveloperError} Must specify either or , but not both.
- * @exception {DeveloperError} IndexDatatype.UNSIGNED_INT requires OES_element_index_uint, which is not supported on this system. Check context.elementIndexUint.
- * @exception {DeveloperError} The size in bytes must be greater than zero.
- * @exception {DeveloperError} Invalid usage
.
- * @exception {DeveloperError} Invalid indexDatatype
.
- *
- *
+ * @throws {DeveloperError} Must specify either or , but not both.
+ * @throws {DeveloperError} IndexDatatype.UNSIGNED_INT requires OES_element_index_uint, which is not supported on this system. Check context.elementIndexUint.
+ * @throws {DeveloperError} The size in bytes must be greater than zero.
+ * @throws {DeveloperError} Invalid usage
.
+ * @throws {DeveloperError} Invalid indexDatatype
.
* @example
* // Example 1. Create a stream index buffer of unsigned shorts that is
* // 16 bytes in size.
@@ -157,7 +148,6 @@ Buffer.createVertexBuffer = function (options) {
* usage : BufferUsage.STREAM_DRAW,
* indexDatatype : IndexDatatype.UNSIGNED_SHORT
* });
- *
* @example
* // Example 2. Create a static index buffer containing three unsigned shorts.
* const buffer = Buffer.createIndexBuffer({
@@ -166,7 +156,6 @@ Buffer.createVertexBuffer = function (options) {
* usage : BufferUsage.STATIC_DRAW,
* indexDatatype : IndexDatatype.UNSIGNED_SHORT
* });
- *
* @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGenBuffer.xml|glGenBuffer}
* @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glBindBuffer.xml|glBindBuffer} with ELEMENT_ARRAY_BUFFER
* @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glBufferData.xml|glBufferData} with ELEMENT_ARRAY_BUFFER
diff --git a/packages/engine/Source/Renderer/ClearCommand.js b/packages/engine/Source/Renderer/ClearCommand.js
index 696db4f2934f..dbe5b6bcfa95 100644
--- a/packages/engine/Source/Renderer/ClearCommand.js
+++ b/packages/engine/Source/Renderer/ClearCommand.js
@@ -3,36 +3,30 @@ import defaultValue from "../Core/defaultValue.js";
/**
* Represents a command to the renderer for clearing a framebuffer.
- *
+ * @param options
* @private
- * @constructor
+ * @class
*/
function ClearCommand(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
/**
* The value to clear the color buffer to. When undefined
, the color buffer is not cleared.
- *
* @type {Color}
- *
* @default undefined
*/
this.color = options.color;
/**
* The value to clear the depth buffer to. When undefined
, the depth buffer is not cleared.
- *
* @type {number}
- *
* @default undefined
*/
this.depth = options.depth;
/**
* The value to clear the stencil buffer to. When undefined
, the stencil buffer is not cleared.
- *
* @type {number}
- *
* @default undefined
*/
this.stencil = options.stencil;
@@ -41,18 +35,14 @@ function ClearCommand(options) {
* The render state to apply when executing the clear command. The following states affect clearing:
* scissor test, color mask, depth mask, and stencil mask. When the render state is
* undefined
, the default render state is used.
- *
* @type {RenderState}
- *
* @default undefined
*/
this.renderState = options.renderState;
/**
* The framebuffer to clear.
- *
* @type {Framebuffer}
- *
* @default undefined
*/
this.framebuffer = options.framebuffer;
@@ -62,20 +52,15 @@ function ClearCommand(options) {
* execution; it allows you to see who created a command when you only have a
* reference to the command, and can be used to selectively execute commands
* with {@link Scene#debugCommandFilter}.
- *
* @type {object}
- *
* @default undefined
- *
* @see Scene#debugCommandFilter
*/
this.owner = options.owner;
/**
* The pass in which to run this command.
- *
* @type {Pass}
- *
* @default undefined
*/
this.pass = options.pass;
@@ -83,9 +68,7 @@ function ClearCommand(options) {
/**
* Clears color to (0.0, 0.0, 0.0, 0.0); depth to 1.0; and stencil to 0.
- *
* @type {ClearCommand}
- *
* @constant
*/
ClearCommand.ALL = Object.freeze(
diff --git a/packages/engine/Source/Renderer/ComputeCommand.js b/packages/engine/Source/Renderer/ComputeCommand.js
index 0979b648c908..e435d7bf6660 100644
--- a/packages/engine/Source/Renderer/ComputeCommand.js
+++ b/packages/engine/Source/Renderer/ComputeCommand.js
@@ -3,16 +3,15 @@ import Pass from "./Pass.js";
/**
* Represents a command to the renderer for GPU Compute (using old-school GPGPU).
- *
+ * @param options
* @private
- * @constructor
+ * @class
*/
function ComputeCommand(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
/**
* The vertex array. If none is provided, a viewport quad will be used.
- *
* @type {VertexArray}
* @default undefined
*/
@@ -20,7 +19,6 @@ function ComputeCommand(options) {
/**
* The fragment shader source. The default vertex shader is ViewportQuadVS.
- *
* @type {ShaderSource}
* @default undefined
*/
@@ -28,7 +26,6 @@ function ComputeCommand(options) {
/**
* The shader program to apply.
- *
* @type {ShaderProgram}
* @default undefined
*/
@@ -37,7 +34,6 @@ function ComputeCommand(options) {
/**
* An object with functions whose names match the uniforms in the shader program
* and return values to set those uniforms.
- *
* @type {object}
* @default undefined
*/
@@ -45,7 +41,6 @@ function ComputeCommand(options) {
/**
* Texture to use for offscreen rendering.
- *
* @type {Texture}
* @default undefined
*/
@@ -54,7 +49,6 @@ function ComputeCommand(options) {
/**
* Function that is called immediately before the ComputeCommand is executed. Used to
* update any renderer resources. Takes the ComputeCommand as its single argument.
- *
* @type {Function}
* @default undefined
*/
@@ -63,7 +57,6 @@ function ComputeCommand(options) {
/**
* Function that is called after the ComputeCommand is executed. Takes the output
* texture as its single argument.
- *
* @type {Function}
* @default undefined
*/
@@ -71,7 +64,6 @@ function ComputeCommand(options) {
/**
* Function that is called when the command is canceled
- *
* @type {Function}
* @default undefined
*/
@@ -80,7 +72,6 @@ function ComputeCommand(options) {
/**
* Whether the renderer resources will persist beyond this call. If not, they
* will be destroyed after completion.
- *
* @type {boolean}
* @default false
*/
@@ -88,7 +79,6 @@ function ComputeCommand(options) {
/**
* The pass when to render. Always compute pass.
- *
* @type {Pass}
* @default Pass.COMPUTE;
*/
@@ -99,10 +89,8 @@ function ComputeCommand(options) {
* execution; it allows us to see who created a command when we only have a
* reference to the command, and can be used to selectively execute commands
* with {@link Scene#debugCommandFilter}.
- *
* @type {object}
* @default undefined
- *
* @see Scene#debugCommandFilter
*/
this.owner = options.owner;
@@ -110,7 +98,6 @@ function ComputeCommand(options) {
/**
* Executes the compute command.
- *
* @param {ComputeEngine} computeEngine The context that processes the compute command.
*/
ComputeCommand.prototype.execute = function (computeEngine) {
diff --git a/packages/engine/Source/Renderer/ComputeEngine.js b/packages/engine/Source/Renderer/ComputeEngine.js
index 1459080510a5..de1074f980d3 100644
--- a/packages/engine/Source/Renderer/ComputeEngine.js
+++ b/packages/engine/Source/Renderer/ComputeEngine.js
@@ -13,6 +13,7 @@ import RenderState from "./RenderState.js";
import ShaderProgram from "./ShaderProgram.js";
/**
+ * @param context
* @private
*/
function ComputeEngine(context) {
diff --git a/packages/engine/Source/Renderer/Context.js b/packages/engine/Source/Renderer/Context.js
index 5996db8eb4ef..3161038f492b 100644
--- a/packages/engine/Source/Renderer/Context.js
+++ b/packages/engine/Source/Renderer/Context.js
@@ -33,8 +33,7 @@ import VertexArray from "./VertexArray.js";
/**
* @private
- * @constructor
- *
+ * @class
* @param {HTMLCanvasElement} canvas The canvas element to which the context will be associated
* @param {ContextOptions} [options] Options to control WebGL settings for the context
*/
@@ -362,7 +361,6 @@ function Context(canvas, options) {
/**
* The options used to construct this context
- *
* @type {ContextOptions}
*/
this.options = {
@@ -378,7 +376,6 @@ function Context(canvas, options) {
* such a method. This is useful for caching any objects that might otherwise
* be stored globally, except they're tied to a particular context, and to manage
* their lifetime.
- *
* @type {object}
*/
this.cache = {};
@@ -396,7 +393,6 @@ function Context(canvas, options) {
* Setting this to false will improve performance, but hurt visual quality,
* especially for horizon views.
*
- *
* @property {boolean} [requestWebgl1=false] If true and the browser supports it, use a WebGL 1 rendering context
* @property {boolean} [allowTextureFilterAnisotropic=true] If true, use anisotropic filtering during texture sampling
* @property {WebGLOptions} [webgl] WebGL options to be passed on to canvas.getContext
@@ -448,7 +444,6 @@ function getWebGLContext(canvas, webglOptions, requestWebgl1) {
* to composite Cesium above other HTML elements using alpha-blending, set
* alpha
to true.
*
- *
* @property {boolean} [alpha=false]
* @property {boolean} [depth=true]
* @property {boolean} [stencil=false]
@@ -1144,6 +1139,7 @@ Object.defineProperties(Context.prototype, {
/**
* Validates a framebuffer.
* Available in debug builds only.
+ * @param context
* @private
*/
function validateFramebuffer(context) {
@@ -1435,10 +1431,10 @@ Context.prototype.endFrame = function () {
/**
* @private
* @param {object} readState An object with the following properties:
- * @param {number} [readState.x=0] The x offset of the rectangle to read from.
- * @param {number} [readState.y=0] The y offset of the rectangle to read from.
- * @param {number} [readState.width=gl.drawingBufferWidth] The width of the rectangle to read from.
- * @param {number} [readState.height=gl.drawingBufferHeight] The height of the rectangle to read from.
+ * @param {number} [readState.x] The x offset of the rectangle to read from.
+ * @param {number} [readState.y] The y offset of the rectangle to read from.
+ * @param {number} [readState.width] The width of the rectangle to read from.
+ * @param {number} [readState.height] The height of the rectangle to read from.
* @param {Framebuffer} [readState.framebuffer] The framebuffer to read from. If undefined, the read will be from the default framebuffer.
* @returns {Uint8Array|Uint16Array|Float32Array|Uint32Array} The pixels in the specified rectangle.
*/
@@ -1552,13 +1548,10 @@ Context.prototype.createViewportQuadCommand = function (
/**
* Gets the object associated with a pick color.
- *
* @param {Color} pickColor The pick color.
* @returns {object} The object associated with the pick color, or undefined if no object is associated with that color.
- *
* @example
* const object = context.getObjectByPickColor(pickColor);
- *
* @see Context#createPickId
*/
Context.prototype.getObjectByPickColor = function (pickColor) {
@@ -1595,19 +1588,14 @@ PickId.prototype.destroy = function () {
* Creates a unique ID associated with the input object for use with color-buffer picking.
* The ID has an RGBA color value unique to this context. You must call destroy()
* on the pick ID when destroying the input object.
- *
* @param {object} object The object to associate with the pick ID.
* @returns {object} A PickId object with a color
property.
- *
- * @exception {RuntimeError} Out of unique Pick IDs.
- *
- *
+ * @throws {RuntimeError} Out of unique Pick IDs.
* @example
* this._pickId = context.createPickId({
* primitive : this,
* id : this.id
* });
- *
* @see Context#getObjectByPickColor
*/
Context.prototype.createPickId = function (object) {
diff --git a/packages/engine/Source/Renderer/ContextLimits.js b/packages/engine/Source/Renderer/ContextLimits.js
index b6c5e5731f13..19911867eabd 100644
--- a/packages/engine/Source/Renderer/ContextLimits.js
+++ b/packages/engine/Source/Renderer/ContextLimits.js
@@ -1,6 +1,5 @@
/**
* These are set in the constructor for {@link Context}
- *
* @private
*/
const ContextLimits = {
diff --git a/packages/engine/Source/Renderer/CubeMap.js b/packages/engine/Source/Renderer/CubeMap.js
index 9b9c0a4ca00d..6368c04b206b 100644
--- a/packages/engine/Source/Renderer/CubeMap.js
+++ b/packages/engine/Source/Renderer/CubeMap.js
@@ -14,6 +14,7 @@ import TextureMagnificationFilter from "./TextureMagnificationFilter.js";
import TextureMinificationFilter from "./TextureMinificationFilter.js";
/**
+ * @param options
* @private
*/
function CubeMap(options) {
@@ -573,14 +574,11 @@ Object.defineProperties(CubeMap.prototype, {
/**
* Generates a complete mipmap chain for each cubemap face.
- *
- * @param {MipmapHint} [hint=MipmapHint.DONT_CARE] A performance vs. quality hint.
- *
- * @exception {DeveloperError} hint is invalid.
- * @exception {DeveloperError} This CubeMap's width must be a power of two to call generateMipmap().
- * @exception {DeveloperError} This CubeMap's height must be a power of two to call generateMipmap().
- * @exception {DeveloperError} This CubeMap was destroyed, i.e., destroy() was called.
- *
+ * @param {MipmapHint} [hint] A performance vs. quality hint.
+ * @throws {DeveloperError} hint is invalid.
+ * @throws {DeveloperError} This CubeMap's width must be a power of two to call generateMipmap().
+ * @throws {DeveloperError} This CubeMap's height must be a power of two to call generateMipmap().
+ * @throws {DeveloperError} This CubeMap was destroyed, i.e., destroy() was called.
* @example
* // Generate mipmaps, and then set the sampler so mipmaps are used for
* // minification when the cube map is sampled.
diff --git a/packages/engine/Source/Renderer/CubeMapFace.js b/packages/engine/Source/Renderer/CubeMapFace.js
index 9f161b848764..59c540bf6bdb 100644
--- a/packages/engine/Source/Renderer/CubeMapFace.js
+++ b/packages/engine/Source/Renderer/CubeMapFace.js
@@ -6,6 +6,17 @@ import PixelFormat from "../Core/PixelFormat.js";
import PixelDatatype from "./PixelDatatype.js";
/**
+ * @param context
+ * @param texture
+ * @param textureTarget
+ * @param targetFace
+ * @param internalFormat
+ * @param pixelFormat
+ * @param pixelDatatype
+ * @param size
+ * @param preMultiplyAlpha
+ * @param flipY
+ * @param initialized
* @private
*/
function CubeMapFace(
@@ -57,15 +68,14 @@ Object.defineProperties(CubeMapFace.prototype, {
* @param {object} options Object with the following properties:
* @param {object} options.source The source {@link ImageData}, {@link HTMLImageElement}, {@link HTMLCanvasElement}, {@link HTMLVideoElement},
* or an object with a width, height, and arrayBufferView properties.
- * @param {number} [options.xOffset=0] An offset in the x direction in the cubemap where copying begins.
- * @param {number} [options.yOffset=0] An offset in the y direction in the cubemap where copying begins.
- * @param {boolean} [options.skipColorSpaceConversion=false] If true, any custom gamma or color profiles in the texture will be ignored.
- * @exception {DeveloperError} xOffset must be greater than or equal to zero.
- * @exception {DeveloperError} yOffset must be greater than or equal to zero.
- * @exception {DeveloperError} xOffset + source.width must be less than or equal to width.
- * @exception {DeveloperError} yOffset + source.height must be less than or equal to height.
- * @exception {DeveloperError} This CubeMap was destroyed, i.e., destroy() was called.
- *
+ * @param {number} [options.xOffset] An offset in the x direction in the cubemap where copying begins.
+ * @param {number} [options.yOffset] An offset in the y direction in the cubemap where copying begins.
+ * @param {boolean} [options.skipColorSpaceConversion] If true, any custom gamma or color profiles in the texture will be ignored.
+ * @throws {DeveloperError} xOffset must be greater than or equal to zero.
+ * @throws {DeveloperError} yOffset must be greater than or equal to zero.
+ * @throws {DeveloperError} xOffset + source.width must be less than or equal to width.
+ * @throws {DeveloperError} yOffset + source.height must be less than or equal to height.
+ * @throws {DeveloperError} This CubeMap was destroyed, i.e., destroy() was called.
* @example
* // Create a cubemap with 1x1 faces, and make the +x face red.
* const cubeMap = new CubeMap({
@@ -267,17 +277,15 @@ CubeMapFace.prototype.copyFrom = function (options) {
/**
* Copies texels from the framebuffer to the cubemap's face.
- *
- * @param {number} [xOffset=0] An offset in the x direction in the cubemap where copying begins.
- * @param {number} [yOffset=0] An offset in the y direction in the cubemap where copying begins.
- * @param {number} [framebufferXOffset=0] An offset in the x direction in the framebuffer where copying begins from.
- * @param {number} [framebufferYOffset=0] An offset in the y direction in the framebuffer where copying begins from.
- * @param {number} [width=CubeMap's width] The width of the subimage to copy.
- * @param {number} [height=CubeMap's height] The height of the subimage to copy.
- *
- * @exception {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.
- * @exception {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.
- * @exception {DeveloperError} This CubeMap was destroyed, i.e., destroy() was called.
+ * @param {number} [xOffset] An offset in the x direction in the cubemap where copying begins.
+ * @param {number} [yOffset] An offset in the y direction in the cubemap where copying begins.
+ * @param {number} [framebufferXOffset] An offset in the x direction in the framebuffer where copying begins from.
+ * @param {number} [framebufferYOffset] An offset in the y direction in the framebuffer where copying begins from.
+ * @param {number} [width] The width of the subimage to copy.
+ * @param {number} [height] The height of the subimage to copy.
+ * @throws {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.
+ * @throws {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.
+ * @throws {DeveloperError} This CubeMap was destroyed, i.e., destroy() was called.
* @exception {DeveloperError} xOffset must be greater than or equal to zero.
* @exception {DeveloperError} yOffset must be greater than or equal to zero.
* @exception {DeveloperError} framebufferXOffset must be greater than or equal to zero.
diff --git a/packages/engine/Source/Renderer/DrawCommand.js b/packages/engine/Source/Renderer/DrawCommand.js
index 14d75d5c7ee5..1a7ffd3804c2 100644
--- a/packages/engine/Source/Renderer/DrawCommand.js
+++ b/packages/engine/Source/Renderer/DrawCommand.js
@@ -15,7 +15,7 @@ const Flags = {
/**
* Represents a command to the renderer for drawing.
- *
+ * @param options
* @private
*/
function DrawCommand(options) {
@@ -91,11 +91,9 @@ Object.defineProperties(DrawCommand.prototype, {
* allow the tightest possible near and far planes to be computed for the scene, and
* minimize the number of frustums needed.
*
- *
* @memberof DrawCommand.prototype
* @type {object}
* @default undefined
- *
* @see DrawCommand#debugShowBoundingVolume
*/
boundingVolume: {
@@ -113,11 +111,9 @@ Object.defineProperties(DrawCommand.prototype, {
/**
* The oriented bounding box of the geometry in world space. If this is defined, it is used instead of
* {@link DrawCommand#boundingVolume} for plane intersection testing.
- *
* @memberof DrawCommand.prototype
* @type {OrientedBoundingBox}
* @default undefined
- *
* @see DrawCommand#debugShowBoundingVolume
*/
orientedBoundingBox: {
@@ -135,7 +131,6 @@ Object.defineProperties(DrawCommand.prototype, {
/**
* When true
, the renderer frustum and horizon culls the command based on its {@link DrawCommand#boundingVolume}.
* If the command was already culled, set this to false
for a performance improvement.
- *
* @memberof DrawCommand.prototype
* @type {boolean}
* @default true
@@ -155,7 +150,6 @@ Object.defineProperties(DrawCommand.prototype, {
/**
* When true
, the horizon culls the command based on its {@link DrawCommand#boundingVolume}.
* {@link DrawCommand#cull} must also be true
in order for the command to be culled.
- *
* @memberof DrawCommand.prototype
* @type {boolean}
* @default true
@@ -177,7 +171,6 @@ Object.defineProperties(DrawCommand.prototype, {
*
* When undefined
, the geometry is assumed to be defined in world space.
*
- *
* @memberof DrawCommand.prototype
* @type {Matrix4}
* @default undefined
@@ -196,7 +189,6 @@ Object.defineProperties(DrawCommand.prototype, {
/**
* The type of geometry in the vertex array.
- *
* @memberof DrawCommand.prototype
* @type {PrimitiveType}
* @default PrimitiveType.TRIANGLES
@@ -215,7 +207,6 @@ Object.defineProperties(DrawCommand.prototype, {
/**
* The vertex array.
- *
* @memberof DrawCommand.prototype
* @type {VertexArray}
* @default undefined
@@ -234,7 +225,6 @@ Object.defineProperties(DrawCommand.prototype, {
/**
* The number of vertices to draw in the vertex array.
- *
* @memberof DrawCommand.prototype
* @type {number}
* @default undefined
@@ -253,7 +243,6 @@ Object.defineProperties(DrawCommand.prototype, {
/**
* The offset to start drawing in the vertex array.
- *
* @memberof DrawCommand.prototype
* @type {number}
* @default 0
@@ -272,7 +261,6 @@ Object.defineProperties(DrawCommand.prototype, {
/**
* The number of instances to draw.
- *
* @memberof DrawCommand.prototype
* @type {number}
* @default 0
@@ -291,7 +279,6 @@ Object.defineProperties(DrawCommand.prototype, {
/**
* The shader program to apply.
- *
* @memberof DrawCommand.prototype
* @type {ShaderProgram}
* @default undefined
@@ -310,7 +297,6 @@ Object.defineProperties(DrawCommand.prototype, {
/**
* Whether this command should cast shadows when shadowing is enabled.
- *
* @memberof DrawCommand.prototype
* @type {boolean}
* @default false
@@ -329,7 +315,6 @@ Object.defineProperties(DrawCommand.prototype, {
/**
* Whether this command should receive shadows when shadowing is enabled.
- *
* @memberof DrawCommand.prototype
* @type {boolean}
* @default false
@@ -349,7 +334,6 @@ Object.defineProperties(DrawCommand.prototype, {
/**
* An object with functions whose names match the uniforms in the shader program
* and return values to set those uniforms.
- *
* @memberof DrawCommand.prototype
* @type {object}
* @default undefined
@@ -368,7 +352,6 @@ Object.defineProperties(DrawCommand.prototype, {
/**
* The render state.
- *
* @memberof DrawCommand.prototype
* @type {RenderState}
* @default undefined
@@ -387,7 +370,6 @@ Object.defineProperties(DrawCommand.prototype, {
/**
* The framebuffer to draw to.
- *
* @memberof DrawCommand.prototype
* @type {Framebuffer}
* @default undefined
@@ -406,7 +388,6 @@ Object.defineProperties(DrawCommand.prototype, {
/**
* The pass when to render.
- *
* @memberof DrawCommand.prototype
* @type {Pass}
* @default undefined
@@ -426,7 +407,6 @@ Object.defineProperties(DrawCommand.prototype, {
/**
* Specifies if this command is only to be executed in the frustum closest
* to the eye containing the bounding volume. Defaults to false
.
- *
* @memberof DrawCommand.prototype
* @type {boolean}
* @default false
@@ -448,11 +428,9 @@ Object.defineProperties(DrawCommand.prototype, {
* execution; it allows us to see who created a command when we only have a
* reference to the command, and can be used to selectively execute commands
* with {@link Scene#debugCommandFilter}.
- *
* @memberof DrawCommand.prototype
* @type {object}
* @default undefined
- *
* @see Scene#debugCommandFilter
*/
owner: {
@@ -472,11 +450,9 @@ Object.defineProperties(DrawCommand.prototype, {
*
* Draws the {@link DrawCommand#boundingVolume} for this command, assuming it is a sphere, when the command executes.
*
- *
* @memberof DrawCommand.prototype
* @type {boolean}
* @default false
- *
* @see DrawCommand#boundingVolume
*/
debugShowBoundingVolume: {
@@ -509,7 +485,6 @@ Object.defineProperties(DrawCommand.prototype, {
/**
* A GLSL string that will evaluate to a pick id. When undefined
, the command will only draw depth
* during the pick pass.
- *
* @memberof DrawCommand.prototype
* @type {string}
* @default undefined
@@ -527,7 +502,6 @@ Object.defineProperties(DrawCommand.prototype, {
},
/**
* Whether this command should be executed in the pick pass only.
- *
* @memberof DrawCommand.prototype
* @type {boolean}
* @default false
@@ -545,7 +519,6 @@ Object.defineProperties(DrawCommand.prototype, {
},
/**
* Whether this command should be derived to draw depth for classification of translucent primitives.
- *
* @memberof DrawCommand.prototype
* @type {boolean}
* @default false
@@ -564,6 +537,8 @@ Object.defineProperties(DrawCommand.prototype, {
});
/**
+ * @param command
+ * @param result
* @private
*/
DrawCommand.shallowClone = function (command, result) {
@@ -600,7 +575,6 @@ DrawCommand.shallowClone = function (command, result) {
/**
* Executes the draw command.
- *
* @param {Context} context The renderer context in which to draw.
* @param {PassState} [passState] The state for the current render pass.
*/
diff --git a/packages/engine/Source/Renderer/Framebuffer.js b/packages/engine/Source/Renderer/Framebuffer.js
index ad0caf4688b0..1e587044420d 100644
--- a/packages/engine/Source/Renderer/Framebuffer.js
+++ b/packages/engine/Source/Renderer/Framebuffer.js
@@ -32,18 +32,16 @@ function attachRenderbuffer(framebuffer, attachment, renderbuffer) {
* Creates a framebuffer with optional initial color, depth, and stencil attachments.
* Framebuffers are used for render-to-texture effects; they allow us to render to
* textures in one pass, and read from it in a later pass.
- *
* @param {object} options The initial framebuffer attachments as shown in the example below. context
is required. The possible properties are colorTextures
, colorRenderbuffers
, depthTexture
, depthRenderbuffer
, stencilRenderbuffer
, depthStencilTexture
, depthStencilRenderbuffer
, and destroyAttachments
.
- *
- * @exception {DeveloperError} Cannot have both color texture and color renderbuffer attachments.
- * @exception {DeveloperError} Cannot have both a depth texture and depth renderbuffer attachment.
- * @exception {DeveloperError} Cannot have both a depth-stencil texture and depth-stencil renderbuffer attachment.
- * @exception {DeveloperError} Cannot have both a depth and depth-stencil renderbuffer.
- * @exception {DeveloperError} Cannot have both a stencil and depth-stencil renderbuffer.
- * @exception {DeveloperError} Cannot have both a depth and stencil renderbuffer.
- * @exception {DeveloperError} The color-texture pixel-format must be a color format.
- * @exception {DeveloperError} The depth-texture pixel-format must be DEPTH_COMPONENT.
- * @exception {DeveloperError} The depth-stencil-texture pixel-format must be DEPTH_STENCIL.
+ * @throws {DeveloperError} Cannot have both color texture and color renderbuffer attachments.
+ * @throws {DeveloperError} Cannot have both a depth texture and depth renderbuffer attachment.
+ * @throws {DeveloperError} Cannot have both a depth-stencil texture and depth-stencil renderbuffer attachment.
+ * @throws {DeveloperError} Cannot have both a depth and depth-stencil renderbuffer.
+ * @throws {DeveloperError} Cannot have both a stencil and depth-stencil renderbuffer.
+ * @throws {DeveloperError} Cannot have both a depth and stencil renderbuffer.
+ * @throws {DeveloperError} The color-texture pixel-format must be a color format.
+ * @throws {DeveloperError} The depth-texture pixel-format must be DEPTH_COMPONENT.
+ * @throws {DeveloperError} The depth-stencil-texture pixel-format must be DEPTH_STENCIL.
* @exception {DeveloperError} The number of color attachments exceeds the number supported.
* @exception {DeveloperError} The color-texture pixel datatype is HALF_FLOAT and the WebGL implementation does not support the EXT_color_buffer_half_float extension.
* @exception {DeveloperError} The color-texture pixel datatype is FLOAT and the WebGL implementation does not support the EXT_color_buffer_float or WEBGL_color_buffer_float extensions.
@@ -100,10 +98,8 @@ function Framebuffer(options) {
* When true, the framebuffer owns its attachments so they will be destroyed when
* {@link Framebuffer#destroy} is called or when a new attachment is assigned
* to an attachment point.
- *
* @type {boolean}
* @default true
- *
* @see Framebuffer#destroy
*/
this.destroyAttachments = defaultValue(options.destroyAttachments, true);
diff --git a/packages/engine/Source/Renderer/FramebufferManager.js b/packages/engine/Source/Renderer/FramebufferManager.js
index 5594895fa3db..2a50fb9929db 100644
--- a/packages/engine/Source/Renderer/FramebufferManager.js
+++ b/packages/engine/Source/Renderer/FramebufferManager.js
@@ -12,19 +12,17 @@ import PixelFormat from "../Core/PixelFormat.js";
/**
* Creates a wrapper object around a framebuffer and its resources.
- *
* @param {object} options Object with the following properties:
- * @param {number} [options.numSamples=1] The multisampling rate of the render targets. Requires a WebGL2 context.
- * @param {number} [options.colorAttachmentsLength=1] The number of color attachments this FramebufferManager will create.
- * @param {boolean} [options.color=true] Whether the FramebufferManager will use color attachments.
- * @param {boolean} [options.depth=false] Whether the FramebufferManager will use depth attachments.
- * @param {boolean} [options.depthStencil=false] Whether the FramebufferManager will use depth-stencil attachments.
- * @param {boolean} [options.supportsDepthTexture=false] Whether the FramebufferManager will create a depth texture when the extension is supported.
- * @param {boolean} [options.createColorAttachments=true] Whether the FramebufferManager will construct its own color attachments.
- * @param {boolean} [options.createDepthAttachments=true] Whether the FramebufferManager will construct its own depth attachments.
- * @param {PixelDatatype} [options.pixelDatatype=undefined] The default pixel datatype to use when creating color attachments.
+ * @param {number} [options.numSamples] The multisampling rate of the render targets. Requires a WebGL2 context.
+ * @param {number} [options.colorAttachmentsLength] The number of color attachments this FramebufferManager will create.
+ * @param {boolean} [options.color] Whether the FramebufferManager will use color attachments.
+ * @param {boolean} [options.depth] Whether the FramebufferManager will use depth attachments.
+ * @param {boolean} [options.depthStencil] Whether the FramebufferManager will use depth-stencil attachments.
+ * @param {boolean} [options.supportsDepthTexture] Whether the FramebufferManager will create a depth texture when the extension is supported.
+ * @param {boolean} [options.createColorAttachments] Whether the FramebufferManager will construct its own color attachments.
+ * @param {boolean} [options.createDepthAttachments] Whether the FramebufferManager will construct its own depth attachments.
+ * @param {PixelDatatype} [options.pixelDatatype] The default pixel datatype to use when creating color attachments.
* @param {PixelFormat} [options.pixelFormat=undefined] The default pixel format to use when creating color attachments.
- *
* @exception {DeveloperError} Must enable at least one type of framebuffer attachment.
* @exception {DeveloperError} Cannot have both a depth and depth-stencil attachment.
*
diff --git a/packages/engine/Source/Renderer/MultisampleFramebuffer.js b/packages/engine/Source/Renderer/MultisampleFramebuffer.js
index 183e1bf20a74..6380c216b351 100644
--- a/packages/engine/Source/Renderer/MultisampleFramebuffer.js
+++ b/packages/engine/Source/Renderer/MultisampleFramebuffer.js
@@ -11,14 +11,11 @@ import Framebuffer from "./Framebuffer.js";
* renderbuffer attachments and is bound to READ_FRAMEBUFFER during the blit. The
* second is bound to DRAW_FRAMEBUFFER during the blit, and has texture attachments
* to store the copied pixels.
- *
* @param {object} options The initial framebuffer attachments. context
, width
, and height
are required. The possible properties are colorTextures
, colorRenderbuffers
, depthStencilTexture
, depthStencilRenderbuffer
, and destroyAttachments
.
- *
- * @exception {DeveloperError} Both color renderbuffer and texture attachments must be provided.
- * @exception {DeveloperError} Both depth-stencil renderbuffer and texture attachments must be provided.
- *
+ * @throws {DeveloperError} Both color renderbuffer and texture attachments must be provided.
+ * @throws {DeveloperError} Both depth-stencil renderbuffer and texture attachments must be provided.
* @private
- * @constructor
+ * @class
*/
function MultisampleFramebuffer(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
diff --git a/packages/engine/Source/Renderer/Pass.js b/packages/engine/Source/Renderer/Pass.js
index bdfe61dc1564..815a01cafe64 100644
--- a/packages/engine/Source/Renderer/Pass.js
+++ b/packages/engine/Source/Renderer/Pass.js
@@ -1,6 +1,5 @@
/**
* The render pass for a command.
- *
* @private
*/
const Pass = {
diff --git a/packages/engine/Source/Renderer/PassState.js b/packages/engine/Source/Renderer/PassState.js
index a0ec7e603412..c4c707170df9 100644
--- a/packages/engine/Source/Renderer/PassState.js
+++ b/packages/engine/Source/Renderer/PassState.js
@@ -1,14 +1,13 @@
/**
* The state for a particular rendering pass. This is used to supplement the state
* in a command being executed.
- *
+ * @param context
* @private
- * @constructor
+ * @class
*/
function PassState(context) {
/**
* The context used to execute commands for this pass.
- *
* @type {Context}
*/
this.context = context;
@@ -17,7 +16,6 @@ function PassState(context) {
* The framebuffer to render to. This framebuffer is used unless a {@link DrawCommand}
* or {@link ClearCommand} explicitly define a framebuffer, which is used for off-screen
* rendering.
- *
* @type {Framebuffer}
* @default undefined
*/
@@ -29,7 +27,6 @@ function PassState(context) {
*
* When this is undefined
, the {@link DrawCommand}'s property is used.
*
- *
* @type {boolean}
* @default undefined
*/
@@ -41,7 +38,6 @@ function PassState(context) {
*
* When this is undefined
, the {@link DrawCommand}'s property is used.
*
- *
* @type {object}
* @default undefined
*/
diff --git a/packages/engine/Source/Renderer/PixelDatatype.js b/packages/engine/Source/Renderer/PixelDatatype.js
index e04330d36f9e..09f67d815469 100644
--- a/packages/engine/Source/Renderer/PixelDatatype.js
+++ b/packages/engine/Source/Renderer/PixelDatatype.js
@@ -2,7 +2,6 @@ import WebGLConstants from "../Core/WebGLConstants.js";
/**
* The data type of a pixel.
- *
* @enum {number}
* @see PostProcessStage
*/
@@ -19,8 +18,10 @@ const PixelDatatype = {
};
/**
+ * @param pixelDatatype
+ * @param context
@private
-*/
+ */
PixelDatatype.toWebGLConstant = function (pixelDatatype, context) {
switch (pixelDatatype) {
case PixelDatatype.UNSIGNED_BYTE:
@@ -47,8 +48,9 @@ PixelDatatype.toWebGLConstant = function (pixelDatatype, context) {
};
/**
+ * @param pixelDatatype
@private
-*/
+ */
PixelDatatype.isPacked = function (pixelDatatype) {
return (
pixelDatatype === PixelDatatype.UNSIGNED_INT_24_8 ||
@@ -59,8 +61,9 @@ PixelDatatype.isPacked = function (pixelDatatype) {
};
/**
+ * @param pixelDatatype
@private
-*/
+ */
PixelDatatype.sizeInBytes = function (pixelDatatype) {
switch (pixelDatatype) {
case PixelDatatype.UNSIGNED_BYTE:
@@ -79,8 +82,9 @@ PixelDatatype.sizeInBytes = function (pixelDatatype) {
};
/**
+ * @param pixelDatatype
@private
-*/
+ */
PixelDatatype.validate = function (pixelDatatype) {
return (
pixelDatatype === PixelDatatype.UNSIGNED_BYTE ||
diff --git a/packages/engine/Source/Renderer/RenderState.js b/packages/engine/Source/Renderer/RenderState.js
index e83838745c35..9e15089ef44d 100644
--- a/packages/engine/Source/Renderer/RenderState.js
+++ b/packages/engine/Source/Renderer/RenderState.js
@@ -86,6 +86,7 @@ function validateStencilOperation(stencilOperation) {
}
/**
+ * @param renderState
* @private
*/
function RenderState(renderState) {
@@ -371,18 +372,16 @@ let renderStateCache = {};
* Validates and then finds or creates an immutable render state, which defines the pipeline
* state for a {@link DrawCommand} or {@link ClearCommand}. All inputs states are optional. Omitted states
* use the defaults shown in the example below.
- *
* @param {object} [renderState] The states defining the render state as shown in the example below.
- *
- * @exception {RuntimeError} renderState.lineWidth is out of range.
- * @exception {DeveloperError} Invalid renderState.frontFace.
- * @exception {DeveloperError} Invalid renderState.cull.face.
- * @exception {DeveloperError} scissorTest.rectangle.width and scissorTest.rectangle.height must be greater than or equal to zero.
- * @exception {DeveloperError} renderState.depthRange.near can't be greater than renderState.depthRange.far.
- * @exception {DeveloperError} renderState.depthRange.near must be greater than or equal to zero.
- * @exception {DeveloperError} renderState.depthRange.far must be less than or equal to zero.
- * @exception {DeveloperError} Invalid renderState.depthTest.func.
- * @exception {DeveloperError} renderState.blending.color components must be greater than or equal to zero and less than or equal to one
+ * @throws {RuntimeError} renderState.lineWidth is out of range.
+ * @throws {DeveloperError} Invalid renderState.frontFace.
+ * @throws {DeveloperError} Invalid renderState.cull.face.
+ * @throws {DeveloperError} scissorTest.rectangle.width and scissorTest.rectangle.height must be greater than or equal to zero.
+ * @throws {DeveloperError} renderState.depthRange.near can't be greater than renderState.depthRange.far.
+ * @throws {DeveloperError} renderState.depthRange.near must be greater than or equal to zero.
+ * @throws {DeveloperError} renderState.depthRange.far must be less than or equal to zero.
+ * @throws {DeveloperError} Invalid renderState.depthTest.func.
+ * @throws {DeveloperError} renderState.blending.color components must be greater than or equal to zero and less than or equal to one
* @exception {DeveloperError} Invalid renderState.blending.equationRgb.
* @exception {DeveloperError} Invalid renderState.blending.equationAlpha.
* @exception {DeveloperError} Invalid renderState.blending.functionSourceRgb.
@@ -525,6 +524,7 @@ RenderState.fromCache = function (renderState) {
};
/**
+ * @param renderState
* @private
*/
RenderState.removeFromCache = function (renderState) {
diff --git a/packages/engine/Source/Renderer/Renderbuffer.js b/packages/engine/Source/Renderer/Renderbuffer.js
index ab875c2878db..1263cead947c 100644
--- a/packages/engine/Source/Renderer/Renderbuffer.js
+++ b/packages/engine/Source/Renderer/Renderbuffer.js
@@ -7,6 +7,7 @@ import ContextLimits from "./ContextLimits.js";
import RenderbufferFormat from "./RenderbufferFormat.js";
/**
+ * @param options
* @private
*/
function Renderbuffer(options) {
diff --git a/packages/engine/Source/Renderer/Sampler.js b/packages/engine/Source/Renderer/Sampler.js
index 349fa8edfc2a..8628f82d0007 100644
--- a/packages/engine/Source/Renderer/Sampler.js
+++ b/packages/engine/Source/Renderer/Sampler.js
@@ -7,6 +7,7 @@ import TextureMinificationFilter from "./TextureMinificationFilter.js";
import TextureWrap from "./TextureWrap.js";
/**
+ * @param options
* @private
*/
function Sampler(options) {
diff --git a/packages/engine/Source/Renderer/ShaderBuilder.js b/packages/engine/Source/Renderer/ShaderBuilder.js
index 6fd79ab0098e..7f0804e476ac 100644
--- a/packages/engine/Source/Renderer/ShaderBuilder.js
+++ b/packages/engine/Source/Renderer/ShaderBuilder.js
@@ -20,10 +20,8 @@ import ShaderFunction from "./ShaderFunction.js";
* For fragment shaders, the shader builder tracks a list of #defines
,
* a list of attributes, a list of uniforms, and a list of shader lines.
*
- *
* @alias ShaderBuilder
- * @constructor
- *
+ * @class
* @example
* const shaderBuilder = new ShaderBuilder();
* shaderBuilder.addDefine("SOLID_COLOR", undefined, ShaderDestination.FRAGMENT);
@@ -50,7 +48,6 @@ import ShaderFunction from "./ShaderFunction.js";
* "}"
* ]);
* const shaderProgram = shaderBuilder.build(context);
- *
* @private
*/
function ShaderBuilder() {
@@ -90,7 +87,6 @@ Object.defineProperties(ShaderBuilder.prototype, {
/**
* Get a dictionary of attribute names to the integer location in
* the vertex shader.
- *
* @memberof ShaderBuilder.prototype
* @type {Object}
* @readonly
@@ -106,11 +102,9 @@ Object.defineProperties(ShaderBuilder.prototype, {
/**
* Add a #define
macro to one or both of the shaders. These lines
* will appear at the top of the final shader source.
- *
* @param {string} identifier An identifier for the macro. Identifiers must use uppercase letters with underscores to be consistent with Cesium's style guide.
* @param {string} [value] The value of the macro. If undefined, the define will not include a value. The value will be converted to GLSL code via toString()
- * @param {ShaderDestination} [destination=ShaderDestination.BOTH] Whether the define appears in the vertex shader, the fragment shader, or both.
- *
+ * @param {ShaderDestination} [destination] Whether the define appears in the vertex shader, the fragment shader, or both.
* @example
* // creates the line "#define ENABLE_LIGHTING" in both shaders
* shaderBuilder.addDefine("ENABLE_LIGHTING");
@@ -144,7 +138,6 @@ ShaderBuilder.prototype.addDefine = function (identifier, value, destination) {
* @param {string} structId A unique ID to identify this struct in {@link ShaderBuilder#addStructField}
* @param {string} structName The name of the struct as it will appear in the shader.
* @param {ShaderDestination} destination Whether the struct will appear in the vertex shader, the fragment shader, or both.
- *
* @example
* // generates the following struct in the fragment shader
* // struct TestStruct
@@ -177,7 +170,6 @@ ShaderBuilder.prototype.addStruct = function (
* @param {string} structId The ID of the struct. This must be created first with {@link ShaderBuilder#addStruct}
* @param {string} type The GLSL type of the field
* @param {string} identifier The identifier of the field.
- *
* @example
* // generates the following struct in the fragment shader
* // struct TestStruct
@@ -235,7 +227,6 @@ ShaderBuilder.prototype.addFunction = function (
* Add lines to a dynamically-generated function
* @param {string} functionName The name of the function. This must be created beforehand using {@link ShaderBuilder#addFunction}
* @param {string|string[]} lines One or more lines of GLSL code to add to the function body. Do not include any preceding or ending whitespace, but do include the semicolon for each line.
- *
* @example
* // generates the following function in the vertex shader
* // vec3 testFunction(float parameter)
@@ -264,11 +255,9 @@ ShaderBuilder.prototype.addFunctionLines = function (functionName, lines) {
/**
* Add a uniform declaration to one or both of the shaders. These lines
* will appear grouped near the top of the final shader source.
- *
* @param {string} type The GLSL type of the uniform.
* @param {string} identifier An identifier for the uniform. Identifiers must begin with u_
to be consistent with Cesium's style guide.
- * @param {ShaderDestination} [destination=ShaderDestination.BOTH] Whether the uniform appears in the vertex shader, the fragment shader, or both.
- *
+ * @param {ShaderDestination} [destination] Whether the uniform appears in the vertex shader, the fragment shader, or both.
* @example
* // creates the line "uniform vec3 u_resolution;"
* shaderBuilder.addUniform("vec3", "u_resolution", ShaderDestination.FRAGMENT);
@@ -301,11 +290,9 @@ ShaderBuilder.prototype.addUniform = function (type, identifier, destination) {
* reserved for the position attribute. For all other attributes, see
* {@link ShaderBuilder#addAttribute}
*
- *
* @param {string} type The GLSL type of the attribute
* @param {string} identifier An identifier for the attribute. Identifiers must begin with a_
to be consistent with Cesium's style guide.
- * @return {number} The integer location of the attribute. This location can be used when creating attributes for a {@link VertexArray}. This will always be 0.
- *
+ * @returns {number} The integer location of the attribute. This location can be used when creating attributes for a {@link VertexArray}. This will always be 0.
* @example
* // creates the line "in vec3 a_position;"
* shaderBuilder.setPositionAttribute("vec3", "a_position");
@@ -337,11 +324,9 @@ ShaderBuilder.prototype.setPositionAttribute = function (type, identifier) {
* Some WebGL implementations require attribute 0 to be enabled, so this is
* reserved for the position attribute. See {@link ShaderBuilder#setPositionAttribute}
*
- *
* @param {string} type The GLSL type of the attribute
* @param {string} identifier An identifier for the attribute. Identifiers must begin with a_
to be consistent with Cesium's style guide.
- * @return {number} The integer location of the attribute. This location can be used when creating attributes for a {@link VertexArray}
- *
+ * @returns {number} The integer location of the attribute. This location can be used when creating attributes for a {@link VertexArray}
* @example
* // creates the line "in vec2 a_texCoord0;" in the vertex shader
* shaderBuilder.addAttribute("vec2", "a_texCoord0");
@@ -366,11 +351,9 @@ ShaderBuilder.prototype.addAttribute = function (type, identifier) {
/**
* Add a varying declaration to both the vertex and fragment shaders.
- *
* @param {string} type The GLSL type of the varying
* @param {string} identifier An identifier for the varying. Identifiers must begin with v_
to be consistent with Cesium's style guide.
* @param {string} [qualifier] A qualifier for the varying, such as flat
.
- *
* @example
* // creates the line "in vec3 v_color;" in the vertex shader
* // creates the line "out vec3 v_color;" in the fragment shader
@@ -391,9 +374,7 @@ ShaderBuilder.prototype.addVarying = function (type, identifier, qualifier) {
/**
* Appends lines of GLSL code to the vertex shader
- *
* @param {string|string[]} lines One or more lines to add to the end of the vertex shader source
- *
* @example
* shaderBuilder.addVertexLines([
* "void main()",
@@ -423,9 +404,7 @@ ShaderBuilder.prototype.addVertexLines = function (lines) {
/**
* Appends lines of GLSL code to the fragment shader
- *
* @param {string[]} lines The lines to add to the end of the fragment shader source
- *
* @example
* shaderBuilder.addFragmentLines([
* "void main()",
@@ -460,10 +439,8 @@ ShaderBuilder.prototype.addFragmentLines = function (lines) {
* Builds the {@link ShaderProgram} from the pieces added by the other methods.
* Call this one time at the end of modifying the shader through the other
* methods in this class.
- *
* @param {Context} context The context to use for creating the shader.
- * @return {ShaderProgram} A shader program to use for rendering.
- *
+ * @returns {ShaderProgram} A shader program to use for rendering.
* @example
* const shaderProgram = shaderBuilder.buildShaderProgram(context);
*/
diff --git a/packages/engine/Source/Renderer/ShaderCache.js b/packages/engine/Source/Renderer/ShaderCache.js
index 95268dd6b8b3..4b0268348504 100644
--- a/packages/engine/Source/Renderer/ShaderCache.js
+++ b/packages/engine/Source/Renderer/ShaderCache.js
@@ -4,6 +4,7 @@ import ShaderProgram from "./ShaderProgram.js";
import ShaderSource from "./ShaderSource.js";
/**
+ * @param context
* @private
*/
function ShaderCache(context) {
@@ -22,32 +23,27 @@ Object.defineProperties(ShaderCache.prototype, {
});
/**
- * Returns a shader program from the cache, or creates and caches a new shader program,
- * given the GLSL vertex and fragment shader source and attribute locations.
- *
- * The difference between this and {@link ShaderCache#getShaderProgram}, is this is used to
- * replace an existing reference to a shader program, which is passed as the first argument.
- *
- *
- * @param {object} options Object with the following properties:
- * @param {ShaderProgram} [options.shaderProgram] The shader program that is being reassigned.
- * @param {string|ShaderSource} options.vertexShaderSource The GLSL source for the vertex shader.
- * @param {string|ShaderSource} options.fragmentShaderSource The GLSL source for the fragment shader.
- * @param {object} options.attributeLocations Indices for the attribute inputs to the vertex shader.
-
- * @returns {ShaderProgram} The cached or newly created shader program.
- *
- *
- * @example
- * this._shaderProgram = context.shaderCache.replaceShaderProgram({
- * shaderProgram : this._shaderProgram,
- * vertexShaderSource : vs,
- * fragmentShaderSource : fs,
- * attributeLocations : attributeLocations
- * });
- *
- * @see ShaderCache#getShaderProgram
- */
+ * Returns a shader program from the cache, or creates and caches a new shader program,
+ * given the GLSL vertex and fragment shader source and attribute locations.
+ *
+ * The difference between this and {@link ShaderCache#getShaderProgram}, is this is used to
+ * replace an existing reference to a shader program, which is passed as the first argument.
+ *
+ * @param {object} options Object with the following properties:
+ * @param {ShaderProgram} [options.shaderProgram] The shader program that is being reassigned.
+ * @param {string|ShaderSource} options.vertexShaderSource The GLSL source for the vertex shader.
+ * @param {string|ShaderSource} options.fragmentShaderSource The GLSL source for the fragment shader.
+ * @param {object} options.attributeLocations Indices for the attribute inputs to the vertex shader.
+ * @returns {ShaderProgram} The cached or newly created shader program.
+ * @example
+ * this._shaderProgram = context.shaderCache.replaceShaderProgram({
+ * shaderProgram : this._shaderProgram,
+ * vertexShaderSource : vs,
+ * fragmentShaderSource : fs,
+ * attributeLocations : attributeLocations
+ * });
+ * @see ShaderCache#getShaderProgram
+ */
ShaderCache.prototype.replaceShaderProgram = function (options) {
if (defined(options.shaderProgram)) {
options.shaderProgram.destroy();
@@ -64,12 +60,10 @@ function toSortedJson(dictionary) {
/**
* Returns a shader program from the cache, or creates and caches a new shader program,
* given the GLSL vertex and fragment shader source and attribute locations.
- *
* @param {object} options Object with the following properties:
* @param {string|ShaderSource} options.vertexShaderSource The GLSL source for the vertex shader.
* @param {string|ShaderSource} options.fragmentShaderSource The GLSL source for the fragment shader.
* @param {object} options.attributeLocations Indices for the attribute inputs to the vertex shader.
- *
* @returns {ShaderProgram} The cached or newly created shader program.
*/
ShaderCache.prototype.getShaderProgram = function (options) {
diff --git a/packages/engine/Source/Renderer/ShaderDestination.js b/packages/engine/Source/Renderer/ShaderDestination.js
index eb3a9af3c318..66889b17722f 100644
--- a/packages/engine/Source/Renderer/ShaderDestination.js
+++ b/packages/engine/Source/Renderer/ShaderDestination.js
@@ -3,7 +3,6 @@ import Check from "../Core/Check.js";
/**
* An enum describing whether a variable should be added to the
* vertex shader, the fragment shader, or both.
- *
* @private
*/
const ShaderDestination = {
@@ -14,9 +13,8 @@ const ShaderDestination = {
/**
* Check if a variable should be included in the vertex shader.
- *
* @param {ShaderDestination} destination The ShaderDestination to check
- * @return {boolean} true
if the variable appears in the vertex shader, or false
otherwise
+ * @returns {boolean} true
if the variable appears in the vertex shader, or false
otherwise
* @private
*/
ShaderDestination.includesVertexShader = function (destination) {
@@ -32,9 +30,8 @@ ShaderDestination.includesVertexShader = function (destination) {
/**
* Check if a variable should be included in the vertex shader.
- *
* @param {ShaderDestination} destination The ShaderDestination to check
- * @return {boolean} true
if the variable appears in the vertex shader, or false
otherwise
+ * @returns {boolean} true
if the variable appears in the vertex shader, or false
otherwise
* @private
*/
ShaderDestination.includesFragmentShader = function (destination) {
diff --git a/packages/engine/Source/Renderer/ShaderFunction.js b/packages/engine/Source/Renderer/ShaderFunction.js
index 3da6656486ee..689a08e11224 100644
--- a/packages/engine/Source/Renderer/ShaderFunction.js
+++ b/packages/engine/Source/Renderer/ShaderFunction.js
@@ -2,10 +2,8 @@ import DeveloperError from "../Core/DeveloperError.js";
/**
* A utility for dynamically-generating a GLSL function
- *
* @alias ShaderFunction
- * @constructor
- *
+ * @class
* @see {@link ShaderBuilder}
* @param {string} signature The full signature of the function as it will appear in the shader. Do not include the curly braces.
* @example
@@ -21,7 +19,6 @@ import DeveloperError from "../Core/DeveloperError.js";
* func.addLine("v_positionEC = (czm_modelView * vec4(a_position, 1.0)).xyz;");
* func.addLine("v_texCoord = a_texCoord;");
* const generatedLines = func.generateGlslLines();
- *
* @private
*/
function ShaderFunction(signature) {
@@ -57,7 +54,7 @@ ShaderFunction.prototype.addLines = function (lines) {
/**
* Generate lines of GLSL code for use with {@link ShaderBuilder}
- * @return {string[]}
+ * @returns {string[]}
*/
ShaderFunction.prototype.generateGlslLines = function () {
return [].concat(this.signature, "{", this.body, "}");
diff --git a/packages/engine/Source/Renderer/ShaderProgram.js b/packages/engine/Source/Renderer/ShaderProgram.js
index c3e5d067efb4..33c512409fa2 100644
--- a/packages/engine/Source/Renderer/ShaderProgram.js
+++ b/packages/engine/Source/Renderer/ShaderProgram.js
@@ -12,6 +12,7 @@ import createUniformArray from "./createUniformArray.js";
let nextShaderProgramId = 0;
/**
+ * @param options
* @private
*/
function ShaderProgram(options) {
@@ -86,7 +87,6 @@ Object.defineProperties(ShaderProgram.prototype, {
/**
* GLSL source for the shader program's vertex shader.
* @memberof ShaderProgram.prototype
- *
* @type {ShaderSource}
* @readonly
*/
@@ -98,7 +98,6 @@ Object.defineProperties(ShaderProgram.prototype, {
/**
* GLSL source for the shader program's fragment shader.
* @memberof ShaderProgram.prototype
- *
* @type {ShaderSource}
* @readonly
*/
diff --git a/packages/engine/Source/Renderer/ShaderSource.js b/packages/engine/Source/Renderer/ShaderSource.js
index 66d253e19ef5..59aef685fc40 100644
--- a/packages/engine/Source/Renderer/ShaderSource.js
+++ b/packages/engine/Source/Renderer/ShaderSource.js
@@ -303,15 +303,12 @@ function combineShader(shaderSource, isFragmentShader, context) {
/**
* An object containing various inputs that will be combined to form a final GLSL shader string.
- *
* @param {object} [options] Object with the following properties:
* @param {string[]} [options.sources] An array of strings to combine containing GLSL code for the shader.
* @param {string[]} [options.defines] An array of strings containing GLSL identifiers to #define
.
* @param {string} [options.pickColorQualifier] The GLSL qualifier, uniform
or in
, for the input czm_pickColor
. When defined, a pick fragment shader is generated.
- * @param {boolean} [options.includeBuiltIns=true] If true, referenced built-in functions will be included with the combined shader. Set to false if this shader will become a source in another shader, to avoid duplicating functions.
- *
- * @exception {DeveloperError} options.pickColorQualifier must be 'uniform' or 'in'.
- *
+ * @param {boolean} [options.includeBuiltIns] If true, referenced built-in functions will be included with the combined shader. Set to false if this shader will become a source in another shader, to avoid duplicating functions.
+ * @throws {DeveloperError} options.pickColorQualifier must be 'uniform' or 'in'.
* @example
* // 1. Prepend #defines to a shader
* const source = new Cesium.ShaderSource({
@@ -324,7 +321,6 @@ function combineShader(shaderSource, isFragmentShader, context) {
* sources : ['void main() { out_FragColor = vec4(1.0); }'],
* pickColorQualifier : 'uniform'
* });
- *
* @private
*/
function ShaderSource(options) {
@@ -367,9 +363,7 @@ ShaderSource.replaceMain = function (source, renamedMain) {
* Since {@link ShaderSource#createCombinedVertexShader} and
* {@link ShaderSource#createCombinedFragmentShader} are both expensive to
* compute, create a simpler string key for lookups in the {@link ShaderCache}.
- *
* @returns {string} A key for identifying this shader
- *
* @private
*/
ShaderSource.prototype.getCacheKey = function () {
@@ -385,9 +379,7 @@ ShaderSource.prototype.getCacheKey = function () {
/**
* Create a single string containing the full, combined vertex shader with all dependencies and defines.
- *
* @param {Context} context The current rendering context
- *
* @returns {string} The combined shader string.
*/
ShaderSource.prototype.createCombinedVertexShader = function (context) {
@@ -396,9 +388,7 @@ ShaderSource.prototype.createCombinedVertexShader = function (context) {
/**
* Create a single string containing the full, combined fragment shader with all dependencies and defines.
- *
* @param {Context} context The current rendering context
- *
* @returns {string} The combined shader string.
*/
ShaderSource.prototype.createCombinedFragmentShader = function (context) {
diff --git a/packages/engine/Source/Renderer/ShaderStruct.js b/packages/engine/Source/Renderer/ShaderStruct.js
index c65c4983cd26..8488f692ef4c 100644
--- a/packages/engine/Source/Renderer/ShaderStruct.js
+++ b/packages/engine/Source/Renderer/ShaderStruct.js
@@ -1,9 +1,7 @@
/**
* A utility for dynamically-generating a GLSL struct.
- *
* @alias ShaderStruct
- * @constructor
- *
+ * @class
* @see {@link ShaderBuilder}
* @param {string} name The name of the struct as it will appear in the shader.
* @example
@@ -20,7 +18,6 @@
* struct.addField("vec3", "normal");
* struct.addField("vec2", "texCoord");
* const generatedLines = struct.generateGlslLines();
- *
* @private
*/
function ShaderStruct(name) {
@@ -40,7 +37,7 @@ ShaderStruct.prototype.addField = function (type, identifier) {
/**
* Generate a list of lines of GLSL code for use with {@link ShaderBuilder}
- * @return {string[]} The generated GLSL code.
+ * @returns {string[]} The generated GLSL code.
*/
ShaderStruct.prototype.generateGlslLines = function () {
let fields = this.fields;
diff --git a/packages/engine/Source/Renderer/Texture.js b/packages/engine/Source/Renderer/Texture.js
index 1f157e74ce1c..6080dcd670b1 100644
--- a/packages/engine/Source/Renderer/Texture.js
+++ b/packages/engine/Source/Renderer/Texture.js
@@ -15,6 +15,7 @@ import TextureMagnificationFilter from "./TextureMagnificationFilter.js";
import TextureMinificationFilter from "./TextureMinificationFilter.js";
/**
+ * @param options
* @private
*/
function Texture(options) {
@@ -401,6 +402,7 @@ function Texture(options) {
/**
* This function is identical to using the Texture constructor except that it can be
* replaced with a mock/spy in tests.
+ * @param options
* @private
*/
Texture.create = function (options) {
@@ -410,21 +412,19 @@ Texture.create = function (options) {
/**
* Creates a texture, and copies a subimage of the framebuffer to it. When called without arguments,
* the texture is the same width and height as the framebuffer and contains its contents.
- *
* @param {object} options Object with the following properties:
* @param {Context} options.context The context in which the Texture gets created.
- * @param {PixelFormat} [options.pixelFormat=PixelFormat.RGB] The texture's internal pixel format.
- * @param {number} [options.framebufferXOffset=0] An offset in the x direction in the framebuffer where copying begins from.
- * @param {number} [options.framebufferYOffset=0] An offset in the y direction in the framebuffer where copying begins from.
- * @param {number} [options.width=canvas.clientWidth] The width of the texture in texels.
- * @param {number} [options.height=canvas.clientHeight] The height of the texture in texels.
- * @param {Framebuffer} [options.framebuffer=defaultFramebuffer] The framebuffer from which to create the texture. If this
+ * @param {PixelFormat} [options.pixelFormat] The texture's internal pixel format.
+ * @param {number} [options.framebufferXOffset] An offset in the x direction in the framebuffer where copying begins from.
+ * @param {number} [options.framebufferYOffset] An offset in the y direction in the framebuffer where copying begins from.
+ * @param {number} [options.width] The width of the texture in texels.
+ * @param {number} [options.height] The height of the texture in texels.
+ * @param {Framebuffer} [options.framebuffer] The framebuffer from which to create the texture. If this
* parameter is not specified, the default framebuffer is used.
* @returns {Texture} A texture with contents from the framebuffer.
- *
- * @exception {DeveloperError} Invalid pixelFormat.
- * @exception {DeveloperError} pixelFormat cannot be DEPTH_COMPONENT, DEPTH_STENCIL or a compressed format.
- * @exception {DeveloperError} framebufferXOffset must be greater than or equal to zero.
+ * @throws {DeveloperError} Invalid pixelFormat.
+ * @throws {DeveloperError} pixelFormat cannot be DEPTH_COMPONENT, DEPTH_STENCIL or a compressed format.
+ * @throws {DeveloperError} framebufferXOffset must be greater than or equal to zero.
* @exception {DeveloperError} framebufferYOffset must be greater than or equal to zero.
* @exception {DeveloperError} framebufferXOffset + width must be less than or equal to canvas.clientWidth.
* @exception {DeveloperError} framebufferYOffset + height must be less than or equal to canvas.clientHeight.
@@ -651,16 +651,15 @@ Object.defineProperties(Texture.prototype, {
* @param {object} options Object with the following properties:
* @param {object} options.source The source {@link ImageData}, {@link HTMLImageElement}, {@link HTMLCanvasElement}, or {@link HTMLVideoElement},
* or an object with width, height, and arrayBufferView properties.
- * @param {number} [options.xOffset=0] The offset in the x direction within the texture to copy into.
- * @param {number} [options.yOffset=0] The offset in the y direction within the texture to copy into.
- * @param {boolean} [options.skipColorSpaceConversion=false] If true, any custom gamma or color profiles in the texture will be ignored.
- *
- * @exception {DeveloperError} Cannot call copyFrom when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.
- * @exception {DeveloperError} Cannot call copyFrom with a compressed texture pixel format.
- * @exception {DeveloperError} xOffset must be greater than or equal to zero.
- * @exception {DeveloperError} yOffset must be greater than or equal to zero.
- * @exception {DeveloperError} xOffset + source.width must be less than or equal to width.
- * @exception {DeveloperError} yOffset + source.height must be less than or equal to height.
+ * @param {number} [options.xOffset] The offset in the x direction within the texture to copy into.
+ * @param {number} [options.yOffset] The offset in the y direction within the texture to copy into.
+ * @param {boolean} [options.skipColorSpaceConversion] If true, any custom gamma or color profiles in the texture will be ignored.
+ * @throws {DeveloperError} Cannot call copyFrom when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.
+ * @throws {DeveloperError} Cannot call copyFrom with a compressed texture pixel format.
+ * @throws {DeveloperError} xOffset must be greater than or equal to zero.
+ * @throws {DeveloperError} yOffset must be greater than or equal to zero.
+ * @throws {DeveloperError} xOffset + source.width must be less than or equal to width.
+ * @throws {DeveloperError} yOffset + source.height must be less than or equal to height.
* @exception {DeveloperError} This texture was destroyed, i.e., destroy() was called.
*
* @example
@@ -872,16 +871,15 @@ Texture.prototype.copyFrom = function (options) {
};
/**
- * @param {number} [xOffset=0] The offset in the x direction within the texture to copy into.
- * @param {number} [yOffset=0] The offset in the y direction within the texture to copy into.
- * @param {number} [framebufferXOffset=0] optional
- * @param {number} [framebufferYOffset=0] optional
- * @param {number} [width=width] optional
- * @param {number} [height=height] optional
- *
- * @exception {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.
- * @exception {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.
- * @exception {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.
+ * @param {number} [xOffset] The offset in the x direction within the texture to copy into.
+ * @param {number} [yOffset] The offset in the y direction within the texture to copy into.
+ * @param {number} [framebufferXOffset] optional
+ * @param {number} [framebufferYOffset] optional
+ * @param {number} [width] optional
+ * @param {number} [height] optional
+ * @throws {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.
+ * @throws {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.
+ * @throws {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.
* @exception {DeveloperError} Cannot call copyFrom with a compressed texture pixel format.
* @exception {DeveloperError} This texture was destroyed, i.e., destroy() was called.
* @exception {DeveloperError} xOffset must be greater than or equal to zero.
@@ -972,14 +970,13 @@ Texture.prototype.copyFromFramebuffer = function (
};
/**
- * @param {MipmapHint} [hint=MipmapHint.DONT_CARE] optional.
- *
- * @exception {DeveloperError} Cannot call generateMipmap when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.
- * @exception {DeveloperError} Cannot call generateMipmap when the texture pixel format is a compressed format.
- * @exception {DeveloperError} hint is invalid.
- * @exception {DeveloperError} This texture's width must be a power of two to call generateMipmap() in a WebGL1 context.
- * @exception {DeveloperError} This texture's height must be a power of two to call generateMipmap() in a WebGL1 context.
- * @exception {DeveloperError} This texture was destroyed, i.e., destroy() was called.
+ * @param {MipmapHint} [hint] optional.
+ * @throws {DeveloperError} Cannot call generateMipmap when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.
+ * @throws {DeveloperError} Cannot call generateMipmap when the texture pixel format is a compressed format.
+ * @throws {DeveloperError} hint is invalid.
+ * @throws {DeveloperError} This texture's width must be a power of two to call generateMipmap() in a WebGL1 context.
+ * @throws {DeveloperError} This texture's height must be a power of two to call generateMipmap() in a WebGL1 context.
+ * @throws {DeveloperError} This texture was destroyed, i.e., destroy() was called.
*/
Texture.prototype.generateMipmap = function (hint) {
hint = defaultValue(hint, MipmapHint.DONT_CARE);
diff --git a/packages/engine/Source/Renderer/TextureMagnificationFilter.js b/packages/engine/Source/Renderer/TextureMagnificationFilter.js
index 3dfc3589def4..9d1c77752dff 100644
--- a/packages/engine/Source/Renderer/TextureMagnificationFilter.js
+++ b/packages/engine/Source/Renderer/TextureMagnificationFilter.js
@@ -2,22 +2,18 @@ import WebGLConstants from "../Core/WebGLConstants.js";
/**
* Enumerates all possible filters used when magnifying WebGL textures.
- *
* @enum {number}
- *
* @see TextureMinificationFilter
*/
const TextureMagnificationFilter = {
/**
* Samples the texture by returning the closest pixel.
- *
* @type {number}
* @constant
*/
NEAREST: WebGLConstants.NEAREST,
/**
* Samples the texture through bi-linear interpolation of the four nearest pixels. This produces smoother results than NEAREST
filtering.
- *
* @type {number}
* @constant
*/
@@ -28,7 +24,6 @@ const TextureMagnificationFilter = {
* Validates the given textureMinificationFilter
with respect to the possible enum values.
* @param textureMagnificationFilter
* @returns {boolean} true
if textureMagnificationFilter
is valid.
- *
* @private
*/
TextureMagnificationFilter.validate = function (textureMagnificationFilter) {
diff --git a/packages/engine/Source/Renderer/TextureMinificationFilter.js b/packages/engine/Source/Renderer/TextureMinificationFilter.js
index 9c881d206668..8a358bb01043 100644
--- a/packages/engine/Source/Renderer/TextureMinificationFilter.js
+++ b/packages/engine/Source/Renderer/TextureMinificationFilter.js
@@ -2,22 +2,18 @@ import WebGLConstants from "../Core/WebGLConstants.js";
/**
* Enumerates all possible filters used when minifying WebGL textures.
- *
* @enum {number}
- *
* @see TextureMagnificationFilter
*/
const TextureMinificationFilter = {
/**
* Samples the texture by returning the closest pixel.
- *
* @type {number}
* @constant
*/
NEAREST: WebGLConstants.NEAREST,
/**
* Samples the texture through bi-linear interpolation of the four nearest pixels. This produces smoother results than NEAREST
filtering.
- *
* @type {number}
* @constant
*/
@@ -27,7 +23,6 @@ const TextureMinificationFilter = {
*
* Requires that the texture has a mipmap. The mip level is chosen by the view angle and screen-space size of the texture.
*
- *
* @type {number}
* @constant
*/
@@ -37,7 +32,6 @@ const TextureMinificationFilter = {
*
* Requires that the texture has a mipmap. The mip level is chosen by the view angle and screen-space size of the texture.
*
- *
* @type {number}
* @constant
*/
@@ -50,7 +44,6 @@ const TextureMinificationFilter = {
*
* Requires that the texture has a mipmap. The mip level is chosen by the view angle and screen-space size of the texture.
*
- *
* @type {number}
* @constant
*/
@@ -71,9 +64,7 @@ const TextureMinificationFilter = {
/**
* Validates the given textureMinificationFilter
with respect to the possible enum values.
- *
* @private
- *
* @param textureMinificationFilter
* @returns {boolean} true
if textureMinificationFilter
is valid.
*/
diff --git a/packages/engine/Source/Renderer/UniformState.js b/packages/engine/Source/Renderer/UniformState.js
index cc5030e6f5d6..85dc0d265588 100644
--- a/packages/engine/Source/Renderer/UniformState.js
+++ b/packages/engine/Source/Renderer/UniformState.js
@@ -19,7 +19,7 @@ import SunLight from "../Scene/SunLight.js";
/**
* @private
- * @constructor
+ * @class
*/
function UniformState() {
/**
@@ -455,7 +455,6 @@ Object.defineProperties(UniformState.prototype, {
/**
* Model-view relative to eye matrix.
- *
* @memberof UniformState.prototype
* @type {Matrix4}
*/
@@ -536,7 +535,6 @@ Object.defineProperties(UniformState.prototype, {
/**
* Model-view-projection relative to eye matrix.
- *
* @memberof UniformState.prototype
* @type {Matrix4}
*/
@@ -652,7 +650,6 @@ Object.defineProperties(UniformState.prototype, {
/**
* The far plane's distance from the near plane, plus 1.0.
- *
* @memberof UniformState.prototype
* @type {number}
*/
@@ -664,7 +661,6 @@ Object.defineProperties(UniformState.prototype, {
/**
* The log2 of {@link UniformState#farDepthFromNearPlusOne}.
- *
* @memberof UniformState.prototype
* @type {number}
*/
@@ -676,7 +672,6 @@ Object.defineProperties(UniformState.prototype, {
/**
* 1.0 divided by {@link UniformState#log2FarDepthFromNearPlusOne}.
- *
* @memberof UniformState.prototype
* @type {number}
*/
@@ -1008,7 +1003,6 @@ Object.defineProperties(UniformState.prototype, {
},
/**
* Which light source to use for dynamically lighting the atmosphere
- *
* @memberof UniformState.prototype
* @type {DynamicAtmosphereLightingType}
*/
@@ -1131,7 +1125,6 @@ Object.defineProperties(UniformState.prototype, {
* The distance from the camera at which to disable the depth test of billboards, labels and points
* to, for example, prevent clipping against terrain. When set to zero, the depth test should always
* be applied. When less than zero, the depth test should never be applied.
- *
* @memberof UniformState.prototype
* @type {number}
*/
@@ -1143,7 +1136,6 @@ Object.defineProperties(UniformState.prototype, {
/**
* The highlight color of unclassified 3D Tiles.
- *
* @memberof UniformState.prototype
* @type {Color}
*/
@@ -1155,7 +1147,6 @@ Object.defineProperties(UniformState.prototype, {
/**
* Whether or not the current projection is orthographic in 3D.
- *
* @memberOf UniformState.prototype
* @type {boolean}
*/
@@ -1167,7 +1158,6 @@ Object.defineProperties(UniformState.prototype, {
/**
* The current ellipsoid.
- *
* @memberOf UniformState.prototype
* @type {Ellipsoid}
*/
@@ -1355,7 +1345,6 @@ function setSunAndMoonDirections(uniformState, frameState) {
* Synchronizes the frustum's state with the camera state. This is called
* by the {@link Scene} when rendering to ensure that automatic GLSL uniforms
* are set to the right value.
- *
* @param {object} camera The camera to synchronize with.
*/
UniformState.prototype.updateCamera = function (camera) {
@@ -1376,7 +1365,6 @@ UniformState.prototype.updateCamera = function (camera) {
* Synchronizes the frustum's state with the uniform state. This is called
* by the {@link Scene} when rendering to ensure that automatic GLSL uniforms
* are set to the right value.
- *
* @param {object} frustum The frustum to synchronize with.
*/
UniformState.prototype.updateFrustum = function (frustum) {
@@ -1416,7 +1404,6 @@ const defaultLight = new SunLight();
* Synchronizes frame state with the uniform state. This is called
* by the {@link Scene} when rendering to ensure that automatic GLSL uniforms
* are set to the right value.
- *
* @param {FrameState} frameState The frameState to synchronize with.
*/
UniformState.prototype.update = function (frameState) {
diff --git a/packages/engine/Source/Renderer/VertexArray.js b/packages/engine/Source/Renderer/VertexArray.js
index ed35bd1b76c2..bbf95af8792c 100644
--- a/packages/engine/Source/Renderer/VertexArray.js
+++ b/packages/engine/Source/Renderer/VertexArray.js
@@ -177,21 +177,16 @@ function bind(gl, attributes, indexBuffer) {
/**
* Creates a vertex array, which defines the attributes making up a vertex, and contains an optional index buffer
* to select vertices for rendering. Attributes are defined using object literals as shown in Example 1 below.
- *
* @param {object} options Object with the following properties:
* @param {Context} options.context The context in which the VertexArray gets created.
- * @param {Object[]} options.attributes An array of attributes.
+ * @param {object[]} options.attributes An array of attributes.
* @param {IndexBuffer} [options.indexBuffer] An optional index buffer.
- *
* @returns {VertexArray} The vertex array, ready for use with drawing.
- *
- * @exception {DeveloperError} Attribute must have a vertexBuffer
.
- * @exception {DeveloperError} Attribute must have a componentsPerAttribute
.
- * @exception {DeveloperError} Attribute must have a valid componentDatatype
or not specify it.
- * @exception {DeveloperError} Attribute must have a strideInBytes
less than or equal to 255 or not specify it.
- * @exception {DeveloperError} Index n is used by more than one attribute.
- *
- *
+ * @throws {DeveloperError} Attribute must have a vertexBuffer
.
+ * @throws {DeveloperError} Attribute must have a componentsPerAttribute
.
+ * @throws {DeveloperError} Attribute must have a valid componentDatatype
or not specify it.
+ * @throws {DeveloperError} Attribute must have a strideInBytes
less than or equal to 255 or not specify it.
+ * @throws {DeveloperError} Index n is used by more than one attribute.
* @example
* // Example 1. Create a vertex array with vertices made up of three floating point
* // values, e.g., a position, from a single vertex buffer. No index buffer is used.
@@ -523,21 +518,17 @@ function interleaveAttributes(attributes) {
*
* options
can have four properties:
*
- * geometry
: The source geometry containing data used to create the vertex array.
- * attributeLocations
: An object that maps geometry attribute names to vertex shader attribute locations.
- * bufferUsage
: The expected usage pattern of the vertex array's buffers. On some WebGL implementations, this can significantly affect performance. See {@link BufferUsage}. Default: BufferUsage.DYNAMIC_DRAW
.
- * interleave
: Determines if all attributes are interleaved in a single vertex buffer or if each attribute is stored in a separate vertex buffer. Default: false
.
+ * geometry
: The source geometry containing data used to create the vertex array.
+ * attributeLocations
: An object that maps geometry attribute names to vertex shader attribute locations.
+ * bufferUsage
: The expected usage pattern of the vertex array's buffers. On some WebGL implementations, this can significantly affect performance. See {@link BufferUsage}. Default: BufferUsage.DYNAMIC_DRAW
.
+ * interleave
: Determines if all attributes are interleaved in a single vertex buffer or if each attribute is stored in a separate vertex buffer. Default: false
.
*
*
* If options
is not specified or the geometry
contains no data, the returned vertex array is empty.
- *
* @param {object} options An object defining the geometry, attribute indices, buffer usage, and vertex layout used to create the vertex array.
- *
- * @exception {RuntimeError} Each attribute list must have the same number of vertices.
- * @exception {DeveloperError} The geometry must have zero or one index lists.
- * @exception {DeveloperError} Index n is used by more than one attribute.
- *
- *
+ * @throws {RuntimeError} Each attribute list must have the same number of vertices.
+ * @throws {DeveloperError} The geometry must have zero or one index lists.
+ * @throws {DeveloperError} Index n is used by more than one attribute.
* @example
* // Example 1. Creates a vertex array for rendering a box. The default dynamic draw
* // usage is used for the created vertex and index buffer. The attributes are not
@@ -548,7 +539,6 @@ function interleaveAttributes(attributes) {
* geometry : geometry,
* attributeLocations : GeometryPipeline.createAttributeLocations(geometry),
* });
- *
* @example
* // Example 2. Creates a vertex array with interleaved attributes in a
* // single vertex buffer. The vertex and index buffer have static draw usage.
@@ -559,12 +549,10 @@ function interleaveAttributes(attributes) {
* bufferUsage : BufferUsage.STATIC_DRAW,
* interleave : true
* });
- *
* @example
* // Example 3. When the caller destroys the vertex array, it also destroys the
* // attached vertex buffer(s) and index buffer.
* va = va.destroy();
- *
* @see Buffer#createVertexBuffer
* @see Buffer#createIndexBuffer
* @see GeometryPipeline.createAttributeLocations
@@ -723,6 +711,7 @@ Object.defineProperties(VertexArray.prototype, {
/**
* index is the location in the array of attributes, not the index property of an attribute.
+ * @param index
*/
VertexArray.prototype.getAttribute = function (index) {
//>>includeStart('debug', pragmas.debug);
diff --git a/packages/engine/Source/Renderer/VertexArrayFacade.js b/packages/engine/Source/Renderer/VertexArrayFacade.js
index 752269a0262c..7cbfd05c8e45 100644
--- a/packages/engine/Source/Renderer/VertexArrayFacade.js
+++ b/packages/engine/Source/Renderer/VertexArrayFacade.js
@@ -10,6 +10,10 @@ import BufferUsage from "./BufferUsage.js";
import VertexArray from "./VertexArray.js";
/**
+ * @param context
+ * @param attributes
+ * @param sizeInVertices
+ * @param instanced
* @private
*/
function VertexArrayFacade(context, attributes, sizeInVertices, instanced) {
@@ -220,6 +224,7 @@ VertexArrayFacade._createArrayViews = function (attributes, vertexSizeInBytes) {
/**
* Invalidates writers. Can't render again until commit is called.
+ * @param sizeInVertices
*/
VertexArrayFacade.prototype.resize = function (sizeInVertices) {
this._size = sizeInVertices;
diff --git a/packages/engine/Source/Renderer/createUniform.js b/packages/engine/Source/Renderer/createUniform.js
index ccf68c1981f1..e9e29221c0a8 100644
--- a/packages/engine/Source/Renderer/createUniform.js
+++ b/packages/engine/Source/Renderer/createUniform.js
@@ -10,8 +10,12 @@ import Matrix4 from "../Core/Matrix4.js";
import RuntimeError from "../Core/RuntimeError.js";
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param location
* @private
- * @constructor
+ * @class
*/
function createUniform(gl, activeUniform, uniformName, location) {
switch (activeUniform.type) {
@@ -52,8 +56,12 @@ function createUniform(gl, activeUniform, uniformName, location) {
}
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param location
* @private
- * @constructor
+ * @class
*/
function UniformFloat(gl, activeUniform, uniformName, location) {
/**
@@ -79,8 +87,12 @@ UniformFloat.prototype.set = function () {
///////////////////////////////////////////////////////////////////////////
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param location
* @private
- * @constructor
+ * @class
*/
function UniformFloatVec2(gl, activeUniform, uniformName, location) {
/**
@@ -107,8 +119,12 @@ UniformFloatVec2.prototype.set = function () {
///////////////////////////////////////////////////////////////////////////
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param location
* @private
- * @constructor
+ * @class
*/
function UniformFloatVec3(gl, activeUniform, uniformName, location) {
/**
@@ -147,8 +163,12 @@ UniformFloatVec3.prototype.set = function () {
///////////////////////////////////////////////////////////////////////////
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param location
* @private
- * @constructor
+ * @class
*/
function UniformFloatVec4(gl, activeUniform, uniformName, location) {
/**
@@ -187,8 +207,12 @@ UniformFloatVec4.prototype.set = function () {
///////////////////////////////////////////////////////////////////////////
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param location
* @private
- * @constructor
+ * @class
*/
function UniformSampler(gl, activeUniform, uniformName, location) {
/**
@@ -222,8 +246,12 @@ UniformSampler.prototype._setSampler = function (textureUnitIndex) {
///////////////////////////////////////////////////////////////////////////
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param location
* @private
- * @constructor
+ * @class
*/
function UniformInt(gl, activeUniform, uniformName, location) {
/**
@@ -248,8 +276,12 @@ UniformInt.prototype.set = function () {
///////////////////////////////////////////////////////////////////////////
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param location
* @private
- * @constructor
+ * @class
*/
function UniformIntVec2(gl, activeUniform, uniformName, location) {
/**
@@ -275,8 +307,12 @@ UniformIntVec2.prototype.set = function () {
///////////////////////////////////////////////////////////////////////////
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param location
* @private
- * @constructor
+ * @class
*/
function UniformIntVec3(gl, activeUniform, uniformName, location) {
/**
@@ -302,8 +338,12 @@ UniformIntVec3.prototype.set = function () {
///////////////////////////////////////////////////////////////////////////
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param location
* @private
- * @constructor
+ * @class
*/
function UniformIntVec4(gl, activeUniform, uniformName, location) {
/**
@@ -331,8 +371,12 @@ UniformIntVec4.prototype.set = function () {
const scratchUniformArray = new Float32Array(4);
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param location
* @private
- * @constructor
+ * @class
*/
function UniformMat2(gl, activeUniform, uniformName, location) {
/**
@@ -361,8 +405,12 @@ UniformMat2.prototype.set = function () {
const scratchMat3Array = new Float32Array(9);
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param location
* @private
- * @constructor
+ * @class
*/
function UniformMat3(gl, activeUniform, uniformName, location) {
/**
@@ -391,8 +439,12 @@ UniformMat3.prototype.set = function () {
const scratchMat4Array = new Float32Array(16);
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param location
* @private
- * @constructor
+ * @class
*/
function UniformMat4(gl, activeUniform, uniformName, location) {
/**
diff --git a/packages/engine/Source/Renderer/createUniformArray.js b/packages/engine/Source/Renderer/createUniformArray.js
index 0c9268a1d7b5..dc96961938a0 100644
--- a/packages/engine/Source/Renderer/createUniformArray.js
+++ b/packages/engine/Source/Renderer/createUniformArray.js
@@ -10,8 +10,12 @@ import Matrix4 from "../Core/Matrix4.js";
import RuntimeError from "../Core/RuntimeError.js";
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param locations
* @private
- * @constructor
+ * @class
*/
function createUniformArray(gl, activeUniform, uniformName, locations) {
switch (activeUniform.type) {
@@ -67,8 +71,12 @@ function createUniformArray(gl, activeUniform, uniformName, locations) {
}
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param locations
* @private
- * @constructor
+ * @class
*/
function UniformArrayFloat(gl, activeUniform, uniformName, locations) {
const length = locations.length;
@@ -109,8 +117,12 @@ UniformArrayFloat.prototype.set = function () {
///////////////////////////////////////////////////////////////////////////
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param locations
* @private
- * @constructor
+ * @class
*/
function UniformArrayFloatVec2(gl, activeUniform, uniformName, locations) {
const length = locations.length;
@@ -153,8 +165,12 @@ UniformArrayFloatVec2.prototype.set = function () {
///////////////////////////////////////////////////////////////////////////
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param locations
* @private
- * @constructor
+ * @class
*/
function UniformArrayFloatVec3(gl, activeUniform, uniformName, locations) {
const length = locations.length;
@@ -215,8 +231,12 @@ UniformArrayFloatVec3.prototype.set = function () {
///////////////////////////////////////////////////////////////////////////
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param locations
* @private
- * @constructor
+ * @class
*/
function UniformArrayFloatVec4(gl, activeUniform, uniformName, locations) {
const length = locations.length;
@@ -282,8 +302,12 @@ UniformArrayFloatVec4.prototype.set = function () {
///////////////////////////////////////////////////////////////////////////
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param locations
* @private
- * @constructor
+ * @class
*/
function UniformArraySampler(gl, activeUniform, uniformName, locations) {
const length = locations.length;
@@ -332,8 +356,12 @@ UniformArraySampler.prototype._setSampler = function (textureUnitIndex) {
///////////////////////////////////////////////////////////////////////////
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param locations
* @private
- * @constructor
+ * @class
*/
function UniformArrayInt(gl, activeUniform, uniformName, locations) {
const length = locations.length;
@@ -374,8 +402,12 @@ UniformArrayInt.prototype.set = function () {
///////////////////////////////////////////////////////////////////////////
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param locations
* @private
- * @constructor
+ * @class
*/
function UniformArrayIntVec2(gl, activeUniform, uniformName, locations) {
const length = locations.length;
@@ -418,8 +450,12 @@ UniformArrayIntVec2.prototype.set = function () {
///////////////////////////////////////////////////////////////////////////
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param locations
* @private
- * @constructor
+ * @class
*/
function UniformArrayIntVec3(gl, activeUniform, uniformName, locations) {
const length = locations.length;
@@ -462,8 +498,12 @@ UniformArrayIntVec3.prototype.set = function () {
///////////////////////////////////////////////////////////////////////////
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param locations
* @private
- * @constructor
+ * @class
*/
function UniformArrayIntVec4(gl, activeUniform, uniformName, locations) {
const length = locations.length;
@@ -506,8 +546,12 @@ UniformArrayIntVec4.prototype.set = function () {
///////////////////////////////////////////////////////////////////////////
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param locations
* @private
- * @constructor
+ * @class
*/
function UniformArrayMat2(gl, activeUniform, uniformName, locations) {
const length = locations.length;
@@ -550,8 +594,12 @@ UniformArrayMat2.prototype.set = function () {
///////////////////////////////////////////////////////////////////////////
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param locations
* @private
- * @constructor
+ * @class
*/
function UniformArrayMat3(gl, activeUniform, uniformName, locations) {
const length = locations.length;
@@ -594,8 +642,12 @@ UniformArrayMat3.prototype.set = function () {
///////////////////////////////////////////////////////////////////////////
/**
+ * @param gl
+ * @param activeUniform
+ * @param uniformName
+ * @param locations
* @private
- * @constructor
+ * @class
*/
function UniformArrayMat4(gl, activeUniform, uniformName, locations) {
const length = locations.length;
diff --git a/packages/engine/Source/Renderer/demodernizeShader.js b/packages/engine/Source/Renderer/demodernizeShader.js
index 791c629ed015..e1f14f13976a 100644
--- a/packages/engine/Source/Renderer/demodernizeShader.js
+++ b/packages/engine/Source/Renderer/demodernizeShader.js
@@ -4,13 +4,10 @@
*
* This function does not aim to provide a comprehensive transpilation from GLSL 3.00 to GLSL 1.00; only the functionality
* used within the CesiumJS shaders is supported.
- *
* @private
- *
* @param {string} input The GLSL 3.00 shader.
* @param {boolean} isFragmentShader True if the shader is a fragment shader.
- *
- * @return {string}
+ * @returns {string}
*/
function demodernizeShader(input, isFragmentShader) {
let output = input;
diff --git a/packages/engine/Source/Renderer/freezeRenderState.js b/packages/engine/Source/Renderer/freezeRenderState.js
index 253be6539ffe..5e263fb48d6c 100644
--- a/packages/engine/Source/Renderer/freezeRenderState.js
+++ b/packages/engine/Source/Renderer/freezeRenderState.js
@@ -1,12 +1,9 @@
/**
* Returns frozen renderState as well as all of the object literal properties. This function is deep object freeze
* function ignoring properties named "_applyFunctions".
- *
* @private
- *
* @param {object} renderState
* @returns {object} Returns frozen renderState.
- *
*/
function freezeRenderState(renderState) {
if (typeof renderState !== "object" || renderState === null) {
diff --git a/packages/engine/Source/Renderer/loadCubeMap.js b/packages/engine/Source/Renderer/loadCubeMap.js
index 992d4fc80972..d37bbd435aff 100644
--- a/packages/engine/Source/Renderer/loadCubeMap.js
+++ b/packages/engine/Source/Renderer/loadCubeMap.js
@@ -7,18 +7,13 @@ import CubeMap from "./CubeMap.js";
/**
* Asynchronously loads six images and creates a cube map. Returns a promise that
* will resolve to a {@link CubeMap} once loaded, or reject if any image fails to load.
- *
* @function loadCubeMap
- *
* @param {Context} context The context to use to create the cube map.
* @param {object} urls The source URL of each image. See the example below.
- * @param {boolean} [skipColorSpaceConversion=false] If true, any custom gamma or color profiles in the images will be ignored.
+ * @param {boolean} [skipColorSpaceConversion] If true, any custom gamma or color profiles in the images will be ignored.
* @returns {Promise} a promise that will resolve to the requested {@link CubeMap} when loaded.
- *
- * @exception {DeveloperError} context is required.
- * @exception {DeveloperError} urls is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.
- *
- *
+ * @throws {DeveloperError} context is required.
+ * @throws {DeveloperError} urls is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.
* @example
* Cesium.loadCubeMap(context, {
* positiveX : 'skybox_px.png',
@@ -32,10 +27,8 @@ import CubeMap from "./CubeMap.js";
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
- *
* @private
*/
function loadCubeMap(context, urls, skipColorSpaceConversion) {
diff --git a/packages/engine/Source/Scene/AlphaMode.js b/packages/engine/Source/Scene/AlphaMode.js
index 56f3bce645d8..92f6addd26e7 100644
--- a/packages/engine/Source/Scene/AlphaMode.js
+++ b/packages/engine/Source/Scene/AlphaMode.js
@@ -1,13 +1,11 @@
/**
* The alpha rendering mode of the material.
- *
* @enum {string}
* @private
*/
const AlphaMode = {
/**
* The alpha value is ignored and the rendered output is fully opaque.
- *
* @type {string}
* @constant
*/
@@ -15,7 +13,6 @@ const AlphaMode = {
/**
* The rendered output is either fully opaque or fully transparent depending on the alpha value and the specified alpha cutoff value.
- *
* @type {string}
* @constant
*/
@@ -23,7 +20,6 @@ const AlphaMode = {
/**
* The rendered output is composited onto the destination with alpha blending.
- *
* @type {string}
* @constant
*/
diff --git a/packages/engine/Source/Scene/Appearance.js b/packages/engine/Source/Scene/Appearance.js
index 597e89308fd9..05fb6b578a8c 100644
--- a/packages/engine/Source/Scene/Appearance.js
+++ b/packages/engine/Source/Scene/Appearance.js
@@ -9,25 +9,21 @@ import CullFace from "./CullFace.js";
* An appearance defines the full GLSL vertex and fragment shaders and the
* render state used to draw a {@link Primitive}. All appearances implement
* this base Appearance
interface.
- *
* @alias Appearance
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {boolean} [options.translucent=true] When true
, the geometry is expected to appear translucent so {@link Appearance#renderState} has alpha blending enabled.
- * @param {boolean} [options.closed=false] When true
, the geometry is expected to be closed so {@link Appearance#renderState} has backface culling enabled.
- * @param {Material} [options.material=Material.ColorType] The material used to determine the fragment color.
+ * @param {boolean} [options.translucent] When true
, the geometry is expected to appear translucent so {@link Appearance#renderState} has alpha blending enabled.
+ * @param {boolean} [options.closed] When true
, the geometry is expected to be closed so {@link Appearance#renderState} has backface culling enabled.
+ * @param {Material} [options.material] The material used to determine the fragment color.
* @param {string} [options.vertexShaderSource] Optional GLSL vertex shader source to override the default vertex shader.
* @param {string} [options.fragmentShaderSource] Optional GLSL fragment shader source to override the default fragment shader.
* @param {object} [options.renderState] Optional render state to override the default render state.
- *
* @see MaterialAppearance
* @see EllipsoidSurfaceAppearance
* @see PerInstanceColorAppearance
* @see DebugAppearance
* @see PolylineColorAppearance
* @see PolylineMaterialAppearance
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Geometry%20and%20Appearances.html|Geometry and Appearances Demo}
*/
function Appearance(options) {
@@ -36,18 +32,14 @@ function Appearance(options) {
/**
* The material used to determine the fragment color. Unlike other {@link Appearance}
* properties, this is not read-only, so an appearance's material can change on the fly.
- *
* @type Material
- *
* @see {@link https://github.com/CesiumGS/cesium/wiki/Fabric|Fabric}
*/
this.material = options.material;
/**
* When true
, the geometry is expected to appear translucent.
- *
* @type {boolean}
- *
* @default true
*/
this.translucent = defaultValue(options.translucent, true);
@@ -61,9 +53,7 @@ function Appearance(options) {
Object.defineProperties(Appearance.prototype, {
/**
* The GLSL source code for the vertex shader.
- *
* @memberof Appearance.prototype
- *
* @type {string}
* @readonly
*/
@@ -77,9 +67,7 @@ Object.defineProperties(Appearance.prototype, {
* The GLSL source code for the fragment shader. The full fragment shader
* source is built procedurally taking into account the {@link Appearance#material}.
* Use {@link Appearance#getFragmentShaderSource} to get the full source.
- *
* @memberof Appearance.prototype
- *
* @type {string}
* @readonly
*/
@@ -91,9 +79,7 @@ Object.defineProperties(Appearance.prototype, {
/**
* The WebGL fixed-function state to use when rendering the geometry.
- *
* @memberof Appearance.prototype
- *
* @type {object}
* @readonly
*/
@@ -105,12 +91,9 @@ Object.defineProperties(Appearance.prototype, {
/**
* When true
, the geometry is expected to be closed.
- *
* @memberof Appearance.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
closed: {
@@ -123,7 +106,6 @@ Object.defineProperties(Appearance.prototype, {
/**
* Procedurally creates the full GLSL fragment shader source for this appearance
* taking into account {@link Appearance#fragmentShaderSource} and {@link Appearance#material}.
- *
* @returns {string} The full GLSL fragment shader source.
*/
Appearance.prototype.getFragmentShaderSource = function () {
@@ -144,7 +126,6 @@ Appearance.prototype.getFragmentShaderSource = function () {
/**
* Determines if the geometry is translucent based on {@link Appearance#translucent} and {@link Material#isTranslucent}.
- *
* @returns {boolean} true
if the appearance is translucent.
*/
Appearance.prototype.isTranslucent = function () {
@@ -158,7 +139,6 @@ Appearance.prototype.isTranslucent = function () {
* Creates a render state. This is not the final render state instance; instead,
* it can contain a subset of render state properties identical to the render state
* created in the context.
- *
* @returns {object} The render state.
*/
Appearance.prototype.getRenderState = function () {
@@ -174,6 +154,9 @@ Appearance.prototype.getRenderState = function () {
};
/**
+ * @param translucent
+ * @param closed
+ * @param existing
* @private
*/
Appearance.getDefaultRenderState = function (translucent, closed, existing) {
diff --git a/packages/engine/Source/Scene/ArcGisBaseMapType.js b/packages/engine/Source/Scene/ArcGisBaseMapType.js
index cced8ec1d7bf..68137eb0f037 100644
--- a/packages/engine/Source/Scene/ArcGisBaseMapType.js
+++ b/packages/engine/Source/Scene/ArcGisBaseMapType.js
@@ -1,6 +1,5 @@
/**
* ArcGisBaseMapType enumerates the ArcGIS image tile layers that are supported by default.
- *
* @enum {number}
* @see ArcGisMapServerImageryProvider
*/
diff --git a/packages/engine/Source/Scene/ArcGisMapServerImageryProvider.js b/packages/engine/Source/Scene/ArcGisMapServerImageryProvider.js
index 89dcfd06727e..455345f11775 100644
--- a/packages/engine/Source/Scene/ArcGisMapServerImageryProvider.js
+++ b/packages/engine/Source/Scene/ArcGisMapServerImageryProvider.js
@@ -25,7 +25,6 @@ import DeveloperError from "../Core/DeveloperError.js";
* @typedef {object} ArcGisMapServerImageryProvider.ConstructorOptions
*
* Initialization options for the ArcGisMapServerImageryProvider constructor
- *
* @property {TileDiscardPolicy} [tileDiscardPolicy] The policy that determines if a tile
* is invalid and should be discarded. If this value is not specified, a default
* {@link DiscardMissingTileImagePolicy} is used for tiled map servers, and a
@@ -57,16 +56,12 @@ import DeveloperError from "../Core/DeveloperError.js";
* @property {number} [tileHeight=256] The height of each tile in pixels. This parameter is ignored when accessing a tiled server.
* @property {number} [maximumLevel] The maximum tile level to request, or undefined if there is no maximum. This parameter is ignored when accessing
* a tiled server.
- *
- *
*/
/**
* Used to track creation details while fetching initial metadata
- *
- * @constructor
+ * @class
* @private
- *
* @param {ArcGisMapServerImageryProvider.ConstructorOptions} options An object describing initialization options
*/
function ImageryProviderBuilder(options) {
@@ -95,9 +90,7 @@ function ImageryProviderBuilder(options) {
/**
* Complete ArcGisMapServerImageryProvider creation based on builder values.
- *
* @private
- *
* @param {ArcGisMapServerImageryProvider} provider
*/
ImageryProviderBuilder.prototype.build = function (provider) {
@@ -260,25 +253,21 @@ async function requestMetadata(resource, imageryProviderBuilder) {
*
* Provides tiled imagery hosted by an ArcGIS MapServer. By default, the server's pre-cached tiles are
* used, if available.
- *
+ *
*
- *
+ *
* An {@link https://developers.arcgis.com/documentation/mapping-apis-and-services/security| ArcGIS Access Token } is required to authenticate requests to an ArcGIS Image Tile service.
* To access secure ArcGIS resources, it's required to create an ArcGIS developer
* account or an ArcGIS online account, then implement an authentication method to obtain an access token.
- *
* @alias ArcGisMapServerImageryProvider
- * @constructor
- *
+ * @class
* @param {ArcGisMapServerImageryProvider.ConstructorOptions} [options] Object describing initialization options
- *
* @see ArcGisMapServerImageryProvider.fromBasemapType
* @see ArcGisMapServerImageryProvider.fromUrl
- *
* @example
* // Set the default access token for accessing ArcGIS Image Tile service
* Cesium.ArcGisMapService.defaultAccessToken = "";
- *
+ *
* // Add a base layer from a default ArcGIS basemap
* const viewer = new Cesium.Viewer("cesiumContainer", {
* baseLayer: Cesium.ImageryLayer.fromProviderAsync(
@@ -287,17 +276,14 @@ async function requestMetadata(resource, imageryProviderBuilder) {
* )
* ),
* });
- *
* @example
* // Create an imagery provider from the url directly
* const esri = await Cesium.ArcGisMapServerImageryProvider.fromUrl(
* "https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer", {
* token: ""
* });
- *
* @see {@link https://developers.arcgis.com/rest/|ArcGIS Server REST API}
* @see {@link https://developers.arcgis.com/documentation/mapping-apis-and-services/security| ArcGIS Access Token }
-
*/
function ArcGisMapServerImageryProvider(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -353,7 +339,6 @@ function ArcGisMapServerImageryProvider(options) {
* @param {ArcGisBaseMapType} style The style of the ArcGIS base map imagery. Valid options are {@link ArcGisBaseMapType.SATELLITE}, {@link ArcGisBaseMapType.OCEANS}, and {@link ArcGisBaseMapType.HILLSHADE}.
* @param {ArcGisMapServerImageryProvider.ConstructorOptions} [options] Object describing initialization options.
* @returns {Promise} A promise that resolves to the created ArcGisMapServerImageryProvider.
- *
* @example
* // Set the default access token for accessing ArcGIS Image Tile service
* Cesium.ArcGisMapService.defaultAccessToken = "";
@@ -361,7 +346,6 @@ function ArcGisMapServerImageryProvider(options) {
* // Add a base layer from a default ArcGIS basemap
* const provider = await Cesium.ArcGisMapServerImageryProvider.fromBasemapType(
* Cesium.ArcGisBaseMapType.SATELLITE);
- *
* @example
* // Add a base layer from a default ArcGIS Basemap
* const viewer = new Cesium.Viewer("cesiumContainer", {
@@ -655,7 +639,6 @@ Object.defineProperties(ArcGisMapServerImageryProvider.prototype, {
* Gets a value indicating whether this imagery provider is using pre-cached tiles from the
* ArcGIS MapServer.
* @memberof ArcGisMapServerImageryProvider.prototype
- *
* @type {boolean}
* @readonly
* @default true
@@ -673,7 +656,6 @@ Object.defineProperties(ArcGisMapServerImageryProvider.prototype, {
* as if their alpha is 1.0 everywhere. When this property is false, memory usage
* and texture upload time are reduced.
* @memberof ArcGisMapServerImageryProvider.prototype
- *
* @type {boolean}
* @readonly
* @default true
@@ -687,7 +669,6 @@ Object.defineProperties(ArcGisMapServerImageryProvider.prototype, {
/**
* Gets the comma-separated list of layer IDs to show.
* @memberof ArcGisMapServerImageryProvider.prototype
- *
* @type {string}
*/
layers: {
@@ -700,18 +681,15 @@ Object.defineProperties(ArcGisMapServerImageryProvider.prototype, {
/**
* Creates an {@link ImageryProvider} which provides tiled imagery hosted by an ArcGIS MapServer. By default, the server's pre-cached tiles are
* used, if available.
- *
- * @param {Resource|String} url The URL of the ArcGIS MapServer service.
+ * @param {Resource | string} url The URL of the ArcGIS MapServer service.
* @param {ArcGisMapServerImageryProvider.ConstructorOptions} [options] Object describing initialization options.
* @returns {Promise} A promise that resolves to the created ArcGisMapServerImageryProvider.
- *
* @example
* const esri = await Cesium.ArcGisMapServerImageryProvider.fromUrl(
* "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"
* );
- *
- * @exception {RuntimeError} metadata spatial reference specifies an unknown WKID
- * @exception {RuntimeError} metadata fullExtent.spatialReference specifies an unknown WKID
+ * @throws {RuntimeError} metadata spatial reference specifies an unknown WKID
+ * @throws {RuntimeError} metadata fullExtent.spatialReference specifies an unknown WKID
*/
ArcGisMapServerImageryProvider.fromUrl = async function (url, options) {
//>>includeStart('debug', pragmas.debug);
@@ -743,7 +721,6 @@ ArcGisMapServerImageryProvider.fromUrl = async function (url, options) {
/**
* Gets the credits to be displayed when a given tile is displayed.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level;
@@ -759,7 +736,6 @@ ArcGisMapServerImageryProvider.prototype.getTileCredits = function (
/**
* Requests the image for a given tile.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
@@ -781,18 +757,17 @@ ArcGisMapServerImageryProvider.prototype.requestImage = function (
/**
/**
- * Asynchronously determines what features, if any, are located at a given longitude and latitude within
- * a tile.
- *
- * @param {number} x The tile X coordinate.
- * @param {number} y The tile Y coordinate.
- * @param {number} level The tile level.
- * @param {number} longitude The longitude at which to pick features.
- * @param {number} latitude The latitude at which to pick features.
- * @return {Promise|undefined} A promise for the picked features that will resolve when the asynchronous
- * picking completes. The resolved value is an array of {@link ImageryLayerFeatureInfo}
- * instances. The array may be empty if no features are found at the given location.
- */
+ Asynchronously determines what features, if any, are located at a given longitude and latitude within
+ a tile.
+ * @param {number} x The tile X coordinate.
+ * @param {number} y The tile Y coordinate.
+ * @param {number} level The tile level.
+ * @param {number} longitude The longitude at which to pick features.
+ * @param {number} latitude The latitude at which to pick features.
+ * @returns {Promise|undefined} A promise for the picked features that will resolve when the asynchronous
+ * picking completes. The resolved value is an array of {@link ImageryLayerFeatureInfo}
+ * instances. The array may be empty if no features are found at the given location.
+ */
ArcGisMapServerImageryProvider.prototype.pickFeatures = function (
x,
y,
diff --git a/packages/engine/Source/Scene/ArcGisMapService.js b/packages/engine/Source/Scene/ArcGisMapService.js
index b681ee35af7a..c76e049ab1da 100644
--- a/packages/engine/Source/Scene/ArcGisMapService.js
+++ b/packages/engine/Source/Scene/ArcGisMapService.js
@@ -12,7 +12,6 @@ const defaultAccessToken =
* A default token is provided for evaluation purposes only.
* To obtain an access token, go to {@link https://developers.arcgis.com} and create a free account.
* More info can be found in the {@link https://developers.arcgis.com/documentation/mapping-apis-and-services/security/ | ArcGIS developer guide}.
- *
* @see ArcGisMapServerImageryProvider
* @namespace ArcGisMapService
*/
@@ -20,14 +19,12 @@ const defaultAccessToken =
const ArcGisMapService = {};
/**
* Gets or sets the default ArcGIS access token.
- *
* @type {string}
*/
ArcGisMapService.defaultAccessToken = defaultAccessToken;
/**
* Gets or sets the URL of the ArcGIS World Imagery tile service.
- *
* @type {string|Resource}
* @default https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer
*/
@@ -38,7 +35,6 @@ ArcGisMapService.defaultWorldImageryServer = new Resource({
/**
* Gets or sets the URL of the ArcGIS World Hillshade tile service.
- *
* @type {string|Resource}
* @default https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer
*/
@@ -49,7 +45,6 @@ ArcGisMapService.defaultWorldHillshadeServer = new Resource({
/**
* Gets or sets the URL of the ArcGIS World Oceans tile service.
- *
* @type {string|Resource}
* @default https://ibasemaps-api.arcgis.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer
*/
@@ -61,7 +56,7 @@ ArcGisMapService.defaultWorldOceanServer = new Resource({
/**
*
* @param {string} providedKey
- * @return {string|undefined}
+ * @returns {string|undefined}
*/
ArcGisMapService.getDefaultTokenCredit = function (providedKey) {
if (providedKey !== defaultAccessToken) {
diff --git a/packages/engine/Source/Scene/Atmosphere.js b/packages/engine/Source/Scene/Atmosphere.js
index 296ad0f19d25..f7372c34e0a7 100644
--- a/packages/engine/Source/Scene/Atmosphere.js
+++ b/packages/engine/Source/Scene/Atmosphere.js
@@ -10,27 +10,22 @@ import DynamicAtmosphereLightingType from "./DynamicAtmosphereLightingType.js";
*
* While the atmosphere settings affect the color of fog, see {@link Fog} to control how fog is rendered.
*
- *
* @alias Atmosphere
- * @constructor
- *
+ * @class
* @example
* // Turn on dynamic atmosphere lighting using the sun direction
* scene.atmosphere.dynamicLighting = Cesium.DynamicAtmosphereLightingType.SUNLIGHT;
- *
* @example
* // Turn on dynamic lighting using whatever light source is in the scene
* scene.light = new Cesium.DirectionalLight({
* direction: new Cesium.Cartesian3(1, 0, 0)
* });
* scene.atmosphere.dynamicLighting = Cesium.DynamicAtmosphereLightingType.SCENE_LIGHT;
- *
* @example
* // Adjust the color of the atmosphere effects.
* scene.atmosphere.hueShift = 0.4; // Cycle 40% around the color wheel
* scene.atmosphere.brightnessShift = 0.25; // Increase the brightness
* scene.atmosphere.saturationShift = -0.1; // Desaturate the colors
- *
* @see SkyAtmosphere
* @see Globe
* @see Fog
@@ -38,7 +33,6 @@ import DynamicAtmosphereLightingType from "./DynamicAtmosphereLightingType.js";
function Atmosphere() {
/**
* The intensity of the light that is used for computing the ground atmosphere color.
- *
* @type {number}
* @default 10.0
*/
@@ -46,7 +40,6 @@ function Atmosphere() {
/**
* The Rayleigh scattering coefficient used in the atmospheric scattering equations for the ground atmosphere.
- *
* @type {Cartesian3}
* @default Cartesian3(5.5e-6, 13.0e-6, 28.4e-6)
*/
@@ -54,7 +47,6 @@ function Atmosphere() {
/**
* The Mie scattering coefficient used in the atmospheric scattering equations for the ground atmosphere.
- *
* @type {Cartesian3}
* @default Cartesian3(21e-6, 21e-6, 21e-6)
*/
@@ -62,7 +54,6 @@ function Atmosphere() {
/**
* The Rayleigh scale height used in the atmospheric scattering equations for the ground atmosphere, in meters.
- *
* @type {number}
* @default 10000.0
*/
@@ -70,7 +61,6 @@ function Atmosphere() {
/**
* The Mie scale height used in the atmospheric scattering equations for the ground atmosphere, in meters.
- *
* @type {number}
* @default 3200.0
*/
@@ -81,7 +71,6 @@ function Atmosphere() {
*
* Valid values are between -1.0 and 1.0.
*
- *
* @type {number}
* @default 0.9
*/
@@ -90,7 +79,6 @@ function Atmosphere() {
/**
* The hue shift to apply to the atmosphere. Defaults to 0.0 (no shift).
* A hue shift of 1.0 indicates a complete rotation of the hues available.
- *
* @type {number}
* @default 0.0
*/
@@ -99,7 +87,6 @@ function Atmosphere() {
/**
* The saturation shift to apply to the atmosphere. Defaults to 0.0 (no shift).
* A saturation shift of -1.0 is monochrome.
- *
* @type {number}
* @default 0.0
*/
@@ -108,7 +95,6 @@ function Atmosphere() {
/**
* The brightness shift to apply to the atmosphere. Defaults to 0.0 (no shift).
* A brightness shift of -1.0 is complete darkness, which will let space show through.
- *
* @type {number}
* @default 0.0
*/
@@ -117,7 +103,6 @@ function Atmosphere() {
/**
* When not DynamicAtmosphereLightingType.NONE, the selected light source will
* be used for dynamically lighting all atmosphere-related rendering effects.
- *
* @type {DynamicAtmosphereLightingType}
* @default DynamicAtmosphereLightingType.NONE
*/
diff --git a/packages/engine/Source/Scene/AttributeType.js b/packages/engine/Source/Scene/AttributeType.js
index 5ba4d4f2e5c7..e973b72c55a8 100644
--- a/packages/engine/Source/Scene/AttributeType.js
+++ b/packages/engine/Source/Scene/AttributeType.js
@@ -9,15 +9,12 @@ import Matrix4 from "../Core/Matrix4.js";
/**
* An enum describing the attribute type for glTF and 3D Tiles.
- *
* @enum {string}
- *
* @private
*/
const AttributeType = {
/**
* The attribute is a single component.
- *
* @type {string}
* @constant
*/
@@ -25,7 +22,6 @@ const AttributeType = {
/**
* The attribute is a two-component vector.
- *
* @type {string}
* @constant
*/
@@ -33,7 +29,6 @@ const AttributeType = {
/**
* The attribute is a three-component vector.
- *
* @type {string}
* @constant
*/
@@ -41,7 +36,6 @@ const AttributeType = {
/**
* The attribute is a four-component vector.
- *
* @type {string}
* @constant
*/
@@ -49,7 +43,6 @@ const AttributeType = {
/**
* The attribute is a 2x2 matrix.
- *
* @type {string}
* @constant
*/
@@ -57,7 +50,6 @@ const AttributeType = {
/**
* The attribute is a 3x3 matrix.
- *
* @type {string}
* @constant
*/
@@ -65,7 +57,6 @@ const AttributeType = {
/**
* The attribute is a 4x4 matrix.
- *
* @type {string}
* @constant
*/
@@ -74,10 +65,8 @@ const AttributeType = {
/**
* Gets the scalar, vector, or matrix type for the attribute type.
- *
* @param {AttributeType} attributeType The attribute type.
* @returns {*} The math type.
- *
* @private
*/
AttributeType.getMathType = function (attributeType) {
@@ -105,10 +94,8 @@ AttributeType.getMathType = function (attributeType) {
/**
* Gets the number of components per attribute.
- *
* @param {AttributeType} attributeType The attribute type.
* @returns {number} The number of components.
- *
* @private
*/
AttributeType.getNumberOfComponents = function (attributeType) {
@@ -136,10 +123,8 @@ AttributeType.getNumberOfComponents = function (attributeType) {
/**
* Get the number of attribute locations needed to fit this attribute. Most
* types require one, but matrices require multiple attribute locations.
- *
* @param {AttributeType} attributeType The attribute type.
* @returns {number} The number of attribute locations needed in the shader
- *
* @private
*/
AttributeType.getAttributeLocationCount = function (attributeType) {
@@ -164,10 +149,8 @@ AttributeType.getAttributeLocationCount = function (attributeType) {
/**
* Gets the GLSL type for the attribute type.
- *
* @param {AttributeType} attributeType The attribute type.
* @returns {string} The GLSL type for the attribute type.
- *
* @private
*/
AttributeType.getGlslType = function (attributeType) {
diff --git a/packages/engine/Source/Scene/AutoExposure.js b/packages/engine/Source/Scene/AutoExposure.js
index 7d7e08f3d606..6954f805c8f2 100644
--- a/packages/engine/Source/Scene/AutoExposure.js
+++ b/packages/engine/Source/Scene/AutoExposure.js
@@ -10,8 +10,7 @@ import PixelDatatype from "../Renderer/PixelDatatype.js";
* A post process stage that will get the luminance value at each pixel and
* uses parallel reduction to compute the average luminance in a 1x1 texture.
* This texture can be used as input for tone mapping.
- *
- * @constructor
+ * @class
* @private
*/
function AutoExposure() {
@@ -38,7 +37,6 @@ function AutoExposure() {
/**
* Whether or not to execute this post-process stage when ready.
- *
* @type {boolean}
*/
this.enabled = true;
@@ -46,7 +44,6 @@ function AutoExposure() {
/**
* The minimum value used to clamp the luminance.
- *
* @type {number}
* @default 0.1
*/
@@ -54,7 +51,6 @@ function AutoExposure() {
/**
* The maximum value used to clamp the luminance.
- *
* @type {number}
* @default 10.0
*/
@@ -66,7 +62,6 @@ Object.defineProperties(AutoExposure.prototype, {
* Determines if this post-process stage is ready to be executed. A stage is only executed when both ready
* and {@link AutoExposure#enabled} are true
. A stage will not be ready while it is waiting on textures
* to load.
- *
* @memberof AutoExposure.prototype
* @type {boolean}
* @readonly
@@ -78,7 +73,6 @@ Object.defineProperties(AutoExposure.prototype, {
},
/**
* The unique name of this post-process stage for reference by other stages.
- *
* @memberof AutoExposure.prototype
* @type {string}
* @readonly
@@ -91,7 +85,6 @@ Object.defineProperties(AutoExposure.prototype, {
/**
* A reference to the texture written to when executing this post process stage.
- *
* @memberof AutoExposure.prototype
* @type {Texture}
* @readonly
@@ -357,9 +350,7 @@ AutoExposure.prototype.execute = function (context, colorTexture) {
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see AutoExposure#destroy
*/
AutoExposure.prototype.isDestroyed = function () {
@@ -374,9 +365,7 @@ AutoExposure.prototype.isDestroyed = function () {
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
*
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @see AutoExposure#isDestroyed
*/
AutoExposure.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/Axis.js b/packages/engine/Source/Scene/Axis.js
index 3f5c6ab5f8d0..5fc696214aac 100644
--- a/packages/engine/Source/Scene/Axis.js
+++ b/packages/engine/Source/Scene/Axis.js
@@ -4,13 +4,11 @@ import Matrix4 from "../Core/Matrix4.js";
/**
* An enum describing the x, y, and z axes and helper conversion functions.
- *
* @enum {number}
*/
const Axis = {
/**
* Denotes the x-axis.
- *
* @type {number}
* @constant
*/
@@ -18,7 +16,6 @@ const Axis = {
/**
* Denotes the y-axis.
- *
* @type {number}
* @constant
*/
@@ -26,7 +23,6 @@ const Axis = {
/**
* Denotes the z-axis.
- *
* @type {number}
* @constant
*/
@@ -35,7 +31,6 @@ const Axis = {
/**
* Matrix used to convert from y-up to z-up
- *
* @type {Matrix4}
* @constant
*/
@@ -46,7 +41,6 @@ Axis.Y_UP_TO_Z_UP = Matrix4.fromRotationTranslation(
/**
* Matrix used to convert from z-up to y-up
- *
* @type {Matrix4}
* @constant
*/
@@ -57,7 +51,6 @@ Axis.Z_UP_TO_Y_UP = Matrix4.fromRotationTranslation(
/**
* Matrix used to convert from x-up to z-up
- *
* @type {Matrix4}
* @constant
*/
@@ -68,7 +61,6 @@ Axis.X_UP_TO_Z_UP = Matrix4.fromRotationTranslation(
/**
* Matrix used to convert from z-up to x-up
- *
* @type {Matrix4}
* @constant
*/
@@ -79,7 +71,6 @@ Axis.Z_UP_TO_X_UP = Matrix4.fromRotationTranslation(
/**
* Matrix used to convert from x-up to y-up
- *
* @type {Matrix4}
* @constant
*/
@@ -90,7 +81,6 @@ Axis.X_UP_TO_Y_UP = Matrix4.fromRotationTranslation(
/**
* Matrix used to convert from y-up to x-up
- *
* @type {Matrix4}
* @constant
*/
@@ -101,7 +91,6 @@ Axis.Y_UP_TO_X_UP = Matrix4.fromRotationTranslation(
/**
* Gets the axis by name
- *
* @param {string} name The name of the axis.
* @returns {number} The axis enum.
*/
diff --git a/packages/engine/Source/Scene/B3dmParser.js b/packages/engine/Source/Scene/B3dmParser.js
index 6d06e6161538..cf95d3bac1e0 100644
--- a/packages/engine/Source/Scene/B3dmParser.js
+++ b/packages/engine/Source/Scene/B3dmParser.js
@@ -6,7 +6,6 @@ import RuntimeError from "../Core/RuntimeError.js";
/**
* Handles parsing of a Batched 3D Model.
- *
* @namespace B3dmParser
* @private
*/
@@ -17,11 +16,9 @@ const sizeOfUint32 = Uint32Array.BYTES_PER_ELEMENT;
/**
* Parses the contents of a {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/Batched3DModel|Batched 3D Model}.
- *
* @private
- *
* @param {ArrayBuffer} arrayBuffer The array buffer containing the b3dm.
- * @param {number} [byteOffset=0] The byte offset of the beginning of the b3dm in the array buffer.
+ * @param {number} [byteOffset] The byte offset of the beginning of the b3dm in the array buffer.
* @returns {object} Returns an object with the batch length, feature table (binary and json), batch table (binary and json) and glTF parts of the b3dm.
*/
B3dmParser.parse = function (arrayBuffer, byteOffset) {
diff --git a/packages/engine/Source/Scene/BatchTable.js b/packages/engine/Source/Scene/BatchTable.js
index a24e541c86e8..2581012997d0 100644
--- a/packages/engine/Source/Scene/BatchTable.js
+++ b/packages/engine/Source/Scene/BatchTable.js
@@ -14,16 +14,13 @@ import Texture from "../Renderer/Texture.js";
/**
* Creates a texture to look up per instance attributes for batched primitives. For example, store each primitive's pick color in the texture.
- *
* @alias BatchTable
- * @constructor
+ * @class
* @private
- *
* @param {Context} context The context in which the batch table is created.
- * @param {Object[]} attributes An array of objects describing a per instance attribute. Each object contains a datatype, components per attributes, whether it is normalized and a function name
+ * @param {object[]} attributes An array of objects describing a per instance attribute. Each object contains a datatype, components per attributes, whether it is normalized and a function name
* to retrieve the value in the vertex shader.
* @param {number} numberOfInstances The number of instances in a batch table.
- *
* @example
* // create the batch table
* const attributes = [{
@@ -131,7 +128,7 @@ Object.defineProperties(BatchTable.prototype, {
/**
* The attribute descriptions.
* @memberOf BatchTable.prototype
- * @type {Object[]}
+ * @type {object[]}
* @readonly
*/
attributes: {
@@ -246,14 +243,12 @@ const scratchGetAttributeCartesian4 = new Cartesian4();
/**
* Gets the value of an attribute in the table.
- *
* @param {number} instanceIndex The index of the instance.
* @param {number} attributeIndex The index of the attribute.
* @param {undefined|Cartesian2|Cartesian3|Cartesian4} [result] The object onto which to store the result. The type is dependent on the attribute's number of components.
* @returns {number|Cartesian2|Cartesian3|Cartesian4} The attribute value stored for the instance.
- *
- * @exception {DeveloperError} instanceIndex is out of range.
- * @exception {DeveloperError} attributeIndex is out of range.
+ * @throws {DeveloperError} instanceIndex is out of range.
+ * @throws {DeveloperError} attributeIndex is out of range.
*/
BatchTable.prototype.getBatchedAttribute = function (
instanceIndex,
@@ -314,13 +309,11 @@ const setAttributeScratchCartesian4 = new Cartesian4();
/**
* Sets the value of an attribute in the table.
- *
* @param {number} instanceIndex The index of the instance.
* @param {number} attributeIndex The index of the attribute.
* @param {number|Cartesian2|Cartesian3|Cartesian4} value The value to be stored in the table. The type of value will depend on the number of components of the attribute.
- *
- * @exception {DeveloperError} instanceIndex is out of range.
- * @exception {DeveloperError} attributeIndex is out of range.
+ * @throws {DeveloperError} instanceIndex is out of range.
+ * @throws {DeveloperError} attributeIndex is out of range.
*/
BatchTable.prototype.setBatchedAttribute = function (
instanceIndex,
@@ -406,8 +399,7 @@ function updateTexture(batchTable) {
/**
* Creates/updates the batch table texture.
* @param {FrameState} frameState The frame state.
- *
- * @exception {RuntimeError} The floating point texture extension is required but not supported.
+ * @throws {RuntimeError} The floating point texture extension is required but not supported.
*/
BatchTable.prototype.update = function (frameState) {
if (
@@ -427,7 +419,6 @@ BatchTable.prototype.update = function (frameState) {
/**
* Gets a function that will update a uniform map to contain values for looking up values in the batch table.
- *
* @returns {BatchTable.updateUniformMapCallback} A callback for updating uniform maps.
*/
BatchTable.prototype.getUniformMapCallback = function () {
@@ -560,7 +551,6 @@ function getGlslAttributeFunction(batchTable, attributeIndex) {
/**
* Gets a function that will update a vertex shader to contain functions for looking up values in the batch table.
- *
* @returns {BatchTable.updateVertexShaderSourceCallback} A callback for updating a vertex shader source.
*/
BatchTable.prototype.getVertexShaderCallback = function () {
@@ -592,9 +582,7 @@ BatchTable.prototype.getVertexShaderCallback = function () {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see BatchTable#destroy
*/
BatchTable.prototype.isDestroyed = function () {
@@ -608,9 +596,7 @@ BatchTable.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @see BatchTable#isDestroyed
*/
BatchTable.prototype.destroy = function () {
@@ -621,7 +607,6 @@ BatchTable.prototype.destroy = function () {
/**
* A callback for updating uniform maps.
* @callback BatchTable.updateUniformMapCallback
- *
* @param {object} uniformMap The uniform map.
* @returns {object} The new uniform map with properties for retrieving values from the batch table.
*/
@@ -629,7 +614,6 @@ BatchTable.prototype.destroy = function () {
/**
* A callback for updating a vertex shader source.
* @callback BatchTable.updateVertexShaderSourceCallback
- *
* @param {string} vertexShaderSource The vertex shader source.
* @returns {string} The new vertex shader source with the functions for retrieving batch table values injected.
*/
diff --git a/packages/engine/Source/Scene/BatchTableHierarchy.js b/packages/engine/Source/Scene/BatchTableHierarchy.js
index 4c1b2c4f1d90..bcfbeea9e380 100644
--- a/packages/engine/Source/Scene/BatchTableHierarchy.js
+++ b/packages/engine/Source/Scene/BatchTableHierarchy.js
@@ -11,14 +11,11 @@ import RuntimeError from "../Core/RuntimeError.js";
/**
* Object for handling the 3DTILES_batch_table_hierarchy
extension
- *
* @param {object} options Object with the following properties:
* @param {object} options.extension The 3DTILES_batch_table_hierarchy
extension object.
* @param {Uint8Array} [options.binaryBody] The binary body of the batch table
- *
* @alias BatchTableHierarchy
- * @constructor
- *
+ * @class
* @private
*/
function BatchTableHierarchy(options) {
@@ -54,7 +51,6 @@ Object.defineProperties(BatchTableHierarchy.prototype, {
/**
* Parse the batch table hierarchy from the
* 3DTILES_batch_table_hierarchy
extension.
- *
* @param {BatchTableHierarchy} hierarchy The hierarchy instance
* @param {object} hierarchyJson The JSON of the extension
* @param {Uint8Array} [binaryBody] The binary body of the batch table for accessing binary properties
@@ -364,7 +360,6 @@ function traverseHierarchy(hierarchy, instanceIndex, endConditionCallback) {
/**
* Returns whether the feature has this property.
- *
* @param {number} batchId the batch ID of the feature
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {boolean} Whether the feature has this property.
@@ -386,7 +381,6 @@ BatchTableHierarchy.prototype.hasProperty = function (batchId, propertyId) {
/**
* Returns whether any feature has this property.
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {boolean} Whether any feature has this property.
* @private
@@ -405,7 +399,6 @@ BatchTableHierarchy.prototype.propertyExists = function (propertyId) {
/**
* Returns an array of property IDs.
- *
* @param {number} batchId the batch ID of the feature
* @param {number} index The index of the entity.
* @param {string[]} [results] An array into which to store the results.
@@ -433,7 +426,6 @@ BatchTableHierarchy.prototype.getPropertyIds = function (batchId, results) {
/**
* Returns a copy of the value of the property with the given ID.
- *
* @param {number} batchId the batch ID of the feature
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {*} The value of the property or undefined
if the feature does not have this property.
@@ -466,13 +458,11 @@ function getBinaryProperty(binaryProperty, index) {
/**
* Sets the value of the property with the given ID. Only properties of the
* instance may be set; parent properties may not be set.
- *
* @param {number} batchId The batchId of the feature
* @param {string} propertyId The case-sensitive ID of the property.
* @param {*} value The value of the property that will be copied.
* @returns {boolean} true
if the property was set, false
otherwise.
- *
- * @exception {DeveloperError} when setting an inherited property
+ * @throws {DeveloperError} when setting an inherited property
* @private
*/
BatchTableHierarchy.prototype.setProperty = function (
@@ -519,10 +509,9 @@ function setBinaryProperty(binaryProperty, index, value) {
/**
* Check if a feature belongs to a class with the given name
- *
* @param {number} batchId The batch ID of the feature
* @param {string} className The name of the class
- * @return {boolean} true
if the feature belongs to the class given by className, or false
otherwise
+ * @returns {boolean} true
if the feature belongs to the class given by className, or false
otherwise
* @private
*/
BatchTableHierarchy.prototype.isClass = function (batchId, className) {
@@ -543,9 +532,8 @@ BatchTableHierarchy.prototype.isClass = function (batchId, className) {
/**
* Get the name of the class a given feature belongs to
- *
* @param {number} batchId The batch ID of the feature
- * @return {string} The name of the class this feature belongs to
+ * @returns {string} The name of the class this feature belongs to
*/
BatchTableHierarchy.prototype.getClassName = function (batchId) {
const classId = this._classIds[batchId];
diff --git a/packages/engine/Source/Scene/BatchTexture.js b/packages/engine/Source/Scene/BatchTexture.js
index 7b43f8cee30d..7f76acd159a5 100644
--- a/packages/engine/Source/Scene/BatchTexture.js
+++ b/packages/engine/Source/Scene/BatchTexture.js
@@ -15,16 +15,13 @@ import Texture from "../Renderer/Texture.js";
/**
* An object that manages color, show/hide and picking textures for a batch
* table or feature table.
- *
* @param {object} options Object with the following properties:
* @param {number} featuresLength The number of features in the batch table or feature table
* @param {Cesium3DTileContent|ModelFeatureTable} owner The owner of this batch texture. For 3D Tiles, this will be a {@link Cesium3DTileContent}. For glTF models, this will be a {@link ModelFeatureTable}.
* @param {object} [statistics] The statistics object to update with information about the batch texture.
* @param {Function} [colorChangedCallback] A callback function that is called whenever the color of a feature changes.
- *
* @alias BatchTexture
- * @constructor
- *
+ * @class
* @private
*/
function BatchTexture(options) {
@@ -79,7 +76,6 @@ function BatchTexture(options) {
Object.defineProperties(BatchTexture.prototype, {
/**
* Number of features that are translucent
- *
* @memberof BatchTexture.prototype
* @type {number}
* @readonly
@@ -93,7 +89,6 @@ Object.defineProperties(BatchTexture.prototype, {
/**
* Total size of all GPU resources used by this batch texture.
- *
* @memberof BatchTexture.prototype
* @type {number}
* @readonly
@@ -114,7 +109,6 @@ Object.defineProperties(BatchTexture.prototype, {
/**
* Dimensions of the underlying batch texture.
- *
* @memberof BatchTexture.prototype
* @type {Cartesian2}
* @readonly
@@ -129,7 +123,6 @@ Object.defineProperties(BatchTexture.prototype, {
/**
* Size of each texture and distance from side to center of a texel in
* each direction. Stored as (stepX, centerX, stepY, centerY)
- *
* @memberof BatchTexture.prototype
* @type {Cartesian4}
* @readonly
@@ -145,7 +138,6 @@ Object.defineProperties(BatchTexture.prototype, {
* The underlying texture used for styling. The texels are accessed
* by batch ID, and the value is the color of this feature after accounting
* for show/hide settings.
- *
* @memberof BatchTexture.prototype
* @type {Texture}
* @readonly
@@ -159,7 +151,6 @@ Object.defineProperties(BatchTexture.prototype, {
/**
* The default texture to use when there are no batch values
- *
* @memberof BatchTexture.prototype
* @type {Texture}
* @readonly
@@ -174,7 +165,6 @@ Object.defineProperties(BatchTexture.prototype, {
/**
* The underlying texture used for picking. The texels are accessed by
* batch ID, and the value is the pick color.
- *
* @memberof BatchTexture.prototype
* @type {Texture}
* @readonly
@@ -227,7 +217,6 @@ function checkBatchId(batchId, featuresLength) {
/**
* Set whether a feature is visible.
- *
* @param {number} batchId the ID of the feature
* @param {boolean} show true
if the feature should be shown, false
otherwise
* @private
@@ -262,7 +251,6 @@ BatchTexture.prototype.setShow = function (batchId, show) {
/**
* Set the show for all features at once.
- *
* @param {boolean} show true
if the feature should be shown, false
otherwise
* @private
*/
@@ -279,9 +267,8 @@ BatchTexture.prototype.setAllShow = function (show) {
/**
* Check the current show value for a feature
- *
* @param {number} batchId the ID of the feature
- * @return {boolean} true
if the feature is shown, or false
otherwise
+ * @returns {boolean} true
if the feature is shown, or false
otherwise
* @private
*/
BatchTexture.prototype.getShow = function (batchId) {
@@ -302,10 +289,8 @@ const scratchColorBytes = new Array(4);
/**
* Set the styling color of a feature
- *
* @param {number} batchId the ID of the feature
* @param {Color} color the color to assign to this feature.
- *
* @private
*/
BatchTexture.prototype.setColor = function (batchId, color) {
@@ -367,9 +352,7 @@ BatchTexture.prototype.setColor = function (batchId, color) {
/**
* Set the styling color for all features at once
- *
* @param {Color} color the color to assign to all features.
- *
* @private
*/
BatchTexture.prototype.setAllColor = function (color) {
@@ -385,11 +368,9 @@ BatchTexture.prototype.setAllColor = function (color) {
/**
* Get the current color of a feature
- *
* @param {number} batchId The ID of the feature
* @param {Color} result A color object where the result will be stored.
- * @return {Color} The color assigned to the selected feature
- *
+ * @returns {Color} The color assigned to the selected feature
* @private
*/
BatchTexture.prototype.getColor = function (batchId, result) {
@@ -420,10 +401,8 @@ BatchTexture.prototype.getColor = function (batchId, result) {
/**
* Get the pick color of a feature. This feature is an RGBA encoding of the
* pick ID.
- *
* @param {number} batchId The ID of the feature
- * @return {PickId} The picking color assigned to this feature
- *
+ * @returns {PickId} The picking color assigned to this feature
* @private
*/
BatchTexture.prototype.getPickColor = function (batchId) {
@@ -531,9 +510,7 @@ BatchTexture.prototype.update = function (tileset, frameState) {
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see BatchTexture#destroy
* @private
*/
@@ -549,12 +526,9 @@ BatchTexture.prototype.isDestroyed = function () {
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
*
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* e = e && e.destroy();
- *
* @see BatchTexture#isDestroyed
* @private
*/
diff --git a/packages/engine/Source/Scene/Billboard.js b/packages/engine/Source/Scene/Billboard.js
index f7c0264ae1fb..c1411295139d 100644
--- a/packages/engine/Source/Scene/Billboard.js
+++ b/packages/engine/Source/Scene/Billboard.js
@@ -26,7 +26,6 @@ import VerticalOrigin from "./VerticalOrigin.js";
* @typedef {object} Billboard.ConstructorOptions
*
* Initialization options for the first param of Billboard constructor
- *
* @property {Cartesian3} position The cartesian position of the billboard.
* @property {*} [id] A user-defined object to return when the billboard is picked with {@link Scene#pick}.
* @property {boolean} [show=true] Determines if this billboard will be shown.
@@ -63,31 +62,24 @@ import VerticalOrigin from "./VerticalOrigin.js";
*
* Example billboards
*
- *
* @alias Billboard
- *
* @performance Reading a property, e.g., {@link Billboard#show}, is constant time.
* Assigning to a property is constant time but results in
* CPU to GPU traffic when {@link BillboardCollection#update} is called. The per-billboard traffic is
* the same regardless of how many properties were updated. If most billboards in a collection need to be
* updated, it may be more efficient to clear the collection with {@link BillboardCollection#removeAll}
* and add new billboards instead of modifying each one.
- *
- * @exception {DeveloperError} scaleByDistance.far must be greater than scaleByDistance.near
- * @exception {DeveloperError} translucencyByDistance.far must be greater than translucencyByDistance.near
- * @exception {DeveloperError} pixelOffsetScaleByDistance.far must be greater than pixelOffsetScaleByDistance.near
- * @exception {DeveloperError} distanceDisplayCondition.far must be greater than distanceDisplayCondition.near
- *
+ * @throws {DeveloperError} scaleByDistance.far must be greater than scaleByDistance.near
+ * @throws {DeveloperError} translucencyByDistance.far must be greater than translucencyByDistance.near
+ * @throws {DeveloperError} pixelOffsetScaleByDistance.far must be greater than pixelOffsetScaleByDistance.near
+ * @throws {DeveloperError} distanceDisplayCondition.far must be greater than distanceDisplayCondition.near
* @see BillboardCollection
* @see BillboardCollection#add
* @see Label
- *
* @internalConstructor
* @class
- *
* @param {Billboard.ConstructorOptions} options Object describing initialization options
* @param {BillboardCollection} billboardCollection Instance of BillboardCollection
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Billboards.html|Cesium Sandcastle Billboard Demo}
*/
function Billboard(options, billboardCollection) {
@@ -394,14 +386,12 @@ Object.defineProperties(Billboard.prototype, {
* scaleByDistance will be disabled.
* @memberof Billboard.prototype
* @type {NearFarScalar}
- *
* @example
* // Example 1.
* // Set a billboard's scaleByDistance to scale by 1.5 when the
* // camera is 1500 meters from the billboard and disappear as
* // the camera distance approaches 8.0e6 meters.
* b.scaleByDistance = new Cesium.NearFarScalar(1.5e2, 1.5, 8.0e6, 0.0);
- *
* @example
* // Example 2.
* // disable scaling by distance
@@ -440,14 +430,12 @@ Object.defineProperties(Billboard.prototype, {
* translucencyByDistance will be disabled.
* @memberof Billboard.prototype
* @type {NearFarScalar}
- *
* @example
* // Example 1.
* // Set a billboard's translucency to 1.0 when the
* // camera is 1500 meters from the billboard and disappear as
* // the camera distance approaches 8.0e6 meters.
* b.translucencyByDistance = new Cesium.NearFarScalar(1.5e2, 1.0, 8.0e6, 0.0);
- *
* @example
* // Example 2.
* // disable translucency by distance
@@ -489,7 +477,6 @@ Object.defineProperties(Billboard.prototype, {
* pixelOffsetScaleByDistance will be disabled.
* @memberof Billboard.prototype
* @type {NearFarScalar}
- *
* @example
* // Example 1.
* // Set a billboard's pixel offset scale to 0.0 when the
@@ -497,7 +484,6 @@ Object.defineProperties(Billboard.prototype, {
* // in the y direction the camera distance approaches 8.0e6 meters.
* b.pixelOffset = new Cesium.Cartesian2(0.0, 1.0);
* b.pixelOffsetScaleByDistance = new Cesium.NearFarScalar(1.5e2, 0.0, 8.0e6, 10.0);
- *
* @example
* // Example 2.
* // disable pixel offset by distance
@@ -677,11 +663,9 @@ Object.defineProperties(Billboard.prototype, {
* (no intensity) to 1.0
(full intensity).
* @memberof Billboard.prototype
* @type {Color}
- *
* @example
* // Example 1. Assign yellow.
* b.color = Cesium.Color.YELLOW;
- *
* @example
* // Example 2. Make a billboard 50% translucent.
* b.color = new Cesium.Color(1.0, 1.0, 1.0, 0.5);
@@ -733,13 +717,11 @@ Object.defineProperties(Billboard.prototype, {
* // Example 1.
* // Have the billboard up vector point north
* billboard.alignedAxis = Cesium.Cartesian3.UNIT_Z;
- *
* @example
* // Example 2.
* // Have the billboard point east.
* billboard.alignedAxis = Cesium.Cartesian3.UNIT_Z;
* billboard.rotation = -Cesium.Math.PI_OVER_TWO;
- *
* @example
* // Example 3.
* // Reset the aligned axis
@@ -941,7 +923,6 @@ Object.defineProperties(Billboard.prototype, {
* This property can be set to a loaded Image, a URL which will be loaded as an Image automatically,
* a canvas, or another billboard's image property (from the same billboard collection).
*
- *
* @memberof Billboard.prototype
* @type {string}
* @example
@@ -979,12 +960,9 @@ Object.defineProperties(Billboard.prototype, {
/**
* When true
, this billboard is ready to render, i.e., the image
* has been downloaded and the WebGL resources are created.
- *
* @memberof Billboard.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
ready: {
@@ -1251,7 +1229,6 @@ Billboard.prototype._loadImage = function () {
*
* To load an image from a URL, setting the {@link Billboard#image} property is more convenient.
*
- *
* @param {string} id The id of the image. This can be any string that uniquely identifies the image.
* @param {HTMLImageElement|HTMLCanvasElement|string|Resource|Billboard.CreateImageCallback} image The image to load. This parameter
* can either be a loaded Image or Canvas, a URL which will be loaded as an Image automatically,
@@ -1299,11 +1276,9 @@ Billboard.prototype.setImage = function (id, image) {
/**
* Uses a sub-region of the image with the given id as the image for this billboard,
* measured in pixels from the bottom-left.
- *
* @param {string} id The id of the image to use.
* @param {BoundingRectangle} subRegion The sub-region of the image.
- *
- * @exception {RuntimeError} image with id must be in the atlas
+ * @throws {RuntimeError} image with id must be in the atlas
*/
Billboard.prototype.setImageSubRegion = function (id, subRegion) {
//>>includeStart('debug', pragmas.debug);
@@ -1419,16 +1394,12 @@ const scratchPixelOffset = new Cartesian2(0.0, 0.0);
* Computes the screen-space position of the billboard's origin, taking into account eye and pixel offsets.
* The screen space origin is the top, left corner of the canvas; x
increases from
* left to right, and y
increases from top to bottom.
- *
* @param {Scene} scene The scene.
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The screen-space position of the billboard.
- *
- * @exception {DeveloperError} Billboard must be in a collection.
- *
+ * @throws {DeveloperError} Billboard must be in a collection.
* @example
* console.log(b.computeScreenSpacePosition(scene).toString());
- *
* @see Billboard#eyeOffset
* @see Billboard#pixelOffset
*/
@@ -1484,7 +1455,6 @@ Billboard.prototype.computeScreenSpacePosition = function (scene, result) {
* @param {Cartesian2} screenSpacePosition The screen space center of the label.
* @param {BoundingRectangle} [result] The object onto which to store the result.
* @returns {BoundingRectangle} The screen space bounding box.
- *
* @private
*/
Billboard.getScreenSpaceBoundingBox = function (
@@ -1531,7 +1501,6 @@ Billboard.getScreenSpaceBoundingBox = function (
/**
* Determines if this billboard equals another billboard. Billboards are equal if all their properties
* are equal. Billboards in different collections can be equal.
- *
* @param {Billboard} other The billboard to compare for equality.
* @returns {boolean} true
if the billboards are equal; otherwise, false
.
*/
diff --git a/packages/engine/Source/Scene/BillboardCollection.js b/packages/engine/Source/Scene/BillboardCollection.js
index f62dc2dffea4..a8f6b91d2058 100644
--- a/packages/engine/Source/Scene/BillboardCollection.js
+++ b/packages/engine/Source/Scene/BillboardCollection.js
@@ -101,32 +101,26 @@ const attributeLocationsInstanced = {
* Billboards are added and removed from the collection using {@link BillboardCollection#add}
* and {@link BillboardCollection#remove}. Billboards in a collection automatically share textures
* for images with the same identifier.
- *
* @alias BillboardCollection
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The 4x4 transformation matrix that transforms each billboard from model to world coordinates.
- * @param {boolean} [options.debugShowBoundingVolume=false] For debugging only. Determines if this primitive's commands' bounding spheres are shown.
+ * @param {Matrix4} [options.modelMatrix] The 4x4 transformation matrix that transforms each billboard from model to world coordinates.
+ * @param {boolean} [options.debugShowBoundingVolume] For debugging only. Determines if this primitive's commands' bounding spheres are shown.
* @param {Scene} [options.scene] Must be passed in for billboards that use the height reference property or will be depth tested against the globe.
- * @param {BlendOption} [options.blendOption=BlendOption.OPAQUE_AND_TRANSLUCENT] The billboard blending option. The default
+ * @param {BlendOption} [options.blendOption] The billboard blending option. The default
* is used for rendering both opaque and translucent billboards. However, if either all of the billboards are completely opaque or all are completely translucent,
* setting the technique to BlendOption.OPAQUE or BlendOption.TRANSLUCENT can improve performance by up to 2x.
- * @param {boolean} [options.show=true] Determines if the billboards in the collection will be shown.
- *
+ * @param {boolean} [options.show] Determines if the billboards in the collection will be shown.
* @performance For best performance, prefer a few collections, each with many billboards, to
* many collections with only a few billboards each. Organize collections so that billboards
* with the same update frequency are in the same collection, i.e., billboards that do not
* change should be in one collection; billboards that change every frame should be in another
* collection; and so on.
- *
* @see BillboardCollection#add
* @see BillboardCollection#remove
* @see Billboard
* @see LabelCollection
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Billboards.html|Cesium Sandcastle Billboard Demo}
- *
* @example
* // Create a billboard collection with two billboards
* const billboards = scene.primitives.add(new Cesium.BillboardCollection());
@@ -204,7 +198,6 @@ function BillboardCollection(options) {
/**
* Determines if billboards in this collection will be shown.
- *
* @type {boolean}
* @default true
*/
@@ -215,11 +208,8 @@ function BillboardCollection(options) {
* When this is the identity matrix, the billboards are drawn in world coordinates, i.e., Earth's WGS84 coordinates.
* Local reference frames can be used by providing a different transformation matrix, like that returned
* by {@link Transforms.eastNorthUpToFixedFrame}.
- *
* @type {Matrix4}
* @default {@link Matrix4.IDENTITY}
- *
- *
* @example
* const center = Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883);
* billboards.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center);
@@ -239,7 +229,6 @@ function BillboardCollection(options) {
* image : 'url/to/image',
* position : new Cesium.Cartesian3(0.0, 0.0, 1000000.0) // up
* });
- *
* @see Transforms.eastNorthUpToFixedFrame
*/
this.modelMatrix = Matrix4.clone(
@@ -252,9 +241,7 @@ function BillboardCollection(options) {
*
* Draws the bounding sphere for each draw command in the primitive.
*
- *
* @type {boolean}
- *
* @default false
*/
this.debugShowBoundingVolume = defaultValue(
@@ -267,9 +254,7 @@ function BillboardCollection(options) {
*
* Draws the texture atlas for this BillboardCollection as a fullscreen quad.
*
- *
* @type {boolean}
- *
* @default false
*/
this.debugShowTextureAtlas = defaultValue(
@@ -385,11 +370,9 @@ Object.defineProperties(BillboardCollection.prototype, {
*
* If the texture atlas is used by more than one collection, set this to false
,
* and explicitly destroy the atlas to avoid attempting to destroy it multiple times.
- *
* @memberof BillboardCollection.prototype
* @type {boolean}
* @private
- *
* @example
* // Set destroyTextureAtlas
* // Destroy a billboard collection but not its texture atlas.
@@ -425,17 +408,12 @@ function destroyBillboards(billboards) {
/**
* Creates and adds a billboard with the specified initial properties to the collection.
* The added billboard is returned so it can be modified or removed from the collection later.
- *
* @param {Billboard.ConstructorOptions}[options] A template describing the billboard's properties as shown in Example 1.
* @returns {Billboard} The billboard that was added to the collection.
- *
* @performance Calling add
is expected constant time. However, the collection's vertex buffer
* is rewritten - an O(n)
operation that also incurs CPU to GPU overhead. For
* best performance, add as many billboards as possible before calling update
.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* // Example 1: Add a billboard, specifying all the default values.
* const b = billboards.add({
@@ -461,13 +439,11 @@ function destroyBillboards(billboards) {
* sizeInMeters : false,
* distanceDisplayCondition : undefined
* });
- *
* @example
* // Example 2: Specify only the billboard's cartographic position.
* const b = billboards.add({
* position : Cesium.Cartesian3.fromDegrees(longitude, latitude, height)
* });
- *
* @see BillboardCollection#remove
* @see BillboardCollection#removeAll
*/
@@ -483,23 +459,17 @@ BillboardCollection.prototype.add = function (options) {
/**
* Removes a billboard from the collection.
- *
* @param {Billboard} billboard The billboard to remove.
* @returns {boolean} true
if the billboard was removed; false
if the billboard was not found in the collection.
- *
* @performance Calling remove
is expected constant time. However, the collection's vertex buffer
* is rewritten - an O(n)
operation that also incurs CPU to GPU overhead. For
* best performance, remove as many billboards as possible before calling update
.
* If you intend to temporarily hide a billboard, it is usually more efficient to call
* {@link Billboard#show} instead of removing and re-adding the billboard.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* const b = billboards.add(...);
* billboards.remove(b); // Returns true
- *
* @see BillboardCollection#add
* @see BillboardCollection#removeAll
* @see Billboard#show
@@ -518,18 +488,13 @@ BillboardCollection.prototype.remove = function (billboard) {
/**
* Removes all billboards from the collection.
- *
* @performance O(n)
. It is more efficient to remove all the billboards
* from a collection and then add new ones than to create a new collection entirely.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* billboards.add(...);
* billboards.add(...);
* billboards.removeAll();
- *
* @see BillboardCollection#add
* @see BillboardCollection#remove
*/
@@ -575,10 +540,8 @@ BillboardCollection.prototype._updateBillboard = function (
/**
* Check whether this collection contains a given billboard.
- *
* @param {Billboard} [billboard] The billboard to check for.
* @returns {boolean} true if this collection contains the billboard, false otherwise.
- *
* @see BillboardCollection#get
*/
BillboardCollection.prototype.contains = function (billboard) {
@@ -591,17 +554,12 @@ BillboardCollection.prototype.contains = function (billboard) {
* it to the left, changing their indices. This function is commonly used with
* {@link BillboardCollection#length} to iterate over all the billboards
* in the collection.
- *
* @param {number} index The zero-based index of the billboard.
* @returns {Billboard} The billboard at the specified index.
- *
* @performance Expected constant time. If billboards were removed from the collection and
* {@link BillboardCollection#update} was not called, an implicit O(n)
* operation is performed.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* // Toggle the show property of every billboard in the collection
* const len = billboards.length;
@@ -609,7 +567,6 @@ BillboardCollection.prototype.contains = function (billboard) {
* const b = billboards.get(i);
* b.show = !b.show;
* }
- *
* @see BillboardCollection#length
*/
BillboardCollection.prototype.get = function (index) {
@@ -1815,8 +1772,8 @@ const scratchWriterArray = [];
* Do not call this function directly. This is documented just to
* list the exceptions that may be propagated when the scene is rendered:
*
- *
- * @exception {RuntimeError} image with id must be in the atlas.
+ * @param frameState
+ * @throws {RuntimeError} image with id must be in the atlas.
*/
BillboardCollection.prototype.update = function (frameState) {
removeBillboards(this);
@@ -2372,9 +2329,7 @@ BillboardCollection.prototype.update = function (frameState) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see BillboardCollection#destroy
*/
BillboardCollection.prototype.isDestroyed = function () {
@@ -2388,13 +2343,9 @@ BillboardCollection.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* billboards = billboards && billboards.destroy();
- *
* @see BillboardCollection#isDestroyed
*/
BillboardCollection.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/BingMapsImageryProvider.js b/packages/engine/Source/Scene/BingMapsImageryProvider.js
index a2fcda8d0ba8..035cdd0bb1a8 100644
--- a/packages/engine/Source/Scene/BingMapsImageryProvider.js
+++ b/packages/engine/Source/Scene/BingMapsImageryProvider.js
@@ -18,7 +18,6 @@ import ImageryProvider from "./ImageryProvider.js";
* @typedef {object} BingMapsImageryProvider.ConstructorOptions
*
* Initialization options for the BingMapsImageryProvider constructor
- *
* @property {string} [key] The Bing Maps key for your application, which can be
* created at {@link https://www.bingmapsportal.com/}.
* @property {string} [tileProtocol] The protocol to use when loading tiles, e.g. 'http' or 'https'.
@@ -37,10 +36,8 @@ import ImageryProvider from "./ImageryProvider.js";
/**
* Used to track creation details while fetching initial metadata
- *
- * @constructor
+ * @class
* @private
- *
* @param {BingMapsImageryProvider.ConstructorOptions} options An object describing initialization options
*/
function ImageryProviderBuilder(options) {
@@ -55,9 +52,7 @@ function ImageryProviderBuilder(options) {
/**
* Complete BingMapsImageryProvider creation based on builder values.
- *
* @private
- *
* @param {BingMapsImageryProvider} provider
*/
ImageryProviderBuilder.prototype.build = function (provider) {
@@ -169,12 +164,9 @@ async function requestMetadata(
*
*
* Provides tiled imagery using the Bing Maps Imagery REST API.
- *
* @alias BingMapsImageryProvider
- * @constructor
- *
+ * @class
* @param {BingMapsImageryProvider.ConstructorOptions} options Object describing initialization options
- *
* @see BingMapsImageryProvider.fromUrl
* @see ArcGisMapServerImageryProvider
* @see GoogleEarthEnterpriseMapsProvider
@@ -184,14 +176,12 @@ async function requestMetadata(
* @see WebMapServiceImageryProvider
* @see WebMapTileServiceImageryProvider
* @see UrlTemplateImageryProvider
- *
* @example
* const bing = await Cesium.BingMapsImageryProvider.fromUrl(
* "https://dev.virtualearth.net", {
* key: "get-yours-at-https://www.bingmapsportal.com/",
* mapStyle: Cesium.BingMapsStyle.AERIAL
* });
- *
* @see {@link http://msdn.microsoft.com/en-us/library/ff701713.aspx|Bing Maps REST Services}
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
*/
@@ -447,19 +437,16 @@ Object.defineProperties(BingMapsImageryProvider.prototype, {
/**
* Creates an {@link ImageryProvider} which provides tiled imagery using the Bing Maps Imagery REST API.
- *
- * @param {Resource|String} url The url of the Bing Maps server hosting the imagery.
+ * @param {Resource | string} url The url of the Bing Maps server hosting the imagery.
* @param {BingMapsImageryProvider.ConstructorOptions} options Object describing initialization options
* @returns {Promise} A promise that resolves to the created BingMapsImageryProvider
- *
* @example
* const bing = await Cesium.BingMapsImageryProvider.fromUrl(
* "https://dev.virtualearth.net", {
* key: "get-yours-at-https://www.bingmapsportal.com/",
* mapStyle: Cesium.BingMapsStyle.AERIAL
* });
- *
- * @exception {RuntimeError} metadata does not specify one resource in resourceSets
+ * @throws {RuntimeError} metadata does not specify one resource in resourceSets
*/
BingMapsImageryProvider.fromUrl = async function (url, options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -521,7 +508,6 @@ const rectangleScratch = new Rectangle();
/**
* Gets the credits to be displayed when a given tile is displayed.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level;
@@ -545,7 +531,6 @@ BingMapsImageryProvider.prototype.getTileCredits = function (x, y, level) {
/**
* Requests the image for a given tile.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
@@ -582,13 +567,12 @@ BingMapsImageryProvider.prototype.requestImage = function (
/**
* Picking features is not currently supported by this imagery provider, so this function simply returns
* undefined.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
* @param {number} longitude The longitude at which to pick features.
* @param {number} latitude The latitude at which to pick features.
- * @return {undefined} Undefined since picking is not supported.
+ * @returns {undefined} Undefined since picking is not supported.
*/
BingMapsImageryProvider.prototype.pickFeatures = function (
x,
@@ -603,11 +587,9 @@ BingMapsImageryProvider.prototype.pickFeatures = function (
/**
* Converts a tiles (x, y, level) position into a quadkey used to request an image
* from a Bing Maps server.
- *
* @param {number} x The tile's x coordinate.
* @param {number} y The tile's y coordinate.
* @param {number} level The tile's zoom level.
- *
* @see {@link http://msdn.microsoft.com/en-us/library/bb259689.aspx|Bing Maps Tile System}
* @see BingMapsImageryProvider#quadKeyToTileXY
*/
@@ -633,9 +615,7 @@ BingMapsImageryProvider.tileXYToQuadKey = function (x, y, level) {
/**
* Converts a tile's quadkey used to request an image from a Bing Maps server into the
* (x, y, level) position.
- *
* @param {string} quadkey The tile's quad key
- *
* @see {@link http://msdn.microsoft.com/en-us/library/bb259689.aspx|Bing Maps Tile System}
* @see BingMapsImageryProvider#tileXYToQuadKey
*/
diff --git a/packages/engine/Source/Scene/BingMapsStyle.js b/packages/engine/Source/Scene/BingMapsStyle.js
index a41f5d8f8a25..264cdea66bf2 100644
--- a/packages/engine/Source/Scene/BingMapsStyle.js
+++ b/packages/engine/Source/Scene/BingMapsStyle.js
@@ -1,14 +1,11 @@
/**
* The types of imagery provided by Bing Maps.
- *
* @enum {number}
- *
* @see BingMapsImageryProvider
*/
const BingMapsStyle = {
/**
* Aerial imagery.
- *
* @type {string}
* @constant
*/
@@ -16,7 +13,6 @@ const BingMapsStyle = {
/**
* Aerial imagery with a road overlay.
- *
* @type {string}
* @constant
* @deprecated See https://github.com/CesiumGS/cesium/issues/7128.
@@ -26,7 +22,6 @@ const BingMapsStyle = {
/**
* Aerial imagery with a road overlay.
- *
* @type {string}
* @constant
*/
@@ -34,7 +29,6 @@ const BingMapsStyle = {
/**
* Roads without additional imagery.
- *
* @type {string}
* @constant
* @deprecated See https://github.com/CesiumGS/cesium/issues/7128.
@@ -44,7 +38,6 @@ const BingMapsStyle = {
/**
* Roads without additional imagery.
- *
* @type {string}
* @constant
*/
@@ -52,7 +45,6 @@ const BingMapsStyle = {
/**
* A dark version of the road maps.
- *
* @type {string}
* @constant
*/
@@ -60,7 +52,6 @@ const BingMapsStyle = {
/**
* A lighter version of the road maps.
- *
* @type {string}
* @constant
*/
@@ -68,7 +59,6 @@ const BingMapsStyle = {
/**
* A grayscale version of the road maps.
- *
* @type {string}
* @constant
*/
@@ -76,7 +66,6 @@ const BingMapsStyle = {
/**
* Ordnance Survey imagery. This imagery is visible only for the London, UK area.
- *
* @type {string}
* @constant
*/
@@ -84,7 +73,6 @@ const BingMapsStyle = {
/**
* Collins Bart imagery.
- *
* @type {string}
* @constant
*/
diff --git a/packages/engine/Source/Scene/BlendEquation.js b/packages/engine/Source/Scene/BlendEquation.js
index c36e9653d6c5..8d443dfcf3d3 100644
--- a/packages/engine/Source/Scene/BlendEquation.js
+++ b/packages/engine/Source/Scene/BlendEquation.js
@@ -2,13 +2,11 @@ import WebGLConstants from "../Core/WebGLConstants.js";
/**
* Determines how two pixels' values are combined.
- *
* @enum {number}
*/
const BlendEquation = {
/**
* Pixel values are added componentwise. This is used in additive blending for translucency.
- *
* @type {number}
* @constant
*/
@@ -16,7 +14,6 @@ const BlendEquation = {
/**
* Pixel values are subtracted componentwise (source - destination). This is used in alpha blending for translucency.
- *
* @type {number}
* @constant
*/
@@ -24,7 +21,6 @@ const BlendEquation = {
/**
* Pixel values are subtracted componentwise (destination - source).
- *
* @type {number}
* @constant
*/
@@ -34,7 +30,6 @@ const BlendEquation = {
* Pixel values are given to the minimum function (min(source, destination)).
*
* This equation operates on each pixel color component.
- *
* @type {number}
* @constant
*/
@@ -44,7 +39,6 @@ const BlendEquation = {
* Pixel values are given to the maximum function (max(source, destination)).
*
* This equation operates on each pixel color component.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Scene/BlendFunction.js b/packages/engine/Source/Scene/BlendFunction.js
index c8be135e246e..d7a0c3925c30 100644
--- a/packages/engine/Source/Scene/BlendFunction.js
+++ b/packages/engine/Source/Scene/BlendFunction.js
@@ -2,13 +2,11 @@ import WebGLConstants from "../Core/WebGLConstants.js";
/**
* Determines how blending factors are computed.
- *
* @enum {number}
*/
const BlendFunction = {
/**
* The blend factor is zero.
- *
* @type {number}
* @constant
*/
@@ -16,7 +14,6 @@ const BlendFunction = {
/**
* The blend factor is one.
- *
* @type {number}
* @constant
*/
@@ -24,7 +21,6 @@ const BlendFunction = {
/**
* The blend factor is the source color.
- *
* @type {number}
* @constant
*/
@@ -32,7 +28,6 @@ const BlendFunction = {
/**
* The blend factor is one minus the source color.
- *
* @type {number}
* @constant
*/
@@ -40,7 +35,6 @@ const BlendFunction = {
/**
* The blend factor is the destination color.
- *
* @type {number}
* @constant
*/
@@ -48,7 +42,6 @@ const BlendFunction = {
/**
* The blend factor is one minus the destination color.
- *
* @type {number}
* @constant
*/
@@ -56,7 +49,6 @@ const BlendFunction = {
/**
* The blend factor is the source alpha.
- *
* @type {number}
* @constant
*/
@@ -64,7 +56,6 @@ const BlendFunction = {
/**
* The blend factor is one minus the source alpha.
- *
* @type {number}
* @constant
*/
@@ -72,7 +63,6 @@ const BlendFunction = {
/**
* The blend factor is the destination alpha.
- *
* @type {number}
* @constant
*/
@@ -80,7 +70,6 @@ const BlendFunction = {
/**
* The blend factor is one minus the destination alpha.
- *
* @type {number}
* @constant
*/
@@ -88,7 +77,6 @@ const BlendFunction = {
/**
* The blend factor is the constant color.
- *
* @type {number}
* @constant
*/
@@ -96,7 +84,6 @@ const BlendFunction = {
/**
* The blend factor is one minus the constant color.
- *
* @type {number}
* @constant
*/
@@ -104,7 +91,6 @@ const BlendFunction = {
/**
* The blend factor is the constant alpha.
- *
* @type {number}
* @constant
*/
@@ -112,7 +98,6 @@ const BlendFunction = {
/**
* The blend factor is one minus the constant alpha.
- *
* @type {number}
* @constant
*/
@@ -120,7 +105,6 @@ const BlendFunction = {
/**
* The blend factor is the saturated source alpha.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Scene/BlendOption.js b/packages/engine/Source/Scene/BlendOption.js
index bd40f1f0b540..c827c9b88b10 100644
--- a/packages/engine/Source/Scene/BlendOption.js
+++ b/packages/engine/Source/Scene/BlendOption.js
@@ -1,6 +1,5 @@
/**
* Determines how opaque and translucent parts of billboards, points, and labels are blended with the scene.
- *
* @enum {number}
*/
const BlendOption = {
diff --git a/packages/engine/Source/Scene/BlendingState.js b/packages/engine/Source/Scene/BlendingState.js
index 856f4d497ff1..d9711435052c 100644
--- a/packages/engine/Source/Scene/BlendingState.js
+++ b/packages/engine/Source/Scene/BlendingState.js
@@ -8,13 +8,11 @@ import BlendFunction from "./BlendFunction.js";
*
* This is a helper when using custom render states with {@link Appearance#renderState}.
*
- *
* @namespace
*/
const BlendingState = {
/**
* Blending is disabled.
- *
* @type {object}
* @constant
*/
@@ -24,7 +22,6 @@ const BlendingState = {
/**
* Blending is enabled using alpha blending, source(source.alpha) + destination(1 - source.alpha)
.
- *
* @type {object}
* @constant
*/
@@ -40,7 +37,6 @@ const BlendingState = {
/**
* Blending is enabled using alpha blending with premultiplied alpha, source + destination(1 - source.alpha)
.
- *
* @type {object}
* @constant
*/
@@ -56,7 +52,6 @@ const BlendingState = {
/**
* Blending is enabled using additive blending, source(source.alpha) + destination
.
- *
* @type {object}
* @constant
*/
diff --git a/packages/engine/Source/Scene/BoundingVolumeSemantics.js b/packages/engine/Source/Scene/BoundingVolumeSemantics.js
index a9adb87b3fd0..14de7c5b9d72 100644
--- a/packages/engine/Source/Scene/BoundingVolumeSemantics.js
+++ b/packages/engine/Source/Scene/BoundingVolumeSemantics.js
@@ -4,7 +4,6 @@ import DeveloperError from "../Core/DeveloperError.js";
/**
* Utilities for parsing bounding volume semantics from 3D Tiles 1.1 metadata.
- *
* @namespace BoundingVolumeSemantics
* @private
*/
@@ -19,12 +18,9 @@ const BoundingVolumeSemantics = {};
* Bounding volumes are checked in the order box, region, then sphere. Only
* the first valid bounding volume is returned.
*
- *
* @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Metadata/Semantics|3D Metadata Semantic Reference} for the various bounding volumes and minimum/maximum heights.
- *
* @param {TileMetadata} tileMetadata The metadata object for looking up values by semantic. In practice, this will typically be a {@link ImplicitMetadataView}
- * @return {object} An object containing a tile
property and a content
property. These contain the bounding volume, and any minimum or maximum height.
- *
+ * @returns {object} An object containing a tile
property and a content
property. These contain the bounding volume, and any minimum or maximum height.
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -75,10 +71,9 @@ BoundingVolumeSemantics.parseAllBoundingVolumeSemantics = function (
* This handles both tile and content bounding volumes, as the only difference
* is the prefix. e.g. TILE_BOUNDING_BOX
and
* CONTENT_BOUNDING_BOX
have the same memory layout.
- *
* @param {string} prefix Either "TILE" or "CONTENT"
* @param {TileMetadata} tileMetadata The tileMetadata for looking up values
- * @return {object} An object representing the JSON description of the tile metadata
+ * @returns {object} An object representing the JSON description of the tile metadata
* @private
*/
BoundingVolumeSemantics.parseBoundingVolumeSemantic = function (
@@ -132,10 +127,9 @@ BoundingVolumeSemantics.parseBoundingVolumeSemantic = function (
* Parse the minimum height from tile metadata. This is used for making tighter
* quadtree bounds for implicit tiling. This works for both
* TILE_MINIMUM_HEIGHT
and CONTENT_MINIMUM_HEIGHT
- *
* @param {string} prefix Either "TILE" or "CONTENT"
* @param {TileMetadata} tileMetadata The tileMetadata for looking up values
- * @return {number} The minimum height
+ * @returns {number} The minimum height
* @private
*/
BoundingVolumeSemantics._parseMinimumHeight = function (prefix, tileMetadata) {
@@ -155,10 +149,9 @@ BoundingVolumeSemantics._parseMinimumHeight = function (prefix, tileMetadata) {
* Parse the maximum height from tile metadata. This is used for making tighter
* quadtree bounds for implicit tiling. This works for both
* TILE_MAXIMUM_HEIGHT
and CONTENT_MAXIMUM_HEIGHT
- *
* @param {string} prefix Either "TILE" or "CONTENT"
* @param {TileMetadata} tileMetadata The tileMetadata for looking up values
- * @return {number} The maximum height
+ * @returns {number} The maximum height
* @private
*/
BoundingVolumeSemantics._parseMaximumHeight = function (prefix, tileMetadata) {
diff --git a/packages/engine/Source/Scene/BoxEmitter.js b/packages/engine/Source/Scene/BoxEmitter.js
index 89eb3401a5a2..2d33fab2d4dd 100644
--- a/packages/engine/Source/Scene/BoxEmitter.js
+++ b/packages/engine/Source/Scene/BoxEmitter.js
@@ -8,10 +8,8 @@ const defaultDimensions = new Cartesian3(1.0, 1.0, 1.0);
/**
* A ParticleEmitter that emits particles within a box.
* Particles will be positioned randomly within the box and have initial velocities emanating from the center of the box.
- *
* @alias BoxEmitter
- * @constructor
- *
+ * @class
* @param {Cartesian3} dimensions The width, height and depth dimensions of the box.
*/
function BoxEmitter(dimensions) {
@@ -54,7 +52,6 @@ const scratchHalfDim = new Cartesian3();
/**
* Initializes the given {Particle} by setting it's position and velocity.
- *
* @private
* @param {Particle} particle The particle to initialize.
*/
diff --git a/packages/engine/Source/Scene/BufferLoader.js b/packages/engine/Source/Scene/BufferLoader.js
index fb5f572abb9c..d49b98667de6 100644
--- a/packages/engine/Source/Scene/BufferLoader.js
+++ b/packages/engine/Source/Scene/BufferLoader.js
@@ -9,18 +9,14 @@ import ResourceLoaderState from "./ResourceLoaderState.js";
*
* Implements the {@link ResourceLoader} interface.
*
- *
* @alias BufferLoader
- * @constructor
+ * @class
* @augments ResourceLoader
- *
* @param {object} options Object with the following properties:
* @param {Uint8Array} [options.typedArray] The typed array containing the embedded buffer contents. Mutually exclusive with options.resource.
* @param {Resource} [options.resource] The {@link Resource} pointing to the external buffer. Mutually exclusive with options.typedArray.
* @param {string} [options.cacheKey] The cache key of the resource.
- *
- * @exception {DeveloperError} One of options.typedArray and options.resource must be defined.
- *
+ * @throws {DeveloperError} One of options.typedArray and options.resource must be defined.
* @private
*/
function BufferLoader(options) {
@@ -52,9 +48,7 @@ if (defined(Object.create)) {
Object.defineProperties(BufferLoader.prototype, {
/**
* The cache key of the resource.
- *
* @memberof BufferLoader.prototype
- *
* @type {string}
* @readonly
* @private
@@ -66,9 +60,7 @@ Object.defineProperties(BufferLoader.prototype, {
},
/**
* The typed array containing the embedded buffer contents.
- *
* @memberof BufferLoader.prototype
- *
* @type {Uint8Array}
* @readonly
* @private
@@ -124,6 +116,7 @@ async function loadExternalBuffer(bufferLoader) {
/**
* Exposed for testing
+ * @param resource
* @private
*/
BufferLoader._fetchArrayBuffer = function (resource) {
diff --git a/packages/engine/Source/Scene/Camera.js b/packages/engine/Source/Scene/Camera.js
index 9387f6aa4310..ad547439be4a 100644
--- a/packages/engine/Source/Scene/Camera.js
+++ b/packages/engine/Source/Scene/Camera.js
@@ -33,19 +33,17 @@ import SceneMode from "./SceneMode.js";
* @typedef {object} DirectionUp
*
* An orientation given by a pair of unit vectors
- *
* @property {Cartesian3} direction The unit "direction" vector
* @property {Cartesian3} up The unit "up" vector
- **/
+ */
/**
* @typedef {object} HeadingPitchRollValues
*
* An orientation given by numeric heading, pitch, and roll
- *
* @property {number} [heading=0.0] The heading in radians
* @property {number} [pitch=-CesiumMath.PI_OVER_TWO] The pitch in radians
* @property {number} [roll=0.0] The roll in radians
- **/
+ */
/**
* The camera is defined by a position, orientation, and view frustum.
@@ -56,17 +54,12 @@ import SceneMode from "./SceneMode.js";
* Each plane is represented by a {@link Cartesian4} object, where the x, y, and z components
* define the unit vector normal to the plane, and the w component is the distance of the
* plane from the origin/camera position.
- *
* @alias Camera
- *
- * @constructor
- *
+ * @class
* @param {Scene} scene The scene.
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Camera.html|Cesium Sandcastle Camera Demo}
* @demo {@link https://sandcastle.cesium.com/index.html?src=Camera%20Tutorial.html|Cesium Sandcastle Camera Tutorial Example}
* @demo {@link https://cesium.com/learn/cesiumjs-learn/cesiumjs-camera|Camera Tutorial}
- *
* @example
* // Create a camera looking down the negative z-axis, positioned at the origin,
* // with a field of view of 60 degrees, and 1:1 aspect ratio.
@@ -94,7 +87,6 @@ function Camera(scene) {
/**
* The position of the camera.
- *
* @type {Cartesian3}
*/
this.position = new Cartesian3();
@@ -105,21 +97,18 @@ function Camera(scene) {
/**
* The position delta magnitude.
- *
* @private
*/
this.positionWCDeltaMagnitude = 0.0;
/**
* The position delta magnitude last frame.
- *
* @private
*/
this.positionWCDeltaMagnitudeLastFrame = 0.0;
/**
* How long in seconds since the camera has stopped moving
- *
* @private
*/
this.timeSinceMoved = 0.0;
@@ -127,7 +116,6 @@ function Camera(scene) {
/**
* The view direction of the camera.
- *
* @type {Cartesian3}
*/
this.direction = new Cartesian3();
@@ -136,7 +124,6 @@ function Camera(scene) {
/**
* The up direction of the camera.
- *
* @type {Cartesian3}
*/
this.up = new Cartesian3();
@@ -145,7 +132,6 @@ function Camera(scene) {
/**
* The right direction of the camera.
- *
* @type {Cartesian3}
*/
this.right = new Cartesian3();
@@ -154,10 +140,8 @@ function Camera(scene) {
/**
* The region of space in view.
- *
* @type {PerspectiveFrustum|PerspectiveOffCenterFrustum|OrthographicFrustum}
* @default PerspectiveFrustum()
- *
* @see PerspectiveFrustum
* @see PerspectiveOffCenterFrustum
* @see OrthographicFrustum
@@ -360,11 +344,8 @@ function updateCameraDeltas(camera) {
/**
* Checks if there's a camera flight with preload for this camera.
- *
* @returns {boolean} Whether or not this camera has a current flight with a valid preloadFlightCamera in scene.
- *
* @private
- *
*/
Camera.prototype.canPreloadFlight = function () {
return defined(this._currentFlight) && this._mode !== SceneMode.SCENE2D;
@@ -849,10 +830,8 @@ Object.defineProperties(Camera.prototype, {
/**
* Gets the camera's reference frame. The inverse of this transformation is appended to the view matrix.
* @memberof Camera.prototype
- *
* @type {Matrix4}
* @readonly
- *
* @default {@link Matrix4.IDENTITY}
*/
transform: {
@@ -864,10 +843,8 @@ Object.defineProperties(Camera.prototype, {
/**
* Gets the inverse camera transform.
* @memberof Camera.prototype
- *
* @type {Matrix4}
* @readonly
- *
* @default {@link Matrix4.IDENTITY}
*/
inverseTransform: {
@@ -880,10 +857,8 @@ Object.defineProperties(Camera.prototype, {
/**
* Gets the view matrix.
* @memberof Camera.prototype
- *
* @type {Matrix4}
* @readonly
- *
* @see Camera#inverseViewMatrix
*/
viewMatrix: {
@@ -896,10 +871,8 @@ Object.defineProperties(Camera.prototype, {
/**
* Gets the inverse view matrix.
* @memberof Camera.prototype
- *
* @type {Matrix4}
* @readonly
- *
* @see Camera#viewMatrix
*/
inverseViewMatrix: {
@@ -915,7 +888,6 @@ Object.defineProperties(Camera.prototype, {
* for the returned longitude and latitude to be outside the range of valid longitudes
* and latitudes when the camera is outside the map.
* @memberof Camera.prototype
- *
* @type {Cartographic}
* @readonly
*/
@@ -929,7 +901,6 @@ Object.defineProperties(Camera.prototype, {
/**
* Gets the position of the camera in world coordinates.
* @memberof Camera.prototype
- *
* @type {Cartesian3}
* @readonly
*/
@@ -943,7 +914,6 @@ Object.defineProperties(Camera.prototype, {
/**
* Gets the view direction of the camera in world coordinates.
* @memberof Camera.prototype
- *
* @type {Cartesian3}
* @readonly
*/
@@ -957,7 +927,6 @@ Object.defineProperties(Camera.prototype, {
/**
* Gets the up direction of the camera in world coordinates.
* @memberof Camera.prototype
- *
* @type {Cartesian3}
* @readonly
*/
@@ -971,7 +940,6 @@ Object.defineProperties(Camera.prototype, {
/**
* Gets the right direction of the camera in world coordinates.
* @memberof Camera.prototype
- *
* @type {Cartesian3}
* @readonly
*/
@@ -985,7 +953,6 @@ Object.defineProperties(Camera.prototype, {
/**
* Gets the camera heading in radians.
* @memberof Camera.prototype
- *
* @type {number}
* @readonly
*/
@@ -1016,7 +983,6 @@ Object.defineProperties(Camera.prototype, {
/**
* Gets the camera pitch in radians.
* @memberof Camera.prototype
- *
* @type {number}
* @readonly
*/
@@ -1047,7 +1013,6 @@ Object.defineProperties(Camera.prototype, {
/**
* Gets the camera roll in radians.
* @memberof Camera.prototype
- *
* @type {number}
* @readonly
*/
@@ -1113,6 +1078,7 @@ Object.defineProperties(Camera.prototype, {
});
/**
+ * @param mode
* @private
*/
Camera.prototype.update = function (mode) {
@@ -1434,7 +1400,6 @@ const scratchSetViewOptions = {
const scratchHpr = new HeadingPitchRoll();
/**
* Sets the camera position, orientation and transform.
- *
* @param {object} options Object with the following properties:
* @param {Cartesian3|Rectangle} [options.destination] The final position of the camera in WGS84 (world) coordinates or a rectangle that would be visible from a top-down view.
* @param {HeadingPitchRollValues|DirectionUp} [options.orientation] An object that contains either direction and up properties or heading, pitch and roll properties. By default, the direction will point
@@ -1442,7 +1407,6 @@ const scratchHpr = new HeadingPitchRoll();
* y direction in Columbus view. Orientation is not used in 2D when in infinite scrolling mode.
* @param {Matrix4} [options.endTransform] Transform matrix representing the reference frame of the camera.
* @param {boolean} [options.convert] Whether to convert the destination from world coordinates to scene coordinates (only relevant when not using 3D). Defaults to true
.
- *
* @example
* // 1. Set position with a top-down view
* viewer.camera.setView({
@@ -1545,7 +1509,6 @@ const pitchScratch = new Cartesian3();
* Fly the camera to the home view. Use {@link Camera#.DEFAULT_VIEW_RECTANGLE} to set
* the default view for the 3D scene. The home view for 2D and columbus view shows the
* entire map.
- *
* @param {number} [duration] The duration of the flight in seconds. If omitted, Cesium attempts to calculate an ideal duration based on the distance to be traveled by the flight. See {@link Camera#flyTo}
*/
Camera.prototype.flyHome = function (duration) {
@@ -1600,7 +1563,6 @@ Camera.prototype.flyHome = function (duration) {
/**
* Transform a vector or point from world coordinates to the camera's reference frame.
- *
* @param {Cartesian4} cartesian The vector or point to transform.
* @param {Cartesian4} [result] The object onto which to store the result.
* @returns {Cartesian4} The transformed vector or point.
@@ -1621,7 +1583,6 @@ Camera.prototype.worldToCameraCoordinates = function (cartesian, result) {
/**
* Transform a point from world coordinates to the camera's reference frame.
- *
* @param {Cartesian3} cartesian The point to transform.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The transformed point.
@@ -1642,7 +1603,6 @@ Camera.prototype.worldToCameraCoordinatesPoint = function (cartesian, result) {
/**
* Transform a vector from world coordinates to the camera's reference frame.
- *
* @param {Cartesian3} cartesian The vector to transform.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The transformed vector.
@@ -1667,7 +1627,6 @@ Camera.prototype.worldToCameraCoordinatesVector = function (cartesian, result) {
/**
* Transform a vector or point from the camera's reference frame to world coordinates.
- *
* @param {Cartesian4} cartesian The vector or point to transform.
* @param {Cartesian4} [result] The object onto which to store the result.
* @returns {Cartesian4} The transformed vector or point.
@@ -1688,7 +1647,6 @@ Camera.prototype.cameraToWorldCoordinates = function (cartesian, result) {
/**
* Transform a point from the camera's reference frame to world coordinates.
- *
* @param {Cartesian3} cartesian The point to transform.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The transformed point.
@@ -1709,7 +1667,6 @@ Camera.prototype.cameraToWorldCoordinatesPoint = function (cartesian, result) {
/**
* Transform a vector from the camera's reference frame to world coordinates.
- *
* @param {Cartesian3} cartesian The vector to transform.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The transformed vector.
@@ -1765,10 +1722,8 @@ function clampMove2D(camera, position) {
const moveScratch = new Cartesian3();
/**
* Translates the camera's position by amount
along direction
.
- *
* @param {Cartesian3} direction The direction to move.
* @param {number} [amount] The amount, in meters, to move. Defaults to defaultMoveAmount
.
- *
* @see Camera#moveBackward
* @see Camera#moveForward
* @see Camera#moveLeft
@@ -1796,9 +1751,7 @@ Camera.prototype.move = function (direction, amount) {
/**
* Translates the camera's position by amount
along the camera's view vector.
* When in 2D mode, this will zoom in the camera instead of translating the camera's position.
- *
* @param {number} [amount] The amount, in meters, to move. Defaults to defaultMoveAmount
.
- *
* @see Camera#moveBackward
*/
Camera.prototype.moveForward = function (amount) {
@@ -1817,9 +1770,7 @@ Camera.prototype.moveForward = function (amount) {
* Translates the camera's position by amount
along the opposite direction
* of the camera's view vector.
* When in 2D mode, this will zoom out the camera instead of translating the camera's position.
- *
* @param {number} [amount] The amount, in meters, to move. Defaults to defaultMoveAmount
.
- *
* @see Camera#moveForward
*/
Camera.prototype.moveBackward = function (amount) {
@@ -1836,9 +1787,7 @@ Camera.prototype.moveBackward = function (amount) {
/**
* Translates the camera's position by amount
along the camera's up vector.
- *
* @param {number} [amount] The amount, in meters, to move. Defaults to defaultMoveAmount
.
- *
* @see Camera#moveDown
*/
Camera.prototype.moveUp = function (amount) {
@@ -1849,9 +1798,7 @@ Camera.prototype.moveUp = function (amount) {
/**
* Translates the camera's position by amount
along the opposite direction
* of the camera's up vector.
- *
* @param {number} [amount] The amount, in meters, to move. Defaults to defaultMoveAmount
.
- *
* @see Camera#moveUp
*/
Camera.prototype.moveDown = function (amount) {
@@ -1861,9 +1808,7 @@ Camera.prototype.moveDown = function (amount) {
/**
* Translates the camera's position by amount
along the camera's right vector.
- *
* @param {number} [amount] The amount, in meters, to move. Defaults to defaultMoveAmount
.
- *
* @see Camera#moveLeft
*/
Camera.prototype.moveRight = function (amount) {
@@ -1874,9 +1819,7 @@ Camera.prototype.moveRight = function (amount) {
/**
* Translates the camera's position by amount
along the opposite direction
* of the camera's right vector.
- *
* @param {number} [amount] The amount, in meters, to move. Defaults to defaultMoveAmount
.
- *
* @see Camera#moveRight
*/
Camera.prototype.moveLeft = function (amount) {
@@ -1887,9 +1830,7 @@ Camera.prototype.moveLeft = function (amount) {
/**
* Rotates the camera around its up vector by amount, in radians, in the opposite direction
* of its right vector if not in 2D mode.
- *
* @param {number} [amount] The amount, in radians, to rotate by. Defaults to defaultLookAmount
.
- *
* @see Camera#lookRight
*/
Camera.prototype.lookLeft = function (amount) {
@@ -1904,9 +1845,7 @@ Camera.prototype.lookLeft = function (amount) {
/**
* Rotates the camera around its up vector by amount, in radians, in the direction
* of its right vector if not in 2D mode.
- *
* @param {number} [amount] The amount, in radians, to rotate by. Defaults to defaultLookAmount
.
- *
* @see Camera#lookLeft
*/
Camera.prototype.lookRight = function (amount) {
@@ -1921,9 +1860,7 @@ Camera.prototype.lookRight = function (amount) {
/**
* Rotates the camera around its right vector by amount, in radians, in the direction
* of its up vector if not in 2D mode.
- *
* @param {number} [amount] The amount, in radians, to rotate by. Defaults to defaultLookAmount
.
- *
* @see Camera#lookDown
*/
Camera.prototype.lookUp = function (amount) {
@@ -1938,9 +1875,7 @@ Camera.prototype.lookUp = function (amount) {
/**
* Rotates the camera around its right vector by amount, in radians, in the opposite direction
* of its up vector if not in 2D mode.
- *
* @param {number} [amount] The amount, in radians, to rotate by. Defaults to defaultLookAmount
.
- *
* @see Camera#lookUp
*/
Camera.prototype.lookDown = function (amount) {
@@ -1956,10 +1891,8 @@ const lookScratchQuaternion = new Quaternion();
const lookScratchMatrix = new Matrix3();
/**
* Rotate each of the camera's orientation vectors around axis
by angle
- *
* @param {Cartesian3} axis The axis to rotate around.
* @param {number} [angle] The angle, in radians, to rotate by. Defaults to defaultLookAmount
.
- *
* @see Camera#lookUp
* @see Camera#lookDown
* @see Camera#lookLeft
@@ -1991,9 +1924,7 @@ Camera.prototype.look = function (axis, angle) {
/**
* Rotate the camera counter-clockwise around its direction vector by amount, in radians.
- *
* @param {number} [amount] The amount, in radians, to rotate by. Defaults to defaultLookAmount
.
- *
* @see Camera#twistRight
*/
Camera.prototype.twistLeft = function (amount) {
@@ -2003,9 +1934,7 @@ Camera.prototype.twistLeft = function (amount) {
/**
* Rotate the camera clockwise around its direction vector by amount, in radians.
- *
* @param {number} [amount] The amount, in radians, to rotate by. Defaults to defaultLookAmount
.
- *
* @see Camera#twistLeft
*/
Camera.prototype.twistRight = function (amount) {
@@ -2018,10 +1947,8 @@ const rotateScratchMatrix = new Matrix3();
/**
* Rotates the camera around axis
by angle
. The distance
* of the camera's position to the center of the camera's reference frame remains the same.
- *
* @param {Cartesian3} axis The axis to rotate around given in world coordinates.
* @param {number} [angle] The angle, in radians, to rotate by. Defaults to defaultRotateAmount
.
- *
* @see Camera#rotateUp
* @see Camera#rotateDown
* @see Camera#rotateLeft
@@ -2052,9 +1979,7 @@ Camera.prototype.rotate = function (axis, angle) {
/**
* Rotates the camera around the center of the camera's reference frame by angle downwards.
- *
* @param {number} [angle] The angle, in radians, to rotate by. Defaults to defaultRotateAmount
.
- *
* @see Camera#rotateUp
* @see Camera#rotate
*/
@@ -2065,9 +1990,7 @@ Camera.prototype.rotateDown = function (angle) {
/**
* Rotates the camera around the center of the camera's reference frame by angle upwards.
- *
* @param {number} [angle] The angle, in radians, to rotate by. Defaults to defaultRotateAmount
.
- *
* @see Camera#rotateDown
* @see Camera#rotate
*/
@@ -2138,9 +2061,7 @@ function rotateVertical(camera, angle) {
/**
* Rotates the camera around the center of the camera's reference frame by angle to the right.
- *
* @param {number} [angle] The angle, in radians, to rotate by. Defaults to defaultRotateAmount
.
- *
* @see Camera#rotateLeft
* @see Camera#rotate
*/
@@ -2151,9 +2072,7 @@ Camera.prototype.rotateRight = function (angle) {
/**
* Rotates the camera around the center of the camera's reference frame by angle to the left.
- *
* @param {number} [angle] The angle, in radians, to rotate by. Defaults to defaultRotateAmount
.
- *
* @see Camera#rotateRight
* @see Camera#rotate
*/
@@ -2249,9 +2168,7 @@ function zoom3D(camera, amount) {
/**
* Zooms amount
along the camera's view vector.
- *
* @param {number} [amount] The amount to move. Defaults to defaultZoomAmount
.
- *
* @see Camera#zoomOut
*/
Camera.prototype.zoomIn = function (amount) {
@@ -2266,9 +2183,7 @@ Camera.prototype.zoomIn = function (amount) {
/**
* Zooms amount
along the opposite direction of
* the camera's view vector.
- *
* @param {number} [amount] The amount to move. Defaults to defaultZoomAmount
.
- *
* @see Camera#zoomIn
*/
Camera.prototype.zoomOut = function (amount) {
@@ -2283,7 +2198,6 @@ Camera.prototype.zoomOut = function (amount) {
/**
* Gets the magnitude of the camera position. In 3D, this is the vector magnitude. In 2D and
* Columbus view, this is the distance to the map.
- *
* @returns {number} The magnitude of the position.
*/
Camera.prototype.getMagnitude = function () {
@@ -2312,12 +2226,9 @@ const scratchLookAtMatrix4 = new Matrix4();
* In 2D, there must be a top down view. The camera will be placed above the target looking down. The height above the
* target will be the magnitude of the offset. The heading will be determined from the offset. If the heading cannot be
* determined from the offset, the heading will be north.
- *
* @param {Cartesian3} target The target position in world coordinates.
* @param {Cartesian3|HeadingPitchRange} offset The offset from the target in the local east-north-up reference frame centered at the target.
- *
- * @exception {DeveloperError} lookAt is not supported while morphing.
- *
+ * @throws {DeveloperError} lookAt is not supported while morphing.
* @example
* // 1. Using a cartesian offset
* const center = Cesium.Cartesian3.fromDegrees(-98.0, 40.0);
@@ -2400,12 +2311,9 @@ function offsetFromHeadingPitchRange(heading, pitch, range) {
* In 2D, there must be a top down view. The camera will be placed above the center of the reference frame. The height above the
* target will be the magnitude of the offset. The heading will be determined from the offset. If the heading cannot be
* determined from the offset, the heading will be north.
- *
* @param {Matrix4} transform The transformation matrix defining the reference frame.
* @param {Cartesian3|HeadingPitchRange} [offset] The offset from the target in a reference frame centered at the target.
- *
- * @exception {DeveloperError} lookAtTransform is not supported while morphing.
- *
+ * @throws {DeveloperError} lookAtTransform is not supported while morphing.
* @example
* // 1. Using a cartesian offset
* const transform = Cesium.Transforms.eastNorthUpToFixedFrame(Cesium.Cartesian3.fromDegrees(-98.0, 40.0));
@@ -2811,7 +2719,6 @@ function rectangleCameraPosition2D(camera, rectangle, result) {
/**
* Get the camera position needed to view a rectangle on an ellipsoid or map
- *
* @param {Rectangle} rectangle The rectangle to view.
* @param {Cartesian3} [result] The camera position needed to view the rectangle
* @returns {Cartesian3} The camera position needed to view the rectangle
@@ -2891,14 +2798,12 @@ function pickMapColumbusView(camera, windowPosition, projection, result) {
/**
* Pick an ellipsoid or map.
- *
* @param {Cartesian2} windowPosition The x and y coordinates of a pixel.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to pick.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid to pick.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3 | undefined} If the ellipsoid or map was picked,
* returns the point on the surface of the ellipsoid or map in world
* coordinates. If the ellipsoid or map was not picked, returns undefined.
- *
* @example
* const canvas = viewer.scene.canvas;
* const center = new Cesium.Cartesian2(canvas.clientWidth / 2.0, canvas.clientHeight / 2.0);
@@ -3028,7 +2933,6 @@ function getPickRayOrthographic(camera, windowPosition, result) {
/**
* Create a ray from the camera position through the pixel at windowPosition
* in world coordinates.
- *
* @param {Cartesian2} windowPosition The x and y coordinates of a pixel.
* @param {Ray} [result] The object onto which to store the result.
* @returns {Ray|undefined} Returns the {@link Cartesian3} position and direction of the ray, or undefined if the pick ray cannot be determined.
@@ -3066,7 +2970,6 @@ const scratchProj = new Cartesian3();
/**
* Return the distance from the camera to the front of the bounding sphere.
- *
* @param {BoundingSphere} boundingSphere The bounding sphere in world coordinates.
* @returns {number} The distance to the bounding sphere.
*/
@@ -3094,7 +2997,6 @@ const scratchPixelSize = new Cartesian2();
/**
* Return the pixel size in meters.
- *
* @param {BoundingSphere} boundingSphere The bounding sphere in world coordinates.
* @param {number} drawingBufferWidth The drawing buffer width.
* @param {number} drawingBufferHeight The drawing buffer height.
@@ -3235,10 +3137,8 @@ function createAnimationCV(camera, duration) {
/**
* Create an animation to move the map into view. This method is only valid for 2D and Columbus modes.
- *
* @param {number} duration The duration, in seconds, of the animation.
* @returns {object} The animation or undefined if the scene mode is 3D or the map is already ion view.
- *
* @private
*/
Camera.prototype.createCorrectPositionTween = function (duration) {
@@ -3314,7 +3214,6 @@ Camera.prototype.completeFlight = function () {
/**
* Flies the camera from its current position to a new position.
- *
* @param {object} options Object with the following properties:
* @param {Cartesian3|Rectangle} options.destination The final position of the camera in WGS84 (world) coordinates or a rectangle that would be visible from a top-down view.
* @param {object} [options.orientation] An object that contains either direction and up properties or heading, pitch and roll properties. By default, the direction will point
@@ -3330,9 +3229,7 @@ Camera.prototype.completeFlight = function () {
* @param {number} [options.flyOverLongitudeWeight] Fly over the lon specifyed via flyOverLongitude only if that way is not longer than short way times flyOverLongitudeWeight.
* @param {boolean} [options.convert] Whether to convert the destination from world coordinates to scene coordinates (only relevant when not using 3D). Defaults to true
.
* @param {EasingFunction.Callback} [options.easingFunction] Controls how the time is interpolated over the duration of the flight.
- *
- * @exception {DeveloperError} If either direction or up is given, then both are required.
- *
+ * @throws {DeveloperError} If either direction or up is given, then both are required.
* @example
* // 1. Fly to a position with a top-down view
* viewer.camera.flyTo({
@@ -3543,11 +3440,9 @@ function adjustBoundingSphereOffset(camera, boundingSphere, offset) {
* In 2D, there must be a top down view. The camera will be placed above the target looking down. The height above the
* target will be the range. The heading will be determined from the offset. If the heading cannot be
* determined from the offset, the heading will be north.
- *
* @param {BoundingSphere} boundingSphere The bounding sphere to view, in world coordinates.
* @param {HeadingPitchRange} [offset] The offset from the target in the local east-north-up reference frame centered at the target.
- *
- * @exception {DeveloperError} viewBoundingSphere is not supported while morphing.
+ * @throws {DeveloperError} viewBoundingSphere is not supported while morphing.
*/
Camera.prototype.viewBoundingSphere = function (boundingSphere, offset) {
//>>includeStart('debug', pragmas.debug);
@@ -3586,7 +3481,6 @@ const scratchFlyToBoundingSphereMatrix3 = new Matrix3();
*
* In 2D and Columbus View, there must be a top down view. The camera will be placed above the target looking down. The height above the
* target will be the range. The heading will be aligned to local north.
- *
* @param {BoundingSphere} boundingSphere The bounding sphere to view, in world coordinates.
* @param {object} [options] Object with the following properties:
* @param {number} [options.duration] The duration of the flight in seconds. If omitted, Cesium attempts to calculate an ideal duration based on the distance to be traveled by the flight.
@@ -3813,10 +3707,8 @@ function addToResult(x, y, index, camera, ellipsoid, computedHorizonQuad) {
}
/**
* Computes the approximate visible rectangle on the ellipsoid.
- *
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid that you want to know the visible region.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid that you want to know the visible region.
* @param {Rectangle} [result] The rectangle in which to store the result
- *
* @returns {Rectangle|undefined} The visible rectangle or undefined if the ellipsoid isn't visible at all.
*/
Camera.prototype.computeViewRectangle = function (ellipsoid, result) {
@@ -3964,6 +3856,8 @@ Camera.prototype.switchToOrthographicFrustum = function () {
};
/**
+ * @param camera
+ * @param result
* @private
*/
Camera.clone = function (camera, result) {
diff --git a/packages/engine/Source/Scene/CameraEventAggregator.js b/packages/engine/Source/Scene/CameraEventAggregator.js
index 10929311dd8e..e1474a02713d 100644
--- a/packages/engine/Source/Scene/CameraEventAggregator.js
+++ b/packages/engine/Source/Scene/CameraEventAggregator.js
@@ -302,12 +302,9 @@ function listenMouseMove(aggregator, modifier) {
* Aggregates input events. For example, suppose the following inputs are received between frames:
* left mouse button down, mouse move, mouse move, left mouse button up. These events will be aggregated into
* one event with a start and end position of the mouse.
- *
* @alias CameraEventAggregator
- * @constructor
- *
- * @param {HTMLCanvasElement} [canvas=document] The element to handle events for.
- *
+ * @class
+ * @param {HTMLCanvasElement} [canvas] The element to handle events for.
* @see ScreenSpaceEventHandler
*/
function CameraEventAggregator(canvas) {
@@ -388,7 +385,6 @@ Object.defineProperties(CameraEventAggregator.prototype, {
/**
* Gets if a mouse button down or touch has started and has been moved.
- *
* @param {CameraEventType} type The camera event type.
* @param {KeyboardEventModifier} [modifier] The keyboard modifier.
* @returns {boolean} Returns true
if a mouse button down or touch has started and has been moved; otherwise, false
@@ -406,7 +402,6 @@ CameraEventAggregator.prototype.isMoving = function (type, modifier) {
/**
* Gets the aggregated start and end position of the current event.
- *
* @param {CameraEventType} type The camera event type.
* @param {KeyboardEventModifier} [modifier] The keyboard modifier.
* @returns {object} An object with two {@link Cartesian2} properties: startPosition
and endPosition
.
@@ -425,7 +420,6 @@ CameraEventAggregator.prototype.getMovement = function (type, modifier) {
/**
* Gets the start and end position of the last move event (not the aggregated event).
- *
* @param {CameraEventType} type The camera event type.
* @param {KeyboardEventModifier} [modifier] The keyboard modifier.
* @returns {object|undefined} An object with two {@link Cartesian2} properties: startPosition
and endPosition
or undefined
.
@@ -448,7 +442,6 @@ CameraEventAggregator.prototype.getLastMovement = function (type, modifier) {
/**
* Gets whether the mouse button is down or a touch has started.
- *
* @param {CameraEventType} type The camera event type.
* @param {KeyboardEventModifier} [modifier] The keyboard modifier.
* @returns {boolean} Whether the mouse button is down or a touch has started.
@@ -466,7 +459,6 @@ CameraEventAggregator.prototype.isButtonDown = function (type, modifier) {
/**
* Gets the mouse position that started the aggregation.
- *
* @param {CameraEventType} type The camera event type.
* @param {KeyboardEventModifier} [modifier] The keyboard modifier.
* @returns {Cartesian2} The mouse position.
@@ -491,7 +483,6 @@ CameraEventAggregator.prototype.getStartMousePosition = function (
/**
* Gets the time the button was pressed or the touch was started.
- *
* @param {CameraEventType} type The camera event type.
* @param {KeyboardEventModifier} [modifier] The keyboard modifier.
* @returns {Date} The time the button was pressed or the touch was started.
@@ -509,7 +500,6 @@ CameraEventAggregator.prototype.getButtonPressTime = function (type, modifier) {
/**
* Gets the time the button was released or the touch was ended.
- *
* @param {CameraEventType} type The camera event type.
* @param {KeyboardEventModifier} [modifier] The keyboard modifier.
* @returns {Date} The time the button was released or the touch was ended.
@@ -544,9 +534,7 @@ CameraEventAggregator.prototype.reset = function () {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see CameraEventAggregator#destroy
*/
CameraEventAggregator.prototype.isDestroyed = function () {
@@ -559,13 +547,9 @@ CameraEventAggregator.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* handler = handler && handler.destroy();
- *
* @see CameraEventAggregator#isDestroyed
*/
CameraEventAggregator.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/CameraEventType.js b/packages/engine/Source/Scene/CameraEventType.js
index 730575545013..ca189ca929f7 100644
--- a/packages/engine/Source/Scene/CameraEventType.js
+++ b/packages/engine/Source/Scene/CameraEventType.js
@@ -1,12 +1,10 @@
/**
* Enumerates the available input for interacting with the camera.
- *
* @enum {number}
*/
const CameraEventType = {
/**
* A left mouse button press followed by moving the mouse and releasing the button.
- *
* @type {number}
* @constant
*/
@@ -14,7 +12,6 @@ const CameraEventType = {
/**
* A right mouse button press followed by moving the mouse and releasing the button.
- *
* @type {number}
* @constant
*/
@@ -22,7 +19,6 @@ const CameraEventType = {
/**
* A middle mouse button press followed by moving the mouse and releasing the button.
- *
* @type {number}
* @constant
*/
@@ -30,7 +26,6 @@ const CameraEventType = {
/**
* Scrolling the middle mouse button.
- *
* @type {number}
* @constant
*/
@@ -38,7 +33,6 @@ const CameraEventType = {
/**
* A two-finger touch on a touch surface.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Scene/CameraFlightPath.js b/packages/engine/Source/Scene/CameraFlightPath.js
index 6d6a1aa29a73..e3673f26c3d9 100644
--- a/packages/engine/Source/Scene/CameraFlightPath.js
+++ b/packages/engine/Source/Scene/CameraFlightPath.js
@@ -14,7 +14,6 @@ import SceneMode from "./SceneMode.js";
* Creates tweens for camera flights.
*
* Mouse interaction is disabled during flights.
- *
* @private
*/
const CameraFlightPath = {};
diff --git a/packages/engine/Source/Scene/Cesium3DContentGroup.js b/packages/engine/Source/Scene/Cesium3DContentGroup.js
index bacacd718626..7ea0c773b801 100644
--- a/packages/engine/Source/Scene/Cesium3DContentGroup.js
+++ b/packages/engine/Source/Scene/Cesium3DContentGroup.js
@@ -6,12 +6,10 @@ import defaultValue from "../Core/defaultValue.js";
* more consistent, i.e. metadata can be accessed via
* content.group.metadata
much like tile metadata is accessed as
* tile.metadata
.
- *
* @param {object} options Object with the following properties:
* @param {GroupMetadata} options.metadata The metadata associated with this group.
- *
* @alias Cesium3DContentGroup
- * @constructor
+ * @class
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -27,11 +25,8 @@ function Cesium3DContentGroup(options) {
Object.defineProperties(Cesium3DContentGroup.prototype, {
/**
* Get the metadata for this group
- *
* @memberof Cesium3DContentGroup.prototype
- *
* @type {GroupMetadata}
- *
* @readonly
*/
metadata: {
diff --git a/packages/engine/Source/Scene/Cesium3DTile.js b/packages/engine/Source/Scene/Cesium3DTile.js
index 2d6a2d80974b..4050455215ce 100644
--- a/packages/engine/Source/Scene/Cesium3DTile.js
+++ b/packages/engine/Source/Scene/Cesium3DTile.js
@@ -51,9 +51,8 @@ import VerticalExaggeration from "../Core/VerticalExaggeration.js";
*
* Do not construct this directly, instead access tiles through {@link Cesium3DTileset#tileVisible}.
*
- *
* @alias Cesium3DTile
- * @constructor
+ * @class
* @param {Cesium3DTileset} tileset The tileset
* @param {Resource} baseResource The base resource for the tileset
* @param {object} header The JSON header for the tile
@@ -112,7 +111,6 @@ function Cesium3DTile(tileset, baseResource, header, parent) {
/**
* When tile metadata is present (3D Tiles 1.1) or the 3DTILES_metadata
extension is used,
* this stores a {@link TileMetadata} object for accessing tile metadata.
- *
* @type {TileMetadata}
* @readonly
* @private
@@ -160,7 +158,6 @@ function Cesium3DTile(tileset, baseResource, header, parent) {
/**
* The error, in meters, introduced if this tile is rendered and its children are not.
* This is used to compute screen space error, i.e., the error measured in pixels.
- *
* @type {number}
* @readonly
*/
@@ -202,7 +199,6 @@ function Cesium3DTile(tileset, baseResource, header, parent) {
/**
* Specifies the type of refinement that is used when traversing this tile for rendering.
- *
* @type {Cesium3DTileRefine}
* @readonly
* @private
@@ -211,7 +207,6 @@ function Cesium3DTile(tileset, baseResource, header, parent) {
/**
* Gets the tile's children.
- *
* @type {Cesium3DTile[]}
* @readonly
*/
@@ -224,7 +219,6 @@ function Cesium3DTile(tileset, baseResource, header, parent) {
* root tile's parent is not undefined
; instead, the parent references
* the tile (with its content pointing to an external tileset JSON file) as if the two tilesets were merged.
*
- *
* @type {Cesium3DTile}
* @readonly
*/
@@ -284,10 +278,8 @@ function Cesium3DTile(tileset, baseResource, header, parent) {
/**
* When true
, the tile has no content.
- *
* @type {boolean}
* @readonly
- *
* @private
*/
this.hasEmptyContent = hasEmptyContent;
@@ -297,10 +289,8 @@ function Cesium3DTile(tileset, baseResource, header, parent) {
*
* This is false
until the tile's content is loaded.
*
- *
* @type {boolean}
* @readonly
- *
* @private
*/
this.hasTilesetContent = false;
@@ -310,10 +300,8 @@ function Cesium3DTile(tileset, baseResource, header, parent) {
*
* This is false
until the tile's implicit content is loaded.
*
- *
* @type {boolean}
* @readonly
- *
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -325,10 +313,8 @@ function Cesium3DTile(tileset, baseResource, header, parent) {
*
* This is false
until the tile's content is loaded.
*
- *
* @type {boolean}
* @readonly
- *
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -337,12 +323,9 @@ function Cesium3DTile(tileset, baseResource, header, parent) {
/**
* When true
, the tile has multiple contents, either in the tile JSON (3D Tiles 1.1)
* or via the 3DTILES_multiple_contents
extension.
- *
* @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_multiple_contents|3DTILES_multiple_contents extension}
- *
* @type {boolean}
* @readonly
- *
* @private
*/
this.hasMultipleContents = hasMultipleContents;
@@ -351,10 +334,8 @@ function Cesium3DTile(tileset, baseResource, header, parent) {
* The node in the tileset's LRU cache, used to determine when to unload a tile's content.
*
* See {@link Cesium3DTilesetCache}
- *
* @type {DoublyLinkedListNode}
* @readonly
- *
* @private
*/
this.cacheNode = undefined;
@@ -371,32 +352,26 @@ function Cesium3DTile(tileset, baseResource, header, parent) {
/**
* The time in seconds after the tile's content is ready when the content expires and new content is requested.
- *
* @type {number}
*/
this.expireDuration = expireDuration;
/**
* The date when the content expires and new content is requested.
- *
* @type {JulianDate}
*/
this.expireDate = expireDate;
/**
* The time when a style was last applied to this tile.
- *
* @type {number}
- *
* @private
*/
this.lastStyleTime = 0.0;
/**
* Marks whether the tile's children bounds are fully contained within the tile's bounds
- *
* @type {Cesium3DTileOptimizationHint}
- *
* @private
*/
this._optimChildrenWithinParent = Cesium3DTileOptimizationHint.NOT_COMPUTED;
@@ -404,9 +379,7 @@ function Cesium3DTile(tileset, baseResource, header, parent) {
/**
* Tracks if the tile's relationship with a ClippingPlaneCollection has changed with regards
* to the ClippingPlaneCollection's state.
- *
* @type {boolean}
- *
* @private
*/
this.clippingPlanesDirty = false;
@@ -414,9 +387,7 @@ function Cesium3DTile(tileset, baseResource, header, parent) {
/**
* Tracks if the tile's relationship with a ClippingPolygonCollection has changed with regards
* to the ClippingPolygonCollection's state.
- *
* @type {boolean}
- *
* @private
*/
this.clippingPolygonsDirty = false;
@@ -424,9 +395,7 @@ function Cesium3DTile(tileset, baseResource, header, parent) {
/**
* Tracks if the tile's request should be deferred until all non-deferred
* tiles load.
- *
* @type {boolean}
- *
* @private
*/
this.priorityDeferred = false;
@@ -436,9 +405,7 @@ function Cesium3DTile(tileset, baseResource, header, parent) {
* placeholder tile with either implicit tiling in the JSON (3D Tiles 1.1)
* or the 3DTILES_implicit_tiling
extension.
* This way the {@link Implicit3DTileContent} can access the tile later once the content is fetched.
- *
* @type {ImplicitTileset|undefined}
- *
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -447,9 +414,7 @@ function Cesium3DTile(tileset, baseResource, header, parent) {
/**
* For implicit tiling, the (level, x, y, [z]) coordinates within the
* implicit tileset are stored in the tile.
- *
* @type {ImplicitTileCoordinates|undefined}
- *
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -458,9 +423,7 @@ function Cesium3DTile(tileset, baseResource, header, parent) {
/**
* For implicit tiling, each transcoded tile will hold a weak reference to
* the {@link ImplicitSubtree}.
- *
* @type {ImplicitSubtree|undefined}
- *
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -524,9 +487,7 @@ Cesium3DTile._deprecationWarning = deprecationWarning;
Object.defineProperties(Cesium3DTile.prototype, {
/**
* The tileset containing this tile.
- *
* @memberof Cesium3DTile.prototype
- *
* @type {Cesium3DTileset}
* @readonly
*/
@@ -539,9 +500,7 @@ Object.defineProperties(Cesium3DTile.prototype, {
/**
* The tile's content. This represents the actual tile's payload,
* not the content's metadata in the tileset JSON file.
- *
* @memberof Cesium3DTile.prototype
- *
* @type {Cesium3DTileContent}
* @readonly
*/
@@ -553,9 +512,7 @@ Object.defineProperties(Cesium3DTile.prototype, {
/**
* Get the tile's bounding volume.
- *
* @memberof Cesium3DTile.prototype
- *
* @type {TileBoundingVolume}
* @readonly
* @private
@@ -570,9 +527,7 @@ Object.defineProperties(Cesium3DTile.prototype, {
* Get the bounding volume of the tile's contents. This defaults to the
* tile's bounding volume when the content's bounding volume is
* undefined
.
- *
* @memberof Cesium3DTile.prototype
- *
* @type {TileBoundingVolume}
* @readonly
* @private
@@ -585,9 +540,7 @@ Object.defineProperties(Cesium3DTile.prototype, {
/**
* Get the bounding sphere derived from the tile's bounding volume.
- *
* @memberof Cesium3DTile.prototype
- *
* @type {BoundingSphere}
* @readonly
*/
@@ -599,12 +552,9 @@ Object.defineProperties(Cesium3DTile.prototype, {
/**
* Determines if the tile is visible within the current field of view
- *
* @memberof Cesium3DTile.prototype
- *
* @type {boolean}
* @readonly
- *
* @private
*/
isVisible: {
@@ -616,9 +566,7 @@ Object.defineProperties(Cesium3DTile.prototype, {
/**
* Returns the extras
property in the tileset JSON for this tile, which contains application specific metadata.
* Returns undefined
if extras
does not exist.
- *
* @memberof Cesium3DTile.prototype
- *
* @type {object}
* @readonly
* @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification#specifying-extensions-and-application-specific-extras|Extras in the 3D Tiles specification.}
@@ -631,13 +579,9 @@ Object.defineProperties(Cesium3DTile.prototype, {
/**
* Gets or sets the tile's highlight color.
- *
* @memberof Cesium3DTile.prototype
- *
* @type {Color}
- *
* @default {@link Color.WHITE}
- *
* @private
*/
color: {
@@ -656,12 +600,9 @@ Object.defineProperties(Cesium3DTile.prototype, {
/**
* Determines if the tile's content is renderable. false
if the
* tile has empty content or if it points to an external tileset or implicit content
- *
* @memberof Cesium3DTile.prototype
- *
* @type {boolean}
* @readonly
- *
* @private
*/
hasRenderableContent: {
@@ -678,12 +619,9 @@ Object.defineProperties(Cesium3DTile.prototype, {
* Determines if the tile has available content to render. true
if the tile's
* content is ready or if it has expired content that renders while new content loads; otherwise,
* false
.
- *
* @memberof Cesium3DTile.prototype
- *
* @type {boolean}
* @readonly
- *
* @private
*/
contentAvailable: {
@@ -698,12 +636,9 @@ Object.defineProperties(Cesium3DTile.prototype, {
/**
* Determines if the tile's content is ready. This is automatically true
for
* tile's with empty content.
- *
* @memberof Cesium3DTile.prototype
- *
* @type {boolean}
* @readonly
- *
* @private
*/
contentReady: {
@@ -715,12 +650,9 @@ Object.defineProperties(Cesium3DTile.prototype, {
/**
* Determines if the tile's content has not be requested. true
if tile's
* content has not be requested; otherwise, false
.
- *
* @memberof Cesium3DTile.prototype
- *
* @type {boolean}
* @readonly
- *
* @private
*/
contentUnloaded: {
@@ -731,12 +663,9 @@ Object.defineProperties(Cesium3DTile.prototype, {
/**
* Determines if the tile has renderable content which is unloaded
- *
* @memberof Cesium3DTile.prototype
- *
* @type {boolean}
* @readonly
- *
* @private
*/
hasUnloadedRenderableContent: {
@@ -748,12 +677,9 @@ Object.defineProperties(Cesium3DTile.prototype, {
/**
* Determines if the tile's content is expired. true
if tile's
* content is expired; otherwise, false
.
- *
* @memberof Cesium3DTile.prototype
- *
* @type {boolean}
* @readonly
- *
* @private
*/
contentExpired: {
@@ -765,12 +691,9 @@ Object.defineProperties(Cesium3DTile.prototype, {
/**
* Determines if the tile's content failed to load. true
if the tile's
* content failed to load; otherwise, false
.
- *
* @memberof Cesium3DTile.prototype
- *
* @type {boolean}
* @readonly
- *
* @private
*/
contentFailed: {
@@ -781,9 +704,7 @@ Object.defineProperties(Cesium3DTile.prototype, {
/**
* Returns the number of draw commands used by this tile.
- *
* @readonly
- *
* @private
*/
commandsLength: {
@@ -799,7 +720,7 @@ const scratchCartesian = new Cartesian3();
* @private
* @param {Cesium3DTile} tile
* @param {FrameState} frameState
- * @returns {Boolean}
+ * @returns {boolean}
*/
function isPriorityDeferred(tile, frameState) {
const { tileset, boundingSphere } = tile;
@@ -906,10 +827,9 @@ const scratchJulianDate = new JulianDate();
/**
* Get the tile's screen space error.
- *
* @private
* @param {FrameState} frameState
- * @param {Boolean} useParentGeometricError
+ * @param {boolean} useParentGeometricError
* @param {number} progressiveResolutionHeightFraction
*/
Cesium3DTile.prototype.getScreenSpaceError = function (
@@ -968,7 +888,7 @@ Cesium3DTile.prototype.getScreenSpaceError = function (
* @private
* @param {Cesium3DTileset} tileset
* @param {Cesium3DTile} tile
- * @returns {Boolean}
+ * @returns {boolean}
*/
function isPriorityProgressiveResolution(tileset, tile) {
if (
@@ -1018,7 +938,6 @@ function getPriorityReverseScreenSpaceError(tileset, tile) {
/**
* Update the tile's visibility.
- *
* @private
* @param {FrameState} frameState
*/
@@ -1065,7 +984,6 @@ Cesium3DTile.prototype.updateVisibility = function (frameState) {
/**
* Update whether the tile has expired.
- *
* @private
*/
Cesium3DTile.prototype.updateExpiration = function () {
@@ -1123,8 +1041,7 @@ function createPriorityFunction(tile) {
*
* The request may not be made if the Cesium Request Scheduler can't prioritize it.
*
- *
- * @return {Promise|undefined} A promise that resolves when the request completes, or undefined if there is no request needed, or the request cannot be scheduled.
+ * @returns {Promise|undefined} A promise that resolves when the request completes, or undefined if there is no request needed, or the request cannot be scheduled.
* @private
*/
Cesium3DTile.prototype.requestContent = function () {
@@ -1149,7 +1066,6 @@ Cesium3DTile.prototype.requestContent = function () {
* support tile expiry like requestSingleContent does. If this changes,
* note that the resource.setQueryParameters() details must go inside {@link Multiple3DTileContent} since that is per-request.
*
- *
* @private
* @param {Cesium3DTile} tile
* @returns {Promise|Promise|undefined} A promise that resolves to the tile content once loaded, or a promise that resolves to undefined if the request was cancelled mid-flight, or undefined if the request cannot be scheduled this frame
@@ -1325,10 +1241,9 @@ function requestSingleContent(tile) {
*
* This is only used for single contents.
*
- *
* @param {Cesium3DTile} tile The tile
* @param {ArrayBuffer} arrayBuffer The downloaded payload containing data for the content
- * @return {Promise} A content object
+ * @returns {Promise} A content object
* @private
*/
async function makeContent(tile, arrayBuffer) {
@@ -1403,7 +1318,6 @@ async function makeContent(tile, arrayBuffer) {
/**
* Cancel requests for the tile's contents. This is called when the tile
* goes out of view.
- *
* @private
*/
Cesium3DTile.prototype.cancelRequests = function () {
@@ -1416,7 +1330,6 @@ Cesium3DTile.prototype.cancelRequests = function () {
/**
* Unloads the tile's content.
- *
* @private
*/
Cesium3DTile.prototype.unloadContent = function () {
@@ -1503,11 +1416,9 @@ function getContentBoundingVolume(tile, frameState) {
/**
* Determines whether the tile's bounding volume intersects the culling volume.
- *
* @param {FrameState} frameState The frame state.
* @param {number} parentVisibilityPlaneMask The parent's plane mask to speed up the visibility check.
* @returns {number} A plane mask as described above in {@link CullingVolume#computeVisibilityWithPlaneMask}.
- *
* @private
*/
Cesium3DTile.prototype.visibility = function (
@@ -1550,10 +1461,8 @@ Cesium3DTile.prototype.visibility = function (
/**
* Assuming the tile's bounding volume intersects the culling volume, determines
* whether the tile's content's bounding volume intersects the culling volume.
- *
* @param {FrameState} frameState The frame state.
* @returns {Intersect} The result of the intersection: the tile's content is completely outside, completely inside, or intersecting the culling volume.
- *
* @private
*/
Cesium3DTile.prototype.contentVisibility = function (frameState) {
@@ -1603,10 +1512,8 @@ Cesium3DTile.prototype.contentVisibility = function (frameState) {
/**
* Computes the (potentially approximate) distance from the closest point of the tile's bounding volume to the camera.
- *
* @param {FrameState} frameState The frame state.
* @returns {number} The distance, in meters, or zero if the camera is inside the bounding volume.
- *
* @private
*/
Cesium3DTile.prototype.distanceToTile = function (frameState) {
@@ -1618,10 +1525,8 @@ const scratchToTileCenter = new Cartesian3();
/**
* Computes the distance from the center of the tile's bounding volume to the camera's plane defined by its position and view direction.
- *
* @param {FrameState} frameState The frame state.
* @returns {number} The distance, in meters.
- *
* @private
*/
Cesium3DTile.prototype.distanceToTileCenter = function (frameState) {
@@ -1637,10 +1542,8 @@ Cesium3DTile.prototype.distanceToTileCenter = function (frameState) {
/**
* Checks if the camera is inside the viewer request volume.
- *
* @param {FrameState} frameState The frame state.
* @returns {boolean} Whether the camera is inside the volume.
- *
* @private
*/
Cesium3DTile.prototype.insideViewerRequestVolume = function (frameState) {
@@ -1800,13 +1703,10 @@ function createSphere(sphere, transform, result) {
/**
* Create a bounding volume from the tile's bounding volume header.
- *
* @param {object} boundingVolumeHeader The tile's bounding volume header.
* @param {Matrix4} transform The transform to apply to the bounding volume.
* @param {TileBoundingVolume} [result] The object onto which to store the result.
- *
* @returns {TileBoundingVolume} The modified result parameter or a new TileBoundingVolume instance if none was provided.
- *
* @private
*/
Cesium3DTile.prototype.createBoundingVolume = function (
@@ -1908,7 +1808,6 @@ const scratchExaggeratedCorners = Cartesian3.unpackArray(
/**
* Exaggerates the bounding box of a tile based on the provided exaggeration factors.
- *
* @private
* @param {TileOrientedBoundingBox} tileOrientedBoundingBox - The oriented bounding box of the tile.
* @param {number} exaggeration - The exaggeration factor to apply to the tile's bounding box.
@@ -1942,7 +1841,6 @@ function exaggerateBoundingBox(
/**
* Update the tile's transform. The transform is applied to the tile's bounding volumes.
- *
* @private
* @param {Matrix4} parentTransform
* @param {FrameState} [frameState]
@@ -2165,10 +2063,9 @@ function updateContent(tile, tileset, frameState) {
/**
* Compute and compare ClippingPlanes state:
- * - enabled-ness - are clipping planes enabled? is this tile clipped?
- * - clipping plane count
- * - clipping function (union v. intersection)
-
+ * - enabled-ness - are clipping planes enabled? is this tile clipped?
+ * - clipping plane count
+ * - clipping function (union v. intersection)
* @private
* @param {Cesium3DTile} tile
* @param {Cesium3DTileset} tileset
@@ -2188,10 +2085,9 @@ function updateClippingPlanes(tile, tileset) {
/**
* Compute and compare ClippingPolygons state:
- * - enabled-ness - are clipping polygons enabled? is this tile clipped?
- * - clipping polygon count & position count
- * - clipping function (inverse)
-
+ * - enabled-ness - are clipping polygons enabled? is this tile clipped?
+ * - clipping polygon count & position count
+ * - clipping function (inverse)
* @private
* @param {Cesium3DTile} tile
* @param {Cesium3DTileset} tileset
@@ -2215,7 +2111,6 @@ function updateClippingPolygons(tile, tileset) {
/**
* Get the draw commands needed to render this tile.
- *
* @private
* @param {Cesium3DTileset} tileset
* @param {FrameState} frameState
@@ -2247,10 +2142,8 @@ const scratchCommandList = [];
/**
* Processes the tile's content, e.g., create WebGL resources, to move from the PROCESSING to READY state.
- *
* @param {Cesium3DTileset} tileset The tileset containing this tile.
* @param {FrameState} frameState The frame state.
- *
* @private
*/
Cesium3DTile.prototype.process = function (tileset, frameState) {
diff --git a/packages/engine/Source/Scene/Cesium3DTileBatchTable.js b/packages/engine/Source/Scene/Cesium3DTileBatchTable.js
index b9a678cdd8c5..798ade743345 100644
--- a/packages/engine/Source/Scene/Cesium3DTileBatchTable.js
+++ b/packages/engine/Source/Scene/Cesium3DTileBatchTable.js
@@ -29,8 +29,13 @@ const DEFAULT_COLOR_VALUE = BatchTexture.DEFAULT_COLOR_VALUE;
const DEFAULT_SHOW_VALUE = BatchTexture.DEFAULT_SHOW_VALUE;
/**
+ * @param content
+ * @param featuresLength
+ * @param batchTableJson
+ * @param batchTableBinary
+ * @param colorChangedCallback
* @private
- * @constructor
+ * @class
*/
function Cesium3DTileBatchTable(
content,
@@ -86,7 +91,6 @@ Object.defineProperties(Cesium3DTileBatchTable.prototype, {
/**
* Size of the batch table, including the batch table hierarchy's binary
* buffers and any binary properties. JSON data is not counted.
- *
* @memberof Cesium3DTileBatchTable.prototype
* @type {number}
* @readonly
@@ -386,6 +390,8 @@ Cesium3DTileBatchTable.prototype.getPropertyIds = function (batchId, results) {
};
/**
+ * @param batchId
+ * @param name
* @private
*/
Cesium3DTileBatchTable.prototype.getPropertyBySemantic = function (
diff --git a/packages/engine/Source/Scene/Cesium3DTileColorBlendMode.js b/packages/engine/Source/Scene/Cesium3DTileColorBlendMode.js
index 8ae81db8e3de..b953c5905233 100644
--- a/packages/engine/Source/Scene/Cesium3DTileColorBlendMode.js
+++ b/packages/engine/Source/Scene/Cesium3DTileColorBlendMode.js
@@ -11,23 +11,21 @@
*
*
* "techniques": {
- * "technique0": {
- * "parameters": {
- * "diffuse": {
- * "semantic": "_3DTILESDIFFUSE",
- * "type": 35666
- * }
- * }
- * }
+ * "technique0": {
+ * "parameters": {
+ * "diffuse": {
+ * "semantic": "_3DTILESDIFFUSE",
+ * "type": 35666
+ * }
+ * }
+ * }
* }
*
- *
* @enum {number}
*/
const Cesium3DTileColorBlendMode = {
/**
* Multiplies the source color by the feature color.
- *
* @type {number}
* @constant
*/
@@ -35,7 +33,6 @@ const Cesium3DTileColorBlendMode = {
/**
* Replaces the source color with the feature color.
- *
* @type {number}
* @constant
*/
@@ -43,7 +40,6 @@ const Cesium3DTileColorBlendMode = {
/**
* Blends the source color and feature color together.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Scene/Cesium3DTileContent.js b/packages/engine/Source/Scene/Cesium3DTileContent.js
index 945242881b42..a30b17539859 100644
--- a/packages/engine/Source/Scene/Cesium3DTileContent.js
+++ b/packages/engine/Source/Scene/Cesium3DTileContent.js
@@ -9,9 +9,8 @@ import DeveloperError from "../Core/DeveloperError.js";
*
* This type describes an interface and is not intended to be instantiated directly.
*
- *
* @alias Cesium3DTileContent
- * @constructor
+ * @class
*/
function Cesium3DTileContent() {
/**
@@ -21,9 +20,7 @@ function Cesium3DTileContent() {
* This is used to implement the Cesium3DTileContent
interface, but is
* not part of the public Cesium API.
*
- *
* @type {boolean}
- *
* @private
*/
this.featurePropertiesDirty = false;
@@ -32,9 +29,7 @@ function Cesium3DTileContent() {
Object.defineProperties(Cesium3DTileContent.prototype, {
/**
* Gets the number of features in the tile.
- *
* @memberof Cesium3DTileContent.prototype
- *
* @type {number}
* @readonly
*/
@@ -51,11 +46,8 @@ Object.defineProperties(Cesium3DTileContent.prototype, {
* Only applicable for tiles with Point Cloud content. This is different than {@link Cesium3DTileContent#featuresLength} which
* equals the number of groups of points as distinguished by the BATCH_ID
feature table semantic.
*
- *
* @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/PointCloud#batched-points}
- *
* @memberof Cesium3DTileContent.prototype
- *
* @type {number}
* @readonly
*/
@@ -68,9 +60,7 @@ Object.defineProperties(Cesium3DTileContent.prototype, {
/**
* Gets the number of triangles in the tile.
- *
* @memberof Cesium3DTileContent.prototype
- *
* @type {number}
* @readonly
*/
@@ -83,9 +73,7 @@ Object.defineProperties(Cesium3DTileContent.prototype, {
/**
* Gets the tile's geometry memory in bytes.
- *
* @memberof Cesium3DTileContent.prototype
- *
* @type {number}
* @readonly
*/
@@ -98,9 +86,7 @@ Object.defineProperties(Cesium3DTileContent.prototype, {
/**
* Gets the tile's texture memory in bytes.
- *
* @memberof Cesium3DTileContent.prototype
- *
* @type {number}
* @readonly
*/
@@ -115,9 +101,7 @@ Object.defineProperties(Cesium3DTileContent.prototype, {
* Gets the amount of memory used by the batch table textures and any binary
* metadata properties not accounted for in geometryByteLength or
* texturesByteLength
- *
* @memberof Cesium3DTileContent.prototype
- *
* @type {number}
* @readonly
*/
@@ -130,11 +114,8 @@ Object.defineProperties(Cesium3DTileContent.prototype, {
/**
* Gets the array of {@link Cesium3DTileContent} objects for contents that contain other contents, such as composite tiles. The inner contents may in turn have inner contents, such as a composite tile that contains a composite tile.
- *
* @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/Composite|Composite specification}
- *
* @memberof Cesium3DTileContent.prototype
- *
* @type {Array}
* @readonly
*/
@@ -147,9 +128,7 @@ Object.defineProperties(Cesium3DTileContent.prototype, {
/**
* Returns true when the tile's content is ready to render; otherwise false
- *
* @memberof Cesium3DTileContent.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -162,9 +141,7 @@ Object.defineProperties(Cesium3DTileContent.prototype, {
/**
* Gets the tileset for this tile.
- *
* @memberof Cesium3DTileContent.prototype
- *
* @type {Cesium3DTileset}
* @readonly
*/
@@ -177,9 +154,7 @@ Object.defineProperties(Cesium3DTileContent.prototype, {
/**
* Gets the tile containing this content.
- *
* @memberof Cesium3DTileContent.prototype
- *
* @type {Cesium3DTile}
* @readonly
*/
@@ -193,7 +168,6 @@ Object.defineProperties(Cesium3DTileContent.prototype, {
/**
* Gets the url of the tile's content.
* @memberof Cesium3DTileContent.prototype
- *
* @type {string}
* @readonly
*/
@@ -210,10 +184,8 @@ Object.defineProperties(Cesium3DTileContent.prototype, {
* This is used to implement the Cesium3DTileContent
interface, but is
* not part of the public Cesium API.
*
- *
* @type {Cesium3DTileBatchTable}
* @readonly
- *
* @private
*/
batchTable: {
@@ -230,9 +202,7 @@ Object.defineProperties(Cesium3DTileContent.prototype, {
* This is used to implement the Cesium3DTileContent
interface, but is
* not part of the public Cesium API.
*
- *
* @type {ImplicitMetadataView|undefined}
- *
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -254,9 +224,7 @@ Object.defineProperties(Cesium3DTileContent.prototype, {
* This is used to implement the Cesium3DTileContent
interface, but is
* not part of the public Cesium API.
*
- *
* @type {Cesium3DTileContentGroup|undefined}
- *
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -273,7 +241,6 @@ Object.defineProperties(Cesium3DTileContent.prototype, {
/**
* Returns whether the feature has this property.
- *
* @param {number} batchId The batchId for the feature.
* @param {string} name The case-sensitive name of the property.
* @returns {boolean} true
if the feature has this property; otherwise, false
.
@@ -289,30 +256,26 @@ Cesium3DTileContent.prototype.hasProperty = function (batchId, name) {
*
* Features in a tile are ordered by batchId
, an index used to retrieve their metadata from the batch table.
*
- *
* @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/BatchTable}.
- *
* @param {number} batchId The batchId for the feature.
* @returns {Cesium3DTileFeature} The corresponding {@link Cesium3DTileFeature} object.
- *
- * @exception {DeveloperError} batchId must be between zero and {@link Cesium3DTileContent#featuresLength} - 1.
+ * @throws {DeveloperError} batchId must be between zero and {@link Cesium3DTileContent#featuresLength} - 1.
*/
Cesium3DTileContent.prototype.getFeature = function (batchId) {
DeveloperError.throwInstantiationError();
};
/**
- * Called when {@link Cesium3DTileset#debugColorizeTiles} changes.
- *
- * This is used to implement the Cesium3DTileContent
interface, but is
- * not part of the public Cesium API.
- *
- *
- * @param {boolean} enabled Whether to enable or disable debug settings.
- * @returns {Cesium3DTileFeature} The corresponding {@link Cesium3DTileFeature} object.
-
- * @private
- */
+ * Called when {@link Cesium3DTileset#debugColorizeTiles} changes.
+ *
+ * This is used to implement the Cesium3DTileContent
interface, but is
+ * not part of the public Cesium API.
+ *
+ * @param {boolean} enabled Whether to enable or disable debug settings.
+ * @param color
+ * @returns {Cesium3DTileFeature} The corresponding {@link Cesium3DTileFeature} object.
+ * @private
+ */
Cesium3DTileContent.prototype.applyDebugSettings = function (enabled, color) {
DeveloperError.throwInstantiationError();
};
@@ -323,9 +286,7 @@ Cesium3DTileContent.prototype.applyDebugSettings = function (enabled, color) {
* This is used to implement the Cesium3DTileContent
interface, but is
* not part of the public Cesium API.
*
- *
* @param {Cesium3DTileStyle} style The style.
- *
* @private
*/
Cesium3DTileContent.prototype.applyStyle = function (style) {
@@ -340,10 +301,8 @@ Cesium3DTileContent.prototype.applyStyle = function (style) {
* This is used to implement the Cesium3DTileContent
interface, but is
* not part of the public Cesium API.
*
- *
* @param {Cesium3DTileset} tileset The tileset containing this tile.
* @param {FrameState} frameState The frame state.
- *
* @private
*/
Cesium3DTileContent.prototype.update = function (tileset, frameState) {
@@ -352,12 +311,10 @@ Cesium3DTileContent.prototype.update = function (tileset, frameState) {
/**
* Find an intersection between a ray and the tile content surface that was rendered. The ray must be given in world coordinates.
- *
* @param {Ray} ray The ray to test for intersection.
* @param {FrameState} frameState The frame state.
* @param {Cartesian3|undefined} [result] The intersection or undefined
if none was found.
* @returns {Cartesian3|undefined} The intersection or undefined
if none was found.
- *
* @private
*/
Cesium3DTileContent.prototype.pick = function (ray, frameState, result) {
@@ -373,11 +330,8 @@ Cesium3DTileContent.prototype.pick = function (ray, frameState, result) {
* This is used to implement the Cesium3DTileContent
interface, but is
* not part of the public Cesium API.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see Cesium3DTileContent#destroy
- *
* @private
*/
Cesium3DTileContent.prototype.isDestroyed = function () {
@@ -395,14 +349,10 @@ Cesium3DTileContent.prototype.isDestroyed = function () {
* This is used to implement the Cesium3DTileContent
interface, but is
* not part of the public Cesium API.
*
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* content = content && content.destroy();
- *
* @see Cesium3DTileContent#isDestroyed
- *
* @private
*/
Cesium3DTileContent.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/Cesium3DTileContentFactory.js b/packages/engine/Source/Scene/Cesium3DTileContentFactory.js
index 281235e37778..dcf2cf3996f0 100644
--- a/packages/engine/Source/Scene/Cesium3DTileContentFactory.js
+++ b/packages/engine/Source/Scene/Cesium3DTileContentFactory.js
@@ -8,7 +8,6 @@ import RuntimeError from "../Core/RuntimeError.js";
/**
* Maps a tile's magic field in its header to a new content object for the tile's payload.
- *
* @private
*/
const Cesium3DTileContentFactory = {
diff --git a/packages/engine/Source/Scene/Cesium3DTileContentType.js b/packages/engine/Source/Scene/Cesium3DTileContentType.js
index 8167d13e7583..65e2ff8f90dc 100644
--- a/packages/engine/Source/Scene/Cesium3DTileContentType.js
+++ b/packages/engine/Source/Scene/Cesium3DTileContentType.js
@@ -3,17 +3,14 @@
* For binary files, the enum value is the magic number of the binary file
* unless otherwise noted. For JSON files, the enum value is a unique name
* for internal use.
- *
* @enum {string}
* @see Cesium3DTileContent
- *
* @private
*/
const Cesium3DTileContentType = {
/**
* A Batched 3D Model. This is a binary format with
* magic number b3dm
- *
* @type {string}
* @constant
* @private
@@ -22,7 +19,6 @@ const Cesium3DTileContentType = {
/**
* An Instanced 3D Model. This is a binary format with magic number
* i3dm
- *
* @type {string}
* @constant
* @private
@@ -31,7 +27,6 @@ const Cesium3DTileContentType = {
/**
* A Composite model. This is a binary format with magic number
* cmpt
- *
* @type {string}
* @constant
* @private
@@ -40,7 +35,6 @@ const Cesium3DTileContentType = {
/**
* A Point Cloud model. This is a binary format with magic number
* pnts
- *
* @type {string}
* @constant
* @private
@@ -49,7 +43,6 @@ const Cesium3DTileContentType = {
/**
* Vector tiles. This is a binary format with magic number
* vctr
- *
* @type {string}
* @constant
* @private
@@ -58,7 +51,6 @@ const Cesium3DTileContentType = {
/**
* Geometry tiles. This is a binary format with magic number
* geom
- *
* @type {string}
* @constant
* @private
@@ -67,7 +59,6 @@ const Cesium3DTileContentType = {
/**
* A glTF model in JSON + external BIN form. This is treated
* as a JSON format.
- *
* @type {string}
* @constant
* @private
@@ -78,7 +69,6 @@ const Cesium3DTileContentType = {
* The binary form of a glTF file. Internally, the magic number is
* changed from glTF
to glb
to distinguish it from
* the JSON glTF format.
- *
* @type {string}
* @constant
* @private
@@ -88,7 +78,6 @@ const Cesium3DTileContentType = {
/**
* For implicit tiling, availability bitstreams are stored in binary subtree files.
* The magic number is subt
- *
* @type {string}
* @constant
* @private
@@ -97,7 +86,6 @@ const Cesium3DTileContentType = {
IMPLICIT_SUBTREE: "subt",
/**
* For implicit tiling. Subtrees can also be represented as JSON files.
- *
* @type {string}
* @constant
* @private
@@ -107,7 +95,6 @@ const Cesium3DTileContentType = {
/**
* Contents can reference another tileset.json to use
* as an external tileset. This is a JSON-based format.
- *
* @type {string}
* @constant
* @private
@@ -116,7 +103,6 @@ const Cesium3DTileContentType = {
/**
* Multiple contents are handled separately from the other content types
* due to differences in request scheduling.
- *
* @type {string}
* @constant
* @private
@@ -125,7 +111,6 @@ const Cesium3DTileContentType = {
MULTIPLE_CONTENT: "multipleContent",
/**
* GeoJSON content for MAXAR_content_geojson
extension.
- *
* @type {string}
* @constant
* @private
@@ -134,7 +119,6 @@ const Cesium3DTileContentType = {
GEOJSON: "geoJson",
/**
* Binary voxel content for 3DTILES_content_voxels
extension.
- *
* @type {string}
* @constant
* @private
@@ -143,7 +127,6 @@ const Cesium3DTileContentType = {
VOXEL_BINARY: "voxl",
/**
* Binary voxel content for 3DTILES_content_voxels
extension.
- *
* @type {string}
* @constant
* @private
@@ -156,7 +139,7 @@ const Cesium3DTileContentType = {
* Check if a content is one of the supported binary formats. Otherwise,
* the caller can assume a JSON format.
* @param {Cesium3DTileContentType} contentType The content type of the content payload.
- * @return {boolean} true
if the content type is a binary format, or false
if the content type is a JSON format.
+ * @returns {boolean} true
if the content type is a binary format, or false
if the content type is a JSON format.
* @private
*/
Cesium3DTileContentType.isBinaryFormat = function (contentType) {
diff --git a/packages/engine/Source/Scene/Cesium3DTileFeature.js b/packages/engine/Source/Scene/Cesium3DTileFeature.js
index 49d3dd06e1c8..c765e4690614 100644
--- a/packages/engine/Source/Scene/Cesium3DTileFeature.js
+++ b/packages/engine/Source/Scene/Cesium3DTileFeature.js
@@ -18,10 +18,10 @@ import defined from "../Core/defined.js";
* Do not construct this directly. Access it through {@link Cesium3DTileContent#getFeature}
* or picking using {@link Scene#pick}.
*
- *
+ * @param content
+ * @param batchId
* @alias Cesium3DTileFeature
- * @constructor
- *
+ * @class
* @example
* // On mouse over, display all the properties for a feature in the console log.
* handler.setInputAction(function(movement) {
@@ -46,11 +46,8 @@ Object.defineProperties(Cesium3DTileFeature.prototype, {
/**
* Gets or sets if the feature will be shown. This is set for all features
* when a style's show is evaluated.
- *
* @memberof Cesium3DTileFeature.prototype
- *
* @type {boolean}
- *
* @default true
*/
show: {
@@ -66,11 +63,8 @@ Object.defineProperties(Cesium3DTileFeature.prototype, {
* Gets or sets the highlight color multiplied with the feature's color. When
* this is white, the feature's color is not changed. This is set for all features
* when a style's color is evaluated.
- *
* @memberof Cesium3DTileFeature.prototype
- *
* @type {Color}
- *
* @default {@link Color.WHITE}
*/
color: {
@@ -89,11 +83,8 @@ Object.defineProperties(Cesium3DTileFeature.prototype, {
* Gets a typed array containing the ECEF positions of the polyline.
* Returns undefined if {@link Cesium3DTileset#vectorKeepDecodedPositions} is false
* or the feature is not a polyline in a vector tile.
- *
* @memberof Cesium3DTileFeature.prototype
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @type {Float64Array}
*/
polylinePositions: {
@@ -108,11 +99,8 @@ Object.defineProperties(Cesium3DTileFeature.prototype, {
/**
* Gets the content of the tile containing the feature.
- *
* @memberof Cesium3DTileFeature.prototype
- *
* @type {Cesium3DTileContent}
- *
* @readonly
* @private
*/
@@ -124,11 +112,8 @@ Object.defineProperties(Cesium3DTileFeature.prototype, {
/**
* Gets the tileset containing the feature.
- *
* @memberof Cesium3DTileFeature.prototype
- *
* @type {Cesium3DTileset}
- *
* @readonly
*/
tileset: {
@@ -140,11 +125,8 @@ Object.defineProperties(Cesium3DTileFeature.prototype, {
/**
* All objects returned by {@link Scene#pick} have a primitive
property. This returns
* the tileset containing the feature.
- *
* @memberof Cesium3DTileFeature.prototype
- *
* @type {Cesium3DTileset}
- *
* @readonly
*/
primitive: {
@@ -157,11 +139,8 @@ Object.defineProperties(Cesium3DTileFeature.prototype, {
* Get the feature ID associated with this feature. For 3D Tiles 1.0, the
* batch ID is returned. For EXT_mesh_features, this is the feature ID from
* the selected feature ID set.
- *
* @memberof Cesium3DTileFeature.prototype
- *
* @type {number}
- *
* @readonly
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -184,9 +163,7 @@ Object.defineProperties(Cesium3DTileFeature.prototype, {
/**
* Returns whether the feature contains this property. This includes properties from this feature's
* class and inherited classes when using a batch table hierarchy.
- *
* @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_batch_table_hierarchy}
- *
* @param {string} name The case-sensitive name of the property.
* @returns {boolean} Whether the feature contains this property.
*/
@@ -197,9 +174,7 @@ Cesium3DTileFeature.prototype.hasProperty = function (name) {
/**
* Returns an array of property IDs for the feature. This includes properties from this feature's
* class and inherited classes when using a batch table hierarchy.
- *
* @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_batch_table_hierarchy}
- *
* @param {string[]} [results] An array into which to store the results.
* @returns {string[]} The IDs of the feature's properties.
*/
@@ -210,12 +185,9 @@ Cesium3DTileFeature.prototype.getPropertyIds = function (results) {
/**
* Returns a copy of the value of the feature's property with the given name. This includes properties from this feature's
* class and inherited classes when using a batch table hierarchy.
- *
* @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_batch_table_hierarchy}
- *
* @param {string} name The case-sensitive name of the property.
* @returns {*} The value of the property or undefined
if the feature does not have this property.
- *
* @example
* // Display all the properties for a feature in the console log.
* const propertyIds = feature.getPropertyIds();
@@ -238,31 +210,29 @@ Cesium3DTileFeature.prototype.getProperty = function (name) {
* first match is returned. Metadata is checked in this order:
*
*
- * Batch table (structural metadata) property by semantic
- * Batch table (structural metadata) property by property ID
- * Content metadata property by semantic
- * Content metadata property by property
- * Tile metadata property by semantic
- * Tile metadata property by property ID
- * Subtree metadata property by semantic
- * Subtree metadata property by property ID
- * Group metadata property by semantic
- * Group metadata property by property ID
- * Tileset metadata property by semantic
- * Tileset metadata property by property ID
- * Otherwise, return undefined
+ * Batch table (structural metadata) property by semantic
+ * Batch table (structural metadata) property by property ID
+ * Content metadata property by semantic
+ * Content metadata property by property
+ * Tile metadata property by semantic
+ * Tile metadata property by property ID
+ * Subtree metadata property by semantic
+ * Subtree metadata property by property ID
+ * Group metadata property by semantic
+ * Group metadata property by property ID
+ * Tileset metadata property by semantic
+ * Tileset metadata property by property ID
+ * Otherwise, return undefined
*
*
* For 3D Tiles Next details, see the {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_metadata|3DTILES_metadata Extension}
* for 3D Tiles, as well as the {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_structural_metadata|EXT_structural_metadata Extension}
* for glTF. For the legacy glTF extension, see {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata|EXT_feature_metadata Extension}
*
- *
* @param {Cesium3DTileContent} content The content for accessing the metadata
* @param {number} batchId The batch ID (or feature ID) of the feature to get a property for
* @param {string} name The semantic or property ID of the feature. Semantics are checked before property IDs in each granularity of metadata.
- * @return {*} The value of the property or undefined
if the feature does not have this property.
- *
+ * @returns {*} The value of the property or undefined
if the feature does not have this property.
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
Cesium3DTileFeature.getPropertyInherited = function (content, batchId, name) {
@@ -370,15 +340,11 @@ Cesium3DTileFeature.prototype.getPropertyInherited = function (name) {
*
* If a property with the given name doesn't exist, it is created.
*
- *
* @param {string} name The case-sensitive name of the property.
* @param {*} value The value of the property that will be copied.
- *
- * @exception {DeveloperError} Inherited batch table hierarchy property is read only.
- *
+ * @throws {DeveloperError} Inherited batch table hierarchy property is read only.
* @example
* const height = feature.getProperty('Height'); // e.g., the height of a building
- *
* @example
* const name = 'clicked';
* if (feature.getProperty(name)) {
@@ -403,10 +369,8 @@ Cesium3DTileFeature.prototype.setProperty = function (name, value) {
*
* This function returns false
if no batch table hierarchy is present.
*
- *
* @param {string} className The name to check against.
* @returns {boolean} Whether the feature's class name equals className
- *
* @private
*/
Cesium3DTileFeature.prototype.isExactClass = function (className) {
@@ -418,10 +382,8 @@ Cesium3DTileFeature.prototype.isExactClass = function (className) {
*
* This function returns false
if no batch table hierarchy is present.
*
- *
* @param {string} className The name to check against.
* @returns {boolean} Whether the feature's class or inherited classes are named className
- *
* @private
*/
Cesium3DTileFeature.prototype.isClass = function (className) {
@@ -433,9 +395,7 @@ Cesium3DTileFeature.prototype.isClass = function (className) {
*
* This function returns undefined
if no batch table hierarchy is present.
*
- *
* @returns {string} The feature's class name.
- *
* @private
*/
Cesium3DTileFeature.prototype.getExactClassName = function () {
diff --git a/packages/engine/Source/Scene/Cesium3DTileFeatureTable.js b/packages/engine/Source/Scene/Cesium3DTileFeatureTable.js
index a503ba18fc1c..52ee75bde14b 100644
--- a/packages/engine/Source/Scene/Cesium3DTileFeatureTable.js
+++ b/packages/engine/Source/Scene/Cesium3DTileFeatureTable.js
@@ -3,6 +3,8 @@ import defaultValue from "../Core/defaultValue.js";
import defined from "../Core/defined.js";
/**
+ * @param featureTableJson
+ * @param featureTableBinary
* @private
*/
function Cesium3DTileFeatureTable(featureTableJson, featureTableBinary) {
diff --git a/packages/engine/Source/Scene/Cesium3DTileOptimizationHint.js b/packages/engine/Source/Scene/Cesium3DTileOptimizationHint.js
index 11e484eefe2b..17a478fb3907 100644
--- a/packages/engine/Source/Scene/Cesium3DTileOptimizationHint.js
+++ b/packages/engine/Source/Scene/Cesium3DTileOptimizationHint.js
@@ -1,8 +1,6 @@
/**
* Hint defining optimization support for a 3D tile
- *
* @enum {number}
- *
* @private
*/
const Cesium3DTileOptimizationHint = {
diff --git a/packages/engine/Source/Scene/Cesium3DTileOptimizations.js b/packages/engine/Source/Scene/Cesium3DTileOptimizations.js
index 9e836942f74c..4cfa8c88a719 100644
--- a/packages/engine/Source/Scene/Cesium3DTileOptimizations.js
+++ b/packages/engine/Source/Scene/Cesium3DTileOptimizations.js
@@ -6,9 +6,7 @@ import TileOrientedBoundingBox from "./TileOrientedBoundingBox.js";
/**
* Utility functions for computing optimization hints for a {@link Cesium3DTileset}.
- *
* @namespace Cesium3DTileOptimizations
- *
* @private
*/
const Cesium3DTileOptimizations = {};
@@ -23,7 +21,6 @@ const scratchAxis = new Cartesian3();
* bounds exceed those of the parent. If the child bounds are greater, it is more likely that the optimization will
* waste CPU cycles. Bounding spheres are not supported for the reason that the child bounds can very often be
* partially outside of the parent bounds.
- *
* @param {Cesium3DTile} tile The tile to check.
* @returns {boolean} Whether the childrenWithinParent optimization is supported.
*/
diff --git a/packages/engine/Source/Scene/Cesium3DTilePass.js b/packages/engine/Source/Scene/Cesium3DTilePass.js
index 1517ae1671a1..d9691254060d 100644
--- a/packages/engine/Source/Scene/Cesium3DTilePass.js
+++ b/packages/engine/Source/Scene/Cesium3DTilePass.js
@@ -1,6 +1,5 @@
/**
* The pass in which a 3D Tileset is updated.
- *
* @private
*/
const Cesium3DTilePass = {
diff --git a/packages/engine/Source/Scene/Cesium3DTilePassState.js b/packages/engine/Source/Scene/Cesium3DTilePassState.js
index d86c774faf51..d6b5f6edf720 100644
--- a/packages/engine/Source/Scene/Cesium3DTilePassState.js
+++ b/packages/engine/Source/Scene/Cesium3DTilePassState.js
@@ -2,9 +2,9 @@ import Check from "../Core/Check.js";
/**
* The state for a 3D Tiles update pass.
- *
+ * @param options
* @private
- * @constructor
+ * @class
*/
function Cesium3DTilePassState(options) {
//>>includeStart('debug', pragmas.debug);
@@ -14,35 +14,30 @@ function Cesium3DTilePassState(options) {
/**
* The pass.
- *
* @type {Cesium3DTilePass}
*/
this.pass = options.pass;
/**
* An array of rendering commands to use instead of {@link FrameState.commandList} for the current pass.
- *
* @type {DrawCommand[]}
*/
this.commandList = options.commandList;
/**
* A camera to use instead of {@link FrameState.camera} for the current pass.
- *
* @type {Camera}
*/
this.camera = options.camera;
/**
* A culling volume to use instead of {@link FrameState.cullingVolume} for the current pass.
- *
* @type {CullingVolume}
*/
this.cullingVolume = options.cullingVolume;
/**
* A read-only property that indicates whether the pass is ready, i.e. all tiles needed by the pass are loaded.
- *
* @type {boolean}
* @readonly
* @default false
diff --git a/packages/engine/Source/Scene/Cesium3DTilePointFeature.js b/packages/engine/Source/Scene/Cesium3DTilePointFeature.js
index 01158482ac53..8225013836c9 100644
--- a/packages/engine/Source/Scene/Cesium3DTilePointFeature.js
+++ b/packages/engine/Source/Scene/Cesium3DTilePointFeature.js
@@ -21,12 +21,14 @@ import createBillboardPointCallback from "./createBillboardPointCallback.js";
* Do not construct this directly. Access it through {@link Cesium3DTileContent#getFeature}
* or picking using {@link Scene#pick} and {@link Scene#pickPosition}.
*
- *
+ * @param content
+ * @param batchId
+ * @param billboard
+ * @param label
+ * @param polyline
* @alias Cesium3DTilePointFeature
- * @constructor
- *
+ * @class
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* // On mouse over, display all the properties for a feature in the console log.
* handler.setInputAction(function(movement) {
@@ -77,11 +79,8 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
/**
* Gets or sets if the feature will be shown. This is set for all features
* when a style's show is evaluated.
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {boolean}
- *
* @default true
*/
show: {
@@ -100,9 +99,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
*
* Only applied when image
is undefined
.
*
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {Color}
*/
color: {
@@ -120,9 +117,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
*
* Only applied when image
is undefined
.
*
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {number}
*/
pointSize: {
@@ -140,9 +135,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
*
* Only applied when image
is undefined
.
*
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {Color}
*/
pointOutlineColor: {
@@ -160,9 +153,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
*
* Only applied when image
is undefined
.
*
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {number}
*/
pointOutlineWidth: {
@@ -180,9 +171,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
*
* The color will be applied to the label if labelText
is defined.
*
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {Color}
*/
labelColor: {
@@ -200,9 +189,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
*
* The outline color will be applied to the label if labelText
is defined.
*
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {Color}
*/
labelOutlineColor: {
@@ -219,9 +206,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
*
* The outline width will be applied to the point if labelText
is defined.
*
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {number}
*/
labelOutlineWidth: {
@@ -238,9 +223,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
*
* Only applied when the labelText
is defined.
*
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {string}
*/
font: {
@@ -257,9 +240,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
*
* Only applied when labelText
is defined.
*
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {LabelStyle}
*/
labelStyle: {
@@ -273,9 +254,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
/**
* Gets or sets the text for this feature.
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {string}
*/
labelText: {
@@ -295,9 +274,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
*
* Only applied when labelText
is defined.
*
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {Color}
*/
backgroundColor: {
@@ -314,9 +291,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
*
* Only applied when labelText
is defined.
*
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {Cartesian2}
*/
backgroundPadding: {
@@ -333,9 +308,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
*
* Only applied when labelText
is defined.
*
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {boolean}
*/
backgroundEnabled: {
@@ -349,9 +322,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
/**
* Gets or sets the near and far scaling properties for this feature.
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {NearFarScalar}
*/
scaleByDistance: {
@@ -366,9 +337,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
/**
* Gets or sets the near and far translucency properties for this feature.
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {NearFarScalar}
*/
translucencyByDistance: {
@@ -383,9 +352,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
/**
* Gets or sets the condition specifying at what distance from the camera that this feature will be displayed.
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {DistanceDisplayCondition}
*/
distanceDisplayCondition: {
@@ -401,9 +368,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
/**
* Gets or sets the height offset in meters of this feature.
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {number}
*/
heightOffset: {
@@ -434,9 +399,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
*
* Only applied when heightOffset
is defined.
*
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {boolean}
*/
anchorLineEnabled: {
@@ -453,9 +416,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
*
* Only applied when heightOffset
is defined.
*
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {Color}
*/
anchorLineColor: {
@@ -472,9 +433,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
/**
* Gets or sets the image of this feature.
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {string}
*/
image: {
@@ -492,9 +451,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
/**
* Gets or sets the distance where depth testing will be disabled.
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {number}
*/
disableDepthTestDistance: {
@@ -510,9 +467,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
/**
* Gets or sets the horizontal origin of this point, which determines if the point is
* to the left, center, or right of its anchor position.
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {HorizontalOrigin}
*/
horizontalOrigin: {
@@ -527,9 +482,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
/**
* Gets or sets the vertical origin of this point, which determines if the point is
* to the bottom, center, or top of its anchor position.
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {VerticalOrigin}
*/
verticalOrigin: {
@@ -544,9 +497,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
/**
* Gets or sets the horizontal origin of this point's text, which determines if the point's text is
* to the left, center, or right of its anchor position.
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {HorizontalOrigin}
*/
labelHorizontalOrigin: {
@@ -561,9 +512,7 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
/**
* Get or sets the vertical origin of this point's text, which determines if the point's text is
* to the bottom, center, top, or baseline of it's anchor point.
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {VerticalOrigin}
*/
labelVerticalOrigin: {
@@ -577,11 +526,8 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
/**
* Gets the content of the tile containing the feature.
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {Cesium3DTileContent}
- *
* @readonly
* @private
*/
@@ -593,11 +539,8 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
/**
* Gets the tileset containing the feature.
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {Cesium3DTileset}
- *
* @readonly
*/
tileset: {
@@ -609,11 +552,8 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
/**
* All objects returned by {@link Scene#pick} have a primitive
property. This returns
* the tileset containing the feature.
- *
* @memberof Cesium3DTilePointFeature.prototype
- *
* @type {Cesium3DTileset}
- *
* @readonly
*/
primitive: {
@@ -716,9 +656,7 @@ function setBillboardImage(feature) {
/**
* Returns whether the feature contains this property. This includes properties from this feature's
* class and inherited classes when using a batch table hierarchy.
- *
* @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_batch_table_hierarchy}
- *
* @param {string} name The case-sensitive name of the property.
* @returns {boolean} Whether the feature contains this property.
*/
@@ -729,9 +667,7 @@ Cesium3DTilePointFeature.prototype.hasProperty = function (name) {
/**
* Returns an array of property IDs for the feature. This includes properties from this feature's
* class and inherited classes when using a batch table hierarchy.
- *
* @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_batch_table_hierarchy}
- *
* @param {string[]} [results] An array into which to store the results.
* @returns {string[]} The IDs of the feature's properties.
*/
@@ -742,12 +678,9 @@ Cesium3DTilePointFeature.prototype.getPropertyIds = function (results) {
/**
* Returns a copy of the value of the feature's property with the given name. This includes properties from this feature's
* class and inherited classes when using a batch table hierarchy.
- *
* @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_batch_table_hierarchy}
- *
* @param {string} name The case-sensitive name of the property.
* @returns {*} The value of the property or undefined
if the feature does not have this property.
- *
* @example
* // Display all the properties for a feature in the console log.
* const propertyIds = feature.getPropertyIds();
@@ -790,15 +723,11 @@ Cesium3DTilePointFeature.prototype.getPropertyInherited = function (name) {
*
* If a property with the given name doesn't exist, it is created.
*
- *
* @param {string} name The case-sensitive name of the property.
* @param {*} value The value of the property that will be copied.
- *
- * @exception {DeveloperError} Inherited batch table hierarchy property is read only.
- *
+ * @throws {DeveloperError} Inherited batch table hierarchy property is read only.
* @example
* const height = feature.getProperty('Height'); // e.g., the height of a building
- *
* @example
* const name = 'clicked';
* if (feature.getProperty(name)) {
@@ -823,10 +752,8 @@ Cesium3DTilePointFeature.prototype.setProperty = function (name, value) {
*
* This function returns false
if no batch table hierarchy is present.
*
- *
* @param {string} className The name to check against.
* @returns {boolean} Whether the feature's class name equals className
- *
* @private
*/
Cesium3DTilePointFeature.prototype.isExactClass = function (className) {
@@ -838,10 +765,8 @@ Cesium3DTilePointFeature.prototype.isExactClass = function (className) {
*
* This function returns false
if no batch table hierarchy is present.
*
- *
* @param {string} className The name to check against.
* @returns {boolean} Whether the feature's class or inherited classes are named className
- *
* @private
*/
Cesium3DTilePointFeature.prototype.isClass = function (className) {
@@ -853,9 +778,7 @@ Cesium3DTilePointFeature.prototype.isClass = function (className) {
*
* This function returns undefined
if no batch table hierarchy is present.
*
- *
* @returns {string} The feature's class name.
- *
* @private
*/
Cesium3DTilePointFeature.prototype.getExactClassName = function () {
diff --git a/packages/engine/Source/Scene/Cesium3DTileRefine.js b/packages/engine/Source/Scene/Cesium3DTileRefine.js
index 4b998df48e68..5398eae6c41d 100644
--- a/packages/engine/Source/Scene/Cesium3DTileRefine.js
+++ b/packages/engine/Source/Scene/Cesium3DTileRefine.js
@@ -4,15 +4,12 @@
* See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification#refinement|Refinement}
* in the 3D Tiles spec.
*
- *
* @enum {number}
- *
* @private
*/
const Cesium3DTileRefine = {
/**
* Render this tile and, if it doesn't meet the screen space error, also refine to its children.
- *
* @type {number}
* @constant
*/
@@ -20,7 +17,6 @@ const Cesium3DTileRefine = {
/**
* Render this tile or, if it doesn't meet the screen space error, refine to its descendants instead.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Scene/Cesium3DTileStyle.js b/packages/engine/Source/Scene/Cesium3DTileStyle.js
index b5cd56c60d37..434e4301a8c1 100644
--- a/packages/engine/Source/Scene/Cesium3DTileStyle.js
+++ b/packages/engine/Source/Scene/Cesium3DTileStyle.js
@@ -12,12 +12,9 @@ import Expression from "./Expression.js";
* Evaluates an expression defined using the
* {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Styling|3D Tiles Styling language}.
*
- *
* @alias Cesium3DTileStyle
- * @constructor
- *
+ * @class
* @param {object} [style] An object defining a style.
- *
* @example
* tileset.style = new Cesium.Cesium3DTileStyle({
* color : {
@@ -32,13 +29,11 @@ import Expression from "./Expression.js";
* description : '"Building id ${id} has height ${Height}."'
* }
* });
- *
* @example
* tileset.style = new Cesium.Cesium3DTileStyle({
* color : 'vec4(${Temperature})',
* pointSize : '${Temperature} * 2.0'
* });
- *
* @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Styling|3D Tiles Styling language}
*/
function Cesium3DTileStyle(style) {
@@ -163,12 +158,9 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
/**
* Gets the object defining the style using the
* {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Styling|3D Tiles Styling language}.
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {object}
* @readonly
- *
* @default {}
*/
style: {
@@ -186,17 +178,13 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is applicable to all tile formats.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @example
* const style = new Cesium3DTileStyle({
* show : '(regExp("^Chest").test(${County})) && (${YearBuilt} >= 1970)'
* });
* style.show.evaluate(feature); // returns true or false depending on the feature's properties
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override show expression with a custom function
@@ -205,19 +193,16 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
* return true;
* }
* };
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override show expression with a boolean
* style.show = true;
* };
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override show expression with a string
* style.show = '${Height} > 0';
* };
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override show expression with a condition
@@ -248,17 +233,13 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is applicable to all tile formats.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @example
* const style = new Cesium3DTileStyle({
* color : '(${Temperature} > 90) ? color("red") : color("white")'
* });
* style.color.evaluateColor(feature, result); // returns a Cesium.Color object
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override color expression with a custom function
@@ -267,12 +248,10 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
* return Cesium.Color.clone(Cesium.Color.WHITE, result);
* }
* };
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override color expression with a string
* style.color = 'color("blue")';
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override color expression with a condition
@@ -303,17 +282,13 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile or a Point Cloud tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @example
* const style = new Cesium3DTileStyle({
* pointSize : '(${Temperature} > 90) ? 2.0 : 1.0'
* });
* style.pointSize.evaluate(feature); // returns a Number
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override pointSize expression with a custom function
@@ -322,17 +297,14 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
* return 1.0;
* }
* };
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override pointSize expression with a number
* style.pointSize = 1.0;
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override pointSize expression with a string
* style.pointSize = '${height} / 10';
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override pointSize expression with a condition
@@ -363,18 +335,13 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override pointOutlineColor expression with a string
* style.pointOutlineColor = 'color("blue")';
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override pointOutlineColor expression with a condition
@@ -406,18 +373,13 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override pointOutlineWidth expression with a string
* style.pointOutlineWidth = '5';
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override pointOutlineWidth expression with a condition
@@ -449,18 +411,13 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override labelColor expression with a string
* style.labelColor = 'color("blue")';
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override labelColor expression with a condition
@@ -490,18 +447,13 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override labelOutlineColor expression with a string
* style.labelOutlineColor = 'color("blue")';
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override labelOutlineColor expression with a condition
@@ -533,18 +485,13 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override labelOutlineWidth expression with a string
* style.labelOutlineWidth = '5';
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override labelOutlineWidth expression with a condition
@@ -576,19 +523,14 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const style = new Cesium3DTileStyle({
* font : '(${Temperature} > 90) ? "30px Helvetica" : "24px Helvetica"'
* });
* style.font.evaluate(feature); // returns a String
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override font expression with a custom function
@@ -617,19 +559,14 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const style = new Cesium3DTileStyle({
* labelStyle : `(\${Temperature} > 90) ? ${LabelStyle.FILL_AND_OUTLINE} : ${LabelStyle.FILL}`
* });
* style.labelStyle.evaluate(feature); // returns a LabelStyle
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override labelStyle expression with a custom function
@@ -658,19 +595,14 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const style = new Cesium3DTileStyle({
* labelText : '(${Temperature} > 90) ? ">90" : "<=90"'
* });
* style.labelText.evaluate(feature); // returns a String
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override labelText expression with a custom function
@@ -699,18 +631,13 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override backgroundColor expression with a string
* style.backgroundColor = 'color("blue")';
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override backgroundColor expression with a condition
@@ -742,13 +669,9 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override backgroundPadding expression with a string
@@ -776,18 +699,13 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override backgroundEnabled expression with a string
* style.backgroundEnabled = 'true';
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override backgroundEnabled expression with a condition
@@ -819,13 +737,9 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override scaleByDistance expression with a string
@@ -853,13 +767,9 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override translucencyByDistance expression with a string
@@ -887,13 +797,9 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override distanceDisplayCondition expression with a string
@@ -921,18 +827,13 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override heightOffset expression with a string
* style.heightOffset = '2.0';
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override heightOffset expression with a condition
@@ -962,18 +863,13 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override anchorLineEnabled expression with a string
* style.anchorLineEnabled = 'true';
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override anchorLineEnabled expression with a condition
@@ -1005,18 +901,13 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override anchorLineColor expression with a string
* style.anchorLineColor = 'color("blue")';
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override anchorLineColor expression with a condition
@@ -1048,19 +939,14 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const style = new Cesium3DTileStyle({
* image : '(${Temperature} > 90) ? "/url/to/image1" : "/url/to/image2"'
* });
* style.image.evaluate(feature); // returns a String
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override image expression with a custom function
@@ -1089,13 +975,9 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override disableDepthTestDistance expression with a string
@@ -1123,19 +1005,14 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const style = new Cesium3DTileStyle({
* horizontalOrigin : HorizontalOrigin.LEFT
* });
* style.horizontalOrigin.evaluate(feature); // returns a HorizontalOrigin
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override horizontalOrigin expression with a custom function
@@ -1166,19 +1043,14 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const style = new Cesium3DTileStyle({
* verticalOrigin : VerticalOrigin.TOP
* });
* style.verticalOrigin.evaluate(feature); // returns a VerticalOrigin
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override verticalOrigin expression with a custom function
@@ -1200,35 +1072,30 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
/**
Gets or sets the {@link StyleExpression} object used to evaluate the style's labelHorizontalOrigin
property. Alternatively a string or object defining a number style can be used.
- * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
- *
- * The expression must return a HorizontalOrigin
.
- *
- *
- * This expression is only applicable to point features in a Vector tile.
- *
- *
- * @memberof Cesium3DTileStyle.prototype
- *
- * @type {StyleExpression}
- *
- * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
- * @example
- * const style = new Cesium3DTileStyle({
- * labelHorizontalOrigin : HorizontalOrigin.LEFT
- * });
- * style.labelHorizontalOrigin.evaluate(feature); // returns a HorizontalOrigin
- *
- * @example
- * const style = new Cesium.Cesium3DTileStyle();
- * // Override labelHorizontalOrigin expression with a custom function
- * style.labelHorizontalOrigin = {
- * evaluate : function(feature) {
- * return HorizontalOrigin.CENTER;
- * }
- * };
- */
+ The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+
+ The expression must return a HorizontalOrigin
.
+
+
+ This expression is only applicable to point features in a Vector tile.
+
+ * @memberof Cesium3DTileStyle.prototype
+ * @type {StyleExpression}
+ * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
+ * @example
+ * const style = new Cesium3DTileStyle({
+ * labelHorizontalOrigin : HorizontalOrigin.LEFT
+ * });
+ * style.labelHorizontalOrigin.evaluate(feature); // returns a HorizontalOrigin
+ * @example
+ * const style = new Cesium.Cesium3DTileStyle();
+ * // Override labelHorizontalOrigin expression with a custom function
+ * style.labelHorizontalOrigin = {
+ * evaluate : function(feature) {
+ * return HorizontalOrigin.CENTER;
+ * }
+ * };
+ */
labelHorizontalOrigin: {
get: function () {
return this._labelHorizontalOrigin;
@@ -1250,19 +1117,14 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
*
* This expression is only applicable to point features in a Vector tile.
*
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const style = new Cesium3DTileStyle({
* labelVerticalOrigin : VerticalOrigin.TOP
* });
* style.labelVerticalOrigin.evaluate(feature); // returns a VerticalOrigin
- *
* @example
* const style = new Cesium.Cesium3DTileStyle();
* // Override labelVerticalOrigin expression with a custom function
@@ -1287,11 +1149,8 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
/**
* Gets or sets the object containing application-specific expression that can be explicitly
* evaluated, e.g., for display in a UI.
- *
* @memberof Cesium3DTileStyle.prototype
- *
* @type {StyleExpression}
- *
* @example
* const style = new Cesium3DTileStyle({
* meta : {
@@ -1312,11 +1171,8 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
/**
* Asynchronously creates a Cesium3DTileStyle from a url.
- *
* @param {Resource|string} url The url of the style to be loaded.
- *
* @returns {Promise} A promise which resolves to the created style
- *
* @private
*/
Cesium3DTileStyle.fromUrl = function (url) {
@@ -1334,13 +1190,10 @@ Cesium3DTileStyle.fromUrl = function (url) {
/**
* Gets the color shader function for this style.
- *
* @param {string} functionSignature Signature of the generated function.
* @param {object} variableSubstitutionMap Maps variable names to shader variable names.
* @param {object} shaderState Stores information about the generated shader function, including whether it is translucent.
- *
* @returns {string} The shader function.
- *
* @private
*/
Cesium3DTileStyle.prototype.getColorShaderFunction = function (
@@ -1372,13 +1225,10 @@ Cesium3DTileStyle.prototype.getColorShaderFunction = function (
/**
* Gets the show shader function for this style.
- *
* @param {string} functionSignature Signature of the generated function.
* @param {object} variableSubstitutionMap Maps variable names to shader variable names.
* @param {object} shaderState Stores information about the generated shader function, including whether it is translucent.
- *
* @returns {string} The shader function.
- *
* @private
*/
Cesium3DTileStyle.prototype.getShowShaderFunction = function (
@@ -1408,13 +1258,10 @@ Cesium3DTileStyle.prototype.getShowShaderFunction = function (
/**
* Gets the pointSize shader function for this style.
- *
* @param {string} functionSignature Signature of the generated function.
* @param {object} variableSubstitutionMap Maps variable names to shader variable names.
* @param {object} shaderState Stores information about the generated shader function, including whether it is translucent.
- *
* @returns {string} The shader function.
- *
* @private
*/
Cesium3DTileStyle.prototype.getPointSizeShaderFunction = function (
@@ -1444,9 +1291,7 @@ Cesium3DTileStyle.prototype.getPointSizeShaderFunction = function (
/**
* Gets the variables used by the style.
- *
* @returns {string[]} The variables used by the style.
- *
* @private
*/
Cesium3DTileStyle.prototype.getVariables = function () {
diff --git a/packages/engine/Source/Scene/Cesium3DTilesVoxelProvider.js b/packages/engine/Source/Scene/Cesium3DTilesVoxelProvider.js
index a04084e840ca..5a32dc2a5e3c 100644
--- a/packages/engine/Source/Scene/Cesium3DTilesVoxelProvider.js
+++ b/packages/engine/Source/Scene/Cesium3DTilesVoxelProvider.js
@@ -30,18 +30,14 @@ import VoxelShapeType from "./VoxelShapeType.js";
*
* This object is normally not instantiated directly, use {@link Cesium3DTilesVoxelProvider.fromUrl}.
*
- *
* @alias Cesium3DTilesVoxelProvider
- * @constructor
+ * @class
* @augments VoxelProvider
- *
* @param {object} options Object with the following properties:
- *
* @see Cesium3DTilesVoxelProvider.fromUrl
* @see VoxelProvider
* @see VoxelPrimitive
* @see VoxelShapeType
- *
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
*/
function Cesium3DTilesVoxelProvider(options) {
@@ -95,15 +91,13 @@ function Cesium3DTilesVoxelProvider(options) {
/**
* Creates a {@link VoxelProvider} that fetches voxel data from a 3D Tiles tileset.
- *
* @param {Resource|string} url The URL to a tileset JSON file
* @returns {Promise} The created provider
- *
- * @exception {RuntimeException} Root must have content
- * @exception {RuntimeException} Root tile content must have 3DTILES_content_voxels extension
- * @exception {RuntimeException} Root tile must have implicit tiling
- * @exception {RuntimeException} Tileset must have a metadata schema
- * @exception {RuntimeException} Only box, region and 3DTILES_bounding_volume_cylinder are supported in Cesium3DTilesVoxelProvider
+ * @throws {RuntimeException} Root must have content
+ * @throws {RuntimeException} Root tile content must have 3DTILES_content_voxels extension
+ * @throws {RuntimeException} Root tile must have implicit tiling
+ * @throws {RuntimeException} Tileset must have a metadata schema
+ * @throws {RuntimeException} Only box, region and 3DTILES_bounding_volume_cylinder are supported in Cesium3DTilesVoxelProvider
*/
Cesium3DTilesVoxelProvider.fromUrl = async function (url) {
//>>includeStart('debug', pragmas.debug);
diff --git a/packages/engine/Source/Scene/Cesium3DTileset.js b/packages/engine/Source/Scene/Cesium3DTileset.js
index abcb2071b8b6..95eb5dc3beb2 100644
--- a/packages/engine/Source/Scene/Cesium3DTileset.js
+++ b/packages/engine/Source/Scene/Cesium3DTileset.js
@@ -63,10 +63,9 @@ import Cesium3DTilesetSkipTraversal from "./Cesium3DTilesetSkipTraversal.js";
import Ray from "../Core/Ray.js";
/**
- * @typedef {Object} Cesium3DTileset.ConstructorOptions
+ * @typedef {object} Cesium3DTileset.ConstructorOptions
*
* Initialization options for the Cesium3DTileset constructor
- *
* @property {boolean} [show=true] Determines if the tileset will be shown.
* @property {Matrix4} [modelMatrix=Matrix4.IDENTITY] A 4x4 transformation matrix that transforms the tileset's root tile.
* @property {Axis} [modelUpAxis=Axis.Y] Which axis is considered up when loading models for tile contents.
@@ -138,14 +137,10 @@ import Ray from "../Core/Ray.js";
*
* This object is normally not instantiated directly, use {@link Cesium3DTileset.fromUrl}.
*
- *
* @alias Cesium3DTileset
- * @constructor
- *
+ * @class
* @param {Cesium3DTileset.ConstructorOptions} options An object describing initialization options
- *
- * @exception {DeveloperError} The tileset must be 3D Tiles version 0.0 or 1.0.
- *
+ * @throws {DeveloperError} The tileset must be 3D Tiles version 0.0 or 1.0.
* @example
* try {
* const tileset = await Cesium.Cesium3DTileset.fromUrl(
@@ -155,7 +150,6 @@ import Ray from "../Core/Ray.js";
* } catch (error) {
* console.error(`Error creating tileset: ${error}`);
* }
- *
* @example
* // Turn on camera collisions with the tileset.
* try {
@@ -167,7 +161,6 @@ import Ray from "../Core/Ray.js";
* } catch (error) {
* console.error(`Error creating tileset: ${error}`);
* }
- *
* @example
* // Common setting for the skipLevelOfDetail optimization
* const tileset = await Cesium.Cesium3DTileset.fromUrl(
@@ -181,7 +174,6 @@ import Ray from "../Core/Ray.js";
* cullWithChildrenBounds: true
* });
* scene.primitives.add(tileset);
- *
* @example
* // Common settings for the dynamicScreenSpaceError optimization
* const tileset = await Cesium.Cesium3DTileset.fromUrl(
@@ -192,7 +184,6 @@ import Ray from "../Core/Ray.js";
* dynamicScreenSpaceErrorHeightFalloff: 0.25
* });
* scene.primitives.add(tileset);
- *
* @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification|3D Tiles specification}
*/
function Cesium3DTileset(options) {
@@ -299,7 +290,6 @@ function Cesium3DTileset(options) {
/**
* Optimization option. Don't request tiles that will likely be unused when they come back because of the camera's movement. This optimization only applies to stationary tilesets.
- *
* @type {boolean}
* @default true
*/
@@ -311,7 +301,6 @@ function Cesium3DTileset(options) {
/**
* Optimization option. Multiplier used in culling requests while moving. Larger is more aggressive culling, smaller less aggressive culling.
- *
* @type {number}
* @default 60.0
*/
@@ -322,7 +311,6 @@ function Cesium3DTileset(options) {
/**
* Optimization option. If between (0.0, 0.5], tiles at or above the screen space error for the reduced screen resolution of progressiveResolutionHeightFraction*screenHeight
will be prioritized first. This can help get a quick layer of tiles down while full resolution tiles continue to load.
- *
* @type {number}
* @default 0.3
*/
@@ -334,7 +322,6 @@ function Cesium3DTileset(options) {
/**
* Optimization option. Prefer loading of leaves first.
- *
* @type {boolean}
* @default false
*/
@@ -365,7 +352,6 @@ function Cesium3DTileset(options) {
/**
* Preload tiles when tileset.show
is false
. Loads tiles as if the tileset is visible but does not render them.
- *
* @type {boolean}
* @default false
*/
@@ -373,7 +359,6 @@ function Cesium3DTileset(options) {
/**
* Optimization option. Fetch tiles at the camera's flight destination while the camera is in flight.
- *
* @type {boolean}
* @default true
*/
@@ -389,7 +374,6 @@ function Cesium3DTileset(options) {
*
* This optimization is strongest when the camera is close to the ground plane of the tileset and looking at the
* horizon. Furthermore, the results are more accurate for tightly fitting bounding volumes like box and region.
- *
* @type {boolean}
* @default true
*/
@@ -402,7 +386,6 @@ function Cesium3DTileset(options) {
* Optimization option. Prioritize loading tiles in the center of the screen by temporarily raising the
* screen space error for tiles around the edge of the screen. Screen space error returns to normal once all
* the tiles in the center of the screen as determined by the {@link Cesium3DTileset#foveatedConeSize} are loaded.
- *
* @type {boolean}
* @default true
*/
@@ -419,7 +402,6 @@ function Cesium3DTileset(options) {
/**
* Gets or sets a callback to control how much to raise the screen space error for tiles outside the foveated cone,
* interpolating between {@link Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation} and {@link Cesium3DTileset#maximumScreenSpaceError}.
- *
* @type {Cesium3DTileset.foveatedInterpolationCallback}
*/
this.foveatedInterpolationCallback = defaultValue(
@@ -432,7 +414,6 @@ function Cesium3DTileset(options) {
* how long in seconds to wait after the camera stops moving before deferred tiles start loading in.
* This time delay prevents requesting tiles around the edges of the screen when the camera is moving.
* Setting this to 0.0 will immediately request all tiles in any given view.
- *
* @type {number}
* @default 0.2
*/
@@ -455,7 +436,6 @@ function Cesium3DTileset(options) {
*
* When the density is 0, the optimization will have no effect on the tileset.
*
- *
* @type {number}
* @default 2.0e-4
*/
@@ -476,7 +456,6 @@ function Cesium3DTileset(options) {
*
* When the SSE factor is set to 0, the optimization will have no effect on the tileset.
*
- *
* @type {number}
* @default 24.0
*/
@@ -490,7 +469,6 @@ function Cesium3DTileset(options) {
* optimization. When the camera is below this height, the dynamic screen space error optimization will have the maximum
* effect, and it will roll off above this value. Valid values are between 0.0 and 1.0.
*
- *
* @type {number}
* @default 0.25
*/
@@ -510,7 +488,6 @@ function Cesium3DTileset(options) {
*
* Shadows are rendered only when {@link Viewer#shadows} is true
.
*
- *
* @type {ShadowMode}
* @default ShadowMode.ENABLED
*/
@@ -518,7 +495,6 @@ function Cesium3DTileset(options) {
/**
* Determines if the tileset will be shown.
- *
* @type {boolean}
* @default true
*/
@@ -527,7 +503,6 @@ function Cesium3DTileset(options) {
/**
* Defines how per-feature colors set from the Cesium API or declarative styling blend with the source colors from
* the original feature, e.g. glTF material or per-point color in the tile.
- *
* @type {Cesium3DTileColorBlendMode}
* @default Cesium3DTileColorBlendMode.HIGHLIGHT
*/
@@ -537,7 +512,6 @@ function Cesium3DTileset(options) {
* Defines the value used to linearly interpolate between the source color and feature color when the {@link Cesium3DTileset#colorBlendMode} is MIX
.
* A value of 0.0 results in the source color while a value of 1.0 results in the feature color, with any value in-between
* resulting in a mix of the source color and feature color.
- *
* @type {number}
* @default 0.5
*/
@@ -557,10 +531,8 @@ function Cesium3DTileset(options) {
*
* This event is fired at the end of the frame after the scene is rendered.
*
- *
* @type {Event}
* @default new Event()
- *
* @example
* tileset.loadProgress.addEventListener(function(numberOfPendingRequests, numberOfTilesProcessing) {
* if ((numberOfPendingRequests === 0) && (numberOfTilesProcessing === 0)) {
@@ -579,15 +551,12 @@ function Cesium3DTileset(options) {
*
* This event is fired at the end of the frame after the scene is rendered.
*
- *
* @type {Event}
* @default new Event()
- *
* @example
* tileset.allTilesLoaded.addEventListener(function() {
* console.log('All tiles are loaded');
* });
- *
* @see Cesium3DTileset#tilesLoaded
*/
this.allTilesLoaded = new Event();
@@ -598,15 +567,12 @@ function Cesium3DTileset(options) {
*
* This event is fired at the end of the frame after the scene is rendered.
*
- *
* @type {Event}
* @default new Event()
- *
* @example
* tileset.initialTilesLoaded.addEventListener(function() {
* console.log('Initial tiles are loaded');
* });
- *
* @see Cesium3DTileset#allTilesLoaded
*/
this.initialTilesLoaded = new Event();
@@ -621,10 +587,8 @@ function Cesium3DTileset(options) {
* so that updates to the tile take effect in the same frame. Do not create or modify
* Cesium entities or primitives during the event listener.
*
- *
* @type {Event}
* @default new Event()
- *
* @example
* tileset.tileLoad.addEventListener(function(tile) {
* console.log('A tile was loaded.');
@@ -642,15 +606,12 @@ function Cesium3DTileset(options) {
* rendered so that the event listener has access to the tile's content. Do not create
* or modify Cesium entities or primitives during the event listener.
*
- *
* @type {Event}
* @default new Event()
- *
* @example
* tileset.tileUnload.addEventListener(function(tile) {
* console.log('A tile was unloaded from the cache.');
* });
- *
* @see Cesium3DTileset#cacheBytes
* @see Cesium3DTileset#trimLoadedTiles
*/
@@ -670,10 +631,8 @@ function Cesium3DTileset(options) {
*
* If multiple contents are present, this event is raised once per inner content with errors.
*
- *
* @type {Event}
* @default new Event()
- *
* @example
* tileset.tileFailed.addEventListener(function(error) {
* console.log(`An error occurred loading tile: ${error.url}`);
@@ -693,17 +652,14 @@ function Cesium3DTileset(options) {
* so that updates to the tile take effect in the same frame. Do not create or modify
* Cesium entities or primitives during the event listener.
*
- *
* @type {Event}
* @default new Event()
- *
* @example
* tileset.tileVisible.addEventListener(function(tile) {
* if (tile.content instanceof Cesium.Model3DTileContent) {
* console.log('A 3D model tile is visible.');
* }
* });
- *
* @example
* // Apply a red style and then manually set random colors for every other feature when the tile becomes visible.
* tileset.style = new Cesium.Cesium3DTileStyle({
@@ -727,7 +683,6 @@ function Cesium3DTileset(options) {
* entirely and children can be rendered alongside their parents. The tileset requires significantly less memory when
* using this optimization.
*
- *
* @type {boolean}
* @default false
*/
@@ -740,7 +695,6 @@ function Cesium3DTileset(options) {
*
* Only used when {@link Cesium3DTileset#skipLevelOfDetail} is true
.
*
- *
* @type {number}
* @default 1024
*/
@@ -753,7 +707,6 @@ function Cesium3DTileset(options) {
*
* Only used when {@link Cesium3DTileset#skipLevelOfDetail} is true
.
*
- *
* @type {number}
* @default 16
*/
@@ -768,7 +721,6 @@ function Cesium3DTileset(options) {
*
* Only used when {@link Cesium3DTileset#skipLevelOfDetail} is true
.
*
- *
* @type {number}
* @default 1
*/
@@ -780,7 +732,6 @@ function Cesium3DTileset(options) {
*
* Only used when {@link Cesium3DTileset#skipLevelOfDetail} is true
.
*
- *
* @type {boolean}
* @default false
*/
@@ -795,7 +746,6 @@ function Cesium3DTileset(options) {
*
* Only used when {@link Cesium3DTileset#skipLevelOfDetail} is true
.
*
- *
* @type {boolean}
* @default false
*/
@@ -834,7 +784,6 @@ function Cesium3DTileset(options) {
* tileset.imageBasedLighting.imageBasedLightingFactor = new Cartesian2(0.0, 0.0)
* will make the tileset much darker. Here, increasing the intensity of the light source will make the tileset brighter.
*
- *
* @type {Cartesian3}
* @default undefined
*/
@@ -843,7 +792,6 @@ function Cesium3DTileset(options) {
/**
* Whether to cull back-facing geometry. When true, back face culling is determined
* by the glTF material's doubleSided property; when false, back face culling is disabled.
- *
* @type {boolean}
* @default true
*/
@@ -855,7 +803,6 @@ function Cesium3DTileset(options) {
* Whether to display the outline for models using the
* {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline} extension.
* When true, outlines are displayed. When false, outlines are not displayed.
- *
* @type {boolean}
* @default true
*/
@@ -863,7 +810,6 @@ function Cesium3DTileset(options) {
/**
* The color to use when rendering outlines.
- *
* @type {Color}
* @default Color.BLACK
*/
@@ -871,7 +817,6 @@ function Cesium3DTileset(options) {
/**
* The {@link SplitDirection} to apply to this tileset.
- *
* @type {SplitDirection}
* @default {@link SplitDirection.NONE}
*/
@@ -882,7 +827,6 @@ function Cesium3DTileset(options) {
/**
* If true
, allows collisions for camera collisions or picking. While this is true
the camera will be prevented from going in or below the tileset surface if {@link ScreenSpaceCameraController#enableCollisionDetection} is true. This can have performance implecations if the tileset contains tile with a larger number of vertices.
- *
* @type {boolean}
* @default false
*/
@@ -897,7 +841,6 @@ function Cesium3DTileset(options) {
* effectively "freezes" the tileset to the previous frame so it is possible to zoom
* out and see what was rendered.
*
- *
* @type {boolean}
* @default false
*/
@@ -910,7 +853,6 @@ function Cesium3DTileset(options) {
* what features belong to what tiles, especially with additive refinement where features
* from parent tiles may be interleaved with features from child tiles.
*
- *
* @type {boolean}
* @default false
*/
@@ -926,7 +868,6 @@ function Cesium3DTileset(options) {
*
* When true, renders each tile's content as a wireframe.
*
- *
* @type {boolean}
* @default false
*/
@@ -947,7 +888,6 @@ function Cesium3DTileset(options) {
* white if the tile has a content bounding volume or is empty; otherwise, it is red. Tiles that don't meet the
* screen space error and are still refining to their descendants are yellow.
*
- *
* @type {boolean}
* @default false
*/
@@ -962,7 +902,6 @@ function Cesium3DTileset(options) {
* When true, renders the bounding volume for each visible tile's content. The bounding volume is
* blue if the tile has a content bounding volume; otherwise it is red.
*
- *
* @type {boolean}
* @default false
*/
@@ -976,7 +915,6 @@ function Cesium3DTileset(options) {
*
* When true, renders the viewer request volume for each tile.
*
- *
* @type {boolean}
* @default false
*/
@@ -999,7 +937,6 @@ function Cesium3DTileset(options) {
*
* When true, draws labels to indicate the geometric error of each tile.
*
- *
* @type {boolean}
* @default false
*/
@@ -1013,7 +950,6 @@ function Cesium3DTileset(options) {
*
* When true, draws labels to indicate the number of commands, points, triangles and features of each tile.
*
- *
* @type {boolean}
* @default false
*/
@@ -1027,7 +963,6 @@ function Cesium3DTileset(options) {
*
* When true, draws labels to indicate the geometry and texture memory usage of each tile.
*
- *
* @type {boolean}
* @default false
*/
@@ -1038,7 +973,6 @@ function Cesium3DTileset(options) {
*
* When true, draws labels to indicate the url of each tile.
*
- *
* @type {boolean}
* @default false
*/
@@ -1046,9 +980,7 @@ function Cesium3DTileset(options) {
/**
* Function for examining vector lines as they are being streamed.
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @type {Function}
*/
this.examineVectorLinesFunction = undefined;
@@ -1095,9 +1027,7 @@ Object.defineProperties(Cesium3DTileset.prototype, {
* See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification#reference-asset|asset schema reference}
* in the 3D Tiles spec for the full set of properties.
*
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {object}
* @readonly
*/
@@ -1109,9 +1039,7 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* Gets the tileset's extensions object property.
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {object}
* @readonly
*/
@@ -1123,9 +1051,7 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* The {@link ClippingPlaneCollection} used to selectively disable rendering the tileset.
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {ClippingPlaneCollection}
*/
clippingPlanes: {
@@ -1139,9 +1065,7 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* The {@link ClippingPolygonCollection} used to selectively disable rendering the tileset.
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {ClippingPolygonCollection}
*/
clippingPolygons: {
@@ -1159,16 +1083,12 @@ Object.defineProperties(Cesium3DTileset.prototype, {
* See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification#reference-properties|properties schema reference}
* in the 3D Tiles spec for the full set of properties.
*
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {object}
* @readonly
- *
* @example
* console.log(`Maximum building height: ${tileset.properties.height.maximum}`);
* console.log(`Minimum building height: ${tileset.properties.height.minimum}`);
- *
* @see Cesium3DTileFeature#getProperty
* @see Cesium3DTileFeature#setProperty
*/
@@ -1181,14 +1101,10 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* When true
, all tiles that meet the screen space error this frame are loaded. The tileset is
* completely loaded for this view.
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
- *
* @see Cesium3DTileset#allTilesLoaded
*/
tilesLoaded: {
@@ -1199,9 +1115,7 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* The resource used to fetch the tileset JSON file
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {Resource}
* @readonly
*/
@@ -1213,9 +1127,7 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* The base path that non-absolute paths in tileset JSON file are relative to.
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {string}
* @readonly
* @deprecated
@@ -1251,13 +1163,9 @@ Object.defineProperties(Cesium3DTileset.prototype, {
* for all objects that are not overridden by pre-existing conditions. Otherwise, the
* default show value true will be used.
*
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {Cesium3DTileStyle|undefined}
- *
* @default undefined
- *
* @example
* tileset.style = new Cesium.Cesium3DTileStyle({
* color : {
@@ -1272,7 +1180,6 @@ Object.defineProperties(Cesium3DTileset.prototype, {
* description : '"Building id ${id} has height ${Height}."'
* }
* });
- *
* @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Styling|3D Tiles Styling language}
*/
style: {
@@ -1288,13 +1195,9 @@ Object.defineProperties(Cesium3DTileset.prototype, {
* A custom shader to apply to all tiles in the tileset. Only used for
* contents that use {@link Model}. Using custom shaders with a
* {@link Cesium3DTileStyle} may lead to undefined behavior.
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {CustomShader|undefined}
- *
* @default undefined
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
customShader: {
@@ -1309,9 +1212,7 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* Whether the tileset is rendering different levels of detail in the same view.
* Only relevant if {@link Cesium3DTileset.isSkippingLevelOfDetail} is true.
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {boolean}
* @private
*/
@@ -1332,9 +1233,7 @@ Object.defineProperties(Cesium3DTileset.prototype, {
* Whether this tileset is actually skipping levels of detail.
* The user option may have been disabled if all tiles are using additive refinement,
* or if some tiles have a content type for which rendering does not support skipping
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {boolean}
* @private
* @readonly
@@ -1354,12 +1253,10 @@ Object.defineProperties(Cesium3DTileset.prototype, {
* The tileset's schema, groups, tileset metadata and other details from the
* 3DTILES_metadata extension or a 3D Tiles 1.1 tileset JSON. This getter is
* for internal use by other classes.
- *
* @memberof Cesium3DTileset.prototype
* @type {Cesium3DTilesetMetadata}
* @private
* @readonly
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
metadataExtension: {
@@ -1370,13 +1267,10 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* The metadata properties attached to the tileset as a whole.
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {TilesetMetadata}
* @private
* @readonly
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
metadata: {
@@ -1392,13 +1286,10 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* The metadata schema used in this tileset. Shorthand for
* tileset.metadataExtension.schema
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {MetadataSchema}
* @private
* @readonly
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
schema: {
@@ -1423,13 +1314,10 @@ Object.defineProperties(Cesium3DTileset.prototype, {
* Depending on the tileset, maximumScreenSpaceError
may need to be tweaked to achieve the right balance.
* Higher values provide better performance but lower visual quality.
*
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {number}
* @default 16
- *
- * @exception {DeveloperError} maximumScreenSpaceError
must be greater than or equal to zero.
+ * @throws {DeveloperError} maximumScreenSpaceError
must be greater than or equal to zero.
*/
maximumScreenSpaceError: {
get: function () {
@@ -1469,13 +1357,10 @@ Object.defineProperties(Cesium3DTileset.prototype, {
* may be loaded (if maximumCacheOverflowBytes
is at least 100000).
* When these tiles go out of view, they will be unloaded.
*
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {number}
* @default 536870912
- *
- * @exception {DeveloperError} cacheBytes
must be typeof 'number' and greater than or equal to 0
+ * @throws {DeveloperError} cacheBytes
must be typeof 'number' and greater than or equal to 0
* @see Cesium3DTileset#totalMemoryUsageInBytes
*/
cacheBytes: {
@@ -1501,13 +1386,10 @@ Object.defineProperties(Cesium3DTileset.prototype, {
* until the tiles required to meet the adjusted screen space error use less
* than cacheBytes
plus maximumCacheOverflowBytes
.
*
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {number}
* @default 536870912
- *
- * @exception {DeveloperError} maximumCacheOverflowBytes
must be typeof 'number' and greater than or equal to 0
+ * @throws {DeveloperError} maximumCacheOverflowBytes
must be typeof 'number' and greater than or equal to 0
* @see Cesium3DTileset#totalMemoryUsageInBytes
*/
maximumCacheOverflowBytes: {
@@ -1529,12 +1411,9 @@ Object.defineProperties(Cesium3DTileset.prototype, {
* plus @{link Cesium3DTileset#maximumCacheOverflowBytes}, level of detail refinement
* will instead use this (larger) adjusted screen space error to achieve the
* best possible visual quality within the available memory
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {number}
* @readonly
- *
* @private
*/
memoryAdjustedScreenSpaceError: {
@@ -1545,9 +1424,7 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* Options for controlling point size based on geometric error and eye dome lighting.
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {PointCloudShading}
*/
pointCloudShading: {
@@ -1564,9 +1441,7 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* The root tile.
- *
* @memberOf Cesium3DTileset.prototype
- *
* @type {Cesium3DTile}
* @readonly
*/
@@ -1578,12 +1453,9 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* The tileset's bounding sphere.
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {BoundingSphere}
* @readonly
- *
* @example
* const tileset = await Cesium.Cesium3DTileset.fromUrl("http://localhost:8002/tilesets/Seattle/tileset.json");
*
@@ -1601,12 +1473,9 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* A 4x4 transformation matrix that transforms the entire tileset.
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {Matrix4}
* @default Matrix4.IDENTITY
- *
* @example
* // Adjust a tileset's height from the globe's surface.
* const heightOffset = 20.0;
@@ -1628,9 +1497,7 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* Returns the time, in milliseconds, since the tileset was loaded and first updated.
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {number}
* @readonly
*/
@@ -1643,12 +1510,9 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* The total amount of GPU memory in bytes used by the tileset. This value is estimated from
* geometry, texture, batch table textures, and binary metadata of loaded tiles.
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {number}
* @readonly
- *
* @see Cesium3DTileset#cacheBytes
*/
totalMemoryUsageInBytes: {
@@ -1714,13 +1578,13 @@ Object.defineProperties(Cesium3DTileset.prototype, {
* When enabled for batched 3D model and glTF tilesets, there are a few
* requirements/limitations on the glTF:
*
- * The glTF cannot contain morph targets, skins, or animations.
- * The glTF cannot contain the EXT_mesh_gpu_instancing
extension.
- * Only meshes with TRIANGLES can be used to classify other assets.
- * The meshes must be watertight.
- * The POSITION
semantic is required.
- * If _BATCHID
s and an index buffer are both present, all indices with the same batch id must occupy contiguous sections of the index buffer.
- * If _BATCHID
s are present with no index buffer, all positions with the same batch id must occupy contiguous sections of the position buffer.
+ * The glTF cannot contain morph targets, skins, or animations.
+ * The glTF cannot contain the EXT_mesh_gpu_instancing
extension.
+ * Only meshes with TRIANGLES can be used to classify other assets.
+ * The meshes must be watertight.
+ * The POSITION
semantic is required.
+ * If _BATCHID
s and an index buffer are both present, all indices with the same batch id must occupy contiguous sections of the index buffer.
+ * If _BATCHID
s are present with no index buffer, all positions with the same batch id must occupy contiguous sections of the position buffer.
*
*
*
@@ -1730,12 +1594,9 @@ Object.defineProperties(Cesium3DTileset.prototype, {
*
* The 3D Tiles or terrain receiving the classification must be opaque.
*
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {ClassificationType}
* @default undefined
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
* @readonly
*/
@@ -1747,9 +1608,7 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* Gets an ellipsoid describing the shape of the globe.
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {Ellipsoid}
* @readonly
*/
@@ -1763,9 +1622,7 @@ Object.defineProperties(Cesium3DTileset.prototype, {
* Optimization option. Used when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control the cone size that determines which tiles are deferred.
* Tiles that are inside this cone are loaded immediately. Tiles outside the cone are potentially deferred based on how far outside the cone they are and {@link Cesium3DTileset#foveatedInterpolationCallback} and {@link Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation}.
* Setting this to 0.0 means the cone will be the line formed by the camera position and its view direction. Setting this to 1.0 means the cone encompasses the entire field of view of the camera, essentially disabling the effect.
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {number}
* @default 0.3
*/
@@ -1786,9 +1643,7 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* Optimization option. Used when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control the starting screen space error relaxation for tiles outside the foveated cone.
* The screen space error will be raised starting with this value up to {@link Cesium3DTileset#maximumScreenSpaceError} based on the provided {@link Cesium3DTileset#foveatedInterpolationCallback}.
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {number}
* @default 0.0
*/
@@ -1817,12 +1672,9 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* Returns the extras
property at the top-level of the tileset JSON, which contains application specific metadata.
* Returns undefined
if extras
does not exist.
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {*}
* @readonly
- *
* @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification#specifying-extensions-and-application-specific-extras|Extras in the 3D Tiles specification.}
*/
extras: {
@@ -1833,9 +1685,7 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* The properties for managing image-based lighting on this tileset.
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {ImageBasedLighting}
*/
imageBasedLighting: {
@@ -1861,11 +1711,8 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* Indicates that only the tileset's vector tiles should be used for classification.
- *
* @memberof Cesium3DTileset.prototype
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @type {boolean}
* @default false
*/
@@ -1878,11 +1725,8 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* Whether vector tiles should keep decoded positions in memory.
* This is used with {@link Cesium3DTileFeature.getPolylinePositions}.
- *
* @memberof Cesium3DTileset.prototype
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @type {boolean}
* @default false
*/
@@ -1894,9 +1738,7 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* Determines whether the credits of the tileset will be displayed on the screen
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {boolean}
* @default false
*/
@@ -1926,9 +1768,7 @@ Object.defineProperties(Cesium3DTileset.prototype, {
* per-instance feature IDs are present, the instance feature IDs take
* priority.
*
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {string}
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -1958,9 +1798,7 @@ Object.defineProperties(Cesium3DTileset.prototype, {
* If both per-primitive and per-instance feature IDs are present, the
* instance feature IDs take priority.
*
- *
* @memberof Cesium3DTileset.prototype
- *
* @type {string}
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -1986,16 +1824,12 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* Creates a {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification|3D Tiles tileset},
* used for streaming massive heterogeneous 3D geospatial datasets, from a Cesium ion asset ID.
- *
* @param {number} assetId The Cesium ion asset id.
* @param {Cesium3DTileset.ConstructorOptions} [options] An object describing initialization options
* @returns {Promise}
- *
- * @exception {RuntimeError} When the tileset asset version is not 0.0, 1.0, or 1.1,
+ * @throws {RuntimeError} When the tileset asset version is not 0.0, 1.0, or 1.1,
* or when the tileset contains a required extension that is not supported.
- *
* @see Cesium3DTileset#fromUrl
- *
* @example
* // Load a Cesium3DTileset with a Cesium ion asset ID of 124624234
* try {
@@ -2017,16 +1851,12 @@ Cesium3DTileset.fromIonAssetId = async function (assetId, options) {
/**
* Creates a {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification|3D Tiles tileset},
* used for streaming massive heterogeneous 3D geospatial datasets.
- *
* @param {Resource|string} url The url to a tileset JSON file.
* @param {Cesium3DTileset.ConstructorOptions} [options] An object describing initialization options
* @returns {Promise}
- *
- * @exception {RuntimeError} When the tileset asset version is not 0.0, 1.0, or 1.1,
+ * @throws {RuntimeError} When the tileset asset version is not 0.0, 1.0, or 1.1,
* or when the tileset contains a required extension that is not supported.
- *
* @see Cesium3DTileset#fromIonAssetId
- *
* @example
* try {
* const tileset = await Cesium.Cesium3DTileset.fromUrl(
@@ -2036,7 +1866,6 @@ Cesium3DTileset.fromIonAssetId = async function (assetId, options) {
* } catch (error) {
* console.error(`Error creating tileset: ${error}`);
* }
- *
* @example
* // Common setting for the skipLevelOfDetail optimization
* const tileset = await Cesium.Cesium3DTileset.fromUrl(
@@ -2050,7 +1879,6 @@ Cesium3DTileset.fromIonAssetId = async function (assetId, options) {
* cullWithChildrenBounds: true
* });
* scene.primitives.add(tileset);
- *
* @example
* // Common settings for the dynamicScreenSpaceError optimization
* const tileset = await Cesium.Cesium3DTileset.fromUrl(
@@ -2165,10 +1993,11 @@ Cesium3DTileset.prototype.makeStyleDirty = function () {
/**
* Loads the main tileset JSON file or a tileset JSON file referenced from a tile.
- *
- * @exception {RuntimeError} When the tileset asset version is not 0.0, 1.0, or 1.1,
+ * @param resource
+ * @param tilesetJson
+ * @param parentTile
+ * @throws {RuntimeError} When the tileset asset version is not 0.0, 1.0, or 1.1,
* or when the tileset contains a required extension that is not supported.
- *
* @private
*/
Cesium3DTileset.prototype.loadTileset = function (
@@ -2246,13 +2075,11 @@ Cesium3DTileset.prototype.loadTileset = function (
* Make a {@link Cesium3DTile} for a specific tile. If the tile's header has implicit
* tiling (3D Tiles 1.1) or uses the 3DTILES_implicit_tiling
extension,
* it creates a placeholder tile instead for lazy evaluation of the implicit tileset.
- *
* @param {Cesium3DTileset} tileset The tileset
* @param {Resource} baseResource The base resource for the tileset
* @param {object} tileHeader The JSON header for the tile
* @param {Cesium3DTile} [parentTile] The parent tile of the new tile
* @returns {Cesium3DTile} The newly created tile
- *
* @private
*/
function makeTile(tileset, baseResource, tileHeader, parentTile) {
@@ -2312,10 +2139,10 @@ function makeTile(tileset, baseResource, tileHeader, parentTile) {
/**
* If tileset metadata is present, initialize the {@link Cesium3DTilesetMetadata}
* instance. This is asynchronous since metadata schemas may be external.
- *
* @param {Cesium3DTileset} tileset The tileset
+ * @param resource
* @param {object} tilesetJson The tileset JSON
- * @return {Promise} The loaded Cesium3DTilesetMetadata
+ * @returns {Promise} The loaded Cesium3DTilesetMetadata
* @private
*/
async function processMetadataExtension(resource, tilesetJson) {
@@ -2730,6 +2557,7 @@ function processUpdateHeight(tileset, tile, frameState) {
* Process tiles in the PROCESSING state so they will eventually move to the READY state.
* @private
* @param {Cesium3DTileset} tileset
+ * @param frameState
* @param {Cesium3DTile} tile
*/
function processTiles(tileset, frameState) {
@@ -3441,7 +3269,6 @@ Cesium3DTileset.prototype.updateForPass = function (
/**
* true
if the tileset JSON file lists the extension in extensionsUsed; otherwise, false
.
* @param {string} extensionName The name of the extension to check.
- *
* @returns {boolean} true
if the tileset JSON file lists the extension in extensionsUsed; otherwise, false
.
*/
Cesium3DTileset.prototype.hasExtension = function (extensionName) {
@@ -3457,9 +3284,7 @@ Cesium3DTileset.prototype.hasExtension = function (extensionName) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see Cesium3DTileset#destroy
*/
Cesium3DTileset.prototype.isDestroyed = function () {
@@ -3473,12 +3298,9 @@ Cesium3DTileset.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* tileset = tileset && tileset.destroy();
- *
* @see Cesium3DTileset#isDestroyed
*/
Cesium3DTileset.prototype.destroy = function () {
@@ -3530,9 +3352,7 @@ Cesium3DTileset.supportedExtensions = {
/**
* Checks to see if a given extension is supported by Cesium3DTileset. If
* the extension is not supported by Cesium3DTileset, it throws a RuntimeError.
- *
* @param {object} extensionsRequired The extensions we wish to check
- *
* @private
*/
Cesium3DTileset.checkSupportedExtensions = function (extensionsRequired) {
@@ -3551,11 +3371,9 @@ const scratchGetHeightCartographic = new Cartographic();
/**
* Get the height of the loaded surface at a given cartographic. This function will only take into account meshes for loaded tiles, not neccisarily the most detailed tiles available for a tileset. This function will always return undefined when sampling a point cloud.
- *
* @param {Cartographic} cartographic The cartographic for which to find the height.
* @param {Scene} scene The scene where visualization is taking place.
* @returns {number|undefined} The height of the cartographic or undefined if it could not be found.
- *
* @example
* const tileset = await Cesium.Cesium3DTileset.fromIonAssetId(124624234);
* scene.primitives.add(tileset);
@@ -3602,13 +3420,11 @@ Cesium3DTileset.prototype.getHeight = function (cartographic, scene) {
/**
* Calls the callback when a new tile is rendered that contains the given cartographic. The only parameter
* is the cartographic position on the tile.
- *
* @private
- *
* @param {Scene} scene The scene where visualization is taking place.
* @param {Cartographic} cartographic The cartographic position.
* @param {Function} callback The function to be called when a new tile is loaded.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to use.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid to use.
* @returns {Function} The function to remove this callback from the quadtree.
*/
Cesium3DTileset.prototype.updateHeight = function (
@@ -3649,12 +3465,10 @@ const scratchPickIntersection = new Cartesian3();
/**
* Find an intersection between a ray and the tileset surface that was rendered. The ray must be given in world coordinates.
- *
* @param {Ray} ray The ray to test for intersection.
* @param {FrameState} frameState The frame state.
* @param {Cartesian3|undefined} [result] The intersection or undefined
if none was found.
* @returns {Cartesian3|undefined} The intersection or undefined
if none was found.
- *
* @private
*/
Cesium3DTileset.prototype.pick = function (ray, frameState, result) {
@@ -3713,10 +3527,8 @@ Cesium3DTileset.prototype.pick = function (ray, frameState, result) {
/**
* Optimization option. Used as a callback when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control how much to raise the screen space error for tiles outside the foveated cone,
* interpolating between {@link Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation} and {@link Cesium3DTileset#maximumScreenSpaceError}.
- *
* @callback Cesium3DTileset.foveatedInterpolationCallback
* @default Math.lerp
- *
* @param {number} p The start value to interpolate.
* @param {number} q The end value to interpolate.
* @param {number} time The time of interpolation generally in the range [0.0, 1.0]
.
diff --git a/packages/engine/Source/Scene/Cesium3DTilesetBaseTraversal.js b/packages/engine/Source/Scene/Cesium3DTilesetBaseTraversal.js
index a3a012d04fae..8250115817a4 100644
--- a/packages/engine/Source/Scene/Cesium3DTilesetBaseTraversal.js
+++ b/packages/engine/Source/Scene/Cesium3DTilesetBaseTraversal.js
@@ -7,10 +7,8 @@ import Cesium3DTilesetTraversal from "./Cesium3DTilesetTraversal.js";
* Depth-first traversal that traverses all visible tiles and marks tiles for selection.
* A tile does not refine until all children are loaded.
* This is the traditional replacement refinement approach and is called the base traversal.
- *
* @alias Cesium3DTilesetBaseTraversal
- * @constructor
- *
+ * @class
* @private
*/
function Cesium3DTilesetBaseTraversal() {}
@@ -27,7 +25,6 @@ const emptyTraversal = {
/**
* Traverses a {@link Cesium3DTileset} to determine which tiles to load and render.
- *
* @private
* @param {Cesium3DTileset} tileset
* @param {FrameState} frameState
@@ -73,7 +70,6 @@ Cesium3DTilesetBaseTraversal.selectTiles = function (tileset, frameState) {
/**
* Mark a tile as selected if it has content available.
- *
* @private
* @param {Cesium3DTile} tile
* @param {FrameState} frameState
@@ -181,7 +177,6 @@ function updateAndPushChildren(tile, stack, frameState) {
* Depth-first traversal that traverses all visible tiles and marks tiles for selection.
* A tile does not refine until all children are loaded.
* This is the traditional replacement refinement approach and is called the base traversal.
- *
* @private
* @param {Cesium3DTile} root
* @param {FrameState} frameState
@@ -242,7 +237,6 @@ function executeTraversal(root, frameState) {
/**
* Depth-first traversal that checks if all nearest descendants with content are loaded.
* Ignores visibility.
- *
* @private
* @param {Cesium3DTile} root
* @param {FrameState} frameState
diff --git a/packages/engine/Source/Scene/Cesium3DTilesetCache.js b/packages/engine/Source/Scene/Cesium3DTilesetCache.js
index d4a8a5015159..668de70ff347 100644
--- a/packages/engine/Source/Scene/Cesium3DTilesetCache.js
+++ b/packages/engine/Source/Scene/Cesium3DTilesetCache.js
@@ -3,7 +3,6 @@ import DoublyLinkedList from "../Core/DoublyLinkedList.js";
/**
* Stores tiles with content loaded.
- *
* @private
*/
function Cesium3DTilesetCache() {
diff --git a/packages/engine/Source/Scene/Cesium3DTilesetHeatmap.js b/packages/engine/Source/Scene/Cesium3DTilesetHeatmap.js
index ec01db34d542..12fd4b48e432 100644
--- a/packages/engine/Source/Scene/Cesium3DTilesetHeatmap.js
+++ b/packages/engine/Source/Scene/Cesium3DTilesetHeatmap.js
@@ -5,16 +5,15 @@ import CesiumMath from "../Core/Math.js";
/**
* A heatmap colorizer in a {@link Cesium3DTileset}. A tileset can colorize its visible tiles in a heatmap style.
- *
+ * @param tilePropertyName
* @alias Cesium3DTilesetHeatmap
- * @constructor
+ * @class
* @private
*/
function Cesium3DTilesetHeatmap(tilePropertyName) {
/**
* The tile variable to track for heatmap colorization.
* Tile's will be colorized relative to the other visible tile's values for this variable.
- *
* @type {string}
*/
this.tilePropertyName = tilePropertyName;
@@ -35,6 +34,8 @@ function Cesium3DTilesetHeatmap(tilePropertyName) {
/**
* Convert to a usable heatmap value (i.e. a number). Ensures that tile values that aren't stored as numbers can be used for colorization.
+ * @param tileValue
+ * @param tilePropertyName
* @private
*/
function getHeatmapValue(tileValue, tilePropertyName) {
@@ -49,7 +50,6 @@ function getHeatmapValue(tileValue, tilePropertyName) {
/**
* Sets the reference minimum and maximum for the variable name. Converted to numbers before they are stored.
- *
* @param {object} minimum The minimum reference value.
* @param {object} maximum The maximum reference value.
* @param {string} tilePropertyName The tile variable that will use these reference values when it is colorized.
diff --git a/packages/engine/Source/Scene/Cesium3DTilesetMetadata.js b/packages/engine/Source/Scene/Cesium3DTilesetMetadata.js
index 8c2df573bfb2..0bead2148605 100644
--- a/packages/engine/Source/Scene/Cesium3DTilesetMetadata.js
+++ b/packages/engine/Source/Scene/Cesium3DTilesetMetadata.js
@@ -13,13 +13,11 @@ import TilesetMetadata from "./TilesetMetadata.js";
* This object represents the tileset JSON (3D Tiles 1.1) or the 3DTILES_metadata
object that contains
* the schema ({@link MetadataSchema}), tileset metadata ({@link TilesetMetadata}), group metadata (dictionary of {@link GroupMetadata}), and metadata statistics (dictionary)
*
- *
* @param {object} options Object with the following properties:
* @param {object} options.metadataJson Either the tileset JSON (3D Tiles 1.1) or the 3DTILES_metadata
extension object that contains the tileset metadata.
* @param {MetadataSchema} options.schema The parsed schema.
- *
* @alias Cesium3DTilesetMetadata
- * @constructor
+ * @class
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -94,7 +92,6 @@ function Cesium3DTilesetMetadata(options) {
Object.defineProperties(Cesium3DTilesetMetadata.prototype, {
/**
* Schema containing classes and enums.
- *
* @memberof Cesium3DTilesetMetadata.prototype
* @type {MetadataSchema}
* @readonly
@@ -108,7 +105,6 @@ Object.defineProperties(Cesium3DTilesetMetadata.prototype, {
/**
* Metadata about groups of content.
- *
* @memberof Cesium3DTilesetMetadata.prototype
* @type {GroupMetadata[]}
* @readonly
@@ -123,7 +119,6 @@ Object.defineProperties(Cesium3DTilesetMetadata.prototype, {
/**
* The IDs of the group metadata in the corresponding groups dictionary.
* Only populated if using the legacy schema.
- *
* @memberof Cesium3DTilesetMetadata.prototype
* @type {}
* @readonly
@@ -137,7 +132,6 @@ Object.defineProperties(Cesium3DTilesetMetadata.prototype, {
/**
* Metadata about the tileset as a whole.
- *
* @memberof Cesium3DTilesetMetadata.prototype
* @type {TilesetMetadata}
* @readonly
@@ -155,7 +149,6 @@ Object.defineProperties(Cesium3DTilesetMetadata.prototype, {
* See the {@link https://github.com/CesiumGS/3d-tiles/blob/main/extensions/3DTILES_metadata/schema/statistics.schema.json|statistics schema reference}
* in the 3D Tiles spec for the full set of properties.
*
- *
* @memberof Cesium3DTilesetMetadata.prototype
* @type {object}
* @readonly
@@ -169,7 +162,6 @@ Object.defineProperties(Cesium3DTilesetMetadata.prototype, {
/**
* Extra user-defined properties.
- *
* @memberof Cesium3DTilesetMetadata.prototype
* @type {*}
* @readonly
@@ -183,7 +175,6 @@ Object.defineProperties(Cesium3DTilesetMetadata.prototype, {
/**
* An object containing extensions.
- *
* @memberof Cesium3DTilesetMetadata.prototype
* @type {object}
* @readonly
diff --git a/packages/engine/Source/Scene/Cesium3DTilesetMostDetailedTraversal.js b/packages/engine/Source/Scene/Cesium3DTilesetMostDetailedTraversal.js
index 8645642a852f..b9650af077b4 100644
--- a/packages/engine/Source/Scene/Cesium3DTilesetMostDetailedTraversal.js
+++ b/packages/engine/Source/Scene/Cesium3DTilesetMostDetailedTraversal.js
@@ -6,10 +6,8 @@ import Cesium3DTilesetTraversal from "./Cesium3DTilesetTraversal.js";
/**
* Traversal that loads all leaves that intersect the camera frustum.
* Used to determine ray-tileset intersections during a pickFromRayMostDetailed call.
- *
* @alias Cesium3DTilesetMostDetailedTraversal
- * @constructor
- *
+ * @class
* @private
*/
function Cesium3DTilesetMostDetailedTraversal() {}
@@ -21,7 +19,6 @@ const traversal = {
/**
* Traverses a {@link Cesium3DTileset} to determine which tiles to load and render.
- *
* @private
* @param {Cesium3DTileset} tileset
* @param {FrameState} frameState
diff --git a/packages/engine/Source/Scene/Cesium3DTilesetSkipTraversal.js b/packages/engine/Source/Scene/Cesium3DTilesetSkipTraversal.js
index 81e18c41e78c..229ca6097923 100644
--- a/packages/engine/Source/Scene/Cesium3DTilesetSkipTraversal.js
+++ b/packages/engine/Source/Scene/Cesium3DTilesetSkipTraversal.js
@@ -6,10 +6,8 @@ import Cesium3DTilesetTraversal from "./Cesium3DTilesetTraversal.js";
/**
* Depth-first traversal that traverses all visible tiles and marks tiles for selection.
* Allows for skipping levels of the tree and rendering children and parent tiles simultaneously.
- *
* @alias Cesium3DTilesetSkipTraversal
- * @constructor
- *
+ * @class
* @private
*/
function Cesium3DTilesetSkipTraversal() {}
@@ -35,7 +33,6 @@ const descendantSelectionDepth = 2;
/**
* Traverses a {@link Cesium3DTileset} to determine which tiles to load and render.
- *
* @private
* @param {Cesium3DTileset} tileset
* @param {FrameState} frameState
@@ -86,7 +83,6 @@ Cesium3DTilesetSkipTraversal.selectTiles = function (tileset, frameState) {
/**
* Mark descendant tiles for rendering, and update as needed
- *
* @private
* @param {Cesium3DTile} root
* @param {FrameState} frameState
@@ -122,7 +118,6 @@ function selectDescendants(root, frameState) {
* Mark a tile as selected if it has content available.
* If its content is not available, and we are skipping levels of detail,
* select an ancestor or descendant tile instead
- *
* @private
* @param {Cesium3DTile} tile
* @param {FrameState} frameState
@@ -144,7 +139,6 @@ function selectDesiredTile(tile, frameState) {
/**
* Update links to the ancestor tiles that have content
- *
* @private
* @param {Cesium3DTile} tile
* @param {FrameState} frameState
@@ -176,7 +170,6 @@ function updateTileAncestorContentLinks(tile, frameState) {
/**
* Determine if a tile has reached the limit of level of detail skipping.
* If so, it should _not_ be skipped: it should be loaded and rendered
- *
* @private
* @param {Cesium3DTileset} tileset
* @param {Cesium3DTile} tile
@@ -231,7 +224,6 @@ function updateAndPushChildren(tile, stack, frameState) {
/**
* Determine if a tile is part of the base traversal.
* If not, this tile could be considered for level of detail skipping
- *
* @private
* @param {Cesium3DTile} tile
* @param {number} baseScreenSpaceError
@@ -258,7 +250,6 @@ function inBaseTraversal(tile, baseScreenSpaceError) {
* Tiles that have a greater screen space error than the base screen space error are part of the base traversal,
* all other tiles are part of the skip traversal. The skip traversal allows for skipping levels of the tree
* and rendering children and parent tiles simultaneously.
- *
* @private
* @param {Cesium3DTile} root
* @param {FrameState} frameState
@@ -349,7 +340,6 @@ function executeTraversal(root, frameState) {
*
* NOTE: 3D Tiles uses 3 bits from the stencil buffer meaning this will not work when there is a chain of
* selected tiles that is deeper than 7. This is not very likely.
- *
* @private
* @param {Cesium3DTile} root
* @param {FrameState} frameState
diff --git a/packages/engine/Source/Scene/Cesium3DTilesetTraversal.js b/packages/engine/Source/Scene/Cesium3DTilesetTraversal.js
index 57dea371ce94..99fc27c792fe 100644
--- a/packages/engine/Source/Scene/Cesium3DTilesetTraversal.js
+++ b/packages/engine/Source/Scene/Cesium3DTilesetTraversal.js
@@ -7,22 +7,18 @@ import Cesium3DTileRefine from "./Cesium3DTileRefine.js";
/**
* Traverses a {@link Cesium3DTileset} to determine which tiles to load and render.
* This type describes an interface and is not intended to be instantiated directly.
- *
* @alias Cesium3DTilesetTraversal
- * @constructor
+ * @class
* @abstract
- *
* @see Cesium3DTilesetBaseTraversal
* @see Cesium3DTilesetSkipTraversal
* @see Cesium3DTilesetMostDetailedTraversal
- *
* @private
*/
function Cesium3DTilesetTraversal() {}
/**
* Traverses a {@link Cesium3DTileset} to determine which tiles to load and render.
- *
* @private
* @param {Cesium3DTileset} tileset
* @param {FrameState} frameState
@@ -33,7 +29,6 @@ Cesium3DTilesetTraversal.selectTiles = function (tileset, frameState) {
/**
* Sort by farthest child first since this is going on a stack
- *
* @private
* @param {Cesium3DTile} a
* @param {Cesium3DTile} b
@@ -50,7 +45,6 @@ Cesium3DTilesetTraversal.sortChildrenByDistanceToCamera = function (a, b) {
/**
* Determine if a tile can and should be traversed for children tiles that
* would contribute to rendering the current view
- *
* @private
* @param {Cesium3DTile} tile
* @returns {boolean}
@@ -69,7 +63,6 @@ Cesium3DTilesetTraversal.canTraverse = function (tile) {
/**
* Mark a tile as selected, and add it to the tileset's list of selected tiles
- *
* @private
* @param {Cesium3DTile} tile
* @param {FrameState} frameState
@@ -123,7 +116,6 @@ Cesium3DTilesetTraversal.touchTile = function (tile, frameState) {
/**
* Add a tile to the list of requested tiles, if appropriate
- *
* @private
* @param {Cesium3DTile} tile
* @param {FrameState} frameState
@@ -153,7 +145,6 @@ Cesium3DTilesetTraversal.loadTile = function (tile, frameState) {
/**
* Prevent unnecessary loads while camera is moving by getting the ratio of travel distance to tile size.
- *
* @private
* @param {Cesium3DTile} tile
* @param {FrameState} frameState
@@ -184,7 +175,6 @@ function isOnScreenLongEnough(tile, frameState) {
/**
* Reset some of the tile's flags and re-evaluate visibility and priority
- *
* @private
* @param {Cesium3DTile} tile
* @param {FrameState} frameState
diff --git a/packages/engine/Source/Scene/CircleEmitter.js b/packages/engine/Source/Scene/CircleEmitter.js
index 4fe04e5201bb..f0a5a5d35610 100644
--- a/packages/engine/Source/Scene/CircleEmitter.js
+++ b/packages/engine/Source/Scene/CircleEmitter.js
@@ -6,11 +6,9 @@ import CesiumMath from "../Core/Math.js";
/**
* A ParticleEmitter that emits particles from a circle.
* Particles will be positioned within a circle and have initial velocities going along the z vector.
- *
* @alias CircleEmitter
- * @constructor
- *
- * @param {number} [radius=1.0] The radius of the circle in meters.
+ * @class
+ * @param {number} [radius] The radius of the circle in meters.
*/
function CircleEmitter(radius) {
radius = defaultValue(radius, 1.0);
@@ -44,7 +42,6 @@ Object.defineProperties(CircleEmitter.prototype, {
/**
* Initializes the given {@link Particle} by setting it's position and velocity.
- *
* @private
* @param {Particle} particle The particle to initialize.
*/
diff --git a/packages/engine/Source/Scene/ClassificationPrimitive.js b/packages/engine/Source/Scene/ClassificationPrimitive.js
index 170b01a83a9f..b3d90e275065 100644
--- a/packages/engine/Source/Scene/ClassificationPrimitive.js
+++ b/packages/engine/Source/Scene/ClassificationPrimitive.js
@@ -45,21 +45,19 @@ import StencilOperation from "./StencilOperation.js";
* Geometries that follow the surface of the ellipsoid, such as {@link CircleGeometry}, {@link CorridorGeometry}, {@link EllipseGeometry}, {@link PolygonGeometry}, and {@link RectangleGeometry},
* are also valid if they are extruded volumes; otherwise, they will not be rendered.
*
- *
* @alias ClassificationPrimitive
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {Array|GeometryInstance} [options.geometryInstances] The geometry instances to render. This can either be a single instance or an array of length one.
* @param {Appearance} [options.appearance] The appearance used to render the primitive. Defaults to PerInstanceColorAppearance when GeometryInstances have a color attribute.
- * @param {boolean} [options.show=true] Determines if this primitive will be shown.
- * @param {boolean} [options.vertexCacheOptimize=false] When true
, geometry vertices are optimized for the pre and post-vertex-shader caches.
- * @param {boolean} [options.interleave=false] When true
, geometry vertex attributes are interleaved, which can slightly improve rendering performance but increases load time.
- * @param {boolean} [options.compressVertices=true] When true
, the geometry vertices are compressed, which will save memory.
- * @param {boolean} [options.releaseGeometryInstances=true] When true
, the primitive does not keep a reference to the input geometryInstances
to save memory.
- * @param {boolean} [options.allowPicking=true] When true
, each geometry instance will only be pickable with {@link Scene#pick}. When false
, GPU memory is saved.
- * @param {boolean} [options.asynchronous=true] Determines if the primitive will be created asynchronously or block until ready. If false initializeTerrainHeights() must be called first.
- * @param {ClassificationType} [options.classificationType=ClassificationType.BOTH] Determines whether terrain, 3D Tiles or both will be classified.
+ * @param {boolean} [options.show] Determines if this primitive will be shown.
+ * @param {boolean} [options.vertexCacheOptimize] When true
, geometry vertices are optimized for the pre and post-vertex-shader caches.
+ * @param {boolean} [options.interleave] When true
, geometry vertex attributes are interleaved, which can slightly improve rendering performance but increases load time.
+ * @param {boolean} [options.compressVertices] When true
, the geometry vertices are compressed, which will save memory.
+ * @param {boolean} [options.releaseGeometryInstances] When true
, the primitive does not keep a reference to the input geometryInstances
to save memory.
+ * @param {boolean} [options.allowPicking] When true
, each geometry instance will only be pickable with {@link Scene#pick}. When false
, GPU memory is saved.
+ * @param {boolean} [options.asynchronous] Determines if the primitive will be created asynchronously or block until ready. If false initializeTerrainHeights() must be called first.
+ * @param {ClassificationType} [options.classificationType] Determines whether terrain, 3D Tiles or both will be classified.
* @param {boolean} [options.debugShowBoundingVolume=false] For debugging only. Determines if this primitive's commands' bounding spheres are shown.
* @param {boolean} [options.debugShowShadowVolume=false] For debugging only. Determines if the shadow volume for each geometry in the primitive is drawn. Must be true
on
* creation for the volumes to be created before the geometry is released or options.releaseGeometryInstance must be false
.
@@ -85,27 +83,21 @@ function ClassificationPrimitive(options) {
* If there is an instance with a differing color, a DeveloperError
will be thrown
* on the first attempt to render.
*
- *
* @readonly
* @type {Array|GeometryInstance}
- *
* @default undefined
*/
this.geometryInstances = geometryInstances;
/**
* Determines if the primitive will be shown. This affects all geometry
* instances in the primitive.
- *
* @type {boolean}
- *
* @default true
*/
this.show = defaultValue(options.show, true);
/**
* Determines whether terrain, 3D Tiles or both will be classified.
- *
* @type {ClassificationType}
- *
* @default ClassificationType.BOTH
*/
this.classificationType = defaultValue(
@@ -117,9 +109,7 @@ function ClassificationPrimitive(options) {
*
* Draws the bounding sphere for each draw command in the primitive.
*
- *
* @type {boolean}
- *
* @default false
*/
this.debugShowBoundingVolume = defaultValue(
@@ -131,9 +121,7 @@ function ClassificationPrimitive(options) {
*
* Draws the shadow volume for each geometry in the primitive.
*
- *
* @type {boolean}
- *
* @default false
*/
this.debugShowShadowVolume = defaultValue(
@@ -202,12 +190,9 @@ function ClassificationPrimitive(options) {
Object.defineProperties(ClassificationPrimitive.prototype, {
/**
* When true
, geometry vertices are optimized for the pre and post-vertex-shader caches.
- *
* @memberof ClassificationPrimitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
vertexCacheOptimize: {
@@ -218,12 +203,9 @@ Object.defineProperties(ClassificationPrimitive.prototype, {
/**
* Determines if geometry vertex attributes are interleaved, which can slightly improve rendering performance.
- *
* @memberof ClassificationPrimitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
interleave: {
@@ -234,12 +216,9 @@ Object.defineProperties(ClassificationPrimitive.prototype, {
/**
* When true
, the primitive does not keep a reference to the input geometryInstances
to save memory.
- *
* @memberof ClassificationPrimitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
releaseGeometryInstances: {
@@ -250,12 +229,9 @@ Object.defineProperties(ClassificationPrimitive.prototype, {
/**
* When true
, each geometry instance will only be pickable with {@link Scene#pick}. When false
, GPU memory is saved.
- *
* @memberof ClassificationPrimitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
allowPicking: {
@@ -266,12 +242,9 @@ Object.defineProperties(ClassificationPrimitive.prototype, {
/**
* Determines if the geometry instances will be created and batched on a web worker.
- *
* @memberof ClassificationPrimitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
asynchronous: {
@@ -282,12 +255,9 @@ Object.defineProperties(ClassificationPrimitive.prototype, {
/**
* When true
, geometry vertices are compressed, which will save memory.
- *
* @memberof ClassificationPrimitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
compressVertices: {
@@ -300,9 +270,7 @@ Object.defineProperties(ClassificationPrimitive.prototype, {
* Determines if the primitive is complete and ready to render. If this property is
* true, the primitive will be rendered the next time that {@link ClassificationPrimitive#update}
* is called.
- *
* @memberof ClassificationPrimitive.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -332,7 +300,6 @@ Object.defineProperties(ClassificationPrimitive.prototype, {
/**
* Determines if ClassificationPrimitive rendering is supported.
- *
* @param {Scene} scene The scene.
* @returns {boolean} true
if ClassificationPrimitives are supported; otherwise, returns false
*/
@@ -1042,10 +1009,10 @@ function updateAndQueueCommands(
* Do not call this function directly. This is documented just to
* list the exceptions that may be propagated when the scene is rendered:
*
- *
- * @exception {DeveloperError} All instance geometries must have the same primitiveType.
- * @exception {DeveloperError} Appearance and material have a uniform with the same name.
- * @exception {DeveloperError} Not all of the geometry instances have the same color attribute.
+ * @param frameState
+ * @throws {DeveloperError} All instance geometries must have the same primitiveType.
+ * @throws {DeveloperError} Appearance and material have a uniform with the same name.
+ * @throws {DeveloperError} Not all of the geometry instances have the same color attribute.
*/
ClassificationPrimitive.prototype.update = function (frameState) {
if (!defined(this._primitive) && !defined(this.geometryInstances)) {
@@ -1328,12 +1295,9 @@ ClassificationPrimitive.prototype.update = function (frameState) {
/**
* Returns the modifiable per-instance attributes for a {@link GeometryInstance}.
- *
* @param {*} id The id of the {@link GeometryInstance}.
* @returns {object} The typed array in the attribute's format or undefined if the is no instance with id.
- *
- * @exception {DeveloperError} must call update before calling getGeometryInstanceAttributes.
- *
+ * @throws {DeveloperError} must call update before calling getGeometryInstanceAttributes.
* @example
* const attributes = primitive.getGeometryInstanceAttributes('an id');
* attributes.color = Cesium.ColorGeometryInstanceAttribute.toValue(Cesium.Color.AQUA);
@@ -1358,9 +1322,7 @@ ClassificationPrimitive.prototype.getGeometryInstanceAttributes = function (
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see ClassificationPrimitive#destroy
*/
ClassificationPrimitive.prototype.isDestroyed = function () {
@@ -1375,12 +1337,9 @@ ClassificationPrimitive.prototype.isDestroyed = function () {
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
*
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* e = e && e.destroy();
- *
* @see ClassificationPrimitive#isDestroyed
*/
ClassificationPrimitive.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/ClassificationType.js b/packages/engine/Source/Scene/ClassificationType.js
index 55fb1fe18206..98fc86854dd8 100644
--- a/packages/engine/Source/Scene/ClassificationType.js
+++ b/packages/engine/Source/Scene/ClassificationType.js
@@ -1,26 +1,22 @@
/**
* Whether a classification affects terrain, 3D Tiles or both.
- *
* @enum {number}
*/
const ClassificationType = {
/**
* Only terrain will be classified.
- *
* @type {number}
* @constant
*/
TERRAIN: 0,
/**
* Only 3D Tiles will be classified.
- *
* @type {number}
* @constant
*/
CESIUM_3D_TILE: 1,
/**
* Both terrain and 3D Tiles will be classified.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Scene/ClippingPlane.js b/packages/engine/Source/Scene/ClippingPlane.js
index 603ba0309a02..3f9a8764f9a0 100644
--- a/packages/engine/Source/Scene/ClippingPlane.js
+++ b/packages/engine/Source/Scene/ClippingPlane.js
@@ -5,10 +5,8 @@ import defined from "../Core/defined.js";
/**
* A Plane in Hessian Normal form to be used with {@link ClippingPlaneCollection}.
* Compatible with mathematics functions in {@link Plane}
- *
* @alias ClippingPlane
- * @constructor
- *
+ * @class
* @param {Cartesian3} normal The plane's normal (normalized).
* @param {number} distance The shortest distance from the origin to the plane. The sign of
* distance
determines which side of the plane the origin
@@ -35,7 +33,6 @@ Object.defineProperties(ClippingPlane.prototype, {
* is on. If distance
is positive, the origin is in the half-space
* in the direction of the normal; if negative, the origin is in the half-space
* opposite to the normal; if zero, the plane passes through the origin.
- *
* @type {number}
* @memberof ClippingPlane.prototype
*/
@@ -55,7 +52,6 @@ Object.defineProperties(ClippingPlane.prototype, {
},
/**
* The plane's normal.
- *
* @type {Cartesian3}
* @memberof ClippingPlane.prototype
*/
@@ -81,7 +77,6 @@ Object.defineProperties(ClippingPlane.prototype, {
/**
* Create a ClippingPlane from a Plane object.
- *
* @param {Plane} plane The plane containing parameters to copy
* @param {ClippingPlane} [result] The object on which to store the result
* @returns {ClippingPlane} The ClippingPlane generated from the plane's parameters.
@@ -120,7 +115,8 @@ ClippingPlane.clone = function (clippingPlane, result) {
*
* const clippingPlane = new ClippingPlane(...);
* clippingPlane.normal.z = -1.0;
- *
+ * @param normal
+ * @param clippingPlane
* @private
*/
function UpdateChangedCartesian3(normal, clippingPlane) {
diff --git a/packages/engine/Source/Scene/ClippingPlaneCollection.js b/packages/engine/Source/Scene/ClippingPlaneCollection.js
index c9c9d84a3cfa..158f7af3b99e 100644
--- a/packages/engine/Source/Scene/ClippingPlaneCollection.js
+++ b/packages/engine/Source/Scene/ClippingPlaneCollection.js
@@ -29,21 +29,17 @@ import ClippingPlane from "./ClippingPlane.js";
*
* For 3D Tiles, the root tile's transform is used to position the clipping planes. If a transform is not defined, the root tile's {@link Cesium3DTile#boundingSphere} is used instead.
*
- *
* @alias ClippingPlaneCollection
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {ClippingPlane[]} [options.planes=[]] An array of {@link ClippingPlane} objects used to selectively disable rendering on the outside of each plane.
- * @param {boolean} [options.enabled=true] Determines whether the clipping planes are active.
- * @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The 4x4 transformation matrix specifying an additional transform relative to the clipping planes original coordinate system.
- * @param {boolean} [options.unionClippingRegions=false] If true, a region will be clipped if it is on the outside of any plane in the collection. Otherwise, a region will only be clipped if it is on the outside of every plane.
- * @param {Color} [options.edgeColor=Color.WHITE] The color applied to highlight the edge along which an object is clipped.
- * @param {number} [options.edgeWidth=0.0] The width, in pixels, of the highlight applied to the edge along which an object is clipped.
- *
+ * @param {ClippingPlane[]} [options.planes] An array of {@link ClippingPlane} objects used to selectively disable rendering on the outside of each plane.
+ * @param {boolean} [options.enabled] Determines whether the clipping planes are active.
+ * @param {Matrix4} [options.modelMatrix] The 4x4 transformation matrix specifying an additional transform relative to the clipping planes original coordinate system.
+ * @param {boolean} [options.unionClippingRegions] If true, a region will be clipped if it is on the outside of any plane in the collection. Otherwise, a region will only be clipped if it is on the outside of every plane.
+ * @param {Color} [options.edgeColor] The color applied to highlight the edge along which an object is clipped.
+ * @param {number} [options.edgeWidth] The width, in pixels, of the highlight applied to the edge along which an object is clipped.
* @demo {@link https://sandcastle.cesium.com/?src=3D%20Tiles%20Clipping%20Planes.html|Clipping 3D Tiles and glTF models.}
* @demo {@link https://sandcastle.cesium.com/?src=Terrain%20Clipping%20Planes.html|Clipping the Globe.}
- *
* @example
* // This clipping plane's distance is positive, which means its normal
* // is facing the origin. This will clip everything that is behind
@@ -80,7 +76,6 @@ function ClippingPlaneCollection(options) {
/**
* The 4x4 transformation matrix specifying an additional transform relative to the clipping planes
* original coordinate system.
- *
* @type {Matrix4}
* @default Matrix4.IDENTITY
*/
@@ -90,7 +85,6 @@ function ClippingPlaneCollection(options) {
/**
* The color applied to highlight the edge along which an object is clipped.
- *
* @type {Color}
* @default Color.WHITE
*/
@@ -98,7 +92,6 @@ function ClippingPlaneCollection(options) {
/**
* The width, in pixels, of the highlight applied to the edge along which an object is clipped.
- *
* @type {number}
* @default 0.0
*/
@@ -161,7 +154,6 @@ Object.defineProperties(ClippingPlaneCollection.prototype, {
* Returns the number of planes in this collection. This is commonly used with
* {@link ClippingPlaneCollection#get} to iterate over all the planes
* in the collection.
- *
* @memberof ClippingPlaneCollection.prototype
* @type {number}
* @readonly
@@ -176,7 +168,6 @@ Object.defineProperties(ClippingPlaneCollection.prototype, {
* If true, a region will be clipped if it is on the outside of any plane in the
* collection. Otherwise, a region will only be clipped if it is on the
* outside of every plane.
- *
* @memberof ClippingPlaneCollection.prototype
* @type {boolean}
* @default false
@@ -198,7 +189,6 @@ Object.defineProperties(ClippingPlaneCollection.prototype, {
/**
* If true, clipping will be enabled.
- *
* @memberof ClippingPlaneCollection.prototype
* @type {boolean}
* @default true
@@ -217,7 +207,6 @@ Object.defineProperties(ClippingPlaneCollection.prototype, {
/**
* Returns a texture containing packed, untransformed clipping planes.
- *
* @memberof ClippingPlaneCollection.prototype
* @type {Texture}
* @readonly
@@ -231,7 +220,6 @@ Object.defineProperties(ClippingPlaneCollection.prototype, {
/**
* A reference to the ClippingPlaneCollection's owner, if any.
- *
* @memberof ClippingPlaneCollection.prototype
* @readonly
* @private
@@ -247,7 +235,6 @@ Object.defineProperties(ClippingPlaneCollection.prototype, {
*
* Clipping mode is encoded in the sign of the number, which is just the plane count.
* If this value changes, then shader regeneration is necessary.
- *
* @memberof ClippingPlaneCollection.prototype
* @returns {number} A Number that describes the ClippingPlaneCollection's state.
* @readonly
@@ -275,9 +262,7 @@ function setIndexDirty(collection, index) {
* Adds the specified {@link ClippingPlane} to the collection to be used to selectively disable rendering
* on the outside of each plane. Use {@link ClippingPlaneCollection#unionClippingRegions} to modify
* how modify the clipping behavior of multiple planes.
- *
* @param {ClippingPlane} plane The ClippingPlane to add to the collection.
- *
* @see ClippingPlaneCollection#unionClippingRegions
* @see ClippingPlaneCollection#remove
* @see ClippingPlaneCollection#removeAll
@@ -302,10 +287,8 @@ ClippingPlaneCollection.prototype.add = function (plane) {
* it to the left, changing their indices. This function is commonly used with
* {@link ClippingPlaneCollection#length} to iterate over all the planes
* in the collection.
- *
* @param {number} index The zero-based index of the plane.
* @returns {ClippingPlane} The ClippingPlane at the specified index.
- *
* @see ClippingPlaneCollection#length
*/
ClippingPlaneCollection.prototype.get = function (index) {
@@ -329,10 +312,8 @@ function indexOf(planes, plane) {
/**
* Checks whether this collection contains a ClippingPlane equal to the given ClippingPlane.
- *
* @param {ClippingPlane} [clippingPlane] The ClippingPlane to check for.
* @returns {boolean} true if this collection contains the ClippingPlane, false otherwise.
- *
* @see ClippingPlaneCollection#get
*/
ClippingPlaneCollection.prototype.contains = function (clippingPlane) {
@@ -341,10 +322,8 @@ ClippingPlaneCollection.prototype.contains = function (clippingPlane) {
/**
* Removes the first occurrence of the given ClippingPlane from the collection.
- *
* @param {ClippingPlane} clippingPlane
* @returns {boolean} true
if the plane was removed; false
if the plane was not found in the collection.
- *
* @see ClippingPlaneCollection#add
* @see ClippingPlaneCollection#contains
* @see ClippingPlaneCollection#removeAll
@@ -384,7 +363,6 @@ ClippingPlaneCollection.prototype.remove = function (clippingPlane) {
/**
* Removes all planes from the collection.
- *
* @see ClippingPlaneCollection#add
* @see ClippingPlaneCollection#remove
*/
@@ -468,6 +446,7 @@ const textureResolutionScratch = new Cartesian2();
*
* Do not call this function directly.
*
+ * @param frameState
*/
ClippingPlaneCollection.prototype.update = function (frameState) {
let clippingPlanesTexture = this._clippingPlanesTexture;
@@ -611,7 +590,6 @@ const scratchPlane = new Plane(Cartesian3.UNIT_X, 0.0);
/**
* Determines the type intersection with the planes of this ClippingPlaneCollection instance and the specified {@link TileBoundingVolume}.
* @private
- *
* @param {object} tileBoundingVolume The volume to determine the intersection with the planes.
* @param {Matrix4} [transform] An optional, additional matrix to transform the plane to world coordinates.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire volume is on the side of the planes
@@ -659,7 +637,6 @@ ClippingPlaneCollection.prototype.computeIntersectionWithBoundingVolume = functi
/**
* Sets the owner for the input ClippingPlaneCollection if there wasn't another owner.
* Destroys the owner's previous ClippingPlaneCollection if setting is successful.
- *
* @param {ClippingPlaneCollection} [clippingPlaneCollection] A ClippingPlaneCollection (or undefined) being attached to an object
* @param {object} owner An Object that should receive the new ClippingPlaneCollection
* @param {string} key The Key for the Object to reference the ClippingPlaneCollection
@@ -691,7 +668,6 @@ ClippingPlaneCollection.setOwner = function (
/**
* Function for checking if the context will allow clipping planes with floating point textures.
- *
* @param {Context} context The Context that will contain clipped objects and clipping textures.
* @returns {boolean} true
if floating point textures can be used for clipping planes.
* @private
@@ -704,7 +680,6 @@ ClippingPlaneCollection.useFloatTexture = function (context) {
* Function for getting the clipping plane collection's texture resolution.
* If the ClippingPlaneCollection hasn't been updated, returns the resolution that will be
* allocated based on the current plane count.
- *
* @param {ClippingPlaneCollection} clippingPlaneCollection The clipping plane collection
* @param {Context} context The rendering context
* @param {Cartesian2} result A Cartesian2 for the result.
@@ -738,9 +713,7 @@ ClippingPlaneCollection.getTextureResolution = function (
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see ClippingPlaneCollection#destroy
*/
ClippingPlaneCollection.prototype.isDestroyed = function () {
@@ -754,13 +727,9 @@ ClippingPlaneCollection.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* clippingPlanes = clippingPlanes && clippingPlanes.destroy();
- *
* @see ClippingPlaneCollection#isDestroyed
*/
ClippingPlaneCollection.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/ClippingPolygon.js b/packages/engine/Source/Scene/ClippingPolygon.js
index 786a63f9981b..a1df7149b43b 100644
--- a/packages/engine/Source/Scene/ClippingPolygon.js
+++ b/packages/engine/Source/Scene/ClippingPolygon.js
@@ -11,12 +11,10 @@ import Rectangle from "../Core/Rectangle.js";
/**
* A geodesic polygon to be used with {@link ClippingPlaneCollection} for selectively hiding regions in a model, a 3D tileset, or the globe.
* @alias ClippingPolygon
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions A list of three or more Cartesian coordinates defining the outer ring of the clipping polygon.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84]
- *
+ * @param {Ellipsoid} [options.ellipsoid]
* @example
* const positions = Cesium.Cartesian3.fromRadiansArray([
* -1.3194369277314022,
@@ -53,7 +51,6 @@ function ClippingPolygon(options) {
Object.defineProperties(ClippingPolygon.prototype, {
/**
* Returns the total number of positions in the polygon, include any holes.
- *
* @memberof ClippingPolygon.prototype
* @type {number}
* @readonly
@@ -65,7 +62,6 @@ Object.defineProperties(ClippingPolygon.prototype, {
},
/**
* Returns the outer ring of positions.
- *
* @memberof ClippingPolygon.prototype
* @type {Cartesian3[]}
* @readonly
@@ -77,7 +73,6 @@ Object.defineProperties(ClippingPolygon.prototype, {
},
/**
* Returns the ellipsoid used to project the polygon onto surfaces when clipping.
- *
* @memberof ClippingPolygon.prototype
* @type {Ellipsoid}
* @readonly
@@ -116,7 +111,6 @@ ClippingPolygon.clone = function (polygon, result) {
/**
* Compares the provided ClippingPolygons and returns
* true
if they are equal, false
otherwise.
- *
* @param {Plane} left The first polygon.
* @param {Plane} right The second polygon.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -134,7 +128,6 @@ ClippingPolygon.equals = function (left, right) {
/**
* Computes a cartographic rectangle which encloses the polygon defined by the list of positions, including cases over the international date line and the poles.
- *
* @param {Rectangle} [result] An object in which to store the result.
* @returns {Rectangle} The result rectangle
*/
@@ -151,9 +144,7 @@ const scratchRectangle = new Rectangle();
const spherePointScratch = new Cartesian3();
/**
* Computes a rectangle with the spherical extents that encloses the polygon defined by the list of positions, including cases over the international date line and the poles.
- *
* @private
- *
* @param {Rectangle} [result] An object in which to store the result.
* @returns {Rectangle} The result rectangle with spherical extents.
*/
diff --git a/packages/engine/Source/Scene/ClippingPolygonCollection.js b/packages/engine/Source/Scene/ClippingPolygonCollection.js
index 6fb039f71200..beb9f8823212 100644
--- a/packages/engine/Source/Scene/ClippingPolygonCollection.js
+++ b/packages/engine/Source/Scene/ClippingPolygonCollection.js
@@ -26,15 +26,12 @@ import PolygonSignedDistanceFS from "../Shaders/PolygonSignedDistanceFS.js";
* inside or outside the specified list of {@link ClippingPolygon} objects for a single glTF model, 3D Tileset, or the globe.
*
* Clipping Polygons are only supported in WebGL 2 contexts.
- *
* @alias ClippingPolygonCollection
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {ClippingPolygon[]} [options.polygons=[]] An array of {@link ClippingPolygon} objects used to selectively disable rendering on the inside of each polygon.
- * @param {boolean} [options.enabled=true] Determines whether the clipping polygons are active.
- * @param {boolean} [options.inverse=false] If true, a region will be clipped if it is outside of every polygon in the collection. Otherwise, a region will only be clipped if it is on the inside of any polygon.
- *
+ * @param {ClippingPolygon[]} [options.polygons] An array of {@link ClippingPolygon} objects used to selectively disable rendering on the inside of each polygon.
+ * @param {boolean} [options.enabled] Determines whether the clipping polygons are active.
+ * @param {boolean} [options.inverse] If true, a region will be clipped if it is outside of every polygon in the collection. Otherwise, a region will only be clipped if it is on the inside of any polygon.
* @example
* const positions = Cesium.Cartesian3.fromRadiansArray([
* -1.3194369277314022,
@@ -65,7 +62,6 @@ function ClippingPolygonCollection(options) {
/**
* If true, clipping will be enabled.
- *
* @memberof ClippingPolygonCollection.prototype
* @type {boolean}
* @default true
@@ -76,7 +72,6 @@ function ClippingPolygonCollection(options) {
* If true, a region will be clipped if it is outside of every polygon in the
* collection. Otherwise, a region will only be clipped if it is
* inside of any polygon.
- *
* @memberof ClippingPolygonCollection.prototype
* @type {boolean}
* @default false
@@ -128,7 +123,6 @@ Object.defineProperties(ClippingPolygonCollection.prototype, {
* Returns the number of polygons in this collection. This is commonly used with
* {@link ClippingPolygonCollection#get} to iterate over all the polygons
* in the collection.
- *
* @memberof ClippingPolygonCollection.prototype
* @type {number}
* @readonly
@@ -141,7 +135,6 @@ Object.defineProperties(ClippingPolygonCollection.prototype, {
/**
* Returns the total number of positions in all polygons in the collection.
- *
* @memberof ClippingPolygonCollection.prototype
* @type {number}
* @readonly
@@ -155,7 +148,6 @@ Object.defineProperties(ClippingPolygonCollection.prototype, {
/**
* Returns a texture containing the packed computed spherical extents for each polygon
- *
* @memberof ClippingPolygonCollection.prototype
* @type {Texture}
* @readonly
@@ -169,7 +161,6 @@ Object.defineProperties(ClippingPolygonCollection.prototype, {
/**
* Returns the number of packed extents, which can be fewer than the number of polygons.
- *
* @memberof ClippingPolygonCollection.prototype
* @type {number}
* @readonly
@@ -183,7 +174,6 @@ Object.defineProperties(ClippingPolygonCollection.prototype, {
/**
* Returns the number of pixels needed in the texture containing the packed computed spherical extents for each polygon.
- *
* @memberof ClippingPolygonCollection.prototype
* @type {number}
* @readonly
@@ -197,7 +187,6 @@ Object.defineProperties(ClippingPolygonCollection.prototype, {
/**
* Returns the number of pixels needed in the texture containing the packed polygon positions.
- *
* @memberof ClippingPolygonCollection.prototype
* @type {number}
* @readonly
@@ -213,7 +202,6 @@ Object.defineProperties(ClippingPolygonCollection.prototype, {
/**
* Returns a texture containing the computed signed distance of each polygon.
- *
* @memberof ClippingPolygonCollection.prototype
* @type {Texture}
* @readonly
@@ -227,7 +215,6 @@ Object.defineProperties(ClippingPolygonCollection.prototype, {
/**
* A reference to the ClippingPolygonCollection's owner, if any.
- *
* @memberof ClippingPolygonCollection.prototype
* @readonly
* @private
@@ -243,7 +230,6 @@ Object.defineProperties(ClippingPolygonCollection.prototype, {
*
* Clipping mode is encoded in the sign of the number, which is just the total position count.
* If this value changes, then shader regeneration is necessary.
- *
* @memberof ClippingPolygonCollection.prototype
* @returns {number} A Number that describes the ClippingPolygonCollection's state.
* @readonly
@@ -260,10 +246,8 @@ Object.defineProperties(ClippingPolygonCollection.prototype, {
* Adds the specified {@link ClippingPolygon} to the collection to be used to selectively disable rendering
* on the inside of each polygon. Use {@link ClippingPolygonCollection#unionClippingRegions} to modify
* how modify the clipping behavior of multiple polygons.
- *
* @param {ClippingPolygon} polygon The ClippingPolygon to add to the collection.
* @returns {ClippingPolygon} The added ClippingPolygon.
- *
* @example
* const polygons = new Cesium.ClippingPolygonCollection();
*
@@ -283,9 +267,6 @@ Object.defineProperties(ClippingPolygonCollection.prototype, {
* polygons.add(new Cesium.ClippingPolygon({
* positions: positions
* }));
- *
- *
- *
* @see ClippingPolygonCollection#remove
* @see ClippingPolygonCollection#removeAll
*/
@@ -306,10 +287,8 @@ ClippingPolygonCollection.prototype.add = function (polygon) {
* it to the left, changing their indices. This function is commonly used with
* {@link ClippingPolygonCollection#length} to iterate over all the polygons
* in the collection.
- *
* @param {number} index The zero-based index of the polygon.
* @returns {ClippingPolygon} The ClippingPolygon at the specified index.
- *
* @see ClippingPolygonCollection#length
*/
ClippingPolygonCollection.prototype.get = function (index) {
@@ -322,10 +301,8 @@ ClippingPolygonCollection.prototype.get = function (index) {
/**
* Checks whether this collection contains a ClippingPolygon equal to the given ClippingPolygon.
- *
* @param {ClippingPolygon} polygon The ClippingPolygon to check for.
* @returns {boolean} true if this collection contains the ClippingPolygon, false otherwise.
- *
* @see ClippingPolygonCollection#get
*/
ClippingPolygonCollection.prototype.contains = function (polygon) {
@@ -338,10 +315,8 @@ ClippingPolygonCollection.prototype.contains = function (polygon) {
/**
* Removes the first occurrence of the given ClippingPolygon from the collection.
- *
* @param {ClippingPolygon} polygon
* @returns {boolean} true
if the polygon was removed; false
if the polygon was not found in the collection.
- *
* @see ClippingPolygonCollection#add
* @see ClippingPolygonCollection#contains
* @see ClippingPolygonCollection#removeAll
@@ -453,7 +428,6 @@ function getExtents(polygons) {
/**
* Removes all polygons from the collection.
- *
* @see ClippingPolygonCollection#add
* @see ClippingPolygonCollection#remove
*/
@@ -526,6 +500,7 @@ const textureResolutionScratch = new Cartesian2();
*
* Do not call this function directly.
*
+ * @param frameState
* @private
* @throws {RuntimeError} ClippingPolygonCollections are only supported for WebGL 2
*/
@@ -735,9 +710,8 @@ const scratchRectangleIntersection = new Rectangle();
/**
* Determines the type intersection with the polygons of this ClippingPolygonCollection instance and the specified {@link TileBoundingVolume}.
* @private
- *
* @param {object} tileBoundingVolume The volume to determine the intersection with the polygons.
- * @param {Ellipsoid} [ellipsoid=WGS84] The ellipsoid on which the bounding volumes are defined.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the bounding volumes are defined.
* @returns {Intersect} The intersection type: {@link Intersect.OUTSIDE} if the entire volume is not clipped, {@link Intersect.INSIDE}
* if the entire volume should be clipped, and {@link Intersect.INTERSECTING} if the volume intersects the polygons and will partially clipped.
*/
@@ -795,7 +769,6 @@ ClippingPolygonCollection.prototype.computeIntersectionWithBoundingVolume = func
/**
* Sets the owner for the input ClippingPolygonCollection if there wasn't another owner.
* Destroys the owner's previous ClippingPolygonCollection if setting is successful.
- *
* @param {ClippingPolygonCollection} [clippingPolygonsCollection] A ClippingPolygonCollection (or undefined) being attached to an object
* @param {object} owner An Object that should receive the new ClippingPolygonCollection
* @param {string} key The Key for the Object to reference the ClippingPolygonCollection
@@ -827,7 +800,6 @@ ClippingPolygonCollection.setOwner = function (
/**
* Function for checking if the context will allow clipping polygons, which require floating point textures.
- *
* @param {Scene|object} scene The scene that will contain clipped objects and clipping textures.
* @returns {boolean} true
if the context supports clipping polygons.
*/
@@ -839,7 +811,6 @@ ClippingPolygonCollection.isSupported = function (scene) {
* Function for getting packed texture resolution.
* If the ClippingPolygonCollection hasn't been updated, returns the resolution that will be
* allocated based on the provided needed pixels.
- *
* @param {Texture} texture The texture to be packed.
* @param {number} pixelsNeeded The number of pixels needed based on the current polygon count.
* @param {Cartesian2} result A Cartesian2 for the result.
@@ -871,7 +842,6 @@ ClippingPolygonCollection.getTextureResolution = function (
* Function for getting the clipping collection's signed distance texture resolution.
* If the ClippingPolygonCollection hasn't been updated, returns the resolution that will be
* allocated based on the current settings
- *
* @param {ClippingPolygonCollection} clippingPolygonCollection The clipping polygon collection
* @param {Cartesian2} result A Cartesian2 for the result.
* @returns {Cartesian2} The required resolution.
@@ -898,7 +868,6 @@ ClippingPolygonCollection.getClippingDistanceTextureResolution = function (
* Function for getting the clipping collection's extents texture resolution.
* If the ClippingPolygonCollection hasn't been updated, returns the resolution that will be
* allocated based on the current polygon count.
- *
* @param {ClippingPolygonCollection} clippingPolygonCollection The clipping polygon collection
* @param {Cartesian2} result A Cartesian2 for the result.
* @returns {Cartesian2} The required resolution.
@@ -927,9 +896,7 @@ ClippingPolygonCollection.getClippingExtentsTextureResolution = function (
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see ClippingPolygonCollection#destroy
*/
ClippingPolygonCollection.prototype.isDestroyed = function () {
@@ -943,13 +910,9 @@ ClippingPolygonCollection.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* clippingPolygons = clippingPolygons && clippingPolygons.destroy();
- *
* @see ClippingPolygonCollection#isDestroyed
*/
ClippingPolygonCollection.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/CloudCollection.js b/packages/engine/Source/Scene/CloudCollection.js
index 43af3d6266a7..c95433ffc518 100644
--- a/packages/engine/Source/Scene/CloudCollection.js
+++ b/packages/engine/Source/Scene/CloudCollection.js
@@ -74,21 +74,18 @@ const COLOR_INDEX = CumulusCloud.COLOR_INDEX;
* Clouds are added and removed from the collection using {@link CloudCollection#add}
* and {@link CloudCollection#remove}.
* @alias CloudCollection
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {boolean} [options.show=true] Whether to display the clouds.
- * @param {number} [options.noiseDetail=16.0] Desired amount of detail in the noise texture.
- * @param {number} [options.noiseOffset=Cartesian3.ZERO] Desired translation of data in noise texture.
- * @param {boolean} [options.debugBillboards=false] For debugging only. Determines if the billboards are rendered with an opaque color.
- * @param {boolean} [options.debugEllipsoids=false] For debugging only. Determines if the clouds will be rendered as opaque ellipsoids.
+ * @param {boolean} [options.show] Whether to display the clouds.
+ * @param {number} [options.noiseDetail] Desired amount of detail in the noise texture.
+ * @param {number} [options.noiseOffset] Desired translation of data in noise texture.
+ * @param {boolean} [options.debugBillboards] For debugging only. Determines if the billboards are rendered with an opaque color.
+ * @param {boolean} [options.debugEllipsoids] For debugging only. Determines if the clouds will be rendered as opaque ellipsoids.
* @see CloudCollection#add
* @see CloudCollection#remove
* @see CumulusCloud
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Clouds.html|Cesium Sandcastle Clouds Demo}
* @demo {@link https://sandcastle.cesium.com/index.html?src=Cloud%20Parameters.html|Cesium Sandcastle Cloud Parameters Demo}
- *
* @example
* // Create a cloud collection with two cumulus clouds
* const clouds = scene.primitives.add(new Cesium.CloudCollection());
@@ -101,7 +98,6 @@ const COLOR_INDEX = CumulusCloud.COLOR_INDEX;
* maximumSize: new Cesium.Cartesian3(15.0, 9.0, 9.0),
* slice: 0.5
* });
- *
*/
function CloudCollection(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -129,18 +125,16 @@ function CloudCollection(options) {
*
- *
* @type {number}
- *
* @default 16.0
*/
this.noiseDetail = defaultValue(options.noiseDetail, 16.0);
@@ -164,7 +158,6 @@ function CloudCollection(options) {
*
*
* @type {Cartesian3}
- *
* @default Cartesian3.ZERO
*/
this.noiseOffset = Cartesian3.clone(
@@ -194,7 +187,6 @@ function CloudCollection(options) {
/**
* Determines if billboards in this collection will be shown.
- *
* @type {boolean}
* @default true
*/
@@ -207,9 +199,7 @@ function CloudCollection(options) {
*
* Renders the billboards with one opaque color for the sake of debugging.
*
- *
* @type {boolean}
- *
* @default false
*/
this.debugBillboards = defaultValue(options.debugBillboards, false);
@@ -221,9 +211,7 @@ function CloudCollection(options) {
* Draws the clouds as opaque, monochrome ellipsoids for the sake of debugging.
* If debugBillboards
is also true, then the ellipsoids will draw on top of the billboards.
*
- *
* @type {boolean}
- *
* @default false
*/
this.debugEllipsoids = defaultValue(options.debugEllipsoids, false);
@@ -266,17 +254,12 @@ function destroyClouds(clouds) {
/**
* Creates and adds a cloud with the specified initial properties to the collection.
* The added cloud is returned so it can be modified or removed from the collection later.
- *
* @param {object}[options] A template describing the cloud's properties as shown in Example 1.
* @returns {CumulusCloud} The cloud that was added to the collection.
- *
* @performance Calling add
is expected constant time. However, the collection's vertex buffer
* is rewritten - an O(n)
operation that also incurs CPU to GPU overhead. For
* best performance, add as many clouds as possible before calling update
.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* // Example 1: Add a cumulus cloud, specifying all the default values.
* const c = clouds.add({
@@ -287,13 +270,11 @@ function destroyClouds(clouds) {
* slice: -1.0,
* cloudType : CloudType.CUMULUS
* });
- *
* @example
* // Example 2: Specify only the cloud's cartographic position.
* const c = clouds.add({
* position : Cesium.Cartesian3.fromDegrees(longitude, latitude, height)
* });
- *
* @see CloudCollection#remove
* @see CloudCollection#removeAll
*/
@@ -319,17 +300,12 @@ CloudCollection.prototype.add = function (options) {
/**
* Removes a cloud from the collection.
- *
* @param {CumulusCloud} cloud The cloud to remove.
* @returns {boolean} true
if the cloud was removed; false
if the cloud was not found in the collection.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* const c = clouds.add(...);
* clouds.remove(c); // Returns true
- *
* @see CloudCollection#add
* @see CloudCollection#removeAll
* @see CumulusCloud#show
@@ -348,17 +324,13 @@ CloudCollection.prototype.remove = function (cloud) {
/**
* Removes all clouds from the collection.
- *
* @performance O(n)
. It is more efficient to remove all the clouds
* from a collection and then add new ones than to create a new collection entirely.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* clouds.add(...);
* clouds.add(...);
* clouds.removeAll();
- *
* @see CloudCollection#add
* @see CloudCollection#remove
*/
@@ -401,10 +373,8 @@ CloudCollection.prototype._updateCloud = function (cloud, propertyChanged) {
/**
* Check whether this collection contains a given cloud.
- *
* @param {CumulusCloud} [cloud] The cloud to check for.
* @returns {boolean} true if this collection contains the cloud, false otherwise.
- *
* @see CloudCollection#get
*/
CloudCollection.prototype.contains = function (cloud) {
@@ -416,17 +386,12 @@ CloudCollection.prototype.contains = function (cloud) {
* and increase as clouds are added. Removing a cloud shifts all clouds after
* it to the left, changing their indices. This function is commonly used with
* {@link CloudCollection#length} to iterate over all the clouds in the collection.
- *
* @param {number} index The zero-based index of the cloud.
* @returns {CumulusCloud} The cloud at the specified index.
- *
* @performance Expected constant time. If clouds were removed from the collection and
* {@link CloudCollection#update} was not called, an implicit O(n)
* operation is performed.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* // Toggle the show property of every cloud in the collection
* const len = clouds.length;
@@ -434,7 +399,6 @@ CloudCollection.prototype.contains = function (cloud) {
* const c = clouds.get(i);
* c.show = !c.show;
* }
- *
* @see CloudCollection#length
*/
CloudCollection.prototype.get = function (index) {
@@ -946,6 +910,7 @@ function createDrawCommands(cloudCollection, frameState) {
}
/**
+ * @param frameState
* @private
*/
CloudCollection.prototype.update = function (frameState) {
@@ -1012,9 +977,7 @@ CloudCollection.prototype.update = function (frameState) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see CloudCollection#destroy
*/
CloudCollection.prototype.isDestroyed = function () {
@@ -1028,13 +991,9 @@ CloudCollection.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* clouds = clouds && clouds.destroy();
- *
* @see CloudCollection#isDestroyed
*/
CloudCollection.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/CloudType.js b/packages/engine/Source/Scene/CloudType.js
index bb7bbb741b9d..1fa21dd9051f 100644
--- a/packages/engine/Source/Scene/CloudType.js
+++ b/packages/engine/Source/Scene/CloudType.js
@@ -1,13 +1,11 @@
/**
* Specifies the type of the cloud that is added to a {@link CloudCollection} in {@link CloudCollection#add}.
- *
* @enum {number}
*/
const CloudType = {
/**
* Cumulus cloud.
- *
* @type {number}
* @constant
*/
@@ -16,10 +14,8 @@ const CloudType = {
/**
* Validates that the provided cloud type is a valid {@link CloudType}
- *
* @param {CloudType} cloudType The cloud type to validate.
* @returns {boolean} true
if the provided cloud type is a valid value; otherwise, false
.
- *
* @example
* if (!Cesium.CloudType.validate(cloudType)) {
* throw new Cesium.DeveloperError('cloudType must be a valid value.');
diff --git a/packages/engine/Source/Scene/ColorBlendMode.js b/packages/engine/Source/Scene/ColorBlendMode.js
index b2f5194da147..887fc9bd0c78 100644
--- a/packages/engine/Source/Scene/ColorBlendMode.js
+++ b/packages/engine/Source/Scene/ColorBlendMode.js
@@ -6,9 +6,7 @@ import CesiumMath from "../Core/Math.js";
* HIGHLIGHT multiplies the source color by the target color
* REPLACE replaces the source color with the target color
* MIX blends the source color and target color together
- *
* @enum {number}
- *
* @see Model.colorBlendMode
*/
const ColorBlendMode = {
@@ -18,6 +16,8 @@ const ColorBlendMode = {
};
/**
+ * @param colorBlendMode
+ * @param colorBlendAmount
* @private
*/
ColorBlendMode.getColorBlend = function (colorBlendMode, colorBlendAmount) {
diff --git a/packages/engine/Source/Scene/Composite3DTileContent.js b/packages/engine/Source/Scene/Composite3DTileContent.js
index 02be6c08ac6c..6b9c89a2af71 100644
--- a/packages/engine/Source/Scene/Composite3DTileContent.js
+++ b/packages/engine/Source/Scene/Composite3DTileContent.js
@@ -12,10 +12,12 @@ import RuntimeError from "../Core/RuntimeError.js";
*
* Implements the {@link Cesium3DTileContent} interface.
*
- *
+ * @param tileset
+ * @param tile
+ * @param resource
+ * @param contents
* @alias Composite3DTileContent
- * @constructor
- *
+ * @class
* @private
*/
function Composite3DTileContent(tileset, tile, resource, contents) {
@@ -129,9 +131,7 @@ Object.defineProperties(Composite3DTileContent.prototype, {
/**
* Returns true when the tile's content is ready to render; otherwise false
- *
* @memberof Composite3DTileContent.prototype
- *
* @type {boolean}
* @readonly
* @private
@@ -302,6 +302,8 @@ Composite3DTileContent.fromTileType = async function (
/**
* Part of the {@link Cesium3DTileContent} interface. Composite3DTileContent
* always returns false
. Instead call hasProperty
for a tile in the composite.
+ * @param batchId
+ * @param name
*/
Composite3DTileContent.prototype.hasProperty = function (batchId, name) {
return false;
@@ -310,6 +312,7 @@ Composite3DTileContent.prototype.hasProperty = function (batchId, name) {
/**
* Part of the {@link Cesium3DTileContent} interface. Composite3DTileContent
* always returns undefined
. Instead call getFeature
for a tile in the composite.
+ * @param batchId
*/
Composite3DTileContent.prototype.getFeature = function (batchId) {
return undefined;
@@ -350,12 +353,10 @@ Composite3DTileContent.prototype.update = function (tileset, frameState) {
/**
* Find an intersection between a ray and the tile content surface that was rendered. The ray must be given in world coordinates.
- *
* @param {Ray} ray The ray to test for intersection.
* @param {FrameState} frameState The frame state.
* @param {Cartesian3|undefined} [result] The intersection or undefined
if none was found.
* @returns {Cartesian3|undefined} The intersection or undefined
if none was found.
- *
* @private
*/
Composite3DTileContent.prototype.pick = function (ray, frameState, result) {
diff --git a/packages/engine/Source/Scene/ConditionsExpression.js b/packages/engine/Source/Scene/ConditionsExpression.js
index 1bed27442ace..23c0c0c90b7d 100644
--- a/packages/engine/Source/Scene/ConditionsExpression.js
+++ b/packages/engine/Source/Scene/ConditionsExpression.js
@@ -11,13 +11,10 @@ import Expression from "./Expression.js";
*
* Implements the {@link StyleExpression} interface.
*
- *
* @alias ConditionsExpression
- * @constructor
- *
+ * @class
* @param {object} [conditionsExpression] The conditions expression defined using the 3D Tiles Styling language.
* @param {object} [defines] Defines in the style.
- *
* @example
* const expression = new Cesium.ConditionsExpression({
* conditions : [
@@ -39,12 +36,9 @@ function ConditionsExpression(conditionsExpression, defines) {
Object.defineProperties(ConditionsExpression.prototype, {
/**
* Gets the conditions expression defined in the 3D Tiles Styling language.
- *
* @memberof ConditionsExpression.prototype
- *
* @type {object}
* @readonly
- *
* @default undefined
*/
conditionsExpression: {
@@ -89,7 +83,6 @@ function setRuntime(expression, defines) {
* object will be returned. If the result is a Cartesian2
, Cartesian3
, or Cartesian4
,
* a {@link Cartesian2}, {@link Cartesian3}, or {@link Cartesian4} object will be returned. If the result
argument is
* a {@link Color}, the {@link Cartesian4} value is converted to a {@link Color} and then returned.
- *
* @param {Cesium3DTileFeature} feature The feature whose properties may be used as variables in the expression.
* @param {object} [result] The object onto which to store the result.
* @returns {boolean|number|string|RegExp|Cartesian2|Cartesian3|Cartesian4|Color} The result of evaluating the expression.
@@ -134,14 +127,11 @@ ConditionsExpression.prototype.evaluateColor = function (feature, result) {
/**
* Gets the shader function for this expression.
* Returns undefined if the shader function can't be generated from this expression.
- *
* @param {string} functionSignature Signature of the generated function.
* @param {object} variableSubstitutionMap Maps variable names to shader variable names.
* @param {object} shaderState Stores information about the generated shader function, including whether it is translucent.
* @param {string} returnType The return type of the generated function.
- *
* @returns {string} The shader function.
- *
* @private
*/
ConditionsExpression.prototype.getShaderFunction = function (
@@ -187,9 +177,7 @@ ConditionsExpression.prototype.getShaderFunction = function (
/**
* Gets the variables used by the expression.
- *
* @returns {string[]} The variables used by the expression.
- *
* @private
*/
ConditionsExpression.prototype.getVariables = function () {
diff --git a/packages/engine/Source/Scene/ConeEmitter.js b/packages/engine/Source/Scene/ConeEmitter.js
index 49371c5e6d6d..5cba8683e937 100644
--- a/packages/engine/Source/Scene/ConeEmitter.js
+++ b/packages/engine/Source/Scene/ConeEmitter.js
@@ -8,11 +8,9 @@ const defaultAngle = CesiumMath.toRadians(30.0);
/**
* A ParticleEmitter that emits particles within a cone.
* Particles will be positioned at the tip of the cone and have initial velocities going towards the base.
- *
* @alias ConeEmitter
- * @constructor
- *
- * @param {number} [angle=Cesium.Math.toRadians(30.0)] The angle of the cone in radians.
+ * @class
+ * @param {number} [angle] The angle of the cone in radians.
*/
function ConeEmitter(angle) {
this._angle = defaultValue(angle, defaultAngle);
@@ -40,7 +38,6 @@ Object.defineProperties(ConeEmitter.prototype, {
/**
* Initializes the given {Particle} by setting it's position and velocity.
- *
* @private
* @param {Particle} particle The particle to initialize
*/
diff --git a/packages/engine/Source/Scene/ContentMetadata.js b/packages/engine/Source/Scene/ContentMetadata.js
index adc66fcd4ca7..3af16ff94f6d 100644
--- a/packages/engine/Source/Scene/ContentMetadata.js
+++ b/packages/engine/Source/Scene/ContentMetadata.js
@@ -8,13 +8,11 @@ import MetadataEntity from "./MetadataEntity.js";
*
* See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_metadata|3DTILES_metadata Extension} for 3D Tiles
*
- *
* @param {object} options Object with the following properties:
* @param {object} options.content Either the content metadata JSON (3D Tiles 1.1) or the extension JSON attached to the content.
* @param {MetadataClass} options.class The class that the content metadata conforms to.
- *
* @alias ContentMetadata
- * @constructor
+ * @class
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -37,7 +35,6 @@ function ContentMetadata(options) {
Object.defineProperties(ContentMetadata.prototype, {
/**
* The class that properties conform to.
- *
* @memberof ContentMetadata.prototype
* @type {MetadataClass}
* @readonly
@@ -51,7 +48,6 @@ Object.defineProperties(ContentMetadata.prototype, {
/**
* Extra user-defined properties.
- *
* @memberof ContentMetadata.prototype
* @type {object}
* @readonly
@@ -65,7 +61,6 @@ Object.defineProperties(ContentMetadata.prototype, {
/**
* An object containing extensions.
- *
* @memberof ContentMetadata.prototype
* @type {object}
* @readonly
@@ -80,7 +75,6 @@ Object.defineProperties(ContentMetadata.prototype, {
/**
* Returns whether the content has this property.
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {boolean} Whether the content has this property.
* @private
@@ -91,7 +85,6 @@ ContentMetadata.prototype.hasProperty = function (propertyId) {
/**
* Returns whether the content has a property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @returns {boolean} Whether the content has a property with the given semantic.
* @private
@@ -106,7 +99,6 @@ ContentMetadata.prototype.hasPropertyBySemantic = function (semantic) {
/**
* Returns an array of property IDs.
- *
* @param {string[]} [results] An array into which to store the results.
* @returns {string[]} The property IDs.
* @private
@@ -120,7 +112,6 @@ ContentMetadata.prototype.getPropertyIds = function (results) {
*
* If the property is normalized the normalized value is returned.
*
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {*} The value of the property or undefined
if the content does not have this property.
* @private
@@ -134,7 +125,6 @@ ContentMetadata.prototype.getProperty = function (propertyId) {
*
* If the property is normalized a normalized value must be provided to this function.
*
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @param {*} value The value of the property that will be copied.
* @returns {boolean} true
if the property was set, false
otherwise.
@@ -151,7 +141,6 @@ ContentMetadata.prototype.setProperty = function (propertyId, value) {
/**
* Returns a copy of the value of the property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @returns {*} The value of the property or undefined
if the content does not have this semantic.
* @private
@@ -166,7 +155,6 @@ ContentMetadata.prototype.getPropertyBySemantic = function (semantic) {
/**
* Sets the value of the property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @param {*} value The value of the property that will be copied.
* @returns {boolean} true
if the property was set, false
otherwise.
diff --git a/packages/engine/Source/Scene/CreditDisplay.js b/packages/engine/Source/Scene/CreditDisplay.js
index 8558dbc9fa63..a3643dfa06c3 100644
--- a/packages/engine/Source/Scene/CreditDisplay.js
+++ b/packages/engine/Source/Scene/CreditDisplay.js
@@ -15,10 +15,10 @@ const highlightColor = "#48b";
/**
* Used to sort the credits by frequency of appearance
* when they are later displayed.
- *
+ * @param credit
+ * @param count
* @alias CreditDisplay.CreditDisplayElement
- * @constructor
- *
+ * @class
* @private
*/
function CreditDisplayElement(credit, count) {
@@ -294,19 +294,15 @@ function appendCss(container) {
/**
* The credit display is responsible for displaying credits on screen.
- *
* @param {HTMLElement} container The HTML element where credits will be displayed
- * @param {string} [delimiter= ' • '] The string to separate text credits
- * @param {HTMLElement} [viewport=document.body] The HTML element that will contain the credits popup
- *
+ * @param {string} [delimiter] The string to separate text credits
+ * @param {HTMLElement} [viewport] The HTML element that will contain the credits popup
* @alias CreditDisplay
- * @constructor
- *
+ * @class
* @example
* // Add a credit with a tooltip, image and link to display onscreen
* const credit = new Cesium.Credit(` `, true);
* viewer.creditDisplay.addStaticCredit(credit);
- *
* @example
* // Add a credit with a plaintext link to display in the lightbox
* const credit = new Cesium.Credit('Cesium ');
@@ -427,9 +423,7 @@ function setCredit(creditDisplay, credits, credit, count) {
/**
* Adds a {@link Credit} that will show on screen or in the lightbox until
* the next frame. This is mostly for internal use. Use {@link CreditDisplay.addStaticCredit} to add a persistent credit to the screen.
- *
* @see CreditDisplay.addStaticCredit
- *
* @param {Credit} credit The credit to display in the next frame.
*/
CreditDisplay.prototype.addCreditToNextFrame = function (credit) {
@@ -459,14 +453,11 @@ CreditDisplay.prototype.addCreditToNextFrame = function (credit) {
/**
* Adds a {@link Credit} that will show on screen or in the lightbox until removed with {@link CreditDisplay.removeStaticCredit}.
- *
* @param {Credit} credit The credit to added
- *
* @example
* // Add a credit with a tooltip, image and link to display onscreen
* const credit = new Cesium.Credit(` `, true);
* viewer.creditDisplay.addStaticCredit(credit);
- *
* @example
* // Add a credit with a plaintext link to display in the lightbox
* const credit = new Cesium.Credit('Cesium ');
@@ -485,7 +476,6 @@ CreditDisplay.prototype.addStaticCredit = function (credit) {
/**
* Removes a static credit shown on screen or in the lightbox.
- *
* @param {Credit} credit The credit to be removed.
*/
CreditDisplay.prototype.removeStaticCredit = function (credit) {
@@ -590,8 +580,7 @@ CreditDisplay.prototype.endFrame = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
*/
CreditDisplay.prototype.destroy = function () {
this._lightbox.removeEventListener("click", this._hideLightbox, false);
@@ -607,7 +596,6 @@ CreditDisplay.prototype.destroy = function () {
/**
* Returns true if this object was destroyed; otherwise, false.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
*/
CreditDisplay.prototype.isDestroyed = function () {
diff --git a/packages/engine/Source/Scene/CullFace.js b/packages/engine/Source/Scene/CullFace.js
index 414ce811b228..1e7b8172f6ff 100644
--- a/packages/engine/Source/Scene/CullFace.js
+++ b/packages/engine/Source/Scene/CullFace.js
@@ -2,13 +2,11 @@ import WebGLConstants from "../Core/WebGLConstants.js";
/**
* Determines which triangles, if any, are culled.
- *
* @enum {number}
*/
const CullFace = {
/**
* Front-facing triangles are culled.
- *
* @type {number}
* @constant
*/
@@ -16,7 +14,6 @@ const CullFace = {
/**
* Back-facing triangles are culled.
- *
* @type {number}
* @constant
*/
@@ -24,7 +21,6 @@ const CullFace = {
/**
* Both front-facing and back-facing triangles are culled.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Scene/CumulusCloud.js b/packages/engine/Source/Scene/CumulusCloud.js
index d66dd964813f..7b6615ad7dda 100644
--- a/packages/engine/Source/Scene/CumulusCloud.js
+++ b/packages/engine/Source/Scene/CumulusCloud.js
@@ -16,21 +16,19 @@ import defined from "../Core/defined.js";
*
* Example cumulus clouds
*
+ * @param options
+ * @param cloudCollection
* @alias CumulusCloud
- *
* @performance Similar to {@link Billboard}, reading a property, e.g., {@link CumulusCloud#show},
* takes constant time. Assigning to a property is constant time but results in
* CPU to GPU traffic when {@link CloudCollection#update} is called. The per-cloud traffic is
* the same regardless of how many properties were updated. If most clouds in a collection need to be
* updated, it may be more efficient to clear the collection with {@link CloudCollection#removeAll}
* and add new clouds instead of modifying each one.
- *
* @see CloudCollection
* @see CloudCollection#add
- *
* @internalConstructor
* @class
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Cloud%20Parameters.html|Cesium Sandcastle Cloud Parameters Demo}
*/
function CumulusCloud(options, cloudCollection) {
@@ -150,7 +148,6 @@ Object.defineProperties(CumulusCloud.prototype, {
* and slice
properties.
* @memberof CumulusCloud.prototype
* @type {Cartesian2}
- *
* @see CumulusCloud#maximumSize
* @see CumulusCloud#slice
*/
@@ -207,7 +204,6 @@ Object.defineProperties(CumulusCloud.prototype, {
* To modify the billboard's actual size, modify the cloud's scale
property.
* @memberof CumulusCloud.prototype
* @type {Cartesian3}
- *
* @see CumulusCloud#scale
*/
maximumSize: {
@@ -283,15 +279,14 @@ Object.defineProperties(CumulusCloud.prototype, {
*
- *
* @memberof CumulusCloud.prototype
* @type {number}
* @default -1.0
diff --git a/packages/engine/Source/Scene/DebugAppearance.js b/packages/engine/Source/Scene/DebugAppearance.js
index 098eea16a602..5852a03c0ea2 100644
--- a/packages/engine/Source/Scene/DebugAppearance.js
+++ b/packages/engine/Source/Scene/DebugAppearance.js
@@ -10,20 +10,16 @@ import Appearance from "./Appearance.js";
* tangent
, and bitangent
, are scaled and biased
* from [-1.0, 1.0] to (-1.0, 1.0).
*
- *
* @alias DebugAppearance
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {string} options.attributeName The name of the attribute to visualize.
- * @param {boolean} [options.perInstanceAttribute=false] Boolean that determines whether this attribute is a per-instance geometry attribute.
- * @param {string} [options.glslDatatype='vec3'] The GLSL datatype of the attribute. Supported datatypes are float
, vec2
, vec3
, and vec4
.
+ * @param {boolean} [options.perInstanceAttribute] Boolean that determines whether this attribute is a per-instance geometry attribute.
+ * @param {string} [options.glslDatatype] The GLSL datatype of the attribute. Supported datatypes are float
, vec2
, vec3
, and vec4
.
* @param {string} [options.vertexShaderSource] Optional GLSL vertex shader source to override the default vertex shader.
* @param {string} [options.fragmentShaderSource] Optional GLSL fragment shader source to override the default fragment shader.
* @param {object} [options.renderState] Optional render state to override the default render state.
- *
- * @exception {DeveloperError} options.glslDatatype must be float, vec2, vec3, or vec4.
- *
+ * @throws {DeveloperError} options.glslDatatype must be float, vec2, vec3, or vec4.
* @example
* const primitive = new Cesium.Primitive({
* geometryInstances : // ...
@@ -112,18 +108,14 @@ function DebugAppearance(options) {
/**
* This property is part of the {@link Appearance} interface, but is not
* used by {@link DebugAppearance} since a fully custom fragment shader is used.
- *
* @type Material
- *
* @default undefined
*/
this.material = undefined;
/**
* When true
, the geometry is expected to appear translucent.
- *
* @type {boolean}
- *
* @default false
*/
this.translucent = defaultValue(options.translucent, false);
@@ -146,9 +138,7 @@ function DebugAppearance(options) {
Object.defineProperties(DebugAppearance.prototype, {
/**
* The GLSL source code for the vertex shader.
- *
* @memberof DebugAppearance.prototype
- *
* @type {string}
* @readonly
*/
@@ -162,9 +152,7 @@ Object.defineProperties(DebugAppearance.prototype, {
* The GLSL source code for the fragment shader. The full fragment shader
* source is built procedurally taking into account the {@link DebugAppearance#material}.
* Use {@link DebugAppearance#getFragmentShaderSource} to get the full source.
- *
* @memberof DebugAppearance.prototype
- *
* @type {string}
* @readonly
*/
@@ -176,9 +164,7 @@ Object.defineProperties(DebugAppearance.prototype, {
/**
* The WebGL fixed-function state to use when rendering the geometry.
- *
* @memberof DebugAppearance.prototype
- *
* @type {object}
* @readonly
*/
@@ -190,12 +176,9 @@ Object.defineProperties(DebugAppearance.prototype, {
/**
* When true
, the geometry is expected to be closed.
- *
* @memberof DebugAppearance.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
closed: {
@@ -206,9 +189,7 @@ Object.defineProperties(DebugAppearance.prototype, {
/**
* The name of the attribute being visualized.
- *
* @memberof DebugAppearance.prototype
- *
* @type {string}
* @readonly
*/
@@ -220,9 +201,7 @@ Object.defineProperties(DebugAppearance.prototype, {
/**
* The GLSL datatype of the attribute being visualized.
- *
* @memberof DebugAppearance.prototype
- *
* @type {string}
* @readonly
*/
@@ -236,9 +215,7 @@ Object.defineProperties(DebugAppearance.prototype, {
/**
* Returns the full GLSL fragment shader source, which for {@link DebugAppearance} is just
* {@link DebugAppearance#fragmentShaderSource}.
- *
* @function
- *
* @returns {string} The full GLSL fragment shader source.
*/
DebugAppearance.prototype.getFragmentShaderSource =
@@ -246,9 +223,7 @@ DebugAppearance.prototype.getFragmentShaderSource =
/**
* Determines if the geometry is translucent based on {@link DebugAppearance#translucent}.
- *
* @function
- *
* @returns {boolean} true
if the appearance is translucent.
*/
DebugAppearance.prototype.isTranslucent = Appearance.prototype.isTranslucent;
@@ -257,9 +232,7 @@ DebugAppearance.prototype.isTranslucent = Appearance.prototype.isTranslucent;
* Creates a render state. This is not the final render state instance; instead,
* it can contain a subset of render state properties identical to the render state
* created in the context.
- *
* @function
- *
* @returns {object} The render state.
*/
DebugAppearance.prototype.getRenderState = Appearance.prototype.getRenderState;
diff --git a/packages/engine/Source/Scene/DebugCameraPrimitive.js b/packages/engine/Source/Scene/DebugCameraPrimitive.js
index 414882b124a9..6be42034d223 100644
--- a/packages/engine/Source/Scene/DebugCameraPrimitive.js
+++ b/packages/engine/Source/Scene/DebugCameraPrimitive.js
@@ -19,18 +19,15 @@ import Primitive from "./Primitive.js";
/**
* Draws the outline of the camera's view frustum.
- *
* @alias DebugCameraPrimitive
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Camera} options.camera The camera.
* @param {number[]} [options.frustumSplits] Distances to the near and far planes of the camera frustums. This overrides the camera's frustum near and far values.
- * @param {Color} [options.color=Color.CYAN] The color of the debug outline.
- * @param {boolean} [options.updateOnChange=true] Whether the primitive updates when the underlying camera changes.
- * @param {boolean} [options.show=true] Determines if this primitive will be shown.
+ * @param {Color} [options.color] The color of the debug outline.
+ * @param {boolean} [options.updateOnChange] Whether the primitive updates when the underlying camera changes.
+ * @param {boolean} [options.show] Determines if this primitive will be shown.
* @param {object} [options.id] A user-defined object to return when the instance is picked with {@link Scene#pick}.
- *
* @example
* primitives.add(new Cesium.DebugCameraPrimitive({
* camera : camera,
@@ -53,7 +50,6 @@ function DebugCameraPrimitive(options) {
/**
* Determines if this primitive will be shown.
- *
* @type {boolean}
* @default true
*/
@@ -61,10 +57,8 @@ function DebugCameraPrimitive(options) {
/**
* User-defined value returned when the primitive is picked.
- *
* @type {*}
* @default undefined
- *
* @see Scene#pick
*/
this.id = options.id;
@@ -86,6 +80,7 @@ const scratchColor = new Color();
const scratchSplits = [1.0, 100000.0];
/**
+ * @param frameState
* @private
*/
DebugCameraPrimitive.prototype.update = function (frameState) {
@@ -219,9 +214,7 @@ DebugCameraPrimitive.prototype.update = function (frameState) {
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see DebugCameraPrimitive#destroy
*/
DebugCameraPrimitive.prototype.isDestroyed = function () {
@@ -236,12 +229,9 @@ DebugCameraPrimitive.prototype.isDestroyed = function () {
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
*
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* p = p && p.destroy();
- *
* @see DebugCameraPrimitive#isDestroyed
*/
DebugCameraPrimitive.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/DebugModelMatrixPrimitive.js b/packages/engine/Source/Scene/DebugModelMatrixPrimitive.js
index 7ab16bb7738c..2912149c52cf 100644
--- a/packages/engine/Source/Scene/DebugModelMatrixPrimitive.js
+++ b/packages/engine/Source/Scene/DebugModelMatrixPrimitive.js
@@ -20,17 +20,14 @@ import Primitive from "./Primitive.js";
*
* This is for debugging only; it is not optimized for production use.
*
- *
* @alias DebugModelMatrixPrimitive
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {number} [options.length=10000000.0] The length of the axes in meters.
- * @param {number} [options.width=2.0] The width of the axes in pixels.
- * @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The 4x4 matrix that defines the reference frame, i.e., origin plus axes, to visualize.
- * @param {boolean} [options.show=true] Determines if this primitive will be shown.
+ * @param {number} [options.length] The length of the axes in meters.
+ * @param {number} [options.width] The width of the axes in pixels.
+ * @param {Matrix4} [options.modelMatrix] The 4x4 matrix that defines the reference frame, i.e., origin plus axes, to visualize.
+ * @param {boolean} [options.show] Determines if this primitive will be shown.
* @param {object} [options.id] A user-defined object to return when the instance is picked with {@link Scene#pick}
- *
* @example
* primitives.add(new Cesium.DebugModelMatrixPrimitive({
* modelMatrix : primitive.modelMatrix, // primitive to debug
@@ -43,7 +40,6 @@ function DebugModelMatrixPrimitive(options) {
/**
* The length of the axes in meters.
- *
* @type {number}
* @default 10000000.0
*/
@@ -52,7 +48,6 @@ function DebugModelMatrixPrimitive(options) {
/**
* The width of the axes in pixels.
- *
* @type {number}
* @default 2.0
*/
@@ -61,7 +56,6 @@ function DebugModelMatrixPrimitive(options) {
/**
* Determines if this primitive will be shown.
- *
* @type {boolean}
* @default true
*/
@@ -69,7 +63,6 @@ function DebugModelMatrixPrimitive(options) {
/**
* The 4x4 matrix that defines the reference frame, i.e., origin plus axes, to visualize.
- *
* @type {Matrix4}
* @default {@link Matrix4.IDENTITY}
*/
@@ -80,10 +73,8 @@ function DebugModelMatrixPrimitive(options) {
/**
* User-defined value returned when the primitive is picked.
- *
* @type {*}
* @default undefined
- *
* @see Scene#pick
*/
this.id = options.id;
@@ -93,6 +84,7 @@ function DebugModelMatrixPrimitive(options) {
}
/**
+ * @param frameState
* @private
*/
DebugModelMatrixPrimitive.prototype.update = function (frameState) {
@@ -190,9 +182,7 @@ DebugModelMatrixPrimitive.prototype.update = function (frameState) {
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see DebugModelMatrixPrimitive#destroy
*/
DebugModelMatrixPrimitive.prototype.isDestroyed = function () {
@@ -207,12 +197,9 @@ DebugModelMatrixPrimitive.prototype.isDestroyed = function () {
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
*
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* p = p && p.destroy();
- *
* @see DebugModelMatrixPrimitive#isDestroyed
*/
DebugModelMatrixPrimitive.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/DepthFunction.js b/packages/engine/Source/Scene/DepthFunction.js
index 23598bd55876..db7abcfba284 100644
--- a/packages/engine/Source/Scene/DepthFunction.js
+++ b/packages/engine/Source/Scene/DepthFunction.js
@@ -2,13 +2,11 @@ import WebGLConstants from "../Core/WebGLConstants.js";
/**
* Determines the function used to compare two depths for the depth test.
- *
* @enum {number}
*/
const DepthFunction = {
/**
* The depth test never passes.
- *
* @type {number}
* @constant
*/
@@ -16,7 +14,6 @@ const DepthFunction = {
/**
* The depth test passes if the incoming depth is less than the stored depth.
- *
* @type {number}
* @constant
*/
@@ -24,7 +21,6 @@ const DepthFunction = {
/**
* The depth test passes if the incoming depth is equal to the stored depth.
- *
* @type {number}
* @constant
*/
@@ -32,7 +28,6 @@ const DepthFunction = {
/**
* The depth test passes if the incoming depth is less than or equal to the stored depth.
- *
* @type {number}
* @constant
*/
@@ -40,7 +35,6 @@ const DepthFunction = {
/**
* The depth test passes if the incoming depth is greater than the stored depth.
- *
* @type {number}
* @constant
*/
@@ -48,7 +42,6 @@ const DepthFunction = {
/**
* The depth test passes if the incoming depth is not equal to the stored depth.
- *
* @type {number}
* @constant
*/
@@ -56,7 +49,6 @@ const DepthFunction = {
/**
* The depth test passes if the incoming depth is greater than or equal to the stored depth.
- *
* @type {number}
* @constant
*/
@@ -64,7 +56,6 @@ const DepthFunction = {
/**
* The depth test always passes.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Scene/DepthPlane.js b/packages/engine/Source/Scene/DepthPlane.js
index 234ae355b313..62fdfd8f3da7 100644
--- a/packages/engine/Source/Scene/DepthPlane.js
+++ b/packages/engine/Source/Scene/DepthPlane.js
@@ -21,6 +21,7 @@ import defaultValue from "../Core/defaultValue.js";
import Ellipsoid from "../Core/Ellipsoid.js";
/**
+ * @param depthPlaneEllipsoidOffset
* @private
*/
function DepthPlane(depthPlaneEllipsoidOffset) {
diff --git a/packages/engine/Source/Scene/DeviceOrientationCameraController.js b/packages/engine/Source/Scene/DeviceOrientationCameraController.js
index 986c524300b3..6b0d497e4d91 100644
--- a/packages/engine/Source/Scene/DeviceOrientationCameraController.js
+++ b/packages/engine/Source/Scene/DeviceOrientationCameraController.js
@@ -6,6 +6,7 @@ import Matrix3 from "../Core/Matrix3.js";
import Quaternion from "../Core/Quaternion.js";
/**
+ * @param scene
* @private
*/
function DeviceOrientationCameraController(scene) {
@@ -96,7 +97,6 @@ DeviceOrientationCameraController.prototype.update = function () {
/**
* Returns true if this object was destroyed; otherwise, false.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
*/
DeviceOrientationCameraController.prototype.isDestroyed = function () {
@@ -110,8 +110,7 @@ DeviceOrientationCameraController.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
*/
DeviceOrientationCameraController.prototype.destroy = function () {
this._removeListener();
diff --git a/packages/engine/Source/Scene/DirectionalLight.js b/packages/engine/Source/Scene/DirectionalLight.js
index bdf90c8d883f..b44995c5474b 100644
--- a/packages/engine/Source/Scene/DirectionalLight.js
+++ b/packages/engine/Source/Scene/DirectionalLight.js
@@ -6,16 +6,13 @@ import DeveloperError from "../Core/DeveloperError.js";
/**
* A light that gets emitted in a single direction from infinitely far away.
- *
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.direction The direction in which light gets emitted.
- * @param {Color} [options.color=Color.WHITE] The color of the light.
- * @param {number} [options.intensity=1.0] The intensity of the light.
- *
- * @exception {DeveloperError} options.direction cannot be zero-length
- *
+ * @param {Color} [options.color] The color of the light.
+ * @param {number} [options.intensity] The intensity of the light.
+ * @throws {DeveloperError} options.direction cannot be zero-length
* @alias DirectionalLight
- * @constructor
+ * @class
*/
function DirectionalLight(options) {
//>>includeStart('debug', pragmas.debug);
diff --git a/packages/engine/Source/Scene/DiscardEmptyTileImagePolicy.js b/packages/engine/Source/Scene/DiscardEmptyTileImagePolicy.js
index 1a57765a3aca..8ccdf9feb85c 100644
--- a/packages/engine/Source/Scene/DiscardEmptyTileImagePolicy.js
+++ b/packages/engine/Source/Scene/DiscardEmptyTileImagePolicy.js
@@ -4,10 +4,9 @@ import defined from "../Core/defined.js";
* A policy for discarding tile images that contain no data (and so aren't actually images).
* This policy discards {@link DiscardEmptyTileImagePolicy.EMPTY_IMAGE}, which is
* expected to be used in place of any empty tile images by the image loading code.
- *
+ * @param options
* @alias DiscardEmptyTileImagePolicy
- * @constructor
- *
+ * @class
* @see DiscardMissingTileImagePolicy
*/
function DiscardEmptyTileImagePolicy(options) {}
@@ -22,7 +21,6 @@ DiscardEmptyTileImagePolicy.prototype.isReady = function () {
/**
* Given a tile image, decide whether to discard that image.
- *
* @param {HTMLImageElement} image An image to test.
* @returns {boolean} True if the image should be discarded; otherwise, false.
*/
diff --git a/packages/engine/Source/Scene/DiscardMissingTileImagePolicy.js b/packages/engine/Source/Scene/DiscardMissingTileImagePolicy.js
index de950a3b0b1b..b63b0756fca2 100644
--- a/packages/engine/Source/Scene/DiscardMissingTileImagePolicy.js
+++ b/packages/engine/Source/Scene/DiscardMissingTileImagePolicy.js
@@ -7,15 +7,13 @@ import Resource from "../Core/Resource.js";
/**
* A policy for discarding tile images that match a known image containing a
* "missing" image.
- *
* @alias DiscardMissingTileImagePolicy
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Resource|string} options.missingImageUrl The URL of the known missing image.
* @param {Cartesian2[]} options.pixelsToCheck An array of {@link Cartesian2} pixel positions to
* compare against the missing image.
- * @param {boolean} [options.disableCheckIfAllPixelsAreTransparent=false] If true, the discard check will be disabled
+ * @param {boolean} [options.disableCheckIfAllPixelsAreTransparent] If true, the discard check will be disabled
* if all of the pixelsToCheck in the missingImageUrl have an alpha value of 0. If false, the
* discard check will proceed no matter the values of the pixelsToCheck.
*/
@@ -103,11 +101,9 @@ DiscardMissingTileImagePolicy.prototype.isReady = function () {
/**
* Given a tile image, decide whether to discard that image.
- *
* @param {HTMLImageElement} image An image to test.
* @returns {boolean} True if the image should be discarded; otherwise, false.
- *
- * @exception {DeveloperError} shouldDiscardImage
must not be called before the discard policy is ready.
+ * @throws {DeveloperError} shouldDiscardImage
must not be called before the discard policy is ready.
*/
DiscardMissingTileImagePolicy.prototype.shouldDiscardImage = function (image) {
//>>includeStart('debug', pragmas.debug);
diff --git a/packages/engine/Source/Scene/DracoLoader.js b/packages/engine/Source/Scene/DracoLoader.js
index 56f2eaf71514..a414efcc5ed6 100644
--- a/packages/engine/Source/Scene/DracoLoader.js
+++ b/packages/engine/Source/Scene/DracoLoader.js
@@ -48,9 +48,9 @@ DracoLoader._getDecoderTaskProcessor = function () {
/**
* Decodes a compressed point cloud. Returns undefined if the task cannot be scheduled.
+ * @param parameters
* @private
- *
- * @exception {RuntimeError} Draco decoder could not be initialized.
+ * @throws {RuntimeError} Draco decoder could not be initialized.
*/
DracoLoader.decodePointCloud = function (parameters) {
const decoderTaskProcessor = DracoLoader._getDecoderTaskProcessor();
@@ -69,17 +69,14 @@ DracoLoader.decodePointCloud = function (parameters) {
/**
* Decodes a buffer view. Returns undefined if the task cannot be scheduled.
- *
* @param {object} options Object with the following properties:
* @param {Uint8Array} options.array The typed array containing the buffer view data.
* @param {object} options.bufferView The glTF buffer view object.
* @param {Object} options.compressedAttributes The compressed attributes.
* @param {boolean} options.dequantizeInShader Whether POSITION and NORMAL attributes should be dequantized on the GPU.
- *
* @returns {Promise} A promise that resolves to the decoded indices and attributes.
* @private
- *
- * @exception {RuntimeError} Draco decoder could not be initialized.
+ * @throws {RuntimeError} Draco decoder could not be initialized.
*/
DracoLoader.decodeBufferView = function (options) {
const decoderTaskProcessor = DracoLoader._getDecoderTaskProcessor();
diff --git a/packages/engine/Source/Scene/DynamicAtmosphereLightingType.js b/packages/engine/Source/Scene/DynamicAtmosphereLightingType.js
index d1d9967a730e..f0027f8fbf08 100644
--- a/packages/engine/Source/Scene/DynamicAtmosphereLightingType.js
+++ b/packages/engine/Source/Scene/DynamicAtmosphereLightingType.js
@@ -2,21 +2,18 @@
* Atmosphere lighting effects (sky atmosphere, ground atmosphere, fog) can be
* further modified with dynamic lighting from the sun or other light source
* that changes over time. This enum determines which light source to use.
- *
* @enum {number}
*/
const DynamicAtmosphereLightingType = {
/**
* Do not use dynamic atmosphere lighting. Atmosphere lighting effects will
* be lit from directly above rather than using the scene's light source.
- *
* @type {number}
* @constant
*/
NONE: 0,
/**
* Use the scene's current light source for dynamic atmosphere lighting.
- *
* @type {number}
* @constant
*/
@@ -24,7 +21,6 @@ const DynamicAtmosphereLightingType = {
/**
* Force the dynamic atmosphere lighting to always use the sunlight direction,
* even if the scene uses a different light source.
- *
* @type {number}
* @constant
*/
@@ -33,10 +29,8 @@ const DynamicAtmosphereLightingType = {
/**
* Get the lighting enum from the older globe flags
- *
* @param {Globe} globe The globe
- * @return {DynamicAtmosphereLightingType} The corresponding enum value
- *
+ * @returns {DynamicAtmosphereLightingType} The corresponding enum value
* @private
*/
DynamicAtmosphereLightingType.fromGlobeFlags = function (globe) {
diff --git a/packages/engine/Source/Scene/EllipsoidPrimitive.js b/packages/engine/Source/Scene/EllipsoidPrimitive.js
index 82530a0463c4..328943c2d45e 100644
--- a/packages/engine/Source/Scene/EllipsoidPrimitive.js
+++ b/packages/engine/Source/Scene/EllipsoidPrimitive.js
@@ -31,19 +31,16 @@ const attributeLocations = {
*
* This is only supported in 3D. The ellipsoid is not shown in 2D or Columbus view.
*
- *
* @alias EllipsoidPrimitive
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {Cartesian3} [options.center=Cartesian3.ZERO] The center of the ellipsoid in the ellipsoid's model coordinates.
+ * @param {Cartesian3} [options.center] The center of the ellipsoid in the ellipsoid's model coordinates.
* @param {Cartesian3} [options.radii] The radius of the ellipsoid along the x
, y
, and z
axes in the ellipsoid's model coordinates.
- * @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The 4x4 transformation matrix that transforms the ellipsoid from model to world coordinates.
- * @param {boolean} [options.show=true] Determines if this primitive will be shown.
- * @param {Material} [options.material=Material.ColorType] The surface appearance of the primitive.
+ * @param {Matrix4} [options.modelMatrix] The 4x4 transformation matrix that transforms the ellipsoid from model to world coordinates.
+ * @param {boolean} [options.show] Determines if this primitive will be shown.
+ * @param {Material} [options.material] The surface appearance of the primitive.
* @param {object} [options.id] A user-defined object to return when the instance is picked with {@link Scene#pick}
- * @param {boolean} [options.debugShowBoundingVolume=false] For debugging only. Determines if this primitive's commands' bounding spheres are shown.
- *
+ * @param {boolean} [options.debugShowBoundingVolume] For debugging only. Determines if this primitive's commands' bounding spheres are shown.
* @private
*/
function EllipsoidPrimitive(options) {
@@ -54,10 +51,8 @@ function EllipsoidPrimitive(options) {
*
* The default is {@link Cartesian3.ZERO}.
*
- *
* @type {Cartesian3}
* @default {@link Cartesian3.ZERO}
- *
* @see EllipsoidPrimitive#modelMatrix
*/
this.center = Cartesian3.clone(defaultValue(options.center, Cartesian3.ZERO));
@@ -69,15 +64,11 @@ function EllipsoidPrimitive(options) {
*
* The default is undefined
. The ellipsoid is not drawn until a radii is provided.
*
- *
* @type {Cartesian3}
* @default undefined
- *
- *
* @example
* // A sphere with a radius of 2.0
* e.radii = new Cesium.Cartesian3(2.0, 2.0, 2.0);
- *
* @see EllipsoidPrimitive#modelMatrix
*/
this.radii = Cartesian3.clone(options.radii);
@@ -91,10 +82,8 @@ function EllipsoidPrimitive(options) {
* When this is the identity matrix, the ellipsoid is drawn in world coordinates, i.e., Earth's WGS84 coordinates.
* Local reference frames can be used by providing a different transformation matrix, like that returned
* by {@link Transforms.eastNorthUpToFixedFrame}.
- *
* @type {Matrix4}
* @default {@link Matrix4.IDENTITY}
- *
* @example
* const origin = Cesium.Cartesian3.fromDegrees(-95.0, 40.0, 200000.0);
* e.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin);
@@ -107,7 +96,6 @@ function EllipsoidPrimitive(options) {
/**
* Determines if the ellipsoid primitive will be shown.
- *
* @type {boolean}
* @default true
*/
@@ -119,18 +107,14 @@ function EllipsoidPrimitive(options) {
*
* The default material is Material.ColorType
.
*
- *
* @type {Material}
* @default Material.fromType(Material.ColorType)
- *
- *
* @example
* // 1. Change the color of the default material to yellow
* e.material.uniforms.color = new Cesium.Color(1.0, 1.0, 0.0, 1.0);
*
* // 2. Change material to horizontal stripes
* e.material = Cesium.Material.fromType(Cesium.Material.StripeType);
- *
* @see {@link https://github.com/CesiumGS/cesium/wiki/Fabric|Fabric}
*/
this.material = defaultValue(
@@ -142,11 +126,8 @@ function EllipsoidPrimitive(options) {
/**
* User-defined object returned when the ellipsoid is picked.
- *
* @type {object}
- *
* @default undefined
- *
* @see Scene#pick
*/
this.id = options.id;
@@ -157,9 +138,7 @@ function EllipsoidPrimitive(options) {
*
* Draws the bounding sphere for each draw command in the primitive.
*
- *
* @type {boolean}
- *
* @default false
*/
this.debugShowBoundingVolume = defaultValue(
@@ -245,8 +224,8 @@ function getVertexArray(context) {
* Do not call this function directly. This is documented just to
* list the exceptions that may be propagated when the scene is rendered:
*
- *
- * @exception {DeveloperError} this.material must be defined.
+ * @param frameState
+ * @throws {DeveloperError} this.material must be defined.
*/
EllipsoidPrimitive.prototype.update = function (frameState) {
if (
@@ -470,9 +449,7 @@ EllipsoidPrimitive.prototype.update = function (frameState) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see EllipsoidPrimitive#destroy
*/
EllipsoidPrimitive.prototype.isDestroyed = function () {
@@ -486,13 +463,9 @@ EllipsoidPrimitive.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* e = e && e.destroy();
- *
* @see EllipsoidPrimitive#isDestroyed
*/
EllipsoidPrimitive.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/EllipsoidSurfaceAppearance.js b/packages/engine/Source/Scene/EllipsoidSurfaceAppearance.js
index 30e4aaf91e37..ff835f222444 100644
--- a/packages/engine/Source/Scene/EllipsoidSurfaceAppearance.js
+++ b/packages/engine/Source/Scene/EllipsoidSurfaceAppearance.js
@@ -12,22 +12,18 @@ import Material from "./Material.js";
* with {@link MaterialAppearance.MaterialSupport.ALL}. However, this appearance requires
* fewer vertex attributes since the fragment shader can procedurally compute normal
,
* tangent
, and bitangent
.
- *
* @alias EllipsoidSurfaceAppearance
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {boolean} [options.flat=false] When true
, flat shading is used in the fragment shader, which means lighting is not taking into account.
- * @param {boolean} [options.faceForward=options.aboveGround] When true
, the fragment shader flips the surface normal as needed to ensure that the normal faces the viewer to avoid dark spots. This is useful when both sides of a geometry should be shaded like {@link WallGeometry}.
- * @param {boolean} [options.translucent=true] When true
, the geometry is expected to appear translucent so {@link EllipsoidSurfaceAppearance#renderState} has alpha blending enabled.
- * @param {boolean} [options.aboveGround=false] When true
, the geometry is expected to be on the ellipsoid's surface - not at a constant height above it - so {@link EllipsoidSurfaceAppearance#renderState} has backface culling enabled.
- * @param {Material} [options.material=Material.ColorType] The material used to determine the fragment color.
+ * @param {boolean} [options.flat] When true
, flat shading is used in the fragment shader, which means lighting is not taking into account.
+ * @param {boolean} [options.faceForward] When true
, the fragment shader flips the surface normal as needed to ensure that the normal faces the viewer to avoid dark spots. This is useful when both sides of a geometry should be shaded like {@link WallGeometry}.
+ * @param {boolean} [options.translucent] When true
, the geometry is expected to appear translucent so {@link EllipsoidSurfaceAppearance#renderState} has alpha blending enabled.
+ * @param {boolean} [options.aboveGround] When true
, the geometry is expected to be on the ellipsoid's surface - not at a constant height above it - so {@link EllipsoidSurfaceAppearance#renderState} has backface culling enabled.
+ * @param {Material} [options.material] The material used to determine the fragment color.
* @param {string} [options.vertexShaderSource] Optional GLSL vertex shader source to override the default vertex shader.
* @param {string} [options.fragmentShaderSource] Optional GLSL fragment shader source to override the default fragment shader.
* @param {object} [options.renderState] Optional render state to override the default render state.
- *
* @see {@link https://github.com/CesiumGS/cesium/wiki/Fabric|Fabric}
- *
* @example
* const primitive = new Cesium.Primitive({
* geometryInstances : new Cesium.GeometryInstance({
@@ -50,11 +46,8 @@ function EllipsoidSurfaceAppearance(options) {
/**
* The material used to determine the fragment color. Unlike other {@link EllipsoidSurfaceAppearance}
* properties, this is not read-only, so an appearance's material can change on the fly.
- *
* @type Material
- *
* @default {@link Material.ColorType}
- *
* @see {@link https://github.com/CesiumGS/cesium/wiki/Fabric|Fabric}
*/
this.material = defined(options.material)
@@ -63,9 +56,7 @@ function EllipsoidSurfaceAppearance(options) {
/**
* When true
, the geometry is expected to appear translucent.
- *
* @type {boolean}
- *
* @default true
*/
this.translucent = defaultValue(options.translucent, true);
@@ -95,9 +86,7 @@ function EllipsoidSurfaceAppearance(options) {
Object.defineProperties(EllipsoidSurfaceAppearance.prototype, {
/**
* The GLSL source code for the vertex shader.
- *
* @memberof EllipsoidSurfaceAppearance.prototype
- *
* @type {string}
* @readonly
*/
@@ -112,9 +101,7 @@ Object.defineProperties(EllipsoidSurfaceAppearance.prototype, {
* source is built procedurally taking into account {@link EllipsoidSurfaceAppearance#material},
* {@link EllipsoidSurfaceAppearance#flat}, and {@link EllipsoidSurfaceAppearance#faceForward}.
* Use {@link EllipsoidSurfaceAppearance#getFragmentShaderSource} to get the full source.
- *
* @memberof EllipsoidSurfaceAppearance.prototype
- *
* @type {string}
* @readonly
*/
@@ -131,9 +118,7 @@ Object.defineProperties(EllipsoidSurfaceAppearance.prototype, {
* instance, or it is set implicitly via {@link EllipsoidSurfaceAppearance#translucent}
* and {@link EllipsoidSurfaceAppearance#aboveGround}.
*
- *
* @memberof EllipsoidSurfaceAppearance.prototype
- *
* @type {object}
* @readonly
*/
@@ -147,12 +132,9 @@ Object.defineProperties(EllipsoidSurfaceAppearance.prototype, {
* When true
, the geometry is expected to be closed so
* {@link EllipsoidSurfaceAppearance#renderState} has backface culling enabled.
* If the viewer enters the geometry, it will not be visible.
- *
* @memberof EllipsoidSurfaceAppearance.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
closed: {
@@ -165,12 +147,9 @@ Object.defineProperties(EllipsoidSurfaceAppearance.prototype, {
* The {@link VertexFormat} that this appearance instance is compatible with.
* A geometry can have more vertex attributes and still be compatible - at a
* potential performance cost - but it can't have less.
- *
* @memberof EllipsoidSurfaceAppearance.prototype
- *
* @type VertexFormat
* @readonly
- *
* @default {@link EllipsoidSurfaceAppearance.VERTEX_FORMAT}
*/
vertexFormat: {
@@ -182,12 +161,9 @@ Object.defineProperties(EllipsoidSurfaceAppearance.prototype, {
/**
* When true
, flat shading is used in the fragment shader,
* which means lighting is not taking into account.
- *
* @memberof EllipsoidSurfaceAppearance.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
flat: {
@@ -201,12 +177,9 @@ Object.defineProperties(EllipsoidSurfaceAppearance.prototype, {
* as needed to ensure that the normal faces the viewer to avoid
* dark spots. This is useful when both sides of a geometry should be
* shaded like {@link WallGeometry}.
- *
* @memberof EllipsoidSurfaceAppearance.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
faceForward: {
@@ -219,13 +192,9 @@ Object.defineProperties(EllipsoidSurfaceAppearance.prototype, {
* When true
, the geometry is expected to be on the ellipsoid's
* surface - not at a constant height above it - so {@link EllipsoidSurfaceAppearance#renderState}
* has backface culling enabled.
- *
- *
* @memberof EllipsoidSurfaceAppearance.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
aboveGround: {
@@ -239,9 +208,7 @@ Object.defineProperties(EllipsoidSurfaceAppearance.prototype, {
* The {@link VertexFormat} that all {@link EllipsoidSurfaceAppearance} instances
* are compatible with, which requires only position
and st
* attributes. Other attributes are procedurally computed in the fragment shader.
- *
* @type VertexFormat
- *
* @constant
*/
EllipsoidSurfaceAppearance.VERTEX_FORMAT = VertexFormat.POSITION_AND_ST;
@@ -250,9 +217,7 @@ EllipsoidSurfaceAppearance.VERTEX_FORMAT = VertexFormat.POSITION_AND_ST;
* Procedurally creates the full GLSL fragment shader source. For {@link EllipsoidSurfaceAppearance},
* this is derived from {@link EllipsoidSurfaceAppearance#fragmentShaderSource}, {@link EllipsoidSurfaceAppearance#flat},
* and {@link EllipsoidSurfaceAppearance#faceForward}.
- *
* @function
- *
* @returns {string} The full GLSL fragment shader source.
*/
EllipsoidSurfaceAppearance.prototype.getFragmentShaderSource =
@@ -260,9 +225,7 @@ EllipsoidSurfaceAppearance.prototype.getFragmentShaderSource =
/**
* Determines if the geometry is translucent based on {@link EllipsoidSurfaceAppearance#translucent} and {@link Material#isTranslucent}.
- *
* @function
- *
* @returns {boolean} true
if the appearance is translucent.
*/
EllipsoidSurfaceAppearance.prototype.isTranslucent =
@@ -272,9 +235,7 @@ EllipsoidSurfaceAppearance.prototype.isTranslucent =
* Creates a render state. This is not the final render state instance; instead,
* it can contain a subset of render state properties identical to the render state
* created in the context.
- *
* @function
- *
* @returns {object} The render state.
*/
EllipsoidSurfaceAppearance.prototype.getRenderState =
diff --git a/packages/engine/Source/Scene/Empty3DTileContent.js b/packages/engine/Source/Scene/Empty3DTileContent.js
index 0b5c4459da35..6747ad66dd6e 100644
--- a/packages/engine/Source/Scene/Empty3DTileContent.js
+++ b/packages/engine/Source/Scene/Empty3DTileContent.js
@@ -8,10 +8,10 @@ import DeveloperError from "../Core/DeveloperError.js";
*
* Implements the {@link Cesium3DTileContent} interface.
*
- *
+ * @param tileset
+ * @param tile
* @alias Empty3DTileContent
- * @constructor
- *
+ * @class
* @private
*/
function Empty3DTileContent(tileset, tile) {
@@ -66,9 +66,7 @@ Object.defineProperties(Empty3DTileContent.prototype, {
/**
* Returns true when the tile's content is ready to render; otherwise false
- *
* @memberof Empty3DTileContent.prototype
- *
* @type {boolean}
* @readonly
* @private
@@ -131,6 +129,8 @@ Object.defineProperties(Empty3DTileContent.prototype, {
/**
* Part of the {@link Cesium3DTileContent} interface. Empty3DTileContent
* always returns false
since a tile of this type does not have any features.
+ * @param batchId
+ * @param name
*/
Empty3DTileContent.prototype.hasProperty = function (batchId, name) {
return false;
@@ -139,6 +139,7 @@ Empty3DTileContent.prototype.hasProperty = function (batchId, name) {
/**
* Part of the {@link Cesium3DTileContent} interface. Empty3DTileContent
* always returns undefined
since a tile of this type does not have any features.
+ * @param batchId
*/
Empty3DTileContent.prototype.getFeature = function (batchId) {
return undefined;
diff --git a/packages/engine/Source/Scene/Expression.js b/packages/engine/Source/Scene/Expression.js
index 2d413de4b39c..6adee8d0c1f3 100644
--- a/packages/engine/Source/Scene/Expression.js
+++ b/packages/engine/Source/Scene/Expression.js
@@ -19,17 +19,13 @@ import ExpressionNodeType from "./ExpressionNodeType.js";
*
* Implements the {@link StyleExpression} interface.
*
- *
* @alias Expression
- * @constructor
- *
+ * @class
* @param {string} [expression] The expression defined using the 3D Tiles Styling language.
* @param {object} [defines] Defines in the style.
- *
* @example
* const expression = new Cesium.Expression('(regExp("^Chest").test(${County})) && (${YearBuilt} >= 1970)');
* expression.evaluate(feature); // returns true or false depending on the feature's properties
- *
* @example
* const expression = new Cesium.Expression('(${Temperature} > 90) ? color("red") : color("white")');
* expression.evaluateColor(feature, result); // returns a Cesium.Color object
@@ -60,12 +56,9 @@ function Expression(expression, defines) {
Object.defineProperties(Expression.prototype, {
/**
* Gets the expression defined in the 3D Tiles Styling language.
- *
* @memberof Expression.prototype
- *
* @type {string}
* @readonly
- *
* @default undefined
*/
expression: {
@@ -129,7 +122,6 @@ const scratchStorage = {
* object will be returned. If the result is a Cartesian2
, Cartesian3
, or Cartesian4
,
* a {@link Cartesian2}, {@link Cartesian3}, or {@link Cartesian4} object will be returned. If the result
argument is
* a {@link Color}, the {@link Cartesian4} value is converted to a {@link Color} and then returned.
- *
* @param {Cesium3DTileFeature} feature The feature whose properties may be used as variables in the expression.
* @param {object} [result] The object onto which to store the result.
* @returns {boolean|number|string|RegExp|Cartesian2|Cartesian3|Cartesian4|Color} The result of evaluating the expression.
@@ -155,7 +147,6 @@ Expression.prototype.evaluate = function (feature, result) {
*
* This is equivalent to {@link Expression#evaluate} but always returns a {@link Color} object.
*
- *
* @param {Cesium3DTileFeature} feature The feature whose properties may be used as variables in the expression.
* @param {Color} [result] The object in which to store the result
* @returns {Color} The modified result parameter or a new Color instance if one was not provided.
@@ -169,14 +160,11 @@ Expression.prototype.evaluateColor = function (feature, result) {
/**
* Gets the shader function for this expression.
* Returns undefined if the shader function can't be generated from this expression.
- *
* @param {string} functionSignature Signature of the generated function.
* @param {object} variableSubstitutionMap Maps variable names to shader variable names.
* @param {object} shaderState Stores information about the generated shader function, including whether it is translucent.
* @param {string} returnType The return type of the generated function.
- *
* @returns {string} The shader function.
- *
* @private
*/
Expression.prototype.getShaderFunction = function (
@@ -202,12 +190,9 @@ Expression.prototype.getShaderFunction = function (
/**
* Gets the shader expression for this expression.
* Returns undefined if the shader expression can't be generated from this expression.
- *
* @param {object} variableSubstitutionMap Maps variable names to shader variable names.
* @param {object} shaderState Stores information about the generated shader function, including whether it is translucent.
- *
* @returns {string} The shader expression.
- *
* @private
*/
Expression.prototype.getShaderExpression = function (
@@ -222,9 +207,7 @@ Expression.prototype.getShaderExpression = function (
/**
* Gets the variables used by the expression.
- *
* @returns {string[]} The variables used by the expression.
- *
* @private
*/
Expression.prototype.getVariables = function () {
diff --git a/packages/engine/Source/Scene/Fog.js b/packages/engine/Source/Scene/Fog.js
index 877d45b44f05..aea00449eeb3 100644
--- a/packages/engine/Source/Scene/Fog.js
+++ b/packages/engine/Source/Scene/Fog.js
@@ -6,9 +6,8 @@ import SceneMode from "./SceneMode.js";
/**
* Blends the atmosphere to geometry far from the camera for horizon views. Allows for additional
* performance improvements by rendering less geometry and dispatching less terrain requests.
- *
* @alias Fog
- * @constructor
+ * @class
*/
function Fog() {
/**
diff --git a/packages/engine/Source/Scene/FrameRateMonitor.js b/packages/engine/Source/Scene/FrameRateMonitor.js
index 68169a6c24f6..62720ad2ba02 100644
--- a/packages/engine/Source/Scene/FrameRateMonitor.js
+++ b/packages/engine/Source/Scene/FrameRateMonitor.js
@@ -11,21 +11,19 @@ import TimeConstants from "../Core/TimeConstants.js";
* lower than a threshold. Later, if the frame rate returns to the required level, a separate event is raised.
* To avoid creating multiple FrameRateMonitors for a single {@link Scene}, use {@link FrameRateMonitor.fromScene}
* instead of constructing an instance explicitly.
- *
* @alias FrameRateMonitor
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {Scene} options.scene The Scene instance for which to monitor performance.
- * @param {number} [options.samplingWindow=5.0] The length of the sliding window over which to compute the average frame rate, in seconds.
- * @param {number} [options.quietPeriod=2.0] The length of time to wait at startup and each time the page becomes visible (i.e. when the user
+ * @param {number} [options.samplingWindow] The length of the sliding window over which to compute the average frame rate, in seconds.
+ * @param {number} [options.quietPeriod] The length of time to wait at startup and each time the page becomes visible (i.e. when the user
* switches back to the tab) before starting to measure performance, in seconds.
- * @param {number} [options.warmupPeriod=5.0] The length of the warmup period, in seconds. During the warmup period, a separate
+ * @param {number} [options.warmupPeriod] The length of the warmup period, in seconds. During the warmup period, a separate
* (usually lower) frame rate is required.
- * @param {number} [options.minimumFrameRateDuringWarmup=4] The minimum frames-per-second that are required for acceptable performance during
+ * @param {number} [options.minimumFrameRateDuringWarmup] The minimum frames-per-second that are required for acceptable performance during
* the warmup period. If the frame rate averages less than this during any samplingWindow during the warmupPeriod, the
* lowFrameRate event will be raised and the page will redirect to the redirectOnLowFrameRateUrl, if any.
- * @param {number} [options.minimumFrameRateAfterWarmup=8] The minimum frames-per-second that are required for acceptable performance after
+ * @param {number} [options.minimumFrameRateAfterWarmup] The minimum frames-per-second that are required for acceptable performance after
* the end of the warmup period. If the frame rate averages less than this during any samplingWindow after the warmupPeriod, the
* lowFrameRate event will be raised and the page will redirect to the redirectOnLowFrameRateUrl, if any.
*/
@@ -155,7 +153,6 @@ function FrameRateMonitor(options) {
* The default frame rate monitoring settings. These settings are used when {@link FrameRateMonitor.fromScene}
* needs to create a new frame rate monitor, and for any settings that are not passed to the
* {@link FrameRateMonitor} constructor.
- *
* @memberof FrameRateMonitor
* @type {object}
*/
@@ -170,7 +167,6 @@ FrameRateMonitor.defaultSettings = {
/**
* Gets the {@link FrameRateMonitor} for a given scene. If the scene does not yet have
* a {@link FrameRateMonitor}, one is created with the {@link FrameRateMonitor.defaultSettings}.
- *
* @param {Scene} scene The scene for which to get the {@link FrameRateMonitor}.
* @returns {FrameRateMonitor} The scene's {@link FrameRateMonitor}.
*/
@@ -276,11 +272,8 @@ FrameRateMonitor.prototype.unpause = function () {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @memberof FrameRateMonitor
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
- *
* @see FrameRateMonitor#destroy
*/
FrameRateMonitor.prototype.isDestroyed = function () {
@@ -292,11 +285,8 @@ FrameRateMonitor.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
* @memberof FrameRateMonitor
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @see FrameRateMonitor#isDestroyed
*/
FrameRateMonitor.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/FrameState.js b/packages/engine/Source/Scene/FrameState.js
index 5db2dee20264..f850d7b2eced 100644
--- a/packages/engine/Source/Scene/FrameState.js
+++ b/packages/engine/Source/Scene/FrameState.js
@@ -3,27 +3,22 @@ import SceneMode from "./SceneMode.js";
/**
* State information about the current frame. An instance of this class
* is provided to update functions.
- *
* @param {Context} context The rendering context
* @param {CreditDisplay} creditDisplay Handles adding and removing credits from an HTML element
* @param {JobScheduler} jobScheduler The job scheduler
- *
* @alias FrameState
- * @constructor
- *
+ * @class
* @private
*/
function FrameState(context, creditDisplay, jobScheduler) {
/**
* The rendering context.
- *
* @type {Context}
*/
this.context = context;
/**
* An array of rendering commands.
- *
* @type {DrawCommand[]}
*/
this.commandList = [];
@@ -66,7 +61,6 @@ function FrameState(context, creditDisplay, jobScheduler) {
/**
* The current mode of the scene.
- *
* @type {SceneMode}
* @default {@link SceneMode.SCENE3D}
*/
@@ -75,14 +69,12 @@ function FrameState(context, creditDisplay, jobScheduler) {
/**
* The current morph transition time between 2D/Columbus View and 3D,
* with 0.0 being 2D or Columbus View and 1.0 being 3D.
- *
* @type {number}
*/
this.morphTime = SceneMode.getMorphTime(SceneMode.SCENE3D);
/**
* The current frame number.
- *
* @type {number}
* @default 0
*/
@@ -90,7 +82,6 @@ function FrameState(context, creditDisplay, jobScheduler) {
/**
* true
if a new frame has been issued and the frame number has been updated.
- *
* @type {boolean}
* @default false
*/
@@ -98,7 +89,6 @@ function FrameState(context, creditDisplay, jobScheduler) {
/**
* The scene's current time.
- *
* @type {JulianDate}
* @default undefined
*/
@@ -106,14 +96,12 @@ function FrameState(context, creditDisplay, jobScheduler) {
/**
* The job scheduler.
- *
* @type {JobScheduler}
*/
this.jobScheduler = jobScheduler;
/**
* The map projection to use in 2D and Columbus View modes.
- *
* @type {MapProjection}
* @default undefined
*/
@@ -121,7 +109,6 @@ function FrameState(context, creditDisplay, jobScheduler) {
/**
* The current camera.
- *
* @type {Camera}
* @default undefined
*/
@@ -129,7 +116,6 @@ function FrameState(context, creditDisplay, jobScheduler) {
/**
* Whether the camera is underground.
- *
* @type {boolean}
* @default false
*/
@@ -137,7 +123,6 @@ function FrameState(context, creditDisplay, jobScheduler) {
/**
* The {@link GlobeTranslucencyState} object used by the scene.
- *
* @type {GlobeTranslucencyState}
* @default undefined
*/
@@ -145,7 +130,6 @@ function FrameState(context, creditDisplay, jobScheduler) {
/**
* The culling volume.
- *
* @type {CullingVolume}
* @default undefined
*/
@@ -153,7 +137,6 @@ function FrameState(context, creditDisplay, jobScheduler) {
/**
* The current occluder.
- *
* @type {Occluder}
* @default undefined
*/
@@ -162,7 +145,6 @@ function FrameState(context, creditDisplay, jobScheduler) {
/**
* The maximum screen-space error used to drive level-of-detail refinement. Higher
* values will provide better performance but lower visual quality.
- *
* @type {number}
* @default 2
*/
@@ -171,7 +153,6 @@ function FrameState(context, creditDisplay, jobScheduler) {
/**
* Ratio between a pixel and a density-independent pixel. Provides a standard unit of
* measure for real pixel measurements appropriate to a particular device.
- *
* @type {number}
* @default 1.0
*/
@@ -220,7 +201,6 @@ function FrameState(context, creditDisplay, jobScheduler) {
/**
* The credit display.
- *
* @type {CreditDisplay}
*/
this.creditDisplay = creditDisplay;
@@ -238,9 +218,7 @@ function FrameState(context, creditDisplay, jobScheduler) {
* If any function in the array returns true
, in request render mode
* another frame will be rendered.
*
- *
* @type {FrameState.AfterRenderCallback[]}
- *
* @example
* frameState.afterRender.push(function() {
* // take some action, raise an event, etc.
@@ -250,7 +228,6 @@ function FrameState(context, creditDisplay, jobScheduler) {
/**
* Gets whether or not to optimize for 3D only.
- *
* @type {boolean}
* @default false
*/
@@ -365,14 +342,12 @@ function FrameState(context, creditDisplay, jobScheduler) {
/**
* The current scene background color
- *
* @type {Color}
*/
this.backgroundColor = undefined;
/**
* The light used to shade the scene.
- *
* @type {Light}
*/
this.light = undefined;
@@ -401,7 +376,6 @@ function FrameState(context, creditDisplay, jobScheduler) {
/**
* Whether or not the scene uses a logarithmic depth buffer.
- *
* @type {boolean}
* @default false
*/
@@ -409,14 +383,12 @@ function FrameState(context, creditDisplay, jobScheduler) {
/**
* Additional state used to update 3D Tilesets.
- *
* @type {Cesium3DTilePassState}
*/
this.tilesetPassState = undefined;
/**
* The minimum terrain height out of all rendered terrain tiles. Used to improve culling for objects underneath the ellipsoid but above terrain.
- *
* @type {number}
* @default 0.0
*/
@@ -425,7 +397,6 @@ function FrameState(context, creditDisplay, jobScheduler) {
/**
* A function that will be called at the end of the frame.
- *
* @callback FrameState.AfterRenderCallback
* @returns {boolean} true if another render should be requested in request render mode
*/
diff --git a/packages/engine/Source/Scene/FrustumCommands.js b/packages/engine/Source/Scene/FrustumCommands.js
index 1e374378e22a..4359994148c5 100644
--- a/packages/engine/Source/Scene/FrustumCommands.js
+++ b/packages/engine/Source/Scene/FrustumCommands.js
@@ -4,11 +4,9 @@ import Pass from "../Renderer/Pass.js";
/**
* Defines a list of commands whose geometry are bound by near and far distances from the camera.
* @alias FrustumCommands
- * @constructor
- *
- * @param {number} [near=0.0] The lower bound or closest distance from the camera.
- * @param {number} [far=0.0] The upper bound or farthest distance from the camera.
- *
+ * @class
+ * @param {number} [near] The lower bound or closest distance from the camera.
+ * @param {number} [far] The upper bound or farthest distance from the camera.
* @private
*/
function FrustumCommands(near, far) {
diff --git a/packages/engine/Source/Scene/Geometry3DTileContent.js b/packages/engine/Source/Scene/Geometry3DTileContent.js
index d89a278eb4b1..e7e6a80b3fae 100644
--- a/packages/engine/Source/Scene/Geometry3DTileContent.js
+++ b/packages/engine/Source/Scene/Geometry3DTileContent.js
@@ -13,10 +13,13 @@ import Vector3DTileGeometry from "./Vector3DTileGeometry.js";
*
* Implements the {@link Cesium3DTileContent} interface.
*
- *
+ * @param tileset
+ * @param tile
+ * @param resource
+ * @param arrayBuffer
+ * @param byteOffset
* @alias Geometry3DTileContent
- * @constructor
- *
+ * @class
* @private
*/
function Geometry3DTileContent(
@@ -100,9 +103,7 @@ Object.defineProperties(Geometry3DTileContent.prototype, {
/**
* Returns true when the tile's content is ready to render; otherwise false
- *
* @memberof Geometry3DTileContent.prototype
- *
* @type {boolean}
* @readonly
* @private
diff --git a/packages/engine/Source/Scene/GetFeatureInfoFormat.js b/packages/engine/Source/Scene/GetFeatureInfoFormat.js
index 6150c25d6cd3..f09304ca1233 100644
--- a/packages/engine/Source/Scene/GetFeatureInfoFormat.js
+++ b/packages/engine/Source/Scene/GetFeatureInfoFormat.js
@@ -6,10 +6,8 @@ import ImageryLayerFeatureInfo from "./ImageryLayerFeatureInfo.js";
/**
* Describes the format in which to request GetFeatureInfo from a Web Map Service (WMS) server.
- *
* @alias GetFeatureInfoFormat
- * @constructor
- *
+ * @class
* @param {string} type The type of response to expect from a GetFeatureInfo request. Valid
* values are 'json', 'xml', 'html', or 'text'.
* @param {string} [format] The info format to request from the WMS server. This is usually a
diff --git a/packages/engine/Source/Scene/Globe.js b/packages/engine/Source/Scene/Globe.js
index 1a406902e0af..18970b0dd0c4 100644
--- a/packages/engine/Source/Scene/Globe.js
+++ b/packages/engine/Source/Scene/Globe.js
@@ -32,11 +32,9 @@ import ShadowMode from "./ShadowMode.js";
/**
* The globe rendered in the scene, including its terrain ({@link Globe#terrainProvider})
* and imagery layers ({@link Globe#imageryLayers}). Access the globe using {@link Scene#globe}.
- *
* @alias Globe
- * @constructor
- *
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] Determines the size and shape of the
+ * @class
+ * @param {Ellipsoid} [ellipsoid] Determines the size and shape of the
* globe.
*/
function Globe(ellipsoid) {
@@ -77,7 +75,6 @@ function Globe(ellipsoid) {
/**
* Determines if the globe will be shown.
- *
* @type {boolean}
* @default true
*/
@@ -91,7 +88,6 @@ function Globe(ellipsoid) {
/**
* The maximum screen-space error used to drive level-of-detail refinement. Higher
* values will provide better performance but lower visual quality.
- *
* @type {number}
* @default 2
*/
@@ -102,7 +98,6 @@ function Globe(ellipsoid) {
* tiles beyond this number will be freed, as long as they aren't needed for rendering
* this frame. A larger number will consume more memory but will show detail faster
* when, for example, zooming out and then back in.
- *
* @type {number}
* @default 100
*/
@@ -152,7 +147,6 @@ function Globe(ellipsoid) {
/**
* Enable lighting the globe with the scene's light source.
- *
* @type {boolean}
* @default false
*/
@@ -162,7 +156,6 @@ function Globe(ellipsoid) {
* A multiplier to adjust terrain lambert lighting.
* This number is multiplied by the result of czm_getLambertDiffuse
in GlobeFS.glsl.
* This only takes effect when enableLighting
is true
.
- *
* @type {number}
* @default 0.9
*/
@@ -171,7 +164,6 @@ function Globe(ellipsoid) {
/**
* Enable dynamic lighting effects on atmosphere and fog. This only takes effect
* when enableLighting
is true
.
- *
* @type {boolean}
* @default true
*/
@@ -181,7 +173,6 @@ function Globe(ellipsoid) {
* Whether dynamic atmosphere lighting uses the sun direction instead of the scene's
* light direction. This only takes effect when enableLighting
and
* dynamicAtmosphereLighting
are true
.
- *
* @type {boolean}
* @default false
*/
@@ -189,7 +180,6 @@ function Globe(ellipsoid) {
/**
* Enable the ground atmosphere, which is drawn over the globe when viewed from a distance between lightingFadeInDistance
and lightingFadeOutDistance
.
- *
* @type {boolean}
* @default true
*/
@@ -197,7 +187,6 @@ function Globe(ellipsoid) {
/**
* The intensity of the light that is used for computing the ground atmosphere color.
- *
* @type {number}
* @default 10.0
*/
@@ -205,7 +194,6 @@ function Globe(ellipsoid) {
/**
* The Rayleigh scattering coefficient used in the atmospheric scattering equations for the ground atmosphere.
- *
* @type {Cartesian3}
* @default Cartesian3(5.5e-6, 13.0e-6, 28.4e-6)
*/
@@ -213,7 +201,6 @@ function Globe(ellipsoid) {
/**
* The Mie scattering coefficient used in the atmospheric scattering equations for the ground atmosphere.
- *
* @type {Cartesian3}
* @default Cartesian3(21e-6, 21e-6, 21e-6)
*/
@@ -221,7 +208,6 @@ function Globe(ellipsoid) {
/**
* The Rayleigh scale height used in the atmospheric scattering equations for the ground atmosphere, in meters.
- *
* @type {number}
* @default 10000.0
*/
@@ -229,7 +215,6 @@ function Globe(ellipsoid) {
/**
* The Mie scale height used in the atmospheric scattering equations for the ground atmosphere, in meters.
- *
* @type {number}
* @default 3200.0
*/
@@ -248,7 +233,6 @@ function Globe(ellipsoid) {
/**
* The distance where everything becomes lit. This only takes effect
* when enableLighting
or showGroundAtmosphere
is true
.
- *
* @type {number}
* @default 10000000.0
*/
@@ -257,7 +241,6 @@ function Globe(ellipsoid) {
/**
* The distance where lighting resumes. This only takes effect
* when enableLighting
or showGroundAtmosphere
is true
.
- *
* @type {number}
* @default 20000000.0
*/
@@ -267,7 +250,6 @@ function Globe(ellipsoid) {
* The distance where the darkness of night from the ground atmosphere fades out to a lit ground atmosphere.
* This only takes effect when showGroundAtmosphere
, enableLighting
, and
* dynamicAtmosphereLighting
are true
.
- *
* @type {number}
* @default 10000000.0
*/
@@ -277,7 +259,6 @@ function Globe(ellipsoid) {
* The distance where the darkness of night from the ground atmosphere fades in to an unlit ground atmosphere.
* This only takes effect when showGroundAtmosphere
, enableLighting
, and
* dynamicAtmosphereLighting
are true
.
- *
* @type {number}
* @default 50000000.0
*/
@@ -287,7 +268,6 @@ function Globe(ellipsoid) {
* True if an animated wave effect should be shown in areas of the globe
* covered by water; otherwise, false. This property is ignored if the
* terrainProvider
does not provide a water mask.
- *
* @type {boolean}
* @default true
*/
@@ -299,10 +279,8 @@ function Globe(ellipsoid) {
* of terrain unless they're on the opposite side of the globe. The disadvantage of depth
* testing primitives against terrain is that slight numerical noise or terrain level-of-detail
* switched can sometimes make a primitive that should be on the surface disappear underneath it.
- *
* @type {boolean}
* @default false
- *
*/
this.depthTestAgainstTerrain = false;
@@ -310,7 +288,6 @@ function Globe(ellipsoid) {
* Determines whether the globe casts or receives shadows from light sources. Setting the globe
* to cast shadows may impact performance since the terrain is rendered again from the light's perspective.
* Currently only terrain that is in view casts shadows. By default the globe does not cast shadows.
- *
* @type {ShadowMode}
* @default ShadowMode.RECEIVE_ONLY
*/
@@ -343,7 +320,6 @@ function Globe(ellipsoid) {
/**
* Whether to show terrain skirts. Terrain skirts are geometry extending downwards from a tile's edges used to hide seams between neighboring tiles.
* Skirts are always hidden when the camera is underground or translucency is enabled.
- *
* @type {boolean}
* @default true
*/
@@ -351,7 +327,6 @@ function Globe(ellipsoid) {
/**
* Whether to cull back-facing terrain. Back faces are not culled when the camera is underground or translucency is enabled.
- *
* @type {boolean}
* @default true
*/
@@ -363,7 +338,6 @@ function Globe(ellipsoid) {
/**
* Determines the darkness of the vertex shadow.
* This only takes effect when enableLighting
is true
.
- *
* @type {number}
* @default 0.3
*/
@@ -393,7 +367,6 @@ Object.defineProperties(Globe.prototype, {
},
/**
* Gets an event that's raised when an imagery layer is added, shown, hidden, moved, or removed.
- *
* @memberof Globe.prototype
* @type {Event}
* @readonly
@@ -437,7 +410,6 @@ Object.defineProperties(Globe.prototype, {
},
/**
* A property specifying a {@link ClippingPlaneCollection} used to selectively disable rendering on the outside of each plane.
- *
* @memberof Globe.prototype
* @type {ClippingPlaneCollection}
*/
@@ -451,7 +423,6 @@ Object.defineProperties(Globe.prototype, {
},
/**
* A property specifying a {@link ClippingPolygonCollection} used to selectively disable rendering inside or outside a list of polygons.
- *
* @memberof Globe.prototype
* @type {ClippingPolygonCollection}
*/
@@ -466,7 +437,6 @@ Object.defineProperties(Globe.prototype, {
/**
* A property specifying a {@link Rectangle} used to limit globe rendering to a cartographic area.
* Defaults to the maximum extent of cartographic coordinates.
- *
* @memberof Globe.prototype
* @type {Rectangle}
* @default {@link Rectangle.MAX_VALUE}
@@ -501,10 +471,8 @@ Object.defineProperties(Globe.prototype, {
/**
* The terrain provider providing surface geometry for this globe.
* @type {TerrainProvider}
- *
* @memberof Globe.prototype
* @type {TerrainProvider}
- *
*/
terrainProvider: {
get: function () {
@@ -522,7 +490,6 @@ Object.defineProperties(Globe.prototype, {
},
/**
* Gets an event that's raised when the terrain provider is changed
- *
* @memberof Globe.prototype
* @type {Event}
* @readonly
@@ -535,7 +502,6 @@ Object.defineProperties(Globe.prototype, {
/**
* Gets an event that's raised when the length of the tile load queue has changed since the last render frame. When the load queue is empty,
* all terrain and imagery for the current view have been loaded. The event passes the new length of the tile load queue.
- *
* @memberof Globe.prototype
* @type {Event}
*/
@@ -568,11 +534,9 @@ Object.defineProperties(Globe.prototype, {
* blended with the globe color based on the camera's distance.
*
* To disable underground coloring, set undergroundColor
to undefined
.
- *
* @memberof Globe.prototype
* @type {Color}
* @default {@link Color.BLACK}
- *
* @see Globe#undergroundColorAlphaByDistance
*/
undergroundColor: {
@@ -594,12 +558,9 @@ Object.defineProperties(Globe.prototype, {
*
* When the camera is above the ellipsoid the distance is computed from the nearest
* point on the ellipsoid instead of the camera's position.
- *
* @memberof Globe.prototype
* @type {NearFarScalar}
- *
* @see Globe#undergroundColor
- *
*/
undergroundColorAlphaByDistance: {
get: function () {
@@ -622,7 +583,6 @@ Object.defineProperties(Globe.prototype, {
/**
* Properties for controlling globe translucency.
- *
* @memberof Globe.prototype
* @type {GlobeTranslucency}
*/
@@ -689,13 +649,11 @@ const scratchSphereIntersectionResult = {
/**
* Find an intersection between a ray and the globe surface that was rendered. The ray must be given in world coordinates.
- *
* @param {Ray} ray The ray to test for intersection.
* @param {Scene} scene The scene.
- * @param {boolean} [cullBackFaces=true] Set to true to not pick back faces.
+ * @param {boolean} [cullBackFaces] Set to true to not pick back faces.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3|undefined} The intersection or undefined
if none was found. The returned position is in projected coordinates for 2D and Columbus View.
- *
* @private
*/
Globe.prototype.pickWorldCoordinates = function (
@@ -793,12 +751,10 @@ Globe.prototype.pickWorldCoordinates = function (
const cartoScratch = new Cartographic();
/**
* Find an intersection between a ray and the globe surface that was rendered. The ray must be given in world coordinates.
- *
* @param {Ray} ray The ray to test for intersection.
* @param {Scene} scene The scene.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3|undefined} The intersection or undefined
if none was found.
- *
* @example
* // find intersection of ray through a pixel and the globe
* const ray = viewer.camera.getPickRay(windowCoordinates);
@@ -828,7 +784,6 @@ function tileIfContainsCartographic(tile, cartographic) {
/**
* Get the height of the surface at a given cartographic.
- *
* @param {Cartographic} cartographic The cartographic for which to find the height.
* @returns {number|undefined} The height of the cartographic or undefined if it could not be found.
*/
@@ -956,6 +911,7 @@ Globe.prototype.getHeight = function (cartographic) {
};
/**
+ * @param frameState
* @private
*/
Globe.prototype.update = function (frameState) {
@@ -969,6 +925,7 @@ Globe.prototype.update = function (frameState) {
};
/**
+ * @param frameState
* @private
*/
Globe.prototype.beginFrame = function (frameState) {
@@ -1059,6 +1016,7 @@ Globe.prototype.beginFrame = function (frameState) {
};
/**
+ * @param frameState
* @private
*/
Globe.prototype.render = function (frameState) {
@@ -1074,6 +1032,7 @@ Globe.prototype.render = function (frameState) {
};
/**
+ * @param frameState
* @private
*/
Globe.prototype.endFrame = function (frameState) {
@@ -1091,9 +1050,7 @@ Globe.prototype.endFrame = function (frameState) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
- *
* @see Globe#destroy
*/
Globe.prototype.isDestroyed = function () {
@@ -1107,13 +1064,9 @@ Globe.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* globe = globe && globe.destroy();
- *
* @see Globe#isDestroyed
*/
Globe.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/GlobeSurfaceShaderSet.js b/packages/engine/Source/Scene/GlobeSurfaceShaderSet.js
index a7a48d624b87..a2ce9fcbd32a 100644
--- a/packages/engine/Source/Scene/GlobeSurfaceShaderSet.js
+++ b/packages/engine/Source/Scene/GlobeSurfaceShaderSet.js
@@ -23,7 +23,6 @@ function GlobeSurfaceShader(
/**
* Manages the shaders used to shade the surface of a {@link Globe}.
- *
* @alias GlobeSurfaceShaderSet
* @private
*/
diff --git a/packages/engine/Source/Scene/GlobeSurfaceTile.js b/packages/engine/Source/Scene/GlobeSurfaceTile.js
index c1c7ab20dd52..c808cd0ac329 100644
--- a/packages/engine/Source/Scene/GlobeSurfaceTile.js
+++ b/packages/engine/Source/Scene/GlobeSurfaceTile.js
@@ -29,8 +29,7 @@ import TerrainState from "./TerrainState.js";
/**
* Contains additional information about a {@link QuadtreeTile} of the globe's surface, and
* encapsulates state transition logic for loading tiles.
- *
- * @constructor
+ * @class
* @alias GlobeSurfaceTile
* @private
*/
@@ -110,7 +109,6 @@ Object.defineProperties(GlobeSurfaceTile.prototype, {
* {@link GlobeSurfaceTile#vertexArray} is defined. Otherwise, It returns the
* {@link TerrainFillMesh#mesh} property of the {@link GlobeSurfaceTile#fill}.
* If there is no fill, it returns undefined.
- *
* @memberof GlobeSurfaceTile.prototype
* @type {TerrainMesh}
*/
diff --git a/packages/engine/Source/Scene/GlobeSurfaceTileProvider.js b/packages/engine/Source/Scene/GlobeSurfaceTileProvider.js
index ab4ec1e9a9e7..d684607009e9 100644
--- a/packages/engine/Source/Scene/GlobeSurfaceTileProvider.js
+++ b/packages/engine/Source/Scene/GlobeSurfaceTileProvider.js
@@ -56,14 +56,12 @@ import TileSelectionResult from "./TileSelectionResult.js";
/**
* Provides quadtree tiles representing the surface of the globe. This type is intended to be used
* with {@link QuadtreePrimitive}.
- *
* @alias GlobeSurfaceTileProvider
- * @constructor
- *
+ * @class
* @param {TerrainProvider} options.terrainProvider The terrain provider that describes the surface geometry.
+ * @param options
* @param {ImageryLayerCollection} option.imageryLayers The collection of imagery layers describing the shading of the surface.
* @param {GlobeSurfaceShaderSet} options.surfaceShaderSet The set of shaders used to render the surface.
- *
* @private
*/
function GlobeSurfaceTileProvider(options) {
@@ -299,9 +297,7 @@ Object.defineProperties(GlobeSurfaceTileProvider.prototype, {
},
/**
* The {@link ClippingPlaneCollection} used to selectively disable rendering.
- *
* @type {ClippingPlaneCollection}
- *
* @private
*/
clippingPlanes: {
@@ -315,9 +311,7 @@ Object.defineProperties(GlobeSurfaceTileProvider.prototype, {
/**
* The {@link ClippingPolygonCollection} used to selectively disable rendering inside or outside a list of polygons.
- *
* @type {ClippingPolygonCollection}
- *
* @private
*/
clippingPolygons: {
@@ -346,6 +340,7 @@ function sortTileImageryByLayerIndex(a, b) {
/**
* Make updates to the tile provider that are not involved in rendering. Called before the render update cycle.
+ * @param frameState
*/
GlobeSurfaceTileProvider.prototype.update = function (frameState) {
// update collection: imagery indices, base layers, raise layer show/hide event
@@ -399,7 +394,6 @@ GlobeSurfaceTileProvider.prototype.initialize = function (frameState) {
/**
* Called at the beginning of the update cycle for each render frame, before {@link QuadtreeTileProvider#showTileThisFrame}
* or any other functions.
- *
* @param {FrameState} frameState The frame state.
*/
GlobeSurfaceTileProvider.prototype.beginUpdate = function (frameState) {
@@ -432,7 +426,6 @@ GlobeSurfaceTileProvider.prototype.beginUpdate = function (frameState) {
/**
* Called at the end of the update cycle for each render frame, after {@link QuadtreeTileProvider#showTileThisFrame}
* and any other functions.
- *
* @param {FrameState} frameState The frame state.
*/
GlobeSurfaceTileProvider.prototype.endUpdate = function (frameState) {
@@ -555,7 +548,6 @@ function pushCommand(command, frameState) {
/**
* Adds draw commands for tiles rendered in the previous frame for a pick pass.
- *
* @param {FrameState} frameState The frame state.
*/
GlobeSurfaceTileProvider.prototype.updateForPick = function (frameState) {
@@ -575,7 +567,6 @@ GlobeSurfaceTileProvider.prototype.cancelReprojections = function () {
/**
* Gets the maximum geometric error allowed in a tile at a given level, in meters.
- *
* @param {number} level The tile level for which to get the maximum geometric error.
* @returns {number} The maximum geometric error in meters.
*/
@@ -592,7 +583,6 @@ GlobeSurfaceTileProvider.prototype.getLevelMaximumGeometricError = function (
/**
* Loads, or continues loading, a given tile. This function will continue to be called
* until {@link QuadtreeTile#state} is no longer {@link QuadtreeTileLoadState#LOADING}.
- *
* @param {FrameState} frameState The frame state.
* @param {QuadtreeTile} tile The tile to load.
*/
@@ -710,11 +700,9 @@ function isUndergroundVisible(tileProvider, frameState) {
* Determines the visibility of a given tile. The tile may be fully visible, partially visible, or not
* visible at all. Tiles that are renderable and are at least partially visible will be shown by a call
* to {@link GlobeSurfaceTileProvider#showTileThisFrame}.
- *
* @param {QuadtreeTile} tile The tile instance.
* @param {FrameState} frameState The state information about the current frame.
* @param {QuadtreeOccluders} occluders The objects that may occlude this tile.
- *
* @returns {Visibility} Visibility.NONE if the tile is not visible,
* Visibility.PARTIAL if the tile is partially visible, or
* Visibility.FULL if the tile is fully visible.
@@ -896,6 +884,7 @@ const canRenderTraversalStack = [];
* called if this tile's descendants were rendered last frame. If the tile is fully loaded,
* it is assumed that this method will return true and it will not be called.
* @param {QuadtreeTile} tile The tile to check.
+ * @param frameState
* @returns {boolean} True if the tile can be rendered without losing detail.
*/
GlobeSurfaceTileProvider.prototype.canRenderWithoutLosingDetail = function (
@@ -1067,7 +1056,6 @@ const northeastScratch = new Cartesian3();
* Shows a specified tile in this frame. The provider can cause the tile to be shown by adding
* render commands to the commandList, or use any other method as appropriate. The tile is not
* expected to be visible next frame as well, unless this method is called next frame, too.
- *
* @param {QuadtreeTile} tile The tile instance.
* @param {FrameState} frameState The state information of the current rendering frame.
*/
@@ -1165,10 +1153,8 @@ function computeOccludeePoint(
/**
* Gets the distance from the camera to the closest point on the tile. This is used for level-of-detail selection.
- *
* @param {QuadtreeTile} tile The tile instance.
* @param {FrameState} frameState The state information of the current rendering frame.
- *
* @returns {number} The distance from the camera to the closest point on the tile, in meters.
*/
GlobeSurfaceTileProvider.prototype.computeDistanceToTile = function (
@@ -1383,9 +1369,7 @@ function updateTileBoundingRegion(tile, tileProvider, frameState) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
- *
* @see GlobeSurfaceTileProvider#destroy
*/
GlobeSurfaceTileProvider.prototype.isDestroyed = function () {
@@ -1399,13 +1383,9 @@ GlobeSurfaceTileProvider.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* provider = provider && provider();
- *
* @see GlobeSurfaceTileProvider#isDestroyed
*/
GlobeSurfaceTileProvider.prototype.destroy = function () {
@@ -1961,9 +1941,7 @@ function createWireframeVertexArrayIfNecessary(context, provider, tile) {
/**
* Creates a vertex array for wireframe rendering of a terrain tile.
- *
* @private
- *
* @param {Context} context The context in which to create the vertex array.
* @param {VertexArray} vertexArray The existing, non-wireframe vertex array. The new vertex array
* will share vertex buffers with this existing one.
diff --git a/packages/engine/Source/Scene/GlobeTranslucency.js b/packages/engine/Source/Scene/GlobeTranslucency.js
index d81eca651829..d9011b7def58 100644
--- a/packages/engine/Source/Scene/GlobeTranslucency.js
+++ b/packages/engine/Source/Scene/GlobeTranslucency.js
@@ -6,9 +6,8 @@ import Rectangle from "../Core/Rectangle.js";
/**
* Properties for controlling globe translucency.
- *
* @alias GlobeTranslucency
- * @constructor
+ * @class
*/
function GlobeTranslucency() {
this._enabled = false;
@@ -31,12 +30,9 @@ Object.defineProperties(GlobeTranslucency.prototype, {
* is considered front facing.
*
* Translucency is disabled by default.
- *
* @memberof GlobeTranslucency.prototype
- *
* @type {boolean}
* @default false
- *
* @see GlobeTranslucency#frontFaceAlpha
* @see GlobeTranslucency#frontFaceAlphaByDistance
* @see GlobeTranslucency#backFaceAlpha
@@ -58,15 +54,11 @@ Object.defineProperties(GlobeTranslucency.prototype, {
* A constant translucency to apply to front faces of the globe.
*
* {@link GlobeTranslucency#enabled} must be set to true for this option to take effect.
- *
* @memberof GlobeTranslucency.prototype
- *
* @type {number}
* @default 1.0
- *
* @see GlobeTranslucency#enabled
* @see GlobeTranslucency#frontFaceAlphaByDistance
- *
* @example
* // Set front face translucency to 0.5.
* globe.translucency.frontFaceAlpha = 0.5;
@@ -93,15 +85,11 @@ Object.defineProperties(GlobeTranslucency.prototype, {
* frontFaceAlphaByDistance will be disabled.
*
* {@link GlobeTranslucency#enabled} must be set to true for this option to take effect.
- *
* @memberof GlobeTranslucency.prototype
- *
* @type {NearFarScalar}
* @default undefined
- *
* @see GlobeTranslucency#enabled
* @see GlobeTranslucency#frontFaceAlpha
- *
* @example
* // Example 1.
* // Set front face translucency to 0.5 when the
@@ -109,7 +97,6 @@ Object.defineProperties(GlobeTranslucency.prototype, {
* // as the camera distance approaches 8.0e6 meters.
* globe.translucency.frontFaceAlphaByDistance = new Cesium.NearFarScalar(1.5e2, 0.5, 8.0e6, 1.0);
* globe.translucency.enabled = true;
- *
* @example
* // Example 2.
* // Disable front face translucency by distance
@@ -138,15 +125,11 @@ Object.defineProperties(GlobeTranslucency.prototype, {
* A constant translucency to apply to back faces of the globe.
*
* {@link GlobeTranslucency#enabled} must be set to true for this option to take effect.
- *
* @memberof GlobeTranslucency.prototype
- *
* @type {number}
* @default 1.0
- *
* @see GlobeTranslucency#enabled
* @see GlobeTranslucency#backFaceAlphaByDistance
- *
* @example
* // Set back face translucency to 0.5.
* globe.translucency.backFaceAlpha = 0.5;
@@ -173,15 +156,11 @@ Object.defineProperties(GlobeTranslucency.prototype, {
* backFaceAlphaByDistance will be disabled.
*
* {@link GlobeTranslucency#enabled} must be set to true for this option to take effect.
- *
* @memberof GlobeTranslucency.prototype
- *
* @type {NearFarScalar}
* @default undefined
- *
* @see GlobeTranslucency#enabled
* @see GlobeTranslucency#backFaceAlpha
- *
* @example
* // Example 1.
* // Set back face translucency to 0.5 when the
@@ -189,7 +168,6 @@ Object.defineProperties(GlobeTranslucency.prototype, {
* // as the camera distance approaches 8.0e6 meters.
* globe.translucency.backFaceAlphaByDistance = new Cesium.NearFarScalar(1.5e2, 0.5, 8.0e6, 1.0);
* globe.translucency.enabled = true;
- *
* @example
* // Example 2.
* // Disable back face translucency by distance
@@ -217,9 +195,7 @@ Object.defineProperties(GlobeTranslucency.prototype, {
/**
* A property specifying a {@link Rectangle} used to limit translucency to a cartographic area.
* Defaults to the maximum extent of cartographic coordinates.
- *
* @memberof GlobeTranslucency.prototype
- *
* @type {Rectangle}
* @default {@link Rectangle.MAX_VALUE}
*/
diff --git a/packages/engine/Source/Scene/GltfBufferViewLoader.js b/packages/engine/Source/Scene/GltfBufferViewLoader.js
index 714d3166bae7..3f6493298c0b 100644
--- a/packages/engine/Source/Scene/GltfBufferViewLoader.js
+++ b/packages/engine/Source/Scene/GltfBufferViewLoader.js
@@ -11,11 +11,9 @@ import ResourceLoaderState from "./ResourceLoaderState.js";
*
* Implements the {@link ResourceLoader} interface.
*
- *
* @alias GltfBufferViewLoader
- * @constructor
+ * @class
* @augments ResourceLoader
- *
* @param {object} options Object with the following properties:
* @param {ResourceCache} options.resourceCache The {@link ResourceCache} (to avoid circular dependencies).
* @param {object} options.gltf The glTF JSON.
@@ -23,7 +21,6 @@ import ResourceLoaderState from "./ResourceLoaderState.js";
* @param {Resource} options.gltfResource The {@link Resource} containing the glTF.
* @param {Resource} options.baseResource The {@link Resource} that paths in the glTF JSON are relative to.
* @param {string} [options.cacheKey] The cache key of the resource.
- *
* @private
*/
function GltfBufferViewLoader(options) {
@@ -97,9 +94,7 @@ if (defined(Object.create)) {
Object.defineProperties(GltfBufferViewLoader.prototype, {
/**
* The cache key of the resource.
- *
* @memberof GltfBufferViewLoader.prototype
- *
* @type {string}
* @readonly
* @private
@@ -111,9 +106,7 @@ Object.defineProperties(GltfBufferViewLoader.prototype, {
},
/**
* The typed array containing buffer view data.
- *
* @memberof GltfBufferViewLoader.prototype
- *
* @type {Uint8Array}
* @readonly
* @private
diff --git a/packages/engine/Source/Scene/GltfDracoLoader.js b/packages/engine/Source/Scene/GltfDracoLoader.js
index a1902e0ba848..75c0c07d78e1 100644
--- a/packages/engine/Source/Scene/GltfDracoLoader.js
+++ b/packages/engine/Source/Scene/GltfDracoLoader.js
@@ -10,11 +10,9 @@ import ResourceLoaderState from "./ResourceLoaderState.js";
*
* Implements the {@link ResourceLoader} interface.
*
- *
* @alias GltfDracoLoader
- * @constructor
+ * @class
* @augments ResourceLoader
- *
* @param {object} options Object with the following properties:
* @param {ResourceCache} options.resourceCache The {@link ResourceCache} (to avoid circular dependencies).
* @param {object} options.gltf The glTF JSON.
@@ -22,7 +20,6 @@ import ResourceLoaderState from "./ResourceLoaderState.js";
* @param {Resource} options.gltfResource The {@link Resource} containing the glTF.
* @param {Resource} options.baseResource The {@link Resource} that paths in the glTF JSON are relative to.
* @param {string} [options.cacheKey] The cache key of the resource.
- *
* @private
*/
function GltfDracoLoader(options) {
@@ -65,9 +62,7 @@ if (defined(Object.create)) {
Object.defineProperties(GltfDracoLoader.prototype, {
/**
* The cache key of the resource.
- *
* @memberof GltfDracoLoader.prototype
- *
* @type {string}
* @readonly
* @private
@@ -79,9 +74,7 @@ Object.defineProperties(GltfDracoLoader.prototype, {
},
/**
* The decoded data.
- *
* @memberof GltfDracoLoader.prototype
- *
* @type {object}
* @readonly
* @private
@@ -171,7 +164,6 @@ async function processDecode(loader, decodePromise) {
/**
* Processes the resource until it becomes ready.
- *
* @param {FrameState} frameState The frame state.
* @private
*/
diff --git a/packages/engine/Source/Scene/GltfImageLoader.js b/packages/engine/Source/Scene/GltfImageLoader.js
index 91ae40022b81..df86bdb66f0c 100644
--- a/packages/engine/Source/Scene/GltfImageLoader.js
+++ b/packages/engine/Source/Scene/GltfImageLoader.js
@@ -12,11 +12,9 @@ import ResourceLoaderState from "./ResourceLoaderState.js";
*
* Implements the {@link ResourceLoader} interface.
*
- *
* @alias GltfImageLoader
- * @constructor
+ * @class
* @augments ResourceLoader
- *
* @param {object} options Object with the following properties:
* @param {ResourceCache} options.resourceCache The {@link ResourceCache} (to avoid circular dependencies).
* @param {object} options.gltf The glTF JSON.
@@ -24,7 +22,6 @@ import ResourceLoaderState from "./ResourceLoaderState.js";
* @param {Resource} options.gltfResource The {@link Resource} containing the glTF.
* @param {Resource} options.baseResource The {@link Resource} that paths in the glTF JSON are relative to.
* @param {string} [options.cacheKey] The cache key of the resource.
- *
* @private
*/
function GltfImageLoader(options) {
@@ -70,9 +67,7 @@ if (defined(Object.create)) {
Object.defineProperties(GltfImageLoader.prototype, {
/**
* The cache key of the resource.
- *
* @memberof GltfImageLoader.prototype
- *
* @type {string}
* @readonly
* @private
@@ -84,9 +79,7 @@ Object.defineProperties(GltfImageLoader.prototype, {
},
/**
* The image.
- *
* @memberof GltfImageLoader.prototype
- *
* @type {Image|ImageBitmap|CompressedTextureBuffer}
* @readonly
* @private
@@ -98,9 +91,7 @@ Object.defineProperties(GltfImageLoader.prototype, {
},
/**
* The mip levels. Only defined for KTX2 files containing mip levels.
- *
* @memberof GltfImageLoader.prototype
- *
* @type {Uint8Array[]}
* @readonly
* @private
diff --git a/packages/engine/Source/Scene/GltfIndexBufferLoader.js b/packages/engine/Source/Scene/GltfIndexBufferLoader.js
index de52c8412095..a9a7d1b29a65 100644
--- a/packages/engine/Source/Scene/GltfIndexBufferLoader.js
+++ b/packages/engine/Source/Scene/GltfIndexBufferLoader.js
@@ -16,11 +16,9 @@ import ResourceLoaderState from "./ResourceLoaderState.js";
*
* Implements the {@link ResourceLoader} interface.
*
- *
* @alias GltfIndexBufferLoader
- * @constructor
+ * @class
* @augments ResourceLoader
- *
* @param {object} options Object with the following properties:
* @param {ResourceCache} options.resourceCache The {@link ResourceCache} (to avoid circular dependencies).
* @param {object} options.gltf The glTF JSON.
@@ -29,9 +27,9 @@ import ResourceLoaderState from "./ResourceLoaderState.js";
* @param {Resource} options.baseResource The {@link Resource} that paths in the glTF JSON are relative to.
* @param {object} [options.draco] The Draco extension object.
* @param {string} [options.cacheKey] The cache key of the resource.
- * @param {boolean} [options.asynchronous=true] Determines if WebGL resource creation will be spread out over several frames or block until all WebGL resources are created.
- * @param {boolean} [options.loadBuffer=false] Load the index buffer as a GPU index buffer.
- * @param {boolean} [options.loadTypedArray=false] Load the index buffer as a typed array.
+ * @param {boolean} [options.asynchronous] Determines if WebGL resource creation will be spread out over several frames or block until all WebGL resources are created.
+ * @param {boolean} [options.loadBuffer] Load the index buffer as a GPU index buffer.
+ * @param {boolean} [options.loadTypedArray] Load the index buffer as a typed array.
* @private
*/
function GltfIndexBufferLoader(options) {
@@ -89,9 +87,7 @@ if (defined(Object.create)) {
Object.defineProperties(GltfIndexBufferLoader.prototype, {
/**
* The cache key of the resource.
- *
* @memberof GltfIndexBufferLoader.prototype
- *
* @type {string}
* @readonly
* @private
@@ -103,9 +99,7 @@ Object.defineProperties(GltfIndexBufferLoader.prototype, {
},
/**
* The index buffer. This is only defined when loadBuffer
is true.
- *
* @memberof GltfIndexBufferLoader.prototype
- *
* @type {Buffer}
* @readonly
* @private
@@ -117,9 +111,7 @@ Object.defineProperties(GltfIndexBufferLoader.prototype, {
},
/**
* The typed array containing indices. This is only defined when loadTypedArray
is true.
- *
* @memberof GltfIndexBufferLoader.prototype
- *
* @type {Uint8Array|Uint16Array|Uint32Array}
* @readonly
* @private
@@ -132,9 +124,7 @@ Object.defineProperties(GltfIndexBufferLoader.prototype, {
/**
* The index datatype after decode.
- *
* @memberof GltfIndexBufferLoader.prototype
- *
* @type {IndexDatatype}
* @readonly
* @private
@@ -315,7 +305,6 @@ function createIndexBuffer(typedArray, indexDatatype, context) {
/**
* Processes the resource until it becomes ready.
- *
* @param {FrameState} frameState The frame state.
* @private
*/
diff --git a/packages/engine/Source/Scene/GltfJsonLoader.js b/packages/engine/Source/Scene/GltfJsonLoader.js
index 97405b1dedaa..6d84234b11f5 100644
--- a/packages/engine/Source/Scene/GltfJsonLoader.js
+++ b/packages/engine/Source/Scene/GltfJsonLoader.js
@@ -22,11 +22,9 @@ import ModelUtility from "./Model/ModelUtility.js";
*
* Implements the {@link ResourceLoader} interface.
*
- *
* @alias GltfJsonLoader
- * @constructor
+ * @class
* @augments ResourceLoader
- *
* @param {object} options Object with the following properties:
* @param {ResourceCache} options.resourceCache The {@link ResourceCache} (to avoid circular dependencies).
* @param {Resource} options.gltfResource The {@link Resource} containing the glTF.
@@ -34,7 +32,6 @@ import ModelUtility from "./Model/ModelUtility.js";
* @param {Uint8Array} [options.typedArray] The typed array containing the glTF contents.
* @param {object} [options.gltfJson] The parsed glTF JSON contents.
* @param {string} [options.cacheKey] The cache key of the resource.
- *
* @private
*/
function GltfJsonLoader(options) {
@@ -72,9 +69,7 @@ if (defined(Object.create)) {
Object.defineProperties(GltfJsonLoader.prototype, {
/**
* The cache key of the resource.
- *
* @memberof GltfJsonLoader.prototype
- *
* @type {string}
* @readonly
* @private
@@ -86,9 +81,7 @@ Object.defineProperties(GltfJsonLoader.prototype, {
},
/**
* The glTF JSON.
- *
* @memberof GltfJsonLoader.prototype
- *
* @type {object}
* @readonly
* @private
@@ -304,7 +297,6 @@ GltfJsonLoader.prototype.unload = function () {
/**
* Exposed for testing
- *
* @private
*/
GltfJsonLoader.prototype._fetchGltf = function () {
diff --git a/packages/engine/Source/Scene/GltfLoader.js b/packages/engine/Source/Scene/GltfLoader.js
index 18f825a6ae4e..146872e6cab7 100644
--- a/packages/engine/Source/Scene/GltfLoader.js
+++ b/packages/engine/Source/Scene/GltfLoader.js
@@ -62,48 +62,38 @@ const {
/**
* States of the glTF loading process. These states also apply to
* asynchronous texture loading unless otherwise noted
- *
* @enum {number}
- *
* @private
*/
const GltfLoaderState = {
/**
* The initial state of the glTF loader before load() is called.
- *
* @type {number}
* @constant
- *
* @private
*/
NOT_LOADED: 0,
/**
* The state of the loader while waiting for the glTF JSON loader promise
* to resolve.
- *
* @type {number}
* @constant
- *
* @private
*/
LOADING: 1,
/**
* The state of the loader once the glTF JSON is loaded but before
* process() is called.
- *
* @type {number}
* @constant
- *
* @private
*/
LOADED: 2,
/**
* The state of the loader while parsing the glTF and creating GPU resources
* as needed.
- *
* @type {number}
* @constant
- *
* @private
*/
PROCESSING: 3,
@@ -114,10 +104,8 @@ const GltfLoaderState = {
*
* This state is not used for asynchronous texture loading.
*
- *
* @type {number}
* @constant
- *
* @private
*/
POST_PROCESSING: 4,
@@ -125,38 +113,30 @@ const GltfLoaderState = {
* Once the processing/post-processing states are finished, the loader
* enters the processed state (sometimes from a promise chain). The next
* call to process() will advance to the ready state.
- *
* @type {number}
* @constant
- *
* @private
*/
PROCESSED: 5,
/**
* When the loader reaches the ready state, the loaders' promise will be
* resolved.
- *
* @type {number}
* @constant
- *
* @private
*/
READY: 6,
/**
* If an error occurs at any point, the loader switches to the failed state.
- *
* @type {number}
* @constant
- *
* @private
*/
FAILED: 7,
/**
* If unload() is called, the loader switches to the unloaded state.
- *
* @type {number}
* @constant
- *
* @private
*/
UNLOADED: 8,
@@ -167,24 +147,22 @@ const GltfLoaderState = {
*
* Implements the {@link ResourceLoader} interface.
*
- *
* @alias GltfLoader
- * @constructor
+ * @class
* @augments ResourceLoader
- *
* @param {object} options Object with the following properties:
* @param {Resource} options.gltfResource The {@link Resource} containing the glTF. This is often the path of the .gltf or .glb file, but may also be the path of the .b3dm, .i3dm, or .cmpt file containing the embedded glb. .cmpt resources should have a URI fragment indicating the index of the inner content to which the glb belongs in order to individually identify the glb in the cache, e.g. http://example.com/tile.cmpt#index=2.
* @param {Resource} [options.baseResource] The {@link Resource} that paths in the glTF JSON are relative to.
* @param {Uint8Array} [options.typedArray] The typed array containing the glTF contents, e.g. from a .b3dm, .i3dm, or .cmpt file.
* @param {object} [options.gltfJson] A parsed glTF JSON file instead of passing it in as a typed array.
- * @param {boolean} [options.releaseGltfJson=false] When true, the glTF JSON is released once the glTF is loaded. This is especially useful for cases like 3D Tiles, where each .gltf model is unique and caching the glTF JSON is not effective.
- * @param {boolean} [options.asynchronous=true] Determines if WebGL resource creation will be spread out over several frames or block until all WebGL resources are created.
- * @param {boolean} [options.incrementallyLoadTextures=true] Determine if textures may continue to stream in after the glTF is loaded.
- * @param {Axis} [options.upAxis=Axis.Y] The up-axis of the glTF model.
- * @param {Axis} [options.forwardAxis=Axis.Z] The forward-axis of the glTF model.
- * @param {boolean} [options.loadAttributesAsTypedArray=false] Load all attributes and indices as typed arrays instead of GPU buffers. If the attributes are interleaved in the glTF they will be de-interleaved in the typed array.
- * @param {boolean} [options.loadAttributesFor2D=false] If true
, load the positions buffer and any instanced attribute buffers as typed arrays for accurately projecting models to 2D.
- * @param {boolean} [options.enablePick=false] If true
, load the positions buffer, any instanced attribute buffers, and index buffer as typed arrays for CPU-enabled picking in WebGL1.
+ * @param {boolean} [options.releaseGltfJson] When true, the glTF JSON is released once the glTF is loaded. This is especially useful for cases like 3D Tiles, where each .gltf model is unique and caching the glTF JSON is not effective.
+ * @param {boolean} [options.asynchronous] Determines if WebGL resource creation will be spread out over several frames or block until all WebGL resources are created.
+ * @param {boolean} [options.incrementallyLoadTextures] Determine if textures may continue to stream in after the glTF is loaded.
+ * @param {Axis} [options.upAxis] The up-axis of the glTF model.
+ * @param {Axis} [options.forwardAxis] The forward-axis of the glTF model.
+ * @param {boolean} [options.loadAttributesAsTypedArray] Load all attributes and indices as typed arrays instead of GPU buffers. If the attributes are interleaved in the glTF they will be de-interleaved in the typed array.
+ * @param {boolean} [options.loadAttributesFor2D] If true
, load the positions buffer and any instanced attribute buffers as typed arrays for accurately projecting models to 2D.
+ * @param {boolean} [options.enablePick] If true
, load the positions buffer, any instanced attribute buffers, and index buffer as typed arrays for CPU-enabled picking in WebGL1.
* @param {boolean} [options.loadIndicesForWireframe=false] If true
, load the index buffer as both a buffer and typed array. The latter is useful for creating wireframe indices in WebGL1.
* @param {boolean} [options.loadPrimitiveOutline=true] If true
, load outlines from the {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline} extension. This can be set false to avoid post-processing geometry at load time.
* @param {boolean} [options.loadForClassification=false] If true
and if the model has feature IDs, load the feature IDs and indices as typed arrays. This is useful for batching features for classification.
@@ -283,9 +261,7 @@ if (defined(Object.create)) {
Object.defineProperties(GltfLoader.prototype, {
/**
* The cache key of the resource.
- *
* @memberof GltfLoader.prototype
- *
* @type {string}
* @readonly
* @private
@@ -297,9 +273,7 @@ Object.defineProperties(GltfLoader.prototype, {
},
/**
* The loaded components.
- *
* @memberof GltfLoader.prototype
- *
* @type {ModelComponents.Components}
* @readonly
* @private
@@ -311,9 +285,7 @@ Object.defineProperties(GltfLoader.prototype, {
},
/**
* The loaded glTF json.
- *
* @memberof GltfLoader.prototype
- *
* @type {object}
* @readonly
* @private
@@ -328,9 +300,7 @@ Object.defineProperties(GltfLoader.prototype, {
},
/**
* Returns true if textures are loaded separately from the other glTF resources.
- *
* @memberof GltfLoader.prototype
- *
* @type {boolean}
* @readonly
* @private
@@ -342,9 +312,7 @@ Object.defineProperties(GltfLoader.prototype, {
},
/**
* true if textures are loaded, useful when incrementallyLoadTextures is true
- *
* @memberof GltfLoader.prototype
- *
* @type {boolean}
* @readonly
* @private
@@ -358,6 +326,7 @@ Object.defineProperties(GltfLoader.prototype, {
/**
* Loads the gltf object
+ * @param loader
*/
async function loadGltfJson(loader) {
loader._state = GltfLoaderState.LOADING;
@@ -430,8 +399,8 @@ async function loadResources(loader, frameState) {
/**
* Loads the resource.
* @returns {Promise.} A promise which resolves to the loader when the resource loading is completed.
- * @exception {RuntimeError} Unsupported glTF version
- * @exception {RuntimeError} Unsupported glTF Extension
+ * @throws {RuntimeError} Unsupported glTF version
+ * @throws {RuntimeError} Unsupported glTF Extension
* @private
*/
GltfLoader.prototype.load = async function () {
@@ -523,6 +492,7 @@ function gatherPostProcessBuffers(loader, primitiveLoadPlan) {
/**
* Process loaders other than textures
+ * @param frameState
* @private
*/
GltfLoader.prototype._process = function (frameState) {
@@ -558,6 +528,7 @@ GltfLoader.prototype._process = function (frameState) {
/**
* Process textures other than textures
+ * @param frameState
* @private
*/
GltfLoader.prototype._processTextures = function (frameState) {
@@ -592,7 +563,6 @@ GltfLoader.prototype._processTextures = function (frameState) {
/**
* Processes the resource until it becomes ready.
- *
* @param {FrameState} frameState The frame state.
* @private
*/
@@ -1627,7 +1597,6 @@ function loadClearcoat(loader, clearcoatInfo, frameState) {
/**
* Load textures and parse factors and flags for a glTF material
- *
* @param {GltfLoader} loader
* @param {object} gltfMaterial An entry from the .materials
array in the glTF JSON
* @param {FrameState} frameState
@@ -2597,7 +2566,6 @@ const scratchCenter = new Cartesian3();
* frame. Any promise failures are collected, and will be handled synchronously in process().
* Also note that it's fine to call process before a loader is ready to process or
* after it has failed; nothing will happen.
- *
* @param {GltfLoader} loader
* @param {FrameState} frameState
* @returns {Promise} A Promise that resolves when all loaders are ready
diff --git a/packages/engine/Source/Scene/GltfLoaderUtil.js b/packages/engine/Source/Scene/GltfLoaderUtil.js
index 76f0a5c3b17e..378ec0559af1 100644
--- a/packages/engine/Source/Scene/GltfLoaderUtil.js
+++ b/packages/engine/Source/Scene/GltfLoaderUtil.js
@@ -11,9 +11,7 @@ import ModelComponents from "./ModelComponents.js";
/**
* glTF loading utilities.
- *
* @namespace GltfLoaderUtil
- *
* @private
*/
const GltfLoaderUtil = {};
@@ -24,12 +22,10 @@ const GltfLoaderUtil = {};
* When the texture has the EXT_texture_webp extension and the browser supports
* WebP images the WebP image ID is returned.
*
- *
* @param {object} options Object with the following properties:
* @param {object} options.gltf The glTF JSON.
* @param {number} options.textureId The texture ID.
* @param {SupportedImageFormats} options.supportedImageFormats The supported image formats.
- *
* @returns {number} The image ID.
* @private
*/
@@ -60,12 +56,10 @@ GltfLoaderUtil.getImageIdFromTexture = function (options) {
/**
* Create a sampler for a texture.
- *
* @param {object} options Object with the following properties:
* @param {object} options.gltf The glTF JSON.
* @param {object} options.textureInfo The texture info object.
- * @param {boolean} [options.compressedTextureNoMipmap=false] True when the texture is compressed and does not have an embedded mipmap.
- *
+ * @param {boolean} [options.compressedTextureNoMipmap] True when the texture is compressed and does not have an embedded mipmap.
* @returns {Sampler} The sampler.
* @private
*/
@@ -123,12 +117,10 @@ const defaultScale = new Cartesian2(1.0, 1.0);
/**
* Create a model texture reader.
- *
* @param {object} options Object with the following properties:
* @param {object} options.textureInfo The texture info JSON.
* @param {string} [options.channels] The texture channels to read from.
* @param {Texture} [options.texture] The texture object.
- *
* @returns {ModelComponents.TextureReader} The texture reader for this model.
*/
GltfLoaderUtil.createModelTextureReader = function (options) {
diff --git a/packages/engine/Source/Scene/GltfStructuralMetadataLoader.js b/packages/engine/Source/Scene/GltfStructuralMetadataLoader.js
index b8b2d0b0b45b..6732393807ab 100644
--- a/packages/engine/Source/Scene/GltfStructuralMetadataLoader.js
+++ b/packages/engine/Source/Scene/GltfStructuralMetadataLoader.js
@@ -13,11 +13,9 @@ import ResourceLoaderState from "./ResourceLoaderState.js";
*
* Implements the {@link ResourceLoader} interface.
*
- *
* @alias GltfStructuralMetadataLoader
- * @constructor
+ * @class
* @augments ResourceLoader
- *
* @param {object} options Object with the following properties:
* @param {object} options.gltf The glTF JSON.
* @param {string} [options.extension] The EXT_structural_metadata
extension object. If this is undefined, then extensionLegacy must be defined.
@@ -27,8 +25,7 @@ import ResourceLoaderState from "./ResourceLoaderState.js";
* @param {SupportedImageFormats} options.supportedImageFormats The supported image formats.
* @param {FrameState} options.frameState The frame state.
* @param {string} [options.cacheKey] The cache key of the resource.
- * @param {boolean} [options.asynchronous=true] Determines if WebGL resource creation will be spread out over several frames or block until all WebGL resources are created.
- *
+ * @param {boolean} [options.asynchronous] Determines if WebGL resource creation will be spread out over several frames or block until all WebGL resources are created.
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -89,9 +86,7 @@ if (defined(Object.create)) {
Object.defineProperties(GltfStructuralMetadataLoader.prototype, {
/**
* The cache key of the resource.
- *
* @memberof GltfStructuralMetadataLoader.prototype
- *
* @type {string}
* @readonly
* @private
@@ -103,9 +98,7 @@ Object.defineProperties(GltfStructuralMetadataLoader.prototype, {
},
/**
* The parsed structural metadata
- *
* @memberof GltfStructuralMetadataLoader.prototype
- *
* @type {StructuralMetadata}
* @readonly
* @private
@@ -393,7 +386,6 @@ async function loadSchema(structuralMetadataLoader) {
/**
* Processes the resource until it becomes ready.
- *
* @param {FrameState} frameState The frame state.
* @private
*/
diff --git a/packages/engine/Source/Scene/GltfTextureLoader.js b/packages/engine/Source/Scene/GltfTextureLoader.js
index ce02ace44958..7454e6545dbd 100644
--- a/packages/engine/Source/Scene/GltfTextureLoader.js
+++ b/packages/engine/Source/Scene/GltfTextureLoader.js
@@ -17,11 +17,9 @@ import resizeImageToNextPowerOfTwo from "../Core/resizeImageToNextPowerOfTwo.js"
*
* Implements the {@link ResourceLoader} interface.
*
- *
* @alias GltfTextureLoader
- * @constructor
+ * @class
* @augments ResourceLoader
- *
* @param {object} options Object with the following properties:
* @param {ResourceCache} options.resourceCache The {@link ResourceCache} (to avoid circular dependencies).
* @param {object} options.gltf The glTF JSON.
@@ -30,8 +28,7 @@ import resizeImageToNextPowerOfTwo from "../Core/resizeImageToNextPowerOfTwo.js"
* @param {Resource} options.baseResource The {@link Resource} that paths in the glTF JSON are relative to.
* @param {SupportedImageFormats} options.supportedImageFormats The supported image formats.
* @param {string} [options.cacheKey] The cache key of the resource.
- * @param {boolean} [options.asynchronous=true] Determines if WebGL resource creation will be spread out over several frames or block until all WebGL resources are created.
- *
+ * @param {boolean} [options.asynchronous] Determines if WebGL resource creation will be spread out over several frames or block until all WebGL resources are created.
* @private
*/
function GltfTextureLoader(options) {
@@ -88,9 +85,7 @@ if (defined(Object.create)) {
Object.defineProperties(GltfTextureLoader.prototype, {
/**
* The cache key of the resource.
- *
* @memberof GltfTextureLoader.prototype
- *
* @type {string}
* @readonly
* @private
@@ -102,9 +97,7 @@ Object.defineProperties(GltfTextureLoader.prototype, {
},
/**
* The texture.
- *
* @memberof GltfTextureLoader.prototype
- *
* @type {Texture}
* @readonly
* @private
@@ -293,7 +286,6 @@ function createTexture(gltf, textureInfo, image, mipLevels, context) {
/**
* Processes the resource until it becomes ready.
- *
* @param {FrameState} frameState The frame state.
* @returns {boolean} true once all resourced are ready.
* @private
diff --git a/packages/engine/Source/Scene/GltfVertexBufferLoader.js b/packages/engine/Source/Scene/GltfVertexBufferLoader.js
index 52cc5e5dc4a8..6224c3dd85c4 100644
--- a/packages/engine/Source/Scene/GltfVertexBufferLoader.js
+++ b/packages/engine/Source/Scene/GltfVertexBufferLoader.js
@@ -15,11 +15,9 @@ import ResourceLoaderState from "./ResourceLoaderState.js";
*
* Implements the {@link ResourceLoader} interface.
*
- *
* @alias GltfVertexBufferLoader
- * @constructor
+ * @class
* @augments ResourceLoader
- *
* @param {object} options Object with the following properties:
* @param {ResourceCache} options.resourceCache The {@link ResourceCache} (to avoid circular dependencies).
* @param {object} options.gltf The glTF JSON.
@@ -30,14 +28,12 @@ import ResourceLoaderState from "./ResourceLoaderState.js";
* @param {string} [options.attributeSemantic] The attribute semantic, e.g. POSITION or NORMAL.
* @param {number} [options.accessorId] The accessor id.
* @param {string} [options.cacheKey] The cache key of the resource.
- * @param {boolean} [options.asynchronous=true] Determines if WebGL resource creation will be spread out over several frames or block until all WebGL resources are created.
- * @param {boolean} [options.loadBuffer=false] Load vertex buffer as a GPU vertex buffer.
- * @param {boolean} [options.loadTypedArray=false] Load vertex buffer as a typed array.
- *
- * @exception {DeveloperError} One of options.bufferViewId and options.draco must be defined.
- * @exception {DeveloperError} When options.draco is defined options.attributeSemantic must also be defined.
- * @exception {DeveloperError} When options.draco is defined options.accessorId must also be defined.
- *
+ * @param {boolean} [options.asynchronous] Determines if WebGL resource creation will be spread out over several frames or block until all WebGL resources are created.
+ * @param {boolean} [options.loadBuffer] Load vertex buffer as a GPU vertex buffer.
+ * @param {boolean} [options.loadTypedArray] Load vertex buffer as a typed array.
+ * @throws {DeveloperError} One of options.bufferViewId and options.draco must be defined.
+ * @throws {DeveloperError} When options.draco is defined options.attributeSemantic must also be defined.
+ * @throws {DeveloperError} When options.draco is defined options.accessorId must also be defined.
* @private
*/
function GltfVertexBufferLoader(options) {
@@ -125,9 +121,7 @@ if (defined(Object.create)) {
Object.defineProperties(GltfVertexBufferLoader.prototype, {
/**
* The cache key of the resource.
- *
* @memberof GltfVertexBufferLoader.prototype
- *
* @type {string}
* @readonly
* @private
@@ -139,9 +133,7 @@ Object.defineProperties(GltfVertexBufferLoader.prototype, {
},
/**
* The vertex buffer. This is only defined when loadAsTypedArray
is false.
- *
* @memberof GltfVertexBufferLoader.prototype
- *
* @type {Buffer}
* @readonly
* @private
@@ -153,9 +145,7 @@ Object.defineProperties(GltfVertexBufferLoader.prototype, {
},
/**
* The typed array containing vertex buffer data. This is only defined when loadAsTypedArray
is true.
- *
* @memberof GltfVertexBufferLoader.prototype
- *
* @type {Uint8Array}
* @readonly
* @private
@@ -167,9 +157,7 @@ Object.defineProperties(GltfVertexBufferLoader.prototype, {
},
/**
* Information about the quantized vertex attribute after Draco decode.
- *
* @memberof GltfVertexBufferLoader.prototype
- *
* @type {ModelComponents.Quantization}
* @readonly
* @private
@@ -383,7 +371,6 @@ const scratchVertexBufferJob = new CreateVertexBufferJob();
/**
* Processes the resource until it becomes ready.
- *
* @param {FrameState} frameState The frame state.
* @private
*/
diff --git a/packages/engine/Source/Scene/GoogleEarthEnterpriseImageryProvider.js b/packages/engine/Source/Scene/GoogleEarthEnterpriseImageryProvider.js
index 8d4330af3cb2..8120b8f81ae9 100644
--- a/packages/engine/Source/Scene/GoogleEarthEnterpriseImageryProvider.js
+++ b/packages/engine/Source/Scene/GoogleEarthEnterpriseImageryProvider.js
@@ -30,7 +30,6 @@ GoogleEarthEnterpriseDiscardPolicy.prototype.isReady = function () {
/**
* Given a tile image, decide whether to discard that image.
- *
* @param {HTMLImageElement} image An image to test.
* @returns {boolean} True if the image should be discarded; otherwise, false.
*/
@@ -44,7 +43,6 @@ GoogleEarthEnterpriseDiscardPolicy.prototype.shouldDiscardImage = function (
* @typedef {object} GoogleEarthEnterpriseImageryProvider.ConstructorOptions
*
* Initialization options for the GoogleEarthEnterpriseImageryProvider constructor
- *
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
* @property {TileDiscardPolicy} [tileDiscardPolicy] The policy that determines if a tile
* is invalid and should be discarded. If this value is not specified, a default
@@ -60,13 +58,10 @@ GoogleEarthEnterpriseDiscardPolicy.prototype.shouldDiscardImage = function (
* Provides tiled imagery using the Google Earth Enterprise REST API.
*
* Notes: This provider is for use with the 3D Earth API of Google Earth Enterprise,
- * {@link GoogleEarthEnterpriseMapsProvider} should be used with 2D Maps API.
- *
+ * {@link GoogleEarthEnterpriseMapsProvider} should be used with 2D Maps API.
* @alias GoogleEarthEnterpriseImageryProvider
- * @constructor
- *
+ * @class
* @param {GoogleEarthEnterpriseImageryProvider.ConstructorOptions} [options] Object describing initialization options
- *
* @see GoogleEarthEnterpriseImageryProvider.fromMetadata
* @see GoogleEarthEnterpriseTerrainProvider
* @see ArcGisMapServerImageryProvider
@@ -77,12 +72,9 @@ GoogleEarthEnterpriseDiscardPolicy.prototype.shouldDiscardImage = function (
* @see WebMapServiceImageryProvider
* @see WebMapTileServiceImageryProvider
* @see UrlTemplateImageryProvider
- *
- *
* @example
* const geeMetadata = await GoogleEarthEnterpriseMetadata.fromUrl("http://www.example.com");
* const gee = Cesium.GoogleEarthEnterpriseImageryProvider.fromMetadata(geeMetadata);
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
*/
function GoogleEarthEnterpriseImageryProvider(options) {
@@ -290,9 +282,7 @@ Object.defineProperties(GoogleEarthEnterpriseImageryProvider.prototype, {
* @param {GoogleEarthEnterpriseMetadata} metadata A metadata object that can be used to share metadata requests with a GoogleEarthEnterpriseTerrainProvider.
* @param {GoogleEarthEnterpriseImageryProvider.ConstructorOptions} options Object describing initialization options.
* @returns {GoogleEarthEnterpriseImageryProvider}
- *
- * @exception {RuntimeError} The metadata url does not have imagery
- *
+ * @throws {RuntimeError} The metadata url does not have imagery
* @example
* const geeMetadata = await GoogleEarthEnterpriseMetadata.fromUrl("http://www.example.com");
* const gee = Cesium.GoogleEarthEnterpriseImageryProvider.fromMetadata(geeMetadata);
@@ -316,7 +306,6 @@ GoogleEarthEnterpriseImageryProvider.fromMetadata = function (
/**
* Gets the credits to be displayed when a given tile is displayed.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level;
@@ -341,7 +330,6 @@ GoogleEarthEnterpriseImageryProvider.prototype.getTileCredits = function (
/**
* Requests the image for a given tile.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
@@ -420,13 +408,12 @@ GoogleEarthEnterpriseImageryProvider.prototype.requestImage = function (
/**
* Picking features is not currently supported by this imagery provider, so this function simply returns
* undefined.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
* @param {number} longitude The longitude at which to pick features.
* @param {number} latitude The latitude at which to pick features.
- * @return {undefined} Undefined since picking is not supported.
+ * @returns {undefined} Undefined since picking is not supported.
*/
GoogleEarthEnterpriseImageryProvider.prototype.pickFeatures = function (
x,
diff --git a/packages/engine/Source/Scene/GoogleEarthEnterpriseMapsProvider.js b/packages/engine/Source/Scene/GoogleEarthEnterpriseMapsProvider.js
index 6372a712a253..03498e62dd04 100644
--- a/packages/engine/Source/Scene/GoogleEarthEnterpriseMapsProvider.js
+++ b/packages/engine/Source/Scene/GoogleEarthEnterpriseMapsProvider.js
@@ -16,7 +16,6 @@ import ImageryProvider from "./ImageryProvider.js";
* @typedef {object} GoogleEarthEnterpriseMapsProvider.ConstructorOptions
*
* Initialization options for the GoogleEarthEnterpriseMapsProvider constructor
- *
* @property {number} channel The channel (id) to be used when requesting data from the server.
* The channel number can be found by looking at the json file located at:
* earth.localdomain/default_map/query?request=Json&vars=geeServerDefs The /default_map path may
@@ -46,10 +45,8 @@ import ImageryProvider from "./ImageryProvider.js";
/**
* Used to track creation details while fetching initial metadata
- *
- * @constructor
+ * @class
* @private
- *
* @param {GoogleEarthEnterpriseMapsProvider.ConstructorOptions} options An object describing initialization options
*/
function ImageryProviderBuilder(options) {
@@ -61,9 +58,7 @@ function ImageryProviderBuilder(options) {
/**
* Complete GoogleEarthEnterpriseMapsProvider creation based on builder values.
- *
* @private
- *
* @param {GoogleEarthEnterpriseMapsProvider} provider
*/
ImageryProviderBuilder.prototype.build = function (provider) {
@@ -165,26 +160,22 @@ async function requestMetadata(
* Provides tiled imagery using the Google Earth Imagery API.
*
* Notes: This imagery provider does not work with the public Google Earth servers. It works with the
- * Google Earth Enterprise Server.
+ * Google Earth Enterprise Server.
*
- * By default the Google Earth Enterprise server does not set the
- * {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing} headers. You can either
- * use a proxy server which adds these headers, or in the /opt/google/gehttpd/conf/gehttpd.conf
- * and add the 'Header set Access-Control-Allow-Origin "*"' option to the '<Directory />' and
- * '<Directory "/opt/google/gehttpd/htdocs">' directives.
- *
- * This provider is for use with 2D Maps API as part of Google Earth Enterprise. For 3D Earth API uses, it
- * is necessary to use {@link GoogleEarthEnterpriseImageryProvider}
+ * By default the Google Earth Enterprise server does not set the
+ * {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing} headers. You can either
+ * use a proxy server which adds these headers, or in the /opt/google/gehttpd/conf/gehttpd.conf
+ * and add the 'Header set Access-Control-Allow-Origin "*"' option to the '<Directory />' and
+ * '<Directory "/opt/google/gehttpd/htdocs">' directives.
*
+ * This provider is for use with 2D Maps API as part of Google Earth Enterprise. For 3D Earth API uses, it
+ * is necessary to use {@link GoogleEarthEnterpriseImageryProvider}
* @alias GoogleEarthEnterpriseMapsProvider
- * @constructor
- *
+ * @class
* @param {GoogleEarthEnterpriseMapsProvider.ConstructorOptions} options Object describing initialization options
- *
- * @exception {RuntimeError} Could not find layer with channel (id) of options.channel
.
- * @exception {RuntimeError} Could not find a version in channel (id) options.channel
.
- * @exception {RuntimeError} Unsupported projection data.projection
.
- *
+ * @throws {RuntimeError} Could not find layer with channel (id) of options.channel
.
+ * @throws {RuntimeError} Could not find a version in channel (id) options.channel
.
+ * @throws {RuntimeError} Unsupported projection data.projection
.
* @see ArcGisMapServerImageryProvider
* @see BingMapsImageryProvider
* @see OpenStreetMapImageryProvider
@@ -193,11 +184,8 @@ async function requestMetadata(
* @see WebMapServiceImageryProvider
* @see WebMapTileServiceImageryProvider
* @see UrlTemplateImageryProvider
- *
- *
* @example
* const google = await Cesium.GoogleEarthEnterpriseMapsProvider.fromUrl("https://earth.localdomain", 1008);
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
*/
function GoogleEarthEnterpriseMapsProvider(options) {
@@ -436,15 +424,13 @@ Object.defineProperties(GoogleEarthEnterpriseMapsProvider.prototype, {
/**
* Creates a tiled imagery provider using the Google Earth Imagery API.
- *
- * @param {Resource|String} url The url of the Google Earth server hosting the imagery.
+ * @param {Resource | string} url The url of the Google Earth server hosting the imagery.
+ * @param channel
* @param {GoogleEarthEnterpriseMapsProvider.ConstructorOptions} [options] Object describing initialization options
* @returns {Promise} The created GoogleEarthEnterpriseMapsProvider.
- *
- * @exception {RuntimeError} Could not find layer with channel (id) of options.channel
.
- * @exception {RuntimeError} Could not find a version in channel (id) options.channel
.
- * @exception {RuntimeError} Unsupported projection data.projection
.
- *
+ * @throws {RuntimeError} Could not find layer with channel (id) of options.channel
.
+ * @throws {RuntimeError} Could not find a version in channel (id) options.channel
.
+ * @throws {RuntimeError} Unsupported projection data.projection
.
* @example
* const google = await Cesium.GoogleEarthEnterpriseMapsProvider.fromUrl("https://earth.localdomain", 1008);
*/
@@ -494,7 +480,6 @@ GoogleEarthEnterpriseMapsProvider.fromUrl = async function (
/**
* Gets the credits to be displayed when a given tile is displayed.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level;
@@ -510,7 +495,6 @@ GoogleEarthEnterpriseMapsProvider.prototype.getTileCredits = function (
/**
* Requests the image for a given tile.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
@@ -543,13 +527,12 @@ GoogleEarthEnterpriseMapsProvider.prototype.requestImage = function (
/**
* Picking features is not currently supported by this imagery provider, so this function simply returns
* undefined.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
* @param {number} longitude The longitude at which to pick features.
* @param {number} latitude The latitude at which to pick features.
- * @return {undefined} Undefined since picking is not supported.
+ * @returns {undefined} Undefined since picking is not supported.
*/
GoogleEarthEnterpriseMapsProvider.prototype.pickFeatures = function (
x,
diff --git a/packages/engine/Source/Scene/GridImageryProvider.js b/packages/engine/Source/Scene/GridImageryProvider.js
index 44970b3fc4bd..59962f5757b4 100644
--- a/packages/engine/Source/Scene/GridImageryProvider.js
+++ b/packages/engine/Source/Scene/GridImageryProvider.js
@@ -12,7 +12,6 @@ const defaultBackgroundColor = new Color(0.0, 0.5, 0.0, 0.2);
* @typedef {object} GridImageryProvider.ConstructorOptions
*
* Initialization options for the GridImageryProvider constructor
- *
* @property {TilingScheme} [tilingScheme=new GeographicTilingScheme()] The tiling scheme for which to draw tiles.
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If the tilingScheme is specified,
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
@@ -30,11 +29,9 @@ const defaultBackgroundColor = new Color(0.0, 0.5, 0.0, 0.2);
/**
* An {@link ImageryProvider} that draws a wireframe grid on every tile with controllable background and glow.
* May be useful for custom rendering effects or debugging terrain.
- *
* @alias GridImageryProvider
- * @constructor
+ * @class
* @param {GridImageryProvider.ConstructorOptions} options Object describing initialization options
- *
*/
function GridImageryProvider(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -219,6 +216,7 @@ Object.defineProperties(GridImageryProvider.prototype, {
/**
* Draws a grid of lines into a canvas.
+ * @param context
*/
GridImageryProvider.prototype._drawGrid = function (context) {
const minPixel = 0;
@@ -279,7 +277,6 @@ GridImageryProvider.prototype._createGridCanvas = function () {
/**
* Gets the credits to be displayed when a given tile is displayed.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level;
@@ -291,7 +288,6 @@ GridImageryProvider.prototype.getTileCredits = function (x, y, level) {
/**
* Requests the image for a given tile.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
@@ -305,13 +301,12 @@ GridImageryProvider.prototype.requestImage = function (x, y, level, request) {
/**
* Picking features is not currently supported by this imagery provider, so this function simply returns
* undefined.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
* @param {number} longitude The longitude at which to pick features.
* @param {number} latitude The latitude at which to pick features.
- * @return {undefined} Undefined since picking is not supported.
+ * @returns {undefined} Undefined since picking is not supported.
*/
GridImageryProvider.prototype.pickFeatures = function (
x,
diff --git a/packages/engine/Source/Scene/GroundPolylinePrimitive.js b/packages/engine/Source/Scene/GroundPolylinePrimitive.js
index 2c1515751ac4..b67d2df45373 100644
--- a/packages/engine/Source/Scene/GroundPolylinePrimitive.js
+++ b/packages/engine/Source/Scene/GroundPolylinePrimitive.js
@@ -32,21 +32,19 @@ import StencilOperation from "./StencilOperation.js";
*
* Only to be used with GeometryInstances containing {@link GroundPolylineGeometry}.
*
- *
* @alias GroundPolylinePrimitive
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {Array|GeometryInstance} [options.geometryInstances] GeometryInstances containing GroundPolylineGeometry
* @param {Appearance} [options.appearance] The Appearance used to render the polyline. Defaults to a white color {@link Material} on a {@link PolylineMaterialAppearance}.
- * @param {boolean} [options.show=true] Determines if this primitive will be shown.
- * @param {boolean} [options.interleave=false] When true
, geometry vertex attributes are interleaved, which can slightly improve rendering performance but increases load time.
- * @param {boolean} [options.releaseGeometryInstances=true] When true
, the primitive does not keep a reference to the input geometryInstances
to save memory.
- * @param {boolean} [options.allowPicking=true] When true
, each geometry instance will only be pickable with {@link Scene#pick}. When false
, GPU memory is saved.
- * @param {boolean} [options.asynchronous=true] Determines if the primitive will be created asynchronously or block until ready. If false initializeTerrainHeights() must be called first.
- * @param {ClassificationType} [options.classificationType=ClassificationType.BOTH] Determines whether terrain, 3D Tiles or both will be classified.
- * @param {boolean} [options.debugShowBoundingVolume=false] For debugging only. Determines if this primitive's commands' bounding spheres are shown.
- * @param {boolean} [options.debugShowShadowVolume=false] For debugging only. Determines if the shadow volume for each geometry in the primitive is drawn. Must be true
on creation to have effect.
+ * @param {boolean} [options.show] Determines if this primitive will be shown.
+ * @param {boolean} [options.interleave] When true
, geometry vertex attributes are interleaved, which can slightly improve rendering performance but increases load time.
+ * @param {boolean} [options.releaseGeometryInstances] When true
, the primitive does not keep a reference to the input geometryInstances
to save memory.
+ * @param {boolean} [options.allowPicking] When true
, each geometry instance will only be pickable with {@link Scene#pick}. When false
, GPU memory is saved.
+ * @param {boolean} [options.asynchronous] Determines if the primitive will be created asynchronously or block until ready. If false initializeTerrainHeights() must be called first.
+ * @param {ClassificationType} [options.classificationType] Determines whether terrain, 3D Tiles or both will be classified.
+ * @param {boolean} [options.debugShowBoundingVolume] For debugging only. Determines if this primitive's commands' bounding spheres are shown.
+ * @param {boolean} [options.debugShowShadowVolume] For debugging only. Determines if the shadow volume for each geometry in the primitive is drawn. Must be true
on creation to have effect.
*
* @example
* // 1. Draw a polyline on terrain with a basic color material
@@ -103,10 +101,8 @@ function GroundPolylinePrimitive(options) {
*
* Changing this property after the primitive is rendered has no effect.
*
- *
* @readonly
* @type {Array|GeometryInstance}
- *
* @default undefined
*/
this.geometryInstances = options.geometryInstances;
@@ -121,9 +117,7 @@ function GroundPolylinePrimitive(options) {
* instance is shaded with the same appearance. Some appearances, like
* {@link PolylineColorAppearance} allow giving each instance unique
* properties.
- *
* @type Appearance
- *
* @default undefined
*/
this.appearance = appearance;
@@ -131,18 +125,14 @@ function GroundPolylinePrimitive(options) {
/**
* Determines if the primitive will be shown. This affects all geometry
* instances in the primitive.
- *
* @type {boolean}
- *
* @default true
*/
this.show = defaultValue(options.show, true);
/**
* Determines whether terrain, 3D Tiles or both will be classified.
- *
* @type {ClassificationType}
- *
* @default ClassificationType.BOTH
*/
this.classificationType = defaultValue(
@@ -155,9 +145,7 @@ function GroundPolylinePrimitive(options) {
*
* Draws the bounding sphere for each draw command in the primitive.
*
- *
* @type {boolean}
- *
* @default false
*/
this.debugShowBoundingVolume = defaultValue(
@@ -217,12 +205,9 @@ function GroundPolylinePrimitive(options) {
Object.defineProperties(GroundPolylinePrimitive.prototype, {
/**
* Determines if geometry vertex attributes are interleaved, which can slightly improve rendering performance.
- *
* @memberof GroundPolylinePrimitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
interleave: {
@@ -233,12 +218,9 @@ Object.defineProperties(GroundPolylinePrimitive.prototype, {
/**
* When true
, the primitive does not keep a reference to the input geometryInstances
to save memory.
- *
* @memberof GroundPolylinePrimitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
releaseGeometryInstances: {
@@ -249,12 +231,9 @@ Object.defineProperties(GroundPolylinePrimitive.prototype, {
/**
* When true
, each geometry instance will only be pickable with {@link Scene#pick}. When false
, GPU memory is saved.
- *
* @memberof GroundPolylinePrimitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
allowPicking: {
@@ -265,12 +244,9 @@ Object.defineProperties(GroundPolylinePrimitive.prototype, {
/**
* Determines if the geometry instances will be created and batched on a web worker.
- *
* @memberof GroundPolylinePrimitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
asynchronous: {
@@ -283,9 +259,7 @@ Object.defineProperties(GroundPolylinePrimitive.prototype, {
* Determines if the primitive is complete and ready to render. If this property is
* true, the primitive will be rendered the next time that {@link GroundPolylinePrimitive#update}
* is called.
- *
* @memberof GroundPolylinePrimitive.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -300,12 +274,9 @@ Object.defineProperties(GroundPolylinePrimitive.prototype, {
*
* If true, draws the shadow volume for each geometry in the primitive.
*
- *
* @memberof GroundPolylinePrimitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
debugShowShadowVolume: {
@@ -318,7 +289,6 @@ Object.defineProperties(GroundPolylinePrimitive.prototype, {
/**
* Initializes the minimum and maximum terrain heights. This only needs to be called if you are creating the
* GroundPolylinePrimitive synchronously.
- *
* @returns {Promise} A promise that will resolve once the terrain heights have been loaded.
*/
GroundPolylinePrimitive.initializeTerrainHeights = function () {
@@ -667,9 +637,9 @@ function updateAndQueueCommands(
* Do not call this function directly. This is documented just to
* list the exceptions that may be propagated when the scene is rendered:
*
- *
- * @exception {DeveloperError} For synchronous GroundPolylinePrimitives, you must call GroundPolylinePrimitives.initializeTerrainHeights() and wait for the returned promise to resolve.
- * @exception {DeveloperError} All GeometryInstances must have color attributes to use PolylineColorAppearance with GroundPolylinePrimitive.
+ * @param frameState
+ * @throws {DeveloperError} For synchronous GroundPolylinePrimitives, you must call GroundPolylinePrimitives.initializeTerrainHeights() and wait for the returned promise to resolve.
+ * @throws {DeveloperError} All GeometryInstances must have color attributes to use PolylineColorAppearance with GroundPolylinePrimitive.
*/
GroundPolylinePrimitive.prototype.update = function (frameState) {
if (!defined(this._primitive) && !defined(this.geometryInstances)) {
@@ -823,12 +793,9 @@ GroundPolylinePrimitive.prototype.update = function (frameState) {
/**
* Returns the modifiable per-instance attributes for a {@link GeometryInstance}.
- *
* @param {*} id The id of the {@link GeometryInstance}.
* @returns {object} The typed array in the attribute's format or undefined if the is no instance with id.
- *
- * @exception {DeveloperError} must call update before calling getGeometryInstanceAttributes.
- *
+ * @throws {DeveloperError} must call update before calling getGeometryInstanceAttributes.
* @example
* const attributes = primitive.getGeometryInstanceAttributes('an id');
* attributes.color = Cesium.ColorGeometryInstanceAttribute.toValue(Cesium.Color.AQUA);
@@ -850,7 +817,6 @@ GroundPolylinePrimitive.prototype.getGeometryInstanceAttributes = function (
/**
* Checks if the given Scene supports GroundPolylinePrimitives.
* GroundPolylinePrimitives require support for the WEBGL_depth_texture extension.
- *
* @param {Scene} scene The current scene.
* @returns {boolean} Whether or not the current scene supports GroundPolylinePrimitives.
*/
@@ -864,9 +830,7 @@ GroundPolylinePrimitive.isSupported = function (scene) {
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see GroundPolylinePrimitive#destroy
*/
GroundPolylinePrimitive.prototype.isDestroyed = function () {
@@ -881,12 +845,9 @@ GroundPolylinePrimitive.prototype.isDestroyed = function () {
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
*
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* e = e && e.destroy();
- *
* @see GroundPolylinePrimitive#isDestroyed
*/
GroundPolylinePrimitive.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/GroundPrimitive.js b/packages/engine/Source/Scene/GroundPrimitive.js
index f67249322b8a..300622aed04d 100644
--- a/packages/engine/Source/Scene/GroundPrimitive.js
+++ b/packages/engine/Source/Scene/GroundPrimitive.js
@@ -46,21 +46,19 @@ const GroundPrimitiveUniformMap = {
*
* Valid geometries are {@link CircleGeometry}, {@link CorridorGeometry}, {@link EllipseGeometry}, {@link PolygonGeometry}, and {@link RectangleGeometry}.
*
- *
* @alias GroundPrimitive
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {Array|GeometryInstance} [options.geometryInstances] The geometry instances to render.
* @param {Appearance} [options.appearance] The appearance used to render the primitive. Defaults to a flat PerInstanceColorAppearance when GeometryInstances have a color attribute.
- * @param {boolean} [options.show=true] Determines if this primitive will be shown.
- * @param {boolean} [options.vertexCacheOptimize=false] When true
, geometry vertices are optimized for the pre and post-vertex-shader caches.
- * @param {boolean} [options.interleave=false] When true
, geometry vertex attributes are interleaved, which can slightly improve rendering performance but increases load time.
- * @param {boolean} [options.compressVertices=true] When true
, the geometry vertices are compressed, which will save memory.
- * @param {boolean} [options.releaseGeometryInstances=true] When true
, the primitive does not keep a reference to the input geometryInstances
to save memory.
- * @param {boolean} [options.allowPicking=true] When true
, each geometry instance will only be pickable with {@link Scene#pick}. When false
, GPU memory is saved.
- * @param {boolean} [options.asynchronous=true] Determines if the primitive will be created asynchronously or block until ready. If false initializeTerrainHeights() must be called first.
- * @param {ClassificationType} [options.classificationType=ClassificationType.BOTH] Determines whether terrain, 3D Tiles or both will be classified.
+ * @param {boolean} [options.show] Determines if this primitive will be shown.
+ * @param {boolean} [options.vertexCacheOptimize] When true
, geometry vertices are optimized for the pre and post-vertex-shader caches.
+ * @param {boolean} [options.interleave] When true
, geometry vertex attributes are interleaved, which can slightly improve rendering performance but increases load time.
+ * @param {boolean} [options.compressVertices] When true
, the geometry vertices are compressed, which will save memory.
+ * @param {boolean} [options.releaseGeometryInstances] When true
, the primitive does not keep a reference to the input geometryInstances
to save memory.
+ * @param {boolean} [options.allowPicking] When true
, each geometry instance will only be pickable with {@link Scene#pick}. When false
, GPU memory is saved.
+ * @param {boolean} [options.asynchronous] Determines if the primitive will be created asynchronously or block until ready. If false initializeTerrainHeights() must be called first.
+ * @param {ClassificationType} [options.classificationType] Determines whether terrain, 3D Tiles or both will be classified.
* @param {boolean} [options.debugShowBoundingVolume=false] For debugging only. Determines if this primitive's commands' bounding spheres are shown.
* @param {boolean} [options.debugShowShadowVolume=false] For debugging only. Determines if the shadow volume for each geometry in the primitive is drawn. Must be true
on
* creation for the volumes to be created before the geometry is released or options.releaseGeometryInstance must be false
.
@@ -136,9 +134,7 @@ function GroundPrimitive(options) {
* instance is shaded with the same appearance. Some appearances, like
* {@link PerInstanceColorAppearance} allow giving each instance unique
* properties.
- *
* @type Appearance
- *
* @default undefined
*/
this.appearance = appearance;
@@ -150,27 +146,21 @@ function GroundPrimitive(options) {
*
* Changing this property after the primitive is rendered has no effect.
*
- *
* @readonly
* @type {Array|GeometryInstance}
- *
* @default undefined
*/
this.geometryInstances = options.geometryInstances;
/**
* Determines if the primitive will be shown. This affects all geometry
* instances in the primitive.
- *
* @type {boolean}
- *
* @default true
*/
this.show = defaultValue(options.show, true);
/**
* Determines whether terrain, 3D Tiles or both will be classified.
- *
* @type {ClassificationType}
- *
* @default ClassificationType.BOTH
*/
this.classificationType = defaultValue(
@@ -182,9 +172,7 @@ function GroundPrimitive(options) {
*
* Draws the bounding sphere for each draw command in the primitive.
*
- *
* @type {boolean}
- *
* @default false
*/
this.debugShowBoundingVolume = defaultValue(
@@ -197,9 +185,7 @@ function GroundPrimitive(options) {
*
* Draws the shadow volume for each geometry in the primitive.
*
- *
* @type {boolean}
- *
* @default false
*/
this.debugShowShadowVolume = defaultValue(
@@ -250,12 +236,9 @@ function GroundPrimitive(options) {
Object.defineProperties(GroundPrimitive.prototype, {
/**
* When true
, geometry vertices are optimized for the pre and post-vertex-shader caches.
- *
* @memberof GroundPrimitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
vertexCacheOptimize: {
@@ -266,12 +249,9 @@ Object.defineProperties(GroundPrimitive.prototype, {
/**
* Determines if geometry vertex attributes are interleaved, which can slightly improve rendering performance.
- *
* @memberof GroundPrimitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
interleave: {
@@ -282,12 +262,9 @@ Object.defineProperties(GroundPrimitive.prototype, {
/**
* When true
, the primitive does not keep a reference to the input geometryInstances
to save memory.
- *
* @memberof GroundPrimitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
releaseGeometryInstances: {
@@ -298,12 +275,9 @@ Object.defineProperties(GroundPrimitive.prototype, {
/**
* When true
, each geometry instance will only be pickable with {@link Scene#pick}. When false
, GPU memory is saved.
- *
* @memberof GroundPrimitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
allowPicking: {
@@ -314,12 +288,9 @@ Object.defineProperties(GroundPrimitive.prototype, {
/**
* Determines if the geometry instances will be created and batched on a web worker.
- *
* @memberof GroundPrimitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
asynchronous: {
@@ -330,12 +301,9 @@ Object.defineProperties(GroundPrimitive.prototype, {
/**
* When true
, geometry vertices are compressed, which will save memory.
- *
* @memberof GroundPrimitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
compressVertices: {
@@ -348,9 +316,7 @@ Object.defineProperties(GroundPrimitive.prototype, {
* Determines if the primitive is complete and ready to render. If this property is
* true, the primitive will be rendered the next time that {@link GroundPrimitive#update}
* is called.
- *
* @memberof GroundPrimitive.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -363,7 +329,6 @@ Object.defineProperties(GroundPrimitive.prototype, {
/**
* Determines if GroundPrimitive rendering is supported.
- *
* @function
* @param {Scene} scene The scene.
* @returns {boolean} true
if GroundPrimitives are supported; otherwise, returns false
@@ -675,9 +640,7 @@ function updateAndQueueCommands(
/**
* Initializes the minimum and maximum terrain heights. This only needs to be called if you are creating the
* GroundPrimitive synchronously.
- *
* @returns {Promise} A promise that will resolve once the terrain heights have been loaded.
- *
*/
GroundPrimitive.initializeTerrainHeights = function () {
return ApproximateTerrainHeights.initialize();
@@ -690,10 +653,10 @@ GroundPrimitive.initializeTerrainHeights = function () {
* Do not call this function directly. This is documented just to
* list the exceptions that may be propagated when the scene is rendered:
*
- *
- * @exception {DeveloperError} For synchronous GroundPrimitive, you must call GroundPrimitive.initializeTerrainHeights() and wait for the returned promise to resolve.
- * @exception {DeveloperError} All instance geometries must have the same primitiveType.
- * @exception {DeveloperError} Appearance and material have a uniform with the same name.
+ * @param frameState
+ * @throws {DeveloperError} For synchronous GroundPrimitive, you must call GroundPrimitive.initializeTerrainHeights() and wait for the returned promise to resolve.
+ * @throws {DeveloperError} All instance geometries must have the same primitiveType.
+ * @throws {DeveloperError} Appearance and material have a uniform with the same name.
*/
GroundPrimitive.prototype.update = function (frameState) {
if (!defined(this._primitive) && !defined(this.geometryInstances)) {
@@ -910,6 +873,7 @@ GroundPrimitive.prototype.update = function (frameState) {
};
/**
+ * @param id
* @private
*/
GroundPrimitive.prototype.getBoundingSphere = function (id) {
@@ -923,12 +887,9 @@ GroundPrimitive.prototype.getBoundingSphere = function (id) {
/**
* Returns the modifiable per-instance attributes for a {@link GeometryInstance}.
- *
* @param {*} id The id of the {@link GeometryInstance}.
* @returns {object} The typed array in the attribute's format or undefined if the is no instance with id.
- *
- * @exception {DeveloperError} must call update before calling getGeometryInstanceAttributes.
- *
+ * @throws {DeveloperError} must call update before calling getGeometryInstanceAttributes.
* @example
* const attributes = primitive.getGeometryInstanceAttributes('an id');
* attributes.color = Cesium.ColorGeometryInstanceAttribute.toValue(Cesium.Color.AQUA);
@@ -951,9 +912,7 @@ GroundPrimitive.prototype.getGeometryInstanceAttributes = function (id) {
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see GroundPrimitive#destroy
*/
GroundPrimitive.prototype.isDestroyed = function () {
@@ -968,12 +927,9 @@ GroundPrimitive.prototype.isDestroyed = function () {
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
*
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* e = e && e.destroy();
- *
* @see GroundPrimitive#isDestroyed
*/
GroundPrimitive.prototype.destroy = function () {
@@ -983,7 +939,6 @@ GroundPrimitive.prototype.destroy = function () {
/**
* Exposed for testing.
- *
* @param {Context} context Rendering context
* @returns {boolean} Whether or not the current context supports materials on GroundPrimitives.
* @private
@@ -995,7 +950,6 @@ GroundPrimitive._supportsMaterials = function (context) {
/**
* Checks if the given Scene supports materials on GroundPrimitives.
* Materials on GroundPrimitives require support for the WEBGL_depth_texture extension.
- *
* @param {Scene} scene The current scene.
* @returns {boolean} Whether or not the current scene supports materials on GroundPrimitives.
*/
diff --git a/packages/engine/Source/Scene/GroupMetadata.js b/packages/engine/Source/Scene/GroupMetadata.js
index 66b2e3c3d8ff..72b12798ea8f 100644
--- a/packages/engine/Source/Scene/GroupMetadata.js
+++ b/packages/engine/Source/Scene/GroupMetadata.js
@@ -8,14 +8,12 @@ import MetadataEntity from "./MetadataEntity.js";
*
* See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_metadata|3DTILES_metadata Extension} for 3D Tiles
*
- *
* @param {object} options Object with the following properties:
* @param {string} options.id The ID of the group.
* @param {object} options.group The group JSON object.
* @param {MetadataClass} options.class The class that group metadata conforms to.
- *
* @alias GroupMetadata
- * @constructor
+ * @class
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -42,7 +40,6 @@ function GroupMetadata(options) {
Object.defineProperties(GroupMetadata.prototype, {
/**
* The class that properties conform to.
- *
* @memberof GroupMetadata.prototype
* @type {MetadataClass}
* @readonly
@@ -56,7 +53,6 @@ Object.defineProperties(GroupMetadata.prototype, {
/**
* The ID of the group.
- *
* @memberof GroupMetadata.prototype
* @type {string}
* @readonly
@@ -70,7 +66,6 @@ Object.defineProperties(GroupMetadata.prototype, {
/**
* Extra user-defined properties.
- *
* @memberof GroupMetadata.prototype
* @type {*}
* @readonly
@@ -84,7 +79,6 @@ Object.defineProperties(GroupMetadata.prototype, {
/**
* An object containing extensions.
- *
* @memberof GroupMetadata.prototype
* @type {object}
* @readonly
@@ -99,7 +93,6 @@ Object.defineProperties(GroupMetadata.prototype, {
/**
* Returns whether the group has this property.
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {boolean} Whether the group has this property.
* @private
@@ -110,7 +103,6 @@ GroupMetadata.prototype.hasProperty = function (propertyId) {
/**
* Returns whether the group has a property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @returns {boolean} Whether the group has a property with the given semantic.
* @private
@@ -125,7 +117,6 @@ GroupMetadata.prototype.hasPropertyBySemantic = function (semantic) {
/**
* Returns an array of property IDs.
- *
* @param {string[]} [results] An array into which to store the results.
* @returns {string[]} The property IDs.
* @private
@@ -139,7 +130,6 @@ GroupMetadata.prototype.getPropertyIds = function (results) {
*
* If the property is normalized the normalized value is returned.
*
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {*} The value of the property or undefined
if the group does not have this property.
* @private
@@ -153,7 +143,6 @@ GroupMetadata.prototype.getProperty = function (propertyId) {
*
* If the property is normalized a normalized value must be provided to this function.
*
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @param {*} value The value of the property that will be copied.
* @returns {boolean} true
if the property was set, false
otherwise.
@@ -170,7 +159,6 @@ GroupMetadata.prototype.setProperty = function (propertyId, value) {
/**
* Returns a copy of the value of the property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @returns {*} The value of the property or undefined
if the group does not have this semantic.
* @private
@@ -185,7 +173,6 @@ GroupMetadata.prototype.getPropertyBySemantic = function (semantic) {
/**
* Sets the value of the property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @param {*} value The value of the property that will be copied.
* @returns {boolean} true
if the property was set, false
otherwise.
diff --git a/packages/engine/Source/Scene/HeightReference.js b/packages/engine/Source/Scene/HeightReference.js
index e81a671690de..c026b1f745e5 100644
--- a/packages/engine/Source/Scene/HeightReference.js
+++ b/packages/engine/Source/Scene/HeightReference.js
@@ -1,6 +1,5 @@
/**
* Represents the position relative to the terrain.
- *
* @enum {number}
*/
const HeightReference = {
diff --git a/packages/engine/Source/Scene/HorizontalOrigin.js b/packages/engine/Source/Scene/HorizontalOrigin.js
index 61eaeb34029b..40c6a8524a1b 100644
--- a/packages/engine/Source/Scene/HorizontalOrigin.js
+++ b/packages/engine/Source/Scene/HorizontalOrigin.js
@@ -7,16 +7,13 @@
*
*
*
- *
* @enum {number}
- *
* @see Billboard#horizontalOrigin
* @see Label#horizontalOrigin
*/
const HorizontalOrigin = {
/**
* The origin is at the horizontal center of the object.
- *
* @type {number}
* @constant
*/
@@ -24,7 +21,6 @@ const HorizontalOrigin = {
/**
* The origin is on the left side of the object.
- *
* @type {number}
* @constant
*/
@@ -32,7 +28,6 @@ const HorizontalOrigin = {
/**
* The origin is on the right side of the object.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Scene/I3SDataProvider.js b/packages/engine/Source/Scene/I3SDataProvider.js
index c4cd9cd4578e..54467a84d578 100644
--- a/packages/engine/Source/Scene/I3SDataProvider.js
+++ b/packages/engine/Source/Scene/I3SDataProvider.js
@@ -63,10 +63,9 @@ import Lerc from "lerc";
import Rectangle from "../Core/Rectangle.js";
/**
- * @typedef {Object} I3SDataProvider.ConstructorOptions
+ * @typedef {object} I3SDataProvider.ConstructorOptions
*
* Initialization options for the I3SDataProvider constructor
- *
* @property {string} [name] The name of the I3S dataset.
* @property {boolean} [show=true] Determines if the dataset will be shown.
* @property {ArcGISTiledElevationTerrainProvider|Promise} [geoidTiledTerrainProvider] Tiled elevation provider describing an Earth Gravitational Model. If defined, geometry will be shifted based on the offsets given by this provider. Required to position I3S data sets with gravity-related height at the correct location.
@@ -75,7 +74,6 @@ import Rectangle from "../Core/Rectangle.js";
* @property {boolean} [adjustMaterialAlphaMode=false] The option to adjust the alpha mode of the material based on the transparency of the vertex color. When true
, the alpha mode of the material (if not defined) will be set to BLEND for geometry with any transparency in the color vertex attribute.
* @property {boolean} [applySymbology=false] Determines if the I3S symbology will be parsed and applied for the layers.
* @property {boolean} [calculateNormals=false] Determines if the flat normals will be generated for I3S geometry without normals.
- *
* @example
* // Increase LOD by reducing SSE
* const cesium3dTilesetOptions = {
@@ -84,7 +82,6 @@ import Rectangle from "../Core/Rectangle.js";
* const i3sOptions = {
* cesium3dTilesetOptions: cesium3dTilesetOptions,
* };
- *
* @example
* // Set a custom outline color to replace the color defined in I3S symbology
* const cesium3dTilesetOptions = {
@@ -105,15 +102,11 @@ import Rectangle from "../Core/Rectangle.js";
*
* This object is normally not instantiated directly, use {@link I3SDataProvider.fromUrl}.
*
- *
* @alias I3SDataProvider
- * @constructor
- *
+ * @class
* @param {I3SDataProvider.ConstructorOptions} options An object describing initialization options
- *
* @see I3SDataProvider.fromUrl
* @see ArcGISTiledElevationTerrainProvider
- *
* @example
* try {
* const i3sData = await I3SDataProvider.fromUrl(
@@ -123,7 +116,6 @@ import Rectangle from "../Core/Rectangle.js";
* } catch (error) {
* console.log(`There was an error creating the I3S Data Provider: ${error}`);
* }
- *
* @example
* try {
* const geoidService = await Cesium.ArcGISTiledElevationTerrainProvider.fromUrl(
@@ -336,9 +328,7 @@ Object.defineProperties(I3SDataProvider.prototype, {
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
*
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @see I3SDataProvider#isDestroyed
*/
I3SDataProvider.prototype.destroy = function () {
@@ -357,9 +347,7 @@ I3SDataProvider.prototype.destroy = function () {
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see I3SDataProvider#destroy
*/
I3SDataProvider.prototype.isDestroyed = function () {
@@ -367,6 +355,7 @@ I3SDataProvider.prototype.isDestroyed = function () {
};
/**
+ * @param frameState
* @private
*/
I3SDataProvider.prototype.update = function (frameState) {
@@ -378,6 +367,7 @@ I3SDataProvider.prototype.update = function (frameState) {
};
/**
+ * @param frameState
* @private
*/
I3SDataProvider.prototype.prePassesUpdate = function (frameState) {
@@ -389,6 +379,7 @@ I3SDataProvider.prototype.prePassesUpdate = function (frameState) {
};
/**
+ * @param frameState
* @private
*/
I3SDataProvider.prototype.postPassesUpdate = function (frameState) {
@@ -400,6 +391,8 @@ I3SDataProvider.prototype.postPassesUpdate = function (frameState) {
};
/**
+ * @param frameState
+ * @param passState
* @private
*/
I3SDataProvider.prototype.updateForPass = function (frameState, passState) {
@@ -508,11 +501,9 @@ async function addLayers(provider, data, options) {
/**
* Creates an I3SDataProvider. Currently supported I3S versions are 1.6 and
* 1.7/1.8 (OGC I3S 1.2).
- *
* @param {string|Resource} url The url of the I3S dataset, which should return an I3S scene object
* @param {I3SDataProvider.ConstructorOptions} options An object describing initialization options
* @returns {Promise}
- *
* @example
* try {
* const i3sData = await I3SDataProvider.fromUrl(
@@ -522,7 +513,6 @@ async function addLayers(provider, data, options) {
* } catch (error) {
* console.log(`There was an error creating the I3S Data Provider: ${error}`);
* }
- *
* @example
* try {
* const geoidService = await Cesium.ArcGISTiledElevationTerrainProvider.fromUrl(
@@ -580,6 +570,7 @@ I3SDataProvider.fromUrl = async function (url, options) {
};
/**
+ * @param resource
* @private
*/
I3SDataProvider._fetchJson = function (resource) {
@@ -588,7 +579,6 @@ I3SDataProvider._fetchJson = function (resource) {
/**
* @private
- *
* @param {Resource} resource The JSON resource to request
* @returns {Promise} The fetched data
*/
@@ -612,6 +602,7 @@ I3SDataProvider.loadJson = async function (resource) {
};
/**
+ * @param resource
* @private
*/
I3SDataProvider.prototype._loadBinary = async function (resource) {
@@ -631,6 +622,7 @@ I3SDataProvider.prototype._loadBinary = async function (resource) {
};
/**
+ * @param rawGltf
* @private
*/
I3SDataProvider.prototype._binarizeGltf = function (rawGltf) {
@@ -850,7 +842,7 @@ I3SDataProvider.prototype.getAttributeValues = function (name) {
/**
* Filters the drawn elements of a scene to specific attribute names and values
- * @param {I3SNode.AttributeFilter[]} [filters=[]] The collection of attribute filters
+ * @param {I3SNode.AttributeFilter[]} [filters] The collection of attribute filters
* @returns {Promise} A promise that is resolved when the filter is applied
*/
I3SDataProvider.prototype.filterByAttributes = function (filters) {
diff --git a/packages/engine/Source/Scene/I3SDecoder.js b/packages/engine/Source/Scene/I3SDecoder.js
index 97cc846e792c..87618acf2bcc 100644
--- a/packages/engine/Source/Scene/I3SDecoder.js
+++ b/packages/engine/Source/Scene/I3SDecoder.js
@@ -10,7 +10,6 @@ import TaskProcessor from "../Core/TaskProcessor.js";
/**
* Decode I3S using web workers.
- *
* @private
*/
function I3SDecoder() {}
@@ -41,14 +40,13 @@ async function initializeDecoder() {
/**
* Transcodes I3S to glTF in a web worker
- * @param {String} url custom attributes source URL
- * @param {Object} defaultGeometrySchema Schema to use during decoding
+ * @param {string} url custom attributes source URL
+ * @param {object} defaultGeometrySchema Schema to use during decoding
* @param {I3SGeometry} geometryData The draco encoded geometry data
* @param {Array} [featureData] The draco encoded feature data
- * @param {Object} [symbologyData] The rendering symbology to apply
+ * @param {object} [symbologyData] The rendering symbology to apply
* @returns Promise Returns a promise which resolves to the glTF result, or undefined if the task cannot be scheduled this frame.
- *
- * @exception {RuntimeError} I3S decoder could not be initialized.
+ * @throws {RuntimeError} I3S decoder could not be initialized.
*/
I3SDecoder.decode = async function (
url,
diff --git a/packages/engine/Source/Scene/I3SFeature.js b/packages/engine/Source/Scene/I3SFeature.js
index 093ceae5f2d8..b993a8a121f7 100644
--- a/packages/engine/Source/Scene/I3SFeature.js
+++ b/packages/engine/Source/Scene/I3SFeature.js
@@ -6,6 +6,8 @@ import I3SDataProvider from "./I3SDataProvider.js";
*
* Do not construct this directly, instead access tiles through {@link I3SNode}.
*
+ * @param parent
+ * @param uri
* @alias I3SFeature
* @internalConstructor
*/
diff --git a/packages/engine/Source/Scene/I3SField.js b/packages/engine/Source/Scene/I3SField.js
index dc4550e333fe..3619f6402773 100644
--- a/packages/engine/Source/Scene/I3SField.js
+++ b/packages/engine/Source/Scene/I3SField.js
@@ -6,7 +6,9 @@ import RuntimeError from "../Core/RuntimeError.js";
* to nodes
* @alias I3SField
* @internalConstructor
+ * @param parent
* @privateParam {I3SNode} parent The parent of that geometry
+ * @param storageInfo
* @privateParam {object} storageInfo The structure containing the storage info of the field
*/
function I3SField(parent, storageInfo) {
@@ -135,6 +137,9 @@ I3SField.prototype.load = function () {
};
/**
+ * @param dataView
+ * @param type
+ * @param offset
* @private
*/
I3SField.prototype._parseValue = function (dataView, type, offset) {
@@ -195,6 +200,7 @@ I3SField.prototype._parseValue = function (dataView, type, offset) {
};
/**
+ * @param dataView
* @private
*/
I3SField.prototype._parseHeader = function (dataView) {
@@ -214,6 +220,8 @@ I3SField.prototype._parseHeader = function (dataView) {
};
/**
+ * @param dataView
+ * @param offset
* @private
*/
I3SField.prototype._parseBody = function (dataView, offset) {
@@ -261,6 +269,7 @@ I3SField.prototype._parseBody = function (dataView, offset) {
};
/**
+ * @param headerSize
* @private
*/
I3SField.prototype._getBodyOffset = function (headerSize) {
@@ -278,6 +287,7 @@ I3SField.prototype._getBodyOffset = function (headerSize) {
};
/**
+ * @param dataView
* @private
*/
I3SField.prototype._validateHeader = function (dataView) {
@@ -298,6 +308,8 @@ I3SField.prototype._validateHeader = function (dataView) {
};
/**
+ * @param dataView
+ * @param offset
* @private
*/
I3SField.prototype._validateBody = function (dataView, offset) {
diff --git a/packages/engine/Source/Scene/I3SGeometry.js b/packages/engine/Source/Scene/I3SGeometry.js
index 2d6e11210f14..6483fd562378 100644
--- a/packages/engine/Source/Scene/I3SGeometry.js
+++ b/packages/engine/Source/Scene/I3SGeometry.js
@@ -12,7 +12,9 @@ import srgbToLinear from "../Core/srgbToLinear.js";
*
* @alias I3SGeometry
* @internalConstructor
+ * @param parent
* @privateParam {I3SNode} parent The parent of that geometry
+ * @param uri
* @privateParam {string} uri The uri to load the data from
*/
function I3SGeometry(parent, uri) {
@@ -283,6 +285,14 @@ function convertColorFactor(factor) {
}
/**
+ * @param nodesInScene
+ * @param nodes
+ * @param meshes
+ * @param buffers
+ * @param bufferViews
+ * @param accessors
+ * @param extensions
+ * @param extensionsUsed
* @private
*/
I3SGeometry.prototype._generateGltf = function (
diff --git a/packages/engine/Source/Scene/I3SLayer.js b/packages/engine/Source/Scene/I3SLayer.js
index 8ea3f13c2e58..0c6035264c76 100644
--- a/packages/engine/Source/Scene/I3SLayer.js
+++ b/packages/engine/Source/Scene/I3SLayer.js
@@ -16,8 +16,11 @@ import I3SSymbology from "./I3SSymbology.js";
*
* @alias I3SLayer
* @internalConstructor
+ * @param dataProvider
* @privateParam {I3SDataProvider} dataProvider The i3s data provider
+ * @param layerData
* @privateParam {object} layerData The layer data that is loaded from the scene layer
+ * @param parent
* @privateParam {I3SDataProvider|I3SSublayer} parent The parent of that layer
*/
function I3SLayer(dataProvider, layerData, parent) {
@@ -198,6 +201,7 @@ I3SLayer.prototype.load = async function (cesium3dTilesetOptions) {
};
/**
+ * @param useCompression
* @private
*/
I3SLayer.prototype._computeGeometryDefinitions = function (useCompression) {
@@ -260,6 +264,8 @@ I3SLayer.prototype._computeGeometryDefinitions = function (useCompression) {
};
/**
+ * @param definition
+ * @param attributes
* @private
*/
I3SLayer.prototype._findBestGeometryBuffers = function (
@@ -297,6 +303,7 @@ I3SLayer.prototype._findBestGeometryBuffers = function (
};
/**
+ * @param cesium3dTilesetOptions
* @private
*/
I3SLayer.prototype._loadRootNode = function (cesium3dTilesetOptions) {
@@ -314,6 +321,7 @@ I3SLayer.prototype._loadRootNode = function (cesium3dTilesetOptions) {
};
/**
+ * @param nodeIndex
* @private
*/
I3SLayer.prototype._getNodeInNodePages = function (nodeIndex) {
@@ -325,6 +333,7 @@ I3SLayer.prototype._getNodeInNodePages = function (nodeIndex) {
};
/**
+ * @param resource
* @private
*/
I3SLayer._fetchJson = function (resource) {
@@ -332,6 +341,7 @@ I3SLayer._fetchJson = function (resource) {
};
/**
+ * @param page
* @private
*/
I3SLayer.prototype._loadNodePage = function (page) {
@@ -381,6 +391,7 @@ I3SLayer.prototype._computeExtent = function () {
};
/**
+ * @param cesium3dTilesetOptions
* @private
*/
I3SLayer.prototype._create3DTileset = async function (cesium3dTilesetOptions) {
@@ -436,7 +447,7 @@ I3SLayer.prototype._updateVisibility = function () {
/**
* Filters the drawn elements of a layer to specific attribute names and values
- * @param {I3SNode.AttributeFilter[]} [filters=[]] The collection of attribute filters
+ * @param {I3SNode.AttributeFilter[]} [filters] The collection of attribute filters
* @returns {Promise} A promise that is resolved when the filter is applied
*/
I3SLayer.prototype.filterByAttributes = function (filters) {
diff --git a/packages/engine/Source/Scene/I3SNode.js b/packages/engine/Source/Scene/I3SNode.js
index 48be9519abbc..5f78e9ff3f2d 100644
--- a/packages/engine/Source/Scene/I3SNode.js
+++ b/packages/engine/Source/Scene/I3SNode.js
@@ -21,7 +21,6 @@ import I3SGeometry from "./I3SGeometry.js";
*
* A filter given by an attribute name and values.
* The 3D feature object should be hidden if its value for the attribute name is not specified in the collection of values.
- *
* @property {string} name The name of the attribute
* @property {string[]|number[]} values The collection of values
*/
@@ -31,6 +30,9 @@ import I3SGeometry from "./I3SGeometry.js";
*
* Do not construct this directly, instead access tiles through {@link I3SLayer}.
*
+ * @param parent
+ * @param ref
+ * @param isRoot
* @alias I3SNode
* @internalConstructor
*/
@@ -832,8 +834,7 @@ Cesium3DTile.prototype._hookedRequestContent =
*
* The request may not be made if the Cesium Request Scheduler can't prioritize it.
*
- *
- * @return {Promise|undefined} A promise that resolves when the request completes, or undefined if there is no request needed, or the request cannot be scheduled.
+ * @returns {Promise|undefined} A promise that resolves when the request completes, or undefined if there is no request needed, or the request cannot be scheduled.
* @private
*/
Cesium3DTile.prototype.requestContent = function () {
diff --git a/packages/engine/Source/Scene/I3SStatistics.js b/packages/engine/Source/Scene/I3SStatistics.js
index a5ca15641b6f..576ccd7538ff 100644
--- a/packages/engine/Source/Scene/I3SStatistics.js
+++ b/packages/engine/Source/Scene/I3SStatistics.js
@@ -7,6 +7,8 @@ import Resource from "../Core/Resource.js";
*
* Do not construct this directly, instead access statistics through {@link I3SDataProvider}.
*
+ * @param dataProvider
+ * @param uri
* @alias I3SStatistics
* @internalConstructor
*/
@@ -74,6 +76,7 @@ I3SStatistics.prototype.load = async function () {
};
/**
+ * @param attributeName
* @private
*/
I3SStatistics.prototype._getValues = function (attributeName) {
diff --git a/packages/engine/Source/Scene/I3SSublayer.js b/packages/engine/Source/Scene/I3SSublayer.js
index 6d33f74514bd..6eb1dedf2683 100644
--- a/packages/engine/Source/Scene/I3SSublayer.js
+++ b/packages/engine/Source/Scene/I3SSublayer.js
@@ -10,6 +10,9 @@ import Resource from "../Core/Resource.js";
*
* This object is normally not instantiated directly, use {@link I3SSublayer.fromData}.
*
+ * @param dataProvider
+ * @param parent
+ * @param sublayerData
* @alias I3SSublayer
* @internalConstructor
*/
@@ -123,6 +126,10 @@ Object.defineProperties(I3SSublayer.prototype, {
});
/**
+ * @param dataProvider
+ * @param buildingLayerUrl
+ * @param sublayerData
+ * @param parent
* @private
*/
I3SSublayer._fromData = async function (
diff --git a/packages/engine/Source/Scene/I3SSymbology.js b/packages/engine/Source/Scene/I3SSymbology.js
index 21783b9e4afc..5e53b7363496 100644
--- a/packages/engine/Source/Scene/I3SSymbology.js
+++ b/packages/engine/Source/Scene/I3SSymbology.js
@@ -8,6 +8,7 @@ import srgbToLinear from "../Core/srgbToLinear.js";
*
* Do not construct this directly, instead access symbology through {@link I3SLayer}.
*
+ * @param layer
* @alias I3SSymbology
* @internalConstructor
*/
@@ -279,6 +280,7 @@ function findHashForClassBreaks(hash, values, valueIndex) {
}
/**
+ * @param node
* @private
*/
I3SSymbology.prototype._getSymbology = async function (node) {
diff --git a/packages/engine/Source/Scene/I3dmParser.js b/packages/engine/Source/Scene/I3dmParser.js
index 90056bd425dd..2291887f6e4d 100644
--- a/packages/engine/Source/Scene/I3dmParser.js
+++ b/packages/engine/Source/Scene/I3dmParser.js
@@ -6,7 +6,6 @@ import RuntimeError from "../Core/RuntimeError.js";
/**
* Handles parsing of an Instanced 3D Model.
- *
* @namespace I3dmParser
* @private
*/
@@ -17,11 +16,9 @@ const sizeOfUint32 = Uint32Array.BYTES_PER_ELEMENT;
/**
* Parses the contents of a {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/Instanced3DModel|Instanced 3D Model}.
- *
* @private
- *
* @param {ArrayBuffer} arrayBuffer The array buffer containing the i3dm.
- * @param {number} [byteOffset=0] The byte offset of the beginning of the i3dm in the array buffer.
+ * @param {number} [byteOffset] The byte offset of the beginning of the i3dm in the array buffer.
* @returns {object} Returns an object with the glTF format, feature table (binary and json), batch table (binary and json) and glTF parts of the i3dm.
*/
I3dmParser.parse = function (arrayBuffer, byteOffset) {
diff --git a/packages/engine/Source/Scene/ImageBasedLighting.js b/packages/engine/Source/Scene/ImageBasedLighting.js
index e5822bc5e576..5c90958397a7 100644
--- a/packages/engine/Source/Scene/ImageBasedLighting.js
+++ b/packages/engine/Source/Scene/ImageBasedLighting.js
@@ -14,13 +14,12 @@ import OctahedralProjectedCubeMap from "./OctahedralProjectedCubeMap.js";
* when the image-based lighting is no longer needed to clean up GPU resources properly.
* If a model or tileset creates an instance of ImageBasedLighting, it will handle this.
* Otherwise, the application is responsible for calling destroy().
- *
- *
+ *
* @alias ImageBasedLighting
- * @constructor
- *
- * @param {Cartesian2} [options.imageBasedLightingFactor=Cartesian2(1.0, 1.0)] Scales diffuse and specular image-based lighting from the earth, sky, atmosphere and star skybox.
- * @param {number} [options.luminanceAtZenith=0.2] The sun's luminance at the zenith in kilo candela per meter squared to use for this model's procedural environment map.
+ * @class
+ * @param {Cartesian2} [options.imageBasedLightingFactor] Scales diffuse and specular image-based lighting from the earth, sky, atmosphere and star skybox.
+ * @param options
+ * @param {number} [options.luminanceAtZenith] The sun's luminance at the zenith in kilo candela per meter squared to use for this model's procedural environment map.
* @param {Cartesian3[]} [options.sphericalHarmonicCoefficients] The third order spherical harmonic coefficients used for the diffuse color of image-based lighting.
* @param {string} [options.specularEnvironmentMaps] A URL to a KTX2 file that contains a cube map of the specular lighting and the convoluted specular mipmaps.
*/
@@ -111,9 +110,7 @@ Object.defineProperties(ImageBasedLighting.prototype, {
* This cartesian is used to scale the final diffuse and specular lighting
* contribution from those sources to the final color. A value of 0.0 will
* disable those light sources.
- *
* @memberof ImageBasedLighting.prototype
- *
* @type {Cartesian2}
* @default Cartesian2(1.0, 1.0)
*/
@@ -161,9 +158,7 @@ Object.defineProperties(ImageBasedLighting.prototype, {
* to use for this model's procedural environment map. This is used when
* {@link ImageBasedLighting#specularEnvironmentMaps} and {@link ImageBasedLighting#sphericalHarmonicCoefficients}
* are not defined.
- *
* @memberof ImageBasedLighting.prototype
- *
* @type {number}
* @default 0.2
*/
@@ -188,9 +183,7 @@ Object.defineProperties(ImageBasedLighting.prototype, {
* These values can be obtained by preprocessing the environment map using the cmgen
tool of
* {@link https://github.com/google/filament/releases|Google's Filament project}. This will also generate a KTX file that can be
* supplied to {@link Model#specularEnvironmentMaps}.
- *
* @memberof ImageBasedLighting.prototype
- *
* @type {Cartesian3[]}
* @demo {@link https://sandcastle.cesium.com/index.html?src=Image-Based Lighting.html|Sandcastle Image Based Lighting Demo}
* @see {@link https://graphics.stanford.edu/papers/envmap/envmap.pdf|An Efficient Representation for Irradiance Environment Maps}
@@ -214,7 +207,6 @@ Object.defineProperties(ImageBasedLighting.prototype, {
/**
* A URL to a KTX2 file that contains a cube map of the specular lighting and the convoluted specular mipmaps.
- *
* @memberof ImageBasedLighting.prototype
* @demo {@link https://sandcastle.cesium.com/index.html?src=Image-Based Lighting.html|Sandcastle Image Based Lighting Demo}
* @type {string}
@@ -237,10 +229,8 @@ Object.defineProperties(ImageBasedLighting.prototype, {
/**
* Whether or not image-based lighting is enabled.
- *
* @memberof ImageBasedLighting.prototype
* @type {boolean}
- *
* @private
*/
enabled: {
@@ -255,10 +245,8 @@ Object.defineProperties(ImageBasedLighting.prototype, {
/**
* Whether or not the models that use this lighting should regenerate their shaders,
* based on the properties and resources have changed.
- *
* @memberof ImageBasedLighting.prototype
* @type {boolean}
- *
* @private
*/
shouldRegenerateShaders: {
@@ -269,10 +257,8 @@ Object.defineProperties(ImageBasedLighting.prototype, {
/**
* Whether or not to use the default spherical harmonic coefficients.
- *
* @memberof ImageBasedLighting.prototype
* @type {boolean}
- *
* @private
*/
useDefaultSphericalHarmonics: {
@@ -283,10 +269,8 @@ Object.defineProperties(ImageBasedLighting.prototype, {
/**
* Whether or not the image-based lighting settings use spherical harmonic coefficients.
- *
* @memberof ImageBasedLighting.prototype
* @type {boolean}
- *
* @private
*/
useSphericalHarmonicCoefficients: {
@@ -300,10 +284,8 @@ Object.defineProperties(ImageBasedLighting.prototype, {
/**
* The texture atlas for the specular environment maps.
- *
* @memberof ImageBasedLighting.prototype
* @type {OctahedralProjectedCubeMap}
- *
* @private
*/
specularEnvironmentMapAtlas: {
@@ -314,10 +296,8 @@ Object.defineProperties(ImageBasedLighting.prototype, {
/**
* Whether or not to use the default specular environment maps.
- *
* @memberof ImageBasedLighting.prototype
* @type {boolean}
- *
* @private
*/
useDefaultSpecularMaps: {
@@ -328,10 +308,8 @@ Object.defineProperties(ImageBasedLighting.prototype, {
/**
* Whether or not the image-based lighting settings use specular environment maps.
- *
* @memberof ImageBasedLighting.prototype
* @type {boolean}
- *
* @private
*/
useSpecularEnvironmentMaps: {
@@ -476,9 +454,7 @@ ImageBasedLighting.prototype.update = function (frameState) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
- *
* @see ImageBasedLighting#destroy
* @private
*/
@@ -493,12 +469,9 @@ ImageBasedLighting.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* imageBasedLighting = imageBasedLighting && imageBasedLighting.destroy();
- *
* @see ImageBasedLighting#isDestroyed
* @private
*/
diff --git a/packages/engine/Source/Scene/Imagery.js b/packages/engine/Source/Scene/Imagery.js
index c7ed8fb4fd0c..e746c28106b7 100644
--- a/packages/engine/Source/Scene/Imagery.js
+++ b/packages/engine/Source/Scene/Imagery.js
@@ -4,7 +4,11 @@ import ImageryState from "./ImageryState.js";
/**
* Stores details about a tile of imagery.
- *
+ * @param imageryLayer
+ * @param x
+ * @param y
+ * @param level
+ * @param rectangle
* @alias Imagery
* @private
*/
diff --git a/packages/engine/Source/Scene/ImageryLayer.js b/packages/engine/Source/Scene/ImageryLayer.js
index a6579f3ee4e6..bd5a1f32b8f1 100644
--- a/packages/engine/Source/Scene/ImageryLayer.js
+++ b/packages/engine/Source/Scene/ImageryLayer.js
@@ -40,10 +40,9 @@ import SplitDirection from "./SplitDirection.js";
import TileImagery from "./TileImagery.js";
/**
- * @typedef {Object} ImageryLayer.ConstructorOptions
+ * @typedef {object} ImageryLayer.ConstructorOptions
*
* Initialization options for the ImageryLayer constructor.
- *
* @property {Rectangle} [rectangle=imageryProvider.rectangle] The rectangle of the layer. This rectangle
* can limit the visible portion of the imagery provider.
* @property {number|Function} [alpha=1.0] The alpha blending value of this layer, from 0.0 to 1.0.
@@ -128,28 +127,22 @@ import TileImagery from "./TileImagery.js";
/**
* An imagery layer that displays tiled image data from a single imagery provider
* on a {@link Globe}.
- *
* @alias ImageryLayer
- * @constructor
- *
+ * @class
* @param {ImageryProvider} [imageryProvider] The imagery provider to use.
* @param {ImageryLayer.ConstructorOptions} [options] An object describing initialization options
- *
* @see ImageryLayer.fromProviderAsync
* @see ImageryLayer.fromWorldImagery
- *
* @example
* // Add an OpenStreetMaps layer
* const imageryLayer = new Cesium.ImageryLayer(new Cesium.OpenStreetMapImageryProvider({
* url: "https://tile.openstreetmap.org/"
* }));
* scene.imageryLayers.add(imageryLayer);
- *
* @example
* // Add Cesium ion's default world imagery layer
* const imageryLayer = Cesium.ImageryLayer.fromWorldImagery();
* scene.imageryLayers.add(imageryLayer);
- *
* @example
* // Add a new transparent layer from Cesium ion
* const imageryLayer = Cesium.ImageryLayer.fromProviderAsync(Cesium.IonImageryProvider.fromAssetId(3812));
@@ -168,7 +161,6 @@ function ImageryLayer(imageryProvider, options) {
/**
* The alpha blending value of this layer, with 0.0 representing fully transparent and
* 1.0 representing fully opaque.
- *
* @type {number}
* @default 1.0
*/
@@ -180,7 +172,6 @@ function ImageryLayer(imageryProvider, options) {
/**
* The alpha blending value of this layer on the night side of the globe, with 0.0 representing fully transparent and
* 1.0 representing fully opaque. This only takes effect when {@link Globe#enableLighting} is true
.
- *
* @type {number}
* @default 1.0
*/
@@ -192,7 +183,6 @@ function ImageryLayer(imageryProvider, options) {
/**
* The alpha blending value of this layer on the day side of the globe, with 0.0 representing fully transparent and
* 1.0 representing fully opaque. This only takes effect when {@link Globe#enableLighting} is true
.
- *
* @type {number}
* @default 1.0
*/
@@ -204,7 +194,6 @@ function ImageryLayer(imageryProvider, options) {
/**
* The brightness of this layer. 1.0 uses the unmodified imagery color. Less than 1.0
* makes the imagery darker while greater than 1.0 makes it brighter.
- *
* @type {number}
* @default {@link ImageryLayer.DEFAULT_BRIGHTNESS}
*/
@@ -219,7 +208,6 @@ function ImageryLayer(imageryProvider, options) {
/**
* The contrast of this layer. 1.0 uses the unmodified imagery color. Less than 1.0 reduces
* the contrast while greater than 1.0 increases it.
- *
* @type {number}
* @default {@link ImageryLayer.DEFAULT_CONTRAST}
*/
@@ -233,7 +221,6 @@ function ImageryLayer(imageryProvider, options) {
/**
* The hue of this layer in radians. 0.0 uses the unmodified imagery color.
- *
* @type {number}
* @default {@link ImageryLayer.DEFAULT_HUE}
*/
@@ -245,7 +232,6 @@ function ImageryLayer(imageryProvider, options) {
/**
* The saturation of this layer. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the
* saturation while greater than 1.0 increases it.
- *
* @type {number}
* @default {@link ImageryLayer.DEFAULT_SATURATION}
*/
@@ -259,7 +245,6 @@ function ImageryLayer(imageryProvider, options) {
/**
* The gamma correction to apply to this layer. 1.0 uses the unmodified imagery color.
- *
* @type {number}
* @default {@link ImageryLayer.DEFAULT_GAMMA}
*/
@@ -270,7 +255,6 @@ function ImageryLayer(imageryProvider, options) {
/**
* The {@link SplitDirection} to apply to this layer.
- *
* @type {SplitDirection}
* @default {@link ImageryLayer.DEFAULT_SPLIT}
*/
@@ -286,7 +270,6 @@ function ImageryLayer(imageryProvider, options) {
*
* To take effect, this property must be set immediately after adding the imagery layer.
* Once a texture is loaded it won't be possible to change the texture filter used.
- *
* @type {TextureMinificationFilter}
* @default {@link ImageryLayer.DEFAULT_MINIFICATION_FILTER}
*/
@@ -305,7 +288,6 @@ function ImageryLayer(imageryProvider, options) {
*
* To take effect, this property must be set immediately after adding the imagery layer.
* Once a texture is loaded it won't be possible to change the texture filter used.
- *
* @type {TextureMagnificationFilter}
* @default {@link ImageryLayer.DEFAULT_MAGNIFICATION_FILTER}
*/
@@ -319,7 +301,6 @@ function ImageryLayer(imageryProvider, options) {
/**
* Determines if this layer is shown.
- *
* @type {boolean}
* @default true
*/
@@ -350,21 +331,18 @@ function ImageryLayer(imageryProvider, options) {
/**
* Rectangle cutout in this layer of imagery.
- *
* @type {Rectangle}
*/
this.cutoutRectangle = options.cutoutRectangle;
/**
* Color value that should be set to transparent.
- *
* @type {Color}
*/
this.colorToAlpha = options.colorToAlpha;
/**
* Normalized (0-1) threshold for color-to-alpha.
- *
* @type {number}
*/
this.colorToAlphaThreshold = defaultValue(
@@ -509,23 +487,19 @@ ImageryLayer.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD = 0.004;
/**
* Create a new imagery layer from an asynchronous imagery provider. The layer will handle any asynchronous loads or errors, and begin rendering the imagery layer once ready.
- *
* @param {Promise} imageryProviderPromise A promise which resolves to a imagery provider
* @param {ImageryLayer.ConstructorOptions} options An object describing initialization options
* @returns {ImageryLayer} The created imagery layer.
- *
* @example
* // Create a new base layer
* const viewer = new Cesium.Viewer("cesiumContainer", {
* baseLayer: Cesium.ImageryLayer.fromProviderAsync(Cesium.IonImageryProvider.fromAssetId(3812));
* });
- *
* @example
* // Add a new transparent layer
* const imageryLayer = Cesium.ImageryLayer.fromProviderAsync(Cesium.IonImageryProvider.fromAssetId(3812));
* imageryLayer.alpha = 0.5;
* viewer.imageryLayers.add(imageryLayer);
- *
* @example
* // Handle loading events
* const imageryLayer = Cesium.ImageryLayer.fromProviderAsync(Cesium.IonImageryProvider.fromAssetId(3812));
@@ -540,7 +514,6 @@ ImageryLayer.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD = 0.004;
* imageryLayer.errorEvent.addEventListener(error => {
* alert(`Encountered an error while creating an imagery layer! ${error}`);
* });
- *
* @see ImageryLayer.errorEvent
* @see ImageryLayer.readyEvent
* @see ImageryLayer.provider
@@ -562,28 +535,23 @@ ImageryLayer.fromProviderAsync = function (imageryProviderPromise, options) {
* @typedef {ImageryLayer.ConstructorOptions} ImageryLayer.WorldImageryConstructorOptions
*
* Initialization options for ImageryLayer.fromWorldImagery
- *
* @property {IonWorldImageryStyle} [options.style=IonWorldImageryStyle] The style of base imagery, only AERIAL, AERIAL_WITH_LABELS, and ROAD are currently supported.
*/
/**
* Create a new imagery layer for ion's default global base imagery layer, currently Bing Maps. The layer will handle any asynchronous loads or errors, and begin rendering the imagery layer once ready.
- *
* @param {ImageryLayer.WorldImageryConstructorOptions} options An object describing initialization options
* @returns {ImageryLayer} The created imagery layer.
- *
- * * @example
+ * @example
* // Create a new base layer
* const viewer = new Cesium.Viewer("cesiumContainer", {
* baseLayer: Cesium.ImageryLayer.fromWorldImagery();
* });
- *
* @example
* // Add a new transparent layer
* const imageryLayer = Cesium.ImageryLayer.fromWorldImagery();
* imageryLayer.alpha = 0.5;
* viewer.imageryLayers.add(imageryLayer);
- *
* @example
* // Handle loading events
* const imageryLayer = Cesium.ImageryLayer.fromWorldImagery();
@@ -598,7 +566,6 @@ ImageryLayer.fromProviderAsync = function (imageryProviderPromise, options) {
* imageryLayer.errorEvent.addEventListener(error => {
* alert(`Encountered an error while creating an imagery layer! ${error}`);
* });
- *
* @see ImageryLayer.errorEvent
* @see ImageryLayer.readyEvent
* @see ImageryLayer.provider
@@ -620,7 +587,6 @@ ImageryLayer.fromWorldImagery = function (options) {
* others. It is special in that it is treated as if it has global rectangle, even if
* it actually does not, by stretching the texels at the edges over the entire
* globe.
- *
* @returns {boolean} true if this is the base layer; otherwise, false.
*/
ImageryLayer.prototype.isBaseLayer = function () {
@@ -632,9 +598,7 @@ ImageryLayer.prototype.isBaseLayer = function () {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
- *
* @see ImageryLayer#destroy
*/
ImageryLayer.prototype.isDestroyed = function () {
@@ -648,13 +612,9 @@ ImageryLayer.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* imageryLayer = imageryLayer && imageryLayer.destroy();
- *
* @see ImageryLayer#isDestroyed
*/
ImageryLayer.prototype.destroy = function () {
@@ -669,16 +629,13 @@ const terrainRectangleScratch = new Rectangle();
/**
* Computes the intersection of this layer's rectangle with the imagery provider's availability rectangle,
* producing the overall bounds of imagery that can be produced by this layer.
- *
* @returns {Rectangle} A rectangle which defines the overall bounds of imagery that can be produced by this layer.
- *
* @example
* // Zoom to an imagery layer.
* const imageryRectangle = imageryLayer.getImageryRectangle();
* scene.camera.flyTo({
* destination: rectangle
* });
- *
*/
ImageryLayer.prototype.getImageryRectangle = function () {
const imageryProvider = this._imageryProvider;
@@ -689,9 +646,7 @@ ImageryLayer.prototype.getImageryRectangle = function () {
/**
* Create skeletons for the imagery tiles that partially or completely overlap a given terrain
* tile.
- *
* @private
- *
* @param {Tile} tile The terrain tile.
* @param {TerrainProvider|undefined} terrainProvider The terrain provider associated with the terrain tile.
* @param {number} insertionPoint The position to insert new skeletons before in the tile's imagery list.
@@ -1066,9 +1021,7 @@ ImageryLayer.prototype._createTileImagerySkeletons = function (
/**
* Calculate the translation and scale for a particular {@link TileImagery} attached to a
* particular terrain tile.
- *
* @private
- *
* @param {Tile} tile The terrain tile.
* @param {TileImagery} tileImagery The imagery tile mapping.
* @returns {Cartesian4} The translation and scale where X and Y are the translation and Z and W
@@ -1111,9 +1064,7 @@ ImageryLayer.prototype._calculateTextureTranslationAndScale = function (
/**
* Request a particular piece of imagery from the imagery provider. This method handles raising an
* error event if the request fails, and retrying the request if necessary.
- *
* @private
- *
* @param {Imagery} imagery The imagery to request.
*/
ImageryLayer.prototype._requestImagery = function (imagery) {
@@ -1236,9 +1187,7 @@ ImageryLayer.prototype._createTextureWebGL = function (context, imagery) {
/**
* Create a WebGL texture for a given {@link Imagery} instance.
- *
* @private
- *
* @param {Context} context The rendered context to use to create textures.
* @param {Imagery} imagery The imagery for which to create a texture.
*/
@@ -1369,12 +1318,10 @@ ImageryLayer.prototype._finalizeReprojectTexture = function (context, texture) {
/**
* Enqueues a command re-projecting a texture to a {@link GeographicProjection} on the next update, if necessary, and generate
* mipmaps for the geographic texture.
- *
* @private
- *
* @param {FrameState} frameState The frameState.
* @param {Imagery} imagery The imagery instance to reproject.
- * @param {boolean} [needGeographicProjection=true] True to reproject to geographic, or false if Web Mercator is fine.
+ * @param {boolean} [needGeographicProjection] True to reproject to geographic, or false if Web Mercator is fine.
*/
ImageryLayer.prototype._reprojectTexture = function (
frameState,
@@ -1432,9 +1379,7 @@ ImageryLayer.prototype._reprojectTexture = function (
/**
* Updates frame state to execute any queued texture re-projections.
- *
* @private
- *
* @param {FrameState} frameState The frameState.
*/
ImageryLayer.prototype.queueReprojectionCommands = function (frameState) {
@@ -1448,7 +1393,6 @@ ImageryLayer.prototype.queueReprojectionCommands = function (frameState) {
/**
* Cancels re-projection commands queued for the next frame.
- *
* @private
*/
ImageryLayer.prototype.cancelReprojections = function () {
@@ -1688,7 +1632,6 @@ function reprojectToGeographic(command, context, texture, rectangle) {
/**
* Gets the level with the specified world coordinate spacing between texels, or less.
- *
* @param {ImageryLayer} layer The imagery layer to use.
* @param {number} texelSpacing The texel spacing for which to find a corresponding level.
* @param {number} latitudeClosestToEquator The latitude closest to the equator that we're concerned with.
@@ -1749,7 +1692,6 @@ export default ImageryLayer;
/**
* A function that is called when an error occurs.
* @callback ImageryLayer.ErrorEventCallback
- *
* @this ImageryLayer
* @param {Error} err An object holding details about the error that occurred.
*/
@@ -1757,7 +1699,6 @@ export default ImageryLayer;
/**
* A function that is called when the provider has been created
* @callback ImageryLayer.ReadyEventCallback
- *
* @this ImageryLayer
* @param {ImageryProvider} provider The created imagery provider.
*/
diff --git a/packages/engine/Source/Scene/ImageryLayerCollection.js b/packages/engine/Source/Scene/ImageryLayerCollection.js
index 5f45481d2915..83d8ca4e6f64 100644
--- a/packages/engine/Source/Scene/ImageryLayerCollection.js
+++ b/packages/engine/Source/Scene/ImageryLayerCollection.js
@@ -9,10 +9,8 @@ import ImageryLayer from "./ImageryLayer.js";
/**
* An ordered collection of imagery layers.
- *
* @alias ImageryLayerCollection
- * @constructor
- *
+ * @class
* @demo {@link https://sandcastle.cesium.com/index.html?src=Imagery%20Adjustment.html|Cesium Sandcastle Imagery Adjustment Demo}
* @demo {@link https://sandcastle.cesium.com/index.html?src=Imagery%20Layers%20Manipulation.html|Cesium Sandcastle Imagery Manipulation Demo}
*/
@@ -48,7 +46,6 @@ function ImageryLayerCollection() {
* {@link ImageryLayer#show} property. Event handlers are passed a reference to this layer,
* the index of the layer in the collection, and a flag that is true if the layer is now
* shown or false if it is now hidden.
- *
* @type {Event}
* @default Event()
*/
@@ -70,17 +67,13 @@ Object.defineProperties(ImageryLayerCollection.prototype, {
/**
* Adds a layer to the collection.
- *
* @param {ImageryLayer} layer the layer to add.
* @param {number} [index] the index to add the layer at. If omitted, the layer will
* be added on top of all existing layers.
- *
- * @exception {DeveloperError} index, if supplied, must be greater than or equal to zero and less than or equal to the number of the layers.
- *
+ * @throws {DeveloperError} index, if supplied, must be greater than or equal to zero and less than or equal to the number of the layers.
* @example
* const imageryLayer = Cesium.ImageryLayer.fromWorldImagery();
* scene.imageryLayers.add(imageryLayer);
- *
* @example
* const imageryLayer = Cesium.ImageryLayer.fromProviderAsync(Cesium.IonImageryProvider.fromAssetId(3812));
* scene.imageryLayers.add(imageryLayer);
@@ -120,12 +113,10 @@ ImageryLayerCollection.prototype.add = function (layer, index) {
/**
* Creates a new layer using the given ImageryProvider and adds it to the collection.
- *
* @param {ImageryProvider} imageryProvider the imagery provider to create a new layer for.
* @param {number} [index] the index to add the layer at. If omitted, the layer will
* added on top of all existing layers.
* @returns {ImageryLayer} The newly created layer.
- *
* @example
* try {
* const provider = await Cesium.IonImageryProvider.fromAssetId(3812);
@@ -151,9 +142,8 @@ ImageryLayerCollection.prototype.addImageryProvider = function (
/**
* Removes a layer from this collection, if present.
- *
* @param {ImageryLayer} layer The layer to remove.
- * @param {boolean} [destroy=true] whether to destroy the layers in addition to removing them.
+ * @param {boolean} [destroy] whether to destroy the layers in addition to removing them.
* @returns {boolean} true if the layer was in the collection and was removed,
* false if the layer was not in the collection.
*/
@@ -180,8 +170,7 @@ ImageryLayerCollection.prototype.remove = function (layer, destroy) {
/**
* Removes all layers from this collection.
- *
- * @param {boolean} [destroy=true] whether to destroy the layers in addition to removing them.
+ * @param {boolean} [destroy] whether to destroy the layers in addition to removing them.
*/
ImageryLayerCollection.prototype.removeAll = function (destroy) {
destroy = defaultValue(destroy, true);
@@ -201,9 +190,7 @@ ImageryLayerCollection.prototype.removeAll = function (destroy) {
/**
* Checks to see if the collection contains a given layer.
- *
* @param {ImageryLayer} layer the layer to check for.
- *
* @returns {boolean} true if the collection contains the layer, false otherwise.
*/
ImageryLayerCollection.prototype.contains = function (layer) {
@@ -212,9 +199,7 @@ ImageryLayerCollection.prototype.contains = function (layer) {
/**
* Determines the index of a given layer in the collection.
- *
* @param {ImageryLayer} layer The layer to find the index of.
- *
* @returns {number} The index of the layer in the collection, or -1 if the layer does not exist in the collection.
*/
ImageryLayerCollection.prototype.indexOf = function (layer) {
@@ -223,9 +208,7 @@ ImageryLayerCollection.prototype.indexOf = function (layer) {
/**
* Gets a layer by index from the collection.
- *
* @param {number} index the index to retrieve.
- *
* @returns {ImageryLayer} The imagery layer at the given index.
*/
ImageryLayerCollection.prototype.get = function (index) {
@@ -276,11 +259,9 @@ function swapLayers(collection, i, j) {
/**
* Raises a layer up one position in the collection.
- *
* @param {ImageryLayer} layer the layer to move.
- *
- * @exception {DeveloperError} layer is not in this collection.
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} layer is not in this collection.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
*/
ImageryLayerCollection.prototype.raise = function (layer) {
const index = getLayerIndex(this._layers, layer);
@@ -289,11 +270,9 @@ ImageryLayerCollection.prototype.raise = function (layer) {
/**
* Lowers a layer down one position in the collection.
- *
* @param {ImageryLayer} layer the layer to move.
- *
- * @exception {DeveloperError} layer is not in this collection.
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} layer is not in this collection.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
*/
ImageryLayerCollection.prototype.lower = function (layer) {
const index = getLayerIndex(this._layers, layer);
@@ -302,11 +281,9 @@ ImageryLayerCollection.prototype.lower = function (layer) {
/**
* Raises a layer to the top of the collection.
- *
* @param {ImageryLayer} layer the layer to move.
- *
- * @exception {DeveloperError} layer is not in this collection.
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} layer is not in this collection.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
*/
ImageryLayerCollection.prototype.raiseToTop = function (layer) {
const index = getLayerIndex(this._layers, layer);
@@ -323,11 +300,9 @@ ImageryLayerCollection.prototype.raiseToTop = function (layer) {
/**
* Lowers a layer to the bottom of the collection.
- *
* @param {ImageryLayer} layer the layer to move.
- *
- * @exception {DeveloperError} layer is not in this collection.
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} layer is not in this collection.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
*/
ImageryLayerCollection.prototype.lowerToBottom = function (layer) {
const index = getLayerIndex(this._layers, layer);
@@ -421,13 +396,11 @@ function pickImageryHelper(scene, pickedLocation, pickFeatures, callback) {
/**
* Determines the imagery layers that are intersected by a pick ray. To compute a pick ray from a
* location on the screen, use {@link Camera.getPickRay}.
- *
* @param {Ray} ray The ray to test for intersection.
* @param {Scene} scene The scene.
- * @return {ImageryLayer[]|undefined} An array that includes all of
+ * @returns {ImageryLayer[]|undefined} An array that includes all of
* the layers that are intersected by a given pick ray. Undefined if
* no layers are selected.
- *
*/
ImageryLayerCollection.prototype.pickImageryLayers = function (ray, scene) {
// Find the picked location on the globe.
@@ -457,15 +430,13 @@ ImageryLayerCollection.prototype.pickImageryLayers = function (ray, scene) {
* Asynchronously determines the imagery layer features that are intersected by a pick ray. The intersected imagery
* layer features are found by invoking {@link ImageryProvider#pickFeatures} for each imagery layer tile intersected
* by the pick ray. To compute a pick ray from a location on the screen, use {@link Camera.getPickRay}.
- *
* @param {Ray} ray The ray to test for intersection.
* @param {Scene} scene The scene.
- * @return {Promise|undefined} A promise that resolves to an array of features intersected by the pick ray.
+ * @returns {Promise|undefined} A promise that resolves to an array of features intersected by the pick ray.
* If it can be quickly determined that no features are intersected (for example,
* because no active imagery providers support {@link ImageryProvider#pickFeatures}
* or because the pick ray does not intersect the surface), this function will
* return undefined.
- *
* @example
* const pickRay = viewer.camera.getPickRay(windowPosition);
* const featuresPromise = viewer.imageryLayers.pickImageryLayerFeatures(pickRay, viewer.scene);
@@ -546,9 +517,7 @@ ImageryLayerCollection.prototype.pickImageryLayerFeatures = function (
/**
* Updates frame state to execute any queued texture re-projections.
- *
* @private
- *
* @param {FrameState} frameState The frameState.
*/
ImageryLayerCollection.prototype.queueReprojectionCommands = function (
@@ -562,7 +531,6 @@ ImageryLayerCollection.prototype.queueReprojectionCommands = function (
/**
* Cancels re-projection commands queued for the next frame.
- *
* @private
*/
ImageryLayerCollection.prototype.cancelReprojections = function () {
@@ -577,9 +545,7 @@ ImageryLayerCollection.prototype.cancelReprojections = function () {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true if this object was destroyed; otherwise, false.
- *
* @see ImageryLayerCollection#destroy
*/
ImageryLayerCollection.prototype.isDestroyed = function () {
@@ -594,13 +560,9 @@ ImageryLayerCollection.prototype.isDestroyed = function () {
* Once this object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* layerCollection = layerCollection && layerCollection.destroy();
- *
* @see ImageryLayerCollection#isDestroyed
*/
ImageryLayerCollection.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/ImageryLayerFeatureInfo.js b/packages/engine/Source/Scene/ImageryLayerFeatureInfo.js
index 0ce99360f846..8ef4a8ff26a1 100644
--- a/packages/engine/Source/Scene/ImageryLayerFeatureInfo.js
+++ b/packages/engine/Source/Scene/ImageryLayerFeatureInfo.js
@@ -2,9 +2,8 @@ import defined from "../Core/defined.js";
/**
* Describes a rasterized feature, such as a point, polygon, polyline, etc., in an imagery layer.
- *
* @alias ImageryLayerFeatureInfo
- * @constructor
+ * @class
*/
function ImageryLayerFeatureInfo() {
/**
@@ -22,7 +21,6 @@ function ImageryLayerFeatureInfo() {
/**
* Gets or sets the position of the feature, or undefined if the position is not known.
- *
* @type {Cartographic|undefined}
*/
this.position = undefined;
@@ -46,7 +44,6 @@ function ImageryLayerFeatureInfo() {
* one of the following sources, in this order: 1) the property with the name 'name', 2) the property with the name 'title',
* 3) the first property containing the word 'name', 4) the first property containing the word 'title'. If
* the name cannot be obtained from any of these sources, the existing name will be left unchanged.
- *
* @param {object} properties An object literal containing the properties of the feature.
*/
ImageryLayerFeatureInfo.prototype.configureNameFromProperties = function (
@@ -82,7 +79,6 @@ ImageryLayerFeatureInfo.prototype.configureNameFromProperties = function (
/**
* Configures the description of this feature by creating an HTML table of properties and their values.
- *
* @param {object} properties An object literal containing the properties of the feature.
*/
ImageryLayerFeatureInfo.prototype.configureDescriptionFromProperties = function (
diff --git a/packages/engine/Source/Scene/ImageryProvider.js b/packages/engine/Source/Scene/ImageryProvider.js
index 0169ffdf0d44..4e7fb22c7a42 100644
--- a/packages/engine/Source/Scene/ImageryProvider.js
+++ b/packages/engine/Source/Scene/ImageryProvider.js
@@ -18,11 +18,9 @@ import Resource from "../Core/Resource.js";
/**
* Provides imagery to be displayed on the surface of an ellipsoid. This type describes an
* interface and is not intended to be instantiated directly.
- *
* @alias ImageryProvider
- * @constructor
+ * @class
* @abstract
- *
* @see ArcGisMapServerImageryProvider
* @see BingMapsImageryProvider
* @see OpenStreetMapImageryProvider
@@ -38,7 +36,6 @@ import Resource from "../Core/Resource.js";
* @see UrlTemplateImageryProvider
* @see WebMapServiceImageryProvider
* @see WebMapTileServiceImageryProvider
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Imagery%20Layers.html|Cesium Sandcastle Imagery Layers Demo}
* @demo {@link https://sandcastle.cesium.com/index.html?src=Imagery%20Layers%20Manipulation.html|Cesium Sandcastle Imagery Manipulation Demo}
*/
@@ -173,7 +170,6 @@ Object.defineProperties(ImageryProvider.prototype, {
/**
* Gets the credits to be displayed when a given tile is displayed.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level;
@@ -185,7 +181,6 @@ ImageryProvider.prototype.getTileCredits = function (x, y, level) {
/**
* Requests the image for a given tile.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
@@ -201,19 +196,16 @@ ImageryProvider.prototype.requestImage = function (x, y, level, request) {
* Asynchronously determines what features, if any, are located at a given longitude and latitude within
* a tile.
* This function is optional, so it may not exist on all ImageryProviders.
- *
* @function
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
* @param {number} longitude The longitude at which to pick features.
* @param {number} latitude The latitude at which to pick features.
- * @return {Promise|undefined} A promise for the picked features that will resolve when the asynchronous
+ * @returns {Promise|undefined} A promise for the picked features that will resolve when the asynchronous
* picking completes. The resolved value is an array of {@link ImageryLayerFeatureInfo}
* instances. The array may be empty if no features are found at the given location.
* It may also be undefined if picking is not supported.
- *
*/
ImageryProvider.prototype.pickFeatures = function (
x,
@@ -231,7 +223,6 @@ const ktx2Regex = /\.ktx2$/i;
* Loads an image from a given URL. If the server referenced by the URL already has
* too many requests pending, this function will instead return undefined, indicating
* that the request should be retried later.
- *
* @param {ImageryProvider} imageryProvider The imagery provider for the URL.
* @param {Resource|string} url The URL of the image.
* @returns {Promise|undefined} A promise for the image that will resolve when the image is available, or
diff --git a/packages/engine/Source/Scene/Implicit3DTileContent.js b/packages/engine/Source/Scene/Implicit3DTileContent.js
index 96eebae51c1d..833ac9f444e8 100644
--- a/packages/engine/Source/Scene/Implicit3DTileContent.js
+++ b/packages/engine/Source/Scene/Implicit3DTileContent.js
@@ -27,19 +27,15 @@ import BoundingVolumeSemantics from "./BoundingVolumeSemantics.js";
* Implements the {@link Cesium3DTileContent} interface.
*
* This object is normally not instantiated directly, use {@link Implicit3DTileContent.fromSubtreeJson}.
- *
* @alias Implicit3DTileContent
- * @constructor
- *
+ * @class
* @param {Cesium3DTileset} tileset The tileset this content belongs to
* @param {Cesium3DTile} tile The tile this content belongs to.
* @param {Resource} resource The resource for the tileset
* @param {object} [json] The JSON object containing the subtree. Mutually exclusive with arrayBuffer.
* @param {ArrayBuffer} [arrayBuffer] The array buffer that stores the content payload. Mutually exclusive with json.
- * @param {number} [byteOffset=0] The offset into the array buffer, if one was provided
- *
- * @exception {DeveloperError} One of json and arrayBuffer must be defined.
- *
+ * @param {number} [byteOffset] The offset into the array buffer, if one was provided
+ * @throws {DeveloperError} One of json and arrayBuffer must be defined.
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -120,9 +116,7 @@ Object.defineProperties(Implicit3DTileContent.prototype, {
/**
* Returns true when the tile's content is ready to render; otherwise false
- *
* @memberof Implicit3DTileContent.prototype
- *
* @type {boolean}
* @readonly
* @private
@@ -187,17 +181,14 @@ Object.defineProperties(Implicit3DTileContent.prototype, {
/**
* Initialize the implicit content by parsing the subtree resource and setting
* up a promise chain to expand the immediate subtree.
- *
* @param {Cesium3DTileset} tileset The tileset this content belongs to
* @param {Cesium3DTile} tile The tile this content belongs to.
* @param {Resource} resource The resource for the tileset
* @param {object} [json] The JSON containing the subtree. Mutually exclusive with arrayBuffer.
* @param {ArrayBuffer} [arrayBuffer] The ArrayBuffer containing a subtree binary. Mutually exclusive with json.
- * @param {number} [byteOffset=0] The byte offset into the arrayBuffer
- * @return {Promise}
- *
- * @exception {DeveloperError} One of json and arrayBuffer must be defined.
- *
+ * @param {number} [byteOffset] The byte offset into the arrayBuffer
+ * @returns {Promise}
+ * @throws {DeveloperError} One of json and arrayBuffer must be defined.
* @private
*/
Implicit3DTileContent.fromSubtreeJson = async function (
@@ -247,7 +238,6 @@ Implicit3DTileContent.fromSubtreeJson = async function (
* a tree of {@link Cesium3DTile}. The root of this tree is stored in
* the placeholder tile's children array. This method also creates placeholder
* tiles for the child subtrees to be lazily expanded as needed.
- *
* @param {Implicit3DTileContent} content The content
* @param {ImplicitSubtree} subtree The parsed subtree
* @private
@@ -287,7 +277,6 @@ function expandSubtree(content, subtree) {
/**
* A pair of (tile, childIndex) used for finding child subtrees.
- *
* @typedef {object} ChildSubtreeLocator
* @property {Cesium3DTile} tile One of the tiles in the bottommost row of the subtree.
* @property {number} childIndex The morton index of the child tile relative to its parent
@@ -296,7 +285,6 @@ function expandSubtree(content, subtree) {
/**
* Determine what child subtrees exist and return a list of information
- *
* @param {Implicit3DTileContent} content The implicit content
* @param {ImplicitSubtree} subtree The subtree for looking up availability
* @param {Array} bottomRow The bottom row of tiles in a transcoded subtree
@@ -328,7 +316,6 @@ function listChildSubtrees(content, subtree, bottomRow) {
/**
* Results of transcodeSubtreeTiles, containing the root tile of the
* subtree and the bottom row of nodes for further processing.
- *
* @typedef {object} TranscodedSubtree
* @property {Cesium3DTile} rootTile The transcoded root tile of the subtree
* @property {Array} bottomRow The bottom row of transcoded tiles. This is helpful for processing child subtrees
@@ -339,7 +326,6 @@ function listChildSubtrees(content, subtree, bottomRow) {
* Transcode the implicitly-defined tiles within this subtree and generate
* explicit {@link Cesium3DTile} objects. This function only transcode tiles,
* child subtrees are handled separately.
- *
* @param {Implicit3DTileContent} content The implicit content
* @param {ImplicitSubtree} subtree The subtree to get availability information
* @param {Cesium3DTile} placeholderTile The placeholder tile, used for constructing the subtree root tile
@@ -429,13 +415,12 @@ function getGeometricError(tileMetadata, implicitTileset, implicitCoordinates) {
* This creates a real tile for rendering, not a placeholder tile like some of
* the other methods of ImplicitTileset.
*
- *
* @param {Implicit3DTileContent} implicitContent The implicit content
* @param {ImplicitSubtree} subtree The subtree the child tile belongs to
* @param {Cesium3DTile} parentTile The parent of the new child tile
* @param {number} childIndex The morton index of the child tile relative to its parent
* @param {number} childBitIndex The index of the child tile within the tile's availability information.
- * @param {boolean} [parentIsPlaceholderTile=false] True if parentTile is a placeholder tile. This is true for the root of each subtree.
+ * @param {boolean} [parentIsPlaceholderTile] True if parentTile is a placeholder tile. This is true for the root of each subtree.
* @returns {Cesium3DTile} The new child tile.
* @private
*/
@@ -572,7 +557,6 @@ function deriveChildTile(
* Checks whether the bounding volume's heights can be updated.
* Returns true if the minimumHeight/maximumHeight parameter
* is defined and the bounding volume is a region or S2 cell.
- *
* @param {object} [boundingVolume] The bounding volume
* @param {object} [tileBounds] The tile bounds
* @param {number} [tileBounds.minimumHeight] The minimum height
@@ -597,7 +581,6 @@ function canUpdateHeights(boundingVolume, tileBounds) {
* semantics. Heights are only updated if the respective
* minimumHeight/maximumHeight parameter is defined and the
* bounding volume is a region or S2 cell.
- *
* @param {object} boundingVolume The bounding volume
* @param {object} [tileBounds] The tile bounds
* @param {number} [tileBounds.minimumHeight] The new minimum height
@@ -630,7 +613,6 @@ function updateHeights(boundingVolume, tileBounds) {
* TILE_MINIMUM_HEIGHT
and TILE_MAXIMUM_HEIGHT
* semantics. Heights are only updated if the respective
* minimumHeight/maximumHeight parameter is defined.
- *
* @param {Array} region A 6-element array describing the bounding region
* @param {number} [minimumHeight] The new minimum height
* @param {number} [maximumHeight] The new maximum height
@@ -652,7 +634,6 @@ function updateRegionHeights(region, minimumHeight, maximumHeight) {
* TILE_MINIMUM_HEIGHT
and TILE_MAXIMUM_HEIGHT
* semantics. Heights are only updated if the respective
* minimumHeight/maximumHeight parameter is defined.
- *
* @param {object} s2CellVolume An object describing the S2 cell
* @param {number} [minimumHeight] The new minimum height
* @param {number} [maximumHeight] The new maximum height
@@ -676,11 +657,11 @@ function updateS2CellHeights(s2CellVolume, minimumHeight, maximumHeight) {
* Priority of bounding volume types:
*
* Explicit min/max height
- *
- * With explicit region
- * With implicit S2
- * With implicit region
- *
+ *
+ * With explicit region
+ * With implicit S2
+ * With implicit region
+ *
*
* Explicit box
* Explicit region
@@ -690,7 +671,6 @@ function updateS2CellHeights(s2CellVolume, minimumHeight, maximumHeight) {
* Implicit region
*
*
- *
* @param {ImplicitTileset} implicitTileset The implicit tileset struct which holds the root bounding volume
* @param {ImplicitTileCoordinates} implicitCoordinates The coordinates of the child tile
* @param {number} childIndex The morton index of the child tile relative to its parent
@@ -741,10 +721,10 @@ function getTileBoundingVolume(
* Priority of bounding volume types:
*
* Explicit min/max height
- *
- * With explicit region
- * With tile bounding volume (S2 or region)
- *
+ *
+ * With explicit region
+ * With tile bounding volume (S2 or region)
+ *
*
* Explicit box
* Explicit region
@@ -752,7 +732,6 @@ function getTileBoundingVolume(
* Tile bounding volume (when content.boundingVolume is undefined)
*
*
- *
* @param {object} tileBoundingVolume An object containing the JSON for the tile's bounding volume
* @param {object} [contentBounds] The content bounds
* @returns {object|undefined} An object containing the JSON for a bounding volume, or undefined
if there is no bounding volume
@@ -780,7 +759,6 @@ function getContentBoundingVolume(tileBoundingVolume, contentBounds) {
/**
* Given the coordinates of a tile, derive its bounding volume from the root.
- *
* @param {ImplicitTileset} implicitTileset The implicit tileset struct which holds the root bounding volume
* @param {ImplicitTileCoordinates} implicitCoordinates The coordinates of the child tile
* @param {number} childIndex The morton index of the child tile relative to its parent
@@ -847,7 +825,6 @@ function deriveBoundingVolume(
* is used. Quadtrees are always divided at the midpoint of the the horizontal
* dimensions, i.e. (x, y), leaving the z axis unchanged.
*
- *
* @param {boolean} parentIsPlaceholderTile True if parentTile is a placeholder tile. This is true for the root of each subtree.
* @param {Cesium3DTile} parentTile The parent of the new child tile
* @param {number} childIndex The morton index of the child tile relative to its parent
@@ -948,7 +925,6 @@ const scratchHalfAxes = new Matrix3();
* This computes the child volume directly from the root bounding volume rather
* than recursively subdividing to minimize floating point error.
*
- *
* @param {number[]} rootBox An array of 12 numbers representing the bounding box of the root tile
* @param {number} level The level of the descendant tile relative to the root implicit tile
* @param {number} x The x coordinate of the descendant tile
@@ -1077,7 +1053,6 @@ function deriveBoundingRegion(rootRegion, level, x, y, z) {
/**
* Create a placeholder 3D Tile whose content will be an Implicit3DTileContent
* for lazy evaluation of a child subtree.
- *
* @param {Implicit3DTileContent} content The content object.
* @param {Cesium3DTile} parentTile The parent of the new child subtree.
* @param {number} childIndex The morton index of the child tile relative to its parent
@@ -1153,6 +1128,8 @@ function makeTile(content, baseResource, tileJson, parentTile) {
/**
* Part of the {@link Cesium3DTileContent} interface. Implicit3DTileContent
* always returns false
since a tile of this type does not have any features.
+ * @param batchId
+ * @param name
* @private
*/
Implicit3DTileContent.prototype.hasProperty = function (batchId, name) {
@@ -1162,6 +1139,7 @@ Implicit3DTileContent.prototype.hasProperty = function (batchId, name) {
/**
* Part of the {@link Cesium3DTileContent} interface. Implicit3DTileContent
* always returns undefined
since a tile of this type does not have any features.
+ * @param batchId
* @private
*/
Implicit3DTileContent.prototype.getFeature = function (batchId) {
diff --git a/packages/engine/Source/Scene/ImplicitAvailabilityBitstream.js b/packages/engine/Source/Scene/ImplicitAvailabilityBitstream.js
index 9c664f9a5259..b9091f30f65f 100644
--- a/packages/engine/Source/Scene/ImplicitAvailabilityBitstream.js
+++ b/packages/engine/Source/Scene/ImplicitAvailabilityBitstream.js
@@ -7,16 +7,14 @@ import RuntimeError from "../Core/RuntimeError.js";
/**
* An availability bitstream for use in an {@link ImplicitSubtree}. This handles
* both Uint8Array bitstreams and constant values.
- *
* @alias ImplicitAvailabilityBitstream
- * @constructor
- *
+ * @class
* @param {object} options An object with the following properties:
* @param {number} options.lengthBits The length of the bitstream in bits
* @param {boolean} [options.constant] A single boolean value indicating the value of all the bits in the bitstream if they are all the same
* @param {Uint8Array} [options.bitstream] An array of bytes storing the bitstream in binary
* @param {number} [options.availableCount] A number indicating how many 1 bits are found in the bitstream
- * @param {boolean} [options.computeAvailableCountEnabled=false] If true, and options.availableCount is undefined, the availableCount will be computed from the bitstream.
+ * @param {boolean} [options.computeAvailableCountEnabled] If true, and options.availableCount is undefined, the availableCount will be computed from the bitstream.
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -62,7 +60,6 @@ function ImplicitAvailabilityBitstream(options) {
/**
* Count the number of bits with value 1 in the bitstream. This is used for
* computing availableCount if not precomputed
- *
* @param {Uint8Array} bitstream The bitstream typed array
* @param {number} lengthBits How many bits are in the bitstream
* @private
@@ -80,9 +77,7 @@ function count1Bits(bitstream, lengthBits) {
Object.defineProperties(ImplicitAvailabilityBitstream.prototype, {
/**
* The length of the bitstream in bits.
- *
* @memberof ImplicitAvailabilityBitstream.prototype
- *
* @type {number}
* @readonly
* @private
@@ -94,9 +89,7 @@ Object.defineProperties(ImplicitAvailabilityBitstream.prototype, {
},
/**
* The number of bits in the bitstream with value 1
.
- *
* @memberof ImplicitAvailabilityBitstream.prototype
- *
* @type {number}
* @readonly
* @private
@@ -111,7 +104,6 @@ Object.defineProperties(ImplicitAvailabilityBitstream.prototype, {
/**
* Get a bit from the availability bitstream as a Boolean. If the bitstream
* is a constant, the constant value is returned instead.
- *
* @param {number} index The integer index of the bit.
* @returns {boolean} The value of the bit
* @private
diff --git a/packages/engine/Source/Scene/ImplicitMetadataView.js b/packages/engine/Source/Scene/ImplicitMetadataView.js
index d00801aee969..cdd9879c277d 100644
--- a/packages/engine/Source/Scene/ImplicitMetadataView.js
+++ b/packages/engine/Source/Scene/ImplicitMetadataView.js
@@ -6,15 +6,13 @@ import defaultValue from "../Core/defaultValue.js";
*
* See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_metadata|3DTILES_metadata Extension} for 3D Tiles
*
- *
* @param {MetadataTable} options.metadataTable The metadata table.
* @param {MetadataClass} options.class The class that the metadata conforms to.
* @param {number} options.entityId The ID of the entity the metadata belongs to.
* @param {object} options.propertyTableJson The JSON that contains the property table of the entity.
- *
+ * @param options
* @alias ImplicitMetadataView
- * @constructor
- *
+ * @class
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -44,7 +42,6 @@ function ImplicitMetadataView(options) {
Object.defineProperties(ImplicitMetadataView.prototype, {
/**
* The class that properties conform to.
- *
* @memberof ImplicitMetadataView.prototype
* @type {MetadataClass}
* @readonly
@@ -57,7 +54,6 @@ Object.defineProperties(ImplicitMetadataView.prototype, {
/**
* Extra user-defined properties.
- *
* @memberof ImplicitMetadataView.prototype
* @type {object}
* @readonly
@@ -70,7 +66,6 @@ Object.defineProperties(ImplicitMetadataView.prototype, {
/**
* An object containing extensions.
- *
* @memberof ImplicitMetadataView.prototype
* @type {object}
* @readonly
@@ -84,7 +79,6 @@ Object.defineProperties(ImplicitMetadataView.prototype, {
/**
* Returns whether the metadata contains this property.
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {boolean} Whether the tile has this property.
* @private
@@ -95,7 +89,6 @@ ImplicitMetadataView.prototype.hasProperty = function (propertyId) {
/**
* Returns whether the metadata contains a property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @returns {boolean} Whether the tile has a property with the given semantic.
* @private
@@ -106,7 +99,6 @@ ImplicitMetadataView.prototype.hasPropertyBySemantic = function (semantic) {
/**
* Returns an array of property IDs in the metadata table.
- *
* @param {string[]} [results] An array into which to store the results.
* @returns {string[]} The property IDs.
* @private
@@ -120,7 +112,6 @@ ImplicitMetadataView.prototype.getPropertyIds = function (results) {
*
* If the property is normalized the normalized value is returned.
*
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {*} The value of the property or undefined
if the tile does not have this property.
* @private
@@ -134,7 +125,6 @@ ImplicitMetadataView.prototype.getProperty = function (propertyId) {
*
* If the property is normalized a normalized value must be provided to this function.
*
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @param {*} value The value of the property that will be copied.
* @returns {boolean} true
if the property was set, false
otherwise.
@@ -146,7 +136,6 @@ ImplicitMetadataView.prototype.setProperty = function (propertyId, value) {
/**
* Returns a copy of the value of the property with the given semantic in the metadata table.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @returns {*} The value of the property or undefined
if the tile does not have this semantic.
* @private
@@ -157,7 +146,6 @@ ImplicitMetadataView.prototype.getPropertyBySemantic = function (semantic) {
/**
* Sets the value of the property with the given semantic in the metadata table.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @param {*} value The value of the property that will be copied.
* @returns {boolean} true
if the property was set, false
otherwise.
diff --git a/packages/engine/Source/Scene/ImplicitSubdivisionScheme.js b/packages/engine/Source/Scene/ImplicitSubdivisionScheme.js
index 75f5ecde7357..06f47baef99f 100644
--- a/packages/engine/Source/Scene/ImplicitSubdivisionScheme.js
+++ b/packages/engine/Source/Scene/ImplicitSubdivisionScheme.js
@@ -2,7 +2,6 @@ import DeveloperError from "../Core/DeveloperError.js";
/**
* The subdivision scheme for an implicit tileset.
- *
* @enum {string}
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
diff --git a/packages/engine/Source/Scene/ImplicitSubtree.js b/packages/engine/Source/Scene/ImplicitSubtree.js
index 97133ffa17db..640bbcd3b7a8 100644
--- a/packages/engine/Source/Scene/ImplicitSubtree.js
+++ b/packages/engine/Source/Scene/ImplicitSubtree.js
@@ -23,17 +23,13 @@ import ResourceCache from "./ResourceCache.js";
*
*
* This object is normally not instantiated directly, use {@link ImplicitSubtree.fromSubtreeJson}.
- *
* @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_metadata#implicit-tile-properties|Implicit Tile Properties in the 3DTILES_metadata specification}
* @see ImplicitSubtree.fromSubtreeJson
- *
* @alias ImplicitSubtree
- * @constructor
- *
+ * @class
* @param {Resource} resource The resource for this subtree. This is used for fetching external buffers as needed.
* @param {ImplicitTileset} implicitTileset The implicit tileset. This includes information about the size of subtrees
* @param {ImplicitTileCoordinates} implicitCoordinates The coordinates of the subtree's root tile.
- *
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -74,7 +70,6 @@ Object.defineProperties(ImplicitSubtree.prototype, {
/**
* Returns true once all necessary availability buffers
* are loaded.
- *
* @type {boolean}
* @readonly
* @private
@@ -87,7 +82,6 @@ Object.defineProperties(ImplicitSubtree.prototype, {
/**
* When subtree metadata is present (3D Tiles 1.1), this property stores an {@link ImplicitSubtreeMetadata} instance
- *
* @type {ImplicitSubtreeMetadata}
* @readonly
* @private
@@ -101,7 +95,6 @@ Object.defineProperties(ImplicitSubtree.prototype, {
/**
* When tile metadata is present (3D Tiles 1.1) or the 3DTILES_metadata
extension is used,
* this property stores a {@link MetadataTable} instance for the tiles in the subtree.
- *
* @type {MetadataTable}
* @readonly
* @private
@@ -116,7 +109,6 @@ Object.defineProperties(ImplicitSubtree.prototype, {
* When tile metadata is present (3D Tiles 1.1) or the 3DTILES_metadata
extension is used,
* this property stores the JSON from the extension. This is used by {@link TileMetadata}
* to get the extras and extensions for the tiles in the subtree.
- *
* @type {object}
* @readonly
* @private
@@ -130,7 +122,6 @@ Object.defineProperties(ImplicitSubtree.prototype, {
/**
* When content metadata is present (3D Tiles 1.1), this property stores
* an array of {@link MetadataTable} instances for the contents in the subtree.
- *
* @type {Array}
* @readonly
* @private
@@ -145,7 +136,6 @@ Object.defineProperties(ImplicitSubtree.prototype, {
* When content metadata is present (3D Tiles 1.1), this property
* an array of the JSONs from the extension. This is used to get the extras
* and extensions for the contents in the subtree.
- *
* @type {Array}
* @readonly
* @private
@@ -158,7 +148,6 @@ Object.defineProperties(ImplicitSubtree.prototype, {
/**
* Gets the implicit tile coordinates for the root of the subtree.
- *
* @type {ImplicitTileCoordinates}
* @readonly
* @private
@@ -172,7 +161,6 @@ Object.defineProperties(ImplicitSubtree.prototype, {
/**
* Check if a specific tile is available at an index of the tile availability bitstream
- *
* @param {number} index The index of the desired tile
* @returns {boolean} The value of the i-th bit
* @private
@@ -183,7 +171,6 @@ ImplicitSubtree.prototype.tileIsAvailableAtIndex = function (index) {
/**
* Check if a specific tile is available at an implicit tile coordinate
- *
* @param {ImplicitTileCoordinates} implicitCoordinates The global coordinates of a tile
* @returns {boolean} The value of the i-th bit
* @private
@@ -197,9 +184,8 @@ ImplicitSubtree.prototype.tileIsAvailableAtCoordinates = function (
/**
* Check if a specific tile's content is available at an index of the content availability bitstream
- *
* @param {number} index The index of the desired tile
- * @param {number} [contentIndex=0] The index of the desired content when multiple contents are used.
+ * @param {number} [contentIndex] The index of the desired content when multiple contents are used.
* @returns {boolean} The value of the i-th bit
* @private
*/
@@ -222,9 +208,8 @@ ImplicitSubtree.prototype.contentIsAvailableAtIndex = function (
/**
* Check if a specific tile's content is available at an implicit tile coordinate
- *
* @param {ImplicitTileCoordinates} implicitCoordinates The global coordinates of a tile
- * @param {number} [contentIndex=0] The index of the desired content when the 3DTILES_multiple_contents
extension is used.
+ * @param {number} [contentIndex] The index of the desired content when the 3DTILES_multiple_contents
extension is used.
* @returns {boolean} The value of the i-th bit
* @private
*/
@@ -238,7 +223,6 @@ ImplicitSubtree.prototype.contentIsAvailableAtCoordinates = function (
/**
* Check if a child subtree is available at an index of the child subtree availability bitstream
- *
* @param {number} index The index of the desired child subtree
* @returns {boolean} The value of the i-th bit
* @private
@@ -249,7 +233,6 @@ ImplicitSubtree.prototype.childSubtreeIsAvailableAtIndex = function (index) {
/**
* Check if a specific child subtree is available at an implicit tile coordinate
- *
* @param {ImplicitTileCoordinates} implicitCoordinates The global coordinates of a child subtree
* @returns {boolean} The value of the i-th bit
* @private
@@ -269,7 +252,6 @@ ImplicitSubtree.prototype.childSubtreeIsAvailableAtCoordinates = function (
* Level 1 starts at index 1
* Level 2 starts at index 5
*
- *
* @param {number} level The 0-indexed level number relative to the root of the subtree
* @returns {number} The first index at the desired level
* @private
@@ -283,8 +265,8 @@ ImplicitSubtree.prototype.getLevelOffset = function (level) {
* Get the morton index of a tile's parent. This is equivalent to
* chopping off the last 2 (quadtree) or 3 (octree) bits of the morton
* index.
- *
* @param {number} childIndex The morton index of the child tile relative to its parent
+ * @param mortonIndex
* @returns {number} The index of the child's parent node
* @private
*/
@@ -300,16 +282,14 @@ ImplicitSubtree.prototype.getParentMortonIndex = function (mortonIndex) {
/**
* Parse all relevant information out of the subtree. This fetches any
* external buffers that are used by the implicit tileset.
- *
* @param {Resource} resource The resource for this subtree. This is used for fetching external buffers as needed.
* @param {object} [json] The JSON object for this subtree. If parsing from a binary subtree file, this will be undefined.
* @param {Uint8Array} [subtreeView] The contents of the subtree binary
* @param {ImplicitTileset} implicitTileset The implicit tileset this subtree belongs to.
* @param {ImplicitTileCoordinates} implicitCoordinates The coordinates of the subtree's root tile.
- * @return {Promise} The created subtree
+ * @returns {Promise} The created subtree
* @private
- *
- * @exception {DeveloperError} One of json and subtreeView must be defined.
+ * @throws {DeveloperError} One of json and subtreeView must be defined.
*/
ImplicitSubtree.fromSubtreeJson = async function (
resource,
@@ -445,7 +425,6 @@ ImplicitSubtree.fromSubtreeJson = async function (
/**
* A helper object for storing the two parts of the subtree binary
- *
* @typedef {object} SubtreeChunks
* @property {object} json The json chunk of the subtree
* @property {Uint8Array} binary The binary chunk of the subtree. This represents the internal buffer.
@@ -454,7 +433,6 @@ ImplicitSubtree.fromSubtreeJson = async function (
/**
* Given the binary contents of a subtree, split into JSON and binary chunks
- *
* @param {Uint8Array} subtreeView The subtree binary
* @returns {SubtreeChunks} An object containing the JSON and binary chunks.
* @private
@@ -500,7 +478,6 @@ function parseSubtreeChunks(subtreeView) {
*
* Buffers are assumed inactive until explicitly marked active. This is used
* to avoid fetching unneeded buffers.
- *
* @typedef {object} BufferHeader
* @property {boolean} isExternal True if this is an external buffer
* @property {boolean} isActive Whether this buffer is currently used.
@@ -513,8 +490,7 @@ function parseSubtreeChunks(subtreeView) {
* Iterate over the list of buffers from the subtree JSON and add the
* isExternal and isActive fields for easier parsing later. This modifies
* the objects in place.
- *
- * @param {Object[]} [bufferHeaders=[]] The JSON from subtreeJson.buffers.
+ * @param {object[]} [bufferHeaders] The JSON from subtreeJson.buffers.
* @returns {BufferHeader[]} The same array of headers with additional fields.
* @private
*/
@@ -532,7 +508,6 @@ function preprocessBuffers(bufferHeaders) {
/**
* A buffer header is the JSON header from the subtree JSON chunk plus
* the isActive flag and a reference to the header for the underlying buffer
- *
* @typedef {object} BufferViewHeader
* @property {BufferHeader} bufferHeader A reference to the header for the underlying buffer
* @property {boolean} isActive Whether this bufferView is currently used.
@@ -545,8 +520,7 @@ function preprocessBuffers(bufferHeaders) {
/**
* Iterate the list of buffer views from the subtree JSON and add the
* isActive flag. Also save a reference to the bufferHeader
- *
- * @param {Object[]} [bufferViewHeaders=[]] The JSON from subtree.bufferViews
+ * @param {object[]} [bufferViewHeaders] The JSON from subtree.bufferViews
* @param {BufferHeader[]} bufferHeaders The preprocessed buffer headers
* @returns {BufferViewHeader[]} The same array of bufferView headers with additional fields
* @private
@@ -574,8 +548,7 @@ function preprocessBufferViews(bufferViewHeaders, bufferHeaders) {
*
* This function modifies the buffer view headers' isActive flags in place.
*
- *
- * @param {Object[]} subtreeJson The JSON chunk from the subtree
+ * @param {object[]} subtreeJson The JSON chunk from the subtree
* @param {BufferViewHeader[]} bufferViewHeaders The preprocessed buffer view headers
* @private
*/
@@ -631,7 +604,6 @@ function markActiveBufferViews(subtreeJson, bufferViewHeaders) {
* This always loads all of the metadata immediately. Future iterations may
* allow filtering this to avoid downloading unneeded buffers.
*
- *
* @param {object} propertyTableJson The property table JSON for either a tile or some content
* @param {BufferViewHeader[]} bufferViewHeaders The preprocessed buffer view headers
* @private
@@ -748,7 +720,6 @@ async function requestExternalBuffer(subtree, bufferHeader) {
/**
* Go through the list of buffer views, and if they are marked as active,
* extract a subarray from one of the active buffers.
- *
* @param {BufferViewHeader[]} bufferViewHeaders
* @param {object} buffersU8 A dictionary of buffer index to a Uint8Array of its contents.
* @returns {object} A dictionary of buffer view index to a Uint8Array of its contents.
@@ -774,7 +745,6 @@ function parseActiveBufferViews(bufferViewHeaders, buffersU8) {
/**
* Parse the three availability bitstreams and store them in the subtree
- *
* @param {ImplicitSubtree} subtree The subtree to modify
* @param {object} subtreeJson The subtree JSON
* @param {ImplicitTileset} implicitTileset The implicit tileset this subtree belongs to
@@ -832,7 +802,6 @@ function parseAvailability(
* Given the JSON describing an availability bitstream, turn it into an
* in-memory representation using an {@link ImplicitAvailabilityBitstream}
* object. This handles both constants and bitstreams from a bufferView.
- *
* @param {object} availabilityJson A JSON object representing the availability
* @param {object} bufferViewsU8 A dictionary of bufferView index to its Uint8Array contents.
* @param {number} lengthBits The length of the availability bitstream in bits
@@ -875,7 +844,6 @@ function parseAvailabilityBitstream(
/**
* Parse the metadata table for the tile metadata, storing a {@link MetadataTable}
* in the subtree.
- *
* @param {ImplicitSubtree} subtree The subtree
* @param {ImplicitTileset} implicitTileset The implicit tileset this subtree belongs to.
* @param {object} bufferViewsU8 A dictionary of bufferView index to its Uint8Array contents.
@@ -900,7 +868,6 @@ function parseTileMetadataTable(subtree, implicitTileset, bufferViewsU8) {
/**
* Parse the metadata tables for the content metadata, storing an array of
* {@link MetadataTable}s in the subtree.
- *
* @param {ImplicitSubtree} subtree The subtree
* @param {ImplicitTileset} implicitTileset The implicit tileset this subtree belongs to.
* @param {object} bufferViewsU8 A dictionary of bufferView index to its Uint8Array contents.
@@ -938,7 +905,6 @@ function parseContentMetadataTables(subtree, implicitTileset, bufferViewsU8) {
* For unavailable tiles and content, the jump buffer entries will be uninitialized.
* Use the tile and content availability to determine whether a jump buffer value is valid.
*
- *
* @param {ImplicitAvailabilityBitstream} availability The availability bitstream to create the jump buffer from.
* @returns {Array} The resulting jump buffer.
* @private
@@ -970,7 +936,6 @@ function makeJumpBuffer(availability) {
/**
* Make the jump buffer, i.e. a map of a bit index to the metadata entity ID,
* for the content metadata. This is stored in the subtree.
- *
* @param {ImplicitSubtree} subtree The subtree
* @private
*/
@@ -982,7 +947,6 @@ function makeTileJumpBuffer(subtree) {
/**
* Make the jump buffers, i.e. maps of bit indices to the metadata entity IDs,
* for the content metadata. This is stored in the subtree.
- *
* @param {ImplicitSubtree} subtree The subtree
* @private
*/
@@ -1000,7 +964,7 @@ function makeContentJumpBuffers(subtree) {
* Given the implicit tiling coordinates for a tile, get the index within the
* subtree's tile availability bitstream.
* @param {ImplicitTileCoordinates} implicitCoordinates The global coordinates of a tile
- * @return {number} The tile's index within the subtree.
+ * @returns {number} The tile's index within the subtree.
* @private
*/
ImplicitSubtree.prototype.getTileIndex = function (implicitCoordinates) {
@@ -1022,7 +986,7 @@ ImplicitSubtree.prototype.getTileIndex = function (implicitCoordinates) {
* Given the implicit tiling coordinates for a child subtree, get the index within the
* subtree's child subtree availability bitstream.
* @param {ImplicitTileCoordinates} implicitCoordinates The global coordinates of a child subtree
- * @return {number} The child subtree's index within the subtree's child subtree availability bitstream.
+ * @returns {number} The child subtree's index within the subtree's child subtree availability bitstream.
* @private
*/
ImplicitSubtree.prototype.getChildSubtreeIndex = function (
@@ -1049,8 +1013,7 @@ ImplicitSubtree.prototype.getChildSubtreeIndex = function (
* Get the entity ID for a tile within this subtree.
* @param {ImplicitSubtree} subtree The subtree
* @param {ImplicitTileCoordinates} implicitCoordinates The global coordinates of a tile
- * @return {number} The entity ID for this tile for accessing tile metadata, or undefined
if not applicable.
- *
+ * @returns {number} The entity ID for this tile for accessing tile metadata, or undefined
if not applicable.
* @private
*/
function getTileEntityId(subtree, implicitCoordinates) {
@@ -1071,8 +1034,7 @@ function getTileEntityId(subtree, implicitCoordinates) {
* @param {ImplicitSubtree} subtree The subtree
* @param {ImplicitTileCoordinates} implicitCoordinates The global coordinates of a content
* @param {number} contentIndex The content index, for distinguishing between multiple contents.
- * @return {number} The entity ID for this content for accessing content metadata, or undefined
if not applicable.
- *
+ * @returns {number} The entity ID for this content for accessing content metadata, or undefined
if not applicable.
* @private
*/
function getContentEntityId(subtree, implicitCoordinates, contentIndex) {
@@ -1099,8 +1061,7 @@ function getContentEntityId(subtree, implicitCoordinates, contentIndex) {
/**
* Create and return a metadata table view for a tile within this subtree.
* @param {ImplicitTileCoordinates} implicitCoordinates The global coordinates of a tile
- * @return {ImplicitMetadataView} The metadata view for this tile, or undefined
if not applicable.
- *
+ * @returns {ImplicitMetadataView} The metadata view for this tile, or undefined
if not applicable.
* @private
*/
ImplicitSubtree.prototype.getTileMetadataView = function (implicitCoordinates) {
@@ -1122,8 +1083,7 @@ ImplicitSubtree.prototype.getTileMetadataView = function (implicitCoordinates) {
* Create and return a metadata table view for a content within this subtree.
* @param {ImplicitTileCoordinates} implicitCoordinates The global coordinates of a content
* @param {number} contentIndex The index of the content used to distinguish between multiple contents
- * @return {ImplicitMetadataView} The metadata view for this content, or undefined
if not applicable.
- *
+ * @returns {ImplicitMetadataView} The metadata view for this content, or undefined
if not applicable.
* @private
*/
ImplicitSubtree.prototype.getContentMetadataView = function (
diff --git a/packages/engine/Source/Scene/ImplicitSubtreeCache.js b/packages/engine/Source/Scene/ImplicitSubtreeCache.js
index 252594d37bb8..4ab8f4f32c80 100644
--- a/packages/engine/Source/Scene/ImplicitSubtreeCache.js
+++ b/packages/engine/Source/Scene/ImplicitSubtreeCache.js
@@ -4,11 +4,9 @@ import DoubleEndedPriorityQueue from "../Core/DoubleEndedPriorityQueue.js";
/**
* @alias ImplicitSubtreeCache
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties
- * @param {number} [options.maximumSubtreeCount=0] The total number of subtrees this cache can store. If adding a new subtree would exceed this limit, the lowest priority subtrees will be removed until there is room, unless the subtree that is going to be removed is the parent of the new subtree, in which case it will not be removed and the new subtree will still be added, exceeding the memory limit.
- *
+ * @param {number} [options.maximumSubtreeCount] The total number of subtrees this cache can store. If adding a new subtree would exceed this limit, the lowest priority subtrees will be removed until there is room, unless the subtree that is going to be removed is the parent of the new subtree, in which case it will not be removed and the new subtree will still be added, exceeding the memory limit.
* @private
*/
function ImplicitSubtreeCache(options) {
@@ -112,11 +110,9 @@ ImplicitSubtreeCache.comparator = function (a, b) {
/**
* @alias ImplicitSubtreeCacheNode
- * @constructor
- *
+ * @class
* @param {ImplicitSubtree} subtree
* @param {number} stamp
- *
* @private
*/
function ImplicitSubtreeCacheNode(subtree, stamp) {
diff --git a/packages/engine/Source/Scene/ImplicitSubtreeMetadata.js b/packages/engine/Source/Scene/ImplicitSubtreeMetadata.js
index 7814babf3cbc..d3802680b17c 100644
--- a/packages/engine/Source/Scene/ImplicitSubtreeMetadata.js
+++ b/packages/engine/Source/Scene/ImplicitSubtreeMetadata.js
@@ -8,13 +8,11 @@ import MetadataEntity from "./MetadataEntity.js";
*
* See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_metadata|3DTILES_metadata Extension} for 3D Tiles
*
- *
* @param {object} options Object with the following properties:
* @param {object} options.subtreeMetadata The subtree metadata JSON object.
* @param {MetadataClass} options.class The class that subtree metadata conforms to.
- *
* @alias ImplicitSubtreeMetadata
- * @constructor
+ * @class
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -41,7 +39,6 @@ function ImplicitSubtreeMetadata(options) {
Object.defineProperties(ImplicitSubtreeMetadata.prototype, {
/**
* The class that properties conform to.
- *
* @memberof ImplicitSubtreeMetadata.prototype
* @type {MetadataClass}
* @readonly
@@ -55,7 +52,6 @@ Object.defineProperties(ImplicitSubtreeMetadata.prototype, {
/**
* Extra user-defined properties.
- *
* @memberof ImplicitSubtreeMetadata.prototype
* @type {object}
* @readonly
@@ -69,7 +65,6 @@ Object.defineProperties(ImplicitSubtreeMetadata.prototype, {
/**
* An object containing extensions.
- *
* @memberof ImplicitSubtreeMetadata.prototype
* @type {object}
* @readonly
@@ -84,7 +79,6 @@ Object.defineProperties(ImplicitSubtreeMetadata.prototype, {
/**
* Returns whether the subtree has this property.
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {boolean} Whether the subtree has this property.
* @private
@@ -95,7 +89,6 @@ ImplicitSubtreeMetadata.prototype.hasProperty = function (propertyId) {
/**
* Returns whether the subtree has a property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @returns {boolean} Whether the subtree has a property with the given semantic.
* @private
@@ -110,7 +103,6 @@ ImplicitSubtreeMetadata.prototype.hasPropertyBySemantic = function (semantic) {
/**
* Returns an array of property IDs.
- *
* @param {string[]} [results] An array into which to store the results.
* @returns {string[]} The property IDs.
* @private
@@ -124,7 +116,6 @@ ImplicitSubtreeMetadata.prototype.getPropertyIds = function (results) {
*
* If the property is normalized the normalized value is returned.
*
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {*} The value of the property or undefined
if the subtree does not have this property.
* @private
@@ -138,7 +129,6 @@ ImplicitSubtreeMetadata.prototype.getProperty = function (propertyId) {
*
* If the property is normalized a normalized value must be provided to this function.
*
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @param {*} value The value of the property that will be copied.
* @returns {boolean} true
if the property was set, false
otherwise.
@@ -155,7 +145,6 @@ ImplicitSubtreeMetadata.prototype.setProperty = function (propertyId, value) {
/**
* Returns a copy of the value of the property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @returns {*} The value of the property or undefined
if the subtree does not have this semantic.
* @private
@@ -170,7 +159,6 @@ ImplicitSubtreeMetadata.prototype.getPropertyBySemantic = function (semantic) {
/**
* Sets the value of the property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @param {*} value The value of the property that will be copied.
* @returns {boolean} true
if the property was set, false
otherwise.
diff --git a/packages/engine/Source/Scene/ImplicitTileCoordinates.js b/packages/engine/Source/Scene/ImplicitTileCoordinates.js
index efcc652fe3d4..2f3c40f4e08a 100644
--- a/packages/engine/Source/Scene/ImplicitTileCoordinates.js
+++ b/packages/engine/Source/Scene/ImplicitTileCoordinates.js
@@ -34,10 +34,8 @@ import ImplicitSubdivisionScheme from "./ImplicitSubdivisionScheme.js";
* number of levels in the subtree should be 15 for quadtree and 9 for octree (to
* account for the extra level needed by child subtree coordinates).
*
- *
* @alias ImplicitTileCoordinates
- * @constructor
- *
+ * @class
* @param {object} options An object with the following properties:
* @param {ImplicitSubdivisionScheme} options.subdivisionScheme Whether the coordinates are for a quadtree or octree
* @param {number} options.subtreeLevels The number of distinct levels within the coordinate's subtree
@@ -91,7 +89,6 @@ function ImplicitTileCoordinates(options) {
/**
* Whether the tileset is a quadtree or octree
- *
* @type {ImplicitSubdivisionScheme}
* @readonly
* @private
@@ -100,7 +97,6 @@ function ImplicitTileCoordinates(options) {
/**
* The number of distinct levels within the coordinate's subtree
- *
* @type {number}
* @readonly
* @private
@@ -111,7 +107,6 @@ function ImplicitTileCoordinates(options) {
* Level of this tile, relative to the tile with implicit tiling in its JSON
* (3D Tiles 1.1) or the 3DTILES_implicit_tiling
extension.
* Level numbers start at 0.
- *
* @type {number}
* @readonly
* @private
@@ -120,7 +115,6 @@ function ImplicitTileCoordinates(options) {
/**
* X coordinate of this tile
- *
* @type {number}
* @readonly
* @private
@@ -129,7 +123,6 @@ function ImplicitTileCoordinates(options) {
/**
* Y coordinate of this tile
- *
* @type {number}
* @readonly
* @private
@@ -138,7 +131,6 @@ function ImplicitTileCoordinates(options) {
/**
* Z coordinate of this tile. Only defined for octrees.
- *
* @type {number|undefined}
* @readonly
* @private
@@ -158,7 +150,6 @@ Object.defineProperties(ImplicitTileCoordinates.prototype, {
* This is the last 3 bits of the morton index of the tile, but it can
* be computed more directly by concatenating the bits [z0] y0 x0
*
- *
* @type {number}
* @readonly
* @private
@@ -179,7 +170,6 @@ Object.defineProperties(ImplicitTileCoordinates.prototype, {
/**
* Get the Morton index for this tile within the current level by interleaving
* the bits of the x, y and z coordinates.
- *
* @type {number}
* @readonly
* @private
@@ -195,7 +185,6 @@ Object.defineProperties(ImplicitTileCoordinates.prototype, {
/**
* Get the tile index by adding the Morton index to the level offset
- *
* @type {number}
* @readonly
* @private
@@ -232,7 +221,6 @@ function checkMatchingSubtreeShape(a, b) {
/**
* Compute the coordinates of a tile deeper in the tree with a (level, x, y, [z]) relative offset.
- *
* @param {ImplicitTileCoordinates} offsetCoordinates The offset from the ancestor
* @returns {ImplicitTileCoordinates} The coordinates of the descendant
* @private
@@ -275,7 +263,6 @@ ImplicitTileCoordinates.prototype.getDescendantCoordinates = function (
/**
* Compute the coordinates of a tile higher up in the tree by going up a number of levels.
- *
* @param {number} offsetLevels The number of levels to go up in the tree
* @returns {ImplicitTileCoordinates} The coordinates of the ancestor
* @private
@@ -323,7 +310,6 @@ ImplicitTileCoordinates.prototype.getAncestorCoordinates = function (
/**
* Compute the (level, x, y, [z]) offset to a descendant
- *
* @param {ImplicitTileCoordinates} descendantCoordinates The descendant coordinates
* @returns {ImplicitTileCoordinates} The offset between the ancestor and the descendant
*/
@@ -373,7 +359,6 @@ ImplicitTileCoordinates.prototype.getOffsetCoordinates = function (
/**
* Given the morton index of the child, compute the coordinates of the child.
* This is a special case of {@link ImplicitTileCoordinates#getDescendantCoordinates}.
- *
* @param {number} childIndex The morton index of the child tile relative to its parent
* @returns {ImplicitTileCoordinates} The tile coordinates of the child
* @private
@@ -420,7 +405,6 @@ ImplicitTileCoordinates.prototype.getChildCoordinates = function (childIndex) {
/**
* Get the coordinates of the subtree that contains this tile. If the tile is
* the root of the subtree, the root of the subtree is returned.
- *
* @returns {ImplicitTileCoordinates} The subtree that contains this tile
* @private
*/
@@ -430,7 +414,6 @@ ImplicitTileCoordinates.prototype.getSubtreeCoordinates = function () {
/**
* Get the coordinates of the parent subtree that contains this tile
- *
* @returns {ImplicitTileCoordinates} The parent subtree that contains this tile
* @private
*/
@@ -442,7 +425,6 @@ ImplicitTileCoordinates.prototype.getParentSubtreeCoordinates = function () {
/**
* Returns whether this tile is an ancestor of another tile
- *
* @param {ImplicitTileCoordinates} descendantCoordinates the descendant coordinates
* @returns {boolean} true
if this tile is an ancestor of the other tile
* @private
@@ -477,7 +459,6 @@ ImplicitTileCoordinates.prototype.isAncestor = function (
/**
* Returns whether the provided coordinates are equal to this coordinate
- *
* @param {ImplicitTileCoordinates} otherCoordinates the other coordinates
* @returns {boolean} true
if the coordinates are equal
* @private
@@ -501,7 +482,6 @@ ImplicitTileCoordinates.prototype.isEqual = function (otherCoordinates) {
/**
* Returns whether this tile is the root of the implicit tileset
- *
* @returns {boolean} true
if this tile is the root
* @private
*/
@@ -511,7 +491,6 @@ ImplicitTileCoordinates.prototype.isImplicitTilesetRoot = function () {
/**
* Returns whether this tile is the root of the subtree
- *
* @returns {boolean} true
if this tile is the root of the subtree
* @private
*/
@@ -521,7 +500,6 @@ ImplicitTileCoordinates.prototype.isSubtreeRoot = function () {
/**
* Returns whether this tile is on the last row of tiles in the subtree
- *
* @returns {boolean} true
if this tile is on the last row of tiles in the subtree
* @private
*/
@@ -531,7 +509,6 @@ ImplicitTileCoordinates.prototype.isBottomOfSubtree = function () {
/**
* Get a dictionary of values for templating into an implicit template URI.
- *
* @returns {object} An object suitable for use with {@link Resource#getDerivedResource}
* @private
*/
@@ -553,7 +530,6 @@ const scratchCoordinatesArray = [0, 0, 0];
/**
* Given a level number, morton index, and whether the tileset is an
* octree/quadtree, compute the (level, x, y, [z]) coordinates
- *
* @param {ImplicitSubdivisionScheme} subdivisionScheme Whether the coordinates are for a quadtree or octree
* @param {number} subtreeLevels The number of distinct levels within the coordinate's subtree
* @param {number} level The level of the tree
@@ -596,7 +572,6 @@ ImplicitTileCoordinates.fromMortonIndex = function (
/**
* Given a tile index and whether the tileset is an octree/quadtree, compute
* the (level, x, y, [z]) coordinates
- *
* @param {ImplicitSubdivisionScheme} subdivisionScheme Whether the coordinates are for a quadtree or octree
* @param {number} subtreeLevels The number of distinct levels within the coordinate's subtree
* @param {number} tileIndex The tile's index
diff --git a/packages/engine/Source/Scene/ImplicitTileset.js b/packages/engine/Source/Scene/ImplicitTileset.js
index ce2e1fa187ef..90bd1f58f3e2 100644
--- a/packages/engine/Source/Scene/ImplicitTileset.js
+++ b/packages/engine/Source/Scene/ImplicitTileset.js
@@ -12,10 +12,8 @@ import ImplicitSubdivisionScheme from "./ImplicitSubdivisionScheme.js";
* locating resources, details from the implicit root tile (bounding volume,
* geometricError, etc.), and details about the subtrees (e.g. subtreeLevels,
* subdivisionScheme).
- *
* @alias ImplicitTileset
- * @constructor
- *
+ * @class
* @param {Resource} baseResource The base resource for the tileset
* @param {object} tileJson The JSON header of the tile with either implicit tiling (3D Tiles 1.1) or the 3DTILES_implicit_tiling extension.
* @param {MetadataSchema} [metadataSchema] The metadata schema containing the implicit tile metadata class.
@@ -35,7 +33,6 @@ function ImplicitTileset(baseResource, tileJson, metadataSchema) {
* The base resource for the tileset. This is stored here as it is needed
* later when expanding Implicit3DTileContents so tile URLs are relative
* to the tileset, not the subtree file.
- *
* @type {Resource}
* @readonly
* @private
@@ -44,7 +41,6 @@ function ImplicitTileset(baseResource, tileJson, metadataSchema) {
/**
* The geometric error of the root tile
- *
* @type {number}
* @readonly
* @private
@@ -53,7 +49,6 @@ function ImplicitTileset(baseResource, tileJson, metadataSchema) {
/**
* The metadata schema containing the implicit tile metadata class.
- *
* @type {MetadataSchema|undefined}
* @readonly
* @private
@@ -80,7 +75,6 @@ function ImplicitTileset(baseResource, tileJson, metadataSchema) {
/**
* The JSON representation of a bounding volume. This is either a box or a
* region.
- *
* @type {object}
* @readonly
* @private
@@ -89,7 +83,6 @@ function ImplicitTileset(baseResource, tileJson, metadataSchema) {
/**
* The refine strategy as a string, either 'ADD' or 'REPLACE'
- *
* @type {string}
* @readonly
* @private
@@ -99,7 +92,6 @@ function ImplicitTileset(baseResource, tileJson, metadataSchema) {
/**
* Template URI for the subtree resources, e.g.
* https://example.com/{level}/{x}/{y}.subtree
- *
* @type {Resource}
* @readonly
* @private
@@ -113,7 +105,6 @@ function ImplicitTileset(baseResource, tileJson, metadataSchema) {
*
* This is an array to support multiple contents.
*
- *
* @type {Resource[]}
* @readonly
* @private
@@ -127,8 +118,7 @@ function ImplicitTileset(baseResource, tileJson, metadataSchema) {
*
* This is an array to support multiple contents.
*
- *
- * @type {Object[]}
+ * @type {object[]}
* @readonly
* @private
*/
@@ -145,7 +135,6 @@ function ImplicitTileset(baseResource, tileJson, metadataSchema) {
/**
* The maximum number of contents as well as content availability bitstreams.
* This is used for loop bounds when checking content availability.
- *
* @type {number}
* @readonly
* @private
@@ -164,7 +153,6 @@ function ImplicitTileset(baseResource, tileJson, metadataSchema) {
* tile.content
, if used instead of tile.contents
* tile.extensions["3DTILES_multiple_contents"]
, if used instead of tile.contents or tile.content
*
- *
* @type {object}
* @readonly
* @private
@@ -173,7 +161,6 @@ function ImplicitTileset(baseResource, tileJson, metadataSchema) {
/**
* The subdivision scheme for this implicit tileset; either OCTREE or QUADTREE
- *
* @type {ImplicitSubdivisionScheme}
* @readonly
* @private
@@ -184,7 +171,6 @@ function ImplicitTileset(baseResource, tileJson, metadataSchema) {
/**
* The branching factor for this tileset. Either 4 for quadtrees or 8 for
* octrees.
- *
* @type {number}
* @readonly
* @private
@@ -196,7 +182,6 @@ function ImplicitTileset(baseResource, tileJson, metadataSchema) {
/**
* How many distinct levels within each subtree. For example, a quadtree
* with subtreeLevels = 2 will have 5 nodes per quadtree (1 root + 4 children)
- *
* @type {number}
* @readonly
* @private
@@ -205,7 +190,6 @@ function ImplicitTileset(baseResource, tileJson, metadataSchema) {
/**
* The number of levels containing available tiles in the tileset.
- *
* @type {number}
* @readonly
* @private
@@ -221,9 +205,8 @@ function ImplicitTileset(baseResource, tileJson, metadataSchema) {
* Gather JSON headers for all contents in the tile.
* This handles both regular tiles and tiles with multiple contents, either
* in the contents array (3D Tiles 1.1) or the `3DTILES_multiple_contents` extension
- *
* @param {object} tileJson The JSON header of the tile with either implicit tiling (3D Tiles 1.1) or the 3DTILES_implicit_tiling extension.
- * @return {Object[]} An array of JSON headers for the contents of each tile
+ * @returns {object[]} An array of JSON headers for the contents of each tile
* @private
*/
function gatherContentHeaders(tileJson) {
diff --git a/packages/engine/Source/Scene/InstanceAttributeSemantic.js b/packages/engine/Source/Scene/InstanceAttributeSemantic.js
index 09b4348ae52b..53f73471fe18 100644
--- a/packages/engine/Source/Scene/InstanceAttributeSemantic.js
+++ b/packages/engine/Source/Scene/InstanceAttributeSemantic.js
@@ -2,15 +2,12 @@ import Check from "../Core/Check.js";
/**
* An enum describing the built-in instance attribute semantics.
- *
* @enum {string}
- *
* @private
*/
const InstanceAttributeSemantic = {
/**
* Per-instance translation.
- *
* @type {string}
* @constant
*/
@@ -18,7 +15,6 @@ const InstanceAttributeSemantic = {
/**
* Per-instance rotation.
- *
* @type {string}
* @constant
*/
@@ -26,7 +22,6 @@ const InstanceAttributeSemantic = {
/**
* Per-instance scale.
- *
* @type {string}
* @constant
*/
@@ -34,7 +29,6 @@ const InstanceAttributeSemantic = {
/**
* Per-instance feature ID.
- *
* @type {string}
* @constant
*/
@@ -43,9 +37,8 @@ const InstanceAttributeSemantic = {
/**
* Gets the instance attribute semantic matching the glTF attribute semantic.
- *
+ * @param gltfSemantic
* @returns {InstanceAttributeSemantic} The instance attribute semantic, or undefined if there is no match.
- *
* @private
*/
InstanceAttributeSemantic.fromGltfSemantic = function (gltfSemantic) {
diff --git a/packages/engine/Source/Scene/IonImageryProvider.js b/packages/engine/Source/Scene/IonImageryProvider.js
index 5b1361bb734e..0157baa68d3f 100644
--- a/packages/engine/Source/Scene/IonImageryProvider.js
+++ b/packages/engine/Source/Scene/IonImageryProvider.js
@@ -58,7 +58,6 @@ const ImageryProviderAsyncMapping = {
* @typedef {object} IonImageryProvider.ConstructorOptions
*
* Initialization options for the TileMapServiceImageryProvider constructor
- *
* @property {string} [accessToken=Ion.defaultAccessToken] The access token to use.
* @property {string|Resource} [server=Ion.defaultServer] The resource to the Cesium ion API server.
*/
@@ -69,16 +68,12 @@ const ImageryProviderAsyncMapping = {
*
*
* Provides tiled imagery using the Cesium ion REST API.
- *
* @alias IonImageryProvider
- * @constructor
- *
+ * @class
* @param {IonImageryProvider.ConstructorOptions} [options] Object describing initialization options
- *
* @example
* const imageryLayer = Cesium.ImageryLayer.fromProviderAsync(Cesium.IonImageryProvider.fromAssetId(3812));
* viewer.imageryLayers.add(imageryLayer);
- *
* @see IonImageryProvider.fromAssetId
*/
function IonImageryProvider(options) {
@@ -249,17 +244,14 @@ Object.defineProperties(IonImageryProvider.prototype, {
/**
* Creates a provider for tiled imagery using the Cesium ion REST API.
- *
- * @param {Number} assetId An ion imagery asset ID.
+ * @param {number} assetId An ion imagery asset ID.
* @param {IonImageryProvider.ConstructorOptions} [options] Object describing initialization options.
* @returns {Promise} A promise which resolves to the created IonImageryProvider.
- *
* @example
* const imageryLayer = Cesium.ImageryLayer.fromProviderAsync(Cesium.IonImageryProvider.fromAssetId(3812));
* viewer.imageryLayers.add(imageryLayer);
- *
- * @exception {RuntimeError} Cesium ion assetId is not an imagery asset
- * @exception {RuntimeError} Unrecognized Cesium ion imagery type
+ * @throws {RuntimeError} Cesium ion assetId is not an imagery asset
+ * @throws {RuntimeError} Unrecognized Cesium ion imagery type
*/
IonImageryProvider.fromAssetId = async function (assetId, options) {
//>>includeStart('debug', pragmas.debug);
@@ -333,7 +325,6 @@ IonImageryProvider.fromAssetId = async function (assetId, options) {
/**
* Gets the credits to be displayed when a given tile is displayed.
* @function
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level;
@@ -351,7 +342,6 @@ IonImageryProvider.prototype.getTileCredits = function (x, y, level) {
/**
* Requests the image for a given tile.
* @function
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
@@ -366,15 +356,13 @@ IonImageryProvider.prototype.requestImage = function (x, y, level, request) {
/**
* Asynchronously determines what features, if any, are located at a given longitude and latitude within
* a tile. This function is optional, so it may not exist on all ImageryProviders.
- *
* @function
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
* @param {number} longitude The longitude at which to pick features.
* @param {number} latitude The latitude at which to pick features.
- * @return {Promise|undefined} A promise for the picked features that will resolve when the asynchronous
+ * @returns {Promise|undefined} A promise for the picked features that will resolve when the asynchronous
* picking completes. The resolved value is an array of {@link ImageryLayerFeatureInfo}
* instances. The array may be empty if no features are found at the given location.
* It may also be undefined if picking is not supported.
diff --git a/packages/engine/Source/Scene/IonWorldImageryStyle.js b/packages/engine/Source/Scene/IonWorldImageryStyle.js
index a1a320492c6e..89f987f991a2 100644
--- a/packages/engine/Source/Scene/IonWorldImageryStyle.js
+++ b/packages/engine/Source/Scene/IonWorldImageryStyle.js
@@ -2,13 +2,11 @@
/**
* The types of imagery provided by {@link createWorldImagery}.
- *
* @enum {number}
*/
const IonWorldImageryStyle = {
/**
* Aerial imagery.
- *
* @type {number}
* @constant
*/
@@ -16,7 +14,6 @@ const IonWorldImageryStyle = {
/**
* Aerial imagery with a road overlay.
- *
* @type {number}
* @constant
*/
@@ -24,7 +21,6 @@ const IonWorldImageryStyle = {
/**
* Roads without additional imagery.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Scene/JobScheduler.js b/packages/engine/Source/Scene/JobScheduler.js
index 210b48ecbfd7..e8bc42983d9a 100644
--- a/packages/engine/Source/Scene/JobScheduler.js
+++ b/packages/engine/Source/Scene/JobScheduler.js
@@ -5,8 +5,9 @@ import JobType from "./JobType.js";
/**
*
+ * @param total
* @private
- * @constructor
+ * @class
*/
function JobTypeBudget(total) {
/**
@@ -48,20 +49,20 @@ Object.defineProperties(JobTypeBudget.prototype, {
/**
* Engine for time slicing jobs during a frame to amortize work over multiple frames. This supports:
*
- *
- * Separate budgets for different job types, e.g., texture, shader program, and buffer creation. This
- * allows all job types to make progress each frame.
- *
- *
- * Stealing from other jobs type budgets if they were not exhausted in the previous frame. This allows
- * using the entire budget for all job types each frame even if, for example, all the jobs are the same type.
- *
- *
- * Guaranteed progress on all job types each frame, even if it means exceeding the total budget for the frame.
- * This prevents, for example, several expensive texture uploads over many frames from prevent a shader compile.
- *
+ *
+ * Separate budgets for different job types, e.g., texture, shader program, and buffer creation. This
+ * allows all job types to make progress each frame.
+ *
+ *
+ * Stealing from other jobs type budgets if they were not exhausted in the previous frame. This allows
+ * using the entire budget for all job types each frame even if, for example, all the jobs are the same type.
+ *
+ *
+ * Guaranteed progress on all job types each frame, even if it means exceeding the total budget for the frame.
+ * This prevents, for example, several expensive texture uploads over many frames from prevent a shader compile.
+ *
*
- *
+ * @param budgets
* @private
*/
function JobScheduler(budgets) {
diff --git a/packages/engine/Source/Scene/JsonMetadataTable.js b/packages/engine/Source/Scene/JsonMetadataTable.js
index ff6d963f9886..d500f986a59c 100644
--- a/packages/engine/Source/Scene/JsonMetadataTable.js
+++ b/packages/engine/Source/Scene/JsonMetadataTable.js
@@ -6,13 +6,11 @@ import MetadataEntity from "./MetadataEntity.js";
/**
* A table for storing free-form JSON metadata, as in the 3D Tiles batch table.
- *
* @param {object} options Object with the following properties:
* @param {number} options.count The number of entities in the table.
* @param {Object} options.properties The JSON representation of the metadata table. All the arrays must have exactly options.count elements.
- *
* @alias JsonMetadataTable
- * @constructor
+ * @class
* @private
*/
@@ -32,7 +30,6 @@ function JsonMetadataTable(options) {
/**
* Returns whether the table has this property.
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {boolean} Whether the table has this property.
* @private
@@ -43,7 +40,6 @@ JsonMetadataTable.prototype.hasProperty = function (propertyId) {
/**
* Returns an array of property IDs.
- *
* @param {string[]} [results] An array into which to store the results.
* @returns {string[]} The property IDs.
* @private
@@ -54,12 +50,10 @@ JsonMetadataTable.prototype.getPropertyIds = function (results) {
/**
* Returns a copy of the value of the property with the given ID.
- *
* @param {number} index The index of the entity.
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {*} The value of the property or undefined
if the entity does not have this property.
- *
- * @exception {DeveloperError} index is out of bounds
+ * @throws {DeveloperError} index is out of bounds
* @private
*/
JsonMetadataTable.prototype.getProperty = function (index, propertyId) {
@@ -83,12 +77,10 @@ JsonMetadataTable.prototype.getProperty = function (index, propertyId) {
/**
* Sets the value of the property with the given ID. If the property did not
* exist, it will be created.
- *
* @param {number} index The index of the entity.
* @param {string} propertyId The case-sensitive ID of the property.
* @param {*} value The value of the property that will be copied.
- *
- * @exception {DeveloperError} index is out of bounds
+ * @throws {DeveloperError} index is out of bounds
* @private
*/
JsonMetadataTable.prototype.setProperty = function (index, propertyId, value) {
diff --git a/packages/engine/Source/Scene/KeyframeNode.js b/packages/engine/Source/Scene/KeyframeNode.js
index 43071b8a9d0a..b842e697a3c8 100644
--- a/packages/engine/Source/Scene/KeyframeNode.js
+++ b/packages/engine/Source/Scene/KeyframeNode.js
@@ -9,11 +9,9 @@ const LoadState = Object.freeze({
/**
* @alias KeyframeNode
- * @constructor
- *
+ * @class
* @param {SpatialNode} spatialNode
* @param {number} keyframe
- *
* @private
*/
function KeyframeNode(spatialNode, keyframe) {
diff --git a/packages/engine/Source/Scene/Label.js b/packages/engine/Source/Scene/Label.js
index bc10b50510ff..c851d8e971c3 100644
--- a/packages/engine/Source/Scene/Label.js
+++ b/packages/engine/Source/Scene/Label.js
@@ -89,7 +89,6 @@ function parseFont(label) {
* @typedef {object} Label.ConstructorOptions
*
* Initialization options for the Label constructor
- *
* @property {Cartesian3} position The cartesian position of the label.
* @property {*} [id] A user-defined object to return when the label is picked with {@link Scene#pick}.
* @property {boolean} [show=true] Determines if this label will be shown.
@@ -119,21 +118,16 @@ function parseFont(label) {
*
* Create labels by calling {@link LabelCollection#add}. Do not call the constructor directly.
*
- *
* @alias Label
* @internalConstructor
* @class
- *
* @param {Label.ConstructorOptions} options Object describing initialization options
* @param {LabelCollection} labelCollection Instance of LabelCollection
- *
- * @exception {DeveloperError} translucencyByDistance.far must be greater than translucencyByDistance.near
- * @exception {DeveloperError} pixelOffsetScaleByDistance.far must be greater than pixelOffsetScaleByDistance.near
- * @exception {DeveloperError} distanceDisplayCondition.far must be greater than distanceDisplayCondition.near
- *
+ * @throws {DeveloperError} translucencyByDistance.far must be greater than translucencyByDistance.near
+ * @throws {DeveloperError} pixelOffsetScaleByDistance.far must be greater than pixelOffsetScaleByDistance.near
+ * @throws {DeveloperError} distanceDisplayCondition.far must be greater than distanceDisplayCondition.near
* @see LabelCollection
* @see LabelCollection#add
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Labels.html|Cesium Sandcastle Labels Demo}
*/
function Label(options, labelCollection) {
@@ -672,14 +666,12 @@ Object.defineProperties(Label.prototype, {
* translucencyByDistance will be disabled.
* @memberof Label.prototype
* @type {NearFarScalar}
- *
* @example
* // Example 1.
* // Set a label's translucencyByDistance to 1.0 when the
* // camera is 1500 meters from the label and disappear as
* // the camera distance approaches 8.0e6 meters.
* text.translucencyByDistance = new Cesium.NearFarScalar(1.5e2, 1.0, 8.0e6, 0.0);
- *
* @example
* // Example 2.
* // disable translucency by distance
@@ -729,7 +721,6 @@ Object.defineProperties(Label.prototype, {
* pixelOffsetScaleByDistance will be disabled.
* @memberof Label.prototype
* @type {NearFarScalar}
- *
* @example
* // Example 1.
* // Set a label's pixel offset scale to 0.0 when the
@@ -737,7 +728,6 @@ Object.defineProperties(Label.prototype, {
* // in the y direction the camera distance approaches 8.0e6 meters.
* text.pixelOffset = new Cesium.Cartesian2(0.0, 1.0);
* text.pixelOffsetScaleByDistance = new Cesium.NearFarScalar(1.5e2, 0.0, 8.0e6, 10.0);
- *
* @example
* // Example 2.
* // disable pixel offset by distance
@@ -787,14 +777,12 @@ Object.defineProperties(Label.prototype, {
* scaleByDistance will be disabled.
* @memberof Label.prototype
* @type {NearFarScalar}
- *
* @example
* // Example 1.
* // Set a label's scaleByDistance to scale by 1.5 when the
* // camera is 1500 meters from the label and disappear as
* // the camera distance approaches 8.0e6 meters.
* label.scaleByDistance = new Cesium.NearFarScalar(1.5e2, 1.5, 8.0e6, 0.0);
- *
* @example
* // Example 2.
* // disable scaling by distance
@@ -1212,15 +1200,11 @@ Label.prototype._updateClamping = function () {
* Computes the screen-space position of the label's origin, taking into account eye and pixel offsets.
* The screen space origin is the top, left corner of the canvas; x
increases from
* left to right, and y
increases from top to bottom.
- *
* @param {Scene} scene The scene the label is in.
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The screen-space position of the label.
- *
- *
* @example
* console.log(l.computeScreenSpacePosition(scene).toString());
- *
* @see Label#eyeOffset
* @see Label#pixelOffset
*/
@@ -1258,7 +1242,6 @@ Label.prototype.computeScreenSpacePosition = function (scene, result) {
* @param {Cartesian2} screenSpacePosition The screen space center of the label.
* @param {BoundingRectangle} [result] The object onto which to store the result.
* @returns {BoundingRectangle} The screen space bounding box.
- *
* @private
*/
Label.getScreenSpaceBoundingBox = function (
@@ -1349,7 +1332,6 @@ Label.getScreenSpaceBoundingBox = function (
/**
* Determines if this label equals another label. Labels are equal if all their properties
* are equal. Labels in different collections can be equal.
- *
* @param {Label} other The label to compare for equality.
* @returns {boolean} true
if the labels are equal; otherwise, false
.
*/
@@ -1397,7 +1379,6 @@ Label.prototype.equals = function (other) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
*/
Label.prototype.isDestroyed = function () {
@@ -1409,7 +1390,6 @@ Label.prototype.isDestroyed = function () {
* @memberof Label
* @type {boolean}
* @default false
- *
* @example
* // Example 1.
* // Set a label's rightToLeft before init
@@ -1420,7 +1400,6 @@ Label.prototype.isDestroyed = function () {
* text: 'זה טקסט בעברית \n ועכשיו יורדים שורה',
* }
* });
- *
* @example
* // Example 2.
* const myLabelEntity = viewer.entities.add({
diff --git a/packages/engine/Source/Scene/LabelCollection.js b/packages/engine/Source/Scene/LabelCollection.js
index 1a723f3cf454..92a67ded3ab1 100644
--- a/packages/engine/Source/Scene/LabelCollection.js
+++ b/packages/engine/Source/Scene/LabelCollection.js
@@ -555,31 +555,25 @@ function destroyLabel(labelCollection, label) {
*
* Labels are added and removed from the collection using {@link LabelCollection#add}
* and {@link LabelCollection#remove}.
- *
* @alias LabelCollection
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The 4x4 transformation matrix that transforms each label from model to world coordinates.
- * @param {boolean} [options.debugShowBoundingVolume=false] For debugging only. Determines if this primitive's commands' bounding spheres are shown.
+ * @param {Matrix4} [options.modelMatrix] The 4x4 transformation matrix that transforms each label from model to world coordinates.
+ * @param {boolean} [options.debugShowBoundingVolume] For debugging only. Determines if this primitive's commands' bounding spheres are shown.
* @param {Scene} [options.scene] Must be passed in for labels that use the height reference property or will be depth tested against the globe.
- * @param {BlendOption} [options.blendOption=BlendOption.OPAQUE_AND_TRANSLUCENT] The label blending option. The default
+ * @param {BlendOption} [options.blendOption] The label blending option. The default
* is used for rendering both opaque and translucent labels. However, if either all of the labels are completely opaque or all are completely translucent,
* setting the technique to BlendOption.OPAQUE or BlendOption.TRANSLUCENT can improve performance by up to 2x.
- * @param {boolean} [options.show=true] Determines if the labels in the collection will be shown.
- *
+ * @param {boolean} [options.show] Determines if the labels in the collection will be shown.
* @performance For best performance, prefer a few collections, each with many labels, to
* many collections with only a few labels each. Avoid having collections where some
* labels change every frame and others do not; instead, create one or more collections
* for static labels, and one or more collections for dynamic labels.
- *
* @see LabelCollection#add
* @see LabelCollection#remove
* @see Label
* @see BillboardCollection
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Labels.html|Cesium Sandcastle Labels Demo}
- *
* @example
* // Create a label collection with two labels
* const labels = scene.primitives.add(new Cesium.LabelCollection());
@@ -623,7 +617,6 @@ function LabelCollection(options) {
/**
* Determines if labels in this collection will be shown.
- *
* @type {boolean}
* @default true
*/
@@ -634,10 +627,8 @@ function LabelCollection(options) {
* When this is the identity matrix, the labels are drawn in world coordinates, i.e., Earth's WGS84 coordinates.
* Local reference frames can be used by providing a different transformation matrix, like that returned
* by {@link Transforms.eastNorthUpToFixedFrame}.
- *
* @type Matrix4
* @default {@link Matrix4.IDENTITY}
- *
* @example
* const center = Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883);
* labels.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center);
@@ -667,9 +658,7 @@ function LabelCollection(options) {
*
* Draws the bounding sphere for each draw command in the primitive.
*
- *
* @type {boolean}
- *
* @default false
*/
this.debugShowBoundingVolume = defaultValue(
@@ -709,18 +698,13 @@ Object.defineProperties(LabelCollection.prototype, {
/**
* Creates and adds a label with the specified initial properties to the collection.
* The added label is returned so it can be modified or removed from the collection later.
- *
* @param {Label.ConstructorOptions} [options] A template describing the label's properties as shown in Example 1.
* @returns {Label} The label that was added to the collection.
- *
* @performance Calling add
is expected constant time. However, the collection's vertex buffer
* is rewritten; this operations is O(n)
and also incurs
* CPU to GPU overhead. For best performance, add as many billboards as possible before
* calling update
.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* // Example 1: Add a label, specifying all the default values.
* const l = labels.add({
@@ -745,7 +729,6 @@ Object.defineProperties(LabelCollection.prototype, {
* heightReference : HeightReference.NONE,
* distanceDisplayCondition : undefined
* });
- *
* @example
* // Example 2: Specify only the label's cartographic position,
* // text, and font.
@@ -754,8 +737,6 @@ Object.defineProperties(LabelCollection.prototype, {
* text : 'Hello World',
* font : '24px Helvetica',
* });
- *
- *
* @see LabelCollection#remove
* @see LabelCollection#removeAll
*/
@@ -770,23 +751,17 @@ LabelCollection.prototype.add = function (options) {
/**
* Removes a label from the collection. Once removed, a label is no longer usable.
- *
* @param {Label} label The label to remove.
* @returns {boolean} true
if the label was removed; false
if the label was not found in the collection.
- *
* @performance Calling remove
is expected constant time. However, the collection's vertex buffer
* is rewritten - an O(n)
operation that also incurs CPU to GPU overhead. For
* best performance, remove as many labels as possible before calling update
.
* If you intend to temporarily hide a label, it is usually more efficient to call
* {@link Label#show} instead of removing and re-adding the label.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* const l = labels.add(...);
* labels.remove(l); // Returns true
- *
* @see LabelCollection#add
* @see LabelCollection#removeAll
* @see Label#show
@@ -805,18 +780,13 @@ LabelCollection.prototype.remove = function (label) {
/**
* Removes all labels from the collection.
- *
* @performance O(n)
. It is more efficient to remove all the labels
* from a collection and then add new ones than to create a new collection entirely.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* labels.add(...);
* labels.add(...);
* labels.removeAll();
- *
* @see LabelCollection#add
* @see LabelCollection#remove
*/
@@ -832,12 +802,9 @@ LabelCollection.prototype.removeAll = function () {
/**
* Check whether this collection contains a given label.
- *
* @param {Label} label The label to check for.
* @returns {boolean} true if this collection contains the label, false otherwise.
- *
* @see LabelCollection#get
- *
*/
LabelCollection.prototype.contains = function (label) {
return defined(label) && label._labelCollection === this;
@@ -849,18 +816,12 @@ LabelCollection.prototype.contains = function (label) {
* it to the left, changing their indices. This function is commonly used with
* {@link LabelCollection#length} to iterate over all the labels
* in the collection.
- *
* @param {number} index The zero-based index of the billboard.
- *
* @returns {Label} The label at the specified index.
- *
* @performance Expected constant time. If labels were removed from the collection and
* {@link Scene#render} was not called, an implicit O(n)
* operation is performed.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* // Toggle the show property of every label in the collection
* const len = labels.length;
@@ -868,7 +829,6 @@ LabelCollection.prototype.contains = function (label) {
* const l = billboards.get(i);
* l.show = !l.show;
* }
- *
* @see LabelCollection#length
*/
LabelCollection.prototype.get = function (index) {
@@ -882,8 +842,8 @@ LabelCollection.prototype.get = function (index) {
};
/**
+ * @param frameState
* @private
- *
*/
LabelCollection.prototype.update = function (frameState) {
if (!this.show) {
@@ -961,9 +921,7 @@ LabelCollection.prototype.update = function (frameState) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
- *
* @see LabelCollection#destroy
*/
LabelCollection.prototype.isDestroyed = function () {
@@ -977,13 +935,9 @@ LabelCollection.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* labels = labels && labels.destroy();
- *
* @see LabelCollection#isDestroyed
*/
LabelCollection.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/LabelStyle.js b/packages/engine/Source/Scene/LabelStyle.js
index 2b318cd730ba..df06699f030f 100644
--- a/packages/engine/Source/Scene/LabelStyle.js
+++ b/packages/engine/Source/Scene/LabelStyle.js
@@ -1,14 +1,11 @@
/**
* Describes how to draw a label.
- *
* @enum {number}
- *
* @see Label#style
*/
const LabelStyle = {
/**
* Fill the text of the label, but do not outline.
- *
* @type {number}
* @constant
*/
@@ -16,7 +13,6 @@ const LabelStyle = {
/**
* Outline the text of the label, but do not fill.
- *
* @type {number}
* @constant
*/
@@ -24,7 +20,6 @@ const LabelStyle = {
/**
* Fill and outline the text of the label.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Scene/Light.js b/packages/engine/Source/Scene/Light.js
index 1fd3ac0616da..782fc54bc0ad 100644
--- a/packages/engine/Source/Scene/Light.js
+++ b/packages/engine/Source/Scene/Light.js
@@ -2,10 +2,8 @@ import DeveloperError from "../Core/DeveloperError.js";
/**
* A light source. This type describes an interface and is not intended to be instantiated directly. Together, color
and intensity
produce a high-dynamic-range light color. intensity
can also be used individually to dim or brighten the light without changing the hue.
- *
* @alias Light
- * @constructor
- *
+ * @class
* @see DirectionalLight
* @see SunLight
*/
diff --git a/packages/engine/Source/Scene/MapMode2D.js b/packages/engine/Source/Scene/MapMode2D.js
index 34830f23b835..41b7ca76dde5 100644
--- a/packages/engine/Source/Scene/MapMode2D.js
+++ b/packages/engine/Source/Scene/MapMode2D.js
@@ -1,12 +1,10 @@
/**
* Describes how the map will operate in 2D.
- *
* @enum {number}
*/
const MapMode2D = {
/**
* The 2D map can be rotated about the z axis.
- *
* @type {number}
* @constant
*/
@@ -14,7 +12,6 @@ const MapMode2D = {
/**
* The 2D map can be scrolled infinitely in the horizontal direction.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Scene/MapboxImageryProvider.js b/packages/engine/Source/Scene/MapboxImageryProvider.js
index 2c5a943bd52a..852bf1fa245a 100644
--- a/packages/engine/Source/Scene/MapboxImageryProvider.js
+++ b/packages/engine/Source/Scene/MapboxImageryProvider.js
@@ -14,7 +14,6 @@ const defaultCredit = new Credit(
* @typedef {object} MapboxImageryProvider.ConstructorOptions
*
* Initialization options for the MapboxImageryProvider constructor
- *
* @property {string} [url='https://api.mapbox.com/v4/'] The Mapbox server url.
* @property {string} mapId The Mapbox Map ID.
* @property {string} accessToken The public access token for the imagery.
@@ -30,19 +29,15 @@ const defaultCredit = new Credit(
/**
* Provides tiled imagery hosted by Mapbox.
- *
* @alias MapboxImageryProvider
- * @constructor
- *
+ * @class
* @param {MapboxImageryProvider.ConstructorOptions} options Object describing initialization options
- *
* @example
* // Mapbox tile provider
* const mapbox = new Cesium.MapboxImageryProvider({
* mapId: 'mapbox.mapbox-terrain-v2',
* accessToken: 'thisIsMyAccessToken'
* });
- *
* @see {@link https://docs.mapbox.com/api/maps/raster-tiles/}
* @see {@link https://docs.mapbox.com/api/accounts/tokens/}
*/
@@ -279,7 +274,6 @@ Object.defineProperties(MapboxImageryProvider.prototype, {
/**
* Gets the credits to be displayed when a given tile is displayed.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level;
@@ -291,7 +285,6 @@ MapboxImageryProvider.prototype.getTileCredits = function (x, y, level) {
/**
* Requests the image for a given tile.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
@@ -306,13 +299,12 @@ MapboxImageryProvider.prototype.requestImage = function (x, y, level, request) {
/**
* Asynchronously determines what features, if any, are located at a given longitude and latitude within
* a tile. This function is optional, so it may not exist on all ImageryProviders.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
* @param {number} longitude The longitude at which to pick features.
* @param {number} latitude The latitude at which to pick features.
- * @return {Promise|undefined} A promise for the picked features that will resolve when the asynchronous
+ * @returns {Promise|undefined} A promise for the picked features that will resolve when the asynchronous
* picking completes. The resolved value is an array of {@link ImageryLayerFeatureInfo}
* instances. The array may be empty if no features are found at the given location.
* It may also be undefined if picking is not supported.
diff --git a/packages/engine/Source/Scene/MapboxStyleImageryProvider.js b/packages/engine/Source/Scene/MapboxStyleImageryProvider.js
index ef418dc7369a..39cd9e96698a 100644
--- a/packages/engine/Source/Scene/MapboxStyleImageryProvider.js
+++ b/packages/engine/Source/Scene/MapboxStyleImageryProvider.js
@@ -14,7 +14,6 @@ const defaultCredit = new Credit(
* @typedef {object} MapboxStyleImageryProvider.ConstructorOptions
*
* Initialization options for the MapboxStyleImageryProvider constructor
- *
* @property {Resource|string} [url='https://api.mapbox.com/styles/v1/'] The Mapbox server url.
* @property {string} [username='mapbox'] The username of the map account.
* @property {string} styleId The Mapbox Style ID.
@@ -32,19 +31,15 @@ const defaultCredit = new Credit(
/**
* Provides tiled imagery hosted by Mapbox.
- *
* @alias MapboxStyleImageryProvider
- * @constructor
- *
+ * @class
* @param {MapboxStyleImageryProvider.ConstructorOptions} options Object describing initialization options
- *
* @example
* // Mapbox style provider
* const mapbox = new Cesium.MapboxStyleImageryProvider({
* styleId: 'streets-v11',
* accessToken: 'thisIsMyAccessToken'
* });
- *
* @see {@link https://docs.mapbox.com/api/maps/#styles}
* @see {@link https://docs.mapbox.com/api/#access-tokens-and-token-scopes}
*/
@@ -283,7 +278,6 @@ Object.defineProperties(MapboxStyleImageryProvider.prototype, {
/**
* Gets the credits to be displayed when a given tile is displayed.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level;
@@ -295,7 +289,6 @@ MapboxStyleImageryProvider.prototype.getTileCredits = function (x, y, level) {
/**
* Requests the image for a given tile.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
@@ -315,14 +308,12 @@ MapboxStyleImageryProvider.prototype.requestImage = function (
/**
* Asynchronously determines what features, if any, are located at a given longitude and latitude within
* a tile. This function is optional, so it may not exist on all ImageryProviders.
- *
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
* @param {number} longitude The longitude at which to pick features.
* @param {number} latitude The latitude at which to pick features.
- * @return {Promise|undefined} A promise for the picked features that will resolve when the asynchronous
+ * @returns {Promise|undefined} A promise for the picked features that will resolve when the asynchronous
* picking completes. The resolved value is an array of {@link ImageryLayerFeatureInfo}
* instances. The array may be empty if no features are found at the given location.
* It may also be undefined if picking is not supported.
diff --git a/packages/engine/Source/Scene/Material.js b/packages/engine/Source/Scene/Material.js
index 53d4155dcc2d..3e26594a03a7 100644
--- a/packages/engine/Source/Scene/Material.js
+++ b/packages/engine/Source/Scene/Material.js
@@ -44,200 +44,197 @@ import WaterMaterial from "../Shaders/Materials/Water.js";
* for more details on Fabric.
*
*
*
* Base material types and their uniforms:
*
*
- * Color
- *
- * color
: rgba color object.
- *
- * Image
- *
- * image
: path to image.
- * repeat
: Object with x and y values specifying the number of times to repeat the image.
- *
- * DiffuseMap
- *
- * image
: path to image.
- * channels
: Three character string containing any combination of r, g, b, and a for selecting the desired image channels.
- * repeat
: Object with x and y values specifying the number of times to repeat the image.
- *
- * AlphaMap
- *
- * image
: path to image.
- * channel
: One character string containing r, g, b, or a for selecting the desired image channel.
- * repeat
: Object with x and y values specifying the number of times to repeat the image.
- *
- * SpecularMap
- *
- * image
: path to image.
- * channel
: One character string containing r, g, b, or a for selecting the desired image channel.
- * repeat
: Object with x and y values specifying the number of times to repeat the image.
- *
- * EmissionMap
- *
- * image
: path to image.
- * channels
: Three character string containing any combination of r, g, b, and a for selecting the desired image channels.
- * repeat
: Object with x and y values specifying the number of times to repeat the image.
- *
- * BumpMap
- *
- * image
: path to image.
- * channel
: One character string containing r, g, b, or a for selecting the desired image channel.
- * repeat
: Object with x and y values specifying the number of times to repeat the image.
- * strength
: Bump strength value between 0.0 and 1.0 where 0.0 is small bumps and 1.0 is large bumps.
- *
- * NormalMap
- *
- * image
: path to image.
- * channels
: Three character string containing any combination of r, g, b, and a for selecting the desired image channels.
- * repeat
: Object with x and y values specifying the number of times to repeat the image.
- * strength
: Bump strength value between 0.0 and 1.0 where 0.0 is small bumps and 1.0 is large bumps.
- *
- * Grid
- *
- * color
: rgba color object for the whole material.
- * cellAlpha
: Alpha value for the cells between grid lines. This will be combined with color.alpha.
- * lineCount
: Object with x and y values specifying the number of columns and rows respectively.
- * lineThickness
: Object with x and y values specifying the thickness of grid lines (in pixels where available).
- * lineOffset
: Object with x and y values specifying the offset of grid lines (range is 0 to 1).
- *
- * Stripe
- *
- * horizontal
: Boolean that determines if the stripes are horizontal or vertical.
- * evenColor
: rgba color object for the stripe's first color.
- * oddColor
: rgba color object for the stripe's second color.
- * offset
: Number that controls at which point into the pattern to begin drawing; with 0.0 being the beginning of the even color, 1.0 the beginning of the odd color, 2.0 being the even color again, and any multiple or fractional values being in between.
- * repeat
: Number that controls the total number of stripes, half light and half dark.
- *
- * Checkerboard
- *
- * lightColor
: rgba color object for the checkerboard's light alternating color.
- * darkColor
: rgba color object for the checkerboard's dark alternating color.
- * repeat
: Object with x and y values specifying the number of columns and rows respectively.
- *
- * Dot
- *
- * lightColor
: rgba color object for the dot color.
- * darkColor
: rgba color object for the background color.
- * repeat
: Object with x and y values specifying the number of columns and rows of dots respectively.
- *
- * Water
- *
- * baseWaterColor
: rgba color object base color of the water.
- * blendColor
: rgba color object used when blending from water to non-water areas.
- * specularMap
: Single channel texture used to indicate areas of water.
- * normalMap
: Normal map for water normal perturbation.
- * frequency
: Number that controls the number of waves.
- * animationSpeed
: Number that controls the animations speed of the water.
- * amplitude
: Number that controls the amplitude of water waves.
- * specularIntensity
: Number that controls the intensity of specular reflections.
- *
- * RimLighting
- *
- * color
: diffuse color and alpha.
- * rimColor
: diffuse color and alpha of the rim.
- * width
: Number that determines the rim's width.
- *
- * Fade
- *
- * fadeInColor
: diffuse color and alpha at time
- * fadeOutColor
: diffuse color and alpha at maximumDistance
from time
- * maximumDistance
: Number between 0.0 and 1.0 where the fadeInColor
becomes the fadeOutColor
. A value of 0.0 gives the entire material a color of fadeOutColor
and a value of 1.0 gives the the entire material a color of fadeInColor
- * repeat
: true if the fade should wrap around the texture coodinates.
- * fadeDirection
: Object with x and y values specifying if the fade should be in the x and y directions.
- * time
: Object with x and y values between 0.0 and 1.0 of the fadeInColor
position
- *
- * PolylineArrow
- *
- * color
: diffuse color and alpha.
- *
- * PolylineDash
- *
- * color
: color for the line.
- * gapColor
: color for the gaps in the line.
- * dashLength
: Dash length in pixels.
- * dashPattern
: The 16 bit stipple pattern for the line..
- *
- * PolylineGlow
- *
- * color
: color and maximum alpha for the glow on the line.
- * glowPower
: strength of the glow, as a percentage of the total line width (less than 1.0).
- * taperPower
: strength of the tapering effect, as a percentage of the total line length. If 1.0 or higher, no taper effect is used.
- *
- * PolylineOutline
- *
- * color
: diffuse color and alpha for the interior of the line.
- * outlineColor
: diffuse color and alpha for the outline.
- * outlineWidth
: width of the outline in pixels.
- *
- * ElevationContour
- *
- * color
: color and alpha for the contour line.
- * spacing
: spacing for contour lines in meters.
- * width
: Number specifying the width of the grid lines in pixels.
- *
- * ElevationRamp
- *
- * image
: color ramp image to use for coloring the terrain.
- * minimumHeight
: minimum height for the ramp.
- * maximumHeight
: maximum height for the ramp.
- *
- * SlopeRamp
- *
- * image
: color ramp image to use for coloring the terrain by slope.
- *
- * AspectRamp
- *
- * image
: color ramp image to use for color the terrain by aspect.
- *
- * ElevationBand
- *
- * heights
: image of heights sorted from lowest to highest.
- * colors
: image of colors at the corresponding heights.
+ * Color
+ *
+ * color
: rgba color object.
+ *
+ * Image
+ *
+ * image
: path to image.
+ * repeat
: Object with x and y values specifying the number of times to repeat the image.
+ *
+ * DiffuseMap
+ *
+ * image
: path to image.
+ * channels
: Three character string containing any combination of r, g, b, and a for selecting the desired image channels.
+ * repeat
: Object with x and y values specifying the number of times to repeat the image.
+ *
+ * AlphaMap
+ *
+ * image
: path to image.
+ * channel
: One character string containing r, g, b, or a for selecting the desired image channel.
+ * repeat
: Object with x and y values specifying the number of times to repeat the image.
+ *
+ * SpecularMap
+ *
+ * image
: path to image.
+ * channel
: One character string containing r, g, b, or a for selecting the desired image channel.
+ * repeat
: Object with x and y values specifying the number of times to repeat the image.
+ *
+ * EmissionMap
+ *
+ * image
: path to image.
+ * channels
: Three character string containing any combination of r, g, b, and a for selecting the desired image channels.
+ * repeat
: Object with x and y values specifying the number of times to repeat the image.
+ *
+ * BumpMap
+ *
+ * image
: path to image.
+ * channel
: One character string containing r, g, b, or a for selecting the desired image channel.
+ * repeat
: Object with x and y values specifying the number of times to repeat the image.
+ * strength
: Bump strength value between 0.0 and 1.0 where 0.0 is small bumps and 1.0 is large bumps.
+ *
+ * NormalMap
+ *
+ * image
: path to image.
+ * channels
: Three character string containing any combination of r, g, b, and a for selecting the desired image channels.
+ * repeat
: Object with x and y values specifying the number of times to repeat the image.
+ * strength
: Bump strength value between 0.0 and 1.0 where 0.0 is small bumps and 1.0 is large bumps.
+ *
+ * Grid
+ *
+ * color
: rgba color object for the whole material.
+ * cellAlpha
: Alpha value for the cells between grid lines. This will be combined with color.alpha.
+ * lineCount
: Object with x and y values specifying the number of columns and rows respectively.
+ * lineThickness
: Object with x and y values specifying the thickness of grid lines (in pixels where available).
+ * lineOffset
: Object with x and y values specifying the offset of grid lines (range is 0 to 1).
+ *
+ * Stripe
+ *
+ * horizontal
: Boolean that determines if the stripes are horizontal or vertical.
+ * evenColor
: rgba color object for the stripe's first color.
+ * oddColor
: rgba color object for the stripe's second color.
+ * offset
: Number that controls at which point into the pattern to begin drawing; with 0.0 being the beginning of the even color, 1.0 the beginning of the odd color, 2.0 being the even color again, and any multiple or fractional values being in between.
+ * repeat
: Number that controls the total number of stripes, half light and half dark.
+ *
+ * Checkerboard
+ *
+ * lightColor
: rgba color object for the checkerboard's light alternating color.
+ * darkColor
: rgba color object for the checkerboard's dark alternating color.
+ * repeat
: Object with x and y values specifying the number of columns and rows respectively.
+ *
+ * Dot
+ *
+ * lightColor
: rgba color object for the dot color.
+ * darkColor
: rgba color object for the background color.
+ * repeat
: Object with x and y values specifying the number of columns and rows of dots respectively.
+ *
+ * Water
+ *
+ * baseWaterColor
: rgba color object base color of the water.
+ * blendColor
: rgba color object used when blending from water to non-water areas.
+ * specularMap
: Single channel texture used to indicate areas of water.
+ * normalMap
: Normal map for water normal perturbation.
+ * frequency
: Number that controls the number of waves.
+ * animationSpeed
: Number that controls the animations speed of the water.
+ * amplitude
: Number that controls the amplitude of water waves.
+ * specularIntensity
: Number that controls the intensity of specular reflections.
+ *
+ * RimLighting
+ *
+ * color
: diffuse color and alpha.
+ * rimColor
: diffuse color and alpha of the rim.
+ * width
: Number that determines the rim's width.
+ *
+ * Fade
+ *
+ * fadeInColor
: diffuse color and alpha at time
+ * fadeOutColor
: diffuse color and alpha at maximumDistance
from time
+ * maximumDistance
: Number between 0.0 and 1.0 where the fadeInColor
becomes the fadeOutColor
. A value of 0.0 gives the entire material a color of fadeOutColor
and a value of 1.0 gives the the entire material a color of fadeInColor
+ * repeat
: true if the fade should wrap around the texture coodinates.
+ * fadeDirection
: Object with x and y values specifying if the fade should be in the x and y directions.
+ * time
: Object with x and y values between 0.0 and 1.0 of the fadeInColor
position
+ *
+ * PolylineArrow
+ *
+ * color
: diffuse color and alpha.
+ *
+ * PolylineDash
+ *
+ * color
: color for the line.
+ * gapColor
: color for the gaps in the line.
+ * dashLength
: Dash length in pixels.
+ * dashPattern
: The 16 bit stipple pattern for the line..
+ *
+ * PolylineGlow
+ *
+ * color
: color and maximum alpha for the glow on the line.
+ * glowPower
: strength of the glow, as a percentage of the total line width (less than 1.0).
+ * taperPower
: strength of the tapering effect, as a percentage of the total line length. If 1.0 or higher, no taper effect is used.
+ *
+ * PolylineOutline
+ *
+ * color
: diffuse color and alpha for the interior of the line.
+ * outlineColor
: diffuse color and alpha for the outline.
+ * outlineWidth
: width of the outline in pixels.
+ *
+ * ElevationContour
+ *
+ * color
: color and alpha for the contour line.
+ * spacing
: spacing for contour lines in meters.
+ * width
: Number specifying the width of the grid lines in pixels.
+ *
+ * ElevationRamp
+ *
+ * image
: color ramp image to use for coloring the terrain.
+ * minimumHeight
: minimum height for the ramp.
+ * maximumHeight
: maximum height for the ramp.
+ *
+ * SlopeRamp
+ *
+ * image
: color ramp image to use for coloring the terrain by slope.
+ *
+ * AspectRamp
+ *
+ * image
: color ramp image to use for color the terrain by aspect.
+ *
+ * ElevationBand
+ *
+ * heights
: image of heights sorted from lowest to highest.
+ * colors
: image of colors at the corresponding heights.
*
*
*
*
- *
* @alias Material
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {boolean} [options.strict=false] Throws errors for issues that would normally be ignored, including unused uniforms or materials.
- * @param {boolean|Function} [options.translucent=true] When true
or a function that returns true
, the geometry
+ * @param {boolean} [options.strict] Throws errors for issues that would normally be ignored, including unused uniforms or materials.
+ * @param {boolean|Function} [options.translucent] When true
or a function that returns true
, the geometry
* with this material is expected to appear translucent.
- * @param {TextureMinificationFilter} [options.minificationFilter=TextureMinificationFilter.LINEAR] The {@link TextureMinificationFilter} to apply to this material's textures.
- * @param {TextureMagnificationFilter} [options.magnificationFilter=TextureMagnificationFilter.LINEAR] The {@link TextureMagnificationFilter} to apply to this material's textures.
+ * @param {TextureMinificationFilter} [options.minificationFilter] The {@link TextureMinificationFilter} to apply to this material's textures.
+ * @param {TextureMagnificationFilter} [options.magnificationFilter] The {@link TextureMagnificationFilter} to apply to this material's textures.
* @param {object} options.fabric The fabric JSON used to generate the material.
*ructor
- *
- * @exception {DeveloperError} fabric: uniform has invalid type.
- * @exception {DeveloperError} fabric: uniforms and materials cannot share the same property.
- * @exception {DeveloperError} fabric: cannot have source and components in the same section.
+ * @throws {DeveloperError} fabric: uniform has invalid type.
+ * @throws {DeveloperError} fabric: uniforms and materials cannot share the same property.
+ * @throws {DeveloperError} fabric: cannot have source and components in the same section.
* @exception {DeveloperError} fabric: property name is not valid. It should be 'type', 'materials', 'uniforms', 'components', or 'source'.
* @exception {DeveloperError} fabric: property name is not valid. It should be 'diffuse', 'specular', 'shininess', 'normal', 'emission', or 'alpha'.
* @exception {DeveloperError} strict: shader source does not use string.
@@ -348,13 +345,10 @@ Material._uniformList = {};
* Creates a new material using an existing material type.
*
* Shorthand for: new Material({fabric : {type : type}});
- *
* @param {string} type The base material type.
* @param {object} [uniforms] Overrides for the default uniforms.
* @returns {Material} New material object.
- *
- * @exception {DeveloperError} material with that type does not exist.
- *
+ * @throws {DeveloperError} material with that type does not exist.
* @example
* const material = Cesium.Material.fromType('Color', {
* color: new Cesium.Color(1.0, 0.0, 0.0, 1.0)
@@ -416,6 +410,7 @@ Material.prototype.isTranslucent = function () {
};
/**
+ * @param context
* @private
*/
Material.prototype.update = function (context) {
@@ -536,9 +531,7 @@ Material.prototype.update = function (context) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
- *
* @see Material#destroy
*/
Material.prototype.isDestroyed = function () {
@@ -552,13 +545,9 @@ Material.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* material = material && material.destroy();
- *
* @see Material#isDestroyed
*/
Material.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/MaterialAppearance.js b/packages/engine/Source/Scene/MaterialAppearance.js
index 06280407f4f7..c9e5555e4656 100644
--- a/packages/engine/Source/Scene/MaterialAppearance.js
+++ b/packages/engine/Source/Scene/MaterialAppearance.js
@@ -11,41 +11,38 @@ import Appearance from "./Appearance.js";
import Material from "./Material.js";
/**
- * An appearance for arbitrary geometry (as opposed to {@link EllipsoidSurfaceAppearance}, for example)
- * that supports shading with materials.
- *
- * @alias MaterialAppearance
- * @constructor
- *
- * @param {object} [options] Object with the following properties:
- * @param {boolean} [options.flat=false] When true
, flat shading is used in the fragment shader, which means lighting is not taking into account.
- * @param {boolean} [options.faceForward=!options.closed] When true
, the fragment shader flips the surface normal as needed to ensure that the normal faces the viewer to avoid dark spots. This is useful when both sides of a geometry should be shaded like {@link WallGeometry}.
- * @param {boolean} [options.translucent=true] When true
, the geometry is expected to appear translucent so {@link MaterialAppearance#renderState} has alpha blending enabled.
- * @param {boolean} [options.closed=false] When true
, the geometry is expected to be closed so {@link MaterialAppearance#renderState} has backface culling enabled.
- * @param {MaterialAppearance.MaterialSupportType} [options.materialSupport=MaterialAppearance.MaterialSupport.TEXTURED] The type of materials that will be supported.
- * @param {Material} [options.material=Material.ColorType] The material used to determine the fragment color.
- * @param {string} [options.vertexShaderSource] Optional GLSL vertex shader source to override the default vertex shader.
- * @param {string} [options.fragmentShaderSource] Optional GLSL fragment shader source to override the default fragment shader.
- * @param {object} [options.renderState] Optional render state to override the default render state.
- *
- * @see {@link https://github.com/CesiumGS/cesium/wiki/Fabric|Fabric}
- * @demo {@link https://sandcastle.cesium.com/index.html?src=Materials.html|Cesium Sandcastle Material Appearance Demo}
- *
- * @example
- * const primitive = new Cesium.Primitive({
- * geometryInstances : new Cesium.GeometryInstance({
- * geometry : new Cesium.WallGeometry({
+ * An appearance for arbitrary geometry (as opposed to {@link EllipsoidSurfaceAppearance}, for example)
+ * that supports shading with materials.
+ * @alias MaterialAppearance
+ * @class
+ * @param {object} [options] Object with the following properties:
+ * @param {boolean} [options.flat] When true
, flat shading is used in the fragment shader, which means lighting is not taking into account.
+ * @param {boolean} [options.faceForward] When true
, the fragment shader flips the surface normal as needed to ensure that the normal faces the viewer to avoid dark spots. This is useful when both sides of a geometry should be shaded like {@link WallGeometry}.
+ * @param {boolean} [options.translucent] When true
, the geometry is expected to appear translucent so {@link MaterialAppearance#renderState} has alpha blending enabled.
+ * @param {boolean} [options.closed] When true
, the geometry is expected to be closed so {@link MaterialAppearance#renderState} has backface culling enabled.
+ * @param {MaterialAppearance.MaterialSupportType} [options.materialSupport] The type of materials that will be supported.
+ * @param {Material} [options.material] The material used to determine the fragment color.
+ * @param {string} [options.vertexShaderSource] Optional GLSL vertex shader source to override the default vertex shader.
+ * @param {string} [options.fragmentShaderSource] Optional GLSL fragment shader source to override the default fragment shader.
+ * @param {object} [options.renderState] Optional render state to override the default render state.
+ * @see {@link https://github.com/CesiumGS/cesium/wiki/Fabric|Fabric}
+ * @demo {@link https://sandcastle.cesium.com/index.html?src=Materials.html|Cesium Sandcastle Material Appearance Demo}
+ *
+ * @example
+ * const primitive = new Cesium.Primitive({
+ * geometryInstances : new Cesium.GeometryInstance({
+ * geometry : new Cesium.WallGeometry({
materialSupport : Cesium.MaterialAppearance.MaterialSupport.BASIC.vertexFormat,
- * // ...
- * })
- * }),
- * appearance : new Cesium.MaterialAppearance({
- * material : Cesium.Material.fromType('Color'),
- * faceForward : true
- * })
- *
- * });
- */
+ * // ...
+ * })
+ * }),
+ * appearance : new Cesium.MaterialAppearance({
+ * material : Cesium.Material.fromType('Color'),
+ * faceForward : true
+ * })
+ *
+ * });
+ */
function MaterialAppearance(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -59,11 +56,8 @@ function MaterialAppearance(options) {
/**
* The material used to determine the fragment color. Unlike other {@link MaterialAppearance}
* properties, this is not read-only, so an appearance's material can change on the fly.
- *
* @type Material
- *
* @default {@link Material.ColorType}
- *
* @see {@link https://github.com/CesiumGS/cesium/wiki/Fabric|Fabric}
*/
this.material = defined(options.material)
@@ -72,9 +66,7 @@ function MaterialAppearance(options) {
/**
* When true
, the geometry is expected to appear translucent.
- *
* @type {boolean}
- *
* @default true
*/
this.translucent = translucent;
@@ -105,9 +97,7 @@ function MaterialAppearance(options) {
Object.defineProperties(MaterialAppearance.prototype, {
/**
* The GLSL source code for the vertex shader.
- *
* @memberof MaterialAppearance.prototype
- *
* @type {string}
* @readonly
*/
@@ -122,9 +112,7 @@ Object.defineProperties(MaterialAppearance.prototype, {
* source is built procedurally taking into account {@link MaterialAppearance#material},
* {@link MaterialAppearance#flat}, and {@link MaterialAppearance#faceForward}.
* Use {@link MaterialAppearance#getFragmentShaderSource} to get the full source.
- *
* @memberof MaterialAppearance.prototype
- *
* @type {string}
* @readonly
*/
@@ -141,9 +129,7 @@ Object.defineProperties(MaterialAppearance.prototype, {
* instance, or it is set implicitly via {@link MaterialAppearance#translucent}
* and {@link MaterialAppearance#closed}.
*
- *
* @memberof MaterialAppearance.prototype
- *
* @type {object}
* @readonly
*/
@@ -157,12 +143,9 @@ Object.defineProperties(MaterialAppearance.prototype, {
* When true
, the geometry is expected to be closed so
* {@link MaterialAppearance#renderState} has backface culling enabled.
* If the viewer enters the geometry, it will not be visible.
- *
* @memberof MaterialAppearance.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
closed: {
@@ -174,12 +157,9 @@ Object.defineProperties(MaterialAppearance.prototype, {
/**
* The type of materials supported by this instance. This impacts the required
* {@link VertexFormat} and the complexity of the vertex and fragment shaders.
- *
* @memberof MaterialAppearance.prototype
- *
* @type {MaterialAppearance.MaterialSupportType}
* @readonly
- *
* @default {@link MaterialAppearance.MaterialSupport.TEXTURED}
*/
materialSupport: {
@@ -192,12 +172,9 @@ Object.defineProperties(MaterialAppearance.prototype, {
* The {@link VertexFormat} that this appearance instance is compatible with.
* A geometry can have more vertex attributes and still be compatible - at a
* potential performance cost - but it can't have less.
- *
* @memberof MaterialAppearance.prototype
- *
* @type VertexFormat
* @readonly
- *
* @default {@link MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat}
*/
vertexFormat: {
@@ -209,12 +186,9 @@ Object.defineProperties(MaterialAppearance.prototype, {
/**
* When true
, flat shading is used in the fragment shader,
* which means lighting is not taking into account.
- *
* @memberof MaterialAppearance.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
flat: {
@@ -228,12 +202,9 @@ Object.defineProperties(MaterialAppearance.prototype, {
* as needed to ensure that the normal faces the viewer to avoid
* dark spots. This is useful when both sides of a geometry should be
* shaded like {@link WallGeometry}.
- *
* @memberof MaterialAppearance.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
faceForward: {
@@ -247,9 +218,7 @@ Object.defineProperties(MaterialAppearance.prototype, {
* Procedurally creates the full GLSL fragment shader source. For {@link MaterialAppearance},
* this is derived from {@link MaterialAppearance#fragmentShaderSource}, {@link MaterialAppearance#material},
* {@link MaterialAppearance#flat}, and {@link MaterialAppearance#faceForward}.
- *
* @function
- *
* @returns {string} The full GLSL fragment shader source.
*/
MaterialAppearance.prototype.getFragmentShaderSource =
@@ -257,9 +226,7 @@ MaterialAppearance.prototype.getFragmentShaderSource =
/**
* Determines if the geometry is translucent based on {@link MaterialAppearance#translucent} and {@link Material#isTranslucent}.
- *
* @function
- *
* @returns {boolean} true
if the appearance is translucent.
*/
MaterialAppearance.prototype.isTranslucent = Appearance.prototype.isTranslucent;
@@ -268,9 +235,7 @@ MaterialAppearance.prototype.isTranslucent = Appearance.prototype.isTranslucent;
* Creates a render state. This is not the final render state instance; instead,
* it can contain a subset of render state properties identical to the render state
* created in the context.
- *
* @function
- *
* @returns {object} The render state.
*/
MaterialAppearance.prototype.getRenderState =
@@ -295,7 +260,6 @@ MaterialAppearance.MaterialSupport = {
/**
* Only basic materials, which require just position
and
* normal
vertex attributes, are supported.
- *
* @type {MaterialAppearance.MaterialSupportType}
* @constant
*/
@@ -308,7 +272,6 @@ MaterialAppearance.MaterialSupport = {
* Materials with textures, which require position
,
* normal
, and st
vertex attributes,
* are supported. The vast majority of materials fall into this category.
- *
* @type {MaterialAppearance.MaterialSupportType}
* @constant
*/
@@ -321,7 +284,6 @@ MaterialAppearance.MaterialSupport = {
* All materials, including those that work in tangent space, are supported.
* This requires position
, normal
, st
,
* tangent
, and bitangent
vertex attributes.
- *
* @type {MaterialAppearance.MaterialSupportType}
* @constant
*/
diff --git a/packages/engine/Source/Scene/Megatexture.js b/packages/engine/Source/Scene/Megatexture.js
index 5173d98b3911..91efc360e5fb 100644
--- a/packages/engine/Source/Scene/Megatexture.js
+++ b/packages/engine/Source/Scene/Megatexture.js
@@ -19,14 +19,12 @@ import TextureWrap from "../Renderer/TextureWrap.js";
/**
* @alias Megatexture
- * @constructor
- *
+ * @class
* @param {Context} context
* @param {Cartesian3} dimensions
* @param {number} channelCount
* @param {MetadataComponentType} componentType
* @param {number} [textureMemoryByteLength]
- *
* @private
*/
function Megatexture(
@@ -253,10 +251,8 @@ function Megatexture(
/**
* @alias MegatextureNode
- * @constructor
- *
+ * @class
* @param {number} index
- *
* @private
*/
function MegatextureNode(index) {
@@ -458,9 +454,7 @@ Megatexture.prototype.writeDataToTexture = function (index, data) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see Megatexture#destroy
*/
Megatexture.prototype.isDestroyed = function () {
@@ -474,11 +468,8 @@ Megatexture.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @see Megatexture#isDestroyed
- *
* @example
* megatexture = megatexture && megatexture.destroy();
*/
diff --git a/packages/engine/Source/Scene/MetadataClass.js b/packages/engine/Source/Scene/MetadataClass.js
index 49b9b609e188..f4e9b13401b3 100644
--- a/packages/engine/Source/Scene/MetadataClass.js
+++ b/packages/engine/Source/Scene/MetadataClass.js
@@ -10,7 +10,6 @@ import MetadataClassProperty from "./MetadataClassProperty.js";
*
* See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Metadata|3D Metadata Specification} for 3D Tiles
*
- *
* @param {object} options Object with the following properties:
* @param {string} options.id The ID of the class.
* @param {string} [options.name] The name of the class.
@@ -18,9 +17,8 @@ import MetadataClassProperty from "./MetadataClassProperty.js";
* @param {Object} [options.properties] The class properties, where each key is the property ID.
* @param {*} [options.extras] Extra user-defined properties.
* @param {object} [options.extensions] An object containing extensions.
- *
* @alias MetadataClass
- * @constructor
+ * @class
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
function MetadataClass(options) {
@@ -53,14 +51,11 @@ function MetadataClass(options) {
/**
* Creates a {@link MetadataClass} from either 3D Tiles 1.1, 3DTILES_metadata, EXT_structural_metadata, or EXT_feature_metadata.
- *
* @param {object} options Object with the following properties:
* @param {string} options.id The ID of the class.
* @param {object} options.class The class JSON object.
* @param {Object} [options.enums] A dictionary of enums.
- *
* @returns {MetadataClass} The newly created metadata class.
- *
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -99,7 +94,6 @@ MetadataClass.fromJson = function (options) {
Object.defineProperties(MetadataClass.prototype, {
/**
* The class properties.
- *
* @memberof MetadataClass.prototype
* @type {Object}
* @readonly
@@ -112,11 +106,9 @@ Object.defineProperties(MetadataClass.prototype, {
/**
* A dictionary mapping semantics to class properties.
- *
* @memberof MetadataClass.prototype
* @type {Object}
* @readonly
- *
* @private
*/
propertiesBySemantic: {
@@ -127,7 +119,6 @@ Object.defineProperties(MetadataClass.prototype, {
/**
* The ID of the class.
- *
* @memberof MetadataClass.prototype
* @type {string}
* @readonly
@@ -140,7 +131,6 @@ Object.defineProperties(MetadataClass.prototype, {
/**
* The name of the class.
- *
* @memberof MetadataClass.prototype
* @type {string}
* @readonly
@@ -153,7 +143,6 @@ Object.defineProperties(MetadataClass.prototype, {
/**
* The description of the class.
- *
* @memberof MetadataClass.prototype
* @type {string}
* @readonly
@@ -166,7 +155,6 @@ Object.defineProperties(MetadataClass.prototype, {
/**
* Extra user-defined properties.
- *
* @memberof MetadataClass.prototype
* @type {*}
* @readonly
@@ -179,7 +167,6 @@ Object.defineProperties(MetadataClass.prototype, {
/**
* An object containing extensions.
- *
* @memberof MetadataClass.prototype
* @type {object}
* @readonly
@@ -194,7 +181,6 @@ Object.defineProperties(MetadataClass.prototype, {
/**
* The class name given to the metadata class when a batch
* table is loaded from 3D Tiles 1.0 formats.
- *
* @private
*/
MetadataClass.BATCH_TABLE_CLASS_NAME = "_batchTable";
diff --git a/packages/engine/Source/Scene/MetadataClassProperty.js b/packages/engine/Source/Scene/MetadataClassProperty.js
index b21c05c06fd7..8f48c6a45e45 100644
--- a/packages/engine/Source/Scene/MetadataClassProperty.js
+++ b/packages/engine/Source/Scene/MetadataClassProperty.js
@@ -17,31 +17,29 @@ import MetadataComponentType from "./MetadataComponentType.js";
*
* See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Metadata|3D Metadata Specification} for 3D Tiles
*
- *
* @param {object} options Object with the following properties:
* @param {string} options.id The ID of the property.
* @param {MetadataType} options.type The type of the property such as SCALAR, VEC2, VEC3.
* @param {MetadataComponentType} [options.componentType] The component type of the property. This includes integer (e.g. INT8 or UINT16), and floating point (FLOAT32 and FLOAT64) values.
* @param {MetadataEnum} [options.enumType] The enum type of the property. Only defined when type is ENUM.
- * @param {boolean} [options.isArray=false] True if a property is an array (either fixed length or variable length), false otherwise.
- * @param {boolean} [options.isVariableLengthArray=false] True if a property is a variable length array, false otherwise.
+ * @param {boolean} [options.isArray] True if a property is an array (either fixed length or variable length), false otherwise.
+ * @param {boolean} [options.isVariableLengthArray] True if a property is a variable length array, false otherwise.
* @param {number} [options.arrayLength] The number of array elements. Only defined for fixed length arrays.
- * @param {boolean} [options.normalized=false] Whether the property is normalized.
+ * @param {boolean} [options.normalized] Whether the property is normalized.
* @param {number|number[]|number[][]} [options.min] A number or an array of numbers storing the minimum allowable value of this property. Only defined when type is a numeric type.
* @param {number|number[]|number[][]} [options.max] A number or an array of numbers storing the maximum allowable value of this property. Only defined when type is a numeric type.
* @param {number|number[]|number[][]} [options.offset] The offset to be added to property values as part of the value transform.
* @param {number|number[]|number[][]} [options.scale] The scale to be multiplied to property values as part of the value transform.
* @param {boolean|number|string|Array} [options.noData] The no-data sentinel value that represents null values.
* @param {boolean|number|string|Array} [options.default] A default value to use when an entity's property value is not defined.
- * @param {boolean} [options.required=false] Whether the property is required.
+ * @param {boolean} [options.required] Whether the property is required.
* @param {string} [options.name] The name of the property.
* @param {string} [options.description] The description of the property.
* @param {string} [options.semantic] An identifier that describes how this property should be interpreted.
* @param {*} [options.extras] Extra user-defined properties.
* @param {object} [options.extensions] An object containing extensions.
- *
* @alias MetadataClassProperty
- * @constructor
+ * @class
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
function MetadataClassProperty(options) {
@@ -124,14 +122,11 @@ function MetadataClassProperty(options) {
/**
* Creates a {@link MetadataClassProperty} from either 3D Tiles 1.1, 3DTILES_metadata, EXT_structural_metadata, or EXT_feature_metadata.
- *
* @param {object} options Object with the following properties:
* @param {string} options.id The ID of the property.
* @param {object} options.property The property JSON object.
* @param {Object} [options.enums] A dictionary of enums.
- *
* @returns {MetadataClassProperty} The newly created metadata class property.
- *
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -195,7 +190,6 @@ MetadataClassProperty.fromJson = function (options) {
Object.defineProperties(MetadataClassProperty.prototype, {
/**
* The ID of the property.
- *
* @memberof MetadataClassProperty.prototype
* @type {string}
* @readonly
@@ -208,7 +202,6 @@ Object.defineProperties(MetadataClassProperty.prototype, {
/**
* The name of the property.
- *
* @memberof MetadataClassProperty.prototype
* @type {string}
* @readonly
@@ -221,7 +214,6 @@ Object.defineProperties(MetadataClassProperty.prototype, {
/**
* The description of the property.
- *
* @memberof MetadataClassProperty.prototype
* @type {string}
* @readonly
@@ -234,7 +226,6 @@ Object.defineProperties(MetadataClassProperty.prototype, {
/**
* The type of the property such as SCALAR, VEC2, VEC3
- *
* @memberof MetadataClassProperty.prototype
* @type {MetadataType}
* @readonly
@@ -247,7 +238,6 @@ Object.defineProperties(MetadataClassProperty.prototype, {
/**
* The enum type of the property. Only defined when type is ENUM.
- *
* @memberof MetadataClassProperty.prototype
* @type {MetadataEnum}
* @readonly
@@ -261,7 +251,6 @@ Object.defineProperties(MetadataClassProperty.prototype, {
/**
* The component type of the property. This includes integer
* (e.g. INT8 or UINT16), and floating point (FLOAT32 and FLOAT64) values
- *
* @memberof MetadataClassProperty.prototype
* @type {MetadataComponentType}
* @readonly
@@ -276,7 +265,6 @@ Object.defineProperties(MetadataClassProperty.prototype, {
* The datatype used for storing each component of the property. This
* is usually the same as componentType except for ENUM, where this
* returns an integer type
- *
* @memberof MetadataClassProperty.prototype
* @type {MetadataComponentType}
* @readonly
@@ -291,7 +279,6 @@ Object.defineProperties(MetadataClassProperty.prototype, {
/**
* True if a property is an array (either fixed length or variable length),
* false otherwise.
- *
* @memberof MetadataClassProperty.prototype
* @type {boolean}
* @readonly
@@ -304,7 +291,6 @@ Object.defineProperties(MetadataClassProperty.prototype, {
/**
* True if a property is a variable length array, false otherwise.
- *
* @memberof MetadataClassProperty.prototype
* @type {boolean}
* @readonly
@@ -318,7 +304,6 @@ Object.defineProperties(MetadataClassProperty.prototype, {
/**
* The number of array elements. Only defined for fixed-size
* arrays.
- *
* @memberof MetadataClassProperty.prototype
* @type {number}
* @readonly
@@ -331,7 +316,6 @@ Object.defineProperties(MetadataClassProperty.prototype, {
/**
* Whether the property is normalized.
- *
* @memberof MetadataClassProperty.prototype
* @type {boolean}
* @readonly
@@ -344,7 +328,6 @@ Object.defineProperties(MetadataClassProperty.prototype, {
/**
* A number or an array of numbers storing the maximum allowable value of this property. Only defined when type is a numeric type.
- *
* @memberof MetadataClassProperty.prototype
* @type {number|number[]|number[][]}
* @readonly
@@ -357,7 +340,6 @@ Object.defineProperties(MetadataClassProperty.prototype, {
/**
* A number or an array of numbers storing the minimum allowable value of this property. Only defined when type is a numeric type.
- *
* @memberof MetadataClassProperty.prototype
* @type {number|number[]|number[][]}
* @readonly
@@ -370,7 +352,6 @@ Object.defineProperties(MetadataClassProperty.prototype, {
/**
* The no-data sentinel value that represents null values
- *
* @memberof MetadataClassProperty.prototype
* @type {boolean|number|string|Array}
* @readonly
@@ -383,7 +364,6 @@ Object.defineProperties(MetadataClassProperty.prototype, {
/**
* A default value to use when an entity's property value is not defined.
- *
* @memberof MetadataClassProperty.prototype
* @type {boolean|number|string|Array}
* @readonly
@@ -396,7 +376,6 @@ Object.defineProperties(MetadataClassProperty.prototype, {
/**
* Whether the property is required.
- *
* @memberof MetadataClassProperty.prototype
* @type {boolean}
* @readonly
@@ -409,7 +388,6 @@ Object.defineProperties(MetadataClassProperty.prototype, {
/**
* An identifier that describes how this property should be interpreted.
- *
* @memberof MetadataClassProperty.prototype
* @type {string}
* @readonly
@@ -423,7 +401,6 @@ Object.defineProperties(MetadataClassProperty.prototype, {
/**
* True if offset/scale should be applied. If both offset/scale were
* undefined, they default to identity so this property is set false
- *
* @memberof MetadataClassProperty.prototype
* @type {boolean}
* @readonly
@@ -437,7 +414,6 @@ Object.defineProperties(MetadataClassProperty.prototype, {
/**
* The offset to be added to property values as part of the value transform.
- *
* @memberof MetadataClassProperty.prototype
* @type {number|number[]|number[][]}
* @readonly
@@ -450,7 +426,6 @@ Object.defineProperties(MetadataClassProperty.prototype, {
/**
* The scale to be multiplied to property values as part of the value transform.
- *
* @memberof MetadataClassProperty.prototype
* @type {number|number[]|number[][]}
* @readonly
@@ -463,7 +438,6 @@ Object.defineProperties(MetadataClassProperty.prototype, {
/**
* Extra user-defined properties.
- *
* @memberof MetadataClassProperty.prototype
* @type {*}
* @readonly
@@ -476,7 +450,6 @@ Object.defineProperties(MetadataClassProperty.prototype, {
/**
* An object containing extensions.
- *
* @memberof MetadataClassProperty.prototype
* @type {object}
* @readonly
@@ -688,10 +661,8 @@ function parseType(property, enums) {
* Furthermore, for 64-bit integer types, there may be a loss of precision
* due to conversion to Number
*
- *
* @param {*} value The integer value or array of integer values.
* @returns {*} The normalized value or array of normalized values.
- *
* @private
*/
MetadataClassProperty.prototype.normalize = function (value) {
@@ -721,10 +692,8 @@ MetadataClassProperty.prototype.normalize = function (value) {
* Furthermore, for 64-bit integer types, there may be a loss of precision
* due to conversion to Number
*
- *
* @param {*} value The normalized value or array of normalized values.
* @returns {*} The integer value or array of integer values.
- *
* @private
*/
MetadataClassProperty.prototype.unnormalize = function (value) {
@@ -740,6 +709,7 @@ MetadataClassProperty.prototype.unnormalize = function (value) {
};
/**
+ * @param value
* @private
*/
MetadataClassProperty.prototype.applyValueTransform = function (value) {
@@ -758,6 +728,7 @@ MetadataClassProperty.prototype.applyValueTransform = function (value) {
};
/**
+ * @param value
* @private
*/
MetadataClassProperty.prototype.unapplyValueTransform = function (value) {
@@ -776,6 +747,8 @@ MetadataClassProperty.prototype.unapplyValueTransform = function (value) {
};
/**
+ * @param constant
+ * @param enableNestedArrays
* @private
*/
MetadataClassProperty.prototype.expandConstant = function (
@@ -820,7 +793,6 @@ MetadataClassProperty.prototype.expandConstant = function (
* the value.
* @param {*} value The raw value
* @returns {*} Either the value or undefined if the value was a no data value.
- *
* @private
*/
MetadataClassProperty.prototype.handleNoData = function (value) {
@@ -863,9 +835,8 @@ function arrayEquals(left, right) {
* {@link Cartesian4} and MATN values into {@link Matrix2}, {@link Matrix3}, or
* {@link Matrix4} depending on N. All other values (including arrays of
* other sizes) are passed through unaltered.
- *
* @param {*} value the original, normalized values.
- * @param {boolean} [enableNestedArrays=false] If true, arrays of vectors are represented as nested arrays. This is used for JSON encoding but not binary encoding
+ * @param {boolean} [enableNestedArrays] If true, arrays of vectors are represented as nested arrays. This is used for JSON encoding but not binary encoding
* @returns {*} The appropriate vector or matrix type if the value is a vector or matrix type, respectively. If the property is an array of vectors or matrices, an array of the appropriate vector or matrix type is returned. Otherwise, the value is returned unaltered.
* @private
*/
@@ -902,9 +873,8 @@ MetadataClassProperty.prototype.unpackVectorAndMatrixTypes = function (
* Pack a {@link Matrix2}, {@link Matrix3}, or {@link Matrix4} into an
* array if this property is an MATN
.
* All other values (including arrays of other sizes) are passed through unaltered.
- *
* @param {*} value The value of this property
- * @param {boolean} [enableNestedArrays=false] If true, arrays of vectors are represented as nested arrays. This is used for JSON encoding but not binary encoding
+ * @param {boolean} [enableNestedArrays] If true, arrays of vectors are represented as nested arrays. This is used for JSON encoding but not binary encoding
* @returns {*} An array of the appropriate length if the property is a vector or matrix type. Otherwise, the value is returned unaltered.
* @private
*/
@@ -937,7 +907,6 @@ MetadataClassProperty.prototype.packVectorAndMatrixTypes = function (
/**
* Validates whether the given value conforms to the property.
- *
* @param {*} value The value.
* @returns {string|undefined} An error message if the value does not conform to the property, otherwise undefined.
* @private
@@ -1139,6 +1108,10 @@ function normalizeInPlace(values, valueType, normalizeFunction) {
}
/**
+ * @param values
+ * @param offsets
+ * @param scales
+ * @param transformationFunction
* @private
*/
MetadataClassProperty.valueTransformInPlace = function (
diff --git a/packages/engine/Source/Scene/MetadataComponentType.js b/packages/engine/Source/Scene/MetadataComponentType.js
index ad7ab3afdfcd..5e72a0c922c8 100644
--- a/packages/engine/Source/Scene/MetadataComponentType.js
+++ b/packages/engine/Source/Scene/MetadataComponentType.js
@@ -6,81 +6,68 @@ import FeatureDetection from "../Core/FeatureDetection.js";
/**
* An enum of metadata component types.
- *
* @enum {string}
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
const MetadataComponentType = {
/**
* An 8-bit signed integer
- *
* @type {string}
* @constant
*/
INT8: "INT8",
/**
* An 8-bit unsigned integer
- *
* @type {string}
* @constant
*/
UINT8: "UINT8",
/**
* A 16-bit signed integer
- *
* @type {string}
* @constant
*/
INT16: "INT16",
/**
* A 16-bit unsigned integer
- *
* @type {string}
* @constant
*/
UINT16: "UINT16",
/**
* A 32-bit signed integer
- *
* @type {string}
* @constant
*/
INT32: "INT32",
/**
* A 32-bit unsigned integer
- *
* @type {string}
* @constant
*/
UINT32: "UINT32",
/**
* A 64-bit signed integer. This type requires BigInt support.
- *
* @see FeatureDetection.supportsBigInt
- *
* @type {string}
* @constant
*/
INT64: "INT64",
/**
* A 64-bit signed integer. This type requires BigInt support
- *
* @see FeatureDetection.supportsBigInt
- *
* @type {string}
* @constant
*/
UINT64: "UINT64",
/**
* A 32-bit (single precision) floating point number
- *
* @type {string}
* @constant
*/
FLOAT32: "FLOAT32",
/**
* A 64-bit (double precision) floating point number
- *
* @type {string}
* @constant
*/
@@ -93,10 +80,8 @@ const MetadataComponentType = {
* Returns a BigInt for the INT64 and UINT64 types if BigInt is supported on this platform.
* Otherwise an approximate number is returned.
*
- *
* @param {MetadataComponentType} type The type.
* @returns {number|bigint} The minimum value.
- *
* @private
*/
MetadataComponentType.getMinimum = function (type) {
@@ -141,10 +126,8 @@ MetadataComponentType.getMinimum = function (type) {
* Returns a BigInt for the INT64 and UINT64 types if BigInt is supported on this platform.
* Otherwise an approximate number is returned.
*
- *
* @param {MetadataComponentType} type The type.
* @returns {number|bigint} The maximum value.
- *
* @private
*/
MetadataComponentType.getMaximum = function (type) {
@@ -187,10 +170,8 @@ MetadataComponentType.getMaximum = function (type) {
/**
* Returns whether the type is an integer type.
- *
* @param {MetadataComponentType} type The type.
* @returns {boolean} Whether the type is an integer type.
- *
* @private
*/
MetadataComponentType.isIntegerType = function (type) {
@@ -215,10 +196,8 @@ MetadataComponentType.isIntegerType = function (type) {
/**
* Returns whether the type is an unsigned integer type.
- *
* @param {MetadataComponentType} type The type.
* @returns {boolean} Whether the type is an unsigned integer type.
- *
* @private
*/
MetadataComponentType.isUnsignedIntegerType = function (type) {
@@ -242,7 +221,7 @@ MetadataComponentType.isUnsignedIntegerType = function (type) {
* {@link Cartesian3}, or {@link Cartesian4} classes. This includes all numeric
* types except for types requiring 64-bit integers
* @param {MetadataComponentType} type The type to check
- * @return {boolean} true
if the type can be encoded as a vector type, or false
otherwise
+ * @returns {boolean} true
if the type can be encoded as a vector type, or false
otherwise
* @private
*/
MetadataComponentType.isVectorCompatible = function (type) {
@@ -273,14 +252,11 @@ MetadataComponentType.isVectorCompatible = function (type) {
* to a 64-bit floating point number during normalization which may result in
* small precision differences.
*
- *
* @param {number|bigint} value The integer value.
* @param {MetadataComponentType} type The type.
* @returns {number} The normalized value.
- *
- * @exception {DeveloperError} value must be a number or a BigInt
- * @exception {DeveloperError} type must be an integer type
- *
+ * @throws {DeveloperError} value must be a number or a BigInt
+ * @throws {DeveloperError} type must be an integer type
* @private
*/
MetadataComponentType.normalize = function (value, type) {
@@ -306,13 +282,10 @@ MetadataComponentType.normalize = function (value, type) {
*
* Returns a BigInt for the INT64 and UINT64 types if BigInt is supported on this platform.
*
- *
* @param {number} value The normalized value.
* @param {MetadataComponentType} type The type.
* @returns {number|bigint} The integer value.
- *
- * @exception {DeveloperError} type must be an integer type
- *
+ * @throws {DeveloperError} type must be an integer type
* @private
*/
MetadataComponentType.unnormalize = function (value, type) {
@@ -348,6 +321,9 @@ MetadataComponentType.unnormalize = function (value, type) {
};
/**
+ * @param value
+ * @param offset
+ * @param scale
* @private
*/
MetadataComponentType.applyValueTransform = function (value, offset, scale) {
@@ -355,6 +331,9 @@ MetadataComponentType.applyValueTransform = function (value, offset, scale) {
};
/**
+ * @param value
+ * @param offset
+ * @param scale
* @private
*/
MetadataComponentType.unapplyValueTransform = function (value, offset, scale) {
@@ -369,10 +348,8 @@ MetadataComponentType.unapplyValueTransform = function (value, offset, scale) {
/**
* Gets the size in bytes for the numeric type.
- *
* @param {MetadataComponentType} type The type.
* @returns {number} The size in bytes.
- *
* @private
*/
MetadataComponentType.getSizeInBytes = function (type) {
@@ -402,10 +379,8 @@ MetadataComponentType.getSizeInBytes = function (type) {
/**
* Gets the {@link MetadataComponentType} from a {@link ComponentDatatype}.
- *
* @param {ComponentDatatype} componentDatatype The component datatype.
* @returns {MetadataComponentType} The type.
- *
* @private
*/
MetadataComponentType.fromComponentDatatype = function (componentDatatype) {
@@ -435,10 +410,8 @@ MetadataComponentType.fromComponentDatatype = function (componentDatatype) {
/**
* Gets the {@link ComponentDatatype} from a {@link MetadataComponentType}.
- *
* @param {MetadataComponentType} type The type.
* @returns {ComponentDatatype} The component datatype.
- *
* @private
*/
MetadataComponentType.toComponentDatatype = function (type) {
diff --git a/packages/engine/Source/Scene/MetadataEntity.js b/packages/engine/Source/Scene/MetadataEntity.js
index 750ab53dedb6..2d5d8c9d306d 100644
--- a/packages/engine/Source/Scene/MetadataEntity.js
+++ b/packages/engine/Source/Scene/MetadataEntity.js
@@ -11,10 +11,8 @@ import DeveloperError from "../Core/DeveloperError.js";
*
* See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_metadata|3DTILES_metadata Extension} for 3D Tiles
*
- *
* @alias MetadataEntity
- * @constructor
- *
+ * @class
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -23,7 +21,6 @@ function MetadataEntity() {}
Object.defineProperties(MetadataEntity.prototype, {
/**
* The class that properties conform to.
- *
* @memberof MetadataEntity.prototype
* @type {MetadataClass}
* @readonly
@@ -39,7 +36,6 @@ Object.defineProperties(MetadataEntity.prototype, {
/**
* Returns whether the entity has this property.
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {boolean} Whether the entity has this property.
* @private
@@ -50,7 +46,6 @@ MetadataEntity.prototype.hasProperty = function (propertyId) {
/**
* Returns whether the entity has a property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @returns {boolean} Whether the entity has a property with the given semantic.
* @private
@@ -61,7 +56,6 @@ MetadataEntity.prototype.hasPropertyBySemantic = function (semantic) {
/**
* Returns an array of property IDs.
- *
* @param {string[]} [results] An array into which to store the results.
* @returns {string[]} The property IDs.
* @private
@@ -75,7 +69,6 @@ MetadataEntity.prototype.getPropertyIds = function (results) {
*
* If the property is normalized the normalized value is returned.
*
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {*} The value of the property or undefined
if the entity does not have this property.
* @private
@@ -89,7 +82,6 @@ MetadataEntity.prototype.getProperty = function (propertyId) {
*
* If the property is normalized a normalized value must be provided to this function.
*
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @param {*} value The value of the property that will be copied.
* @returns {boolean} true
if the property was set, false
otherwise.
@@ -101,7 +93,6 @@ MetadataEntity.prototype.setProperty = function (propertyId, value) {
/**
* Returns a copy of the value of the property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @returns {*} The value of the property or undefined
if the entity does not have this property.
* @private
@@ -112,7 +103,6 @@ MetadataEntity.prototype.getPropertyBySemantic = function (semantic) {
/**
* Sets the value of the property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @param {*} value The value of the property that will be copied.
* @returns {boolean} true
if the property was set, false
otherwise.
@@ -124,12 +114,10 @@ MetadataEntity.prototype.setPropertyBySemantic = function (semantic, value) {
/**
* Returns whether the entity has this property.
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @param {object} properties The dictionary containing properties.
* @param {MetadataClass} classDefinition The class.
* @returns {boolean} Whether the entity has this property.
- *
* @private
*/
MetadataEntity.hasProperty = function (
@@ -162,12 +150,10 @@ MetadataEntity.hasProperty = function (
/**
* Returns whether the entity has a property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @param {object} properties The dictionary containing properties.
* @param {MetadataClass} classDefinition The class.
* @returns {boolean} Whether the entity has a property with the given semantic.
- *
* @private
*/
MetadataEntity.hasPropertyBySemantic = function (
@@ -192,12 +178,10 @@ MetadataEntity.hasPropertyBySemantic = function (
/**
* Returns an array of property IDs.
- *
* @param {object} properties The dictionary containing properties.
* @param {MetadataClass} classDefinition The class.
* @param {string[]} [results] An array into which to store the results.
* @returns {string[]} The property IDs.
- *
* @private
*/
MetadataEntity.getPropertyIds = function (
@@ -245,12 +229,10 @@ MetadataEntity.getPropertyIds = function (
*
* If the property is normalized the normalized value is returned.
*
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @param {object} properties The dictionary containing properties.
* @param {MetadataClass} classDefinition The class.
* @returns {*} The value of the property or undefined
if the entity does not have this property.
- *
* @private
*/
MetadataEntity.getProperty = function (
@@ -300,13 +282,11 @@ MetadataEntity.getProperty = function (
*
* If the property is normalized a normalized value must be provided to this function.
*
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @param {*} value The value of the property that will be copied.
* @param {object} properties The dictionary containing properties.
* @param {MetadataClass} classDefinition The class.
* @returns {boolean} true
if the property was set, false
otherwise.
- *
* @private
*/
MetadataEntity.setProperty = function (
@@ -350,12 +330,10 @@ MetadataEntity.setProperty = function (
/**
* Returns a copy of the value of the property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @param {object} properties The dictionary containing properties.
* @param {MetadataClass} classDefinition The class.
* @returns {*} The value of the property or undefined
if the entity does not have this property.
- *
* @private
*/
MetadataEntity.getPropertyBySemantic = function (
@@ -383,7 +361,6 @@ MetadataEntity.getPropertyBySemantic = function (
/**
* Sets the value of the property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @param {*} value The value of the property that will be copied.
* @param {object} properties The dictionary containing properties.
diff --git a/packages/engine/Source/Scene/MetadataEnum.js b/packages/engine/Source/Scene/MetadataEnum.js
index ed23d940cd4e..06295fb1406c 100644
--- a/packages/engine/Source/Scene/MetadataEnum.js
+++ b/packages/engine/Source/Scene/MetadataEnum.js
@@ -9,18 +9,16 @@ import MetadataComponentType from "./MetadataComponentType.js";
*
* See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Metadata|3D Metadata Specification} for 3D Tiles
*
- *
* @param {object} options Object with the following properties:
* @param {string} options.id The ID of the enum.
* @param {MetadataEnumValue[]} options.values The enum values.
- * @param {MetadataComponentType} [options.valueType=MetadataComponentType.UINT16] The enum value type.
+ * @param {MetadataComponentType} [options.valueType] The enum value type.
* @param {string} [options.name] The name of the enum.
* @param {string} [options.description] The description of the enum.
* @param {*} [options.extras] Extra user-defined properties.
* @param {object} [options.extensions] An object containing extensions.
- *
* @alias MetadataEnum
- * @constructor
+ * @class
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
function MetadataEnum(options) {
@@ -61,13 +59,10 @@ function MetadataEnum(options) {
/**
* Creates a {@link MetadataEnum} from either 3D Tiles 1.1, 3DTILES_metadata, EXT_structural_metadata, or EXT_feature_metadata.
- *
* @param {object} options Object with the following properties:
* @param {string} options.id The ID of the enum.
* @param {object} options.enum The enum JSON object.
- *
* @returns {MetadataEnum} The newly created metadata enum.
- *
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -99,7 +94,6 @@ MetadataEnum.fromJson = function (options) {
Object.defineProperties(MetadataEnum.prototype, {
/**
* The enum values.
- *
* @memberof MetadataEnum.prototype
* @type {MetadataEnumValue[]}
* @readonly
@@ -112,11 +106,9 @@ Object.defineProperties(MetadataEnum.prototype, {
/**
* A dictionary mapping enum integer values to names.
- *
* @memberof MetadataEnum.prototype
* @type {Object}
* @readonly
- *
* @private
*/
namesByValue: {
@@ -127,11 +119,9 @@ Object.defineProperties(MetadataEnum.prototype, {
/**
* A dictionary mapping enum names to integer values.
- *
* @memberof MetadataEnum.prototype
* @type {Object}
* @readonly
- *
* @private
*/
valuesByName: {
@@ -142,7 +132,6 @@ Object.defineProperties(MetadataEnum.prototype, {
/**
* The enum value type.
- *
* @memberof MetadataEnum.prototype
* @type {MetadataComponentType}
* @readonly
@@ -155,7 +144,6 @@ Object.defineProperties(MetadataEnum.prototype, {
/**
* The ID of the enum.
- *
* @memberof MetadataEnum.prototype
* @type {string}
* @readonly
@@ -168,7 +156,6 @@ Object.defineProperties(MetadataEnum.prototype, {
/**
* The name of the enum.
- *
* @memberof MetadataEnum.prototype
* @type {string}
* @readonly
@@ -181,7 +168,6 @@ Object.defineProperties(MetadataEnum.prototype, {
/**
* The description of the enum.
- *
* @memberof MetadataEnum.prototype
* @type {string}
* @readonly
@@ -194,7 +180,6 @@ Object.defineProperties(MetadataEnum.prototype, {
/**
* Extra user-defined properties.
- *
* @memberof MetadataEnum.prototype
* @type {*}
* @readonly
@@ -207,7 +192,6 @@ Object.defineProperties(MetadataEnum.prototype, {
/**
* An object containing extensions.
- *
* @memberof MetadataEnum.prototype
* @type {object}
* @readonly
diff --git a/packages/engine/Source/Scene/MetadataEnumValue.js b/packages/engine/Source/Scene/MetadataEnumValue.js
index d08232daf26e..1459ab2ad5b7 100644
--- a/packages/engine/Source/Scene/MetadataEnumValue.js
+++ b/packages/engine/Source/Scene/MetadataEnumValue.js
@@ -7,16 +7,14 @@ import defaultValue from "../Core/defaultValue.js";
*
* See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Metadata|3D Metadata Specification} for 3D Tiles
*
- *
* @param {object} options Object with the following properties:
* @param {number} options.value The integer value.
* @param {string} options.name The name of the enum value.
* @param {string} [options.description] The description of the enum value.
* @param {*} [options.extras] Extra user-defined properties.
* @param {object} [options.extensions] An object containing extensions.
- *
* @alias MetadataEnumValue
- * @constructor
+ * @class
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
function MetadataEnumValue(options) {
@@ -39,11 +37,8 @@ function MetadataEnumValue(options) {
/**
* Creates a {@link MetadataEnumValue} from either 3D Tiles 1.1, 3DTILES_metadata, EXT_structural_metadata, or EXT_feature_metadata.
- *
* @param {object} value The enum value JSON object.
- *
* @returns {MetadataEnumValue} The newly created metadata enum value.
- *
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -64,7 +59,6 @@ MetadataEnumValue.fromJson = function (value) {
Object.defineProperties(MetadataEnumValue.prototype, {
/**
* The integer value.
- *
* @memberof MetadataEnumValue.prototype
* @type {number}
* @readonly
@@ -77,7 +71,6 @@ Object.defineProperties(MetadataEnumValue.prototype, {
/**
* The name of the enum value.
- *
* @memberof MetadataEnumValue.prototype
* @type {string}
* @readonly
@@ -90,7 +83,6 @@ Object.defineProperties(MetadataEnumValue.prototype, {
/**
* The description of the enum value.
- *
* @memberof MetadataEnumValue.prototype
* @type {string}
* @readonly
@@ -103,7 +95,6 @@ Object.defineProperties(MetadataEnumValue.prototype, {
/**
* Extra user-defined properties.
- *
* @memberof MetadataEnumValue.prototype
* @type {*}
* @readonly
@@ -116,7 +107,6 @@ Object.defineProperties(MetadataEnumValue.prototype, {
/**
* An object containing extensions.
- *
* @memberof MetadataEnumValue.prototype
* @type {object}
* @readonly
diff --git a/packages/engine/Source/Scene/MetadataSchema.js b/packages/engine/Source/Scene/MetadataSchema.js
index b9fb5c0b505d..71f79b99c893 100644
--- a/packages/engine/Source/Scene/MetadataSchema.js
+++ b/packages/engine/Source/Scene/MetadataSchema.js
@@ -10,7 +10,6 @@ import MetadataEnum from "./MetadataEnum.js";
*
* See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Metadata|3D Metadata Specification} for 3D Tiles
*
- *
* @param {object} options Object with the following properties:
* @param {string} [options.id] The ID of the schema
* @param {string} [options.name] The name of the schema.
@@ -20,9 +19,8 @@ import MetadataEnum from "./MetadataEnum.js";
* @param {Object} [options.enums] Enums defined in the schema, where each key is the enum ID.
* @param {*} [options.extras] Extra user-defined properties.
* @param {object} [options.extensions] An object containing extensions.
- *
* @alias MetadataSchema
- * @constructor
+ * @class
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
function MetadataSchema(options) {
@@ -43,11 +41,8 @@ function MetadataSchema(options) {
/**
* Creates a {@link MetadataSchema} from either 3D Tiles 1.1, 3DTILES_metadata, EXT_structural_metadata, or EXT_feature_metadata.
- *
* @param {object} schema The schema JSON object.
- *
* @returns {MetadataSchema} The newly created metadata schema
- *
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -96,7 +91,6 @@ MetadataSchema.fromJson = function (schema) {
Object.defineProperties(MetadataSchema.prototype, {
/**
* Classes defined in the schema.
- *
* @memberof MetadataSchema.prototype
* @type {Object}
* @readonly
@@ -109,7 +103,6 @@ Object.defineProperties(MetadataSchema.prototype, {
/**
* Enums defined in the schema.
- *
* @memberof MetadataSchema.prototype
* @type {Object}
* @readonly
@@ -122,7 +115,6 @@ Object.defineProperties(MetadataSchema.prototype, {
/**
* The ID of the schema.
- *
* @memberof MetadataSchema.prototype
* @type {string}
* @readonly
@@ -135,7 +127,6 @@ Object.defineProperties(MetadataSchema.prototype, {
/**
* The name of the schema.
- *
* @memberof MetadataSchema.prototype
* @type {string}
* @readonly
@@ -148,7 +139,6 @@ Object.defineProperties(MetadataSchema.prototype, {
/**
* The description of the schema.
- *
* @memberof MetadataSchema.prototype
* @type {string}
* @readonly
@@ -161,7 +151,6 @@ Object.defineProperties(MetadataSchema.prototype, {
/**
* The application-specific version of the schema.
- *
* @memberof MetadataSchema.prototype
* @type {string}
* @readonly
@@ -174,7 +163,6 @@ Object.defineProperties(MetadataSchema.prototype, {
/**
* Extra user-defined properties.
- *
* @memberof MetadataSchema.prototype
* @type {*}
* @readonly
@@ -187,7 +175,6 @@ Object.defineProperties(MetadataSchema.prototype, {
/**
* An object containing extensions.
- *
* @memberof MetadataSchema.prototype
* @type {object}
* @readonly
diff --git a/packages/engine/Source/Scene/MetadataSchemaLoader.js b/packages/engine/Source/Scene/MetadataSchemaLoader.js
index f4a674920336..43f84f35732e 100644
--- a/packages/engine/Source/Scene/MetadataSchemaLoader.js
+++ b/packages/engine/Source/Scene/MetadataSchemaLoader.js
@@ -10,18 +10,14 @@ import ResourceLoaderState from "./ResourceLoaderState.js";
*
* Implements the {@link ResourceLoader} interface.
*
- *
* @alias MetadataSchemaLoader
- * @constructor
+ * @class
* @augments ResourceLoader
- *
* @param {object} options Object with the following properties:
* @param {object} [options.schema] An object that explicitly defines a schema JSON. Mutually exclusive with options.resource.
* @param {Resource} [options.resource] The {@link Resource} pointing to the schema JSON. Mutually exclusive with options.schema.
* @param {string} [options.cacheKey] The cache key of the resource.
- *
- * @exception {DeveloperError} One of options.schema and options.resource must be defined.
- *
+ * @throws {DeveloperError} One of options.schema and options.resource must be defined.
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -54,9 +50,7 @@ if (defined(Object.create)) {
Object.defineProperties(MetadataSchemaLoader.prototype, {
/**
* The cache key of the resource.
- *
* @memberof MetadataSchemaLoader.prototype
- *
* @type {string}
* @readonly
* @private
@@ -68,9 +62,7 @@ Object.defineProperties(MetadataSchemaLoader.prototype, {
},
/**
* The metadata schema object.
- *
* @memberof MetadataSchemaLoader.prototype
- *
* @type {MetadataSchema}
* @readonly
* @private
diff --git a/packages/engine/Source/Scene/MetadataSemantic.js b/packages/engine/Source/Scene/MetadataSemantic.js
index 867af8ac5fbc..ba3116ec75b7 100644
--- a/packages/engine/Source/Scene/MetadataSemantic.js
+++ b/packages/engine/Source/Scene/MetadataSemantic.js
@@ -1,8 +1,6 @@
/**
* An enum of built-in semantics.
- *
* @enum MetadataSemantic
- *
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
* @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Metadata/Semantics|3D Metadata Semantic Reference}
@@ -10,7 +8,6 @@
const MetadataSemantic = {
/**
* A unique identifier, stored as a STRING
.
- *
* @type {string}
* @constant
* @private
@@ -18,7 +15,6 @@ const MetadataSemantic = {
ID: "ID",
/**
* A name, stored as a STRING
. This does not have to be unique.
- *
* @type {string}
* @constant
* @private
@@ -26,7 +22,6 @@ const MetadataSemantic = {
NAME: "NAME",
/**
* A description, stored as a STRING
.
- *
* @type {string}
* @constant
* @private
@@ -34,7 +29,6 @@ const MetadataSemantic = {
DESCRIPTION: "DESCRIPTION",
/**
* The number of tiles in a tileset, stored as a UINT64
.
- *
* @type {string}
* @constant
* @private
@@ -42,7 +36,6 @@ const MetadataSemantic = {
TILESET_TILE_COUNT: "TILESET_TILE_COUNT",
/**
* A bounding box for a tile, stored as an array of 12 FLOAT32
or FLOAT64
components. The components are the same format as for boundingVolume.box
in 3D Tiles 1.0. This semantic is used to provide a tighter bounding volume than the one implicitly calculated in implicit tiling.
- *
* @type {string}
* @constant
* @private
@@ -50,7 +43,6 @@ const MetadataSemantic = {
TILE_BOUNDING_BOX: "TILE_BOUNDING_BOX",
/**
* A bounding region for a tile, stored as an array of 6 FLOAT64
components. The components are [west, south, east, north, minimumHeight, maximumHeight]
. This semantic is used to provide a tighter bounding volume than the one implicitly calculated in implicit tiling.
- *
* @type {string}
* @constant
* @private
@@ -58,7 +50,6 @@ const MetadataSemantic = {
TILE_BOUNDING_REGION: "TILE_BOUNDING_REGION",
/**
* A bounding sphere for a tile, stored as an array of 4 FLOAT32
or FLOAT64
components. The components are [centerX, centerY, centerZ, radius]
. This semantic is used to provide a tighter bounding volume than the one implicitly calculated in implicit tiling.
- *
* @type {string}
* @constant
* @private
@@ -66,7 +57,6 @@ const MetadataSemantic = {
TILE_BOUNDING_SPHERE: "TILE_BOUNDING_SPHERE",
/**
* The minimum height of a tile above (or below) the WGS84 ellipsoid, stored as a FLOAT32
or a FLOAT64
. This semantic is used to tighten bounding regions implicitly calculated in implicit tiling.
- *
* @type {string}
* @constant
* @private
@@ -74,7 +64,6 @@ const MetadataSemantic = {
TILE_MINIMUM_HEIGHT: "TILE_MINIMUM_HEIGHT",
/**
* The maximum height of a tile above (or below) the WGS84 ellipsoid, stored as a FLOAT32
or a FLOAT64
. This semantic is used to tighten bounding regions implicitly calculated in implicit tiling.
- *
* @type {string}
* @constant
* @private
@@ -82,9 +71,7 @@ const MetadataSemantic = {
TILE_MAXIMUM_HEIGHT: "TILE_MAXIMUM_HEIGHT",
/**
* The horizon occlusion point for a tile, stored as an VEC3
of FLOAT32
or FLOAT64
components.
- *
* @see {@link https://cesium.com/blog/2013/04/25/horizon-culling/|Horizon Culling}
- *
* @type {string}
* @constant
* @private
@@ -92,7 +79,6 @@ const MetadataSemantic = {
TILE_HORIZON_OCCLUSION_POINT: "TILE_HORIZON_OCCLUSION_POINT",
/**
* The geometric error for a tile, stored as a FLOAT32
or a FLOAT64
. This semantic is used to override the geometric error implicitly calculated in implicit tiling.
- *
* @type {string}
* @constant
* @private
@@ -100,7 +86,6 @@ const MetadataSemantic = {
TILE_GEOMETRIC_ERROR: "TILE_GEOMETRIC_ERROR",
/**
* A bounding box for the content of a tile, stored as an array of 12 FLOAT32
or FLOAT64
components. The components are the same format as for boundingVolume.box
in 3D Tiles 1.0. This semantic is used to provide a tighter bounding volume than the one implicitly calculated in implicit tiling.
- *
* @type {string}
* @constant
* @private
@@ -108,7 +93,6 @@ const MetadataSemantic = {
CONTENT_BOUNDING_BOX: "CONTENT_BOUNDING_BOX",
/**
* A bounding region for the content of a tile, stored as an array of 6 FLOAT64
components. The components are [west, south, east, north, minimumHeight, maximumHeight]
. This semantic is used to provide a tighter bounding volume than the one implicitly calculated in implicit tiling.
- *
* @type {string}
* @constant
* @private
@@ -116,7 +100,6 @@ const MetadataSemantic = {
CONTENT_BOUNDING_REGION: "CONTENT_BOUNDING_REGION",
/**
* A bounding sphere for the content of a tile, stored as an array of 4 FLOAT32
or FLOAT64
components. The components are [centerX, centerY, centerZ, radius]
. This semantic is used to provide a tighter bounding volume than the one implicitly calculated in implicit tiling.
- *
* @type {string}
* @constant
* @private
@@ -124,7 +107,6 @@ const MetadataSemantic = {
CONTENT_BOUNDING_SPHERE: "CONTENT_BOUNDING_SPHERE",
/**
* The minimum height of the content of a tile above (or below) the WGS84 ellipsoid, stored as a FLOAT32
or a FLOAT64
- *
* @type {string}
* @constant
* @private
@@ -132,7 +114,6 @@ const MetadataSemantic = {
CONTENT_MINIMUM_HEIGHT: "CONTENT_MINIMUM_HEIGHT",
/**
* The maximum height of the content of a tile above (or below) the WGS84 ellipsoid, stored as a FLOAT32
or a FLOAT64
- *
* @type {string}
* @constant
* @private
@@ -140,9 +121,7 @@ const MetadataSemantic = {
CONTENT_MAXIMUM_HEIGHT: "CONTENT_MAXIMUM_HEIGHT",
/**
* The horizon occlusion point for the content of a tile, stored as an VEC3
of FLOAT32
or FLOAT64
components.
- *
* @see {@link https://cesium.com/blog/2013/04/25/horizon-culling/|Horizon Culling}
- *
* @type {string}
* @constant
* @private
diff --git a/packages/engine/Source/Scene/MetadataTable.js b/packages/engine/Source/Scene/MetadataTable.js
index 9a3857716060..1fda5e66d624 100644
--- a/packages/engine/Source/Scene/MetadataTable.js
+++ b/packages/engine/Source/Scene/MetadataTable.js
@@ -12,16 +12,13 @@ import MetadataTableProperty from "./MetadataTableProperty.js";
*
* For 3D Tiles Next details, see the {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_metadata|3DTILES_metadata Extension} for 3D Tiles, as well as the {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata|EXT_feature_metadata Extension} for glTF.
*
- *
* @param {object} options Object with the following properties:
* @param {number} options.count The number of entities in the table.
* @param {object} [options.properties] A dictionary containing properties.
* @param {MetadataClass} options.class The class that properties conform to.
* @param {Object} [options.bufferViews] An object mapping bufferView IDs to Uint8Array objects.
- *
* @alias MetadataTable
- * @constructor
- *
+ * @class
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -61,7 +58,6 @@ function MetadataTable(options) {
Object.defineProperties(MetadataTable.prototype, {
/**
* The number of entities in the table.
- *
* @memberof MetadataTable.prototype
* @type {number}
* @readonly
@@ -75,7 +71,6 @@ Object.defineProperties(MetadataTable.prototype, {
/**
* The class that properties conform to.
- *
* @memberof MetadataTable.prototype
* @type {MetadataClass}
* @readonly
@@ -89,7 +84,6 @@ Object.defineProperties(MetadataTable.prototype, {
/**
* The size of all typed arrays used in this table.
- *
* @memberof MetadataTable.prototype
* @type {number}
* @readonly
@@ -104,7 +98,6 @@ Object.defineProperties(MetadataTable.prototype, {
/**
* Returns whether the table has this property.
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {boolean} Whether the table has this property.
* @private
@@ -115,7 +108,6 @@ MetadataTable.prototype.hasProperty = function (propertyId) {
/**
* Returns whether the table has a property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @returns {boolean} Whether the table has a property with the given semantic.
* @private
@@ -130,7 +122,6 @@ MetadataTable.prototype.hasPropertyBySemantic = function (semantic) {
/**
* Returns an array of property IDs.
- *
* @param {string[]} [results] An array into which to store the results.
* @returns {string[]} The property IDs.
* @private
@@ -156,12 +147,10 @@ MetadataTable.prototype.getPropertyIds = function (results) {
* of integer precision. Values greater than 2^53 - 1 or less than -(2^53 - 1)
* may lose precision when read.
*
- *
* @param {number} index The index of the entity.
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {*} The value of the property or undefined
if the entity does not have this property.
- *
- * @exception {DeveloperError} index is required and between zero and count - 1
+ * @throws {DeveloperError} index is required and between zero and count - 1
* @private
*/
MetadataTable.prototype.getProperty = function (index, propertyId) {
@@ -199,16 +188,14 @@ MetadataTable.prototype.getProperty = function (index, propertyId) {
* of integer precision. Values greater than 2^53 - 1 or less than -(2^53 - 1)
* may lose precision when set."
*
- *
* @param {number} index The index of the entity.
* @param {string} propertyId The case-sensitive ID of the property.
* @param {*} value The value of the property that will be copied.
* @returns {boolean} true
if the property was set, false
otherwise.
- *
- * @exception {DeveloperError} index is required and between zero and count - 1
- * @exception {DeveloperError} value does not match type
- * @exception {DeveloperError} value is out of range for type
- * @exception {DeveloperError} Array length does not match componentCount
+ * @throws {DeveloperError} index is required and between zero and count - 1
+ * @throws {DeveloperError} value does not match type
+ * @throws {DeveloperError} value is out of range for type
+ * @throws {DeveloperError} Array length does not match componentCount
* @private
*/
MetadataTable.prototype.setProperty = function (index, propertyId, value) {
@@ -227,12 +214,10 @@ MetadataTable.prototype.setProperty = function (index, propertyId, value) {
/**
* Returns a copy of the value of the property with the given semantic.
- *
* @param {number} index The index of the entity.
* @param {string} semantic The case-sensitive semantic of the property.
* @returns {*} The value of the property or undefined
if the entity does not have this semantic.
- *
- * @exception {DeveloperError} index is required and between zero and count - 1
+ * @throws {DeveloperError} index is required and between zero and count - 1
* @private
*/
MetadataTable.prototype.getPropertyBySemantic = function (index, semantic) {
@@ -255,16 +240,14 @@ MetadataTable.prototype.getPropertyBySemantic = function (index, semantic) {
/**
* Sets the value of the property with the given semantic.
- *
* @param {number} index The index of the entity.
* @param {string} semantic The case-sensitive semantic of the property.
* @param {*} value The value of the property that will be copied.
* @returns {boolean} true
if the property was set, false
otherwise.
- *
- * @exception {DeveloperError} index is required and between zero and count - 1
- * @exception {DeveloperError} value does not match type
- * @exception {DeveloperError} value is out of range for type
- * @exception {DeveloperError} Array length does not match componentCount
+ * @throws {DeveloperError} index is required and between zero and count - 1
+ * @throws {DeveloperError} value does not match type
+ * @throws {DeveloperError} value is out of range for type
+ * @throws {DeveloperError} Array length does not match componentCount
* @private
*/
MetadataTable.prototype.setPropertyBySemantic = function (
@@ -291,10 +274,8 @@ MetadataTable.prototype.setPropertyBySemantic = function (
/**
* Returns a typed array containing the property values for a given propertyId.
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {*} The typed array containing the property values or undefined
if the property values are not stored in a typed array.
- *
* @private
*/
MetadataTable.prototype.getPropertyTypedArray = function (propertyId) {
@@ -313,10 +294,8 @@ MetadataTable.prototype.getPropertyTypedArray = function (propertyId) {
/**
* Returns a typed array containing the property values for the property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @returns {*} The typed array containing the property values or undefined
if the property values are not stored in a typed array.
- *
* @private
*/
MetadataTable.prototype.getPropertyTypedArrayBySemantic = function (semantic) {
diff --git a/packages/engine/Source/Scene/MetadataTableProperty.js b/packages/engine/Source/Scene/MetadataTableProperty.js
index 8198e0151652..82e29f8224a5 100644
--- a/packages/engine/Source/Scene/MetadataTableProperty.js
+++ b/packages/engine/Source/Scene/MetadataTableProperty.js
@@ -18,16 +18,13 @@ import MetadataType from "./MetadataType.js";
* for 3D Tiles, as well as the {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_structural_metadata|EXT_structural_metadata Extension}
* for glTF. For the legacy glTF extension, see {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata|EXT_feature_metadata Extension}
*
- *
* @param {object} options Object with the following properties:
* @param {number} options.count The number of elements in each property array.
* @param {object} options.property The property JSON object.
* @param {MetadataClassProperty} options.classProperty The class property.
* @param {Object} options.bufferViews An object mapping bufferView IDs to Uint8Array objects.
- *
* @alias MetadataTableProperty
- * @constructor
- *
+ * @class
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -224,7 +221,6 @@ Object.defineProperties(MetadataTableProperty.prototype, {
/**
* True if offset/scale should be applied. If both offset/scale were
* undefined, they default to identity so this property is set false
- *
* @memberof MetadataClassProperty.prototype
* @type {boolean}
* @readonly
@@ -238,7 +234,6 @@ Object.defineProperties(MetadataTableProperty.prototype, {
/**
* The offset to be added to property values as part of the value transform.
- *
* @memberof MetadataClassProperty.prototype
* @type {number|number[]|number[][]}
* @readonly
@@ -252,7 +247,6 @@ Object.defineProperties(MetadataTableProperty.prototype, {
/**
* The scale to be multiplied to property values as part of the value transform.
- *
* @memberof MetadataClassProperty.prototype
* @type {number|number[]|number[][]}
* @readonly
@@ -266,7 +260,6 @@ Object.defineProperties(MetadataTableProperty.prototype, {
/**
* Extra user-defined properties.
- *
* @memberof MetadataTableProperty.prototype
* @type {*}
* @readonly
@@ -280,7 +273,6 @@ Object.defineProperties(MetadataTableProperty.prototype, {
/**
* An object containing extensions.
- *
* @memberof MetadataTableProperty.prototype
* @type {*}
* @readonly
@@ -294,7 +286,6 @@ Object.defineProperties(MetadataTableProperty.prototype, {
/**
* Size of all typed arrays used by this table property
- *
* @memberof MetadataTableProperty.prototype
* @type {Normal}
* @readonly
@@ -309,10 +300,8 @@ Object.defineProperties(MetadataTableProperty.prototype, {
/**
* Returns a copy of the value at the given index.
- *
* @param {number} index The index.
* @returns {*} The value of the property.
- *
* @private
*/
MetadataTableProperty.prototype.get = function (index) {
@@ -336,10 +325,8 @@ MetadataTableProperty.prototype.get = function (index) {
/**
* Sets the value at the given index.
- *
* @param {number} index The index.
* @param {*} value The value of the property.
- *
* @private
*/
MetadataTableProperty.prototype.set = function (index, value) {
@@ -363,9 +350,7 @@ MetadataTableProperty.prototype.set = function (index, value) {
/**
* Returns a typed array containing the property values.
- *
* @returns {*} The typed array containing the property values or undefined
if the property values are not stored in a typed array.
- *
* @private
*/
MetadataTableProperty.prototype.getTypedArray = function () {
diff --git a/packages/engine/Source/Scene/MetadataType.js b/packages/engine/Source/Scene/MetadataType.js
index 9bb0a2e8c7d5..a7b97a6e37fc 100644
--- a/packages/engine/Source/Scene/MetadataType.js
+++ b/packages/engine/Source/Scene/MetadataType.js
@@ -10,79 +10,67 @@ import Matrix4 from "../Core/Matrix4.js";
/**
* An enum of metadata types. These metadata types are containers containing
* one or more components of type {@link MetadataComponentType}
- *
* @enum {string}
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
const MetadataType = {
/**
* A single component
- *
* @type {string}
* @constant
*/
SCALAR: "SCALAR",
/**
* A vector with two components
- *
* @type {string}
* @constant
*/
VEC2: "VEC2",
/**
* A vector with three components
- *
* @type {string}
* @constant
*/
VEC3: "VEC3",
/**
* A vector with four components
- *
* @type {string}
* @constant
*/
VEC4: "VEC4",
/**
* A 2x2 matrix, stored in column-major format.
- *
* @type {string}
* @constant
*/
MAT2: "MAT2",
/**
* A 3x3 matrix, stored in column-major format.
- *
* @type {string}
* @constant
*/
MAT3: "MAT3",
/**
* A 4x4 matrix, stored in column-major format.
- *
* @type {string}
* @constant
*/
MAT4: "MAT4",
/**
* A boolean (true/false) value
- *
* @type {string}
* @constant
*/
BOOLEAN: "BOOLEAN",
/**
* A UTF-8 encoded string value
- *
* @type {string}
* @constant
*/
STRING: "STRING",
/**
* An enumerated value. This type is used in conjunction with a {@link MetadataEnum} to describe the valid values.
- *
* @see MetadataEnum
- *
* @type {string}
* @constant
*/
@@ -91,9 +79,8 @@ const MetadataType = {
/**
* Check if a type is VEC2, VEC3 or VEC4
- *
* @param {MetadataType} type The type
- * @return {boolean} true
if the type is a vector, false
otherwise
+ * @returns {boolean} true
if the type is a vector, false
otherwise
* @private
*/
MetadataType.isVectorType = function (type) {
@@ -113,9 +100,8 @@ MetadataType.isVectorType = function (type) {
/**
* Check if a type is MAT2, MAT3 or MAT4
- *
* @param {MetadataType} type The type
- * @return {boolean} true
if the type is a matrix, false
otherwise
+ * @returns {boolean} true
if the type is a matrix, false
otherwise
* @private
*/
MetadataType.isMatrixType = function (type) {
@@ -136,9 +122,8 @@ MetadataType.isMatrixType = function (type) {
/**
* Get the number of components for a vector or matrix type. e.g.
* a VECN returns N, and a MATN returns N*N. All other types return 1.
- *
* @param {MetadataType} type The type to get the component count for
- * @return {number} The number of components
+ * @returns {number} The number of components
* @private
*/
MetadataType.getComponentCount = function (type) {
@@ -175,7 +160,7 @@ MetadataType.getComponentCount = function (type) {
* Get the corresponding vector or matrix class. This is used to simplify
* packing and unpacking code.
* @param {MetadataType} type The metadata type
- * @return {object} The appropriate CartesianN class for vector types, MatrixN class for matrix types, or undefined otherwise.
+ * @returns {object} The appropriate CartesianN class for vector types, MatrixN class for matrix types, or undefined otherwise.
* @private
*/
MetadataType.getMathType = function (type) {
diff --git a/packages/engine/Source/Scene/Model/AlphaPipelineStage.js b/packages/engine/Source/Scene/Model/AlphaPipelineStage.js
index 2f1d542f6d6f..a54df1855ff1 100644
--- a/packages/engine/Source/Scene/Model/AlphaPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/AlphaPipelineStage.js
@@ -6,9 +6,7 @@ import Pass from "../../Renderer/Pass.js";
/**
* A pipeline stage for configuring the alpha options for handling translucency.
- *
* @namespace AlphaPipelineStage
- *
* @private
*/
const AlphaPipelineStage = {
diff --git a/packages/engine/Source/Scene/Model/AtmospherePipelineStage.js b/packages/engine/Source/Scene/Model/AtmospherePipelineStage.js
index 46b9e97debda..9e886d374e15 100644
--- a/packages/engine/Source/Scene/Model/AtmospherePipelineStage.js
+++ b/packages/engine/Source/Scene/Model/AtmospherePipelineStage.js
@@ -7,9 +7,7 @@ import AtmosphereStageVS from "../../Shaders/Model/AtmosphereStageVS.js";
/**
* The atmosphere pipeline stage applies all earth atmosphere effects that apply
* to models, including fog.
- *
* @namespace AtmospherePipelineStage
- *
* @private
*/
const AtmospherePipelineStage = {
diff --git a/packages/engine/Source/Scene/Model/B3dmLoader.js b/packages/engine/Source/Scene/Model/B3dmLoader.js
index 600221ac4dde..c7ec3bfb2aa8 100644
--- a/packages/engine/Source/Scene/Model/B3dmLoader.js
+++ b/packages/engine/Source/Scene/Model/B3dmLoader.js
@@ -32,25 +32,23 @@ const FeatureIdAttribute = ModelComponents.FeatureIdAttribute;
*
* Implements the {@link ResourceLoader} interface.
*
- *
* @alias B3dmLoader
- * @constructor
+ * @class
* @augments ResourceLoader
* @private
- *
* @param {object} options Object with the following properties:
* @param {Resource} options.b3dmResource The {@link Resource} containing the b3dm.
* @param {ArrayBuffer} options.arrayBuffer The array buffer of the b3dm contents.
* @param {number} [options.byteOffset] The byte offset to the beginning of the b3dm contents in the array buffer.
* @param {Resource} [options.baseResource] The {@link Resource} that paths in the glTF JSON are relative to.
- * @param {boolean} [options.releaseGltfJson=false] When true, the glTF JSON is released once the glTF is loaded. This is especially useful for cases like 3D Tiles, where each .gltf model is unique and caching the glTF JSON is not effective.
- * @param {boolean} [options.asynchronous=true] Determines if WebGL resource creation will be spread out over several frames or block until all WebGL resources are created.
- * @param {boolean} [options.incrementallyLoadTextures=true] Determine if textures may continue to stream in after the glTF is loaded.
- * @param {Axis} [options.upAxis=Axis.Y] The up-axis of the glTF model.
- * @param {Axis} [options.forwardAxis=Axis.X] The forward-axis of the glTF model.
- * @param {boolean} [options.loadAttributesAsTypedArray=false] If true
, load all attributes as typed arrays instead of GPU buffers. If the attributes are interleaved in the glTF they will be de-interleaved in the typed array.
- * @param {boolean} [options.loadAttributesFor2D=false] If true
, load the positions buffer and any instanced attribute buffers as typed arrays for accurately projecting models to 2D.
- * @param {boolean} [options.enablePick=false] If true
, load the positions buffer, any instanced attribute buffers, and index buffer as typed arrays for CPU-enabled picking in WebGL1.
+ * @param {boolean} [options.releaseGltfJson] When true, the glTF JSON is released once the glTF is loaded. This is especially useful for cases like 3D Tiles, where each .gltf model is unique and caching the glTF JSON is not effective.
+ * @param {boolean} [options.asynchronous] Determines if WebGL resource creation will be spread out over several frames or block until all WebGL resources are created.
+ * @param {boolean} [options.incrementallyLoadTextures] Determine if textures may continue to stream in after the glTF is loaded.
+ * @param {Axis} [options.upAxis] The up-axis of the glTF model.
+ * @param {Axis} [options.forwardAxis] The forward-axis of the glTF model.
+ * @param {boolean} [options.loadAttributesAsTypedArray] If true
, load all attributes as typed arrays instead of GPU buffers. If the attributes are interleaved in the glTF they will be de-interleaved in the typed array.
+ * @param {boolean} [options.loadAttributesFor2D] If true
, load the positions buffer and any instanced attribute buffers as typed arrays for accurately projecting models to 2D.
+ * @param {boolean} [options.enablePick] If true
, load the positions buffer, any instanced attribute buffers, and index buffer as typed arrays for CPU-enabled picking in WebGL1.
* @param {boolean} [options.loadIndicesForWireframe=false] If true
, load the index buffer as a typed array. This is useful for creating wireframe indices in WebGL1.
* @param {boolean} [options.loadPrimitiveOutline=true] If true
, load outlines from the {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline} extension. This can be set false to avoid post-processing geometry at load time.
* @param {boolean} [options.loadForClassification=false] If true
and if the model has feature IDs, load the feature IDs and indices as typed arrays. This is useful for batching features for classification.
@@ -133,9 +131,7 @@ if (defined(Object.create)) {
Object.defineProperties(B3dmLoader.prototype, {
/**
* true if textures are loaded, useful when incrementallyLoadTextures is true
- *
* @memberof B3dmLoader.prototype
- *
* @type {boolean}
* @readonly
* @private
@@ -147,9 +143,7 @@ Object.defineProperties(B3dmLoader.prototype, {
},
/**
* The cache key of the resource
- *
* @memberof B3dmLoader.prototype
- *
* @type {string}
* @readonly
* @private
@@ -162,9 +156,7 @@ Object.defineProperties(B3dmLoader.prototype, {
/**
* The loaded components.
- *
* @memberof B3dmLoader.prototype
- *
* @type {ModelComponents.Components}
* @readonly
* @private
diff --git a/packages/engine/Source/Scene/Model/BatchTexturePipelineStage.js b/packages/engine/Source/Scene/Model/BatchTexturePipelineStage.js
index 07c0f16718de..bb602119fc05 100644
--- a/packages/engine/Source/Scene/Model/BatchTexturePipelineStage.js
+++ b/packages/engine/Source/Scene/Model/BatchTexturePipelineStage.js
@@ -3,7 +3,6 @@ import defaultValue from "../../Core/defaultValue.js";
/**
* The batch texture stage is responsible for setting up the batch texture for the primitive.
- *
* @namespace BatchTexturePipelineStage
* @private
*/
@@ -14,10 +13,9 @@ const BatchTexturePipelineStage = {
/**
* Processes a primitive. This modifies the following parts of the render resources:
*
- * adds uniforms for the batch texture
- * adds defines for multiline batch textures
+ * adds uniforms for the batch texture
+ * adds defines for multiline batch textures
*
- *
* @param {PrimitiveRenderResources} renderResources The render resources for this primitive.
* @param {ModelComponents.Primitive} primitive The primitive.
* @param {FrameState} frameState The frame state.
diff --git a/packages/engine/Source/Scene/Model/CPUStylingPipelineStage.js b/packages/engine/Source/Scene/Model/CPUStylingPipelineStage.js
index 339f6492126c..2acfd8d31d33 100644
--- a/packages/engine/Source/Scene/Model/CPUStylingPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/CPUStylingPipelineStage.js
@@ -9,9 +9,7 @@ import ShaderDestination from "../../Renderer/ShaderDestination.js";
/**
* The CPU styling stage is responsible for ensuring that the feature's color
* is applied at runtime.
- *
* @namespace CPUStylingPipelineStage
- *
* @private
*/
const CPUStylingPipelineStage = {
@@ -21,15 +19,13 @@ const CPUStylingPipelineStage = {
/**
* Processes a primitive. This modifies the following parts of the render resources:
*
- * adds the styling code to both the vertex and fragment shaders
- * adds the define to trigger the stage's shader functions
- * adds a uniform with the model's color blend mode and amount
+ * adds the styling code to both the vertex and fragment shaders
+ * adds the define to trigger the stage's shader functions
+ * adds a uniform with the model's color blend mode and amount
*
- *
* @param {PrimitiveRenderResources} renderResources The render resources for this primitive.
* @param {ModelComponents.Primitive} primitive The primitive.
* @param {FrameState} frameState The frame state.
- *
* @private
*/
CPUStylingPipelineStage.process = function (
diff --git a/packages/engine/Source/Scene/Model/ClassificationModelDrawCommand.js b/packages/engine/Source/Scene/Model/ClassificationModelDrawCommand.js
index 4d23fa50ef79..31cc32a4da74 100644
--- a/packages/engine/Source/Scene/Model/ClassificationModelDrawCommand.js
+++ b/packages/engine/Source/Scene/Model/ClassificationModelDrawCommand.js
@@ -17,14 +17,11 @@ import StencilOperation from "../StencilOperation.js";
* i.e. a {@link Model} that classifies another asset. This manages the
* derived commands and returns only the necessary commands depending on the
* given frame state.
- *
* @param {object} options An object containing the following options:
* @param {DrawCommand} options.command The draw command from which to derive other commands from.
* @param {PrimitiveRenderResources} options.primitiveRenderResources The render resources of the primitive associated with the command.
- *
* @alias ClassificationModelDrawCommand
- * @constructor
- *
+ * @class
* @private
*/
function ClassificationModelDrawCommand(options) {
@@ -316,10 +313,8 @@ function createPickCommands(drawCommand, derivedCommands, commandList) {
Object.defineProperties(ClassificationModelDrawCommand.prototype, {
/**
* The main draw command that the other commands are derived from.
- *
* @memberof ClassificationModelDrawCommand.prototype
* @type {DrawCommand}
- *
* @readonly
* @private
*/
@@ -331,10 +326,8 @@ Object.defineProperties(ClassificationModelDrawCommand.prototype, {
/**
* The runtime primitive that the draw command belongs to.
- *
* @memberof ClassificationModelDrawCommand.prototype
* @type {ModelRuntimePrimitive}
- *
* @readonly
* @private
*/
@@ -346,10 +339,8 @@ Object.defineProperties(ClassificationModelDrawCommand.prototype, {
/**
* The batch lengths used to generate multiple draw commands.
- *
* @memberof ClassificationModelDrawCommand.prototype
* @type {number[]}
- *
* @readonly
* @private
*/
@@ -361,10 +352,8 @@ Object.defineProperties(ClassificationModelDrawCommand.prototype, {
/**
* The batch offsets used to generate multiple draw commands.
- *
* @memberof ClassificationModelDrawCommand.prototype
* @type {number[]}
- *
* @readonly
* @private
*/
@@ -376,10 +365,8 @@ Object.defineProperties(ClassificationModelDrawCommand.prototype, {
/**
* The model that the draw command belongs to.
- *
* @memberof ClassificationModelDrawCommand.prototype
* @type {Model}
- *
* @readonly
* @private
*/
@@ -391,10 +378,8 @@ Object.defineProperties(ClassificationModelDrawCommand.prototype, {
/**
* The classification type of the model that this draw command belongs to.
- *
* @memberof ClassificationModelDrawCommand.prototype
* @type {ClassificationType}
- *
* @readonly
* @private
*/
@@ -406,10 +391,8 @@ Object.defineProperties(ClassificationModelDrawCommand.prototype, {
/**
* The current model matrix applied to the draw commands.
- *
* @memberof ClassificationModelDrawCommand.prototype
* @type {Matrix4}
- *
* @readonly
* @private
*/
@@ -432,10 +415,8 @@ Object.defineProperties(ClassificationModelDrawCommand.prototype, {
* The bounding volume of the main draw command. This is equivalent
* to the primitive's bounding sphere transformed by the draw
* command's model matrix.
- *
* @memberof ClassificationModelDrawCommand.prototype
* @type {BoundingSphere}
- *
* @readonly
* @private
*/
@@ -449,10 +430,8 @@ Object.defineProperties(ClassificationModelDrawCommand.prototype, {
* Culling is disabled for classification models, so this has no effect on
* how the model renders. This only exists to match the interface of
* {@link ModelDrawCommand}.
- *
* @memberof ClassificationModelDrawCommand.prototype
* @type {CullFace}
- *
* @private
*/
cullFace: {
@@ -467,12 +446,9 @@ Object.defineProperties(ClassificationModelDrawCommand.prototype, {
/**
* Pushes the draw commands necessary to render the primitive.
- *
* @param {FrameState} frameState The frame state.
* @param {DrawCommand[]} result The array to push the draw commands to.
- *
* @returns {DrawCommand[]} The modified result parameter.
- *
* @private
*/
ClassificationModelDrawCommand.prototype.pushCommands = function (
diff --git a/packages/engine/Source/Scene/Model/ClassificationPipelineStage.js b/packages/engine/Source/Scene/Model/ClassificationPipelineStage.js
index ae0e48d03f7e..6864d4252d2c 100644
--- a/packages/engine/Source/Scene/Model/ClassificationPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/ClassificationPipelineStage.js
@@ -7,9 +7,7 @@ import ModelUtility from "./ModelUtility.js";
/**
* The classification pipeline stage is responsible for batching features
* together to be rendered by the {@link ClassificationModelDrawCommand}.
- *
* @namespace ClassificationPipelineStage
- *
* @private
*/
const ClassificationPipelineStage = {
@@ -20,18 +18,16 @@ const ClassificationPipelineStage = {
* Process a primitive. This modifies the following parts of the render resources:
*
*
- * adds a define to the shader to indicate that the primitive classifies other assets
- * adds arrays containing batch lengths and offsets to the primitive's resources
+ * adds a define to the shader to indicate that the primitive classifies other assets
+ * adds arrays containing batch lengths and offsets to the primitive's resources
*
*
*
* See {@link ClassificationModelDrawCommand} for the use of the batch offsets and lengths.
*
- *
* @param {PrimitiveRenderResources} renderResources The render resources for this primitive.
* @param {ModelComponents.Primitive} primitive The primitive.
* @param {FrameState} frameState The frame state.
- *
* @private
*/
ClassificationPipelineStage.process = function (
diff --git a/packages/engine/Source/Scene/Model/CustomShader.js b/packages/engine/Source/Scene/Model/CustomShader.js
index eef3163b7d63..3a4a8545c9b3 100644
--- a/packages/engine/Source/Scene/Model/CustomShader.js
+++ b/packages/engine/Source/Scene/Model/CustomShader.js
@@ -10,11 +10,9 @@ import CustomShaderTranslucencyMode from "./CustomShaderTranslucencyMode.js";
/**
* An object describing a uniform, its type, and an initial value
- *
* @typedef {object} UniformSpecifier
* @property {UniformType} type The Glsl type of the uniform.
* @property {boolean|number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4|TextureUniform} value The initial value of the uniform
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -59,35 +57,31 @@ import CustomShaderTranslucencyMode from "./CustomShaderTranslucencyMode.js";
* If texture uniforms are used, additional resource management must be done:
*
*
- *
- * The update
function must be called each frame. When a
- * custom shader is passed to a {@link Model} or a
- * {@link Cesium3DTileset}, this step is handled automaticaly
- *
- *
- * {@link CustomShader#destroy} must be called when the custom shader is
- * no longer needed to clean up GPU resources properly. The application
- * is responsible for calling this method.
- *
+ *
+ * The update
function must be called each frame. When a
+ * custom shader is passed to a {@link Model} or a
+ * {@link Cesium3DTileset}, this step is handled automaticaly
+ *
+ *
+ * {@link CustomShader#destroy} must be called when the custom shader is
+ * no longer needed to clean up GPU resources properly. The application
+ * is responsible for calling this method.
+ *
*
*
* See the {@link https://github.com/CesiumGS/cesium/tree/main/Documentation/CustomShaderGuide|Custom Shader Guide} for more detailed documentation.
*
- *
* @param {object} options An object with the following options
- * @param {CustomShaderMode} [options.mode=CustomShaderMode.MODIFY_MATERIAL] The custom shader mode, which determines how the custom shader code is inserted into the fragment shader.
+ * @param {CustomShaderMode} [options.mode] The custom shader mode, which determines how the custom shader code is inserted into the fragment shader.
* @param {LightingModel} [options.lightingModel] The lighting model (e.g. PBR or unlit). If present, this overrides the default lighting for the model.
- * @param {CustomShaderTranslucencyMode} [options.translucencyMode=CustomShaderTranslucencyMode.INHERIT] The translucency mode, which determines how the custom shader will be applied. If the value is CustomShaderTransulcencyMode.OPAQUE or CustomShaderTransulcencyMode.TRANSLUCENT, the custom shader will override settings from the model's material. If the value is CustomShaderTransulcencyMode.INHERIT, the custom shader will render as either opaque or translucent depending on the primitive's material settings.
+ * @param {CustomShaderTranslucencyMode} [options.translucencyMode] The translucency mode, which determines how the custom shader will be applied. If the value is CustomShaderTransulcencyMode.OPAQUE or CustomShaderTransulcencyMode.TRANSLUCENT, the custom shader will override settings from the model's material. If the value is CustomShaderTransulcencyMode.INHERIT, the custom shader will render as either opaque or translucent depending on the primitive's material settings.
* @param {Object} [options.uniforms] A dictionary for user-defined uniforms. The key is the uniform name that will appear in the GLSL code. The value is an object that describes the uniform type and initial value
* @param {Object} [options.varyings] A dictionary for declaring additional GLSL varyings used in the shader. The key is the varying name that will appear in the GLSL code. The value is the data type of the varying. For each varying, the declaration will be added to the top of the shader automatically. The caller is responsible for assigning a value in the vertex shader and using the value in the fragment shader.
* @param {string} [options.vertexShaderText] The custom vertex shader as a string of GLSL code. It must include a GLSL function called vertexMain. See the example for the expected signature. If not specified, the custom vertex shader step will be skipped in the computed vertex shader.
* @param {string} [options.fragmentShaderText] The custom fragment shader as a string of GLSL code. It must include a GLSL function called fragmentMain. See the example for the expected signature. If not specified, the custom fragment shader step will be skipped in the computed fragment shader.
- *
* @alias CustomShader
- * @constructor
- *
+ * @class
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
- *
* @example
* const customShader = new CustomShader({
* uniforms: {
@@ -125,7 +119,6 @@ function CustomShader(options) {
/**
* A value determining how the custom shader interacts with the overall
* fragment shader. This is used by {@link CustomShaderPipelineStage}
- *
* @type {CustomShaderMode}
* @readonly
*/
@@ -133,14 +126,12 @@ function CustomShader(options) {
/**
* The lighting model to use when using the custom shader.
* This is used by {@link CustomShaderPipelineStage}
- *
* @type {LightingModel}
* @readonly
*/
this.lightingModel = options.lightingModel;
/**
* Additional uniforms as declared by the user.
- *
* @type {Object}
* @readonly
*/
@@ -148,21 +139,18 @@ function CustomShader(options) {
/**
* Additional varyings as declared by the user.
* This is used by {@link CustomShaderPipelineStage}
- *
* @type {Object}
* @readonly
*/
this.varyings = defaultValue(options.varyings, defaultValue.EMPTY_OBJECT);
/**
* The user-defined GLSL code for the vertex shader
- *
* @type {string}
* @readonly
*/
this.vertexShaderText = options.vertexShaderText;
/**
* The user-defined GLSL code for the fragment shader
- *
* @type {string}
* @readonly
*/
@@ -173,7 +161,6 @@ function CustomShader(options) {
* CustomShaderTransulcencyMode.OPAQUE or CustomShaderTransulcencyMode.TRANSLUCENT, the custom shader
* will override settings from the model's material. If the value isCustomShaderTransulcencyMode.INHERIT,
* the custom shader will render as either opaque or translucent depending on the primitive's material settings.
- *
* @type {CustomShaderTranslucencyMode}
* @default CustomShaderTranslucencyMode.INHERIT
* @readonly
@@ -186,7 +173,6 @@ function CustomShader(options) {
/**
* texture uniforms require some asynchronous processing. This is delegated
* to a texture manager.
- *
* @type {TextureManager}
* @readonly
* @private
@@ -195,7 +181,6 @@ function CustomShader(options) {
/**
* The default texture (from the {@link Context}) to use while textures
* are loading
- *
* @type {Texture}
* @readonly
* @private
@@ -204,7 +189,6 @@ function CustomShader(options) {
/**
* The map of uniform names to a function that returns a value. This map
* is combined with the overall uniform map used by the {@link DrawCommand}
- *
* @type {Object}
* @readonly
* @private
@@ -439,9 +423,7 @@ CustomShader.prototype.update = function (frameState) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
- *
* @see CustomShader#destroy
* @private
*/
@@ -456,12 +438,9 @@ CustomShader.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* customShader = customShader && customShader.destroy();
- *
* @see CustomShader#isDestroyed
* @private
*/
diff --git a/packages/engine/Source/Scene/Model/CustomShaderMode.js b/packages/engine/Source/Scene/Model/CustomShaderMode.js
index 2ba1b8d59dc3..baba09db8b27 100644
--- a/packages/engine/Source/Scene/Model/CustomShaderMode.js
+++ b/packages/engine/Source/Scene/Model/CustomShaderMode.js
@@ -1,16 +1,13 @@
/**
* An enum describing how the {@link CustomShader} will be added to the
* fragment shader. This determines how the shader interacts with the material.
- *
* @enum {string}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
const CustomShaderMode = {
/**
* The custom shader will be used to modify the results of the material stage
* before lighting is applied.
- *
* @type {string}
* @constant
*/
@@ -18,7 +15,6 @@ const CustomShaderMode = {
/**
* The custom shader will be used instead of the material stage. This is a hint
* to optimize out the material processing code.
- *
* @type {string}
* @constant
*/
@@ -29,8 +25,7 @@ const CustomShaderMode = {
* Convert the shader mode to an uppercase identifier for use in GLSL define
* directives. For example: #define CUSTOM_SHADER_MODIFY_MATERIAL
* @param {CustomShaderMode} customShaderMode The shader mode
- * @return {string} The name of the GLSL macro to use
- *
+ * @returns {string} The name of the GLSL macro to use
* @private
*/
CustomShaderMode.getDefineName = function (customShaderMode) {
diff --git a/packages/engine/Source/Scene/Model/CustomShaderPipelineStage.js b/packages/engine/Source/Scene/Model/CustomShaderPipelineStage.js
index dc53af42acf1..300d2037cec1 100644
--- a/packages/engine/Source/Scene/Model/CustomShaderPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/CustomShaderPipelineStage.js
@@ -17,9 +17,7 @@ import CustomShaderTranslucencyMode from "./CustomShaderTranslucencyMode.js";
* {@link Model}. The input to the callback is a struct with many
* properties that depend on the attributes of the primitive. This shader code
* is automatically generated by this stage.
- *
* @namespace CustomShaderPipelineStage
- *
* @private
*/
const CustomShaderPipelineStage = {
@@ -47,12 +45,12 @@ const CustomShaderPipelineStage = {
* Process a primitive. This modifies the following parts of the render
* resources:
*
- * Modifies the shader to include the custom shader code to the vertex and fragment shaders
- * Modifies the shader to include automatically-generated structs that serve as input to the custom shader callbacks
- * Modifies the shader to include any additional user-defined uniforms
- * Modifies the shader to include any additional user-defined varyings
- * Adds any user-defined uniforms to the uniform map
- * If the user specified a lighting model, the settings are overridden in the render resources
+ * Modifies the shader to include the custom shader code to the vertex and fragment shaders
+ * Modifies the shader to include automatically-generated structs that serve as input to the custom shader callbacks
+ * Modifies the shader to include any additional user-defined uniforms
+ * Modifies the shader to include any additional user-defined varyings
+ * Adds any user-defined uniforms to the uniform map
+ * If the user specified a lighting model, the settings are overridden in the render resources
*
*
* This pipeline stage is designed to fail gracefully where possible. If the
@@ -60,7 +58,6 @@ const CustomShaderPipelineStage = {
* defaults will be inferred (when reasonable to do so). If not, the custom
* shader will be disabled.
*
- *
* @param {PrimitiveRenderResources} renderResources The render resources for the primitive
* @param {ModelComponents.Primitive} primitive The primitive to be rendered
* @param {FrameState} frameState The frame state.
@@ -396,7 +393,6 @@ const builtinAttributes = {
/**
* Get the primitive attributes that are referenced in the shader
- *
* @private
* @param {Object} primitiveAttributes set of all the primitive's attributes
* @param {Object} shaderAttributeSet set of all attributes used in the shader
@@ -436,7 +432,6 @@ function getPrimitiveAttributesUsedInShader(
* Get the attributes that will need to have default values defined.
* Attributes referenced in the shader which are not already defined
* for the primitive and are not built-in will need default values.
- *
* @private
* @param {Object} primitiveAttributes set of all the primitive's attributes
* @param {Object} shaderAttributeSet set of all attributes used in the shader
diff --git a/packages/engine/Source/Scene/Model/CustomShaderTranslucencyMode.js b/packages/engine/Source/Scene/Model/CustomShaderTranslucencyMode.js
index aa8d5803c7a9..29447760240f 100644
--- a/packages/engine/Source/Scene/Model/CustomShaderTranslucencyMode.js
+++ b/packages/engine/Source/Scene/Model/CustomShaderTranslucencyMode.js
@@ -1,9 +1,7 @@
/**
* An enum for controling how {@link CustomShader} handles translucency compared with the original
* primitive.
- *
* @enum {number}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
const CustomShaderTranslucencyMode = {
@@ -11,21 +9,18 @@ const CustomShaderTranslucencyMode = {
* Inherit translucency settings from the primitive's material. If the primitive used a
* translucent material, the custom shader will also be considered translucent. If the primitive
* used an opaque material, the custom shader will be considered opaque.
- *
* @type {number}
* @constant
*/
INHERIT: 0,
/**
* Force the primitive to render the primitive as opaque, ignoring any material settings.
- *
* @type {number}
* @constant
*/
OPAQUE: 1,
/**
* Force the primitive to render the primitive as translucent, ignoring any material settings.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Scene/Model/DequantizationPipelineStage.js b/packages/engine/Source/Scene/Model/DequantizationPipelineStage.js
index dc5a21317b05..d54160409e9e 100644
--- a/packages/engine/Source/Scene/Model/DequantizationPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/DequantizationPipelineStage.js
@@ -7,9 +7,7 @@ import VertexAttributeSemantic from "../VertexAttributeSemantic.js";
/**
* The dequantization stage generates shader code to dequantize attributes
* in the vertex shader
- *
* @namespace DequantizationPipelineStage
- *
* @private
*/
const DequantizationPipelineStage = {
@@ -24,14 +22,12 @@ const DequantizationPipelineStage = {
* Process a primitive with quantized attributes. This stage modifies the
* following parts of the render resources:
*
- * generates dequantization function and adds it to the shader
- * adds any uniforms needed for dequantization to the shader and uniform map
+ * generates dequantization function and adds it to the shader
+ * adds any uniforms needed for dequantization to the shader and uniform map
*
- *
* @param {PrimitiveRenderResources} renderResources The render resources for this primitive.
* @param {ModelComponents.Primitive} primitive The primitive
* @param {FrameState} frameState The frame state.
- *
* @private
*/
DequantizationPipelineStage.process = function (
diff --git a/packages/engine/Source/Scene/Model/FeatureIdPipelineStage.js b/packages/engine/Source/Scene/Model/FeatureIdPipelineStage.js
index 5c3d8ef5c083..9d1e08c3bcef 100644
--- a/packages/engine/Source/Scene/Model/FeatureIdPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/FeatureIdPipelineStage.js
@@ -15,7 +15,6 @@ import Matrix3 from "../../Core/Matrix3.js";
* The feature ID pipeline stage is responsible for processing feature IDs
* (both attributes and textures), updating the shader in preparation for
* custom shaders, picking, and/or styling.
- *
* @namespace FeatureIdPipelineStage
* @private
*/
@@ -40,12 +39,11 @@ const FeatureIdPipelineStage = {
/**
* Process a primitive. This modifies the following parts of the render resources:
*
- * Adds the FeatureIds struct and corresponding initialization functions in the vertex and fragment shader
- * For each feature ID attribute, the attributes were already uploaded in the geometry stage, so just update the shader code
- * For each feature ID implicit range, a new attribute is created and uploaded to the GPU since gl_VertexID is not available in WebGL 1. The shader is updated with an attribute, varying, and initialization code.
- * For each feature ID texture, the texture is added to the uniform map, and shader code is added to perform the texture read.
+ * Adds the FeatureIds struct and corresponding initialization functions in the vertex and fragment shader
+ * For each feature ID attribute, the attributes were already uploaded in the geometry stage, so just update the shader code
+ * For each feature ID implicit range, a new attribute is created and uploaded to the GPU since gl_VertexID is not available in WebGL 1. The shader is updated with an attribute, varying, and initialization code.
+ * For each feature ID texture, the texture is added to the uniform map, and shader code is added to perform the texture read.
*
- *
* @param {PrimitiveRenderResources} renderResources The render resources for this primitive.
* @param {ModelComponents.Primitive} primitive The primitive.
* @param {FrameState} frameState The frame state.
@@ -510,6 +508,8 @@ function generateImplicitFeatureIdAttribute(
/**
* Generates a typed array for implicit feature IDs
+ * @param implicitFeatureIds
+ * @param count
* @private
*/
function generateImplicitFeatureIdTypedArray(implicitFeatureIds, count) {
diff --git a/packages/engine/Source/Scene/Model/GeoJsonLoader.js b/packages/engine/Source/Scene/Model/GeoJsonLoader.js
index 5bc67d5ec9ca..0dd399e4bc92 100644
--- a/packages/engine/Source/Scene/Model/GeoJsonLoader.js
+++ b/packages/engine/Source/Scene/Model/GeoJsonLoader.js
@@ -23,20 +23,18 @@ import BufferUsage from "../../Renderer/BufferUsage.js";
/**
* Loads a GeoJson model as part of the MAXAR_content_geojson
extension with the following constraints:
*
- * The top level GeoJSON type must be FeatureCollection or Feature.
- * The geometry types must be LineString, MultiLineString, MultiPolygon, Polygon, MultiPoint, or Point.
- * Polygon and polyline geometries are converted to geodesic lines.
- * Only WGS84 geographic coordinates are supported.
+ * The top level GeoJSON type must be FeatureCollection or Feature.
+ * The geometry types must be LineString, MultiLineString, MultiPolygon, Polygon, MultiPoint, or Point.
+ * Polygon and polyline geometries are converted to geodesic lines.
+ * Only WGS84 geographic coordinates are supported.
*
*
* Implements the {@link ResourceLoader} interface.
*
- *
* @alias GeoJsonLoader
- * @constructor
+ * @class
* @augments ResourceLoader
* @private
- *
* @param {object} options Object with the following properties:
* @param {object} options.geoJson The GeoJson object.
*/
@@ -59,9 +57,7 @@ if (defined(Object.create)) {
Object.defineProperties(GeoJsonLoader.prototype, {
/**
* The cache key of the resource.
- *
* @memberof GeoJsonLoader.prototype
- *
* @type {string}
* @readonly
* @private
@@ -73,9 +69,7 @@ Object.defineProperties(GeoJsonLoader.prototype, {
},
/**
* The loaded components.
- *
* @memberof GeoJsonLoader.prototype
- *
* @type {ModelComponents.Components}
* @readonly
* @private
@@ -98,7 +92,6 @@ GeoJsonLoader.prototype.load = function () {
/**
* Processes the resource until it becomes ready.
- *
* @param {FrameState} frameState The frame state.
* @private
*/
diff --git a/packages/engine/Source/Scene/Model/GeometryPipelineStage.js b/packages/engine/Source/Scene/Model/GeometryPipelineStage.js
index 28b769a07c96..f526e3f8fc3d 100644
--- a/packages/engine/Source/Scene/Model/GeometryPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/GeometryPipelineStage.js
@@ -14,9 +14,7 @@ import VertexAttributeSemantic from "../VertexAttributeSemantic.js";
/**
* The geometry pipeline stage processes the vertex attributes of a primitive.
- *
* @namespace GeometryPipelineStage
- *
* @private
*/
const GeometryPipelineStage = {
@@ -41,21 +39,19 @@ const GeometryPipelineStage = {
*
* Processes a primitive. This stage modifies the following parts of the render resources:
*
- * adds attribute and varying declarations for the vertex attributes in the vertex and fragment shaders
- * creates the objects required to create VertexArrays
- * sets the flag for point primitive types
+ * adds attribute and varying declarations for the vertex attributes in the vertex and fragment shaders
+ * creates the objects required to create VertexArrays
+ * sets the flag for point primitive types
*
*
* If the scene is in either 2D or CV mode, this stage also:
*
- * adds a struct field for the 2D positions
- * adds an additional attribute object and declaration if the node containing this primitive is not instanced
+ * adds a struct field for the 2D positions
+ * adds an additional attribute object and declaration if the node containing this primitive is not instanced
*
- *
* @param {PrimitiveRenderResources} renderResources The render resources for this primitive.
* @param {ModelComponents.Primitive} primitive The primitive.
* @param {FrameState} frameState The frame state.
- *
* @private
*/
GeometryPipelineStage.process = function (
diff --git a/packages/engine/Source/Scene/Model/I3dmLoader.js b/packages/engine/Source/Scene/Model/I3dmLoader.js
index 0f9457624419..bb3a88a0f71e 100644
--- a/packages/engine/Source/Scene/Model/I3dmLoader.js
+++ b/packages/engine/Source/Scene/Model/I3dmLoader.js
@@ -47,24 +47,22 @@ const Instances = ModelComponents.Instances;
*
* Implements the {@link ResourceLoader} interface.
*
- *
* @alias I3dmLoader
- * @constructor
+ * @class
* @augments ResourceLoader
* @private
- *
* @param {object} options Object with the following properties:
* @param {Resource} options.i3dmResource The {@link Resource} containing the i3dm.
* @param {ArrayBuffer} options.arrayBuffer The array buffer of the i3dm contents.
- * @param {number} [options.byteOffset=0] The byte offset to the beginning of the i3dm contents in the array buffer.
+ * @param {number} [options.byteOffset] The byte offset to the beginning of the i3dm contents in the array buffer.
* @param {Resource} [options.baseResource] The {@link Resource} that paths in the glTF JSON are relative to.
- * @param {boolean} [options.releaseGltfJson=false] When true, the glTF JSON is released once the glTF is loaded. This is is especially useful for cases like 3D Tiles, where each .gltf model is unique and caching the glTF JSON is not effective.
- * @param {boolean} [options.asynchronous=true] Determines if WebGL resource creation will be spread out over several frames or block until all WebGL resources are created.
- * @param {boolean} [options.incrementallyLoadTextures=true] Determine if textures may continue to stream in after the glTF is loaded.
- * @param {Axis} [options.upAxis=Axis.Y] The up-axis of the glTF model.
- * @param {Axis} [options.forwardAxis=Axis.X] The forward-axis of the glTF model.
- * @param {boolean} [options.loadAttributesAsTypedArray=false] Load all attributes as typed arrays instead of GPU buffers. If the attributes are interleaved in the glTF they will be de-interleaved in the typed array.
- * @param {boolean} [options.enablePick=false] If true
, load the positions buffer, any instanced attribute buffers, and index buffer as typed arrays for CPU-enabled picking in WebGL1.
+ * @param {boolean} [options.releaseGltfJson] When true, the glTF JSON is released once the glTF is loaded. This is is especially useful for cases like 3D Tiles, where each .gltf model is unique and caching the glTF JSON is not effective.
+ * @param {boolean} [options.asynchronous] Determines if WebGL resource creation will be spread out over several frames or block until all WebGL resources are created.
+ * @param {boolean} [options.incrementallyLoadTextures] Determine if textures may continue to stream in after the glTF is loaded.
+ * @param {Axis} [options.upAxis] The up-axis of the glTF model.
+ * @param {Axis} [options.forwardAxis] The forward-axis of the glTF model.
+ * @param {boolean} [options.loadAttributesAsTypedArray] Load all attributes as typed arrays instead of GPU buffers. If the attributes are interleaved in the glTF they will be de-interleaved in the typed array.
+ * @param {boolean} [options.enablePick] If true
, load the positions buffer, any instanced attribute buffers, and index buffer as typed arrays for CPU-enabled picking in WebGL1.
* @param {boolean} [options.loadIndicesForWireframe=false] Load the index buffer as a typed array so wireframe indices can be created for WebGL1.
* @param {boolean} [options.loadPrimitiveOutline=true] If true, load outlines from the {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline} extension. This can be set false to avoid post-processing geometry at load time.
*/
@@ -141,9 +139,7 @@ if (defined(Object.create)) {
Object.defineProperties(I3dmLoader.prototype, {
/**
* true if textures are loaded, useful when incrementallyLoadTextures is true
- *
* @memberof I3dmLoader.prototype
- *
* @type {boolean}
* @readonly
* @private
@@ -155,9 +151,7 @@ Object.defineProperties(I3dmLoader.prototype, {
},
/**
* The cache key of the resource
- *
* @memberof I3dmLoader.prototype
- *
* @type {string}
* @readonly
* @private
@@ -170,9 +164,7 @@ Object.defineProperties(I3dmLoader.prototype, {
/**
* The loaded components.
- *
* @memberof I3dmLoader.prototype
- *
* @type {ModelComponents.Components}
* @default {@link Matrix4.IDENTITY}
* @readonly
@@ -642,9 +634,8 @@ function createInstances(loader, components, frameState) {
* but they will point to the same buffers and typed arrays. This is so each
* node can manage memory separately, such that unloading memory for one
* node does not unload it for another.
- *
+ * @param instances
* @returns {ModelComponents.Instances}
- *
* @private
*/
function createInstancesCopy(instances) {
@@ -667,7 +658,8 @@ function createInstancesCopy(instances) {
/**
* Returns a typed array of positions from the i3dm's feature table. The positions
* returned are dequantized, if dequantization is applied.
- *
+ * @param featureTable
+ * @param instancesLength
* @private
*/
function getPositions(featureTable, instancesLength) {
diff --git a/packages/engine/Source/Scene/Model/InstancingPipelineStage.js b/packages/engine/Source/Scene/Model/InstancingPipelineStage.js
index 809a1dd06d32..baf9c7ccb8f7 100644
--- a/packages/engine/Source/Scene/Model/InstancingPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/InstancingPipelineStage.js
@@ -26,7 +26,6 @@ const modelView2DScratch = new Matrix4();
/**
* The instancing pipeline stage is responsible for handling GPU mesh instancing at the node
* level.
- *
* @namespace InstancingPipelineStage
* @private
*/
@@ -41,18 +40,17 @@ const InstancingPipelineStage = {
/**
* Process a node. This modifies the following parts of the render resources:
*
- * creates buffers for the typed arrays of each attribute, if they do not yet exist
- * adds attribute declarations for the instancing vertex attributes in the vertex shader
- * sets the instancing translation min and max to compute an accurate bounding volume
+ * creates buffers for the typed arrays of each attribute, if they do not yet exist
+ * adds attribute declarations for the instancing vertex attributes in the vertex shader
+ * sets the instancing translation min and max to compute an accurate bounding volume
*
*
* If the scene is in either 2D or CV mode, this stage also:
*
- * adds additional attributes for the transformation attributes projected to 2D
- * adds a flag to the shader to use the 2D instanced attributes
- * adds a uniform for the view model matrix in 2D
+ * adds additional attributes for the transformation attributes projected to 2D
+ * adds a flag to the shader to use the 2D instanced attributes
+ * adds a uniform for the view model matrix in 2D
*
- *
* @param {NodeRenderResources} renderResources The render resources for this node.
* @param {ModelComponents.Node} node The node.
* @param {FrameState} frameState The frame state.
diff --git a/packages/engine/Source/Scene/Model/LightingModel.js b/packages/engine/Source/Scene/Model/LightingModel.js
index 66d2f5795fe3..97dee6f0fc18 100644
--- a/packages/engine/Source/Scene/Model/LightingModel.js
+++ b/packages/engine/Source/Scene/Model/LightingModel.js
@@ -1,8 +1,6 @@
/**
* The lighting model to use for lighting a {@link Model}.
- *
* @enum {number}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
const LightingModel = {
@@ -11,7 +9,6 @@ const LightingModel = {
* diffuse color (assumed to be linear RGB, not sRGB) is used directly
* when computing out_FragColor
. The alpha mode is still
* applied.
- *
* @type {number}
* @constant
*/
@@ -20,7 +17,6 @@ const LightingModel = {
* Use physically-based rendering lighting calculations. This includes
* both PBR metallic roughness and PBR specular glossiness. Image-based
* lighting is also applied when possible.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Scene/Model/LightingPipelineStage.js b/packages/engine/Source/Scene/Model/LightingPipelineStage.js
index a2f466484ee4..19755905f54b 100644
--- a/packages/engine/Source/Scene/Model/LightingPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/LightingPipelineStage.js
@@ -7,9 +7,7 @@ import LightingModel from "./LightingModel.js";
* The lighting pipeline stage is responsible for taking a material and rendering
* it with a lighting model such as physically based rendering (PBR) or unlit
* shading
- *
* @namespace LightingPipelineStage
- *
* @private
*/
const LightingPipelineStage = {
@@ -24,7 +22,6 @@ const LightingPipelineStage = {
*
* @param {PrimitiveRenderResources} renderResources The render resources for the primitive
* @param {ModelComponents.Primitive} primitive The primitive to be rendered
- *
* @private
*/
LightingPipelineStage.process = function (renderResources, primitive) {
diff --git a/packages/engine/Source/Scene/Model/MaterialPipelineStage.js b/packages/engine/Source/Scene/Model/MaterialPipelineStage.js
index 99f630f990d4..90b46c1ce351 100644
--- a/packages/engine/Source/Scene/Model/MaterialPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/MaterialPipelineStage.js
@@ -24,14 +24,12 @@ const {
* The material pipeline stage processes textures and other uniforms needed
* to render a primitive. This handles the following material types:
*
- * Basic glTF materials (PBR metallic roughness model)
- * The `KHR_materials_specular` glTF extension
- * The `KHR_materials_pbrSpecularGlossiness` glTF extension
- * The `KHR_materials_unlit` glTF extension
+ * Basic glTF materials (PBR metallic roughness model)
+ * The `KHR_materials_specular` glTF extension
+ * The `KHR_materials_pbrSpecularGlossiness` glTF extension
+ * The `KHR_materials_unlit` glTF extension
*
- *
* @namespace MaterialPipelineStage
- *
* @private
*/
const MaterialPipelineStage = {
@@ -180,13 +178,11 @@ MaterialPipelineStage.process = function (
/**
* Process a single texture transformation and add it to the shader and uniform map.
- *
* @param {ShaderBuilder} shaderBuilder The shader builder to modify
* @param {Object} uniformMap The uniform map to modify.
* @param {ModelComponents.TextureReader} textureReader The texture to add to the shader
* @param {string} uniformName The name of the sampler uniform such as u_baseColorTexture
* @param {string} defineName The name of the texture for use in the defines, minus any prefix or suffix. For example, "BASE_COLOR" or "EMISSIVE"
- *
* @private
*/
function processTextureTransform(
@@ -218,13 +214,12 @@ function processTextureTransform(
/**
* Process a single texture and add it to the shader and uniform map.
- *
* @param {ShaderBuilder} shaderBuilder The shader builder to modify
* @param {Object} uniformMap The uniform map to modify.
* @param {ModelComponents.TextureReader} textureReader The texture to add to the shader
* @param {string} uniformName The name of the sampler uniform such as u_baseColorTexture
* @param {string} defineName The name of the texture for use in the defines, minus any prefix or suffix. For example, "BASE_COLOR" or "EMISSIVE"
- *
+ * @param defaultTexture
* @private
*/
function processTexture(
@@ -347,7 +342,6 @@ function processMaterialUniforms(
/**
* Add uniforms and defines for the KHR_materials_pbrSpecularGlossiness extension
- *
* @param {ModelComponents.SpecularGlossiness} specularGlossiness
* @param {Object} uniformMap The uniform map to modify.
* @param {ShaderBuilder} shaderBuilder
@@ -461,7 +455,6 @@ function processSpecularGlossinessUniforms(
/**
* Add uniforms and defines for the KHR_materials_specular extension
- *
* @param {ModelComponents.Specular} specular
* @param {Object} uniformMap The uniform map to modify.
* @param {ShaderBuilder} shaderBuilder
@@ -557,7 +550,6 @@ const scratchAnisotropy = new Cartesian3();
/**
* Add uniforms and defines for the KHR_materials_anisotropy extension
- *
* @param {ModelComponents.Anisotropy} anisotropy
* @param {Object} uniformMap The uniform map to modify.
* @param {ShaderBuilder} shaderBuilder
@@ -612,7 +604,6 @@ function processAnisotropyUniforms(
/**
* Add uniforms and defines for the KHR_materials_clearcoat extension
- *
* @param {ModelComponents.Clearcoat} clearcoat
* @param {Object} uniformMap The uniform map to modify.
* @param {ShaderBuilder} shaderBuilder
@@ -715,7 +706,6 @@ function processClearcoatUniforms(
/**
* Add uniforms and defines for the PBR metallic roughness model
- *
* @param {ModelComponents.MetallicRoughness} metallicRoughness
* @param {Object} uniformMap The uniform map to modify.
* @param {ShaderBuilder} shaderBuilder
diff --git a/packages/engine/Source/Scene/Model/MetadataPipelineStage.js b/packages/engine/Source/Scene/Model/MetadataPipelineStage.js
index 01bcde68b202..de28c3a9be5e 100644
--- a/packages/engine/Source/Scene/Model/MetadataPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/MetadataPipelineStage.js
@@ -11,9 +11,7 @@ import ModelUtility from "./ModelUtility.js";
* EXT_structural_metadata and inserts them into a struct in the shader.
* This struct will be used by {@link CustomShaderPipelineStage} to allow the
* user to access metadata using {@link CustomShader}
- *
* @namespace MetadataPipelineStage
- *
* @private
*/
const MetadataPipelineStage = {
@@ -122,7 +120,7 @@ MetadataPipelineStage.process = function (
* @param {PropertyAttribute[]} propertyAttributes The PropertyAttributes with properties to be described
* @param {ModelComponents.Primitive} primitive The primitive to be rendered
* @param {object} [statistics] Statistics about the properties (if the model is from a 3DTiles tileset)
- * @returns {Object[]} An array of objects containing information about each PropertyAttributeProperty
+ * @returns {object[]} An array of objects containing information about each PropertyAttributeProperty
* @private
*/
function getPropertyAttributesInfo(propertyAttributes, primitive, statistics) {
@@ -139,7 +137,7 @@ function getPropertyAttributesInfo(propertyAttributes, primitive, statistics) {
* @param {PropertyAttribute} propertyAttribute The PropertyAttribute with properties to be described
* @param {ModelComponents.Primitive} primitive The primitive to be rendered
* @param {object} [statistics] Statistics about the properties (if the model is from a 3DTiles tileset)
- * @returns {Object[]} An array of objects containing information about each PropertyAttributeProperty
+ * @returns {object[]} An array of objects containing information about each PropertyAttributeProperty
* @private
*/
function getPropertyAttributeInfo(propertyAttribute, primitive, statistics) {
@@ -179,7 +177,7 @@ function getPropertyAttributeInfo(propertyAttribute, primitive, statistics) {
* return as a flattened Array
* @param {PropertyTexture[]} propertyTextures The PropertyTextures with properties to be described
* @param {object} [statistics] Statistics about the properties (if the model is from a 3DTiles tileset)
- * @returns {Object[]} An array of objects containing information about each PropertyTextureProperty
+ * @returns {object[]} An array of objects containing information about each PropertyTextureProperty
* @private
*/
function getPropertyTexturesInfo(propertyTextures, statistics) {
@@ -195,7 +193,7 @@ function getPropertyTexturesInfo(propertyTextures, statistics) {
* Collect info about the properties of a single PropertyTexture
* @param {PropertyTexture} propertyTexture The PropertyTexture with properties to be described
* @param {object} [statistics] Statistics about the properties (if the model is from a 3DTiles tileset)
- * @returns {Object[]} An array of objects containing information about each PropertyTextureProperty
+ * @returns {object[]} An array of objects containing information about each PropertyTextureProperty
* @private
*/
function getPropertyTextureInfo(propertyTexture, statistics) {
@@ -228,7 +226,7 @@ function getPropertyTextureInfo(propertyTexture, statistics) {
/**
* Declare MetadataClass structs in the shader for each PropertyAttributeProperty and PropertyTextureProperty
* @param {ShaderBuilder} shaderBuilder The shader builder for the primitive
- * @param {Object[]} propertyInfos Information about the PropertyAttributeProperties and PropertyTextureProperties
+ * @param {object[]} propertyInfos Information about the PropertyAttributeProperties and PropertyTextureProperties
* @private
*/
function declareMetadataTypeStructs(shaderBuilder, propertyInfos) {
@@ -411,7 +409,7 @@ function addPropertyAttributePropertyMetadata(renderResources, propertyInfo) {
/**
* Update the shader for a single PropertyTextureProperty
* @param {PrimitiveRenderResources} renderResources The render resources for the primitive
- * @param {Object[]} propertyInfo Info about the PropertyTextureProperty
+ * @param {object[]} propertyInfo Info about the PropertyTextureProperty
* @private
*/
function processPropertyTextureProperty(renderResources, propertyInfo) {
@@ -604,7 +602,7 @@ function addPropertyMetadataStatistics(shaderBuilder, propertyInfo) {
/**
* Construct GLSL assignment statements to set metadata spec values in a struct
- * @param {Object[]} fieldNames An object with the following properties:
+ * @param {object[]} fieldNames An object with the following properties:
* @param {string} fieldNames[].specName The name of the property in the spec
* @param {string} fieldNames[].shaderName The name of the property in the shader
* @param {object} values A source of property values, keyed on fieldNames[].specName
@@ -628,7 +626,6 @@ function getStructAssignments(fieldNames, values, struct, type) {
/**
* Handle offset/scale transform for a property value
* This wraps the GLSL value expression with a czm_valueTransform() call
- *
* @param {object} options Object with the following properties:
* @param {string} options.valueExpression The GLSL value expression without the transform
* @param {string} options.metadataVariable The name of the GLSL variable that will contain the property value
diff --git a/packages/engine/Source/Scene/Model/Model.js b/packages/engine/Source/Scene/Model/Model.js
index 32b66a706500..ba20863c93ff 100644
--- a/packages/engine/Source/Scene/Model/Model.js
+++ b/packages/engine/Source/Scene/Model/Model.js
@@ -51,60 +51,60 @@ import pickModel from "./pickModel.js";
*
* Cesium supports glTF assets with the following extensions:
*
- *
- * {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/AGI_articulations/README.md|AGI_articulations}
- *
- *
- * {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline}
- *
- *
- * {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Vendor/CESIUM_RTC/README.md|CESIUM_RTC}
- *
- *
- * {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_instance_features|EXT_instance_features}
- *
- *
- * {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_mesh_features|EXT_mesh_features}
- *
- *
- * {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_mesh_gpu_instancing|EXT_mesh_gpu_instancing}
- *
- *
- * {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_meshopt_compression|EXT_meshopt_compression}
- *
- *
- * {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_structural_metadata|EXT_structural_metadata}
- *
- *
- * {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_texture_webp|EXT_texture_webp}
- *
- *
- * {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md|KHR_draco_mesh_compression}
- *
- *
- * {@link https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Archived/KHR_techniques_webgl/README.md|KHR_techniques_webgl}
- *
- *
- * {@link https://github.com/KhronosGroup/glTF/blob/main/extensions/1.0/Khronos/KHR_materials_common/README.md|KHR_materials_common}
- *
- *
- * {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Archived/KHR_materials_pbrSpecularGlossiness|KHR_materials_pbrSpecularGlossiness}
- *
- *
- * {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit/README.md|KHR_materials_unlit}
- *
- *
- * {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_mesh_quantization|KHR_mesh_quantization}
- *
- *
- * {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_basisu|KHR_texture_basisu}
- *
- *
- * {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_transform/README.md|KHR_texture_transform}
- *
- *
- * {@link https://github.com/KhronosGroup/glTF/blob/main/extensions/1.0/Vendor/WEB3D_quantized_attributes/README.md|WEB3D_quantized_attributes}
- *
+ *
+ * {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/AGI_articulations/README.md|AGI_articulations}
+ *
+ *
+ * {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline}
+ *
+ *
+ * {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Vendor/CESIUM_RTC/README.md|CESIUM_RTC}
+ *
+ *
+ * {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_instance_features|EXT_instance_features}
+ *
+ *
+ * {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_mesh_features|EXT_mesh_features}
+ *
+ *
+ * {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_mesh_gpu_instancing|EXT_mesh_gpu_instancing}
+ *
+ *
+ * {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_meshopt_compression|EXT_meshopt_compression}
+ *
+ *
+ * {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_structural_metadata|EXT_structural_metadata}
+ *
+ *
+ * {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_texture_webp|EXT_texture_webp}
+ *
+ *
+ * {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md|KHR_draco_mesh_compression}
+ *
+ *
+ * {@link https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Archived/KHR_techniques_webgl/README.md|KHR_techniques_webgl}
+ *
+ *
+ * {@link https://github.com/KhronosGroup/glTF/blob/main/extensions/1.0/Khronos/KHR_materials_common/README.md|KHR_materials_common}
+ *
+ *
+ * {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Archived/KHR_materials_pbrSpecularGlossiness|KHR_materials_pbrSpecularGlossiness}
+ *
+ *
+ * {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit/README.md|KHR_materials_unlit}
+ *
+ *
+ * {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_mesh_quantization|KHR_mesh_quantization}
+ *
+ *
+ * {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_basisu|KHR_texture_basisu}
+ *
+ *
+ * {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_transform/README.md|KHR_texture_transform}
+ *
+ *
+ * {@link https://github.com/KhronosGroup/glTF/blob/main/extensions/1.0/Vendor/WEB3D_quantized_attributes/README.md|WEB3D_quantized_attributes}
+ *
*
*
*
@@ -112,12 +112,11 @@ import pickModel from "./pickModel.js";
* for maximum compatibility. This is because some samplers require power of 2 textures ({@link https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Tutorial/Using_textures_in_WebGL|Using textures in WebGL})
* and KHR_texture_basisu requires multiple of 4 dimensions ({@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_basisu/README.md#additional-requirements|KHR_texture_basisu additional requirements}).
*
- *
* @alias Model
* @internalConstructor
- *
* @privateParam {ResourceLoader} options.loader The loader used to load resources for this model.
* @privateParam {ModelType} options.type Type of this model, to distinguish individual glTF files from 3D Tiles internally.
+ * @param options
* @privateParam {object} options Object with the following properties:
* @privateParam {Resource} options.resource The Resource to the 3D model.
* @privateParam {boolean} [options.show=true] Whether or not to render the model.
@@ -161,10 +160,7 @@ import pickModel from "./pickModel.js";
* @privateParam {string|number} [options.instanceFeatureIdLabel="instanceFeatureId_0"] Label of the instance feature ID set used for picking and styling. If instanceFeatureIdLabel is set to an integer N, it is converted to the string "instanceFeatureId_N" automatically. If both per-primitive and per-instance feature IDs are present, the instance feature IDs take priority.
* @privateParam {object} [options.pointCloudShading] Options for constructing a {@link PointCloudShading} object to control point attenuation based on geometric error and lighting.
* @privateParam {ClassificationType} [options.classificationType] Determines whether terrain, 3D Tiles or both will be classified by this model. This cannot be set after the model has loaded.
-
- *
* @see Model.fromGltfAsync
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=3D%20Models.html|Cesium Sandcastle Models Demo}
*/
function Model(options) {
@@ -176,7 +172,6 @@ function Model(options) {
/**
* The loader used to load resources for this model.
- *
* @type {ResourceLoader}
* @private
*/
@@ -186,10 +181,8 @@ function Model(options) {
/**
* Type of this model, to distinguish individual glTF files from 3D Tiles
* internally.
- *
* @type {ModelType}
* @readonly
- *
* @private
*/
this.type = defaultValue(options.type, ModelType.GLTF);
@@ -199,11 +192,8 @@ function Model(options) {
* When this is the identity matrix, the model is drawn in world coordinates, i.e., Earth's Cartesian WGS84 coordinates.
* Local reference frames can be used by providing a different transformation matrix, like that returned
* by {@link Transforms.eastNorthUpToFixedFrame}.
- *
* @type {Matrix4}
-
* @default {@link Matrix4.IDENTITY}
- *
* @example
* const origin = Cesium.Cartesian3.fromDegrees(-95.0, 40.0, 200000.0);
* m.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin);
@@ -221,7 +211,6 @@ function Model(options) {
/**
* The scale value after being clamped by the maximum scale parameter.
* Used to adjust bounding spheres without repeated calculation.
- *
* @type {number}
* @private
*/
@@ -234,7 +223,6 @@ function Model(options) {
/**
* Whether or not the ModelSceneGraph should call updateModelMatrix.
* This will be true if any of the model matrix, scale, minimum pixel size, or maximum scale are dirty.
- *
* @type {number}
* @private
*/
@@ -245,7 +233,6 @@ function Model(options) {
* clipping planes and image-based lighting instead of the modelMatrix. This is
* so that when models are part of a tileset, these properties get transformed
* relative to a common reference (such as the root).
- *
* @type {Matrix4}
* @private
*/
@@ -453,18 +440,14 @@ function Model(options) {
* Whether to display the outline for models using the
* {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline} extension.
* When true, outlines are displayed. When false, outlines are not displayed.
- *
* @type {boolean}
- *
* @default true
*/
this.showOutline = defaultValue(options.showOutline, true);
/**
* The color to use when rendering outlines.
- *
* @type {Color}
- *
* @default Color.BLACK
*/
this.outlineColor = defaultValue(options.outlineColor, Color.BLACK);
@@ -491,7 +474,6 @@ function Model(options) {
/**
* Used for picking primitives that wrap a model.
- *
* @private
*/
this.pickObject = options.pickObject;
@@ -577,7 +559,8 @@ function selectFeatureTableId(components, model) {
/**
* Returns whether the alpha state has changed between invisible,
* translucent, or opaque.
- *
+ * @param currentColor
+ * @param previousColor
* @private
*/
function isColorAlphaDirty(currentColor, previousColor) {
@@ -601,12 +584,9 @@ Object.defineProperties(Model.prototype, {
/**
* When true
, this model is ready to render, i.e., the external binary, image,
* and shader files were downloaded and the WebGL resources were created.
- *
* @memberof Model.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
ready: {
@@ -637,7 +617,6 @@ Object.defineProperties(Model.prototype, {
*
* If {@link Model.incrementallyLoadTextures} is true, this event will be raised before all textures are loaded and ready for rendering. Subscribe to {@link Model.texturesReadyEvent} to be notified when the textures are ready.
*
- *
* @memberof Model.prototype
* @type {Event}
* @readonly
@@ -650,9 +629,7 @@ Object.defineProperties(Model.prototype, {
/**
* Returns true if textures are loaded separately from the other glTF resources.
- *
* @memberof Model.prototype
- *
* @type {boolean}
* @readonly
* @private
@@ -667,7 +644,6 @@ Object.defineProperties(Model.prototype, {
* Gets an event that, if {@link Model.incrementallyLoadTextures} is true, is raised when the model textures are loaded and ready for rendering, i.e. when the external resources
* have been downloaded and the WebGL resources are created. Event listeners
* are passed an instance of the {@link Model}.
- *
* @memberof Model.prototype
* @type {Event}
* @readonly
@@ -689,12 +665,9 @@ Object.defineProperties(Model.prototype, {
/**
* Get the estimated memory usage statistics for this model.
- *
* @memberof Model.prototype
- *
* @type {ModelStatistics}
* @readonly
- *
* @private
*/
statistics: {
@@ -705,9 +678,7 @@ Object.defineProperties(Model.prototype, {
/**
* The currently playing glTF animations.
- *
* @memberof Model.prototype
- *
* @type {ModelAnimationCollection}
* @readonly
*/
@@ -719,10 +690,8 @@ Object.defineProperties(Model.prototype, {
/**
* Determines if the model's animations should hold a pose over frames where no keyframes are specified.
- *
* @memberof Model.prototype
* @type {boolean}
- *
* @default true
*/
clampAnimations: {
@@ -737,12 +706,9 @@ Object.defineProperties(Model.prototype, {
/**
* Whether or not to cull the model using frustum/horizon culling. If the model is part of a 3D Tiles tileset, this property
* will always be false, since the 3D Tiles culling system is used.
- *
* @memberof Model.prototype
- *
* @type {boolean}
* @readonly
- *
* @private
*/
cull: {
@@ -753,12 +719,9 @@ Object.defineProperties(Model.prototype, {
/**
* The pass to use in the {@link DrawCommand} for the opaque portions of the model.
- *
* @memberof Model.prototype
- *
* @type {Pass}
* @readonly
- *
* @private
*/
opaquePass: {
@@ -771,9 +734,7 @@ Object.defineProperties(Model.prototype, {
* Point cloud shading settings for controlling point cloud attenuation
* and lighting. For 3D Tiles, this is inherited from the
* {@link Cesium3DTileset}.
- *
* @memberof Model.prototype
- *
* @type {PointCloudShading}
*/
pointCloudShading: {
@@ -794,9 +755,7 @@ Object.defineProperties(Model.prototype, {
/**
* The model's custom shader, if it exists. Using custom shaders with a {@link Cesium3DTileStyle}
* may lead to undefined behavior.
- *
* @memberof Model.prototype
- *
* @type {CustomShader}
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -814,9 +773,7 @@ Object.defineProperties(Model.prototype, {
/**
* The scene graph of this model.
- *
* @memberof Model.prototype
- *
* @type {ModelSceneGraph}
* @private
*/
@@ -828,12 +785,9 @@ Object.defineProperties(Model.prototype, {
/**
* The tile content this model belongs to, if it is loaded as part of a {@link Cesium3DTileset}.
- *
* @memberof Model.prototype
- *
* @type {Cesium3DTileContent}
* @readonly
- *
* @private
*/
content: {
@@ -845,12 +799,9 @@ Object.defineProperties(Model.prototype, {
/**
* The height reference of the model, which determines how the model is drawn
* relative to terrain.
- *
* @memberof Model.prototype
- *
* @type {HeightReference}
* @default {HeightReference.NONE}
- *
*/
heightReference: {
get: function () {
@@ -867,13 +818,9 @@ Object.defineProperties(Model.prototype, {
/**
* Gets or sets the distance display condition, which specifies at what distance
* from the camera this model will be displayed.
- *
* @memberof Model.prototype
- *
* @type {DistanceDisplayCondition}
- *
* @default undefined
- *
*/
distanceDisplayCondition: {
get: function () {
@@ -894,12 +841,9 @@ Object.defineProperties(Model.prototype, {
/**
* The structural metadata from the EXT_structural_metadata extension
- *
* @memberof Model.prototype
- *
* @type {StructuralMetadata}
* @readonly
- *
* @private
*/
structuralMetadata: {
@@ -910,11 +854,8 @@ Object.defineProperties(Model.prototype, {
/**
* The ID for the feature table to use for picking and styling in this model.
- *
* @memberof Model.prototype
- *
* @type {number}
- *
* @private
*/
featureTableId: {
@@ -928,12 +869,9 @@ Object.defineProperties(Model.prototype, {
/**
* The feature tables for this model.
- *
* @memberof Model.prototype
- *
* @type {Array}
* @readonly
- *
* @private
*/
featureTables: {
@@ -947,13 +885,9 @@ Object.defineProperties(Model.prototype, {
/**
* A user-defined object that is returned when the model is picked.
- *
* @memberof Model.prototype
- *
* @type {object}
- *
* @default undefined
- *
* @see Scene#pick
*/
id: {
@@ -971,12 +905,9 @@ Object.defineProperties(Model.prototype, {
/**
* When true
, each primitive is pickable with {@link Scene#pick}. When false
, GPU memory is saved.
- *
* @memberof Model.prototype
- *
* @type {boolean}
* @readonly
- *
* @private
*/
allowPicking: {
@@ -987,9 +918,7 @@ Object.defineProperties(Model.prototype, {
/**
* The style to apply to the features in the model. Cannot be applied if a {@link CustomShader} is also applied.
- *
* @memberof Model.prototype
- *
* @type {Cesium3DTileStyle}
*/
style: {
@@ -1004,11 +933,8 @@ Object.defineProperties(Model.prototype, {
/**
* The color to blend with the model's rendered color.
- *
* @memberof Model.prototype
- *
* @type {Color}
- *
* @default undefined
*/
color: {
@@ -1025,11 +951,8 @@ Object.defineProperties(Model.prototype, {
/**
* Defines how the color blends with the model.
- *
* @memberof Model.prototype
- *
* @type {Cesium3DTileColorBlendMode|ColorBlendMode}
- *
* @default ColorBlendMode.HIGHLIGHT
*/
colorBlendMode: {
@@ -1043,11 +966,8 @@ Object.defineProperties(Model.prototype, {
/**
* Value used to determine the color strength when the colorBlendMode
is MIX
. A value of 0.0 results in the model's rendered color while a value of 1.0 results in a solid color, with any value in-between resulting in a mix of the two.
- *
* @memberof Model.prototype
- *
* @type {number}
- *
* @default 0.5
*/
colorBlendAmount: {
@@ -1061,11 +981,8 @@ Object.defineProperties(Model.prototype, {
/**
* The silhouette color.
- *
* @memberof Model.prototype
- *
* @type {Color}
- *
* @default Color.RED
*/
silhouetteColor: {
@@ -1084,11 +1001,8 @@ Object.defineProperties(Model.prototype, {
/**
* The size of the silhouette in pixels.
- *
* @memberof Model.prototype
- *
* @type {number}
- *
* @default 0.0
*/
silhouetteSize: {
@@ -1116,9 +1030,7 @@ Object.defineProperties(Model.prototype, {
* Gets the model's bounding sphere in world space. This does not take into account
* glTF animations, skins, or morph targets. It also does not account for
* {@link Model#minimumPixelSize}.
- *
* @memberof Model.prototype
- *
* @type {BoundingSphere}
* @readonly
*/
@@ -1146,11 +1058,8 @@ Object.defineProperties(Model.prototype, {
*
* Draws the bounding sphere for each draw command in the model.
*
- *
* @memberof Model.prototype
- *
* @type {boolean}
- *
* @default false
*/
debugShowBoundingVolume: {
@@ -1170,11 +1079,8 @@ Object.defineProperties(Model.prototype, {
*
* Draws the model in wireframe.
*
- *
* @memberof Model.prototype
- *
* @type {boolean}
- *
* @default false
*/
debugWireframe: {
@@ -1203,11 +1109,8 @@ Object.defineProperties(Model.prototype, {
/**
* Whether or not to render the model.
- *
* @memberof Model.prototype
- *
* @type {boolean}
- *
* @default true
*/
show: {
@@ -1235,9 +1138,7 @@ Object.defineProperties(Model.prototype, {
* per-instance feature IDs are present, the instance feature IDs take
* priority.
*
- *
* @memberof Model.prototype
- *
* @type {string}
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -1271,9 +1172,7 @@ Object.defineProperties(Model.prototype, {
* If both per-primitive and per-instance feature IDs are present, the
* instance feature IDs take priority.
*
- *
* @memberof Model.prototype
- *
* @type {string}
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -1301,9 +1200,7 @@ Object.defineProperties(Model.prototype, {
/**
* The {@link ClippingPlaneCollection} used to selectively disable rendering the model.
- *
* @memberof Model.prototype
- *
* @type {ClippingPlaneCollection}
*/
clippingPlanes: {
@@ -1321,9 +1218,7 @@ Object.defineProperties(Model.prototype, {
/**
* The {@link ClippingPolygonCollection} used to selectively disable rendering the model.
- *
* @memberof Model.prototype
- *
* @type {ClippingPolygonCollection}
*/
clippingPolygons: {
@@ -1347,9 +1242,7 @@ Object.defineProperties(Model.prototype, {
* will make the model much darker. Here, increasing the intensity of the light source will make the model brighter.
*
* @memberof Model.prototype
- *
* @type {Cartesian3}
- *
* @default undefined
*/
lightColor: {
@@ -1367,9 +1260,7 @@ Object.defineProperties(Model.prototype, {
/**
* The properties for managing image-based lighting on this model.
- *
* @memberof Model.prototype
- *
* @type {ImageBasedLighting}
*/
imageBasedLighting: {
@@ -1400,11 +1291,8 @@ Object.defineProperties(Model.prototype, {
* determined by the material's doubleSided property; when false, back face
* culling is disabled. Back faces are not culled if {@link Model#color}
* is translucent or {@link Model#silhouetteSize} is greater than 0.0.
- *
* @memberof Model.prototype
- *
* @type {boolean}
- *
* @default true
*/
backFaceCulling: {
@@ -1424,11 +1312,8 @@ Object.defineProperties(Model.prototype, {
* A uniform scale applied to this model before the {@link Model#modelMatrix}.
* Values greater than 1.0
increase the size of the model; values
* less than 1.0
decrease.
- *
* @memberof Model.prototype
- *
* @type {number}
- *
* @default 1.0
*/
scale: {
@@ -1446,12 +1331,9 @@ Object.defineProperties(Model.prototype, {
/**
* The true scale of the model after being affected by the model's scale,
* minimum pixel size, and maximum scale parameters.
- *
* @memberof Model.prototype
- *
* @type {number}
* @readonly
- *
* @private
*/
computedScale: {
@@ -1464,11 +1346,8 @@ Object.defineProperties(Model.prototype, {
* The approximate minimum pixel size of the model regardless of zoom.
* This can be used to ensure that a model is visible even when the viewer
* zooms out. When 0.0
, no minimum size is enforced.
- *
* @memberof Model.prototype
- *
* @type {number}
- *
* @default 0.0
*/
minimumPixelSize: {
@@ -1487,9 +1366,7 @@ Object.defineProperties(Model.prototype, {
* The maximum scale size for a model. This can be used to give
* an upper limit to the {@link Model#minimumPixelSize}, ensuring that the model
* is never an unreasonable scale.
- *
* @memberof Model.prototype
- *
* @type {number}
*/
maximumScale: {
@@ -1506,11 +1383,8 @@ Object.defineProperties(Model.prototype, {
/**
* Determines whether the model casts or receives shadows from light sources.
-
* @memberof Model.prototype
- *
* @type {ShadowMode}
- *
* @default ShadowMode.ENABLED
*/
shadows: {
@@ -1528,9 +1402,7 @@ Object.defineProperties(Model.prototype, {
/**
* Gets the credit that will be displayed for the model.
- *
* @memberof Model.prototype
- *
* @type {Credit}
* @readonly
*/
@@ -1543,11 +1415,8 @@ Object.defineProperties(Model.prototype, {
/**
* Gets or sets whether the credits of the model will be displayed
* on the screen.
- *
* @memberof Model.prototype
- *
* @type {boolean}
- *
* @default false
*/
showCreditsOnScreen: {
@@ -1565,11 +1434,8 @@ Object.defineProperties(Model.prototype, {
/**
* The {@link SplitDirection} to apply to this model.
- *
* @memberof Model.prototype
- *
* @type {SplitDirection}
- *
* @default {@link SplitDirection.NONE}
*/
splitDirection: {
@@ -1590,24 +1456,21 @@ Object.defineProperties(Model.prototype, {
*
* Additionally, there are a few requirements/limitations:
*
- * The glTF cannot contain morph targets, skins, or animations.
- * The glTF cannot contain the EXT_mesh_gpu_instancing
extension.
- * Only meshes with TRIANGLES can be used to classify other assets.
- * The meshes must be watertight.
- * The POSITION attribute is required.
- * If feature IDs and an index buffer are both present, all indices with the same feature id must occupy contiguous sections of the index buffer.
- * If feature IDs are present without an index buffer, all positions with the same feature id must occupy contiguous sections of the position buffer.
+ * The glTF cannot contain morph targets, skins, or animations.
+ * The glTF cannot contain the EXT_mesh_gpu_instancing
extension.
+ * Only meshes with TRIANGLES can be used to classify other assets.
+ * The meshes must be watertight.
+ * The POSITION attribute is required.
+ * If feature IDs and an index buffer are both present, all indices with the same feature id must occupy contiguous sections of the index buffer.
+ * If feature IDs are present without an index buffer, all positions with the same feature id must occupy contiguous sections of the position buffer.
*
*
*
* The 3D Tiles or terrain receiving the classification must be opaque.
*
- *
* @memberof Model.prototype
- *
* @type {ClassificationType}
* @default undefined
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
* @readonly
*/
@@ -1620,12 +1483,9 @@ Object.defineProperties(Model.prototype, {
/**
* Reference to the pick IDs. This is only used internally, e.g. for
* per-feature post-processing in {@link PostProcessStage}.
- *
* @memberof Model.prototype
- *
* @type {PickId[]}
* @readonly
- *
* @private
*/
pickIds: {
@@ -1638,12 +1498,9 @@ Object.defineProperties(Model.prototype, {
* The {@link StyleCommandsNeeded} for the style currently applied to
* the features in the model. This is used internally by the {@link ModelDrawCommand}
* when determining which commands to submit in an update.
- *
* @memberof Model.prototype
- *
* @type {StyleCommandsNeeded}
* @readonly
- *
* @private
*/
styleCommandsNeeded: {
@@ -1656,12 +1513,9 @@ Object.defineProperties(Model.prototype, {
/**
* Returns the node with the given name
in the glTF. This is used to
* modify a node's transform for user-defined animation.
- *
* @param {string} name The name of the node in the glTF.
* @returns {ModelNode} The node, or undefined
if no node with the name
exists.
- *
- * @exception {DeveloperError} The model is not loaded. Use Model.readyEvent or wait for Model.ready to be true.
- *
+ * @throws {DeveloperError} The model is not loaded. Use Model.readyEvent or wait for Model.ready to be true.
* @example
* // Apply non-uniform scale to node "Hand"
* const node = model.getNode("Hand");
@@ -1684,14 +1538,10 @@ Model.prototype.getNode = function (name) {
* Sets the current value of an articulation stage. After setting one or
* multiple stage values, call Model.applyArticulations() to
* cause the node matrices to be recalculated.
- *
* @param {string} articulationStageKey The name of the articulation, a space, and the name of the stage.
* @param {number} value The numeric value of this stage of the articulation.
- *
- * @exception {DeveloperError} The model is not loaded. Use Model.readyEvent or wait for Model.ready to be true.
- *
+ * @throws {DeveloperError} The model is not loaded. Use Model.readyEvent or wait for Model.ready to be true.
* @see Model#applyArticulations
- *
* @example
* // Sets the value of the stage named "MoveX" belonging to the articulation named "SampleArticulation"
* model.setArticulationStage("SampleArticulation MoveX", 50.0);
@@ -1713,8 +1563,7 @@ Model.prototype.setArticulationStage = function (articulationStageKey, value) {
* Applies any modified articulation stages to the matrix of each node that
* participates in any articulation. Note that this will overwrite any node
* transformations on participating nodes.
- *
- * @exception {DeveloperError} The model is not loaded. Use Model.readyEvent or wait for Model.ready to be true.
+ * @throws {DeveloperError} The model is not loaded. Use Model.readyEvent or wait for Model.ready to be true.
*/
Model.prototype.applyArticulations = function () {
//>>includeStart('debug', pragmas.debug);
@@ -1738,7 +1587,6 @@ Model.prototype.makeStyleDirty = function () {
/**
* Resets the draw commands for this model.
- *
* @private
*/
Model.prototype.resetDrawCommands = function () {
@@ -1756,8 +1604,8 @@ const scratchClippingPlanesMatrix = new Matrix4();
* Do not call this function directly. This is documented just to
* list the exceptions that may be propagated when the scene is rendered:
*
- *
- * @exception {RuntimeError} Failed to load external reference.
+ * @param frameState
+ * @throws {RuntimeError} Failed to load external reference.
*/
Model.prototype.update = function (frameState) {
let finishedProcessing = false;
@@ -2489,7 +2337,6 @@ function addCreditsToCreditDisplay(model, frameState) {
* Gets whether or not the model is translucent based on its assigned model color.
* If the model color's alpha is equal to zero, then it is considered invisible,
* not translucent.
- *
* @returns {boolean} true
if the model is translucent, otherwise false
.
* @private
*/
@@ -2501,7 +2348,6 @@ Model.prototype.isTranslucent = function () {
/**
* Gets whether or not the model is invisible, i.e. if the model color's alpha
* is equal to zero.
- *
* @returns {boolean} true
if the model is invisible, otherwise false
.
* @private
*/
@@ -2520,8 +2366,8 @@ function supportsSilhouettes(frameState) {
*
* If the model classifies another model, its silhouette will be disabled.
*
- *
* @param {FrameState} The frame state.
+ * @param frameState
* @returns {boolean} true
if the model has silhouettes, otherwise false
.
* @private
*/
@@ -2538,7 +2384,6 @@ Model.prototype.hasSilhouette = function (frameState) {
* Gets whether or not the model is part of a tileset that uses the
* skipLevelOfDetail optimization. This accounts for whether skipLevelOfDetail
* is supported (i.e. the context supports stencil buffers).
- *
* @param {FrameState} frameState The frame state.
* @returns {boolean} true
if the model is part of a tileset that uses the skipLevelOfDetail optimization, false
otherwise.
* @private
@@ -2555,7 +2400,6 @@ Model.prototype.hasSkipLevelOfDetail = function (frameState) {
/**
* Gets whether or not clipping planes are enabled for this model.
- *
* @returns {boolean} true
if clipping planes are enabled for this model, false
.
* @private
*/
@@ -2570,14 +2414,12 @@ Model.prototype.isClippingEnabled = function () {
/**
* Find an intersection between a ray and the model surface that was rendered. The ray must be given in world coordinates.
- *
* @param {Ray} ray The ray to test for intersection.
* @param {FrameState} frameState The frame state.
- * @param {number} [verticalExaggeration=1.0] A scalar used to exaggerate the height of a position relative to the ellipsoid. If the value is 1.0 there will be no effect.
- * @param {number} [relativeHeight=0.0] The height above the ellipsoid relative to which a position is exaggerated. If the value is 0.0 the position will be exaggerated relative to the ellipsoid surface.
+ * @param {number} [verticalExaggeration] A scalar used to exaggerate the height of a position relative to the ellipsoid. If the value is 1.0 there will be no effect.
+ * @param {number} [relativeHeight] The height above the ellipsoid relative to which a position is exaggerated. If the value is 0.0 the position will be exaggerated relative to the ellipsoid surface.
* @param {Cartesian3|undefined} [result] The intersection or undefined
if none was found.
* @returns {Cartesian3|undefined} The intersection or undefined
if none was found.
- *
* @private
*/
Model.prototype.pick = function (
@@ -2599,7 +2441,6 @@ Model.prototype.pick = function (
/**
* Gets whether or not clipping polygons are enabled for this model.
- *
* @returns {boolean} true
if clipping polygons are enabled for this model, false
.
* @private
*/
@@ -2617,9 +2458,7 @@ Model.prototype.isClippingPolygonsEnabled = function () {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see Model#destroy
*/
Model.prototype.isDestroyed = function () {
@@ -2633,13 +2472,9 @@ Model.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* model = model && model.destroy();
- *
* @see Model#isDestroyed
*/
Model.prototype.destroy = function () {
@@ -2738,20 +2573,19 @@ Model.prototype.destroyModelResources = function () {
*
*
* The model can be a traditional glTF asset with a .gltf extension or a Binary glTF using the .glb extension.
- *
* @param {object} options Object with the following properties:
* @param {string|Resource} options.url The url to the .gltf or .glb file.
- * @param {string|Resource} [options.basePath=''] The base path that paths in the glTF JSON are relative to.
- * @param {boolean} [options.show=true] Whether or not to render the model.
- * @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The 4x4 transformation matrix that transforms the model from model to world coordinates.
- * @param {number} [options.scale=1.0] A uniform scale applied to this model.
- * @param {number} [options.minimumPixelSize=0.0] The approximate minimum pixel size of the model regardless of zoom.
+ * @param {string|Resource} [options.basePath] The base path that paths in the glTF JSON are relative to.
+ * @param {boolean} [options.show] Whether or not to render the model.
+ * @param {Matrix4} [options.modelMatrix] The 4x4 transformation matrix that transforms the model from model to world coordinates.
+ * @param {number} [options.scale] A uniform scale applied to this model.
+ * @param {number} [options.minimumPixelSize] The approximate minimum pixel size of the model regardless of zoom.
* @param {number} [options.maximumScale] The maximum scale size of a model. An upper limit for minimumPixelSize.
* @param {object} [options.id] A user-defined object to return when the model is picked with {@link Scene#pick}.
- * @param {boolean} [options.allowPicking=true] When true
, each primitive is pickable with {@link Scene#pick}.
- * @param {boolean} [options.incrementallyLoadTextures=true] Determine if textures may continue to stream in after the model is loaded.
- * @param {boolean} [options.asynchronous=true] Determines if model WebGL resource creation will be spread out over several frames or block until completion once all glTF files are loaded.
- * @param {boolean} [options.clampAnimations=true] Determines if the model's animations should hold a pose over frames where no keyframes are specified.
+ * @param {boolean} [options.allowPicking] When true
, each primitive is pickable with {@link Scene#pick}.
+ * @param {boolean} [options.incrementallyLoadTextures] Determine if textures may continue to stream in after the model is loaded.
+ * @param {boolean} [options.asynchronous] Determines if model WebGL resource creation will be spread out over several frames or block until completion once all glTF files are loaded.
+ * @param {boolean} [options.clampAnimations] Determines if the model's animations should hold a pose over frames where no keyframes are specified.
* @param {ShadowMode} [options.shadows=ShadowMode.ENABLED] Determines whether the model casts or receives shadows from light sources.
* @param {boolean} [options.releaseGltfJson=false] When true, the glTF JSON is released once the glTF is loaded. This is is especially useful for cases like 3D Tiles, where each .gltf model is unique and caching the glTF JSON is not effective.
* @param {boolean} [options.debugShowBoundingVolume=false] For debugging only. Draws the bounding sphere for each draw command in the model.
@@ -2789,7 +2623,6 @@ Model.prototype.destroyModelResources = function () {
* @param {object} [options.pointCloudShading] Options for constructing a {@link PointCloudShading} object to control point attenuation and lighting.
* @param {ClassificationType} [options.classificationType] Determines whether terrain, 3D Tiles or both will be classified by this model. This cannot be set after the model has loaded.
* @param {Model.GltfCallback} [options.gltfCallback] A function that is called with the loaded gltf object once loaded.
- *
* @returns {Promise} A promise that resolves to the created model when it is ready to render.
*
* @exception {RuntimeError} The model failed to load.
@@ -2976,6 +2809,7 @@ Model.fromB3dm = async function (options) {
};
/**
+ * @param options
* @private
*/
Model.fromPnts = async function (options) {
@@ -3049,6 +2883,7 @@ Model.fromGeoJson = async function (options) {
const scratchColor = new Color();
/**
+ * @param style
* @private
*/
Model.prototype.applyColorAndShow = function (style) {
@@ -3067,6 +2902,7 @@ Model.prototype.applyColorAndShow = function (style) {
};
/**
+ * @param style
* @private
*/
Model.prototype.applyStyle = function (style) {
@@ -3158,7 +2994,6 @@ function makeModelOptions(loader, modelType, options) {
/**
* Interface for the function that is called with the loaded gltf object once loaded.
* @callback Model.GltfCallback
- *
* @param {object} gltf The gltf object
*/
diff --git a/packages/engine/Source/Scene/Model/Model3DTileContent.js b/packages/engine/Source/Scene/Model/Model3DTileContent.js
index a32206d3dba6..8f8e8952a484 100644
--- a/packages/engine/Source/Scene/Model/Model3DTileContent.js
+++ b/packages/engine/Source/Scene/Model/Model3DTileContent.js
@@ -16,9 +16,11 @@ import Model from "./Model.js";
* Implements the {@link Cesium3DTileContent} interface.
*
* This object is normally not instantiated directly, use {@link Model3DTileContent.fromGltf}, {@link Model3DTileContent.fromB3dm}, {@link Model3DTileContent.fromI3dm}, {@link Model3DTileContent.fromPnts}, or {@link Model3DTileContent.fromGeoJson}.
- *
+ * @param tileset
+ * @param tile
+ * @param resource
* @alias Model3DTileContent
- * @constructor
+ * @class
* @private
*/
function Model3DTileContent(tileset, tile, resource) {
@@ -88,9 +90,7 @@ Object.defineProperties(Model3DTileContent.prototype, {
/**
* Returns true when the tile's content is ready to render; otherwise false
- *
* @memberof Model3DTileContent.prototype
- *
* @type {boolean}
* @readonly
* @private
@@ -440,12 +440,10 @@ Model3DTileContent.fromGeoJson = async function (
/**
* Find an intersection between a ray and the tile content surface that was rendered. The ray must be given in world coordinates.
- *
* @param {Ray} ray The ray to test for intersection.
* @param {FrameState} frameState The frame state.
* @param {Cartesian3|undefined} [result] The intersection or undefined
if none was found.
* @returns {Cartesian3|undefined} The intersection or undefined
if none was found.
- *
* @private
*/
Model3DTileContent.prototype.pick = function (ray, frameState, result) {
diff --git a/packages/engine/Source/Scene/Model/ModelAlphaOptions.js b/packages/engine/Source/Scene/Model/ModelAlphaOptions.js
index 050a88670f10..2b18ce943d99 100644
--- a/packages/engine/Source/Scene/Model/ModelAlphaOptions.js
+++ b/packages/engine/Source/Scene/Model/ModelAlphaOptions.js
@@ -1,22 +1,18 @@
/**
* Options for configuring the {@link AlphaPipelineStage}
- *
* @alias ModelAlphaOptions
- * @constructor
- *
+ * @class
* @private
*/
function ModelAlphaOptions() {
/**
* Which render pass will render the model.
- *
* @type {Pass}
* @private
*/
this.pass = undefined;
/**
* Determines the alpha threshold below which fragments are discarded
- *
* @type {number}
* @private
*/
diff --git a/packages/engine/Source/Scene/Model/ModelAnimation.js b/packages/engine/Source/Scene/Model/ModelAnimation.js
index c78535b402a0..0003bb3935f1 100644
--- a/packages/engine/Source/Scene/Model/ModelAnimation.js
+++ b/packages/engine/Source/Scene/Model/ModelAnimation.js
@@ -16,11 +16,12 @@ import ModelAnimationChannel from "./ModelAnimationChannel.js";
* being added to a model's {@link ModelAnimationCollection}. An active animation
* is an instance of an animation; for example, there can be multiple active
* animations for the same glTF animation, each with a different start time.
- *
+ * @param model
+ * @param animation
+ * @param options
* @alias ModelAnimation
* @internalConstructor
* @class
- *
* @see ModelAnimationCollection#add
*/
function ModelAnimation(model, animation, options) {
@@ -36,7 +37,6 @@ function ModelAnimation(model, animation, options) {
* When true
, the animation is removed after it stops playing.
* This is slightly more efficient that not removing it, but if, for example,
* time is reversed, the animation is not played again.
- *
* @type {boolean}
* @default false
*/
@@ -53,10 +53,8 @@ function ModelAnimation(model, animation, options) {
*
* This event is fired at the end of the frame after the scene is rendered.
*
- *
* @type {Event}
* @default new Event()
- *
* @example
* animation.start.addEventListener(function(model, animation) {
* console.log(`Animation started: ${animation.name}`);
@@ -72,10 +70,8 @@ function ModelAnimation(model, animation, options) {
*
* This event is fired at the end of the frame after the scene is rendered.
*
- *
* @type {Event}
* @default new Event()
- *
* @example
* animation.update.addEventListener(function(model, animation, time) {
* console.log(`Animation updated: ${animation.name}. glTF animation time: ${time}`);
@@ -89,10 +85,8 @@ function ModelAnimation(model, animation, options) {
*
* This event is fired at the end of the frame after the scene is rendered.
*
- *
* @type {Event}
* @default new Event()
- *
* @example
* animation.stop.addEventListener(function(model, animation) {
* console.log(`Animation stopped: ${animation.name}`);
@@ -130,12 +124,9 @@ function ModelAnimation(model, animation, options) {
Object.defineProperties(ModelAnimation.prototype, {
/**
* The glTF animation.
- *
* @memberof ModelAnimation.prototype
- *
* @type {ModelComponents.Animation}
* @readonly
- *
* @private
*/
animation: {
@@ -146,9 +137,7 @@ Object.defineProperties(ModelAnimation.prototype, {
/**
* The name that identifies this animation in the model, if it exists.
- *
* @memberof ModelAnimation.prototype
- *
* @type {string}
* @readonly
*/
@@ -160,12 +149,9 @@ Object.defineProperties(ModelAnimation.prototype, {
/**
* The runtime animation channels for this animation.
- *
* @memberof ModelAnimation.prototype
- *
* @type {ModelAnimationChannel[]}
* @readonly
- *
* @private
*/
runtimeChannels: {
@@ -176,12 +162,9 @@ Object.defineProperties(ModelAnimation.prototype, {
/**
* The {@link Model} that owns this animation.
- *
* @memberof ModelAnimation.prototype
- *
* @type {Model}
* @readonly
- *
* @private
*/
model: {
@@ -193,12 +176,9 @@ Object.defineProperties(ModelAnimation.prototype, {
/**
* The starting point of the animation in local animation time. This is the minimum
* time value across all of the keyframes belonging to this animation.
- *
* @memberof ModelAnimation.prototype
- *
* @type {number}
* @readonly
- *
* @private
*/
localStartTime: {
@@ -210,12 +190,9 @@ Object.defineProperties(ModelAnimation.prototype, {
/**
* The stopping point of the animation in local animation time. This is the maximum
* time value across all of the keyframes belonging to this animation.
- *
* @memberof ModelAnimation.prototype
- *
* @type {number}
* @readonly
- *
* @private
*/
localStopTime: {
@@ -227,12 +204,9 @@ Object.defineProperties(ModelAnimation.prototype, {
/**
* The scene time to start playing this animation. When this is undefined
,
* the animation starts at the next frame.
- *
* @memberof ModelAnimation.prototype
- *
* @type {JulianDate}
* @readonly
- *
* @default undefined
*/
startTime: {
@@ -243,12 +217,9 @@ Object.defineProperties(ModelAnimation.prototype, {
/**
* The delay, in seconds, from {@link ModelAnimation#startTime} to start playing.
- *
* @memberof ModelAnimation.prototype
- *
* @type {number}
* @readonly
- *
* @default undefined
*/
delay: {
@@ -261,12 +232,9 @@ Object.defineProperties(ModelAnimation.prototype, {
* The scene time to stop playing this animation. When this is undefined
,
* the animation is played for its full duration and perhaps repeated depending on
* {@link ModelAnimation#loop}.
- *
* @memberof ModelAnimation.prototype
- *
* @type {JulianDate}
* @readonly
- *
* @default undefined
*/
stopTime: {
@@ -281,12 +249,9 @@ Object.defineProperties(ModelAnimation.prototype, {
* 1.0
plays the animation at the speed in the glTF animation mapped to the scene
* clock speed. For example, if the scene is played at 2x real-time, a two-second glTF animation
* will play in one second even if multiplier
is 1.0
.
- *
* @memberof ModelAnimation.prototype
- *
* @type {number}
* @readonly
- *
* @default 1.0
*/
multiplier: {
@@ -297,12 +262,9 @@ Object.defineProperties(ModelAnimation.prototype, {
/**
* When true
, the animation is played in reverse.
- *
* @memberof ModelAnimation.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
reverse: {
@@ -313,12 +275,9 @@ Object.defineProperties(ModelAnimation.prototype, {
/**
* Determines if and how the animation is looped.
- *
* @memberof ModelAnimation.prototype
- *
* @type {ModelAnimationLoop}
* @readonly
- *
* @default {@link ModelAnimationLoop.NONE}
*/
loop: {
@@ -330,9 +289,7 @@ Object.defineProperties(ModelAnimation.prototype, {
/**
* If this is defined, it will be used to compute the local animation time
* instead of the scene's time.
- *
* @memberof ModelAnimation.prototype
- *
* @type {ModelAnimation.AnimationTimeCallback}
* @default undefined
*/
@@ -386,9 +343,7 @@ function initialize(runtimeAnimation) {
/**
* Evaluate all animation channels to advance this animation.
- *
* @param {number} time The local animation time.
- *
* @private
*/
ModelAnimation.prototype.animate = function (time) {
@@ -402,17 +357,14 @@ ModelAnimation.prototype.animate = function (time) {
/**
* A function used to compute the local animation time for a ModelAnimation.
* @callback ModelAnimation.AnimationTimeCallback
- *
* @param {number} duration The animation's original duration in seconds.
* @param {number} seconds The seconds since the animation started, in scene time.
* @returns {number} Returns the local animation time.
- *
* @example
* // Use real time for model animation (assuming animateWhilePaused was set to true)
* function animationTime(duration) {
* return Date.now() / 1000 / duration;
* }
- *
* @example
* // Offset the phase of the animation, so it starts halfway through its cycle.
* function animationTime(duration, seconds) {
diff --git a/packages/engine/Source/Scene/Model/ModelAnimationChannel.js b/packages/engine/Source/Scene/Model/ModelAnimationChannel.js
index b8f8e0ea4fca..d79a3b11be7e 100644
--- a/packages/engine/Source/Scene/Model/ModelAnimationChannel.js
+++ b/packages/engine/Source/Scene/Model/ModelAnimationChannel.js
@@ -17,15 +17,12 @@ const AnimatedPropertyType = ModelComponents.AnimatedPropertyType;
* A runtime animation channel for a {@link ModelAnimation}. An animation
* channel is responsible for interpolating between the keyframe values of an animated
* property, then applying the change to the target node.
- *
* @param {object} options An object containing the following options:
* @param {ModelComponents.AnimationChannel} options.channel The corresponding animation channel components from the 3D model.
* @param {ModelAnimation} options.runtimeAnimation The runtime animation containing this channel.
* @param {ModelRuntimeNode} options.runtimeNode The runtime node that this channel will animate.
- *
* @alias ModelAnimationChannel
- * @constructor
- *
+ * @class
* @private
*/
function ModelAnimationChannel(options) {
@@ -55,12 +52,9 @@ function ModelAnimationChannel(options) {
Object.defineProperties(ModelAnimationChannel.prototype, {
/**
* The glTF animation channel.
- *
* @memberof ModelAnimationChannel.prototype
- *
* @type {ModelComponents.AnimationChannel}
* @readonly
- *
* @private
*/
channel: {
@@ -71,12 +65,9 @@ Object.defineProperties(ModelAnimationChannel.prototype, {
/**
* The runtime animation that owns this channel.
- *
* @memberof ModelAnimationChannel.prototype
- *
* @type {ModelAnimation}
* @readonly
- *
* @private
*/
runtimeAnimation: {
@@ -87,12 +78,9 @@ Object.defineProperties(ModelAnimationChannel.prototype, {
/**
* The runtime node that this channel animates.
- *
* @memberof ModelAnimationChannel.prototype
- *
* @type {ModelRuntimeNode}
* @readonly
- *
* @private
*/
runtimeNode: {
@@ -103,12 +91,9 @@ Object.defineProperties(ModelAnimationChannel.prototype, {
/**
* The splines used to evaluate this animation channel.
- *
* @memberof ModelAnimationChannel.prototype
- *
* @type {Spline[]}
* @readonly
- *
* @private
*/
splines: {
@@ -241,9 +226,7 @@ function initialize(runtimeChannel) {
/**
* Animates the target node property based on its spline.
- *
* @param {number} time The local animation time.
- *
* @private
*/
ModelAnimationChannel.prototype.animate = function (time) {
diff --git a/packages/engine/Source/Scene/Model/ModelAnimationCollection.js b/packages/engine/Source/Scene/Model/ModelAnimationCollection.js
index d3d18aaccf72..99691ca75292 100644
--- a/packages/engine/Source/Scene/Model/ModelAnimationCollection.js
+++ b/packages/engine/Source/Scene/Model/ModelAnimationCollection.js
@@ -14,21 +14,18 @@ import ModelAnimationState from ".././ModelAnimationState.js";
*
*
* A collection of active model animations.
- *
+ * @param model
* @alias ModelAnimationCollection
* @internalConstructor
* @class
- *
* @see Model#activeAnimations
*/
function ModelAnimationCollection(model) {
/**
* The event fired when an animation is added to the collection. This can be used, for
* example, to keep a UI in sync.
- *
* @type {Event}
* @default new Event()
- *
* @example
* model.activeAnimations.animationAdded.addEventListener(function(model, animation) {
* console.log(`Animation added: ${animation.name}`);
@@ -39,10 +36,8 @@ function ModelAnimationCollection(model) {
/**
* The event fired when an animation is removed from the collection. This can be used, for
* example, to keep a UI in sync.
- *
* @type {Event}
* @default new Event()
- *
* @example
* model.activeAnimations.animationRemoved.addEventListener(function(model, animation) {
* console.log(`Animation removed: ${animation.name}`);
@@ -55,7 +50,6 @@ function ModelAnimationCollection(model) {
* whether animation takes place will depend on the animationTime functions assigned
* to the model's animations. By default, this is based on scene time, so models using
* the default will not animate regardless of this setting.
- *
* @type {boolean}
* @default false
*/
@@ -69,9 +63,7 @@ function ModelAnimationCollection(model) {
Object.defineProperties(ModelAnimationCollection.prototype, {
/**
* The number of animations in the collection.
- *
* @memberof ModelAnimationCollection.prototype
- *
* @type {number}
* @readonly
*/
@@ -83,9 +75,7 @@ Object.defineProperties(ModelAnimationCollection.prototype, {
/**
* The model that owns this animation collection.
- *
* @memberof ModelAnimationCollection.prototype
- *
* @type {Model}
* @readonly
*/
@@ -109,23 +99,21 @@ function addAnimation(collection, animation, options) {
*
* This raises the {@link ModelAnimationCollection#animationAdded} event so, for example, a UI can stay in sync.
*
- *
* @param {object} options Object with the following properties:
* @param {string} [options.name] The glTF animation name that identifies the animation. Must be defined if options.index
is undefined
.
* @param {number} [options.index] The glTF animation index that identifies the animation. Must be defined if options.name
is undefined
.
* @param {JulianDate} [options.startTime] The scene time to start playing the animation. When this is undefined
, the animation starts at the next frame.
- * @param {number} [options.delay=0.0] The delay, in seconds, from startTime
to start playing. This will only affect the animation if options.loop
is ModelAnimationLoop.NONE.
+ * @param {number} [options.delay] The delay, in seconds, from startTime
to start playing. This will only affect the animation if options.loop
is ModelAnimationLoop.NONE.
* @param {JulianDate} [options.stopTime] The scene time to stop playing the animation. When this is undefined
, the animation is played for its full duration.
- * @param {boolean} [options.removeOnStop=false] When true
, the animation is removed after it stops playing. This will only affect the animation if options.loop
is ModelAnimationLoop.NONE.
- * @param {number} [options.multiplier=1.0] Values greater than 1.0
increase the speed that the animation is played relative to the scene clock speed; values less than 1.0
decrease the speed.
- * @param {boolean} [options.reverse=false] When true
, the animation is played in reverse.
- * @param {ModelAnimationLoop} [options.loop=ModelAnimationLoop.NONE] Determines if and how the animation is looped.
- * @param {ModelAnimation.AnimationTimeCallback} [options.animationTime=undefined] If defined, computes the local animation time for this animation.
+ * @param {boolean} [options.removeOnStop] When true
, the animation is removed after it stops playing. This will only affect the animation if options.loop
is ModelAnimationLoop.NONE.
+ * @param {number} [options.multiplier] Values greater than 1.0
increase the speed that the animation is played relative to the scene clock speed; values less than 1.0
decrease the speed.
+ * @param {boolean} [options.reverse] When true
, the animation is played in reverse.
+ * @param {ModelAnimationLoop} [options.loop] Determines if and how the animation is looped.
+ * @param {ModelAnimation.AnimationTimeCallback} [options.animationTime] If defined, computes the local animation time for this animation.
* @returns {ModelAnimation} The animation that was added to the collection.
- *
- * @exception {DeveloperError} Animations are not loaded. Wait for the {@link Model#ready} to return trues.
- * @exception {DeveloperError} options.name must be a valid animation name.
- * @exception {DeveloperError} options.index must be a valid animation index.
+ * @throws {DeveloperError} Animations are not loaded. Wait for the {@link Model#ready} to return trues.
+ * @throws {DeveloperError} options.name must be a valid animation name.
+ * @throws {DeveloperError} options.index must be a valid animation index.
* @exception {DeveloperError} Either options.name or options.index must be defined.
* @exception {DeveloperError} options.multiplier must be greater than zero.
*
@@ -229,21 +217,18 @@ ModelAnimationCollection.prototype.add = function (options) {
*
* This raises the {@link ModelAnimationCollection#animationAdded} event for each model so, for example, a UI can stay in sync.
*
- *
* @param {object} [options] Object with the following properties:
* @param {JulianDate} [options.startTime] The scene time to start playing the animations. When this is undefined
, the animations starts at the next frame.
- * @param {number} [options.delay=0.0] The delay, in seconds, from startTime
to start playing. This will only affect the animation if options.loop
is ModelAnimationLoop.NONE.
+ * @param {number} [options.delay] The delay, in seconds, from startTime
to start playing. This will only affect the animation if options.loop
is ModelAnimationLoop.NONE.
* @param {JulianDate} [options.stopTime] The scene time to stop playing the animations. When this is undefined
, the animations are played for its full duration.
- * @param {boolean} [options.removeOnStop=false] When true
, the animations are removed after they stop playing. This will only affect the animation if options.loop
is ModelAnimationLoop.NONE.
- * @param {number} [options.multiplier=1.0] Values greater than 1.0
increase the speed that the animations play relative to the scene clock speed; values less than 1.0
decrease the speed.
- * @param {boolean} [options.reverse=false] When true
, the animations are played in reverse.
- * @param {ModelAnimationLoop} [options.loop=ModelAnimationLoop.NONE] Determines if and how the animations are looped.
- * @param {ModelAnimation.AnimationTimeCallback} [options.animationTime=undefined] If defined, computes the local animation time for all of the animations.
+ * @param {boolean} [options.removeOnStop] When true
, the animations are removed after they stop playing. This will only affect the animation if options.loop
is ModelAnimationLoop.NONE.
+ * @param {number} [options.multiplier] Values greater than 1.0
increase the speed that the animations play relative to the scene clock speed; values less than 1.0
decrease the speed.
+ * @param {boolean} [options.reverse] When true
, the animations are played in reverse.
+ * @param {ModelAnimationLoop} [options.loop] Determines if and how the animations are looped.
+ * @param {ModelAnimation.AnimationTimeCallback} [options.animationTime] If defined, computes the local animation time for all of the animations.
* @returns {ModelAnimation[]} An array of {@link ModelAnimation} objects, one for each animation added to the collection. If there are no glTF animations, the array is empty.
- *
- * @exception {DeveloperError} Animations are not loaded. Wait for the {@link Model#ready} to return true.
- * @exception {DeveloperError} options.multiplier must be greater than zero.
- *
+ * @throws {DeveloperError} Animations are not loaded. Wait for the {@link Model#ready} to return true.
+ * @throws {DeveloperError} options.multiplier must be greater than zero.
* @example
* model.activeAnimations.addAll({
* multiplier : 0.5, // Play at half-speed
@@ -287,10 +272,8 @@ ModelAnimationCollection.prototype.addAll = function (options) {
* An animation can also be implicitly removed from the collection by setting {@link ModelAnimationCollection#removeOnStop} to
* true
. The {@link ModelAnimationCollection#animationRemoved} event is still fired when the animation is removed.
*
- *
* @param {ModelAnimation} runtimeAnimation The runtime animation to remove.
* @returns {boolean} true
if the animation was removed; false
if the animation was not found in the collection.
- *
* @example
* const a = model.activeAnimations.add({
* name : 'animation name'
@@ -334,7 +317,6 @@ ModelAnimationCollection.prototype.removeAll = function () {
/**
* Determines whether this collection contains a given animation.
- *
* @param {ModelAnimation} runtimeAnimation The runtime animation to check for.
* @returns {boolean} true
if this collection contains the animation, false
otherwise.
*/
@@ -351,10 +333,8 @@ ModelAnimationCollection.prototype.contains = function (runtimeAnimation) {
* and increase as animations are added. Removing an animation shifts all animations after
* it to the left, changing their indices. This function is commonly used to iterate over
* all the animations in the collection.
- *
* @param {number} index The zero-based index of the animation.
* @returns {ModelAnimation} The runtime animation at the specified index.
- *
* @example
* // Output the names of all the animations in the collection.
* const animations = model.activeAnimations;
@@ -394,10 +374,8 @@ function createAnimationRemovedFunction(
/**
* Updates the runtime animations in this collection, removing any animations
* that have stopped.
- *
* @param {FrameState} frameState The current frame state.
* @returns {boolean} true
if an animation played during this update, false
otherwise.
- *
* @private
*/
ModelAnimationCollection.prototype.update = function (frameState) {
diff --git a/packages/engine/Source/Scene/Model/ModelArticulation.js b/packages/engine/Source/Scene/Model/ModelArticulation.js
index 401be000165b..014952c0b711 100644
--- a/packages/engine/Source/Scene/Model/ModelArticulation.js
+++ b/packages/engine/Source/Scene/Model/ModelArticulation.js
@@ -8,14 +8,11 @@ import ModelArticulationStage from "./ModelArticulationStage.js";
* An in-memory representation of an articulation that affects nodes in the
* {@link ModelSceneGraph}. This is defined in a model by the
* AGI_articulations
extension.
- *
* @param {object} options An object containing the following options:
* @param {ModelComponents.Articulation} options.articulation The articulation components from the 3D model.
* @param {ModelSceneGraph} options.sceneGraph The scene graph this articulation belongs to.
- *
* @alias ModelArticulation
- * @constructor
- *
+ * @class
* @private
*/
function ModelArticulation(options) {
@@ -48,11 +45,9 @@ function ModelArticulation(options) {
Object.defineProperties(ModelArticulation.prototype, {
/**
* The internal articulation that this runtime articulation represents.
- *
* @memberof ModelArticulation.prototype
* @type {ModelComponents.Articulation}
* @readonly
- *
* @private
*/
articulation: {
@@ -63,11 +58,9 @@ Object.defineProperties(ModelArticulation.prototype, {
/**
* The scene graph that this articulation belongs to.
- *
* @memberof ModelArticulation.prototype
* @type {ModelSceneGraph}
* @readonly
- *
* @private
*/
sceneGraph: {
@@ -78,11 +71,9 @@ Object.defineProperties(ModelArticulation.prototype, {
/**
* The name of this articulation.
- *
* @memberof ModelArticulation.prototype
* @type {string}
* @readonly
- *
* @private
*/
name: {
@@ -93,11 +84,9 @@ Object.defineProperties(ModelArticulation.prototype, {
/**
* The runtime stages that belong to this articulation.
- *
* @memberof ModelArticulation.prototype
* @type {ModelArticulationStage[]}
* @readonly
- *
* @private
*/
runtimeStages: {
@@ -108,11 +97,9 @@ Object.defineProperties(ModelArticulation.prototype, {
/**
* The runtime nodes that are affected by this articulation.
- *
* @memberof ModelArticulation.prototype
* @type {ModelRuntimeNode[]}
* @readonly
- *
* @private
*/
runtimeNodes: {
@@ -149,10 +136,8 @@ function initialize(runtimeArticulation) {
/**
* Sets the current value of an articulation stage.
- *
* @param {string} stageName The name of the articulation stage.
* @param {number} value The numeric value of this stage of the articulation.
- *
* @private
*/
ModelArticulation.prototype.setArticulationStage = function (stageName, value) {
@@ -173,7 +158,6 @@ const scratchNodeMatrix = new Matrix4();
* Note that this will overwrite any existing transformations on participating
* nodes.
*
- *
* @private
*/
ModelArticulation.prototype.apply = function () {
diff --git a/packages/engine/Source/Scene/Model/ModelArticulationStage.js b/packages/engine/Source/Scene/Model/ModelArticulationStage.js
index e0805f8aa651..2db729590d04 100644
--- a/packages/engine/Source/Scene/Model/ModelArticulationStage.js
+++ b/packages/engine/Source/Scene/Model/ModelArticulationStage.js
@@ -11,14 +11,11 @@ const articulationEpsilon = CesiumMath.EPSILON16;
/**
* An in-memory representation of an articulation stage belonging to a
* {@link ModelArticulation}.
- *
* @param {object} options An object containing the following options:
* @param {ModelComponents.ArticulationStage} options.stage The articulation stage components from the 3D model.
* @param {ModelArticulation} options.runtimeArticulation The runtime articulation that this stage belongs to.
- *
* @alias ModelArticulationStage
- * @constructor
- *
+ * @class
* @private
*/
function ModelArticulationStage(options) {
@@ -44,11 +41,9 @@ function ModelArticulationStage(options) {
Object.defineProperties(ModelArticulationStage.prototype, {
/**
* The internal articulation stage that this runtime stage represents.
- *
* @memberof ModelArticulationStage.prototype
* @type {ModelComponents.ArticulationStage}
* @readonly
- *
* @private
*/
stage: {
@@ -59,11 +54,9 @@ Object.defineProperties(ModelArticulationStage.prototype, {
/**
* The runtime articulation that this stage belongs to.
- *
* @memberof ModelArticulationStage.prototype
* @type {ModelArticulation}
* @readonly
- *
* @private
*/
runtimeArticulation: {
@@ -74,11 +67,9 @@ Object.defineProperties(ModelArticulationStage.prototype, {
/**
* The name of this articulation stage.
- *
* @memberof ModelArticulationStage.prototype
* @type {string}
* @readonly
- *
* @private
*/
name: {
@@ -90,11 +81,9 @@ Object.defineProperties(ModelArticulationStage.prototype, {
/**
* The type of this articulation stage. This specifies which of the
* node's properties is modified by the stage's value.
- *
* @memberof ModelArticulationStage.prototype
* @type {ArticulationStageType}
* @readonly
- *
* @private
*/
type: {
@@ -105,11 +94,9 @@ Object.defineProperties(ModelArticulationStage.prototype, {
/**
* The minimum value of this articulation stage.
- *
* @memberof ModelArticulationStage.prototype
* @type {number}
* @readonly
- *
* @private
*/
minimumValue: {
@@ -120,11 +107,9 @@ Object.defineProperties(ModelArticulationStage.prototype, {
/**
* The maximum value of this articulation stage.
- *
* @memberof ModelArticulationStage.prototype
* @type {number}
* @readonly
- *
* @private
*/
maximumValue: {
@@ -135,10 +120,8 @@ Object.defineProperties(ModelArticulationStage.prototype, {
/**
* The current value of this articulation stage.
- *
* @memberof ModelArticulationStage.prototype
* @type {number}
- *
* @private
*/
currentValue: {
@@ -175,10 +158,8 @@ const scratchArticulationRotation = new Matrix3();
* computation itself. Various stages of an articulation can be multiplied
* together, so their transformations are all merged into a composite Matrix4
* representing them all.
- *
* @param {Matrix4} result The matrix to be modified.
* @returns {Matrix4} The transformed matrix as requested by the articulation stage.
- *
* @private
*/
ModelArticulationStage.prototype.applyStageToMatrix = function (result) {
diff --git a/packages/engine/Source/Scene/Model/ModelClippingPlanesPipelineStage.js b/packages/engine/Source/Scene/Model/ModelClippingPlanesPipelineStage.js
index 8d9945f244d4..3cf9ffde719d 100644
--- a/packages/engine/Source/Scene/Model/ModelClippingPlanesPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/ModelClippingPlanesPipelineStage.js
@@ -7,9 +7,7 @@ import ShaderDestination from "../../Renderer/ShaderDestination.js";
/**
* The model clipping planes stage is responsible for applying clipping planes to the model.
- *
* @namespace ModelClippingPlanesPipelineStage
- *
* @private
*/
const ModelClippingPlanesPipelineStage = {
@@ -21,16 +19,14 @@ const textureResolutionScratch = new Cartesian2();
* Process a model. This modifies the following parts of the render resources:
*
*
- * adds a define to the fragment shader to indicate that the model has clipping planes
- * adds the defines to the fragment shader for parameters related to clipping planes, such as the number of planes
- * adds a function to the fragment shader to apply the clipping planes to the model's base color
- * adds the uniforms for the fragment shader for the clipping plane texture and matrix
- *
- *
+ * adds a define to the fragment shader to indicate that the model has clipping planes
+ * adds the defines to the fragment shader for parameters related to clipping planes, such as the number of planes
+ * adds a function to the fragment shader to apply the clipping planes to the model's base color
+ * adds the uniforms for the fragment shader for the clipping plane texture and matrix
+ *
* @param {ModelRenderResources} renderResources The render resources for this model.
* @param {Model} model The model.
* @param {FrameState} frameState The frameState.
- *
* @private
*/
ModelClippingPlanesPipelineStage.process = function (
diff --git a/packages/engine/Source/Scene/Model/ModelClippingPolygonsPipelineStage.js b/packages/engine/Source/Scene/Model/ModelClippingPolygonsPipelineStage.js
index c9eb597140c7..8e63f087936a 100644
--- a/packages/engine/Source/Scene/Model/ModelClippingPolygonsPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/ModelClippingPolygonsPipelineStage.js
@@ -5,9 +5,7 @@ import ShaderDestination from "../../Renderer/ShaderDestination.js";
/**
* The model clipping planes stage is responsible for applying clipping planes to the model.
- *
* @namespace ModelClippingPolygonsPipelineStage
- *
* @private
*/
const ModelClippingPolygonsPipelineStage = {
@@ -18,18 +16,16 @@ const ModelClippingPolygonsPipelineStage = {
* Process a model for polygon clipping. This modifies the following parts of the render resources:
*
*
- * adds a define to both the vertex and fragment shaders to indicate that the model has clipping polygons
- * adds the defines to both the vertex and fragment shaders for parameters related to clipping polygons, such as the number of polygons
- * adds a function to the vertex shader to determine lookup uvs
- * adds a function to the fragment shader to discard clipped regions
- * adds the uniforms to the vertex and fragment shaders for the clipping extents texture and clipping distance respectively
- * adds a varying for lookup uvs in the clipping texture
- *
- *
+ * adds a define to both the vertex and fragment shaders to indicate that the model has clipping polygons
+ * adds the defines to both the vertex and fragment shaders for parameters related to clipping polygons, such as the number of polygons
+ * adds a function to the vertex shader to determine lookup uvs
+ * adds a function to the fragment shader to discard clipped regions
+ * adds the uniforms to the vertex and fragment shaders for the clipping extents texture and clipping distance respectively
+ * adds a varying for lookup uvs in the clipping texture
+ *
* @param {ModelRenderResources} renderResources The render resources for this model.
* @param {Model} model The model.
* @param {FrameState} frameState The frameState.
- *
* @private
*/
ModelClippingPolygonsPipelineStage.process = function (
diff --git a/packages/engine/Source/Scene/Model/ModelColorPipelineStage.js b/packages/engine/Source/Scene/Model/ModelColorPipelineStage.js
index fc9c26284962..0581ef5081d4 100644
--- a/packages/engine/Source/Scene/Model/ModelColorPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/ModelColorPipelineStage.js
@@ -6,9 +6,7 @@ import ShaderDestination from "../../Renderer/ShaderDestination.js";
/**
* The model color pipeline stage is responsible for handling the application of a static color to the model.
- *
* @namespace ModelColorPipelineStage
- *
* @private
*/
const ModelColorPipelineStage = {
@@ -22,16 +20,14 @@ const ModelColorPipelineStage = {
* Process a model. This modifies the following parts of the render resources:
*
*
- * adds a define to the fragment shader to indicate that the model has a color
- * adds a function to the fragment shader to apply the color to the model's base color
- * adds the uniforms for the fragment shader for the model's color and blending properties
- * updates the pass type in the render resources based on translucency of the model's color
- *
- *
+ * adds a define to the fragment shader to indicate that the model has a color
+ * adds a function to the fragment shader to apply the color to the model's base color
+ * adds the uniforms for the fragment shader for the model's color and blending properties
+ * updates the pass type in the render resources based on translucency of the model's color
+ *
* @param {ModelRenderResources} renderResources The render resources for this model.
* @param {Model} model The model.
* @param {FrameState} frameState The frameState.
- *
* @private
*/
ModelColorPipelineStage.process = function (
diff --git a/packages/engine/Source/Scene/Model/ModelDrawCommand.js b/packages/engine/Source/Scene/Model/ModelDrawCommand.js
index 83323fc1ec7d..83d072c2c3c6 100644
--- a/packages/engine/Source/Scene/Model/ModelDrawCommand.js
+++ b/packages/engine/Source/Scene/Model/ModelDrawCommand.js
@@ -23,14 +23,11 @@ import StyleCommandsNeeded from "./StyleCommandsNeeded.js";
* A wrapper around the draw commands used to render a {@link ModelRuntimePrimitive}.
* This manages the derived commands and pushes only the necessary commands depending
* on the given frame state.
- *
* @param {object} options An object containing the following options:
* @param {DrawCommand} options.command The draw command from which to derive other commands from.
* @param {PrimitiveRenderResources} options.primitiveRenderResources The render resources of the primitive associated with the command.
- *
* @alias ModelDrawCommand
- * @constructor
- *
+ * @class
* @private
*/
function ModelDrawCommand(options) {
@@ -220,10 +217,8 @@ function initialize(drawCommand) {
Object.defineProperties(ModelDrawCommand.prototype, {
/**
* The main draw command that the other commands are derived from.
- *
* @memberof ModelDrawCommand.prototype
* @type {DrawCommand}
- *
* @readonly
* @private
*/
@@ -235,10 +230,8 @@ Object.defineProperties(ModelDrawCommand.prototype, {
/**
* The runtime primitive that the draw command belongs to.
- *
* @memberof ModelDrawCommand.prototype
* @type {ModelRuntimePrimitive}
- *
* @readonly
* @private
*/
@@ -250,10 +243,8 @@ Object.defineProperties(ModelDrawCommand.prototype, {
/**
* The model that the draw command belongs to.
- *
* @memberof ModelDrawCommand.prototype
* @type {Model}
- *
* @readonly
* @private
*/
@@ -265,10 +256,8 @@ Object.defineProperties(ModelDrawCommand.prototype, {
/**
* The primitive type of the draw command.
- *
* @memberof ModelDrawCommand.prototype
* @type {PrimitiveType}
- *
* @readonly
* @private
*/
@@ -281,10 +270,8 @@ Object.defineProperties(ModelDrawCommand.prototype, {
/**
* The current model matrix applied to the draw commands. If there are
* 2D draw commands, their model matrix will be derived from the 3D one.
- *
* @memberof ModelDrawCommand.prototype
* @type {Matrix4}
- *
* @readonly
* @private
*/
@@ -308,10 +295,8 @@ Object.defineProperties(ModelDrawCommand.prototype, {
* The bounding volume of the main draw command. This is equivalent
* to the primitive's bounding sphere transformed by the draw
* command's model matrix.
- *
* @memberof ModelDrawCommand.prototype
* @type {BoundingSphere}
- *
* @readonly
* @private
*/
@@ -323,10 +308,8 @@ Object.defineProperties(ModelDrawCommand.prototype, {
/**
* Whether the geometry casts or receives shadows from light sources.
- *
* @memberof ModelDrawCommand.prototype
* @type {ShadowMode}
- *
* @private
*/
shadows: {
@@ -344,10 +327,8 @@ Object.defineProperties(ModelDrawCommand.prototype, {
* determined by the material's doubleSided property; when false, back face
* culling is disabled. Back faces are not culled if the command is
* translucent.
- *
* @memberof ModelDrawCommand.prototype
* @type {boolean}
- *
* @private
*/
backFaceCulling: {
@@ -366,10 +347,8 @@ Object.defineProperties(ModelDrawCommand.prototype, {
/**
* Determines which faces to cull, if culling is enabled.
- *
* @memberof ModelDrawCommand.prototype
* @type {CullFace}
- *
* @private
*/
cullFace: {
@@ -388,10 +367,8 @@ Object.defineProperties(ModelDrawCommand.prototype, {
/**
* Whether to draw the bounding sphere associated with this draw command.
- *
* @memberof ModelDrawCommand.prototype
* @type {boolean}
- *
* @private
*/
debugShowBoundingVolume: {
@@ -494,12 +471,9 @@ function updateDebugShowBoundingVolume(drawCommand) {
/**
* Pushes the draw commands necessary to render the primitive.
* This does not include the draw commands that render its silhouette.
- *
* @param {FrameState} frameState The frame state.
* @param {DrawCommand[]} result The array to push the draw commands to.
- *
* @returns {DrawCommand[]} The modified result parameter.
- *
* @private
*/
ModelDrawCommand.prototype.pushCommands = function (frameState, result) {
@@ -568,12 +542,9 @@ ModelDrawCommand.prototype.pushCommands = function (frameState, result) {
* not have been derived for 2D. The model matrix will also not have been
* updated for 2D commands.
*
- *
* @param {FrameState} frameState The frame state.
* @param {DrawCommand[]} result The array to push the silhouette commands to.
- *
* @returns {DrawCommand[]} The modified result parameter.
- *
* @private
*/
ModelDrawCommand.prototype.pushSilhouetteCommands = function (
diff --git a/packages/engine/Source/Scene/Model/ModelFeature.js b/packages/engine/Source/Scene/Model/ModelFeature.js
index 7dba22eebb80..8b93dad9e393 100644
--- a/packages/engine/Source/Scene/Model/ModelFeature.js
+++ b/packages/engine/Source/Scene/Model/ModelFeature.js
@@ -12,14 +12,11 @@ import defined from "../../Core/defined.js";
*
* Do not construct this directly. Access it through picking using {@link Scene#pick}.
*
- *
* @alias ModelFeature
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Model} options.model The model the feature belongs to.
* @param {number} options.featureId The unique integral identifier for this feature.
- *
* @example
* // On mouse over, display all the properties for a feature in the console log.
* handler.setInputAction(function(movement) {
@@ -28,7 +25,6 @@ import defined from "../../Core/defined.js";
* console.log(feature);
* }
* }, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
- *
*/
function ModelFeature(options) {
this._model = options.model;
@@ -45,11 +41,8 @@ Object.defineProperties(ModelFeature.prototype, {
/**
* Gets or sets if the feature will be shown. This is set for all features
* when a style's show is evaluated.
- *
* @memberof ModelFeature.prototype
- *
* @type {boolean}
- *
* @default true
*/
show: {
@@ -65,11 +58,8 @@ Object.defineProperties(ModelFeature.prototype, {
* Gets or sets the highlight color multiplied with the feature's color. When
* this is white, the feature's color is not changed. This is set for all features
* when a style's color is evaluated.
- *
* @memberof ModelFeature.prototype
- *
* @type {Color}
- *
* @default {@link Color.WHITE}
*/
color: {
@@ -86,11 +76,8 @@ Object.defineProperties(ModelFeature.prototype, {
/**
* All objects returned by {@link Scene#pick} have a primitive
property. This returns
* the model containing the feature.
- *
* @memberof ModelFeature.prototype
- *
* @type {Model}
- *
* @readonly
* @private
*/
@@ -102,11 +89,8 @@ Object.defineProperties(ModelFeature.prototype, {
/**
* The {@link ModelFeatureTable} that this feature belongs to.
- *
* @memberof ModelFeature.prototype
- *
* @type {ModelFeatureTable}
- *
* @readonly
* @private
*/
@@ -120,11 +104,8 @@ Object.defineProperties(ModelFeature.prototype, {
* Get the feature ID associated with this feature. For 3D Tiles 1.0, the
* batch ID is returned. For EXT_mesh_features, this is the feature ID from
* the selected feature ID set.
- *
* @memberof ModelFeature.prototype
- *
* @type {number}
- *
* @readonly
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -137,7 +118,6 @@ Object.defineProperties(ModelFeature.prototype, {
/**
* Returns whether the feature contains this property.
- *
* @param {string} name The case-sensitive name of the property.
* @returns {boolean} Whether the feature contains this property.
*/
@@ -147,10 +127,8 @@ ModelFeature.prototype.hasProperty = function (name) {
/**
* Returns a copy of the value of the feature's property with the given name.
- *
* @param {string} name The case-sensitive name of the property.
* @returns {*} The value of the property or undefined
if the feature does not have this property.
- *
* @example
* // Display all the properties for a feature in the console log.
* const propertyIds = feature.getPropertyIds();
@@ -170,17 +148,15 @@ ModelFeature.prototype.getProperty = function (name) {
* extensions. Metadata is checked against name from most specific to most
* general and the first match is returned. Metadata is checked in this order:
*
- * structural metadata property by semantic
- * structural metadata property by property ID
+ * structural metadata property by semantic
+ * structural metadata property by property ID
*
*
* See the {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_structural_metadata|EXT_structural_metadata Extension} as well as the
* previous {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata|EXT_feature_metadata Extension} for glTF.
*
- *
* @param {string} name The semantic or property ID of the feature. Semantics are checked before property IDs in each granularity of metadata.
- * @return {*} The value of the property or undefined
if the feature does not have this property.
- *
+ * @returns {*} The value of the property or undefined
if the feature does not have this property.
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
ModelFeature.prototype.getPropertyInherited = function (name) {
@@ -193,7 +169,6 @@ ModelFeature.prototype.getPropertyInherited = function (name) {
/**
* Returns an array of property IDs for the feature.
- *
* @param {string[]} [results] An array into which to store the results.
* @returns {string[]} The IDs of the feature's properties.
*/
@@ -203,16 +178,12 @@ ModelFeature.prototype.getPropertyIds = function (results) {
/**
* Sets the value of the feature's property with the given name.
- *
* @param {string} name The case-sensitive name of the property.
* @param {*} value The value of the property that will be copied.
* @returns {boolean} true
if the property was set, false
otherwise.
- *
- * @exception {DeveloperError} Inherited batch table hierarchy property is read only.
- *
+ * @throws {DeveloperError} Inherited batch table hierarchy property is read only.
* @example
* const height = feature.getProperty('Height'); // e.g., the height of a building
- *
* @example
* const name = 'clicked';
* if (feature.getProperty(name)) {
diff --git a/packages/engine/Source/Scene/Model/ModelFeatureTable.js b/packages/engine/Source/Scene/Model/ModelFeatureTable.js
index 1a18a39029d8..719c6c37e4be 100644
--- a/packages/engine/Source/Scene/Model/ModelFeatureTable.js
+++ b/packages/engine/Source/Scene/Model/ModelFeatureTable.js
@@ -12,14 +12,11 @@ import ModelType from "./ModelType.js";
/**
* Manages the {@link ModelFeature}s in a {@link Model}.
* Extracts the properties from a {@link PropertyTable}.
- *
* @param {object} options An object containing the following options:
* @param {Model} options.model The model that owns this feature table.
* @param {PropertyTable} options.propertyTable The property table from the model used to initialize the model.
- *
* @alias ModelFeatureTable
- * @constructor
- *
+ * @class
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -49,12 +46,9 @@ function ModelFeatureTable(options) {
Object.defineProperties(ModelFeatureTable.prototype, {
/**
* The batch texture created for the features in this table.
- *
* @memberof ModelFeatureTable.prototype
- *
* @type {BatchTexture}
* @readonly
- *
* @private
*/
batchTexture: {
@@ -65,12 +59,9 @@ Object.defineProperties(ModelFeatureTable.prototype, {
/**
* The number of features in this table.
- *
* @memberof ModelFeatureTable.prototype
- *
* @type {number}
* @readonly
- *
* @private
*/
featuresLength: {
@@ -82,12 +73,9 @@ Object.defineProperties(ModelFeatureTable.prototype, {
/**
* Size of the batch texture. This does not count the property table size
* as that is counted separately through StructuralMetadata.
- *
* @memberof ModelFeatureTable.prototype
- *
* @type {number}
* @readonly
- *
* @private
*/
batchTextureByteLength: {
@@ -102,12 +90,9 @@ Object.defineProperties(ModelFeatureTable.prototype, {
/**
* A flag to indicate whether or not the types of style commands needed by this feature table have changed.
- *
* @memberof ModelFeatureTable.prototype
- *
* @type {boolean}
* @readonly
- *
* @private
*/
styleCommandsNeededDirty: {
@@ -155,9 +140,7 @@ function initialize(modelFeatureTable) {
/**
* Creates/updates the batch texture.
- *
* @param {FrameState} frameState The frame state.
- *
* @private
*/
ModelFeatureTable.prototype.update = function (frameState) {
@@ -252,6 +235,7 @@ ModelFeatureTable.prototype.getExactClassName = function (featureId) {
const scratchColor = new Color();
/**
+ * @param style
* @private
*/
ModelFeatureTable.prototype.applyStyle = function (style) {
@@ -287,9 +271,7 @@ ModelFeatureTable.prototype.applyStyle = function (style) {
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see ModelFeatureTable#destroy
* @private
*/
@@ -305,12 +287,10 @@ ModelFeatureTable.prototype.isDestroyed = function () {
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
*
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @param frameState
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* e = e && e.destroy();
- *
* @see ModelFeatureTable#isDestroyed
* @private
*/
diff --git a/packages/engine/Source/Scene/Model/ModelLightingOptions.js b/packages/engine/Source/Scene/Model/ModelLightingOptions.js
index 747034dbe46b..62d50a966896 100644
--- a/packages/engine/Source/Scene/Model/ModelLightingOptions.js
+++ b/packages/engine/Source/Scene/Model/ModelLightingOptions.js
@@ -3,13 +3,10 @@ import LightingModel from "./LightingModel.js";
/**
* Options for configuring the {@link LightingPipelineStage}
- *
* @param {object} options An object containing the following options
- * @param {LightingModel} [options.lightingModel=LightingModel.UNLIT] The lighting model to use
- *
+ * @param {LightingModel} [options.lightingModel] The lighting model to use
* @alias ModelLightingOptions
- * @constructor
- *
+ * @class
* @private
*/
function ModelLightingOptions(options) {
@@ -18,9 +15,7 @@ function ModelLightingOptions(options) {
/**
* The lighting model to use, such as UNLIT or PBR. This is determined by
* the primitive's material.
- *
* @type {LightingModel}
- *
* @private
*/
this.lightingModel = defaultValue(options.lightingModel, LightingModel.UNLIT);
diff --git a/packages/engine/Source/Scene/Model/ModelMatrixUpdateStage.js b/packages/engine/Source/Scene/Model/ModelMatrixUpdateStage.js
index c0c21674846b..45346de98d33 100644
--- a/packages/engine/Source/Scene/Model/ModelMatrixUpdateStage.js
+++ b/packages/engine/Source/Scene/Model/ModelMatrixUpdateStage.js
@@ -4,9 +4,7 @@ import SceneMode from "../SceneMode.js";
/**
* The model matrix update stage is responsible for updating the model matrices and bounding volumes of the draw commands.
- *
* @namespace ModelMatrixUpdateStage
- *
* @private
*/
const ModelMatrixUpdateStage = {};
@@ -15,15 +13,13 @@ ModelMatrixUpdateStage.name = "ModelMatrixUpdateStage"; // Helps with debugging
/**
* Processes a runtime node. This modifies the following parts of the scene graph and draw commands:
*
- * updates the transforms the children of any nodes with a dirty transform
- * updates the model matrix of each draw command in each primitive of the the dirty nodes and their children
- * updates the bounding volume of each draw command in each primitive of the the dirty nodes and their children
+ * updates the transforms the children of any nodes with a dirty transform
+ * updates the model matrix of each draw command in each primitive of the the dirty nodes and their children
+ * updates the bounding volume of each draw command in each primitive of the the dirty nodes and their children
*
- *
* @param {ModelRuntimeNode} runtimeNode
* @param {ModelSceneGraph} sceneGraph
* @param {FrameState} frameState
- *
* @private
*/
ModelMatrixUpdateStage.update = function (runtimeNode, sceneGraph, frameState) {
@@ -50,7 +46,10 @@ ModelMatrixUpdateStage.update = function (runtimeNode, sceneGraph, frameState) {
/**
* Recursively update all child runtime nodes and their runtime primitives.
- *
+ * @param runtimeNode
+ * @param sceneGraph
+ * @param modelMatrix
+ * @param transformToRoot
* @private
*/
function updateRuntimeNode(
diff --git a/packages/engine/Source/Scene/Model/ModelNode.js b/packages/engine/Source/Scene/Model/ModelNode.js
index 2ddc3fb5420b..e7ccd1d9a612 100644
--- a/packages/engine/Source/Scene/Model/ModelNode.js
+++ b/packages/engine/Source/Scene/Model/ModelNode.js
@@ -11,15 +11,14 @@ import defined from "../../Core/defined.js";
* a node's transform, this class allows users to change a node's transform
* externally. In this way, animation can be driven by another source, not
* just by the model's asset.
- *
+ * @param model
+ * @param runtimeNode
* @alias ModelNode
* @internalConstructor
* @class
- *
* @example
* const node = model.getNode("Hand");
* node.matrix = Cesium.Matrix4.fromScale(new Cesium.Cartesian3(5.0, 1.0, 1.0), node.matrix);
- *
* @see Model#getNode
*/
function ModelNode(model, runtimeNode) {
@@ -35,9 +34,7 @@ function ModelNode(model, runtimeNode) {
Object.defineProperties(ModelNode.prototype, {
/**
* The value of the name
property of this node.
- *
* @memberof ModelNode.prototype
- *
* @type {string}
* @readonly
*/
@@ -49,9 +46,7 @@ Object.defineProperties(ModelNode.prototype, {
/**
* The index of the node in the glTF.
- *
* @memberof ModelNode.prototype
- *
* @type {number}
* @readonly
*/
@@ -63,10 +58,8 @@ Object.defineProperties(ModelNode.prototype, {
/**
* Determines if this node and its children will be shown.
- *
* @memberof ModelNode.prototype
* @type {boolean}
- *
* @default true
*/
show: {
@@ -87,7 +80,6 @@ Object.defineProperties(ModelNode.prototype, {
* For changes to take effect, this property must be assigned to;
* setting individual elements of the matrix will not work.
*
- *
* @memberof ModelNode.prototype
* @type {Matrix4}
*/
@@ -111,7 +103,6 @@ Object.defineProperties(ModelNode.prototype, {
* Gets the node's original 4x4 matrix transform from its local
* coordinates to its parent's, without any node transformations
* or articulations applied.
- *
* @memberof ModelNode.prototype
* @type {Matrix4}
*/
diff --git a/packages/engine/Source/Scene/Model/ModelRenderResources.js b/packages/engine/Source/Scene/Model/ModelRenderResources.js
index e3f7610bd852..04dfde959b76 100644
--- a/packages/engine/Source/Scene/Model/ModelRenderResources.js
+++ b/packages/engine/Source/Scene/Model/ModelRenderResources.js
@@ -7,10 +7,8 @@ import DepthFunction from "../DepthFunction.js";
/**
* Model render resources are for setting details that are consistent across
* the entire model.
- *
- * @constructor
+ * @class
* @param {Model} model The model that will be rendered
- *
* @private
*/
function ModelRenderResources(model) {
@@ -21,20 +19,16 @@ function ModelRenderResources(model) {
/**
* An object used to build a shader incrementally. Each pipeline stage
* may add lines of shader code to this object.
- *
* @type {ShaderBuilder}
* @readonly
- *
* @private
*/
this.shaderBuilder = new ShaderBuilder();
/**
* A reference to the model.
- *
* @type {Model}
* @readonly
- *
* @private
*/
this.model = model;
@@ -42,20 +36,16 @@ function ModelRenderResources(model) {
/**
* A dictionary mapping uniform name to functions that return the uniform
* values.
- *
* @type {Object}
* @readonly
- *
* @private
*/
this.uniformMap = {};
/**
* Options for configuring the alpha stage such as pass and alpha cutoff.
- *
* @type {ModelAlphaOptions}
* @readonly
- *
* @private
*/
this.alphaOptions = new ModelAlphaOptions();
@@ -64,10 +54,8 @@ function ModelRenderResources(model) {
* An object storing options for creating a {@link RenderState}.
* The pipeline stages simply set the options, the render state is created
* when the {@link DrawCommand} is constructed.
- *
* @type {object}
* @readonly
- *
* @private
*/
this.renderStateOptions = RenderState.getState(
@@ -82,10 +70,8 @@ function ModelRenderResources(model) {
/**
* Whether the model has a silhouette. This value indicates what draw commands
* are needed and is set by ModelSilhouettePipelineStage.
- *
* @type {boolean}
* @default false
- *
* @private
*/
this.hasSilhouette = false;
@@ -94,10 +80,8 @@ function ModelRenderResources(model) {
* Whether the model is part of a tileset that uses the skipLevelOfDetail
* optimization. This value indicates what draw commands are needed and
* is set by TilesetPipelineStage.
- *
* @type {boolean}
* @default false
- *
* @private
*/
this.hasSkipLevelOfDetail = false;
diff --git a/packages/engine/Source/Scene/Model/ModelRuntimeNode.js b/packages/engine/Source/Scene/Model/ModelRuntimeNode.js
index ac1eba5e805f..26a45d68ebd7 100644
--- a/packages/engine/Source/Scene/Model/ModelRuntimeNode.js
+++ b/packages/engine/Source/Scene/Model/ModelRuntimeNode.js
@@ -12,17 +12,14 @@ import NodeStatisticsPipelineStage from "./NodeStatisticsPipelineStage.js";
/**
* An in-memory representation of a node as part of the {@link ModelSceneGraph}.
- *
* @param {object} options An object containing the following options:
* @param {ModelComponents.Node} options.node The corresponding node components from the 3D model.
* @param {Matrix4} options.transform The transform of this node, excluding transforms from the node's ancestors or children.
* @param {Matrix4} options.transformToRoot The product of the transforms of all the node's ancestors, excluding the node's own transform.
* @param {ModelSceneGraph} options.sceneGraph The scene graph this node belongs to.
* @param {number[]} options.children The indices of the children of this node in the runtime nodes array of the scene graph.
- *
* @alias ModelRuntimeNode
- * @constructor
- *
+ * @class
* @private
*/
function ModelRuntimeNode(options) {
@@ -66,11 +63,8 @@ function ModelRuntimeNode(options) {
/**
* Whether or not to show this node and its children. This can be toggled
* by the user through {@link ModelNode}.
- *
* @type {boolean}
- *
* @default true
- *
* @private
*/
this.show = true;
@@ -80,9 +74,7 @@ function ModelRuntimeNode(options) {
* corresponding {@link ModelNode} when the user supplies their
* own transform. If this is true, the node will ignore animations in the
* model's asset.
- *
* @type {boolean}
- *
* @private
*/
this.userAnimated = false;
@@ -91,30 +83,24 @@ function ModelRuntimeNode(options) {
* Pipeline stages to apply across all the mesh primitives of this node.
* This is an array of classes, each with a static method called
* process()
.
- *
- * @type {Object[]}
+ * @type {object[]}
* @readonly
- *
* @private
*/
this.pipelineStages = [];
/**
* The mesh primitives that belong to this node.
- *
* @type {ModelRuntimePrimitive[]}
* @readonly
- *
* @private
*/
this.runtimePrimitives = [];
/**
* Update stages to apply to this node.
- *
- * @type {Object[]}
+ * @type {object[]}
* @readonly
- *
* @private
*/
this.updateStages = [];
@@ -122,9 +108,7 @@ function ModelRuntimeNode(options) {
/**
* The component-wise minimum value of the translations of the instances.
* This value is set by InstancingPipelineStage.
- *
* @type {Cartesian3}
- *
* @private
*/
this.instancingTranslationMin = undefined;
@@ -132,9 +116,7 @@ function ModelRuntimeNode(options) {
/**
* The component-wise maximum value of the translations of the instances.
* This value is set by InstancingPipelineStage.
- *
* @type {Cartesian3}
- *
* @private
*/
this.instancingTranslationMax = undefined;
@@ -142,9 +124,7 @@ function ModelRuntimeNode(options) {
/**
* A buffer containing the instanced transforms. The memory is managed
* by Model; this is just a reference.
- *
* @type {Buffer}
- *
* @private
*/
this.instancingTransformsBuffer = undefined;
@@ -153,9 +133,7 @@ function ModelRuntimeNode(options) {
* A buffer containing the instanced transforms projected to 2D world
* coordinates. Used for rendering in 2D / CV mode. The memory is managed
* by Model; this is just a reference.
- *
* @type {Buffer}
- *
* @private
*/
this.instancingTransformsBuffer2D = undefined;
@@ -164,9 +142,7 @@ function ModelRuntimeNode(options) {
* A buffer containing the instanced translation values for the node if
* it is instanced. Used for rendering in 2D / CV mode. The memory is
* managed by Model; this is just a reference.
- *
* @type {Buffer}
- *
* @private
*/
this.instancingTranslationBuffer2D = undefined;
@@ -178,9 +154,7 @@ function ModelRuntimeNode(options) {
*
* This value is set by InstancingPipelineStage.
*
- *
* @type {Cartesian3}
- *
* @private
*/
this.instancingReferencePoint2D = undefined;
@@ -191,11 +165,9 @@ function ModelRuntimeNode(options) {
Object.defineProperties(ModelRuntimeNode.prototype, {
/**
* The internal node this runtime node represents.
- *
* @memberof ModelRuntimeNode.prototype
* @type {ModelComponents.Node}
* @readonly
- *
* @private
*/
node: {
@@ -205,11 +177,9 @@ Object.defineProperties(ModelRuntimeNode.prototype, {
},
/**
* The scene graph this node belongs to.
- *
* @memberof ModelRuntimeNode.prototype
* @type {ModelSceneGraph}
* @readonly
- *
* @private
*/
sceneGraph: {
@@ -220,11 +190,9 @@ Object.defineProperties(ModelRuntimeNode.prototype, {
/**
* The indices of the children of this node in the scene graph.
- *
* @memberof ModelRuntimeNode.prototype
* @type {number[]}
* @readonly
- *
* @private
*/
children: {
@@ -237,10 +205,8 @@ Object.defineProperties(ModelRuntimeNode.prototype, {
* The node's local space transform. This can be changed externally via
* the corresponding {@link ModelNode}, such that animation can be
* driven by another source, not just an animation in the model's asset.
- *
* @memberof ModelRuntimeNode.prototype
* @type {Matrix4}
- *
* @private
*/
transform: {
@@ -256,13 +222,10 @@ Object.defineProperties(ModelRuntimeNode.prototype, {
/**
* The transforms of all the node's ancestors, not including this node's
* transform.
- *
* @see ModelRuntimeNode#computedTransform
- *
* @memberof ModelRuntimeNode.prototype
* @type {Matrix4}
* @readonly
- *
* @private
*/
transformToRoot: {
@@ -274,11 +237,9 @@ Object.defineProperties(ModelRuntimeNode.prototype, {
/**
* A transform from the node's local space to the model's scene graph space.
* This is the product of transformToRoot * transform.
- *
* @memberof ModelRuntimeNode.prototype
* @type {Matrix4}
* @readonly
- *
* @private
*/
computedTransform: {
@@ -290,11 +251,9 @@ Object.defineProperties(ModelRuntimeNode.prototype, {
/**
* The node's original transform, as specified in the model.
* Does not include transformations from the node's ancestors.
- *
* @memberof ModelRuntimeNode.prototype
* @type {Matrix4}
* @readonly
- *
* @private
*/
originalTransform: {
@@ -309,12 +268,9 @@ Object.defineProperties(ModelRuntimeNode.prototype, {
*
* If the node's transformation was originally described using a matrix
* in the model, then this will return undefined.
- *
* @memberof ModelRuntimeNode.prototype
* @type {Cartesian3}
- *
- * @exception {DeveloperError} The translation of a node cannot be set if it was defined using a matrix in the model's asset.
- *
+ * @throws {DeveloperError} The translation of a node cannot be set if it was defined using a matrix in the model's asset.
* @private
*/
translation: {
@@ -353,12 +309,9 @@ Object.defineProperties(ModelRuntimeNode.prototype, {
*
* If the node's transformation was originally described using a matrix
* in the model, then this will return undefined.
- *
* @memberof ModelRuntimeNode.prototype
* @type {Quaternion}
- *
- * @exception {DeveloperError} The rotation of a node cannot be set if it was defined using a matrix in the model's asset.
- *
+ * @throws {DeveloperError} The rotation of a node cannot be set if it was defined using a matrix in the model's asset.
* @private
*/
rotation: {
@@ -397,11 +350,9 @@ Object.defineProperties(ModelRuntimeNode.prototype, {
*
* If the node's transformation was originally described using a matrix
* in the model, then this will return undefined.
- *
* @memberof ModelRuntimeNode.prototype
* @type {Cartesian3}
- *
- * @exception {DeveloperError} The scale of a node cannot be set if it was defined using a matrix in the model's asset.
+ * @throws {DeveloperError} The scale of a node cannot be set if it was defined using a matrix in the model's asset.
* @private
*/
scale: {
@@ -436,10 +387,8 @@ Object.defineProperties(ModelRuntimeNode.prototype, {
/**
* The node's morph weights. This is used internally to allow animations
* in the model's asset to affect the node's properties.
- *
* @memberof ModelRuntimeNode.prototype
* @type {number[]}
- *
* @private
*/
morphWeights: {
@@ -463,11 +412,9 @@ Object.defineProperties(ModelRuntimeNode.prototype, {
/**
* The skin applied to this node, if it exists.
- *
* @memberof ModelRuntimeNode.prototype
* @type {ModelSkin}
* @readonly
- *
* @private
*/
runtimeSkin: {
@@ -478,11 +425,9 @@ Object.defineProperties(ModelRuntimeNode.prototype, {
/**
* The computed joint matrices of this node, derived from its skin.
- *
* @memberof ModelRuntimeNode.prototype
* @type {Matrix4[]}
* @readonly
- *
* @private
*/
computedJointMatrices: {
@@ -540,18 +485,14 @@ function updateTransformFromParameters(runtimeNode, transformParameters) {
/**
* Returns the child with the given index.
- *
* @param {number} index The index of the child.
- *
* @returns {ModelRuntimeNode}
- *
* @example
* // Iterate through all children of a runtime node.
* for (let i = 0; i < runtimeNode.children.length; i++)
* {
* const childNode = runtimeNode.getChild(i);
* }
- *
* @private
*/
ModelRuntimeNode.prototype.getChild = function (index) {
@@ -571,7 +512,6 @@ ModelRuntimeNode.prototype.getChild = function (index) {
* Configure the node pipeline stages. If the pipeline needs to be re-run, call
* this method again to ensure the correct sequence of pipeline stages are
* used.
- *
* @private
*/
ModelRuntimeNode.prototype.configurePipeline = function () {
@@ -592,7 +532,6 @@ ModelRuntimeNode.prototype.configurePipeline = function () {
/**
* Updates the computed transform used for rendering and instancing.
- *
* @private
*/
ModelRuntimeNode.prototype.updateComputedTransform = function () {
@@ -606,7 +545,6 @@ ModelRuntimeNode.prototype.updateComputedTransform = function () {
/**
* Updates the joint matrices for this node, where each matrix is computed as
* computedJointMatrix = nodeWorldTransform^(-1) * skinJointMatrix.
- *
* @private
*/
ModelRuntimeNode.prototype.updateJointMatrices = function () {
diff --git a/packages/engine/Source/Scene/Model/ModelRuntimePrimitive.js b/packages/engine/Source/Scene/Model/ModelRuntimePrimitive.js
index ed82ca255cf4..b7b2f72394f7 100644
--- a/packages/engine/Source/Scene/Model/ModelRuntimePrimitive.js
+++ b/packages/engine/Source/Scene/Model/ModelRuntimePrimitive.js
@@ -30,15 +30,12 @@ import WireframePipelineStage from "./WireframePipelineStage.js";
/**
* In memory representation of a single primitive, that is, a primitive
* and its corresponding mesh.
- *
* @param {object} options An object containing the following options:
* @param {ModelComponents.Primitive} options.primitive The primitive component.
* @param {ModelComponents.Node} options.node The node that this primitive belongs to.
* @param {Model} options.model The {@link Model} this primitive belongs to.
- *
* @alias ModelRuntimePrimitive
- * @constructor
- *
+ * @class
* @private
*/
function ModelRuntimePrimitive(options) {
@@ -55,27 +52,21 @@ function ModelRuntimePrimitive(options) {
/**
* The primitive component associated with this primitive.
- *
* @type {ModelComponents.Primitive}
- *
* @private
*/
this.primitive = primitive;
/**
* A reference to the node this primitive belongs to.
- *
* @type {ModelComponents.Node}
- *
* @private
*/
this.node = node;
/**
* A reference to the model
- *
* @type {Model}
- *
* @private
*/
this.model = model;
@@ -84,10 +75,8 @@ function ModelRuntimePrimitive(options) {
* Pipeline stages to apply to this primitive. This
* is an array of classes, each with a static method called
* process()
- *
- * @type {Object[]}
+ * @type {object[]}
* @readonly
- *
* @private
*/
this.pipelineStages = [];
@@ -95,27 +84,21 @@ function ModelRuntimePrimitive(options) {
/**
* The generated {@link ModelDrawCommand} or {@link ClassificationModelDrawCommand}
* associated with this primitive.
- *
* @type {ModelDrawCommand|ClassificationModelDrawCommand}
- *
* @private
*/
this.drawCommand = undefined;
/**
* The bounding sphere of this primitive in object-space.
- *
* @type {BoundingSphere}
- *
* @private
*/
this.boundingSphere = undefined;
/**
* The bounding sphere of this primitive in 2D world space.
- *
* @type {BoundingSphere}
- *
* @private
*/
this.boundingSphere2D = undefined;
@@ -125,9 +108,7 @@ function ModelRuntimePrimitive(options) {
* coordinates. This is generated by SceneMode2DPipelineStage and used for
* rendering in 2D / CV mode. The memory is managed by Model; this is just
* a reference.
- *
* @type {Buffer}
- *
* @private
*/
this.positionBuffer2D = undefined;
@@ -141,9 +122,7 @@ function ModelRuntimePrimitive(options) {
* This is generated by ClassificationPipelineStage. The memory is managed by
* Model; this is just a reference.
*
- *
* @type {number[]}
- *
* @private
*/
this.batchLengths = undefined;
@@ -157,19 +136,15 @@ function ModelRuntimePrimitive(options) {
* This is generated by ClassificationPipelineStage. The memory is managed by
* Model; this is just a reference.
*
- *
* @type {number[]}
- *
* @private
*/
this.batchOffsets = undefined;
/**
* Update stages to apply to this primitive.
- *
- * @type {Object[]}
+ * @type {object[]}
* @readonly
- *
* @private
*/
this.updateStages = [];
@@ -179,9 +154,7 @@ function ModelRuntimePrimitive(options) {
* Configure the primitive pipeline stages. If the pipeline needs to be re-run,
* call this method again to ensure the correct sequence of pipeline stages are
* used.
- *
* @param {FrameState} frameState The frame state.
- *
* @private
*/
ModelRuntimePrimitive.prototype.configurePipeline = function (frameState) {
diff --git a/packages/engine/Source/Scene/Model/ModelSceneGraph.js b/packages/engine/Source/Scene/Model/ModelSceneGraph.js
index b6a4a45b5a67..81da68231220 100644
--- a/packages/engine/Source/Scene/Model/ModelSceneGraph.js
+++ b/packages/engine/Source/Scene/Model/ModelSceneGraph.js
@@ -29,14 +29,11 @@ import PrimitiveRenderResources from "./PrimitiveRenderResources.js";
/**
* An in memory representation of the scene graph for a {@link Model}
- *
* @param {object} options An object containing the following options
* @param {Model} options.model The model this scene graph belongs to
* @param {ModelComponents} options.modelComponents The model components describing the model
- *
* @alias ModelSceneGraph
- * @constructor
- *
+ * @class
* @private
*/
function ModelSceneGraph(options) {
@@ -50,60 +47,48 @@ function ModelSceneGraph(options) {
/**
* A reference to the {@link Model} that owns this scene graph.
- *
* @type {Model}
* @readonly
- *
* @private
*/
this._model = options.model;
/**
* The model components that represent the contents of the 3D model file.
- *
* @type {ModelComponents}
* @readonly
- *
* @private
*/
this._components = components;
/**
* Pipeline stages to apply across the model.
- *
- * @type {Object[]}
+ * @type {object[]}
* @readonly
- *
* @private
*/
this._pipelineStages = [];
/**
* Update stages to apply across the model.
- *
- * @type {Object[]}
+ * @type {object[]}
* @readonly
- *
* @private
*/
this._updateStages = [];
/**
* The runtime nodes that make up the scene graph
- *
* @type {ModelRuntimeNode[]}
* @readonly
- *
* @private
*/
this._runtimeNodes = [];
/**
* The indices of the root nodes in the runtime nodes array.
- *
* @type {number[]}
* @readonly
- *
* @private
*/
this._rootNodes = [];
@@ -112,20 +97,16 @@ function ModelSceneGraph(options) {
* The indices of the skinned nodes in the runtime nodes array. These refer
* to the nodes that will be manipulated by their skin, as opposed to the nodes
* acting as joints for the skin.
- *
* @type {number[]}
* @readonly
- *
* @private
*/
this._skinnedNodes = [];
/**
* The runtime skins that affect nodes in the scene graph.
- *
* @type {ModelSkin[]}
* @readonly
- *
* @private
*/
this._runtimeSkins = [];
@@ -134,10 +115,8 @@ function ModelSceneGraph(options) {
* Pipeline stages to apply to this model. This
* is an array of classes, each with a static method called
* process()
- *
- * @type {Object[]}
+ * @type {object[]}
* @readonly
- *
* @private
*/
this.modelPipelineStages = [];
@@ -171,10 +150,8 @@ function ModelSceneGraph(options) {
Object.defineProperties(ModelSceneGraph.prototype, {
/**
* The model components this scene graph represents.
- *
* @type {ModelComponents}
* @readonly
- *
* @private
*/
components: {
@@ -185,10 +162,8 @@ Object.defineProperties(ModelSceneGraph.prototype, {
/**
* The axis-corrected model matrix.
- *
* @type {Matrix4}
* @readonly
- *
* @private
*/
computedModelMatrix: {
@@ -200,10 +175,8 @@ Object.defineProperties(ModelSceneGraph.prototype, {
/**
* A matrix to correct from y-up in some model formats (e.g. glTF) to the
* z-up coordinate system Cesium uses.
- *
* @type {Matrix4}
* @readonly
- *
* @private
*/
axisCorrectionMatrix: {
@@ -215,10 +188,8 @@ Object.defineProperties(ModelSceneGraph.prototype, {
/**
* The bounding sphere containing all the primitives in the scene graph
* in model space.
- *
* @type {BoundingSphere}
* @readonly
- *
* @private
*/
boundingSphere: {
@@ -373,12 +344,10 @@ function computeModelMatrix2D(sceneGraph, frameState) {
/**
* Recursively traverse through the nodes in the scene graph to create
* their runtime versions, using a post-order depth-first traversal.
- *
* @param {ModelSceneGraph} sceneGraph The scene graph
* @param {ModelComponents.Node} node The current node
* @param {Matrix4} transformToRoot The transforms of this node's ancestors.
* @returns {number} The index of this node in the runtimeNodes array.
- *
* @private
*/
function traverseAndCreateSceneGraph(sceneGraph, node, transformToRoot) {
@@ -449,10 +418,8 @@ const scratchPrimitivePositionMax = new Cartesian3();
* Generates the {@link ModelDrawCommand} for each primitive in the model.
* If the model is used for classification, a {@link ClassificationModelDrawCommand}
* is generated for each primitive instead.
- *
* @param {FrameState} frameState The current frame state. This is needed to
* allocate GPU resources as needed.
- *
* @private
*/
ModelSceneGraph.prototype.buildDrawCommands = function (frameState) {
@@ -600,7 +567,7 @@ ModelSceneGraph.prototype.buildDrawCommands = function (frameState) {
* Configure the model pipeline stages. If the pipeline needs to be re-run, call
* this method again to ensure the correct sequence of pipeline stages are
* used.
- *
+ * @param frameState
* @private
*/
ModelSceneGraph.prototype.configurePipeline = function (frameState) {
@@ -704,7 +671,6 @@ ModelSceneGraph.prototype.updateModelMatrix = function (
/**
* Updates the joint matrices for the skins and nodes of the model.
- *
* @private
*/
ModelSceneGraph.prototype.updateJointMatrices = function () {
@@ -722,10 +688,8 @@ ModelSceneGraph.prototype.updateJointMatrices = function () {
* A callback to be applied once at each runtime primitive in the
* scene graph
* @callback traverseSceneGraphCallback
- *
* @param {ModelRuntimePrimitive} runtimePrimitive The runtime primitive for the current step of the traversal
* @param {object} [options] A dictionary of additional options to be passed to the callback, or undefined if the callback does not need any additional information.
- *
* @private
*/
@@ -733,13 +697,11 @@ ModelSceneGraph.prototype.updateJointMatrices = function () {
* Recursively traverse through the runtime nodes in the scene graph
* using a post-order depth-first traversal to perform a callback on
* their runtime primitives.
- *
* @param {ModelSceneGraph} sceneGraph The scene graph.
* @param {ModelRuntimeNode} runtimeNode The current runtime node.
* @param {boolean} visibleNodesOnly Whether to only traverse nodes that are visible.
* @param {traverseSceneGraphCallback} callback The callback to perform on the runtime primitives of the node.
* @param {object} [callbackOptions] A dictionary of additional options to be passed to the callback, if needed.
- *
* @private
*/
function traverseSceneGraph(
@@ -800,9 +762,7 @@ const scratchBackFaceCullingOptions = {
/**
* Traverses through all draw commands and changes the back-face culling setting.
- *
* @param {boolean} backFaceCulling The new value for the back-face culling setting.
- *
* @private
*/
ModelSceneGraph.prototype.updateBackFaceCulling = function (backFaceCulling) {
@@ -828,9 +788,7 @@ const scratchShadowOptions = {
/**
* Traverses through all draw commands and changes the shadow settings.
- *
* @param {ShadowMode} shadowMode The new shadow settings.
- *
* @private
*/
ModelSceneGraph.prototype.updateShadows = function (shadowMode) {
@@ -851,9 +809,7 @@ const scratchShowBoundingVolumeOptions = {
/**
* Traverses through all draw commands and changes whether to show the debug bounding volume.
- *
* @param {boolean} debugShowBoundingVolume The new value for showing the debug bounding volume.
- *
* @private
*/
ModelSceneGraph.prototype.updateShowBoundingVolume = function (
@@ -885,9 +841,7 @@ const scratchPushDrawCommandOptions = {
/**
* Traverses through the scene graph and pushes the draw commands associated
* with each primitive to the frame state's command list.
- *
* @param {FrameState} frameState The frame state.
- *
* @private
*/
ModelSceneGraph.prototype.pushDrawCommands = function (frameState) {
@@ -936,10 +890,8 @@ function pushPrimitiveDrawCommands(runtimePrimitive, options) {
/**
* Sets the current value of an articulation stage.
- *
* @param {string} articulationStageKey The name of the articulation, a space, and the name of the stage.
* @param {number} value The numeric value of this stage of the articulation.
- *
* @private
*/
ModelSceneGraph.prototype.setArticulationStage = function (
@@ -963,7 +915,6 @@ ModelSceneGraph.prototype.setArticulationStage = function (
/**
* Applies any modified articulation stages to the matrix of each node that participates
* in any articulation. Note that this will overwrite any nodeTransformations on participating nodes.
- *
* @private
*/
ModelSceneGraph.prototype.applyArticulations = function () {
diff --git a/packages/engine/Source/Scene/Model/ModelSilhouettePipelineStage.js b/packages/engine/Source/Scene/Model/ModelSilhouettePipelineStage.js
index abcdee908fc0..c306ff73f7ca 100644
--- a/packages/engine/Source/Scene/Model/ModelSilhouettePipelineStage.js
+++ b/packages/engine/Source/Scene/Model/ModelSilhouettePipelineStage.js
@@ -6,9 +6,7 @@ import ModelSilhouetteStageVS from "../../Shaders/Model/ModelSilhouetteStageVS.j
/**
* The model silhouette pipeline stage is responsible applying silhouettes to the model.
- *
* @namespace ModelSilhouettePipelineStage
- *
* @private
*/
const ModelSilhouettePipelineStage = {
@@ -18,7 +16,6 @@ const ModelSilhouettePipelineStage = {
/**
* Tracks how many silhouettes have been created. This value is used to
* assign a reference number to the stencil.
- *
* @type {number}
* @private
*/
@@ -28,24 +25,22 @@ ModelSilhouettePipelineStage.silhouettesLength = 0;
* Process a model. This modifies the following parts of the render resources:
*
*
- * defines the silhouette ID for the model, if it doesn't yet exist
- * adds a define to the shaders to indicate that the model uses silhouettes
- * adds a function to the vertex shader to create the silhouette around the model
- * adds a function to the fragment shader to apply color to the silhouette
- * adds the uniforms to the shaders for the corresponding silhouette properties
- * adds a uniform to distinguish which draw command is used to render the silhouette
- * sets a variable in the render resources denoting whether the model has a silhouette
+ * defines the silhouette ID for the model, if it doesn't yet exist
+ * adds a define to the shaders to indicate that the model uses silhouettes
+ * adds a function to the vertex shader to create the silhouette around the model
+ * adds a function to the fragment shader to apply color to the silhouette
+ * adds the uniforms to the shaders for the corresponding silhouette properties
+ * adds a uniform to distinguish which draw command is used to render the silhouette
+ * sets a variable in the render resources denoting whether the model has a silhouette
*
*
*
* Note that the model must have a normal attribute in order to use silhouettes. The flag for this is
* added to the shader in GeometryPipelineStage.
*
- *
* @param {ModelRenderResources} renderResources The render resources for this model.
* @param {Model} model The model.
* @param {FrameState} frameState The frameState.
- *
* @private
*/
ModelSilhouettePipelineStage.process = function (
diff --git a/packages/engine/Source/Scene/Model/ModelSkin.js b/packages/engine/Source/Scene/Model/ModelSkin.js
index 72f7dca5549c..11f22ee40014 100644
--- a/packages/engine/Source/Scene/Model/ModelSkin.js
+++ b/packages/engine/Source/Scene/Model/ModelSkin.js
@@ -6,14 +6,11 @@ import defaultValue from "../../Core/defaultValue.js";
* An in-memory representation of a skin that affects nodes in the {@link ModelSceneGraph}.
* Skins should only be initialized after all of the {@link ModelRuntimeNode}s have been instantiated
* by the scene graph.
- *
* @param {object} options An object containing the following options:
* @param {ModelComponents.Skin} options.skin The corresponding skin components from the 3D model
* @param {ModelSceneGraph} options.sceneGraph The scene graph this skin belongs to.
- *
* @alias ModelSkin
- * @constructor
- *
+ * @class
* @private
*/
function ModelSkin(options) {
@@ -38,11 +35,9 @@ function ModelSkin(options) {
Object.defineProperties(ModelSkin.prototype, {
/**
* The internal skin this runtime skin represents.
- *
* @memberof ModelSkin.prototype
* @type {ModelComponents.Skin}
* @readonly
- *
* @private
*/
skin: {
@@ -53,11 +48,9 @@ Object.defineProperties(ModelSkin.prototype, {
/**
* The scene graph this skin belongs to.
- *
* @memberof ModelSkin.prototype
* @type {ModelSceneGraph}
* @readonly
- *
* @private
*/
sceneGraph: {
@@ -68,11 +61,9 @@ Object.defineProperties(ModelSkin.prototype, {
/**
* The inverse bind matrices of the skin.
- *
* @memberof ModelSkin.prototype
* @type {Matrix4[]}
* @readonly
- *
* @private
*/
inverseBindMatrices: {
@@ -83,11 +74,9 @@ Object.defineProperties(ModelSkin.prototype, {
/**
* The joints of the skin.
- *
* @memberof ModelSkin.prototype
* @type {ModelRuntimeNode[]}
* @readonly
- *
* @private
*/
joints: {
@@ -102,11 +91,9 @@ Object.defineProperties(ModelSkin.prototype, {
*
* Each node that references this skin is responsible for pre-multiplying its inverse
* world transform to the joint matrices for its own use.
- *
* @memberof ModelSkin.prototype
* @type {Matrix4[]}
* @readonly
- *
* @private
*/
jointMatrices: {
@@ -160,7 +147,6 @@ function computeJointMatrix(joint, inverseBindMatrix, result) {
/**
* Updates the joint matrices for the skin.
- *
* @private
*/
ModelSkin.prototype.updateJointMatrices = function () {
diff --git a/packages/engine/Source/Scene/Model/ModelSplitterPipelineStage.js b/packages/engine/Source/Scene/Model/ModelSplitterPipelineStage.js
index 909e9c5452d6..37bd85934bf7 100644
--- a/packages/engine/Source/Scene/Model/ModelSplitterPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/ModelSplitterPipelineStage.js
@@ -4,9 +4,7 @@ import ShaderDestination from "../../Renderer/ShaderDestination.js";
/**
* The model splitting pipeline stage is responsible for discarding fragments on the wrong side of the splitter.
- *
* @namespace ModelSplitterPipelineStage
- *
* @private
*/
const ModelSplitterPipelineStage = {
@@ -19,15 +17,13 @@ const ModelSplitterPipelineStage = {
* Process a model. This modifies the following parts of the render resources:
*
*
- * adds a define to the fragment shader to indicate that the model is split
- * adds a function to the fragment shader to discard the fragment if it's on the wrong side of the splitter.
- * adds a uniform indicating the "splitDirection" (side of the screen on which to show the model)
- *
- *
+ * adds a define to the fragment shader to indicate that the model is split
+ * adds a function to the fragment shader to discard the fragment if it's on the wrong side of the splitter.
+ * adds a uniform indicating the "splitDirection" (side of the screen on which to show the model)
+ *
* @param {ModelRenderResources} renderResources The render resources for this model.
* @param {Model} model The model.
* @param {FrameState} frameState The frameState.
- *
* @private
*/
ModelSplitterPipelineStage.process = function (
diff --git a/packages/engine/Source/Scene/Model/ModelStatistics.js b/packages/engine/Source/Scene/Model/ModelStatistics.js
index 3188895efc5a..9a5ff1c6dd56 100644
--- a/packages/engine/Source/Scene/Model/ModelStatistics.js
+++ b/packages/engine/Source/Scene/Model/ModelStatistics.js
@@ -3,18 +3,14 @@ import Check from "../../Core/Check.js";
/**
* Rendering statistics for a single model.
- *
* @alias ModelStatistics
- * @constructor
- *
+ * @class
* @see Cesium3DTilesetStatistics
- *
* @private
*/
function ModelStatistics() {
/**
* Total number of points across all POINTS primitives in this model.
- *
* @type {number}
* @private
*/
@@ -23,7 +19,6 @@ function ModelStatistics() {
/**
* Total number of triangles across all TRIANGLES, TRIANGLE_STRIP or
* TRIANGLE_FAN primitives in this model.
- *
* @type {number}
* @private
*/
@@ -34,7 +29,6 @@ function ModelStatistics() {
* attributes (which includes feature IDs and property attributes) and index
* buffers of all the model's primitives. Any attributes generated by the
* pipeline are included in this total.
- *
* @type {number}
* @private
*/
@@ -43,7 +37,6 @@ function ModelStatistics() {
/**
* Total size of all textures in bytes. This includes materials,
* feature ID textures, and property textures.
- *
* @type {number}
* @private
*/
@@ -52,7 +45,6 @@ function ModelStatistics() {
/**
* Total size of property tables. This excludes the batch textures used for
* picking and styling.
- *
* @type {number}
* @private
*/
@@ -74,12 +66,9 @@ Object.defineProperties(ModelStatistics.prototype, {
* Total size of the batch textures used for picking and styling.
* Batch textures are created asynchronously, so this iterates
* over the textures to ensure their memory values are accurate.
- *
* @memberof ModelStatistics.prototype
- *
* @type {number}
* @readonly
- *
* @private
*/
batchTexturesByteLength: {
@@ -100,7 +89,6 @@ Object.defineProperties(ModelStatistics.prototype, {
/**
* Reset the memory counts for this model. This should be called each time the
* draw command pipeline is rebuilt.
- *
* @private
*/
ModelStatistics.prototype.clear = function () {
@@ -119,10 +107,8 @@ ModelStatistics.prototype.clear = function () {
* Counts the given buffer's memory in bytes. If a buffer has
* already been counted by these statistics, it will not be
* counted again.
- *
* @param {Buffer} buffer The GPU buffer associated with the model.
* @param {boolean} hasCpuCopy Whether the buffer has a copy on the CPU via typed array.
- *
* @private
*/
ModelStatistics.prototype.addBuffer = function (buffer, hasCpuCopy) {
@@ -150,9 +136,7 @@ ModelStatistics.prototype.addBuffer = function (buffer, hasCpuCopy) {
* a model. Batch textures function differently and are counted
* using addBatchTexture
instead.
*
- *
* @param {Texture} texture The texture associated with the model.
- *
* @private
*/
ModelStatistics.prototype.addTexture = function (texture) {
@@ -179,9 +163,7 @@ ModelStatistics.prototype.addTexture = function (texture) {
* loaded by the time they are added to the statistics. Their memory
* will thus be counted dynamically.
*
- *
* @param {BatchTexture} batchTexture The batch texture associated with the model.
- *
* @private
*/
ModelStatistics.prototype.addBatchTexture = function (batchTexture) {
diff --git a/packages/engine/Source/Scene/Model/ModelType.js b/packages/engine/Source/Scene/Model/ModelType.js
index 56e39db6b383..07d539cd11ff 100644
--- a/packages/engine/Source/Scene/Model/ModelType.js
+++ b/packages/engine/Source/Scene/Model/ModelType.js
@@ -5,7 +5,6 @@ import DeveloperError from "../../Core/DeveloperError.js";
* An enum to distinguish the different uses for {@link Model},
* which include individual glTF models, and various 3D Tiles formats
* (including glTF via 3DTILES_content_gltf
).
- *
* @enum {string}
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
@@ -17,7 +16,6 @@ const ModelType = {
* Not to be confused with {@link ModelType.TILE_GLTF}
* which is for 3D Tiles
*
- *
* @type {string}
* @constant
*/
@@ -29,28 +27,24 @@ const ModelType = {
* Not to be confused with {@link ModelType.GLTF}
* which is for individual models
*
- *
* @type {string}
* @constant
*/
TILE_GLTF: "TILE_GLTF",
/**
* A 3D Tiles 1.0 Batched 3D Model
- *
* @type {string}
* @constant
*/
TILE_B3DM: "B3DM",
/**
* A 3D Tiles 1.0 Instanced 3D Model
- *
* @type {string}
* @constant
*/
TILE_I3DM: "I3DM",
/**
* A 3D Tiles 1.0 Point Cloud
- *
* @type {string}
* @constant
*/
@@ -58,7 +52,6 @@ const ModelType = {
/**
* GeoJSON content for MAXAR_content_geojson
extension
- *
* @type {string}
* @constant
*/
diff --git a/packages/engine/Source/Scene/Model/ModelUtility.js b/packages/engine/Source/Scene/Model/ModelUtility.js
index 3e24e068b6c6..4661e1c47104 100644
--- a/packages/engine/Source/Scene/Model/ModelUtility.js
+++ b/packages/engine/Source/Scene/Model/ModelUtility.js
@@ -12,19 +12,16 @@ import Matrix3 from "../../Core/Matrix3.js";
/**
* Utility functions for {@link Model}.
- *
* @private
*/
function ModelUtility() {}
/**
* Create a function for reporting when a model fails to load
- *
* @param {string} type The type of object to report about
* @param {string} path The URI of the model file
* @param {Error} [error] The error which caused the failure
* @returns {RuntimeError} An error for the failed model
- *
* @private
*/
ModelUtility.getError = function (type, path, error) {
@@ -45,10 +42,8 @@ ModelUtility.getError = function (type, path, error) {
/**
* Get a transformation matrix from a node in the model.
- *
* @param {ModelComponents.Node} node The node components
* @returns {Matrix4} The computed transformation matrix. If no transformation matrix or parameters are specified, this will be the identity matrix.
- *
* @private
*/
ModelUtility.getNodeTransform = function (node) {
@@ -65,12 +60,10 @@ ModelUtility.getNodeTransform = function (node) {
/**
* Find an attribute by semantic such as POSITION or TANGENT.
- *
* @param {ModelComponents.Primitive|ModelComponents.Instances} object The primitive components or instances object
* @param {VertexAttributeSemantic|InstanceAttributeSemantic} semantic The semantic to search for
* @param {number} [setIndex] The set index of the semantic. May be undefined for some semantics (POSITION, NORMAL, TRANSLATION, ROTATION, for example)
- * @return {ModelComponents.Attribute} The selected attribute, or undefined if not found.
- *
+ * @returns {ModelComponents.Attribute} The selected attribute, or undefined if not found.
* @private
*/
ModelUtility.getAttributeBySemantic = function (object, semantic, setIndex) {
@@ -92,11 +85,9 @@ ModelUtility.getAttributeBySemantic = function (object, semantic, setIndex) {
/**
* Similar to getAttributeBySemantic, but search using the name field only,
* as custom attributes do not have a semantic.
- *
* @param {ModelComponents.Primitive|ModelComponents.Instances} object The primitive components or instances object
* @param {string} name The name of the attribute as it appears in the model file.
- * @return {ModelComponents.Attribute} The selected attribute, or undefined if not found.
- *
+ * @returns {ModelComponents.Attribute} The selected attribute, or undefined if not found.
* @private
*/
ModelUtility.getAttributeByName = function (object, name) {
@@ -118,7 +109,6 @@ ModelUtility.getAttributeByName = function (object, name) {
* @param {ModelComponents.FeatureIdAttribute[]|ModelComponents.FeatureIdImplicitRange[]|ModelComponents.FeatureIdTexture[]} featureIds
* @param {string} label the label to search for
* @returns {ModelComponents.FeatureIdAttribute|ModelComponents.FeatureIdImplicitRange|ModelComponents.FeatureIdTexture} The feature ID set if found, otherwise undefined
- *
* @private
*/
ModelUtility.getFeatureIdsByLabel = function (featureIds, label) {
@@ -151,7 +141,6 @@ ModelUtility.hasQuantizedAttributes = function (attributes) {
/**
* @param {ModelComponents.Attribute} attribute
- *
* @private
*/
ModelUtility.getAttributeInfo = function (attribute) {
@@ -208,13 +197,10 @@ const cartesianMinScratch = new Cartesian3();
* Get the minimum and maximum values for a primitive's POSITION attribute.
* This is used to compute the bounding sphere of the primitive, as well as
* the bounding sphere of the whole model.
- *
* @param {ModelComponents.Primitive} primitive The primitive components.
* @param {Cartesian3} [instancingTranslationMin] The component-wise minimum value of the instancing translation attribute.
* @param {Cartesian3} [instancingTranslationMax] The component-wise maximum value of the instancing translation attribute.
- *
* @returns {object} An object containing the minimum and maximum position values.
- *
* @private
*/
ModelUtility.getPositionMinMax = function (
@@ -254,12 +240,10 @@ ModelUtility.getPositionMinMax = function (
* coordinate system, such as with y-up instead of z-up in 3D Tiles.
* This function returns a matrix that will correct this such that z is up,
* and x is forward.
- *
* @param {Axis} upAxis The original up direction
* @param {Axis} forwardAxis The original forward direction
* @param {Matrix4} result The matrix in which to store the result.
* @returns {Matrix4} The axis correction matrix
- *
* @private
*/
ModelUtility.getAxisCorrectionMatrix = function (upAxis, forwardAxis, result) {
@@ -291,11 +275,9 @@ const scratchMatrix3 = new Matrix3();
* is a positive value, the winding order triangle faces is counterclockwise;
* in the opposite case, the winding order is clockwise.
*
- *
* @param {Matrix4} modelMatrix The model matrix
* @param {PrimitiveType} primitiveType The primitive type
* @returns {CullFace} The cull face
- *
* @private
*/
ModelUtility.getCullFace = function (modelMatrix, primitiveType) {
@@ -313,17 +295,13 @@ ModelUtility.getCullFace = function (modelMatrix, primitiveType) {
* - Replace all sequences of non-alphanumeric characters with a single `_`.
* - If the gl_ prefix is present, remove it. The prefix is reserved in GLSL.
* - If the identifier starts with a digit, prefix it with an underscore.
- *
* @example
* // Returns "customProperty"
* ModelUtility.sanitizeGlslIdentifier("gl_customProperty");
- *
* @example
* // Returns "_1234"
* ModelUtility.sanitizeGlslIdentifier("1234");
- *
* @param {string} identifier The original identifier.
- *
* @returns {string} The sanitized version of the identifier.
*/
ModelUtility.sanitizeGlslIdentifier = function (identifier) {
@@ -371,10 +349,8 @@ ModelUtility.supportedExtensions = {
* Checks whether or not the extensions required by the glTF are
* supported. If an unsupported extension is found, this throws
* a {@link RuntimeError} with the extension name.
- *
* @param {string[]} extensionsRequired The extensionsRequired array in the glTF.
- *
- * @exception {RuntimeError} Unsupported glTF Extension
+ * @throws {RuntimeError} Unsupported glTF Extension
*/
ModelUtility.checkSupportedExtensions = function (extensionsRequired) {
const length = extensionsRequired.length;
diff --git a/packages/engine/Source/Scene/Model/MorphTargetsPipelineStage.js b/packages/engine/Source/Scene/Model/MorphTargetsPipelineStage.js
index 01f13db68c0e..6773fd59caa2 100644
--- a/packages/engine/Source/Scene/Model/MorphTargetsPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/MorphTargetsPipelineStage.js
@@ -7,9 +7,7 @@ import VertexAttributeSemantic from "../VertexAttributeSemantic.js";
/**
* The morph targets pipeline stage processes the morph targets and weights of a primitive.
- *
* @namespace MorphTargetsPipelineStage
- *
* @private
*/
const MorphTargetsPipelineStage = {
@@ -32,14 +30,12 @@ const MorphTargetsPipelineStage = {
*
* Processes a primitive. This stage modifies the following parts of the render resources:
*
- * adds attribute declarations for the morph targets in the vertex shader
- * adds the uniform declaration for the morph weights in the vertex shader
- * adds functions to apply the morphs in the vertex shader
+ * adds attribute declarations for the morph targets in the vertex shader
+ * adds the uniform declaration for the morph weights in the vertex shader
+ * adds functions to apply the morphs in the vertex shader
*
- *
* @param {PrimitiveRenderResources} renderResources The render resources for this primitive.
* @param {ModelComponents.Primitive} primitive The primitive.
- *
* @private
*/
MorphTargetsPipelineStage.process = function (renderResources, primitive) {
diff --git a/packages/engine/Source/Scene/Model/NodeRenderResources.js b/packages/engine/Source/Scene/Model/NodeRenderResources.js
index aa908ffaee85..44da00680e5d 100644
--- a/packages/engine/Source/Scene/Model/NodeRenderResources.js
+++ b/packages/engine/Source/Scene/Model/NodeRenderResources.js
@@ -6,12 +6,9 @@ import clone from "../../Core/clone.js";
* such as instancing are computed on a per-node basis. This class provides
* a place to store such details. It also inherits some properties from
* the model render resources.
- *
- * @constructor
- *
+ * @class
* @param {ModelRenderResources} modelRenderResources The model resources to inherit
* @param {ModelRuntimeNode} runtimeNode The in-memory representation of the scene graph node.
- *
* @private
*/
function NodeRenderResources(modelRenderResources, runtimeNode) {
@@ -23,20 +20,16 @@ function NodeRenderResources(modelRenderResources, runtimeNode) {
// Properties inherited from the ModelRenderResources.
/**
* A reference to the model. Inherited from the model render resources.
- *
* @type {Model}
* @readonly
- *
* @private
*/
this.model = modelRenderResources.model;
/**
* An object used to build a shader incrementally. This is cloned from the
* model render resources because each node can compute a different shader.
- *
* @type {ShaderBuilder}
* @readonly
- *
* @private
*/
this.shaderBuilder = modelRenderResources.shaderBuilder.clone();
@@ -44,10 +37,8 @@ function NodeRenderResources(modelRenderResources, runtimeNode) {
/**
* A dictionary mapping uniform name to functions that return the uniform
* values. Inherited from the model render resources.
- *
* @type {Object}
* @readonly
- *
* @private
*/
this.uniformMap = clone(modelRenderResources.uniformMap);
@@ -55,10 +46,8 @@ function NodeRenderResources(modelRenderResources, runtimeNode) {
/**
* Options for configuring the alpha stage such as pass and alpha cutoff.
* Inherited from the model render resources.
- *
* @type {ModelAlphaOptions}
* @readonly
- *
* @private
*/
this.alphaOptions = clone(modelRenderResources.alphaOptions);
@@ -68,10 +57,8 @@ function NodeRenderResources(modelRenderResources, runtimeNode) {
* The pipeline stages simply set the options, the render state is created
* when the {@link DrawCommand} is constructed. Inherited from the model
* render resources.
- *
* @type {object}
* @readonly
- *
* @private
*/
this.renderStateOptions = clone(
@@ -82,10 +69,8 @@ function NodeRenderResources(modelRenderResources, runtimeNode) {
/**
* Whether the model has a silhouette. This value indicates what draw commands
* are needed. Inherited from the model render resources.
- *
* @type {boolean}
* @readonly
- *
* @private
*/
this.hasSilhouette = modelRenderResources.hasSilhouette;
@@ -94,10 +79,8 @@ function NodeRenderResources(modelRenderResources, runtimeNode) {
* Whether the model is part of a tileset that uses the skipLevelOfDetail
* optimization. This value indicates what draw commands are needed.
* Inherited from the model render resources.
- *
* @type {boolean}
* @readonly
- *
* @private
*/
this.hasSkipLevelOfDetail = modelRenderResources.hasSkipLevelOfDetail;
@@ -105,10 +88,8 @@ function NodeRenderResources(modelRenderResources, runtimeNode) {
// Other properties.
/**
* A reference to the runtime node
- *
* @type {ModelRuntimeNode}
* @readonly
- *
* @private
*/
this.runtimeNode = runtimeNode;
@@ -117,10 +98,8 @@ function NodeRenderResources(modelRenderResources, runtimeNode) {
* An array of objects describing vertex attributes that will eventually
* be used to create a {@link VertexArray} for the draw command. Attributes
* at the node level may be needed for extensions such as EXT_mesh_gpu_instancing.
- *
- * @type {Object[]}
+ * @type {object[]}
* @readonly
- *
* @private
*/
this.attributes = [];
@@ -128,9 +107,7 @@ function NodeRenderResources(modelRenderResources, runtimeNode) {
/**
* The index to give to the next vertex attribute added to the attributes array.
* POSITION takes index 0.
- *
* @type {number}
- *
* @private
*/
this.attributeIndex = 1;
@@ -138,20 +115,16 @@ function NodeRenderResources(modelRenderResources, runtimeNode) {
/**
* The set index to assign to feature ID vertex attribute(s) created from the
* offset/repeat in the feature ID attribute.
- *
* @type {number}
* @default 0
- *
* @private
*/
this.featureIdVertexAttributeSetIndex = 0;
/**
* The number of instances. This value is set by InstancingPipelineStage.
- *
* @type {number}
* @default 0
- *
* @private
*/
this.instanceCount = 0;
diff --git a/packages/engine/Source/Scene/Model/NodeStatisticsPipelineStage.js b/packages/engine/Source/Scene/Model/NodeStatisticsPipelineStage.js
index 11cef8855abf..bf1042ff125a 100644
--- a/packages/engine/Source/Scene/Model/NodeStatisticsPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/NodeStatisticsPipelineStage.js
@@ -7,9 +7,7 @@ import defined from "../../Core/defined.js";
* count resources that are created every time the pipeline is run.
* The individual pipeline stages are responsible for keeping track of any
* additional memory they allocate.
- *
* @namespace NodeStatisticsPipelineStage
- *
* @private
*/
const NodeStatisticsPipelineStage = {
diff --git a/packages/engine/Source/Scene/Model/PickingPipelineStage.js b/packages/engine/Source/Scene/Model/PickingPipelineStage.js
index 166f71e814f8..7363122d96ef 100644
--- a/packages/engine/Source/Scene/Model/PickingPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/PickingPipelineStage.js
@@ -10,7 +10,6 @@ import ModelUtility from "./ModelUtility.js";
/**
* The picking pipeline stage is responsible for handling picking of primitives.
- *
* @namespace PickingPipelineStage
* @private
*/
@@ -70,6 +69,8 @@ PickingPipelineStage.process = function (
};
/**
+ * @param renderResources
+ * @param instanceId
* @private
*/
function buildPickObject(renderResources, instanceId) {
diff --git a/packages/engine/Source/Scene/Model/PntsLoader.js b/packages/engine/Source/Scene/Model/PntsLoader.js
index 2565dd01a420..cccc4213207c 100644
--- a/packages/engine/Source/Scene/Model/PntsLoader.js
+++ b/packages/engine/Source/Scene/Model/PntsLoader.js
@@ -36,16 +36,14 @@ const MetallicRoughness = ModelComponents.MetallicRoughness;
/**
* Loads a .pnts point cloud and transcodes it into a {@link ModelComponents}
- *
* @alias PntsLoader
- * @constructor
+ * @class
* @augments ResourceLoader
* @private
- *
* @param {object} options An object containing the following properties
* @param {ArrayBuffer} options.arrayBuffer The array buffer of the pnts contents
* @param {number} [options.byteOffset] The byte offset to the beginning of the pnts contents in the array buffer
- * @param {boolean} [options.loadAttributesFor2D=false] If true, load the positions buffer as a typed array for accurately projecting models to 2D.
+ * @param {boolean} [options.loadAttributesFor2D] If true, load the positions buffer as a typed array for accurately projecting models to 2D.
*/
function PntsLoader(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -83,9 +81,7 @@ if (defined(Object.create)) {
Object.defineProperties(PntsLoader.prototype, {
/**
* The cache key of the resource
- *
* @memberof PntsLoader.prototype
- *
* @type {string}
* @readonly
* @private
@@ -98,9 +94,7 @@ Object.defineProperties(PntsLoader.prototype, {
/**
* The loaded components.
- *
* @memberof PntsLoader.prototype
- *
* @type {ModelComponents.Components}
* @readonly
* @private
@@ -114,9 +108,7 @@ Object.defineProperties(PntsLoader.prototype, {
/**
* A world-space transform to apply to the primitives.
* See {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/PointCloud#global-semantics}
- *
* @memberof PntsLoader.prototype
- *
* @type {Matrix4}
* @readonly
* @private
diff --git a/packages/engine/Source/Scene/Model/PointCloudStylingPipelineStage.js b/packages/engine/Source/Scene/Model/PointCloudStylingPipelineStage.js
index 9abb174126d3..ead3175b49cf 100644
--- a/packages/engine/Source/Scene/Model/PointCloudStylingPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/PointCloudStylingPipelineStage.js
@@ -24,9 +24,7 @@ const scratchUniform = new Cartesian4();
* point cloud shading provided by either the model or the tileset that
* owns it. Point cloud shading is only applied if no point size style
* is provided.
- *
* @namespace PointCloudStylingPipelineStage
- *
* @private
*/
const PointCloudStylingPipelineStage = {
@@ -37,22 +35,20 @@ const PointCloudStylingPipelineStage = {
* Processes a primitive. If the model that owns it has a style, then
* this stage modifies the following parts of the render resources:
*
- * adds the styling functions to the vertex shaders
- * adds a define to compute the position in world coordinates
- * adds a varying to compute point cloud color
+ * adds the styling functions to the vertex shaders
+ * adds a define to compute the position in world coordinates
+ * adds a varying to compute point cloud color
*
*
* If the model has point cloud shading, then this stage modifies the following
* part of the render resources:
*
- * adds vertex shader code to compute attenuation and update gl_PointSize
- * updates the uniform map to pass in point cloud parameters
+ * adds vertex shader code to compute attenuation and update gl_PointSize
+ * updates the uniform map to pass in point cloud parameters
*
- *
* @param {PrimitiveRenderResources} renderResources The render resources for this primitive.
* @param {ModelComponents.Primitive} primitive The primitive.
* @param {FrameState} frameState The frame state.
- *
* @private
*/
PointCloudStylingPipelineStage.process = function (
@@ -353,10 +349,8 @@ function addShaderFunctionsAndDefines(shaderBuilder, shaderFunctionInfo) {
/**
* Gets all the built-in property names used by the given style
* function.
- *
* @param {Function} source The style function.
* @param {string[]} propertyNames The array of property names to add to.
- *
* @private
*/
function getBuiltinPropertyNames(source, propertyNames) {
diff --git a/packages/engine/Source/Scene/Model/PrimitiveOutlineGenerator.js b/packages/engine/Source/Scene/Model/PrimitiveOutlineGenerator.js
index 2e6e73a2cfe6..223aee6f4594 100644
--- a/packages/engine/Source/Scene/Model/PrimitiveOutlineGenerator.js
+++ b/packages/engine/Source/Scene/Model/PrimitiveOutlineGenerator.js
@@ -26,12 +26,9 @@ const MAX_GLTF_UINT8_INDEX = 255;
* copied and indices are updated until valid outline coordinates can be
* defined.
*
- *
* @see {@link https://www.researchgate.net/publication/220067637_Fast_and_versatile_texture-based_wireframe_rendering|Fast and versatile texture-based wireframe rendering}
- *
* @alias PrimitiveOutlineGenerator
- * @constructor
- *
+ * @class
* @param {number} options Object with the following properties:
* @param {Uint8Array|Uint16Array|Uint32Array} options.triangleIndices The original triangle indices of the primitive. The constructor takes ownership of this typed array as it will be modified internally. Use the updatedTriangleIndices getter to get the final result.
* @param {number[]} options.outlineIndices The indices of edges in the triangle from the CESIUM_primitive_outline extension
@@ -61,7 +58,6 @@ const MAX_GLTF_UINT8_INDEX = 255;
* attribute.typedArray = outlineGenerator.updateAttribute(
* attribute.typedArray
* );
- *
* @private
*/
function PrimitiveOutlineGenerator(options) {
@@ -78,18 +74,14 @@ function PrimitiveOutlineGenerator(options) {
/**
* The triangle indices. It will be modified in place.
- *
* @type {Uint8Array|Uint16Array|Uint32Array}
- *
* @private
*/
this._triangleIndices = triangleIndices;
/**
* How many vertices were originally in the primitive
- *
* @type {number}
- *
* @private
*/
this._originalVertexCount = originalVertexCount;
@@ -98,9 +90,7 @@ function PrimitiveOutlineGenerator(options) {
* The outline indices represent edges of the primitive's triangle mesh where
* outlines must be drawn. This is stored as a hash set for efficient
* checks of whether an edge is present.
- *
* @type {EdgeSet}
- *
* @private
*/
this._edges = new EdgeSet(outlineIndices, originalVertexCount);
@@ -109,9 +99,7 @@ function PrimitiveOutlineGenerator(options) {
* The typed array that will store the outline texture coordinates
* once computed. This typed array should be turned into a vertex attribute
* when rendering outlines.
- *
* @type {Float32Array}
- *
* @private
*/
this._outlineCoordinatesTypedArray = undefined;
@@ -119,9 +107,7 @@ function PrimitiveOutlineGenerator(options) {
/**
* Array containing the indices of any vertices that must be copied and
* appended to the list.
- *
* @type {number[]}
- *
* @private
*/
this._extraVertices = [];
@@ -133,12 +119,9 @@ Object.defineProperties(PrimitiveOutlineGenerator.prototype, {
/**
* The updated triangle indices after generating outlines. The caller is for
* responsible for updating the primitive's indices to use this array.
- *
* @memberof PrimitiveOutlineGenerator.prototype
- *
* @type {Uint8Array|Uint16Array|Uint32Array}
* @readonly
- *
* @private
*/
updatedTriangleIndices: {
@@ -150,12 +133,9 @@ Object.defineProperties(PrimitiveOutlineGenerator.prototype, {
/**
* The computed outline coordinates. The caller is responsible for
* turning this into a vec3 attribute for rendering.
- *
* @memberof PrimitiveOutlineGenerator.prototype
- *
* @type {Float32Array}
* @readonly
- *
* @private
*/
outlineCoordinates: {
@@ -170,9 +150,7 @@ Object.defineProperties(PrimitiveOutlineGenerator.prototype, {
* extension data. This updates the triangle indices and generates outline
* coordinates, but does not update other attributes (see
* {@link PrimitiveOutlineGenerator#updateAttribute})
- *
* @param {PrimitiveOutlineGenerator} outlineGenerator The outline generator
- *
* @private
*/
function initialize(outlineGenerator) {
@@ -293,7 +271,6 @@ function initialize(outlineGenerator) {
* This function attempts to compute a valid ordering of edges for this triangle
* and if found, computes outline coordinates for the three vertices. If not
* possible, one of the vertices is returned so it can be copied.
- *
* @param {number[]} outlineCoordinates An array to store the computed outline coordinates. There are 3 components per vertex. This will be modified in place.
* @param {number} i0 The index of the first vertex of the triangle.
* @param {number} i1 The index of the second vertex of the triangle.
@@ -302,7 +279,6 @@ function initialize(outlineGenerator) {
* @param {boolean} hasEdge12 Whether there is an outline edge between vertices 1 and 2 of the triangle
* @param {boolean} hasEdge20 Whether there is an outline edge between vertices 2 and 0 of the triangle
* @returns {number} If it's not possible to compute consistent outline coordinates for this triangle, the index of the most constrained vertex of i0, i1 and i2 is returned. Otherwise, this function returns undefined to indicate a successful match.
- *
* @private
*/
function matchAndStoreCoordinates(
@@ -421,14 +397,14 @@ function matchAndStoreCoordinates(
*
* A single triangle with all edges highlighted:
*
- * | a | b | c |
- * | 1 | 1 | 0 |
- * 0
- * / \
- * / \
- * edge 0-1 / \ edge 2-0
- * / \
- * / \
+ * | a | b | c |
+ * | 1 | 1 | 0 |
+ * 0
+ * / \
+ * / \
+ * edge 0-1 / \ edge 2-0
+ * / \
+ * / \
* | a | b | c | 1-----------2 | a | b | c |
* | 0 | 1 | 1 | edge 1-2 | 1 | 0 | 1 |
*
@@ -447,14 +423,12 @@ function matchAndStoreCoordinates(
*
* Then we can find an ordering that works for all three vertices with a
* bitwise AND.
- *
* @param {number[]} outlineCoordinates The array of outline coordinates
* @param {number} vertexIndex The index of the vertex to compute the mask for
* @param {number} a The outline coordinate for edge 2-0
* @param {number} b The outline coordinate for edge 0-1
* @param {number} c The outline coordinate for edge 1-2
* @returns {number} A bitmask with 6 bits where a 1 indicates the corresponding ordering is valid.
- *
* @private
*/
function computeOrderMask(outlineCoordinates, vertexIndex, a, b, c) {
@@ -482,10 +456,8 @@ function computeOrderMask(outlineCoordinates, vertexIndex, a, b, c) {
/**
* Compute the popcount for 6-bit integers (values 0-63). This is the
* number of 1s in the binary representation of the value.
- *
* @param {number} value The value to compute the popcount for
* @returns {number} The number of 1s in the binary representation of value
- *
* @private
*/
function popcount6Bit(value) {
@@ -503,10 +475,8 @@ function popcount6Bit(value) {
* After computing the outline coordinates, some vertices may need to be
* copied and appended to the end of the list of vertices. This function updates
* a typed array for a single attribute (e.g. POSITION or NORMAL).
- *
* @param {Uint8Array|Int8Array|Uint16Array|Int16Array|Uint32Array|Int32Array|Float32Array} attributeTypedArray The attribute values to update. This function takes ownership of this typed array
* @returns {Uint8Array|Int8Array|Uint16Array|Int16Array|Uint32Array|Int32Array|Float32Array} A new typed array that contains the existing attribute values, plus any copied values at the end.
- *
* @private
*/
PrimitiveOutlineGenerator.prototype.updateAttribute = function (
@@ -546,10 +516,8 @@ PrimitiveOutlineGenerator.prototype.updateAttribute = function (
/**
* Create a mip-mapped lookup texture for rendering outlines. The texture is
* constant, so it is cached on the context.
- *
* @param {Context} context The context to use for creating the texture
* @returns {Texture} The outline lookup texture.
- *
* @private
*/
PrimitiveOutlineGenerator.createTexture = function (context) {
@@ -600,10 +568,8 @@ PrimitiveOutlineGenerator.createTexture = function (context) {
* Create an outline lookup texture for a single mip level. This is a texture of
* mostly 0 values, except for the last value which is brighter to indicate
* the outline.
- *
* @param {number} size The width of the texture for this mip level
* @returns {Uint8Array} A typed array containing the texels of the mip level
- *
* @private
*/
function createMipLevel(size) {
@@ -630,22 +596,17 @@ function createMipLevel(size) {
/**
* A hash set that provides quick lookups of whether an edge exists between
* two vertices.
- *
* @alias EdgeSet
- * @constructor
- *
+ * @class
* @param {number[]} edgeIndices An array of vertex indices with an even number of elements where each pair of indices defines an edge.
* @param {number} originalVertexCount The original number of vertices. This is used for computing a hash function.
- *
* @private
*/
function EdgeSet(edgeIndices, originalVertexCount) {
/**
* Original number of vertices in the primitive. This is used for computing
* the hash key
- *
* @type {number}
- *
* @private
*/
this._originalVertexCount = originalVertexCount;
@@ -656,7 +617,6 @@ function EdgeSet(edgeIndices, originalVertexCount) {
* smallerVertexIndex * originalVertexCount + biggerVertexIndex
*
* @type {Set}
- *
* @private
*/
this._edges = new Set();
@@ -676,7 +636,6 @@ function EdgeSet(edgeIndices, originalVertexCount) {
* @param {number} a The first index
* @param {number} b The second index
* @returns {boolean} true if there is an edge between a and b
- *
* @private
*/
EdgeSet.prototype.hasEdge = function (a, b) {
diff --git a/packages/engine/Source/Scene/Model/PrimitiveOutlinePipelineStage.js b/packages/engine/Source/Scene/Model/PrimitiveOutlinePipelineStage.js
index 23b9b034896f..eee85590dac6 100644
--- a/packages/engine/Source/Scene/Model/PrimitiveOutlinePipelineStage.js
+++ b/packages/engine/Source/Scene/Model/PrimitiveOutlinePipelineStage.js
@@ -7,9 +7,7 @@ import PrimitiveOutlineStageFS from "../../Shaders/Model/PrimitiveOutlineStageFS
/**
* The primitive outline pipeline stage configures the shader to render outlines
* from the CESIUM_primitive_outline extension.
- *
* @namespace PrimitiveOutlinePipelineStage
- *
* @private
*/
const PrimitiveOutlinePipelineStage = {
diff --git a/packages/engine/Source/Scene/Model/PrimitiveRenderResources.js b/packages/engine/Source/Scene/Model/PrimitiveRenderResources.js
index ccf947bd3fd0..2e381145a417 100644
--- a/packages/engine/Source/Scene/Model/PrimitiveRenderResources.js
+++ b/packages/engine/Source/Scene/Model/PrimitiveRenderResources.js
@@ -9,10 +9,8 @@ import ModelLightingOptions from "./ModelLightingOptions.js";
/**
* Each node may have many mesh primitives. Most model pipeline stages operate
* at the primitive level. Again, properties are inherited from the parent.
- *
* @param {NodeRenderResources} nodeRenderResources The node resources to inherit from
* @param {ModelRuntimePrimitive} runtimePrimitive The primitive.
- *
* @private
*/
function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
@@ -24,20 +22,16 @@ function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
// Properties inherited from NodeRenderResources.
/**
* A reference to the model. Inherited from the node render resources.
- *
* @type {Model}
* @readonly
- *
* @private
*/
this.model = nodeRenderResources.model;
/**
* A reference to the runtime node. Inherited from the node render resources.
- *
* @type {ModelRuntimeNode}
* @readonly
- *
* @private
*/
this.runtimeNode = nodeRenderResources.runtimeNode;
@@ -45,10 +39,8 @@ function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
/**
* The vertex attributes. This is shallow cloned from the node render
* resources as the primitive will add additional properties.
- *
- * @type {Object[]}
+ * @type {object[]}
* @readonly
- *
* @private
*/
this.attributes = nodeRenderResources.attributes.slice();
@@ -56,9 +48,7 @@ function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
/**
* The index to give to the next vertex attribute added to the attributes
* array. POSITION takes index 0. Inherited from the node render resources.
- *
* @type {number}
- *
* @private
*/
this.attributeIndex = nodeRenderResources.attributeIndex;
@@ -67,9 +57,7 @@ function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
* The set index to assign to feature ID vertex attribute(s) created from the
* offset/repeat in the feature ID attribute. Inherited from the node render
* resources.
- *
* @type {number}
- *
* @private
*/
this.featureIdVertexAttributeSetIndex =
@@ -78,10 +66,8 @@ function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
/**
* A dictionary mapping uniform name to functions that return the uniform
* values. Inherited from the node render resources.
- *
* @type {Object}
* @readonly
- *
* @private
*/
this.uniformMap = clone(nodeRenderResources.uniformMap);
@@ -89,10 +75,8 @@ function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
/**
* Options for configuring the alpha stage such as pass and alpha cutoff.
* Inherited from the node render resources.
- *
* @type {ModelAlphaOptions}
* @readonly
- *
* @private
*/
this.alphaOptions = clone(nodeRenderResources.alphaOptions);
@@ -102,10 +86,8 @@ function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
* The pipeline stages simply set the options; the actual render state
* is created when the {@link DrawCommand} is constructed. Inherited from
* the node render resources.
- *
* @type {object}
* @readonly
- *
* @private
*/
this.renderStateOptions = clone(nodeRenderResources.renderStateOptions, true);
@@ -113,10 +95,8 @@ function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
/**
* Whether the model has a silhouette. This value indicates what draw commands
* are needed. Inherited from the node render resources.
- *
* @type {boolean}
* @readonly
- *
* @private
*/
this.hasSilhouette = nodeRenderResources.hasSilhouette;
@@ -125,10 +105,8 @@ function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
* Whether the model is part of a tileset that uses the skipLevelOfDetail
* optimization. This value indicates what draw commands are needed.
* Inherited from the node render resources.
- *
* @type {boolean}
* @readonly
- *
* @private
*/
this.hasSkipLevelOfDetail = nodeRenderResources.hasSkipLevelOfDetail;
@@ -136,10 +114,8 @@ function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
/**
* An object used to build a shader incrementally. This is cloned from the
* node render resources because each primitive can compute a different shader.
- *
* @type {ShaderBuilder}
* @readonly
- *
* @private
*/
this.shaderBuilder = nodeRenderResources.shaderBuilder.clone();
@@ -147,10 +123,8 @@ function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
/**
* The number of instances. Default is 0, if instancing is not used.
* Inherited from the node render resources.
- *
* @type {number}
* @readonly
- *
* @private
*/
this.instanceCount = nodeRenderResources.instanceCount;
@@ -158,20 +132,16 @@ function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
// Other properties
/**
* A reference to the runtime primitive.
- *
* @type {ModelRuntimePrimitive}
* @readonly
- *
* @private
*/
this.runtimePrimitive = runtimePrimitive;
/**
* The primitive associated with the render resources.
- *
* @type {ModelComponents.Primitive}
* @readonly
- *
* @private
*/
const primitive = runtimePrimitive.primitive;
@@ -179,10 +149,8 @@ function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
/**
* The number of indices in the primitive. The interpretation of this
* depends on the primitive type.
- *
* @type {number}
* @readonly
- *
* @private
*/
this.count = defined(primitive.indices)
@@ -193,20 +161,16 @@ function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
* Whether or not this primitive has a property table for storing metadata.
* When present, picking and styling can use this. This value is set by
* SelectedFeatureIdPipelineStage.
- *
* @type {boolean}
* @default false
- *
* @private
*/
this.hasPropertyTable = false;
/**
* The indices for this primitive.
- *
* @type {ModelComponents.Indices}
* @readonly
- *
* @private
*/
this.indices = primitive.indices;
@@ -214,20 +178,16 @@ function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
/**
* Additional index buffer for wireframe mode (if enabled). This value is set
* by WireframePipelineStage.
- *
* @type {Buffer}
* @readonly
- *
* @private
*/
this.wireframeIndexBuffer = undefined;
/**
* The primitive type such as TRIANGLES or POINTS.
- *
* @type {PrimitiveType}
* @readonly
- *
* @private
*/
this.primitiveType = primitive.primitiveType;
@@ -240,30 +200,24 @@ function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
/**
* The minimum position value for this primitive.
- *
* @type {Cartesian3}
* @readonly
- *
* @private
*/
this.positionMin = Cartesian3.clone(positionMinMax.min, new Cartesian3());
/**
* The maximum position value for this primitive.
- *
* @type {Cartesian3}
* @readonly
- *
* @private
*/
this.positionMax = Cartesian3.clone(positionMinMax.max, new Cartesian3());
/**
* The bounding sphere that contains all the vertices in this primitive.
- *
* @type {BoundingSphere}
* @readonly
- *
* @private
*/
this.boundingSphere = BoundingSphere.fromCornerPoints(
@@ -275,10 +229,8 @@ function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
/**
* Options for configuring the lighting stage, such as selecting between
* unlit and PBR shading.
- *
* @type {ModelLightingOptions}
* @readonly
- *
* @private
*/
this.lightingOptions = new ModelLightingOptions();
@@ -286,9 +238,7 @@ function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
/**
* The shader variable to use for picking. If picking is enabled, this value
* is set by PickingPipelineStage.
- *
* @type {string}
- *
* @private
*/
this.pickId = undefined;
diff --git a/packages/engine/Source/Scene/Model/PrimitiveStatisticsPipelineStage.js b/packages/engine/Source/Scene/Model/PrimitiveStatisticsPipelineStage.js
index 2b872c6fb61e..bac6444df8f6 100644
--- a/packages/engine/Source/Scene/Model/PrimitiveStatisticsPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/PrimitiveStatisticsPipelineStage.js
@@ -10,9 +10,7 @@ import ModelUtility from "./ModelUtility.js";
* loaded by GltfLoader). It does not count resources that are created
* every time the pipeline is run. The individual pipeline stages are
* responsible for tracking the additional memory they allocate.
- *
* @namespace PrimitiveStatisticsPipelineStage
- *
* @private
*/
const PrimitiveStatisticsPipelineStage = {
diff --git a/packages/engine/Source/Scene/Model/SceneMode2DPipelineStage.js b/packages/engine/Source/Scene/Model/SceneMode2DPipelineStage.js
index c099dd6e4b2a..8066abd58320 100644
--- a/packages/engine/Source/Scene/Model/SceneMode2DPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/SceneMode2DPipelineStage.js
@@ -17,9 +17,7 @@ const scratchModelView2D = new Matrix4();
/**
* The scene mode 2D stage generates resources for rendering a primitive in 2D / CV mode.
- *
* @namespace SceneMode2DPipelineStage
- *
* @private
*/
const SceneMode2DPipelineStage = {
@@ -36,16 +34,14 @@ const SceneMode2DPipelineStage = {
*
* Processes a primitive. This stage modifies the following parts of the render resources:
*
- * creates a vertex buffer for the positions of the primitive projected to 2D
- * creates the bounding sphere for the primitive in 2D
- * adds a flag to the shader to use 2D positions
- * adds a uniform for the view model matrix in 2D
+ * creates a vertex buffer for the positions of the primitive projected to 2D
+ * creates the bounding sphere for the primitive in 2D
+ * adds a flag to the shader to use 2D positions
+ * adds a uniform for the view model matrix in 2D
*
- *
* @param {PrimitiveRenderResources} renderResources The render resources for this primitive.
* @param {ModelComponents.Primitive} primitive The primitive.
* @param {FrameState} frameState The frame state.
- *
* @private
*/
diff --git a/packages/engine/Source/Scene/Model/SelectedFeatureIdPipelineStage.js b/packages/engine/Source/Scene/Model/SelectedFeatureIdPipelineStage.js
index e55a1e9ae1df..b72e90987ca6 100644
--- a/packages/engine/Source/Scene/Model/SelectedFeatureIdPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/SelectedFeatureIdPipelineStage.js
@@ -8,7 +8,6 @@ import ModelUtility from "./ModelUtility.js";
/**
* The selected feature ID pipeline stage is responsible for handling the
* set of feature IDs selected for styling/picking.
- *
* @namespace SelectedFeatureIdPipelineStage
* @private
*/
@@ -26,10 +25,9 @@ const SelectedFeatureIdPipelineStage = {
/**
* Process a primitive. This modifies the following parts of the render resources:
*
- * sets the defines for the feature ID attribute to use for styling/picking
- * adds fields to the SelectedFeature struct in the shader
+ * sets the defines for the feature ID attribute to use for styling/picking
+ * adds fields to the SelectedFeature struct in the shader
*
- *
* @param {PrimitiveRenderResources} renderResources The render resources for this primitive.
* @param {ModelComponents.Primitive} primitive The primitive.
* @param {FrameState} frameState The frame state.
@@ -155,11 +153,11 @@ function getSelectedFeatureIds(model, node, primitive) {
* as follows:
*
* struct SelectedFeature {
- * int id;
- * vec2 st;
- * vec4 color;
+ * int id;
+ * vec2 st;
+ * vec4 color;
* }
- *
+ * @param shaderBuilder
* @private
*/
function updateFeatureStruct(shaderBuilder) {
diff --git a/packages/engine/Source/Scene/Model/SkinningPipelineStage.js b/packages/engine/Source/Scene/Model/SkinningPipelineStage.js
index 0f7fc1b84fdc..78041091c28f 100644
--- a/packages/engine/Source/Scene/Model/SkinningPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/SkinningPipelineStage.js
@@ -5,9 +5,7 @@ import VertexAttributeSemantic from "../VertexAttributeSemantic.js";
/**
* The skinning pipeline stage processes the joint matrices of a skinned primitive.
- *
* @namespace SkinningPipelineStage
- *
* @private
*/
@@ -25,10 +23,9 @@ const SkinningPipelineStage = {
*
* Processes a primitive. This stage modifies the following parts of the render resources:
*
- * adds the uniform declaration for the joint matrices in the vertex shader
- * adds the function to compute the skinning matrix in the vertex shader
+ * adds the uniform declaration for the joint matrices in the vertex shader
+ * adds the function to compute the skinning matrix in the vertex shader
*
- *
* @param {PrimitiveRenderResources} renderResources The render resources for this primitive.
* @param {ModelComponents.Primitive} primitive The primitive.
* @private
diff --git a/packages/engine/Source/Scene/Model/StyleCommandsNeeded.js b/packages/engine/Source/Scene/Model/StyleCommandsNeeded.js
index a673bbf3b1bc..83a12437c52f 100644
--- a/packages/engine/Source/Scene/Model/StyleCommandsNeeded.js
+++ b/packages/engine/Source/Scene/Model/StyleCommandsNeeded.js
@@ -1,7 +1,6 @@
/**
* An enum describing what commands (opaque or translucent) are required by
* a {@link Cesium3DTileStyle}.
- *
* @enum {number}
* @private
*/
@@ -12,6 +11,8 @@ const StyleCommandsNeeded = {
};
/**
+ * @param featuresLength
+ * @param translucentFeaturesLength
* @private
*/
StyleCommandsNeeded.getStyleCommandsNeeded = function (
diff --git a/packages/engine/Source/Scene/Model/TextureManager.js b/packages/engine/Source/Scene/Model/TextureManager.js
index fb13fda62919..987acdc83ec6 100644
--- a/packages/engine/Source/Scene/Model/TextureManager.js
+++ b/packages/engine/Source/Scene/Model/TextureManager.js
@@ -10,10 +10,8 @@ import TextureWrap from "../../Renderer/TextureWrap.js";
/**
* An object to manage loading textures
- *
* @alias TextureManager
- * @constructor
- *
+ * @class
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -30,7 +28,7 @@ function TextureManager() {
/**
* Get one of the loaded textures
* @param {string} textureId The unique ID of the texture loaded by {@link TextureManager#loadTexture2D}
- * @return {Texture} The texture or undefined
if no texture exists
+ * @returns {Texture} The texture or undefined
if no texture exists
*/
TextureManager.prototype.getTexture = function (textureId) {
return this._textures[textureId];
@@ -59,10 +57,8 @@ function fetchTexture2D(textureManager, textureId, textureUniform) {
/**
* Load a texture 2D asynchronously. Note that {@link TextureManager#update}
* must be called in the render loop to finish processing the textures.
- *
* @param {string} textureId A unique ID to identify this texture.
* @param {TextureUniform} textureUniform A description of the texture
- *
* @private
*/
TextureManager.prototype.loadTexture2D = function (textureId, textureUniform) {
@@ -202,9 +198,7 @@ TextureManager.prototype.update = function (frameState) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
- *
* @see TextureManager#destroy
* @private
*/
@@ -219,12 +213,9 @@ TextureManager.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* textureManager = textureManager && textureManager.destroy();
- *
* @see TextureManager#isDestroyed
* @private
*/
diff --git a/packages/engine/Source/Scene/Model/TextureUniform.js b/packages/engine/Source/Scene/Model/TextureUniform.js
index ef0b4b809806..e073cf5c35d7 100644
--- a/packages/engine/Source/Scene/Model/TextureUniform.js
+++ b/packages/engine/Source/Scene/Model/TextureUniform.js
@@ -10,22 +10,19 @@ import TextureWrap from "../../Renderer/TextureWrap.js";
/**
* A simple struct that serves as a value of a sampler2D
-valued
* uniform. This is used with {@link CustomShader} and {@link TextureManager}
- *
* @param {object} options An object with the following properties:
* @param {Uint8Array} [options.typedArray] A typed array storing the contents of a texture. Values are stored in row-major order. Since WebGL uses a y-up convention for textures, rows are listed from bottom to top.
* @param {number} [options.width] The width of the image. Required when options.typedArray is present
* @param {number} [options.height] The height of the image. Required when options.typedArray is present.
* @param {string|Resource} [options.url] A URL string or resource pointing to a texture image.
- * @param {boolean} [options.repeat=true] When defined, the texture sampler will be set to wrap in both directions
- * @param {PixelFormat} [options.pixelFormat=PixelFormat.RGBA] When options.typedArray is defined, this is used to determine the pixel format of the texture
- * @param {PixelDatatype} [options.pixelDatatype=PixelDatatype.UNSIGNED_BYTE] When options.typedArray is defined, this is the data type of pixel values in the typed array.
- * @param {TextureMinificationFilter} [options.minificationFilter=TextureMinificationFilter.LINEAR] The minification filter of the texture sampler.
- * @param {TextureMagnificationFilter} [options.magnificationFilter=TextureMagnificationFilter.LINEAR] The magnification filter of the texture sampler.
- * @param {number} [options.maximumAnisotropy=1.0] The maximum anisotropy of the texture sampler
- *
+ * @param {boolean} [options.repeat] When defined, the texture sampler will be set to wrap in both directions
+ * @param {PixelFormat} [options.pixelFormat] When options.typedArray is defined, this is used to determine the pixel format of the texture
+ * @param {PixelDatatype} [options.pixelDatatype] When options.typedArray is defined, this is the data type of pixel values in the typed array.
+ * @param {TextureMinificationFilter} [options.minificationFilter] The minification filter of the texture sampler.
+ * @param {TextureMagnificationFilter} [options.magnificationFilter] The magnification filter of the texture sampler.
+ * @param {number} [options.maximumAnisotropy] The maximum anisotropy of the texture sampler
* @alias TextureUniform
- * @constructor
- *
+ * @class
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
function TextureUniform(options) {
diff --git a/packages/engine/Source/Scene/Model/TilesetPipelineStage.js b/packages/engine/Source/Scene/Model/TilesetPipelineStage.js
index 7a3257ff6869..fd969a0c2714 100644
--- a/packages/engine/Source/Scene/Model/TilesetPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/TilesetPipelineStage.js
@@ -6,9 +6,7 @@ import StencilConstants from "../StencilConstants.js";
/**
* The tileset pipeline stage is responsible for updating the model with behavior
* specific to 3D Tiles.
- *
* @namespace TilesetPipelineStage
- *
* @private
*/
const TilesetPipelineStage = {
@@ -19,19 +17,17 @@ const TilesetPipelineStage = {
* Process a model. This modifies the following parts of the render resources:
*
*
- * adds a define to the fragment shader to indicate that the model uses polygon offset for the skipLevelOfDetail optimization
- * adds a function to the uniform map to supply polygon offset values for the skipLevelOfDetail optimization
- * sets stencil values that enable classification on 3D Tiles
+ * adds a define to the fragment shader to indicate that the model uses polygon offset for the skipLevelOfDetail optimization
+ * adds a function to the uniform map to supply polygon offset values for the skipLevelOfDetail optimization
+ * sets stencil values that enable classification on 3D Tiles
*
*
*
* See {@link ModelDrawCommand} for the corresponding skipLevelOfDetail derived commands.
*
- *
* @param {ModelRenderResources} renderResources The render resources for this model.
* @param {ModelExperimental} model The model.
* @param {FrameState} frameState The frameState.
- *
* @private
*/
TilesetPipelineStage.process = function (renderResources, model, frameState) {
diff --git a/packages/engine/Source/Scene/Model/UniformType.js b/packages/engine/Source/Scene/Model/UniformType.js
index 880df862b1fb..743136c3ca39 100644
--- a/packages/engine/Source/Scene/Model/UniformType.js
+++ b/packages/engine/Source/Scene/Model/UniformType.js
@@ -1,113 +1,96 @@
/**
* An enum of the basic GLSL uniform types. These can be used with
* {@link CustomShader} to declare user-defined uniforms.
- *
* @enum {string}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
const UniformType = {
/**
* A single floating point value.
- *
* @type {string}
* @constant
*/
FLOAT: "float",
/**
* A vector of 2 floating point values.
- *
* @type {string}
* @constant
*/
VEC2: "vec2",
/**
* A vector of 3 floating point values.
- *
* @type {string}
* @constant
*/
VEC3: "vec3",
/**
* A vector of 4 floating point values.
- *
* @type {string}
* @constant
*/
VEC4: "vec4",
/**
* A single integer value
- *
* @type {string}
* @constant
*/
INT: "int",
/**
* A vector of 2 integer values.
- *
* @type {string}
* @constant
*/
INT_VEC2: "ivec2",
/**
* A vector of 3 integer values.
- *
* @type {string}
* @constant
*/
INT_VEC3: "ivec3",
/**
* A vector of 4 integer values.
- *
* @type {string}
* @constant
*/
INT_VEC4: "ivec4",
/**
* A single boolean value.
- *
* @type {string}
* @constant
*/
BOOL: "bool",
/**
* A vector of 2 boolean values.
- *
* @type {string}
* @constant
*/
BOOL_VEC2: "bvec2",
/**
* A vector of 3 boolean values.
- *
* @type {string}
* @constant
*/
BOOL_VEC3: "bvec3",
/**
* A vector of 4 boolean values.
- *
* @type {string}
* @constant
*/
BOOL_VEC4: "bvec4",
/**
* A 2x2 matrix of floating point values.
- *
* @type {string}
* @constant
*/
MAT2: "mat2",
/**
* A 3x3 matrix of floating point values.
- *
* @type {string}
* @constant
*/
MAT3: "mat3",
/**
* A 3x3 matrix of floating point values.
- *
* @type {string}
* @constant
*/
diff --git a/packages/engine/Source/Scene/Model/VaryingType.js b/packages/engine/Source/Scene/Model/VaryingType.js
index 3b588dd175bb..656840fc2a79 100644
--- a/packages/engine/Source/Scene/Model/VaryingType.js
+++ b/packages/engine/Source/Scene/Model/VaryingType.js
@@ -1,57 +1,48 @@
/**
* An enum for the GLSL varying types. These can be used for declaring varyings
* in {@link CustomShader}
- *
* @enum {string}
- *
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
const VaryingType = {
/**
* A single floating point value.
- *
* @type {string}
* @constant
*/
FLOAT: "float",
/**
* A vector of 2 floating point values.
- *
* @type {string}
* @constant
*/
VEC2: "vec2",
/**
* A vector of 3 floating point values.
- *
* @type {string}
* @constant
*/
VEC3: "vec3",
/**
* A vector of 4 floating point values.
- *
* @type {string}
* @constant
*/
VEC4: "vec4",
/**
* A 2x2 matrix of floating point values.
- *
* @type {string}
* @constant
*/
MAT2: "mat2",
/**
* A 3x3 matrix of floating point values.
- *
* @type {string}
* @constant
*/
MAT3: "mat2",
/**
* A 3x3 matrix of floating point values.
- *
* @type {string}
* @constant
*/
diff --git a/packages/engine/Source/Scene/Model/VerticalExaggerationPipelineStage.js b/packages/engine/Source/Scene/Model/VerticalExaggerationPipelineStage.js
index 19f26b1001d3..18d82c255366 100644
--- a/packages/engine/Source/Scene/Model/VerticalExaggerationPipelineStage.js
+++ b/packages/engine/Source/Scene/Model/VerticalExaggerationPipelineStage.js
@@ -6,9 +6,7 @@ import VerticalExaggerationStageVS from "../../Shaders/Model/VerticalExaggeratio
* The vertical exaggeration pipeline stage transforms the vertex
* positions based on the values of {@link Scene#verticalExaggeration} and
* {@link Scene#verticalExaggerationRelativeHeight}
- *
* @namespace VerticalExaggerationPipelineStage
- *
* @private
*/
const VerticalExaggerationPipelineStage = {
@@ -19,7 +17,6 @@ const scratchExaggerationUniform = new Cartesian2();
/**
* Add defines and uniforms for vertical exaggeration calculations in the vertex shader
- *
* @param {PrimitiveRenderResources} renderResources The render resources for the primitive
* @param {ModelComponents.Primitive} primitive The primitive to be rendered
* @param {FrameState} frameState The frame state.
diff --git a/packages/engine/Source/Scene/Model/WireframePipelineStage.js b/packages/engine/Source/Scene/Model/WireframePipelineStage.js
index 7aed34818ea6..d529ccbb9d6c 100644
--- a/packages/engine/Source/Scene/Model/WireframePipelineStage.js
+++ b/packages/engine/Source/Scene/Model/WireframePipelineStage.js
@@ -11,7 +11,6 @@ import WireframeIndexGenerator from "../../Core/WireframeIndexGenerator.js";
/**
* The wireframe pipeline stage generates a new index buffer for rendering the
* structure of the mesh with gl.LINES.
- *
* @namespace WireframePipelineStage
* @private
*/
@@ -22,11 +21,10 @@ const WireframePipelineStage = {
/**
* Process a primitive. This modifies the render resources as follows:
*
- * Adds a define to the fragment shader to prevent extra shading of the lines.
- * Adds a separate index buffer for wireframe indices
- * Updates the primitive type and count for rendering with gl.LINES
+ * Adds a define to the fragment shader to prevent extra shading of the lines.
+ * Adds a separate index buffer for wireframe indices
+ * Updates the primitive type and count for rendering with gl.LINES
*
- *
* @param {PrimitiveRenderResources} renderResources The render resources for this node
* @param {ModelComponents.primitive} primitive The primitive
* @param {FrameState} frameState The frame state
diff --git a/packages/engine/Source/Scene/Model/buildDrawCommand.js b/packages/engine/Source/Scene/Model/buildDrawCommand.js
index f23b712f06d4..1f05479996bb 100644
--- a/packages/engine/Source/Scene/Model/buildDrawCommand.js
+++ b/packages/engine/Source/Scene/Model/buildDrawCommand.js
@@ -18,12 +18,9 @@ import ModelDrawCommand from "./ModelDrawCommand.js";
* Builds the {@link ModelDrawCommand} for a {@link ModelRuntimePrimitive}
* using its render resources. If the model classifies another asset, it
* builds a {@link ClassificationModelDrawCommand} instead.
- *
* @param {PrimitiveRenderResources} primitiveRenderResources The render resources for a primitive.
* @param {FrameState} frameState The frame state for creating GPU resources.
- *
* @returns {ModelDrawCommand|ClassificationModelDrawCommand} The generated ModelDrawCommand or ClassificationModelDrawCommand.
- *
* @private
*/
function buildDrawCommand(primitiveRenderResources, frameState) {
@@ -136,6 +133,7 @@ function buildDrawCommand(primitiveRenderResources, frameState) {
}
/**
+ * @param primitiveRenderResources
* @private
*/
function getIndexBuffer(primitiveRenderResources) {
diff --git a/packages/engine/Source/Scene/Model/pickModel.js b/packages/engine/Source/Scene/Model/pickModel.js
index 634b1fd079b9..4c3567b66039 100644
--- a/packages/engine/Source/Scene/Model/pickModel.js
+++ b/packages/engine/Source/Scene/Model/pickModel.js
@@ -29,16 +29,14 @@ const scratchBoundingSphere = new BoundingSphere();
/**
* Find an intersection between a ray and the model surface that was rendered. The ray must be given in world coordinates.
- *
* @param {Model} model The model to pick.
* @param {Ray} ray The ray to test for intersection.
* @param {FrameState} frameState The frame state.
- * @param {number} [verticalExaggeration=1.0] A scalar used to exaggerate the height of a position relative to the ellipsoid. If the value is 1.0 there will be no effect.
- * @param {number} [relativeHeight=0.0] The ellipsoid height relative to which a position is exaggerated. If the value is 0.0 the position will be exaggerated relative to the ellipsoid surface.
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to which the exaggerated position is relative.
+ * @param {number} [verticalExaggeration] A scalar used to exaggerate the height of a position relative to the ellipsoid. If the value is 1.0 there will be no effect.
+ * @param {number} [relativeHeight] The ellipsoid height relative to which a position is exaggerated. If the value is 0.0 the position will be exaggerated relative to the ellipsoid surface.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid to which the exaggerated position is relative.
* @param {Cartesian3|undefined} [result] The intersection or undefined
if none was found.
* @returns {Cartesian3|undefined} The intersection or undefined
if none was found.
- *
* @private
*/
export default function pickModel(
diff --git a/packages/engine/Source/Scene/ModelAnimationLoop.js b/packages/engine/Source/Scene/ModelAnimationLoop.js
index 9b661a0bab85..c2b9bd92af60 100644
--- a/packages/engine/Source/Scene/ModelAnimationLoop.js
+++ b/packages/engine/Source/Scene/ModelAnimationLoop.js
@@ -1,14 +1,11 @@
/**
* Determines if and how a glTF animation is looped.
- *
* @enum {number}
- *
* @see ModelAnimationCollection#add
*/
const ModelAnimationLoop = {
/**
* Play the animation once; do not loop it.
- *
* @type {number}
* @constant
*/
@@ -16,7 +13,6 @@ const ModelAnimationLoop = {
/**
* Loop the animation playing it from the start immediately after it stops.
- *
* @type {number}
* @constant
*/
@@ -24,7 +20,6 @@ const ModelAnimationLoop = {
/**
* Loop the animation. First, playing it forward, then in reverse, then forward, and so on.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Scene/ModelComponents.js b/packages/engine/Source/Scene/ModelComponents.js
index c81792038073..773c3ea284a0 100644
--- a/packages/engine/Source/Scene/ModelComponents.js
+++ b/packages/engine/Source/Scene/ModelComponents.js
@@ -6,25 +6,20 @@ import Matrix4 from "../Core/Matrix4.js";
/**
* Components for building models.
- *
* @namespace ModelComponents
- *
* @private
*/
const ModelComponents = {};
/**
* Information about the quantized attribute.
- *
* @alias ModelComponents.Quantization
- * @constructor
- *
+ * @class
* @private
*/
function Quantization() {
/**
* Whether the quantized attribute is oct-encoded.
- *
* @type {boolean}
* @private
*/
@@ -32,7 +27,6 @@ function Quantization() {
/**
* Whether the oct-encoded values are stored as ZXY instead of XYZ. This is true when decoding from Draco.
- *
* @type {boolean}
* @private
*/
@@ -42,7 +36,6 @@ function Quantization() {
* The range used to convert buffer values to normalized values [0.0, 1.0]
* This is typically computed as (1 << quantizationBits) - 1.
* For oct-encoded values this value is a single Number.
- *
* @type {number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}
* @private
*/
@@ -52,7 +45,6 @@ function Quantization() {
* The bottom-left corner of the quantization volume. Not applicable for oct encoded attributes.
* The type should match the attribute type - e.g. if the attribute type
* is AttributeType.VEC4 the offset should be a Cartesian4.
- *
* @type {number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}
* @private
*/
@@ -62,7 +54,6 @@ function Quantization() {
* The dimensions of the quantization volume. Not applicable for oct encoded attributes.
* The type should match the attribute type - e.g. if the attribute type
* is AttributeType.VEC4 the dimensions should be a Cartesian4.
- *
* @type {number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}
* @private
*/
@@ -74,7 +65,6 @@ function Quantization() {
* Not applicable for oct encoded attributes.
* The type should match the attribute type - e.g. if the attribute type
* is AttributeType.VEC4 the dimensions should be a Cartesian4.
- *
* @type {number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}
* @private
*/
@@ -86,12 +76,11 @@ function Quantization() {
*
* The following component datatypes are not supported:
*
- * ComponentDatatype.INT
- * ComponentDatatype.UNSIGNED_INT
- * ComponentDatatype.DOUBLE
+ * ComponentDatatype.INT
+ * ComponentDatatype.UNSIGNED_INT
+ * ComponentDatatype.DOUBLE
*
*
- *
* @type {ComponentDatatype}
* @private
*/
@@ -99,7 +88,6 @@ function Quantization() {
/**
* The type of the quantized attribute, e.g. AttributeType.VEC2 for oct-encoded normals.
- *
* @type {AttributeType}
* @private
*/
@@ -108,16 +96,13 @@ function Quantization() {
/**
* A per-vertex or per-instance attribute.
- *
* @alias ModelComponents.Attribute
- * @constructor
- *
+ * @class
* @private
*/
function Attribute() {
/**
* The attribute name. Must be unique within the attributes array.
- *
* @type {string}
* @private
*/
@@ -126,7 +111,6 @@ function Attribute() {
/**
* The attribute semantic. The combination of semantic and setIndex must be
* unique within the attributes array.
- *
* @type {VertexAttributeSemantic|InstanceAttributeSemantic}
* @private
*/
@@ -156,12 +140,11 @@ function Attribute() {
*
* The following component datatypes are not supported:
*
- * ComponentDatatype.INT
- * ComponentDatatype.UNSIGNED_INT
- * ComponentDatatype.DOUBLE
+ * ComponentDatatype.INT
+ * ComponentDatatype.UNSIGNED_INT
+ * ComponentDatatype.DOUBLE
*
*
- *
* @type {ComponentDatatype}
* @private
*/
@@ -173,7 +156,6 @@ function Attribute() {
* When the data is oct-encoded the type should match the decoded data, which
* is typically AttributeType.VEC3.
*
- *
* @type {AttributeType}
* @private
*/
@@ -181,7 +163,6 @@ function Attribute() {
/**
* Whether the attribute is normalized.
- *
* @type {boolean}
* @default false
* @private
@@ -190,7 +171,6 @@ function Attribute() {
/**
* The number of elements.
- *
* @type {number}
* @private
*/
@@ -205,7 +185,6 @@ function Attribute() {
*
* Must be defined for POSITION attributes.
*
- *
* @type {number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}
* @private
*/
@@ -220,7 +199,6 @@ function Attribute() {
*
* Must be defined for POSITION attributes.
*
- *
* @type {number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}
* @private
*/
@@ -228,7 +206,6 @@ function Attribute() {
/**
* A constant value used for all elements when typed array and buffer are undefined.
- *
* @type {number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}
* @private
*/
@@ -236,7 +213,6 @@ function Attribute() {
/**
* Information about the quantized attribute.
- *
* @type {ModelComponents.Quantization}
* @private
*/
@@ -245,7 +221,6 @@ function Attribute() {
/**
* A typed array containing tightly-packed attribute values, as they appear
* in the model file.
- *
* @type {Uint8Array|Int8Array|Uint16Array|Int16Array|Uint32Array|Int32Array|Float32Array}
* @private
*/
@@ -253,7 +228,6 @@ function Attribute() {
/**
* A vertex buffer. Attribute values are accessed using byteOffset and byteStride.
- *
* @type {Buffer}
* @private
*/
@@ -261,7 +235,6 @@ function Attribute() {
/**
* The byte offset of elements in the buffer.
- *
* @type {number}
* @default 0
* @private
@@ -270,7 +243,6 @@ function Attribute() {
/**
* The byte stride of elements in the buffer. When undefined the elements are tightly packed.
- *
* @type {number}
* @private
*/
@@ -279,16 +251,13 @@ function Attribute() {
/**
* Indices used to select vertices for rendering.
- *
* @alias ModelComponents.Indices
- * @constructor
- *
+ * @class
* @private
*/
function Indices() {
/**
* The index data type of the attribute, e.g. IndexDatatype.UNSIGNED_SHORT.
- *
* @type {IndexDatatype}
* @private
*/
@@ -296,7 +265,6 @@ function Indices() {
/**
* The number of indices.
- *
* @type {number}
* @private
*/
@@ -304,7 +272,6 @@ function Indices() {
/**
* An index buffer containing indices.
- *
* @type {Buffer}
* @private
*/
@@ -312,7 +279,6 @@ function Indices() {
/**
* A typed array containing indices.
- *
* @type {Uint8Array|Uint16Array|Uint32Array}
* @private
*/
@@ -322,16 +288,13 @@ function Indices() {
/**
* Maps per-vertex or per-instance feature IDs to a property table. Feature
* IDs are stored in an accessor.
- *
* @alias ModelComponents.FeatureIdAttribute
- * @constructor
- *
+ * @class
* @private
*/
function FeatureIdAttribute() {
/**
* How many unique features are defined in this set of feature IDs
- *
* @type {number}
* @private
*/
@@ -339,7 +302,6 @@ function FeatureIdAttribute() {
/**
* This value indicates that no feature is indicated with this vertex
- *
* @type {number}
* @private
*/
@@ -348,8 +310,6 @@ function FeatureIdAttribute() {
/**
* The ID of the property table that feature IDs index into. If undefined,
* feature IDs are used for classification, but no metadata is associated.
- *
- *
* @type {number}
* @private
*/
@@ -357,7 +317,6 @@ function FeatureIdAttribute() {
/**
* The set index of feature ID attribute containing feature IDs.
- *
* @type {number}
* @private
*/
@@ -366,7 +325,6 @@ function FeatureIdAttribute() {
/**
* The label to identify this set of feature IDs. This is used in picking,
* styling and shaders.
- *
* @type {string}
* @private
*/
@@ -376,7 +334,6 @@ function FeatureIdAttribute() {
* Label to identify this set of feature IDs by its position in the array.
* This will always be either "featureId_N" for primitives or
* "instanceFeatureId_N" for instances.
- *
* @type {string}
* @private
*/
@@ -387,16 +344,13 @@ function FeatureIdAttribute() {
* Defines a range of implicitly-defined feature IDs, one for each vertex or
* instance. Such feature IDs may optionally be associated with a property table
* storing metadata
- *
* @alias ModelComponents.FeatureIdImplicitRange
- * @constructor
- *
+ * @class
* @private
*/
function FeatureIdImplicitRange() {
/**
* How many unique features are defined in this set of feature IDs
- *
* @type {number}
* @private
*/
@@ -404,7 +358,6 @@ function FeatureIdImplicitRange() {
/**
* This value indicates that no feature is indicated with this vertex
- *
* @type {number}
* @private
*/
@@ -413,7 +366,6 @@ function FeatureIdImplicitRange() {
/**
* The ID of the property table that feature IDs index into. If undefined,
* feature IDs are used for classification, but no metadata is associated.
- *
* @type {number}
* @private
*/
@@ -421,7 +373,6 @@ function FeatureIdImplicitRange() {
/**
* The first feature ID to use when setIndex is undefined
- *
* @type {number}
* @default 0
* @private
@@ -430,7 +381,6 @@ function FeatureIdImplicitRange() {
/**
* Number of times each feature ID is repeated before being incremented.
- *
* @type {number}
* @private
*/
@@ -439,7 +389,6 @@ function FeatureIdImplicitRange() {
/**
* The label to identify this set of feature IDs. This is used in picking,
* styling and shaders.
- *
* @type {string}
* @private
*/
@@ -449,7 +398,6 @@ function FeatureIdImplicitRange() {
* Label to identify this set of feature IDs by its position in the array.
* This will always be either "featureId_N" for primitives or
* "instanceFeatureId_N" for instances.
- *
* @type {string}
* @private
*/
@@ -458,16 +406,13 @@ function FeatureIdImplicitRange() {
/**
* A texture that contains per-texel feature IDs that index into a property table.
- *
* @alias ModelComponents.FeatureIdTexture
- * @constructor
- *
+ * @class
* @private
*/
function FeatureIdTexture() {
/**
* How many unique features are defined in this set of feature IDs
- *
* @type {number}
* @private
*/
@@ -475,7 +420,6 @@ function FeatureIdTexture() {
/**
* This value indicates that no feature is indicated with this texel
- *
* @type {number}
* @private
*/
@@ -484,7 +428,6 @@ function FeatureIdTexture() {
/**
* The ID of the property table that feature IDs index into. If undefined,
* feature IDs are used for classification, but no metadata is associated.
- *
* @type {string}
* @private
*/
@@ -492,7 +435,6 @@ function FeatureIdTexture() {
/**
* The texture reader containing feature IDs.
- *
* @type {ModelComponents.TextureReader}
* @private
*/
@@ -501,7 +443,6 @@ function FeatureIdTexture() {
/**
* The label to identify this set of feature IDs. This is used in picking,
* styling and shaders.
- *
* @type {string}
* @private
*/
@@ -511,7 +452,6 @@ function FeatureIdTexture() {
* Label to identify this set of feature IDs by its position in the array.
* This will always be either "featureId_N" for primitives or
* "instanceFeatureId_N" for instances.
- *
* @type {string}
* @private
*/
@@ -520,16 +460,13 @@ function FeatureIdTexture() {
/**
* A morph target where each attribute contains attribute displacement data.
- *
* @alias ModelComponents.MorphTarget
- * @constructor
- *
+ * @class
* @private
*/
function MorphTarget() {
/**
* Attributes that are part of the morph target, e.g. positions, normals, and tangents.
- *
* @type {ModelComponents.Attribute[]}
* @private
*/
@@ -538,16 +475,13 @@ function MorphTarget() {
/**
* Geometry to be rendered with a material.
- *
* @alias ModelComponents.Primitive
- * @constructor
- *
+ * @class
* @private
*/
function Primitive() {
/**
* The vertex attributes, e.g. positions, normals, etc.
- *
* @type {ModelComponents.Attribute[]}
* @private
*/
@@ -555,7 +489,6 @@ function Primitive() {
/**
* The morph targets.
- *
* @type {ModelComponents.MorphTarget[]}
* @private
*/
@@ -563,7 +496,6 @@ function Primitive() {
/**
* The indices.
- *
* @type {ModelComponents.Indices}
* @private
*/
@@ -571,7 +503,6 @@ function Primitive() {
/**
* The material.
- *
* @type {ModelComponents.Material}
* @private
*/
@@ -579,7 +510,6 @@ function Primitive() {
/**
* The primitive type, e.g. PrimitiveType.TRIANGLES.
- *
* @type {PrimitiveType}
* @private
*/
@@ -588,7 +518,6 @@ function Primitive() {
/**
* The feature IDs associated with this primitive. Feature ID types may
* be interleaved
- *
* @type {Array}
* @private
*/
@@ -597,7 +526,6 @@ function Primitive() {
/**
* The property texture IDs. These indices correspond to the array of
* property textures.
- *
* @type {number[]}
* @private
*/
@@ -606,7 +534,6 @@ function Primitive() {
/**
* The property attribute IDs. These indices correspond to the array of
* property attributes in the EXT_structural_metadata extension.
- *
* @type {number[]}
* @private
*/
@@ -615,7 +542,6 @@ function Primitive() {
/**
* If the CESIUM_primitive_outline glTF extension is used, this property
* stores an additional attribute storing outline coordinates.
- *
* @type {Attribute}
* @private
*/
@@ -624,16 +550,13 @@ function Primitive() {
/**
* Position and metadata information for instances of a node.
- *
* @alias ModelComponents.Instances
- * @constructor
- *
+ * @class
* @private
*/
function Instances() {
/**
* The instance attributes, e.g. translation, rotation, scale, feature id, etc.
- *
* @type {ModelComponents.Attribute[]}
* @private
*/
@@ -642,7 +565,6 @@ function Instances() {
/**
* The feature ID attributes associated with this set of instances.
* Feature ID attribute types may be interleaved.
- *
* @type {Array}
* @private
*/
@@ -652,7 +574,6 @@ function Instances() {
* Whether the instancing transforms are applied in world space. For glTF models that
* use EXT_mesh_gpu_instancing, the transform is applied in object space. For i3dm files,
* the instance transform is in world space.
- *
* @type {boolean}
* @private
*/
@@ -661,17 +582,14 @@ function Instances() {
/**
* Joints and matrices defining a skin.
- *
* @alias ModelComponents.Skin
- * @constructor
- *
+ * @class
* @private
*/
function Skin() {
/**
* The index of the skin in the glTF. This is useful for finding the skin
* that applies to a node after the skin is instantiated at runtime.
- *
* @type {number}
* @private
*/
@@ -679,7 +597,6 @@ function Skin() {
/**
* The joints.
- *
* @type {ModelComponents.Node[]}
* @private
*/
@@ -687,7 +604,6 @@ function Skin() {
/**
* The inverse bind matrices of the joints.
- *
* @type {Matrix4[]}
* @private
*/
@@ -696,16 +612,13 @@ function Skin() {
/**
* A node in the node hierarchy.
- *
* @alias ModelComponents.Node
- * @constructor
- *
+ * @class
* @private
*/
function Node() {
/**
* The name of the node.
- *
* @type {string}
* @private
*/
@@ -714,7 +627,6 @@ function Node() {
/**
* The index of the node in the glTF. This is useful for finding the nodes
* that belong to a skin after they have been instantiated at runtime.
- *
* @type {number}
* @private
*/
@@ -722,7 +634,6 @@ function Node() {
/**
* The children nodes.
- *
* @type {ModelComponents.Node[]}
* @private
*/
@@ -730,7 +641,6 @@ function Node() {
/**
* The mesh primitives.
- *
* @type {ModelComponents.Primitive[]}
* @private
*/
@@ -738,7 +648,6 @@ function Node() {
/**
* Instances of this node.
- *
* @type {ModelComponents.Instances}
* @private
*/
@@ -746,7 +655,6 @@ function Node() {
/**
* The skin.
- *
* @type {ModelComponents.Skin}
* @private
*/
@@ -756,7 +664,6 @@ function Node() {
* The local transformation matrix. When matrix is defined translation,
* rotation, and scale must be undefined. When matrix is undefined
* translation, rotation, and scale must all be defined.
- *
* @type {Matrix4}
* @private
*/
@@ -764,7 +671,6 @@ function Node() {
/**
* The local translation.
- *
* @type {Cartesian3}
* @private
*/
@@ -772,7 +678,6 @@ function Node() {
/**
* The local rotation.
- *
* @type {Quaternion}
* @private
*/
@@ -780,7 +685,6 @@ function Node() {
/**
* The local scale.
- *
* @type {Cartesian3}
* @private
*/
@@ -789,7 +693,6 @@ function Node() {
/**
* An array of weights to be applied to the primitives' morph targets.
* These are supplied by either the node or its mesh.
- *
* @type {number[]}
* @private
*/
@@ -798,7 +701,6 @@ function Node() {
/**
* The name of the articulation affecting this node, as defined by the
* AGI_articulations extension.
- *
* @type {string}
* @private
*/
@@ -807,16 +709,13 @@ function Node() {
/**
* A scene containing nodes.
- *
* @alias ModelComponents.Scene
- * @constructor
- *
+ * @class
* @private
*/
function Scene() {
/**
* The nodes belonging to the scene.
- *
* @type {ModelComponents.Node[]}
* @private
*/
@@ -826,10 +725,8 @@ function Scene() {
/**
* The property of the node that is targeted by an animation. The values of
* this enum are used to look up the appropriate property on the runtime node.
- *
* @alias {ModelComponents.AnimatedPropertyType}
* @enum {string}
- *
* @private
*/
const AnimatedPropertyType = {
@@ -842,16 +739,13 @@ const AnimatedPropertyType = {
/**
* An animation sampler that describes the sources of animated keyframe data
* and their interpolation.
- *
* @alias {ModelComponents.AnimationSampler}
- * @constructor
- *
+ * @class
* @private
*/
function AnimationSampler() {
/**
* The timesteps of the animation.
- *
* @type {number[]}
* @private
*/
@@ -859,7 +753,6 @@ function AnimationSampler() {
/**
* The method used to interpolate between the animation's keyframe data.
- *
* @type {InterpolationType}
* @private
*/
@@ -867,7 +760,6 @@ function AnimationSampler() {
/**
* The keyframe data of the animation.
- *
* @type {number[]|Cartesian3[]|Quaternion[]}
* @private
*/
@@ -876,16 +768,13 @@ function AnimationSampler() {
/**
* An animation target, which specifies the node and property to animate.
- *
* @alias {ModelComponents.AnimationTarget}
- * @constructor
- *
+ * @class
* @private
*/
function AnimationTarget() {
/**
* The node that will be affected by the animation.
- *
* @type {ModelComponents.Node}
* @private
*/
@@ -893,7 +782,6 @@ function AnimationTarget() {
/**
* The property of the node to be animated.
- *
* @type {ModelComponents.AnimatedPropertyType}
* @private
*/
@@ -902,16 +790,13 @@ function AnimationTarget() {
/**
* An animation channel linking an animation sampler and the target it animates.
- *
* @alias {ModelComponents.AnimationChannel}
- * @constructor
- *
+ * @class
* @private
*/
function AnimationChannel() {
/**
* The sampler used as the source of the animation data.
- *
* @type {ModelComponents.AnimationSampler}
* @private
*/
@@ -919,7 +804,6 @@ function AnimationChannel() {
/**
* The target of the animation.
- *
* @type {ModelComponents.AnimationTarget}
* @private
*/
@@ -928,16 +812,13 @@ function AnimationChannel() {
/**
* An animation in the model.
- *
* @alias {ModelComponents.Animation}
- * @constructor
- *
+ * @class
* @private
*/
function Animation() {
/**
* The name of the animation.
- *
* @type {string}
* @private
*/
@@ -945,7 +826,6 @@ function Animation() {
/**
* The samplers used in this animation.
- *
* @type {ModelComponents.AnimationSampler[]}
* @private
*/
@@ -953,7 +833,6 @@ function Animation() {
/**
* The channels used in this animation.
- *
* @type {ModelComponents.AnimationChannel[]}
* @private
*/
@@ -963,16 +842,13 @@ function Animation() {
/**
* An articulation stage belonging to an articulation from the
* AGI_articulations extension.
- *
* @alias {ModelComponents.ArticulationStage}
- * @constructor
- *
+ * @class
* @private
*/
function ArticulationStage() {
/**
* The name of the articulation stage.
- *
* @type {string}
* @private
*/
@@ -980,7 +856,6 @@ function ArticulationStage() {
/**
* The type of the articulation stage, defined by the type of motion it modifies.
- *
* @type {ArticulationStageType}
* @private
*/
@@ -988,7 +863,6 @@ function ArticulationStage() {
/**
* The minimum value for the range of motion of this articulation stage.
- *
* @type {number}
* @private
*/
@@ -996,7 +870,6 @@ function ArticulationStage() {
/**
* The maximum value for the range of motion of this articulation stage.
- *
* @type {number}
* @private
*/
@@ -1004,7 +877,6 @@ function ArticulationStage() {
/**
* The initial value for this articulation stage.
- *
* @type {number}
* @private
*/
@@ -1013,16 +885,13 @@ function ArticulationStage() {
/**
* An articulation for the model, as defined by the AGI_articulations extension.
- *
* @alias {ModelComponents.Articulation}
- * @constructor
- *
+ * @class
* @private
*/
function Articulation() {
/**
* The name of the articulation.
- *
* @type {string}
* @private
*/
@@ -1031,7 +900,6 @@ function Articulation() {
/**
* The stages belonging to this articulation. The stages are applied to
* the model in order of appearance.
- *
* @type {ModelComponents.ArticulationStage[]}
* @private
*/
@@ -1040,16 +908,13 @@ function Articulation() {
/**
* The asset of the model.
- *
* @alias {ModelComponents.Asset}
- * @constructor
- *
+ * @class
* @private
*/
function Asset() {
/**
* The credits of the model.
- *
* @type {Credit[]}
* @private
*/
@@ -1058,16 +923,13 @@ function Asset() {
/**
* The components that make up a model.
- *
* @alias ModelComponents.Components
- * @constructor
- *
+ * @class
* @private
*/
function Components() {
/**
* The asset of the model.
- *
* @type {ModelComponents.Asset}
* @private
*/
@@ -1075,7 +937,6 @@ function Components() {
/**
* The default scene.
- *
* @type {ModelComponents.Scene}
* @private
*/
@@ -1083,28 +944,24 @@ function Components() {
/**
* All nodes in the model.
- *
* @type {ModelComponents.Node[]}
*/
this.nodes = [];
/**
* All skins in the model.
- *
* @type {ModelComponents.Skin[]}
*/
this.skins = [];
/**
* All animations in the model.
- *
* @type {ModelComponents.Animation[]}
*/
this.animations = [];
/**
* All articulations in the model as defined by the AGI_articulations extension.
- *
* @type {ModelComponents.Articulation[]}
*/
this.articulations = [];
@@ -1112,7 +969,6 @@ function Components() {
/**
* Structural metadata containing the schema, property tables, property
* textures and property mappings
- *
* @type {StructuralMetadata}
* @private
*/
@@ -1120,7 +976,6 @@ function Components() {
/**
* The model's up axis.
- *
* @type {Axis}
* @private
*/
@@ -1128,7 +983,6 @@ function Components() {
/**
* The model's forward axis.
- *
* @type {Axis}
* @private
*/
@@ -1136,7 +990,6 @@ function Components() {
/**
* A world-space transform to apply to the primitives.
- *
* @type {Matrix4}
* @private
*/
@@ -1145,16 +998,13 @@ function Components() {
/**
* Information about a GPU texture, including the texture itself
- *
* @alias ModelComponents.TextureReader
- * @constructor
- *
+ * @class
* @private
*/
function TextureReader() {
/**
* The underlying GPU texture. The {@link Texture} contains the sampler.
- *
* @type {Texture}
* @private
*/
@@ -1164,7 +1014,6 @@ function TextureReader() {
* The index of the texture in the glTF. This is useful for determining
* when textures are shared to avoid attaching a texture in multiple uniform
* slots in the shader.
- *
* @type {number}
* @private
*/
@@ -1172,7 +1021,6 @@ function TextureReader() {
/**
* The texture coordinate set.
- *
* @type {number}
* @default 0
* @private
@@ -1181,7 +1029,6 @@ function TextureReader() {
/**
* Transformation matrix to apply to texture coordinates.
- *
* @type {Matrix3}
* @default Matrix3.IDENTITY
*/
@@ -1189,7 +1036,6 @@ function TextureReader() {
/**
* The texture channels to read from. When undefined all channels are read.
- *
* @type {string}
*/
this.channels = undefined;
@@ -1197,16 +1043,13 @@ function TextureReader() {
/**
* Material properties for the PBR metallic roughness shading model.
- *
* @alias ModelComponents.MetallicRoughness
- * @constructor
- *
+ * @class
* @private
*/
function MetallicRoughness() {
/**
* The base color texture reader.
- *
* @type {ModelComponents.TextureReader}
* @private
*/
@@ -1214,7 +1057,6 @@ function MetallicRoughness() {
/**
* The metallic roughness texture reader.
- *
* @type {ModelComponents.TextureReader}
* @private
*/
@@ -1222,7 +1064,6 @@ function MetallicRoughness() {
/**
* The base color factor.
- *
* @type {Cartesian4}
* @default new Cartesian4(1.0, 1.0, 1.0, 1.0)
* @private
@@ -1233,7 +1074,6 @@ function MetallicRoughness() {
/**
* The metallic factor.
- *
* @type {number}
* @default 1.0
* @private
@@ -1242,7 +1082,6 @@ function MetallicRoughness() {
/**
* The roughness factor.
- *
* @type {number}
* @default 1.0
* @private
@@ -1267,16 +1106,13 @@ MetallicRoughness.DEFAULT_ROUGHNESS_FACTOR = 1.0;
/**
* Material properties for the PBR specular glossiness shading model.
- *
* @alias ModelComponents.SpecularGlossiness
- * @constructor
- *
+ * @class
* @private
*/
function SpecularGlossiness() {
/**
* The diffuse texture reader.
- *
* @type {ModelComponents.TextureReader}
* @private
*/
@@ -1284,7 +1120,6 @@ function SpecularGlossiness() {
/**
* The specular glossiness texture reader.
- *
* @type {ModelComponents.TextureReader}
* @private
*/
@@ -1292,7 +1127,6 @@ function SpecularGlossiness() {
/**
* The diffuse factor.
- *
* @type {Cartesian4}
* @default new Cartesian4(1.0, 1.0, 1.0, 1.0)
* @private
@@ -1303,7 +1137,6 @@ function SpecularGlossiness() {
/**
* The specular factor.
- *
* @type {Cartesian3}
* @default new Cartesian3(1.0, 1.0, 1.0)
* @private
@@ -1314,7 +1147,6 @@ function SpecularGlossiness() {
/**
* The glossiness factor.
- *
* @type {number}
* @default 1.0
* @private
@@ -1340,7 +1172,6 @@ SpecularGlossiness.DEFAULT_GLOSSINESS_FACTOR = 1.0;
function Specular() {
/**
* The specular factor.
- *
* @type {number}
* @default 1.0
* @private
@@ -1349,7 +1180,6 @@ function Specular() {
/**
* The specular texture reader.
- *
* @type {ModelComponents.TextureReader}
* @private
*/
@@ -1357,7 +1187,6 @@ function Specular() {
/**
* The specular color factor.
- *
* @type {Cartesian3}
* @default new Cartesian3(1.0, 1.0, 1.0)
* @private
@@ -1368,7 +1197,6 @@ function Specular() {
/**
* The specular color texture reader.
- *
* @type {ModelComponents.TextureReader}
* @private
*/
@@ -1388,7 +1216,6 @@ Specular.DEFAULT_SPECULAR_COLOR_FACTOR = Cartesian3.ONE;
function Anisotropy() {
/**
* The anisotropy strength.
- *
* @type {number}
* @default 0.0
* @private
@@ -1398,7 +1225,6 @@ function Anisotropy() {
/**
* The rotation of the anisotropy in tangent, bitangent space,
* measured in radians counter-clockwise from the tangent.
- *
* @type {number}
* @default 0.0
* @private
@@ -1407,7 +1233,6 @@ function Anisotropy() {
/**
* The anisotropy texture reader.
- *
* @type {ModelComponents.TextureReader}
* @private
*/
@@ -1427,7 +1252,6 @@ Anisotropy.DEFAULT_ANISOTROPY_ROTATION = 0.0;
function Clearcoat() {
/**
* The clearcoat layer intensity.
- *
* @type {number}
* @default 0.0
* @private
@@ -1436,7 +1260,6 @@ function Clearcoat() {
/**
* The clearcoat layer intensity texture reader.
- *
* @type {ModelComponents.TextureReader}
* @private
*/
@@ -1444,7 +1267,6 @@ function Clearcoat() {
/**
* The clearcoat layer roughness.
- *
* @type {number}
* @default 0.0
* @private
@@ -1453,7 +1275,6 @@ function Clearcoat() {
/**
* The clearcoat layer roughness texture.
- *
* @type {ModelComponents.TextureReader}
* @private
*/
@@ -1461,7 +1282,6 @@ function Clearcoat() {
/**
* The clearcoat normal map texture.
- *
* @type {ModelComponents.TextureReader}
* @private
*/
@@ -1480,16 +1300,13 @@ Clearcoat.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR = 0.0;
/**
* The material appearance of a primitive.
- *
* @alias ModelComponents.Material
- * @constructor
- *
+ * @class
* @private
*/
function Material() {
/**
* Material properties for the PBR metallic roughness shading model.
- *
* @type {ModelComponents.MetallicRoughness}
* @private
*/
@@ -1497,7 +1314,6 @@ function Material() {
/**
* Material properties for the PBR specular glossiness shading model.
- *
* @type {ModelComponents.SpecularGlossiness}
* @private
*/
@@ -1505,7 +1321,6 @@ function Material() {
/**
* Material properties for the PBR specular shading model.
- *
* @type {ModelComponents.Specular}
* @private
*/
@@ -1513,7 +1328,6 @@ function Material() {
/**
* Material properties for the PBR anisotropy shading model.
- *
* @type {ModelComponents.Anisotropy}
* @private
*/
@@ -1521,7 +1335,6 @@ function Material() {
/**
* Material properties for the PBR clearcoat shading model.
- *
* @type {ModelComponents.Clearcoat}
* @private
*/
@@ -1529,7 +1342,6 @@ function Material() {
/**
* The emissive texture reader.
- *
* @type {ModelComponents.TextureReader}
* @private
*/
@@ -1537,7 +1349,6 @@ function Material() {
/**
* The normal texture reader.
- *
* @type {ModelComponents.TextureReader}
* @private
*/
@@ -1545,7 +1356,6 @@ function Material() {
/**
* The occlusion texture reader.
- *
* @type {ModelComponents.TextureReader}
* @private
*/
@@ -1553,7 +1363,6 @@ function Material() {
/**
* The emissive factor.
- *
* @type {Cartesian3}
* @default Cartesian3.ZERO
* @private
@@ -1562,7 +1371,6 @@ function Material() {
/**
* The alpha mode.
- *
* @type {AlphaMode}
* @default AlphaMode.OPAQUE
* @private
@@ -1571,7 +1379,6 @@ function Material() {
/**
* The alpha cutoff value of the material for the MASK alpha mode.
- *
* @type {number}
* @default 0.5
* @private
@@ -1580,7 +1387,6 @@ function Material() {
/**
* Specifies whether the material is double sided.
- *
* @type {boolean}
* @default false
* @private
@@ -1589,7 +1395,6 @@ function Material() {
/**
* Specifies whether the material is unlit.
- *
* @type {boolean}
* @default false
* @private
diff --git a/packages/engine/Source/Scene/Moon.js b/packages/engine/Source/Scene/Moon.js
index aef70fb880b3..b06972711092 100644
--- a/packages/engine/Source/Scene/Moon.js
+++ b/packages/engine/Source/Scene/Moon.js
@@ -15,18 +15,14 @@ import Material from "./Material.js";
/**
* Draws the Moon in 3D.
* @alias Moon
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {boolean} [options.show=true] Determines whether the moon will be rendered.
- * @param {string} [options.textureUrl=buildModuleUrl('Assets/Textures/moonSmall.jpg')] The moon texture.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.MOON] The moon ellipsoid.
- * @param {boolean} [options.onlySunLighting=true] Use the sun as the only light source.
- *
- *
+ * @param {boolean} [options.show] Determines whether the moon will be rendered.
+ * @param {string} [options.textureUrl] The moon texture.
+ * @param {Ellipsoid} [options.ellipsoid] The moon ellipsoid.
+ * @param {boolean} [options.onlySunLighting] Use the sun as the only light source.
* @example
* scene.moon = new Cesium.Moon();
- *
* @see Scene#moon
*/
function Moon(options) {
@@ -39,7 +35,6 @@ function Moon(options) {
/**
* Determines if the moon will be shown.
- *
* @type {boolean}
* @default true
*/
@@ -75,12 +70,9 @@ function Moon(options) {
Object.defineProperties(Moon.prototype, {
/**
* Get the ellipsoid that defines the shape of the moon.
- *
* @memberof Moon.prototype
- *
* @type {Ellipsoid}
* @readonly
- *
* @default {@link Ellipsoid.MOON}
*/
ellipsoid: {
@@ -96,6 +88,7 @@ const translationScratch = new Cartesian3();
const scratchCommandList = [];
/**
+ * @param frameState
* @private
*/
Moon.prototype.update = function (frameState) {
@@ -141,9 +134,7 @@ Moon.prototype.update = function (frameState) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see Moon#destroy
*/
Moon.prototype.isDestroyed = function () {
@@ -157,13 +148,9 @@ Moon.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* moon = moon && moon.destroy();
- *
* @see Moon#isDestroyed
*/
Moon.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/Multiple3DTileContent.js b/packages/engine/Source/Scene/Multiple3DTileContent.js
index 42ede698a349..feaa3979011d 100644
--- a/packages/engine/Source/Scene/Multiple3DTileContent.js
+++ b/packages/engine/Source/Scene/Multiple3DTileContent.js
@@ -19,17 +19,13 @@ import preprocess3DTileContent from "./preprocess3DTileContent.js";
*
* Implements the {@link Cesium3DTileContent} interface.
*
- *
* @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_multiple_contents|3DTILES_multiple_contents extension}
- *
* @alias Multiple3DTileContent
- * @constructor
- *
+ * @class
* @param {Cesium3DTileset} tileset The tileset this content belongs to
* @param {Cesium3DTile} tile The content this content belongs to
* @param {Resource} tilesetResource The resource that points to the tileset. This will be used to derive each inner content's resource.
* @param {object} contentsJson Either the tile JSON containing the contents array (3D Tiles 1.1), or 3DTILES_multiple_contents
extension JSON
- *
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -78,9 +74,7 @@ Object.defineProperties(Multiple3DTileContent.prototype, {
/**
* Part of the {@link Cesium3DTileContent} interface. Multiple3DTileContent
checks if any of the inner contents have dirty featurePropertiesDirty.
* @memberof Multiple3DTileContent.prototype
- *
* @type {boolean}
- *
* @private
*/
featurePropertiesDirty: {
@@ -107,12 +101,9 @@ Object.defineProperties(Multiple3DTileContent.prototype, {
/**
* Part of the {@link Cesium3DTileContent} interface. Multiple3DTileContent
* always returns 0
. Instead call featuresLength
for a specific inner content.
- *
* @memberof Multiple3DTileContent.prototype
- *
* @type {number}
* @readonly
- *
* @private
*/
featuresLength: {
@@ -124,12 +115,9 @@ Object.defineProperties(Multiple3DTileContent.prototype, {
/**
* Part of the {@link Cesium3DTileContent} interface. Multiple3DTileContent
* always returns 0
. Instead, call pointsLength
for a specific inner content.
- *
* @memberof Multiple3DTileContent.prototype
- *
* @type {number}
* @readonly
- *
* @private
*/
pointsLength: {
@@ -141,12 +129,9 @@ Object.defineProperties(Multiple3DTileContent.prototype, {
/**
* Part of the {@link Cesium3DTileContent} interface. Multiple3DTileContent
* always returns 0
. Instead call trianglesLength
for a specific inner content.
- *
* @memberof Multiple3DTileContent.prototype
- *
* @type {number}
* @readonly
- *
* @private
*/
trianglesLength: {
@@ -158,12 +143,9 @@ Object.defineProperties(Multiple3DTileContent.prototype, {
/**
* Part of the {@link Cesium3DTileContent} interface. Multiple3DTileContent
* always returns 0
. Instead call geometryByteLength
for a specific inner content.
- *
* @memberof Multiple3DTileContent.prototype
- *
* @type {number}
* @readonly
- *
* @private
*/
geometryByteLength: {
@@ -175,12 +157,9 @@ Object.defineProperties(Multiple3DTileContent.prototype, {
/**
* Part of the {@link Cesium3DTileContent} interface. Multiple3DTileContent
* always returns 0
. Instead call texturesByteLength
for a specific inner content.
- *
* @memberof Multiple3DTileContent.prototype
- *
* @type {number}
* @readonly
- *
* @private
*/
texturesByteLength: {
@@ -192,12 +171,9 @@ Object.defineProperties(Multiple3DTileContent.prototype, {
/**
* Part of the {@link Cesium3DTileContent} interface. Multiple3DTileContent
* always returns 0
. Instead call batchTableByteLength
for a specific inner content.
- *
* @memberof Multiple3DTileContent.prototype
- *
* @type {number}
* @readonly
- *
* @private
*/
batchTableByteLength: {
@@ -214,9 +190,7 @@ Object.defineProperties(Multiple3DTileContent.prototype, {
/**
* Returns true when the tile's content is ready to render; otherwise false
- *
* @memberof Multiple3DTileContent.prototype
- *
* @type {boolean}
* @readonly
* @private
@@ -248,7 +222,6 @@ Object.defineProperties(Multiple3DTileContent.prototype, {
* Unlike other content types, Multiple3DTileContent
does not
* have a single URL, so this returns undefined.
* @memberof Multiple3DTileContent.prototype
- *
* @type {string}
* @readonly
* @private
@@ -312,7 +285,6 @@ Object.defineProperties(Multiple3DTileContent.prototype, {
* been fetched or not. This is intended for use with
* {@link Cesium3DTileset#debugShowUrl}.
* @memberof Multiple3DTileContent.prototype
- *
* @type {string[]}
* @readonly
* @private
@@ -356,8 +328,7 @@ function cancelPendingRequests(multipleContents, originalContentState) {
* This method also updates the tile statistics' pending request count if the
* requests are successfully scheduled.
*
- *
- * @return {Promise|undefined} A promise that resolves when the request completes, or undefined if there is no request needed, or the request cannot be scheduled.
+ * @returns {Promise|undefined} A promise that resolves when the request completes, or undefined if there is no request needed, or the request cannot be scheduled.
* @private
*/
Multiple3DTileContent.prototype.requestInnerContents = function () {
@@ -391,7 +362,7 @@ Multiple3DTileContent.prototype.requestInnerContents = function () {
/**
* Check if all requests for inner contents can be scheduled at once. This is slower, but it avoids a potential memory leak.
* @param {string[]} serverKeys The server keys for all of the inner contents
- * @return {boolean} True if the request scheduler has enough open slots for all inner contents
+ * @returns {boolean} True if the request scheduler has enough open slots for all inner contents
* @private
*/
function canScheduleAllRequests(serverKeys) {
@@ -591,7 +562,6 @@ function handleInnerContentFailed(multipleContents, index, error) {
/**
* Cancel all requests for inner contents. This is called by the tile
* when a tile goes out of view.
- *
* @private
*/
Multiple3DTileContent.prototype.cancelRequests = function () {
@@ -606,6 +576,8 @@ Multiple3DTileContent.prototype.cancelRequests = function () {
/**
* Part of the {@link Cesium3DTileContent} interface. Multiple3DTileContent
* always returns false
. Instead call hasProperty
for a specific inner content
+ * @param batchId
+ * @param name
* @private
*/
Multiple3DTileContent.prototype.hasProperty = function (batchId, name) {
@@ -615,6 +587,7 @@ Multiple3DTileContent.prototype.hasProperty = function (batchId, name) {
/**
* Part of the {@link Cesium3DTileContent} interface. Multiple3DTileContent
* always returns undefined
. Instead call getFeature
for a specific inner content
+ * @param batchId
* @private
*/
Multiple3DTileContent.prototype.getFeature = function (batchId) {
@@ -653,12 +626,10 @@ Multiple3DTileContent.prototype.update = function (tileset, frameState) {
/**
* Find an intersection between a ray and the tile content surface that was rendered. The ray must be given in world coordinates.
- *
* @param {Ray} ray The ray to test for intersection.
* @param {FrameState} frameState The frame state.
* @param {Cartesian3|undefined} [result] The intersection or undefined
if none was found.
* @returns {Cartesian3|undefined} The intersection or undefined
if none was found.
- *
* @private
*/
Multiple3DTileContent.prototype.pick = function (ray, frameState, result) {
diff --git a/packages/engine/Source/Scene/NeverTileDiscardPolicy.js b/packages/engine/Source/Scene/NeverTileDiscardPolicy.js
index 555eb450bde1..b1546ca9ef8a 100644
--- a/packages/engine/Source/Scene/NeverTileDiscardPolicy.js
+++ b/packages/engine/Source/Scene/NeverTileDiscardPolicy.js
@@ -1,9 +1,8 @@
/**
* A {@link TileDiscardPolicy} specifying that tile images should never be discard.
- *
+ * @param options
* @alias NeverTileDiscardPolicy
- * @constructor
- *
+ * @class
* @see DiscardMissingTileImagePolicy
*/
function NeverTileDiscardPolicy(options) {}
@@ -18,7 +17,6 @@ NeverTileDiscardPolicy.prototype.isReady = function () {
/**
* Given a tile image, decide whether to discard that image.
- *
* @param {HTMLImageElement} image An image to test.
* @returns {boolean} True if the image should be discarded; otherwise, false.
*/
diff --git a/packages/engine/Source/Scene/OIT.js b/packages/engine/Source/Scene/OIT.js
index 4f479831b49e..9cf91110918a 100644
--- a/packages/engine/Source/Scene/OIT.js
+++ b/packages/engine/Source/Scene/OIT.js
@@ -18,7 +18,7 @@ import BlendFunction from "./BlendFunction.js";
/**
* @private
- * @constructor
+ * @class
* @param {Context} context
*/
function OIT(context) {
diff --git a/packages/engine/Source/Scene/OctahedralProjectedCubeMap.js b/packages/engine/Source/Scene/OctahedralProjectedCubeMap.js
index 8ba8225759d7..8d5c9ecef3e9 100644
--- a/packages/engine/Source/Scene/OctahedralProjectedCubeMap.js
+++ b/packages/engine/Source/Scene/OctahedralProjectedCubeMap.js
@@ -26,7 +26,7 @@ import OctahedralProjectionVS from "../Shaders/OctahedralProjectionVS.js";
* with minimal distortion and easy look up.
* See Chapter 16 of WebGL Insights "HDR Image-Based Lighting on the Web" by Jeff Russell
* and "Octahedron Environment Maps" for reference.
- *
+ * @param url
* @private
*/
function OctahedralProjectedCubeMap(url) {
@@ -259,9 +259,7 @@ function cleanupResources(map) {
* Only needs to be called twice. The first call queues the compute commands to generate the atlas.
* The second call cleans up unused resources. Every call afterwards is a no-op.
*
- *
* @param {FrameState} frameState The frame state.
- *
* @private
*/
OctahedralProjectedCubeMap.prototype.update = function (frameState) {
@@ -415,9 +413,7 @@ OctahedralProjectedCubeMap.prototype.update = function (frameState) {
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see OctahedralProjectedCubeMap#destroy
*/
OctahedralProjectedCubeMap.prototype.isDestroyed = function () {
@@ -432,9 +428,7 @@ OctahedralProjectedCubeMap.prototype.isDestroyed = function () {
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
*
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @see OctahedralProjectedCubeMap#isDestroyed
*/
OctahedralProjectedCubeMap.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/OpenStreetMapImageryProvider.js b/packages/engine/Source/Scene/OpenStreetMapImageryProvider.js
index 1ff19fded150..8222bea9292a 100644
--- a/packages/engine/Source/Scene/OpenStreetMapImageryProvider.js
+++ b/packages/engine/Source/Scene/OpenStreetMapImageryProvider.js
@@ -15,7 +15,6 @@ const defaultCredit = new Credit(
* @typedef {object} OpenStreetMapImageryProvider.ConstructorOptions
*
* Initialization options for the OpenStreetMapImageryProvider constructor
- *
* @property {string} [url='https://tile.openstreetmap.org'] The OpenStreetMap server url.
* @property {string} [fileExtension='png'] The file extension for images on the server.
* @property {boolean} [retinaTiles=false] When true, request tiles at the 2x resolution for retina displays.
@@ -31,14 +30,11 @@ const defaultCredit = new Credit(
* or another provider of Slippy tiles. The default url connects to OpenStreetMap's volunteer-run
* servers, so you must conform to their
* {@link http://wiki.openstreetmap.org/wiki/Tile_usage_policy|Tile Usage Policy}.
- *
* @alias OpenStreetMapImageryProvider
- * @constructor
- * @extends UrlTemplateImageryProvider
- *
+ * @class
+ * @augments UrlTemplateImageryProvider
* @param {OpenStreetMapImageryProvider.ConstructorOptions} options Object describing initialization options
- * @exception {DeveloperError} The rectangle and minimumLevel indicate that there are more than four tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.
- *
+ * @throws {DeveloperError} The rectangle and minimumLevel indicate that there are more than four tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.
* @see ArcGisMapServerImageryProvider
* @see BingMapsImageryProvider
* @see GoogleEarthEnterpriseMapsProvider
@@ -47,12 +43,10 @@ const defaultCredit = new Credit(
* @see WebMapServiceImageryProvider
* @see WebMapTileServiceImageryProvider
* @see UrlTemplateImageryProvider
- *
* @example
* const osm = new Cesium.OpenStreetMapImageryProvider({
* url : 'https://tile.openstreetmap.org/'
* });
- *
* @see {@link http://wiki.openstreetmap.org/wiki/Main_Page|OpenStreetMap Wiki}
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
*/
diff --git a/packages/engine/Source/Scene/OrderedGroundPrimitiveCollection.js b/packages/engine/Source/Scene/OrderedGroundPrimitiveCollection.js
index f52d0cb95301..f8a93d69aa80 100644
--- a/packages/engine/Source/Scene/OrderedGroundPrimitiveCollection.js
+++ b/packages/engine/Source/Scene/OrderedGroundPrimitiveCollection.js
@@ -6,7 +6,6 @@ import PrimitiveCollection from "./PrimitiveCollection.js";
/**
* A primitive collection for helping maintain the order or ground primitives based on a z-index
- *
* @private
*/
function OrderedGroundPrimitiveCollection() {
@@ -20,9 +19,7 @@ function OrderedGroundPrimitiveCollection() {
Object.defineProperties(OrderedGroundPrimitiveCollection.prototype, {
/**
* Gets the number of primitives in the collection.
- *
* @memberof OrderedGroundPrimitiveCollection.prototype
- *
* @type {number}
* @readonly
*/
@@ -35,9 +32,8 @@ Object.defineProperties(OrderedGroundPrimitiveCollection.prototype, {
/**
* Adds a primitive to the collection.
- *
* @param {GroundPrimitive} primitive The primitive to add.
- * @param {number} [zIndex = 0] The index of the primitive
+ * @param {number} [zIndex] The index of the primitive
* @returns {GroundPrimitive} The primitive added to the collection.
*/
OrderedGroundPrimitiveCollection.prototype.add = function (primitive, zIndex) {
@@ -92,9 +88,8 @@ OrderedGroundPrimitiveCollection.prototype.set = function (primitive, zIndex) {
/**
* Removes a primitive from the collection.
- *
* @param {object} primitive The primitive to remove.
- * @param {boolean} [doNotDestroy = false]
+ * @param {boolean} [doNotDestroy]
* @returns {boolean} true
if the primitive was removed; false
if the primitive is undefined
or was not found in the collection.
*/
OrderedGroundPrimitiveCollection.prototype.remove = function (
@@ -132,9 +127,7 @@ OrderedGroundPrimitiveCollection.prototype.remove = function (
/**
* Removes all primitives in the collection.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @see OrderedGroundPrimitiveCollection#destroyPrimitives
*/
OrderedGroundPrimitiveCollection.prototype.removeAll = function () {
@@ -152,7 +145,6 @@ OrderedGroundPrimitiveCollection.prototype.removeAll = function () {
/**
* Determines if this collection contains a primitive.
- *
* @param {object} primitive The primitive to check for.
* @returns {boolean} true
if the primitive is in the collection; false
if the primitive is undefined
or was not found in the collection.
*/
@@ -165,6 +157,7 @@ OrderedGroundPrimitiveCollection.prototype.contains = function (primitive) {
};
/**
+ * @param frameState
* @private
*/
OrderedGroundPrimitiveCollection.prototype.update = function (frameState) {
@@ -183,9 +176,7 @@ OrderedGroundPrimitiveCollection.prototype.update = function (frameState) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
- *
* @see OrderedGroundPrimitiveCollection#destroy
*/
OrderedGroundPrimitiveCollection.prototype.isDestroyed = function () {
@@ -203,13 +194,9 @@ OrderedGroundPrimitiveCollection.prototype.isDestroyed = function () {
* Once this collection is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* primitives = primitives && primitives.destroy();
- *
* @see OrderedGroundPrimitiveCollection#isDestroyed
*/
OrderedGroundPrimitiveCollection.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/Particle.js b/packages/engine/Source/Scene/Particle.js
index a304f03475eb..db7cc77bda3b 100644
--- a/packages/engine/Source/Scene/Particle.js
+++ b/packages/engine/Source/Scene/Particle.js
@@ -8,20 +8,18 @@ const defaultSize = new Cartesian2(1.0, 1.0);
/**
* A particle emitted by a {@link ParticleSystem}.
- *
* @alias Particle
- * @constructor
- *
+ * @class
* @param {object} options An object with the following properties:
- * @param {number} [options.mass=1.0] The mass of the particle in kilograms.
- * @param {Cartesian3} [options.position=Cartesian3.ZERO] The initial position of the particle in world coordinates.
- * @param {Cartesian3} [options.velocity=Cartesian3.ZERO] The velocity vector of the particle in world coordinates.
- * @param {number} [options.life=Number.MAX_VALUE] The life of the particle in seconds.
+ * @param {number} [options.mass] The mass of the particle in kilograms.
+ * @param {Cartesian3} [options.position] The initial position of the particle in world coordinates.
+ * @param {Cartesian3} [options.velocity] The velocity vector of the particle in world coordinates.
+ * @param {number} [options.life] The life of the particle in seconds.
* @param {object} [options.image] The URI, HTMLImageElement, or HTMLCanvasElement to use for the billboard.
- * @param {Color} [options.startColor=Color.WHITE] The color of a particle when it is born.
- * @param {Color} [options.endColor=Color.WHITE] The color of a particle when it dies.
- * @param {number} [options.startScale=1.0] The scale of the particle when it is born.
- * @param {number} [options.endScale=1.0] The scale of the particle when it dies.
+ * @param {Color} [options.startColor] The color of a particle when it is born.
+ * @param {Color} [options.endColor] The color of a particle when it dies.
+ * @param {number} [options.startScale] The scale of the particle when it is born.
+ * @param {number} [options.endScale] The scale of the particle when it dies.
* @param {Cartesian2} [options.imageSize=new Cartesian2(1.0, 1.0)] The dimensions, width by height, to scale the particle image in pixels.
*/
function Particle(options) {
@@ -127,6 +125,8 @@ Object.defineProperties(Particle.prototype, {
const deltaScratch = new Cartesian3();
/**
+ * @param dt
+ * @param particleUpdateFunction
* @private
*/
Particle.prototype.update = function (dt, particleUpdateFunction) {
diff --git a/packages/engine/Source/Scene/ParticleBurst.js b/packages/engine/Source/Scene/ParticleBurst.js
index d1ef8b720c10..4ae3bc334cbd 100644
--- a/packages/engine/Source/Scene/ParticleBurst.js
+++ b/packages/engine/Source/Scene/ParticleBurst.js
@@ -2,14 +2,12 @@ import defaultValue from "../Core/defaultValue.js";
/**
* Represents a burst of {@link Particle}s from a {@link ParticleSystem} at a given time in the systems lifetime.
- *
* @alias ParticleBurst
- * @constructor
- *
+ * @class
* @param {object} [options] An object with the following properties:
- * @param {number} [options.time=0.0] The time in seconds after the beginning of the particle system's lifetime that the burst will occur.
- * @param {number} [options.minimum=0.0] The minimum number of particles emmitted in the burst.
- * @param {number} [options.maximum=50.0] The maximum number of particles emitted in the burst.
+ * @param {number} [options.time] The time in seconds after the beginning of the particle system's lifetime that the burst will occur.
+ * @param {number} [options.minimum] The minimum number of particles emmitted in the burst.
+ * @param {number} [options.maximum] The maximum number of particles emitted in the burst.
*/
function ParticleBurst(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
diff --git a/packages/engine/Source/Scene/ParticleEmitter.js b/packages/engine/Source/Scene/ParticleEmitter.js
index c8a11276b80d..9b7cedb952dc 100644
--- a/packages/engine/Source/Scene/ParticleEmitter.js
+++ b/packages/engine/Source/Scene/ParticleEmitter.js
@@ -7,10 +7,9 @@ import DeveloperError from "../Core/DeveloperError.js";
*
* This type describes an interface and is not intended to be instantiated directly.
*
- *
+ * @param options
* @alias ParticleEmitter
- * @constructor
- *
+ * @class
* @see BoxEmitter
* @see CircleEmitter
* @see ConeEmitter
@@ -26,8 +25,8 @@ function ParticleEmitter(options) {
/**
* Initializes the given {Particle} by setting it's position and velocity.
- *
* @private
+ * @param particle
* @param {Particle} The particle to initialize
*/
ParticleEmitter.prototype.emit = function (particle) {
diff --git a/packages/engine/Source/Scene/ParticleSystem.js b/packages/engine/Source/Scene/ParticleSystem.js
index 7fab2c50d985..6c9e56b18080 100644
--- a/packages/engine/Source/Scene/ParticleSystem.js
+++ b/packages/engine/Source/Scene/ParticleSystem.js
@@ -17,23 +17,21 @@ const defaultImageSize = new Cartesian2(1.0, 1.0);
/**
* A ParticleSystem manages the updating and display of a collection of particles.
- *
* @alias ParticleSystem
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {boolean} [options.show=true] Whether to display the particle system.
+ * @param {boolean} [options.show] Whether to display the particle system.
* @param {ParticleSystem.updateCallback} [options.updateCallback] The callback function to be called each frame to update a particle.
- * @param {ParticleEmitter} [options.emitter=new CircleEmitter(0.5)] The particle emitter for this system.
- * @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The 4x4 transformation matrix that transforms the particle system from model to world coordinates.
- * @param {Matrix4} [options.emitterModelMatrix=Matrix4.IDENTITY] The 4x4 transformation matrix that transforms the particle system emitter within the particle systems local coordinate system.
- * @param {number} [options.emissionRate=5] The number of particles to emit per second.
+ * @param {ParticleEmitter} [options.emitter] The particle emitter for this system.
+ * @param {Matrix4} [options.modelMatrix] The 4x4 transformation matrix that transforms the particle system from model to world coordinates.
+ * @param {Matrix4} [options.emitterModelMatrix] The 4x4 transformation matrix that transforms the particle system emitter within the particle systems local coordinate system.
+ * @param {number} [options.emissionRate] The number of particles to emit per second.
* @param {ParticleBurst[]} [options.bursts] An array of {@link ParticleBurst}, emitting bursts of particles at periodic times.
- * @param {boolean} [options.loop=true] Whether the particle system should loop its bursts when it is complete.
- * @param {number} [options.scale=1.0] Sets the scale to apply to the image of the particle for the duration of its particleLife.
+ * @param {boolean} [options.loop] Whether the particle system should loop its bursts when it is complete.
+ * @param {number} [options.scale] Sets the scale to apply to the image of the particle for the duration of its particleLife.
* @param {number} [options.startScale] The initial scale to apply to the image of the particle at the beginning of its life.
* @param {number} [options.endScale] The final scale to apply to the image of the particle at the end of its life.
- * @param {Color} [options.color=Color.WHITE] Sets the color of a particle for the duration of its particleLife.
+ * @param {Color} [options.color] Sets the color of a particle for the duration of its particleLife.
* @param {Color} [options.startColor] The color of the particle at the beginning of its life.
* @param {Color} [options.endColor] The color of the particle at the end of its life.
* @param {object} [options.image] The URI, HTMLImageElement, or HTMLCanvasElement to use for the billboard.
@@ -729,6 +727,7 @@ function calculateNumberToEmit(system, dt) {
const rotatedVelocityScratch = new Cartesian3();
/**
+ * @param frameState
* @private
*/
ParticleSystem.prototype.update = function (frameState) {
@@ -868,9 +867,7 @@ ParticleSystem.prototype.update = function (frameState) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see ParticleSystem#destroy
*/
ParticleSystem.prototype.isDestroyed = function () {
@@ -884,9 +881,7 @@ ParticleSystem.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @see ParticleSystem#isDestroyed
*/
ParticleSystem.prototype.destroy = function () {
@@ -898,12 +893,9 @@ ParticleSystem.prototype.destroy = function () {
/**
* A function used to modify attributes of the particle at each time step. This can include force modifications,
* color, sizing, etc.
- *
* @callback ParticleSystem.updateCallback
- *
* @param {Particle} particle The particle being updated.
* @param {number} dt The time in seconds since the last update.
- *
* @example
* function applyGravity(particle, dt) {
* const position = particle.position;
diff --git a/packages/engine/Source/Scene/PerInstanceColorAppearance.js b/packages/engine/Source/Scene/PerInstanceColorAppearance.js
index a2a32ec136b9..409114ad7c73 100644
--- a/packages/engine/Source/Scene/PerInstanceColorAppearance.js
+++ b/packages/engine/Source/Scene/PerInstanceColorAppearance.js
@@ -10,19 +10,16 @@ import Appearance from "./Appearance.js";
* An appearance for {@link GeometryInstance} instances with color attributes.
* This allows several geometry instances, each with a different color, to
* be drawn with the same {@link Primitive} as shown in the second example below.
- *
* @alias PerInstanceColorAppearance
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {boolean} [options.flat=false] When true
, flat shading is used in the fragment shader, which means lighting is not taking into account.
- * @param {boolean} [options.faceForward=!options.closed] When true
, the fragment shader flips the surface normal as needed to ensure that the normal faces the viewer to avoid dark spots. This is useful when both sides of a geometry should be shaded like {@link WallGeometry}.
- * @param {boolean} [options.translucent=true] When true
, the geometry is expected to appear translucent so {@link PerInstanceColorAppearance#renderState} has alpha blending enabled.
- * @param {boolean} [options.closed=false] When true
, the geometry is expected to be closed so {@link PerInstanceColorAppearance#renderState} has backface culling enabled.
+ * @param {boolean} [options.flat] When true
, flat shading is used in the fragment shader, which means lighting is not taking into account.
+ * @param {boolean} [options.faceForward] When true
, the fragment shader flips the surface normal as needed to ensure that the normal faces the viewer to avoid dark spots. This is useful when both sides of a geometry should be shaded like {@link WallGeometry}.
+ * @param {boolean} [options.translucent] When true
, the geometry is expected to appear translucent so {@link PerInstanceColorAppearance#renderState} has alpha blending enabled.
+ * @param {boolean} [options.closed] When true
, the geometry is expected to be closed so {@link PerInstanceColorAppearance#renderState} has backface culling enabled.
* @param {string} [options.vertexShaderSource] Optional GLSL vertex shader source to override the default vertex shader.
* @param {string} [options.fragmentShaderSource] Optional GLSL fragment shader source to override the default fragment shader.
* @param {object} [options.renderState] Optional render state to override the default render state.
- *
* @example
* // A solid white line segment
* const primitive = new Cesium.Primitive({
@@ -86,9 +83,7 @@ function PerInstanceColorAppearance(options) {
/**
* This property is part of the {@link Appearance} interface, but is not
* used by {@link PerInstanceColorAppearance} since a fully custom fragment shader is used.
- *
* @type Material
- *
* @default undefined
*/
this.material = undefined;
@@ -96,9 +91,7 @@ function PerInstanceColorAppearance(options) {
/**
* When true
, the geometry is expected to appear translucent so
* {@link PerInstanceColorAppearance#renderState} has alpha blending enabled.
- *
* @type {boolean}
- *
* @default true
*/
this.translucent = translucent;
@@ -122,9 +115,7 @@ function PerInstanceColorAppearance(options) {
Object.defineProperties(PerInstanceColorAppearance.prototype, {
/**
* The GLSL source code for the vertex shader.
- *
* @memberof PerInstanceColorAppearance.prototype
- *
* @type {string}
* @readonly
*/
@@ -136,9 +127,7 @@ Object.defineProperties(PerInstanceColorAppearance.prototype, {
/**
* The GLSL source code for the fragment shader.
- *
* @memberof PerInstanceColorAppearance.prototype
- *
* @type {string}
* @readonly
*/
@@ -155,9 +144,7 @@ Object.defineProperties(PerInstanceColorAppearance.prototype, {
* instance, or it is set implicitly via {@link PerInstanceColorAppearance#translucent}
* and {@link PerInstanceColorAppearance#closed}.
*
- *
* @memberof PerInstanceColorAppearance.prototype
- *
* @type {object}
* @readonly
*/
@@ -171,12 +158,9 @@ Object.defineProperties(PerInstanceColorAppearance.prototype, {
* When true
, the geometry is expected to be closed so
* {@link PerInstanceColorAppearance#renderState} has backface culling enabled.
* If the viewer enters the geometry, it will not be visible.
- *
* @memberof PerInstanceColorAppearance.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
closed: {
@@ -189,9 +173,7 @@ Object.defineProperties(PerInstanceColorAppearance.prototype, {
* The {@link VertexFormat} that this appearance instance is compatible with.
* A geometry can have more vertex attributes and still be compatible - at a
* potential performance cost - but it can't have less.
- *
* @memberof PerInstanceColorAppearance.prototype
- *
* @type VertexFormat
* @readonly
*/
@@ -204,12 +186,9 @@ Object.defineProperties(PerInstanceColorAppearance.prototype, {
/**
* When true
, flat shading is used in the fragment shader,
* which means lighting is not taking into account.
- *
* @memberof PerInstanceColorAppearance.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
flat: {
@@ -223,12 +202,9 @@ Object.defineProperties(PerInstanceColorAppearance.prototype, {
* as needed to ensure that the normal faces the viewer to avoid
* dark spots. This is useful when both sides of a geometry should be
* shaded like {@link WallGeometry}.
- *
* @memberof PerInstanceColorAppearance.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
faceForward: {
@@ -242,9 +218,7 @@ Object.defineProperties(PerInstanceColorAppearance.prototype, {
* The {@link VertexFormat} that all {@link PerInstanceColorAppearance} instances
* are compatible with. This requires only position
and normal
* attributes.
- *
* @type VertexFormat
- *
* @constant
*/
PerInstanceColorAppearance.VERTEX_FORMAT = VertexFormat.POSITION_AND_NORMAL;
@@ -253,9 +227,7 @@ PerInstanceColorAppearance.VERTEX_FORMAT = VertexFormat.POSITION_AND_NORMAL;
* The {@link VertexFormat} that all {@link PerInstanceColorAppearance} instances
* are compatible with when {@link PerInstanceColorAppearance#flat} is true
.
* This requires only a position
attribute.
- *
* @type VertexFormat
- *
* @constant
*/
PerInstanceColorAppearance.FLAT_VERTEX_FORMAT = VertexFormat.POSITION_ONLY;
@@ -264,9 +236,7 @@ PerInstanceColorAppearance.FLAT_VERTEX_FORMAT = VertexFormat.POSITION_ONLY;
* Procedurally creates the full GLSL fragment shader source. For {@link PerInstanceColorAppearance},
* this is derived from {@link PerInstanceColorAppearance#fragmentShaderSource}, {@link PerInstanceColorAppearance#flat},
* and {@link PerInstanceColorAppearance#faceForward}.
- *
* @function
- *
* @returns {string} The full GLSL fragment shader source.
*/
PerInstanceColorAppearance.prototype.getFragmentShaderSource =
@@ -274,9 +244,7 @@ PerInstanceColorAppearance.prototype.getFragmentShaderSource =
/**
* Determines if the geometry is translucent based on {@link PerInstanceColorAppearance#translucent}.
- *
* @function
- *
* @returns {boolean} true
if the appearance is translucent.
*/
PerInstanceColorAppearance.prototype.isTranslucent =
@@ -286,9 +254,7 @@ PerInstanceColorAppearance.prototype.isTranslucent =
* Creates a render state. This is not the final render state instance; instead,
* it can contain a subset of render state properties identical to the render state
* created in the context.
- *
* @function
- *
* @returns {object} The render state.
*/
PerInstanceColorAppearance.prototype.getRenderState =
diff --git a/packages/engine/Source/Scene/PerformanceDisplay.js b/packages/engine/Source/Scene/PerformanceDisplay.js
index d379843b32a1..8b9d1cd13d88 100644
--- a/packages/engine/Source/Scene/PerformanceDisplay.js
+++ b/packages/engine/Source/Scene/PerformanceDisplay.js
@@ -6,6 +6,7 @@ import getTimestamp from "../Core/getTimestamp.js";
import getElement from "../DataSources/getElement.js";
/**
+ * @param options
* @private
*/
function PerformanceDisplay(options) {
@@ -51,7 +52,6 @@ Object.defineProperties(PerformanceDisplay.prototype, {
/**
* The display should indicate the FPS is being throttled.
* @memberof PerformanceDisplay.prototype
- *
* @type {boolean}
*/
throttled: {
@@ -77,8 +77,7 @@ Object.defineProperties(PerformanceDisplay.prototype, {
/**
* Update the display. This function should only be called once per frame, because
* each call records a frame in the internal buffer and redraws the display.
- *
- * @param {boolean} [renderedThisFrame=true] If provided, the FPS count will only update and display if true.
+ * @param {boolean} [renderedThisFrame] If provided, the FPS count will only update and display if true.
*/
PerformanceDisplay.prototype.update = function (renderedThisFrame) {
const time = getTimestamp();
diff --git a/packages/engine/Source/Scene/PickFramebuffer.js b/packages/engine/Source/Scene/PickFramebuffer.js
index 84a64a5b61ee..bc36f4623021 100644
--- a/packages/engine/Source/Scene/PickFramebuffer.js
+++ b/packages/engine/Source/Scene/PickFramebuffer.js
@@ -7,6 +7,7 @@ import FramebufferManager from "../Renderer/FramebufferManager.js";
import PassState from "../Renderer/PassState.js";
/**
+ * @param context
* @private
*/
function PickFramebuffer(context) {
@@ -53,7 +54,6 @@ const colorScratch = new Color();
/**
* Return the picked object rendered within a given rectangle.
- *
* @param {BoundingRectangle} screenSpaceRectangle
* @returns {object|undefined} The object rendered in the middle of the rectangle, or undefined if nothing was rendered.
*/
@@ -123,7 +123,6 @@ PickFramebuffer.prototype.end = function (screenSpaceRectangle) {
/**
* Return voxel tile and sample information as rendered by a pickVoxel pass,
* within a given rectangle.
- *
* @param {BoundingRectangle} screenSpaceRectangle
* @returns {TypedArray}
*/
diff --git a/packages/engine/Source/Scene/Picking.js b/packages/engine/Source/Scene/Picking.js
index 594d601eb56d..48f27062a1b5 100644
--- a/packages/engine/Source/Scene/Picking.js
+++ b/packages/engine/Source/Scene/Picking.js
@@ -40,6 +40,7 @@ const pickTilesetPassState = new Cesium3DTilePassState({
});
/**
+ * @param scene
* @private
*/
function Picking(scene) {
@@ -245,8 +246,8 @@ const scratchColorZero = new Color(0.0, 0.0, 0.0, 0.0);
*
* @param {Scene} scene
* @param {Cartesian2} windowPosition Window coordinates to perform picking on.
- * @param {number} [width=3] Width of the pick rectangle.
- * @param {number} [height=3] Height of the pick rectangle.
+ * @param {number} [width] Width of the pick rectangle.
+ * @param {number} [height] Height of the pick rectangle.
* @returns {object} Object containing the picked primitive.
*/
Picking.prototype.pick = function (scene, windowPosition, width, height) {
@@ -316,11 +317,10 @@ Picking.prototype.pick = function (scene, windowPosition, width, height) {
* Returns an object with information about the voxel sample rendered at
* a particular window coordinate. Returns undefined
if there is no
* voxel at that position.
- *
* @param {Scene} scene
* @param {Cartesian2} windowPosition Window coordinates to perform picking on.
- * @param {number} [width=3] Width of the pick rectangle.
- * @param {number} [height=3] Height of the pick rectangle.
+ * @param {number} [width] Width of the pick rectangle.
+ * @param {number} [height] Height of the pick rectangle.
* @returns {object|undefined} Object containing the picked primitive.
*/
Picking.prototype.pickVoxelCoordinate = function (
diff --git a/packages/engine/Source/Scene/PntsParser.js b/packages/engine/Source/Scene/PntsParser.js
index eb60db304b65..d05ab87b0093 100644
--- a/packages/engine/Source/Scene/PntsParser.js
+++ b/packages/engine/Source/Scene/PntsParser.js
@@ -13,7 +13,6 @@ import VertexAttributeSemantic from "./VertexAttributeSemantic.js";
/**
* Handles parsing of a Point Cloud
- *
* @namespace PntsParser
* @private
*/
@@ -23,11 +22,9 @@ const sizeOfUint32 = Uint32Array.BYTES_PER_ELEMENT;
/**
* Parses the contents of a {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/PointCloud|Point Cloud}.
- *
* @private
- *
* @param {*} arrayBuffer The array buffer containing the pnts
- * @param {*} [byteOffset=0] The byte offset of the beginning of the pnts in the array buffer
+ * @param {*} [byteOffset] The byte offset of the beginning of the pnts in the array buffer
* @returns {object} An object containing a parsed representation of the point cloud
*/
PntsParser.parse = function (arrayBuffer, byteOffset) {
diff --git a/packages/engine/Source/Scene/PointCloud.js b/packages/engine/Source/Scene/PointCloud.js
index c2a0d363cd3b..dc66af66e1e4 100644
--- a/packages/engine/Source/Scene/PointCloud.js
+++ b/packages/engine/Source/Scene/PointCloud.js
@@ -47,12 +47,10 @@ const DecodingState = {
* Represents the contents of a
* {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/PointCloud|Point Cloud}
* tile. Used internally by {@link TimeDynamicPointCloud}.
- *
+ * @param options
* @alias PointCloud
- * @constructor
- *
+ * @class
* @see TimeDynamicPointCloud
- *
* @private
*/
function PointCloud(options) {
@@ -146,7 +144,6 @@ function PointCloud(options) {
/**
* The {@link SplitDirection} to apply to this point cloud.
- *
* @type {SplitDirection}
* @default {@link SplitDirection.NONE}
*/
diff --git a/packages/engine/Source/Scene/PointCloudEyeDomeLighting.js b/packages/engine/Source/Scene/PointCloudEyeDomeLighting.js
index a4ef56deca6f..f2c15e81e6b1 100644
--- a/packages/engine/Source/Scene/PointCloudEyeDomeLighting.js
+++ b/packages/engine/Source/Scene/PointCloudEyeDomeLighting.js
@@ -16,7 +16,6 @@ import PointCloudEyeDomeLightingShader from "../Shaders/PostProcessStages/PointC
/**
* Eye dome lighting. Does not support points with per-point translucency, but does allow translucent styling against the globe.
* Requires support for EXT_frag_depth and WEBGL_draw_buffers extensions in WebGL 1.0.
- *
* @private
*/
function PointCloudEyeDomeLighting() {
@@ -253,9 +252,7 @@ PointCloudEyeDomeLighting.prototype.update = function (
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see PointCloudEyeDomeLighting#destroy
*/
PointCloudEyeDomeLighting.prototype.isDestroyed = function () {
@@ -269,12 +266,9 @@ PointCloudEyeDomeLighting.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* processor = processor && processor.destroy();
- *
* @see PointCloudEyeDomeLighting#isDestroyed
*/
PointCloudEyeDomeLighting.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/PointCloudShading.js b/packages/engine/Source/Scene/PointCloudShading.js
index 2a46b8fc75c0..34aff6db6b4d 100644
--- a/packages/engine/Source/Scene/PointCloudShading.js
+++ b/packages/engine/Source/Scene/PointCloudShading.js
@@ -4,20 +4,18 @@ import PointCloudEyeDomeLighting from "./PointCloudEyeDomeLighting.js";
/**
* Options for performing point attenuation based on geometric error when rendering
* point clouds using 3D Tiles.
- *
* @param {object} [options] Object with the following properties:
- * @param {boolean} [options.attenuation=false] Perform point attenuation based on geometric error.
- * @param {number} [options.geometricErrorScale=1.0] Scale to be applied to each tile's geometric error.
+ * @param {boolean} [options.attenuation] Perform point attenuation based on geometric error.
+ * @param {number} [options.geometricErrorScale] Scale to be applied to each tile's geometric error.
* @param {number} [options.maximumAttenuation] Maximum attenuation in pixels. Defaults to the Cesium3DTileset's maximumScreenSpaceError.
* @param {number} [options.baseResolution] Average base resolution for the dataset in meters. Substitute for Geometric Error when not available.
- * @param {boolean} [options.eyeDomeLighting=true] When true, use eye dome lighting when drawing with point attenuation.
- * @param {number} [options.eyeDomeLightingStrength=1.0] Increasing this value increases contrast on slopes and edges.
- * @param {number} [options.eyeDomeLightingRadius=1.0] Increase the thickness of contours from eye dome lighting.
- * @param {boolean} [options.backFaceCulling=false] Determines whether back-facing points are hidden. This option works only if data has normals included.
- * @param {boolean} [options.normalShading=true] Determines whether a point cloud that contains normals is shaded by the scene's light source.
- *
+ * @param {boolean} [options.eyeDomeLighting] When true, use eye dome lighting when drawing with point attenuation.
+ * @param {number} [options.eyeDomeLightingStrength] Increasing this value increases contrast on slopes and edges.
+ * @param {number} [options.eyeDomeLightingRadius] Increase the thickness of contours from eye dome lighting.
+ * @param {boolean} [options.backFaceCulling] Determines whether back-facing points are hidden. This option works only if data has normals included.
+ * @param {boolean} [options.normalShading] Determines whether a point cloud that contains normals is shaded by the scene's light source.
* @alias PointCloudShading
- * @constructor
+ * @class
*/
function PointCloudShading(options) {
const pointCloudShading = defaultValue(options, {});
@@ -57,7 +55,6 @@ function PointCloudShading(options) {
* Use eye dome lighting when drawing with point attenuation
* Requires support for EXT_frag_depth, OES_texture_float, and WEBGL_draw_buffers extensions in WebGL 1.0,
* otherwise eye dome lighting is ignored.
- *
* @type {boolean}
* @default true
*/
@@ -86,7 +83,6 @@ function PointCloudShading(options) {
/**
* Determines whether back-facing points are hidden.
* This option works only if data has normals included.
- *
* @type {boolean}
* @default false
*/
@@ -94,7 +90,6 @@ function PointCloudShading(options) {
/**
* Determines whether a point cloud that contains normals is shaded by the scene's light source.
- *
* @type {boolean}
* @default true
*/
@@ -103,7 +98,6 @@ function PointCloudShading(options) {
/**
* Determines if point cloud shading is supported.
- *
* @param {Scene} scene The scene.
* @returns {boolean} true
if point cloud shading is supported; otherwise, returns false
*/
diff --git a/packages/engine/Source/Scene/PointPrimitive.js b/packages/engine/Source/Scene/PointPrimitive.js
index 08307252f649..aa7a04b6ad16 100644
--- a/packages/engine/Source/Scene/PointPrimitive.js
+++ b/packages/engine/Source/Scene/PointPrimitive.js
@@ -18,26 +18,22 @@ import SceneTransforms from "./SceneTransforms.js";
*
* A graphical point positioned in the 3D scene, that is created
* and rendered using a {@link PointPrimitiveCollection}.
- *
+ * @param options
+ * @param pointPrimitiveCollection
* @alias PointPrimitive
- *
* @performance Reading a property, e.g., {@link PointPrimitive#show}, is constant time.
* Assigning to a property is constant time but results in
* CPU to GPU traffic when {@link PointPrimitiveCollection#update} is called. The per-pointPrimitive traffic is
* the same regardless of how many properties were updated. If most pointPrimitives in a collection need to be
* updated, it may be more efficient to clear the collection with {@link PointPrimitiveCollection#removeAll}
* and add new pointPrimitives instead of modifying each one.
- *
- * @exception {DeveloperError} scaleByDistance.far must be greater than scaleByDistance.near
- * @exception {DeveloperError} translucencyByDistance.far must be greater than translucencyByDistance.near
- * @exception {DeveloperError} distanceDisplayCondition.far must be greater than distanceDisplayCondition.near
- *
+ * @throws {DeveloperError} scaleByDistance.far must be greater than scaleByDistance.near
+ * @throws {DeveloperError} translucencyByDistance.far must be greater than translucencyByDistance.near
+ * @throws {DeveloperError} distanceDisplayCondition.far must be greater than distanceDisplayCondition.near
* @see PointPrimitiveCollection
* @see PointPrimitiveCollection#add
- *
* @internalConstructor
* @class
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Points.html|Cesium Sandcastle Points Demo}
*/
function PointPrimitive(options, pointPrimitiveCollection) {
@@ -203,14 +199,12 @@ Object.defineProperties(PointPrimitive.prototype, {
* scaleByDistance will be disabled.
* @memberof PointPrimitive.prototype
* @type {NearFarScalar}
- *
* @example
* // Example 1.
* // Set a pointPrimitive's scaleByDistance to scale to 15 when the
* // camera is 1500 meters from the pointPrimitive and disappear as
* // the camera distance approaches 8.0e6 meters.
* p.scaleByDistance = new Cesium.NearFarScalar(1.5e2, 15, 8.0e6, 0.0);
- *
* @example
* // Example 2.
* // disable scaling by distance
@@ -246,14 +240,12 @@ Object.defineProperties(PointPrimitive.prototype, {
* translucencyByDistance will be disabled.
* @memberof PointPrimitive.prototype
* @type {NearFarScalar}
- *
* @example
* // Example 1.
* // Set a point's translucency to 1.0 when the
* // camera is 1500 meters from the point and disappear as
* // the camera distance approaches 8.0e6 meters.
* p.translucencyByDistance = new Cesium.NearFarScalar(1.5e2, 1.0, 8.0e6, 0.0);
- *
* @example
* // Example 2.
* // disable translucency by distance
@@ -313,11 +305,9 @@ Object.defineProperties(PointPrimitive.prototype, {
* (no intensity) to 1.0
(full intensity).
* @memberof PointPrimitive.prototype
* @type {Color}
- *
* @example
* // Example 1. Assign yellow.
* p.color = Cesium.Color.YELLOW;
- *
* @example
* // Example 2. Make a pointPrimitive 50% translucent.
* p.color = new Cesium.Color(1.0, 1.0, 1.0, 0.5);
@@ -556,13 +546,10 @@ PointPrimitive._computeScreenSpacePosition = function (
* Computes the screen-space position of the point's origin.
* The screen space origin is the top, left corner of the canvas; x
increases from
* left to right, and y
increases from top to bottom.
- *
* @param {Scene} scene The scene.
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The screen-space position of the point.
- *
- * @exception {DeveloperError} PointPrimitive must be in a collection.
- *
+ * @throws {DeveloperError} PointPrimitive must be in a collection.
* @example
* console.log(p.computeScreenSpacePosition(scene).toString());
*/
@@ -602,7 +589,6 @@ PointPrimitive.prototype.computeScreenSpacePosition = function (scene, result) {
* @param {Cartesian2} screenSpacePosition The screen space center of the label.
* @param {BoundingRectangle} [result] The object onto which to store the result.
* @returns {BoundingRectangle} The screen space bounding box.
- *
* @private
*/
PointPrimitive.getScreenSpaceBoundingBox = function (
@@ -633,7 +619,6 @@ PointPrimitive.getScreenSpaceBoundingBox = function (
/**
* Determines if this point equals another point. Points are equal if all their properties
* are equal. Points in different collections can be equal.
- *
* @param {PointPrimitive} other The point to compare for equality.
* @returns {boolean} true
if the points are equal; otherwise, false
.
*/
diff --git a/packages/engine/Source/Scene/PointPrimitiveCollection.js b/packages/engine/Source/Scene/PointPrimitiveCollection.js
index ce42db08cf2b..bc78f3870309 100644
--- a/packages/engine/Source/Scene/PointPrimitiveCollection.js
+++ b/packages/engine/Source/Scene/PointPrimitiveCollection.js
@@ -54,25 +54,20 @@ const attributeLocations = {
*
* Points are added and removed from the collection using {@link PointPrimitiveCollection#add}
* and {@link PointPrimitiveCollection#remove}.
- *
* @alias PointPrimitiveCollection
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The 4x4 transformation matrix that transforms each point from model to world coordinates.
- * @param {boolean} [options.debugShowBoundingVolume=false] For debugging only. Determines if this primitive's commands' bounding spheres are shown.
- * @param {BlendOption} [options.blendOption=BlendOption.OPAQUE_AND_TRANSLUCENT] The point blending option. The default
+ * @param {Matrix4} [options.modelMatrix] The 4x4 transformation matrix that transforms each point from model to world coordinates.
+ * @param {boolean} [options.debugShowBoundingVolume] For debugging only. Determines if this primitive's commands' bounding spheres are shown.
+ * @param {BlendOption} [options.blendOption] The point blending option. The default
* is used for rendering both opaque and translucent points. However, if either all of the points are completely opaque or all are completely translucent,
* setting the technique to BlendOption.OPAQUE or BlendOption.TRANSLUCENT can improve performance by up to 2x.
- * @param {boolean} [options.show=true] Determines if the primitives in the collection will be shown.
- *
+ * @param {boolean} [options.show] Determines if the primitives in the collection will be shown.
* @performance For best performance, prefer a few collections, each with many points, to
* many collections with only a few points each. Organize collections so that points
* with the same update frequency are in the same collection, i.e., points that do not
* change should be in one collection; points that change every frame should be in another
* collection; and so on.
- *
- *
* @example
* // Create a pointPrimitive collection with two points
* const points = scene.primitives.add(new Cesium.PointPrimitiveCollection());
@@ -84,7 +79,6 @@ const attributeLocations = {
* position : new Cesium.Cartesian3(4.0, 5.0, 6.0),
* color : Cesium.Color.CYAN
* });
- *
* @see PointPrimitiveCollection#add
* @see PointPrimitiveCollection#remove
* @see PointPrimitive
@@ -130,7 +124,6 @@ function PointPrimitiveCollection(options) {
/**
* Determines if primitives in this collection will be shown.
- *
* @type {boolean}
* @default true
*/
@@ -141,11 +134,8 @@ function PointPrimitiveCollection(options) {
* When this is the identity matrix, the pointPrimitives are drawn in world coordinates, i.e., Earth's WGS84 coordinates.
* Local reference frames can be used by providing a different transformation matrix, like that returned
* by {@link Transforms.eastNorthUpToFixedFrame}.
- *
* @type {Matrix4}
* @default {@link Matrix4.IDENTITY}
- *
- *
* @example
* const center = Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883);
* pointPrimitives.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center);
@@ -165,7 +155,6 @@ function PointPrimitiveCollection(options) {
* color : Cesium.Color.CYAN,
* position : new Cesium.Cartesian3(0.0, 0.0, 1000000.0) // up
* });
- *
* @see Transforms.eastNorthUpToFixedFrame
*/
this.modelMatrix = Matrix4.clone(
@@ -178,9 +167,7 @@ function PointPrimitiveCollection(options) {
*
* Draws the bounding sphere for each draw command in the primitive.
*
- *
* @type {boolean}
- *
* @default false
*/
this.debugShowBoundingVolume = defaultValue(
@@ -254,17 +241,12 @@ function destroyPointPrimitives(pointPrimitives) {
/**
* Creates and adds a point with the specified initial properties to the collection.
* The added point is returned so it can be modified or removed from the collection later.
- *
* @param {object}[options] A template describing the point's properties as shown in Example 1.
* @returns {PointPrimitive} The point that was added to the collection.
- *
* @performance Calling add
is expected constant time. However, the collection's vertex buffer
* is rewritten - an O(n)
operation that also incurs CPU to GPU overhead. For
* best performance, add as many pointPrimitives as possible before calling update
.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* // Example 1: Add a point, specifying all the default values.
* const p = pointPrimitives.add({
@@ -276,13 +258,11 @@ function destroyPointPrimitives(pointPrimitives) {
* outlineWidth : 0.0,
* id : undefined
* });
- *
* @example
* // Example 2: Specify only the point's cartographic position.
* const p = pointPrimitives.add({
* position : Cesium.Cartesian3.fromDegrees(longitude, latitude, height)
* });
- *
* @see PointPrimitiveCollection#remove
* @see PointPrimitiveCollection#removeAll
*/
@@ -298,23 +278,17 @@ PointPrimitiveCollection.prototype.add = function (options) {
/**
* Removes a point from the collection.
- *
* @param {PointPrimitive} pointPrimitive The point to remove.
* @returns {boolean} true
if the point was removed; false
if the point was not found in the collection.
- *
* @performance Calling remove
is expected constant time. However, the collection's vertex buffer
* is rewritten - an O(n)
operation that also incurs CPU to GPU overhead. For
* best performance, remove as many points as possible before calling update
.
* If you intend to temporarily hide a point, it is usually more efficient to call
* {@link PointPrimitive#show} instead of removing and re-adding the point.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* const p = pointPrimitives.add(...);
* pointPrimitives.remove(p); // Returns true
- *
* @see PointPrimitiveCollection#add
* @see PointPrimitiveCollection#removeAll
* @see PointPrimitive#show
@@ -333,18 +307,13 @@ PointPrimitiveCollection.prototype.remove = function (pointPrimitive) {
/**
* Removes all points from the collection.
- *
* @performance O(n)
. It is more efficient to remove all the points
* from a collection and then add new ones than to create a new collection entirely.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* pointPrimitives.add(...);
* pointPrimitives.add(...);
* pointPrimitives.removeAll();
- *
* @see PointPrimitiveCollection#add
* @see PointPrimitiveCollection#remove
*/
@@ -392,10 +361,8 @@ PointPrimitiveCollection.prototype._updatePointPrimitive = function (
/**
* Check whether this collection contains a given point.
- *
* @param {PointPrimitive} [pointPrimitive] The point to check for.
* @returns {boolean} true if this collection contains the point, false otherwise.
- *
* @see PointPrimitiveCollection#get
*/
PointPrimitiveCollection.prototype.contains = function (pointPrimitive) {
@@ -410,17 +377,12 @@ PointPrimitiveCollection.prototype.contains = function (pointPrimitive) {
* it to the left, changing their indices. This function is commonly used with
* {@link PointPrimitiveCollection#length} to iterate over all the points
* in the collection.
- *
* @param {number} index The zero-based index of the point.
* @returns {PointPrimitive} The point at the specified index.
- *
* @performance Expected constant time. If points were removed from the collection and
* {@link PointPrimitiveCollection#update} was not called, an implicit O(n)
* operation is performed.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* // Toggle the show property of every point in the collection
* const len = pointPrimitives.length;
@@ -428,7 +390,6 @@ PointPrimitiveCollection.prototype.contains = function (pointPrimitive) {
* const p = pointPrimitives.get(i);
* p.show = !p.show;
* }
- *
* @see PointPrimitiveCollection#length
*/
PointPrimitiveCollection.prototype.get = function (index) {
@@ -845,6 +806,7 @@ function updateBoundingVolume(collection, frameState, boundingVolume) {
const scratchWriterArray = [];
/**
+ * @param frameState
* @private
*/
PointPrimitiveCollection.prototype.update = function (frameState) {
@@ -1180,9 +1142,7 @@ PointPrimitiveCollection.prototype.update = function (frameState) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see PointPrimitiveCollection#destroy
*/
PointPrimitiveCollection.prototype.isDestroyed = function () {
@@ -1196,13 +1156,9 @@ PointPrimitiveCollection.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* pointPrimitives = pointPrimitives && pointPrimitives.destroy();
- *
* @see PointPrimitiveCollection#isDestroyed
*/
PointPrimitiveCollection.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/Polyline.js b/packages/engine/Source/Scene/Polyline.js
index b8eda50752e0..2a61f8c58716 100644
--- a/packages/engine/Source/Scene/Polyline.js
+++ b/packages/engine/Source/Scene/Polyline.js
@@ -16,11 +16,10 @@ import Material from "./Material.js";
*
*
* A renderable polyline.
- *
* @alias Polyline
* @internalConstructor
* @class
- *
+ * @param options
* @privateParam {object} options Object with the following properties:
* @privateParam {boolean} [options.show=true] true
if this polyline will be shown; otherwise, false
.
* @privateParam {number} [options.width=1.0] The width of the polyline in pixels.
@@ -29,10 +28,9 @@ import Material from "./Material.js";
* @privateParam {Cartesian3[]} [options.positions] The positions.
* @privateParam {object} [options.id] The user-defined object to be returned when this polyline is picked.
* @privateParam {DistanceDisplayCondition} [options.distanceDisplayCondition] The condition specifying at what distance from the camera that this polyline will be displayed.
+ * @param polylineCollection
* @privateParam {PolylineCollection} polylineCollection The renderable polyline collection.
- *
* @see PolylineCollection
- *
*/
function Polyline(options, polylineCollection) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -402,6 +400,7 @@ Polyline.prototype.update = function () {
};
/**
+ * @param context
* @private
*/
Polyline.prototype.getPickId = function (context) {
diff --git a/packages/engine/Source/Scene/PolylineCollection.js b/packages/engine/Source/Scene/PolylineCollection.js
index 81973318e16e..18e08e599833 100644
--- a/packages/engine/Source/Scene/PolylineCollection.js
+++ b/packages/engine/Source/Scene/PolylineCollection.js
@@ -73,26 +73,21 @@ const attributeLocations = {
*
* Polylines are added and removed from the collection using {@link PolylineCollection#add}
* and {@link PolylineCollection#remove}.
- *
* @alias PolylineCollection
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The 4x4 transformation matrix that transforms each polyline from model to world coordinates.
- * @param {boolean} [options.debugShowBoundingVolume=false] For debugging only. Determines if this primitive's commands' bounding spheres are shown.
- * @param {boolean} [options.show=true] Determines if the polylines in the collection will be shown.
- *
+ * @param {Matrix4} [options.modelMatrix] The 4x4 transformation matrix that transforms each polyline from model to world coordinates.
+ * @param {boolean} [options.debugShowBoundingVolume] For debugging only. Determines if this primitive's commands' bounding spheres are shown.
+ * @param {boolean} [options.show] Determines if the polylines in the collection will be shown.
* @performance For best performance, prefer a few collections, each with many polylines, to
* many collections with only a few polylines each. Organize collections so that polylines
* with the same update frequency are in the same collection, i.e., polylines that do not
* change should be in one collection; polylines that change every frame should be in another
* collection; and so on.
- *
* @see PolylineCollection#add
* @see PolylineCollection#remove
* @see Polyline
* @see LabelCollection
- *
* @example
* // Create a polyline collection with two polylines
* const polylines = new Cesium.PolylineCollection();
@@ -119,7 +114,6 @@ function PolylineCollection(options) {
/**
* Determines if polylines in this collection will be shown.
- *
* @type {boolean}
* @default true
*/
@@ -130,7 +124,6 @@ function PolylineCollection(options) {
* When this is the identity matrix, the polylines are drawn in world coordinates, i.e., Earth's WGS84 coordinates.
* Local reference frames can be used by providing a different transformation matrix, like that returned
* by {@link Transforms.eastNorthUpToFixedFrame}.
- *
* @type {Matrix4}
* @default {@link Matrix4.IDENTITY}
*/
@@ -144,9 +137,7 @@ function PolylineCollection(options) {
*
* Draws the bounding sphere for each draw command in the primitive.
*
- *
* @type {boolean}
- *
* @default false
*/
this.debugShowBoundingVolume = defaultValue(
@@ -211,33 +202,27 @@ Object.defineProperties(PolylineCollection.prototype, {
});
/**
- * Creates and adds a polyline with the specified initial properties to the collection.
- * The added polyline is returned so it can be modified or removed from the collection later.
- *
- * @param {object}[options] A template describing the polyline's properties as shown in Example 1.
- * @returns {Polyline} The polyline that was added to the collection.
- *
- * @performance After calling add
, {@link PolylineCollection#update} is called and
- * the collection's vertex buffer is rewritten - an O(n)
operation that also incurs CPU to GPU overhead.
- * For best performance, add as many polylines as possible before calling update
.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
- * @example
- * // Example 1: Add a polyline, specifying all the default values.
- * const p = polylines.add({
- * show : true,
- * positions : ellipsoid.cartographicArrayToCartesianArray([
+ * Creates and adds a polyline with the specified initial properties to the collection.
+ * The added polyline is returned so it can be modified or removed from the collection later.
+ * @param {object}[options] A template describing the polyline's properties as shown in Example 1.
+ * @returns {Polyline} The polyline that was added to the collection.
+ * @performance After calling add
, {@link PolylineCollection#update} is called and
+ * the collection's vertex buffer is rewritten - an O(n)
operation that also incurs CPU to GPU overhead.
+ * For best performance, add as many polylines as possible before calling update
.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ * @example
+ * // Example 1: Add a polyline, specifying all the default values.
+ * const p = polylines.add({
+ * show : true,
+ * positions : ellipsoid.cartographicArrayToCartesianArray([
Cesium.Cartographic.fromDegrees(-75.10, 39.57),
Cesium.Cartographic.fromDegrees(-77.02, 38.53)]),
- * width : 1
- * });
- *
- * @see PolylineCollection#remove
- * @see PolylineCollection#removeAll
- * @see PolylineCollection#update
- */
+ * width : 1
+ * });
+ * @see PolylineCollection#remove
+ * @see PolylineCollection#removeAll
+ * @see PolylineCollection#update
+ */
PolylineCollection.prototype.add = function (options) {
const p = new Polyline(options, this);
p._index = this._polylines.length;
@@ -249,23 +234,17 @@ PolylineCollection.prototype.add = function (options) {
/**
* Removes a polyline from the collection.
- *
* @param {Polyline} polyline The polyline to remove.
* @returns {boolean} true
if the polyline was removed; false
if the polyline was not found in the collection.
- *
* @performance After calling remove
, {@link PolylineCollection#update} is called and
* the collection's vertex buffer is rewritten - an O(n)
operation that also incurs CPU to GPU overhead.
* For best performance, remove as many polylines as possible before calling update
.
* If you intend to temporarily hide a polyline, it is usually more efficient to call
* {@link Polyline#show} instead of removing and re-adding the polyline.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* const p = polylines.add(...);
* polylines.remove(p); // Returns true
- *
* @see PolylineCollection#add
* @see PolylineCollection#removeAll
* @see PolylineCollection#update
@@ -290,18 +269,13 @@ PolylineCollection.prototype.remove = function (polyline) {
/**
* Removes all polylines from the collection.
- *
* @performance O(n)
. It is more efficient to remove all the polylines
* from a collection and then add new ones than to create a new collection entirely.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* polylines.add(...);
* polylines.add(...);
* polylines.removeAll();
- *
* @see PolylineCollection#add
* @see PolylineCollection#remove
* @see PolylineCollection#update
@@ -318,10 +292,8 @@ PolylineCollection.prototype.removeAll = function () {
/**
* Determines if this collection contains the specified polyline.
- *
* @param {Polyline} polyline The polyline to check for.
* @returns {boolean} true if this collection contains the polyline, false otherwise.
- *
* @see PolylineCollection#get
*/
PolylineCollection.prototype.contains = function (polyline) {
@@ -334,16 +306,12 @@ PolylineCollection.prototype.contains = function (polyline) {
* it to the left, changing their indices. This function is commonly used with
* {@link PolylineCollection#length} to iterate over all the polylines
* in the collection.
- *
* @param {number} index The zero-based index of the polyline.
* @returns {Polyline} The polyline at the specified index.
- *
* @performance If polylines were removed from the collection and
* {@link PolylineCollection#update} was not called, an implicit O(n)
* operation is performed.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* // Toggle the show property of every polyline in the collection
* const len = polylines.length;
@@ -351,7 +319,6 @@ PolylineCollection.prototype.contains = function (polyline) {
* const p = polylines.get(i);
* p.show = !p.show;
* }
- *
* @see PolylineCollection#length
*/
PolylineCollection.prototype.get = function (index) {
@@ -417,8 +384,8 @@ const scratchNearFarCartesian2 = new Cartesian2();
* Do not call this function directly. This is documented just to
* list the exceptions that may be propagated when the scene is rendered:
*
- *
- * @exception {RuntimeError} Vertex texture fetch support is required to render primitives with per-instance attributes. The maximum number of vertex texture image units must be greater than zero.
+ * @param frameState
+ * @throws {RuntimeError} Vertex texture fetch support is required to render primitives with per-instance attributes. The maximum number of vertex texture image units must be greater than zero.
*/
PolylineCollection.prototype.update = function (frameState) {
removePolylines(this);
@@ -785,9 +752,7 @@ function createCommandLists(
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see PolylineCollection#destroy
*/
PolylineCollection.prototype.isDestroyed = function () {
@@ -801,13 +766,9 @@ PolylineCollection.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* polylines = polylines && polylines.destroy();
- *
* @see PolylineCollection#isDestroyed
*/
PolylineCollection.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/PolylineColorAppearance.js b/packages/engine/Source/Scene/PolylineColorAppearance.js
index 27c577fa1b7c..3ffd7933c530 100644
--- a/packages/engine/Source/Scene/PolylineColorAppearance.js
+++ b/packages/engine/Source/Scene/PolylineColorAppearance.js
@@ -18,16 +18,13 @@ if (!FeatureDetection.isInternetExplorer()) {
* {@link PolylineGeometry} or {@link GroundPolylineGeometry}.
* This allows several geometry instances, each with a different color, to
* be drawn with the same {@link Primitive}.
- *
* @alias PolylineColorAppearance
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {boolean} [options.translucent=true] When true
, the geometry is expected to appear translucent so {@link PolylineColorAppearance#renderState} has alpha blending enabled.
+ * @param {boolean} [options.translucent] When true
, the geometry is expected to appear translucent so {@link PolylineColorAppearance#renderState} has alpha blending enabled.
* @param {string} [options.vertexShaderSource] Optional GLSL vertex shader source to override the default vertex shader.
* @param {string} [options.fragmentShaderSource] Optional GLSL fragment shader source to override the default fragment shader.
* @param {object} [options.renderState] Optional render state to override the default render state.
- *
* @example
* // A solid white line segment
* const primitive = new Cesium.Primitive({
@@ -59,9 +56,7 @@ function PolylineColorAppearance(options) {
/**
* This property is part of the {@link Appearance} interface, but is not
* used by {@link PolylineColorAppearance} since a fully custom fragment shader is used.
- *
* @type Material
- *
* @default undefined
*/
this.material = undefined;
@@ -69,9 +64,7 @@ function PolylineColorAppearance(options) {
/**
* When true
, the geometry is expected to appear translucent so
* {@link PolylineColorAppearance#renderState} has alpha blending enabled.
- *
* @type {boolean}
- *
* @default true
*/
this.translucent = translucent;
@@ -99,9 +92,7 @@ function PolylineColorAppearance(options) {
Object.defineProperties(PolylineColorAppearance.prototype, {
/**
* The GLSL source code for the vertex shader.
- *
* @memberof PolylineColorAppearance.prototype
- *
* @type {string}
* @readonly
*/
@@ -113,9 +104,7 @@ Object.defineProperties(PolylineColorAppearance.prototype, {
/**
* The GLSL source code for the fragment shader.
- *
* @memberof PolylineColorAppearance.prototype
- *
* @type {string}
* @readonly
*/
@@ -131,9 +120,7 @@ Object.defineProperties(PolylineColorAppearance.prototype, {
* The render state can be explicitly defined when constructing a {@link PolylineColorAppearance}
* instance, or it is set implicitly via {@link PolylineColorAppearance#translucent}.
*
- *
* @memberof PolylineColorAppearance.prototype
- *
* @type {object}
* @readonly
*/
@@ -147,12 +134,9 @@ Object.defineProperties(PolylineColorAppearance.prototype, {
* When true
, the geometry is expected to be closed so
* {@link PolylineColorAppearance#renderState} has backface culling enabled.
* This is always false
for PolylineColorAppearance
.
- *
* @memberof PolylineColorAppearance.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
closed: {
@@ -165,12 +149,9 @@ Object.defineProperties(PolylineColorAppearance.prototype, {
* The {@link VertexFormat} that this appearance instance is compatible with.
* A geometry can have more vertex attributes and still be compatible - at a
* potential performance cost - but it can't have less.
- *
* @memberof PolylineColorAppearance.prototype
- *
* @type VertexFormat
* @readonly
- *
* @default {@link PolylineColorAppearance.VERTEX_FORMAT}
*/
vertexFormat: {
@@ -183,18 +164,14 @@ Object.defineProperties(PolylineColorAppearance.prototype, {
/**
* The {@link VertexFormat} that all {@link PolylineColorAppearance} instances
* are compatible with. This requires only a position
attribute.
- *
* @type VertexFormat
- *
* @constant
*/
PolylineColorAppearance.VERTEX_FORMAT = VertexFormat.POSITION_ONLY;
/**
* Procedurally creates the full GLSL fragment shader source.
- *
* @function
- *
* @returns {string} The full GLSL fragment shader source.
*/
PolylineColorAppearance.prototype.getFragmentShaderSource =
@@ -202,9 +179,7 @@ PolylineColorAppearance.prototype.getFragmentShaderSource =
/**
* Determines if the geometry is translucent based on {@link PolylineColorAppearance#translucent}.
- *
* @function
- *
* @returns {boolean} true
if the appearance is translucent.
*/
PolylineColorAppearance.prototype.isTranslucent =
@@ -214,9 +189,7 @@ PolylineColorAppearance.prototype.isTranslucent =
* Creates a render state. This is not the final render state instance; instead,
* it can contain a subset of render state properties identical to the render state
* created in the context.
- *
* @function
- *
* @returns {object} The render state.
*/
PolylineColorAppearance.prototype.getRenderState =
diff --git a/packages/engine/Source/Scene/PolylineMaterialAppearance.js b/packages/engine/Source/Scene/PolylineMaterialAppearance.js
index 0f048aa81ea2..72c3a6374c8e 100644
--- a/packages/engine/Source/Scene/PolylineMaterialAppearance.js
+++ b/packages/engine/Source/Scene/PolylineMaterialAppearance.js
@@ -17,19 +17,15 @@ if (!FeatureDetection.isInternetExplorer()) {
/**
* An appearance for {@link PolylineGeometry} that supports shading with materials.
- *
* @alias PolylineMaterialAppearance
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {boolean} [options.translucent=true] When true
, the geometry is expected to appear translucent so {@link PolylineMaterialAppearance#renderState} has alpha blending enabled.
- * @param {Material} [options.material=Material.ColorType] The material used to determine the fragment color.
+ * @param {boolean} [options.translucent] When true
, the geometry is expected to appear translucent so {@link PolylineMaterialAppearance#renderState} has alpha blending enabled.
+ * @param {Material} [options.material] The material used to determine the fragment color.
* @param {string} [options.vertexShaderSource] Optional GLSL vertex shader source to override the default vertex shader.
* @param {string} [options.fragmentShaderSource] Optional GLSL fragment shader source to override the default fragment shader.
* @param {object} [options.renderState] Optional render state to override the default render state.
- *
* @see {@link https://github.com/CesiumGS/cesium/wiki/Fabric|Fabric}
- *
* @example
* const primitive = new Cesium.Primitive({
* geometryInstances : new Cesium.GeometryInstance({
@@ -57,11 +53,8 @@ function PolylineMaterialAppearance(options) {
/**
* The material used to determine the fragment color. Unlike other {@link PolylineMaterialAppearance}
* properties, this is not read-only, so an appearance's material can change on the fly.
- *
* @type Material
- *
* @default {@link Material.ColorType}
- *
* @see {@link https://github.com/CesiumGS/cesium/wiki/Fabric|Fabric}
*/
this.material = defined(options.material)
@@ -71,9 +64,7 @@ function PolylineMaterialAppearance(options) {
/**
* When true
, the geometry is expected to appear translucent so
* {@link PolylineMaterialAppearance#renderState} has alpha blending enabled.
- *
* @type {boolean}
- *
* @default true
*/
this.translucent = translucent;
@@ -101,9 +92,7 @@ function PolylineMaterialAppearance(options) {
Object.defineProperties(PolylineMaterialAppearance.prototype, {
/**
* The GLSL source code for the vertex shader.
- *
* @memberof PolylineMaterialAppearance.prototype
- *
* @type {string}
* @readonly
*/
@@ -122,9 +111,7 @@ Object.defineProperties(PolylineMaterialAppearance.prototype, {
/**
* The GLSL source code for the fragment shader.
- *
* @memberof PolylineMaterialAppearance.prototype
- *
* @type {string}
* @readonly
*/
@@ -141,9 +128,7 @@ Object.defineProperties(PolylineMaterialAppearance.prototype, {
* instance, or it is set implicitly via {@link PolylineMaterialAppearance#translucent}
* and {@link PolylineMaterialAppearance#closed}.
*
- *
* @memberof PolylineMaterialAppearance.prototype
- *
* @type {object}
* @readonly
*/
@@ -157,12 +142,9 @@ Object.defineProperties(PolylineMaterialAppearance.prototype, {
* When true
, the geometry is expected to be closed so
* {@link PolylineMaterialAppearance#renderState} has backface culling enabled.
* This is always false
for PolylineMaterialAppearance
.
- *
* @memberof PolylineMaterialAppearance.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
closed: {
@@ -175,12 +157,9 @@ Object.defineProperties(PolylineMaterialAppearance.prototype, {
* The {@link VertexFormat} that this appearance instance is compatible with.
* A geometry can have more vertex attributes and still be compatible - at a
* potential performance cost - but it can't have less.
- *
* @memberof PolylineMaterialAppearance.prototype
- *
* @type VertexFormat
* @readonly
- *
* @default {@link PolylineMaterialAppearance.VERTEX_FORMAT}
*/
vertexFormat: {
@@ -193,9 +172,7 @@ Object.defineProperties(PolylineMaterialAppearance.prototype, {
/**
* The {@link VertexFormat} that all {@link PolylineMaterialAppearance} instances
* are compatible with. This requires position
and st
attributes.
- *
* @type VertexFormat
- *
* @constant
*/
PolylineMaterialAppearance.VERTEX_FORMAT = VertexFormat.POSITION_AND_ST;
@@ -203,9 +180,7 @@ PolylineMaterialAppearance.VERTEX_FORMAT = VertexFormat.POSITION_AND_ST;
/**
* Procedurally creates the full GLSL fragment shader source. For {@link PolylineMaterialAppearance},
* this is derived from {@link PolylineMaterialAppearance#fragmentShaderSource} and {@link PolylineMaterialAppearance#material}.
- *
* @function
- *
* @returns {string} The full GLSL fragment shader source.
*/
PolylineMaterialAppearance.prototype.getFragmentShaderSource =
@@ -213,9 +188,7 @@ PolylineMaterialAppearance.prototype.getFragmentShaderSource =
/**
* Determines if the geometry is translucent based on {@link PolylineMaterialAppearance#translucent} and {@link Material#isTranslucent}.
- *
* @function
- *
* @returns {boolean} true
if the appearance is translucent.
*/
PolylineMaterialAppearance.prototype.isTranslucent =
@@ -225,9 +198,7 @@ PolylineMaterialAppearance.prototype.isTranslucent =
* Creates a render state. This is not the final render state instance; instead,
* it can contain a subset of render state properties identical to the render state
* created in the context.
- *
* @function
- *
* @returns {object} The render state.
*/
PolylineMaterialAppearance.prototype.getRenderState =
diff --git a/packages/engine/Source/Scene/PostProcessStage.js b/packages/engine/Source/Scene/PostProcessStage.js
index ab05093b5c67..51ffcea5b0d2 100644
--- a/packages/engine/Source/Scene/PostProcessStage.js
+++ b/packages/engine/Source/Scene/PostProcessStage.js
@@ -22,22 +22,19 @@ import PostProcessStageSampleMode from "./PostProcessStageSampleMode.js";
/**
* Runs a post-process stage on either the texture rendered by the scene or the output of a previous post-process stage.
- *
* @alias PostProcessStage
- * @constructor
- *
+ * @class
* @param {object} options An object with the following properties:
* @param {string} options.fragmentShader The fragment shader to use. The default sampler2D
uniforms are colorTexture
and depthTexture
. The color texture is the output of rendering the scene or the previous stage. The depth texture is the output from rendering the scene. The shader should contain one or both uniforms. There is also a vec2
varying named v_textureCoordinates
that can be used to sample the textures.
* @param {object} [options.uniforms] An object whose properties will be used to set the shaders uniforms. The properties can be constant values or a function. A constant value can also be a URI, data URI, or HTML element to use as a texture.
- * @param {number} [options.textureScale=1.0] A number in the range (0.0, 1.0] used to scale the texture dimensions. A scale of 1.0 will render this post-process stage to a texture the size of the viewport.
- * @param {boolean} [options.forcePowerOfTwo=false] Whether or not to force the texture dimensions to be both equal powers of two. The power of two will be the next power of two of the minimum of the dimensions.
- * @param {PostProcessStageSampleMode} [options.sampleMode=PostProcessStageSampleMode.NEAREST] How to sample the input color texture.
- * @param {PixelFormat} [options.pixelFormat=PixelFormat.RGBA] The color pixel format of the output texture.
- * @param {PixelDatatype} [options.pixelDatatype=PixelDatatype.UNSIGNED_BYTE] The pixel data type of the output texture.
- * @param {Color} [options.clearColor=Color.BLACK] The color to clear the output texture to.
+ * @param {number} [options.textureScale] A number in the range (0.0, 1.0] used to scale the texture dimensions. A scale of 1.0 will render this post-process stage to a texture the size of the viewport.
+ * @param {boolean} [options.forcePowerOfTwo] Whether or not to force the texture dimensions to be both equal powers of two. The power of two will be the next power of two of the minimum of the dimensions.
+ * @param {PostProcessStageSampleMode} [options.sampleMode] How to sample the input color texture.
+ * @param {PixelFormat} [options.pixelFormat] The color pixel format of the output texture.
+ * @param {PixelDatatype} [options.pixelDatatype] The pixel data type of the output texture.
+ * @param {Color} [options.clearColor] The color to clear the output texture to.
* @param {BoundingRectangle} [options.scissorRectangle] The rectangle to use for the scissor test.
- * @param {string} [options.name=createGuid()] The unique name of this post-process stage for reference by other stages in a composite. If a name is not supplied, a GUID will be generated.
- *
+ * @param {string} [options.name] The unique name of this post-process stage for reference by other stages in a composite. If a name is not supplied, a GUID will be generated.
* @exception {DeveloperError} options.textureScale must be greater than 0.0 and less than or equal to 1.0.
* @exception {DeveloperError} options.pixelFormat must be a color format.
* @exception {DeveloperError} When options.pixelDatatype is FLOAT, this WebGL implementation must support floating point textures. Check context.floatingPointTexture.
@@ -175,7 +172,6 @@ function PostProcessStage(options) {
/**
* Whether or not to execute this post-process stage when ready.
- *
* @type {boolean}
*/
this.enabled = true;
@@ -187,7 +183,6 @@ Object.defineProperties(PostProcessStage.prototype, {
* Determines if this post-process stage is ready to be executed. A stage is only executed when both ready
* and {@link PostProcessStage#enabled} are true
. A stage will not be ready while it is waiting on textures
* to load.
- *
* @memberof PostProcessStage.prototype
* @type {boolean}
* @readonly
@@ -199,7 +194,6 @@ Object.defineProperties(PostProcessStage.prototype, {
},
/**
* The unique name of this post-process stage for reference by other stages in a {@link PostProcessStageComposite}.
- *
* @memberof PostProcessStage.prototype
* @type {string}
* @readonly
@@ -219,7 +213,6 @@ Object.defineProperties(PostProcessStage.prototype, {
* The shader must contain a vec2
varying declaration for v_textureCoordinates
for sampling
* the texture uniforms.
*
- *
* @memberof PostProcessStage.prototype
* @type {string}
* @readonly
@@ -242,7 +235,6 @@ Object.defineProperties(PostProcessStage.prototype, {
* If this post-process stage is part of a {@link PostProcessStageComposite} that does not execute in series, the constant value can also be
* the name of another stage in a composite. This will set the uniform to the output texture the stage with that name.
*
- *
* @memberof PostProcessStage.prototype
* @type {object}
* @readonly
@@ -254,7 +246,6 @@ Object.defineProperties(PostProcessStage.prototype, {
},
/**
* A number in the range (0.0, 1.0] used to scale the output texture dimensions. A scale of 1.0 will render this post-process stage to a texture the size of the viewport.
- *
* @memberof PostProcessStage.prototype
* @type {number}
* @readonly
@@ -266,7 +257,6 @@ Object.defineProperties(PostProcessStage.prototype, {
},
/**
* Whether or not to force the output texture dimensions to be both equal powers of two. The power of two will be the next power of two of the minimum of the dimensions.
- *
* @memberof PostProcessStage.prototype
* @type {number}
* @readonly
@@ -278,7 +268,6 @@ Object.defineProperties(PostProcessStage.prototype, {
},
/**
* How to sample the input color texture.
- *
* @memberof PostProcessStage.prototype
* @type {PostProcessStageSampleMode}
* @readonly
@@ -290,7 +279,6 @@ Object.defineProperties(PostProcessStage.prototype, {
},
/**
* The color pixel format of the output texture.
- *
* @memberof PostProcessStage.prototype
* @type {PixelFormat}
* @readonly
@@ -302,7 +290,6 @@ Object.defineProperties(PostProcessStage.prototype, {
},
/**
* The pixel data type of the output texture.
- *
* @memberof PostProcessStage.prototype
* @type {PixelDatatype}
* @readonly
@@ -314,7 +301,6 @@ Object.defineProperties(PostProcessStage.prototype, {
},
/**
* The color to clear the output texture to.
- *
* @memberof PostProcessStage.prototype
* @type {Color}
* @readonly
@@ -326,7 +312,6 @@ Object.defineProperties(PostProcessStage.prototype, {
},
/**
* The {@link BoundingRectangle} to use for the scissor test. A default bounding rectangle will disable the scissor test.
- *
* @memberof PostProcessStage.prototype
* @type {BoundingRectangle}
* @readonly
@@ -338,7 +323,6 @@ Object.defineProperties(PostProcessStage.prototype, {
},
/**
* A reference to the texture written to when executing this post process stage.
- *
* @memberof PostProcessStage.prototype
* @type {Texture}
* @readonly
@@ -362,13 +346,12 @@ Object.defineProperties(PostProcessStage.prototype, {
* stage to that fragment. For example:
*
* if (czm_selected(v_textureCoordinates)) {
- * // apply post-process stage
+ * // apply post-process stage
* } else {
- * out_FragColor = texture(colorTexture, v_textureCoordinates);
+ * out_FragColor = texture(colorTexture, v_textureCoordinates);
* }
*
*
- *
* @memberof PostProcessStage.prototype
* @type {Array}
*/
@@ -396,6 +379,7 @@ Object.defineProperties(PostProcessStage.prototype, {
const depthTextureRegex = /uniform\s+sampler2D\s+depthTexture/g;
/**
+ * @param context
* @private
*/
PostProcessStage.prototype._isSupported = function (context) {
@@ -994,9 +978,7 @@ PostProcessStage.prototype.execute = function (
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see PostProcessStage#destroy
*/
PostProcessStage.prototype.isDestroyed = function () {
@@ -1011,9 +993,7 @@ PostProcessStage.prototype.isDestroyed = function () {
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
*
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @see PostProcessStage#isDestroyed
*/
PostProcessStage.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/PostProcessStageCollection.js b/packages/engine/Source/Scene/PostProcessStageCollection.js
index 1bdb38ca5e34..e136f7329d74 100644
--- a/packages/engine/Source/Scene/PostProcessStageCollection.js
+++ b/packages/engine/Source/Scene/PostProcessStageCollection.js
@@ -28,9 +28,8 @@ const stackScratch = [];
*
* If the FXAA stage is enabled, it will execute after all other stages.
*
- *
* @alias PostProcessStageCollection
- * @constructor
+ * @class
*/
function PostProcessStageCollection() {
const fxaa = PostProcessStageLibrary.createFXAAStage();
@@ -103,7 +102,6 @@ function PostProcessStageCollection() {
Object.defineProperties(PostProcessStageCollection.prototype, {
/**
* Determines if all of the post-process stages in the collection are ready to be executed.
- *
* @memberof PostProcessStageCollection.prototype
* @type {boolean}
* @readonly
@@ -137,7 +135,6 @@ Object.defineProperties(PostProcessStageCollection.prototype, {
*
* When enabled, this stage will execute after all others.
*
- *
* @memberof PostProcessStageCollection.prototype
* @type {PostProcessStage}
* @readonly
@@ -182,7 +179,6 @@ Object.defineProperties(PostProcessStageCollection.prototype, {
*
* When enabled, this stage will execute before all others.
*
- *
* @memberof PostProcessStageCollection.prototype
* @type {PostProcessStageComposite}
* @readonly
@@ -217,7 +213,6 @@ Object.defineProperties(PostProcessStageCollection.prototype, {
*
* When enabled, this stage will execute before all others.
*
- *
* @memberOf PostProcessStageCollection.prototype
* @type {PostProcessStageComposite}
* @readonly
@@ -229,7 +224,6 @@ Object.defineProperties(PostProcessStageCollection.prototype, {
},
/**
* The number of post-process stages in this collection.
- *
* @memberof PostProcessStageCollection.prototype
* @type {number}
* @readonly
@@ -242,7 +236,6 @@ Object.defineProperties(PostProcessStageCollection.prototype, {
},
/**
* A reference to the last texture written to when executing the post-process stages in this collection.
- *
* @memberof PostProcessStageCollection.prototype
* @type {Texture}
* @readonly
@@ -284,7 +277,6 @@ Object.defineProperties(PostProcessStageCollection.prototype, {
},
/**
* Whether the collection has a stage that has selected features.
- *
* @memberof PostProcessStageCollection.prototype
* @type {boolean}
* @readonly
@@ -314,7 +306,6 @@ Object.defineProperties(PostProcessStageCollection.prototype, {
/**
* Gets and sets the tonemapping algorithm used when rendering with high dynamic range.
- *
* @memberof PostProcessStageCollection.prototype
* @type {Tonemapper}
* @private
@@ -407,11 +398,9 @@ function removeStages(collection) {
/**
* Adds the post-process stage to the collection.
- *
* @param {PostProcessStage|PostProcessStageComposite} stage The post-process stage to add to the collection.
- * @return {PostProcessStage|PostProcessStageComposite} The post-process stage that was added to the collection.
- *
- * @exception {DeveloperError} The post-process stage has already been added to the collection or does not have a unique name.
+ * @returns {PostProcessStage|PostProcessStageComposite} The post-process stage that was added to the collection.
+ * @throws {DeveloperError} The post-process stage has already been added to the collection or does not have a unique name.
*/
PostProcessStageCollection.prototype.add = function (stage) {
//>>includeStart('debug', pragmas.debug);
@@ -451,9 +440,8 @@ PostProcessStageCollection.prototype.add = function (stage) {
/**
* Removes a post-process stage from the collection and destroys it.
- *
* @param {PostProcessStage|PostProcessStageComposite} stage The post-process stage to remove from the collection.
- * @return {boolean} Whether the post-process stage was removed.
+ * @returns {boolean} Whether the post-process stage was removed.
*/
PostProcessStageCollection.prototype.remove = function (stage) {
if (!this.contains(stage)) {
@@ -487,9 +475,8 @@ PostProcessStageCollection.prototype.remove = function (stage) {
/**
* Returns whether the collection contains a post-process stage.
- *
* @param {PostProcessStage|PostProcessStageComposite} stage The post-process stage.
- * @return {boolean} Whether the collection contains the post-process stage.
+ * @returns {boolean} Whether the collection contains the post-process stage.
*/
PostProcessStageCollection.prototype.contains = function (stage) {
return (
@@ -501,9 +488,8 @@ PostProcessStageCollection.prototype.contains = function (stage) {
/**
* Gets the post-process stage at index
.
- *
* @param {number} index The index of the post-process stage.
- * @return {PostProcessStage|PostProcessStageComposite} The post-process stage at index.
+ * @returns {PostProcessStage|PostProcessStageComposite} The post-process stage at index.
*/
PostProcessStageCollection.prototype.get = function (index) {
removeStages(this);
@@ -531,10 +517,8 @@ PostProcessStageCollection.prototype.removeAll = function () {
/**
* Gets a post-process stage in the collection by its name.
- *
* @param {string} name The name of the post-process stage.
- * @return {PostProcessStage|PostProcessStageComposite} The post-process stage.
- *
+ * @returns {PostProcessStage|PostProcessStageComposite} The post-process stage.
* @private
*/
PostProcessStageCollection.prototype.getStageByName = function (name) {
@@ -543,10 +527,9 @@ PostProcessStageCollection.prototype.getStageByName = function (name) {
/**
* Called before the post-process stages in the collection are executed. Calls update for each stage and creates WebGL resources.
- *
* @param {Context} context The context.
* @param {boolean} useLogDepth Whether the scene uses a logarithmic depth buffer.
- *
+ * @param useHdr
* @private
*/
PostProcessStageCollection.prototype.update = function (
@@ -680,9 +663,7 @@ PostProcessStageCollection.prototype.update = function (
/**
* Clears all of the framebuffers used by the stages.
- *
* @param {Context} context The context.
- *
* @private
*/
PostProcessStageCollection.prototype.clear = function (context) {
@@ -702,10 +683,8 @@ function getOutputTexture(stage) {
/**
* Gets the output texture of a stage with the given name.
- *
* @param {string} stageName The name of the stage.
- * @return {Texture|undefined} The texture rendered to by the stage with the given name.
- *
+ * @returns {Texture|undefined} The texture rendered to by the stage with the given name.
* @private
*/
PostProcessStageCollection.prototype.getOutputTexture = function (stageName) {
@@ -745,12 +724,10 @@ function execute(stage, context, colorTexture, depthTexture, idTexture) {
/**
* Executes all ready and enabled stages in the collection.
- *
* @param {Context} context The context.
* @param {Texture} colorTexture The color texture rendered to by the scene.
* @param {Texture} depthTexture The depth texture written to by the scene.
* @param {Texture} idTexture The id texture written to by the scene.
- *
* @private
*/
PostProcessStageCollection.prototype.execute = function (
@@ -824,10 +801,8 @@ PostProcessStageCollection.prototype.execute = function (
/**
* Copies the output of all executed stages to the color texture of a framebuffer.
- *
* @param {Context} context The context.
* @param {Framebuffer} framebuffer The framebuffer to copy to.
- *
* @private
*/
PostProcessStageCollection.prototype.copy = function (context, framebuffer) {
@@ -853,9 +828,7 @@ PostProcessStageCollection.prototype.copy = function (context, framebuffer) {
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see PostProcessStageCollection#destroy
*/
PostProcessStageCollection.prototype.isDestroyed = function () {
@@ -870,9 +843,7 @@ PostProcessStageCollection.prototype.isDestroyed = function () {
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
*
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @see PostProcessStageCollection#isDestroyed
*/
PostProcessStageCollection.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/PostProcessStageComposite.js b/packages/engine/Source/Scene/PostProcessStageComposite.js
index bcea9587afa0..df4b828c43e9 100644
--- a/packages/engine/Source/Scene/PostProcessStageComposite.js
+++ b/packages/engine/Source/Scene/PostProcessStageComposite.js
@@ -12,20 +12,15 @@ import destroyObject from "../Core/destroyObject.js";
* If inputPreviousStageTexture
is false
, the input texture is the same for each stage in the composite. The input texture is the texture rendered to by the scene
* or the output texture of the previous stage.
*
- *
* @alias PostProcessStageComposite
- * @constructor
- *
+ * @class
* @param {object} options An object with the following properties:
* @param {Array} options.stages An array of {@link PostProcessStage}s or composites to be executed in order.
- * @param {boolean} [options.inputPreviousStageTexture=true] Whether to execute each post-process stage where the input to one stage is the output of the previous. Otherwise, the input to each contained stage is the output of the stage that executed before the composite.
- * @param {string} [options.name=createGuid()] The unique name of this post-process stage for reference by other composites. If a name is not supplied, a GUID will be generated.
+ * @param {boolean} [options.inputPreviousStageTexture] Whether to execute each post-process stage where the input to one stage is the output of the previous. Otherwise, the input to each contained stage is the output of the stage that executed before the composite.
+ * @param {string} [options.name] The unique name of this post-process stage for reference by other composites. If a name is not supplied, a GUID will be generated.
* @param {object} [options.uniforms] An alias to the uniforms of post-process stages.
- *
- * @exception {DeveloperError} options.stages.length must be greater than 0.0.
- *
+ * @throws {DeveloperError} options.stages.length must be greater than 0.0.
* @see PostProcessStage
- *
* @example
* // Example 1: separable blur filter
* // The input to blurXDirection is the texture rendered to by the scene or the output of the previous stage.
@@ -33,7 +28,6 @@ import destroyObject from "../Core/destroyObject.js";
* scene.postProcessStages.add(new Cesium.PostProcessStageComposite({
* stages : [blurXDirection, blurYDirection]
* }));
- *
* @example
* // Example 2: referencing the output of another post-process stage
* scene.postProcessStages.add(new Cesium.PostProcessStageComposite({
@@ -54,7 +48,6 @@ import destroyObject from "../Core/destroyObject.js";
* })
* ]
* });
- *
* @example
* // Example 3: create a uniform alias
* const uniforms = {};
@@ -117,7 +110,6 @@ function PostProcessStageComposite(options) {
Object.defineProperties(PostProcessStageComposite.prototype, {
/**
* Determines if this post-process stage is ready to be executed.
- *
* @memberof PostProcessStageComposite.prototype
* @type {boolean}
* @readonly
@@ -136,7 +128,6 @@ Object.defineProperties(PostProcessStageComposite.prototype, {
},
/**
* The unique name of this post-process stage for reference by other stages in a PostProcessStageComposite.
- *
* @memberof PostProcessStageComposite.prototype
* @type {string}
* @readonly
@@ -148,7 +139,6 @@ Object.defineProperties(PostProcessStageComposite.prototype, {
},
/**
* Whether or not to execute this post-process stage when ready.
- *
* @memberof PostProcessStageComposite.prototype
* @type {boolean}
*/
@@ -179,7 +169,6 @@ Object.defineProperties(PostProcessStageComposite.prototype, {
* If inputPreviousStageTexture
is true
, the input to each stage is the output texture rendered to by the scene or of the stage that executed before it.
* If inputPreviousStageTexture
is false
, the input texture is the same for each stage in the composite. The input texture is the texture rendered to by the scene
* or the output texture of the previous stage.
- *
* @memberof PostProcessStageComposite.prototype
* @type {boolean}
* @readonly
@@ -191,7 +180,6 @@ Object.defineProperties(PostProcessStageComposite.prototype, {
},
/**
* The number of post-process stages in this composite.
- *
* @memberof PostProcessStageComposite.prototype
* @type {number}
* @readonly
@@ -203,7 +191,6 @@ Object.defineProperties(PostProcessStageComposite.prototype, {
},
/**
* The features selected for applying the post-process.
- *
* @memberof PostProcessStageComposite.prototype
* @type {Array}
*/
@@ -229,6 +216,7 @@ Object.defineProperties(PostProcessStageComposite.prototype, {
});
/**
+ * @param context
* @private
*/
PostProcessStageComposite.prototype._isSupported = function (context) {
@@ -244,12 +232,10 @@ PostProcessStageComposite.prototype._isSupported = function (context) {
/**
* Gets the post-process stage at index
- *
* @param {number} index The index of the post-process stage or composite.
- * @return {PostProcessStage|PostProcessStageComposite} The post-process stage or composite at index.
- *
- * @exception {DeveloperError} index must be greater than or equal to 0.
- * @exception {DeveloperError} index must be less than {@link PostProcessStageComposite#length}.
+ * @returns {PostProcessStage|PostProcessStageComposite} The post-process stage or composite at index.
+ * @throws {DeveloperError} index must be greater than or equal to 0.
+ * @throws {DeveloperError} index must be less than {@link PostProcessStageComposite#length}.
*/
PostProcessStageComposite.prototype.get = function (index) {
//>>includeStart('debug', pragmas.debug);
@@ -329,9 +315,7 @@ PostProcessStageComposite.prototype.update = function (context, useLogDepth) {
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see PostProcessStageComposite#destroy
*/
PostProcessStageComposite.prototype.isDestroyed = function () {
@@ -346,9 +330,7 @@ PostProcessStageComposite.prototype.isDestroyed = function () {
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
*
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @see PostProcessStageComposite#isDestroyed
*/
PostProcessStageComposite.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/PostProcessStageLibrary.js b/packages/engine/Source/Scene/PostProcessStageLibrary.js
index 9d3f8a2fd7e2..b4b40d195ecc 100644
--- a/packages/engine/Source/Scene/PostProcessStageLibrary.js
+++ b/packages/engine/Source/Scene/PostProcessStageLibrary.js
@@ -29,7 +29,6 @@ import PostProcessStageSampleMode from "./PostProcessStageSampleMode.js";
/**
* Contains functions for creating common post-process stages.
- *
* @namespace PostProcessStageLibrary
*/
const PostProcessStageLibrary = {};
@@ -113,7 +112,7 @@ function createBlur(name) {
* The default value for delta
is 1.0
. The default value for sigma
is 2.0
.
* stepSize
is the distance to the next texel. The default is 1.0
.
*
- * @return {PostProcessStageComposite} A post-process stage that applies a Gaussian blur to the input texture.
+ * @returns {PostProcessStageComposite} A post-process stage that applies a Gaussian blur to the input texture.
*/
PostProcessStageLibrary.createBlurStage = function () {
return createBlur("czm_blur");
@@ -135,7 +134,7 @@ PostProcessStageLibrary.createBlurStage = function () {
* delta
, sigma
, and stepSize
are the same properties as {@link PostProcessStageLibrary#createBlurStage}.
* The blur is applied to the areas out of focus.
*
- * @return {PostProcessStageComposite} A post-process stage that applies a depth of field effect.
+ * @returns {PostProcessStageComposite} A post-process stage that applies a depth of field effect.
*/
PostProcessStageLibrary.createDepthOfFieldStage = function () {
const blur = createBlur("czm_depth_of_field_blur");
@@ -196,10 +195,8 @@ PostProcessStageLibrary.createDepthOfFieldStage = function () {
*
* This stage requires the WEBGL_depth_texture extension.
*
- *
* @param {Scene} scene The scene.
- * @return {boolean} Whether this post process stage is supported.
- *
+ * @returns {boolean} Whether this post process stage is supported.
* @see {Context#depthTexture}
* @see {@link http://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/|WEBGL_depth_texture}
*/
@@ -222,8 +219,7 @@ PostProcessStageLibrary.isDepthOfFieldSupported = function (scene) {
*
* This stage is not supported in 2D.
*
- * @return {PostProcessStage} A post-process stage that applies an edge detection effect.
- *
+ * @returns {PostProcessStage} A post-process stage that applies an edge detection effect.
* @example
* // multiple silhouette effects
* const yellowEdge = Cesium.PostProcessStageLibrary.createEdgeDetectionStage();
@@ -255,10 +251,8 @@ PostProcessStageLibrary.createEdgeDetectionStage = function () {
*
* This stage requires the WEBGL_depth_texture extension.
*
- *
* @param {Scene} scene The scene.
- * @return {boolean} Whether this post process stage is supported.
- *
+ * @returns {boolean} Whether this post process stage is supported.
* @see {Context#depthTexture}
* @see {@link http://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/|WEBGL_depth_texture}
*/
@@ -325,7 +319,7 @@ function getSilhouetteEdgeDetection(edgeDetectionStages) {
* length
is the length of the edges in pixels. The default is 0.5
.
*
* @param {PostProcessStage[]} [edgeDetectionStages] An array of edge detection post process stages.
- * @return {PostProcessStageComposite} A post-process stage that applies a silhouette effect.
+ * @returns {PostProcessStageComposite} A post-process stage that applies a silhouette effect.
*/
PostProcessStageLibrary.createSilhouetteStage = function (edgeDetectionStages) {
const edgeDetection = getSilhouetteEdgeDetection(edgeDetectionStages);
@@ -350,10 +344,8 @@ PostProcessStageLibrary.createSilhouetteStage = function (edgeDetectionStages) {
*
* This stage requires the WEBGL_depth_texture extension.
*
- *
* @param {Scene} scene The scene.
- * @return {boolean} Whether this post process stage is supported.
- *
+ * @returns {boolean} Whether this post process stage is supported.
* @see {Context#depthTexture}
* @see {@link http://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/|WEBGL_depth_texture}
*/
@@ -380,8 +372,7 @@ PostProcessStageLibrary.isSilhouetteSupported = function (scene) {
*
* delta
, sigma
, and stepSize
are the same properties as {@link PostProcessStageLibrary#createBlurStage}.
*
- * @return {PostProcessStageComposite} A post-process stage to applies a bloom effect.
- *
+ * @returns {PostProcessStageComposite} A post-process stage to applies a bloom effect.
* @private
*/
PostProcessStageLibrary.createBloomStage = function () {
@@ -496,8 +487,7 @@ PostProcessStageLibrary.createBloomStage = function () {
* delta
, sigma
, and blurStepSize
are the same properties as {@link PostProcessStageLibrary#createBlurStage}.
* The blur is applied to the shadows generated from the image to make them smoother.
*
- * @return {PostProcessStageComposite} A post-process stage that applies an ambient occlusion effect.
- *
+ * @returns {PostProcessStageComposite} A post-process stage that applies an ambient occlusion effect.
* @private
*/
PostProcessStageLibrary.createAmbientOcclusionStage = function () {
@@ -626,10 +616,8 @@ PostProcessStageLibrary.createAmbientOcclusionStage = function () {
*
* This stage requires the WEBGL_depth_texture extension.
*
- *
* @param {Scene} scene The scene.
- * @return {boolean} Whether this post process stage is supported.
- *
+ * @returns {boolean} Whether this post process stage is supported.
* @see {Context#depthTexture}
* @see {@link http://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/|WEBGL_depth_texture}
*/
@@ -641,8 +629,7 @@ const fxaaFS = `#define FXAA_QUALITY_PRESET 39 \n${FXAA3_11}\n${FXAA}`;
/**
* Creates a post-process stage that applies Fast Approximate Anti-aliasing (FXAA) to the input texture.
- * @return {PostProcessStage} A post-process stage that applies Fast Approximate Anti-aliasing to the input texture.
- *
+ * @returns {PostProcessStage} A post-process stage that applies Fast Approximate Anti-aliasing to the input texture.
* @private
*/
PostProcessStageLibrary.createFXAAStage = function () {
@@ -656,7 +643,7 @@ PostProcessStageLibrary.createFXAAStage = function () {
/**
* Creates a post-process stage that applies ACES tonemapping operator.
* @param {boolean} useAutoExposure Whether or not to use auto-exposure.
- * @return {PostProcessStage} A post-process stage that applies ACES tonemapping operator.
+ * @returns {PostProcessStage} A post-process stage that applies ACES tonemapping operator.
* @private
*/
PostProcessStageLibrary.createAcesTonemappingStage = function (
@@ -676,7 +663,7 @@ PostProcessStageLibrary.createAcesTonemappingStage = function (
/**
* Creates a post-process stage that applies filmic tonemapping operator.
* @param {boolean} useAutoExposure Whether or not to use auto-exposure.
- * @return {PostProcessStage} A post-process stage that applies filmic tonemapping operator.
+ * @returns {PostProcessStage} A post-process stage that applies filmic tonemapping operator.
* @private
*/
PostProcessStageLibrary.createFilmicTonemappingStage = function (
@@ -696,7 +683,7 @@ PostProcessStageLibrary.createFilmicTonemappingStage = function (
/**
* Creates a post-process stage that applies Reinhard tonemapping operator.
* @param {boolean} useAutoExposure Whether or not to use auto-exposure.
- * @return {PostProcessStage} A post-process stage that applies Reinhard tonemapping operator.
+ * @returns {PostProcessStage} A post-process stage that applies Reinhard tonemapping operator.
* @private
*/
PostProcessStageLibrary.createReinhardTonemappingStage = function (
@@ -716,7 +703,7 @@ PostProcessStageLibrary.createReinhardTonemappingStage = function (
/**
* Creates a post-process stage that applies modified Reinhard tonemapping operator.
* @param {boolean} useAutoExposure Whether or not to use auto-exposure.
- * @return {PostProcessStage} A post-process stage that applies modified Reinhard tonemapping operator.
+ * @returns {PostProcessStage} A post-process stage that applies modified Reinhard tonemapping operator.
* @private
*/
PostProcessStageLibrary.createModifiedReinhardTonemappingStage = function (
@@ -736,7 +723,7 @@ PostProcessStageLibrary.createModifiedReinhardTonemappingStage = function (
/**
* Creates a post-process stage that finds the average luminance of the input texture.
- * @return {PostProcessStage} A post-process stage that finds the average luminance of the input texture.
+ * @returns {PostProcessStage} A post-process stage that finds the average luminance of the input texture.
* @private
*/
PostProcessStageLibrary.createAutoExposureStage = function () {
@@ -748,7 +735,7 @@ PostProcessStageLibrary.createAutoExposureStage = function () {
*
* This stage has one uniform value, gradations
, which scales the luminance of each pixel.
*
- * @return {PostProcessStage} A post-process stage that renders the input texture with black and white gradations.
+ * @returns {PostProcessStage} A post-process stage that renders the input texture with black and white gradations.
*/
PostProcessStageLibrary.createBlackAndWhiteStage = function () {
return new PostProcessStage({
@@ -765,7 +752,7 @@ PostProcessStageLibrary.createBlackAndWhiteStage = function () {
*
* This stage has one uniform value, brightness
, which scales the saturation of each pixel.
*
- * @return {PostProcessStage} A post-process stage that saturates the input texture.
+ * @returns {PostProcessStage} A post-process stage that saturates the input texture.
*/
PostProcessStageLibrary.createBrightnessStage = function () {
return new PostProcessStage({
@@ -779,7 +766,7 @@ PostProcessStageLibrary.createBrightnessStage = function () {
/**
* Creates a post-process stage that adds a night vision effect to the input texture.
- * @return {PostProcessStage} A post-process stage that adds a night vision effect to the input texture.
+ * @returns {PostProcessStage} A post-process stage that adds a night vision effect to the input texture.
*/
PostProcessStageLibrary.createNightVisionStage = function () {
return new PostProcessStage({
@@ -790,8 +777,7 @@ PostProcessStageLibrary.createNightVisionStage = function () {
/**
* Creates a post-process stage that replaces the input color texture with a black and white texture representing the fragment depth at each pixel.
- * @return {PostProcessStage} A post-process stage that replaces the input color texture with a black and white texture representing the fragment depth at each pixel.
- *
+ * @returns {PostProcessStage} A post-process stage that replaces the input color texture with a black and white texture representing the fragment depth at each pixel.
* @private
*/
PostProcessStageLibrary.createDepthViewStage = function () {
@@ -817,7 +803,7 @@ PostProcessStageLibrary.createDepthViewStage = function () {
* earthRadius
is the maximum radius of the earth. The default value is Ellipsoid.WGS84.maximumRadius
.
*
*
- * @return {PostProcessStage} A post-process stage for applying a lens flare effect.
+ * @returns {PostProcessStage} A post-process stage for applying a lens flare effect.
*/
PostProcessStageLibrary.createLensFlareStage = function () {
return new PostProcessStage({
diff --git a/packages/engine/Source/Scene/PostProcessStageSampleMode.js b/packages/engine/Source/Scene/PostProcessStageSampleMode.js
index b078849fd0d8..58a3699b80fd 100644
--- a/packages/engine/Source/Scene/PostProcessStageSampleMode.js
+++ b/packages/engine/Source/Scene/PostProcessStageSampleMode.js
@@ -1,19 +1,16 @@
/**
* Determines how input texture to a {@link PostProcessStage} is sampled.
- *
* @enum {number}
*/
const PostProcessStageSampleMode = {
/**
* Samples the texture by returning the closest texel.
- *
* @type {number}
* @constant
*/
NEAREST: 0,
/**
* Samples the texture through bi-linear interpolation of the four nearest texels.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Scene/PostProcessStageTextureCache.js b/packages/engine/Source/Scene/PostProcessStageTextureCache.js
index cdc6e21a3986..4e53e261838d 100644
--- a/packages/engine/Source/Scene/PostProcessStageTextureCache.js
+++ b/packages/engine/Source/Scene/PostProcessStageTextureCache.js
@@ -7,12 +7,9 @@ import FramebufferManager from "../Renderer/FramebufferManager.js";
/**
* Creates a minimal amount of textures and framebuffers.
- *
* @alias PostProcessStageTextureCache
- * @constructor
- *
+ * @class
* @param {PostProcessStageCollection} postProcessStageCollection The post process collection.
- *
* @private
*/
function PostProcessStageTextureCache(postProcessStageCollection) {
@@ -313,7 +310,6 @@ PostProcessStageTextureCache.prototype.updateDependencies = function () {
/**
* Called before the stages in the collection are executed. Creates the minimum amount of framebuffers for a post-process collection.
- *
* @param {Context} context The context.
*/
PostProcessStageTextureCache.prototype.update = function (context) {
@@ -377,7 +373,6 @@ PostProcessStageTextureCache.prototype.update = function (context) {
/**
* Clears all of the framebuffers.
- *
* @param {Context} context The context.
*/
PostProcessStageTextureCache.prototype.clear = function (context) {
@@ -390,7 +385,7 @@ PostProcessStageTextureCache.prototype.clear = function (context) {
/**
* Gets the stage with the given name.
* @param {string} name The name of the stage.
- * @return {PostProcessStage|PostProcessStageComposite}
+ * @returns {PostProcessStage|PostProcessStageComposite}
*/
PostProcessStageTextureCache.prototype.getStageByName = function (name) {
return this._collection.getStageByName(name);
@@ -399,7 +394,7 @@ PostProcessStageTextureCache.prototype.getStageByName = function (name) {
/**
* Gets the output texture for a stage with the given name.
* @param {string} name The name of the stage.
- * @return {Texture|undefined} The output texture of the stage with the given name.
+ * @returns {Texture|undefined} The output texture of the stage with the given name.
*/
PostProcessStageTextureCache.prototype.getOutputTexture = function (name) {
return this._collection.getOutputTexture(name);
@@ -407,9 +402,8 @@ PostProcessStageTextureCache.prototype.getOutputTexture = function (name) {
/**
* Gets the framebuffer for a stage with the given name.
- *
* @param {string} name The name of the stage.
- * @return {Framebuffer|undefined} The framebuffer for the stage with the given name.
+ * @returns {Framebuffer|undefined} The framebuffer for the stage with the given name.
*/
PostProcessStageTextureCache.prototype.getFramebuffer = function (name) {
const framebuffer = this._stageNameToFramebuffer[name];
@@ -425,9 +419,7 @@ PostProcessStageTextureCache.prototype.getFramebuffer = function (name) {
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see PostProcessStageTextureCache#destroy
*/
PostProcessStageTextureCache.prototype.isDestroyed = function () {
@@ -442,9 +434,7 @@ PostProcessStageTextureCache.prototype.isDestroyed = function () {
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
*
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @see PostProcessStageTextureCache#isDestroyed
*/
PostProcessStageTextureCache.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/Primitive.js b/packages/engine/Source/Scene/Primitive.js
index f1128facaa7a..8708165fb085 100644
--- a/packages/engine/Source/Scene/Primitive.js
+++ b/packages/engine/Source/Scene/Primitive.js
@@ -59,22 +59,20 @@ import ShadowMode from "./ShadowMode.js";
* show geometry that will be created on a web worker by using the descriptions of the geometry. The third example
* shows how to create the geometry on the main thread by explicitly calling the createGeometry
method.
*
- *
* @alias Primitive
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {GeometryInstance[]|GeometryInstance} [options.geometryInstances] The geometry instances - or a single geometry instance - to render.
* @param {Appearance} [options.appearance] The appearance used to render the primitive.
* @param {Appearance} [options.depthFailAppearance] The appearance used to shade this primitive when it fails the depth test.
- * @param {boolean} [options.show=true] Determines if this primitive will be shown.
- * @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The 4x4 transformation matrix that transforms the primitive (all geometry instances) from model to world coordinates.
- * @param {boolean} [options.vertexCacheOptimize=false] When true
, geometry vertices are optimized for the pre and post-vertex-shader caches.
- * @param {boolean} [options.interleave=false] When true
, geometry vertex attributes are interleaved, which can slightly improve rendering performance but increases load time.
- * @param {boolean} [options.compressVertices=true] When true
, the geometry vertices are compressed, which will save memory.
- * @param {boolean} [options.releaseGeometryInstances=true] When true
, the primitive does not keep a reference to the input geometryInstances
to save memory.
- * @param {boolean} [options.allowPicking=true] When true
, each geometry instance will only be pickable with {@link Scene#pick}. When false
, GPU memory is saved.
- * @param {boolean} [options.cull=true] When true
, the renderer frustum culls and horizon culls the primitive's commands based on their bounding volume. Set this to false
for a small performance gain if you are manually culling the primitive.
+ * @param {boolean} [options.show] Determines if this primitive will be shown.
+ * @param {Matrix4} [options.modelMatrix] The 4x4 transformation matrix that transforms the primitive (all geometry instances) from model to world coordinates.
+ * @param {boolean} [options.vertexCacheOptimize] When true
, geometry vertices are optimized for the pre and post-vertex-shader caches.
+ * @param {boolean} [options.interleave] When true
, geometry vertex attributes are interleaved, which can slightly improve rendering performance but increases load time.
+ * @param {boolean} [options.compressVertices] When true
, the geometry vertices are compressed, which will save memory.
+ * @param {boolean} [options.releaseGeometryInstances] When true
, the primitive does not keep a reference to the input geometryInstances
to save memory.
+ * @param {boolean} [options.allowPicking] When true
, each geometry instance will only be pickable with {@link Scene#pick}. When false
, GPU memory is saved.
+ * @param {boolean} [options.cull] When true
, the renderer frustum culls and horizon culls the primitive's commands based on their bounding volume. Set this to false
for a small performance gain if you are manually culling the primitive.
* @param {boolean} [options.asynchronous=true] Determines if the primitive will be created asynchronously or block until ready.
* @param {boolean} [options.debugShowBoundingVolume=false] For debugging only. Determines if this primitive's commands' bounding spheres are shown.
* @param {ShadowMode} [options.shadows=ShadowMode.DISABLED] Determines whether this primitive casts or receives shadows from light sources.
@@ -161,10 +159,8 @@ function Primitive(options) {
*
* Changing this property after the primitive is rendered has no effect.
*
- *
* @readonly
* @type GeometryInstance[]|GeometryInstance
- *
* @default undefined
*/
this.geometryInstances = options.geometryInstances;
@@ -174,9 +170,7 @@ function Primitive(options) {
* instance is shaded with the same appearance. Some appearances, like
* {@link PerInstanceColorAppearance} allow giving each instance unique
* properties.
- *
* @type Appearance
- *
* @default undefined
*/
this.appearance = options.appearance;
@@ -199,7 +193,6 @@ function Primitive(options) {
* there may be artifacts.
*
* @type Appearance
- *
* @default undefined
*/
this.depthFailAppearance = options.depthFailAppearance;
@@ -215,11 +208,8 @@ function Primitive(options) {
*
* This property is only supported in 3D mode.
*
- *
* @type Matrix4
- *
* @default Matrix4.IDENTITY
- *
* @example
* const origin = Cesium.Cartesian3.fromDegrees(-95.0, 40.0, 200000.0);
* p.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin);
@@ -232,9 +222,7 @@ function Primitive(options) {
/**
* Determines if the primitive will be shown. This affects all geometry
* instances in the primitive.
- *
* @type {boolean}
- *
* @default true
*/
this.show = defaultValue(options.show, true);
@@ -253,9 +241,7 @@ function Primitive(options) {
* When true
, the renderer frustum culls and horizon culls the primitive's commands
* based on their bounding volume. Set this to false
for a small performance gain
* if you are manually culling the primitive.
- *
* @type {boolean}
- *
* @default true
*/
this.cull = defaultValue(options.cull, true);
@@ -265,9 +251,7 @@ function Primitive(options) {
*
* Draws the bounding sphere for each draw command in the primitive.
*
- *
* @type {boolean}
- *
* @default false
*/
this.debugShowBoundingVolume = defaultValue(
@@ -295,9 +279,7 @@ function Primitive(options) {
/**
* Determines whether this primitive casts or receives shadows from light sources.
- *
* @type {ShadowMode}
- *
* @default ShadowMode.DISABLED
*/
this.shadows = defaultValue(options.shadows, ShadowMode.DISABLED);
@@ -365,12 +347,9 @@ function Primitive(options) {
Object.defineProperties(Primitive.prototype, {
/**
* When true
, geometry vertices are optimized for the pre and post-vertex-shader caches.
- *
* @memberof Primitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
vertexCacheOptimize: {
@@ -381,12 +360,9 @@ Object.defineProperties(Primitive.prototype, {
/**
* Determines if geometry vertex attributes are interleaved, which can slightly improve rendering performance.
- *
* @memberof Primitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
interleave: {
@@ -397,12 +373,9 @@ Object.defineProperties(Primitive.prototype, {
/**
* When true
, the primitive does not keep a reference to the input geometryInstances
to save memory.
- *
* @memberof Primitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
releaseGeometryInstances: {
@@ -413,12 +386,9 @@ Object.defineProperties(Primitive.prototype, {
/**
* When true
, each geometry instance will only be pickable with {@link Scene#pick}. When false
, GPU memory is saved. *
- *
* @memberof Primitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
allowPicking: {
@@ -429,12 +399,9 @@ Object.defineProperties(Primitive.prototype, {
/**
* Determines if the geometry instances will be created and batched on a web worker.
- *
* @memberof Primitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
asynchronous: {
@@ -445,12 +412,9 @@ Object.defineProperties(Primitive.prototype, {
/**
* When true
, geometry vertices are compressed, which will save memory.
- *
* @memberof Primitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
compressVertices: {
@@ -463,12 +427,9 @@ Object.defineProperties(Primitive.prototype, {
* Determines if the primitive is complete and ready to render. If this property is
* true, the primitive will be rendered the next time that {@link Primitive#update}
* is called.
- *
* @memberof Primitive.prototype
- *
* @type {boolean}
* @readonly
- *
* @example
* // Wait for a primitive to become ready before accessing attributes
* const removeListener = scene.postRender.addEventListener(() => {
@@ -2081,11 +2042,11 @@ function updateAndQueueCommands(
* Do not call this function directly. This is documented just to
* list the exceptions that may be propagated when the scene is rendered:
*
- *
- * @exception {DeveloperError} All instance geometries must have the same primitiveType.
- * @exception {DeveloperError} Appearance and material have a uniform with the same name.
- * @exception {DeveloperError} Primitive.modelMatrix is only supported in 3D mode.
- * @exception {RuntimeError} Vertex texture fetch support is required to render primitives with per-instance attributes. The maximum number of vertex texture image units must be greater than zero.
+ * @param frameState
+ * @throws {DeveloperError} All instance geometries must have the same primitiveType.
+ * @throws {DeveloperError} Appearance and material have a uniform with the same name.
+ * @throws {DeveloperError} Primitive.modelMatrix is only supported in 3D mode.
+ * @throws {RuntimeError} Vertex texture fetch support is required to render primitives with per-instance attributes. The maximum number of vertex texture image units must be greater than zero.
*/
Primitive.prototype.update = function (frameState) {
if (
@@ -2373,12 +2334,9 @@ function createPickIdProperty(primitive, properties, index) {
/**
* Returns the modifiable per-instance attributes for a {@link GeometryInstance}.
- *
* @param {*} id The id of the {@link GeometryInstance}.
* @returns {object} The typed array in the attribute's format or undefined if the is no instance with id.
- *
- * @exception {DeveloperError} must call update before calling getGeometryInstanceAttributes.
- *
+ * @throws {DeveloperError} must call update before calling getGeometryInstanceAttributes.
* @example
* const attributes = primitive.getGeometryInstanceAttributes('an id');
* attributes.color = Cesium.ColorGeometryInstanceAttribute.toValue(Cesium.Color.AQUA);
@@ -2449,9 +2407,7 @@ Primitive.prototype.getGeometryInstanceAttributes = function (id) {
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see Primitive#destroy
*/
Primitive.prototype.isDestroyed = function () {
@@ -2466,13 +2422,9 @@ Primitive.prototype.isDestroyed = function () {
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
*
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* e = e && e.destroy();
- *
* @see Primitive#isDestroyed
*/
Primitive.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/PrimitiveCollection.js b/packages/engine/Source/Scene/PrimitiveCollection.js
index c28e0ed24c2b..cab01f69725d 100644
--- a/packages/engine/Source/Scene/PrimitiveCollection.js
+++ b/packages/engine/Source/Scene/PrimitiveCollection.js
@@ -9,14 +9,11 @@ import Event from "../Core/Event.js";
* A collection of primitives. This is most often used with {@link Scene#primitives},
* but PrimitiveCollection
is also a primitive itself so collections can
* be added to collections forming a hierarchy.
- *
* @alias PrimitiveCollection
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
- * @param {boolean} [options.show=true] Determines if the primitives in the collection will be shown.
- * @param {boolean} [options.destroyPrimitives=true] Determines if primitives in the collection are destroyed when they are removed.
- *
+ * @param {boolean} [options.show] Determines if the primitives in the collection will be shown.
+ * @param {boolean} [options.destroyPrimitives] Determines if primitives in the collection are destroyed when they are removed.
* @example
* const billboards = new Cesium.BillboardCollection();
* const labels = new Cesium.LabelCollection();
@@ -40,7 +37,6 @@ function PrimitiveCollection(options) {
/**
* Determines if primitives in this collection will be shown.
- *
* @type {boolean}
* @default true
*/
@@ -50,17 +46,14 @@ function PrimitiveCollection(options) {
* Determines if primitives in the collection are destroyed when they are removed by
* {@link PrimitiveCollection#destroy} or {@link PrimitiveCollection#remove} or implicitly
* by {@link PrimitiveCollection#removeAll}.
- *
* @type {boolean}
* @default true
- *
* @example
* // Example 1. Primitives are destroyed by default.
* const primitives = new Cesium.PrimitiveCollection();
* const labels = primitives.add(new Cesium.LabelCollection());
* primitives = primitives.destroy();
* const b = labels.isDestroyed(); // true
- *
* @example
* // Example 2. Do not destroy primitives in a collection.
* const primitives = new Cesium.PrimitiveCollection();
@@ -76,9 +69,7 @@ function PrimitiveCollection(options) {
Object.defineProperties(PrimitiveCollection.prototype, {
/**
* Gets the number of primitives in the collection.
- *
* @memberof PrimitiveCollection.prototype
- *
* @type {number}
* @readonly
*/
@@ -120,13 +111,10 @@ Object.defineProperties(PrimitiveCollection.prototype, {
/**
* Adds a primitive to the collection.
- *
* @param {object} primitive The primitive to add.
* @param {number} [index] The index to add the layer at. If omitted, the primitive will be added at the bottom of all existing primitives.
* @returns {object} The primitive added to the collection.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* const billboards = scene.primitives.add(new Cesium.BillboardCollection());
*/
@@ -167,17 +155,12 @@ PrimitiveCollection.prototype.add = function (primitive, index) {
/**
* Removes a primitive from the collection.
- *
* @param {object} [primitive] The primitive to remove.
* @returns {boolean} true
if the primitive was removed; false
if the primitive is undefined
or was not found in the collection.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* const billboards = scene.primitives.add(new Cesium.BillboardCollection());
* scene.primitives.remove(billboards); // Returns true
- *
* @see PrimitiveCollection#destroyPrimitives
*/
PrimitiveCollection.prototype.remove = function (primitive) {
@@ -205,6 +188,7 @@ PrimitiveCollection.prototype.remove = function (primitive) {
/**
* Removes and destroys a primitive, regardless of destroyPrimitives setting.
+ * @param primitive
* @private
*/
PrimitiveCollection.prototype.removeAndDestroy = function (primitive) {
@@ -217,9 +201,7 @@ PrimitiveCollection.prototype.removeAndDestroy = function (primitive) {
/**
* Removes all primitives in the collection.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @see PrimitiveCollection#destroyPrimitives
*/
PrimitiveCollection.prototype.removeAll = function () {
@@ -239,12 +221,9 @@ PrimitiveCollection.prototype.removeAll = function () {
/**
* Determines if this collection contains a primitive.
- *
* @param {object} [primitive] The primitive to check for.
* @returns {boolean} true
if the primitive is in the collection; false
if the primitive is undefined
or was not found in the collection.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @see PrimitiveCollection#get
*/
PrimitiveCollection.prototype.contains = function (primitive) {
@@ -269,12 +248,9 @@ function getPrimitiveIndex(compositePrimitive, primitive) {
/**
* Raises a primitive "up one" in the collection. If all primitives in the collection are drawn
* on the globe surface, this visually moves the primitive up one.
- *
* @param {object} [primitive] The primitive to raise.
- *
- * @exception {DeveloperError} primitive is not in this collection.
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} primitive is not in this collection.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @see PrimitiveCollection#raiseToTop
* @see PrimitiveCollection#lower
* @see PrimitiveCollection#lowerToBottom
@@ -295,12 +271,9 @@ PrimitiveCollection.prototype.raise = function (primitive) {
/**
* Raises a primitive to the "top" of the collection. If all primitives in the collection are drawn
* on the globe surface, this visually moves the primitive to the top.
- *
* @param {object} [primitive] The primitive to raise the top.
- *
- * @exception {DeveloperError} primitive is not in this collection.
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} primitive is not in this collection.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @see PrimitiveCollection#raise
* @see PrimitiveCollection#lower
* @see PrimitiveCollection#lowerToBottom
@@ -321,12 +294,9 @@ PrimitiveCollection.prototype.raiseToTop = function (primitive) {
/**
* Lowers a primitive "down one" in the collection. If all primitives in the collection are drawn
* on the globe surface, this visually moves the primitive down one.
- *
* @param {object} [primitive] The primitive to lower.
- *
- * @exception {DeveloperError} primitive is not in this collection.
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} primitive is not in this collection.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @see PrimitiveCollection#lowerToBottom
* @see PrimitiveCollection#raise
* @see PrimitiveCollection#raiseToTop
@@ -347,12 +317,9 @@ PrimitiveCollection.prototype.lower = function (primitive) {
/**
* Lowers a primitive to the "bottom" of the collection. If all primitives in the collection are drawn
* on the globe surface, this visually moves the primitive to the bottom.
- *
* @param {object} [primitive] The primitive to lower to the bottom.
- *
- * @exception {DeveloperError} primitive is not in this collection.
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} primitive is not in this collection.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @see PrimitiveCollection#lower
* @see PrimitiveCollection#raise
* @see PrimitiveCollection#raiseToTop
@@ -372,13 +339,9 @@ PrimitiveCollection.prototype.lowerToBottom = function (primitive) {
/**
* Returns the primitive in the collection at the specified index.
- *
* @param {number} index The zero-based index of the primitive to return.
* @returns {object} The primitive at the index
.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* // Toggle the show property of every primitive in the collection.
* const primitives = scene.primitives;
@@ -387,7 +350,6 @@ PrimitiveCollection.prototype.lowerToBottom = function (primitive) {
* const p = primitives.get(i);
* p.show = !p.show;
* }
- *
* @see PrimitiveCollection#length
*/
PrimitiveCollection.prototype.get = function (index) {
@@ -401,6 +363,7 @@ PrimitiveCollection.prototype.get = function (index) {
};
/**
+ * @param frameState
* @private
*/
PrimitiveCollection.prototype.update = function (frameState) {
@@ -418,6 +381,7 @@ PrimitiveCollection.prototype.update = function (frameState) {
};
/**
+ * @param frameState
* @private
*/
PrimitiveCollection.prototype.prePassesUpdate = function (frameState) {
@@ -434,6 +398,8 @@ PrimitiveCollection.prototype.prePassesUpdate = function (frameState) {
};
/**
+ * @param frameState
+ * @param passState
* @private
*/
PrimitiveCollection.prototype.updateForPass = function (frameState, passState) {
@@ -450,6 +416,7 @@ PrimitiveCollection.prototype.updateForPass = function (frameState, passState) {
};
/**
+ * @param frameState
* @private
*/
PrimitiveCollection.prototype.postPassesUpdate = function (frameState) {
@@ -470,9 +437,7 @@ PrimitiveCollection.prototype.postPassesUpdate = function (frameState) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
- *
* @see PrimitiveCollection#destroy
*/
PrimitiveCollection.prototype.isDestroyed = function () {
@@ -490,13 +455,9 @@ PrimitiveCollection.prototype.isDestroyed = function () {
* Once this collection is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* primitives = primitives && primitives.destroy();
- *
* @see PrimitiveCollection#isDestroyed
*/
PrimitiveCollection.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/PrimitiveLoadPlan.js b/packages/engine/Source/Scene/PrimitiveLoadPlan.js
index 31d1f5928f5f..296c47185274 100644
--- a/packages/engine/Source/Scene/PrimitiveLoadPlan.js
+++ b/packages/engine/Source/Scene/PrimitiveLoadPlan.js
@@ -11,12 +11,9 @@ import PrimitiveOutlineGenerator from "./Model/PrimitiveOutlineGenerator.js";
/**
* Simple struct for tracking whether an attribute will be loaded as a buffer
* or typed array after post-processing.
- *
* @alias PrimitiveLoadPlan.AttributeLoadPlan
- * @constructor
- *
+ * @class
* @param {ModelComponents.Attribute} attribute The attribute to be updated
- *
* @private
*/
function AttributeLoadPlan(attribute) {
@@ -26,7 +23,6 @@ function AttributeLoadPlan(attribute) {
/**
* The attribute to track.
- *
* @type {ModelComponents.Attribute}
* @readonly
* @private
@@ -36,7 +32,6 @@ function AttributeLoadPlan(attribute) {
/**
* Whether the attribute will be loaded as a GPU buffer by the time
* {@link PrimitiveLoadPlan#postProcess} is finished.
- *
* @type {boolean}
* @private
*/
@@ -45,7 +40,6 @@ function AttributeLoadPlan(attribute) {
/**
* Whether the attribute will be loaded as a packed typed array by the time
* {@link PrimitiveLoadPlan#postProcess} is finished.
- *
* @type {boolean}
* @private
*/
@@ -55,12 +49,9 @@ function AttributeLoadPlan(attribute) {
/**
* Simple struct for tracking whether an index buffer will be loaded as a buffer
* or typed array after post-processing.
- *
* @alias PrimitiveLoadPlan.IndicesLoadPlan
- * @constructor
- *
+ * @class
* @param {ModelComponents.Indices} indices The indices to be updated
- *
* @private
*/
function IndicesLoadPlan(indices) {
@@ -70,7 +61,6 @@ function IndicesLoadPlan(indices) {
/**
* The indices to track.
- *
* @type {ModelComponents.Indices}
* @readonly
* @private
@@ -80,7 +70,6 @@ function IndicesLoadPlan(indices) {
/**
* Whether the indices will be loaded as a GPU buffer by the time
* {@link PrimitiveLoadPlan#postProcess} is finished.
- *
* @type {boolean}
* @private
*/
@@ -89,7 +78,6 @@ function IndicesLoadPlan(indices) {
/**
* Whether the indices will be loaded as a typed array copy of the GPU
* buffer by the time {@link PrimitiveLoadPlan#postProcess} is finished.
- *
* @type {boolean}
* @private
*/
@@ -101,12 +89,9 @@ function IndicesLoadPlan(indices) {
* have loaded, such as generating outlines for the CESIUM_primitive_outline glTF
* extension. This object tracks what indices and attributes need to be
* post-processed.
- *
* @alias PrimitiveLoadPlan
- * @constructor
- *
+ * @class
* @param {ModelComponents.Primitive} primitive The primitive to track
- *
* @private
*/
function PrimitiveLoadPlan(primitive) {
@@ -116,7 +101,6 @@ function PrimitiveLoadPlan(primitive) {
/**
* The primitive to track.
- *
* @type {ModelComponents.Primitive}
* @readonly
* @private
@@ -126,7 +110,6 @@ function PrimitiveLoadPlan(primitive) {
/**
* A flat list of attributes that need to be post-processed. This includes
* both regular attributes and morph target attributes.
- *
* @type {PrimitiveLoadPlan.AttributeLoadPlan[]}
* @private
*/
@@ -135,7 +118,6 @@ function PrimitiveLoadPlan(primitive) {
/**
* Information about the triangle indices that need to be post-processed,
* if they exist.
- *
* @type {PrimitiveLoadPlan.IndicesLoadPlan}
* @private
*/
@@ -144,7 +126,6 @@ function PrimitiveLoadPlan(primitive) {
/**
* Set this true to indicate that the primitive has the
* CESIUM_primitive_outline extension and needs to be post-processed
- *
* @type {boolean}
* @private
*/
@@ -152,7 +133,6 @@ function PrimitiveLoadPlan(primitive) {
/**
* The outline edge indices from the CESIUM_primitive_outline extension
- *
* @type {number[]}
* @private
*/
@@ -163,7 +143,6 @@ function PrimitiveLoadPlan(primitive) {
* Apply post-processing steps that may modify geometry such as generating
* outline coordinates. If no post-processing steps are needed, this function
* is a no-op.
- *
* @param {Context} context The context for generating buffers on the GPU
*/
PrimitiveLoadPlan.prototype.postProcess = function (context) {
diff --git a/packages/engine/Source/Scene/PrimitivePipeline.js b/packages/engine/Source/Scene/PrimitivePipeline.js
index fa1312ee8406..56e98ddf6ccf 100644
--- a/packages/engine/Source/Scene/PrimitivePipeline.js
+++ b/packages/engine/Source/Scene/PrimitivePipeline.js
@@ -311,6 +311,7 @@ function createInstancePickOffsets(instances, geometries) {
const PrimitivePipeline = {};
/**
+ * @param parameters
* @private
*/
PrimitivePipeline.combineGeometry = function (parameters) {
@@ -447,6 +448,8 @@ function countCreateGeometryResults(items) {
}
/**
+ * @param items
+ * @param transferableObjects
* @private
*/
PrimitivePipeline.packCreateGeometryResults = function (
@@ -540,6 +543,7 @@ PrimitivePipeline.packCreateGeometryResults = function (
};
/**
+ * @param createGeometryResult
* @private
*/
PrimitivePipeline.unpackCreateGeometryResults = function (
@@ -693,6 +697,8 @@ function unpackInstancesForCombine(data) {
}
/**
+ * @param parameters
+ * @param transferableObjects
* @private
*/
PrimitivePipeline.packCombineGeometryParameters = function (
@@ -724,6 +730,7 @@ PrimitivePipeline.packCombineGeometryParameters = function (
};
/**
+ * @param packedParameters
* @private
*/
PrimitivePipeline.unpackCombineGeometryParameters = function (
@@ -808,6 +815,8 @@ function unpackBoundingSpheres(buffer) {
}
/**
+ * @param results
+ * @param transferableObjects
* @private
*/
PrimitivePipeline.packCombineGeometryResults = function (
@@ -839,6 +848,7 @@ PrimitivePipeline.packCombineGeometryResults = function (
};
/**
+ * @param packedResult
* @private
*/
PrimitivePipeline.unpackCombineGeometryResults = function (packedResult) {
diff --git a/packages/engine/Source/Scene/PropertyAttribute.js b/packages/engine/Source/Scene/PropertyAttribute.js
index e3da8c952ed5..d2db79c17d2e 100644
--- a/packages/engine/Source/Scene/PropertyAttribute.js
+++ b/packages/engine/Source/Scene/PropertyAttribute.js
@@ -9,16 +9,13 @@ import PropertyAttributeProperty from "./PropertyAttributeProperty.js";
*
* See the {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_structural_metadata|EXT_structural_metadata Extension}
*
- *
* @param {object} options Object with the following properties:
* @param {string} [options.name] Optional human-readable name to describe the attribute
* @param {number} [options.id] A unique id to identify the property attribute, useful for debugging. This is the array index in the property attributes array
* @param {object} options.propertyAttribute The property attribute JSON, following the EXT_structural_metadata schema.
* @param {MetadataClass} options.class The class that properties conform to.
- *
* @alias PropertyAttribute
- * @constructor
- *
+ * @class
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -55,9 +52,7 @@ function PropertyAttribute(options) {
Object.defineProperties(PropertyAttribute.prototype, {
/**
* A human-readable name for this attribute
- *
* @memberof PropertyAttribute.prototype
- *
* @type {string}
* @readonly
* @private
@@ -69,9 +64,7 @@ Object.defineProperties(PropertyAttribute.prototype, {
},
/**
* An identifier for this attribute. Useful for debugging.
- *
* @memberof PropertyAttribute.prototype
- *
* @type {string|number}
* @readonly
* @private
@@ -83,9 +76,7 @@ Object.defineProperties(PropertyAttribute.prototype, {
},
/**
* The class that properties conform to.
- *
* @memberof PropertyAttribute.prototype
- *
* @type {MetadataClass}
* @readonly
* @private
@@ -98,9 +89,7 @@ Object.defineProperties(PropertyAttribute.prototype, {
/**
* The properties in this property attribute.
- *
* @memberof PropertyAttribute.prototype
- *
* @type {Object}
* @readonly
* @private
@@ -113,9 +102,7 @@ Object.defineProperties(PropertyAttribute.prototype, {
/**
* Extra user-defined properties.
- *
* @memberof PropertyAttribute.prototype
- *
* @type {*}
* @readonly
* @private
@@ -128,9 +115,7 @@ Object.defineProperties(PropertyAttribute.prototype, {
/**
* An object containing extensions.
- *
* @memberof PropertyAttribute.prototype
- *
* @type {object}
* @readonly
* @private
@@ -144,7 +129,6 @@ Object.defineProperties(PropertyAttribute.prototype, {
/**
* Gets the property with the given property ID.
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {PropertyAttributeProperty|undefined} The property, or undefined
if the property does not exist.
* @private
diff --git a/packages/engine/Source/Scene/PropertyAttributeProperty.js b/packages/engine/Source/Scene/PropertyAttributeProperty.js
index 607fb8611470..236d83fac4ad 100644
--- a/packages/engine/Source/Scene/PropertyAttributeProperty.js
+++ b/packages/engine/Source/Scene/PropertyAttributeProperty.js
@@ -8,14 +8,11 @@ import defined from "../Core/defined.js";
*
* See the {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_structural_metadata|EXT_structural_metadata Extension}
*
- *
* @param {object} options Object with the following properties:
* @param {object} options.property The property JSON object.
* @param {MetadataClassProperty} options.classProperty The class property.
- *
* @alias PropertyAttributeProperty
- * @constructor
- *
+ * @class
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -64,7 +61,6 @@ function PropertyAttributeProperty(options) {
Object.defineProperties(PropertyAttributeProperty.prototype, {
/**
* The attribute semantic
- *
* @memberof PropertyAttributeProperty.prototype
* @type {string}
* @readonly
@@ -79,7 +75,6 @@ Object.defineProperties(PropertyAttributeProperty.prototype, {
/**
* True if offset/scale should be applied. If both offset/scale were
* undefined, they default to identity so this property is set false
- *
* @memberof MetadataClassProperty.prototype
* @type {boolean}
* @readonly
@@ -93,7 +88,6 @@ Object.defineProperties(PropertyAttributeProperty.prototype, {
/**
* The offset to be added to property values as part of the value transform.
- *
* @memberof MetadataClassProperty.prototype
* @type {number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}
* @readonly
@@ -107,7 +101,6 @@ Object.defineProperties(PropertyAttributeProperty.prototype, {
/**
* The scale to be multiplied to property values as part of the value transform.
- *
* @memberof MetadataClassProperty.prototype
* @type {number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}
* @readonly
@@ -121,7 +114,6 @@ Object.defineProperties(PropertyAttributeProperty.prototype, {
/**
* The properties inherited from this property's class
- *
* @memberof PropertyAttributeProperty.prototype
* @type {MetadataClassProperty}
* @readonly
@@ -135,7 +127,6 @@ Object.defineProperties(PropertyAttributeProperty.prototype, {
/**
* Extra user-defined properties.
- *
* @memberof PropertyAttributeProperty.prototype
* @type {*}
* @readonly
@@ -149,7 +140,6 @@ Object.defineProperties(PropertyAttributeProperty.prototype, {
/**
* An object containing extensions.
- *
* @memberof PropertyAttributeProperty.prototype
* @type {*}
* @readonly
diff --git a/packages/engine/Source/Scene/PropertyTable.js b/packages/engine/Source/Scene/PropertyTable.js
index 19860c82de18..7430dd0048f9 100644
--- a/packages/engine/Source/Scene/PropertyTable.js
+++ b/packages/engine/Source/Scene/PropertyTable.js
@@ -12,15 +12,14 @@ import JsonMetadataTable from "./JsonMetadataTable.js";
* For batch tables, properties are resolved in the following order:
*
*
- * binary properties from options.metadataTable
- * JSON properties from options.jsonMetadataTable
- * batch table hierarchy properties from options.batchTableHierarchy
+ * binary properties from options.metadataTable
+ * JSON properties from options.jsonMetadataTable
+ * batch table hierarchy properties from options.batchTableHierarchy
*
*
* See the {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_structural_metadata|EXT_structural_metadata Extension} as well as the
* previous {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata|EXT_feature_metadata Extension} for glTF.
*
- *
* @param {object} options Object with the following properties:
* @param {string} [options.name] Human-readable name to describe the table
* @param {string|number} [options.id] A unique id to identify the property table, useful for debugging. For EXT_structural_metadata
, this is the array index in the property tables array, for EXT_feature_metadata
this is the dictionary key in the property tables dictionary.
@@ -30,10 +29,8 @@ import JsonMetadataTable from "./JsonMetadataTable.js";
* @param {BatchTableHierarchy} [options.batchTableHierarchy] For compatibility with the 3DTILES_batch_table_hierarchy
extension, a hierarchy can be provided.
* @param {object} [options.extras] Extra user-defined properties
* @param {object} [options.extensions] An object containing extensions
- *
* @alias PropertyTable
- * @constructor
- *
+ * @class
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -57,7 +54,6 @@ function PropertyTable(options) {
Object.defineProperties(PropertyTable.prototype, {
/**
* A human-readable name for this table
- *
* @memberof PropertyTable.prototype
* @type {string}
* @readonly
@@ -70,7 +66,6 @@ Object.defineProperties(PropertyTable.prototype, {
},
/**
* An identifier for this table. Useful for debugging.
- *
* @memberof PropertyTable.prototype
* @type {string|number}
* @readonly
@@ -83,7 +78,6 @@ Object.defineProperties(PropertyTable.prototype, {
},
/**
* The number of features in the table.
- *
* @memberof PropertyTable.prototype
* @type {number}
* @readonly
@@ -97,7 +91,6 @@ Object.defineProperties(PropertyTable.prototype, {
/**
* The class that properties conform to.
- *
* @memberof PropertyTable.prototype
* @type {MetadataClass}
* @readonly
@@ -114,7 +107,6 @@ Object.defineProperties(PropertyTable.prototype, {
/**
* Extra user-defined properties.
- *
* @memberof PropertyTable.prototype
* @type {*}
* @readonly
@@ -128,7 +120,6 @@ Object.defineProperties(PropertyTable.prototype, {
/**
* An object containing extensions.
- *
* @memberof PropertyTable.prototype
* @type {object}
* @readonly
@@ -143,7 +134,6 @@ Object.defineProperties(PropertyTable.prototype, {
/**
* Get the total amount of binary metadata stored in memory. This does
* not include JSON metadata
- *
* @memberof PropertyTable.prototype
* @type {number}
* @readonly
@@ -167,7 +157,6 @@ Object.defineProperties(PropertyTable.prototype, {
/**
* Returns whether the feature has this property. For compatibility with the 3DTILES_batch_table_hierarchy
extension, this is computed for a specific feature.
- *
* @param {number} index The index of the feature.
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {boolean} Whether the feature has this property.
@@ -205,7 +194,7 @@ PropertyTable.prototype.hasProperty = function (index, propertyId) {
/**
* Returns whether the feature has a property with the given semantic.
- *
+ * @param index
* @param {string} semantic The case-sensitive semantic of the property.
* @returns {boolean} Whether the feature has a property with the given semantic.
* @private
@@ -227,7 +216,6 @@ PropertyTable.prototype.hasPropertyBySemantic = function (index, semantic) {
* Returns whether any feature has this property.
* This is mainly useful for checking whether a property exists in the class
* hierarchy when using the 3DTILES_batch_table_hierarchy
extension.
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {boolean} Whether any feature has this property.
* @private
@@ -263,7 +251,6 @@ PropertyTable.prototype.propertyExists = function (propertyId) {
/**
* Returns whether any feature has a property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @returns {boolean} Whether any feature has a property with the given semantic.
* @private
@@ -284,7 +271,6 @@ const scratchResults = [];
/**
* Returns an array of property IDs. For compatibility with the 3DTILES_batch_table_hierarchy
extension, this is computed for a specific feature.
- *
* @param {number} index The index of the feature.
* @param {string[]} [results] An array into which to store the results.
* @returns {string[]} The property IDs.
@@ -324,7 +310,6 @@ PropertyTable.prototype.getPropertyIds = function (index, results) {
*
* If the property is normalized the normalized value is returned.
*
- *
* @param {number} index The index of the feature.
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {*} The value of the property or undefined
if the feature does not have this property.
@@ -363,7 +348,6 @@ PropertyTable.prototype.getProperty = function (index, propertyId) {
*
* If the property is normalized a normalized value must be provided to this function.
*
- *
* @param {number} index The index of the feature.
* @param {string} propertyId The case-sensitive ID of the property.
* @param {*} value The value of the property that will be copied.
@@ -403,7 +387,6 @@ PropertyTable.prototype.setProperty = function (index, propertyId, value) {
* {@link JsonMetadataTable} and {@link BatchTableHierarchy} do not have
* semantics.
*
- *
* @param {number} index The index of the feature.
* @param {string} semantic The case-sensitive semantic of the property.
* @returns {*} The value of the property or undefined
if the feature does not have this semantic.
@@ -424,7 +407,6 @@ PropertyTable.prototype.getPropertyBySemantic = function (index, semantic) {
* {@link JsonMetadataTable} and {@link BatchTableHierarchy} do not have
* semantics.
*
- *
* @param {number} index The index of the feature.
* @param {string} semantic The case-sensitive semantic of the property.
* @param {*} value The value of the property that will be copied.
@@ -450,10 +432,8 @@ PropertyTable.prototype.setPropertyBySemantic = function (
* {@link JsonMetadataTable} and {@link BatchTableHierarchy} do not store
* values in typed arrays.
*
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {*} The typed array containing the property values or undefined
if the property values are not stored in a typed array.
- *
* @private
*/
PropertyTable.prototype.getPropertyTypedArray = function (propertyId) {
@@ -475,10 +455,8 @@ PropertyTable.prototype.getPropertyTypedArray = function (propertyId) {
* {@link JsonMetadataTable} and {@link BatchTableHierarchy} do not have
* semantics.
*
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @returns {*} The typed array containing the property values or undefined
if the property values are not stored in a typed array.
- *
* @private
*/
PropertyTable.prototype.getPropertyTypedArrayBySemantic = function (semantic) {
diff --git a/packages/engine/Source/Scene/PropertyTexture.js b/packages/engine/Source/Scene/PropertyTexture.js
index 4937827330ac..6fdb9e55f5f8 100644
--- a/packages/engine/Source/Scene/PropertyTexture.js
+++ b/packages/engine/Source/Scene/PropertyTexture.js
@@ -9,17 +9,14 @@ import PropertyTextureProperty from "./PropertyTextureProperty.js";
* See the {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_structural_metadata|EXT_structural_metadata Extension} as well as the
* previous {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata|EXT_feature_metadata Extension} for glTF.
*
- *
* @param {object} options Object with the following properties:
* @param {string} [options.name] Optional human-readable name to describe the texture
* @param {string|number} [options.id] A unique id to identify the property texture, useful for debugging. For EXT_structural_metadata
, this is the array index in the property textures array, for EXT_feature_metadata
this is the dictionary key in the property textures dictionary.
* @param {object} options.propertyTexture The property texture JSON, following the EXT_structural_metadata schema.
* @param {MetadataClass} options.class The class that properties conform to.
* @param {Object} options.textures An object mapping texture IDs to {@link Texture} objects.
- *
* @alias PropertyTexture
- * @constructor
- *
+ * @class
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -62,7 +59,6 @@ function PropertyTexture(options) {
Object.defineProperties(PropertyTexture.prototype, {
/**
* A human-readable name for this texture
- *
* @memberof PropertyTexture.prototype
* @type {string}
* @readonly
@@ -75,7 +71,6 @@ Object.defineProperties(PropertyTexture.prototype, {
},
/**
* An identifier for this texture. Useful for debugging.
- *
* @memberof PropertyTexture.prototype
* @type {string|number}
* @readonly
@@ -88,7 +83,6 @@ Object.defineProperties(PropertyTexture.prototype, {
},
/**
* The class that properties conform to.
- *
* @memberof PropertyTexture.prototype
* @type {MetadataClass}
* @readonly
@@ -102,9 +96,7 @@ Object.defineProperties(PropertyTexture.prototype, {
/**
* The properties in this property texture.
- *
* @memberof PropertyTexture.prototype
- *
* @type {PropertyTextureProperty}
* @readonly
* @private
@@ -117,7 +109,6 @@ Object.defineProperties(PropertyTexture.prototype, {
/**
* Extra user-defined properties.
- *
* @memberof PropertyTexture.prototype
* @type {*}
* @readonly
@@ -131,7 +122,6 @@ Object.defineProperties(PropertyTexture.prototype, {
/**
* An object containing extensions.
- *
* @memberof PropertyTexture.prototype
* @type {object}
* @readonly
@@ -146,7 +136,6 @@ Object.defineProperties(PropertyTexture.prototype, {
/**
* Gets the property with the given property ID.
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {PropertyTextureProperty|undefined} The property, or undefined
if the property does not exist.
* @private
diff --git a/packages/engine/Source/Scene/PropertyTextureProperty.js b/packages/engine/Source/Scene/PropertyTextureProperty.js
index 9c1ed66239b9..6e6cd54f26f4 100644
--- a/packages/engine/Source/Scene/PropertyTextureProperty.js
+++ b/packages/engine/Source/Scene/PropertyTextureProperty.js
@@ -12,15 +12,12 @@ import MetadataComponentType from "./MetadataComponentType.js";
* See the {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_structural_metadata|EXT_structural_metadata Extension} as well as the
* previous {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata|EXT_feature_metadata Extension} for glTF.
*
- *
* @param {object} options Object with the following properties:
* @param {object} options.property The property JSON object.
* @param {MetadataClassProperty} options.classProperty The class property.
* @param {Object} options.textures An object mapping texture IDs to {@link Texture} objects.
- *
* @alias PropertyTextureProperty
- * @constructor
- *
+ * @class
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -80,7 +77,6 @@ function PropertyTextureProperty(options) {
Object.defineProperties(PropertyTextureProperty.prototype, {
/**
* The texture reader.
- *
* @memberof PropertyTextureProperty.prototype
* @type {ModelComponents.TextureReader}
* @readonly
@@ -95,7 +91,6 @@ Object.defineProperties(PropertyTextureProperty.prototype, {
/**
* True if offset/scale should be applied. If both offset/scale were
* undefined, they default to identity so this property is set false
- *
* @memberof PropertyTextureProperty.prototype
* @type {boolean}
* @readonly
@@ -109,7 +104,6 @@ Object.defineProperties(PropertyTextureProperty.prototype, {
/**
* The offset to be added to property values as part of the value transform.
- *
* @memberof PropertyTextureProperty.prototype
* @type {number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}
* @readonly
@@ -123,7 +117,6 @@ Object.defineProperties(PropertyTextureProperty.prototype, {
/**
* The scale to be multiplied to property values as part of the value transform.
- *
* @memberof PropertyTextureProperty.prototype
* @type {number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}
* @readonly
@@ -137,7 +130,6 @@ Object.defineProperties(PropertyTextureProperty.prototype, {
/**
* The properties inherited from this property's class
- *
* @memberof PropertyTextureProperty.prototype
* @type {MetadataClassProperty}
* @readonly
@@ -151,7 +143,6 @@ Object.defineProperties(PropertyTextureProperty.prototype, {
/**
* Extra user-defined properties.
- *
* @memberof PropertyTextureProperty.prototype
* @type {*}
* @readonly
@@ -165,7 +156,6 @@ Object.defineProperties(PropertyTextureProperty.prototype, {
/**
* An object containing extensions.
- *
* @memberof PropertyTextureProperty.prototype
* @type {*}
* @readonly
@@ -247,9 +237,8 @@ PropertyTextureProperty.prototype.unpackInShader = function (packedValueGlsl) {
/**
* Reformat from an array of channel indices like [0, 1]
to a
* string of channels as would be used in GLSL swizzling (e.g. "rg")
- *
* @param {number[]} channels the channel indices
- * @return {string} The channels as a string of "r", "g", "b" or "a" characters.
+ * @returns {string} The channels as a string of "r", "g", "b" or "a" characters.
* @private
*/
function reformatChannels(channels) {
diff --git a/packages/engine/Source/Scene/QuadtreeOccluders.js b/packages/engine/Source/Scene/QuadtreeOccluders.js
index 42fc2b95d970..4c0f07320e7d 100644
--- a/packages/engine/Source/Scene/QuadtreeOccluders.js
+++ b/packages/engine/Source/Scene/QuadtreeOccluders.js
@@ -3,12 +3,11 @@ import EllipsoidalOccluder from "../Core/EllipsoidalOccluder.js";
/**
* A set of occluders that can be used to test quadtree tiles for occlusion.
- *
* @alias QuadtreeOccluders
- * @constructor
+ * @param options
+ * @class
* @private
- *
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid that potentially occludes tiles.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid that potentially occludes tiles.
*/
function QuadtreeOccluders(options) {
this._ellipsoid = new EllipsoidalOccluder(options.ellipsoid, Cartesian3.ZERO);
diff --git a/packages/engine/Source/Scene/QuadtreePrimitive.js b/packages/engine/Source/Scene/QuadtreePrimitive.js
index 66ed2109ca30..30d71a55bab5 100644
--- a/packages/engine/Source/Scene/QuadtreePrimitive.js
+++ b/packages/engine/Source/Scene/QuadtreePrimitive.js
@@ -25,17 +25,16 @@ import TileSelectionResult from "./TileSelectionResult.js";
* The set of tiles to render is selected by projecting an estimate of the geometric error in a tile onto
* the screen to estimate screen-space error, in pixels, which must be below a user-specified threshold.
* The actual content of the tiles is arbitrary and is specified using a {@link QuadtreeTileProvider}.
- *
* @alias QuadtreePrimitive
- * @constructor
+ * @class
* @private
- *
* @param {QuadtreeTileProvider} options.tileProvider The tile provider that loads, renders, and estimates
* the distance to individual tiles.
- * @param {number} [options.maximumScreenSpaceError=2] The maximum screen-space error, in pixels, that is allowed.
+ * @param {number} [options.maximumScreenSpaceError] The maximum screen-space error, in pixels, that is allowed.
* A higher maximum error will render fewer tiles and improve performance, while a lower
* value will improve visual quality.
- * @param {number} [options.tileCacheSize=100] The maximum number of tiles that will be retained in the tile cache.
+ * @param options
+ * @param {number} [options.tileCacheSize] The maximum number of tiles that will be retained in the tile cache.
* Note that tiles will never be unloaded if they were used for rendering the last
* frame, so the actual number of resident tiles may be higher. The value of
* this property will not affect visual quality.
@@ -179,7 +178,6 @@ Object.defineProperties(QuadtreePrimitive.prototype, {
/**
* Gets an event that's raised when the length of the tile load queue has changed since the last render frame. When the load queue is empty,
* all terrain and imagery for the current view have been loaded. The event passes the new length of the tile load queue.
- *
* @memberof QuadtreePrimitive.prototype
* @type {Event}
*/
@@ -199,7 +197,6 @@ Object.defineProperties(QuadtreePrimitive.prototype, {
/**
* Invalidates and frees all the tiles in the quadtree. The tiles must be reloaded
* before they can be displayed.
- *
* @memberof QuadtreePrimitive
*/
QuadtreePrimitive.prototype.invalidateAllTiles = function () {
@@ -241,7 +238,6 @@ function invalidateAllTiles(primitive) {
/**
* Invokes a specified function for each {@link QuadtreeTile} that is partially
* or completely loaded.
- *
* @param {Function} tileFunction The function to invoke for each loaded tile. The
* function is passed a reference to the tile as its only parameter.
*/
@@ -258,7 +254,6 @@ QuadtreePrimitive.prototype.forEachLoadedTile = function (tileFunction) {
/**
* Invokes a specified function for each {@link QuadtreeTile} that was rendered
* in the most recent frame.
- *
* @param {Function} tileFunction The function to invoke for each rendered tile. The
* function is passed a reference to the tile as its only parameter.
*/
@@ -272,7 +267,6 @@ QuadtreePrimitive.prototype.forEachRenderedTile = function (tileFunction) {
/**
* Calls the callback when a new tile is rendered that contains the given cartographic. The only parameter
* is the cartesian position on the tile.
- *
* @param {Cartographic} cartographic The cartographic position.
* @param {Function} callback The function to be called when a new tile is loaded containing the updated cartographic.
* @returns {Function} The function to remove this callback from the quadtree.
@@ -307,6 +301,7 @@ QuadtreePrimitive.prototype.updateHeight = function (cartographic, callback) {
/**
* Updates the tile provider imagery and continues to process the tile load queue.
+ * @param frameState
* @private
*/
QuadtreePrimitive.prototype.update = function (frameState) {
@@ -331,6 +326,7 @@ function clearTileLoadQueue(primitive) {
/**
* Initializes values for a new render frame and prepare the tile load queue.
+ * @param frameState
* @private
*/
QuadtreePrimitive.prototype.beginFrame = function (frameState) {
@@ -358,6 +354,7 @@ QuadtreePrimitive.prototype.beginFrame = function (frameState) {
/**
* Selects new tiles to load based on the frame state and creates render commands.
+ * @param frameState
* @private
*/
QuadtreePrimitive.prototype.render = function (frameState) {
@@ -381,6 +378,8 @@ QuadtreePrimitive.prototype.render = function (frameState) {
/**
* Checks if the load queue length has changed since the last time we raised a queue change event - if so, raises
* a new change event at the end of the render cycle.
+ * @param primitive
+ * @param frameState
* @private
*/
function updateTileLoadProgress(primitive, frameState) {
@@ -435,6 +434,7 @@ function updateTileLoadProgress(primitive, frameState) {
/**
* Updates terrain heights.
+ * @param frameState
* @private
*/
QuadtreePrimitive.prototype.endFrame = function (frameState) {
@@ -456,11 +456,8 @@ QuadtreePrimitive.prototype.endFrame = function (frameState) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @memberof QuadtreePrimitive
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
- *
* @see QuadtreePrimitive#destroy
*/
QuadtreePrimitive.prototype.isDestroyed = function () {
@@ -474,15 +471,10 @@ QuadtreePrimitive.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
* @memberof QuadtreePrimitive
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* primitive = primitive && primitive.destroy();
- *
* @see QuadtreePrimitive#isDestroyed
*/
QuadtreePrimitive.prototype.destroy = function () {
@@ -620,7 +612,7 @@ function queueTileLoad(primitive, queue, tile, frameState) {
/**
* Tracks details of traversing a tile while selecting tiles for rendering.
* @alias TraversalDetails
- * @constructor
+ * @class
* @private
*/
function TraversalDetails() {
@@ -695,16 +687,15 @@ for (let i = 0; i < traversalQuadsByLevel.length; ++i) {
/**
* Visits a tile for possible rendering. When we call this function with a tile:
*
- * * the tile has been determined to be visible (possibly based on a bounding volume that is not very tight-fitting)
- * * its parent tile does _not_ meet the SSE (unless ancestorMeetsSse=true, see comments below)
- * * the tile may or may not be renderable
- *
+ * the tile has been determined to be visible (possibly based on a bounding volume that is not very tight-fitting)
+ * its parent tile does _not_ meet the SSE (unless ancestorMeetsSse=true, see comments below)
+ * the tile may or may not be renderable
* @private
- *
* @param {Primitive} primitive The QuadtreePrimitive.
* @param {FrameState} frameState The frame state.
* @param {QuadtreeTile} tile The tile to visit
* @param {boolean} ancestorMeetsSse True if a tile higher in the tile tree already met the SSE and we're refining further only
+ * @param traversalDetails
* to maintain detail while that higher tile loads.
* @param {TraversalDetails} traveralDetails On return, populated with details of how the traversal of this tile went.
*/
diff --git a/packages/engine/Source/Scene/QuadtreeTile.js b/packages/engine/Source/Scene/QuadtreeTile.js
index 601458acbbf7..95643653c537 100644
--- a/packages/engine/Source/Scene/QuadtreeTile.js
+++ b/packages/engine/Source/Scene/QuadtreeTile.js
@@ -6,12 +6,11 @@ import TileSelectionResult from "./TileSelectionResult.js";
/**
* A single tile in a {@link QuadtreePrimitive}.
- *
* @alias QuadtreeTile
- * @constructor
+ * @class
* @private
- *
* @param {number} options.level The level of the tile in the quadtree.
+ * @param options
* @param {number} options.x The X coordinate of the tile in the quadtree. 0 is the westernmost tile.
* @param {number} options.y The Y coordinate of the tile in the quadtree. 0 is the northernmost tile.
* @param {TilingScheme} options.tilingScheme The tiling scheme in which this tile exists.
@@ -109,9 +108,7 @@ function QuadtreeTile(options) {
/**
* Creates a rectangular set of tiles for level of detail zero, the coarsest, least detailed level.
- *
* @memberof QuadtreeTile
- *
* @param {TilingScheme} tilingScheme The tiling scheme for which the tiles are to be created.
* @returns {QuadtreeTile[]} An array containing the tiles at level of detail zero, starting with the
* tile in the northwest corner and followed by the tile (if any) to its east.
@@ -509,7 +506,6 @@ QuadtreeTile.prototype.findTileToNorth = function (levelZeroTiles) {
* Frees the resources associated with this tile and returns it to the START
* {@link QuadtreeTileLoadState}. If the {@link QuadtreeTile#data} property is defined and it
* has a freeResources
method, the method will be invoked.
- *
* @memberof QuadtreeTile
*/
QuadtreeTile.prototype.freeResources = function () {
diff --git a/packages/engine/Source/Scene/QuadtreeTileProvider.js b/packages/engine/Source/Scene/QuadtreeTileProvider.js
index 75cce94869f8..1993cf60776d 100644
--- a/packages/engine/Source/Scene/QuadtreeTileProvider.js
+++ b/packages/engine/Source/Scene/QuadtreeTileProvider.js
@@ -4,9 +4,8 @@ import DeveloperError from "../Core/DeveloperError.js";
* Provides general quadtree tiles to be displayed on or near the surface of an ellipsoid. It is intended to be
* used with the {@link QuadtreePrimitive}. This type describes an interface and is not intended to be
* instantiated directly.
- *
* @alias QuadtreeTileProvider
- * @constructor
+ * @class
* @private
*/
function QuadtreeTileProvider() {
@@ -15,9 +14,7 @@ function QuadtreeTileProvider() {
/**
* Computes the default geometric error for level zero of the quadtree.
- *
* @memberof QuadtreeTileProvider
- *
* @param {TilingScheme} tilingScheme The tiling scheme for which to compute the geometric error.
* @returns {number} The maximum geometric error at level zero, in meters.
*/
@@ -67,7 +64,6 @@ Object.defineProperties(QuadtreeTileProvider.prototype, {
* Called at the beginning of the update cycle, regardless of id a new frame is being rendered, before {@link QuadtreeTileProvider#beginUpdate}
* @memberof QuadtreeTileProvider
* @function
- *
* @param {Context} context The rendering context.
* @param {FrameState} frameState The frame state.
*/
@@ -78,7 +74,6 @@ QuadtreeTileProvider.prototype.update = DeveloperError.throwInstantiationError;
* or any other functions.
* @memberof QuadtreeTileProvider
* @function
- *
* @param {Context} context The rendering context.
* @param {FrameState} frameState The frame state.
* @param {DrawCommand[]} commandList An array of rendering commands. This method may push
@@ -92,7 +87,6 @@ QuadtreeTileProvider.prototype.beginUpdate =
* and any other functions.
* @memberof QuadtreeTileProvider
* @function
- *
* @param {Context} context The rendering context.
* @param {FrameState} frameState The frame state.
* @param {DrawCommand[]} commandList An array of rendering commands. This method may push
@@ -103,12 +97,9 @@ QuadtreeTileProvider.prototype.endUpdate =
/**
* Gets the maximum geometric error allowed in a tile at a given level, in meters.
- *
* @see QuadtreeTileProvider#computeDefaultLevelZeroMaximumGeometricError
- *
* @memberof QuadtreeTileProvider
* @function
- *
* @param {number} level The tile level for which to get the maximum geometric error.
* @returns {number} The maximum geometric error in meters.
*/
@@ -118,10 +109,8 @@ QuadtreeTileProvider.prototype.getLevelMaximumGeometricError =
/**
* Loads, or continues loading, a given tile. This function will continue to be called
* until {@link QuadtreeTile#state} is no longer {@link QuadtreeTileLoadState#LOADING}.
- *
* @memberof QuadtreeTileProvider
* @function
- *
* @param {Context} context The rendering context.
* @param {FrameState} frameState The frame state.
* @param {QuadtreeTile} tile The tile to load.
@@ -133,13 +122,10 @@ QuadtreeTileProvider.prototype.loadTile =
* Determines the visibility of a given tile. The tile may be fully visible, partially visible, or not
* visible at all. Tiles that are renderable and are at least partially visible will be shown by a call
* to {@link QuadtreeTileProvider#showTileThisFrame}.
- *
* @memberof QuadtreeTileProvider
- *
* @param {QuadtreeTile} tile The tile instance.
* @param {FrameState} frameState The state information about the current frame.
* @param {QuadtreeOccluders} occluders The objects that may occlude this tile.
- *
* @returns {Visibility} The visibility of the tile.
*/
QuadtreeTileProvider.prototype.computeTileVisibility =
@@ -149,10 +135,8 @@ QuadtreeTileProvider.prototype.computeTileVisibility =
* Shows a specified tile in this frame. The provider can cause the tile to be shown by adding
* render commands to the commandList, or use any other method as appropriate. The tile is not
* expected to be visible next frame as well, unless this method is call next frame, too.
- *
* @memberof QuadtreeTileProvider
* @function
- *
* @param {QuadtreeTile} tile The tile instance.
* @param {Context} context The rendering context.
* @param {FrameState} frameState The state information of the current rendering frame.
@@ -163,13 +147,10 @@ QuadtreeTileProvider.prototype.showTileThisFrame =
/**
* Gets the distance from the camera to the closest point on the tile. This is used for level-of-detail selection.
- *
* @memberof QuadtreeTileProvider
* @function
- *
* @param {QuadtreeTile} tile The tile instance.
* @param {FrameState} frameState The state information of the current rendering frame.
- *
* @returns {number} The distance from the camera to the closest point on the tile, in meters.
*/
QuadtreeTileProvider.prototype.computeDistanceToTile =
@@ -180,11 +161,8 @@ QuadtreeTileProvider.prototype.computeDistanceToTile =
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @memberof QuadtreeTileProvider
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
- *
* @see QuadtreeTileProvider#destroy
*/
QuadtreeTileProvider.prototype.isDestroyed =
@@ -197,15 +175,10 @@ QuadtreeTileProvider.prototype.isDestroyed =
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
* @memberof QuadtreeTileProvider
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* provider = provider && provider();
- *
* @see QuadtreeTileProvider#isDestroyed
*/
QuadtreeTileProvider.prototype.destroy = DeveloperError.throwInstantiationError;
diff --git a/packages/engine/Source/Scene/ResourceCache.js b/packages/engine/Source/Scene/ResourceCache.js
index e29571cfb994..b81ddea9a952 100644
--- a/packages/engine/Source/Scene/ResourceCache.js
+++ b/packages/engine/Source/Scene/ResourceCache.js
@@ -16,9 +16,7 @@ import ResourceCacheStatistics from "./ResourceCacheStatistics.js";
/**
* Cache for resources shared across 3D Tiles and glTF.
- *
* @namespace ResourceCache
- *
* @private
*/
function ResourceCache() {}
@@ -30,12 +28,9 @@ ResourceCache.statistics = new ResourceCacheStatistics();
/**
* A reference-counted cache entry.
- *
* @param {ResourceLoader} resourceLoader The resource.
- *
* @alias CacheEntry
- * @constructor
- *
+ * @class
* @private
*/
function CacheEntry(resourceLoader) {
@@ -49,9 +44,7 @@ function CacheEntry(resourceLoader) {
/**
* Gets a resource from the cache. If the resource exists its reference count is
* incremented. Otherwise, if no resource loader exists, undefined is returned.
- *
* @param {string} cacheKey The cache key of the resource.
- *
* @returns {ResourceLoader|undefined} The resource.
* @private
*/
@@ -70,11 +63,9 @@ ResourceCache.get = function (cacheKey) {
/**
* Adds it to the cache.
- *
* @param {ResourceLoader} resourceLoader The resource.
* @returns {ResourceLoader} The resource.
- *
- * @exception {DeveloperError} Resource with this cacheKey is already in the cache
+ * @throws {DeveloperError} Resource with this cacheKey is already in the cache
* @private
*/
ResourceCache.add = function (resourceLoader) {
@@ -102,11 +93,9 @@ ResourceCache.add = function (resourceLoader) {
/**
* Unloads a resource from the cache. When the reference count hits zero the
* resource is destroyed.
- *
* @param {ResourceLoader} resourceLoader The resource.
- *
- * @exception {DeveloperError} Resource is not in the cache.
- * @exception {DeveloperError} Cannot unload resource that has no references.
+ * @throws {DeveloperError} Resource is not in the cache.
+ * @throws {DeveloperError} Cannot unload resource that has no references.
* @private
*/
ResourceCache.unload = function (resourceLoader) {
@@ -134,14 +123,11 @@ ResourceCache.unload = function (resourceLoader) {
/**
* Gets an existing schema loader from the cache, or creates a new loader if one does not already exist.
- *
* @param {object} options Object with the following properties:
* @param {object} [options.schema] An object that explicitly defines a schema JSON. Mutually exclusive with options.resource.
* @param {Resource} [options.resource] The {@link Resource} pointing to the schema JSON. Mutually exclusive with options.schema.
- *
* @returns {MetadataSchemaLoader} The cached schema resource.
- *
- * @exception {DeveloperError} One of options.schema and options.resource must be defined.
+ * @throws {DeveloperError} One of options.schema and options.resource must be defined.
* @private
*/
ResourceCache.getSchemaLoader = function (options) {
@@ -177,12 +163,10 @@ ResourceCache.getSchemaLoader = function (options) {
/**
* Gets an existing embedded buffer loader from the cache, or creates a new loader if one does not already exist.
- *
* @param {object} options Object with the following properties:
* @param {Resource} options.parentResource The {@link Resource} containing the embedded buffer.
* @param {number} options.bufferId A unique identifier of the embedded buffer within the parent resource.
* @param {Uint8Array} [options.typedArray] The typed array containing the embedded buffer contents.
- *
* @returns {BufferLoader} The cached buffer loader.
* @private
*/
@@ -219,10 +203,8 @@ ResourceCache.getEmbeddedBufferLoader = function (options) {
/**
* Gets an existing external buffer from loader the cache, or creates a new loader if one does not already exist.
- *
* @param {object} options Object with the following properties:
* @param {Resource} options.resource The {@link Resource} pointing to the external buffer.
- *
* @returns {BufferLoader} The cached buffer loader.
* @private
*/
@@ -253,13 +235,11 @@ ResourceCache.getExternalBufferLoader = function (options) {
/**
* Gets an existing glTF JSON loader from the cache, or creates a new loader if one does not already exist.
- *
* @param {object} options Object with the following properties:
* @param {Resource} options.gltfResource The {@link Resource} containing the glTF.
* @param {Resource} options.baseResource The {@link Resource} that paths in the glTF JSON are relative to.
* @param {Uint8Array} [options.typedArray] The typed array containing the glTF contents.
* @param {object} [options.gltfJson] The parsed glTF JSON contents.
- *
* @returns {GltfJsonLoader} The cached glTF JSON loader.
* @private
*/
@@ -295,13 +275,11 @@ ResourceCache.getGltfJsonLoader = function (options) {
/**
* Gets an existing glTF buffer view from the cache, or creates a new loader if one does not already exist.
- *
* @param {object} options Object with the following properties:
* @param {object} options.gltf The glTF JSON.
* @param {number} options.bufferViewId The bufferView ID.
* @param {Resource} options.gltfResource The {@link Resource} containing the glTF.
* @param {Resource} options.baseResource The {@link Resource} that paths in the glTF JSON are relative to.
- *
* @returns {GltfBufferViewLoader} The cached buffer view loader.
* @private
*/
@@ -342,13 +320,11 @@ ResourceCache.getBufferViewLoader = function (options) {
/**
* Gets an existing Draco data from the cache, or creates a new loader if one does not already exist.
- *
* @param {object} options Object with the following properties:
* @param {object} options.gltf The glTF JSON.
* @param {object} options.draco The Draco extension object.
* @param {Resource} options.gltfResource The {@link Resource} containing the glTF.
* @param {Resource} options.baseResource The {@link Resource} that paths in the glTF JSON are relative to.
- *
* @returns {GltfDracoLoader} The cached Draco loader.
* @private
*/
@@ -389,7 +365,6 @@ ResourceCache.getDracoLoader = function (options) {
/**
* Gets an existing glTF vertex buffer from the cache, or creates a new loader if one does not already exist.
- *
* @param {object} options Object with the following properties:
* @param {object} options.gltf The glTF JSON.
* @param {Resource} options.gltfResource The {@link Resource} containing the glTF.
@@ -399,14 +374,13 @@ ResourceCache.getDracoLoader = function (options) {
* @param {object} [options.draco] The Draco extension object.
* @param {string} [options.attributeSemantic] The attribute semantic, e.g. POSITION or NORMAL.
* @param {number} [options.accessorId] The accessor ID.
- * @param {boolean} [options.asynchronous=true] Determines if WebGL resource creation will be spread out over several frames or block until all WebGL resources are created.
- * @param {boolean} [options.dequantize=false] Determines whether or not the vertex buffer will be dequantized on the CPU.
- * @param {boolean} [options.loadBuffer=false] Load vertex buffer as a GPU vertex buffer.
- * @param {boolean} [options.loadTypedArray=false] Load vertex buffer as a typed array.
- * @exception {DeveloperError} One of options.bufferViewId and options.draco must be defined.
- * @exception {DeveloperError} When options.draco is defined options.attributeSemantic must also be defined.
- * @exception {DeveloperError} When options.draco is defined options.accessorId must also be defined.
- *
+ * @param {boolean} [options.asynchronous] Determines if WebGL resource creation will be spread out over several frames or block until all WebGL resources are created.
+ * @param {boolean} [options.dequantize] Determines whether or not the vertex buffer will be dequantized on the CPU.
+ * @param {boolean} [options.loadBuffer] Load vertex buffer as a GPU vertex buffer.
+ * @param {boolean} [options.loadTypedArray] Load vertex buffer as a typed array.
+ * @throws {DeveloperError} One of options.bufferViewId and options.draco must be defined.
+ * @throws {DeveloperError} When options.draco is defined options.attributeSemantic must also be defined.
+ * @throws {DeveloperError} When options.draco is defined options.accessorId must also be defined.
* @returns {GltfVertexBufferLoader} The cached vertex buffer loader.
* @private
*/
@@ -515,7 +489,6 @@ function hasDracoCompression(draco, semantic) {
/**
* Gets an existing glTF index buffer from the cache, or creates a new loader if one does not already exist.
- *
* @param {object} options Object with the following properties:
* @param {object} options.gltf The glTF JSON.
* @param {number} options.accessorId The accessor ID corresponding to the index buffer.
@@ -523,9 +496,9 @@ function hasDracoCompression(draco, semantic) {
* @param {Resource} options.baseResource The {@link Resource} that paths in the glTF JSON are relative to.
* @param {FrameState} options.frameState The frame state.
* @param {object} [options.draco] The Draco extension object.
- * @param {boolean} [options.asynchronous=true] Determines if WebGL resource creation will be spread out over several frames or block until all WebGL resources are created.
- * @param {boolean} [options.loadBuffer=false] Load index buffer as a GPU index buffer.
- * @param {boolean} [options.loadTypedArray=false] Load index buffer as a typed array.
+ * @param {boolean} [options.asynchronous] Determines if WebGL resource creation will be spread out over several frames or block until all WebGL resources are created.
+ * @param {boolean} [options.loadBuffer] Load index buffer as a GPU index buffer.
+ * @param {boolean} [options.loadTypedArray] Load index buffer as a typed array.
* @returns {GltfIndexBufferLoader} The cached index buffer loader.
* @private
*/
@@ -590,13 +563,11 @@ ResourceCache.getIndexBufferLoader = function (options) {
/**
* Gets an existing glTF image from the cache, or creates a new loader if one does not already exist.
- *
* @param {object} options Object with the following properties:
* @param {object} options.gltf The glTF JSON.
* @param {number} options.imageId The image ID.
* @param {Resource} options.gltfResource The {@link Resource} containing the glTF.
* @param {Resource} options.baseResource The {@link Resource} that paths in the glTF JSON are relative to.
- *
* @returns {GltfImageLoader} The cached image loader.
* @private
*/
@@ -637,7 +608,6 @@ ResourceCache.getImageLoader = function (options) {
/**
* Gets an existing glTF texture from the cache, or creates a new loader if one does not already exist.
- *
* @param {object} options Object with the following properties:
* @param {object} options.gltf The glTF JSON.
* @param {object} options.textureInfo The texture info object.
@@ -645,8 +615,7 @@ ResourceCache.getImageLoader = function (options) {
* @param {Resource} options.baseResource The {@link Resource} that paths in the glTF JSON are relative to.
* @param {SupportedImageFormats} options.supportedImageFormats The supported image formats.
* @param {FrameState} options.frameState The frame state.
- * @param {boolean} [options.asynchronous=true] Determines if WebGL resource creation will be spread out over several frames or block until all WebGL resources are created.
- *
+ * @param {boolean} [options.asynchronous] Determines if WebGL resource creation will be spread out over several frames or block until all WebGL resources are created.
* @returns {GltfTextureLoader} The cached texture loader.
* @private
*/
@@ -701,7 +670,6 @@ ResourceCache.getTextureLoader = function (options) {
/**
* Unload everything from the cache. This is used for unit testing.
- *
* @private
*/
ResourceCache.clearForSpecs = function () {
diff --git a/packages/engine/Source/Scene/ResourceCacheKey.js b/packages/engine/Source/Scene/ResourceCacheKey.js
index 6763461cebcb..1deab4354b9b 100644
--- a/packages/engine/Source/Scene/ResourceCacheKey.js
+++ b/packages/engine/Source/Scene/ResourceCacheKey.js
@@ -8,9 +8,7 @@ import hasExtension from "./hasExtension.js";
/**
* Compute cache keys for resources in {@link ResourceCache}.
- *
* @namespace ResourceCacheKey
- *
* @private
*/
const ResourceCacheKey = {};
@@ -110,14 +108,11 @@ function getSamplerCacheKey(gltf, textureInfo) {
/**
* Gets the schema cache key.
- *
* @param {object} options Object with the following properties:
* @param {object} [options.schema] An object that explicitly defines a schema JSON. Mutually exclusive with options.resource.
* @param {Resource} [options.resource] The {@link Resource} pointing to the schema JSON. Mutually exclusive with options.schema.
- *
* @returns {string} The schema cache key.
- *
- * @exception {DeveloperError} One of options.schema and options.resource must be defined.
+ * @throws {DeveloperError} One of options.schema and options.resource must be defined.
* @private
*/
ResourceCacheKey.getSchemaCacheKey = function (options) {
@@ -140,10 +135,8 @@ ResourceCacheKey.getSchemaCacheKey = function (options) {
/**
* Gets the external buffer cache key.
- *
* @param {object} options Object with the following properties:
* @param {Resource} options.resource The {@link Resource} pointing to the external buffer.
- *
* @returns {string} The external buffer cache key.
* @private
*/
@@ -160,11 +153,9 @@ ResourceCacheKey.getExternalBufferCacheKey = function (options) {
/**
* Gets the embedded buffer cache key.
- *
* @param {object} options Object with the following properties:
* @param {Resource} options.parentResource The {@link Resource} containing the embedded buffer.
* @param {number} options.bufferId A unique identifier of the embedded buffer within the parent resource.
- *
* @returns {string} The embedded buffer cache key.
* @private
*/
@@ -185,10 +176,8 @@ ResourceCacheKey.getEmbeddedBufferCacheKey = function (options) {
/**
* Gets the glTF cache key.
- *
* @param {object} options Object with the following properties:
* @param {Resource} options.gltfResource The {@link Resource} containing the glTF.
- *
* @returns {string} The glTF cache key.
* @private
*/
@@ -205,13 +194,11 @@ ResourceCacheKey.getGltfCacheKey = function (options) {
/**
* Gets the buffer view cache key.
- *
* @param {object} options Object with the following properties:
* @param {object} options.gltf The glTF JSON.
* @param {number} options.bufferViewId The bufferView ID.
* @param {Resource} options.gltfResource The {@link Resource} containing the glTF.
* @param {Resource} options.baseResource The {@link Resource} that paths in the glTF JSON are relative to.
- *
* @returns {string} The buffer view cache key.
* @private
*/
@@ -248,13 +235,11 @@ ResourceCacheKey.getBufferViewCacheKey = function (options) {
/**
* Gets the Draco cache key.
- *
* @param {object} options Object with the following properties:
* @param {object} options.gltf The glTF JSON.
* @param {object} options.draco The Draco extension object.
* @param {Resource} options.gltfResource The {@link Resource} containing the glTF.
* @param {Resource} options.baseResource The {@link Resource} that paths in the glTF JSON are relative to.
- *
* @returns {string} The Draco cache key.
* @private
*/
@@ -274,7 +259,6 @@ ResourceCacheKey.getDracoCacheKey = function (options) {
/**
* Gets the vertex buffer cache key.
- *
* @param {object} options Object with the following properties:
* @param {object} options.gltf The glTF JSON.
* @param {Resource} options.gltfResource The {@link Resource} containing the glTF.
@@ -283,12 +267,11 @@ ResourceCacheKey.getDracoCacheKey = function (options) {
* @param {number} [options.bufferViewId] The bufferView ID corresponding to the vertex buffer.
* @param {object} [options.draco] The Draco extension object.
* @param {string} [options.attributeSemantic] The attribute semantic, e.g. POSITION or NORMAL.
- * @param {boolean} [options.dequantize=false] Determines whether or not the vertex buffer will be dequantized on the CPU.
- * @param {boolean} [options.loadBuffer=false] Load vertex buffer as a GPU vertex buffer.
- * @param {boolean} [options.loadTypedArray=false] Load vertex buffer as a typed array.
- * @exception {DeveloperError} One of options.bufferViewId and options.draco must be defined.
- * @exception {DeveloperError} When options.draco is defined options.attributeSemantic must also be defined.
- *
+ * @param {boolean} [options.dequantize] Determines whether or not the vertex buffer will be dequantized on the CPU.
+ * @param {boolean} [options.loadBuffer] Load vertex buffer as a GPU vertex buffer.
+ * @param {boolean} [options.loadTypedArray] Load vertex buffer as a typed array.
+ * @throws {DeveloperError} One of options.bufferViewId and options.draco must be defined.
+ * @throws {DeveloperError} When options.draco is defined options.attributeSemantic must also be defined.
* @returns {string} The vertex buffer cache key.
* @private
*/
@@ -391,7 +374,6 @@ function hasDracoCompression(draco, semantic) {
/**
* Gets the index buffer cache key.
- *
* @param {object} options Object with the following properties:
* @param {object} options.gltf The glTF JSON.
* @param {number} options.accessorId The accessor ID corresponding to the index buffer.
@@ -399,9 +381,8 @@ function hasDracoCompression(draco, semantic) {
* @param {Resource} options.baseResource The {@link Resource} that paths in the glTF JSON are relative to.
* @param {FrameState} options.frameState The frame state.
* @param {object} [options.draco] The Draco extension object.
- * @param {boolean} [options.loadBuffer=false] Load index buffer as a GPU index buffer.
- * @param {boolean} [options.loadTypedArray=false] Load index buffer as a typed array.
- *
+ * @param {boolean} [options.loadBuffer] Load index buffer as a GPU index buffer.
+ * @param {boolean} [options.loadTypedArray] Load index buffer as a typed array.
* @returns {string} The index buffer cache key.
* @private
*/
@@ -472,13 +453,11 @@ ResourceCacheKey.getIndexBufferCacheKey = function (options) {
/**
* Gets the image cache key.
- *
* @param {object} options Object with the following properties:
* @param {object} options.gltf The glTF JSON.
* @param {number} options.imageId The image ID.
* @param {Resource} options.gltfResource The {@link Resource} containing the glTF.
* @param {Resource} options.baseResource The {@link Resource} that paths in the glTF JSON are relative to.
- *
* @returns {string} The image cache key.
* @private
*/
@@ -505,7 +484,6 @@ ResourceCacheKey.getImageCacheKey = function (options) {
/**
* Gets the texture cache key.
- *
* @param {object} options Object with the following properties:
* @param {object} options.gltf The glTF JSON.
* @param {object} options.textureInfo The texture info object.
@@ -513,7 +491,6 @@ ResourceCacheKey.getImageCacheKey = function (options) {
* @param {Resource} options.baseResource The {@link Resource} that paths in the glTF JSON are relative to.
* @param {SupportedImageFormats} options.supportedImageFormats The supported image formats.
* @param {FrameState} options.frameState The frame state.
- *
* @returns {string} The texture cache key.
* @private
*/
diff --git a/packages/engine/Source/Scene/ResourceCacheStatistics.js b/packages/engine/Source/Scene/ResourceCacheStatistics.js
index 3492d757be18..a69ee71b26e1 100644
--- a/packages/engine/Source/Scene/ResourceCacheStatistics.js
+++ b/packages/engine/Source/Scene/ResourceCacheStatistics.js
@@ -4,16 +4,13 @@ import defined from "../Core/defined.js";
/**
* Statistics for the GPU and CPU memory used by the models loaded through the
* {@link ResourceCache}.
- *
* @alias ResourceCacheStatistics
- * @constructor
- *
+ * @class
* @private
*/
function ResourceCacheStatistics() {
/**
* The size of vertex buffers and index buffers loaded in the cache in bytes.
- *
* @type {number}
* @private
*/
@@ -21,7 +18,6 @@ function ResourceCacheStatistics() {
/**
* The size of all textures loaded in the cache in bytes
- *
* @type {number}
* @private
*/
@@ -35,7 +31,6 @@ function ResourceCacheStatistics() {
/**
* Reset the memory counts
- *
* @private
*/
ResourceCacheStatistics.prototype.clear = function () {
@@ -55,7 +50,6 @@ ResourceCacheStatistics.prototype.clear = function () {
* If the geometry has a CPU copy of the GPU buffer, it will be added to the count
*
* @param {GltfVertexBufferLoader|GltfIndexBufferLoader} loader The geometry buffer with resources to track
- *
* @private
*/
ResourceCacheStatistics.prototype.addGeometryLoader = function (loader) {
@@ -93,9 +87,7 @@ ResourceCacheStatistics.prototype.addGeometryLoader = function (loader) {
* Track the resources for a texture loader. This should be called after a loader is ready; that
* is it has been loaded and processed.
* If the loader is added twice, its resources will not be double-counted.
- *
* @param {GltfTextureLoader} loader The texture loader with resources to track
- *
* @private
*/
ResourceCacheStatistics.prototype.addTextureLoader = function (loader) {
@@ -122,7 +114,6 @@ ResourceCacheStatistics.prototype.addTextureLoader = function (loader) {
* be used both for geometry and textures. If the loader does not have any
* tracked resources, this is a no-op.
* @param {ResourceLoader} loader The resource loader to remove from the cache
- *
* @private
*/
ResourceCacheStatistics.prototype.removeLoader = function (loader) {
diff --git a/packages/engine/Source/Scene/ResourceLoader.js b/packages/engine/Source/Scene/ResourceLoader.js
index d4ca1e4f8e1f..3d8f322ae0dc 100644
--- a/packages/engine/Source/Scene/ResourceLoader.js
+++ b/packages/engine/Source/Scene/ResourceLoader.js
@@ -9,12 +9,9 @@ import RuntimeError from "../Core/RuntimeError.js";
*
* This type describes an interface and is not intended to be instantiated directly.
*
- *
* @alias ResourceLoader
- * @constructor
- *
+ * @class
* @see ResourceCache
- *
* @private
*/
function ResourceLoader() {}
@@ -22,9 +19,7 @@ function ResourceLoader() {}
Object.defineProperties(ResourceLoader.prototype, {
/**
* The cache key of the resource.
- *
* @memberof ResourceLoader.prototype
- *
* @type {string}
* @readonly
* @private
@@ -54,7 +49,6 @@ ResourceLoader.prototype.unload = function () {};
/**
* Processes the resource until it becomes ready.
- *
* @param {FrameState} frameState The frame state.
* @returns {boolean} true once all resourced are ready.
* @private
@@ -65,10 +59,8 @@ ResourceLoader.prototype.process = function (frameState) {
/**
* Constructs a {@link RuntimeError} from an errorMessage and an error.
- *
* @param {string} errorMessage The error message.
* @param {Error} [error] The error.
- *
* @returns {RuntimeError} The runtime error.
* @private
*/
@@ -94,9 +86,7 @@ ResourceLoader.prototype.getError = function (errorMessage, error) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see ResourceLoader#destroy
* @private
*/
@@ -110,12 +100,9 @@ ResourceLoader.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* resourceLoader = resourceLoader && resourceLoader.destroy();
- *
* @see ResourceLoader#isDestroyed
* @private
*/
diff --git a/packages/engine/Source/Scene/ResourceLoaderState.js b/packages/engine/Source/Scene/ResourceLoaderState.js
index 22353ffe1382..2a05ed2c1377 100644
--- a/packages/engine/Source/Scene/ResourceLoaderState.js
+++ b/packages/engine/Source/Scene/ResourceLoaderState.js
@@ -1,12 +1,10 @@
/**
* The {@link ResourceLoader} state.
- *
* @private
*/
const ResourceLoaderState = {
/**
* The resource has not yet been loaded.
- *
* @type {number}
* @constant
* @private
@@ -14,7 +12,6 @@ const ResourceLoaderState = {
UNLOADED: 0,
/**
* The resource is loading. In this state, external resources are fetched as needed.
- *
* @type {number}
* @constant
* @private
@@ -22,7 +19,6 @@ const ResourceLoaderState = {
LOADING: 1,
/**
* The resource has finished loading, but requires further processing.
- *
* @type {number}
* @constant
* @private
@@ -30,15 +26,13 @@ const ResourceLoaderState = {
LOADED: 2,
/**
* The resource is processing. GPU resources are allocated in this state as needed.
- *
- * @type {Number}
+ * @type {number}
* @constant
* @private
*/
PROCESSING: 3,
/**
* The resource has finished loading and processing; the results are ready to be used.
- *
* @type {number}
* @constant
* @private
@@ -46,7 +40,6 @@ const ResourceLoaderState = {
READY: 4,
/**
* The resource loading or processing has failed due to an error.
- *
* @type {number}
* @constant
* @private
diff --git a/packages/engine/Source/Scene/SDFSettings.js b/packages/engine/Source/Scene/SDFSettings.js
index 0ce45f7cc781..b8a179f97642 100644
--- a/packages/engine/Source/Scene/SDFSettings.js
+++ b/packages/engine/Source/Scene/SDFSettings.js
@@ -1,12 +1,10 @@
/**
* Settings for the generation of signed distance field glyphs
- *
* @private
*/
const SDFSettings = {
/**
* The font size in pixels
- *
* @type {number}
* @constant
*/
@@ -14,7 +12,6 @@ const SDFSettings = {
/**
* Whitespace padding around glyphs.
- *
* @type {number}
* @constant
*/
@@ -22,7 +19,6 @@ const SDFSettings = {
/**
* How many pixels around the glyph shape to use for encoding distance
- *
* @type {number}
* @constant
*/
@@ -30,7 +26,6 @@ const SDFSettings = {
/**
* How much of the radius (relative) is used for the inside part the glyph.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Scene/Scene.js b/packages/engine/Source/Scene/Scene.js
index 02acfe64cbd3..406da495d3c6 100644
--- a/packages/engine/Source/Scene/Scene.js
+++ b/packages/engine/Source/Scene/Scene.js
@@ -87,23 +87,21 @@ const requestRenderAfterFrame = function (scene) {
/**
* The container for all 3D graphical objects and state in a Cesium virtual scene. Generally,
* a scene is not created directly; instead, it is implicitly created by {@link CesiumWidget}.
- *
* @alias Scene
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {HTMLCanvasElement} options.canvas The HTML canvas element to create the scene for.
* @param {ContextOptions} [options.contextOptions] Context and WebGL creation properties.
* @param {Element} [options.creditContainer] The HTML element in which the credits will be displayed.
* @param {Element} [options.creditViewport] The HTML element in which to display the credit popup. If not specified, the viewport will be a added as a sibling of the canvas.
- * @param {MapProjection} [options.mapProjection=new GeographicProjection()] The map projection to use in 2D and Columbus View modes.
- * @param {boolean} [options.orderIndependentTranslucency=true] If true and the configuration supports it, use order independent translucency.
- * @param {boolean} [options.scene3DOnly=false] If true, optimizes memory use and performance for 3D mode but disables the ability to use 2D or Columbus View.
- * @param {boolean} [options.shadows=false] Determines if shadows are cast by light sources.
- * @param {MapMode2D} [options.mapMode2D=MapMode2D.INFINITE_SCROLL] Determines if the 2D map is rotatable or can be scrolled infinitely in the horizontal direction.
- * @param {boolean} [options.requestRenderMode=false] If true, rendering a frame will only occur when needed as determined by changes within the scene. Enabling improves performance of the application, but requires using {@link Scene#requestRender} to render a new frame explicitly in this mode. This will be necessary in many cases after making changes to the scene in other parts of the API. See {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}.
- * @param {number} [options.maximumRenderTimeChange=0.0] If requestRenderMode is true, this value defines the maximum change in simulation time allowed before a render is requested. See {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}.
- * @param {number} [options.depthPlaneEllipsoidOffset=0.0] Adjust the DepthPlane to address rendering artefacts below ellipsoid zero elevation.
+ * @param {MapProjection} [options.mapProjection] The map projection to use in 2D and Columbus View modes.
+ * @param {boolean} [options.orderIndependentTranslucency] If true and the configuration supports it, use order independent translucency.
+ * @param {boolean} [options.scene3DOnly] If true, optimizes memory use and performance for 3D mode but disables the ability to use 2D or Columbus View.
+ * @param {boolean} [options.shadows] Determines if shadows are cast by light sources.
+ * @param {MapMode2D} [options.mapMode2D] Determines if the 2D map is rotatable or can be scrolled infinitely in the horizontal direction.
+ * @param {boolean} [options.requestRenderMode] If true, rendering a frame will only occur when needed as determined by changes within the scene. Enabling improves performance of the application, but requires using {@link Scene#requestRender} to render a new frame explicitly in this mode. This will be necessary in many cases after making changes to the scene in other parts of the API. See {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}.
+ * @param {number} [options.maximumRenderTimeChange] If requestRenderMode is true, this value defines the maximum change in simulation time allowed before a render is requested. See {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}.
+ * @param {number} [options.depthPlaneEllipsoidOffset] Adjust the DepthPlane to address rendering artefacts below ellipsoid zero elevation.
* @param {number} [options.msaaSamples=1] If provided, this value controls the rate of multisample antialiasing. Typical multisampling rates are 2, 4, and sometimes 8 samples per pixel. Higher sampling rates of MSAA may impact performance in exchange for improved visual quality. This value only applies to WebGL2 contexts that support multisample render targets.
*
* @see CesiumWidget
@@ -230,7 +228,6 @@ function Scene(options) {
* renderError
event. If this property is true, the error is rethrown
* after the event is raised. If this property is false, the render
function
* returns normally after raising the event.
- *
* @type {boolean}
* @default false
*/
@@ -239,7 +236,6 @@ function Scene(options) {
/**
* Determines whether or not to instantly complete the
* scene transition animation on user input.
- *
* @type {boolean}
* @default true
*/
@@ -261,17 +257,14 @@ function Scene(options) {
/**
* The {@link SkyBox} used to draw the stars.
- *
* @type {SkyBox}
* @default undefined
- *
* @see Scene#backgroundColor
*/
this.skyBox = undefined;
/**
* The sky atmosphere drawn around the globe.
- *
* @type {SkyAtmosphere}
* @default undefined
*/
@@ -279,7 +272,6 @@ function Scene(options) {
/**
* The {@link Sun}.
- *
* @type {Sun}
* @default undefined
*/
@@ -287,7 +279,6 @@ function Scene(options) {
/**
* Uses a bloom filter on the sun when enabled.
- *
* @type {boolean}
* @default true
*/
@@ -296,7 +287,6 @@ function Scene(options) {
/**
* The {@link Moon}
- *
* @type Moon
* @default undefined
*/
@@ -304,10 +294,8 @@ function Scene(options) {
/**
* The background color, which is only visible if there is no sky box, i.e., {@link Scene#skyBox} is undefined.
- *
* @type {Color}
* @default {@link Color.BLACK}
- *
* @see Scene#skyBox
*/
this.backgroundColor = Color.clone(Color.BLACK);
@@ -321,7 +309,6 @@ function Scene(options) {
/**
* The current morph transition time between 2D/Columbus View and 3D,
* with 0.0 being 2D or Columbus View and 1.0 being 3D.
- *
* @type {number}
* @default 1.0
*/
@@ -334,7 +321,6 @@ function Scene(options) {
* when {@link Scene#logarithmicDepthBuffer} is false
. When logarithmicDepthBuffer
is
* true
, use {@link Scene#logarithmicDepthFarToNearRatio}.
*
- *
* @type {number}
* @default 1000.0
*/
@@ -347,7 +333,6 @@ function Scene(options) {
* when {@link Scene#logarithmicDepthBuffer} is true
. When logarithmicDepthBuffer
is
* false
, use {@link Scene#farToNearRatio}.
*
- *
* @type {number}
* @default 1e9
*/
@@ -357,7 +342,6 @@ function Scene(options) {
* Determines the uniform depth size in meters of each frustum of the multifrustum in 2D. If a primitive or model close
* to the surface shows z-fighting, decreasing this will eliminate the artifact, but decrease performance. On the
* other hand, increasing this will increase performance but may cause z-fighting among primitives close to the surface.
- *
* @type {number}
* @default 1.75e6
*/
@@ -366,7 +350,6 @@ function Scene(options) {
/**
* The vertical exaggeration of the scene.
* When set to 1.0, no exaggeration is applied.
- *
* @type {number}
* @default 1.0
*/
@@ -375,7 +358,6 @@ function Scene(options) {
/**
* The reference height for vertical exaggeration of the scene.
* When set to 0.0, the exaggeration is applied relative to the ellipsoid surface.
- *
* @type {number}
* @default 0.0
*/
@@ -391,11 +373,8 @@ function Scene(options) {
*
* The default is undefined
, indicating that all commands are executed.
*
- *
* @type Function
- *
* @default undefined
- *
* @example
* // Do not execute any commands.
* scene.debugCommandFilter = function(command) {
@@ -417,9 +396,7 @@ function Scene(options) {
* for performance analysis to see what parts of a scene or model are
* command-dense and could benefit from batching.
*
- *
* @type {boolean}
- *
* @default false
*/
this.debugShowCommands = false;
@@ -434,9 +411,7 @@ function Scene(options) {
* are combined, e.g., a command overlapping the first two frustums is tinted
* yellow.
*
- *
* @type {boolean}
- *
* @default false
*/
this.debugShowFrustums = false;
@@ -446,9 +421,7 @@ function Scene(options) {
*
* Displays frames per second and time between frames.
*
- *
* @type {boolean}
- *
* @default false
*/
this.debugShowFramesPerSecond = false;
@@ -458,9 +431,7 @@ function Scene(options) {
*
* Indicates which frustum will have depth information displayed.
*
- *
* @type {number}
- *
* @default 1
*/
this.debugShowDepthFrustum = 1;
@@ -470,9 +441,7 @@ function Scene(options) {
*
* When true
, draws outlines to show the boundaries of the camera frustums
*
- *
* @type {boolean}
- *
* @default false
*/
this.debugShowFrustumPlanes = false;
@@ -481,7 +450,6 @@ function Scene(options) {
/**
* When true
, enables picking using the depth buffer.
- *
* @type {boolean}
* @default true
*/
@@ -494,7 +462,6 @@ function Scene(options) {
* There is a decrease in performance when enabled. There are extra draw calls to write depth for
* translucent geometry.
*
- *
* @example
* // picking the position of a translucent primitive
* viewer.screenSpaceEventHandler.setInputAction(function onLeftClick(movement) {
@@ -505,7 +472,6 @@ function Scene(options) {
* }
* const worldPosition = viewer.scene.pickPosition(movement.position);
* }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
- *
* @type {boolean}
* @default false
*/
@@ -522,7 +488,6 @@ function Scene(options) {
/**
* Settings for atmosphere lighting effects affecting 3D Tiles and model rendering. This is not to be confused with
* {@link Scene#skyAtmosphere} which is responsible for rendering the sky.
- *
* @type {Atmosphere}
*/
this.atmosphere = new Atmosphere();
@@ -633,11 +598,9 @@ function Scene(options) {
* Enabling improves performance of the application, but requires using {@link Scene#requestRender}
* to render a new frame explicitly in this mode. This will be necessary in many cases after making changes
* to the scene in other parts of the API.
- *
* @see {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}
* @see Scene#maximumRenderTimeChange
* @see Scene#requestRender
- *
* @type {boolean}
* @default false
*/
@@ -651,10 +614,8 @@ function Scene(options) {
* the simulation time will never request a render.
* This value impacts the rate of rendering for changes in the scene like lighting, entity property updates,
* and animations.
- *
* @see {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}
* @see Scene#requestRenderMode
- *
* @type {number}
* @default 0.0
*/
@@ -767,7 +728,6 @@ Object.defineProperties(Scene.prototype, {
/**
* Gets the canvas element to which this scene is bound.
* @memberof Scene.prototype
- *
* @type {HTMLCanvasElement}
* @readonly
*/
@@ -780,10 +740,8 @@ Object.defineProperties(Scene.prototype, {
/**
* The drawingBufferHeight of the underlying GL context.
* @memberof Scene.prototype
- *
* @type {number}
* @readonly
- *
* @see {@link https://www.khronos.org/registry/webgl/specs/1.0/#DOM-WebGLRenderingContext-drawingBufferHeight|drawingBufferHeight}
*/
drawingBufferHeight: {
@@ -795,10 +753,8 @@ Object.defineProperties(Scene.prototype, {
/**
* The drawingBufferWidth of the underlying GL context.
* @memberof Scene.prototype
- *
* @type {number}
* @readonly
- *
* @see {@link https://www.khronos.org/registry/webgl/specs/1.0/#DOM-WebGLRenderingContext-drawingBufferWidth|drawingBufferWidth}
*/
drawingBufferWidth: {
@@ -810,10 +766,8 @@ Object.defineProperties(Scene.prototype, {
/**
* The maximum aliased line width, in pixels, supported by this WebGL implementation. It will be at least one.
* @memberof Scene.prototype
- *
* @type {number}
* @readonly
- *
* @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml|glGet} with ALIASED_LINE_WIDTH_RANGE
.
*/
maximumAliasedLineWidth: {
@@ -825,10 +779,8 @@ Object.defineProperties(Scene.prototype, {
/**
* The maximum length in pixels of one edge of a cube map, supported by this WebGL implementation. It will be at least 16.
* @memberof Scene.prototype
- *
* @type {number}
* @readonly
- *
* @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml|glGet} with GL_MAX_CUBE_MAP_TEXTURE_SIZE
.
*/
maximumCubeMapSize: {
@@ -840,10 +792,8 @@ Object.defineProperties(Scene.prototype, {
/**
* Returns true
if the {@link Scene#pickPosition} function is supported.
* @memberof Scene.prototype
- *
* @type {boolean}
* @readonly
- *
* @see Scene#pickPosition
*/
pickPositionSupported: {
@@ -855,10 +805,8 @@ Object.defineProperties(Scene.prototype, {
/**
* Returns true
if the {@link Scene#sampleHeight} and {@link Scene#sampleHeightMostDetailed} functions are supported.
* @memberof Scene.prototype
- *
* @type {boolean}
* @readonly
- *
* @see Scene#sampleHeight
* @see Scene#sampleHeightMostDetailed
*/
@@ -871,10 +819,8 @@ Object.defineProperties(Scene.prototype, {
/**
* Returns true
if the {@link Scene#clampToHeight} and {@link Scene#clampToHeightMostDetailed} functions are supported.
* @memberof Scene.prototype
- *
* @type {boolean}
* @readonly
- *
* @see Scene#clampToHeight
* @see Scene#clampToHeightMostDetailed
*/
@@ -887,10 +833,8 @@ Object.defineProperties(Scene.prototype, {
/**
* Returns true
if the {@link Scene#invertClassification} is supported.
* @memberof Scene.prototype
- *
* @type {boolean}
* @readonly
- *
* @see Scene#invertClassification
*/
invertClassificationSupported: {
@@ -902,10 +846,8 @@ Object.defineProperties(Scene.prototype, {
/**
* Returns true
if specular environment maps are supported.
* @memberof Scene.prototype
- *
* @type {boolean}
* @readonly
- *
* @see Scene#specularEnvironmentMaps
*/
specularEnvironmentMapsSupported: {
@@ -917,7 +859,6 @@ Object.defineProperties(Scene.prototype, {
/**
* Gets or sets the depth-test ellipsoid.
* @memberof Scene.prototype
- *
* @type {Globe}
*/
globe: {
@@ -936,7 +877,6 @@ Object.defineProperties(Scene.prototype, {
/**
* Gets the collection of primitives.
* @memberof Scene.prototype
- *
* @type {PrimitiveCollection}
* @readonly
*/
@@ -949,7 +889,6 @@ Object.defineProperties(Scene.prototype, {
/**
* Gets the collection of ground primitives.
* @memberof Scene.prototype
- *
* @type {PrimitiveCollection}
* @readonly
*/
@@ -962,7 +901,6 @@ Object.defineProperties(Scene.prototype, {
/**
* Gets or sets the camera.
* @memberof Scene.prototype
- *
* @type {Camera}
* @readonly
*/
@@ -979,10 +917,8 @@ Object.defineProperties(Scene.prototype, {
/**
* Gets or sets the view.
* @memberof Scene.prototype
- *
* @type {View}
* @readonly
- *
* @private
*/
view: {
@@ -998,10 +934,8 @@ Object.defineProperties(Scene.prototype, {
/**
* Gets the default view.
* @memberof Scene.prototype
- *
* @type {View}
* @readonly
- *
* @private
*/
defaultView: {
@@ -1013,10 +947,8 @@ Object.defineProperties(Scene.prototype, {
/**
* Gets picking functions and state
* @memberof Scene.prototype
- *
* @type {Picking}
* @readonly
- *
* @private
*/
picking: {
@@ -1028,7 +960,6 @@ Object.defineProperties(Scene.prototype, {
/**
* Gets the controller for camera input handling.
* @memberof Scene.prototype
- *
* @type {ScreenSpaceCameraController}
* @readonly
*/
@@ -1041,10 +972,8 @@ Object.defineProperties(Scene.prototype, {
/**
* Get the map projection to use in 2D and Columbus View modes.
* @memberof Scene.prototype
- *
* @type {MapProjection}
* @readonly
- *
* @default new GeographicProjection()
*/
mapProjection: {
@@ -1058,7 +987,6 @@ Object.defineProperties(Scene.prototype, {
* @memberof Scene.prototype
* @type {JobScheduler}
* @readonly
- *
* @private
*/
jobScheduler: {
@@ -1071,10 +999,8 @@ Object.defineProperties(Scene.prototype, {
* Gets state information about the current scene. If called outside of a primitive's update
* function, the previous frame's state is returned.
* @memberof Scene.prototype
- *
* @type {FrameState}
* @readonly
- *
* @private
*/
frameState: {
@@ -1086,10 +1012,8 @@ Object.defineProperties(Scene.prototype, {
/**
* Gets the environment state.
* @memberof Scene.prototype
- *
* @type {EnvironmentState}
* @readonly
- *
* @private
*/
environmentState: {
@@ -1101,10 +1025,8 @@ Object.defineProperties(Scene.prototype, {
/**
* Gets the collection of tweens taking place in the scene.
* @memberof Scene.prototype
- *
* @type {TweenCollection}
* @readonly
- *
* @private
*/
tweens: {
@@ -1116,7 +1038,6 @@ Object.defineProperties(Scene.prototype, {
/**
* Gets the collection of image layers that will be rendered on the globe.
* @memberof Scene.prototype
- *
* @type {ImageryLayerCollection}
* @readonly
*/
@@ -1133,7 +1054,6 @@ Object.defineProperties(Scene.prototype, {
/**
* The terrain provider providing surface geometry for the globe.
* @memberof Scene.prototype
- *
* @type {TerrainProvider}
*/
terrainProvider: {
@@ -1159,7 +1079,6 @@ Object.defineProperties(Scene.prototype, {
/**
* Gets an event that's raised when the terrain provider is changed
* @memberof Scene.prototype
- *
* @type {Event}
* @readonly
*/
@@ -1177,12 +1096,10 @@ Object.defineProperties(Scene.prototype, {
* Gets the event that will be raised before the scene is updated or rendered. Subscribers to the event
* receive the Scene instance as the first parameter and the current time as the second parameter.
* @memberof Scene.prototype
- *
* @see {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}
* @see Scene#postUpdate
* @see Scene#preRender
* @see Scene#postRender
- *
* @type {Event}
* @readonly
*/
@@ -1197,12 +1114,10 @@ Object.defineProperties(Scene.prototype, {
* Subscribers to the event receive the Scene instance as the first parameter and the current time as the second
* parameter.
* @memberof Scene.prototype
- *
* @see {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}
* @see Scene#preUpdate
* @see Scene#preRender
* @see Scene#postRender
- *
* @type {Event}
* @readonly
*/
@@ -1218,7 +1133,6 @@ Object.defineProperties(Scene.prototype, {
* By default, errors are not rethrown after this event is raised, but that can be changed by setting
* the rethrowRenderErrors
property.
* @memberof Scene.prototype
- *
* @type {Event}
* @readonly
*/
@@ -1233,12 +1147,10 @@ Object.defineProperties(Scene.prototype, {
* Subscribers to the event receive the Scene instance as the first parameter and the current time as the second
* parameter.
* @memberof Scene.prototype
- *
* @see {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}
* @see Scene#preUpdate
* @see Scene#postUpdate
* @see Scene#postRender
- *
* @type {Event}
* @readonly
*/
@@ -1252,12 +1164,10 @@ Object.defineProperties(Scene.prototype, {
* Gets the event that will be raised immediately after the scene is rendered. Subscribers to the event
* receive the Scene instance as the first parameter and the current time as the second parameter.
* @memberof Scene.prototype
- *
* @see {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}
* @see Scene#preUpdate
* @see Scene#postUpdate
* @see Scene#postRender
- *
* @type {Event}
* @readonly
*/
@@ -1271,7 +1181,6 @@ Object.defineProperties(Scene.prototype, {
* Gets the simulation time when the scene was last rendered. Returns undefined if the scene has not yet been
* rendered.
* @memberof Scene.prototype
- *
* @type {JulianDate}
* @readonly
*/
@@ -1302,12 +1211,9 @@ Object.defineProperties(Scene.prototype, {
* commands are executed redundantly, e.g., how many commands overlap two or
* three frustums.
*
- *
* @memberof Scene.prototype
- *
* @type {object}
* @readonly
- *
* @default undefined
*/
debugFrustumStatistics: {
@@ -1393,7 +1299,6 @@ Object.defineProperties(Scene.prototype, {
* Gets the number of frustums used in the last frame.
* @memberof Scene.prototype
* @type {FrustumCommands[]}
- *
* @private
*/
frustumCommandsList: {
@@ -1406,7 +1311,6 @@ Object.defineProperties(Scene.prototype, {
* Gets the number of frustums used in the last frame.
* @memberof Scene.prototype
* @type {number}
- *
* @private
*/
numberOfFrustums: {
@@ -1474,7 +1378,6 @@ Object.defineProperties(Scene.prototype, {
/**
* Gets or sets the position of the splitter within the viewport. Valid values are between 0.0 and 1.0.
* @memberof Scene.prototype
- *
* @type {number}
*/
splitPosition: {
@@ -1627,7 +1530,6 @@ Object.defineProperties(Scene.prototype, {
/**
* Ratio between a pixel and a density-independent pixel. Provides a standard unit of
* measure for real pixel measurements appropriate to a particular device.
- *
* @memberof Scene.prototype
* @type {number}
* @default 1.0
@@ -1664,7 +1566,7 @@ Object.defineProperties(Scene.prototype, {
/**
* Determines if a compressed texture format is supported.
* @param {string} format The texture format. May be the name of the format or the WebGL extension name, e.g. s3tc or WEBGL_compressed_texture_s3tc.
- * @return {boolean} Whether or not the format is supported.
+ * @returns {boolean} Whether or not the format is supported.
*/
Scene.prototype.getCompressedTextureFormatSupported = function (format) {
const context = this.context;
@@ -1754,6 +1656,7 @@ function updateDerivedCommands(scene, command, shadowsDirty) {
}
/**
+ * @param command
* @private
*/
Scene.prototype.updateDerivedCommands = function (command) {
@@ -1968,6 +1871,9 @@ Scene.prototype.updateFrameState = function () {
};
/**
+ * @param command
+ * @param cullingVolume
+ * @param occluder
* @private
*/
Scene.prototype.isVisible = function (command, cullingVolume, occluder) {
@@ -2888,6 +2794,8 @@ function executeShadowMapCastCommands(scene) {
const scratchEyeTranslation = new Cartesian3();
/**
+ * @param passState
+ * @param backgroundColor
* @private
*/
Scene.prototype.updateAndExecuteCommands = function (
@@ -3553,6 +3461,7 @@ function updateAndClearFramebuffers(scene, passState, clearColor) {
}
/**
+ * @param passState
* @private
*/
Scene.prototype.resolveFramebuffers = function (passState) {
@@ -3641,7 +3550,7 @@ function getGlobeHeight(scene) {
/**
* Gets the height of the loaded surface at the cartographic position.
* @param {Cartographic} cartographic The cartographic position.
- * @param {HeightReference} [heightReference=CLAMP_TO_GROUND] Based on the height reference value, determines whether to ignore heights from 3D Tiles or terrain.
+ * @param {HeightReference} [heightReference] Based on the height reference value, determines whether to ignore heights from 3D Tiles or terrain.
* @private
*/
Scene.prototype.getHeight = function (cartographic, heightReference) {
@@ -3701,12 +3610,10 @@ const updateHeightScratchCartographic = new Cartographic();
/**
* Calls the callback when a new tile is rendered that contains the given cartographic. The only parameter
* is the cartesian position on the tile.
- *
* @private
- *
* @param {Cartographic} cartographic The cartographic position.
* @param {Function} callback The function to be called when a new tile is loaded containing the updated cartographic.
- * @param {HeightReference} [heightReference=CLAMP_TO_GROUND] Based on the height reference value, determines whether to ignore heights from 3D Tiles or terrain.
+ * @param {HeightReference} [heightReference] Based on the height reference value, determines whether to ignore heights from 3D Tiles or terrain.
* @returns {Function} The function to remove this callback from the quadtree.
*/
Scene.prototype.updateHeight = function (
@@ -4117,7 +4024,6 @@ Scene.prototype.render = function (time) {
* Update and render the scene. Always forces a new render frame regardless of whether a render was
* previously requested.
* @param {JulianDate} [time] The simulation time at which to render.
- *
* @private
*/
Scene.prototype.forceRender = function (time) {
@@ -4128,7 +4034,6 @@ Scene.prototype.forceRender = function (time) {
/**
* Requests a new rendered frame when {@link Scene#requestRenderMode} is set to true
.
* The render rate will not exceed the {@link CesiumWidget#targetFrameRate}.
- *
* @see Scene#requestRenderMode
*/
Scene.prototype.requestRender = function () {
@@ -4136,6 +4041,7 @@ Scene.prototype.requestRender = function () {
};
/**
+ * @param width
* @private
*/
Scene.prototype.clampLineWidth = function (width) {
@@ -4152,7 +4058,6 @@ Scene.prototype.clampLineWidth = function (width) {
*
* When a feature of a 3D Tiles tileset is picked, pick
returns a {@link Cesium3DTileFeature} object.
*
- *
* @example
* // On mouse over, color the feature yellow.
* handler.setInputAction(function(movement) {
@@ -4161,10 +4066,9 @@ Scene.prototype.clampLineWidth = function (width) {
* feature.color = Cesium.Color.YELLOW;
* }
* }, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
- *
* @param {Cartesian2} windowPosition Window coordinates to perform picking on.
- * @param {number} [width=3] Width of the pick rectangle.
- * @param {number} [height=3] Height of the pick rectangle.
+ * @param {number} [width] Width of the pick rectangle.
+ * @param {number} [height] Height of the pick rectangle.
* @returns {object} Object containing the picked primitive.
*/
Scene.prototype.pick = function (windowPosition, width, height) {
@@ -4174,7 +4078,6 @@ Scene.prototype.pick = function (windowPosition, width, height) {
/**
* Returns a {@link VoxelCell} for the voxel sample rendered at a particular window coordinate,
* or undefined if no voxel is rendered at that position.
- *
* @example
* On left click, report the value of the "color" property at that voxel sample.
* handler.setInputAction(function(movement) {
@@ -4183,12 +4086,10 @@ Scene.prototype.pick = function (windowPosition, width, height) {
* console.log(voxelCell.getProperty("color"));
* }
* }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
- *
* @param {Cartesian2} windowPosition Window coordinates to perform picking on.
- * @param {number} [width=3] Width of the pick rectangle.
- * @param {number} [height=3] Height of the pick rectangle.
+ * @param {number} [width] Width of the pick rectangle.
+ * @param {number} [height] Height of the pick rectangle.
* @returns {VoxelCell|undefined} Information about the voxel cell rendered at the picked position.
- *
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
*/
Scene.prototype.pickVoxel = function (windowPosition, width, height) {
@@ -4232,14 +4133,11 @@ Scene.prototype.pickVoxel = function (windowPosition, width, height) {
* Set {@link Scene#pickTranslucentDepth} to true
to include the depth of
* translucent primitives; otherwise, this essentially picks through translucent primitives.
*
- *
* @private
- *
* @param {Cartesian2} windowPosition Window coordinates to perform picking on.
* @param {Cartesian3} [result] The object on which to restore the result.
* @returns {Cartesian3} The cartesian position in world coordinates.
- *
- * @exception {DeveloperError} Picking from the depth buffer is not supported. Check pickPositionSupported.
+ * @throws {DeveloperError} Picking from the depth buffer is not supported. Check pickPositionSupported.
*/
Scene.prototype.pickPositionWorldCoordinates = function (
windowPosition,
@@ -4263,12 +4161,10 @@ Scene.prototype.pickPositionWorldCoordinates = function (
* Set {@link Scene#pickTranslucentDepth} to true
to include the depth of
* translucent primitives; otherwise, this essentially picks through translucent primitives.
*
- *
* @param {Cartesian2} windowPosition Window coordinates to perform picking on.
* @param {Cartesian3} [result] The object on which to restore the result.
* @returns {Cartesian3} The cartesian position.
- *
- * @exception {DeveloperError} Picking from the depth buffer is not supported. Check pickPositionSupported.
+ * @throws {DeveloperError} Picking from the depth buffer is not supported. Check pickPositionSupported.
*/
Scene.prototype.pickPosition = function (windowPosition, result) {
return this._picking.pickPosition(this, windowPosition, result);
@@ -4279,18 +4175,14 @@ Scene.prototype.pickPosition = function (windowPosition, result) {
* a particular window coordinate position. Other properties may also be set depending on the
* type of primitive and may be used to further identify the picked object. The primitives in
* the list are ordered by their visual order in the scene (front to back).
- *
* @param {Cartesian2} windowPosition Window coordinates to perform picking on.
* @param {number} [limit] If supplied, stop drilling after collecting this many picks.
- * @param {number} [width=3] Width of the pick rectangle.
- * @param {number} [height=3] Height of the pick rectangle.
+ * @param {number} [width] Width of the pick rectangle.
+ * @param {number} [height] Height of the pick rectangle.
* @returns {any[]} Array of objects, each containing 1 picked primitives.
- *
- * @exception {DeveloperError} windowPosition is undefined.
- *
+ * @throws {DeveloperError} windowPosition is undefined.
* @example
* const pickedObjects = scene.drillPick(new Cesium.Cartesian2(100.0, 200.0));
- *
* @see Scene#pick
*/
Scene.prototype.drillPick = function (windowPosition, limit, width, height) {
@@ -4338,15 +4230,12 @@ function updateRequestRenderModeDeferCheckPass(scene) {
* This function only picks globe tiles and 3D Tiles that are rendered in the current view. Picks all other
* primitives regardless of their visibility.
*
- *
* @private
- *
* @param {Ray} ray The ray.
- * @param {Object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to exclude from the ray intersection.
- * @param {number} [width=0.1] Width of the intersection volume in meters.
+ * @param {object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to exclude from the ray intersection.
+ * @param {number} [width] Width of the intersection volume in meters.
* @returns {object} An object containing the object and position of the first intersection.
- *
- * @exception {DeveloperError} Ray intersections are only supported in 3D mode.
+ * @throws {DeveloperError} Ray intersections are only supported in 3D mode.
*/
Scene.prototype.pickFromRay = function (ray, objectsToExclude, width) {
return this._picking.pickFromRay(this, ray, objectsToExclude, width);
@@ -4362,16 +4251,13 @@ Scene.prototype.pickFromRay = function (ray, objectsToExclude, width) {
* This function only picks globe tiles and 3D Tiles that are rendered in the current view. Picks all other
* primitives regardless of their visibility.
*
- *
* @private
- *
* @param {Ray} ray The ray.
- * @param {number} [limit=Number.MAX_VALUE] If supplied, stop finding intersections after this many intersections.
- * @param {Object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to exclude from the ray intersection.
- * @param {number} [width=0.1] Width of the intersection volume in meters.
- * @returns {Object[]} List of objects containing the object and position of each intersection.
- *
- * @exception {DeveloperError} Ray intersections are only supported in 3D mode.
+ * @param {number} [limit] If supplied, stop finding intersections after this many intersections.
+ * @param {object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to exclude from the ray intersection.
+ * @param {number} [width] Width of the intersection volume in meters.
+ * @returns {object[]} List of objects containing the object and position of each intersection.
+ * @throws {DeveloperError} Ray intersections are only supported in 3D mode.
*/
Scene.prototype.drillPickFromRay = function (
ray,
@@ -4391,15 +4277,12 @@ Scene.prototype.drillPickFromRay = function (
/**
* Initiates an asynchronous {@link Scene#pickFromRay} request using the maximum level of detail for 3D Tilesets
* regardless of visibility.
- *
* @private
- *
* @param {Ray} ray The ray.
- * @param {Object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to exclude from the ray intersection.
- * @param {number} [width=0.1] Width of the intersection volume in meters.
+ * @param {object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to exclude from the ray intersection.
+ * @param {number} [width] Width of the intersection volume in meters.
* @returns {Promise} A promise that resolves to an object containing the object and position of the first intersection.
- *
- * @exception {DeveloperError} Ray intersections are only supported in 3D mode.
+ * @throws {DeveloperError} Ray intersections are only supported in 3D mode.
*/
Scene.prototype.pickFromRayMostDetailed = function (
ray,
@@ -4417,16 +4300,13 @@ Scene.prototype.pickFromRayMostDetailed = function (
/**
* Initiates an asynchronous {@link Scene#drillPickFromRay} request using the maximum level of detail for 3D Tilesets
* regardless of visibility.
- *
* @private
- *
* @param {Ray} ray The ray.
- * @param {number} [limit=Number.MAX_VALUE] If supplied, stop finding intersections after this many intersections.
- * @param {Object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to exclude from the ray intersection.
- * @param {number} [width=0.1] Width of the intersection volume in meters.
- * @returns {Promise} A promise that resolves to a list of objects containing the object and position of each intersection.
- *
- * @exception {DeveloperError} Ray intersections are only supported in 3D mode.
+ * @param {number} [limit] If supplied, stop finding intersections after this many intersections.
+ * @param {object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to exclude from the ray intersection.
+ * @param {number} [width] Width of the intersection volume in meters.
+ * @returns {Promise} A promise that resolves to a list of objects containing the object and position of each intersection.
+ * @throws {DeveloperError} Ray intersections are only supported in 3D mode.
*/
Scene.prototype.drillPickFromRayMostDetailed = function (
ray,
@@ -4451,23 +4331,19 @@ Scene.prototype.drillPickFromRayMostDetailed = function (
* This function only samples height from globe tiles and 3D Tiles that are rendered in the current view. Samples height
* from all other primitives regardless of their visibility.
*
- *
* @param {Cartographic} position The cartographic position to sample height from.
- * @param {Object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to not sample height from.
- * @param {number} [width=0.1] Width of the intersection volume in meters.
+ * @param {object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to not sample height from.
+ * @param {number} [width] Width of the intersection volume in meters.
* @returns {number} The height. This may be undefined
if there was no scene geometry to sample height from.
- *
* @example
* const position = new Cesium.Cartographic(-1.31968, 0.698874);
* const height = viewer.scene.sampleHeight(position);
* console.log(height);
- *
* @see Scene#clampToHeight
* @see Scene#clampToHeightMostDetailed
* @see Scene#sampleHeightMostDetailed
- *
- * @exception {DeveloperError} sampleHeight is only supported in 3D mode.
- * @exception {DeveloperError} sampleHeight requires depth texture support. Check sampleHeightSupported.
+ * @throws {DeveloperError} sampleHeight is only supported in 3D mode.
+ * @throws {DeveloperError} sampleHeight requires depth texture support. Check sampleHeightSupported.
*/
Scene.prototype.sampleHeight = function (position, objectsToExclude, width) {
return this._picking.sampleHeight(this, position, objectsToExclude, width);
@@ -4481,24 +4357,20 @@ Scene.prototype.sampleHeight = function (position, objectsToExclude, width) {
* This function only clamps to globe tiles and 3D Tiles that are rendered in the current view. Clamps to
* all other primitives regardless of their visibility.
*
- *
* @param {Cartesian3} cartesian The cartesian position.
- * @param {Object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to not clamp to.
- * @param {number} [width=0.1] Width of the intersection volume in meters.
+ * @param {object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to not clamp to.
+ * @param {number} [width] Width of the intersection volume in meters.
* @param {Cartesian3} [result] An optional object to return the clamped position.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided. This may be undefined
if there was no scene geometry to clamp to.
- *
* @example
* // Clamp an entity to the underlying scene geometry
* const position = entity.position.getValue(Cesium.JulianDate.now());
* entity.position = viewer.scene.clampToHeight(position);
- *
* @see Scene#sampleHeight
* @see Scene#sampleHeightMostDetailed
* @see Scene#clampToHeightMostDetailed
- *
- * @exception {DeveloperError} clampToHeight is only supported in 3D mode.
- * @exception {DeveloperError} clampToHeight requires depth texture support. Check clampToHeightSupported.
+ * @throws {DeveloperError} clampToHeight is only supported in 3D mode.
+ * @throws {DeveloperError} clampToHeight requires depth texture support. Check clampToHeightSupported.
*/
Scene.prototype.clampToHeight = function (
cartesian,
@@ -4521,12 +4393,10 @@ Scene.prototype.clampToHeight = function (
* Returns a promise that is resolved when the query completes. Each point height is modified in place.
* If a height cannot be determined because no geometry can be sampled at that location, or another error occurs,
* the height is set to undefined.
- *
* @param {Cartographic[]} positions The cartographic positions to update with sampled heights.
- * @param {Object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to not sample height from.
- * @param {number} [width=0.1] Width of the intersection volume in meters.
+ * @param {object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to not sample height from.
+ * @param {number} [width] Width of the intersection volume in meters.
* @returns {Promise} A promise that resolves to the provided list of positions when the query has completed.
- *
* @example
* const positions = [
* new Cesium.Cartographic(-1.31968, 0.69887),
@@ -4537,11 +4407,9 @@ Scene.prototype.clampToHeight = function (
* // positions[0].height and positions[1].height have been updated.
* // updatedPositions is just a reference to positions.
* }
- *
* @see Scene#sampleHeight
- *
- * @exception {DeveloperError} sampleHeightMostDetailed is only supported in 3D mode.
- * @exception {DeveloperError} sampleHeightMostDetailed requires depth texture support. Check sampleHeightSupported.
+ * @throws {DeveloperError} sampleHeightMostDetailed is only supported in 3D mode.
+ * @throws {DeveloperError} sampleHeightMostDetailed requires depth texture support. Check sampleHeightSupported.
*/
Scene.prototype.sampleHeightMostDetailed = function (
positions,
@@ -4561,12 +4429,10 @@ Scene.prototype.sampleHeightMostDetailed = function (
* using the maximum level of detail for 3D Tilesets in the scene. Returns a promise that is resolved when
* the query completes. Each position is modified in place. If a position cannot be clamped because no geometry
* can be sampled at that location, or another error occurs, the element in the array is set to undefined.
- *
* @param {Cartesian3[]} cartesians The cartesian positions to update with clamped positions.
- * @param {Object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to not clamp to.
- * @param {number} [width=0.1] Width of the intersection volume in meters.
+ * @param {object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to not clamp to.
+ * @param {number} [width] Width of the intersection volume in meters.
* @returns {Promise} A promise that resolves to the provided list of positions when the query has completed.
- *
* @example
* const cartesians = [
* entities[0].position.getValue(Cesium.JulianDate.now()),
@@ -4577,11 +4443,9 @@ Scene.prototype.sampleHeightMostDetailed = function (
* entities[0].position = updatedCartesians[0];
* entities[1].position = updatedCartesians[1];
* }
- *
* @see Scene#clampToHeight
- *
- * @exception {DeveloperError} clampToHeightMostDetailed is only supported in 3D mode.
- * @exception {DeveloperError} clampToHeightMostDetailed requires depth texture support. Check clampToHeightSupported.
+ * @throws {DeveloperError} clampToHeightMostDetailed is only supported in 3D mode.
+ * @throws {DeveloperError} clampToHeightMostDetailed requires depth texture support. Check clampToHeightSupported.
*/
Scene.prototype.clampToHeightMostDetailed = function (
cartesians,
@@ -4599,11 +4463,9 @@ Scene.prototype.clampToHeightMostDetailed = function (
/**
* Transforms a position in cartesian coordinates to canvas coordinates. This is commonly used to place an
* HTML element at the same screen position as an object in the scene.
- *
* @param {Cartesian3} position The position in cartesian coordinates.
* @param {Cartesian2} [result] An optional object to return the input position transformed to canvas coordinates.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if one was not provided. This may be undefined
if the input position is near the center of the ellipsoid.
- *
* @example
* // Output the canvas position of longitude/latitude (0, 0) every time the mouse moves.
* const scene = widget.scene;
@@ -4627,7 +4489,7 @@ Scene.prototype.completeMorph = function () {
/**
* Asynchronously transitions the scene to 2D.
- * @param {number} [duration=2.0] The amount of time, in seconds, for transition animations to complete.
+ * @param {number} [duration] The amount of time, in seconds, for transition animations to complete.
*/
Scene.prototype.morphTo2D = function (duration) {
let ellipsoid;
@@ -4643,7 +4505,7 @@ Scene.prototype.morphTo2D = function (duration) {
/**
* Asynchronously transitions the scene to Columbus View.
- * @param {number} [duration=2.0] The amount of time, in seconds, for transition animations to complete.
+ * @param {number} [duration] The amount of time, in seconds, for transition animations to complete.
*/
Scene.prototype.morphToColumbusView = function (duration) {
let ellipsoid;
@@ -4659,7 +4521,7 @@ Scene.prototype.morphToColumbusView = function (duration) {
/**
* Asynchronously transitions the scene to 3D.
- * @param {number} [duration=2.0] The amount of time, in seconds, for transition animations to complete.
+ * @param {number} [duration] The amount of time, in seconds, for transition animations to complete.
*/
Scene.prototype.morphTo3D = function (duration) {
let ellipsoid;
@@ -4701,14 +4563,11 @@ function setTerrain(scene, terrain) {
/**
* Update the terrain providing surface geometry for the globe.
- *
* @param {Terrain} terrain The terrain provider async helper
* @returns {Terrain} terrain The terrain provider async helper
- *
* @example
* // Use Cesium World Terrain
* scene.setTerrain(Cesium.Terrain.fromWorldTerrain());
- *
* @example
* // Use a custom terrain provider
* const terrain = new Cesium.Terrain(Cesium.CesiumTerrainProvider.fromUrl("https://myTestTerrain.com"));
@@ -4733,9 +4592,7 @@ Scene.prototype.setTerrain = function (terrain) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see Scene#destroy
*/
Scene.prototype.isDestroyed = function () {
@@ -4749,13 +4606,9 @@ Scene.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* scene = scene && scene.destroy();
- *
* @see Scene#isDestroyed
*/
Scene.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/SceneMode.js b/packages/engine/Source/Scene/SceneMode.js
index 2905c53cb827..daffcc763186 100644
--- a/packages/engine/Source/Scene/SceneMode.js
+++ b/packages/engine/Source/Scene/SceneMode.js
@@ -1,13 +1,11 @@
/**
* Indicates if the scene is viewed in 3D, 2D, or 2.5D Columbus view.
- *
* @enum {number}
* @see Scene#mode
*/
const SceneMode = {
/**
* Morphing between mode, e.g., 3D to 2D.
- *
* @type {number}
* @constant
*/
@@ -16,7 +14,6 @@ const SceneMode = {
/**
* Columbus View mode. A 2.5D perspective view where the map is laid out
* flat and objects with non-zero height are drawn above it.
- *
* @type {number}
* @constant
*/
@@ -24,7 +21,6 @@ const SceneMode = {
/**
* 2D mode. The map is viewed top-down with an orthographic projection.
- *
* @type {number}
* @constant
*/
@@ -32,7 +28,6 @@ const SceneMode = {
/**
* 3D mode. A traditional 3D perspective view of the globe.
- *
* @type {number}
* @constant
*/
@@ -41,7 +36,6 @@ const SceneMode = {
/**
* Returns the morph time for the given scene mode.
- *
* @param {SceneMode} value The scene mode
* @returns {number} The morph time
*/
diff --git a/packages/engine/Source/Scene/SceneTransforms.js b/packages/engine/Source/Scene/SceneTransforms.js
index ec23eb924987..af9397e726b5 100644
--- a/packages/engine/Source/Scene/SceneTransforms.js
+++ b/packages/engine/Source/Scene/SceneTransforms.js
@@ -14,7 +14,6 @@ import SceneMode from "./SceneMode.js";
/**
* Functions that do scene-dependent transforms between rendering-related coordinate systems.
- *
* @namespace SceneTransforms
*/
const SceneTransforms = {};
@@ -29,12 +28,10 @@ const scratchWindowCoord1 = new Cartesian2();
/**
* Transforms a position in WGS84 coordinates to window coordinates. This is commonly used to place an
* HTML element at the same screen position as an object in the scene.
- *
* @param {Scene} scene The scene.
* @param {Cartesian3} position The position in WGS84 (world) coordinates.
* @param {Cartesian2} [result] An optional object to return the input position transformed to window coordinates.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if one was not provided. This may be undefined
if the input position is near the center of the ellipsoid.
- *
* @example
* // Output the window position of longitude/latitude (0, 0) every time the mouse moves.
* const scene = widget.scene;
@@ -96,6 +93,10 @@ const scratchProjectedCartesian = new Cartesian3();
const scratchCameraPosition = new Cartesian3();
/**
+ * @param scene
+ * @param position
+ * @param eyeOffset
+ * @param result
* @private
*/
SceneTransforms.wgs84WithEyeOffsetToWindowCoordinates = function (
@@ -267,12 +268,10 @@ SceneTransforms.wgs84WithEyeOffsetToWindowCoordinates = function (
/**
* Transforms a position in WGS84 coordinates to drawing buffer coordinates. This may produce different
* results from SceneTransforms.wgs84ToWindowCoordinates when the browser zoom is not 100%, or on high-DPI displays.
- *
* @param {Scene} scene The scene.
* @param {Cartesian3} position The position in WGS84 (world) coordinates.
* @param {Cartesian2} [result] An optional object to return the input position transformed to window coordinates.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if one was not provided. This may be undefined
if the input position is near the center of the ellipsoid.
- *
* @example
* // Output the window position of longitude/latitude (0, 0) every time the mouse moves.
* const scene = widget.scene;
@@ -300,6 +299,9 @@ const projectedPosition = new Cartesian3();
const positionInCartographic = new Cartographic();
/**
+ * @param frameState
+ * @param position
+ * @param result
* @private
*/
SceneTransforms.computeActualWgs84Position = function (
@@ -357,6 +359,9 @@ const positionWC = new Cartesian3();
const viewportTransform = new Matrix4();
/**
+ * @param viewport
+ * @param position
+ * @param result
* @private
*/
SceneTransforms.clipToGLWindowCoordinates = function (
@@ -375,6 +380,9 @@ SceneTransforms.clipToGLWindowCoordinates = function (
};
/**
+ * @param scene
+ * @param windowPosition
+ * @param result
* @private
*/
SceneTransforms.transformWindowToDrawingBuffer = function (
@@ -396,6 +404,10 @@ const scratchNDC = new Cartesian4();
const scratchWorldCoords = new Cartesian4();
/**
+ * @param scene
+ * @param drawingBufferPosition
+ * @param depth
+ * @param result
* @private
*/
SceneTransforms.drawingBufferToWgs84Coordinates = function (
diff --git a/packages/engine/Source/Scene/SceneTransitioner.js b/packages/engine/Source/Scene/SceneTransitioner.js
index c8f9e0f24c26..da5d28e554cb 100644
--- a/packages/engine/Source/Scene/SceneTransitioner.js
+++ b/packages/engine/Source/Scene/SceneTransitioner.js
@@ -17,6 +17,7 @@ import Camera from "./Camera.js";
import SceneMode from "./SceneMode.js";
/**
+ * @param scene
* @private
*/
function SceneTransitioner(scene) {
@@ -298,7 +299,6 @@ SceneTransitioner.prototype.morphTo3D = function (duration, ellipsoid) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
*/
SceneTransitioner.prototype.isDestroyed = function () {
@@ -309,9 +309,7 @@ SceneTransitioner.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* transitioner = transitioner && transitioner.destroy();
*/
diff --git a/packages/engine/Source/Scene/ScreenSpaceCameraController.js b/packages/engine/Source/Scene/ScreenSpaceCameraController.js
index eb47b352dea5..471abd5a1078 100644
--- a/packages/engine/Source/Scene/ScreenSpaceCameraController.js
+++ b/packages/engine/Source/Scene/ScreenSpaceCameraController.js
@@ -29,8 +29,7 @@ import TweenCollection from "./TweenCollection.js";
/**
* Modifies the camera position and orientation based on mouse input to a canvas.
* @alias ScreenSpaceCameraController
- * @constructor
- *
+ * @class
* @param {Scene} scene The scene.
*/
function ScreenSpaceCameraController(scene) {
@@ -3031,9 +3030,7 @@ ScreenSpaceCameraController.prototype.update = function () {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see ScreenSpaceCameraController#destroy
*/
ScreenSpaceCameraController.prototype.isDestroyed = function () {
@@ -3046,13 +3043,9 @@ ScreenSpaceCameraController.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* controller = controller && controller.destroy();
- *
* @see ScreenSpaceCameraController#isDestroyed
*/
ScreenSpaceCameraController.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/SensorVolumePortionToDisplay.js b/packages/engine/Source/Scene/SensorVolumePortionToDisplay.js
index 98a3389b9e0c..2be32d70eed6 100644
--- a/packages/engine/Source/Scene/SensorVolumePortionToDisplay.js
+++ b/packages/engine/Source/Scene/SensorVolumePortionToDisplay.js
@@ -2,28 +2,24 @@ import DeveloperError from "../Core/DeveloperError.js";
/**
* Constants used to indicated what part of the sensor volume to display.
- *
- * @enum {Number}
+ * @enum {number}
*/
const SensorVolumePortionToDisplay = {
/**
* 0x0000. Display the complete sensor volume.
- *
- * @type {Number}
+ * @type {number}
* @constant
*/
COMPLETE: 0x0000,
/**
* 0x0001. Display the portion of the sensor volume that lies below the true horizon of the ellipsoid.
- *
- * @type {Number}
+ * @type {number}
* @constant
*/
BELOW_ELLIPSOID_HORIZON: 0x0001,
/**
* 0x0002. Display the portion of the sensor volume that lies above the true horizon of the ellipsoid.
- *
- * @type {Number}
+ * @type {number}
* @constant
*/
ABOVE_ELLIPSOID_HORIZON: 0x0002,
@@ -31,10 +27,8 @@ const SensorVolumePortionToDisplay = {
/**
* Validates that the provided value is a valid {@link SensorVolumePortionToDisplay} enumeration value.
- *
* @param {SensorVolumePortionToDisplay} portionToDisplay The value to validate.
- *
- * @returns {Boolean} true
if the provided value is a valid enumeration value; otherwise, false
.
+ * @returns {boolean} true
if the provided value is a valid enumeration value; otherwise, false
.
*/
SensorVolumePortionToDisplay.validate = function (portionToDisplay) {
return (
@@ -46,10 +40,8 @@ SensorVolumePortionToDisplay.validate = function (portionToDisplay) {
/**
* Converts the provided value to its corresponding enumeration string.
- *
* @param {SensorVolumePortionToDisplay} portionToDisplay The value to be converted to its corresponding enumeration string.
- *
- * @returns {String} The enumeration string corresponding to the value.
+ * @returns {string} The enumeration string corresponding to the value.
*/
SensorVolumePortionToDisplay.toString = function (portionToDisplay) {
switch (portionToDisplay) {
diff --git a/packages/engine/Source/Scene/ShadowMap.js b/packages/engine/Source/Scene/ShadowMap.js
index 3d8aaf1bd858..4959b9d4a7ca 100644
--- a/packages/engine/Source/Scene/ShadowMap.js
+++ b/packages/engine/Source/Scene/ShadowMap.js
@@ -54,11 +54,10 @@ import ShadowMapShader from "./ShadowMapShader.js";
* The normalOffset bias pushes the shadows forward slightly, and may be disabled
* for applications that require ultra precise shadows.
*
- *
* @alias ShadowMap
* @internalConstructor
* @class
- *
+ * @param options
* @privateParam {object} options An object containing the following properties:
* @privateParam {Context} options.context The context
* @privateParam {Camera} options.lightCamera A camera representing the light source.
@@ -73,9 +72,7 @@ import ShadowMapShader from "./ShadowMapShader.js";
* @privateParam {number} [options.darkness=0.3] The shadow darkness.
* @privateParam {boolean} [options.normalOffset=true] Whether a normal bias is applied to shadows.
* @privateParam {boolean} [options.fadingEnabled=true] Whether shadows start to fade out once the light gets closer to the horizon.
- *
- * @exception {DeveloperError} Only one or four cascades are supported.
- *
+ * @throws {DeveloperError} Only one or four cascades are supported.
* @demo {@link https://sandcastle.cesium.com/index.html?src=Shadows.html|Cesium Sandcastle Shadows Demo}
*/
function ShadowMap(options) {
@@ -106,14 +103,12 @@ function ShadowMap(options) {
/**
* Specifies whether the shadow map originates from a light source. Shadow maps that are used for analytical
* purposes should set this to false so as not to affect scene rendering.
- *
* @private
*/
this.fromLightSource = defaultValue(options.fromLightSource, true);
/**
* Determines the darkness of the shadows.
- *
* @type {number}
* @default 0.3
*/
@@ -122,7 +117,6 @@ function ShadowMap(options) {
/**
* Determines whether shadows start to fade out once the light gets closer to the horizon.
- *
* @type {boolean}
* @default true
*/
@@ -130,7 +124,6 @@ function ShadowMap(options) {
/**
* Determines the maximum distance of the shadow map. Only applicable for cascaded shadows. Larger distances may result in lower quality shadows.
- *
* @type {number}
* @default 5000.0
*/
@@ -288,7 +281,6 @@ function ShadowMap(options) {
/**
* Global maximum shadow distance used to prevent far off receivers from extending
* the shadow far plane. This helps set a tighter near/far when viewing objects from space.
- *
* @private
*/
ShadowMap.MAXIMUM_DISTANCE = 20000.0;
@@ -353,7 +345,6 @@ ShadowMap.prototype.debugCreateRenderStates = function () {
Object.defineProperties(ShadowMap.prototype, {
/**
* Determines if the shadow map will be shown.
- *
* @memberof ShadowMap.prototype
* @type {boolean}
* @default true
@@ -370,7 +361,6 @@ Object.defineProperties(ShadowMap.prototype, {
/**
* Determines if a normal bias will be applied to shadows.
- *
* @memberof ShadowMap.prototype
* @type {boolean}
* @default true
@@ -390,7 +380,6 @@ Object.defineProperties(ShadowMap.prototype, {
/**
* Determines if soft shadows are enabled. Uses pcf filtering which requires more texture reads and may hurt performance.
- *
* @memberof ShadowMap.prototype
* @type {boolean}
* @default false
@@ -407,7 +396,6 @@ Object.defineProperties(ShadowMap.prototype, {
/**
* The width and height, in pixels, of each shadow map.
- *
* @memberof ShadowMap.prototype
* @type {number}
* @default 2048
@@ -423,7 +411,6 @@ Object.defineProperties(ShadowMap.prototype, {
/**
* Whether the shadow map is out of view of the scene camera.
- *
* @memberof ShadowMap.prototype
* @type {boolean}
* @readonly
@@ -437,7 +424,6 @@ Object.defineProperties(ShadowMap.prototype, {
/**
* The culling volume of the shadow frustum.
- *
* @memberof ShadowMap.prototype
* @type {CullingVolume}
* @readonly
@@ -451,7 +437,6 @@ Object.defineProperties(ShadowMap.prototype, {
/**
* The passes used for rendering shadows. Each face of a point light or each cascade for a cascaded shadow map is a separate pass.
- *
* @memberof ShadowMap.prototype
* @type {ShadowPass[]}
* @readonly
@@ -465,7 +450,6 @@ Object.defineProperties(ShadowMap.prototype, {
/**
* Whether the light source is a point light.
- *
* @memberof ShadowMap.prototype
* @type {boolean}
* @readonly
@@ -479,7 +463,6 @@ Object.defineProperties(ShadowMap.prototype, {
/**
* Debug option for visualizing the cascades by color.
- *
* @memberof ShadowMap.prototype
* @type {boolean}
* @default false
@@ -1558,6 +1541,7 @@ function updateCameras(shadowMap, frameState) {
}
/**
+ * @param frameState
* @private
*/
ShadowMap.prototype.update = function (frameState) {
@@ -1618,6 +1602,8 @@ ShadowMap.prototype.update = function (frameState) {
};
/**
+ * @param context
+ * @param shadowPass
* @private
*/
ShadowMap.prototype.updatePass = function (context, shadowPass) {
diff --git a/packages/engine/Source/Scene/ShadowMode.js b/packages/engine/Source/Scene/ShadowMode.js
index df6e77ddce2d..6bfbe3dfb63b 100644
--- a/packages/engine/Source/Scene/ShadowMode.js
+++ b/packages/engine/Source/Scene/ShadowMode.js
@@ -1,13 +1,11 @@
/**
* Specifies whether the object casts or receives shadows from light sources when
* shadows are enabled.
- *
* @enum {number}
*/
const ShadowMode = {
/**
* The object does not cast or receive shadows.
- *
* @type {number}
* @constant
*/
@@ -15,7 +13,6 @@ const ShadowMode = {
/**
* The object casts and receives shadows.
- *
* @type {number}
* @constant
*/
@@ -23,7 +20,6 @@ const ShadowMode = {
/**
* The object casts shadows only.
- *
* @type {number}
* @constant
*/
@@ -31,7 +27,6 @@ const ShadowMode = {
/**
* The object receives shadows only.
- *
* @type {number}
* @constant
*/
@@ -44,6 +39,7 @@ const ShadowMode = {
ShadowMode.NUMBER_OF_SHADOW_MODES = 4;
/**
+ * @param shadowMode
* @private
*/
ShadowMode.castShadows = function (shadowMode) {
@@ -53,6 +49,7 @@ ShadowMode.castShadows = function (shadowMode) {
};
/**
+ * @param shadowMode
* @private
*/
ShadowMode.receiveShadows = function (shadowMode) {
@@ -62,6 +59,8 @@ ShadowMode.receiveShadows = function (shadowMode) {
};
/**
+ * @param castShadows
+ * @param receiveShadows
* @private
*/
ShadowMode.fromCastReceive = function (castShadows, receiveShadows) {
diff --git a/packages/engine/Source/Scene/ShadowVolumeAppearance.js b/packages/engine/Source/Scene/ShadowVolumeAppearance.js
index 1e6f0603486f..228659fba86d 100644
--- a/packages/engine/Source/Scene/ShadowVolumeAppearance.js
+++ b/packages/engine/Source/Scene/ShadowVolumeAppearance.js
@@ -17,7 +17,6 @@ import ShadowVolumeAppearanceFS from "../Shaders/ShadowVolumeAppearanceFS.js";
/**
* Creates shaders for a ClassificationPrimitive to use a given Appearance, as well as for picking.
- *
* @param {boolean} extentsCulling Discard fragments outside the instance's texture coordinate extents.
* @param {boolean} planarExtents If true, texture coordinates will be computed using planes instead of spherical coordinates.
* @param {Appearance} appearance An Appearance to be used with a ClassificationPrimitive via GroundPrimitive.
@@ -72,7 +71,6 @@ function ShadowVolumeAppearance(extentsCulling, planarExtents, appearance) {
/**
* Create the fragment shader for a ClassificationPrimitive's color pass when rendering for color.
- *
* @param {boolean} columbusView2D Whether the shader will be used for Columbus View or 2D.
* @returns {ShaderSource} Shader source for the fragment shader.
*/
@@ -174,7 +172,6 @@ ShadowVolumeAppearance.prototype.createPickFragmentShader = function (
/**
* Create the vertex shader for a ClassificationPrimitive's color pass on the final of 3 shadow volume passes
- *
* @param {string[]} defines External defines to pass to the vertex shader.
* @param {string} vertexShaderSource ShadowVolumeAppearanceVS with any required modifications for computing position.
* @param {boolean} columbusView2D Whether the shader will be used for Columbus View or 2D.
@@ -207,7 +204,6 @@ ShadowVolumeAppearance.prototype.createVertexShader = function (
/**
* Create the vertex shader for a ClassificationPrimitive's pick pass on the final of 3 shadow volume passes
- *
* @param {string[]} defines External defines to pass to the vertex shader.
* @param {string} vertexShaderSource ShadowVolumeAppearanceVS with any required modifications for computing position and picking.
* @param {boolean} columbusView2D Whether the shader will be used for Columbus View or 2D.
@@ -561,7 +557,12 @@ const pointsCartographicScratch = [
* Flatten the ellipsoid-centered corners and edge-centers of the rectangle
* into the plane of the local ENU system, compute bounds in 2D, and
* project back to ellipsoid-centered.
- *
+ * @param rectangle
+ * @param ellipsoid
+ * @param height
+ * @param southWestCornerResult
+ * @param eastVectorResult
+ * @param northVectorResult
* @private
*/
function computeRectangleBounds(
@@ -667,18 +668,16 @@ const encodeScratch = new EncodedCartesian3();
* - 3 high-precision points as 6 GeometryInstanceAttributes. These points are used to compute eye-space planes.
* - 1 texture coordinate rotation GeometryInstanceAttributes
* - 2 GeometryInstanceAttributes used to compute high-precision points in 2D and Columbus View.
- * These points are used to compute eye-space planes like above.
+ * These points are used to compute eye-space planes like above.
*
* Used to compute texture coordinates for small-area ClassificationPrimitives with materials or multiple non-overlapping instances.
- *
* @see ShadowVolumeAppearance
* @private
- *
* @param {Rectangle} boundingRectangle Rectangle object that the points will approximately bound
* @param {number[]} textureCoordinateRotationPoints Points in the computed texture coordinate system for remapping texture coordinates
* @param {Ellipsoid} ellipsoid Ellipsoid for converting Rectangle points to world coordinates
* @param {MapProjection} projection The MapProjection used for 2D and Columbus View.
- * @param {number} [height=0] The maximum height for the shadow volume.
+ * @param {number} [height] The maximum height for the shadow volume.
* @returns {object} An attributes dictionary containing planar texture coordinate attributes.
*/
ShadowVolumeAppearance.getPlanarTextureCoordinateAttributes = function (
@@ -791,7 +790,6 @@ const sphericalScratch = new Cartesian2();
* multiple non-overlapping instances.
* @see ShadowVolumeAppearance
* @private
- *
* @param {Rectangle} boundingRectangle Rectangle object that the spherical extents will approximately bound
* @param {number[]} textureCoordinateRotationPoints Points in the computed texture coordinate system for remapping texture coordinates
* @param {Ellipsoid} ellipsoid Ellipsoid for converting Rectangle points to world coordinates
@@ -913,7 +911,6 @@ function shouldUseSpherical(rectangle) {
/**
* Computes whether the given rectangle is wide enough that texture coordinates
* over its area should be computed using spherical extents instead of distance to planes.
- *
* @param {Rectangle} rectangle A rectangle
* @private
*/
@@ -928,7 +925,6 @@ ShadowVolumeAppearance.shouldUseSphericalCoordinates = function (rectangle) {
/**
* Texture coordinates for ground primitives are computed either using spherical coordinates for large areas or
* using distance from planes for small areas.
- *
* @type {number}
* @constant
* @private
diff --git a/packages/engine/Source/Scene/SingleTileImageryProvider.js b/packages/engine/Source/Scene/SingleTileImageryProvider.js
index 0487027ae47f..3a530d779296 100644
--- a/packages/engine/Source/Scene/SingleTileImageryProvider.js
+++ b/packages/engine/Source/Scene/SingleTileImageryProvider.js
@@ -14,7 +14,6 @@ import ImageryProvider from "./ImageryProvider.js";
* @typedef {object} SingleTileImageryProvider.ConstructorOptions
*
* Initialization options for the SingleTileImageryProvider constructor
- *
* @property {Resource|string} url The url for the tile.
* @property {number} [tileWidth] The width of the tile, in pixels.
* @property {number} [tileHeight] The height of the tile, in pixels.
@@ -27,12 +26,9 @@ import ImageryProvider from "./ImageryProvider.js";
* Provides a single, top-level imagery tile. The single image is assumed to be in
* the Geographic projection (i.e. WGS84 / EPSG:4326),
* and will be rendered using a {@link GeographicTilingScheme}.
- *
* @alias SingleTileImageryProvider
- * @constructor
- *
+ * @class
* @param {SingleTileImageryProvider.ConstructorOptions} options Object describing initialization options
- *
* @see ArcGisMapServerImageryProvider
* @see BingMapsImageryProvider
* @see GoogleEarthEnterpriseMapsProvider
@@ -283,21 +279,19 @@ async function doRequest(resource, provider, previousError) {
}
/**
- * @typedef {Object} SingleTileImageryProvider.fromUrlOptions
+ * @typedef {object} SingleTileImageryProvider.fromUrlOptions
*
* Initialization options for the SingleTileImageryProvider constructor when using SingleTileImageryProvider.fromUrl
- *
* @property {Rectangle} [rectangle=Rectangle.MAX_VALUE] The rectangle, in radians, covered by the image.
- * @property {Credit|String} [credit] A credit for the data source, which is displayed on the canvas.
+ * @property {Credit | string} [credit] A credit for the data source, which is displayed on the canvas.
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
*/
/**
* Creates a provider for a single, top-level imagery tile. The single image is assumed to use a
- * @param {Resource|String} url The url for the tile
+ * @param {Resource | string} url The url for the tile
* @param {SingleTileImageryProvider.fromUrlOptions} [options] Object describing initialization options.
* @returns {Promise.} The resolved SingleTileImageryProvider.
- *
* @example
* const provider = await SingleTileImageryProvider.fromUrl("https://yoururl.com/image.png");
*/
@@ -322,7 +316,6 @@ SingleTileImageryProvider.fromUrl = async function (url, options) {
/**
* Gets the credits to be displayed when a given tile is displayed.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level;
@@ -334,7 +327,6 @@ SingleTileImageryProvider.prototype.getTileCredits = function (x, y, level) {
/**
* Requests the image for a given tile.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
@@ -360,13 +352,12 @@ SingleTileImageryProvider.prototype.requestImage = async function (
/**
* Picking features is not currently supported by this imagery provider, so this function simply returns
* undefined.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
* @param {number} longitude The longitude at which to pick features.
* @param {number} latitude The latitude at which to pick features.
- * @return {undefined} Undefined since picking is not supported.
+ * @returns {undefined} Undefined since picking is not supported.
*/
SingleTileImageryProvider.prototype.pickFeatures = function (
x,
diff --git a/packages/engine/Source/Scene/SkyAtmosphere.js b/packages/engine/Source/Scene/SkyAtmosphere.js
index 628737ce5610..22458d42a888 100644
--- a/packages/engine/Source/Scene/SkyAtmosphere.js
+++ b/packages/engine/Source/Scene/SkyAtmosphere.js
@@ -29,15 +29,11 @@ import SceneMode from "./SceneMode.js";
*
* This is only supported in 3D. Atmosphere is faded out when morphing to 2D or Columbus view.
*
- *
* @alias SkyAtmosphere
- * @constructor
- *
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid that the atmosphere is drawn around.
- *
+ * @class
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid that the atmosphere is drawn around.
* @example
* scene.skyAtmosphere = new Cesium.SkyAtmosphere();
- *
* @see Scene.skyAtmosphere
*/
function SkyAtmosphere(ellipsoid) {
@@ -45,7 +41,6 @@ function SkyAtmosphere(ellipsoid) {
/**
* Determines if the atmosphere is shown.
- *
* @type {boolean}
* @default true
*/
@@ -54,7 +49,6 @@ function SkyAtmosphere(ellipsoid) {
/**
* Compute atmosphere per-fragment instead of per-vertex.
* This produces better looking atmosphere with a slight performance penalty.
- *
* @type {boolean}
* @default false
*/
@@ -82,7 +76,6 @@ function SkyAtmosphere(ellipsoid) {
/**
* The intensity of the light that is used for computing the sky atmosphere color.
- *
* @type {number}
* @default 50.0
*/
@@ -90,7 +83,6 @@ function SkyAtmosphere(ellipsoid) {
/**
* The Rayleigh scattering coefficient used in the atmospheric scattering equations for the sky atmosphere.
- *
* @type {Cartesian3}
* @default Cartesian3(5.5e-6, 13.0e-6, 28.4e-6)
*/
@@ -98,7 +90,6 @@ function SkyAtmosphere(ellipsoid) {
/**
* The Mie scattering coefficient used in the atmospheric scattering equations for the sky atmosphere.
- *
* @type {Cartesian3}
* @default Cartesian3(21e-6, 21e-6, 21e-6)
*/
@@ -106,7 +97,6 @@ function SkyAtmosphere(ellipsoid) {
/**
* The Rayleigh scale height used in the atmospheric scattering equations for the sky atmosphere, in meters.
- *
* @type {number}
* @default 10000.0
*/
@@ -114,7 +104,6 @@ function SkyAtmosphere(ellipsoid) {
/**
* The Mie scale height used in the atmospheric scattering equations for the sky atmosphere, in meters.
- *
* @type {number}
* @default 3200.0
*/
@@ -205,7 +194,6 @@ Object.defineProperties(SkyAtmosphere.prototype, {
/**
* Gets the ellipsoid the atmosphere is drawn around.
* @memberof SkyAtmosphere.prototype
- *
* @type {Ellipsoid}
* @readonly
*/
@@ -219,7 +207,6 @@ Object.defineProperties(SkyAtmosphere.prototype, {
/**
* Set the dynamic lighting enum value for the shader
* @param {DynamicAtmosphereLightingType} lightingEnum The enum that determines the dynamic atmosphere light source
- *
* @private
*/
SkyAtmosphere.prototype.setDynamicLighting = function (lightingEnum) {
@@ -229,6 +216,8 @@ SkyAtmosphere.prototype.setDynamicLighting = function (lightingEnum) {
const scratchModelMatrix = new Matrix4();
/**
+ * @param frameState
+ * @param globe
* @private
*/
SkyAtmosphere.prototype.update = function (frameState, globe) {
@@ -366,9 +355,7 @@ function hasColorCorrection(skyAtmosphere) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see SkyAtmosphere#destroy
*/
SkyAtmosphere.prototype.isDestroyed = function () {
@@ -382,13 +369,9 @@ SkyAtmosphere.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* skyAtmosphere = skyAtmosphere && skyAtmosphere.destroy();
- *
* @see SkyAtmosphere#isDestroyed
*/
SkyAtmosphere.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/SkyBox.js b/packages/engine/Source/Scene/SkyBox.js
index e7a11fdebfbf..c44ff607465c 100644
--- a/packages/engine/Source/Scene/SkyBox.js
+++ b/packages/engine/Source/Scene/SkyBox.js
@@ -26,15 +26,11 @@ import SceneMode from "./SceneMode.js";
* This is only supported in 3D. The sky box is faded out when morphing to 2D or Columbus view. The size of
* the sky box must not exceed {@link Scene#maximumCubeMapSize}.
*
- *
* @alias SkyBox
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {object} [options.sources] The source URL or Image
object for each of the six cube map faces. See the example below.
- * @param {boolean} [options.show=true] Determines if this primitive will be shown.
- *
- *
+ * @param {boolean} [options.show] Determines if this primitive will be shown.
* @example
* scene.skyBox = new Cesium.SkyBox({
* sources : {
@@ -46,7 +42,6 @@ import SceneMode from "./SceneMode.js";
* negativeZ : 'skybox_nz.png'
* }
* });
- *
* @see Scene#skyBox
* @see Transforms.computeTemeToPseudoFixedMatrix
*/
@@ -56,7 +51,6 @@ function SkyBox(options) {
* with positiveX
, negativeX
, positiveY
,
* negativeY
, positiveZ
, and negativeZ
properties.
* These can be either URLs or Image
objects.
- *
* @type {object}
* @default undefined
*/
@@ -65,7 +59,6 @@ function SkyBox(options) {
/**
* Determines if the sky box will be shown.
- *
* @type {boolean}
* @default true
*/
@@ -88,9 +81,10 @@ function SkyBox(options) {
* Do not call this function directly. This is documented just to
* list the exceptions that may be propagated when the scene is rendered:
*
- *
- * @exception {DeveloperError} this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.
- * @exception {DeveloperError} this.sources properties must all be the same type.
+ * @param frameState
+ * @param useHdr
+ * @throws {DeveloperError} this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.
+ * @throws {DeveloperError} this.sources properties must all be the same type.
*/
SkyBox.prototype.update = function (frameState, useHdr) {
const that = this;
@@ -216,9 +210,7 @@ SkyBox.prototype.update = function (frameState, useHdr) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see SkyBox#destroy
*/
SkyBox.prototype.isDestroyed = function () {
@@ -232,13 +224,9 @@ SkyBox.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* skyBox = skyBox && skyBox.destroy();
- *
* @see SkyBox#isDestroyed
*/
SkyBox.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/SpatialNode.js b/packages/engine/Source/Scene/SpatialNode.js
index 2cd71600211c..f9c3c8d67f32 100644
--- a/packages/engine/Source/Scene/SpatialNode.js
+++ b/packages/engine/Source/Scene/SpatialNode.js
@@ -9,8 +9,7 @@ import OrientedBoundingBox from "../Core/OrientedBoundingBox.js";
/**
* @alias SpatialNode
- * @constructor
- *
+ * @class
* @param {number} level
* @param {number} x
* @param {number} y
@@ -18,7 +17,6 @@ import OrientedBoundingBox from "../Core/OrientedBoundingBox.js";
* @param {SpatialNode} parent
* @param {VoxelShape} shape
* @param {Cartesian3} voxelDimensions
- *
* @private
*/
function SpatialNode(level, x, y, z, parent, shape, voxelDimensions) {
@@ -170,7 +168,6 @@ function findKeyframeIndex(keyframe, keyframeNodes) {
/**
* Computes the most suitable keyframes for rendering, balancing between temporal and visual quality.
- *
* @param {number} keyframeLocation
*/
SpatialNode.prototype.computeSurroundingRenderableKeyframeNodes = function (
diff --git a/packages/engine/Source/Scene/SphereEmitter.js b/packages/engine/Source/Scene/SphereEmitter.js
index 4925d0847225..7e49f8f6ead5 100644
--- a/packages/engine/Source/Scene/SphereEmitter.js
+++ b/packages/engine/Source/Scene/SphereEmitter.js
@@ -6,11 +6,9 @@ import CesiumMath from "../Core/Math.js";
/**
* A ParticleEmitter that emits particles within a sphere.
* Particles will be positioned randomly within the sphere and have initial velocities emanating from the center of the sphere.
- *
* @alias SphereEmitter
- * @constructor
- *
- * @param {number} [radius=1.0] The radius of the sphere in meters.
+ * @class
+ * @param {number} [radius] The radius of the sphere in meters.
*/
function SphereEmitter(radius) {
radius = defaultValue(radius, 1.0);
@@ -44,7 +42,6 @@ Object.defineProperties(SphereEmitter.prototype, {
/**
* Initializes the given {Particle} by setting it's position and velocity.
- *
* @private
* @param {Particle} particle The particle to initialize
*/
diff --git a/packages/engine/Source/Scene/SplitDirection.js b/packages/engine/Source/Scene/SplitDirection.js
index 5d23aa289fbf..341eda7797f7 100644
--- a/packages/engine/Source/Scene/SplitDirection.js
+++ b/packages/engine/Source/Scene/SplitDirection.js
@@ -1,15 +1,12 @@
/**
* The direction to display a primitive or ImageryLayer relative to the {@link Scene#splitPosition}.
- *
* @enum {number}
- *
* @see ImageryLayer#splitDirection
* @see Cesium3DTileset#splitDirection
*/
const SplitDirection = {
/**
* Display the primitive or ImageryLayer to the left of the {@link Scene#splitPosition}.
- *
* @type {number}
* @constant
*/
@@ -17,7 +14,6 @@ const SplitDirection = {
/**
* Always display the primitive or ImageryLayer.
- *
* @type {number}
* @constant
*/
@@ -25,7 +21,6 @@ const SplitDirection = {
/**
* Display the primitive or ImageryLayer to the right of the {@link Scene#splitPosition}.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Scene/Splitter.js b/packages/engine/Source/Scene/Splitter.js
index f27bd9d9bfb5..5a447d0d15f5 100644
--- a/packages/engine/Source/Scene/Splitter.js
+++ b/packages/engine/Source/Scene/Splitter.js
@@ -2,7 +2,6 @@ import ShaderSource from "../Renderer/ShaderSource.js";
/**
* Support for rendering things on only one side of the screen.
- *
* @private
*/
const Splitter = {
@@ -13,6 +12,7 @@ const Splitter = {
* `czm_splitDirection`, which can be added by calling
* {@link Splitter#addUniforms}, and the split position is given by an
* automatic uniform called `czm_splitPosition`.
+ * @param shader
*/
modifyFragmentShader: function modifyFragmentShader(shader) {
shader = ShaderSource.replaceMain(shader, "czm_splitter_main");
@@ -35,7 +35,6 @@ const Splitter = {
/**
* Add `czm_splitDirection` to the given uniform map.
- *
* @param {object} object The object on which the `splitDirection` property may be found.
* @param {object} uniformMap The uniform map.
*/
diff --git a/packages/engine/Source/Scene/StencilConstants.js b/packages/engine/Source/Scene/StencilConstants.js
index 19e7ba720619..8f9da2886dcf 100644
--- a/packages/engine/Source/Scene/StencilConstants.js
+++ b/packages/engine/Source/Scene/StencilConstants.js
@@ -5,7 +5,6 @@ import StencilOperation from "./StencilOperation.js";
* The most significant bit is used to identify whether the pixel is 3D Tiles.
* The next three bits store selection depth for the skip LODs optimization.
* The last four bits are for increment/decrement shadow volume operations for classification.
- *
* @private
*/
const StencilConstants = {
diff --git a/packages/engine/Source/Scene/StencilFunction.js b/packages/engine/Source/Scene/StencilFunction.js
index d7ac2c6d2fea..307ecc4f5dd9 100644
--- a/packages/engine/Source/Scene/StencilFunction.js
+++ b/packages/engine/Source/Scene/StencilFunction.js
@@ -2,13 +2,11 @@ import WebGLConstants from "../Core/WebGLConstants.js";
/**
* Determines the function used to compare stencil values for the stencil test.
- *
* @enum {number}
*/
const StencilFunction = {
/**
* The stencil test never passes.
- *
* @type {number}
* @constant
*/
@@ -16,7 +14,6 @@ const StencilFunction = {
/**
* The stencil test passes when the masked reference value is less than the masked stencil value.
- *
* @type {number}
* @constant
*/
@@ -24,7 +21,6 @@ const StencilFunction = {
/**
* The stencil test passes when the masked reference value is equal to the masked stencil value.
- *
* @type {number}
* @constant
*/
@@ -32,7 +28,6 @@ const StencilFunction = {
/**
* The stencil test passes when the masked reference value is less than or equal to the masked stencil value.
- *
* @type {number}
* @constant
*/
@@ -40,7 +35,6 @@ const StencilFunction = {
/**
* The stencil test passes when the masked reference value is greater than the masked stencil value.
- *
* @type {number}
* @constant
*/
@@ -48,7 +42,6 @@ const StencilFunction = {
/**
* The stencil test passes when the masked reference value is not equal to the masked stencil value.
- *
* @type {number}
* @constant
*/
@@ -56,7 +49,6 @@ const StencilFunction = {
/**
* The stencil test passes when the masked reference value is greater than or equal to the masked stencil value.
- *
* @type {number}
* @constant
*/
@@ -64,7 +56,6 @@ const StencilFunction = {
/**
* The stencil test always passes.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Scene/StencilOperation.js b/packages/engine/Source/Scene/StencilOperation.js
index 4781a9e53fa1..0ea9420fa316 100644
--- a/packages/engine/Source/Scene/StencilOperation.js
+++ b/packages/engine/Source/Scene/StencilOperation.js
@@ -2,13 +2,11 @@ import WebGLConstants from "../Core/WebGLConstants.js";
/**
* Determines the action taken based on the result of the stencil test.
- *
* @enum {number}
*/
const StencilOperation = {
/**
* Sets the stencil buffer value to zero.
- *
* @type {number}
* @constant
*/
@@ -16,7 +14,6 @@ const StencilOperation = {
/**
* Does not change the stencil buffer.
- *
* @type {number}
* @constant
*/
@@ -24,7 +21,6 @@ const StencilOperation = {
/**
* Replaces the stencil buffer value with the reference value.
- *
* @type {number}
* @constant
*/
@@ -32,7 +28,6 @@ const StencilOperation = {
/**
* Increments the stencil buffer value, clamping to unsigned byte.
- *
* @type {number}
* @constant
*/
@@ -40,7 +35,6 @@ const StencilOperation = {
/**
* Decrements the stencil buffer value, clamping to zero.
- *
* @type {number}
* @constant
*/
@@ -48,7 +42,6 @@ const StencilOperation = {
/**
* Bitwise inverts the existing stencil buffer value.
- *
* @type {number}
* @constant
*/
@@ -56,7 +49,6 @@ const StencilOperation = {
/**
* Increments the stencil buffer value, wrapping to zero when exceeding the unsigned byte range.
- *
* @type {number}
* @constant
*/
@@ -64,7 +56,6 @@ const StencilOperation = {
/**
* Decrements the stencil buffer value, wrapping to the maximum unsigned byte instead of going below zero.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Scene/StructuralMetadata.js b/packages/engine/Source/Scene/StructuralMetadata.js
index 5d9fae62e338..446444bc3633 100644
--- a/packages/engine/Source/Scene/StructuralMetadata.js
+++ b/packages/engine/Source/Scene/StructuralMetadata.js
@@ -8,7 +8,6 @@ import defined from "../Core/defined.js";
* See the {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_structural_metadata|EXT_structural_metadata Extension} as well as the
* previous {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata|EXT_feature_metadata Extension} for glTF.
*
- *
* @param {object} options Object with the following properties:
* @param {MetadataSchema} options.schema The parsed schema.
* @param {PropertyTable[]} [options.propertyTables] An array of property table objects. For the legacy EXT_feature_metadata
extension, this is sorted by the key in the propertyTables dictionary
@@ -17,10 +16,8 @@ import defined from "../Core/defined.js";
* @param {object} [options.statistics] Statistics about metadata
* @param {object} [options.extras] Extra user-defined properties
* @param {object} [options.extensions] An object containing extensions
- *
* @alias StructuralMetadata
- * @constructor
- *
+ * @class
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -46,7 +43,6 @@ function StructuralMetadata(options) {
Object.defineProperties(StructuralMetadata.prototype, {
/**
* Schema containing classes and enums.
- *
* @memberof StructuralMetadata.prototype
* @type {MetadataSchema}
* @readonly
@@ -63,7 +59,6 @@ Object.defineProperties(StructuralMetadata.prototype, {
*
* See the {@link https://github.com/CesiumGS/glTF/blob/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata/schema/statistics.schema.json|statistics schema reference} for the full set of properties.
*
- *
* @memberof StructuralMetadata.prototype
* @type {object}
* @readonly
@@ -77,7 +72,6 @@ Object.defineProperties(StructuralMetadata.prototype, {
/**
* Extra user-defined properties.
- *
* @memberof StructuralMetadata.prototype
* @type {*}
* @readonly
@@ -91,7 +85,6 @@ Object.defineProperties(StructuralMetadata.prototype, {
/**
* An object containing extensions.
- *
* @memberof StructuralMetadata.prototype
* @type {object}
* @readonly
@@ -105,7 +98,6 @@ Object.defineProperties(StructuralMetadata.prototype, {
/**
* Number of property tables in the metadata.
- *
* @memberof StructuralMetadata.prototype
* @type {number}
* @readonly
@@ -119,7 +111,6 @@ Object.defineProperties(StructuralMetadata.prototype, {
/**
* The property tables in the metadata.
- *
* @memberof StructuralMetadata.prototype
* @type {PropertyTable[]}
* @readonly
@@ -133,7 +124,6 @@ Object.defineProperties(StructuralMetadata.prototype, {
/**
* The property textures in the metadata.
- *
* @memberof StructuralMetadata.prototype
* @type {PropertyTexture[]}
* @readonly
@@ -147,7 +137,6 @@ Object.defineProperties(StructuralMetadata.prototype, {
/**
* The property attributes from the structural metadata extension
- *
* @memberof StructuralMetadata.prototype
* @type {PropertyAttribute[]}
* @readonly
@@ -161,7 +150,6 @@ Object.defineProperties(StructuralMetadata.prototype, {
/**
* Total size in bytes across all property tables
- *
* @memberof StructuralMetadata.prototype
* @type {number}
* @readonly
@@ -190,7 +178,6 @@ Object.defineProperties(StructuralMetadata.prototype, {
* For the legacy EXT_feature_metadata
, textures are stored in an array sorted
* by the key in the propertyTables dictionary.
*
- *
* @param {number} propertyTableId The property table ID.
* @returns {PropertyTable} The property table.
* @private
@@ -209,7 +196,6 @@ StructuralMetadata.prototype.getPropertyTable = function (propertyTableId) {
* For the legacy EXT_feature_metadata
, textures are stored in an array sorted
* by the key in the propertyTextures dictionary.
*
- *
* @param {number} propertyTextureId The index into the property textures array.
* @returns {PropertyTexture} The property texture
* @private
@@ -225,7 +211,6 @@ StructuralMetadata.prototype.getPropertyTexture = function (propertyTextureId) {
/**
* Gets the property attribute with the given ID. This concept is new in
* EXT_structural_metadata
- *
* @param {number} propertyAttributeId The index into the property attributes array.
* @returns {PropertyAttribute} The property attribute
* @private
diff --git a/packages/engine/Source/Scene/StyleExpression.js b/packages/engine/Source/Scene/StyleExpression.js
index 10e49410f645..4e2dbd693d8e 100644
--- a/packages/engine/Source/Scene/StyleExpression.js
+++ b/packages/engine/Source/Scene/StyleExpression.js
@@ -9,10 +9,8 @@ import DeveloperError from "../Core/DeveloperError.js";
*
* This type describes an interface and is not intended to be instantiated directly.
*
- *
* @alias StyleExpression
- * @constructor
- *
+ * @class
* @see Expression
* @see ConditionsExpression
*/
@@ -27,7 +25,6 @@ function StyleExpression() {}
* object will be returned. If the result is a Cartesian2
, Cartesian3
, or Cartesian4
,
* a {@link Cartesian2}, {@link Cartesian3}, or {@link Cartesian4} object will be returned. If the result
argument is
* a {@link Color}, the {@link Cartesian4} value is converted to a {@link Color} and then returned.
- *
* @param {Cesium3DTileFeature} feature The feature whose properties may be used as variables in the expression.
* @param {object} [result] The object onto which to store the result.
* @returns {boolean|number|string|RegExp|Cartesian2|Cartesian3|Cartesian4|Color} The result of evaluating the expression.
@@ -41,7 +38,6 @@ StyleExpression.prototype.evaluate = function (feature, result) {
*
* This is equivalent to {@link StyleExpression#evaluate} but always returns a {@link Color} object.
*
- *
* @param {Cesium3DTileFeature} feature The feature whose properties may be used as variables in the expression.
* @param {Color} [result] The object in which to store the result.
* @returns {Color} The modified result parameter or a new Color instance if one was not provided.
@@ -53,14 +49,11 @@ StyleExpression.prototype.evaluateColor = function (feature, result) {
/**
* Gets the shader function for this expression.
* Returns undefined if the shader function can't be generated from this expression.
- *
* @param {string} functionSignature Signature of the generated function.
* @param {object} variableSubstitutionMap Maps variable names to shader variable names.
* @param {object} shaderState Stores information about the generated shader function, including whether it is translucent.
* @param {string} returnType The return type of the generated function.
- *
* @returns {string} The shader function.
- *
* @private
*/
StyleExpression.prototype.getShaderFunction = function (
@@ -74,9 +67,7 @@ StyleExpression.prototype.getShaderFunction = function (
/**
* Gets the variables used by the expression.
- *
* @returns {string[]} The variables used by the expression.
- *
* @private
*/
StyleExpression.prototype.getVariables = function () {
diff --git a/packages/engine/Source/Scene/Sun.js b/packages/engine/Source/Scene/Sun.js
index f109882c6871..75357e67e5b9 100644
--- a/packages/engine/Source/Scene/Sun.js
+++ b/packages/engine/Source/Scene/Sun.js
@@ -29,20 +29,15 @@ import SceneTransforms from "./SceneTransforms.js";
/**
* Draws a sun billboard.
* This is only supported in 3D and Columbus view.
- *
* @alias Sun
- * @constructor
- *
- *
+ * @class
* @example
* scene.sun = new Cesium.Sun();
- *
* @see Scene#sun
*/
function Sun() {
/**
* Determines if the sun will be shown.
- *
* @type {boolean}
* @default true
*/
@@ -87,7 +82,6 @@ Object.defineProperties(Sun.prototype, {
* Gets or sets a number that controls how "bright" the Sun's lens flare appears
* to be. Zero shows just the Sun's disc without any flare.
* Use larger values for a more pronounced flare around the Sun.
- *
* @memberof Sun.prototype
* @type {number}
* @default 1.0
@@ -110,6 +104,9 @@ const scratchPositionEC = new Cartesian4();
const scratchCartesian4 = new Cartesian4();
/**
+ * @param frameState
+ * @param passState
+ * @param useHdr
* @private
*/
Sun.prototype.update = function (frameState, passState, useHdr) {
@@ -321,9 +318,7 @@ Sun.prototype.update = function (frameState, passState, useHdr) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see Sun#destroy
*/
Sun.prototype.isDestroyed = function () {
@@ -337,13 +332,9 @@ Sun.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* sun = sun && sun.destroy();
- *
* @see Sun#isDestroyed
*/
Sun.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/SunLight.js b/packages/engine/Source/Scene/SunLight.js
index a0441da23979..070b771c2afc 100644
--- a/packages/engine/Source/Scene/SunLight.js
+++ b/packages/engine/Source/Scene/SunLight.js
@@ -3,13 +3,11 @@ import defaultValue from "../Core/defaultValue.js";
/**
* A directional light source that originates from the Sun.
- *
* @param {object} [options] Object with the following properties:
- * @param {Color} [options.color=Color.WHITE] The light's color.
- * @param {number} [options.intensity=2.0] The light's intensity.
- *
+ * @param {Color} [options.color] The light's color.
+ * @param {number} [options.intensity] The light's intensity.
* @alias SunLight
- * @constructor
+ * @class
*/
function SunLight(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
diff --git a/packages/engine/Source/Scene/SupportedImageFormats.js b/packages/engine/Source/Scene/SupportedImageFormats.js
index f98a33e32015..d5487f18dc4a 100644
--- a/packages/engine/Source/Scene/SupportedImageFormats.js
+++ b/packages/engine/Source/Scene/SupportedImageFormats.js
@@ -2,11 +2,9 @@ import defaultValue from "../Core/defaultValue.js";
/**
* Image formats supported by the browser.
- *
* @param {object} [options] Object with the following properties:
- * @param {boolean} [options.webp=false] Whether the browser supports WebP images.
- * @param {boolean} [options.basis=false] Whether the browser supports compressed textures required to view KTX2 + Basis Universal images.
- *
+ * @param {boolean} [options.webp] Whether the browser supports WebP images.
+ * @param {boolean} [options.basis] Whether the browser supports compressed textures required to view KTX2 + Basis Universal images.
* @private
*/
function SupportedImageFormats(options) {
diff --git a/packages/engine/Source/Scene/Terrain.js b/packages/engine/Source/Scene/Terrain.js
index aa1dedf0c2d3..50e8f7595ed5 100644
--- a/packages/engine/Source/Scene/Terrain.js
+++ b/packages/engine/Source/Scene/Terrain.js
@@ -5,21 +5,17 @@ import createWorldTerrainAsync from "../Core/createWorldTerrainAsync.js";
/**
* A helper to manage async operations of a terrain provider.
- *
* @alias Terrain
- * @constructor
- *
+ * @class
* @see Terrain.fromWorldTerrain
* @see CesiumTerrainProvider
* @see VRTheWorldTerrainProvider
* @see GoogleEarthEnterpriseTerrainProvider
- *
* @example
* // Create
* const viewer = new Cesium.Viewer("cesiumContainer", {
* terrain: new Cesium.Terrain(Cesium.CesiumTerrainProvider.fromUrl("https://myTestTerrain.com"));
* });
- *
* @example
* // Handle loading events
* const terrain = new Cesium.Terrain(Cesium.CesiumTerrainProvider.fromUrl("https://myTestTerrain.com"));
@@ -37,7 +33,6 @@ import createWorldTerrainAsync from "../Core/createWorldTerrainAsync.js";
* terrain.errorEvent.addEventListener(error => {
* alert(`Encountered an error while creating terrain! ${error}`);
* });
- *
* @param {Promise} terrainProviderPromise A promise which resolves to a terrain provider
*/
function Terrain(terrainProviderPromise) {
@@ -84,7 +79,6 @@ Object.defineProperties(Terrain.prototype, {
/**
* Returns true when the terrain provider has been successfully created. Otherwise, returns false.
* @memberof Terrain.prototype
- *
* @type {boolean}
* @readonly
*/
@@ -97,7 +91,6 @@ Object.defineProperties(Terrain.prototype, {
/**
* The terrain provider providing surface geometry to a globe. Do not use until {@link Terrain.readyEvent} is raised.
* @memberof Terrain.prototype
- *
* @type {TerrainProvider}
* @readonly
*/
@@ -109,23 +102,18 @@ Object.defineProperties(Terrain.prototype, {
});
/**
* Creates a {@link Terrain} instance for {@link https://cesium.com/content/#cesium-world-terrain|Cesium World Terrain}.
- *
* @function
- *
- * @param {Object} [options] Object with the following properties:
- * @param {Boolean} [options.requestVertexNormals=false] Flag that indicates if the client should request additional lighting information from the server if available.
- * @param {Boolean} [options.requestWaterMask=false] Flag that indicates if the client should request per tile water masks from the server if available.
+ * @param {object} [options] Object with the following properties:
+ * @param {boolean} [options.requestVertexNormals] Flag that indicates if the client should request additional lighting information from the server if available.
+ * @param {boolean} [options.requestWaterMask] Flag that indicates if the client should request per tile water masks from the server if available.
* @returns {Terrain} An asynchronous helper object for a CesiumTerrainProvider
- *
* @see Ion
* @see createWorldTerrainAsync
- *
* @example
* // Create Cesium World Terrain with default settings
* const viewer = new Cesium.Viewer("cesiumContainer", {
* terrain: Cesium.Terrain.fromWorldTerrain()
* });
- *
* @example
* // Create Cesium World Terrain with water and normals.
* const viewer1 = new Cesium.Viewer("cesiumContainer", {
@@ -134,7 +122,6 @@ Object.defineProperties(Terrain.prototype, {
* requestVertexNormals: true
* });
* });
- *
* @example
* // Handle loading events
* const terrain = Cesium.Terrain.fromWorldTerrain();
@@ -159,22 +146,17 @@ Terrain.fromWorldTerrain = function (options) {
/**
* Creates a {@link Terrain} instance for {@link https://cesium.com/content/#cesium-world-bathymetry|Cesium World Bathymetry}.
- *
* @function
- *
- * @param {Object} [options] Object with the following properties:
- * @param {Boolean} [options.requestVertexNormals=false] Flag that indicates if the client should request additional lighting information from the server if available.
+ * @param {object} [options] Object with the following properties:
+ * @param {boolean} [options.requestVertexNormals] Flag that indicates if the client should request additional lighting information from the server if available.
* @returns {Terrain} An asynchronous helper object for a CesiumTerrainProvider
- *
* @see Ion
* @see createWorldBathymetryAsync
- *
* @example
* // Create Cesium World Bathymetry with default settings
* const viewer = new Cesium.Viewer("cesiumContainer", {
* terrain: Cesium.Terrain.fromWorldBathymetry)
* });
- *
* @example
* // Create Cesium World Terrain with normals.
* const viewer1 = new Cesium.Viewer("cesiumContainer", {
@@ -182,7 +164,6 @@ Terrain.fromWorldTerrain = function (options) {
* requestVertexNormals: true
* });
* });
- *
* @example
* // Handle loading events
* const bathymetry = Cesium.Terrain.fromWorldBathymetry();
@@ -231,7 +212,6 @@ export default Terrain;
/**
* A function that is called when an error occurs.
* @callback Terrain.ErrorEventCallback
- *
* @this Terrain
* @param {Error} err An object holding details about the error that occurred.
*/
@@ -239,7 +219,6 @@ export default Terrain;
/**
* A function that is called when the provider has been created
* @callback Terrain.ReadyEventCallback
- *
* @this Terrain
* @param {TerrainProvider} provider The created terrain provider.
*/
diff --git a/packages/engine/Source/Scene/TextureAtlas.js b/packages/engine/Source/Scene/TextureAtlas.js
index d53cf10b1ac9..bf39479204d0 100644
--- a/packages/engine/Source/Scene/TextureAtlas.js
+++ b/packages/engine/Source/Scene/TextureAtlas.js
@@ -34,19 +34,15 @@ const defaultInitialSize = new Cartesian2(16.0, 16.0);
* meaning new images can be added at any point in time.
* Texture coordinates are subject to change if the texture atlas resizes, so it is
* important to check {@link TextureAtlas#getGUID} before using old values.
- *
* @alias TextureAtlas
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Scene} options.context The context in which the texture gets created.
- * @param {PixelFormat} [options.pixelFormat=PixelFormat.RGBA] The pixel format of the texture.
- * @param {number} [options.borderWidthInPixels=1] The amount of spacing between adjacent images in pixels.
- * @param {Cartesian2} [options.initialSize=new Cartesian2(16.0, 16.0)] The initial side lengths of the texture.
- *
- * @exception {DeveloperError} borderWidthInPixels must be greater than or equal to zero.
- * @exception {DeveloperError} initialSize must be greater than zero.
- *
+ * @param {PixelFormat} [options.pixelFormat] The pixel format of the texture.
+ * @param {number} [options.borderWidthInPixels] The amount of spacing between adjacent images in pixels.
+ * @param {Cartesian2} [options.initialSize] The initial side lengths of the texture.
+ * @throws {DeveloperError} borderWidthInPixels must be greater than or equal to zero.
+ * @throws {DeveloperError} initialSize must be greater than zero.
* @private
*/
function TextureAtlas(options) {
@@ -367,7 +363,6 @@ function getIndex(atlas, image) {
/**
* If the image is already in the atlas, the existing index is returned. Otherwise, the result is undefined.
- *
* @param {string} id An identifier to detect whether the image already exists in the atlas.
* @returns {number|undefined} The image index, or undefined if the image does not exist in the atlas.
*/
@@ -384,7 +379,6 @@ TextureAtlas.prototype.getImageIndex = function (id) {
/**
* Adds an image to the atlas synchronously. If the image is already in the atlas, the atlas is unchanged and
* the existing index is used.
- *
* @param {string} id An identifier to detect whether the image already exists in the atlas.
* @param {HTMLImageElement|HTMLCanvasElement} image An image or canvas to add to the texture atlas.
* @returns {number} The image index.
@@ -416,7 +410,6 @@ TextureAtlas.prototype.addImageSync = function (id, image) {
/**
* Adds an image to the atlas. If the image is already in the atlas, the atlas is unchanged and
* the existing index is used.
- *
* @param {string} id An identifier to detect whether the image already exists in the atlas.
* @param {HTMLImageElement|HTMLCanvasElement|string|Resource|Promise|TextureAtlas.CreateImageCallback} image An image or canvas to add to the texture atlas,
* or a URL to an Image, or a Promise for an image, or a function that creates an image.
@@ -469,10 +462,8 @@ TextureAtlas.prototype.addImage = function (id, image) {
/**
* Add a sub-region of an existing atlas image as additional image indices.
- *
* @param {string} id The identifier of the existing image.
* @param {BoundingRectangle} subRegion An {@link BoundingRectangle} sub-region measured in pixels from the bottom-left.
- *
* @returns {Promise} A Promise for the image index.
*/
TextureAtlas.prototype.addSubRegion = function (id, subRegion) {
@@ -519,9 +510,7 @@ TextureAtlas.prototype.addSubRegion = function (id, subRegion) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
- *
* @see TextureAtlas#destroy
*/
TextureAtlas.prototype.isDestroyed = function () {
@@ -535,13 +524,9 @@ TextureAtlas.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* atlas = atlas && atlas.destroy();
- *
* @see TextureAtlas#isDestroyed
*/
TextureAtlas.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/TileBoundingRegion.js b/packages/engine/Source/Scene/TileBoundingRegion.js
index 733907695de2..2443c35bc725 100644
--- a/packages/engine/Source/Scene/TileBoundingRegion.js
+++ b/packages/engine/Source/Scene/TileBoundingRegion.js
@@ -21,16 +21,14 @@ import SceneMode from "./SceneMode.js";
/**
* A tile bounding volume specified as a longitude/latitude/height region.
* @alias TileBoundingRegion
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Rectangle} options.rectangle The rectangle specifying the longitude and latitude range of the region.
- * @param {number} [options.minimumHeight=0.0] The minimum height of the region.
- * @param {number} [options.maximumHeight=0.0] The maximum height of the region.
- * @param {Ellipsoid} [options.ellipsoid=Cesium.Ellipsoid.WGS84] The ellipsoid.
- * @param {boolean} [options.computeBoundingVolumes=true] True to compute the {@link TileBoundingRegion#boundingVolume} and
+ * @param {number} [options.minimumHeight] The minimum height of the region.
+ * @param {number} [options.maximumHeight] The maximum height of the region.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid.
+ * @param {boolean} [options.computeBoundingVolumes] True to compute the {@link TileBoundingRegion#boundingVolume} and
* {@link TileBoundingVolume#boundingSphere}. If false, these properties will be undefined.
- *
* @private
*/
function TileBoundingRegion(options) {
@@ -45,7 +43,6 @@ function TileBoundingRegion(options) {
/**
* The world coordinates of the southwest corner of the tile's rectangle.
- *
* @type {Cartesian3}
* @default Cartesian3()
*/
@@ -53,7 +50,6 @@ function TileBoundingRegion(options) {
/**
* The world coordinates of the northeast corner of the tile's rectangle.
- *
* @type {Cartesian3}
* @default Cartesian3()
*/
@@ -62,7 +58,6 @@ function TileBoundingRegion(options) {
/**
* A normal that, along with southwestCornerCartesian, defines a plane at the western edge of
* the tile. Any position above (in the direction of the normal) this plane is outside the tile.
- *
* @type {Cartesian3}
* @default Cartesian3()
*/
@@ -73,7 +68,6 @@ function TileBoundingRegion(options) {
* the tile. Any position above (in the direction of the normal) this plane is outside the tile.
* Because points of constant latitude do not necessary lie in a plane, positions below this
* plane are not necessarily inside the tile, but they are close.
- *
* @type {Cartesian3}
* @default Cartesian3()
*/
@@ -82,7 +76,6 @@ function TileBoundingRegion(options) {
/**
* A normal that, along with northeastCornerCartesian, defines a plane at the eastern edge of
* the tile. Any position above (in the direction of the normal) this plane is outside the tile.
- *
* @type {Cartesian3}
* @default Cartesian3()
*/
@@ -93,7 +86,6 @@ function TileBoundingRegion(options) {
* the tile. Any position above (in the direction of the normal) this plane is outside the tile.
* Because points of constant latitude do not necessary lie in a plane, positions below this
* plane are not necessarily inside the tile, but they are close.
- *
* @type {Cartesian3}
* @default Cartesian3()
*/
@@ -113,9 +105,7 @@ function TileBoundingRegion(options) {
Object.defineProperties(TileBoundingRegion.prototype, {
/**
* The underlying bounding volume
- *
* @memberof TileBoundingRegion.prototype
- *
* @type {object}
* @readonly
*/
@@ -126,9 +116,7 @@ Object.defineProperties(TileBoundingRegion.prototype, {
},
/**
* The underlying bounding sphere
- *
* @memberof TileBoundingRegion.prototype
- *
* @type {BoundingSphere}
* @readonly
*/
@@ -412,7 +400,6 @@ function distanceToCameraRegion(tileBB, frameState) {
/**
* Gets the distance from the camera to the closest point on the tile. This is used for level of detail selection.
- *
* @param {FrameState} frameState The state information of the current rendering frame.
* @returns {number} The distance from the camera to the closest point on the tile, in meters.
*/
@@ -436,7 +423,6 @@ TileBoundingRegion.prototype.distanceToCamera = function (frameState) {
/**
* Determines which side of a plane this box is located.
- *
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire box is on the side of the plane
* the normal is pointing, {@link Intersect.OUTSIDE} if the entire box is
@@ -452,10 +438,8 @@ TileBoundingRegion.prototype.intersectPlane = function (plane) {
/**
* Creates a debug primitive that shows the outline of the tile bounding region.
- *
* @param {Color} color The desired color of the primitive's mesh
- * @return {Primitive}
- *
+ * @returns {Primitive}
* @private
*/
TileBoundingRegion.prototype.createDebugVolume = function (color) {
diff --git a/packages/engine/Source/Scene/TileBoundingS2Cell.js b/packages/engine/Source/Scene/TileBoundingS2Cell.js
index 307fa36c8e39..d2f1b8e24ac4 100644
--- a/packages/engine/Source/Scene/TileBoundingS2Cell.js
+++ b/packages/engine/Source/Scene/TileBoundingS2Cell.js
@@ -19,18 +19,15 @@ let centerCartographicScratch = new Cartographic();
/**
* A tile bounding volume specified as an S2 cell token with minimum and maximum heights.
* The bounding volume is a k DOP. A k-DOP is the Boolean intersection of extents along k directions.
- *
* @alias TileBoundingS2Cell
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {string} options.token The token of the S2 cell.
- * @param {number} [options.minimumHeight=0.0] The minimum height of the bounding volume.
- * @param {number} [options.maximumHeight=0.0] The maximum height of the bounding volume.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid.
- * @param {boolean} [options.computeBoundingVolumes=true] True to compute the {@link TileBoundingS2Cell#boundingVolume} and
+ * @param {number} [options.minimumHeight] The minimum height of the bounding volume.
+ * @param {number} [options.maximumHeight] The maximum height of the bounding volume.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid.
+ * @param {boolean} [options.computeBoundingVolumes] True to compute the {@link TileBoundingS2Cell#boundingVolume} and
* {@link TileBoundingS2Cell#boundingSphere}. If false, these properties will be undefined.
- *
* @private
*/
function TileBoundingS2Cell(options) {
@@ -130,6 +127,10 @@ const sideNormalScratch = new Cartesian3();
const sideScratch = new Cartesian3();
/**
* Computes bounding planes of the kDOP.
+ * @param s2Cell
+ * @param minimumHeight
+ * @param maximumHeight
+ * @param ellipsoid
* @private
*/
function computeBoundingPlanes(
@@ -230,6 +231,9 @@ let sScratch = new Cartesian3();
const matrixScratch = new Matrix3();
/**
* Computes intersection of 3 planes.
+ * @param p0
+ * @param p1
+ * @param p2
* @private
*/
function computeIntersection(p0, p1, p2) {
@@ -277,6 +281,7 @@ function computeIntersection(p0, p1, p2) {
}
/**
* Compute the vertices of the kDOP.
+ * @param boundingPlanes
* @private
*/
function computeVertices(boundingPlanes) {
@@ -302,6 +307,8 @@ let edgeScratch = new Cartesian3();
let edgeNormalScratch = new Cartesian3();
/**
* Compute edge normals on a plane.
+ * @param plane
+ * @param vertices
* @private
*/
function computeEdgeNormals(plane, vertices) {
@@ -329,9 +336,7 @@ function computeEdgeNormals(plane, vertices) {
Object.defineProperties(TileBoundingS2Cell.prototype, {
/**
* The underlying bounding volume.
- *
* @memberof TileBoundingS2Cell.prototype
- *
* @type {object}
* @readonly
*/
@@ -342,9 +347,7 @@ Object.defineProperties(TileBoundingS2Cell.prototype, {
},
/**
* The underlying bounding sphere.
- *
* @memberof TileBoundingS2Cell.prototype
- *
* @type {BoundingSphere}
* @readonly
*/
@@ -387,6 +390,7 @@ const facePointScratch = new Cartesian3();
*
* Case IV: There are more than three planes selected.
* Since we are on an ellipsoid, this will only happen in the bottom plane, which is what we will use for the distance test.
+ * @param frameState
*/
TileBoundingS2Cell.prototype.distanceToCamera = function (frameState) {
//>>includeStart('debug', pragmas.debug);
@@ -513,6 +517,9 @@ const dScratch = new Cartesian3();
const pL0Scratch = new Cartesian3();
/**
* Finds point on a line segment closest to a given point.
+ * @param p
+ * @param l0
+ * @param l1
* @private
*/
function closestPointLineSegment(p, l0, l1) {
@@ -541,6 +548,10 @@ const edgePlaneScratch = new Plane(Cartesian3.UNIT_X, 0.0);
/**
* Finds closes point on the polygon, created by the given vertices, from
* a point. The test point and the polygon are all on the same plane.
+ * @param p
+ * @param vertices
+ * @param plane
+ * @param edgeNormals
* @private
*/
function closestPointPolygon(p, vertices, plane, edgeNormals) {
@@ -584,7 +595,6 @@ function closestPointPolygon(p, vertices, plane, edgeNormals) {
/**
* Determines which side of a plane this volume is located.
- *
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire volume is on the side of the plane
* the normal is pointing, {@link Intersect.OUTSIDE} if the entire volume is
@@ -619,9 +629,8 @@ TileBoundingS2Cell.prototype.intersectPlane = function (plane) {
/**
* Creates a debug primitive that shows the outline of the tile bounding
* volume.
- *
* @param {Color} color The desired color of the primitive's mesh
- * @return {Primitive}
+ * @returns {Primitive}
*/
TileBoundingS2Cell.prototype.createDebugVolume = function (color) {
//>>includeStart('debug', pragmas.debug);
diff --git a/packages/engine/Source/Scene/TileBoundingSphere.js b/packages/engine/Source/Scene/TileBoundingSphere.js
index 3e517c1a1fa1..97fa61a5f8e4 100644
--- a/packages/engine/Source/Scene/TileBoundingSphere.js
+++ b/packages/engine/Source/Scene/TileBoundingSphere.js
@@ -12,11 +12,9 @@ import Primitive from "./Primitive.js";
/**
* A tile bounding volume specified as a sphere.
* @alias TileBoundingSphere
- * @constructor
- *
- * @param {Cartesian3} [center=Cartesian3.ZERO] The center of the bounding sphere.
- * @param {number} [radius=0.0] The radius of the bounding sphere.
- *
+ * @class
+ * @param {Cartesian3} [center] The center of the bounding sphere.
+ * @param {number} [radius] The radius of the bounding sphere.
* @private
*/
function TileBoundingSphere(center, radius) {
@@ -29,9 +27,7 @@ function TileBoundingSphere(center, radius) {
Object.defineProperties(TileBoundingSphere.prototype, {
/**
* The center of the bounding sphere
- *
* @memberof TileBoundingSphere.prototype
- *
* @type {Cartesian3}
* @readonly
*/
@@ -43,9 +39,7 @@ Object.defineProperties(TileBoundingSphere.prototype, {
/**
* The radius of the bounding sphere
- *
* @memberof TileBoundingSphere.prototype
- *
* @type {number}
* @readonly
*/
@@ -57,9 +51,7 @@ Object.defineProperties(TileBoundingSphere.prototype, {
/**
* The underlying bounding volume
- *
* @memberof TileBoundingSphere.prototype
- *
* @type {object}
* @readonly
*/
@@ -70,9 +62,7 @@ Object.defineProperties(TileBoundingSphere.prototype, {
},
/**
* The underlying bounding sphere
- *
* @memberof TileBoundingSphere.prototype
- *
* @type {BoundingSphere}
* @readonly
*/
@@ -85,10 +75,8 @@ Object.defineProperties(TileBoundingSphere.prototype, {
/**
* Computes the distance between this bounding sphere and the camera attached to frameState.
- *
* @param {FrameState} frameState The frameState to which the camera is attached.
* @returns {number} The distance between the camera and the bounding sphere in meters. Returns 0 if the camera is inside the bounding volume.
- *
*/
TileBoundingSphere.prototype.distanceToCamera = function (frameState) {
//>>includeStart('debug', pragmas.debug);
@@ -104,7 +92,6 @@ TileBoundingSphere.prototype.distanceToCamera = function (frameState) {
/**
* Determines which side of a plane this sphere is located.
- *
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire sphere is on the side of the plane
* the normal is pointing, {@link Intersect.OUTSIDE} if the entire sphere is
@@ -120,7 +107,6 @@ TileBoundingSphere.prototype.intersectPlane = function (plane) {
/**
* Update the bounding sphere after the tile is transformed.
- *
* @param {Cartesian3} center The center of the bounding sphere.
* @param {number} radius The radius of the bounding sphere.
*/
@@ -131,9 +117,8 @@ TileBoundingSphere.prototype.update = function (center, radius) {
/**
* Creates a debug primitive that shows the outline of the sphere.
- *
* @param {Color} color The desired color of the primitive's mesh
- * @return {Primitive}
+ * @returns {Primitive}
*/
TileBoundingSphere.prototype.createDebugVolume = function (color) {
//>>includeStart('debug', pragmas.debug);
diff --git a/packages/engine/Source/Scene/TileBoundingVolume.js b/packages/engine/Source/Scene/TileBoundingVolume.js
index f7c027edc16c..5c5e57372206 100644
--- a/packages/engine/Source/Scene/TileBoundingVolume.js
+++ b/packages/engine/Source/Scene/TileBoundingVolume.js
@@ -3,21 +3,17 @@ import DeveloperError from "../Core/DeveloperError.js";
/**
* Defines a bounding volume for a tile. This type describes an interface
* and is not intended to be instantiated directly.
- *
* @alias TileBoundingVolume
- * @constructor
- *
+ * @class
* @see TileBoundingRegion
* @see TileBoundingSphere
* @see TileOrientedBoundingBox
- *
* @private
*/
function TileBoundingVolume() {}
/**
* The underlying bounding volume.
- *
* @type {object}
* @readonly
*/
@@ -25,7 +21,6 @@ TileBoundingVolume.prototype.boundingVolume = undefined;
/**
* The underlying bounding sphere.
- *
* @type {BoundingSphere}
* @readonly
*/
@@ -33,9 +28,8 @@ TileBoundingVolume.prototype.boundingSphere = undefined;
/**
* Calculates the distance between the tile and the camera.
- *
* @param {FrameState} frameState The frame state.
- * @return {number} The distance between the tile and the camera, in meters.
+ * @returns {number} The distance between the tile and the camera, in meters.
* Returns 0.0 if the camera is inside the tile.
*/
TileBoundingVolume.prototype.distanceToCamera = function (frameState) {
@@ -44,7 +38,6 @@ TileBoundingVolume.prototype.distanceToCamera = function (frameState) {
/**
* Determines which side of a plane this volume is located.
- *
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire volume is on the side of the plane
* the normal is pointing, {@link Intersect.OUTSIDE} if the entire volume is
@@ -58,9 +51,8 @@ TileBoundingVolume.prototype.intersectPlane = function (plane) {
/**
* Creates a debug primitive that shows the outline of the tile bounding
* volume.
- *
* @param {Color} color The desired color of the primitive's mesh
- * @return {Primitive}
+ * @returns {Primitive}
*/
TileBoundingVolume.prototype.createDebugVolume = function (color) {
DeveloperError.throwInstantiationError();
diff --git a/packages/engine/Source/Scene/TileCoordinatesImageryProvider.js b/packages/engine/Source/Scene/TileCoordinatesImageryProvider.js
index dccdae0df9af..7e51f863960c 100644
--- a/packages/engine/Source/Scene/TileCoordinatesImageryProvider.js
+++ b/packages/engine/Source/Scene/TileCoordinatesImageryProvider.js
@@ -8,7 +8,6 @@ import GeographicTilingScheme from "../Core/GeographicTilingScheme.js";
* @typedef {object} TileCoordinatesImageryProvider.ConstructorOptions
*
* Initialization options for the TileCoordinatesImageryProvider constructor
- *
* @property {TilingScheme} [tilingScheme=new GeographicTilingScheme()] The tiling scheme for which to draw tiles.
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If the tilingScheme is specified,
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
@@ -22,10 +21,8 @@ import GeographicTilingScheme from "../Core/GeographicTilingScheme.js";
* An {@link ImageryProvider} that draws a box around every rendered tile in the tiling scheme, and draws
* a label inside it indicating the X, Y, Level coordinates of the tile. This is mostly useful for
* debugging terrain and imagery rendering problems.
- *
* @alias TileCoordinatesImageryProvider
- * @constructor
- *
+ * @class
* @param {TileCoordinatesImageryProvider.ConstructorOptions} [options] Object describing initialization options
*/
function TileCoordinatesImageryProvider(options) {
@@ -196,7 +193,6 @@ Object.defineProperties(TileCoordinatesImageryProvider.prototype, {
/**
* Gets the credits to be displayed when a given tile is displayed.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level;
@@ -212,7 +208,6 @@ TileCoordinatesImageryProvider.prototype.getTileCredits = function (
/**
* Requests the image for a given tile.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
@@ -249,13 +244,12 @@ TileCoordinatesImageryProvider.prototype.requestImage = function (
/**
* Picking features is not currently supported by this imagery provider, so this function simply returns
* undefined.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
* @param {number} longitude The longitude at which to pick features.
* @param {number} latitude The latitude at which to pick features.
- * @return {undefined} Undefined since picking is not supported.
+ * @returns {undefined} Undefined since picking is not supported.
*/
TileCoordinatesImageryProvider.prototype.pickFeatures = function (
x,
diff --git a/packages/engine/Source/Scene/TileDiscardPolicy.js b/packages/engine/Source/Scene/TileDiscardPolicy.js
index b07424eb0b3a..b7db48388759 100644
--- a/packages/engine/Source/Scene/TileDiscardPolicy.js
+++ b/packages/engine/Source/Scene/TileDiscardPolicy.js
@@ -3,10 +3,9 @@ import DeveloperError from "../Core/DeveloperError.js";
/**
* A policy for discarding tile images according to some criteria. This type describes an
* interface and is not intended to be instantiated directly.
- *
+ * @param options
* @alias TileDiscardPolicy
- * @constructor
- *
+ * @class
* @see DiscardMissingTileImagePolicy
* @see NeverTileDiscardPolicy
*/
@@ -17,7 +16,6 @@ function TileDiscardPolicy(options) {
/**
* Determines if the discard policy is ready to process images.
* @function
- *
* @returns {boolean} True if the discard policy is ready to process images; otherwise, false.
*/
TileDiscardPolicy.prototype.isReady = DeveloperError.throwInstantiationError;
@@ -25,7 +23,6 @@ TileDiscardPolicy.prototype.isReady = DeveloperError.throwInstantiationError;
/**
* Given a tile image, decide whether to discard that image.
* @function
- *
* @param {HTMLImageElement} image An image to test.
* @returns {boolean} True if the image should be discarded; otherwise, false.
*/
diff --git a/packages/engine/Source/Scene/TileImagery.js b/packages/engine/Source/Scene/TileImagery.js
index 5032408bdc38..19b312547718 100644
--- a/packages/engine/Source/Scene/TileImagery.js
+++ b/packages/engine/Source/Scene/TileImagery.js
@@ -3,10 +3,8 @@ import ImageryState from "./ImageryState.js";
/**
* The assocation between a terrain tile and an imagery tile.
- *
* @alias TileImagery
* @private
- *
* @param {Imagery} imagery The imagery tile.
* @param {Cartesian4} textureCoordinateRectangle The texture rectangle of the tile that is covered
* by the imagery, where X=west, Y=south, Z=east, W=north.
@@ -35,7 +33,6 @@ TileImagery.prototype.freeResources = function () {
/**
* Processes the load state machine for this instance.
- *
* @param {Tile} tile The tile to which this instance belongs.
* @param {FrameState} frameState The frameState.
* @param {boolean} skipLoading True to skip loading, e.g. new requests, creating textures. This function will
diff --git a/packages/engine/Source/Scene/TileMapServiceImageryProvider.js b/packages/engine/Source/Scene/TileMapServiceImageryProvider.js
index 1797c545e702..8b8a4c92d070 100644
--- a/packages/engine/Source/Scene/TileMapServiceImageryProvider.js
+++ b/packages/engine/Source/Scene/TileMapServiceImageryProvider.js
@@ -17,7 +17,6 @@ import UrlTemplateImageryProvider from "./UrlTemplateImageryProvider.js";
* @typedef {object} TileMapServiceImageryProvider.ConstructorOptions
*
* Initialization options for the TileMapServiceImageryProvider constructor
- *
* @property {string} [fileExtension='png'] The file extension for images on the server.
* @property {Credit|string} [credit=''] A credit for the data source, which is displayed on the canvas.
* @property {number} [minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when specifying
@@ -45,13 +44,10 @@ import UrlTemplateImageryProvider from "./UrlTemplateImageryProvider.js";
*
* An imagery provider that provides tiled imagery as generated by
* {@link http://www.maptiler.org/|MapTiler}, {@link http://www.klokan.cz/projects/gdal2tiles/|GDAL2Tiles}, etc.
- *
* @alias TileMapServiceImageryProvider
- * @constructor
- * @extends UrlTemplateImageryProvider
- *
+ * @class
+ * @augments UrlTemplateImageryProvider
* @param {TileMapServiceImageryProvider.ConstructorOptions} [options] Object describing initialization options
- *
* @see ArcGisMapServerImageryProvider
* @see BingMapsImageryProvider
* @see GoogleEarthEnterpriseMapsProvider
@@ -60,7 +56,6 @@ import UrlTemplateImageryProvider from "./UrlTemplateImageryProvider.js";
* @see WebMapServiceImageryProvider
* @see WebMapTileServiceImageryProvider
* @see UrlTemplateImageryProvider
- *
* @example
* const tms = await Cesium.TileMapServiceImageryProvider.fromUrl(
* "../images/cesium_maptiler/Cesium_Logo_Color", {
@@ -106,11 +101,9 @@ TileMapServiceImageryProvider._requestMetadata = async function (
};
/**
* Creates a TileMapServiceImageryProvider from the specified url.
- *
- * @param {Resource|String} url Path to image tiles on server.
+ * @param {Resource | string} url Path to image tiles on server.
* @param {TileMapServiceImageryProvider.ConstructorOptions} [options] Object describing initialization options.
* @returns {Promise} A promise that resolves to the created TileMapServiceImageryProvider.
- *
* @example
* const tms = await Cesium.TileMapServiceImageryProvider.fromUrl(
* '../images/cesium_maptiler/Cesium_Logo_Color', {
@@ -122,9 +115,8 @@ TileMapServiceImageryProvider._requestMetadata = async function (
* Cesium.Math.toRadians(-60.0),
* Cesium.Math.toRadians(40.0))
* });
- *
- * @exception {RuntimeError} Unable to find expected tilesets or bbox attributes in tilemapresource.xml
- * @exception {RuntimeError} tilemapresource.xml specifies an unsupported profile attribute
+ * @throws {RuntimeError} Unable to find expected tilesets or bbox attributes in tilemapresource.xml
+ * @throws {RuntimeError} tilemapresource.xml specifies an unsupported profile attribute
*/
TileMapServiceImageryProvider.fromUrl = async function (url, options) {
//>>includeStart('debug', pragmas.debug);
@@ -158,6 +150,8 @@ if (defined(Object.create)) {
/**
* Mutates the properties of a given rectangle so it does not extend outside of the given tiling scheme's rectangle
+ * @param rectangle
+ * @param tilingScheme
* @private
*/
function confineRectangleToTilingScheme(rectangle, tilingScheme) {
@@ -203,9 +197,9 @@ function calculateSafeMinimumDetailLevel(
/**
* Parses the results of a successful xml request
* @private
- *
- * @param {Object} xml
+ * @param {object} xml
* @param {TileMapServiceImageryProvider.ConstructorOptions} options
+ * @param provider
* @param {Resource} tmsResource
* @param {Resource} xmlResource
* @returns {UrlTemplateImageryProvider.ConstructorOptions}
@@ -401,7 +395,6 @@ TileMapServiceImageryProvider._metadataSuccess = function (
/**
* Handle xml request failure by providing the default values
* @private
- *
* @param {TileMapServiceImageryProvider.ConstructorOptions} options
* @param {Resource} tmsResource
* @returns {UrlTemplateImageryProvider.ConstructorOptions}
diff --git a/packages/engine/Source/Scene/TileMetadata.js b/packages/engine/Source/Scene/TileMetadata.js
index c2a62d9643d9..4dc7bdbdd412 100644
--- a/packages/engine/Source/Scene/TileMetadata.js
+++ b/packages/engine/Source/Scene/TileMetadata.js
@@ -8,13 +8,11 @@ import MetadataEntity from "./MetadataEntity.js";
*
* See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_metadata|3DTILES_metadata Extension} for 3D Tiles
*
- *
* @param {object} options Object with the following properties:
* @param {object} options.tile Either the tile metadata JSON (3D Tiles 1.1), or the extension JSON attached to the tile.
* @param {MetadataClass} options.class The class that the tile metadata conforms to.
- *
* @alias TileMetadata
- * @constructor
+ * @class
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -37,7 +35,6 @@ function TileMetadata(options) {
Object.defineProperties(TileMetadata.prototype, {
/**
* The class that properties conform to.
- *
* @memberof TileMetadata.prototype
* @type {MetadataClass}
* @readonly
@@ -51,7 +48,6 @@ Object.defineProperties(TileMetadata.prototype, {
/**
* Extra user-defined properties.
- *
* @memberof TileMetadata.prototype
* @type {object}
* @readonly
@@ -65,7 +61,6 @@ Object.defineProperties(TileMetadata.prototype, {
/**
* An object containing extensions.
- *
* @memberof TileMetadata.prototype
* @type {object}
* @readonly
@@ -80,7 +75,6 @@ Object.defineProperties(TileMetadata.prototype, {
/**
* Returns whether the tile has this property.
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {boolean} Whether the tile has this property.
* @private
@@ -91,7 +85,6 @@ TileMetadata.prototype.hasProperty = function (propertyId) {
/**
* Returns whether the tile has a property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @returns {boolean} Whether the tile has a property with the given semantic.
* @private
@@ -106,7 +99,6 @@ TileMetadata.prototype.hasPropertyBySemantic = function (semantic) {
/**
* Returns an array of property IDs.
- *
* @param {string[]} [results] An array into which to store the results.
* @returns {string[]} The property IDs.
* @private
@@ -120,7 +112,6 @@ TileMetadata.prototype.getPropertyIds = function (results) {
*
* If the property is normalized the normalized value is returned.
*
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {*} The value of the property or undefined
if the tile does not have this property.
* @private
@@ -134,7 +125,6 @@ TileMetadata.prototype.getProperty = function (propertyId) {
*
* If the property is normalized a normalized value must be provided to this function.
*
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @param {*} value The value of the property that will be copied.
* @returns {boolean} true
if the property was set, false
otherwise.
@@ -151,7 +141,6 @@ TileMetadata.prototype.setProperty = function (propertyId, value) {
/**
* Returns a copy of the value of the property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @returns {*} The value of the property or undefined
if the tile does not have this semantic.
* @private
@@ -166,7 +155,6 @@ TileMetadata.prototype.getPropertyBySemantic = function (semantic) {
/**
* Sets the value of the property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @param {*} value The value of the property that will be copied.
* @returns {boolean} true
if the property was set, false
otherwise.
diff --git a/packages/engine/Source/Scene/TileOrientedBoundingBox.js b/packages/engine/Source/Scene/TileOrientedBoundingBox.js
index 40d60451f51f..7a4dafbf4319 100644
--- a/packages/engine/Source/Scene/TileOrientedBoundingBox.js
+++ b/packages/engine/Source/Scene/TileOrientedBoundingBox.js
@@ -83,13 +83,11 @@ function checkHalfAxes(halfAxes) {
/**
* A tile bounding volume specified as an oriented bounding box.
* @alias TileOrientedBoundingBox
- * @constructor
- *
- * @param {Cartesian3} [center=Cartesian3.ZERO] The center of the box.
- * @param {Matrix3} [halfAxes=Matrix3.ZERO] The three orthogonal half-axes of the bounding box.
+ * @class
+ * @param {Cartesian3} [center] The center of the box.
+ * @param {Matrix3} [halfAxes] The three orthogonal half-axes of the bounding box.
* Equivalently, the transformation matrix, to rotate and scale a 2x2x2
* cube centered at the origin.
- *
* @private
*/
function TileOrientedBoundingBox(center, halfAxes) {
@@ -103,9 +101,7 @@ function TileOrientedBoundingBox(center, halfAxes) {
Object.defineProperties(TileOrientedBoundingBox.prototype, {
/**
* The underlying bounding volume.
- *
* @memberof TileOrientedBoundingBox.prototype
- *
* @type {OrientedBoundingBox}
* @readonly
*/
@@ -116,9 +112,7 @@ Object.defineProperties(TileOrientedBoundingBox.prototype, {
},
/**
* The underlying bounding sphere.
- *
* @memberof TileOrientedBoundingBox.prototype
- *
* @type {BoundingSphere}
* @readonly
*/
@@ -131,7 +125,6 @@ Object.defineProperties(TileOrientedBoundingBox.prototype, {
/**
* Computes the distance between this bounding box and the camera attached to frameState.
- *
* @param {FrameState} frameState The frameState to which the camera is attached.
* @returns {number} The distance between the camera and the bounding box in meters. Returns 0 if the camera is inside the bounding volume.
*/
@@ -146,7 +139,6 @@ TileOrientedBoundingBox.prototype.distanceToCamera = function (frameState) {
/**
* Determines which side of a plane this box is located.
- *
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire box is on the side of the plane
* the normal is pointing, {@link Intersect.OUTSIDE} if the entire box is
@@ -162,7 +154,6 @@ TileOrientedBoundingBox.prototype.intersectPlane = function (plane) {
/**
* Update the bounding box after the tile is transformed.
- *
* @param {Cartesian3} center The center of the box.
* @param {Matrix3} halfAxes The three orthogonal half-axes of the bounding box.
* Equivalently, the transformation matrix, to rotate and scale a 2x2x2
@@ -180,9 +171,8 @@ TileOrientedBoundingBox.prototype.update = function (center, halfAxes) {
/**
* Creates a debug primitive that shows the outline of the box.
- *
* @param {Color} color The desired color of the primitive's mesh
- * @return {Primitive}
+ * @returns {Primitive}
*/
TileOrientedBoundingBox.prototype.createDebugVolume = function (color) {
//>>includeStart('debug', pragmas.debug);
diff --git a/packages/engine/Source/Scene/TileReplacementQueue.js b/packages/engine/Source/Scene/TileReplacementQueue.js
index 1d0ccc73c883..c81bae18d85b 100644
--- a/packages/engine/Source/Scene/TileReplacementQueue.js
+++ b/packages/engine/Source/Scene/TileReplacementQueue.js
@@ -3,7 +3,6 @@ import defined from "../Core/defined.js";
/**
* A priority queue of tiles to be replaced, if necessary, to make room for new tiles. The queue
* is implemented as a linked list.
- *
* @alias TileReplacementQueue
* @private
*/
@@ -26,7 +25,6 @@ TileReplacementQueue.prototype.markStartOfRenderFrame = function () {
* Reduces the size of the queue to a specified size by unloading the least-recently used
* tiles. Tiles that were used last frame will not be unloaded, even if that puts the number
* of tiles above the specified maximum.
- *
* @param {number} maximumTiles The maximum number of tiles in the queue.
*/
TileReplacementQueue.prototype.trimTiles = function (maximumTiles) {
@@ -82,7 +80,6 @@ function remove(tileReplacementQueue, item) {
/**
* Marks a tile as rendered this frame and moves it before the first tile that was not rendered
* this frame.
- *
* @param {TileReplacementQueue} item The tile that was rendered.
*/
TileReplacementQueue.prototype.markTileRendered = function (item) {
diff --git a/packages/engine/Source/Scene/TileSelectionResult.js b/packages/engine/Source/Scene/TileSelectionResult.js
index 3f9525f9c152..856813e856d4 100644
--- a/packages/engine/Source/Scene/TileSelectionResult.js
+++ b/packages/engine/Source/Scene/TileSelectionResult.js
@@ -50,7 +50,6 @@ const TileSelectionResult = {
* Determines if a selection result indicates that this tile or its descendants were
* kicked from the render list. In other words, if it is RENDERED_AND_KICKED
* or REFINED_AND_KICKED
.
- *
* @param {TileSelectionResult} value The selection result to test.
* @returns {boolean} true if the tile was kicked, no matter if it was originally rendered or refined.
*/
diff --git a/packages/engine/Source/Scene/Tileset3DTileContent.js b/packages/engine/Source/Scene/Tileset3DTileContent.js
index 41d1652453c1..a6b4b8d3662c 100644
--- a/packages/engine/Source/Scene/Tileset3DTileContent.js
+++ b/packages/engine/Source/Scene/Tileset3DTileContent.js
@@ -7,10 +7,11 @@ import destroyObject from "../Core/destroyObject.js";
*
* Implements the {@link Cesium3DTileContent} interface.
*
- *
+ * @param tileset
+ * @param tile
+ * @param resource
* @alias Tileset3DTileContent
- * @constructor
- *
+ * @class
* @private
*/
function Tileset3DTileContent(tileset, tile, resource) {
@@ -71,9 +72,7 @@ Object.defineProperties(Tileset3DTileContent.prototype, {
/**
* Returns true when the tile's content is ready to render; otherwise false
- *
* @memberof Tileset3DTileContent.prototype
- *
* @type {boolean}
* @readonly
* @private
@@ -146,6 +145,8 @@ Tileset3DTileContent.fromJson = function (tileset, tile, resource, json) {
/**
* Part of the {@link Cesium3DTileContent} interface. Tileset3DTileContent
* always returns false
since a tile of this type does not have any features.
+ * @param batchId
+ * @param name
*/
Tileset3DTileContent.prototype.hasProperty = function (batchId, name) {
return false;
@@ -154,6 +155,7 @@ Tileset3DTileContent.prototype.hasProperty = function (batchId, name) {
/**
* Part of the {@link Cesium3DTileContent} interface. Tileset3DTileContent
* always returns undefined
since a tile of this type does not have any features.
+ * @param batchId
*/
Tileset3DTileContent.prototype.getFeature = function (batchId) {
return undefined;
diff --git a/packages/engine/Source/Scene/TilesetMetadata.js b/packages/engine/Source/Scene/TilesetMetadata.js
index ef79ef3ec369..5e7d6abb57ea 100644
--- a/packages/engine/Source/Scene/TilesetMetadata.js
+++ b/packages/engine/Source/Scene/TilesetMetadata.js
@@ -8,13 +8,11 @@ import MetadataEntity from "./MetadataEntity.js";
*
* See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_metadata|3DTILES_metadata Extension} for 3D Tiles
*
- *
* @param {object} options Object with the following properties:
* @param {object} options.tileset The tileset metadata JSON object.
* @param {MetadataClass} options.class The class that tileset metadata conforms to.
- *
* @alias TilesetMetadata
- * @constructor
+ * @class
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -39,7 +37,6 @@ function TilesetMetadata(options) {
Object.defineProperties(TilesetMetadata.prototype, {
/**
* The class that properties conform to.
- *
* @memberof TilesetMetadata.prototype
* @type {MetadataClass}
* @readonly
@@ -53,7 +50,6 @@ Object.defineProperties(TilesetMetadata.prototype, {
/**
* Extra user-defined properties.
- *
* @memberof TilesetMetadata.prototype
* @type {*}
* @readonly
@@ -67,7 +63,6 @@ Object.defineProperties(TilesetMetadata.prototype, {
/**
* An object containing extensions.
- *
* @memberof TilesetMetadata.prototype
* @type {object}
* @readonly
@@ -82,7 +77,6 @@ Object.defineProperties(TilesetMetadata.prototype, {
/**
* Returns whether the tileset has this property.
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {boolean} Whether the tileset has this property.
* @private
@@ -93,7 +87,6 @@ TilesetMetadata.prototype.hasProperty = function (propertyId) {
/**
* Returns whether the tileset has a property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @returns {boolean} Whether the tileset has a property with the given semantic.
* @private
@@ -108,7 +101,6 @@ TilesetMetadata.prototype.hasPropertyBySemantic = function (semantic) {
/**
* Returns an array of property IDs.
- *
* @param {string[]} [results] An array into which to store the results.
* @returns {string[]} The property IDs.
* @private
@@ -122,7 +114,6 @@ TilesetMetadata.prototype.getPropertyIds = function (results) {
*
* If the property is normalized the normalized value is returned.
*
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @returns {*} The value of the property or undefined
if the tileset does not have this property.
* @private
@@ -136,7 +127,6 @@ TilesetMetadata.prototype.getProperty = function (propertyId) {
*
* If the property is normalized a normalized value must be provided to this function.
*
- *
* @param {string} propertyId The case-sensitive ID of the property.
* @param {*} value The value of the property that will be copied.
* @returns {boolean} true
if the property was set, false
otherwise.
@@ -153,7 +143,6 @@ TilesetMetadata.prototype.setProperty = function (propertyId, value) {
/**
* Returns a copy of the value of the property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @returns {*} The value of the property or undefined
if the tileset does not have this semantic.
* @private
@@ -168,7 +157,6 @@ TilesetMetadata.prototype.getPropertyBySemantic = function (semantic) {
/**
* Sets the value of the property with the given semantic.
- *
* @param {string} semantic The case-sensitive semantic of the property.
* @param {*} value The value of the property that will be copied.
* @returns {boolean} true
if the property was set, false
otherwise.
diff --git a/packages/engine/Source/Scene/TimeDynamicImagery.js b/packages/engine/Source/Scene/TimeDynamicImagery.js
index 8a12e8902b7c..92e0415df3a1 100644
--- a/packages/engine/Source/Scene/TimeDynamicImagery.js
+++ b/packages/engine/Source/Scene/TimeDynamicImagery.js
@@ -8,10 +8,8 @@ import RequestType from "../Core/RequestType.js";
/**
* Provides functionality for ImageryProviders that have time dynamic imagery
- *
* @alias TimeDynamicImagery
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Clock} options.clock A Clock instance that is used when determining the value for the time dimension. Required when options.times
is specified.
* @param {TimeIntervalCollection} options.times TimeIntervalCollection with its data
property being an object containing time dynamic dimension and their values.
@@ -105,12 +103,10 @@ Object.defineProperties(TimeDynamicImagery.prototype, {
/**
* Gets the tile from the cache if its available.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
* @param {Request} [request] The request object. Intended for internal use only.
- *
* @returns {Promise|undefined} A promise for the image that will resolve when the image is available, or
* undefined if the tile is not in the cache.
*/
@@ -134,7 +130,6 @@ TimeDynamicImagery.prototype.getFromCache = function (x, y, level, request) {
/**
* Checks if the next interval is approaching and will start preload the tile if necessary. Otherwise it will
* just add the tile to a list to preload when we approach the next interval.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
diff --git a/packages/engine/Source/Scene/TimeDynamicPointCloud.js b/packages/engine/Source/Scene/TimeDynamicPointCloud.js
index 3bd7e3fbb94f..4e149bc67f5e 100644
--- a/packages/engine/Source/Scene/TimeDynamicPointCloud.js
+++ b/packages/engine/Source/Scene/TimeDynamicPointCloud.js
@@ -23,17 +23,15 @@ import ShadowMode from "./ShadowMode.js";
* If intermediate frames cannot be loaded in time to meet playback speed, they will be skipped. If frames are sufficiently
* small or the clock is sufficiently slow then no frames will be skipped.
*
- *
* @alias TimeDynamicPointCloud
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Clock} options.clock A {@link Clock} instance that is used when determining the value for the time dimension.
* @param {TimeIntervalCollection} options.intervals A {@link TimeIntervalCollection} with its data property being an object containing a uri
to a 3D Tiles Point Cloud tile and an optional transform
.
- * @param {boolean} [options.show=true] Determines if the point cloud will be shown.
- * @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] A 4x4 transformation matrix that transforms the point cloud.
- * @param {ShadowMode} [options.shadows=ShadowMode.ENABLED] Determines whether the point cloud casts or receives shadows from light sources.
- * @param {number} [options.maximumMemoryUsage=256] The maximum amount of memory in MB that can be used by the point cloud.
+ * @param {boolean} [options.show] Determines if the point cloud will be shown.
+ * @param {Matrix4} [options.modelMatrix] A 4x4 transformation matrix that transforms the point cloud.
+ * @param {ShadowMode} [options.shadows] Determines whether the point cloud casts or receives shadows from light sources.
+ * @param {number} [options.maximumMemoryUsage] The maximum amount of memory in MB that can be used by the point cloud.
* @param {object} [options.shading] Options for constructing a {@link PointCloudShading} object to control point attenuation and eye dome lighting.
* @param {Cesium3DTileStyle} [options.style] The style, defined using the {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Styling|3D Tiles Styling language}, applied to each point in the point cloud.
* @param {ClippingPlaneCollection} [options.clippingPlanes] The {@link ClippingPlaneCollection} used to selectively disable rendering the point cloud.
@@ -48,7 +46,6 @@ function TimeDynamicPointCloud(options) {
/**
* Determines if the point cloud will be shown.
- *
* @type {boolean}
* @default true
*/
@@ -56,7 +53,6 @@ function TimeDynamicPointCloud(options) {
/**
* A 4x4 transformation matrix that transforms the point cloud.
- *
* @type {Matrix4}
* @default Matrix4.IDENTITY
*/
@@ -72,7 +68,6 @@ function TimeDynamicPointCloud(options) {
*
* Shadows are rendered only when {@link Viewer#shadows} is true
.
*
- *
* @type {ShadowMode}
* @default ShadowMode.ENABLED
*/
@@ -86,10 +81,8 @@ function TimeDynamicPointCloud(options) {
*
* If decreasing this value results in unloading tiles, the tiles are unloaded the next frame.
*
- *
* @type {number}
* @default 256
- *
* @see TimeDynamicPointCloud#totalMemoryUsageInBytes
*/
this.maximumMemoryUsage = defaultValue(options.maximumMemoryUsage, 256);
@@ -108,9 +101,7 @@ function TimeDynamicPointCloud(options) {
* Assign undefined
to remove the style, which will restore the visual
* appearance of the point cloud to its default when no style was applied.
*
- *
* @type {Cesium3DTileStyle}
- *
* @example
* pointCloud.style = new Cesium.Cesium3DTileStyle({
* color : {
@@ -122,7 +113,6 @@ function TimeDynamicPointCloud(options) {
* },
* show : '${Classification} !== 2'
* });
- *
* @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Styling|3D Tiles Styling language}
*/
this.style = options.style;
@@ -139,10 +129,8 @@ function TimeDynamicPointCloud(options) {
* uri
: the uri of the failed frame.
* message
: the error message.
*
- *
* @type {Event}
* @default new Event()
- *
* @example
* pointCloud.frameFailed.addEventListener(function(error) {
* console.log(`An error occurred loading frame: ${error.uri}`);
@@ -158,7 +146,6 @@ function TimeDynamicPointCloud(options) {
*
* @type {Event}
* @default new Event()
- *
* @example
* pointCloud.frameChanged.addEventListener(function(timeDynamicPointCloud) {
* viewer.camera.viewBoundingSphere(timeDynamicPointCloud.boundingSphere);
@@ -193,9 +180,7 @@ function TimeDynamicPointCloud(options) {
Object.defineProperties(TimeDynamicPointCloud.prototype, {
/**
* The {@link ClippingPlaneCollection} used to selectively disable rendering the point cloud.
- *
* @memberof TimeDynamicPointCloud.prototype
- *
* @type {ClippingPlaneCollection}
*/
clippingPlanes: {
@@ -209,12 +194,9 @@ Object.defineProperties(TimeDynamicPointCloud.prototype, {
/**
* The total amount of GPU memory in bytes used by the point cloud.
- *
* @memberof TimeDynamicPointCloud.prototype
- *
* @type {number}
* @readonly
- *
* @see TimeDynamicPointCloud#maximumMemoryUsage
*/
totalMemoryUsageInBytes: {
@@ -225,9 +207,7 @@ Object.defineProperties(TimeDynamicPointCloud.prototype, {
/**
* The bounding sphere of the frame being rendered. Returns undefined
if no frame is being rendered.
- *
* @memberof TimeDynamicPointCloud.prototype
- *
* @type {BoundingSphere}
* @readonly
*/
@@ -269,7 +249,6 @@ TimeDynamicPointCloud.prototype.makeStyleDirty = function () {
/**
* Exposed for testing.
- *
* @private
*/
TimeDynamicPointCloud.prototype._getAverageLoadTime = function () {
@@ -609,6 +588,7 @@ const updateState = {
};
/**
+ * @param frameState
* @private
*/
TimeDynamicPointCloud.prototype.update = function (frameState) {
@@ -771,9 +751,7 @@ TimeDynamicPointCloud.prototype.update = function (frameState) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see TimeDynamicPointCloud#destroy
*/
TimeDynamicPointCloud.prototype.isDestroyed = function () {
@@ -787,12 +765,9 @@ TimeDynamicPointCloud.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* pointCloud = pointCloud && pointCloud.destroy();
- *
* @see TimeDynamicPointCloud#isDestroyed
*/
TimeDynamicPointCloud.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/Tonemapper.js b/packages/engine/Source/Scene/Tonemapper.js
index b799e43ee7be..97fcb190b35f 100644
--- a/packages/engine/Source/Scene/Tonemapper.js
+++ b/packages/engine/Source/Scene/Tonemapper.js
@@ -1,13 +1,11 @@
/**
* A tonemapping algorithm when rendering with high dynamic range.
- *
* @enum {number}
* @private
*/
const Tonemapper = {
/**
* Use the Reinhard tonemapping operator.
- *
* @type {number}
* @constant
*/
@@ -15,7 +13,6 @@ const Tonemapper = {
/**
* Use the modified Reinhard tonemapping operator.
- *
* @type {number}
* @constant
*/
@@ -23,7 +20,6 @@ const Tonemapper = {
/**
* Use the Filmic tonemapping operator.
- *
* @type {number}
* @constant
*/
@@ -31,13 +27,13 @@ const Tonemapper = {
/**
* Use the ACES tonemapping operator.
- *
* @type {number}
* @constant
*/
ACES: 3,
/**
+ * @param tonemapper
* @private
*/
validate: function (tonemapper) {
diff --git a/packages/engine/Source/Scene/TranslucentTileClassification.js b/packages/engine/Source/Scene/TranslucentTileClassification.js
index b171fe76adff..77ab93b7d385 100644
--- a/packages/engine/Source/Scene/TranslucentTileClassification.js
+++ b/packages/engine/Source/Scene/TranslucentTileClassification.js
@@ -23,7 +23,7 @@ const debugShowPackedDepth = false;
/**
* Handles buffers, drawing, and deriving commands needed for classifying translucent 3D Tiles.
* Uses a depth texture, so classification on translucent 3D Tiles is not available in Internet Explorer.
- *
+ * @param context
* @private
*/
function TranslucentTileClassification(context) {
@@ -75,7 +75,6 @@ Object.defineProperties(TranslucentTileClassification.prototype, {
/**
* Gets whether or not translucent depth was rendered.
* @memberof TranslucentTileClassification.prototype
- *
* @type {boolean}
* @readonly
*/
diff --git a/packages/engine/Source/Scene/TweenCollection.js b/packages/engine/Source/Scene/TweenCollection.js
index e49bad844f57..0765d1a4bd27 100644
--- a/packages/engine/Source/Scene/TweenCollection.js
+++ b/packages/engine/Source/Scene/TweenCollection.js
@@ -10,10 +10,18 @@ import { Tween as TweenJS } from "@tweenjs/tween.js";
/**
* A tween is an animation that interpolates the properties of two objects using an {@link EasingFunction}. Create
* one using {@link Scene#tweens} and {@link TweenCollection#add} and related add functions.
- *
+ * @param tweens
+ * @param tweenjs
+ * @param startObject
+ * @param stopObject
+ * @param duration
+ * @param delay
+ * @param easingFunction
+ * @param update
+ * @param complete
+ * @param cancel
* @alias Tween
- * @constructor
- *
+ * @class
* @private
*/
function Tween(
@@ -44,7 +52,6 @@ function Tween(
/**
* The callback to call if the tween is canceled either because {@link Tween#cancelTween}
* was called or because the tween was removed from the collection.
- *
* @type {TweenCollection.TweenCancelledCallback}
*/
this.cancel = cancel;
@@ -59,7 +66,6 @@ Object.defineProperties(Tween.prototype, {
/**
* An object with properties for initial values of the tween. The properties of this object are changed during the tween's animation.
* @memberof Tween.prototype
- *
* @type {object}
* @readonly
*/
@@ -72,7 +78,6 @@ Object.defineProperties(Tween.prototype, {
/**
* An object with properties for the final values of the tween.
* @memberof Tween.prototype
- *
* @type {object}
* @readonly
*/
@@ -85,7 +90,6 @@ Object.defineProperties(Tween.prototype, {
/**
* The duration, in seconds, for the tween. The tween is automatically removed from the collection when it stops.
* @memberof Tween.prototype
- *
* @type {number}
* @readonly
*/
@@ -98,7 +102,6 @@ Object.defineProperties(Tween.prototype, {
/**
* The delay, in seconds, before the tween starts animating.
* @memberof Tween.prototype
- *
* @type {number}
* @readonly
*/
@@ -111,7 +114,6 @@ Object.defineProperties(Tween.prototype, {
/**
* Determines the curve for animtion.
* @memberof Tween.prototype
- *
* @type {EasingFunction}
* @readonly
*/
@@ -124,7 +126,6 @@ Object.defineProperties(Tween.prototype, {
/**
* The callback to call at each animation update (usually tied to the a rendered frame).
* @memberof Tween.prototype
- *
* @type {TweenCollection.TweenUpdateCallback}
* @readonly
*/
@@ -137,7 +138,6 @@ Object.defineProperties(Tween.prototype, {
/**
* The callback to call when the tween finishes animating.
* @memberof Tween.prototype
- *
* @type {TweenCollection.TweenCompleteCallback}
* @readonly
*/
@@ -149,7 +149,6 @@ Object.defineProperties(Tween.prototype, {
/**
* @memberof Tween.prototype
- *
* @private
*/
tweenjs: {
@@ -169,10 +168,8 @@ Tween.prototype.cancelTween = function () {
/**
* A collection of tweens for animating properties. Commonly accessed using {@link Scene#tweens}.
- *
* @alias TweenCollection
- * @constructor
- *
+ * @class
* @private
*/
function TweenCollection() {
@@ -183,7 +180,6 @@ Object.defineProperties(TweenCollection.prototype, {
/**
* The number of tweens in the collection.
* @memberof TweenCollection.prototype
- *
* @type {number}
* @readonly
*/
@@ -197,19 +193,17 @@ Object.defineProperties(TweenCollection.prototype, {
/**
* Creates a tween for animating between two sets of properties. The tween starts animating at the next call to {@link TweenCollection#update}, which
* is implicit when {@link Viewer} or {@link CesiumWidget} render the scene.
- *
* @param {object} [options] Object with the following properties:
* @param {object} options.startObject An object with properties for initial values of the tween. The properties of this object are changed during the tween's animation.
* @param {object} options.stopObject An object with properties for the final values of the tween.
* @param {number} options.duration The duration, in seconds, for the tween. The tween is automatically removed from the collection when it stops.
- * @param {number} [options.delay=0.0] The delay, in seconds, before the tween starts animating.
- * @param {EasingFunction} [options.easingFunction=EasingFunction.LINEAR_NONE] Determines the curve for animtion.
+ * @param {number} [options.delay] The delay, in seconds, before the tween starts animating.
+ * @param {EasingFunction} [options.easingFunction] Determines the curve for animtion.
* @param {TweenCollection.TweenUpdateCallback} [options.update] The callback to call at each animation update (usually tied to the a rendered frame).
* @param {TweenCollection.TweenCompleteCallback} [options.complete] The callback to call when the tween finishes animating.
* @param {TweenCollection.TweenCancelledCallback} [options.cancel] The callback to call if the tween is canceled either because {@link Tween#cancelTween} was called or because the tween was removed from the collection.
* @returns {Tween} The tween.
- *
- * @exception {DeveloperError} options.duration must be positive.
+ * @throws {DeveloperError} options.duration must be positive.
*/
TweenCollection.prototype.add = function (options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -275,22 +269,20 @@ TweenCollection.prototype.add = function (options) {
/**
* Creates a tween for animating a scalar property on the given object. The tween starts animating at the next call to {@link TweenCollection#update}, which
* is implicit when {@link Viewer} or {@link CesiumWidget} render the scene.
- *
* @param {object} [options] Object with the following properties:
* @param {object} options.object The object containing the property to animate.
* @param {string} options.property The name of the property to animate.
* @param {number} options.startValue The initial value.
* @param {number} options.stopValue The final value.
- * @param {number} [options.duration=3.0] The duration, in seconds, for the tween. The tween is automatically removed from the collection when it stops.
- * @param {number} [options.delay=0.0] The delay, in seconds, before the tween starts animating.
- * @param {EasingFunction} [options.easingFunction=EasingFunction.LINEAR_NONE] Determines the curve for animtion.
+ * @param {number} [options.duration] The duration, in seconds, for the tween. The tween is automatically removed from the collection when it stops.
+ * @param {number} [options.delay] The delay, in seconds, before the tween starts animating.
+ * @param {EasingFunction} [options.easingFunction] Determines the curve for animtion.
* @param {TweenCollection.TweenUpdateCallback} [options.update] The callback to call at each animation update (usually tied to the a rendered frame).
* @param {TweenCollection.TweenCompleteCallback} [options.complete] The callback to call when the tween finishes animating.
* @param {TweenCollection.TweenCancelledCallback} [options.cancel] The callback to call if the tween is canceled either because {@link Tween#cancelTween} was called or because the tween was removed from the collection.
* @returns {Tween} The tween.
- *
- * @exception {DeveloperError} options.object must have the specified property.
- * @exception {DeveloperError} options.duration must be positive.
+ * @throws {DeveloperError} options.object must have the specified property.
+ * @throws {DeveloperError} options.duration must be positive.
*/
TweenCollection.prototype.addProperty = function (options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -342,21 +334,19 @@ TweenCollection.prototype.addProperty = function (options) {
/**
* Creates a tween for animating the alpha of all color uniforms on a {@link Material}. The tween starts animating at the next call to {@link TweenCollection#update}, which
* is implicit when {@link Viewer} or {@link CesiumWidget} render the scene.
- *
* @param {object} [options] Object with the following properties:
* @param {Material} options.material The material to animate.
- * @param {number} [options.startValue=0.0] The initial alpha value.
- * @param {number} [options.stopValue=1.0] The final alpha value.
- * @param {number} [options.duration=3.0] The duration, in seconds, for the tween. The tween is automatically removed from the collection when it stops.
- * @param {number} [options.delay=0.0] The delay, in seconds, before the tween starts animating.
- * @param {EasingFunction} [options.easingFunction=EasingFunction.LINEAR_NONE] Determines the curve for animtion.
+ * @param {number} [options.startValue] The initial alpha value.
+ * @param {number} [options.stopValue] The final alpha value.
+ * @param {number} [options.duration] The duration, in seconds, for the tween. The tween is automatically removed from the collection when it stops.
+ * @param {number} [options.delay] The delay, in seconds, before the tween starts animating.
+ * @param {EasingFunction} [options.easingFunction] Determines the curve for animtion.
* @param {TweenCollection.TweenUpdateCallback} [options.update] The callback to call at each animation update (usually tied to the a rendered frame).
* @param {TweenCollection.TweenCompleteCallback} [options.complete] The callback to call when the tween finishes animating.
* @param {TweenCollection.TweenCancelledCallback} [options.cancel] The callback to call if the tween is canceled either because {@link Tween#cancelTween} was called or because the tween was removed from the collection.
* @returns {Tween} The tween.
- *
- * @exception {DeveloperError} material has no properties with alpha components.
- * @exception {DeveloperError} options.duration must be positive.
+ * @throws {DeveloperError} material has no properties with alpha components.
+ * @throws {DeveloperError} options.duration must be positive.
*/
TweenCollection.prototype.addAlpha = function (options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -415,20 +405,18 @@ TweenCollection.prototype.addAlpha = function (options) {
/**
* Creates a tween for animating the offset uniform of a {@link Material}. The tween starts animating at the next call to {@link TweenCollection#update}, which
* is implicit when {@link Viewer} or {@link CesiumWidget} render the scene.
- *
* @param {object} [options] Object with the following properties:
* @param {Material} options.material The material to animate.
* @param {number} options.startValue The initial alpha value.
* @param {number} options.stopValue The final alpha value.
- * @param {number} [options.duration=3.0] The duration, in seconds, for the tween. The tween is automatically removed from the collection when it stops.
- * @param {number} [options.delay=0.0] The delay, in seconds, before the tween starts animating.
- * @param {EasingFunction} [options.easingFunction=EasingFunction.LINEAR_NONE] Determines the curve for animtion.
+ * @param {number} [options.duration] The duration, in seconds, for the tween. The tween is automatically removed from the collection when it stops.
+ * @param {number} [options.delay] The delay, in seconds, before the tween starts animating.
+ * @param {EasingFunction} [options.easingFunction] Determines the curve for animtion.
* @param {TweenCollection.TweenUpdateCallback} [options.update] The callback to call at each animation update (usually tied to the a rendered frame).
* @param {TweenCollection.TweenCancelledCallback} [options.cancel] The callback to call if the tween is canceled either because {@link Tween#cancelTween} was called or because the tween was removed from the collection.
* @returns {Tween} The tween.
- *
- * @exception {DeveloperError} material.uniforms must have an offset property.
- * @exception {DeveloperError} options.duration must be positive.
+ * @throws {DeveloperError} material.uniforms must have an offset property.
+ * @throws {DeveloperError} options.duration must be positive.
*/
TweenCollection.prototype.addOffsetIncrement = function (options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -464,7 +452,6 @@ TweenCollection.prototype.addOffsetIncrement = function (options) {
*
* This calls the {@link Tween#cancel} callback if the tween has one.
*
- *
* @param {Tween} tween The tween to remove.
* @returns {boolean} true
if the tween was removed; false
if the tween was not found in the collection.
*/
@@ -507,7 +494,6 @@ TweenCollection.prototype.removeAll = function () {
/**
* Determines whether this collection contains a given tween.
- *
* @param {Tween} tween The tween to check for.
* @returns {boolean} true
if this collection contains the tween, false
otherwise.
*/
@@ -520,10 +506,8 @@ TweenCollection.prototype.contains = function (tween) {
* and increase as tweens are added. Removing a tween shifts all tweens after
* it to the left, changing their indices. This function is commonly used to iterate over
* all the tween in the collection.
- *
* @param {number} index The zero-based index of the tween.
* @returns {Tween} The tween at the specified index.
- *
* @example
* // Output the duration of all the tweens in the collection.
* const tweens = scene.tweens;
@@ -545,8 +529,7 @@ TweenCollection.prototype.get = function (index) {
/**
* Updates the tweens in the collection to be at the provide time. When a tween finishes, it is removed
* from the collection.
- *
- * @param {number} [time=getTimestamp()] The time in seconds. By default tweens are synced to the system clock.
+ * @param {number} [time] The time in seconds. By default tweens are synced to the system clock.
*/
TweenCollection.prototype.update = function (time) {
const tweens = this._tweens;
diff --git a/packages/engine/Source/Scene/UrlTemplateImageryProvider.js b/packages/engine/Source/Scene/UrlTemplateImageryProvider.js
index 9eee9536831b..300c2da281ab 100644
--- a/packages/engine/Source/Scene/UrlTemplateImageryProvider.js
+++ b/packages/engine/Source/Scene/UrlTemplateImageryProvider.js
@@ -52,7 +52,6 @@ const pickFeaturesTags = combine(tags, {
* @typedef {object} UrlTemplateImageryProvider.ConstructorOptions
*
* Initialization options for the UrlTemplateImageryProvider constructor
- *
* @property {Resource|string} url The URL template to use to request tiles. It has the following keywords:
*
* {z}
: The level of the tile in the tiling scheme. Level zero is the root of the quadtree pyramid.
@@ -134,17 +133,14 @@ const pickFeaturesTags = combine(tags, {
* that this can be dynamically overridden by modifying the {@link UriTemplateImageryProvider#enablePickFeatures}
* property.
* @property {TileDiscardPolicy} [tileDiscardPolicy] A policy for discarding tile images according to some criteria
- * @property {Object} [customTags] Allow to replace custom keywords in the URL template. The object must have strings as keys and functions as values.
+ * @property {object} [customTags] Allow to replace custom keywords in the URL template. The object must have strings as keys and functions as values.
*/
/**
* Provides imagery by requesting tiles using a specified URL template.
- *
* @alias UrlTemplateImageryProvider
- * @constructor
- *
+ * @class
* @param {UrlTemplateImageryProvider.ConstructorOptions} options Object describing initialization options
- *
* @example
* // Access Natural Earth II imagery, which uses a TMS tiling scheme and Geographic (EPSG:4326) project
* const tms = new Cesium.UrlTemplateImageryProvider({
@@ -176,7 +172,6 @@ const pickFeaturesTags = combine(tags, {
* }
* }
* });
- *
* @see ArcGisMapServerImageryProvider
* @see BingMapsImageryProvider
* @see GoogleEarthEnterpriseMapsProvider
@@ -505,7 +500,6 @@ Object.defineProperties(UrlTemplateImageryProvider.prototype, {
/**
* Gets the credits to be displayed when a given tile is displayed.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level;
@@ -538,13 +532,12 @@ UrlTemplateImageryProvider.prototype.requestImage = function (
/**
* Asynchronously determines what features, if any, are located at a given longitude and latitude within
* a tile.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
* @param {number} longitude The longitude at which to pick features.
* @param {number} latitude The latitude at which to pick features.
- * @return {Promise|undefined} A promise for the picked features that will resolve when the asynchronous
+ * @returns {Promise|undefined} A promise for the picked features that will resolve when the asynchronous
* picking completes. The resolved value is an array of {@link ImageryLayerFeatureInfo}
* instances. The array may be empty if no features are found at the given location.
* It may also be undefined if picking is not supported.
diff --git a/packages/engine/Source/Scene/Vector3DTileBatch.js b/packages/engine/Source/Scene/Vector3DTileBatch.js
index 121dfdc2fc0b..7cc028ddd009 100644
--- a/packages/engine/Source/Scene/Vector3DTileBatch.js
+++ b/packages/engine/Source/Scene/Vector3DTileBatch.js
@@ -1,15 +1,12 @@
/**
* Describes a renderable batch of geometry.
- *
* @alias Vector3DTileBatch
- * @constructor
- *
+ * @class
* @param {object} options An object with the following properties:
* @param {number} options.offset The offset of the batch into the indices buffer.
* @param {number} options.count The number of indices in the batch.
* @param {Color} options.color The color of the geometry in the batch.
* @param {number[]} options.batchIds An array where each element is the batch id of the geometry in the batch.
- *
* @private
*/
function Vector3DTileBatch(options) {
diff --git a/packages/engine/Source/Scene/Vector3DTileClampedPolylines.js b/packages/engine/Source/Scene/Vector3DTileClampedPolylines.js
index 657599492973..f1fc96afc909 100644
--- a/packages/engine/Source/Scene/Vector3DTileClampedPolylines.js
+++ b/packages/engine/Source/Scene/Vector3DTileClampedPolylines.js
@@ -35,10 +35,8 @@ import Vector3DTilePolylines from "./Vector3DTilePolylines.js";
/**
* Creates a batch of polylines as volumes with shader-adjustable width.
- *
* @alias Vector3DTileClampedPolylines
- * @constructor
- *
+ * @class
* @param {object} options An object with following properties:
* @param {Uint16Array} options.positions The positions of the polylines
* @param {Uint32Array} options.counts The number or positions in the each polyline.
@@ -46,12 +44,11 @@ import Vector3DTilePolylines from "./Vector3DTilePolylines.js";
* @param {number} options.minimumHeight The minimum height of the tile's region.
* @param {number} options.maximumHeight The maximum height of the tile's region.
* @param {Rectangle} options.rectangle The rectangle containing the tile.
- * @param {Cartesian3} [options.center=Cartesian3.ZERO] The RTC center.
+ * @param {Cartesian3} [options.center] The RTC center.
* @param {Cesium3DTileBatchTable} options.batchTable The batch table for the tile containing the batched polylines.
* @param {Uint16Array} options.batchIds The batch ids for each polyline.
* @param {ClassificationType} options.classificationType The classification type.
* @param {boolean} options.keepDecodedPositions Whether to keep decoded positions in memory.
- *
* @private
*/
function Vector3DTileClampedPolylines(options) {
@@ -119,9 +116,7 @@ function Vector3DTileClampedPolylines(options) {
Object.defineProperties(Vector3DTileClampedPolylines.prototype, {
/**
* Gets the number of triangles.
- *
* @memberof Vector3DTileClampedPolylines.prototype
- *
* @type {number}
* @readonly
*/
@@ -133,9 +128,7 @@ Object.defineProperties(Vector3DTileClampedPolylines.prototype, {
/**
* Gets the geometry memory in bytes.
- *
* @memberof Vector3DTileClampedPolylines.prototype
- *
* @type {number}
* @readonly
*/
@@ -620,7 +613,6 @@ function queueCommands(primitive, frameState) {
/**
* Get the polyline positions for the given feature.
- *
* @param {number} batchId The batch ID of the feature.
*/
Vector3DTileClampedPolylines.prototype.getPositions = function (batchId) {
@@ -629,7 +621,6 @@ Vector3DTileClampedPolylines.prototype.getPositions = function (batchId) {
/**
* Creates features for each polyline and places it at the batch id index of features.
- *
* @param {Vector3DTileContent} content The vector tile content.
* @param {Cesium3DTileFeature[]} features An array of features where the polygon features will be placed.
*/
@@ -647,7 +638,6 @@ Vector3DTileClampedPolylines.prototype.createFeatures = function (
/**
* Colors the entire tile when enabled is true. The resulting color will be (polyline batch table color * color).
- *
* @param {boolean} enabled Whether to enable debug coloring.
* @param {Color} color The debug color.
*/
@@ -677,7 +667,6 @@ const DEFAULT_SHOW_VALUE = true;
/**
* Apply a style to the content.
- *
* @param {Cesium3DTileStyle} style The style.
* @param {Cesium3DTileFeature[]} features The dictionary of features.
*/
@@ -723,7 +712,6 @@ function initialize(polylines) {
/**
* Updates the batches and queues the commands for rendering.
- *
* @param {FrameState} frameState The current frame state.
*/
Vector3DTileClampedPolylines.prototype.update = function (frameState) {
@@ -758,7 +746,6 @@ Vector3DTileClampedPolylines.prototype.update = function (frameState) {
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
*/
Vector3DTileClampedPolylines.prototype.isDestroyed = function () {
@@ -773,8 +760,7 @@ Vector3DTileClampedPolylines.prototype.isDestroyed = function () {
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
*
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
*/
Vector3DTileClampedPolylines.prototype.destroy = function () {
this._va = this._va && this._va.destroy();
diff --git a/packages/engine/Source/Scene/Vector3DTileContent.js b/packages/engine/Source/Scene/Vector3DTileContent.js
index 120a22db5801..4418ac3c6d77 100644
--- a/packages/engine/Source/Scene/Vector3DTileContent.js
+++ b/packages/engine/Source/Scene/Vector3DTileContent.js
@@ -25,10 +25,13 @@ import decodeVectorPolylinePositions from "../Core/decodeVectorPolylinePositions
*
* Implements the {@link Cesium3DTileContent} interface.
*
- *
+ * @param tileset
+ * @param tile
+ * @param resource
+ * @param arrayBuffer
+ * @param byteOffset
* @alias Vector3DTileContent
- * @constructor
- *
+ * @class
* @private
*/
function Vector3DTileContent(tileset, tile, resource, arrayBuffer, byteOffset) {
@@ -123,9 +126,7 @@ Object.defineProperties(Vector3DTileContent.prototype, {
/**
* Returns true when the tile's content is ready to render; otherwise false
- *
* @memberof Vector3DTileContent.prototype
- *
* @type {boolean}
* @readonly
* @private
diff --git a/packages/engine/Source/Scene/Vector3DTileGeometry.js b/packages/engine/Source/Scene/Vector3DTileGeometry.js
index c6e4c7688079..9ea992a6eb6c 100644
--- a/packages/engine/Source/Scene/Vector3DTileGeometry.js
+++ b/packages/engine/Source/Scene/Vector3DTileGeometry.js
@@ -12,10 +12,8 @@ import Vector3DTilePrimitive from "./Vector3DTilePrimitive.js";
/**
* Creates a batch of box, cylinder, ellipsoid and/or sphere geometries intersecting terrain or 3D Tiles.
- *
* @alias Vector3DTileGeometry
- * @constructor
- *
+ * @class
* @param {object} options An object with following properties:
* @param {Float32Array} [options.boxes] The boxes in the tile.
* @param {Uint16Array} [options.boxBatchIds] The batch ids for each box.
@@ -29,7 +27,6 @@ import Vector3DTilePrimitive from "./Vector3DTilePrimitive.js";
* @param {Matrix4} options.modelMatrix The model matrix of all geometries. Applied after the individual geometry model matrices.
* @param {Cesium3DTileBatchTable} options.batchTable The batch table.
* @param {BoundingSphere} options.boundingVolume The bounding volume containing all of the geometry in the tile.
- *
* @private
*/
function Vector3DTileGeometry(options) {
@@ -103,9 +100,7 @@ function Vector3DTileGeometry(options) {
Object.defineProperties(Vector3DTileGeometry.prototype, {
/**
* Gets the number of triangles.
- *
* @memberof Vector3DTileGeometry.prototype
- *
* @type {number}
* @readonly
* @private
@@ -121,9 +116,7 @@ Object.defineProperties(Vector3DTileGeometry.prototype, {
/**
* Gets the geometry memory in bytes.
- *
* @memberof Vector3DTileGeometry.prototype
- *
* @type {number}
* @readonly
* @private
@@ -399,7 +392,6 @@ function finishPrimitive(geometries) {
/**
* Creates features for each geometry and places it at the batch id index of features.
- *
* @param {Vector3DTileContent} content The vector tile content.
* @param {Cesium3DTileFeature[]} features An array of features where the polygon features will be placed.
*/
@@ -409,7 +401,6 @@ Vector3DTileGeometry.prototype.createFeatures = function (content, features) {
/**
* Colors the entire tile when enabled is true. The resulting color will be (geometry batch table color * color).
- *
* @param {boolean} enabled Whether to enable debug coloring.
* @param {Color} color The debug color.
*/
@@ -419,7 +410,6 @@ Vector3DTileGeometry.prototype.applyDebugSettings = function (enabled, color) {
/**
* Apply a style to the content.
- *
* @param {Cesium3DTileStyle} style The style.
* @param {Cesium3DTileFeature[]} features The array of features.
*/
@@ -430,7 +420,6 @@ Vector3DTileGeometry.prototype.applyStyle = function (style, features) {
/**
* Call when updating the color of a geometry with batchId changes color. The geometries will need to be re-batched
* on the next update.
- *
* @param {number} batchId The batch id of the geometries whose color has changed.
* @param {Color} color The new polygon color.
*/
@@ -440,7 +429,6 @@ Vector3DTileGeometry.prototype.updateCommands = function (batchId, color) {
/**
* Updates the batches and queues the commands for rendering.
- *
* @param {FrameState} frameState The current frame state.
*/
Vector3DTileGeometry.prototype.update = function (frameState) {
@@ -470,7 +458,6 @@ Vector3DTileGeometry.prototype.update = function (frameState) {
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
*/
Vector3DTileGeometry.prototype.isDestroyed = function () {
@@ -485,8 +472,7 @@ Vector3DTileGeometry.prototype.isDestroyed = function () {
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
*
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
*/
Vector3DTileGeometry.prototype.destroy = function () {
this._primitive = this._primitive && this._primitive.destroy();
diff --git a/packages/engine/Source/Scene/Vector3DTilePoints.js b/packages/engine/Source/Scene/Vector3DTilePoints.js
index 7bea9c2c9022..4c373c6b39d2 100644
--- a/packages/engine/Source/Scene/Vector3DTilePoints.js
+++ b/packages/engine/Source/Scene/Vector3DTilePoints.js
@@ -18,10 +18,8 @@ import VerticalOrigin from "./VerticalOrigin.js";
/**
* Creates a batch of points or billboards and labels.
- *
* @alias Vector3DTilePoints
- * @constructor
- *
+ * @class
* @param {object} options An object with following properties:
* @param {Uint16Array} options.positions The positions of the polygons.
* @param {number} options.minimumHeight The minimum height of the terrain covered by the tile.
@@ -29,7 +27,6 @@ import VerticalOrigin from "./VerticalOrigin.js";
* @param {Rectangle} options.rectangle The rectangle containing the tile.
* @param {Cesium3DTileBatchTable} options.batchTable The batch table for the tile containing the batched polygons.
* @param {Uint16Array} options.batchIds The batch ids for each polygon.
- *
* @private
*/
function Vector3DTilePoints(options) {
@@ -62,9 +59,7 @@ function Vector3DTilePoints(options) {
Object.defineProperties(Vector3DTilePoints.prototype, {
/**
* Returns true if the points are ready to render
- *
* @memberof Vector3DTilePoints.prototype
- *
* @type {boolean}
* @readonly
* @private
@@ -77,9 +72,7 @@ Object.defineProperties(Vector3DTilePoints.prototype, {
/**
* Gets the number of points.
- *
* @memberof Vector3DTilePoints.prototype
- *
* @type {number}
* @readonly
* @private
@@ -92,9 +85,7 @@ Object.defineProperties(Vector3DTilePoints.prototype, {
/**
* Gets the texture atlas memory in bytes.
- *
* @memberof Vector3DTilePoints.prototype
- *
* @type {number}
* @readonly
* @private
@@ -210,7 +201,6 @@ function createPoints(points, ellipsoid) {
/**
* Creates features for each point and places it at the batch id index of features.
- *
* @param {Vector3DTileContent} content The vector tile content.
* @param {Cesium3DTileFeature[]} features An array of features where the point features will be placed.
*/
@@ -240,7 +230,6 @@ Vector3DTilePoints.prototype.createFeatures = function (content, features) {
/**
* Colors the entire tile when enabled is true. The resulting color will be (batch table color * color).
- *
* @param {boolean} enabled Whether to enable debug coloring.
* @param {Color} color The debug color.
*/
@@ -306,7 +295,6 @@ const scratchDistanceDisplayCondition = new DistanceDisplayCondition();
/**
* Apply a style to the content.
- *
* @param {Cesium3DTileStyle} style The style.
* @param {Cesium3DTileFeature[]} features The array of features.
*/
@@ -487,6 +475,7 @@ Vector3DTilePoints.prototype.applyStyle = function (style, features) {
};
/**
+ * @param frameState
* @private
*/
Vector3DTilePoints.prototype.update = function (frameState) {
@@ -515,7 +504,6 @@ Vector3DTilePoints.prototype.update = function (frameState) {
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
*/
Vector3DTilePoints.prototype.isDestroyed = function () {
@@ -530,8 +518,7 @@ Vector3DTilePoints.prototype.isDestroyed = function () {
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
*
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
*/
Vector3DTilePoints.prototype.destroy = function () {
this._billboardCollection =
diff --git a/packages/engine/Source/Scene/Vector3DTilePolygons.js b/packages/engine/Source/Scene/Vector3DTilePolygons.js
index 06a6d3de907e..e66d5c996fad 100644
--- a/packages/engine/Source/Scene/Vector3DTilePolygons.js
+++ b/packages/engine/Source/Scene/Vector3DTilePolygons.js
@@ -14,10 +14,8 @@ import Vector3DTilePrimitive from "./Vector3DTilePrimitive.js";
/**
* Creates a batch of pre-triangulated polygons draped on terrain and/or 3D Tiles.
- *
* @alias Vector3DTilePolygons
- * @constructor
- *
+ * @class
* @param {object} options An object with following properties:
* @param {Float32Array|Uint16Array} options.positions The positions of the polygons. The positions must be contiguous
* so that the positions for polygon n are in [c, c + counts[n]] where c = sum{counts[0], counts[n - 1]} and they are the outer ring of
@@ -31,12 +29,11 @@ import Vector3DTilePrimitive from "./Vector3DTilePrimitive.js";
* @param {Float32Array} [options.polygonMinimumHeights] An array containing the minimum heights for each polygon.
* @param {Float32Array} [options.polygonMaximumHeights] An array containing the maximum heights for each polygon.
* @param {Rectangle} options.rectangle The rectangle containing the tile.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid.
- * @param {Cartesian3} [options.center=Cartesian3.ZERO] The RTC center.
+ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid.
+ * @param {Cartesian3} [options.center] The RTC center.
* @param {Cesium3DTileBatchTable} options.batchTable The batch table for the tile containing the batched polygons.
* @param {Uint16Array} options.batchIds The batch ids for each polygon.
* @param {BoundingSphere} options.boundingVolume The bounding volume for the entire batch of polygons.
- *
* @private
*/
function Vector3DTilePolygons(options) {
@@ -103,9 +100,7 @@ function Vector3DTilePolygons(options) {
Object.defineProperties(Vector3DTilePolygons.prototype, {
/**
* Gets the number of triangles.
- *
* @memberof Vector3DTilePolygons.prototype
- *
* @type {number}
* @readonly
* @private
@@ -121,9 +116,7 @@ Object.defineProperties(Vector3DTilePolygons.prototype, {
/**
* Gets the geometry memory in bytes.
- *
* @memberof Vector3DTilePolygons.prototype
- *
* @type {number}
* @readonly
* @private
@@ -384,7 +377,6 @@ function finishPrimitive(polygons) {
/**
* Creates features for each polygon and places it at the batch id index of features.
- *
* @param {Vector3DTileContent} content The vector tile content.
* @param {Cesium3DTileFeature[]} features An array of features where the polygon features will be placed.
*/
@@ -394,7 +386,6 @@ Vector3DTilePolygons.prototype.createFeatures = function (content, features) {
/**
* Colors the entire tile when enabled is true. The resulting color will be (polygon batch table color * color).
- *
* @param {boolean} enabled Whether to enable debug coloring.
* @param {Color} color The debug color.
*/
@@ -404,7 +395,6 @@ Vector3DTilePolygons.prototype.applyDebugSettings = function (enabled, color) {
/**
* Apply a style to the content.
- *
* @param {Cesium3DTileStyle} style The style.
* @param {Cesium3DTileFeature[]} features The array of features.
*/
@@ -415,7 +405,6 @@ Vector3DTilePolygons.prototype.applyStyle = function (style, features) {
/**
* Call when updating the color of a polygon with batchId changes color. The polygons will need to be re-batched
* on the next update.
- *
* @param {number} batchId The batch id of the polygon whose color has changed.
* @param {Color} color The new polygon color.
*/
@@ -425,7 +414,6 @@ Vector3DTilePolygons.prototype.updateCommands = function (batchId, color) {
/**
* Updates the batches and queues the commands for rendering.
- *
* @param {FrameState} frameState The current frame state.
*/
Vector3DTilePolygons.prototype.update = function (frameState) {
@@ -455,7 +443,6 @@ Vector3DTilePolygons.prototype.update = function (frameState) {
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
*/
Vector3DTilePolygons.prototype.isDestroyed = function () {
@@ -470,8 +457,7 @@ Vector3DTilePolygons.prototype.isDestroyed = function () {
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
*
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
*/
Vector3DTilePolygons.prototype.destroy = function () {
this._primitive = this._primitive && this._primitive.destroy();
diff --git a/packages/engine/Source/Scene/Vector3DTilePolylines.js b/packages/engine/Source/Scene/Vector3DTilePolylines.js
index 781f568b5118..a671e3b3841c 100644
--- a/packages/engine/Source/Scene/Vector3DTilePolylines.js
+++ b/packages/engine/Source/Scene/Vector3DTilePolylines.js
@@ -25,10 +25,8 @@ import Cesium3DTileFeature from "./Cesium3DTileFeature.js";
/**
* Creates a batch of polylines that have been subdivided to be draped on terrain.
- *
* @alias Vector3DTilePolylines
- * @constructor
- *
+ * @class
* @param {object} options An object with following properties:
* @param {Uint16Array} options.positions The positions of the polylines
* @param {Uint32Array} options.counts The number or positions in the each polyline.
@@ -36,12 +34,11 @@ import Cesium3DTileFeature from "./Cesium3DTileFeature.js";
* @param {number} options.minimumHeight The minimum height of the terrain covered by the tile.
* @param {number} options.maximumHeight The maximum height of the terrain covered by the tile.
* @param {Rectangle} options.rectangle The rectangle containing the tile.
- * @param {Cartesian3} [options.center=Cartesian3.ZERO] The RTC center.
+ * @param {Cartesian3} [options.center] The RTC center.
* @param {Cesium3DTileBatchTable} options.batchTable The batch table for the tile containing the batched polylines.
* @param {Uint16Array} options.batchIds The batch ids for each polyline.
* @param {BoundingSphere} options.boundingVolume The bounding volume for the entire batch of polylines.
* @param {boolean} options.keepDecodedPositions Whether to keep decoded positions in memory.
- *
* @private
*/
function Vector3DTilePolylines(options) {
@@ -94,9 +91,7 @@ function Vector3DTilePolylines(options) {
Object.defineProperties(Vector3DTilePolylines.prototype, {
/**
* Gets the number of triangles.
- *
* @memberof Vector3DTilePolylines.prototype
- *
* @type {number}
* @readonly
* @private
@@ -109,9 +104,7 @@ Object.defineProperties(Vector3DTilePolylines.prototype, {
/**
* Gets the geometry memory in bytes.
- *
* @memberof Vector3DTilePolylines.prototype
- *
* @type {number}
* @readonly
* @private
@@ -541,7 +534,6 @@ Vector3DTilePolylines.getPolylinePositions = function (polylines, batchId) {
/**
* Get the polyline positions for the given feature.
- *
* @param {number} batchId The batch ID of the feature.
*/
Vector3DTilePolylines.prototype.getPositions = function (batchId) {
@@ -550,7 +542,6 @@ Vector3DTilePolylines.prototype.getPositions = function (batchId) {
/**
* Creates features for each polyline and places it at the batch id index of features.
- *
* @param {Vector3DTileContent} content The vector tile content.
* @param {Cesium3DTileFeature[]} features An array of features where the polygon features will be placed.
*/
@@ -565,7 +556,6 @@ Vector3DTilePolylines.prototype.createFeatures = function (content, features) {
/**
* Colors the entire tile when enabled is true. The resulting color will be (polyline batch table color * color).
- *
* @param {boolean} enabled Whether to enable debug coloring.
* @param {Color} color The debug color.
*/
@@ -592,7 +582,6 @@ const DEFAULT_SHOW_VALUE = true;
/**
* Apply a style to the content.
- *
* @param {Cesium3DTileStyle} style The style.
* @param {Cesium3DTileFeature[]} features The array of features.
*/
@@ -619,7 +608,6 @@ Vector3DTilePolylines.prototype.applyStyle = function (style, features) {
/**
* Updates the batches and queues the commands for rendering.
- *
* @param {FrameState} frameState The current frame state.
*/
Vector3DTilePolylines.prototype.update = function (frameState) {
@@ -654,7 +642,6 @@ Vector3DTilePolylines.prototype.update = function (frameState) {
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
*/
Vector3DTilePolylines.prototype.isDestroyed = function () {
@@ -669,8 +656,7 @@ Vector3DTilePolylines.prototype.isDestroyed = function () {
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
*
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
*/
Vector3DTilePolylines.prototype.destroy = function () {
this._va = this._va && this._va.destroy();
diff --git a/packages/engine/Source/Scene/Vector3DTilePrimitive.js b/packages/engine/Source/Scene/Vector3DTilePrimitive.js
index 0f16df4a98fb..77a38a51e4e3 100644
--- a/packages/engine/Source/Scene/Vector3DTilePrimitive.js
+++ b/packages/engine/Source/Scene/Vector3DTilePrimitive.js
@@ -29,10 +29,8 @@ import Vector3DTileBatch from "./Vector3DTileBatch.js";
/**
* Creates a batch of classification meshes.
- *
* @alias Vector3DTilePrimitive
- * @constructor
- *
+ * @class
* @param {object} options An object with following properties:
* @param {Float32Array} options.positions The positions of the meshes.
* @param {Uint16Array|Uint32Array} options.indices The indices of the triangulated meshes. The indices must be contiguous so that
@@ -40,14 +38,13 @@ import Vector3DTileBatch from "./Vector3DTileBatch.js";
* @param {Uint32Array} options.indexCounts The number of indices for each mesh.
* @param {Uint32Array} options.indexOffsets The offset into the index buffer for each mesh.
* @param {Vector3DTileBatch[]} options.batchedIndices The index offset and count for each batch with the same color.
- * @param {Cartesian3} [options.center=Cartesian3.ZERO] The RTC center.
+ * @param {Cartesian3} [options.center] The RTC center.
* @param {Cesium3DTileBatchTable} options.batchTable The batch table for the tile containing the batched meshes.
* @param {Uint16Array} options.batchIds The batch ids for each mesh.
* @param {Uint16Array} options.vertexBatchIds The batch id for each vertex.
* @param {BoundingSphere} options.boundingVolume The bounding volume for the entire batch of meshes.
* @param {BoundingSphere[]} options.boundingVolumes The bounding volume for each mesh.
* @param {ClassificationType} [options.classificationType] What this tile will classify.
- *
* @private
*/
function Vector3DTilePrimitive(options) {
@@ -153,9 +150,7 @@ function Vector3DTilePrimitive(options) {
Object.defineProperties(Vector3DTilePrimitive.prototype, {
/**
* Gets the number of triangles.
- *
* @memberof Vector3DTilePrimitive.prototype
- *
* @type {number}
* @readonly
*/
@@ -167,9 +162,7 @@ Object.defineProperties(Vector3DTilePrimitive.prototype, {
/**
* Gets the geometry memory in bytes.
- *
* @memberof Vector3DTilePrimitive.prototype
- *
* @type {number}
* @readonly
*/
@@ -945,7 +938,6 @@ function createPickCommands(primitive) {
/**
* Creates features for each mesh and places it at the batch id index of features.
- *
* @param {Vector3DTileContent} content The vector tile content.
* @param {Cesium3DTileFeature[]} features An array of features where the polygon features will be placed.
*/
@@ -960,7 +952,6 @@ Vector3DTilePrimitive.prototype.createFeatures = function (content, features) {
/**
* Colors the entire tile when enabled is true. The resulting color will be (mesh batch table color * color).
- *
* @param {boolean} enabled Whether to enable debug coloring.
* @param {Color} color The debug color.
*/
@@ -1003,7 +994,6 @@ const complexExpressionReg = /\$/;
/**
* Apply a style to the content.
- *
* @param {Cesium3DTileStyle} style The style.
* @param {Cesium3DTileFeature[]} features The array of features.
*/
@@ -1051,7 +1041,6 @@ Vector3DTilePrimitive.prototype.applyStyle = function (style, features) {
/**
* Call when updating the color of a mesh with batchId changes color. The meshes will need to be re-batched
* on the next update.
- *
* @param {number} batchId The batch id of the meshes whose color has changed.
* @param {Color} color The new polygon color.
*/
@@ -1217,7 +1206,6 @@ function updateWireframe(primitive) {
/**
* Updates the batches and queues the commands for rendering.
- *
* @param {FrameState} frameState The current frame state.
*/
Vector3DTilePrimitive.prototype.update = function (frameState) {
@@ -1253,7 +1241,6 @@ Vector3DTilePrimitive.prototype.update = function (frameState) {
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
*
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
*/
Vector3DTilePrimitive.prototype.isDestroyed = function () {
@@ -1268,8 +1255,7 @@ Vector3DTilePrimitive.prototype.isDestroyed = function () {
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
*
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
*/
Vector3DTilePrimitive.prototype.destroy = function () {
this._va = this._va && this._va.destroy();
diff --git a/packages/engine/Source/Scene/VertexAttributeSemantic.js b/packages/engine/Source/Scene/VertexAttributeSemantic.js
index c168997fca27..ea95aa75d5c5 100644
--- a/packages/engine/Source/Scene/VertexAttributeSemantic.js
+++ b/packages/engine/Source/Scene/VertexAttributeSemantic.js
@@ -4,15 +4,12 @@ import DeveloperError from "../Core/DeveloperError.js";
/**
* An enum describing the built-in vertex attribute semantics.
- *
* @enum {string}
- *
* @private
*/
const VertexAttributeSemantic = {
/**
* Per-vertex position.
- *
* @type {string}
* @constant
*/
@@ -20,7 +17,6 @@ const VertexAttributeSemantic = {
/**
* Per-vertex normal.
- *
* @type {string}
* @constant
*/
@@ -28,7 +24,6 @@ const VertexAttributeSemantic = {
/**
* Per-vertex tangent.
- *
* @type {string}
* @constant
*/
@@ -36,7 +31,6 @@ const VertexAttributeSemantic = {
/**
* Per-vertex texture coordinates.
- *
* @type {string}
* @constant
*/
@@ -44,7 +38,6 @@ const VertexAttributeSemantic = {
/**
* Per-vertex color.
- *
* @type {string}
* @constant
*/
@@ -52,7 +45,6 @@ const VertexAttributeSemantic = {
/**
* Per-vertex joint IDs for skinning.
- *
* @type {string}
* @constant
*/
@@ -60,7 +52,6 @@ const VertexAttributeSemantic = {
/**
* Per-vertex joint weights for skinning.
- *
* @type {string}
* @constant
*/
@@ -68,7 +59,6 @@ const VertexAttributeSemantic = {
/**
* Per-vertex feature ID.
- *
* @type {string}
* @constant
*/
@@ -102,11 +92,8 @@ function semanticToVariableName(semantic) {
/**
* Returns whether the vertex attribute semantic can have a set index.
- *
* @param {VertexAttributeSemantic} semantic The semantic.
- *
* @returns {boolean} Whether the semantic can have a set index.
- *
* @private
*/
VertexAttributeSemantic.hasSetIndex = function (semantic) {
@@ -134,11 +121,8 @@ VertexAttributeSemantic.hasSetIndex = function (semantic) {
/**
* Gets the vertex attribute semantic matching the glTF semantic.
- *
* @param {string} gltfSemantic The glTF semantic.
- *
* @returns {VertexAttributeSemantic|undefined} The vertex attribute semantic, or undefined if there is no match.
- *
* @private
*/
VertexAttributeSemantic.fromGltfSemantic = function (gltfSemantic) {
@@ -179,11 +163,8 @@ VertexAttributeSemantic.fromGltfSemantic = function (gltfSemantic) {
/**
* Gets the vertex attribute semantic matching the pnts semantic.
- *
* @param {string} pntsSemantic The pnts semantic.
- *
* @returns {VertexAttributeSemantic|undefined} The vertex attribute semantic, or undefined if there is no match.
- *
* @private
*/
VertexAttributeSemantic.fromPntsSemantic = function (pntsSemantic) {
@@ -214,11 +195,8 @@ VertexAttributeSemantic.fromPntsSemantic = function (pntsSemantic) {
/**
* Gets the GLSL type (such as vec3
or int
) for the
* given vertex attribute.
- *
* @param {VertexAttributeSemantic} semantic The semantic.
- *
* @returns {string} The shader type.
- *
* @private
*/
VertexAttributeSemantic.getGlslType = function (semantic) {
@@ -250,12 +228,9 @@ VertexAttributeSemantic.getGlslType = function (semantic) {
/**
* Gets the variable name for the given semantic and set index.
- *
* @param {VertexAttributeSemantic} semantic The semantic.
* @param {number} [setIndex] The set index.
- *
* @returns {string} The variable name.
- *
* @private
*/
VertexAttributeSemantic.getVariableName = function (semantic, setIndex) {
diff --git a/packages/engine/Source/Scene/VerticalOrigin.js b/packages/engine/Source/Scene/VerticalOrigin.js
index 40764831bc49..f33a9f945210 100644
--- a/packages/engine/Source/Scene/VerticalOrigin.js
+++ b/packages/engine/Source/Scene/VerticalOrigin.js
@@ -7,16 +7,13 @@
*
*
*
- *
* @enum {number}
- *
* @see Billboard#verticalOrigin
* @see Label#verticalOrigin
*/
const VerticalOrigin = {
/**
* The origin is at the vertical center between BASELINE
and TOP
.
- *
* @type {number}
* @constant
*/
@@ -24,7 +21,6 @@ const VerticalOrigin = {
/**
* The origin is at the bottom of the object.
- *
* @type {number}
* @constant
*/
@@ -32,7 +28,6 @@ const VerticalOrigin = {
/**
* If the object contains text, the origin is at the baseline of the text, else the origin is at the bottom of the object.
- *
* @type {number}
* @constant
*/
@@ -40,7 +35,6 @@ const VerticalOrigin = {
/**
* The origin is at the top of the object.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Scene/View.js b/packages/engine/Source/Scene/View.js
index 9c167ab5bf0b..a313a6073499 100644
--- a/packages/engine/Source/Scene/View.js
+++ b/packages/engine/Source/Scene/View.js
@@ -28,6 +28,9 @@ function CommandExtent() {
}
/**
+ * @param scene
+ * @param camera
+ * @param viewport
* @private
*/
function View(scene, camera, viewport) {
diff --git a/packages/engine/Source/Scene/ViewportQuad.js b/packages/engine/Source/Scene/ViewportQuad.js
index 4d63acdde231..4a400ddef24e 100644
--- a/packages/engine/Source/Scene/ViewportQuad.js
+++ b/packages/engine/Source/Scene/ViewportQuad.js
@@ -12,13 +12,10 @@ import Material from "./Material.js";
/**
* A viewport aligned quad.
- *
* @alias ViewportQuad
- * @constructor
- *
+ * @class
* @param {BoundingRectangle} [rectangle] The {@link BoundingRectangle} defining the quad's position within the viewport.
* @param {Material} [material] The {@link Material} defining the surface appearance of the viewport quad.
- *
* @example
* const viewportQuad = new Cesium.ViewportQuad(new Cesium.BoundingRectangle(0, 0, 80, 40));
* viewportQuad.material.uniforms.color = new Cesium.Color(1.0, 0.0, 0.0, 1.0);
@@ -26,7 +23,6 @@ import Material from "./Material.js";
function ViewportQuad(rectangle, material) {
/**
* Determines if the viewport quad primitive will be shown.
- *
* @type {boolean}
* @default true
*/
@@ -38,9 +34,7 @@ function ViewportQuad(rectangle, material) {
/**
* The BoundingRectangle defining the quad's position within the viewport.
- *
* @type {BoundingRectangle}
- *
* @example
* viewportQuad.rectangle = new Cesium.BoundingRectangle(0, 0, 80, 40);
*/
@@ -58,16 +52,13 @@ function ViewportQuad(rectangle, material) {
*
* The default material is Material.ColorType
.
*
- *
* @type Material
- *
* @example
* // 1. Change the color of the default material to yellow
* viewportQuad.material.uniforms.color = new Cesium.Color(1.0, 1.0, 0.0, 1.0);
*
* // 2. Change material to horizontal stripes
* viewportQuad.material = Cesium.Material.fromType(Cesium.Material.StripeType);
- *
* @see {@link https://github.com/CesiumGS/cesium/wiki/Fabric|Fabric}
*/
this.material = material;
@@ -84,9 +75,9 @@ function ViewportQuad(rectangle, material) {
* Do not call this function directly. This is documented just to
* list the exceptions that may be propagated when the scene is rendered:
*
- *
- * @exception {DeveloperError} this.material must be defined.
- * @exception {DeveloperError} this.rectangle must be defined.
+ * @param frameState
+ * @throws {DeveloperError} this.material must be defined.
+ * @throws {DeveloperError} this.rectangle must be defined.
*/
ViewportQuad.prototype.update = function (frameState) {
if (!this.show) {
@@ -146,9 +137,7 @@ ViewportQuad.prototype.update = function (frameState) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} True if this object was destroyed; otherwise, false.
- *
* @see ViewportQuad#destroy
*/
ViewportQuad.prototype.isDestroyed = function () {
@@ -162,13 +151,9 @@ ViewportQuad.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* quad = quad && quad.destroy();
- *
* @see ViewportQuad#isDestroyed
*/
ViewportQuad.prototype.destroy = function () {
diff --git a/packages/engine/Source/Scene/VoxelBoxShape.js b/packages/engine/Source/Scene/VoxelBoxShape.js
index 6cbe40f7e026..e204c08af2f0 100644
--- a/packages/engine/Source/Scene/VoxelBoxShape.js
+++ b/packages/engine/Source/Scene/VoxelBoxShape.js
@@ -9,15 +9,12 @@ import defaultValue from "../Core/defaultValue.js";
/**
* A box {@link VoxelShape}.
- *
* @alias VoxelBoxShape
- * @constructor
- *
+ * @class
* @see VoxelShape
* @see VoxelEllipsoidShape
* @see VoxelCylinderShape
* @see VoxelShapeType
- *
* @private
*/
function VoxelBoxShape() {
@@ -115,12 +112,11 @@ const transformLocalToUv = Matrix4.fromRotationTranslation(
/**
* Update the shape's state.
- *
* @param {Matrix4} modelMatrix The model matrix.
* @param {Cartesian3} minBounds The minimum bounds.
* @param {Cartesian3} maxBounds The maximum bounds.
- * @param {Cartesian3} [clipMinBounds=VoxelBoxShape.DefaultMinBounds] The minimum clip bounds.
- * @param {Cartesian3} [clipMaxBounds=VoxelBoxShape.DefaultMaxBounds] The maximum clip bounds.
+ * @param {Cartesian3} [clipMinBounds] The minimum clip bounds.
+ * @param {Cartesian3} [clipMaxBounds] The maximum clip bounds.
* @returns {boolean} Whether the shape is visible.
*/
VoxelBoxShape.prototype.update = function (
@@ -302,7 +298,6 @@ const scratchTileMaxBounds = new Cartesian3();
/**
* Computes an oriented bounding box for a specified tile.
* The update function must be called before calling this function.
- *
* @param {number} tileLevel The tile's level.
* @param {number} tileX The tile's x coordinate.
* @param {number} tileY The tile's y coordinate.
@@ -356,7 +351,6 @@ const sampleSizeScratch = new Cartesian3();
/**
* Computes an oriented bounding box for a specified sample within a specified tile.
* The update function must be called before calling this function.
- *
* @param {SpatialNode} spatialNode The spatial node containing the sample
* @param {Cartesian3} tileDimensions The size of the tile in number of samples, before padding
* @param {Cartesian3} tileUv The sample coordinate within the tile
@@ -429,7 +423,6 @@ VoxelBoxShape.prototype.computeOrientedBoundingBoxForSample = function (
/**
* Defines the minimum bounds of the shape. Corresponds to minimum X, Y, Z.
- *
* @type {Cartesian3}
* @constant
* @readonly
@@ -440,7 +433,6 @@ VoxelBoxShape.DefaultMinBounds = Object.freeze(
/**
* Defines the maximum bounds of the shape. Corresponds to maximum X, Y, Z.
- *
* @type {Cartesian3}
* @constant
* @readonly
@@ -451,15 +443,12 @@ VoxelBoxShape.DefaultMaxBounds = Object.freeze(
/**
* Computes an {@link OrientedBoundingBox} for a subregion of the shape.
- *
* @function
- *
* @param {Cartesian3} minimumBounds The minimum bounds, in the local coordinates of the shape.
* @param {Cartesian3} maximumBounds The maximum bounds, in the local coordinates of the shape.
* @param {Matrix4} matrix The matrix to transform the points.
* @param {OrientedBoundingBox} result The object onto which to store the result.
* @returns {OrientedBoundingBox} The oriented bounding box that contains this subregion.
- *
* @private
*/
function getBoxChunkObb(minimumBounds, maximumBounds, matrix, result) {
diff --git a/packages/engine/Source/Scene/VoxelCell.js b/packages/engine/Source/Scene/VoxelCell.js
index 5880f71c0ac6..f69e8d8fdc3a 100644
--- a/packages/engine/Source/Scene/VoxelCell.js
+++ b/packages/engine/Source/Scene/VoxelCell.js
@@ -12,14 +12,11 @@ import OrientedBoundingBox from "../Core/OrientedBoundingBox.js";
*
* Do not construct this directly. Access it through picking using {@link Scene#pickVoxel}.
*
- *
* @alias VoxelCell
- * @constructor
- *
+ * @class
* @param {VoxelPrimitive} primitive The voxel primitive containing the cell
* @param {number} tileIndex The index of the tile
* @param {number} sampleIndex The index of the sample within the tile, containing metadata for this cell
- *
* @example
* // On left click, display all the properties for a voxel cell in the console log.
* handler.setInputAction(function(movement) {
@@ -33,7 +30,6 @@ import OrientedBoundingBox from "../Core/OrientedBoundingBox.js";
* }
* }
* }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
- *
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
*/
function VoxelCell(primitive, tileIndex, sampleIndex) {
@@ -47,14 +43,12 @@ function VoxelCell(primitive, tileIndex, sampleIndex) {
/**
* Construct a VoxelCell, and update the metadata and bounding box using the properties
* of a supplied keyframe node.
- *
* @private
* @param {VoxelPrimitive} primitive The voxel primitive containing the cell.
* @param {number} tileIndex The index of the tile.
* @param {number} sampleIndex The index of the sample within the tile, containing metadata for this cell.
* @param {KeyframeNode} keyframeNode The keyframe node containing information about the tile.
* @returns {VoxelCell}
- *
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
*/
VoxelCell.fromKeyframeNode = function (
@@ -114,6 +108,7 @@ const tileUvScratch = new Cartesian3();
* @private
* @param {VoxelPrimitive} primitive
* @param {SpatialNode} spatialNode
+ * @param sampleIndex
* @param {OrientedBoundingBox} result
* @returns {OrientedBoundingBox}
*/
@@ -157,11 +152,8 @@ function getOrientedBoundingBox(primitive, spatialNode, sampleIndex, result) {
Object.defineProperties(VoxelCell.prototype, {
/**
* Gets an object of the metadata values for this cell. The object's keys are the metadata names.
- *
* @memberof VoxelCell.prototype
- *
* @type {object}
- *
* @readonly
* @private
*/
@@ -174,11 +166,8 @@ Object.defineProperties(VoxelCell.prototype, {
/**
* All objects returned by {@link Scene#pick} have a primitive
property. This returns
* the VoxelPrimitive containing the cell.
- *
* @memberof VoxelCell.prototype
- *
* @type {VoxelPrimitive}
- *
* @readonly
*/
primitive: {
@@ -189,11 +178,8 @@ Object.defineProperties(VoxelCell.prototype, {
/**
* Get the sample index of the cell.
- *
* @memberof VoxelCell.prototype
- *
* @type {number}
- *
* @readonly
*/
sampleIndex: {
@@ -204,11 +190,8 @@ Object.defineProperties(VoxelCell.prototype, {
/**
* Get the index of the tile containing the cell.
- *
* @memberof VoxelCell.prototype
- *
* @type {number}
- *
* @readonly
*/
tileIndex: {
@@ -219,11 +202,8 @@ Object.defineProperties(VoxelCell.prototype, {
/**
* Get a copy of the oriented bounding box containing the cell.
- *
* @memberof VoxelCell.prototype
- *
* @type {OrientedBoundingBox}
- *
* @readonly
*/
orientedBoundingBox: {
@@ -235,7 +215,6 @@ Object.defineProperties(VoxelCell.prototype, {
/**
* Returns true
if the feature contains this property.
- *
* @param {string} name The case-sensitive name of the property.
* @returns {boolean} Whether the feature contains this property.
*/
@@ -245,7 +224,6 @@ VoxelCell.prototype.hasProperty = function (name) {
/**
* Returns an array of metadata property names for the feature.
- *
* @returns {string[]} The IDs of the feature's properties.
*/
VoxelCell.prototype.getNames = function () {
@@ -254,10 +232,8 @@ VoxelCell.prototype.getNames = function () {
/**
* Returns a copy of the value of the metadata in the cell with the given name.
- *
* @param {string} name The case-sensitive name of the property.
* @returns {*} The value of the property or undefined
if the feature does not have this property.
- *
* @example
* // Display all the properties for a voxel cell in the console log.
* const names = voxelCell.getNames();
diff --git a/packages/engine/Source/Scene/VoxelContent.js b/packages/engine/Source/Scene/VoxelContent.js
index 4d566c89d0d0..58711d035540 100644
--- a/packages/engine/Source/Scene/VoxelContent.js
+++ b/packages/engine/Source/Scene/VoxelContent.js
@@ -6,12 +6,9 @@ import MetadataTable from "./MetadataTable.js";
/**
* An object representing voxel content for a {@link Cesium3DTilesVoxelProvider}.
- *
* @alias VoxelContent
- * @constructor
- *
+ * @class
* @param {Resource} resource The resource for this voxel content. This is used for fetching external buffers as needed.
- *
* @private
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -27,7 +24,6 @@ function VoxelContent(resource) {
Object.defineProperties(VoxelContent.prototype, {
/**
* The {@link MetadataTable} storing voxel property values.
- *
* @type {MetadataTable}
* @readonly
* @private
@@ -41,14 +37,12 @@ Object.defineProperties(VoxelContent.prototype, {
/**
* Creates an object representing voxel content for a {@link Cesium3DTilesVoxelProvider}.
- *
* @param {Resource} resource The resource for this voxel content. This is used for fetching external buffers as needed.
* @param {object} [json] Voxel JSON contents. Mutually exclusive with binary.
* @param {Uint8Array} [binary] Voxel binary contents. Mutually exclusive with json.
* @param {MetadataSchema} metadataSchema The metadata schema used by property tables in the voxel content
* @returns {Promise}
- *
- * @exception {DeveloperError} One of json and binary must be defined.
+ * @throws {DeveloperError} One of json and binary must be defined.
*/
VoxelContent.fromJson = async function (
resource,
@@ -125,7 +119,6 @@ function requestBuffers(resource, json, binary) {
/**
* A helper object for storing the two parts of the binary voxel content
- *
* @typedef {object} VoxelChunks
* @property {object} json The json chunk of the binary voxel content
* @property {Uint8Array} binary The binary chunk of the binary voxel content. This represents the internal buffer.
@@ -134,7 +127,6 @@ function requestBuffers(resource, json, binary) {
/**
* Given binary voxel content, split into JSON and binary chunks
- *
* @param {Uint8Array} binaryView The binary voxel content
* @returns {VoxelChunks} An object containing the JSON and binary chunks
* @private
diff --git a/packages/engine/Source/Scene/VoxelCylinderShape.js b/packages/engine/Source/Scene/VoxelCylinderShape.js
index eb158d9ccc96..da313675c49c 100644
--- a/packages/engine/Source/Scene/VoxelCylinderShape.js
+++ b/packages/engine/Source/Scene/VoxelCylinderShape.js
@@ -11,15 +11,12 @@ import Cartesian4 from "../Core/Cartesian4.js";
/**
* A cylinder {@link VoxelShape}.
- *
* @alias VoxelCylinderShape
- * @constructor
- *
+ * @class
* @see VoxelShape
* @see VoxelBoxShape
* @see VoxelEllipsoidShape
* @see VoxelShapeType
- *
* @private
*/
function VoxelCylinderShape() {
@@ -142,12 +139,11 @@ const scratchScale = new Cartesian3();
/**
* Update the shape's state.
- *
* @param {Matrix4} modelMatrix The model matrix.
* @param {Cartesian3} minBounds The minimum bounds.
* @param {Cartesian3} maxBounds The maximum bounds.
- * @param {Cartesian3} [clipMinBounds=VoxelCylinderShape.DefaultMinBounds] The minimum clip bounds.
- * @param {Cartesian3} [clipMaxBounds=VoxelCylinderShape.DefaultMaxBounds] The maximum clip bounds.
+ * @param {Cartesian3} [clipMinBounds] The minimum clip bounds.
+ * @param {Cartesian3} [clipMaxBounds] The maximum clip bounds.
* @returns {boolean} Whether the shape is visible.
*/
VoxelCylinderShape.prototype.update = function (
@@ -504,7 +500,6 @@ VoxelCylinderShape.prototype.update = function (
/**
* Computes an oriented bounding box for a specified tile.
* The update function must be called before calling this function.
- *
* @param {number} tileLevel The tile's level.
* @param {number} tileX The tile's x coordinate.
* @param {number} tileY The tile's y coordinate.
@@ -586,7 +581,6 @@ const scratchTileMaxBounds = new Cartesian3();
/**
* Computes an oriented bounding box for a specified sample within a specified tile.
* The update function must be called before calling this function.
- *
* @param {SpatialNode} spatialNode The spatial node containing the sample
* @param {Cartesian3} tileDimensions The size of the tile in number of samples, before padding
* @param {Cartesian3} tileUv The sample coordinate within the tile
@@ -662,11 +656,9 @@ VoxelCylinderShape.prototype.computeOrientedBoundingBoxForSample = function (
/**
* Defines the minimum bounds of the shape. Corresponds to minimum radius, height, angle.
- *
* @type {Cartesian3}
* @constant
* @readonly
- *
* @private
*/
VoxelCylinderShape.DefaultMinBounds = Object.freeze(
@@ -675,11 +667,9 @@ VoxelCylinderShape.DefaultMinBounds = Object.freeze(
/**
* Defines the maximum bounds of the shape. Corresponds to maximum radius, height, angle.
- *
* @type {Cartesian3}
* @constant
* @readonly
- *
* @private
*/
VoxelCylinderShape.DefaultMaxBounds = Object.freeze(
@@ -739,9 +729,7 @@ function computeLooseOrientedBoundingBox(matrix, result) {
/**
* Computes an {@link OrientedBoundingBox} for a subregion of the shape.
- *
* @function
- *
* @param {number} radiusStart The radiusStart.
* @param {number} radiusEnd The radiusEnd.
* @param {number} heightStart The heightStart.
@@ -751,7 +739,6 @@ function computeLooseOrientedBoundingBox(matrix, result) {
* @param {Matrix4} matrix The matrix to transform the points.
* @param {OrientedBoundingBox} result The object onto which to store the result.
* @returns {OrientedBoundingBox} The oriented bounding box that contains this subregion.
- *
* @private
*/
function getCylinderChunkObb(
diff --git a/packages/engine/Source/Scene/VoxelEllipsoidShape.js b/packages/engine/Source/Scene/VoxelEllipsoidShape.js
index 52cc0e1523b8..983811a4a6bb 100644
--- a/packages/engine/Source/Scene/VoxelEllipsoidShape.js
+++ b/packages/engine/Source/Scene/VoxelEllipsoidShape.js
@@ -12,15 +12,12 @@ import defaultValue from "../Core/defaultValue.js";
/**
* An ellipsoid {@link VoxelShape}.
- *
* @alias VoxelEllipsoidShape
- * @constructor
- *
+ * @class
* @see VoxelShape
* @see VoxelBoxShape
* @see VoxelCylinderShape
* @see VoxelShapeType
- *
* @private
*/
function VoxelEllipsoidShape() {
@@ -157,12 +154,11 @@ const scratchRenderRectangle = new Rectangle();
/**
* Update the shape's state.
- *
* @param {Matrix4} modelMatrix The model matrix.
* @param {Cartesian3} minBounds The minimum bounds.
* @param {Cartesian3} maxBounds The maximum bounds.
- * @param {Cartesian3} [clipMinBounds=VoxelEllipsoidShape.DefaultMinBounds] The minimum clip bounds.
- * @param {Cartesian3} [clipMaxBounds=VoxelEllipsoidShape.DefaultMaxBounds] The maximum clip bounds.
+ * @param {Cartesian3} [clipMinBounds] The minimum clip bounds.
+ * @param {Cartesian3} [clipMaxBounds] The maximum clip bounds.
* @returns {boolean} Whether the shape is visible.
*/
VoxelEllipsoidShape.prototype.update = function (
@@ -674,7 +670,6 @@ const scratchRectangle = new Rectangle();
/**
* Computes an oriented bounding box for a specified tile.
* The update function must be called before calling this function.
- *
* @param {number} tileLevel The tile's level.
* @param {number} tileX The tile's x coordinate.
* @param {number} tileY The tile's y coordinate.
@@ -744,7 +739,6 @@ const scratchTileMaxBounds = new Cartesian3();
/**
* Computes an oriented bounding box for a specified sample within a specified tile.
* The update function must be called before calling this function.
- *
* @param {SpatialNode} spatialNode The spatial node containing the sample
* @param {Cartesian3} tileDimensions The size of the tile in number of samples, before padding
* @param {Cartesian3} tileUv The sample coordinate within the tile
@@ -824,9 +818,7 @@ VoxelEllipsoidShape.prototype.computeOrientedBoundingBoxForSample = function (
/**
* Computes an {@link OrientedBoundingBox} for a subregion of the shape.
- *
* @function
- *
* @param {Rectangle} rectangle The rectangle.
* @param {number} minHeight The minimumZ.
* @param {number} maxHeight The maximumZ.
@@ -835,7 +827,6 @@ VoxelEllipsoidShape.prototype.computeOrientedBoundingBoxForSample = function (
* @param {Matrix3} rotation The rotation applied to the shape
* @param {OrientedBoundingBox} result The object onto which to store the result.
* @returns {OrientedBoundingBox} The oriented bounding box that contains this subregion.
- *
* @private
*/
function getEllipsoidChunkObb(
@@ -865,7 +856,6 @@ function getEllipsoidChunkObb(
/**
* Defines the minimum bounds of the shape. Corresponds to minimum longitude, latitude, height.
- *
* @type {Cartesian3}
* @constant
* @readonly
@@ -880,7 +870,6 @@ VoxelEllipsoidShape.DefaultMinBounds = Object.freeze(
/**
* Defines the maximum bounds of the shape. Corresponds to maximum longitude, latitude, height.
- *
* @type {Cartesian3}
* @constant
* @readonly
diff --git a/packages/engine/Source/Scene/VoxelPrimitive.js b/packages/engine/Source/Scene/VoxelPrimitive.js
index 7539bf155269..3e2097d5c4f5 100644
--- a/packages/engine/Source/Scene/VoxelPrimitive.js
+++ b/packages/engine/Source/Scene/VoxelPrimitive.js
@@ -28,20 +28,16 @@ import VerticalExaggeration from "../Core/VerticalExaggeration.js";
/**
* A primitive that renders voxel data from a {@link VoxelProvider}.
- *
* @alias VoxelPrimitive
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {VoxelProvider} [options.provider] The voxel provider that supplies the primitive with tile data.
- * @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The model matrix used to transform the primitive.
+ * @param {Matrix4} [options.modelMatrix] The model matrix used to transform the primitive.
* @param {CustomShader} [options.customShader] The custom shader used to style the primitive.
* @param {Clock} [options.clock] The clock used to control time dynamic behavior.
- *
* @see VoxelProvider
* @see Cesium3DTilesVoxelProvider
* @see VoxelShapeType
- *
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
*/
function VoxelPrimitive(options) {
@@ -64,7 +60,6 @@ function VoxelPrimitive(options) {
/**
* This member is not created until the provider and shape are ready.
- *
* @type {VoxelTraversal}
* @private
*/
@@ -72,7 +67,6 @@ function VoxelPrimitive(options) {
/**
* This member is not created until the provider is ready.
- *
* @type {VoxelShape}
* @private
*/
@@ -86,7 +80,6 @@ function VoxelPrimitive(options) {
/**
* This member is not created until the provider is ready.
- *
* @type {Cartesian3}
* @private
*/
@@ -94,7 +87,6 @@ function VoxelPrimitive(options) {
/**
* This member is not created until the provider is ready.
- *
* @type {Cartesian3}
* @private
*/
@@ -102,7 +94,6 @@ function VoxelPrimitive(options) {
/**
* This member is not known until the provider is ready.
- *
* @type {Cartesian3}
* @private
*/
@@ -111,7 +102,6 @@ function VoxelPrimitive(options) {
/**
* Used to detect if the shape is dirty.
* This member is not known until the provider is ready.
- *
* @type {Cartesian3}
* @private
*/
@@ -119,7 +109,6 @@ function VoxelPrimitive(options) {
/**
* This member is not known until the provider is ready.
- *
* @type {Cartesian3}
* @private
*/
@@ -128,7 +117,6 @@ function VoxelPrimitive(options) {
/**
* Used to detect if the shape is dirty.
* This member is not known until the provider is ready.
- *
* @type {Cartesian3}
* @private
*/
@@ -136,7 +124,6 @@ function VoxelPrimitive(options) {
/**
* Minimum bounds with vertical exaggeration applied
- *
* @type {Cartesian3}
* @private
*/
@@ -144,7 +131,6 @@ function VoxelPrimitive(options) {
/**
* Used to detect if the shape is dirty.
- *
* @type {Cartesian3}
* @private
*/
@@ -152,7 +138,6 @@ function VoxelPrimitive(options) {
/**
* Maximum bounds with vertical exaggeration applied
- *
* @type {Cartesian3}
* @private
*/
@@ -160,7 +145,6 @@ function VoxelPrimitive(options) {
/**
* Used to detect if the shape is dirty.
- *
* @type {Cartesian3}
* @private
*/
@@ -168,7 +152,6 @@ function VoxelPrimitive(options) {
/**
* This member is not known until the provider is ready.
- *
* @type {Cartesian3}
* @private
*/
@@ -177,7 +160,6 @@ function VoxelPrimitive(options) {
/**
* Used to detect if the clipping is dirty.
* This member is not known until the provider is ready.
- *
* @type {Cartesian3}
* @private
*/
@@ -185,7 +167,6 @@ function VoxelPrimitive(options) {
/**
* This member is not known until the provider is ready.
- *
* @type {Cartesian3}
* @private
*/
@@ -194,7 +175,6 @@ function VoxelPrimitive(options) {
/**
* Used to detect if the clipping is dirty.
* This member is not known until the provider is ready.
- *
* @type {Cartesian3}
* @private
*/
@@ -202,7 +182,6 @@ function VoxelPrimitive(options) {
/**
* Clipping planes on the primitive
- *
* @type {ClippingPlaneCollection}
* @private
*/
@@ -210,7 +189,6 @@ function VoxelPrimitive(options) {
/**
* Keeps track of when the clipping planes change
- *
* @type {number}
* @private
*/
@@ -218,7 +196,6 @@ function VoxelPrimitive(options) {
/**
* Keeps track of when the clipping planes are enabled / disabled
- *
* @type {boolean}
* @private
*/
@@ -226,7 +203,6 @@ function VoxelPrimitive(options) {
/**
* The primitive's model matrix.
- *
* @type {Matrix4}
* @private
*/
@@ -236,7 +212,6 @@ function VoxelPrimitive(options) {
/**
* Model matrix with vertical exaggeration applied. Only used for BOX shape type.
- *
* @type {Matrix4}
* @private
*/
@@ -245,7 +220,6 @@ function VoxelPrimitive(options) {
/**
* The primitive's model matrix multiplied by the provider's model matrix.
* This member is not known until the provider is ready.
- *
* @type {Matrix4}
* @private
*/
@@ -254,7 +228,6 @@ function VoxelPrimitive(options) {
/**
* Used to detect if the shape is dirty.
* This member is not known until the provider is ready.
- *
* @type {Matrix4}
* @private
*/
@@ -503,7 +476,6 @@ function initialize(primitive, provider) {
Object.defineProperties(VoxelPrimitive.prototype, {
/**
* Gets a value indicating whether or not the primitive is ready for use.
- *
* @memberof VoxelPrimitive.prototype
* @type {boolean}
* @readonly
@@ -516,7 +488,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
/**
* Gets the {@link VoxelProvider} associated with this primitive.
- *
* @memberof VoxelPrimitive.prototype
* @type {VoxelProvider}
* @readonly
@@ -529,7 +500,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
/**
* Gets the bounding sphere.
- *
* @memberof VoxelPrimitive.prototype
* @type {BoundingSphere}
* @readonly
@@ -542,7 +512,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
/**
* Gets the oriented bounding box.
- *
* @memberof VoxelPrimitive.prototype
* @type {OrientedBoundingBox}
* @readonly
@@ -555,7 +524,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
/**
* Gets the model matrix.
- *
* @memberof VoxelPrimitive.prototype
* @type {Matrix4}
* @readonly
@@ -575,7 +543,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
/**
* Gets the shape type.
- *
* @memberof VoxelPrimitive.prototype
* @type {VoxelShapeType}
* @readonly
@@ -588,7 +555,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
/**
* Gets the voxel dimensions.
- *
* @memberof VoxelPrimitive.prototype
* @type {Cartesian3}
* @readonly
@@ -601,7 +567,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
/**
* Gets the minimum value per channel of the voxel data.
- *
* @memberof VoxelPrimitive.prototype
* @type {number[][]}
* @readonly
@@ -614,7 +579,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
/**
* Gets the maximum value per channel of the voxel data.
- *
* @memberof VoxelPrimitive.prototype
* @type {number[][]}
* @readonly
@@ -627,7 +591,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
/**
* Gets or sets whether or not this primitive should be displayed.
- *
* @memberof VoxelPrimitive.prototype
* @type {boolean}
*/
@@ -646,7 +609,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
/**
* Gets or sets whether or not the primitive should update when the view changes.
- *
* @memberof VoxelPrimitive.prototype
* @type {boolean}
*/
@@ -665,7 +627,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
/**
* Gets or sets whether or not to render debug visualizations.
- *
* @memberof VoxelPrimitive.prototype
* @type {boolean}
*/
@@ -684,7 +645,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
/**
* Gets or sets whether or not to test against depth when rendering.
- *
* @memberof VoxelPrimitive.prototype
* @type {boolean}
*/
@@ -707,7 +667,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
/**
* Gets or sets whether or not to jitter the view ray during the raymarch.
* This reduces stair-step artifacts but introduces noise.
- *
* @memberof VoxelPrimitive.prototype
* @type {boolean}
*/
@@ -729,7 +688,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
/**
* Gets or sets the nearest sampling.
- *
* @memberof VoxelPrimitive.prototype
* @type {boolean}
*/
@@ -753,7 +711,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
* Controls how quickly to blend between different levels of the tree.
* 0.0 means an instantaneous pop.
* 1.0 means a full linear blend.
- *
* @memberof VoxelPrimitive.prototype
* @type {number}
* @private
@@ -776,7 +733,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
* of a voxel is greater than the screen space error, the tile is subdivided.
* Lower screen space error corresponds with higher detail rendering, but could
* result in worse performance and higher memory consumption.
- *
* @memberof VoxelPrimitive.prototype
* @type {number}
*/
@@ -797,7 +753,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
* Gets or sets the step size multiplier used during raymarching.
* The lower the value, the higher the rendering quality, but
* also the worse the performance.
- *
* @memberof VoxelPrimitive.prototype
* @type {number}
*/
@@ -817,7 +772,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
/**
* Gets or sets the minimum bounds in the shape's local coordinate system.
* Voxel data is stretched or squashed to fit the bounds.
- *
* @memberof VoxelPrimitive.prototype
* @type {Cartesian3}
*/
@@ -837,7 +791,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
/**
* Gets or sets the maximum bounds in the shape's local coordinate system.
* Voxel data is stretched or squashed to fit the bounds.
- *
* @memberof VoxelPrimitive.prototype
* @type {Cartesian3}
*/
@@ -857,7 +810,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
/**
* Gets or sets the minimum clipping location in the shape's local coordinate system.
* Any voxel content outside the range is clipped.
- *
* @memberof VoxelPrimitive.prototype
* @type {Cartesian3}
*/
@@ -880,7 +832,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
/**
* Gets or sets the maximum clipping location in the shape's local coordinate system.
* Any voxel content outside the range is clipped.
- *
* @memberof VoxelPrimitive.prototype
* @type {Cartesian3}
*/
@@ -902,7 +853,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
/**
* The {@link ClippingPlaneCollection} used to selectively disable rendering the primitive.
- *
* @memberof VoxelPrimitive.prototype
* @type {ClippingPlaneCollection}
*/
@@ -918,7 +868,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
/**
* Gets or sets the custom shader. If undefined, {@link VoxelPrimitive.DefaultCustomShader} is set.
- *
* @memberof VoxelPrimitive.prototype
* @type {CustomShader}
*/
@@ -954,7 +903,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
/**
* Gets an event that is raised whenever a custom shader is compiled.
- *
* @memberof VoxelPrimitive.prototype
* @type {Event}
* @readonly
@@ -990,7 +938,6 @@ const transformPositionUvToLocal = Matrix4.fromRotationTranslation(
/**
* Updates the voxel primitive.
- *
* @param {FrameState} frameState
* @private
*/
@@ -1381,7 +1328,6 @@ function checkTransformAndBounds(primitive, provider) {
* @param {string} newBoundKey A key pointing to a bounds property of type Cartesian3 or Matrix4
* @param {string} oldBoundKey A key pointing to a bounds property of the same type as the property at newBoundKey
* @returns {number} 1 if the bound value changed, 0 otherwise
- *
* @private
*/
function updateBound(primitive, newBoundKey, oldBoundKey) {
@@ -1566,7 +1512,6 @@ function checkShapeDefines(primitive, shape) {
* @param {TimeIntervalCollection} timeIntervalCollection
* @param {Clock} clock
* @returns {number}
- *
* @private
*/
function getKeyframeLocation(timeIntervalCollection, clock) {
@@ -1608,7 +1553,6 @@ function getKeyframeLocation(timeIntervalCollection, clock) {
/**
* Update the clipping planes state and associated uniforms
- *
* @param {VoxelPrimitive} primitive
* @param {FrameState} frameState
* @returns {boolean} Whether the clipping planes changed, requiring a shader rebuild
@@ -1665,9 +1609,7 @@ function updateClippingPlanes(primitive, frameState) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see VoxelPrimitive#destroy
*/
VoxelPrimitive.prototype.isDestroyed = function () {
@@ -1681,11 +1623,8 @@ VoxelPrimitive.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @see VoxelPrimitive#isDestroyed
- *
* @example
* voxelPrimitive = voxelPrimitive && voxelPrimitive.destroy();
*/
@@ -1762,14 +1701,11 @@ const scratchCornersClipSpace = new Array(
* behind the near plane, it uses the intersection point of each of the vertex's
* edges against the near plane as part of the AABB calculation. This is done in
* clip space prior to perspective division.
- *
* @function
- *
* @param {OrientedBoundingBox} orientedBoundingBox
* @param {Matrix4} worldToProjection
* @param {Cartesian4} result
* @returns {Cartesian4}
- *
* @private
*/
function orientedBoundingBoxToNdcAabb(
@@ -1863,12 +1799,9 @@ const polylineZAxis = new Cartesian3(0.0, 0.0, polylineAxisDistance);
/**
* Draws the tile bounding boxes and axes.
- *
* @function
- *
* @param {VoxelPrimitive} that
* @param {FrameState} frameState
- *
* @private
*/
function debugDraw(that, frameState) {
@@ -1953,11 +1886,9 @@ function debugDraw(that, frameState) {
/**
* The default custom shader used by the primitive.
- *
* @type {CustomShader}
* @constant
* @readonly
- *
* @private
*/
VoxelPrimitive.DefaultCustomShader = new CustomShader({
diff --git a/packages/engine/Source/Scene/VoxelProvider.js b/packages/engine/Source/Scene/VoxelProvider.js
index 0b5343d5b4c3..4b5855fd25ae 100644
--- a/packages/engine/Source/Scene/VoxelProvider.js
+++ b/packages/engine/Source/Scene/VoxelProvider.js
@@ -3,14 +3,11 @@ import DeveloperError from "../Core/DeveloperError.js";
/**
* Provides voxel data. Intended to be used with {@link VoxelPrimitive}.
* This type describes an interface and is not intended to be instantiated directly.
- *
* @alias VoxelProvider
- * @constructor
- *
+ * @class
* @see Cesium3DTilesVoxelProvider
* @see VoxelPrimitive
* @see VoxelShapeType
- *
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
*/
function VoxelProvider() {
@@ -20,7 +17,6 @@ function VoxelProvider() {
Object.defineProperties(VoxelProvider.prototype, {
/**
* A transform from local space to global space. If undefined, the identity matrix will be used instead.
- *
* @memberof VoxelProvider.prototype
* @type {Matrix4|undefined}
* @readonly
@@ -31,7 +27,6 @@ Object.defineProperties(VoxelProvider.prototype, {
/**
* A transform from shape space to local space. If undefined, the identity matrix will be used instead.
- *
* @memberof VoxelProvider.prototype
* @type {Matrix4|undefined}
* @readonly
@@ -43,7 +38,6 @@ Object.defineProperties(VoxelProvider.prototype, {
/**
* Gets the {@link VoxelShapeType}
* This should not be called before {@link VoxelProvider#ready} returns true.
- *
* @memberof VoxelProvider.prototype
* @type {VoxelShapeType}
* @readonly
@@ -56,7 +50,6 @@ Object.defineProperties(VoxelProvider.prototype, {
* Gets the minimum bounds.
* If undefined, the shape's default minimum bounds will be used instead.
* This should not be called before {@link VoxelProvider#ready} returns true.
- *
* @memberof VoxelProvider.prototype
* @type {Cartesian3|undefined}
* @readonly
@@ -69,7 +62,6 @@ Object.defineProperties(VoxelProvider.prototype, {
* Gets the maximum bounds.
* If undefined, the shape's default maximum bounds will be used instead.
* This should not be called before {@link VoxelProvider#ready} returns true.
- *
* @memberof VoxelProvider.prototype
* @type {Cartesian3|undefined}
* @readonly
@@ -81,7 +73,6 @@ Object.defineProperties(VoxelProvider.prototype, {
/**
* Gets the number of voxels per dimension of a tile. This is the same for all tiles in the dataset.
* This should not be called before {@link VoxelProvider#ready} returns true.
- *
* @memberof VoxelProvider.prototype
* @type {Cartesian3}
* @readonly
@@ -93,7 +84,6 @@ Object.defineProperties(VoxelProvider.prototype, {
/**
* 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.
* This should not be called before {@link VoxelProvider#ready} returns true.
- *
* @memberof VoxelProvider.prototype
* @type {Cartesian3|undefined}
* @readonly
@@ -105,7 +95,6 @@ Object.defineProperties(VoxelProvider.prototype, {
/**
* 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.
* This should not be called before {@link VoxelProvider#ready} returns true.
- *
* @memberof VoxelProvider.prototype
* @type {Cartesian3|undefined}
* @readonly
@@ -117,7 +106,6 @@ Object.defineProperties(VoxelProvider.prototype, {
/**
* Gets the metadata names.
* This should not be called before {@link VoxelProvider#ready} returns true.
- *
* @memberof VoxelProvider.prototype
* @type {string[]}
* @readonly
@@ -129,7 +117,6 @@ Object.defineProperties(VoxelProvider.prototype, {
/**
* Gets the metadata types.
* This should not be called before {@link VoxelProvider#ready} returns true.
- *
* @memberof VoxelProvider.prototype
* @type {MetadataType[]}
* @readonly
@@ -141,7 +128,6 @@ Object.defineProperties(VoxelProvider.prototype, {
/**
* Gets the metadata component types.
* This should not be called before {@link VoxelProvider#ready} returns true.
- *
* @memberof VoxelProvider.prototype
* @type {MetadataComponentType[]}
* @readonly
@@ -153,7 +139,6 @@ Object.defineProperties(VoxelProvider.prototype, {
/**
* Gets the metadata minimum values.
* This should not be called before {@link VoxelProvider#ready} returns true.
- *
* @memberof VoxelProvider.prototype
* @type {number[][]|undefined}
* @readonly
@@ -165,7 +150,6 @@ Object.defineProperties(VoxelProvider.prototype, {
/**
* Gets the metadata maximum values.
* This should not be called before {@link VoxelProvider#ready} returns true.
- *
* @memberof VoxelProvider.prototype
* @type {number[][]|undefined}
* @readonly
@@ -177,7 +161,6 @@ Object.defineProperties(VoxelProvider.prototype, {
/**
* 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.
* This should not be called before {@link VoxelProvider#ready} returns true.
- *
* @memberof VoxelProvider.prototype
* @type {number|undefined}
* @readonly
@@ -189,7 +172,6 @@ Object.defineProperties(VoxelProvider.prototype, {
/**
* Gets the number of keyframes in the dataset.
* This should not be called before {@link VoxelProvider#ready} returns true.
- *
* @memberof VoxelProvider.prototype
* @type {number}
* @readonly
@@ -202,7 +184,6 @@ Object.defineProperties(VoxelProvider.prototype, {
/**
* Gets the {@link TimeIntervalCollection} for the dataset, or undefined if it doesn't have timestamps.
* This should not be called before {@link VoxelProvider#ready} returns true.
- *
* @memberof VoxelProvider.prototype
* @type {TimeIntervalCollection}
* @readonly
@@ -217,7 +198,6 @@ Object.defineProperties(VoxelProvider.prototype, {
* Requests the data for a given tile. The data is a flattened 3D array ordered by X, then Y, then Z.
* This function should not be called before {@link VoxelProvider#ready} returns true.
* @function
- *
* @param {object} [options] Object with the following properties:
* @param {number} [options.tileLevel=0] The tile's level.
* @param {number} [options.tileX=0] The tile's X coordinate.
diff --git a/packages/engine/Source/Scene/VoxelRenderResources.js b/packages/engine/Source/Scene/VoxelRenderResources.js
index 407eab42a74c..bf73c329edf9 100644
--- a/packages/engine/Source/Scene/VoxelRenderResources.js
+++ b/packages/engine/Source/Scene/VoxelRenderResources.js
@@ -24,9 +24,8 @@ import Megatexture from "../Shaders/Voxels/Megatexture.js";
* Set up render resources, including basic shader code, for rendering
* a Voxel primitive.
* The shader code generated by this function may be modified in later stages.
- * @constructor
+ * @class
* @param {VoxelPrimitive} primitive
- *
* @private
*/
function VoxelRenderResources(primitive) {
@@ -34,10 +33,8 @@ function VoxelRenderResources(primitive) {
/**
* An object used to build a shader incrementally. Each pipeline stage
* may add lines of shader code to this object.
- *
* @type {ShaderBuilder}
* @readonly
- *
* @private
*/
this.shaderBuilder = shaderBuilder;
@@ -69,7 +66,6 @@ function VoxelRenderResources(primitive) {
/**
* A dictionary mapping uniform name to functions that return the uniform
* values.
- *
* @type {Object}
*/
this.uniformMap = uniformMap;
diff --git a/packages/engine/Source/Scene/VoxelShape.js b/packages/engine/Source/Scene/VoxelShape.js
index d7ccc0b82acf..4f7acd934711 100644
--- a/packages/engine/Source/Scene/VoxelShape.js
+++ b/packages/engine/Source/Scene/VoxelShape.js
@@ -3,15 +3,12 @@ import DeveloperError from "../Core/DeveloperError.js";
/**
* Controls per-shape behavior for culling and rendering voxel grids.
* This type describes an interface and is not intended to be instantiated directly.
- *
* @alias VoxelShape
- * @constructor
- *
+ * @class
* @see VoxelBoxShape
* @see VoxelEllipsoidShape
* @see VoxelCylinderShape
* @see VoxelShapeType
- *
* @private
*/
function VoxelShape() {
@@ -22,7 +19,6 @@ Object.defineProperties(VoxelShape.prototype, {
/**
* An oriented bounding box containing the bounded shape.
* The update function must be called before accessing this value.
- *
* @memberof VoxelShape.prototype
* @type {OrientedBoundingBox}
* @readonly
@@ -34,7 +30,6 @@ Object.defineProperties(VoxelShape.prototype, {
/**
* A bounding sphere containing the bounded shape.
* The update function must be called before accessing this value.
- *
* @memberof VoxelShape.prototype
* @type {BoundingSphere}
* @readonly
@@ -46,7 +41,6 @@ Object.defineProperties(VoxelShape.prototype, {
/**
* A transformation matrix containing the bounded shape.
* The update function must be called before accessing this value.
- *
* @memberof VoxelShape.prototype
* @type {Matrix4}
* @readonly
@@ -58,7 +52,6 @@ Object.defineProperties(VoxelShape.prototype, {
/**
* A transformation matrix containing the shape, ignoring the bounds.
* The update function must be called before accessing this value.
- *
* @memberof VoxelShape.prototype
* @type {Matrix4}
* @readonly
@@ -95,7 +88,6 @@ Object.defineProperties(VoxelShape.prototype, {
/**
* Update the shape's state.
- *
* @param {Matrix4} modelMatrix The model matrix.
* @param {Cartesian3} minBounds The minimum bounds.
* @param {Cartesian3} maxBounds The maximum bounds.
@@ -106,7 +98,6 @@ VoxelShape.prototype.update = DeveloperError.throwInstantiationError;
/**
* Computes an oriented bounding box for a specified tile.
* The update function must be called before calling this function.
- *
* @param {number} tileLevel The tile's level.
* @param {number} tileX The tile's x coordinate.
* @param {number} tileY The tile's y coordinate.
@@ -120,7 +111,6 @@ VoxelShape.prototype.computeOrientedBoundingBoxForTile =
/**
* Computes an oriented bounding box for a specified sample within a specified tile.
* The update function must be called before calling this function.
- *
* @param {SpatialNode} spatialNode The spatial node containing the sample
* @param {Cartesian3} tileDimensions The size of the tile in number of samples, before padding
* @param {Cartesian3} tileUv The sample coordinate within the tile
@@ -132,22 +122,18 @@ VoxelShape.prototype.computeOrientedBoundingBoxForSample =
/**
* Defines the minimum bounds of the shape. The meaning can vary per-shape.
- *
* @type {Cartesian3}
* @constant
* @readonly
- *
* @private
*/
VoxelShape.DefaultMinBounds = DeveloperError.throwInstantiationError;
/**
* Defines the maximum bounds of the shape. The meaning can vary per-shape.
- *
* @type {Cartesian3}
* @constant
* @readonly
- *
* @private
*/
VoxelShape.DefaultMaxBounds = DeveloperError.throwInstantiationError;
diff --git a/packages/engine/Source/Scene/VoxelShapeType.js b/packages/engine/Source/Scene/VoxelShapeType.js
index 92576dae3898..9c788dbf4659 100644
--- a/packages/engine/Source/Scene/VoxelShapeType.js
+++ b/packages/engine/Source/Scene/VoxelShapeType.js
@@ -5,15 +5,12 @@ import VoxelEllipsoidShape from "./VoxelEllipsoidShape.js";
/**
* An enum of voxel shapes. The shape controls how the voxel grid is mapped to 3D space.
- *
* @enum {string}
- *
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
*/
const VoxelShapeType = {
/**
* A box shape.
- *
* @type {string}
* @constant
* @private
@@ -21,7 +18,6 @@ const VoxelShapeType = {
BOX: "BOX",
/**
* An ellipsoid shape.
- *
* @type {string}
* @constant
* @private
@@ -29,7 +25,6 @@ const VoxelShapeType = {
ELLIPSOID: "ELLIPSOID",
/**
* A cylinder shape.
- *
* @type {string}
* @constant
* @private
@@ -81,10 +76,8 @@ VoxelShapeType.getMaxBounds = function (shapeType) {
* Converts a shape type to a constructor that can be used to create a shape
* object or get per-shape properties like DefaultMinBounds and
* DefaultMaxBounds.
- *
* @param {VoxelShapeType} shapeType The shape type.
* @returns {Function} The shape's constructor.
- *
* @private
*/
VoxelShapeType.getShapeConstructor = function (shapeType) {
diff --git a/packages/engine/Source/Scene/VoxelTraversal.js b/packages/engine/Source/Scene/VoxelTraversal.js
index 0cc1db7b2d22..e444913f3d2e 100644
--- a/packages/engine/Source/Scene/VoxelTraversal.js
+++ b/packages/engine/Source/Scene/VoxelTraversal.js
@@ -19,10 +19,8 @@ import TextureMinificationFilter from "../Renderer/TextureMinificationFilter.js"
/**
* Handles tileset traversal, tile requests, and GPU resources. Intended to be
* private and paired with a {@link VoxelPrimitive}, which has a user-facing API.
- *
* @alias VoxelTraversal
- * @constructor
- *
+ * @class
* @param {VoxelPrimitive} primitive
* @param {Context} context
* @param {Cartesian3} dimensions
@@ -30,7 +28,6 @@ import TextureMinificationFilter from "../Renderer/TextureMinificationFilter.js"
* @param {MetadataComponentType[]} componentTypes
* @param {number} keyframeCount
* @param {number} [maximumTextureMemoryByteLength]
- *
* @private
*/
function VoxelTraversal(
@@ -218,7 +215,6 @@ function VoxelTraversal(
/**
* Finds a keyframe node in the traversal
- *
* @param {number} megatextureIndex
* @returns {KeyframeNode}
*/
@@ -344,9 +340,7 @@ VoxelTraversal.prototype.isRenderable = function (tile) {
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
- *
* @see VoxelTraversal#destroy
*/
VoxelTraversal.prototype.isDestroyed = function () {
@@ -360,11 +354,8 @@ VoxelTraversal.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @see VoxelTraversal#isDestroyed
- *
* @example
* voxelTraversal = voxelTraversal && voxelTraversal.destroy();
*/
@@ -385,10 +376,8 @@ VoxelTraversal.prototype.destroy = function () {
/**
* @function
- *
* @param {VoxelTraversal} that
* @param {SpatialNode} node
- *
* @private
*/
function recomputeBoundingVolumesRecursive(that, node) {
@@ -403,10 +392,8 @@ function recomputeBoundingVolumesRecursive(that, node) {
/**
* @function
- *
* @param {VoxelTraversal} that
* @param {KeyframeNode} keyframeNode
- *
* @private
*/
function requestData(that, keyframeNode) {
@@ -476,10 +463,8 @@ function requestData(that, keyframeNode) {
/**
* @function
- *
* @param {number} x
* @returns {number}
- *
* @private
*/
function mapInfiniteRangeToZeroOne(x) {
@@ -488,10 +473,8 @@ function mapInfiniteRangeToZeroOne(x) {
/**
* @function
- *
* @param {VoxelTraversal} that
* @param {FrameState} frameState
- *
* @private
*/
function loadAndUnload(that, frameState) {
@@ -665,7 +648,6 @@ function loadAndUnload(that, frameState) {
/**
* Compute a priority for a keyframe node.
- *
* @private
* @param {number} previousKeyframe
* @param {number} keyframe
@@ -699,9 +681,10 @@ function keyframePriority(previousKeyframe, keyframe, nextKeyframe, traversal) {
/**
* @function
- *
+ * @param loadAndUnloadTimeMs
+ * @param generateOctreeTimeMs
+ * @param totalTimeMs
* @param {VoxelTraversal} that
- *
* @private
*/
function printDebugInformation(
@@ -824,7 +807,6 @@ const GpuOctreeFlag = {
/**
* @function
- *
* @param {VoxelTraversal} that
* @param {FrameState} frameState
* @param {number} sampleCount
diff --git a/packages/engine/Source/Scene/WebMapServiceImageryProvider.js b/packages/engine/Source/Scene/WebMapServiceImageryProvider.js
index f5277f2eeec2..916b084d5c69 100644
--- a/packages/engine/Source/Scene/WebMapServiceImageryProvider.js
+++ b/packages/engine/Source/Scene/WebMapServiceImageryProvider.js
@@ -10,7 +10,6 @@ import UrlTemplateImageryProvider from "./UrlTemplateImageryProvider.js";
/**
* EPSG codes known to include reverse axis orders, but are not within 4000-5000.
- *
* @type {number[]}
*/
const includesReverseAxis = [
@@ -23,7 +22,6 @@ const includesReverseAxis = [
/**
* EPSG codes known to not include reverse axis orders, and are within 4000-5000.
- *
* @type {number[]}
*/
const excludesReverseAxis = [
@@ -35,7 +33,6 @@ const excludesReverseAxis = [
* @typedef {object} WebMapServiceImageryProvider.ConstructorOptions
*
* Initialization options for the WebMapServiceImageryProvider constructor
- *
* @property {Resource|string} url The URL of the WMS service. The URL supports the same keywords as the {@link UrlTemplateImageryProvider}.
* @property {string} layers The layers to include, separated by commas.
* @property {object} [parameters=WebMapServiceImageryProvider.DefaultParameters] Additional parameters to pass to the WMS server in the GetMap URL.
@@ -73,12 +70,9 @@ const excludesReverseAxis = [
/**
* Provides tiled imagery hosted by a Web Map Service (WMS) server.
- *
* @alias WebMapServiceImageryProvider
- * @constructor
- *
+ * @class
* @param {WebMapServiceImageryProvider.ConstructorOptions} options Object describing initialization options
- *
* @see ArcGisMapServerImageryProvider
* @see BingMapsImageryProvider
* @see GoogleEarthEnterpriseMapsProvider
@@ -87,10 +81,8 @@ const excludesReverseAxis = [
* @see TileMapServiceImageryProvider
* @see WebMapTileServiceImageryProvider
* @see UrlTemplateImageryProvider
- *
* @see {@link http://resources.esri.com/help/9.3/arcgisserver/apis/rest/|ArcGIS Server REST API}
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
- *
* @example
* const provider = new Cesium.WebMapServiceImageryProvider({
* url : 'https://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer',
@@ -526,7 +518,6 @@ Object.defineProperties(WebMapServiceImageryProvider.prototype, {
/**
* Gets the credits to be displayed when a given tile is displayed.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level;
@@ -538,7 +529,6 @@ WebMapServiceImageryProvider.prototype.getTileCredits = function (x, y, level) {
/**
* Requests the image for a given tile.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
@@ -578,13 +568,12 @@ WebMapServiceImageryProvider.prototype.requestImage = function (
/**
* Asynchronously determines what features, if any, are located at a given longitude and latitude within
* a tile.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
* @param {number} longitude The longitude at which to pick features.
* @param {number} latitude The latitude at which to pick features.
- * @return {Promise|undefined} A promise for the picked features that will resolve when the asynchronous
+ * @returns {Promise|undefined} A promise for the picked features that will resolve when the asynchronous
* picking completes. The resolved value is an array of {@link ImageryLayerFeatureInfo}
* instances. The array may be empty if no features are found at the given location.
*/
@@ -605,12 +594,11 @@ WebMapServiceImageryProvider.prototype.pickFeatures = function (
/**
* The default parameters to include in the WMS URL to obtain images. The values are as follows:
- * service=WMS
- * version=1.1.1
- * request=GetMap
- * styles=
- * format=image/jpeg
- *
+ * service=WMS
+ * version=1.1.1
+ * request=GetMap
+ * styles=
+ * format=image/jpeg
* @constant
* @type {object}
*/
@@ -624,10 +612,9 @@ WebMapServiceImageryProvider.DefaultParameters = Object.freeze({
/**
* The default parameters to include in the WMS URL to get feature information. The values are as follows:
- * service=WMS
- * version=1.1.1
- * request=GetFeatureInfo
- *
+ * service=WMS
+ * version=1.1.1
+ * request=GetFeatureInfo
* @constant
* @type {object}
*/
diff --git a/packages/engine/Source/Scene/WebMapTileServiceImageryProvider.js b/packages/engine/Source/Scene/WebMapTileServiceImageryProvider.js
index 1ee3c2002504..046af3a8526a 100644
--- a/packages/engine/Source/Scene/WebMapTileServiceImageryProvider.js
+++ b/packages/engine/Source/Scene/WebMapTileServiceImageryProvider.js
@@ -20,7 +20,6 @@ const defaultParameters = Object.freeze({
* @typedef {object} WebMapTileServiceImageryProvider.ConstructorOptions
*
* Initialization options for the WebMapTileServiceImageryProvider constructor
- *
* @property {Resource|string} url The base URL for the WMTS GetTile operation (for KVP-encoded requests) or the tile-URL template (for RESTful requests). The tile-URL template should contain the following variables: {style}, {TileMatrixSet}, {TileMatrix}, {TileRow}, {TileCol}. The first two are optional if actual values are hardcoded or not required by the server. The {s} keyword may be used to specify subdomains.
* @property {string} [format='image/jpeg'] The MIME type for images to retrieve from the server.
* @property {string} layer The layer name for WMTS requests.
@@ -46,14 +45,10 @@ const defaultParameters = Object.freeze({
/**
* Provides tiled imagery served by {@link http://www.opengeospatial.org/standards/wmts|WMTS 1.0.0} compliant servers.
* This provider supports HTTP KVP-encoded and RESTful GetTile requests, but does not yet support the SOAP encoding.
- *
* @alias WebMapTileServiceImageryProvider
- * @constructor
- *
+ * @class
* @param {WebMapTileServiceImageryProvider.ConstructorOptions} options Object describing initialization options
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Web%20Map%20Tile%20Service%20with%20Time.html|Cesium Sandcastle Web Map Tile Service with Time Demo}
- *
* @example
* // Example 1. USGS shaded relief tiles (KVP)
* const shadedRelief1 = new Cesium.WebMapTileServiceImageryProvider({
@@ -67,7 +62,6 @@ const defaultParameters = Object.freeze({
* credit : new Cesium.Credit('U. S. Geological Survey')
* });
* viewer.imageryLayers.addImageryProvider(shadedRelief1);
- *
* @example
* // Example 2. USGS shaded relief tiles (RESTful)
* const shadedRelief2 = new Cesium.WebMapTileServiceImageryProvider({
@@ -80,7 +74,6 @@ const defaultParameters = Object.freeze({
* credit : new Cesium.Credit('U. S. Geological Survey')
* });
* viewer.imageryLayers.addImageryProvider(shadedRelief2);
- *
* @example
* // Example 3. NASA time dynamic weather data (RESTful)
* const times = Cesium.TimeIntervalCollection.fromIso8601({
@@ -103,7 +96,6 @@ const defaultParameters = Object.freeze({
* credit : new Cesium.Credit('NASA Global Imagery Browse Services for EOSDIS')
* });
* viewer.imageryLayers.addImageryProvider(weather);
- *
* @see ArcGisMapServerImageryProvider
* @see BingMapsImageryProvider
* @see GoogleEarthEnterpriseMapsProvider
@@ -524,7 +516,6 @@ Object.defineProperties(WebMapTileServiceImageryProvider.prototype, {
/**
* Gets the credits to be displayed when a given tile is displayed.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level;
@@ -540,7 +531,6 @@ WebMapTileServiceImageryProvider.prototype.getTileCredits = function (
/**
* Requests the image for a given tile.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
@@ -580,13 +570,12 @@ WebMapTileServiceImageryProvider.prototype.requestImage = function (
/**
* Picking features is not currently supported by this imagery provider, so this function simply returns
* undefined.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
* @param {number} longitude The longitude at which to pick features.
* @param {number} latitude The latitude at which to pick features.
- * @return {undefined} Undefined since picking is not supported.
+ * @returns {undefined} Undefined since picking is not supported.
*/
WebMapTileServiceImageryProvider.prototype.pickFeatures = function (
x,
diff --git a/packages/engine/Source/Scene/buildVoxelDrawCommands.js b/packages/engine/Source/Scene/buildVoxelDrawCommands.js
index ba8aba81bb37..6a9006706746 100644
--- a/packages/engine/Source/Scene/buildVoxelDrawCommands.js
+++ b/packages/engine/Source/Scene/buildVoxelDrawCommands.js
@@ -12,10 +12,8 @@ import processVoxelProperties from "./processVoxelProperties.js";
/**
* @function
- *
* @param {VoxelPrimitive} primitive
* @param {Context} context
- *
* @private
*/
function buildVoxelDrawCommands(primitive, context) {
diff --git a/packages/engine/Source/Scene/computeFlyToLocationForRectangle.js b/packages/engine/Source/Scene/computeFlyToLocationForRectangle.js
index 0a984cb7cb35..832dc0ae0f34 100644
--- a/packages/engine/Source/Scene/computeFlyToLocationForRectangle.js
+++ b/packages/engine/Source/Scene/computeFlyToLocationForRectangle.js
@@ -6,12 +6,9 @@ import SceneMode from "./SceneMode.js";
/**
* Computes the final camera location to view a rectangle adjusted for the current terrain.
* If the terrain does not support availability, the height above the ellipsoid is used.
- *
* @param {Rectangle} rectangle The rectangle being zoomed to.
* @param {Scene} scene The scene being used.
- *
* @returns {Promise} The optimal location to place the camera so that the entire rectangle is in view.
- *
* @private
*/
async function computeFlyToLocationForRectangle(rectangle, scene) {
diff --git a/packages/engine/Source/Scene/createBillboardPointCallback.js b/packages/engine/Source/Scene/createBillboardPointCallback.js
index a9340b81d3d5..ce98b98700a8 100644
--- a/packages/engine/Source/Scene/createBillboardPointCallback.js
+++ b/packages/engine/Source/Scene/createBillboardPointCallback.js
@@ -1,13 +1,11 @@
/**
* Creates a {@link createBillboardPointCallback.CanvasFunction} that will create a canvas with a point.
- *
* @param {number} centerAlpha The alpha of the center of the point. The value must be in the range [0.0, 1.0].
* @param {string} cssColor The CSS color string.
* @param {string} cssOutlineColor The CSS color of the point outline.
* @param {number} cssOutlineWidth The width of the outline in pixels.
* @param {number} pixelSize The size of the point in pixels.
- * @return {createBillboardPointCallback.CanvasFunction} The function that will return a canvas with the point drawn on it.
- *
+ * @returns {createBillboardPointCallback.CanvasFunction} The function that will return a canvas with the point drawn on it.
* @private
*/
function createBillboardPointCallback(
diff --git a/packages/engine/Source/Scene/createElevationBandMaterial.js b/packages/engine/Source/Scene/createElevationBandMaterial.js
index 544a1d67f6c7..f1b5b26b9294 100644
--- a/packages/engine/Source/Scene/createElevationBandMaterial.js
+++ b/packages/engine/Source/Scene/createElevationBandMaterial.js
@@ -410,13 +410,11 @@ function createLayeredEntries(layers) {
/**
* @typedef createElevationBandMaterialEntry
- *
* @property {number} height The height.
* @property {Color} color The color at this height.
*/
/**
* @typedef createElevationBandMaterialBand
- *
* @property {createElevationBandMaterialEntry[]} entries A list of elevation entries. They will automatically be sorted from lowest to highest. If there is only one entry and extendsDownards
and extendUpwards
are both false
, they will both be set to true
.
* @property {boolean} [extendDownwards=false] If true
, the band's minimum elevation color will extend infinitely downwards.
* @property {boolean} [extendUpwards=false] If true
, the band's maximum elevation color will extend infinitely upwards.
@@ -427,16 +425,12 @@ function createLayeredEntries(layers) {
*
* The shader does a binary search over all the heights to find out which colors are above and below a given height, and
* interpolates between them for the final color. This material supports hundreds of entries relatively cheaply.
- *
* @function createElevationBandMaterial
- *
* @param {object} options Object with the following properties:
* @param {Scene} options.scene The scene where the visualization is taking place.
* @param {createElevationBandMaterialBand[]} options.layers A list of bands ordered from lowest to highest precedence.
* @returns {Material} A new {@link Material} instance.
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Elevation%20Band%20Material.html|Cesium Sandcastle Elevation Band Demo}
- *
* @example
* scene.globe.material = Cesium.createElevationBandMaterial({
* scene : scene,
@@ -548,7 +542,6 @@ function createElevationBandMaterial(options) {
/**
* Function for checking if the context will allow floating point textures for heights.
- *
* @param {Context} context The {@link Context}.
* @returns {boolean} true
if floating point textures can be used for heights.
* @private
diff --git a/packages/engine/Source/Scene/createGooglePhotorealistic3DTileset.js b/packages/engine/Source/Scene/createGooglePhotorealistic3DTileset.js
index eee6c6abb61d..4ef2198e8849 100644
--- a/packages/engine/Source/Scene/createGooglePhotorealistic3DTileset.js
+++ b/packages/engine/Source/Scene/createGooglePhotorealistic3DTileset.js
@@ -7,15 +7,11 @@ import Resource from "../Core/Resource.js";
/**
* Creates a {@link Cesium3DTileset} instance for the Google Photorealistic 3D Tiles tileset.
- *
* @function
- *
- * @param {string} [key=GoogleMaps.defaultApiKey] Your API key to access Google Photorealistic 3D Tiles. See {@link https://developers.google.com/maps/documentation/javascript/get-api-key} for instructions on how to create your own key.
+ * @param {string} [key] Your API key to access Google Photorealistic 3D Tiles. See {@link https://developers.google.com/maps/documentation/javascript/get-api-key} for instructions on how to create your own key.
* @param {Cesium3DTileset.ConstructorOptions} [options] An object describing initialization options.
* @returns {Promise}
- *
* @see GoogleMaps
- *
* @example
* const viewer = new Cesium.Viewer("cesiumContainer");
*
@@ -25,7 +21,6 @@ import Resource from "../Core/Resource.js";
* } catch (error) {
* console.log(`Error creating tileset: ${error}`);
* }
- *
* @example
* // Use your own Google Maps API key
* Cesium.GoogleMaps.defaultApiKey = "your-api-key";
diff --git a/packages/engine/Source/Scene/createOsmBuildingsAsync.js b/packages/engine/Source/Scene/createOsmBuildingsAsync.js
index 08b4b019c7ad..8dc66444cbd6 100644
--- a/packages/engine/Source/Scene/createOsmBuildingsAsync.js
+++ b/packages/engine/Source/Scene/createOsmBuildingsAsync.js
@@ -8,24 +8,20 @@ import Cesium3DTileStyle from "./Cesium3DTileStyle.js";
* Creates a {@link Cesium3DTileset} instance for the
* {@link https://cesium.com/content/cesium-osm-buildings/|Cesium OSM Buildings}
* tileset.
- *
* @function
- *
* @param {object} [options] Construction options. Any options allowed by the {@link Cesium3DTileset} constructor
* may be specified here. In addition to those, the following properties are supported:
- * @param {Color} [options.defaultColor=Color.WHITE] The default color to use for buildings
+ * @param {Color} [options.defaultColor] The default color to use for buildings
* that do not have a color. This parameter is ignored if options.style
is specified.
* @param {Cesium3DTileStyle} [options.style] The style to use with the tileset. If not
* specified, a default style is used which gives each building or building part a
* color inferred from its OpenStreetMap tags
. If no color can be inferred,
* options.defaultColor
is used.
- * @param {boolean} [options.enableShowOutline=true] If true, enable rendering outlines. This can be set to false to avoid the additional processing of geometry at load time.
- * @param {boolean} [options.showOutline=true] Whether to show outlines around buildings. When true,
+ * @param {boolean} [options.enableShowOutline] If true, enable rendering outlines. This can be set to false to avoid the additional processing of geometry at load time.
+ * @param {boolean} [options.showOutline] Whether to show outlines around buildings. When true,
* outlines are displayed. When false, outlines are not displayed.
* @returns {Promise}
- *
* @see Ion
- *
* @example
* // Create Cesium OSM Buildings with default styling
* const viewer = new Cesium.Viewer("cesiumContainer");
@@ -35,7 +31,6 @@ import Cesium3DTileStyle from "./Cesium3DTileStyle.js";
* } catch (error) {
* console.log(`Error creating tileset: ${error}`);
* }
- *
* @example
* // Create Cesium OSM Buildings with a custom style highlighting
* // schools and hospitals.
diff --git a/packages/engine/Source/Scene/createTangentSpaceDebugPrimitive.js b/packages/engine/Source/Scene/createTangentSpaceDebugPrimitive.js
index 5c3086e11b33..4031ee447594 100644
--- a/packages/engine/Source/Scene/createTangentSpaceDebugPrimitive.js
+++ b/packages/engine/Source/Scene/createTangentSpaceDebugPrimitive.js
@@ -13,15 +13,12 @@ import Primitive from "./Primitive.js";
* normal
, tangent
, and bitangent
. Normal
* is red; tangent is green; and bitangent is blue. If an attribute is not
* present, it is not drawn.
- *
* @function
- *
* @param {object} options Object with the following properties:
* @param {Geometry} options.geometry The Geometry
instance with the attribute.
- * @param {number} [options.length=10000.0] The length of each line segment in meters. This can be negative to point the vector in the opposite direction.
- * @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The model matrix that transforms to transform the geometry from model to world coordinates.
+ * @param {number} [options.length] The length of each line segment in meters. This can be negative to point the vector in the opposite direction.
+ * @param {Matrix4} [options.modelMatrix] The model matrix that transforms to transform the geometry from model to world coordinates.
* @returns {Primitive} A new Primitive
instance with geometry for the vectors.
- *
* @example
* scene.primitives.add(Cesium.createTangentSpaceDebugPrimitive({
* geometry : instance.geometry,
diff --git a/packages/engine/Source/Scene/createWorldImageryAsync.js b/packages/engine/Source/Scene/createWorldImageryAsync.js
index 24151b0a8df4..066e82a6fb7a 100644
--- a/packages/engine/Source/Scene/createWorldImageryAsync.js
+++ b/packages/engine/Source/Scene/createWorldImageryAsync.js
@@ -4,15 +4,11 @@ import IonWorldImageryStyle from "./IonWorldImageryStyle.js";
/**
* Creates an {@link IonImageryProvider} instance for ion's default global base imagery layer, currently Bing Maps.
- *
* @function
- *
- * @param {Object} [options] Object with the following properties:
- * @param {IonWorldImageryStyle} [options.style=IonWorldImageryStyle] The style of base imagery, only AERIAL, AERIAL_WITH_LABELS, and ROAD are currently supported.
+ * @param {object} [options] Object with the following properties:
+ * @param {IonWorldImageryStyle} [options.style] The style of base imagery, only AERIAL, AERIAL_WITH_LABELS, and ROAD are currently supported.
* @returns {Promise}
- *
* @see Ion
- *
* @example
* // Create a Cesium World Imagery base layer with default settings
* try {
@@ -20,7 +16,6 @@ import IonWorldImageryStyle from "./IonWorldImageryStyle.js";
* } catch (error) {
* console.log(`There was an error creating world imagery: ${error}`);
* }
- *
* @example
* // Create Cesium World Imagery with different style
* try {
diff --git a/packages/engine/Source/Scene/findContentMetadata.js b/packages/engine/Source/Scene/findContentMetadata.js
index db20826686ba..3abffbd93d52 100644
--- a/packages/engine/Source/Scene/findContentMetadata.js
+++ b/packages/engine/Source/Scene/findContentMetadata.js
@@ -8,12 +8,10 @@ import oneTimeWarning from "../Core/oneTimeWarning.js";
* Check if a content has metadata, either defined in its metadata field (3D Tiles 1.1) or in
* the 3DTILES_metadata
extension. If defined, get the content metadata
* with the corresponding class.
- *
* @function
- *
* @param {Cesium3DTileset} tileset The tileset to query for content metadata
* @param {object} contentHeader the JSON header for a {@link Cesium3DTileContent}
- * @return {ContentMetadata} the content metadata, or undefined
if not found
+ * @returns {ContentMetadata} the content metadata, or undefined
if not found
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
diff --git a/packages/engine/Source/Scene/findGroupMetadata.js b/packages/engine/Source/Scene/findGroupMetadata.js
index c19bf0ba3619..b5ca6825fa37 100644
--- a/packages/engine/Source/Scene/findGroupMetadata.js
+++ b/packages/engine/Source/Scene/findGroupMetadata.js
@@ -5,12 +5,10 @@ import hasExtension from "./hasExtension.js";
* Check if a content has metadata, either defined in its metadata field (3D Tiles 1.1)
* or in the 3DTILES_metadata
extension. If so, look up the group with the
* corresponding ID.
- *
* @function
- *
* @param {Cesium3DTileset} tileset The tileset to query for group metadata
* @param {object} contentHeader the JSON header for a {@link Cesium3DTileContent}
- * @return {GroupMetadata} the group metadata, or undefined
if not found
+ * @returns {GroupMetadata} the group metadata, or undefined
if not found
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
diff --git a/packages/engine/Source/Scene/findTileMetadata.js b/packages/engine/Source/Scene/findTileMetadata.js
index f455afdf9c94..4981bba56697 100644
--- a/packages/engine/Source/Scene/findTileMetadata.js
+++ b/packages/engine/Source/Scene/findTileMetadata.js
@@ -12,10 +12,9 @@ import oneTimeWarning from "../Core/oneTimeWarning.js";
* This assumes that tileset.metadata has been created before any tiles are constructed.
*
* @function
- *
* @param {Cesium3DTileset} tileset The tileset to query for tile metadata
* @param {object} tileHeader the JSON header for a {@link Cesium3DTile}
- * @return {TileMetadata} the tile metadata, or undefined
if not found
+ * @returns {TileMetadata} the tile metadata, or undefined
if not found
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
diff --git a/packages/engine/Source/Scene/getBinaryAccessor.js b/packages/engine/Source/Scene/getBinaryAccessor.js
index aad46fc83bab..b6b774eb3dbb 100644
--- a/packages/engine/Source/Scene/getBinaryAccessor.js
+++ b/packages/engine/Source/Scene/getBinaryAccessor.js
@@ -27,6 +27,7 @@ const ClassPerType = {
};
/**
+ * @param accessor
* @private
*/
function getBinaryAccessor(accessor) {
diff --git a/packages/engine/Source/Scene/getClipAndStyleCode.js b/packages/engine/Source/Scene/getClipAndStyleCode.js
index 5b3e71f61eab..e99712f57208 100644
--- a/packages/engine/Source/Scene/getClipAndStyleCode.js
+++ b/packages/engine/Source/Scene/getClipAndStyleCode.js
@@ -2,7 +2,6 @@ import Check from "../Core/Check.js";
/**
* Gets a GLSL snippet that clips a fragment using the `clip` function from {@link getClippingFunction} and styles it.
- *
* @param {string} samplerUniformName Name of the uniform for the clipping planes texture sampler.
* @param {string} matrixUniformName Name of the uniform for the clipping planes matrix.
* @param {string} styleUniformName Name of the uniform for the clipping planes style, a vec4.
diff --git a/packages/engine/Source/Scene/getClippingFunction.js b/packages/engine/Source/Scene/getClippingFunction.js
index d17d9819b598..ff092a7dddd0 100644
--- a/packages/engine/Source/Scene/getClippingFunction.js
+++ b/packages/engine/Source/Scene/getClippingFunction.js
@@ -5,7 +5,6 @@ import ClippingPlaneCollection from "./ClippingPlaneCollection.js";
const textureResolutionScratch = new Cartesian2();
/**
* Gets the GLSL functions needed to retrieve clipping planes from a ClippingPlaneCollection's texture.
- *
* @param {ClippingPlaneCollection} clippingPlaneCollection ClippingPlaneCollection with a defined texture.
* @param {Context} context The current rendering context.
* @returns {string} A string containing GLSL functions for retrieving clipping planes.
diff --git a/packages/engine/Source/Scene/parseBatchTable.js b/packages/engine/Source/Scene/parseBatchTable.js
index 26cb21abec7f..72f45afb2f50 100644
--- a/packages/engine/Source/Scene/parseBatchTable.js
+++ b/packages/engine/Source/Scene/parseBatchTable.js
@@ -24,15 +24,13 @@ import oneTimeWarning from "../Core/oneTimeWarning.js";
*
* See the {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_structural_metadata|EXT_structural_metadata Extension} for glTF.
*
- *
* @param {object} options Object with the following properties:
* @param {number} options.count The number of features in the batch table.
* @param {object} options.batchTable The batch table JSON
* @param {Uint8Array} [options.binaryBody] The batch table binary body
- * @param {boolean} [options.parseAsPropertyAttributes=false] If true, binary properties are parsed as property attributes instead of a property table. This is used for .pnts models for GPU styling.
+ * @param {boolean} [options.parseAsPropertyAttributes] If true, binary properties are parsed as property attributes instead of a property table. This is used for .pnts models for GPU styling.
* @param {ModelComponents.Attribute[]} [options.customAttributeOutput] Pass in an empty array here and this method will populate it with a list of custom attributes that will store the values of the property attributes. The attributes will be created with typed arrays, the caller is responsible for uploading them to the GPU. This option is required when options.parseAsPropertyAttributes is true.
- * @return {StructuralMetadata} A transcoded structural metadata object
- *
+ * @returns {StructuralMetadata} A transcoded structural metadata object
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
@@ -148,10 +146,8 @@ function parseBatchTable(options) {
/**
* Divide the batch table's properties into binary, JSON and hierarchy
* extension as each is handled separately
- *
* @param {object} batchTable The batch table JSON
* @returns {object} The batch table divided into binary, JSON and hierarchy portions. Extras and extensions are also divided out for ease of processing.
- *
* @private
*/
function partitionProperties(batchTable) {
@@ -207,13 +203,11 @@ function partitionProperties(batchTable) {
/**
* Transcode the binary properties of the batch table to be compatible with
* EXT_structural_metadata
- *
* @param {number} featureCount The number of features in the batch table
* @param {string} className The name of the metadata class to be created.
* @param {Object} binaryProperties A dictionary of property ID to property definition
* @param {Uint8Array} [binaryBody] The binary body of the batch table
- * @return {object} Transcoded data needed for constructing a {@link StructuralMetadata} object.
- *
+ * @returns {object} Transcoded data needed for constructing a {@link StructuralMetadata} object.
* @private
*/
function transcodeBinaryProperties(
@@ -404,9 +398,8 @@ function transcodeBinaryPropertiesAsPropertyAttributes(
/**
* Given a property definition from the batch table, compute the equivalent
* EXT_structural_metadata
type definition
- *
* @param {object} property The batch table property definition
- * @return {object} The corresponding structural metadata property definition
+ * @returns {object} The corresponding structural metadata property definition
* @private
*/
function transcodePropertyType(property) {
@@ -421,10 +414,9 @@ function transcodePropertyType(property) {
/**
* Convert the component type of a batch table property to the corresponding
* type used with structural metadata
- *
+ * @param componentType
* @property {string} componentType the batch table's component type
- * @return {string} The corresponding structural metadata data type
- *
+ * @returns {string} The corresponding structural metadata data type
* @private
*/
function transcodeComponentType(componentType) {
diff --git a/packages/engine/Source/Scene/parseFeatureMetadataLegacy.js b/packages/engine/Source/Scene/parseFeatureMetadataLegacy.js
index 481ed2b0606b..a3235215ac33 100644
--- a/packages/engine/Source/Scene/parseFeatureMetadataLegacy.js
+++ b/packages/engine/Source/Scene/parseFeatureMetadataLegacy.js
@@ -10,13 +10,12 @@ import MetadataTable from "./MetadataTable.js";
/**
* Parse the EXT_feature_metadata
glTF extension to create a
* structural metadata object.
- *
* @param {object} options Object with the following properties:
* @param {object} options.extension The extension JSON object.
* @param {MetadataSchema} options.schema The parsed schema.
* @param {Object} [options.bufferViews] An object mapping bufferView IDs to Uint8Array objects.
* @param {Object} [options.textures] An object mapping texture IDs to {@link Texture} objects.
- * @return {StructuralMetadata} A structural metadata object
+ * @returns {StructuralMetadata} A structural metadata object
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
diff --git a/packages/engine/Source/Scene/parseStructuralMetadata.js b/packages/engine/Source/Scene/parseStructuralMetadata.js
index 1e401fe7c277..e77fed28cdee 100644
--- a/packages/engine/Source/Scene/parseStructuralMetadata.js
+++ b/packages/engine/Source/Scene/parseStructuralMetadata.js
@@ -10,13 +10,12 @@ import MetadataTable from "./MetadataTable.js";
/**
* Parse the EXT_structural_metadata
glTF extension to create a
* structural metadata object.
- *
* @param {object} options Object with the following properties:
* @param {object} options.extension The extension JSON object.
* @param {MetadataSchema} options.schema The parsed schema.
* @param {Object} [options.bufferViews] An object mapping bufferView IDs to Uint8Array objects.
* @param {Object} [options.textures] An object mapping texture IDs to {@link Texture} objects.
- * @return {StructuralMetadata} A structural metadata object
+ * @returns {StructuralMetadata} A structural metadata object
* @private
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
*/
diff --git a/packages/engine/Source/Scene/preprocess3DTileContent.js b/packages/engine/Source/Scene/preprocess3DTileContent.js
index 8bb8f76d5c20..48158b7e8a72 100644
--- a/packages/engine/Source/Scene/preprocess3DTileContent.js
+++ b/packages/engine/Source/Scene/preprocess3DTileContent.js
@@ -8,7 +8,6 @@ import Cesium3DTileContentType from "./Cesium3DTileContentType.js";
* Results of the preprocess3DTileContent() function. This includes the
* {@link Cesium3DTileContentType} and the payload. The payload is either
* binary or JSON depending on the content type.
- *
* @typedef {object} PreprocessedContent
* @property {Cesium3DTileContentType} contentType The type of the content
* @property {Uint8Array} [binaryPayload] For binary files, the payload is returned as a typed array with byteOffset of 0
@@ -19,9 +18,8 @@ import Cesium3DTileContentType from "./Cesium3DTileContentType.js";
/**
* Preprocess a {@link Cesium3DTileContent}, to determine the type of content
* and to parse JSON files into objects.
- *
* @param {ArrayBuffer} arrayBuffer The raw binary payload
- * @return {PreprocessedContent}
+ * @returns {PreprocessedContent}
* @private
*/
function preprocess3DTileContent(arrayBuffer) {
diff --git a/packages/engine/Source/Scene/processVoxelProperties.js b/packages/engine/Source/Scene/processVoxelProperties.js
index 4c91b7f120d2..584d777416b1 100644
--- a/packages/engine/Source/Scene/processVoxelProperties.js
+++ b/packages/engine/Source/Scene/processVoxelProperties.js
@@ -6,10 +6,8 @@ import ShaderDestination from "../Renderer/ShaderDestination.js";
* Update the shader with defines, structs, and functions to handle
* voxel properties and statistics
* @function
- *
* @param {VoxelRenderResources} renderResources
* @param {VoxelPrimitive} primitive
- *
* @private
*/
function processVoxelProperties(renderResources, primitive) {
@@ -355,12 +353,9 @@ function processVoxelProperties(renderResources, primitive) {
/**
* Converts a {@link MetadataType} to a GLSL type.
- *
* @function
- *
* @param {MetadataType} type The {@link MetadataType}.
* @returns {string} The GLSL type.
- *
* @private
*/
function getGlslType(type) {
@@ -377,12 +372,9 @@ function getGlslType(type) {
/**
* Gets the GLSL swizzle when reading data from a texture.
- *
* @function
- *
* @param {MetadataType} type The {@link MetadataType}.
* @returns {string} The GLSL swizzle.
- *
* @private
*/
function getGlslTextureSwizzle(type) {
@@ -399,12 +391,9 @@ function getGlslTextureSwizzle(type) {
/**
* Gets the GLSL type of the partial derivative of {@link MetadataType}.
- *
* @function
- *
* @param {MetadataType} type The {@link MetadataType}.
* @returns {string} The GLSL type.
- *
* @private
*/
function getGlslPartialDerivativeType(type) {
@@ -422,12 +411,9 @@ function getGlslPartialDerivativeType(type) {
/**
* GLSL needs to have `.0` at the end of whole number floats or else it's
* treated like an integer.
- *
* @function
- *
* @param {number} number The number to convert.
* @returns {string} The number as floating point in GLSL.
- *
* @private
*/
function getGlslNumberAsFloat(number) {
@@ -440,13 +426,10 @@ function getGlslNumberAsFloat(number) {
/**
* Gets the GLSL field
- *
* @function
- *
* @param {MetadataType} type
* @param {number} index
* @returns {string}
- *
* @private
*/
function getGlslField(type, index) {
diff --git a/packages/engine/Source/Widget/CesiumWidget.js b/packages/engine/Source/Widget/CesiumWidget.js
index 80926fac0702..735010153830 100644
--- a/packages/engine/Source/Widget/CesiumWidget.js
+++ b/packages/engine/Source/Widget/CesiumWidget.js
@@ -116,23 +116,21 @@ function configureCameraFrustum(widget) {
/**
* A widget containing a Cesium scene.
- *
* @alias CesiumWidget
- * @constructor
- *
+ * @class
* @param {Element|string} container The DOM element or ID that will contain the widget.
* @param {object} [options] Object with the following properties:
- * @param {Clock} [options.clock=new Clock()] The clock to use to control current time.
- * @param {ImageryLayer|false} [options.baseLayer=ImageryLayer.fromWorldImagery()] The bottommost imagery layer applied to the globe. If set to false
, no imagery provider will be added.
- * @param {TerrainProvider} [options.terrainProvider=new EllipsoidTerrainProvider] The terrain provider.
+ * @param {Clock} [options.clock] The clock to use to control current time.
+ * @param {ImageryLayer|false} [options.baseLayer] The bottommost imagery layer applied to the globe. If set to false
, no imagery provider will be added.
+ * @param {TerrainProvider} [options.terrainProvider] The terrain provider.
* @param {Terrain} [options.terrain] A terrain object which handles asynchronous terrain provider. Can only specify if options.terrainProvider is undefined.
* @param {SkyBox| false} [options.skyBox] The skybox used to render the stars. When undefined
, the default stars are used. If set to false
, no skyBox, Sun, or Moon will be added.
* @param {SkyAtmosphere | false} [options.skyAtmosphere] Blue sky, and the glow around the Earth's limb. Set to false
to turn it off.
- * @param {SceneMode} [options.sceneMode=SceneMode.SCENE3D] The initial scene mode.
- * @param {boolean} [options.scene3DOnly=false] When true
, each geometry instance will only be rendered in 3D to save GPU memory.
- * @param {boolean} [options.orderIndependentTranslucency=true] If true and the configuration supports it, use order independent translucency.
- * @param {MapProjection} [options.mapProjection=new GeographicProjection()] The map projection to use in 2D and Columbus View modes.
- * @param {Globe | false} [options.globe=new Globe(mapProjection.ellipsoid)] The globe to use in the scene. If set to false
, no globe will be added and the sky atmosphere will be hidden by default.
+ * @param {SceneMode} [options.sceneMode] The initial scene mode.
+ * @param {boolean} [options.scene3DOnly] When true
, each geometry instance will only be rendered in 3D to save GPU memory.
+ * @param {boolean} [options.orderIndependentTranslucency] If true and the configuration supports it, use order independent translucency.
+ * @param {MapProjection} [options.mapProjection] The map projection to use in 2D and Columbus View modes.
+ * @param {Globe | false} [options.globe] The globe to use in the scene. If set to false
, no globe will be added and the sky atmosphere will be hidden by default.
* @param {boolean} [options.useDefaultRenderLoop=true] True if this widget should control the render loop, false otherwise.
* @param {boolean} [options.useBrowserRecommendedResolution=true] If true, render at the browser's recommended resolution and ignore window.devicePixelRatio
.
* @param {number} [options.targetFrameRate] The target frame rate when using the default render loop.
@@ -414,7 +412,6 @@ Object.defineProperties(CesiumWidget.prototype, {
/**
* Gets the parent container.
* @memberof CesiumWidget.prototype
- *
* @type {Element}
* @readonly
*/
@@ -427,7 +424,6 @@ Object.defineProperties(CesiumWidget.prototype, {
/**
* Gets the canvas.
* @memberof CesiumWidget.prototype
- *
* @type {HTMLCanvasElement}
* @readonly
*/
@@ -440,7 +436,6 @@ Object.defineProperties(CesiumWidget.prototype, {
/**
* Gets the credit container.
* @memberof CesiumWidget.prototype
- *
* @type {Element}
* @readonly
*/
@@ -453,7 +448,6 @@ Object.defineProperties(CesiumWidget.prototype, {
/**
* Gets the credit viewport
* @memberof CesiumWidget.prototype
- *
* @type {Element}
* @readonly
*/
@@ -466,7 +460,6 @@ Object.defineProperties(CesiumWidget.prototype, {
/**
* Gets the scene.
* @memberof CesiumWidget.prototype
- *
* @type {Scene}
* @readonly
*/
@@ -479,7 +472,6 @@ Object.defineProperties(CesiumWidget.prototype, {
/**
* Gets the collection of image layers that will be rendered on the globe.
* @memberof CesiumWidget.prototype
- *
* @type {ImageryLayerCollection}
* @readonly
*/
@@ -492,7 +484,6 @@ Object.defineProperties(CesiumWidget.prototype, {
/**
* The terrain provider providing surface geometry for the globe.
* @memberof CesiumWidget.prototype
- *
* @type {TerrainProvider}
*/
terrainProvider: {
@@ -507,7 +498,6 @@ Object.defineProperties(CesiumWidget.prototype, {
/**
* Manages the list of credits to display on screen and in the lightbox.
* @memberof CesiumWidget.prototype
- *
* @type {CreditDisplay}
*/
creditDisplay: {
@@ -519,7 +509,6 @@ Object.defineProperties(CesiumWidget.prototype, {
/**
* Gets the camera.
* @memberof CesiumWidget.prototype
- *
* @type {Camera}
* @readonly
*/
@@ -532,7 +521,6 @@ Object.defineProperties(CesiumWidget.prototype, {
/**
* Gets the clock.
* @memberof CesiumWidget.prototype
- *
* @type {Clock}
* @readonly
*/
@@ -545,7 +533,6 @@ Object.defineProperties(CesiumWidget.prototype, {
/**
* Gets the screen space event handler.
* @memberof CesiumWidget.prototype
- *
* @type {ScreenSpaceEventHandler}
* @readonly
*/
@@ -561,7 +548,6 @@ Object.defineProperties(CesiumWidget.prototype, {
* determines the frame rate. If defined, this value must be greater than 0. A value higher
* than the underlying requestAnimationFrame implementation will have no effect.
* @memberof CesiumWidget.prototype
- *
* @type {number}
*/
targetFrameRate: {
@@ -591,7 +577,6 @@ Object.defineProperties(CesiumWidget.prototype, {
* will be set to false. It must be set back to true to continue rendering
* after the error.
* @memberof CesiumWidget.prototype
- *
* @type {boolean}
*/
useDefaultRenderLoop: {
@@ -616,7 +601,6 @@ Object.defineProperties(CesiumWidget.prototype, {
* will cause the scene to be rendered at 320x240 and then scaled up while setting
* it to 2.0 will cause the scene to be rendered at 1280x960 and then scaled down.
* @memberof CesiumWidget.prototype
- *
* @type {number}
* @default 1.0
*/
@@ -645,7 +629,6 @@ Object.defineProperties(CesiumWidget.prototype, {
* will be in device pixels. {@link CesiumWidget#resolutionScale} will still take effect whether
* this flag is true or false.
* @memberof CesiumWidget.prototype
- *
* @type {boolean}
* @default true
*/
@@ -667,7 +650,6 @@ Object.defineProperties(CesiumWidget.prototype, {
* which can be dismissed using an OK button. This panel is displayed automatically
* when a render loop error occurs, if showRenderLoopErrors was not false when the
* widget was constructed.
- *
* @param {string} title The title to be displayed on the error panel. This string is interpreted as text.
* @param {string} [message] A helpful, user-facing message to display prior to the detailed error information. This string is interpreted as HTML.
* @param {string} [error] The error to be displayed on the error panel. This string is formatted using {@link formatError} and then displayed as text.
diff --git a/packages/engine/Source/Workers/createTaskProcessorWorker.js b/packages/engine/Source/Workers/createTaskProcessorWorker.js
index deffad5ab06e..0cfa02380c8a 100644
--- a/packages/engine/Source/Workers/createTaskProcessorWorker.js
+++ b/packages/engine/Source/Workers/createTaskProcessorWorker.js
@@ -3,15 +3,11 @@ import formatError from "../Core/formatError.js";
/**
* Creates an adapter function to allow a calculation function to operate as a Web Worker,
* paired with TaskProcessor, to receive tasks and return results.
- *
* @function createTaskProcessorWorker
- *
* @param {createTaskProcessorWorker.WorkerFunction} workerFunction The calculation function,
* which takes parameters and returns a result.
* @returns {createTaskProcessorWorker.TaskProcessorWorkerFunction} A function that adapts the
* calculation function to work as a Web Worker onmessage listener with TaskProcessor.
- *
- *
* @example
* function doCalculation(parameters, transferableObjects) {
* // calculate some result using the inputs in parameters
@@ -20,7 +16,6 @@ import formatError from "../Core/formatError.js";
*
* return Cesium.createTaskProcessorWorker(doCalculation);
* // the resulting function is compatible with TaskProcessor
- *
* @see TaskProcessor
* @see {@link http://www.w3.org/TR/workers/|Web Workers}
* @see {@link http://www.w3.org/TR/html5/common-dom-interfaces.html#transferable-objects|Transferable objects}
@@ -83,12 +78,10 @@ function createTaskProcessorWorker(workerFunction) {
/**
* A function that performs a calculation in a Web Worker.
* @callback createTaskProcessorWorker.WorkerFunction
- *
* @param {object} parameters Parameters to the calculation.
* @param {Array} transferableObjects An array that should be filled with references to objects inside
* the result that should be transferred back to the main document instead of copied.
* @returns {object} The result of the calculation.
- *
* @example
* function calculate(parameters, transferableObjects) {
* // perform whatever calculation is necessary.
@@ -107,7 +100,6 @@ function createTaskProcessorWorker(workerFunction) {
* A Web Worker message event handler function that handles the interaction with TaskProcessor,
* specifically, task ID management and posting a response message containing the result.
* @callback createTaskProcessorWorker.TaskProcessorWorkerFunction
- *
* @param {object} event The onmessage event object.
*/
export default createTaskProcessorWorker;
diff --git a/packages/engine/Specs/Scene/GlobeSpec.js b/packages/engine/Specs/Scene/GlobeSpec.js
index af2863a7a40f..d865296864f1 100644
--- a/packages/engine/Specs/Scene/GlobeSpec.js
+++ b/packages/engine/Specs/Scene/GlobeSpec.js
@@ -82,6 +82,7 @@ describe(
/**
* Repeatedly calls render until the load queue is empty. Returns a promise that resolves
* when the load queue is empty.
+ * @param globe
*/
function updateUntilDone(globe) {
// update until the load queue is empty.
diff --git a/packages/engine/Specs/Scene/GlobeSurfaceTileProviderSpec.js b/packages/engine/Specs/Scene/GlobeSurfaceTileProviderSpec.js
index 1d14e3bffe09..302f7803fd62 100644
--- a/packages/engine/Specs/Scene/GlobeSurfaceTileProviderSpec.js
+++ b/packages/engine/Specs/Scene/GlobeSurfaceTileProviderSpec.js
@@ -67,6 +67,7 @@ describe(
/**
* Repeatedly calls update until the load queue is empty. You must wrap any code to follow
* this in a "runs" function.
+ * @param globe
*/
function updateUntilDone(globe) {
// update until the load queue is empty.
diff --git a/packages/engine/Specs/Scene/GltfBuilder.js b/packages/engine/Specs/Scene/GltfBuilder.js
index 7819df4ae663..93dac133cad8 100644
--- a/packages/engine/Specs/Scene/GltfBuilder.js
+++ b/packages/engine/Specs/Scene/GltfBuilder.js
@@ -4,7 +4,7 @@ import findAccessorMinMax from "../../Source/Scene/GltfPipeline/findAccessorMinM
/**
* A fluent interface for programmatically building a glTF.
* @alias GltfBuilder
- * @constructor
+ * @class
* @private
*/
function GltfBuilder() {
diff --git a/packages/engine/Specs/Scene/ImageryLayerCollectionSpec.js b/packages/engine/Specs/Scene/ImageryLayerCollectionSpec.js
index 426ecf48a0ba..59c75215e6c1 100644
--- a/packages/engine/Specs/Scene/ImageryLayerCollectionSpec.js
+++ b/packages/engine/Specs/Scene/ImageryLayerCollectionSpec.js
@@ -261,13 +261,11 @@ describe(
/**
* Repeatedly calls update until the load queue is empty. Returns a promise that resolves
* once the load queue is empty.
- *
* @param {Ray} ray The ray to test for intersection.
+ * @param globe
* @param {Scene} scene The scene.
- * @return {Promise}
- *
+ * @returns {Promise}
* @private
- *
*/
function updateUntilDone(globe, scene) {
// update until the load queue is empty.
diff --git a/packages/engine/Specs/Scene/ImplicitTileCoordinatesSpec.js b/packages/engine/Specs/Scene/ImplicitTileCoordinatesSpec.js
index 30d5c1e04f83..5cdf46df3a0b 100644
--- a/packages/engine/Specs/Scene/ImplicitTileCoordinatesSpec.js
+++ b/packages/engine/Specs/Scene/ImplicitTileCoordinatesSpec.js
@@ -10,7 +10,7 @@ describe("Scene/ImplicitTileCoordinates", function () {
* @param {number} level
* @param {number} x
* @param {number} y
- * @param {number} [subtreeLevels=2]
+ * @param {number} [subtreeLevels]
* @returns {ImplicitTileCoordinates}
*/
function quadtreeCoordinates(level, x, y, subtreeLevels) {
@@ -29,7 +29,7 @@ describe("Scene/ImplicitTileCoordinates", function () {
* @param {number} x
* @param {number} y
* @param {number} z
- * @param {number} [subtreeLevels=2]
+ * @param {number} [subtreeLevels]
* @returns {ImplicitTileCoordinates}
*/
function octreeCoordinates(level, x, y, z, subtreeLevels) {
diff --git a/packages/engine/Specs/createWebglVersionHelper.js b/packages/engine/Specs/createWebglVersionHelper.js
index c08b5ee688e0..e7c89ee6aeb4 100644
--- a/packages/engine/Specs/createWebglVersionHelper.js
+++ b/packages/engine/Specs/createWebglVersionHelper.js
@@ -19,7 +19,5 @@ export default function createWebglVersionHelper(createSpecs) {
/**
* @callback createSpecCallback
- *
* @param {ContextOptions} [contextOptions] options used to initialize context
- *
*/
diff --git a/packages/widgets/Source/Animation/Animation.js b/packages/widgets/Source/Animation/Animation.js
index 5d2990993a0b..946c06de9f1f 100644
--- a/packages/widgets/Source/Animation/Animation.js
+++ b/packages/widgets/Source/Animation/Animation.js
@@ -405,16 +405,11 @@ SvgButton.prototype.setTooltip = function (tooltip) {
* animation time in sync with the end user's system clock, typically displaying
* "today" or "right now." This mode is not available in {@link ClockRange.CLAMPED} or
* {@link ClockRange.LOOP_STOP} mode if the current time is outside of {@link Clock}'s startTime and endTime.
- *
* @alias Animation
- * @constructor
- *
+ * @class
* @param {Element|string} container The DOM element or ID that will contain the widget.
* @param {AnimationViewModel} viewModel The view model used by this widget.
- *
- * @exception {DeveloperError} Element with id "container" does not exist in the document.
- *
- *
+ * @throws {DeveloperError} Element with id "container" does not exist in the document.
* @example
* // In HTML head, include a link to Animation.css stylesheet,
* // and in the body, include:
@@ -429,7 +424,6 @@ SvgButton.prototype.setTooltip = function (tooltip) {
* requestAnimationFrame(tick);
* }
* requestAnimationFrame(tick);
- *
* @see AnimationViewModel
* @see Clock
*/
@@ -710,7 +704,6 @@ function Animation(container, viewModel) {
Object.defineProperties(Animation.prototype, {
/**
* Gets the parent container.
- *
* @memberof Animation.prototype
* @type {Element}
* @readonly
@@ -723,7 +716,6 @@ Object.defineProperties(Animation.prototype, {
/**
* Gets the view model.
- *
* @memberof Animation.prototype
* @type {AnimationViewModel}
* @readonly
@@ -858,7 +850,6 @@ Animation.prototype.resize = function () {
/**
* Updates the widget to reflect any modified CSS rules for theming.
- *
* @example
* //Switch to the cesium-lighter theme.
* document.body.className = 'cesium-lighter';
diff --git a/packages/widgets/Source/Animation/AnimationViewModel.js b/packages/widgets/Source/Animation/AnimationViewModel.js
index 864b0bc51e6f..9df6f4064835 100644
--- a/packages/widgets/Source/Animation/AnimationViewModel.js
+++ b/packages/widgets/Source/Animation/AnimationViewModel.js
@@ -95,10 +95,8 @@ function multiplierToAngle(multiplier, shuttleRingTicks, clockViewModel) {
/**
* The view model for the {@link Animation} widget.
* @alias AnimationViewModel
- * @constructor
- *
+ * @class
* @param {ClockViewModel} clockViewModel The ClockViewModel instance to use.
- *
* @see Animation
*/
function AnimationViewModel(clockViewModel) {
@@ -380,7 +378,6 @@ function AnimationViewModel(clockViewModel) {
/**
* Gets or sets the default date formatter used by new instances.
- *
* @member
* @type {AnimationViewModel.DateFormatter}
*/
@@ -431,7 +428,6 @@ AnimationViewModel.defaultTicks = [
/**
* Gets or sets the default time formatter used by new instances.
- *
* @member
* @type {AnimationViewModel.TimeFormatter}
*/
@@ -456,7 +452,6 @@ AnimationViewModel.defaultTimeFormatter = function (date, viewModel) {
/**
* Gets a copy of the array of positive known clock multipliers to associate with the shuttle ring.
- *
* @returns {number[]} The array of known clock multipliers associated with the shuttle ring.
*/
AnimationViewModel.prototype.getShuttleRingTicks = function () {
@@ -469,7 +464,6 @@ AnimationViewModel.prototype.getShuttleRingTicks = function () {
* and maximum range of values for the shuttle ring as well as the values that are snapped
* to when a single click is made. The values need not be in order, as they will be sorted
* automatically, and duplicate values will be removed.
- *
* @param {number[]} positiveTicks The list of known positive clock multipliers to associate with the shuttle ring.
*/
AnimationViewModel.prototype.setShuttleRingTicks = function (positiveTicks) {
@@ -534,7 +528,6 @@ Object.defineProperties(AnimationViewModel.prototype, {
/**
* Gets the clock view model.
* @memberof AnimationViewModel.prototype
- *
* @type {ClockViewModel}
*/
clockViewModel: {
@@ -546,7 +539,6 @@ Object.defineProperties(AnimationViewModel.prototype, {
/**
* Gets the pause toggle button view model.
* @memberof AnimationViewModel.prototype
- *
* @type {ToggleButtonViewModel}
*/
pauseViewModel: {
@@ -558,7 +550,6 @@ Object.defineProperties(AnimationViewModel.prototype, {
/**
* Gets the reverse toggle button view model.
* @memberof AnimationViewModel.prototype
- *
* @type {ToggleButtonViewModel}
*/
playReverseViewModel: {
@@ -570,7 +561,6 @@ Object.defineProperties(AnimationViewModel.prototype, {
/**
* Gets the play toggle button view model.
* @memberof AnimationViewModel.prototype
- *
* @type {ToggleButtonViewModel}
*/
playForwardViewModel: {
@@ -582,7 +572,6 @@ Object.defineProperties(AnimationViewModel.prototype, {
/**
* Gets the realtime toggle button view model.
* @memberof AnimationViewModel.prototype
- *
* @type {ToggleButtonViewModel}
*/
playRealtimeViewModel: {
@@ -594,7 +583,6 @@ Object.defineProperties(AnimationViewModel.prototype, {
/**
* Gets or sets the function which formats a date for display.
* @memberof AnimationViewModel.prototype
- *
* @type {AnimationViewModel.DateFormatter}
* @default AnimationViewModel.defaultDateFormatter
*/
@@ -617,7 +605,6 @@ Object.defineProperties(AnimationViewModel.prototype, {
/**
* Gets or sets the function which formats a time for display.
* @memberof AnimationViewModel.prototype
- *
* @type {AnimationViewModel.TimeFormatter}
* @default AnimationViewModel.defaultTimeFormatter
*/
@@ -645,7 +632,6 @@ AnimationViewModel._realtimeShuttleRingAngle = realtimeShuttleRingAngle;
/**
* A function that formats a date for display.
* @callback AnimationViewModel.DateFormatter
- *
* @param {JulianDate} date The date to be formatted
* @param {AnimationViewModel} viewModel The AnimationViewModel instance requesting formatting.
* @returns {string} The string representation of the calendar date portion of the provided date.
@@ -654,7 +640,6 @@ AnimationViewModel._realtimeShuttleRingAngle = realtimeShuttleRingAngle;
/**
* A function that formats a time for display.
* @callback AnimationViewModel.TimeFormatter
- *
* @param {JulianDate} date The date to be formatted
* @param {AnimationViewModel} viewModel The AnimationViewModel instance requesting formatting.
* @returns {string} The string representation of the time portion of the provided date.
diff --git a/packages/widgets/Source/BaseLayerPicker/BaseLayerPicker.js b/packages/widgets/Source/BaseLayerPicker/BaseLayerPicker.js
index a1ec026cca76..9f4e34583592 100644
--- a/packages/widgets/Source/BaseLayerPicker/BaseLayerPicker.js
+++ b/packages/widgets/Source/BaseLayerPicker/BaseLayerPicker.js
@@ -23,21 +23,16 @@ import BaseLayerPickerViewModel from "./BaseLayerPickerViewModel.js";
*
* By default, the BaseLayerPicker uses a default list of example providers for demonstration purposes.
* Notably some of these providers, such as Esri ArcGIS and Stadia Maps , have seperate terms of service and require authentication for production use.
- *
* @alias BaseLayerPicker
- * @constructor
- *
+ * @class
* @param {Element|string} container The parent HTML container node or ID for this widget.
* @param {object} options Object with the following properties:
* @param {Globe} options.globe The Globe to use.
- * @param {ProviderViewModel[]} [options.imageryProviderViewModels=[]] The array of ProviderViewModel instances to use for imagery.
+ * @param {ProviderViewModel[]} [options.imageryProviderViewModels] The array of ProviderViewModel instances to use for imagery.
* @param {ProviderViewModel} [options.selectedImageryProviderViewModel] The view model for the current base imagery layer, if not supplied the first available imagery layer is used.
- * @param {ProviderViewModel[]} [options.terrainProviderViewModels=[]] The array of ProviderViewModel instances to use for terrain.
+ * @param {ProviderViewModel[]} [options.terrainProviderViewModels] The array of ProviderViewModel instances to use for terrain.
* @param {ProviderViewModel} [options.selectedTerrainProviderViewModel] The view model for the current base terrain layer, if not supplied the first available terrain layer is used.
- *
- * @exception {DeveloperError} Element with id "container" does not exist in the document.
- *
- *
+ * @throws {DeveloperError} Element with id "container" does not exist in the document.
* @example
* // In HTML head, include a link to the BaseLayerPicker.css stylesheet,
* // and in the body, include:
>includeStart('debug', pragmas.debug);
@@ -158,7 +156,6 @@ Object.defineProperties(Geocoder.prototype, {
/**
* Gets the parent container.
* @memberof Geocoder.prototype
- *
* @type {Element}
*/
container: {
@@ -170,7 +167,6 @@ Object.defineProperties(Geocoder.prototype, {
/**
* Gets the parent container.
* @memberof Geocoder.prototype
- *
* @type {Element}
*/
searchSuggestionsContainer: {
@@ -182,7 +178,6 @@ Object.defineProperties(Geocoder.prototype, {
/**
* Gets the view model.
* @memberof Geocoder.prototype
- *
* @type {GeocoderViewModel}
*/
viewModel: {
diff --git a/packages/widgets/Source/Geocoder/GeocoderViewModel.js b/packages/widgets/Source/Geocoder/GeocoderViewModel.js
index a5a8542248ff..4956fa860101 100644
--- a/packages/widgets/Source/Geocoder/GeocoderViewModel.js
+++ b/packages/widgets/Source/Geocoder/GeocoderViewModel.js
@@ -23,15 +23,14 @@ const DEFAULT_HEIGHT = 1000;
/**
* The view model for the {@link Geocoder} widget.
* @alias GeocoderViewModel
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Scene} options.scene The Scene instance to use.
* @param {GeocoderService[]} [options.geocoderServices] Geocoder services to use for geocoding queries.
* If more than one are supplied, suggestions will be gathered for the geocoders that support it,
* and if no suggestion is selected the result from the first geocoder service wil be used.
* @param {number} [options.flightDuration] The duration of the camera flight to an entered location, in seconds.
- * @param {Geocoder.DestinationFoundFunction} [options.destinationFound=GeocoderViewModel.flyToDestination] A callback function that is called after a successful geocode. If not supplied, the default behavior is to fly the camera to the result destination.
+ * @param {Geocoder.DestinationFoundFunction} [options.destinationFound] A callback function that is called after a successful geocode. If not supplied, the default behavior is to fly the camera to the result destination.
*/
function GeocoderViewModel(options) {
//>>includeStart('debug', pragmas.debug);
@@ -142,7 +141,6 @@ function GeocoderViewModel(options) {
/**
* Gets or sets a value indicating if this instance should always show its text input field.
- *
* @type {boolean}
* @default false
*/
@@ -183,7 +181,6 @@ function GeocoderViewModel(options) {
});
/**
* Gets a value indicating whether a search is currently in progress. This property is observable.
- *
* @type {boolean}
*/
this.isSearchInProgress = undefined;
@@ -196,7 +193,6 @@ function GeocoderViewModel(options) {
/**
* Gets or sets the text to search for. The text can be an address, or longitude, latitude,
* and optional height, where longitude and latitude are in degrees and height is in meters.
- *
* @type {string}
*/
this.searchText = undefined;
@@ -222,7 +218,6 @@ function GeocoderViewModel(options) {
* Gets or sets the the duration of the camera flight in seconds.
* A value of zero causes the camera to instantly switch to the geocoding location.
* The duration will be computed based on the distance when undefined.
- *
* @type {number|undefined}
* @default undefined
*/
@@ -247,7 +242,6 @@ Object.defineProperties(GeocoderViewModel.prototype, {
/**
* Gets the event triggered on flight completion.
* @memberof GeocoderViewModel.prototype
- *
* @type {Event}
*/
complete: {
@@ -259,7 +253,6 @@ Object.defineProperties(GeocoderViewModel.prototype, {
/**
* Gets the scene to control.
* @memberof GeocoderViewModel.prototype
- *
* @type {Scene}
*/
scene: {
@@ -271,7 +264,6 @@ Object.defineProperties(GeocoderViewModel.prototype, {
/**
* Gets the Command that is executed when the button is clicked.
* @memberof GeocoderViewModel.prototype
- *
* @type {Command}
*/
search: {
@@ -283,7 +275,6 @@ Object.defineProperties(GeocoderViewModel.prototype, {
/**
* Gets the currently selected geocoder search suggestion
* @memberof GeocoderViewModel.prototype
- *
* @type {object}
*/
selectedSuggestion: {
@@ -295,8 +286,7 @@ Object.defineProperties(GeocoderViewModel.prototype, {
/**
* Gets the list of geocoder search suggestions
* @memberof GeocoderViewModel.prototype
- *
- * @type {Object[]}
+ * @type {object[]}
*/
suggestions: {
get: function () {
diff --git a/packages/widgets/Source/HomeButton/HomeButton.js b/packages/widgets/Source/HomeButton/HomeButton.js
index 342a7d8ab932..0e3f0a218d60 100644
--- a/packages/widgets/Source/HomeButton/HomeButton.js
+++ b/packages/widgets/Source/HomeButton/HomeButton.js
@@ -9,10 +9,8 @@ import HomeButtonViewModel from "./HomeButtonViewModel.js";
/**
* A single button widget for returning to the default camera view of the current scene.
- *
* @alias HomeButton
- * @constructor
- *
+ * @class
* @param {Element|string} container The DOM element or ID that will contain the widget.
* @param {Scene} scene The Scene instance to use.
* @param {number} [duration] The time, in seconds, it takes to complete the camera flight home.
@@ -55,7 +53,6 @@ Object.defineProperties(HomeButton.prototype, {
/**
* Gets the parent container.
* @memberof HomeButton.prototype
- *
* @type {Element}
*/
container: {
@@ -67,7 +64,6 @@ Object.defineProperties(HomeButton.prototype, {
/**
* Gets the view model.
* @memberof HomeButton.prototype
- *
* @type {HomeButtonViewModel}
*/
viewModel: {
diff --git a/packages/widgets/Source/HomeButton/HomeButtonViewModel.js b/packages/widgets/Source/HomeButton/HomeButtonViewModel.js
index ba030c366078..95107c1877c8 100644
--- a/packages/widgets/Source/HomeButton/HomeButtonViewModel.js
+++ b/packages/widgets/Source/HomeButton/HomeButtonViewModel.js
@@ -5,8 +5,7 @@ import createCommand from "../createCommand.js";
/**
* The view model for {@link HomeButton}.
* @alias HomeButtonViewModel
- * @constructor
- *
+ * @class
* @param {Scene} scene The scene instance to use.
* @param {number} [duration] The duration of the camera flight in seconds.
*/
@@ -27,7 +26,6 @@ function HomeButtonViewModel(scene, duration) {
/**
* Gets or sets the tooltip. This property is observable.
- *
* @type {string}
*/
this.tooltip = "View Home";
@@ -39,7 +37,6 @@ Object.defineProperties(HomeButtonViewModel.prototype, {
/**
* Gets the scene to control.
* @memberof HomeButtonViewModel.prototype
- *
* @type {Scene}
*/
scene: {
@@ -51,7 +48,6 @@ Object.defineProperties(HomeButtonViewModel.prototype, {
/**
* Gets the Command that is executed when the button is clicked.
* @memberof HomeButtonViewModel.prototype
- *
* @type {Command}
*/
command: {
@@ -65,7 +61,6 @@ Object.defineProperties(HomeButtonViewModel.prototype, {
* A value of zero causes the camera to instantly switch to home view.
* The duration will be computed based on the distance when undefined.
* @memberof HomeButtonViewModel.prototype
- *
* @type {number|undefined}
*/
duration: {
diff --git a/packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.js b/packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.js
index 2c0949b0050a..bce370731c44 100644
--- a/packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.js
+++ b/packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.js
@@ -4,13 +4,10 @@ import I3SBuildingSceneLayerExplorerViewModel from "./I3SBuildingSceneLayerExplo
/**
* I3S Building Scene Layer widget
- *
* @alias I3SBuildingSceneLayerExplorer
- * @constructor
- *
+ * @class
* @param {string} containerId The DOM element ID that will contain the widget.
* @param {I3SDataProvider} i3sProvider I3S Data provider instance.
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=I3S%20Building%20Scene%20Layer.html|I3S Building Scene Layer}
*/
function I3SBuildingSceneLayerExplorer(containerId, i3sProvider) {
diff --git a/packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorerViewModel.js b/packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorerViewModel.js
index f1ab2f4b1255..5dc590ba4136 100644
--- a/packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorerViewModel.js
+++ b/packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorerViewModel.js
@@ -87,8 +87,7 @@ async function setLevels(i3sProvider, levels) {
/**
* The view model for {@link I3SBuildingSceneLayerExplorer}.
* @alias I3sBslExplorerViewModel
- * @constructor
- *
+ * @class
* @param {I3SDataProvider} i3sProvider I3S Data provider instance.
*/
function I3SBuildingSceneLayerExplorerViewModel(i3sProvider) {
diff --git a/packages/widgets/Source/InfoBox/InfoBox.js b/packages/widgets/Source/InfoBox/InfoBox.js
index 82dda94f90c8..c4fc0b58d503 100644
--- a/packages/widgets/Source/InfoBox/InfoBox.js
+++ b/packages/widgets/Source/InfoBox/InfoBox.js
@@ -12,13 +12,10 @@ import InfoBoxViewModel from "./InfoBoxViewModel.js";
/**
* A widget for displaying information or a description.
- *
* @alias InfoBox
- * @constructor
- *
+ * @class
* @param {Element|string} container The DOM element or ID that will contain the widget.
- *
- * @exception {DeveloperError} Element with id "container" does not exist in the document.
+ * @throws {DeveloperError} Element with id "container" does not exist in the document.
*/
function InfoBox(container) {
//>>includeStart('debug', pragmas.debug);
@@ -150,7 +147,6 @@ Object.defineProperties(InfoBox.prototype, {
/**
* Gets the parent container.
* @memberof InfoBox.prototype
- *
* @type {Element}
*/
container: {
@@ -162,7 +158,6 @@ Object.defineProperties(InfoBox.prototype, {
/**
* Gets the view model.
* @memberof InfoBox.prototype
- *
* @type {InfoBoxViewModel}
*/
viewModel: {
@@ -174,7 +169,6 @@ Object.defineProperties(InfoBox.prototype, {
/**
* Gets the iframe used to display the description.
* @memberof InfoBox.prototype
- *
* @type {HTMLIFrameElement}
*/
frame: {
diff --git a/packages/widgets/Source/InfoBox/InfoBoxViewModel.js b/packages/widgets/Source/InfoBox/InfoBoxViewModel.js
index 21603e73e896..938c4bae4513 100644
--- a/packages/widgets/Source/InfoBox/InfoBoxViewModel.js
+++ b/packages/widgets/Source/InfoBox/InfoBoxViewModel.js
@@ -9,7 +9,7 @@ const cameraDisabledPath =
/**
* The view model for {@link InfoBox}.
* @alias InfoBoxViewModel
- * @constructor
+ * @class
*/
function InfoBoxViewModel() {
this._cameraClicked = new Event();
diff --git a/packages/widgets/Source/InspectorShared.js b/packages/widgets/Source/InspectorShared.js
index 25e4d1326b85..930205a54748 100644
--- a/packages/widgets/Source/InspectorShared.js
+++ b/packages/widgets/Source/InspectorShared.js
@@ -11,7 +11,7 @@ const InspectorShared = {};
* @param {string} labelText The text to display in the checkbox label
* @param {string} checkedBinding The name of the variable used for checked binding
* @param {string} [enableBinding] The name of the variable used for enable binding
- * @return {Element}
+ * @returns {Element}
*/
InspectorShared.createCheckbox = function (
labelText,
@@ -44,7 +44,7 @@ InspectorShared.createCheckbox = function (
* @param {string} headerText The text to display at the top of the section
* @param {string} sectionVisibleBinding The name of the variable used for visible binding
* @param {string} toggleSectionVisibilityBinding The name of the function used to toggle visibility
- * @return {Element}
+ * @returns {Element}
*/
InspectorShared.createSection = function (
panel,
@@ -92,7 +92,7 @@ InspectorShared.createSection = function (
* @param {number} max The maximum value
* @param {number} [step] The step size. Defaults to "any".
* @param {string} [inputValueBinding] The name of the variable used for input value binding
- * @return {Element}
+ * @returns {Element}
*/
InspectorShared.createRangeInput = function (
rangeText,
@@ -141,7 +141,7 @@ InspectorShared.createRangeInput = function (
* @param {string} buttonText The button text
* @param {string} clickedBinding The name of the variable used for clicked binding
* @param {string} [activeBinding] The name of the variable used for active binding
- * @return {Element}
+ * @returns {Element}
*/
InspectorShared.createButton = function (
buttonText,
diff --git a/packages/widgets/Source/NavigationHelpButton/NavigationHelpButton.js b/packages/widgets/Source/NavigationHelpButton/NavigationHelpButton.js
index 05b7573eb54d..186b49ca63ea 100644
--- a/packages/widgets/Source/NavigationHelpButton/NavigationHelpButton.js
+++ b/packages/widgets/Source/NavigationHelpButton/NavigationHelpButton.js
@@ -13,16 +13,12 @@ import NavigationHelpButtonViewModel from "./NavigationHelpButtonViewModel.js";
/**
* The NavigationHelpButton is a single button widget for displaying instructions for
* navigating the globe with the mouse.
- *
* @alias NavigationHelpButton
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Element|string} options.container The DOM element or ID that will contain the widget.
- * @param {boolean} [options.instructionsInitiallyVisible=false] True if the navigation instructions should initially be visible; otherwise, false.
- *
- * @exception {DeveloperError} Element with id "container" does not exist in the document.
- *
+ * @param {boolean} [options.instructionsInitiallyVisible] True if the navigation instructions should initially be visible; otherwise, false.
+ * @throws {DeveloperError} Element with id "container" does not exist in the document.
* @example
* // In HTML head, include a link to the NavigationHelpButton.css stylesheet,
* // and in the body, include:
@@ -226,7 +222,6 @@ Object.defineProperties(NavigationHelpButton.prototype, {
/**
* Gets the parent container.
* @memberof NavigationHelpButton.prototype
- *
* @type {Element}
*/
container: {
@@ -238,7 +233,6 @@ Object.defineProperties(NavigationHelpButton.prototype, {
/**
* Gets the view model.
* @memberof NavigationHelpButton.prototype
- *
* @type {NavigationHelpButtonViewModel}
*/
viewModel: {
diff --git a/packages/widgets/Source/NavigationHelpButton/NavigationHelpButtonViewModel.js b/packages/widgets/Source/NavigationHelpButton/NavigationHelpButtonViewModel.js
index 804eef307748..f45e8cbfd7d6 100644
--- a/packages/widgets/Source/NavigationHelpButton/NavigationHelpButtonViewModel.js
+++ b/packages/widgets/Source/NavigationHelpButton/NavigationHelpButtonViewModel.js
@@ -4,7 +4,7 @@ import createCommand from "../createCommand.js";
/**
* The view model for {@link NavigationHelpButton}.
* @alias NavigationHelpButtonViewModel
- * @constructor
+ * @class
*/
function NavigationHelpButtonViewModel() {
/**
@@ -29,7 +29,6 @@ function NavigationHelpButtonViewModel() {
/**
* Gets or sets the tooltip. This property is observable.
- *
* @type {string}
*/
this.tooltip = "Navigation Instructions";
@@ -41,7 +40,6 @@ Object.defineProperties(NavigationHelpButtonViewModel.prototype, {
/**
* Gets the Command that is executed when the button is clicked.
* @memberof NavigationHelpButtonViewModel.prototype
- *
* @type {Command}
*/
command: {
@@ -53,7 +51,6 @@ Object.defineProperties(NavigationHelpButtonViewModel.prototype, {
/**
* Gets the Command that is executed when the mouse instructions should be shown.
* @memberof NavigationHelpButtonViewModel.prototype
- *
* @type {Command}
*/
showClick: {
@@ -65,7 +62,6 @@ Object.defineProperties(NavigationHelpButtonViewModel.prototype, {
/**
* Gets the Command that is executed when the touch instructions should be shown.
* @memberof NavigationHelpButtonViewModel.prototype
- *
* @type {Command}
*/
showTouch: {
diff --git a/packages/widgets/Source/PerformanceWatchdog/PerformanceWatchdog.js b/packages/widgets/Source/PerformanceWatchdog/PerformanceWatchdog.js
index 085bb0ebb89d..725d3b83bdfd 100644
--- a/packages/widgets/Source/PerformanceWatchdog/PerformanceWatchdog.js
+++ b/packages/widgets/Source/PerformanceWatchdog/PerformanceWatchdog.js
@@ -9,14 +9,12 @@ import PerformanceWatchdogViewModel from "./PerformanceWatchdogViewModel.js";
/**
* Monitors performance of the application and displays a message if poor performance is detected.
- *
* @alias PerformanceWatchdog
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {Element|string} options.container The DOM element or ID that will contain the widget.
* @param {Scene} options.scene The {@link Scene} for which to monitor performance.
- * @param {string} [options.lowFrameRateMessage='This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers.'] The
+ * @param {string} [options.lowFrameRateMessage] The
* message to display when a low frame rate is detected. The message is interpeted as HTML, so make sure
* it comes from a trusted source so that your application is not vulnerable to cross-site scripting attacks.
*/
@@ -63,7 +61,6 @@ Object.defineProperties(PerformanceWatchdog.prototype, {
/**
* Gets the parent container.
* @memberof PerformanceWatchdog.prototype
- *
* @type {Element}
*/
container: {
@@ -75,7 +72,6 @@ Object.defineProperties(PerformanceWatchdog.prototype, {
/**
* Gets the view model.
* @memberof PerformanceWatchdog.prototype
- *
* @type {PerformanceWatchdogViewModel}
*/
viewModel: {
diff --git a/packages/widgets/Source/PerformanceWatchdog/PerformanceWatchdogViewModel.js b/packages/widgets/Source/PerformanceWatchdog/PerformanceWatchdogViewModel.js
index 5f0fd411344b..f2be6db3efc0 100644
--- a/packages/widgets/Source/PerformanceWatchdog/PerformanceWatchdogViewModel.js
+++ b/packages/widgets/Source/PerformanceWatchdog/PerformanceWatchdogViewModel.js
@@ -10,13 +10,11 @@ import createCommand from "../createCommand.js";
/**
* The view model for {@link PerformanceWatchdog}.
- *
* @alias PerformanceWatchdogViewModel
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {Scene} options.scene The Scene instance for which to monitor performance.
- * @param {string} [options.lowFrameRateMessage='This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers.'] The
+ * @param {string} [options.lowFrameRateMessage] The
* message to display when a low frame rate is detected. The message is interpeted as HTML, so make sure
* it comes from a trusted source so that your application is not vulnerable to cross-site scripting attacks.
*/
diff --git a/packages/widgets/Source/ProjectionPicker/ProjectionPicker.js b/packages/widgets/Source/ProjectionPicker/ProjectionPicker.js
index d1cc1dee8cae..130370c8951f 100644
--- a/packages/widgets/Source/ProjectionPicker/ProjectionPicker.js
+++ b/packages/widgets/Source/ProjectionPicker/ProjectionPicker.js
@@ -15,15 +15,11 @@ const orthographicPath =
/**
* The ProjectionPicker is a single button widget for switching between perspective and orthographic projections.
- *
* @alias ProjectionPicker
- * @constructor
- *
+ * @class
* @param {Element|string} container The DOM element or ID that will contain the widget.
* @param {Scene} scene The Scene instance to use.
- *
- * @exception {DeveloperError} Element with id "container" does not exist in the document.
- *
+ * @throws {DeveloperError} Element with id "container" does not exist in the document.
* @example
* // In HTML head, include a link to the ProjectionPicker.css stylesheet,
* // and in the body, include:
@@ -126,7 +122,6 @@ Object.defineProperties(ProjectionPicker.prototype, {
/**
* Gets the parent container.
* @memberof ProjectionPicker.prototype
- *
* @type {Element}
*/
container: {
@@ -138,7 +133,6 @@ Object.defineProperties(ProjectionPicker.prototype, {
/**
* Gets the view model.
* @memberof ProjectionPicker.prototype
- *
* @type {ProjectionPickerViewModel}
*/
viewModel: {
diff --git a/packages/widgets/Source/ProjectionPicker/ProjectionPickerViewModel.js b/packages/widgets/Source/ProjectionPicker/ProjectionPickerViewModel.js
index bf51b586a9af..4735ea5a7c83 100644
--- a/packages/widgets/Source/ProjectionPicker/ProjectionPickerViewModel.js
+++ b/packages/widgets/Source/ProjectionPicker/ProjectionPickerViewModel.js
@@ -12,8 +12,7 @@ import createCommand from "../createCommand.js";
/**
* The view model for {@link ProjectionPicker}.
* @alias ProjectionPickerViewModel
- * @constructor
- *
+ * @class
* @param {Scene} scene The Scene to switch projections.
*/
function ProjectionPickerViewModel(scene) {
@@ -140,7 +139,6 @@ Object.defineProperties(ProjectionPickerViewModel.prototype, {
/**
* Gets the command to toggle the drop down box.
* @memberof ProjectionPickerViewModel.prototype
- *
* @type {Command}
*/
toggleDropDown: {
@@ -152,7 +150,6 @@ Object.defineProperties(ProjectionPickerViewModel.prototype, {
/**
* Gets the command to switch to a perspective projection.
* @memberof ProjectionPickerViewModel.prototype
- *
* @type {Command}
*/
switchToPerspective: {
@@ -164,7 +161,6 @@ Object.defineProperties(ProjectionPickerViewModel.prototype, {
/**
* Gets the command to switch to orthographic projection.
* @memberof ProjectionPickerViewModel.prototype
- *
* @type {Command}
*/
switchToOrthographic: {
@@ -176,7 +172,6 @@ Object.defineProperties(ProjectionPickerViewModel.prototype, {
/**
* Gets whether the scene is currently using an orthographic projection.
* @memberof ProjectionPickerViewModel.prototype
- *
* @type {Command}
*/
isOrthographicProjection: {
diff --git a/packages/widgets/Source/SceneModePicker/SceneModePicker.js b/packages/widgets/Source/SceneModePicker/SceneModePicker.js
index 3ab0c6465ef9..aa376bb3488f 100644
--- a/packages/widgets/Source/SceneModePicker/SceneModePicker.js
+++ b/packages/widgets/Source/SceneModePicker/SceneModePicker.js
@@ -27,16 +27,12 @@ const columbusViewPath =
* shown to the left in its expanded state. Programatic switching of scene modes will
* be automatically reflected in the widget as long as the specified Scene
* is used to perform the change.
- *
* @alias SceneModePicker
- * @constructor
- *
+ * @class
* @param {Element|string} container The DOM element or ID that will contain the widget.
* @param {Scene} scene The Scene instance to use.
- * @param {number} [duration=2.0] The time, in seconds, it takes for the scene to transition.
- *
- * @exception {DeveloperError} Element with id "container" does not exist in the document.
- *
+ * @param {number} [duration] The time, in seconds, it takes for the scene to transition.
+ * @throws {DeveloperError} Element with id "container" does not exist in the document.
* @example
* // In HTML head, include a link to the SceneModePicker.css stylesheet,
* // and in the body, include:
@@ -157,7 +153,6 @@ Object.defineProperties(SceneModePicker.prototype, {
/**
* Gets the parent container.
* @memberof SceneModePicker.prototype
- *
* @type {Element}
*/
container: {
@@ -169,7 +164,6 @@ Object.defineProperties(SceneModePicker.prototype, {
/**
* Gets the view model.
* @memberof SceneModePicker.prototype
- *
* @type {SceneModePickerViewModel}
*/
viewModel: {
diff --git a/packages/widgets/Source/SceneModePicker/SceneModePickerViewModel.js b/packages/widgets/Source/SceneModePicker/SceneModePickerViewModel.js
index 33884b8902ff..82757ae939cb 100644
--- a/packages/widgets/Source/SceneModePicker/SceneModePickerViewModel.js
+++ b/packages/widgets/Source/SceneModePicker/SceneModePickerViewModel.js
@@ -12,10 +12,9 @@ import createCommand from "../createCommand.js";
/**
* The view model for {@link SceneModePicker}.
* @alias SceneModePickerViewModel
- * @constructor
- *
+ * @class
* @param {Scene} scene The Scene to morph
- * @param {number} [duration=2.0] The duration of scene morph animations, in seconds
+ * @param {number} [duration] The duration of scene morph animations, in seconds
*/
function SceneModePickerViewModel(scene, duration) {
//>>includeStart('debug', pragmas.debug);
@@ -152,7 +151,6 @@ Object.defineProperties(SceneModePickerViewModel.prototype, {
/**
* Gets the command to toggle the drop down box.
* @memberof SceneModePickerViewModel.prototype
- *
* @type {Command}
*/
toggleDropDown: {
@@ -164,7 +162,6 @@ Object.defineProperties(SceneModePickerViewModel.prototype, {
/**
* Gets the command to morph to 2D.
* @memberof SceneModePickerViewModel.prototype
- *
* @type {Command}
*/
morphTo2D: {
@@ -176,7 +173,6 @@ Object.defineProperties(SceneModePickerViewModel.prototype, {
/**
* Gets the command to morph to 3D.
* @memberof SceneModePickerViewModel.prototype
- *
* @type {Command}
*/
morphTo3D: {
@@ -188,7 +184,6 @@ Object.defineProperties(SceneModePickerViewModel.prototype, {
/**
* Gets the command to morph to Columbus View.
* @memberof SceneModePickerViewModel.prototype
- *
* @type {Command}
*/
morphToColumbusView: {
diff --git a/packages/widgets/Source/SelectionIndicator/SelectionIndicator.js b/packages/widgets/Source/SelectionIndicator/SelectionIndicator.js
index 53c2ee83f9bf..f0b65c58edda 100644
--- a/packages/widgets/Source/SelectionIndicator/SelectionIndicator.js
+++ b/packages/widgets/Source/SelectionIndicator/SelectionIndicator.js
@@ -9,14 +9,11 @@ import SelectionIndicatorViewModel from "./SelectionIndicatorViewModel.js";
/**
* A widget for displaying an indicator on a selected object.
- *
* @alias SelectionIndicator
- * @constructor
- *
+ * @class
* @param {Element|string} container The DOM element or ID that will contain the widget.
* @param {Scene} scene The Scene instance to use.
- *
- * @exception {DeveloperError} Element with id "container" does not exist in the document.
+ * @throws {DeveloperError} Element with id "container" does not exist in the document.
*/
function SelectionIndicator(container, scene) {
//>>includeStart('debug', pragmas.debug);
@@ -74,7 +71,6 @@ Object.defineProperties(SelectionIndicator.prototype, {
/**
* Gets the parent container.
* @memberof SelectionIndicator.prototype
- *
* @type {Element}
*/
container: {
@@ -86,7 +82,6 @@ Object.defineProperties(SelectionIndicator.prototype, {
/**
* Gets the view model.
* @memberof SelectionIndicator.prototype
- *
* @type {SelectionIndicatorViewModel}
*/
viewModel: {
diff --git a/packages/widgets/Source/SelectionIndicator/SelectionIndicatorViewModel.js b/packages/widgets/Source/SelectionIndicator/SelectionIndicatorViewModel.js
index 5a382440feee..43b3f62edf6e 100644
--- a/packages/widgets/Source/SelectionIndicator/SelectionIndicatorViewModel.js
+++ b/packages/widgets/Source/SelectionIndicator/SelectionIndicatorViewModel.js
@@ -14,8 +14,7 @@ const offScreen = "-1000px";
/**
* The view model for {@link SelectionIndicator}.
* @alias SelectionIndicatorViewModel
- * @constructor
- *
+ * @class
* @param {Scene} scene The scene instance to use for screen-space coordinate conversion.
* @param {Element} selectionIndicatorElement The element containing all elements that make up the selection indicator.
* @param {Element} container The DOM element that contains the widget.
@@ -87,11 +86,9 @@ function SelectionIndicatorViewModel(
/**
* Gets or sets the function for converting the world position of the object to the screen space position.
- *
* @member
* @type {SelectionIndicatorViewModel.ComputeScreenSpacePosition}
- * @default SceneTransforms.wgs84ToWindowCoordinates
- *
+ * @default
* @example
* selectionIndicatorViewModel.computeScreenSpacePosition = function(position, result) {
* return Cesium.SceneTransforms.wgs84ToWindowCoordinates(scene, position, result);
@@ -171,7 +168,6 @@ Object.defineProperties(SelectionIndicatorViewModel.prototype, {
/**
* Gets the HTML element containing the selection indicator.
* @memberof SelectionIndicatorViewModel.prototype
- *
* @type {Element}
*/
container: {
@@ -183,7 +179,6 @@ Object.defineProperties(SelectionIndicatorViewModel.prototype, {
/**
* Gets the HTML element that holds the selection indicator.
* @memberof SelectionIndicatorViewModel.prototype
- *
* @type {Element}
*/
selectionIndicatorElement: {
@@ -195,7 +190,6 @@ Object.defineProperties(SelectionIndicatorViewModel.prototype, {
/**
* Gets the scene being used.
* @memberof SelectionIndicatorViewModel.prototype
- *
* @type {Scene}
*/
scene: {
diff --git a/packages/widgets/Source/SvgPathBindingHandler.js b/packages/widgets/Source/SvgPathBindingHandler.js
index 5ffe18660450..e3c5420b5e86 100644
--- a/packages/widgets/Source/SvgPathBindingHandler.js
+++ b/packages/widgets/Source/SvgPathBindingHandler.js
@@ -15,9 +15,7 @@ const svgClassName = "cesium-svgPath-svg";
* height: The height of the SVG path with no transformations applied.
* css: Optional. A string containing additional CSS classes to apply to the SVG. 'cesium-svgPath-svg' is always applied.
*
- *
* @namespace SvgPathBindingHandler
- *
* @example
* // Create an SVG as a child of a div
*
@@ -30,6 +28,7 @@ const svgClassName = "cesium-svgPath-svg";
*/
const SvgPathBindingHandler = {
/**
+ * @param knockout
* @function
*/
register: function (knockout) {
diff --git a/packages/widgets/Source/Timeline/Timeline.js b/packages/widgets/Source/Timeline/Timeline.js
index 581bb7a33731..94141fa3a6be 100644
--- a/packages/widgets/Source/Timeline/Timeline.js
+++ b/packages/widgets/Source/Timeline/Timeline.js
@@ -95,8 +95,7 @@ const timelineMonthNames = [
/**
* The Timeline is a widget for displaying and controlling the current scene time.
* @alias Timeline
- * @constructor
- *
+ * @class
* @param {Element} container The parent HTML container node for this widget.
* @param {Clock} clock The clock to use.
*/
@@ -190,6 +189,9 @@ function Timeline(container, clock) {
}
/**
+ * @param type
+ * @param listener
+ * @param useCapture
* @private
*/
Timeline.prototype.addEventListener = function (type, listener, useCapture) {
@@ -197,6 +199,9 @@ Timeline.prototype.addEventListener = function (type, listener, useCapture) {
};
/**
+ * @param type
+ * @param listener
+ * @param useCapture
* @private
*/
Timeline.prototype.removeEventListener = function (type, listener, useCapture) {
@@ -234,6 +239,9 @@ Timeline.prototype.destroy = function () {
};
/**
+ * @param color
+ * @param heightInPx
+ * @param base
* @private
*/
Timeline.prototype.addHighlightRange = function (color, heightInPx, base) {
@@ -244,6 +252,10 @@ Timeline.prototype.addHighlightRange = function (color, heightInPx, base) {
};
/**
+ * @param interval
+ * @param heightInPx
+ * @param color
+ * @param backgroundColor
* @private
*/
Timeline.prototype.addTrack = function (
@@ -266,7 +278,6 @@ Timeline.prototype.addTrack = function (
/**
* Sets the view to the provided times.
- *
* @param {JulianDate} startTime The start time.
* @param {JulianDate} stopTime The stop time.
*/
@@ -343,6 +354,7 @@ Timeline.prototype.zoomTo = function (startTime, stopTime) {
};
/**
+ * @param amount
* @private
*/
Timeline.prototype.zoomFrom = function (amount) {
@@ -375,6 +387,7 @@ function twoDigits(num) {
}
/**
+ * @param time
* @private
*/
Timeline.prototype.makeLabel = function (time) {
@@ -739,6 +752,8 @@ Timeline.prototype.updateFromClock = function () {
};
/**
+ * @param xPos
+ * @param seconds
* @private
*/
Timeline.prototype._setTimeBarTime = function (xPos, seconds) {
diff --git a/packages/widgets/Source/Timeline/TimelineHighlightRange.js b/packages/widgets/Source/Timeline/TimelineHighlightRange.js
index 0d2baec78599..1edc042e26db 100644
--- a/packages/widgets/Source/Timeline/TimelineHighlightRange.js
+++ b/packages/widgets/Source/Timeline/TimelineHighlightRange.js
@@ -1,6 +1,9 @@
import { defaultValue, JulianDate } from "@cesium/engine";
/**
+ * @param color
+ * @param heightInPx
+ * @param base
* @private
*/
function TimelineHighlightRange(color, heightInPx, base) {
diff --git a/packages/widgets/Source/Timeline/TimelineTrack.js b/packages/widgets/Source/Timeline/TimelineTrack.js
index c661df9cbd71..4195796dfc03 100644
--- a/packages/widgets/Source/Timeline/TimelineTrack.js
+++ b/packages/widgets/Source/Timeline/TimelineTrack.js
@@ -1,6 +1,10 @@
import { Color, defined, JulianDate } from "@cesium/engine";
/**
+ * @param interval
+ * @param pixelHeight
+ * @param color
+ * @param backgroundColor
* @private
*/
function TimelineTrack(interval, pixelHeight, color, backgroundColor) {
diff --git a/packages/widgets/Source/ToggleButtonViewModel.js b/packages/widgets/Source/ToggleButtonViewModel.js
index b8f339a16e5c..6070ff59be11 100644
--- a/packages/widgets/Source/ToggleButtonViewModel.js
+++ b/packages/widgets/Source/ToggleButtonViewModel.js
@@ -4,12 +4,11 @@ import knockout from "./ThirdParty/knockout.js";
/**
* A view model which exposes the properties of a toggle button.
* @alias ToggleButtonViewModel
- * @constructor
- *
+ * @class
* @param {Command} command The command which will be executed when the button is toggled.
* @param {object} [options] Object with the following properties:
- * @param {boolean} [options.toggled=false] A boolean indicating whether the button should be initially toggled.
- * @param {string} [options.tooltip=''] A string containing the button's tooltip.
+ * @param {boolean} [options.toggled] A boolean indicating whether the button should be initially toggled.
+ * @param {string} [options.tooltip] A string containing the button's tooltip.
*/
function ToggleButtonViewModel(command, options) {
//>>includeStart('debug', pragmas.debug);
diff --git a/packages/widgets/Source/VRButton/VRButton.js b/packages/widgets/Source/VRButton/VRButton.js
index 0c22bf11d8b4..31f556c36824 100644
--- a/packages/widgets/Source/VRButton/VRButton.js
+++ b/packages/widgets/Source/VRButton/VRButton.js
@@ -14,15 +14,12 @@ const exitVRPath =
/**
* A single button widget for toggling vr mode.
- *
* @alias VRButton
- * @constructor
- *
+ * @class
* @param {Element|string} container The DOM element or ID that will contain the widget.
* @param {Scene} scene The scene.
- * @param {Element|string} [vrElement=document.body] The element or id to be placed into vr mode.
- *
- * @exception {DeveloperError} Element with id "container" does not exist in the document.
+ * @param {Element|string} [vrElement] The element or id to be placed into vr mode.
+ * @throws {DeveloperError} Element with id "container" does not exist in the document.
*/
function VRButton(container, scene, vrElement) {
//>>includeStart('debug', pragmas.debug);
@@ -67,7 +64,6 @@ Object.defineProperties(VRButton.prototype, {
/**
* Gets the parent container.
* @memberof VRButton.prototype
- *
* @type {Element}
*/
container: {
@@ -79,7 +75,6 @@ Object.defineProperties(VRButton.prototype, {
/**
* Gets the view model.
* @memberof VRButton.prototype
- *
* @type {VRButtonViewModel}
*/
viewModel: {
diff --git a/packages/widgets/Source/VRButton/VRButtonViewModel.js b/packages/widgets/Source/VRButton/VRButtonViewModel.js
index 1f5697fbb39e..8bb2edbd5759 100644
--- a/packages/widgets/Source/VRButton/VRButtonViewModel.js
+++ b/packages/widgets/Source/VRButton/VRButtonViewModel.js
@@ -74,10 +74,9 @@ function toggleVR(viewModel, scene, isVRMode, isOrthographic) {
/**
* The view model for {@link VRButton}.
* @alias VRButtonViewModel
- * @constructor
- *
+ * @class
* @param {Scene} scene The scene.
- * @param {Element|string} [vrElement=document.body] The element or id to be placed into VR mode.
+ * @param {Element|string} [vrElement] The element or id to be placed into VR mode.
*/
function VRButtonViewModel(scene, vrElement) {
//>>includeStart('debug', pragmas.debug);
@@ -93,7 +92,6 @@ function VRButtonViewModel(scene, vrElement) {
/**
* Gets whether or not VR mode is active.
- *
* @type {boolean}
*/
this.isVRMode = undefined;
@@ -105,7 +103,6 @@ function VRButtonViewModel(scene, vrElement) {
/**
* Gets or sets whether or not VR functionality should be enabled.
- *
* @type {boolean}
* @see Fullscreen.enabled
*/
@@ -121,7 +118,6 @@ function VRButtonViewModel(scene, vrElement) {
/**
* Gets the tooltip. This property is observable.
- *
* @type {string}
*/
this.tooltip = undefined;
@@ -174,7 +170,6 @@ Object.defineProperties(VRButtonViewModel.prototype, {
* Gets or sets the HTML element to place into VR mode when the
* corresponding button is pressed.
* @memberof VRButtonViewModel.prototype
- *
* @type {Element}
*/
vrElement: {
@@ -196,7 +191,6 @@ Object.defineProperties(VRButtonViewModel.prototype, {
/**
* Gets the Command to toggle VR mode.
* @memberof VRButtonViewModel.prototype
- *
* @type {Command}
*/
command: {
diff --git a/packages/widgets/Source/Viewer/Viewer.js b/packages/widgets/Source/Viewer/Viewer.js
index a3548550b262..16a367c165dc 100644
--- a/packages/widgets/Source/Viewer/Viewer.js
+++ b/packages/widgets/Source/Viewer/Viewer.js
@@ -293,7 +293,6 @@ function enableVRUI(viewer, enabled) {
* @typedef {object} Viewer.ConstructorOptions
*
* Initialization options for the Viewer constructor
- *
* @property {boolean} [animation=true] If set to false, the Animation widget will not be created.
* @property {boolean} [baseLayerPicker=true] If set to false, the BaseLayerPicker widget will not be created.
* @property {boolean} [fullscreenButton=true] If set to false, the FullscreenButton widget will not be created.
@@ -347,17 +346,13 @@ function enableVRUI(viewer, enabled) {
/**
* A base widget for building applications. It composites all of the standard Cesium widgets into one reusable package.
* The widget can always be extended by using mixins, which add functionality useful for a variety of applications.
- *
* @alias Viewer
- * @constructor
- *
+ * @class
* @param {Element|string} container The DOM element or ID that will contain the widget.
* @param {Viewer.ConstructorOptions} [options] Object describing initialization options
- *
- * @exception {DeveloperError} Element with id "container" does not exist in the document.
- * @exception {DeveloperError} options.selectedImageryProviderViewModel is not available when not using the BaseLayerPicker widget, specify options.baseLayer instead.
- * @exception {DeveloperError} options.selectedTerrainProviderViewModel is not available when not using the BaseLayerPicker widget, specify options.terrainProvider instead.
- *
+ * @throws {DeveloperError} Element with id "container" does not exist in the document.
+ * @throws {DeveloperError} options.selectedImageryProviderViewModel is not available when not using the BaseLayerPicker widget, specify options.baseLayer instead.
+ * @throws {DeveloperError} options.selectedTerrainProviderViewModel is not available when not using the BaseLayerPicker widget, specify options.terrainProvider instead.
* @see Animation
* @see BaseLayerPicker
* @see CesiumWidget
@@ -366,9 +361,7 @@ function enableVRUI(viewer, enabled) {
* @see SceneModePicker
* @see Timeline
* @see viewerDragDropMixin
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Hello%20World.html|Cesium Sandcastle Hello World Demo}
- *
* @example
* // Initialize the viewer widget with several custom options and mixins.
* try {
@@ -974,7 +967,6 @@ Object.defineProperties(Viewer.prototype, {
/**
* Manages the list of credits to display on screen and in the lightbox.
* @memberof Viewer.prototype
- *
* @type {CreditDisplay}
*/
creditDisplay: {
@@ -1256,7 +1248,6 @@ Object.defineProperties(Viewer.prototype, {
/**
* Gets the collection of image layers that will be rendered on the globe.
* @memberof Viewer.prototype
- *
* @type {ImageryLayerCollection}
* @readonly
*/
@@ -1269,7 +1260,6 @@ Object.defineProperties(Viewer.prototype, {
/**
* The terrain provider providing surface geometry for the globe.
* @memberof Viewer.prototype
- *
* @type {TerrainProvider}
*/
terrainProvider: {
@@ -1284,7 +1274,6 @@ Object.defineProperties(Viewer.prototype, {
/**
* Gets the camera.
* @memberof Viewer.prototype
- *
* @type {Camera}
* @readonly
*/
@@ -1297,7 +1286,6 @@ Object.defineProperties(Viewer.prototype, {
/**
* Gets the post-process stages.
* @memberof Viewer.prototype
- *
* @type {PostProcessStageCollection}
* @readonly
*/
@@ -1349,7 +1337,6 @@ Object.defineProperties(Viewer.prototype, {
* determines the frame rate. If defined, this value must be greater than 0. A value higher
* than the underlying requestAnimationFrame implementation will have no effect.
* @memberof Viewer.prototype
- *
* @type {number}
*/
targetFrameRate: {
@@ -1372,7 +1359,6 @@ Object.defineProperties(Viewer.prototype, {
* will be set to false. It must be set back to true to continue rendering
* after the error.
* @memberof Viewer.prototype
- *
* @type {boolean}
*/
useDefaultRenderLoop: {
@@ -1392,7 +1378,6 @@ Object.defineProperties(Viewer.prototype, {
* will cause the scene to be rendered at 320x240 and then scaled up while setting
* it to 2.0 will cause the scene to be rendered at 1280x960 and then scaled down.
* @memberof Viewer.prototype
- *
* @type {number}
* @default 1.0
*/
@@ -1413,7 +1398,6 @@ Object.defineProperties(Viewer.prototype, {
* will be in device pixels. {@link Viewer#resolutionScale} will still take effect whether
* this flag is true or false.
* @memberof Viewer.prototype
- *
* @type {boolean}
* @default true
*/
@@ -1431,9 +1415,7 @@ Object.defineProperties(Viewer.prototype, {
* animation in order to avoid showing an incomplete picture to the user.
* For example, if asynchronous primitives are being processed in the
* background, the clock will not advance until the geometry is ready.
- *
* @memberof Viewer.prototype
- *
* @type {boolean}
*/
allowDataSourcesToSuspendAnimation: {
@@ -1569,10 +1551,8 @@ Object.defineProperties(Viewer.prototype, {
* Extends the base viewer functionality with the provided mixin.
* A mixin may add additional properties, functions, or other behavior
* to the provided viewer instance.
- *
* @param {Viewer.ViewerMixin} mixin The Viewer mixin to add to this instance.
* @param {object} [options] The options object to be passed to the mixin function.
- *
* @see viewerDragDropMixin
*/
Viewer.prototype.extend = function (mixin, options) {
@@ -1815,6 +1795,8 @@ Viewer.prototype.destroy = function () {
};
/**
+ * @param dataSourceCollection
+ * @param dataSource
* @private
*/
Viewer.prototype._dataSourceAdded = function (
@@ -1829,6 +1811,8 @@ Viewer.prototype._dataSourceAdded = function (
};
/**
+ * @param dataSourceCollection
+ * @param dataSource
* @private
*/
Viewer.prototype._dataSourceRemoved = function (
@@ -1859,6 +1843,7 @@ Viewer.prototype._dataSourceRemoved = function (
};
/**
+ * @param clock
* @private
*/
Viewer.prototype._onTick = function (clock) {
@@ -1944,6 +1929,9 @@ Viewer.prototype._onTick = function (clock) {
};
/**
+ * @param collection
+ * @param added
+ * @param removed
* @private
*/
Viewer.prototype._onEntityCollectionChanged = function (
@@ -1964,6 +1952,7 @@ Viewer.prototype._onEntityCollectionChanged = function (
};
/**
+ * @param infoBoxViewModel
* @private
*/
Viewer.prototype._onInfoBoxCameraClicked = function (infoBoxViewModel) {
@@ -1991,6 +1980,7 @@ Viewer.prototype._clearTrackedObject = function () {
};
/**
+ * @param infoBoxViewModel
* @private
*/
Viewer.prototype._onInfoBoxClockClicked = function (infoBoxViewModel) {
@@ -2006,6 +1996,7 @@ Viewer.prototype._clearObjects = function () {
};
/**
+ * @param dataSource
* @private
*/
Viewer.prototype._onDataSourceChanged = function (dataSource) {
@@ -2015,6 +2006,8 @@ Viewer.prototype._onDataSourceChanged = function (dataSource) {
};
/**
+ * @param dataSourceCollection
+ * @param dataSource
* @private
*/
Viewer.prototype._onDataSourceAdded = function (
@@ -2034,6 +2027,8 @@ Viewer.prototype._onDataSourceAdded = function (
};
/**
+ * @param dataSourceCollection
+ * @param dataSource
* @private
*/
Viewer.prototype._onDataSourceRemoved = function (
@@ -2070,7 +2065,6 @@ Viewer.prototype._onDataSourceRemoved = function (
* In 2D, there must be a top down view. The camera will be placed above the target looking down. The height above the
* target will be the range. The heading will be determined from the offset. If the heading cannot be
* determined from the offset, the heading will be north.
- *
* @param {Entity|Entity[]|EntityCollection|DataSource|ImageryLayer|Cesium3DTileset|TimeDynamicPointCloud|Promise} target The entity, array of entities, entity collection, data source, Cesium3DTileset, point cloud, or imagery layer to view. You can also pass a promise that resolves to one of the previously mentioned types.
* @param {HeadingPitchRange} [offset] The offset from the center of the entity in the local east-north-up reference frame.
* @returns {Promise} A Promise that resolves to true if the zoom was successful or false if the target is not currently visualized in the scene or the zoom was cancelled.
@@ -2096,10 +2090,9 @@ Viewer.prototype.zoomTo = function (target, offset) {
* In 2D, there must be a top down view. The camera will be placed above the target looking down. The height above the
* target will be the range. The heading will be determined from the offset. If the heading cannot be
* determined from the offset, the heading will be north.
- *
* @param {Entity|Entity[]|EntityCollection|DataSource|ImageryLayer|Cesium3DTileset|TimeDynamicPointCloud|Promise} target The entity, array of entities, entity collection, data source, Cesium3DTileset, point cloud, or imagery layer to view. You can also pass a promise that resolves to one of the previously mentioned types.
* @param {object} [options] Object with the following properties:
- * @param {number} [options.duration=3.0] The duration of the flight in seconds.
+ * @param {number} [options.duration] The duration of the flight in seconds.
* @param {number} [options.maximumHeight] The maximum height at the peak of the flight.
* @param {HeadingPitchRange} [options.offset] The offset from the target in the local east-north-up reference frame centered at the target.
* @returns {Promise} A Promise that resolves to true if the flight was successful or false if the target is not currently visualized in the scene or the flight was cancelled. //TODO: Cleanup entity mentions
@@ -2436,7 +2429,6 @@ function updateTrackedEntity(viewer) {
* @callback Viewer.ViewerMixin
* @param {Viewer} viewer The viewer instance.
* @param {object} options Options object to be passed to the mixin function.
- *
* @see Viewer#extend
*/
export default Viewer;
diff --git a/packages/widgets/Source/Viewer/viewerCesium3DTilesInspectorMixin.js b/packages/widgets/Source/Viewer/viewerCesium3DTilesInspectorMixin.js
index 1d6e985adc31..09f2ea5a3749 100644
--- a/packages/widgets/Source/Viewer/viewerCesium3DTilesInspectorMixin.js
+++ b/packages/widgets/Source/Viewer/viewerCesium3DTilesInspectorMixin.js
@@ -6,9 +6,7 @@ import Cesium3DTilesInspector from "../Cesium3DTilesInspector/Cesium3DTilesInspe
* Rather than being called directly, this function is normally passed as
* a parameter to {@link Viewer#extend}, as shown in the example below.
* @function
- *
* @param {Viewer} viewer The viewer instance.
- *
* @example
* const viewer = new Cesium.Viewer('cesiumContainer');
* viewer.extend(Cesium.viewerCesium3DTilesInspectorMixin);
diff --git a/packages/widgets/Source/Viewer/viewerCesiumInspectorMixin.js b/packages/widgets/Source/Viewer/viewerCesiumInspectorMixin.js
index 3d1ad208b481..19f71dc2e370 100644
--- a/packages/widgets/Source/Viewer/viewerCesiumInspectorMixin.js
+++ b/packages/widgets/Source/Viewer/viewerCesiumInspectorMixin.js
@@ -6,13 +6,9 @@ import CesiumInspector from "../CesiumInspector/CesiumInspector.js";
* Rather than being called directly, this function is normally passed as
* a parameter to {@link Viewer#extend}, as shown in the example below.
* @function
- *
* @param {Viewer} viewer The viewer instance.
- *
- * @exception {DeveloperError} viewer is required.
- *
+ * @throws {DeveloperError} viewer is required.
* @demo {@link https://sandcastle.cesium.com/index.html?src=Cesium%20Inspector.html|Cesium Sandcastle Cesium Inspector Demo}
- *
* @example
* const viewer = new Cesium.Viewer('cesiumContainer');
* viewer.extend(Cesium.viewerCesiumInspectorMixin);
diff --git a/packages/widgets/Source/Viewer/viewerDragDropMixin.js b/packages/widgets/Source/Viewer/viewerDragDropMixin.js
index 24f6b896f50c..6854d05f49a4 100644
--- a/packages/widgets/Source/Viewer/viewerDragDropMixin.js
+++ b/packages/widgets/Source/Viewer/viewerDragDropMixin.js
@@ -15,18 +15,16 @@ import {
* Rather than being called directly, this function is normally passed as
* a parameter to {@link Viewer#extend}, as shown in the example below.
* @function viewerDragDropMixin
-
* @param {Viewer} viewer The viewer instance.
* @param {object} [options] Object with the following properties:
- * @param {Element|string} [options.dropTarget=viewer.container] The DOM element which will serve as the drop target.
- * @param {boolean} [options.clearOnDrop=true] When true, dropping files will clear all existing data sources first, when false, new data sources will be loaded after the existing ones.
- * @param {boolean} [options.flyToOnDrop=true] When true, dropping files will fly to the data source once it is loaded.
- * @param {boolean} [options.clampToGround=true] When true, datasources are clamped to the ground.
+ * @param {Element|string} [options.dropTarget] The DOM element which will serve as the drop target.
+ * @param {boolean} [options.clearOnDrop] When true, dropping files will clear all existing data sources first, when false, new data sources will be loaded after the existing ones.
+ * @param {boolean} [options.flyToOnDrop] When true, dropping files will fly to the data source once it is loaded.
+ * @param {boolean} [options.clampToGround] When true, datasources are clamped to the ground.
* @param {Proxy} [options.proxy] The proxy to be used for KML network links.
- *
- * @exception {DeveloperError} Element with id does not exist in the document.
- * @exception {DeveloperError} dropTarget is already defined by another mixin.
- * @exception {DeveloperError} dropEnabled is already defined by another mixin.
+ * @throws {DeveloperError} Element with id does not exist in the document.
+ * @throws {DeveloperError} dropTarget is already defined by another mixin.
+ * @throws {DeveloperError} dropEnabled is already defined by another mixin.
* @exception {DeveloperError} dropError is already defined by another mixin.
* @exception {DeveloperError} clearOnDrop is already defined by another mixin.
*
diff --git a/packages/widgets/Source/Viewer/viewerPerformanceWatchdogMixin.js b/packages/widgets/Source/Viewer/viewerPerformanceWatchdogMixin.js
index accaf51a8d55..1fbb8fd40308 100644
--- a/packages/widgets/Source/Viewer/viewerPerformanceWatchdogMixin.js
+++ b/packages/widgets/Source/Viewer/viewerPerformanceWatchdogMixin.js
@@ -6,15 +6,12 @@ import PerformanceWatchdog from "../PerformanceWatchdog/PerformanceWatchdog.js";
* Rather than being called directly, this function is normally passed as
* a parameter to {@link Viewer#extend}, as shown in the example below.
* @function
- *
* @param {Viewer} viewer The viewer instance.
* @param {object} [options] An object with properties.
- * @param {string} [options.lowFrameRateMessage='This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers.'] The
+ * @param {string} [options.lowFrameRateMessage] The
* message to display when a low frame rate is detected. The message is interpeted as HTML, so make sure
* it comes from a trusted source so that your application is not vulnerable to cross-site scripting attacks.
- *
- * @exception {DeveloperError} viewer is required.
- *
+ * @throws {DeveloperError} viewer is required.
* @example
* const viewer = new Cesium.Viewer('cesiumContainer');
* viewer.extend(Cesium.viewerPerformanceWatchdogMixin, {
diff --git a/packages/widgets/Source/Viewer/viewerVoxelInspectorMixin.js b/packages/widgets/Source/Viewer/viewerVoxelInspectorMixin.js
index 4a0d825cde3b..f45cbe258924 100644
--- a/packages/widgets/Source/Viewer/viewerVoxelInspectorMixin.js
+++ b/packages/widgets/Source/Viewer/viewerVoxelInspectorMixin.js
@@ -6,9 +6,7 @@ import VoxelInspector from "../VoxelInspector/VoxelInspector.js";
* Rather than being called directly, this function is normally passed as
* a parameter to {@link Viewer#extend}, as shown in the example below.
* @function
- *
* @param {Viewer} viewer The viewer instance.
- *
* @example
* var viewer = new Cesium.Viewer('cesiumContainer');
* viewer.extend(Cesium.viewerVoxelInspectorMixin);
diff --git a/packages/widgets/Source/VoxelInspector/VoxelInspector.js b/packages/widgets/Source/VoxelInspector/VoxelInspector.js
index 26871cfbe81e..ef77519dcfef 100644
--- a/packages/widgets/Source/VoxelInspector/VoxelInspector.js
+++ b/packages/widgets/Source/VoxelInspector/VoxelInspector.js
@@ -13,10 +13,8 @@ import VoxelInspectorViewModel from "./VoxelInspectorViewModel.js";
/**
* Inspector widget to aid in debugging voxels
- *
* @alias VoxelInspector
- * @constructor
- *
+ * @class
* @param {Element|string} container The DOM element or ID that will contain the widget.
* @param {Scene} scene the Scene instance to use.
*/
@@ -314,7 +312,6 @@ Object.defineProperties(VoxelInspector.prototype, {
/**
* Gets the parent container.
* @memberof VoxelInspector.prototype
- *
* @type {Element}
*/
container: {
@@ -326,7 +323,6 @@ Object.defineProperties(VoxelInspector.prototype, {
/**
* Gets the view model.
* @memberof VoxelInspector.prototype
- *
* @type {VoxelInspectorViewModel}
*/
viewModel: {
diff --git a/packages/widgets/Source/VoxelInspector/VoxelInspectorViewModel.js b/packages/widgets/Source/VoxelInspector/VoxelInspectorViewModel.js
index 317f57e6eed7..1b95fa26103d 100644
--- a/packages/widgets/Source/VoxelInspector/VoxelInspectorViewModel.js
+++ b/packages/widgets/Source/VoxelInspector/VoxelInspectorViewModel.js
@@ -47,8 +47,7 @@ function formatShaderString(str) {
/**
* The view model for {@link VoxelInspector}.
* @alias VoxelInspectorViewModel
- * @constructor
- *
+ * @class
* @param {Scene} scene The scene instance to use.
*/
function VoxelInspectorViewModel(scene) {
@@ -803,6 +802,8 @@ VoxelInspectorViewModel.prototype.compileShader = function () {
/**
* Handles key press events on the shader editor.
+ * @param sender
+ * @param event
*/
VoxelInspectorViewModel.prototype.shaderEditorKeyPress = function (
sender,
diff --git a/packages/widgets/Source/createCommand.js b/packages/widgets/Source/createCommand.js
index 305905a3c9c3..fa01128785a9 100644
--- a/packages/widgets/Source/createCommand.js
+++ b/packages/widgets/Source/createCommand.js
@@ -8,11 +8,9 @@ import knockout from "./ThirdParty/knockout.js";
* whether the command can be executed. When executed, a Command function will check the
* value of canExecute
and throw if false. It also provides events for when
* a command has been or is about to be executed.
- *
* @function
- *
* @param {Function} func The function to execute.
- * @param {boolean} [canExecute=true] A boolean indicating whether the function can currently be executed.
+ * @param {boolean} [canExecute] A boolean indicating whether the function can currently be executed.
*/
function createCommand(func, canExecute) {
//>>includeStart('debug', pragmas.debug);
diff --git a/packages/widgets/Source/subscribeAndEvaluate.js b/packages/widgets/Source/subscribeAndEvaluate.js
index 510615498a98..61e742538130 100644
--- a/packages/widgets/Source/subscribeAndEvaluate.js
+++ b/packages/widgets/Source/subscribeAndEvaluate.js
@@ -3,16 +3,13 @@ import knockout from "./ThirdParty/knockout.js";
/**
* Subscribe to a Knockout observable ES5 property, and immediately fire
* the callback with the current value of the property.
- *
* @private
- *
* @function subscribeAndEvaluate
- *
* @param {object} owner The object containing the observable property.
* @param {string} observablePropertyName The name of the observable property.
* @param {Function} callback The callback function.
* @param {object} [target] The value of this in the callback function.
- * @param {string} [event='change'] The name of the event to receive notification for.
+ * @param {string} [event] The name of the event to receive notification for.
* @returns The subscription object from Knockout which can be used to dispose the subscription later.
*/
function subscribeAndEvaluate(
From dfcc13a3bcd85a908588745594167ada8df78e82 Mon Sep 17 00:00:00 2001
From: ggetz
Date: Tue, 4 Jun 2024 13:55:43 -0400
Subject: [PATCH 2/9] Fix jsdoc/check-access
---
eslint.config.js | 1 -
packages/engine/Source/Core/MortonOrder.js | 1 -
2 files changed, 2 deletions(-)
diff --git a/eslint.config.js b/eslint.config.js
index 91b4a9370e4c..6bc530a35821 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -69,7 +69,6 @@ export default [
"jsdoc/check-tag-names": "off",
"jsdoc/no-defaults": "off",
"jsdoc/no-multi-asterisks": "off",
- "jsdoc/check-access": "off",
},
},
{
diff --git a/packages/engine/Source/Core/MortonOrder.js b/packages/engine/Source/Core/MortonOrder.js
index 94b67d7afd90..b1a8ee27b88a 100644
--- a/packages/engine/Source/Core/MortonOrder.js
+++ b/packages/engine/Source/Core/MortonOrder.js
@@ -23,7 +23,6 @@ const MortonOrder = {};
* @param {number} v A 16-bit unsigned integer.
* @returns {number} A 32-bit unsigned integer.
* @see {@link https://fgiesen.wordpress.com/2009/12/13/decoding-morton-codes/}
- * @private
*/
function insertOneSpacing(v) {
v = (v ^ (v << 8)) & 0x00ff00ff;
From 92b36e582195b2641d330759f6a5cfac45f5db47 Mon Sep 17 00:00:00 2001
From: ggetz
Date: Tue, 4 Jun 2024 13:56:49 -0400
Subject: [PATCH 3/9] Fix jsdoc/no-multi-asterisks
---
eslint.config.js | 1 -
packages/engine/Source/Scene/Model/B3dmLoader.js | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/eslint.config.js b/eslint.config.js
index 6bc530a35821..ed2219dac032 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -68,7 +68,6 @@ export default [
"jsdoc/tag-lines": "off",
"jsdoc/check-tag-names": "off",
"jsdoc/no-defaults": "off",
- "jsdoc/no-multi-asterisks": "off",
},
},
{
diff --git a/packages/engine/Source/Scene/Model/B3dmLoader.js b/packages/engine/Source/Scene/Model/B3dmLoader.js
index c7ec3bfb2aa8..498e09d00f78 100644
--- a/packages/engine/Source/Scene/Model/B3dmLoader.js
+++ b/packages/engine/Source/Scene/Model/B3dmLoader.js
@@ -52,7 +52,7 @@ const FeatureIdAttribute = ModelComponents.FeatureIdAttribute;
* @param {boolean} [options.loadIndicesForWireframe=false] If true
, load the index buffer as a typed array. This is useful for creating wireframe indices in WebGL1.
* @param {boolean} [options.loadPrimitiveOutline=true] If true
, load outlines from the {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline} extension. This can be set false to avoid post-processing geometry at load time.
* @param {boolean} [options.loadForClassification=false] If true
and if the model has feature IDs, load the feature IDs and indices as typed arrays. This is useful for batching features for classification.
- * */
+ */
function B3dmLoader(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
From ff79f21d6ccf11456906ac53988ecbde0ca00fe0 Mon Sep 17 00:00:00 2001
From: ggetz
Date: Tue, 4 Jun 2024 14:21:09 -0400
Subject: [PATCH 4/9] fix jsdoc/check-tag-names
---
eslint.config.js | 15 ++++++--
packages/engine/Source/Core/CircleGeometry.js | 2 +-
packages/engine/Source/Core/Color.js | 6 ++--
.../engine/Source/Core/ComponentDatatype.js | 6 ++--
.../engine/Source/Core/EllipseGeometry.js | 4 +--
.../Source/Core/EllipseOutlineGeometry.js | 2 +-
.../engine/Source/Core/EllipsoidGeometry.js | 4 +--
.../Source/Core/EllipsoidOutlineGeometry.js | 6 ++--
.../engine/Source/Core/PolylineGeometry.js | 4 +--
.../engine/Source/Core/RectangleGeometry.js | 8 ++---
.../Source/Core/RectangleOutlineGeometry.js | 4 +--
.../Source/DataSources/ModelGraphics.js | 2 +-
.../engine/Source/Renderer/CubeMapFace.js | 14 ++++----
.../engine/Source/Renderer/Framebuffer.js | 8 ++---
.../Source/Renderer/FramebufferManager.js | 6 ++--
.../engine/Source/Renderer/RenderState.js | 36 +++++++++----------
packages/engine/Source/Renderer/Texture.js | 24 ++++++-------
.../engine/Source/Renderer/UniformState.js | 4 +--
packages/engine/Source/Scene/BatchTable.js | 4 +--
.../engine/Source/Scene/Cesium3DTileset.js | 2 +-
packages/engine/Source/Scene/Material.js | 10 +++---
packages/engine/Source/Scene/Model/Model.js | 6 ++--
.../Scene/Model/ModelAnimationCollection.js | 4 +--
.../Scene/OctahedralProjectedCubeMap.js | 2 +-
.../engine/Source/Scene/PostProcessStage.js | 6 ++--
.../Scene/PostProcessStageCollection.js | 2 +-
packages/engine/Source/Scene/Scene.js | 2 +-
packages/engine/Source/Widget/CesiumWidget.js | 2 +-
.../Source/Viewer/viewerDragDropMixin.js | 4 +--
29 files changed, 105 insertions(+), 94 deletions(-)
diff --git a/eslint.config.js b/eslint.config.js
index ed2219dac032..008de9992e4d 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -44,6 +44,18 @@ export default [
files: ["packages/**/*.js", "Apps/**/*.js", "Specs/**/*.js", "**/*.html"],
...configCesium.configs.browser,
plugins: { html, jsdoc },
+ settings: {
+ jsdoc: {
+ tagNamePreference: {
+ demo: "demo",
+ experimental: "experimental",
+ internalConstructor: "internalConstructor",
+ performance: "performance",
+ privateparam: "privateparam",
+ privateParam: "privateParam",
+ },
+ },
+ },
rules: {
...configCesium.configs.browser.rules,
...jsdoc.configs["flat/recommended-error"].rules,
@@ -66,8 +78,7 @@ export default [
"jsdoc/check-types": "off",
"jsdoc/valid-types": "off",
"jsdoc/tag-lines": "off",
- "jsdoc/check-tag-names": "off",
- "jsdoc/no-defaults": "off",
+ "jsdoc/no-defaults": "off", // We use default parameters instead of enforcing with ES6 for now
},
},
{
diff --git a/packages/engine/Source/Core/CircleGeometry.js b/packages/engine/Source/Core/CircleGeometry.js
index 51100e6efd37..3631d9d076ef 100644
--- a/packages/engine/Source/Core/CircleGeometry.js
+++ b/packages/engine/Source/Core/CircleGeometry.js
@@ -20,7 +20,7 @@ import VertexFormat from "./VertexFormat.js";
* @param {number} [options.extrudedHeight] The distance in meters between the circle's extruded face and the ellipsoid surface.
* @param {number} [options.stRotation] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
* @throws {DeveloperError} radius must be greater than zero.
- * @exception {DeveloperError} granularity must be greater than zero.
+ * @throws {DeveloperError} granularity must be greater than zero.
*
* @see CircleGeometry.createGeometry
* @see Packable
diff --git a/packages/engine/Source/Core/Color.js b/packages/engine/Source/Core/Color.js
index b886fc6fd2f1..d141d55a814b 100644
--- a/packages/engine/Source/Core/Color.js
+++ b/packages/engine/Source/Core/Color.js
@@ -232,9 +232,9 @@ Color.fromHsl = function (hue, saturation, lightness, alpha, result) {
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The modified result parameter or a new instance if result was undefined.
* @throws {DeveloperError} minimumRed must be less than or equal to maximumRed.
- * @exception {DeveloperError} minimumGreen must be less than or equal to maximumGreen.
- * @exception {DeveloperError} minimumBlue must be less than or equal to maximumBlue.
- * @exception {DeveloperError} minimumAlpha must be less than or equal to maximumAlpha.
+ * @throws {DeveloperError} minimumGreen must be less than or equal to maximumGreen.
+ * @throws {DeveloperError} minimumBlue must be less than or equal to maximumBlue.
+ * @throws {DeveloperError} minimumAlpha must be less than or equal to maximumAlpha.
*
* @example
* //Create a completely random color
diff --git a/packages/engine/Source/Core/ComponentDatatype.js b/packages/engine/Source/Core/ComponentDatatype.js
index f1770918f815..b1fd596d6e84 100644
--- a/packages/engine/Source/Core/ComponentDatatype.js
+++ b/packages/engine/Source/Core/ComponentDatatype.js
@@ -44,7 +44,7 @@ const ComponentDatatype = {
/**
* 32-bit signed int corresponding to INT
and the type
* of an element in Int32Array
.
- * @memberOf ComponentDatatype
+ * @memberof ComponentDatatype
* @type {number}
* @constant
*/
@@ -53,7 +53,7 @@ const ComponentDatatype = {
/**
* 32-bit unsigned int corresponding to UNSIGNED_INT
and the type
* of an element in Uint32Array
.
- * @memberOf ComponentDatatype
+ * @memberof ComponentDatatype
* @type {number}
* @constant
*/
@@ -71,7 +71,7 @@ const ComponentDatatype = {
* 64-bit floating-point corresponding to gl.DOUBLE
(in Desktop OpenGL;
* this is not supported in WebGL, and is emulated in Cesium via {@link GeometryPipeline.encodeAttribute})
* and the type of an element in Float64Array
.
- * @memberOf ComponentDatatype
+ * @memberof ComponentDatatype
* @type {number}
* @constant
* @default 0x140A
diff --git a/packages/engine/Source/Core/EllipseGeometry.js b/packages/engine/Source/Core/EllipseGeometry.js
index e5b60828be6b..eb3f88998e22 100644
--- a/packages/engine/Source/Core/EllipseGeometry.js
+++ b/packages/engine/Source/Core/EllipseGeometry.js
@@ -898,8 +898,8 @@ function computeRectangle(
* @param {number} [options.granularity] The angular distance between points on the ellipse in radians.
* @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
* @throws {DeveloperError} semiMajorAxis and semiMinorAxis must be greater than zero.
- * @exception {DeveloperError} semiMajorAxis must be greater than or equal to the semiMinorAxis.
- * @exception {DeveloperError} granularity must be greater than zero.
+ * @throws {DeveloperError} semiMajorAxis must be greater than or equal to the semiMinorAxis.
+ * @throws {DeveloperError} granularity must be greater than zero.
*
*
* @example
diff --git a/packages/engine/Source/Core/EllipseOutlineGeometry.js b/packages/engine/Source/Core/EllipseOutlineGeometry.js
index b711e6c2ddd2..6b88b0ceb4cc 100644
--- a/packages/engine/Source/Core/EllipseOutlineGeometry.js
+++ b/packages/engine/Source/Core/EllipseOutlineGeometry.js
@@ -194,7 +194,7 @@ function computeExtrudedEllipse(options) {
* @param {number} [options.numberOfVerticalLines] Number of lines to draw between the top and bottom surface of an extruded ellipse.
* @throws {DeveloperError} semiMajorAxis and semiMinorAxis must be greater than zero.
* @throws {DeveloperError} semiMajorAxis must be greater than or equal to the semiMinorAxis.
- * @exception {DeveloperError} granularity must be greater than zero.
+ * @throws {DeveloperError} granularity must be greater than zero.
*
* @see EllipseOutlineGeometry.createGeometry
*
diff --git a/packages/engine/Source/Core/EllipsoidGeometry.js b/packages/engine/Source/Core/EllipsoidGeometry.js
index b06c3471cff2..e40c778d27c0 100644
--- a/packages/engine/Source/Core/EllipsoidGeometry.js
+++ b/packages/engine/Source/Core/EllipsoidGeometry.js
@@ -40,8 +40,8 @@ const sin = Math.sin;
* @param {number} [options.slicePartitions] The number of times to partition the ellipsoid into radial slices.
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
*
- * @exception {DeveloperError} options.slicePartitions cannot be less than three.
- * @exception {DeveloperError} options.stackPartitions cannot be less than three.
+ * @throws {DeveloperError} options.slicePartitions cannot be less than three.
+ * @throws {DeveloperError} options.stackPartitions cannot be less than three.
*
* @see EllipsoidGeometry#createGeometry
*
diff --git a/packages/engine/Source/Core/EllipsoidOutlineGeometry.js b/packages/engine/Source/Core/EllipsoidOutlineGeometry.js
index 6d90aad9ecd2..ab199b3d2465 100644
--- a/packages/engine/Source/Core/EllipsoidOutlineGeometry.js
+++ b/packages/engine/Source/Core/EllipsoidOutlineGeometry.js
@@ -32,9 +32,9 @@ const sin = Math.sin;
* @param {number} [options.slicePartitions] The count of slices for the ellipsoid (Equal to the number of radial lines).
* @param {number} [options.subdivisions=128] The number of points per line, determining the granularity of the curvature.
*
- * @exception {DeveloperError} options.stackPartitions must be greater than or equal to one.
- * @exception {DeveloperError} options.slicePartitions must be greater than or equal to zero.
- * @exception {DeveloperError} options.subdivisions must be greater than or equal to zero.
+ * @throws {DeveloperError} options.stackPartitions must be greater than or equal to one.
+ * @throws {DeveloperError} options.slicePartitions must be greater than or equal to zero.
+ * @throws {DeveloperError} options.subdivisions must be greater than or equal to zero.
*
* @example
* const ellipsoid = new Cesium.EllipsoidOutlineGeometry({
diff --git a/packages/engine/Source/Core/PolylineGeometry.js b/packages/engine/Source/Core/PolylineGeometry.js
index 8add1544210f..fb3bef259177 100644
--- a/packages/engine/Source/Core/PolylineGeometry.js
+++ b/packages/engine/Source/Core/PolylineGeometry.js
@@ -75,8 +75,8 @@ function interpolateColors(p0, p1, color0, color1, numPoints) {
* @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
* @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
* @throws {DeveloperError} At least two positions are required.
- * @exception {DeveloperError} width must be greater than or equal to one.
- * @exception {DeveloperError} colors has an invalid length.
+ * @throws {DeveloperError} width must be greater than or equal to one.
+ * @throws {DeveloperError} colors has an invalid length.
*
* @see PolylineGeometry#createGeometry
*
diff --git a/packages/engine/Source/Core/RectangleGeometry.js b/packages/engine/Source/Core/RectangleGeometry.js
index aab7af87757c..e89510cc7484 100644
--- a/packages/engine/Source/Core/RectangleGeometry.js
+++ b/packages/engine/Source/Core/RectangleGeometry.js
@@ -983,10 +983,10 @@ function computeRectangle(rectangle, granularity, rotation, ellipsoid, result) {
* @param {number} [options.stRotation] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
* @param {number} [options.extrudedHeight] The distance in meters between the rectangle's extruded face and the ellipsoid surface.
* @throws {DeveloperError} options.rectangle.north
must be in the interval [-Pi/2
, Pi/2
].
- * @exception {DeveloperError} options.rectangle.south
must be in the interval [-Pi/2
, Pi/2
].
- * @exception {DeveloperError} options.rectangle.east
must be in the interval [-Pi
, Pi
].
- * @exception {DeveloperError} options.rectangle.west
must be in the interval [-Pi
, Pi
].
- * @exception {DeveloperError} options.rectangle.north
must be greater than options.rectangle.south
.
+ * @throws {DeveloperError} options.rectangle.south
must be in the interval [-Pi/2
, Pi/2
].
+ * @throws {DeveloperError} options.rectangle.east
must be in the interval [-Pi
, Pi
].
+ * @throws {DeveloperError} options.rectangle.west
must be in the interval [-Pi
, Pi
].
+ * @throws {DeveloperError} options.rectangle.north
must be greater than options.rectangle.south
.
*
* @see RectangleGeometry#createGeometry
*
diff --git a/packages/engine/Source/Core/RectangleOutlineGeometry.js b/packages/engine/Source/Core/RectangleOutlineGeometry.js
index f79569dcabe4..2211f63480ac 100644
--- a/packages/engine/Source/Core/RectangleOutlineGeometry.js
+++ b/packages/engine/Source/Core/RectangleOutlineGeometry.js
@@ -253,8 +253,8 @@ function constructExtrudedRectangle(rectangleGeometry, computedOptions) {
* @throws {DeveloperError} options.rectangle.north
must be in the interval [-Pi/2
, Pi/2
].
* @throws {DeveloperError} options.rectangle.south
must be in the interval [-Pi/2
, Pi/2
].
* @throws {DeveloperError} options.rectangle.east
must be in the interval [-Pi
, Pi
].
- * @exception {DeveloperError} options.rectangle.west
must be in the interval [-Pi
, Pi
].
- * @exception {DeveloperError} options.rectangle.north
must be greater than rectangle.south
.
+ * @throws {DeveloperError} options.rectangle.west
must be in the interval [-Pi
, Pi
].
+ * @throws {DeveloperError} options.rectangle.north
must be greater than rectangle.south
.
*
* @see RectangleOutlineGeometry#createGeometry
*
diff --git a/packages/engine/Source/DataSources/ModelGraphics.js b/packages/engine/Source/DataSources/ModelGraphics.js
index ff7dd47bcd6b..741d2987753b 100644
--- a/packages/engine/Source/DataSources/ModelGraphics.js
+++ b/packages/engine/Source/DataSources/ModelGraphics.js
@@ -262,7 +262,7 @@ Object.defineProperties(ModelGraphics.prototype, {
/**
* A property specifying the {@link Cartesian3} light color when shading the model. When undefined
the scene's light color is used instead.
- * @memberOf ModelGraphics.prototype
+ * @memberof ModelGraphics.prototype
* @type {Property|undefined}
*/
lightColor: createPropertyDescriptor("lightColor"),
diff --git a/packages/engine/Source/Renderer/CubeMapFace.js b/packages/engine/Source/Renderer/CubeMapFace.js
index 59c540bf6bdb..f82a4bcdcd54 100644
--- a/packages/engine/Source/Renderer/CubeMapFace.js
+++ b/packages/engine/Source/Renderer/CubeMapFace.js
@@ -286,13 +286,13 @@ CubeMapFace.prototype.copyFrom = function (options) {
* @throws {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.
* @throws {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.
* @throws {DeveloperError} This CubeMap was destroyed, i.e., destroy() was called.
- * @exception {DeveloperError} xOffset must be greater than or equal to zero.
- * @exception {DeveloperError} yOffset must be greater than or equal to zero.
- * @exception {DeveloperError} framebufferXOffset must be greater than or equal to zero.
- * @exception {DeveloperError} framebufferYOffset must be greater than or equal to zero.
- * @exception {DeveloperError} xOffset + source.width must be less than or equal to width.
- * @exception {DeveloperError} yOffset + source.height must be less than or equal to height.
- * @exception {DeveloperError} This CubeMap was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} xOffset must be greater than or equal to zero.
+ * @throws {DeveloperError} yOffset must be greater than or equal to zero.
+ * @throws {DeveloperError} framebufferXOffset must be greater than or equal to zero.
+ * @throws {DeveloperError} framebufferYOffset must be greater than or equal to zero.
+ * @throws {DeveloperError} xOffset + source.width must be less than or equal to width.
+ * @throws {DeveloperError} yOffset + source.height must be less than or equal to height.
+ * @throws {DeveloperError} This CubeMap was destroyed, i.e., destroy() was called.
*
* @example
* // Copy the framebuffer contents to the +x cube map face.
diff --git a/packages/engine/Source/Renderer/Framebuffer.js b/packages/engine/Source/Renderer/Framebuffer.js
index 1e587044420d..c07bab96575a 100644
--- a/packages/engine/Source/Renderer/Framebuffer.js
+++ b/packages/engine/Source/Renderer/Framebuffer.js
@@ -42,9 +42,9 @@ function attachRenderbuffer(framebuffer, attachment, renderbuffer) {
* @throws {DeveloperError} The color-texture pixel-format must be a color format.
* @throws {DeveloperError} The depth-texture pixel-format must be DEPTH_COMPONENT.
* @throws {DeveloperError} The depth-stencil-texture pixel-format must be DEPTH_STENCIL.
- * @exception {DeveloperError} The number of color attachments exceeds the number supported.
- * @exception {DeveloperError} The color-texture pixel datatype is HALF_FLOAT and the WebGL implementation does not support the EXT_color_buffer_half_float extension.
- * @exception {DeveloperError} The color-texture pixel datatype is FLOAT and the WebGL implementation does not support the EXT_color_buffer_float or WEBGL_color_buffer_float extensions.
+ * @throws {DeveloperError} The number of color attachments exceeds the number supported.
+ * @throws {DeveloperError} The color-texture pixel datatype is HALF_FLOAT and the WebGL implementation does not support the EXT_color_buffer_half_float extension.
+ * @throws {DeveloperError} The color-texture pixel datatype is FLOAT and the WebGL implementation does not support the EXT_color_buffer_float or WEBGL_color_buffer_float extensions.
*
* @example
* // Create a framebuffer with color and depth texture attachments.
@@ -68,7 +68,7 @@ function attachRenderbuffer(framebuffer, attachment, renderbuffer) {
* });
*
* @private
- * @constructor
+ * @class
*/
function Framebuffer(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
diff --git a/packages/engine/Source/Renderer/FramebufferManager.js b/packages/engine/Source/Renderer/FramebufferManager.js
index 2a50fb9929db..a9f41c098a25 100644
--- a/packages/engine/Source/Renderer/FramebufferManager.js
+++ b/packages/engine/Source/Renderer/FramebufferManager.js
@@ -23,11 +23,11 @@ import PixelFormat from "../Core/PixelFormat.js";
* @param {boolean} [options.createDepthAttachments] Whether the FramebufferManager will construct its own depth attachments.
* @param {PixelDatatype} [options.pixelDatatype] The default pixel datatype to use when creating color attachments.
* @param {PixelFormat} [options.pixelFormat=undefined] The default pixel format to use when creating color attachments.
- * @exception {DeveloperError} Must enable at least one type of framebuffer attachment.
- * @exception {DeveloperError} Cannot have both a depth and depth-stencil attachment.
+ * @throws {DeveloperError} Must enable at least one type of framebuffer attachment.
+ * @throws {DeveloperError} Cannot have both a depth and depth-stencil attachment.
*
* @private
- * @constructor
+ * @class
*/
function FramebufferManager(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
diff --git a/packages/engine/Source/Renderer/RenderState.js b/packages/engine/Source/Renderer/RenderState.js
index 9e15089ef44d..c21cc71d2fc9 100644
--- a/packages/engine/Source/Renderer/RenderState.js
+++ b/packages/engine/Source/Renderer/RenderState.js
@@ -382,24 +382,24 @@ let renderStateCache = {};
* @throws {DeveloperError} renderState.depthRange.far must be less than or equal to zero.
* @throws {DeveloperError} Invalid renderState.depthTest.func.
* @throws {DeveloperError} renderState.blending.color components must be greater than or equal to zero and less than or equal to one
- * @exception {DeveloperError} Invalid renderState.blending.equationRgb.
- * @exception {DeveloperError} Invalid renderState.blending.equationAlpha.
- * @exception {DeveloperError} Invalid renderState.blending.functionSourceRgb.
- * @exception {DeveloperError} Invalid renderState.blending.functionSourceAlpha.
- * @exception {DeveloperError} Invalid renderState.blending.functionDestinationRgb.
- * @exception {DeveloperError} Invalid renderState.blending.functionDestinationAlpha.
- * @exception {DeveloperError} Invalid renderState.stencilTest.frontFunction.
- * @exception {DeveloperError} Invalid renderState.stencilTest.backFunction.
- * @exception {DeveloperError} Invalid renderState.stencilTest.frontOperation.fail.
- * @exception {DeveloperError} Invalid renderState.stencilTest.frontOperation.zFail.
- * @exception {DeveloperError} Invalid renderState.stencilTest.frontOperation.zPass.
- * @exception {DeveloperError} Invalid renderState.stencilTest.backOperation.fail.
- * @exception {DeveloperError} Invalid renderState.stencilTest.backOperation.zFail.
- * @exception {DeveloperError} Invalid renderState.stencilTest.backOperation.zPass.
- * @exception {DeveloperError} renderState.viewport.width must be greater than or equal to zero.
- * @exception {DeveloperError} renderState.viewport.width must be less than or equal to the maximum viewport width.
- * @exception {DeveloperError} renderState.viewport.height must be greater than or equal to zero.
- * @exception {DeveloperError} renderState.viewport.height must be less than or equal to the maximum viewport height.
+ * @throws {DeveloperError} Invalid renderState.blending.equationRgb.
+ * @throws {DeveloperError} Invalid renderState.blending.equationAlpha.
+ * @throws {DeveloperError} Invalid renderState.blending.functionSourceRgb.
+ * @throws {DeveloperError} Invalid renderState.blending.functionSourceAlpha.
+ * @throws {DeveloperError} Invalid renderState.blending.functionDestinationRgb.
+ * @throws {DeveloperError} Invalid renderState.blending.functionDestinationAlpha.
+ * @throws {DeveloperError} Invalid renderState.stencilTest.frontFunction.
+ * @throws {DeveloperError} Invalid renderState.stencilTest.backFunction.
+ * @throws {DeveloperError} Invalid renderState.stencilTest.frontOperation.fail.
+ * @throws {DeveloperError} Invalid renderState.stencilTest.frontOperation.zFail.
+ * @throws {DeveloperError} Invalid renderState.stencilTest.frontOperation.zPass.
+ * @throws {DeveloperError} Invalid renderState.stencilTest.backOperation.fail.
+ * @throws {DeveloperError} Invalid renderState.stencilTest.backOperation.zFail.
+ * @throws {DeveloperError} Invalid renderState.stencilTest.backOperation.zPass.
+ * @throws {DeveloperError} renderState.viewport.width must be greater than or equal to zero.
+ * @throws {DeveloperError} renderState.viewport.width must be less than or equal to the maximum viewport width.
+ * @throws {DeveloperError} renderState.viewport.height must be greater than or equal to zero.
+ * @throws {DeveloperError} renderState.viewport.height must be less than or equal to the maximum viewport height.
*
*
* @example
diff --git a/packages/engine/Source/Renderer/Texture.js b/packages/engine/Source/Renderer/Texture.js
index 6080dcd670b1..f73e26a4a6e7 100644
--- a/packages/engine/Source/Renderer/Texture.js
+++ b/packages/engine/Source/Renderer/Texture.js
@@ -425,9 +425,9 @@ Texture.create = function (options) {
* @throws {DeveloperError} Invalid pixelFormat.
* @throws {DeveloperError} pixelFormat cannot be DEPTH_COMPONENT, DEPTH_STENCIL or a compressed format.
* @throws {DeveloperError} framebufferXOffset must be greater than or equal to zero.
- * @exception {DeveloperError} framebufferYOffset must be greater than or equal to zero.
- * @exception {DeveloperError} framebufferXOffset + width must be less than or equal to canvas.clientWidth.
- * @exception {DeveloperError} framebufferYOffset + height must be less than or equal to canvas.clientHeight.
+ * @throws {DeveloperError} framebufferYOffset must be greater than or equal to zero.
+ * @throws {DeveloperError} framebufferXOffset + width must be less than or equal to canvas.clientWidth.
+ * @throws {DeveloperError} framebufferYOffset + height must be less than or equal to canvas.clientHeight.
*
*
* @example
@@ -660,7 +660,7 @@ Object.defineProperties(Texture.prototype, {
* @throws {DeveloperError} yOffset must be greater than or equal to zero.
* @throws {DeveloperError} xOffset + source.width must be less than or equal to width.
* @throws {DeveloperError} yOffset + source.height must be less than or equal to height.
- * @exception {DeveloperError} This texture was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} This texture was destroyed, i.e., destroy() was called.
*
* @example
* texture.copyFrom({
@@ -880,14 +880,14 @@ Texture.prototype.copyFrom = function (options) {
* @throws {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.
* @throws {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.
* @throws {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.
- * @exception {DeveloperError} Cannot call copyFrom with a compressed texture pixel format.
- * @exception {DeveloperError} This texture was destroyed, i.e., destroy() was called.
- * @exception {DeveloperError} xOffset must be greater than or equal to zero.
- * @exception {DeveloperError} yOffset must be greater than or equal to zero.
- * @exception {DeveloperError} framebufferXOffset must be greater than or equal to zero.
- * @exception {DeveloperError} framebufferYOffset must be greater than or equal to zero.
- * @exception {DeveloperError} xOffset + width must be less than or equal to width.
- * @exception {DeveloperError} yOffset + height must be less than or equal to height.
+ * @throws {DeveloperError} Cannot call copyFrom with a compressed texture pixel format.
+ * @throws {DeveloperError} This texture was destroyed, i.e., destroy() was called.
+ * @throws {DeveloperError} xOffset must be greater than or equal to zero.
+ * @throws {DeveloperError} yOffset must be greater than or equal to zero.
+ * @throws {DeveloperError} framebufferXOffset must be greater than or equal to zero.
+ * @throws {DeveloperError} framebufferYOffset must be greater than or equal to zero.
+ * @throws {DeveloperError} xOffset + width must be less than or equal to width.
+ * @throws {DeveloperError} yOffset + height must be less than or equal to height.
*/
Texture.prototype.copyFromFramebuffer = function (
xOffset,
diff --git a/packages/engine/Source/Renderer/UniformState.js b/packages/engine/Source/Renderer/UniformState.js
index 85dc0d265588..d2f046b51642 100644
--- a/packages/engine/Source/Renderer/UniformState.js
+++ b/packages/engine/Source/Renderer/UniformState.js
@@ -1147,7 +1147,7 @@ Object.defineProperties(UniformState.prototype, {
/**
* Whether or not the current projection is orthographic in 3D.
- * @memberOf UniformState.prototype
+ * @memberof UniformState.prototype
* @type {boolean}
*/
orthographicIn3D: {
@@ -1158,7 +1158,7 @@ Object.defineProperties(UniformState.prototype, {
/**
* The current ellipsoid.
- * @memberOf UniformState.prototype
+ * @memberof UniformState.prototype
* @type {Ellipsoid}
*/
ellipsoid: {
diff --git a/packages/engine/Source/Scene/BatchTable.js b/packages/engine/Source/Scene/BatchTable.js
index 2581012997d0..b408bea39296 100644
--- a/packages/engine/Source/Scene/BatchTable.js
+++ b/packages/engine/Source/Scene/BatchTable.js
@@ -127,7 +127,7 @@ function BatchTable(context, attributes, numberOfInstances) {
Object.defineProperties(BatchTable.prototype, {
/**
* The attribute descriptions.
- * @memberOf BatchTable.prototype
+ * @memberof BatchTable.prototype
* @type {object[]}
* @readonly
*/
@@ -138,7 +138,7 @@ Object.defineProperties(BatchTable.prototype, {
},
/**
* The number of instances.
- * @memberOf BatchTable.prototype
+ * @memberof BatchTable.prototype
* @type {number}
* @readonly
*/
diff --git a/packages/engine/Source/Scene/Cesium3DTileset.js b/packages/engine/Source/Scene/Cesium3DTileset.js
index 95eb5dc3beb2..40a412d1743c 100644
--- a/packages/engine/Source/Scene/Cesium3DTileset.js
+++ b/packages/engine/Source/Scene/Cesium3DTileset.js
@@ -1441,7 +1441,7 @@ Object.defineProperties(Cesium3DTileset.prototype, {
/**
* The root tile.
- * @memberOf Cesium3DTileset.prototype
+ * @memberof Cesium3DTileset.prototype
* @type {Cesium3DTile}
* @readonly
*/
diff --git a/packages/engine/Source/Scene/Material.js b/packages/engine/Source/Scene/Material.js
index 3e26594a03a7..ed77d2e7bbbe 100644
--- a/packages/engine/Source/Scene/Material.js
+++ b/packages/engine/Source/Scene/Material.js
@@ -235,11 +235,11 @@ import WaterMaterial from "../Shaders/Materials/Water.js";
* @throws {DeveloperError} fabric: uniform has invalid type.
* @throws {DeveloperError} fabric: uniforms and materials cannot share the same property.
* @throws {DeveloperError} fabric: cannot have source and components in the same section.
- * @exception {DeveloperError} fabric: property name is not valid. It should be 'type', 'materials', 'uniforms', 'components', or 'source'.
- * @exception {DeveloperError} fabric: property name is not valid. It should be 'diffuse', 'specular', 'shininess', 'normal', 'emission', or 'alpha'.
- * @exception {DeveloperError} strict: shader source does not use string.
- * @exception {DeveloperError} strict: shader source does not use uniform.
- * @exception {DeveloperError} strict: shader source does not use material.
+ * @throws {DeveloperError} fabric: property name is not valid. It should be 'type', 'materials', 'uniforms', 'components', or 'source'.
+ * @throws {DeveloperError} fabric: property name is not valid. It should be 'diffuse', 'specular', 'shininess', 'normal', 'emission', or 'alpha'.
+ * @throws {DeveloperError} strict: shader source does not use string.
+ * @throws {DeveloperError} strict: shader source does not use uniform.
+ * @throws {DeveloperError} strict: shader source does not use material.
*
* @see {@link https://github.com/CesiumGS/cesium/wiki/Fabric|Fabric wiki page} for a more detailed options of Fabric.
*
diff --git a/packages/engine/Source/Scene/Model/Model.js b/packages/engine/Source/Scene/Model/Model.js
index ba20863c93ff..328b98816d5b 100644
--- a/packages/engine/Source/Scene/Model/Model.js
+++ b/packages/engine/Source/Scene/Model/Model.js
@@ -2625,9 +2625,9 @@ Model.prototype.destroyModelResources = function () {
* @param {Model.GltfCallback} [options.gltfCallback] A function that is called with the loaded gltf object once loaded.
* @returns {Promise} A promise that resolves to the created model when it is ready to render.
*
- * @exception {RuntimeError} The model failed to load.
- * @exception {RuntimeError} Unsupported glTF version.
- * @exception {RuntimeError} Unsupported glTF Extension
+ * @throws {RuntimeError} The model failed to load.
+ * @throws {RuntimeError} Unsupported glTF version.
+ * @throws {RuntimeError} Unsupported glTF Extension
*
* @example
* // Load a model and add it to the scene
diff --git a/packages/engine/Source/Scene/Model/ModelAnimationCollection.js b/packages/engine/Source/Scene/Model/ModelAnimationCollection.js
index 99691ca75292..8b84f1860334 100644
--- a/packages/engine/Source/Scene/Model/ModelAnimationCollection.js
+++ b/packages/engine/Source/Scene/Model/ModelAnimationCollection.js
@@ -114,8 +114,8 @@ function addAnimation(collection, animation, options) {
* @throws {DeveloperError} Animations are not loaded. Wait for the {@link Model#ready} to return trues.
* @throws {DeveloperError} options.name must be a valid animation name.
* @throws {DeveloperError} options.index must be a valid animation index.
- * @exception {DeveloperError} Either options.name or options.index must be defined.
- * @exception {DeveloperError} options.multiplier must be greater than zero.
+ * @throws {DeveloperError} Either options.name or options.index must be defined.
+ * @throws {DeveloperError} options.multiplier must be greater than zero.
*
* @example
* // Example 1. Add an animation by name
diff --git a/packages/engine/Source/Scene/OctahedralProjectedCubeMap.js b/packages/engine/Source/Scene/OctahedralProjectedCubeMap.js
index 8d5c9ecef3e9..5c469025b15c 100644
--- a/packages/engine/Source/Scene/OctahedralProjectedCubeMap.js
+++ b/packages/engine/Source/Scene/OctahedralProjectedCubeMap.js
@@ -84,7 +84,7 @@ Object.defineProperties(OctahedralProjectedCubeMap.prototype, {
},
/**
* The maximum number of mip levels.
- * @memberOf OctahedralProjectedCubeMap.prototype
+ * @memberof OctahedralProjectedCubeMap.prototype
* @type {number}
* @readonly
*/
diff --git a/packages/engine/Source/Scene/PostProcessStage.js b/packages/engine/Source/Scene/PostProcessStage.js
index 51ffcea5b0d2..f4b5a226489c 100644
--- a/packages/engine/Source/Scene/PostProcessStage.js
+++ b/packages/engine/Source/Scene/PostProcessStage.js
@@ -35,9 +35,9 @@ import PostProcessStageSampleMode from "./PostProcessStageSampleMode.js";
* @param {Color} [options.clearColor] The color to clear the output texture to.
* @param {BoundingRectangle} [options.scissorRectangle] The rectangle to use for the scissor test.
* @param {string} [options.name] The unique name of this post-process stage for reference by other stages in a composite. If a name is not supplied, a GUID will be generated.
- * @exception {DeveloperError} options.textureScale must be greater than 0.0 and less than or equal to 1.0.
- * @exception {DeveloperError} options.pixelFormat must be a color format.
- * @exception {DeveloperError} When options.pixelDatatype is FLOAT, this WebGL implementation must support floating point textures. Check context.floatingPointTexture.
+ * @throws {DeveloperError} options.textureScale must be greater than 0.0 and less than or equal to 1.0.
+ * @throws {DeveloperError} options.pixelFormat must be a color format.
+ * @throws {DeveloperError} When options.pixelDatatype is FLOAT, this WebGL implementation must support floating point textures. Check context.floatingPointTexture.
*
* @see PostProcessStageComposite
*
diff --git a/packages/engine/Source/Scene/PostProcessStageCollection.js b/packages/engine/Source/Scene/PostProcessStageCollection.js
index e136f7329d74..a65bef0573ac 100644
--- a/packages/engine/Source/Scene/PostProcessStageCollection.js
+++ b/packages/engine/Source/Scene/PostProcessStageCollection.js
@@ -213,7 +213,7 @@ Object.defineProperties(PostProcessStageCollection.prototype, {
*
* When enabled, this stage will execute before all others.
*
- * @memberOf PostProcessStageCollection.prototype
+ * @memberof PostProcessStageCollection.prototype
* @type {PostProcessStageComposite}
* @readonly
*/
diff --git a/packages/engine/Source/Scene/Scene.js b/packages/engine/Source/Scene/Scene.js
index 406da495d3c6..96021e07d0ce 100644
--- a/packages/engine/Source/Scene/Scene.js
+++ b/packages/engine/Source/Scene/Scene.js
@@ -107,7 +107,7 @@ const requestRenderAfterFrame = function (scene) {
* @see CesiumWidget
* @see {@link http://www.khronos.org/registry/webgl/specs/latest/#5.2|WebGLContextAttributes}
*
- * @exception {DeveloperError} options and options.canvas are required.
+ * @throws {DeveloperError} options and options.canvas are required.
*
* @example
* // Create scene without anisotropic texture filtering
diff --git a/packages/engine/Source/Widget/CesiumWidget.js b/packages/engine/Source/Widget/CesiumWidget.js
index 735010153830..c2c4546377e1 100644
--- a/packages/engine/Source/Widget/CesiumWidget.js
+++ b/packages/engine/Source/Widget/CesiumWidget.js
@@ -147,7 +147,7 @@ function configureCameraFrustum(widget) {
* @param {number} [options.maximumRenderTimeChange=0.0] If requestRenderMode is true, this value defines the maximum change in simulation time allowed before a render is requested. See {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}.
* @param {number} [options.msaaSamples=1] If provided, this value controls the rate of multisample antialiasing. Typical multisampling rates are 2, 4, and sometimes 8 samples per pixel. Higher sampling rates of MSAA may impact performance in exchange for improved visual quality. This value only applies to WebGL2 contexts that support multisample render targets.
*
- * @exception {DeveloperError} Element with id "container" does not exist in the document.
+ * @throws {DeveloperError} Element with id "container" does not exist in the document.
*
* @demo {@link https://sandcastle.cesium.com/index.html?src=Cesium%20Widget.html|Cesium Sandcastle Cesium Widget Demo}
*
diff --git a/packages/widgets/Source/Viewer/viewerDragDropMixin.js b/packages/widgets/Source/Viewer/viewerDragDropMixin.js
index 6854d05f49a4..a14946e8911d 100644
--- a/packages/widgets/Source/Viewer/viewerDragDropMixin.js
+++ b/packages/widgets/Source/Viewer/viewerDragDropMixin.js
@@ -25,8 +25,8 @@ import {
* @throws {DeveloperError} Element with id does not exist in the document.
* @throws {DeveloperError} dropTarget is already defined by another mixin.
* @throws {DeveloperError} dropEnabled is already defined by another mixin.
- * @exception {DeveloperError} dropError is already defined by another mixin.
- * @exception {DeveloperError} clearOnDrop is already defined by another mixin.
+ * @throws {DeveloperError} dropError is already defined by another mixin.
+ * @throws {DeveloperError} clearOnDrop is already defined by another mixin.
*
* @example
* // Add basic drag and drop support and pop up an alert window on error.
From ed3c29ee31bf068a948e9c31ee58e871ddea03b9 Mon Sep 17 00:00:00 2001
From: ggetz
Date: Tue, 4 Jun 2024 14:22:34 -0400
Subject: [PATCH 5/9] Fix jsdoc/tag-lines
---
eslint.config.js | 1 -
packages/engine/Source/Core/CircleGeometry.js | 2 --
packages/engine/Source/Core/CircleOutlineGeometry.js | 2 --
packages/engine/Source/Core/Clock.js | 2 --
packages/engine/Source/Core/Color.js | 1 -
packages/engine/Source/Core/CylinderOutlineGeometry.js | 2 --
packages/engine/Source/Core/EllipseGeometry.js | 3 ---
packages/engine/Source/Core/EllipseOutlineGeometry.js | 2 --
packages/engine/Source/Core/EllipsoidGeometry.js | 3 ---
packages/engine/Source/Core/EllipsoidOutlineGeometry.js | 2 --
packages/engine/Source/Core/HeightmapTerrainData.js | 3 ---
packages/engine/Source/Core/Matrix3.js | 1 -
packages/engine/Source/Core/Matrix4.js | 1 -
packages/engine/Source/Core/PolygonGeometry.js | 4 ----
packages/engine/Source/Core/PolylineGeometry.js | 3 ---
packages/engine/Source/Core/RectangleGeometry.js | 3 ---
packages/engine/Source/Core/RectangleOutlineGeometry.js | 2 --
packages/engine/Source/Core/SimplePolylineGeometry.js | 1 -
packages/engine/Source/Core/SphereGeometry.js | 1 -
packages/engine/Source/Core/SphereOutlineGeometry.js | 1 -
packages/engine/Source/Core/WallGeometry.js | 2 --
packages/engine/Source/Core/loadKTX2.js | 1 -
packages/engine/Source/Renderer/CubeMapFace.js | 1 -
packages/engine/Source/Renderer/Framebuffer.js | 2 --
packages/engine/Source/Renderer/FramebufferManager.js | 1 -
packages/engine/Source/Renderer/RenderState.js | 4 ----
packages/engine/Source/Renderer/Texture.js | 5 -----
packages/engine/Source/Renderer/VertexArray.js | 4 ----
packages/engine/Source/Scene/ClassificationPrimitive.js | 1 -
packages/engine/Source/Scene/GroundPolylinePrimitive.js | 1 -
packages/engine/Source/Scene/GroundPrimitive.js | 2 --
packages/engine/Source/Scene/Material.js | 3 ---
packages/engine/Source/Scene/MaterialAppearance.js | 1 -
packages/engine/Source/Scene/Model/Model.js | 4 ----
.../engine/Source/Scene/Model/ModelAnimationCollection.js | 3 ---
packages/engine/Source/Scene/PostProcessStage.js | 3 ---
packages/engine/Source/Scene/Primitive.js | 4 ----
packages/engine/Source/Scene/Scene.js | 3 ---
packages/engine/Source/Widget/CesiumWidget.js | 3 ---
packages/widgets/Source/Viewer/viewerDragDropMixin.js | 1 -
40 files changed, 89 deletions(-)
diff --git a/eslint.config.js b/eslint.config.js
index 008de9992e4d..163f5ded3ec9 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -77,7 +77,6 @@ export default [
"jsdoc/check-property-names": "off",
"jsdoc/check-types": "off",
"jsdoc/valid-types": "off",
- "jsdoc/tag-lines": "off",
"jsdoc/no-defaults": "off", // We use default parameters instead of enforcing with ES6 for now
},
},
diff --git a/packages/engine/Source/Core/CircleGeometry.js b/packages/engine/Source/Core/CircleGeometry.js
index 3631d9d076ef..043c422931f2 100644
--- a/packages/engine/Source/Core/CircleGeometry.js
+++ b/packages/engine/Source/Core/CircleGeometry.js
@@ -21,10 +21,8 @@ import VertexFormat from "./VertexFormat.js";
* @param {number} [options.stRotation] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
* @throws {DeveloperError} radius must be greater than zero.
* @throws {DeveloperError} granularity must be greater than zero.
- *
* @see CircleGeometry.createGeometry
* @see Packable
- *
* @example
* // Create a circle.
* const circle = new Cesium.CircleGeometry({
diff --git a/packages/engine/Source/Core/CircleOutlineGeometry.js b/packages/engine/Source/Core/CircleOutlineGeometry.js
index f171685bc53a..f9044cdee5e4 100644
--- a/packages/engine/Source/Core/CircleOutlineGeometry.js
+++ b/packages/engine/Source/Core/CircleOutlineGeometry.js
@@ -19,10 +19,8 @@ import Ellipsoid from "./Ellipsoid.js";
* @param {number} [options.numberOfVerticalLines] Number of lines to draw between the top and bottom of an extruded circle.
* @throws {DeveloperError} radius must be greater than zero.
* @throws {DeveloperError} granularity must be greater than zero.
- *
* @see CircleOutlineGeometry.createGeometry
* @see Packable
- *
* @example
* // Create a circle.
* const circle = new Cesium.CircleOutlineGeometry({
diff --git a/packages/engine/Source/Core/Clock.js b/packages/engine/Source/Core/Clock.js
index 7bcf346e0cfe..eb227c37e1dc 100644
--- a/packages/engine/Source/Core/Clock.js
+++ b/packages/engine/Source/Core/Clock.js
@@ -21,7 +21,6 @@ import JulianDate from "./JulianDate.js";
* @param {boolean} [options.canAnimate] Indicates whether {@link Clock#tick} can advance time. This could be false if data is being buffered, for example. The clock will only tick when both {@link Clock#canAnimate} and {@link Clock#shouldAnimate} are true.
* @param {boolean} [options.shouldAnimate] Indicates whether {@link Clock#tick} should attempt to advance time. The clock will only tick when both {@link Clock#canAnimate} and {@link Clock#shouldAnimate} are true.
* @throws {DeveloperError} startTime must come before stopTime.
- *
* @example
* // Create a clock that loops on Christmas day 2013 and runs in real-time.
* const clock = new Cesium.Clock({
@@ -31,7 +30,6 @@ import JulianDate from "./JulianDate.js";
* clockRange : Cesium.ClockRange.LOOP_STOP,
* clockStep : Cesium.ClockStep.SYSTEM_CLOCK_MULTIPLIER
* });
- *
* @see ClockStep
* @see ClockRange
* @see JulianDate
diff --git a/packages/engine/Source/Core/Color.js b/packages/engine/Source/Core/Color.js
index d141d55a814b..4fe14868bd00 100644
--- a/packages/engine/Source/Core/Color.js
+++ b/packages/engine/Source/Core/Color.js
@@ -235,7 +235,6 @@ Color.fromHsl = function (hue, saturation, lightness, alpha, result) {
* @throws {DeveloperError} minimumGreen must be less than or equal to maximumGreen.
* @throws {DeveloperError} minimumBlue must be less than or equal to maximumBlue.
* @throws {DeveloperError} minimumAlpha must be less than or equal to maximumAlpha.
- *
* @example
* //Create a completely random color
* const color = Cesium.Color.fromRandom();
diff --git a/packages/engine/Source/Core/CylinderOutlineGeometry.js b/packages/engine/Source/Core/CylinderOutlineGeometry.js
index ed13ebcf451c..6db05747e9fa 100644
--- a/packages/engine/Source/Core/CylinderOutlineGeometry.js
+++ b/packages/engine/Source/Core/CylinderOutlineGeometry.js
@@ -31,9 +31,7 @@ const radiusScratch = new Cartesian2();
* @throws {DeveloperError} options.bottomRadius must be greater than 0.
* @throws {DeveloperError} bottomRadius and topRadius cannot both equal 0.
* @throws {DeveloperError} options.slices must be greater than or equal to 3.
- *
* @see CylinderOutlineGeometry.createGeometry
- *
* @example
* // create cylinder geometry
* const cylinder = new Cesium.CylinderOutlineGeometry({
diff --git a/packages/engine/Source/Core/EllipseGeometry.js b/packages/engine/Source/Core/EllipseGeometry.js
index eb3f88998e22..36d16ebb838c 100644
--- a/packages/engine/Source/Core/EllipseGeometry.js
+++ b/packages/engine/Source/Core/EllipseGeometry.js
@@ -900,8 +900,6 @@ function computeRectangle(
* @throws {DeveloperError} semiMajorAxis and semiMinorAxis must be greater than zero.
* @throws {DeveloperError} semiMajorAxis must be greater than or equal to the semiMinorAxis.
* @throws {DeveloperError} granularity must be greater than zero.
- *
- *
* @example
* // Create an ellipse.
* const ellipse = new Cesium.EllipseGeometry({
@@ -911,7 +909,6 @@ function computeRectangle(
* rotation : Cesium.Math.toRadians(60.0)
* });
* const geometry = Cesium.EllipseGeometry.createGeometry(ellipse);
- *
* @see EllipseGeometry.createGeometry
*/
function EllipseGeometry(options) {
diff --git a/packages/engine/Source/Core/EllipseOutlineGeometry.js b/packages/engine/Source/Core/EllipseOutlineGeometry.js
index 6b88b0ceb4cc..3c2dc70f9160 100644
--- a/packages/engine/Source/Core/EllipseOutlineGeometry.js
+++ b/packages/engine/Source/Core/EllipseOutlineGeometry.js
@@ -195,9 +195,7 @@ function computeExtrudedEllipse(options) {
* @throws {DeveloperError} semiMajorAxis and semiMinorAxis must be greater than zero.
* @throws {DeveloperError} semiMajorAxis must be greater than or equal to the semiMinorAxis.
* @throws {DeveloperError} granularity must be greater than zero.
- *
* @see EllipseOutlineGeometry.createGeometry
- *
* @example
* const ellipse = new Cesium.EllipseOutlineGeometry({
* center : Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883),
diff --git a/packages/engine/Source/Core/EllipsoidGeometry.js b/packages/engine/Source/Core/EllipsoidGeometry.js
index e40c778d27c0..91f36295640d 100644
--- a/packages/engine/Source/Core/EllipsoidGeometry.js
+++ b/packages/engine/Source/Core/EllipsoidGeometry.js
@@ -39,12 +39,9 @@ const sin = Math.sin;
* @param {number} [options.stackPartitions] The number of times to partition the ellipsoid into stacks.
* @param {number} [options.slicePartitions] The number of times to partition the ellipsoid into radial slices.
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- *
* @throws {DeveloperError} options.slicePartitions cannot be less than three.
* @throws {DeveloperError} options.stackPartitions cannot be less than three.
- *
* @see EllipsoidGeometry#createGeometry
- *
* @example
* const ellipsoid = new Cesium.EllipsoidGeometry({
* vertexFormat : Cesium.VertexFormat.POSITION_ONLY,
diff --git a/packages/engine/Source/Core/EllipsoidOutlineGeometry.js b/packages/engine/Source/Core/EllipsoidOutlineGeometry.js
index ab199b3d2465..db110af304a1 100644
--- a/packages/engine/Source/Core/EllipsoidOutlineGeometry.js
+++ b/packages/engine/Source/Core/EllipsoidOutlineGeometry.js
@@ -31,11 +31,9 @@ const sin = Math.sin;
* @param {number} [options.stackPartitions] The count of stacks for the ellipsoid (1 greater than the number of parallel lines).
* @param {number} [options.slicePartitions] The count of slices for the ellipsoid (Equal to the number of radial lines).
* @param {number} [options.subdivisions=128] The number of points per line, determining the granularity of the curvature.
- *
* @throws {DeveloperError} options.stackPartitions must be greater than or equal to one.
* @throws {DeveloperError} options.slicePartitions must be greater than or equal to zero.
* @throws {DeveloperError} options.subdivisions must be greater than or equal to zero.
- *
* @example
* const ellipsoid = new Cesium.EllipsoidOutlineGeometry({
* radii : new Cesium.Cartesian3(1000000.0, 500000.0, 500000.0),
diff --git a/packages/engine/Source/Core/HeightmapTerrainData.js b/packages/engine/Source/Core/HeightmapTerrainData.js
index 724863c7b060..725451e3a855 100644
--- a/packages/engine/Source/Core/HeightmapTerrainData.js
+++ b/packages/engine/Source/Core/HeightmapTerrainData.js
@@ -72,8 +72,6 @@ import TerrainProvider from "./TerrainProvider.js";
* @param {HeightmapEncoding} [options.encoding] The encoding that is used on the buffer.
* @param {boolean} [options.createdByUpsampling=false] True if this instance was created by upsampling another instance;
* otherwise, false.
- *
- *
* @example
* const buffer = ...
* const heightBuffer = new Uint16Array(buffer, 0, that._heightmapWidth * that._heightmapWidth);
@@ -86,7 +84,6 @@ import TerrainProvider from "./TerrainProvider.js";
* childTileMask : childTileMask,
* waterMask : waterMask
* });
- *
* @see TerrainData
* @see QuantizedMeshTerrainData
* @see GoogleEarthEnterpriseTerrainData
diff --git a/packages/engine/Source/Core/Matrix3.js b/packages/engine/Source/Core/Matrix3.js
index 082a9dc4b17f..0b3d563a8dc1 100644
--- a/packages/engine/Source/Core/Matrix3.js
+++ b/packages/engine/Source/Core/Matrix3.js
@@ -20,7 +20,6 @@ import CesiumMath from "./Math.js";
* @param {number} [column0Row2] The value for column 0, row 2.
* @param {number} [column1Row2] The value for column 1, row 2.
* @param {number} [column2Row2=0.0] The value for column 2, row 2.
- *
* @see Matrix3.fromArray
* @see Matrix3.fromColumnMajorArray
* @see Matrix3.fromRowMajorArray
diff --git a/packages/engine/Source/Core/Matrix4.js b/packages/engine/Source/Core/Matrix4.js
index a6052a47cbe2..7d520e5d525e 100644
--- a/packages/engine/Source/Core/Matrix4.js
+++ b/packages/engine/Source/Core/Matrix4.js
@@ -30,7 +30,6 @@ import RuntimeError from "./RuntimeError.js";
* @param {number} [column1Row3=0.0] The value for column 1, row 3.
* @param {number} [column2Row3=0.0] The value for column 2, row 3.
* @param {number} [column3Row3=0.0] The value for column 3, row 3.
- *
* @see Matrix4.fromArray
* @see Matrix4.fromColumnMajorArray
* @see Matrix4.fromRowMajorArray
diff --git a/packages/engine/Source/Core/PolygonGeometry.js b/packages/engine/Source/Core/PolygonGeometry.js
index b7dd6d59b48f..8eaed1986de9 100644
--- a/packages/engine/Source/Core/PolygonGeometry.js
+++ b/packages/engine/Source/Core/PolygonGeometry.js
@@ -590,12 +590,9 @@ function createGeometryFromPositionsExtruded(
* @param {boolean} [options.closeBottom] When false, leaves off the bottom of an extruded polygon open.
* @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polygon edges must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
* @param {PolygonHierarchy} [options.textureCoordinates] Texture coordinates as a {@link PolygonHierarchy} of {@link Cartesian2} points. Has no effect for ground primitives.
- *
* @see PolygonGeometry#createGeometry
* @see PolygonGeometry#fromPositions
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Polygon.html|Cesium Sandcastle Polygon Demo}
- *
* @example
* // 1. create a polygon from points
* const polygon = new Cesium.PolygonGeometry({
@@ -776,7 +773,6 @@ function PolygonGeometry(options) {
* ])
* });
* const geometry = Cesium.PolygonGeometry.createGeometry(polygon);
- *
* @see PolygonGeometry#createGeometry
*/
PolygonGeometry.fromPositions = function (options) {
diff --git a/packages/engine/Source/Core/PolylineGeometry.js b/packages/engine/Source/Core/PolylineGeometry.js
index fb3bef259177..f6688e086080 100644
--- a/packages/engine/Source/Core/PolylineGeometry.js
+++ b/packages/engine/Source/Core/PolylineGeometry.js
@@ -77,11 +77,8 @@ function interpolateColors(p0, p1, color0, color1, numPoints) {
* @throws {DeveloperError} At least two positions are required.
* @throws {DeveloperError} width must be greater than or equal to one.
* @throws {DeveloperError} colors has an invalid length.
- *
* @see PolylineGeometry#createGeometry
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Polyline.html|Cesium Sandcastle Polyline Demo}
- *
* @example
* // A polyline with two connected line segments
* const polyline = new Cesium.PolylineGeometry({
diff --git a/packages/engine/Source/Core/RectangleGeometry.js b/packages/engine/Source/Core/RectangleGeometry.js
index e89510cc7484..a6fd585b3f03 100644
--- a/packages/engine/Source/Core/RectangleGeometry.js
+++ b/packages/engine/Source/Core/RectangleGeometry.js
@@ -987,11 +987,8 @@ function computeRectangle(rectangle, granularity, rotation, ellipsoid, result) {
* @throws {DeveloperError} options.rectangle.east
must be in the interval [-Pi
, Pi
].
* @throws {DeveloperError} options.rectangle.west
must be in the interval [-Pi
, Pi
].
* @throws {DeveloperError} options.rectangle.north
must be greater than options.rectangle.south
.
- *
* @see RectangleGeometry#createGeometry
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Rectangle.html|Cesium Sandcastle Rectangle Demo}
- *
* @example
* // 1. create a rectangle
* const rectangle = new Cesium.RectangleGeometry({
diff --git a/packages/engine/Source/Core/RectangleOutlineGeometry.js b/packages/engine/Source/Core/RectangleOutlineGeometry.js
index 2211f63480ac..fbdf9ee2cabb 100644
--- a/packages/engine/Source/Core/RectangleOutlineGeometry.js
+++ b/packages/engine/Source/Core/RectangleOutlineGeometry.js
@@ -255,9 +255,7 @@ function constructExtrudedRectangle(rectangleGeometry, computedOptions) {
* @throws {DeveloperError} options.rectangle.east
must be in the interval [-Pi
, Pi
].
* @throws {DeveloperError} options.rectangle.west
must be in the interval [-Pi
, Pi
].
* @throws {DeveloperError} options.rectangle.north
must be greater than rectangle.south
.
- *
* @see RectangleOutlineGeometry#createGeometry
- *
* @example
* const rectangle = new Cesium.RectangleOutlineGeometry({
* ellipsoid : Cesium.Ellipsoid.WGS84,
diff --git a/packages/engine/Source/Core/SimplePolylineGeometry.js b/packages/engine/Source/Core/SimplePolylineGeometry.js
index dbfcb8eebc3f..47779992fd8b 100644
--- a/packages/engine/Source/Core/SimplePolylineGeometry.js
+++ b/packages/engine/Source/Core/SimplePolylineGeometry.js
@@ -70,7 +70,6 @@ function interpolateColors(p0, p1, color0, color1, minDistance, array, offset) {
* @throws {DeveloperError} At least two positions are required.
* @throws {DeveloperError} colors has an invalid length.
* @see SimplePolylineGeometry#createGeometry
- *
* @example
* // A polyline with two connected line segments
* const polyline = new Cesium.SimplePolylineGeometry({
diff --git a/packages/engine/Source/Core/SphereGeometry.js b/packages/engine/Source/Core/SphereGeometry.js
index 9ea5bbe79440..e49576082797 100644
--- a/packages/engine/Source/Core/SphereGeometry.js
+++ b/packages/engine/Source/Core/SphereGeometry.js
@@ -17,7 +17,6 @@ import VertexFormat from "./VertexFormat.js";
* @throws {DeveloperError} options.slicePartitions cannot be less than three.
* @throws {DeveloperError} options.stackPartitions cannot be less than three.
* @see SphereGeometry#createGeometry
- *
* @example
* const sphere = new Cesium.SphereGeometry({
* radius : 100.0,
diff --git a/packages/engine/Source/Core/SphereOutlineGeometry.js b/packages/engine/Source/Core/SphereOutlineGeometry.js
index 7018885fad84..9641d05d191f 100644
--- a/packages/engine/Source/Core/SphereOutlineGeometry.js
+++ b/packages/engine/Source/Core/SphereOutlineGeometry.js
@@ -16,7 +16,6 @@ import EllipsoidOutlineGeometry from "./EllipsoidOutlineGeometry.js";
* @throws {DeveloperError} options.stackPartitions must be greater than or equal to one.
* @throws {DeveloperError} options.slicePartitions must be greater than or equal to zero.
* @throws {DeveloperError} options.subdivisions must be greater than or equal to zero.
- *
* @example
* const sphere = new Cesium.SphereOutlineGeometry({
* radius : 100.0,
diff --git a/packages/engine/Source/Core/WallGeometry.js b/packages/engine/Source/Core/WallGeometry.js
index 7f78cd56b556..db53e19cb35b 100644
--- a/packages/engine/Source/Core/WallGeometry.js
+++ b/packages/engine/Source/Core/WallGeometry.js
@@ -41,9 +41,7 @@ const scratchNormal = new Cartesian3();
* @throws {DeveloperError} positions and minimumHeights must have the same length.
* @see WallGeometry#createGeometry
* @see WallGeometry#fromConstantHeight
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Wall.html|Cesium Sandcastle Wall Demo}
- *
* @example
* // create a wall that spans from ground level to 10000 meters
* const wall = new Cesium.WallGeometry({
diff --git a/packages/engine/Source/Core/loadKTX2.js b/packages/engine/Source/Core/loadKTX2.js
index 27ae392a6a81..fb88474b7ae5 100644
--- a/packages/engine/Source/Core/loadKTX2.js
+++ b/packages/engine/Source/Core/loadKTX2.js
@@ -68,7 +68,6 @@ loadKTX2.setKTX2SupportedFormats = function (
* }).catch(function (error) {
* // an error occurred.
* });
- *
* @see {@link https://github.com/KhronosGroup/KTX-Specification|KTX file format}
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
diff --git a/packages/engine/Source/Renderer/CubeMapFace.js b/packages/engine/Source/Renderer/CubeMapFace.js
index f82a4bcdcd54..38ce2b281252 100644
--- a/packages/engine/Source/Renderer/CubeMapFace.js
+++ b/packages/engine/Source/Renderer/CubeMapFace.js
@@ -293,7 +293,6 @@ CubeMapFace.prototype.copyFrom = function (options) {
* @throws {DeveloperError} xOffset + source.width must be less than or equal to width.
* @throws {DeveloperError} yOffset + source.height must be less than or equal to height.
* @throws {DeveloperError} This CubeMap was destroyed, i.e., destroy() was called.
- *
* @example
* // Copy the framebuffer contents to the +x cube map face.
* cubeMap.positiveX.copyFromFramebuffer();
diff --git a/packages/engine/Source/Renderer/Framebuffer.js b/packages/engine/Source/Renderer/Framebuffer.js
index c07bab96575a..68d76f74e205 100644
--- a/packages/engine/Source/Renderer/Framebuffer.js
+++ b/packages/engine/Source/Renderer/Framebuffer.js
@@ -45,7 +45,6 @@ function attachRenderbuffer(framebuffer, attachment, renderbuffer) {
* @throws {DeveloperError} The number of color attachments exceeds the number supported.
* @throws {DeveloperError} The color-texture pixel datatype is HALF_FLOAT and the WebGL implementation does not support the EXT_color_buffer_half_float extension.
* @throws {DeveloperError} The color-texture pixel datatype is FLOAT and the WebGL implementation does not support the EXT_color_buffer_float or WEBGL_color_buffer_float extensions.
- *
* @example
* // Create a framebuffer with color and depth texture attachments.
* const width = context.canvas.clientWidth;
@@ -66,7 +65,6 @@ function attachRenderbuffer(framebuffer, attachment, renderbuffer) {
* pixelDatatype : PixelDatatype.UNSIGNED_SHORT
* })
* });
- *
* @private
* @class
*/
diff --git a/packages/engine/Source/Renderer/FramebufferManager.js b/packages/engine/Source/Renderer/FramebufferManager.js
index a9f41c098a25..371a53f13278 100644
--- a/packages/engine/Source/Renderer/FramebufferManager.js
+++ b/packages/engine/Source/Renderer/FramebufferManager.js
@@ -25,7 +25,6 @@ import PixelFormat from "../Core/PixelFormat.js";
* @param {PixelFormat} [options.pixelFormat=undefined] The default pixel format to use when creating color attachments.
* @throws {DeveloperError} Must enable at least one type of framebuffer attachment.
* @throws {DeveloperError} Cannot have both a depth and depth-stencil attachment.
- *
* @private
* @class
*/
diff --git a/packages/engine/Source/Renderer/RenderState.js b/packages/engine/Source/Renderer/RenderState.js
index c21cc71d2fc9..103dcbccb088 100644
--- a/packages/engine/Source/Renderer/RenderState.js
+++ b/packages/engine/Source/Renderer/RenderState.js
@@ -400,8 +400,6 @@ let renderStateCache = {};
* @throws {DeveloperError} renderState.viewport.width must be less than or equal to the maximum viewport width.
* @throws {DeveloperError} renderState.viewport.height must be greater than or equal to zero.
* @throws {DeveloperError} renderState.viewport.height must be less than or equal to the maximum viewport height.
- *
- *
* @example
* const defaults = {
* frontFace : WindingOrder.COUNTER_CLOCKWISE,
@@ -480,10 +478,8 @@ let renderStateCache = {};
* };
*
* const rs = RenderState.fromCache(defaults);
- *
* @see DrawCommand
* @see ClearCommand
- *
* @private
*/
RenderState.fromCache = function (renderState) {
diff --git a/packages/engine/Source/Renderer/Texture.js b/packages/engine/Source/Renderer/Texture.js
index f73e26a4a6e7..11f167dce4d8 100644
--- a/packages/engine/Source/Renderer/Texture.js
+++ b/packages/engine/Source/Renderer/Texture.js
@@ -428,16 +428,12 @@ Texture.create = function (options) {
* @throws {DeveloperError} framebufferYOffset must be greater than or equal to zero.
* @throws {DeveloperError} framebufferXOffset + width must be less than or equal to canvas.clientWidth.
* @throws {DeveloperError} framebufferYOffset + height must be less than or equal to canvas.clientHeight.
- *
- *
* @example
* // Create a texture with the contents of the framebuffer.
* const t = Texture.fromFramebuffer({
* context : context
* });
- *
* @see Sampler
- *
* @private
*/
Texture.fromFramebuffer = function (options) {
@@ -661,7 +657,6 @@ Object.defineProperties(Texture.prototype, {
* @throws {DeveloperError} xOffset + source.width must be less than or equal to width.
* @throws {DeveloperError} yOffset + source.height must be less than or equal to height.
* @throws {DeveloperError} This texture was destroyed, i.e., destroy() was called.
- *
* @example
* texture.copyFrom({
* source: {
diff --git a/packages/engine/Source/Renderer/VertexArray.js b/packages/engine/Source/Renderer/VertexArray.js
index bbf95af8792c..0f7e3007b5e5 100644
--- a/packages/engine/Source/Renderer/VertexArray.js
+++ b/packages/engine/Source/Renderer/VertexArray.js
@@ -212,7 +212,6 @@ function bind(gl, attributes, indexBuffer) {
* context : context,
* attributes : attributes
* });
- *
* @example
* // Example 2. Create a vertex array with vertices from two different vertex buffers.
* // Each vertex has a three-component position and three-component normal.
@@ -244,7 +243,6 @@ function bind(gl, attributes, indexBuffer) {
* context : context,
* attributes : attributes
* });
- *
* @example
* // Example 3. Creates the same vertex layout as Example 2 using a single
* // vertex buffer, instead of two.
@@ -274,11 +272,9 @@ function bind(gl, attributes, indexBuffer) {
* context : context,
* attributes : attributes
* });
- *
* @see Buffer#createVertexBuffer
* @see Buffer#createIndexBuffer
* @see Context#draw
- *
* @private
*/
function VertexArray(options) {
diff --git a/packages/engine/Source/Scene/ClassificationPrimitive.js b/packages/engine/Source/Scene/ClassificationPrimitive.js
index b3d90e275065..a879e21b4d70 100644
--- a/packages/engine/Source/Scene/ClassificationPrimitive.js
+++ b/packages/engine/Source/Scene/ClassificationPrimitive.js
@@ -61,7 +61,6 @@ import StencilOperation from "./StencilOperation.js";
* @param {boolean} [options.debugShowBoundingVolume=false] For debugging only. Determines if this primitive's commands' bounding spheres are shown.
* @param {boolean} [options.debugShowShadowVolume=false] For debugging only. Determines if the shadow volume for each geometry in the primitive is drawn. Must be true
on
* creation for the volumes to be created before the geometry is released or options.releaseGeometryInstance must be false
.
- *
* @see Primitive
* @see GroundPrimitive
* @see GeometryInstance
diff --git a/packages/engine/Source/Scene/GroundPolylinePrimitive.js b/packages/engine/Source/Scene/GroundPolylinePrimitive.js
index b67d2df45373..6248955b7ec4 100644
--- a/packages/engine/Source/Scene/GroundPolylinePrimitive.js
+++ b/packages/engine/Source/Scene/GroundPolylinePrimitive.js
@@ -45,7 +45,6 @@ import StencilOperation from "./StencilOperation.js";
* @param {ClassificationType} [options.classificationType] Determines whether terrain, 3D Tiles or both will be classified.
* @param {boolean} [options.debugShowBoundingVolume] For debugging only. Determines if this primitive's commands' bounding spheres are shown.
* @param {boolean} [options.debugShowShadowVolume] For debugging only. Determines if the shadow volume for each geometry in the primitive is drawn. Must be true
on creation to have effect.
- *
* @example
* // 1. Draw a polyline on terrain with a basic color material
*
diff --git a/packages/engine/Source/Scene/GroundPrimitive.js b/packages/engine/Source/Scene/GroundPrimitive.js
index 300622aed04d..a552e249f230 100644
--- a/packages/engine/Source/Scene/GroundPrimitive.js
+++ b/packages/engine/Source/Scene/GroundPrimitive.js
@@ -62,7 +62,6 @@ const GroundPrimitiveUniformMap = {
* @param {boolean} [options.debugShowBoundingVolume=false] For debugging only. Determines if this primitive's commands' bounding spheres are shown.
* @param {boolean} [options.debugShowShadowVolume=false] For debugging only. Determines if the shadow volume for each geometry in the primitive is drawn. Must be true
on
* creation for the volumes to be created before the geometry is released or options.releaseGeometryInstance must be false
.
- *
* @example
* // Example 1: Create primitive with a single instance
* const rectangleInstance = new Cesium.GeometryInstance({
@@ -103,7 +102,6 @@ const GroundPrimitiveUniformMap = {
* scene.primitives.add(new Cesium.GroundPrimitive({
* geometryInstances : [rectangleInstance, ellipseInstance]
* }));
- *
* @see Primitive
* @see ClassificationPrimitive
* @see GeometryInstance
diff --git a/packages/engine/Source/Scene/Material.js b/packages/engine/Source/Scene/Material.js
index ed77d2e7bbbe..557e7f5cef46 100644
--- a/packages/engine/Source/Scene/Material.js
+++ b/packages/engine/Source/Scene/Material.js
@@ -240,11 +240,8 @@ import WaterMaterial from "../Shaders/Materials/Water.js";
* @throws {DeveloperError} strict: shader source does not use string.
* @throws {DeveloperError} strict: shader source does not use uniform.
* @throws {DeveloperError} strict: shader source does not use material.
- *
* @see {@link https://github.com/CesiumGS/cesium/wiki/Fabric|Fabric wiki page} for a more detailed options of Fabric.
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Materials.html|Cesium Sandcastle Materials Demo}
- *
* @example
* // Create a color material with fromType:
* polygon.material = Cesium.Material.fromType('Color');
diff --git a/packages/engine/Source/Scene/MaterialAppearance.js b/packages/engine/Source/Scene/MaterialAppearance.js
index c9e5555e4656..434226d5c682 100644
--- a/packages/engine/Source/Scene/MaterialAppearance.js
+++ b/packages/engine/Source/Scene/MaterialAppearance.js
@@ -27,7 +27,6 @@ import Material from "./Material.js";
* @param {object} [options.renderState] Optional render state to override the default render state.
* @see {@link https://github.com/CesiumGS/cesium/wiki/Fabric|Fabric}
* @demo {@link https://sandcastle.cesium.com/index.html?src=Materials.html|Cesium Sandcastle Material Appearance Demo}
- *
* @example
* const primitive = new Cesium.Primitive({
* geometryInstances : new Cesium.GeometryInstance({
diff --git a/packages/engine/Source/Scene/Model/Model.js b/packages/engine/Source/Scene/Model/Model.js
index 328b98816d5b..0061f9ff622b 100644
--- a/packages/engine/Source/Scene/Model/Model.js
+++ b/packages/engine/Source/Scene/Model/Model.js
@@ -2624,11 +2624,9 @@ Model.prototype.destroyModelResources = function () {
* @param {ClassificationType} [options.classificationType] Determines whether terrain, 3D Tiles or both will be classified by this model. This cannot be set after the model has loaded.
* @param {Model.GltfCallback} [options.gltfCallback] A function that is called with the loaded gltf object once loaded.
* @returns {Promise} A promise that resolves to the created model when it is ready to render.
- *
* @throws {RuntimeError} The model failed to load.
* @throws {RuntimeError} Unsupported glTF version.
* @throws {RuntimeError} Unsupported glTF Extension
- *
* @example
* // Load a model and add it to the scene
* try {
@@ -2639,7 +2637,6 @@ Model.prototype.destroyModelResources = function () {
* } catch (error) {
* console.log(`Failed to load model. ${error}`);
* }
- *
* @example
* // Position a model with modelMatrix and display it with a minimum size of 128 pixels
* const position = Cesium.Cartesian3.fromDegrees(
@@ -2667,7 +2664,6 @@ Model.prototype.destroyModelResources = function () {
* } catch (error) {
* console.log(`Failed to load model. ${error}`);
* }
- *
* @example
* // Load a model and play the last animation at half speed
* let animations;
diff --git a/packages/engine/Source/Scene/Model/ModelAnimationCollection.js b/packages/engine/Source/Scene/Model/ModelAnimationCollection.js
index 8b84f1860334..e19b216b7439 100644
--- a/packages/engine/Source/Scene/Model/ModelAnimationCollection.js
+++ b/packages/engine/Source/Scene/Model/ModelAnimationCollection.js
@@ -116,19 +116,16 @@ function addAnimation(collection, animation, options) {
* @throws {DeveloperError} options.index must be a valid animation index.
* @throws {DeveloperError} Either options.name or options.index must be defined.
* @throws {DeveloperError} options.multiplier must be greater than zero.
- *
* @example
* // Example 1. Add an animation by name
* model.activeAnimations.add({
* name : 'animation name'
* });
- *
* @example
* // Example 2. Add an animation by index
* model.activeAnimations.add({
* index : 0
* });
- *
* @example
* // Example 3. Add an animation and provide all properties and events
* const startTime = Cesium.JulianDate.now();
diff --git a/packages/engine/Source/Scene/PostProcessStage.js b/packages/engine/Source/Scene/PostProcessStage.js
index f4b5a226489c..3c1b7c6393ff 100644
--- a/packages/engine/Source/Scene/PostProcessStage.js
+++ b/packages/engine/Source/Scene/PostProcessStage.js
@@ -38,9 +38,7 @@ import PostProcessStageSampleMode from "./PostProcessStageSampleMode.js";
* @throws {DeveloperError} options.textureScale must be greater than 0.0 and less than or equal to 1.0.
* @throws {DeveloperError} options.pixelFormat must be a color format.
* @throws {DeveloperError} When options.pixelDatatype is FLOAT, this WebGL implementation must support floating point textures. Check context.floatingPointTexture.
- *
* @see PostProcessStageComposite
- *
* @example
* // Simple stage to change the color
* const fs =`
@@ -61,7 +59,6 @@ import PostProcessStageSampleMode from "./PostProcessStageSampleMode.js";
* }
* }
* }));
- *
* @example
* // Simple stage to change the color of what is selected.
* // If czm_selected returns true, the current fragment belongs to geometry in the selected array.
diff --git a/packages/engine/Source/Scene/Primitive.js b/packages/engine/Source/Scene/Primitive.js
index 8708165fb085..59fdb907c893 100644
--- a/packages/engine/Source/Scene/Primitive.js
+++ b/packages/engine/Source/Scene/Primitive.js
@@ -76,7 +76,6 @@ import ShadowMode from "./ShadowMode.js";
* @param {boolean} [options.asynchronous=true] Determines if the primitive will be created asynchronously or block until ready.
* @param {boolean} [options.debugShowBoundingVolume=false] For debugging only. Determines if this primitive's commands' bounding spheres are shown.
* @param {ShadowMode} [options.shadows=ShadowMode.DISABLED] Determines whether this primitive casts or receives shadows from light sources.
- *
* @example
* // 1. Draw a translucent ellipse on the surface with a checkerboard pattern
* const instance = new Cesium.GeometryInstance({
@@ -95,7 +94,6 @@ import ShadowMode from "./ShadowMode.js";
* material : Cesium.Material.fromType('Checkerboard')
* })
* }));
- *
* @example
* // 2. Draw different instances each with a unique color
* const rectangleInstance = new Cesium.GeometryInstance({
@@ -124,7 +122,6 @@ import ShadowMode from "./ShadowMode.js";
* geometryInstances : [rectangleInstance, ellipsoidInstance],
* appearance : new Cesium.PerInstanceColorAppearance()
* }));
- *
* @example
* // 3. Create the geometry on the main thread.
* scene.primitives.add(new Cesium.Primitive({
@@ -143,7 +140,6 @@ import ShadowMode from "./ShadowMode.js";
* appearance : new Cesium.PerInstanceColorAppearance(),
* asynchronous : false
* }));
- *
* @see GeometryInstance
* @see Appearance
* @see ClassificationPrimitive
diff --git a/packages/engine/Source/Scene/Scene.js b/packages/engine/Source/Scene/Scene.js
index 96021e07d0ce..638acd72049b 100644
--- a/packages/engine/Source/Scene/Scene.js
+++ b/packages/engine/Source/Scene/Scene.js
@@ -103,12 +103,9 @@ const requestRenderAfterFrame = function (scene) {
* @param {number} [options.maximumRenderTimeChange] If requestRenderMode is true, this value defines the maximum change in simulation time allowed before a render is requested. See {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}.
* @param {number} [options.depthPlaneEllipsoidOffset] Adjust the DepthPlane to address rendering artefacts below ellipsoid zero elevation.
* @param {number} [options.msaaSamples=1] If provided, this value controls the rate of multisample antialiasing. Typical multisampling rates are 2, 4, and sometimes 8 samples per pixel. Higher sampling rates of MSAA may impact performance in exchange for improved visual quality. This value only applies to WebGL2 contexts that support multisample render targets.
- *
* @see CesiumWidget
* @see {@link http://www.khronos.org/registry/webgl/specs/latest/#5.2|WebGLContextAttributes}
- *
* @throws {DeveloperError} options and options.canvas are required.
- *
* @example
* // Create scene without anisotropic texture filtering
* const scene = new Cesium.Scene({
diff --git a/packages/engine/Source/Widget/CesiumWidget.js b/packages/engine/Source/Widget/CesiumWidget.js
index c2c4546377e1..5778280eb2bd 100644
--- a/packages/engine/Source/Widget/CesiumWidget.js
+++ b/packages/engine/Source/Widget/CesiumWidget.js
@@ -146,11 +146,8 @@ function configureCameraFrustum(widget) {
* @param {boolean} [options.requestRenderMode=false] If true, rendering a frame will only occur when needed as determined by changes within the scene. Enabling improves performance of the application, but requires using {@link Scene#requestRender} to render a new frame explicitly in this mode. This will be necessary in many cases after making changes to the scene in other parts of the API. See {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}.
* @param {number} [options.maximumRenderTimeChange=0.0] If requestRenderMode is true, this value defines the maximum change in simulation time allowed before a render is requested. See {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}.
* @param {number} [options.msaaSamples=1] If provided, this value controls the rate of multisample antialiasing. Typical multisampling rates are 2, 4, and sometimes 8 samples per pixel. Higher sampling rates of MSAA may impact performance in exchange for improved visual quality. This value only applies to WebGL2 contexts that support multisample render targets.
- *
* @throws {DeveloperError} Element with id "container" does not exist in the document.
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Cesium%20Widget.html|Cesium Sandcastle Cesium Widget Demo}
- *
* @example
* // For each example, include a link to CesiumWidget.css stylesheet in HTML head,
* // and in the body, include:
diff --git a/packages/widgets/Source/Viewer/viewerDragDropMixin.js b/packages/widgets/Source/Viewer/viewerDragDropMixin.js
index a14946e8911d..497647d7993b 100644
--- a/packages/widgets/Source/Viewer/viewerDragDropMixin.js
+++ b/packages/widgets/Source/Viewer/viewerDragDropMixin.js
@@ -27,7 +27,6 @@ import {
* @throws {DeveloperError} dropEnabled is already defined by another mixin.
* @throws {DeveloperError} dropError is already defined by another mixin.
* @throws {DeveloperError} clearOnDrop is already defined by another mixin.
- *
* @example
* // Add basic drag and drop support and pop up an alert window on error.
* const viewer = new Cesium.Viewer('cesiumContainer');
From 51313c7ef263819cac808f544d9aaa811766145e Mon Sep 17 00:00:00 2001
From: ggetz
Date: Tue, 4 Jun 2024 14:26:47 -0400
Subject: [PATCH 6/9] Add notes
---
eslint.config.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eslint.config.js b/eslint.config.js
index 163f5ded3ec9..7dea932e64da 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -65,6 +65,8 @@ export default [
],
"jsdoc/require-jsdoc": "off", // Only lint existing jsdoc
"jsdoc/no-undefined-types": "off", // Ignore types for now
+ "jsdoc/valid-types": "off", // Our link tags are structured differently
+ "jsdoc/no-defaults": "off", // We use default parameters instead of enforcing with ES6 for now
"jsdoc/require-returns": "off",
"jsdoc/require-returns-description": "off",
"jsdoc/require-returns-type": "off",
@@ -76,8 +78,6 @@ export default [
"jsdoc/check-param-names": "off",
"jsdoc/check-property-names": "off",
"jsdoc/check-types": "off",
- "jsdoc/valid-types": "off",
- "jsdoc/no-defaults": "off", // We use default parameters instead of enforcing with ES6 for now
},
},
{
From cbb20f1f71c018d8780dec51bf3c88982e356fd5 Mon Sep 17 00:00:00 2001
From: ggetz
Date: Tue, 4 Jun 2024 14:32:05 -0400
Subject: [PATCH 7/9] Reset changes
---
.../Source/Core/ApproximateTerrainHeights.js | 10 +-
.../ArcGISTiledElevationTerrainProvider.js | 28 +-
packages/engine/Source/Core/ArcType.js | 4 +
.../Source/Core/ArticulationStageType.js | 2 +
.../engine/Source/Core/AssociativeArray.js | 8 +-
.../Source/Core/AttributeCompression.js | 52 ++-
.../Source/Core/AxisAlignedBoundingBox.js | 18 +-
.../Source/Core/BingMapsGeocoderService.js | 4 +-
.../engine/Source/Core/BoundingRectangle.js | 31 +-
packages/engine/Source/Core/BoundingSphere.js | 70 +++-
packages/engine/Source/Core/BoxGeometry.js | 32 +-
.../engine/Source/Core/BoxOutlineGeometry.js | 26 +-
packages/engine/Source/Core/Cartesian2.js | 69 +++-
packages/engine/Source/Core/Cartesian3.js | 101 ++++-
packages/engine/Source/Core/Cartesian4.js | 74 +++-
packages/engine/Source/Core/Cartographic.js | 34 +-
.../Core/CartographicGeocoderService.js | 4 +-
.../engine/Source/Core/CatmullRomSpline.js | 34 +-
.../Source/Core/CesiumTerrainProvider.js | 53 ++-
packages/engine/Source/Core/Check.js | 36 +-
packages/engine/Source/Core/CircleGeometry.js | 34 +-
.../Source/Core/CircleOutlineGeometry.js | 29 +-
packages/engine/Source/Core/Clock.js | 21 +-
packages/engine/Source/Core/ClockRange.js | 5 +
packages/engine/Source/Core/ClockStep.js | 5 +
packages/engine/Source/Core/Color.js | 257 ++++++++++--
.../Core/ColorGeometryInstanceAttribute.js | 32 +-
.../engine/Source/Core/ComponentDatatype.js | 39 +-
.../Source/Core/CompressedTextureBuffer.js | 9 +-
packages/engine/Source/Core/ConstantSpline.js | 19 +-
.../Source/Core/CoplanarPolygonGeometry.js | 29 +-
.../Core/CoplanarPolygonOutlineGeometry.js | 15 +-
packages/engine/Source/Core/CornerType.js | 2 +
.../engine/Source/Core/CorridorGeometry.js | 34 +-
.../Source/Core/CorridorGeometryLibrary.js | 5 -
.../Source/Core/CorridorOutlineGeometry.js | 22 +-
packages/engine/Source/Core/Credit.js | 15 +-
.../engine/Source/Core/CubicRealPolynomial.js | 3 +
packages/engine/Source/Core/CullingVolume.js | 11 +-
.../Core/CustomHeightmapTerrainProvider.js | 11 +-
.../engine/Source/Core/CylinderGeometry.js | 22 +-
.../Source/Core/CylinderGeometryLibrary.js | 5 -
.../Source/Core/CylinderOutlineGeometry.js | 29 +-
packages/engine/Source/Core/DefaultProxy.js | 7 +-
packages/engine/Source/Core/DeveloperError.js | 7 +-
.../Source/Core/DistanceDisplayCondition.js | 28 +-
...splayConditionGeometryInstanceAttribute.js | 31 +-
.../Source/Core/DoubleEndedPriorityQueue.js | 18 +-
.../engine/Source/Core/DoublyLinkedList.js | 5 +-
.../Source/Core/EarthOrientationParameters.js | 16 +-
.../Core/EarthOrientationParametersSample.js | 5 +-
packages/engine/Source/Core/EasingFunction.js | 34 ++
.../engine/Source/Core/EllipseGeometry.js | 45 +-
.../Source/Core/EllipseGeometryLibrary.js | 6 -
.../Source/Core/EllipseOutlineGeometry.js | 31 +-
packages/engine/Source/Core/Ellipsoid.js | 68 +++-
.../engine/Source/Core/EllipsoidGeodesic.js | 12 +-
.../engine/Source/Core/EllipsoidGeometry.js | 36 +-
.../Source/Core/EllipsoidOutlineGeometry.js | 36 +-
.../engine/Source/Core/EllipsoidRhumbLine.js | 26 +-
.../Source/Core/EllipsoidTangentPlane.js | 19 +-
.../Source/Core/EllipsoidTerrainProvider.js | 10 +-
.../engine/Source/Core/EllipsoidalOccluder.js | 26 +-
.../engine/Source/Core/EncodedCartesian3.js | 15 +-
packages/engine/Source/Core/Event.js | 9 +-
packages/engine/Source/Core/EventHelper.js | 9 +-
.../engine/Source/Core/ExtrapolationType.js | 5 +
.../engine/Source/Core/FeatureDetection.js | 18 +
.../engine/Source/Core/FrustumGeometry.js | 14 +-
.../Source/Core/FrustumOutlineGeometry.js | 12 +-
packages/engine/Source/Core/Fullscreen.js | 5 +
packages/engine/Source/Core/GeocodeType.js | 2 +
.../engine/Source/Core/GeocoderService.js | 4 +-
.../Source/Core/GeographicProjection.js | 11 +-
.../Source/Core/GeographicTilingScheme.js | 18 +-
packages/engine/Source/Core/Geometry.js | 45 +-
.../engine/Source/Core/GeometryAttribute.js | 23 +-
.../engine/Source/Core/GeometryAttributes.js | 16 +-
.../engine/Source/Core/GeometryFactory.js | 4 +-
.../engine/Source/Core/GeometryInstance.js | 19 +-
.../Source/Core/GeometryInstanceAttribute.js | 23 +-
.../engine/Source/Core/GeometryPipeline.js | 92 ++++-
.../Core/GoogleEarthEnterpriseMetadata.js | 29 +-
.../Core/GoogleEarthEnterpriseTerrainData.js | 23 +-
.../GoogleEarthEnterpriseTerrainProvider.js | 20 +-
.../GoogleEarthEnterpriseTileInformation.js | 11 +
packages/engine/Source/Core/GoogleMaps.js | 4 +
packages/engine/Source/Core/GregorianDate.js | 4 +-
.../Source/Core/GroundPolylineGeometry.js | 29 +-
.../engine/Source/Core/HeadingPitchRange.js | 10 +-
.../engine/Source/Core/HeadingPitchRoll.js | 26 +-
packages/engine/Source/Core/Heap.js | 23 +-
.../engine/Source/Core/HeightmapEncoding.js | 4 +
.../Source/Core/HeightmapTerrainData.js | 40 +-
.../Source/Core/HeightmapTessellator.js | 23 +-
.../Core/HermitePolynomialApproximation.js | 11 +-
packages/engine/Source/Core/HermiteSpline.js | 66 ++-
packages/engine/Source/Core/HilbertOrder.js | 7 +-
.../engine/Source/Core/Iau2000Orientation.js | 5 +-
packages/engine/Source/Core/Iau2006XysData.js | 20 +-
.../engine/Source/Core/Iau2006XysSample.js | 5 +-
.../engine/Source/Core/IauOrientationAxes.js | 6 +-
.../Source/Core/IauOrientationParameters.js | 10 +-
packages/engine/Source/Core/IndexDatatype.js | 14 +
.../Source/Core/InterpolationAlgorithm.js | 5 +
.../engine/Source/Core/InterpolationType.js | 2 +
packages/engine/Source/Core/Intersect.js | 4 +
.../engine/Source/Core/IntersectionTests.js | 26 +-
.../engine/Source/Core/Intersections2D.js | 7 +
packages/engine/Source/Core/Interval.js | 7 +-
packages/engine/Source/Core/Ion.js | 3 +
.../engine/Source/Core/IonGeocoderService.js | 12 +-
packages/engine/Source/Core/IonResource.js | 21 +-
packages/engine/Source/Core/Iso8601.js | 5 +
packages/engine/Source/Core/JulianDate.js | 49 ++-
packages/engine/Source/Core/KTX2Transcoder.js | 1 +
.../Source/Core/KeyboardEventModifier.js | 4 +
.../Core/LagrangePolynomialApproximation.js | 3 +
packages/engine/Source/Core/LeapSecond.js | 3 +-
.../engine/Source/Core/LinearApproximation.js | 3 +
packages/engine/Source/Core/LinearSpline.js | 30 +-
packages/engine/Source/Core/ManagedArray.js | 16 +-
packages/engine/Source/Core/MapProjection.js | 10 +-
packages/engine/Source/Core/Math.js | 113 ++++--
packages/engine/Source/Core/Matrix2.js | 106 ++++-
packages/engine/Source/Core/Matrix3.js | 131 ++++--
packages/engine/Source/Core/Matrix4.js | 184 +++++++--
.../engine/Source/Core/MorphWeightSpline.js | 30 +-
packages/engine/Source/Core/MortonOrder.js | 50 ++-
packages/engine/Source/Core/NearFarScalar.js | 23 +-
packages/engine/Source/Core/Occluder.js | 29 +-
.../Core/OffsetGeometryInstanceAttribute.js | 25 +-
.../Source/Core/OpenCageGeocoderService.js | 5 +-
.../engine/Source/Core/OrientedBoundingBox.js | 52 ++-
.../engine/Source/Core/OrthographicFrustum.js | 32 +-
.../Core/OrthographicOffCenterFrustum.js | 25 +-
packages/engine/Source/Core/Packable.js | 4 +
.../Source/Core/PackableForInterpolation.js | 4 +
.../Source/Core/PeliasGeocoderService.js | 7 +-
.../engine/Source/Core/PerspectiveFrustum.js | 40 +-
.../Core/PerspectiveOffCenterFrustum.js | 29 +-
packages/engine/Source/Core/PinBuilder.js | 8 +-
packages/engine/Source/Core/PixelFormat.js | 56 ++-
packages/engine/Source/Core/Plane.js | 26 +-
packages/engine/Source/Core/PlaneGeometry.js | 15 +-
.../Source/Core/PlaneOutlineGeometry.js | 10 +-
.../engine/Source/Core/PolygonGeometry.js | 61 +--
.../Source/Core/PolygonGeometryLibrary.js | 6 +
.../engine/Source/Core/PolygonHierarchy.js | 3 +-
.../Source/Core/PolygonOutlineGeometry.js | 40 +-
.../engine/Source/Core/PolygonPipeline.js | 35 +-
.../engine/Source/Core/PolylineGeometry.js | 34 +-
.../engine/Source/Core/PolylinePipeline.js | 34 +-
.../Source/Core/PolylineVolumeGeometry.js | 23 +-
.../Core/PolylineVolumeOutlineGeometry.js | 20 +-
packages/engine/Source/Core/PrimitiveType.js | 11 +-
packages/engine/Source/Core/Proxy.js | 5 +-
.../Source/Core/QuadraticRealPolynomial.js | 3 +
.../Source/Core/QuantizedMeshTerrainData.js | 23 +-
.../Source/Core/QuarticRealPolynomial.js | 3 +
packages/engine/Source/Core/Quaternion.js | 75 +++-
.../engine/Source/Core/QuaternionSpline.js | 30 +-
packages/engine/Source/Core/Queue.js | 12 +-
packages/engine/Source/Core/Ray.js | 10 +-
packages/engine/Source/Core/Rectangle.js | 89 ++--
.../Source/Core/RectangleCollisionChecker.js | 3 +
.../engine/Source/Core/RectangleGeometry.js | 52 ++-
.../Source/Core/RectangleGeometryLibrary.js | 14 -
.../Source/Core/RectangleOutlineGeometry.js | 36 +-
packages/engine/Source/Core/ReferenceFrame.js | 3 +
packages/engine/Source/Core/Request.js | 33 +-
.../engine/Source/Core/RequestErrorEvent.js | 8 +-
.../engine/Source/Core/RequestScheduler.js | 24 +-
packages/engine/Source/Core/RequestState.js | 7 +
packages/engine/Source/Core/RequestType.js | 5 +
packages/engine/Source/Core/Resource.js | 233 ++++++++---
packages/engine/Source/Core/RuntimeError.js | 7 +-
packages/engine/Source/Core/S2Cell.js | 119 +++---
.../Source/Core/ScreenSpaceEventHandler.js | 31 +-
.../Source/Core/ScreenSpaceEventType.js | 16 +
.../Core/ShowGeometryInstanceAttribute.js | 22 +-
.../Core/Simon1994PlanetaryPositions.js | 3 +
.../Source/Core/SimplePolylineGeometry.js | 27 +-
packages/engine/Source/Core/SphereGeometry.js | 27 +-
.../Source/Core/SphereOutlineGeometry.js | 28 +-
packages/engine/Source/Core/Spherical.js | 21 +-
packages/engine/Source/Core/Spline.js | 23 +-
packages/engine/Source/Core/SteppedSpline.js | 29 +-
packages/engine/Source/Core/Stereographic.js | 7 +-
packages/engine/Source/Core/TaskProcessor.js | 18 +-
packages/engine/Source/Core/TerrainData.js | 11 +-
.../engine/Source/Core/TerrainEncoding.js | 13 +-
packages/engine/Source/Core/TerrainMesh.js | 7 +-
.../engine/Source/Core/TerrainProvider.js | 23 +-
.../engine/Source/Core/TerrainQuantization.js | 4 +
.../engine/Source/Core/TileAvailability.js | 26 +-
.../engine/Source/Core/TileProviderError.js | 8 +-
packages/engine/Source/Core/TilingScheme.js | 11 +-
packages/engine/Source/Core/TimeConstants.js | 3 +
packages/engine/Source/Core/TimeInterval.js | 37 +-
.../Source/Core/TimeIntervalCollection.js | 55 ++-
packages/engine/Source/Core/TimeStandard.js | 4 +
packages/engine/Source/Core/Tipsify.js | 21 +-
packages/engine/Source/Core/Transforms.js | 60 ++-
.../Source/Core/TranslationRotationScale.js | 10 +-
.../Source/Core/TridiagonalSystemSolver.js | 12 +-
packages/engine/Source/Core/TrustedServers.js | 10 +
.../Source/Core/VRTheWorldTerrainProvider.js | 24 +-
packages/engine/Source/Core/VertexFormat.js | 40 +-
.../Source/Core/VerticalExaggeration.js | 2 +
.../engine/Source/Core/VideoSynchronizer.js | 15 +-
packages/engine/Source/Core/Visibility.js | 4 +
.../engine/Source/Core/VulkanConstants.js | 1 +
packages/engine/Source/Core/WallGeometry.js | 36 +-
.../engine/Source/Core/WallGeometryLibrary.js | 6 -
.../engine/Source/Core/WallOutlineGeometry.js | 31 +-
packages/engine/Source/Core/WebGLConstants.js | 1 +
.../Source/Core/WebMercatorProjection.js | 16 +-
.../Source/Core/WebMercatorTilingScheme.js | 16 +-
packages/engine/Source/Core/WindingOrder.js | 4 +-
.../Source/Core/WireframeIndexGenerator.js | 10 +-
.../engine/Source/Core/appendForwardSlash.js | 1 -
.../Source/Core/arrayRemoveDuplicates.js | 8 +-
.../Source/Core/barycentricCoordinates.js | 3 +
packages/engine/Source/Core/binarySearch.js | 4 +
packages/engine/Source/Core/buildModuleUrl.js | 3 +
packages/engine/Source/Core/clone.js | 4 +-
packages/engine/Source/Core/combine.js | 5 +-
packages/engine/Source/Core/createGuid.js | 5 +
.../Source/Core/createWorldBathymetryAsync.js | 10 +-
.../Source/Core/createWorldTerrainAsync.js | 12 +-
.../Core/decodeGoogleEarthEnterpriseData.js | 2 +
packages/engine/Source/Core/defaultValue.js | 3 +
packages/engine/Source/Core/defer.js | 3 +
packages/engine/Source/Core/defined.js | 2 +
.../engine/Source/Core/deprecationWarning.js | 4 +
packages/engine/Source/Core/destroyObject.js | 5 +
packages/engine/Source/Core/formatError.js | 2 +
packages/engine/Source/Core/getAbsoluteUri.js | 2 +
packages/engine/Source/Core/getBaseUri.js | 4 +-
.../engine/Source/Core/getExtensionFromUri.js | 2 +
.../engine/Source/Core/getFilenameFromUri.js | 2 +
.../Source/Core/getImageFromTypedArray.js | 2 +
packages/engine/Source/Core/getImagePixels.js | 2 +
.../Source/Core/getJsonFromTypedArray.js | 5 +-
packages/engine/Source/Core/getMagic.js | 2 -
.../Source/Core/getStringFromTypedArray.js | 5 +-
packages/engine/Source/Core/getTimestamp.js | 2 +
packages/engine/Source/Core/isBitSet.js | 2 -
packages/engine/Source/Core/isBlobUri.js | 3 +
.../engine/Source/Core/isCrossOriginUrl.js | 2 +-
packages/engine/Source/Core/isDataUri.js | 3 +
packages/engine/Source/Core/isLeapYear.js | 3 +
.../Source/Core/loadAndExecuteScript.js | 1 -
.../Source/Core/loadImageFromTypedArray.js | 1 -
packages/engine/Source/Core/loadKTX2.js | 28 +-
packages/engine/Source/Core/mergeSort.js | 4 +
packages/engine/Source/Core/objectToQuery.js | 4 +
packages/engine/Source/Core/oneTimeWarning.js | 6 +-
.../Source/Core/parseResponseHeaders.js | 3 +
.../engine/Source/Core/pointInsideTriangle.js | 3 +
packages/engine/Source/Core/queryToObject.js | 4 +
.../Core/resizeImageToNextPowerOfTwo.js | 2 +
packages/engine/Source/Core/sampleTerrain.js | 8 +-
.../Source/Core/sampleTerrainMostDetailed.js | 5 +-
.../Source/Core/scaleToGeodeticSurface.js | 3 +
packages/engine/Source/Core/srgbToLinear.js | 3 +
packages/engine/Source/Core/subdivideArray.js | 5 +-
packages/engine/Source/Core/wrapFunction.js | 4 +-
.../engine/Source/Core/writeTextToCanvas.js | 19 +-
.../Source/DataSources/BillboardGraphics.js | 9 +-
.../Source/DataSources/BillboardVisualizer.js | 6 +-
.../Source/DataSources/BoxGeometryUpdater.js | 14 +-
.../engine/Source/DataSources/BoxGraphics.js | 9 +-
.../Source/DataSources/CallbackProperty.js | 10 +-
.../DataSources/Cesium3DTilesetGraphics.js | 7 +-
.../DataSources/Cesium3DTilesetVisualizer.js | 10 +-
.../CheckerboardMaterialProperty.js | 14 +-
.../DataSources/ColorMaterialProperty.js | 11 +-
.../DataSources/CompositeEntityCollection.js | 34 +-
.../DataSources/CompositeMaterialProperty.js | 9 +-
.../DataSources/CompositePositionProperty.js | 13 +-
.../Source/DataSources/CompositeProperty.js | 11 +-
.../DataSources/ConstantPositionProperty.js | 14 +-
.../Source/DataSources/ConstantProperty.js | 12 +-
.../DataSources/CorridorGeometryUpdater.js | 14 +-
.../Source/DataSources/CorridorGraphics.js | 8 +-
.../Source/DataSources/CustomDataSource.js | 7 +-
.../DataSources/CylinderGeometryUpdater.js | 14 +-
.../Source/DataSources/CylinderGraphics.js | 8 +-
.../Source/DataSources/CzmlDataSource.js | 17 +-
.../engine/Source/DataSources/DataSource.js | 7 +-
.../Source/DataSources/DataSourceClock.js | 9 +-
.../DataSources/DataSourceCollection.js | 45 +-
.../Source/DataSources/DataSourceDisplay.js | 18 +-
.../DataSources/DynamicGeometryBatch.js | 2 -
.../DataSources/DynamicGeometryUpdater.js | 12 +-
.../DataSources/EllipseGeometryUpdater.js | 14 +-
.../Source/DataSources/EllipseGraphics.js | 9 +-
.../DataSources/EllipsoidGeometryUpdater.js | 18 +-
.../Source/DataSources/EllipsoidGraphics.js | 9 +-
packages/engine/Source/DataSources/Entity.js | 31 +-
.../Source/DataSources/EntityCluster.js | 29 +-
.../Source/DataSources/EntityCollection.js | 16 +-
.../engine/Source/DataSources/EntityView.js | 5 +-
.../Source/DataSources/GeoJsonDataSource.js | 15 +-
.../Source/DataSources/GeometryUpdater.js | 38 +-
.../Source/DataSources/GeometryUpdaterSet.js | 1 +
.../Source/DataSources/GeometryVisualizer.js | 17 +-
.../Source/DataSources/GpxDataSource.js | 10 +-
.../DataSources/GridMaterialProperty.js | 19 +-
.../DataSources/GroundGeometryUpdater.js | 13 +-
.../DataSources/ImageMaterialProperty.js | 14 +-
.../engine/Source/DataSources/KmlCamera.js | 3 +-
.../Source/DataSources/KmlDataSource.js | 23 +-
.../engine/Source/DataSources/KmlLookAt.js | 3 +-
packages/engine/Source/DataSources/KmlTour.js | 8 +-
.../engine/Source/DataSources/KmlTourFlyTo.js | 8 +-
.../engine/Source/DataSources/KmlTourWait.js | 7 +-
.../Source/DataSources/LabelGraphics.js | 9 +-
.../Source/DataSources/LabelVisualizer.js | 6 +-
.../Source/DataSources/MaterialProperty.js | 12 +-
.../Source/DataSources/ModelGraphics.js | 10 +-
.../Source/DataSources/ModelVisualizer.js | 10 +-
.../DataSources/NodeTransformationProperty.js | 13 +-
.../engine/Source/DataSources/PathGraphics.js | 7 +-
.../Source/DataSources/PathVisualizer.js | 5 +-
.../DataSources/PlaneGeometryUpdater.js | 14 +-
.../Source/DataSources/PlaneGraphics.js | 10 +-
.../Source/DataSources/PointGraphics.js | 8 +-
.../Source/DataSources/PointVisualizer.js | 6 +-
.../DataSources/PolygonGeometryUpdater.js | 14 +-
.../Source/DataSources/PolygonGraphics.js | 9 +-
.../PolylineArrowMaterialProperty.js | 11 +-
.../PolylineDashMaterialProperty.js | 14 +-
.../DataSources/PolylineGeometryUpdater.js | 38 +-
.../PolylineGlowMaterialProperty.js | 12 +-
.../Source/DataSources/PolylineGraphics.js | 9 +-
.../PolylineOutlineMaterialProperty.js | 14 +-
.../Source/DataSources/PolylineVisualizer.js | 14 +-
.../PolylineVolumeGeometryUpdater.js | 14 +-
.../DataSources/PolylineVolumeGraphics.js | 9 +-
.../Source/DataSources/PositionProperty.js | 14 +-
.../DataSources/PositionPropertyArray.js | 12 +-
.../engine/Source/DataSources/Property.js | 24 +-
.../Source/DataSources/PropertyArray.js | 13 +-
.../engine/Source/DataSources/PropertyBag.js | 20 +-
.../DataSources/RectangleGeometryUpdater.js | 14 +-
.../Source/DataSources/RectangleGraphics.js | 9 +-
.../Source/DataSources/ReferenceProperty.js | 13 +-
.../engine/Source/DataSources/Rotation.js | 21 +-
.../DataSources/SampledPositionProperty.js | 26 +-
.../Source/DataSources/SampledProperty.js | 23 +-
.../DataSources/ScaledPositionProperty.js | 1 -
.../DataSources/StaticGeometryColorBatch.js | 5 -
.../StaticGeometryPerMaterialBatch.js | 5 -
.../StaticGroundGeometryColorBatch.js | 2 -
.../StaticGroundGeometryPerMaterialBatch.js | 3 -
.../StaticGroundPolylinePerMaterialBatch.js | 3 -
.../DataSources/StaticOutlineGeometryBatch.js | 3 -
.../DataSources/StripeMaterialProperty.js | 18 +-
.../Source/DataSources/StripeOrientation.js | 1 +
.../DataSources/TerrainOffsetProperty.js | 9 +-
.../TimeIntervalCollectionPositionProperty.js | 11 +-
.../TimeIntervalCollectionProperty.js | 9 +-
.../VelocityOrientationProperty.js | 13 +-
.../DataSources/VelocityVectorProperty.js | 16 +-
.../engine/Source/DataSources/Visualizer.js | 7 +-
.../Source/DataSources/WallGeometryUpdater.js | 14 +-
.../engine/Source/DataSources/WallGraphics.js | 9 +-
.../createMaterialPropertyDescriptor.js | 2 -
.../DataSources/createPropertyDescriptor.js | 3 -
.../createRawPropertyDescriptor.js | 2 -
.../engine/Source/DataSources/exportKml.js | 16 +-
.../engine/Source/DataSources/getElement.js | 5 +-
.../Source/Renderer/AutomaticUniforms.js | 119 ++++++
packages/engine/Source/Renderer/Buffer.js | 29 +-
.../engine/Source/Renderer/ClearCommand.js | 21 +-
.../engine/Source/Renderer/ComputeCommand.js | 17 +-
.../engine/Source/Renderer/ComputeEngine.js | 1 -
packages/engine/Source/Renderer/Context.js | 26 +-
.../engine/Source/Renderer/ContextLimits.js | 1 +
packages/engine/Source/Renderer/CubeMap.js | 14 +-
.../engine/Source/Renderer/CubeMapFace.js | 63 ++-
.../engine/Source/Renderer/DrawCommand.js | 32 +-
.../engine/Source/Renderer/Framebuffer.js | 32 +-
.../Source/Renderer/FramebufferManager.js | 27 +-
.../Source/Renderer/MultisampleFramebuffer.js | 9 +-
packages/engine/Source/Renderer/Pass.js | 1 +
packages/engine/Source/Renderer/PassState.js | 8 +-
.../engine/Source/Renderer/PixelDatatype.js | 14 +-
.../engine/Source/Renderer/RenderState.js | 62 +--
.../engine/Source/Renderer/Renderbuffer.js | 1 -
packages/engine/Source/Renderer/Sampler.js | 1 -
.../engine/Source/Renderer/ShaderBuilder.js | 35 +-
.../engine/Source/Renderer/ShaderCache.js | 50 ++-
.../Source/Renderer/ShaderDestination.js | 7 +-
.../engine/Source/Renderer/ShaderFunction.js | 7 +-
.../engine/Source/Renderer/ShaderProgram.js | 3 +-
.../engine/Source/Renderer/ShaderSource.js | 14 +-
.../engine/Source/Renderer/ShaderStruct.js | 7 +-
packages/engine/Source/Renderer/Texture.js | 104 ++---
.../Renderer/TextureMagnificationFilter.js | 5 +
.../Renderer/TextureMinificationFilter.js | 9 +
.../engine/Source/Renderer/UniformState.js | 19 +-
.../engine/Source/Renderer/VertexArray.js | 43 +-
.../Source/Renderer/VertexArrayFacade.js | 5 -
.../engine/Source/Renderer/createUniform.js | 78 +---
.../Source/Renderer/createUniformArray.js | 78 +---
.../Source/Renderer/demodernizeShader.js | 5 +-
.../Source/Renderer/freezeRenderState.js | 3 +
.../engine/Source/Renderer/loadCubeMap.js | 13 +-
packages/engine/Source/Scene/AlphaMode.js | 4 +
packages/engine/Source/Scene/Appearance.js | 31 +-
.../engine/Source/Scene/ArcGisBaseMapType.js | 1 +
.../Scene/ArcGisMapServerImageryProvider.js | 63 ++-
.../engine/Source/Scene/ArcGisMapService.js | 7 +-
packages/engine/Source/Scene/Atmosphere.js | 17 +-
packages/engine/Source/Scene/AttributeType.js | 17 +
packages/engine/Source/Scene/AutoExposure.js | 15 +-
packages/engine/Source/Scene/Axis.js | 11 +
packages/engine/Source/Scene/B3dmParser.js | 5 +-
packages/engine/Source/Scene/BatchTable.js | 38 +-
.../Source/Scene/BatchTableHierarchy.js | 20 +-
packages/engine/Source/Scene/BatchTexture.js | 36 +-
packages/engine/Source/Scene/Billboard.js | 43 +-
.../Source/Scene/BillboardCollection.js | 73 +++-
.../Source/Scene/BingMapsImageryProvider.js | 30 +-
packages/engine/Source/Scene/BingMapsStyle.js | 12 +
packages/engine/Source/Scene/BlendEquation.js | 6 +
packages/engine/Source/Scene/BlendFunction.js | 16 +
packages/engine/Source/Scene/BlendOption.js | 1 +
packages/engine/Source/Scene/BlendingState.js | 5 +
.../Source/Scene/BoundingVolumeSemantics.js | 15 +-
packages/engine/Source/Scene/BoxEmitter.js | 5 +-
packages/engine/Source/Scene/BufferLoader.js | 13 +-
packages/engine/Source/Scene/Camera.js | 130 +++++-
.../Source/Scene/CameraEventAggregator.js | 22 +-
.../engine/Source/Scene/CameraEventType.js | 6 +
.../engine/Source/Scene/CameraFlightPath.js | 1 +
.../Source/Scene/Cesium3DContentGroup.js | 7 +-
packages/engine/Source/Scene/Cesium3DTile.js | 131 +++++-
.../Source/Scene/Cesium3DTileBatchTable.js | 10 +-
.../Scene/Cesium3DTileColorBlendMode.js | 20 +-
.../Source/Scene/Cesium3DTileContent.js | 76 +++-
.../Scene/Cesium3DTileContentFactory.js | 1 +
.../Source/Scene/Cesium3DTileContentType.js | 19 +-
.../Source/Scene/Cesium3DTileFeature.js | 76 +++-
.../Source/Scene/Cesium3DTileFeatureTable.js | 2 -
.../Scene/Cesium3DTileOptimizationHint.js | 2 +
.../Source/Scene/Cesium3DTileOptimizations.js | 3 +
.../engine/Source/Scene/Cesium3DTilePass.js | 1 +
.../Source/Scene/Cesium3DTilePassState.js | 9 +-
.../Source/Scene/Cesium3DTilePointFeature.js | 91 ++++-
.../engine/Source/Scene/Cesium3DTileRefine.js | 4 +
.../engine/Source/Scene/Cesium3DTileStyle.js | 205 ++++++++--
.../Scene/Cesium3DTilesVoxelProvider.js | 18 +-
.../engine/Source/Scene/Cesium3DTileset.js | 238 +++++++++--
.../Scene/Cesium3DTilesetBaseTraversal.js | 8 +-
.../Source/Scene/Cesium3DTilesetCache.js | 1 +
.../Source/Scene/Cesium3DTilesetHeatmap.js | 8 +-
.../Source/Scene/Cesium3DTilesetMetadata.js | 11 +-
.../Cesium3DTilesetMostDetailedTraversal.js | 5 +-
.../Scene/Cesium3DTilesetSkipTraversal.js | 12 +-
.../Source/Scene/Cesium3DTilesetTraversal.js | 12 +-
packages/engine/Source/Scene/CircleEmitter.js | 7 +-
.../Source/Scene/ClassificationPrimitive.js | 72 +++-
.../engine/Source/Scene/ClassificationType.js | 4 +
packages/engine/Source/Scene/ClippingPlane.js | 10 +-
.../Source/Scene/ClippingPlaneCollection.js | 49 ++-
.../engine/Source/Scene/ClippingPolygon.js | 13 +-
.../Source/Scene/ClippingPolygonCollection.js | 51 ++-
.../engine/Source/Scene/CloudCollection.js | 73 +++-
packages/engine/Source/Scene/CloudType.js | 4 +
.../engine/Source/Scene/ColorBlendMode.js | 4 +-
.../Source/Scene/Composite3DTileContent.js | 15 +-
.../Source/Scene/ConditionsExpression.js | 14 +-
packages/engine/Source/Scene/ConeEmitter.js | 7 +-
.../engine/Source/Scene/ContentMetadata.js | 14 +-
packages/engine/Source/Scene/CreditDisplay.js | 26 +-
packages/engine/Source/Scene/CullFace.js | 4 +
packages/engine/Source/Scene/CumulusCloud.js | 17 +-
.../engine/Source/Scene/DebugAppearance.js | 35 +-
.../Source/Scene/DebugCameraPrimitive.js | 22 +-
.../Source/Scene/DebugModelMatrixPrimitive.js | 27 +-
packages/engine/Source/Scene/DepthFunction.js | 9 +
packages/engine/Source/Scene/DepthPlane.js | 1 -
.../DeviceOrientationCameraController.js | 5 +-
.../engine/Source/Scene/DirectionalLight.js | 11 +-
.../Scene/DiscardEmptyTileImagePolicy.js | 6 +-
.../Scene/DiscardMissingTileImagePolicy.js | 10 +-
packages/engine/Source/Scene/DracoLoader.js | 9 +-
.../Scene/DynamicAtmosphereLightingType.js | 8 +-
.../engine/Source/Scene/EllipsoidPrimitive.js | 45 +-
.../Scene/EllipsoidSurfaceAppearance.js | 51 ++-
.../engine/Source/Scene/Empty3DTileContent.js | 11 +-
packages/engine/Source/Scene/Expression.js | 19 +-
packages/engine/Source/Scene/Fog.js | 3 +-
.../engine/Source/Scene/FrameRateMonitor.js | 24 +-
packages/engine/Source/Scene/FrameState.js | 31 +-
.../engine/Source/Scene/FrustumCommands.js | 8 +-
.../Source/Scene/Geometry3DTileContent.js | 11 +-
.../Source/Scene/GetFeatureInfoFormat.js | 4 +-
packages/engine/Source/Scene/Globe.js | 63 ++-
.../Source/Scene/GlobeSurfaceShaderSet.js | 1 +
.../engine/Source/Scene/GlobeSurfaceTile.js | 4 +-
.../Source/Scene/GlobeSurfaceTileProvider.js | 32 +-
.../engine/Source/Scene/GlobeTranslucency.js | 26 +-
.../Source/Scene/GltfBufferViewLoader.js | 9 +-
.../engine/Source/Scene/GltfDracoLoader.js | 10 +-
.../engine/Source/Scene/GltfImageLoader.js | 11 +-
.../Source/Scene/GltfIndexBufferLoader.js | 19 +-
.../engine/Source/Scene/GltfJsonLoader.js | 10 +-
packages/engine/Source/Scene/GltfLoader.js | 60 ++-
.../engine/Source/Scene/GltfLoaderUtil.js | 10 +-
.../Scene/GltfStructuralMetadataLoader.js | 12 +-
.../engine/Source/Scene/GltfTextureLoader.js | 12 +-
.../Source/Scene/GltfVertexBufferLoader.js | 27 +-
.../GoogleEarthEnterpriseImageryProvider.js | 21 +-
.../GoogleEarthEnterpriseMapsProvider.js | 55 ++-
.../Source/Scene/GridImageryProvider.js | 11 +-
.../Source/Scene/GroundPolylinePrimitive.js | 68 +++-
.../engine/Source/Scene/GroundPrimitive.js | 80 +++-
packages/engine/Source/Scene/GroupMetadata.js | 15 +-
.../engine/Source/Scene/HeightReference.js | 1 +
.../engine/Source/Scene/HorizontalOrigin.js | 5 +
.../engine/Source/Scene/I3SDataProvider.js | 32 +-
packages/engine/Source/Scene/I3SDecoder.js | 10 +-
packages/engine/Source/Scene/I3SFeature.js | 2 -
packages/engine/Source/Scene/I3SField.js | 12 -
packages/engine/Source/Scene/I3SGeometry.js | 10 -
packages/engine/Source/Scene/I3SLayer.js | 13 +-
packages/engine/Source/Scene/I3SNode.js | 7 +-
packages/engine/Source/Scene/I3SStatistics.js | 3 -
packages/engine/Source/Scene/I3SSublayer.js | 7 -
packages/engine/Source/Scene/I3SSymbology.js | 2 -
packages/engine/Source/Scene/I3dmParser.js | 5 +-
.../engine/Source/Scene/ImageBasedLighting.js | 39 +-
packages/engine/Source/Scene/Imagery.js | 6 +-
packages/engine/Source/Scene/ImageryLayer.js | 69 +++-
.../Source/Scene/ImageryLayerCollection.js | 68 +++-
.../Source/Scene/ImageryLayerFeatureInfo.js | 6 +-
.../engine/Source/Scene/ImageryProvider.js | 13 +-
.../Source/Scene/Implicit3DTileContent.js | 60 ++-
.../Scene/ImplicitAvailabilityBitstream.js | 12 +-
.../Source/Scene/ImplicitMetadataView.js | 16 +-
.../Source/Scene/ImplicitSubdivisionScheme.js | 1 +
.../engine/Source/Scene/ImplicitSubtree.js | 70 +++-
.../Source/Scene/ImplicitSubtreeCache.js | 10 +-
.../Source/Scene/ImplicitSubtreeMetadata.js | 14 +-
.../Source/Scene/ImplicitTileCoordinates.js | 27 +-
.../engine/Source/Scene/ImplicitTileset.js | 23 +-
.../Source/Scene/InstanceAttributeSemantic.js | 9 +-
.../engine/Source/Scene/IonImageryProvider.js | 22 +-
.../Source/Scene/IonWorldImageryStyle.js | 4 +
packages/engine/Source/Scene/JobScheduler.js | 29 +-
.../engine/Source/Scene/JsonMetadataTable.js | 14 +-
packages/engine/Source/Scene/KeyframeNode.js | 4 +-
packages/engine/Source/Scene/Label.js | 27 +-
.../engine/Source/Scene/LabelCollection.js | 68 +++-
packages/engine/Source/Scene/LabelStyle.js | 5 +
packages/engine/Source/Scene/Light.js | 4 +-
packages/engine/Source/Scene/MapMode2D.js | 3 +
.../Source/Scene/MapboxImageryProvider.js | 12 +-
.../Scene/MapboxStyleImageryProvider.js | 13 +-
packages/engine/Source/Scene/Material.js | 384 +++++++++---------
.../engine/Source/Scene/MaterialAppearance.js | 99 +++--
packages/engine/Source/Scene/Megatexture.js | 15 +-
packages/engine/Source/Scene/MetadataClass.js | 16 +-
.../Source/Scene/MetadataClassProperty.js | 57 ++-
.../Source/Scene/MetadataComponentType.js | 47 ++-
.../engine/Source/Scene/MetadataEntity.js | 25 +-
packages/engine/Source/Scene/MetadataEnum.js | 20 +-
.../engine/Source/Scene/MetadataEnumValue.js | 12 +-
.../engine/Source/Scene/MetadataSchema.js | 15 +-
.../Source/Scene/MetadataSchemaLoader.js | 12 +-
.../engine/Source/Scene/MetadataSemantic.js | 21 +
packages/engine/Source/Scene/MetadataTable.js | 43 +-
.../Source/Scene/MetadataTableProperty.js | 17 +-
packages/engine/Source/Scene/MetadataType.js | 23 +-
.../Source/Scene/Model/AlphaPipelineStage.js | 2 +
.../Scene/Model/AtmospherePipelineStage.js | 2 +
.../engine/Source/Scene/Model/B3dmLoader.js | 28 +-
.../Scene/Model/BatchTexturePipelineStage.js | 6 +-
.../Scene/Model/CPUStylingPipelineStage.js | 10 +-
.../Model/ClassificationModelDrawCommand.js | 26 +-
.../Model/ClassificationPipelineStage.js | 8 +-
.../engine/Source/Scene/Model/CustomShader.js | 49 ++-
.../Source/Scene/Model/CustomShaderMode.js | 7 +-
.../Scene/Model/CustomShaderPipelineStage.js | 17 +-
.../Model/CustomShaderTranslucencyMode.js | 5 +
.../Model/DequantizationPipelineStage.js | 8 +-
.../Scene/Model/FeatureIdPipelineStage.js | 12 +-
.../Source/Scene/Model/GeoJsonLoader.js | 17 +-
.../Scene/Model/GeometryPipelineStage.js | 14 +-
.../engine/Source/Scene/Model/I3dmLoader.js | 32 +-
.../Scene/Model/InstancingPipelineStage.js | 14 +-
.../Source/Scene/Model/LightingModel.js | 4 +
.../Scene/Model/LightingPipelineStage.js | 3 +
.../Scene/Model/MaterialPipelineStage.js | 20 +-
.../Scene/Model/MetadataPipelineStage.js | 17 +-
packages/engine/Source/Scene/Model/Model.js | 345 ++++++++++++----
.../Source/Scene/Model/Model3DTileContent.js | 10 +-
.../Source/Scene/Model/ModelAlphaOptions.js | 6 +-
.../Source/Scene/Model/ModelAnimation.js | 54 ++-
.../Scene/Model/ModelAnimationChannel.js | 19 +-
.../Scene/Model/ModelAnimationCollection.js | 65 ++-
.../Source/Scene/Model/ModelArticulation.js | 18 +-
.../Scene/Model/ModelArticulationStage.js | 21 +-
.../Model/ModelClippingPlanesPipelineStage.js | 14 +-
.../ModelClippingPolygonsPipelineStage.js | 18 +-
.../Scene/Model/ModelColorPipelineStage.js | 14 +-
.../Source/Scene/Model/ModelDrawCommand.js | 31 +-
.../engine/Source/Scene/Model/ModelFeature.js | 39 +-
.../Source/Scene/Model/ModelFeatureTable.js | 28 +-
.../Scene/Model/ModelLightingOptions.js | 9 +-
.../Scene/Model/ModelMatrixUpdateStage.js | 15 +-
.../engine/Source/Scene/Model/ModelNode.js | 13 +-
.../Scene/Model/ModelRenderResources.js | 18 +-
.../Source/Scene/Model/ModelRuntimeNode.js | 74 +++-
.../Scene/Model/ModelRuntimePrimitive.js | 33 +-
.../Source/Scene/Model/ModelSceneGraph.js | 59 ++-
.../Model/ModelSilhouettePipelineStage.js | 19 +-
.../engine/Source/Scene/Model/ModelSkin.js | 16 +-
.../Scene/Model/ModelSplitterPipelineStage.js | 12 +-
.../Source/Scene/Model/ModelStatistics.js | 20 +-
.../engine/Source/Scene/Model/ModelType.js | 7 +
.../engine/Source/Scene/Model/ModelUtility.js | 30 +-
.../Scene/Model/MorphTargetsPipelineStage.js | 10 +-
.../Source/Scene/Model/NodeRenderResources.js | 31 +-
.../Model/NodeStatisticsPipelineStage.js | 2 +
.../Scene/Model/PickingPipelineStage.js | 3 +-
.../engine/Source/Scene/Model/PntsLoader.js | 12 +-
.../Model/PointCloudStylingPipelineStage.js | 16 +-
.../Scene/Model/PrimitiveOutlineGenerator.js | 61 ++-
.../Model/PrimitiveOutlinePipelineStage.js | 2 +
.../Scene/Model/PrimitiveRenderResources.js | 52 ++-
.../Model/PrimitiveStatisticsPipelineStage.js | 2 +
.../Scene/Model/SceneMode2DPipelineStage.js | 12 +-
.../Model/SelectedFeatureIdPipelineStage.js | 14 +-
.../Scene/Model/SkinningPipelineStage.js | 7 +-
.../Source/Scene/Model/StyleCommandsNeeded.js | 3 +-
.../Source/Scene/Model/TextureManager.js | 15 +-
.../Source/Scene/Model/TextureUniform.js | 17 +-
.../Scene/Model/TilesetPipelineStage.js | 10 +-
.../engine/Source/Scene/Model/UniformType.js | 17 +
.../engine/Source/Scene/Model/VaryingType.js | 9 +
.../VerticalExaggerationPipelineStage.js | 3 +
.../Scene/Model/WireframePipelineStage.js | 8 +-
.../Source/Scene/Model/buildDrawCommand.js | 4 +-
.../engine/Source/Scene/Model/pickModel.js | 8 +-
.../engine/Source/Scene/ModelAnimationLoop.js | 5 +
.../engine/Source/Scene/ModelComponents.js | 255 ++++++++++--
packages/engine/Source/Scene/Moon.js | 27 +-
.../Source/Scene/Multiple3DTileContent.js | 41 +-
.../Source/Scene/NeverTileDiscardPolicy.js | 6 +-
packages/engine/Source/Scene/OIT.js | 2 +-
.../Scene/OctahedralProjectedCubeMap.js | 12 +-
.../Scene/OpenStreetMapImageryProvider.js | 12 +-
.../Scene/OrderedGroundPrimitiveCollection.js | 23 +-
packages/engine/Source/Scene/Particle.js | 22 +-
packages/engine/Source/Scene/ParticleBurst.js | 10 +-
.../engine/Source/Scene/ParticleEmitter.js | 7 +-
.../engine/Source/Scene/ParticleSystem.js | 30 +-
.../Scene/PerInstanceColorAppearance.js | 44 +-
.../engine/Source/Scene/PerformanceDisplay.js | 5 +-
.../engine/Source/Scene/PickFramebuffer.js | 3 +-
packages/engine/Source/Scene/Picking.js | 10 +-
packages/engine/Source/Scene/PntsParser.js | 5 +-
packages/engine/Source/Scene/PointCloud.js | 7 +-
.../Source/Scene/PointCloudEyeDomeLighting.js | 8 +-
.../engine/Source/Scene/PointCloudShading.js | 22 +-
.../engine/Source/Scene/PointPrimitive.js | 27 +-
.../Source/Scene/PointPrimitiveCollection.js | 66 ++-
packages/engine/Source/Scene/Polyline.js | 7 +-
.../engine/Source/Scene/PolylineCollection.js | 97 +++--
.../Source/Scene/PolylineColorAppearance.js | 31 +-
.../Scene/PolylineMaterialAppearance.js | 35 +-
.../engine/Source/Scene/PostProcessStage.js | 53 ++-
.../Scene/PostProcessStageCollection.js | 51 ++-
.../Source/Scene/PostProcessStageComposite.js | 36 +-
.../Source/Scene/PostProcessStageLibrary.js | 56 ++-
.../Scene/PostProcessStageSampleMode.js | 3 +
.../Scene/PostProcessStageTextureCache.js | 20 +-
packages/engine/Source/Scene/Primitive.js | 84 +++-
.../Source/Scene/PrimitiveCollection.js | 85 ++--
.../engine/Source/Scene/PrimitiveLoadPlan.js | 27 +-
.../engine/Source/Scene/PrimitivePipeline.js | 10 -
.../engine/Source/Scene/PropertyAttribute.js | 18 +-
.../Source/Scene/PropertyAttributeProperty.js | 12 +-
packages/engine/Source/Scene/PropertyTable.js | 32 +-
.../engine/Source/Scene/PropertyTexture.js | 13 +-
.../Source/Scene/PropertyTextureProperty.js | 15 +-
.../engine/Source/Scene/QuadtreeOccluders.js | 7 +-
.../engine/Source/Scene/QuadtreePrimitive.js | 41 +-
packages/engine/Source/Scene/QuadtreeTile.js | 8 +-
.../Source/Scene/QuadtreeTileProvider.js | 31 +-
packages/engine/Source/Scene/ResourceCache.js | 64 ++-
.../engine/Source/Scene/ResourceCacheKey.js | 39 +-
.../Source/Scene/ResourceCacheStatistics.js | 11 +-
.../engine/Source/Scene/ResourceLoader.js | 17 +-
.../Source/Scene/ResourceLoaderState.js | 9 +-
packages/engine/Source/Scene/SDFSettings.js | 5 +
packages/engine/Source/Scene/Scene.js | 282 ++++++++++---
packages/engine/Source/Scene/SceneMode.js | 6 +
.../engine/Source/Scene/SceneTransforms.js | 22 +-
.../engine/Source/Scene/SceneTransitioner.js | 6 +-
.../Scene/ScreenSpaceCameraController.js | 11 +-
.../Scene/SensorVolumePortionToDisplay.js | 20 +-
packages/engine/Source/Scene/ShadowMap.js | 24 +-
packages/engine/Source/Scene/ShadowMode.js | 9 +-
.../Source/Scene/ShadowVolumeAppearance.js | 20 +-
.../Source/Scene/SingleTileImageryProvider.js | 19 +-
packages/engine/Source/Scene/SkyAtmosphere.js | 27 +-
packages/engine/Source/Scene/SkyBox.js | 26 +-
packages/engine/Source/Scene/SpatialNode.js | 5 +-
packages/engine/Source/Scene/SphereEmitter.js | 7 +-
.../engine/Source/Scene/SplitDirection.js | 5 +
packages/engine/Source/Scene/Splitter.js | 3 +-
.../engine/Source/Scene/StencilConstants.js | 1 +
.../engine/Source/Scene/StencilFunction.js | 9 +
.../engine/Source/Scene/StencilOperation.js | 9 +
.../engine/Source/Scene/StructuralMetadata.js | 17 +-
.../engine/Source/Scene/StyleExpression.js | 11 +-
packages/engine/Source/Scene/Sun.js | 19 +-
packages/engine/Source/Scene/SunLight.js | 8 +-
.../Source/Scene/SupportedImageFormats.js | 6 +-
packages/engine/Source/Scene/Terrain.js | 33 +-
packages/engine/Source/Scene/TextureAtlas.js | 29 +-
.../engine/Source/Scene/TileBoundingRegion.js | 28 +-
.../engine/Source/Scene/TileBoundingS2Cell.js | 39 +-
.../engine/Source/Scene/TileBoundingSphere.js | 23 +-
.../engine/Source/Scene/TileBoundingVolume.js | 14 +-
.../Scene/TileCoordinatesImageryProvider.js | 10 +-
.../engine/Source/Scene/TileDiscardPolicy.js | 7 +-
packages/engine/Source/Scene/TileImagery.js | 3 +
.../Scene/TileMapServiceImageryProvider.js | 25 +-
packages/engine/Source/Scene/TileMetadata.js | 14 +-
.../Source/Scene/TileOrientedBoundingBox.js | 18 +-
.../Source/Scene/TileReplacementQueue.js | 3 +
.../Source/Scene/TileSelectionResult.js | 1 +
.../Source/Scene/Tileset3DTileContent.js | 12 +-
.../engine/Source/Scene/TilesetMetadata.js | 14 +-
.../engine/Source/Scene/TimeDynamicImagery.js | 7 +-
.../Source/Scene/TimeDynamicPointCloud.js | 39 +-
packages/engine/Source/Scene/Tonemapper.js | 6 +-
.../Scene/TranslucentTileClassification.js | 3 +-
.../engine/Source/Scene/TweenCollection.js | 83 ++--
.../Scene/UrlTemplateImageryProvider.js | 13 +-
.../engine/Source/Scene/Vector3DTileBatch.js | 5 +-
.../Scene/Vector3DTileClampedPolylines.js | 20 +-
.../Source/Scene/Vector3DTileContent.js | 11 +-
.../Source/Scene/Vector3DTileGeometry.js | 18 +-
.../engine/Source/Scene/Vector3DTilePoints.js | 19 +-
.../Source/Scene/Vector3DTilePolygons.js | 22 +-
.../Source/Scene/Vector3DTilePolylines.js | 20 +-
.../Source/Scene/Vector3DTilePrimitive.js | 20 +-
.../Source/Scene/VertexAttributeSemantic.js | 25 ++
.../engine/Source/Scene/VerticalOrigin.js | 6 +
packages/engine/Source/Scene/View.js | 3 -
packages/engine/Source/Scene/ViewportQuad.js | 25 +-
packages/engine/Source/Scene/VoxelBoxShape.js | 17 +-
packages/engine/Source/Scene/VoxelCell.js | 28 +-
packages/engine/Source/Scene/VoxelContent.js | 12 +-
.../engine/Source/Scene/VoxelCylinderShape.js | 19 +-
.../Source/Scene/VoxelEllipsoidShape.js | 17 +-
.../engine/Source/Scene/VoxelPrimitive.js | 75 +++-
packages/engine/Source/Scene/VoxelProvider.js | 22 +-
.../Source/Scene/VoxelRenderResources.js | 6 +-
packages/engine/Source/Scene/VoxelShape.js | 16 +-
.../engine/Source/Scene/VoxelShapeType.js | 7 +
.../engine/Source/Scene/VoxelTraversal.js | 28 +-
.../Scene/WebMapServiceImageryProvider.js | 33 +-
.../Scene/WebMapTileServiceImageryProvider.js | 15 +-
.../Source/Scene/buildVoxelDrawCommands.js | 2 +
.../Scene/computeFlyToLocationForRectangle.js | 3 +
.../Scene/createBillboardPointCallback.js | 4 +-
.../Scene/createElevationBandMaterial.js | 7 +
.../createGooglePhotorealistic3DTileset.js | 7 +-
.../Source/Scene/createOsmBuildingsAsync.js | 11 +-
.../Scene/createTangentSpaceDebugPrimitive.js | 7 +-
.../Source/Scene/createWorldImageryAsync.js | 9 +-
.../Source/Scene/findContentMetadata.js | 4 +-
.../engine/Source/Scene/findGroupMetadata.js | 4 +-
.../engine/Source/Scene/findTileMetadata.js | 3 +-
.../engine/Source/Scene/getBinaryAccessor.js | 1 -
.../Source/Scene/getClipAndStyleCode.js | 1 +
.../Source/Scene/getClippingFunction.js | 1 +
.../engine/Source/Scene/parseBatchTable.js | 20 +-
.../Scene/parseFeatureMetadataLegacy.js | 3 +-
.../Source/Scene/parseStructuralMetadata.js | 3 +-
.../Source/Scene/preprocess3DTileContent.js | 4 +-
.../Source/Scene/processVoxelProperties.js | 17 +
packages/engine/Source/Widget/CesiumWidget.js | 41 +-
.../Workers/createTaskProcessorWorker.js | 8 +
packages/engine/Specs/Scene/GlobeSpec.js | 1 -
.../Scene/GlobeSurfaceTileProviderSpec.js | 1 -
packages/engine/Specs/Scene/GltfBuilder.js | 2 +-
.../Specs/Scene/ImageryLayerCollectionSpec.js | 6 +-
.../Scene/ImplicitTileCoordinatesSpec.js | 4 +-
.../engine/Specs/createWebglVersionHelper.js | 2 +
.../widgets/Source/Animation/Animation.js | 13 +-
.../Source/Animation/AnimationViewModel.js | 17 +-
.../Source/BaseLayerPicker/BaseLayerPicker.js | 16 +-
.../BaseLayerPickerViewModel.js | 14 +-
.../BaseLayerPicker/ProviderViewModel.js | 5 +-
.../Cesium3DTilesInspector.js | 6 +-
.../Cesium3DTilesInspectorViewModel.js | 48 ++-
.../Source/CesiumInspector/CesiumInspector.js | 7 +-
.../CesiumInspectorViewModel.js | 26 +-
packages/widgets/Source/ClockViewModel.js | 4 +-
packages/widgets/Source/Command.js | 3 +-
.../FullscreenButton/FullscreenButton.js | 12 +-
.../FullscreenButtonViewModel.js | 10 +-
packages/widgets/Source/Geocoder/Geocoder.js | 13 +-
.../Source/Geocoder/GeocoderViewModel.js | 16 +-
.../widgets/Source/HomeButton/HomeButton.js | 6 +-
.../Source/HomeButton/HomeButtonViewModel.js | 7 +-
.../I3SBuildingSceneLayerExplorer.js | 5 +-
.../I3SBuildingSceneLayerExplorerViewModel.js | 3 +-
packages/widgets/Source/InfoBox/InfoBox.js | 10 +-
.../Source/InfoBox/InfoBoxViewModel.js | 2 +-
packages/widgets/Source/InspectorShared.js | 8 +-
.../NavigationHelpButton.js | 12 +-
.../NavigationHelpButtonViewModel.js | 6 +-
.../PerformanceWatchdog.js | 8 +-
.../PerformanceWatchdogViewModel.js | 6 +-
.../ProjectionPicker/ProjectionPicker.js | 10 +-
.../ProjectionPickerViewModel.js | 7 +-
.../Source/SceneModePicker/SceneModePicker.js | 12 +-
.../SceneModePickerViewModel.js | 9 +-
.../SelectionIndicator/SelectionIndicator.js | 9 +-
.../SelectionIndicatorViewModel.js | 10 +-
.../widgets/Source/SvgPathBindingHandler.js | 3 +-
packages/widgets/Source/Timeline/Timeline.js | 21 +-
.../Source/Timeline/TimelineHighlightRange.js | 3 -
.../widgets/Source/Timeline/TimelineTrack.js | 4 -
.../widgets/Source/ToggleButtonViewModel.js | 7 +-
packages/widgets/Source/VRButton/VRButton.js | 11 +-
.../Source/VRButton/VRButtonViewModel.js | 10 +-
packages/widgets/Source/Viewer/Viewer.js | 48 ++-
.../viewerCesium3DTilesInspectorMixin.js | 2 +
.../Viewer/viewerCesiumInspectorMixin.js | 6 +-
.../Source/Viewer/viewerDragDropMixin.js | 21 +-
.../Viewer/viewerPerformanceWatchdogMixin.js | 7 +-
.../Viewer/viewerVoxelInspectorMixin.js | 2 +
.../Source/VoxelInspector/VoxelInspector.js | 6 +-
.../VoxelInspector/VoxelInspectorViewModel.js | 5 +-
packages/widgets/Source/createCommand.js | 4 +-
.../widgets/Source/subscribeAndEvaluate.js | 5 +-
850 files changed, 13557 insertions(+), 4310 deletions(-)
diff --git a/packages/engine/Source/Core/ApproximateTerrainHeights.js b/packages/engine/Source/Core/ApproximateTerrainHeights.js
index d8f4c49a7d9c..6b1891ddc827 100644
--- a/packages/engine/Source/Core/ApproximateTerrainHeights.js
+++ b/packages/engine/Source/Core/ApproximateTerrainHeights.js
@@ -36,7 +36,7 @@ const ApproximateTerrainHeights = {};
/**
* Initializes the minimum and maximum terrain heights
- * @returns {Promise}
+ * @return {Promise}
*/
ApproximateTerrainHeights.initialize = function () {
let initPromise = ApproximateTerrainHeights._initPromise;
@@ -56,8 +56,8 @@ ApproximateTerrainHeights.initialize = function () {
/**
* Computes the minimum and maximum terrain heights for a given rectangle
* @param {Rectangle} rectangle The bounding rectangle
- * @param {Ellipsoid} [ellipsoid] The ellipsoid
- * @returns {{minimumTerrainHeight: number, maximumTerrainHeight: number}}
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid
+ * @return {{minimumTerrainHeight: number, maximumTerrainHeight: number}}
*/
ApproximateTerrainHeights.getMinimumMaximumHeights = function (
rectangle,
@@ -130,8 +130,8 @@ ApproximateTerrainHeights.getMinimumMaximumHeights = function (
/**
* Computes the bounding sphere based on the tile heights in the rectangle
* @param {Rectangle} rectangle The bounding rectangle
- * @param {Ellipsoid} [ellipsoid] The ellipsoid
- * @returns {BoundingSphere} The result bounding sphere
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid
+ * @return {BoundingSphere} The result bounding sphere
*/
ApproximateTerrainHeights.getBoundingSphere = function (rectangle, ellipsoid) {
//>>includeStart('debug', pragmas.debug);
diff --git a/packages/engine/Source/Core/ArcGISTiledElevationTerrainProvider.js b/packages/engine/Source/Core/ArcGISTiledElevationTerrainProvider.js
index f06c4da1b81e..3c5fa226f157 100644
--- a/packages/engine/Source/Core/ArcGISTiledElevationTerrainProvider.js
+++ b/packages/engine/Source/Core/ArcGISTiledElevationTerrainProvider.js
@@ -22,9 +22,10 @@ import WebMercatorTilingScheme from "./WebMercatorTilingScheme.js";
const ALL_CHILDREN = 15;
/**
- * @typedef {object} ArcGISTiledElevationTerrainProvider.ConstructorOptions
+ * @typedef {Object} ArcGISTiledElevationTerrainProvider.ConstructorOptions
*
* Initialization options for the ArcGISTiledElevationTerrainProvider constructor
+ *
* @property {string} [token] The authorization token to use to connect to the service.
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If the tilingScheme is specified,
* this parameter is ignored and the tiling scheme's ellipsoid is used instead.
@@ -33,8 +34,10 @@ const ALL_CHILDREN = 15;
/**
* Used to track creation details while fetching initial metadata
- * @class
+ *
+ * @constructor
* @private
+ *
* @param {ArcGISTiledElevationTerrainProvider.ConstructorOptions} [options] An object describing initialization options.
*/
function TerrainProviderBuilder(options) {
@@ -55,7 +58,9 @@ function TerrainProviderBuilder(options) {
/**
* Complete ArcGISTiledElevationTerrainProvider creation based on builder values.
+ *
* @private
+ *
* @param {ArcGISTiledElevationTerrainProvider} provider
*/
TerrainProviderBuilder.prototype.build = function (provider) {
@@ -212,14 +217,18 @@ async function requestMetadata(
*
* A {@link TerrainProvider} that produces terrain geometry by tessellating height maps
* retrieved from Elevation Tiles of an an ArcGIS ImageService.
+ *
* @alias ArcGISTiledElevationTerrainProvider
- * @class
+ * @constructor
+ *
* @param {CesiumTerrainProvider.ConstructorOptions} [options] A url or an object describing initialization options
+ *
* @example
* const terrainProvider = await Cesium.ArcGISTiledElevationTerrainProvider.fromUrl("https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer", {
* token: "KED1aF_I4UzXOHy3BnhwyBHU4l5oY6rO6walkmHoYqGp4XyIWUd5YZUC1ZrLAzvV40pR6gBXQayh0eFA8m6vPg.."
* });
* viewer.terrainProvider = terrainProvider;
+ *
* @see TerrainProvider
*/
function ArcGISTiledElevationTerrainProvider(options) {
@@ -327,16 +336,19 @@ Object.defineProperties(ArcGISTiledElevationTerrainProvider.prototype, {
/**
* Creates a {@link TerrainProvider} that produces terrain geometry by tessellating height maps
* retrieved from Elevation Tiles of an an ArcGIS ImageService.
- * @param {Resource | string | Promise | Promise} url The URL of the ArcGIS ImageServer service.
+ *
+ * @param {Resource|String|Promise|Promise} url The URL of the ArcGIS ImageServer service.
* @param {ArcGISTiledElevationTerrainProvider.ConstructorOptions} [options] A url or an object describing initialization options.
* @returns {Promise}
+ *
* @example
* const terrainProvider = await Cesium.ArcGISTiledElevationTerrainProvider.fromUrl("https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer", {
* token: "KED1aF_I4UzXOHy3BnhwyBHU4l5oY6rO6walkmHoYqGp4XyIWUd5YZUC1ZrLAzvV40pR6gBXQayh0eFA8m6vPg.."
* });
* viewer.terrainProvider = terrainProvider;
- * @throws {RuntimeError} metadata specifies invalid spatial reference
- * @throws {RuntimeError} metadata does not specify tileInfo
+ *
+ * @exception {RuntimeError} metadata specifies invalid spatial reference
+ * @exception {RuntimeError} metadata does not specify tileInfo
*/
ArcGISTiledElevationTerrainProvider.fromUrl = async function (url, options) {
//>>includeStart('debug', pragmas.debug);
@@ -375,6 +387,7 @@ ArcGISTiledElevationTerrainProvider.fromUrl = async function (url, options) {
/**
* Requests the geometry for a given tile. The result includes terrain
* data and indicates that all child tiles are available.
+ *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -478,6 +491,7 @@ function isTileAvailable(that, level, x, y) {
/**
* Gets the maximum geometric error allowed in a tile at a given level.
+ *
* @param {number} level The tile level for which to get the maximum geometric error.
* @returns {number} The maximum geometric error.
*/
@@ -489,6 +503,7 @@ ArcGISTiledElevationTerrainProvider.prototype.getLevelMaximumGeometricError = fu
/**
* Determines whether data for a tile is available to be loaded.
+ *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -515,6 +530,7 @@ ArcGISTiledElevationTerrainProvider.prototype.getTileDataAvailable = function (
/**
* Makes sure we load availability data for a tile
+ *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
diff --git a/packages/engine/Source/Core/ArcType.js b/packages/engine/Source/Core/ArcType.js
index 248c8c863031..a1b9f80a8038 100644
--- a/packages/engine/Source/Core/ArcType.js
+++ b/packages/engine/Source/Core/ArcType.js
@@ -1,10 +1,12 @@
/**
* ArcType defines the path that should be taken connecting vertices.
+ *
* @enum {number}
*/
const ArcType = {
/**
* Straight line that does not conform to the surface of the ellipsoid.
+ *
* @type {number}
* @constant
*/
@@ -12,6 +14,7 @@ const ArcType = {
/**
* Follow geodesic path.
+ *
* @type {number}
* @constant
*/
@@ -19,6 +22,7 @@ const ArcType = {
/**
* Follow rhumb or loxodrome path.
+ *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/ArticulationStageType.js b/packages/engine/Source/Core/ArticulationStageType.js
index 6235937593f4..7c4c64c303e9 100644
--- a/packages/engine/Source/Core/ArticulationStageType.js
+++ b/packages/engine/Source/Core/ArticulationStageType.js
@@ -1,8 +1,10 @@
/**
* An enum describing the type of motion that is defined by an articulation stage
* in the AGI_articulations extension.
+ *
* @alias {ArticulationStageType}
* @enum {string}
+ *
* @private
*/
const ArticulationStageType = {
diff --git a/packages/engine/Source/Core/AssociativeArray.js b/packages/engine/Source/Core/AssociativeArray.js
index bfb991359061..1012807e8c09 100644
--- a/packages/engine/Source/Core/AssociativeArray.js
+++ b/packages/engine/Source/Core/AssociativeArray.js
@@ -5,7 +5,7 @@ import DeveloperError from "./DeveloperError.js";
* A collection of key-value pairs that is stored as a hash for easy
* lookup but also provides an array for fast iteration.
* @alias AssociativeArray
- * @class
+ * @constructor
*/
function AssociativeArray() {
this._array = [];
@@ -16,6 +16,7 @@ Object.defineProperties(AssociativeArray.prototype, {
/**
* Gets the number of items in the collection.
* @memberof AssociativeArray.prototype
+ *
* @type {number}
*/
length: {
@@ -28,6 +29,7 @@ Object.defineProperties(AssociativeArray.prototype, {
* This is a live array that will automatically reflect the values in the collection,
* it should not be modified directly.
* @memberof AssociativeArray.prototype
+ *
* @type {Array}
*/
values: {
@@ -39,6 +41,7 @@ Object.defineProperties(AssociativeArray.prototype, {
/**
* Determines if the provided key is in the array.
+ *
* @param {string|number} key The key to check.
* @returns {boolean} true
if the key is in the array, false
otherwise.
*/
@@ -54,6 +57,7 @@ AssociativeArray.prototype.contains = function (key) {
/**
* Associates the provided key with the provided value. If the key already
* exists, it is overwritten with the new value.
+ *
* @param {string|number} key A unique identifier.
* @param {*} value The value to associate with the provided key.
*/
@@ -74,6 +78,7 @@ AssociativeArray.prototype.set = function (key, value) {
/**
* Retrieves the value associated with the provided key.
+ *
* @param {string|number} key The key whose value is to be retrieved.
* @returns {*} The associated value, or undefined if the key does not exist in the collection.
*/
@@ -88,6 +93,7 @@ AssociativeArray.prototype.get = function (key) {
/**
* Removes a key-value pair from the collection.
+ *
* @param {string|number} key The key to be removed.
* @returns {boolean} True if it was removed, false if the key was not in the collection.
*/
diff --git a/packages/engine/Source/Core/AttributeCompression.js b/packages/engine/Source/Core/AttributeCompression.js
index 2b3e111ad1d4..b6b521cc0097 100644
--- a/packages/engine/Source/Core/AttributeCompression.js
+++ b/packages/engine/Source/Core/AttributeCompression.js
@@ -12,7 +12,9 @@ const LEFT_SHIFT = 256.0;
/**
* Attribute compression and decompression functions.
+ *
* @namespace AttributeCompression
+ *
* @private
*/
const AttributeCompression = {};
@@ -23,11 +25,14 @@ const AttributeCompression = {};
* Oct encoding is a compact representation of unit length vectors.
* The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
* Cigolle et al 2014: {@link http://jcgt.org/published/0003/02/01/}
+ *
* @param {Cartesian3} vector The normalized vector to be compressed into 2 component 'oct' encoding.
* @param {Cartesian2} result The 2 component oct-encoded unit length vector.
* @param {number} rangeMax The maximum value of the SNORM range. The encoded vector is stored in log2(rangeMax+1) bits.
* @returns {Cartesian2} The 2 component oct-encoded unit length vector.
- * @throws {DeveloperError} vector must be normalized.
+ *
+ * @exception {DeveloperError} vector must be normalized.
+ *
* @see AttributeCompression.octDecodeInRange
*/
AttributeCompression.octEncodeInRange = function (vector, rangeMax, result) {
@@ -59,10 +64,13 @@ AttributeCompression.octEncodeInRange = function (vector, rangeMax, result) {
/**
* Encodes a normalized vector into 2 SNORM values in the range of [0-255] following the 'oct' encoding.
+ *
* @param {Cartesian3} vector The normalized vector to be compressed into 2 byte 'oct' encoding.
* @param {Cartesian2} result The 2 byte oct-encoded unit length vector.
* @returns {Cartesian2} The 2 byte oct-encoded unit length vector.
- * @throws {DeveloperError} vector must be normalized.
+ *
+ * @exception {DeveloperError} vector must be normalized.
+ *
* @see AttributeCompression.octEncodeInRange
* @see AttributeCompression.octDecode
*/
@@ -80,7 +88,9 @@ function forceUint8(value) {
* @param {Cartesian3} vector The normalized vector to be compressed into 4 byte 'oct' encoding.
* @param {Cartesian4} result The 4 byte oct-encoded unit length vector.
* @returns {Cartesian4} The 4 byte oct-encoded unit length vector.
- * @throws {DeveloperError} vector must be normalized.
+ *
+ * @exception {DeveloperError} vector must be normalized.
+ *
* @see AttributeCompression.octEncodeInRange
* @see AttributeCompression.octDecodeFromCartesian4
*/
@@ -95,12 +105,15 @@ AttributeCompression.octEncodeToCartesian4 = function (vector, result) {
/**
* Decodes a unit-length vector in 'oct' encoding to a normalized 3-component vector.
+ *
* @param {number} x The x component of the oct-encoded unit length vector.
* @param {number} y The y component of the oct-encoded unit length vector.
* @param {number} rangeMax The maximum value of the SNORM range. The encoded vector is stored in log2(rangeMax+1) bits.
* @param {Cartesian3} result The decoded and normalized vector
* @returns {Cartesian3} The decoded and normalized vector.
- * @throws {DeveloperError} x and y must be unsigned normalized integers between 0 and rangeMax.
+ *
+ * @exception {DeveloperError} x and y must be unsigned normalized integers between 0 and rangeMax.
+ *
* @see AttributeCompression.octEncodeInRange
*/
AttributeCompression.octDecodeInRange = function (x, y, rangeMax, result) {
@@ -128,11 +141,14 @@ AttributeCompression.octDecodeInRange = function (x, y, rangeMax, result) {
/**
* Decodes a unit-length vector in 2 byte 'oct' encoding to a normalized 3-component vector.
+ *
* @param {number} x The x component of the oct-encoded unit length vector.
* @param {number} y The y component of the oct-encoded unit length vector.
* @param {Cartesian3} result The decoded and normalized vector.
* @returns {Cartesian3} The decoded and normalized vector.
- * @throws {DeveloperError} x and y must be an unsigned normalized integer between 0 and 255.
+ *
+ * @exception {DeveloperError} x and y must be an unsigned normalized integer between 0 and 255.
+ *
* @see AttributeCompression.octDecodeInRange
*/
AttributeCompression.octDecode = function (x, y, result) {
@@ -141,10 +157,13 @@ AttributeCompression.octDecode = function (x, y, result) {
/**
* Decodes a unit-length vector in 4 byte 'oct' encoding to a normalized 3-component vector.
+ *
* @param {Cartesian4} encoded The oct-encoded unit length vector.
* @param {Cartesian3} result The decoded and normalized vector.
* @returns {Cartesian3} The decoded and normalized vector.
- * @throws {DeveloperError} x, y, z, and w must be unsigned normalized integers between 0 and 255.
+ *
+ * @exception {DeveloperError} x, y, z, and w must be unsigned normalized integers between 0 and 255.
+ *
* @see AttributeCompression.octDecodeInRange
* @see AttributeCompression.octEncodeToCartesian4
*/
@@ -181,8 +200,10 @@ AttributeCompression.octDecodeFromCartesian4 = function (encoded, result) {
/**
* Packs an oct encoded vector into a single floating-point number.
+ *
* @param {Cartesian2} encoded The oct encoded vector.
* @returns {number} The oct encoded vector packed into a single float.
+ *
*/
AttributeCompression.octPackFloat = function (encoded) {
//>>includeStart('debug', pragmas.debug);
@@ -196,9 +217,11 @@ const scratchEncodeCart2 = new Cartesian2();
/**
* Encodes a normalized vector into 2 SNORM values in the range of [0-255] following the 'oct' encoding and
* stores those values in a single float-point number.
+ *
* @param {Cartesian3} vector The normalized vector to be compressed into 2 byte 'oct' encoding.
* @returns {number} The 2 byte oct-encoded unit length vector.
- * @throws {DeveloperError} vector must be normalized.
+ *
+ * @exception {DeveloperError} vector must be normalized.
*/
AttributeCompression.octEncodeFloat = function (vector) {
AttributeCompression.octEncode(vector, scratchEncodeCart2);
@@ -207,9 +230,11 @@ AttributeCompression.octEncodeFloat = function (vector) {
/**
* Decodes a unit-length vector in 'oct' encoding packed in a floating-point number to a normalized 3-component vector.
+ *
* @param {number} value The oct-encoded unit length vector stored as a single floating-point number.
* @param {Cartesian3} result The decoded and normalized vector
* @returns {Cartesian3} The decoded and normalized vector.
+ *
*/
AttributeCompression.octDecodeFloat = function (value, result) {
//>>includeStart('debug', pragmas.debug);
@@ -226,11 +251,13 @@ AttributeCompression.octDecodeFloat = function (value, result) {
/**
* Encodes three normalized vectors into 6 SNORM values in the range of [0-255] following the 'oct' encoding and
* packs those into two floating-point numbers.
+ *
* @param {Cartesian3} v1 A normalized vector to be compressed.
* @param {Cartesian3} v2 A normalized vector to be compressed.
* @param {Cartesian3} v3 A normalized vector to be compressed.
* @param {Cartesian2} result The 'oct' encoded vectors packed into two floating-point numbers.
* @returns {Cartesian2} The 'oct' encoded vectors packed into two floating-point numbers.
+ *
*/
AttributeCompression.octPack = function (v1, v2, v3, result) {
//>>includeStart('debug', pragmas.debug);
@@ -251,6 +278,7 @@ AttributeCompression.octPack = function (v1, v2, v3, result) {
/**
* Decodes three unit-length vectors in 'oct' encoding packed into a floating-point number to a normalized 3-component vector.
+ *
* @param {Cartesian2} packed The three oct-encoded unit length vectors stored as two floating-point number.
* @param {Cartesian3} v1 One decoded and normalized vector.
* @param {Cartesian3} v2 One decoded and normalized vector.
@@ -279,8 +307,10 @@ AttributeCompression.octUnpack = function (packed, v1, v2, v3) {
/**
* Pack texture coordinates into a single float. The texture coordinates will only preserve 12 bits of precision.
+ *
* @param {Cartesian2} textureCoordinates The texture coordinates to compress. Both coordinates must be in the range 0.0-1.0.
* @returns {number} The packed texture coordinates.
+ *
*/
AttributeCompression.compressTextureCoordinates = function (
textureCoordinates
@@ -297,9 +327,11 @@ AttributeCompression.compressTextureCoordinates = function (
/**
* Decompresses texture coordinates that were packed into a single float.
+ *
* @param {number} compressed The compressed texture coordinates.
* @param {Cartesian2} result The decompressed texture coordinates.
* @returns {Cartesian2} The modified result parameter.
+ *
*/
AttributeCompression.decompressTextureCoordinates = function (
compressed,
@@ -323,9 +355,11 @@ function zigZagDecode(value) {
/**
* Decodes delta and ZigZag encoded vertices. This modifies the buffers in place.
+ *
* @param {Uint16Array} uBuffer The buffer view of u values.
* @param {Uint16Array} vBuffer The buffer view of v values.
* @param {Uint16Array} [heightBuffer] The buffer view of height values.
+ *
* @see {@link https://github.com/CesiumGS/quantized-mesh|quantized-mesh-1.0 terrain format}
*/
AttributeCompression.zigZagDeltaDecode = function (
@@ -374,11 +408,14 @@ AttributeCompression.zigZagDeltaDecode = function (
/**
* Dequantizes a quantized typed array into a floating point typed array.
+ *
* @see {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_mesh_quantization#encoding-quantized-data}
+ *
* @param {Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array} typedArray The typed array for the quantized data.
* @param {ComponentDatatype} componentDatatype The component datatype of the quantized data.
* @param {AttributeType} type The attribute type of the quantized data.
* @param {number} count The number of attributes referenced in the dequantized array.
+ *
* @returns {Float32Array} The dequantized array.
*/
AttributeCompression.dequantize = function (
@@ -444,6 +481,7 @@ AttributeCompression.dequantize = function (
/**
* Decode RGB565-encoded colors into a floating point typed array containing
* normalized RGB values.
+ *
* @param {Uint16Array} typedArray Array of RGB565 values
* @param {Float32Array} [result] Array to store the normalized VEC3 result
*/
diff --git a/packages/engine/Source/Core/AxisAlignedBoundingBox.js b/packages/engine/Source/Core/AxisAlignedBoundingBox.js
index d388ac795bea..41af002cd3c8 100644
--- a/packages/engine/Source/Core/AxisAlignedBoundingBox.js
+++ b/packages/engine/Source/Core/AxisAlignedBoundingBox.js
@@ -7,10 +7,12 @@ import Intersect from "./Intersect.js";
/**
* Creates an instance of an AxisAlignedBoundingBox from the minimum and maximum points along the x, y, and z axes.
* @alias AxisAlignedBoundingBox
- * @class
- * @param {Cartesian3} [minimum] The minimum point along the x, y, and z axes.
- * @param {Cartesian3} [maximum] The maximum point along the x, y, and z axes.
+ * @constructor
+ *
+ * @param {Cartesian3} [minimum=Cartesian3.ZERO] The minimum point along the x, y, and z axes.
+ * @param {Cartesian3} [maximum=Cartesian3.ZERO] The maximum point along the x, y, and z axes.
* @param {Cartesian3} [center] The center of the box; automatically computed if not supplied.
+ *
* @see BoundingSphere
* @see BoundingRectangle
*/
@@ -45,10 +47,12 @@ function AxisAlignedBoundingBox(minimum, maximum, center) {
/**
* Creates an instance of an AxisAlignedBoundingBox from its corners.
+ *
* @param {Cartesian3} minimum The minimum point along the x, y, and z axes.
* @param {Cartesian3} maximum The maximum point along the x, y, and z axes.
* @param {AxisAlignedBoundingBox} [result] The object onto which to store the result.
* @returns {AxisAlignedBoundingBox} The modified result parameter or a new AxisAlignedBoundingBox instance if one was not provided.
+ *
* @example
* // Compute an axis aligned bounding box from the two corners.
* const box = Cesium.AxisAlignedBoundingBox.fromCorners(new Cesium.Cartesian3(-1, -1, -1), new Cesium.Cartesian3(1, 1, 1));
@@ -73,9 +77,11 @@ AxisAlignedBoundingBox.fromCorners = function (minimum, maximum, result) {
/**
* Computes an instance of an AxisAlignedBoundingBox. The box is determined by
* finding the points spaced the farthest apart on the x, y, and z axes.
+ *
* @param {Cartesian3[]} positions List of points that the bounding box will enclose. Each point must have a x
, y
, and z
properties.
* @param {AxisAlignedBoundingBox} [result] The object onto which to store the result.
* @returns {AxisAlignedBoundingBox} The modified result parameter or a new AxisAlignedBoundingBox instance if one was not provided.
+ *
* @example
* // Compute an axis aligned bounding box enclosing two points.
* const box = Cesium.AxisAlignedBoundingBox.fromPoints([new Cesium.Cartesian3(2, 0, 0), new Cesium.Cartesian3(-2, 0, 0)]);
@@ -132,6 +138,7 @@ AxisAlignedBoundingBox.fromPoints = function (positions, result) {
/**
* Duplicates a AxisAlignedBoundingBox instance.
+ *
* @param {AxisAlignedBoundingBox} box The bounding box to duplicate.
* @param {AxisAlignedBoundingBox} [result] The object onto which to store the result.
* @returns {AxisAlignedBoundingBox} The modified result parameter or a new AxisAlignedBoundingBox instance if none was provided. (Returns undefined if box is undefined)
@@ -154,6 +161,7 @@ AxisAlignedBoundingBox.clone = function (box, result) {
/**
* Compares the provided AxisAlignedBoundingBox componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {AxisAlignedBoundingBox} [left] The first AxisAlignedBoundingBox.
* @param {AxisAlignedBoundingBox} [right] The second AxisAlignedBoundingBox.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -172,6 +180,7 @@ AxisAlignedBoundingBox.equals = function (left, right) {
let intersectScratch = new Cartesian3();
/**
* Determines which side of a plane a box is located.
+ *
* @param {AxisAlignedBoundingBox} box The bounding box to test.
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire box is on the side of the plane
@@ -216,6 +225,7 @@ AxisAlignedBoundingBox.intersectPlane = function (box, plane) {
/**
* Duplicates this AxisAlignedBoundingBox instance.
+ *
* @param {AxisAlignedBoundingBox} [result] The object onto which to store the result.
* @returns {AxisAlignedBoundingBox} The modified result parameter or a new AxisAlignedBoundingBox instance if one was not provided.
*/
@@ -225,6 +235,7 @@ AxisAlignedBoundingBox.prototype.clone = function (result) {
/**
* Determines which side of a plane this box is located.
+ *
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire box is on the side of the plane
* the normal is pointing, {@link Intersect.OUTSIDE} if the entire box is
@@ -238,6 +249,7 @@ AxisAlignedBoundingBox.prototype.intersectPlane = function (plane) {
/**
* Compares this AxisAlignedBoundingBox against the provided AxisAlignedBoundingBox componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {AxisAlignedBoundingBox} [right] The right hand side AxisAlignedBoundingBox.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/Core/BingMapsGeocoderService.js b/packages/engine/Source/Core/BingMapsGeocoderService.js
index 4b2c4141360f..a9292e57015d 100644
--- a/packages/engine/Source/Core/BingMapsGeocoderService.js
+++ b/packages/engine/Source/Core/BingMapsGeocoderService.js
@@ -11,7 +11,8 @@ const url = "https://dev.virtualearth.net/REST/v1/Locations";
/**
* Provides geocoding through Bing Maps.
* @alias BingMapsGeocoderService
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {string} options.key A key to use with the Bing Maps geocoding service
* @param {string} [options.culture] A Bing Maps {@link https://docs.microsoft.com/en-us/bingmaps/rest-services/common-parameters-and-types/supported-culture-codes|Culture Code} to return results in a specific culture and language.
@@ -86,6 +87,7 @@ Object.defineProperties(BingMapsGeocoderService.prototype, {
/**
* @function
+ *
* @param {string} query The query to be sent to the geocoder service
* @returns {Promise}
*/
diff --git a/packages/engine/Source/Core/BoundingRectangle.js b/packages/engine/Source/Core/BoundingRectangle.js
index 6c4b429698c8..f0a1881613ef 100644
--- a/packages/engine/Source/Core/BoundingRectangle.js
+++ b/packages/engine/Source/Core/BoundingRectangle.js
@@ -10,11 +10,13 @@ import Rectangle from "./Rectangle.js";
/**
* A bounding rectangle given by a corner, width and height.
* @alias BoundingRectangle
- * @class
- * @param {number} [x] The x coordinate of the rectangle.
- * @param {number} [y] The y coordinate of the rectangle.
- * @param {number} [width] The width of the rectangle.
- * @param {number} [height] The height of the rectangle.
+ * @constructor
+ *
+ * @param {number} [x=0.0] The x coordinate of the rectangle.
+ * @param {number} [y=0.0] The y coordinate of the rectangle.
+ * @param {number} [width=0.0] The width of the rectangle.
+ * @param {number} [height=0.0] The height of the rectangle.
+ *
* @see BoundingSphere
* @see Packable
*/
@@ -56,9 +58,11 @@ BoundingRectangle.packedLength = 4;
/**
* Stores the provided instance into the provided array.
+ *
* @param {BoundingRectangle} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
BoundingRectangle.pack = function (value, array, startingIndex) {
@@ -79,8 +83,9 @@ BoundingRectangle.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {BoundingRectangle} [result] The object into which to store the result.
* @returns {BoundingRectangle} The modified result parameter or a new BoundingRectangle instance if one was not provided.
*/
@@ -104,6 +109,7 @@ BoundingRectangle.unpack = function (array, startingIndex, result) {
/**
* Computes a bounding rectangle enclosing the list of 2D points.
* The rectangle is oriented with the corner at the bottom left.
+ *
* @param {Cartesian2[]} positions List of points that the bounding rectangle will enclose. Each point must have x
and y
properties.
* @param {BoundingRectangle} [result] The object onto which to store the result.
* @returns {BoundingRectangle} The modified result parameter or a new BoundingRectangle instance if one was not provided.
@@ -152,8 +158,9 @@ const fromRectangleLowerLeft = new Cartographic();
const fromRectangleUpperRight = new Cartographic();
/**
* Computes a bounding rectangle from a rectangle.
+ *
* @param {Rectangle} rectangle The valid rectangle used to create a bounding rectangle.
- * @param {object} [projection] The projection used to project the rectangle into 2D.
+ * @param {object} [projection=GeographicProjection] The projection used to project the rectangle into 2D.
* @param {BoundingRectangle} [result] The object onto which to store the result.
* @returns {BoundingRectangle} The modified result parameter or a new BoundingRectangle instance if one was not provided.
*/
@@ -190,6 +197,7 @@ BoundingRectangle.fromRectangle = function (rectangle, projection, result) {
/**
* Duplicates a BoundingRectangle instance.
+ *
* @param {BoundingRectangle} rectangle The bounding rectangle to duplicate.
* @param {BoundingRectangle} [result] The object onto which to store the result.
* @returns {BoundingRectangle} The modified result parameter or a new BoundingRectangle instance if one was not provided. (Returns undefined if rectangle is undefined)
@@ -217,6 +225,7 @@ BoundingRectangle.clone = function (rectangle, result) {
/**
* Computes a bounding rectangle that is the union of the left and right bounding rectangles.
+ *
* @param {BoundingRectangle} left A rectangle to enclose in bounding rectangle.
* @param {BoundingRectangle} right A rectangle to enclose in a bounding rectangle.
* @param {BoundingRectangle} [result] The object onto which to store the result.
@@ -246,6 +255,7 @@ BoundingRectangle.union = function (left, right, result) {
/**
* Computes a bounding rectangle by enlarging the provided rectangle until it contains the provided point.
+ *
* @param {BoundingRectangle} rectangle A rectangle to expand.
* @param {Cartesian2} point A point to enclose in a bounding rectangle.
* @param {BoundingRectangle} [result] The object onto which to store the result.
@@ -281,6 +291,7 @@ BoundingRectangle.expand = function (rectangle, point, result) {
/**
* Determines if two rectangles intersect.
+ *
* @param {BoundingRectangle} left A rectangle to check for intersection.
* @param {BoundingRectangle} right The other rectangle to check for intersection.
* @returns {Intersect} Intersect.INTERSECTING
if the rectangles intersect, Intersect.OUTSIDE
otherwise.
@@ -312,6 +323,7 @@ BoundingRectangle.intersect = function (left, right) {
/**
* Compares the provided BoundingRectangles componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {BoundingRectangle} [left] The first BoundingRectangle.
* @param {BoundingRectangle} [right] The second BoundingRectangle.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -330,6 +342,7 @@ BoundingRectangle.equals = function (left, right) {
/**
* Duplicates this BoundingRectangle instance.
+ *
* @param {BoundingRectangle} [result] The object onto which to store the result.
* @returns {BoundingRectangle} The modified result parameter or a new BoundingRectangle instance if one was not provided.
*/
@@ -339,6 +352,7 @@ BoundingRectangle.prototype.clone = function (result) {
/**
* Determines if this rectangle intersects with another.
+ *
* @param {BoundingRectangle} right A rectangle to check for intersection.
* @returns {Intersect} Intersect.INTERSECTING
if the rectangles intersect, Intersect.OUTSIDE
otherwise.
*/
@@ -349,6 +363,7 @@ BoundingRectangle.prototype.intersect = function (right) {
/**
* Compares this BoundingRectangle against the provided BoundingRectangle componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {BoundingRectangle} [right] The right hand side BoundingRectangle.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/Core/BoundingSphere.js b/packages/engine/Source/Core/BoundingSphere.js
index cc1495d53cbf..3da2d739f67f 100644
--- a/packages/engine/Source/Core/BoundingSphere.js
+++ b/packages/engine/Source/Core/BoundingSphere.js
@@ -15,9 +15,11 @@ import Rectangle from "./Rectangle.js";
/**
* A bounding sphere with a center and a radius.
* @alias BoundingSphere
- * @class
- * @param {Cartesian3} [center] The center of the bounding sphere.
- * @param {number} [radius] The radius of the bounding sphere.
+ * @constructor
+ *
+ * @param {Cartesian3} [center=Cartesian3.ZERO] The center of the bounding sphere.
+ * @param {number} [radius=0.0] The radius of the bounding sphere.
+ *
* @see AxisAlignedBoundingBox
* @see BoundingRectangle
* @see Packable
@@ -56,9 +58,11 @@ const volumeConstant = (4.0 / 3.0) * CesiumMath.PI;
* Computes a tight-fitting bounding sphere enclosing a list of 3D Cartesian points.
* The bounding sphere is computed by running two algorithms, a naive algorithm and
* Ritter's algorithm. The smaller of the two spheres is used to ensure a tight fit.
+ *
* @param {Cartesian3[]} [positions] An array of points that the bounding sphere will enclose. Each point must have x
, y
, and z
properties.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if one was not provided.
+ *
* @see {@link http://help.agi.com/AGIComponents/html/BlogBoundingSphere.htm|Bounding Sphere computation article}
*/
BoundingSphere.fromPoints = function (positions, result) {
@@ -227,8 +231,9 @@ const fromRectangle2DNortheast = new Cartographic();
/**
* Computes a bounding sphere from a rectangle projected in 2D.
+ *
* @param {Rectangle} [rectangle] The rectangle around which to create a bounding sphere.
- * @param {object} [projection] The projection used to project the rectangle into 2D.
+ * @param {object} [projection=GeographicProjection] The projection used to project the rectangle into 2D.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*/
@@ -245,10 +250,11 @@ BoundingSphere.fromRectangle2D = function (rectangle, projection, result) {
/**
* Computes a bounding sphere from a rectangle projected in 2D. The bounding sphere accounts for the
* object's minimum and maximum heights over the rectangle.
+ *
* @param {Rectangle} [rectangle] The rectangle around which to create a bounding sphere.
- * @param {object} [projection] The projection used to project the rectangle into 2D.
- * @param {number} [minimumHeight] The minimum height over the rectangle.
- * @param {number} [maximumHeight] The maximum height over the rectangle.
+ * @param {object} [projection=GeographicProjection] The projection used to project the rectangle into 2D.
+ * @param {number} [minimumHeight=0.0] The minimum height over the rectangle.
+ * @param {number} [maximumHeight=0.0] The maximum height over the rectangle.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*/
@@ -303,9 +309,10 @@ const fromRectangle3DScratch = [];
/**
* Computes a bounding sphere from a rectangle in 3D. The bounding sphere is created using a subsample of points
* on the ellipsoid and contained in the rectangle. It may not be accurate for all rectangles on all types of ellipsoids.
+ *
* @param {Rectangle} [rectangle] The valid rectangle used to create a bounding sphere.
- * @param {Ellipsoid} [ellipsoid] The ellipsoid used to determine positions of the rectangle.
- * @param {number} [surfaceHeight] The height above the surface of the ellipsoid.
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid used to determine positions of the rectangle.
+ * @param {number} [surfaceHeight=0.0] The height above the surface of the ellipsoid.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*/
@@ -342,12 +349,13 @@ BoundingSphere.fromRectangle3D = function (
* stored in a flat array in X, Y, Z, order. The bounding sphere is computed by running two
* algorithms, a naive algorithm and Ritter's algorithm. The smaller of the two spheres is used to
* ensure a tight fit.
+ *
* @param {number[]} [positions] An array of points that the bounding sphere will enclose. Each point
* is formed from three elements in the array in the order X, Y, Z.
- * @param {Cartesian3} [center] The position to which the positions are relative, which need not be the
+ * @param {Cartesian3} [center=Cartesian3.ZERO] The position to which the positions are relative, which need not be the
* origin of the coordinate system. This is useful when the positions are to be used for
* relative-to-center (RTC) rendering.
- * @param {number} [stride] The number of array elements per vertex. It must be at least 3, but it may
+ * @param {number} [stride=3] The number of array elements per vertex. It must be at least 3, but it may
* be higher. Regardless of the value of this parameter, the X coordinate of the first position
* is at array index 0, the Y coordinate is at array index 1, and the Z coordinate is at array index
* 2. When stride is 3, the X coordinate of the next position then begins at array index 3. If
@@ -355,6 +363,7 @@ BoundingSphere.fromRectangle3D = function (
* index 5.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if one was not provided.
+ *
* @example
* // Compute the bounding sphere from 3 positions, each specified relative to a center.
* // In addition to the X, Y, and Z coordinates, the points array contains two additional
@@ -364,6 +373,7 @@ BoundingSphere.fromRectangle3D = function (
* 4.0, 5.0, 6.0, 0.1, 0.2,
* 7.0, 8.0, 9.0, 0.1, 0.2];
* const sphere = Cesium.BoundingSphere.fromVertices(points, center, 5);
+ *
* @see {@link http://blogs.agi.com/insight3d/index.php/2008/02/04/a-bounding/|Bounding Sphere computation article}
*/
BoundingSphere.fromVertices = function (positions, center, stride, result) {
@@ -544,12 +554,14 @@ BoundingSphere.fromVertices = function (positions, center, stride, result) {
* stored in parallel flat arrays in X, Y, Z, order. The bounding sphere is computed by running two
* algorithms, a naive algorithm and Ritter's algorithm. The smaller of the two spheres is used to
* ensure a tight fit.
+ *
* @param {number[]} [positionsHigh] An array of high bits of the encoded cartesians that the bounding sphere will enclose. Each point
* is formed from three elements in the array in the order X, Y, Z.
* @param {number[]} [positionsLow] An array of low bits of the encoded cartesians that the bounding sphere will enclose. Each point
* is formed from three elements in the array in the order X, Y, Z.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if one was not provided.
+ *
* @see {@link http://blogs.agi.com/insight3d/index.php/2008/02/04/a-bounding/|Bounding Sphere computation article}
*/
BoundingSphere.fromEncodedCartesianVertices = function (
@@ -729,10 +741,12 @@ BoundingSphere.fromEncodedCartesianVertices = function (
/**
* Computes a bounding sphere from the corner points of an axis-aligned bounding box. The sphere
* tightly and fully encompasses the box.
+ *
* @param {Cartesian3} [corner] The minimum height over the rectangle.
* @param {Cartesian3} [oppositeCorner] The maximum height over the rectangle.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
+ *
* @example
* // Create a bounding sphere around the unit cube
* const sphere = Cesium.BoundingSphere.fromCornerPoints(new Cesium.Cartesian3(-0.5, -0.5, -0.5), new Cesium.Cartesian3(0.5, 0.5, 0.5));
@@ -754,9 +768,11 @@ BoundingSphere.fromCornerPoints = function (corner, oppositeCorner, result) {
/**
* Creates a bounding sphere encompassing an ellipsoid.
+ *
* @param {Ellipsoid} ellipsoid The ellipsoid around which to create a bounding sphere.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
+ *
* @example
* const boundingSphere = Cesium.BoundingSphere.fromEllipsoid(ellipsoid);
*/
@@ -778,6 +794,7 @@ const fromBoundingSpheresScratch = new Cartesian3();
/**
* Computes a tight-fitting bounding sphere enclosing the provided array of bounding spheres.
+ *
* @param {BoundingSphere[]} [boundingSpheres] The array of bounding spheres.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
@@ -831,6 +848,7 @@ const fromOrientedBoundingBoxScratchW = new Cartesian3();
/**
* Computes a tight-fitting bounding sphere enclosing the provided oriented bounding box.
+ *
* @param {OrientedBoundingBox} orientedBoundingBox The oriented bounding box.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
@@ -866,6 +884,7 @@ const scratchFromTransformationScale = new Cartesian3();
/**
* Computes a tight-fitting bounding sphere enclosing the provided affine transformation.
+ *
* @param {Matrix4} transformation The affine transformation.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
@@ -896,6 +915,7 @@ BoundingSphere.fromTransformation = function (transformation, result) {
/**
* Duplicates a BoundingSphere instance.
+ *
* @param {BoundingSphere} sphere The bounding sphere to duplicate.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided. (Returns undefined if sphere is undefined)
@@ -922,9 +942,11 @@ BoundingSphere.packedLength = 4;
/**
* Stores the provided instance into the provided array.
+ *
* @param {BoundingSphere} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
BoundingSphere.pack = function (value, array, startingIndex) {
@@ -946,8 +968,9 @@ BoundingSphere.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {BoundingSphere} [result] The object into which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if one was not provided.
*/
@@ -974,6 +997,7 @@ const unionScratch = new Cartesian3();
const unionScratchCenter = new Cartesian3();
/**
* Computes a bounding sphere that contains both the left and right bounding spheres.
+ *
* @param {BoundingSphere} left A sphere to enclose in a bounding sphere.
* @param {BoundingSphere} right A sphere to enclose in a bounding sphere.
* @param {BoundingSphere} [result] The object onto which to store the result.
@@ -1033,6 +1057,7 @@ BoundingSphere.union = function (left, right, result) {
const expandScratch = new Cartesian3();
/**
* Computes a bounding sphere by enlarging the provided sphere to contain the provided point.
+ *
* @param {BoundingSphere} sphere A sphere to expand.
* @param {Cartesian3} point A point to enclose in a bounding sphere.
* @param {BoundingSphere} [result] The object onto which to store the result.
@@ -1058,6 +1083,7 @@ BoundingSphere.expand = function (sphere, point, result) {
/**
* Determines which side of a plane a sphere is located.
+ *
* @param {BoundingSphere} sphere The bounding sphere to test.
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire sphere is on the side of the plane
@@ -1088,6 +1114,7 @@ BoundingSphere.intersectPlane = function (sphere, plane) {
/**
* Applies a 4x4 affine transformation matrix to a bounding sphere.
+ *
* @param {BoundingSphere} sphere The bounding sphere to apply the transformation to.
* @param {Matrix4} transform The transformation matrix to apply to the bounding sphere.
* @param {BoundingSphere} [result] The object onto which to store the result.
@@ -1117,9 +1144,11 @@ const distanceSquaredToScratch = new Cartesian3();
/**
* Computes the estimated distance squared from the closest point on a bounding sphere to a point.
+ *
* @param {BoundingSphere} sphere The sphere.
* @param {Cartesian3} cartesian The point
* @returns {number} The distance squared from the bounding sphere to the point. Returns 0 if the point is inside the sphere.
+ *
* @example
* // Sort bounding spheres from back to front
* spheres.sort(function(a, b) {
@@ -1150,10 +1179,12 @@ BoundingSphere.distanceSquaredTo = function (sphere, cartesian) {
* Applies a 4x4 affine transformation matrix to a bounding sphere where there is no scale
* The transformation matrix is not verified to have a uniform scale of 1.
* This method is faster than computing the general bounding sphere transform using {@link BoundingSphere.transform}.
+ *
* @param {BoundingSphere} sphere The bounding sphere to apply the transformation to.
* @param {Matrix4} transform The transformation matrix to apply to the bounding sphere.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
+ *
* @example
* const modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(positionOnEllipsoid);
* const boundingSphere = new Cesium.BoundingSphere();
@@ -1186,6 +1217,7 @@ const scratchCartesian3 = new Cartesian3();
*
* If you imagine the infinite number of planes with normal direction, this computes the smallest distance to the
* closest and farthest planes from position that intersect the bounding sphere.
+ *
* @param {BoundingSphere} sphere The bounding sphere to calculate the distance to.
* @param {Cartesian3} position The position to calculate the distance from.
* @param {Cartesian3} direction The direction from position.
@@ -1234,8 +1266,9 @@ for (let n = 0; n < 8; ++n) {
const projectTo2DProjection = new GeographicProjection();
/**
* Creates a bounding sphere in 2D from a bounding sphere in 3D world coordinates.
+ *
* @param {BoundingSphere} sphere The bounding sphere to transform to 2D.
- * @param {object} [projection] The projection to 2D.
+ * @param {object} [projection=GeographicProjection] The projection to 2D.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*/
@@ -1345,6 +1378,7 @@ BoundingSphere.projectTo2D = function (sphere, projection, result) {
/**
* Determines whether or not a sphere is hidden from view by the occluder.
+ *
* @param {BoundingSphere} sphere The bounding sphere surrounding the occludee object.
* @param {Occluder} occluder The occluder.
* @returns {boolean} true
if the sphere is not visible; otherwise false
.
@@ -1360,6 +1394,7 @@ BoundingSphere.isOccluded = function (sphere, occluder) {
/**
* Compares the provided BoundingSphere componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {BoundingSphere} [left] The first BoundingSphere.
* @param {BoundingSphere} [right] The second BoundingSphere.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -1376,6 +1411,7 @@ BoundingSphere.equals = function (left, right) {
/**
* Determines which side of a plane the sphere is located.
+ *
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire sphere is on the side of the plane
* the normal is pointing, {@link Intersect.OUTSIDE} if the entire sphere is
@@ -1388,8 +1424,10 @@ BoundingSphere.prototype.intersectPlane = function (plane) {
/**
* Computes the estimated distance squared from the closest point on a bounding sphere to a point.
+ *
* @param {Cartesian3} cartesian The point
* @returns {number} The estimated distance squared from the bounding sphere to the point.
+ *
* @example
* // Sort bounding spheres from back to front
* spheres.sort(function(a, b) {
@@ -1406,6 +1444,7 @@ BoundingSphere.prototype.distanceSquaredTo = function (cartesian) {
*
* If you imagine the infinite number of planes with normal direction, this computes the smallest distance to the
* closest and farthest planes from position that intersect the bounding sphere.
+ *
* @param {Cartesian3} position The position to calculate the distance from.
* @param {Cartesian3} direction The direction from position.
* @param {Interval} [result] A Interval to store the nearest and farthest distances.
@@ -1426,6 +1465,7 @@ BoundingSphere.prototype.computePlaneDistances = function (
/**
* Determines whether or not a sphere is hidden from view by the occluder.
+ *
* @param {Occluder} occluder The occluder.
* @returns {boolean} true
if the sphere is not visible; otherwise false
.
*/
@@ -1436,6 +1476,7 @@ BoundingSphere.prototype.isOccluded = function (occluder) {
/**
* Compares this BoundingSphere against the provided BoundingSphere componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {BoundingSphere} [right] The right hand side BoundingSphere.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -1445,6 +1486,7 @@ BoundingSphere.prototype.equals = function (right) {
/**
* Duplicates this BoundingSphere instance.
+ *
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*/
diff --git a/packages/engine/Source/Core/BoxGeometry.js b/packages/engine/Source/Core/BoxGeometry.js
index 6a530d44c476..405107e0afd5 100644
--- a/packages/engine/Source/Core/BoxGeometry.js
+++ b/packages/engine/Source/Core/BoxGeometry.js
@@ -16,16 +16,21 @@ const diffScratch = new Cartesian3();
/**
* Describes a cube centered at the origin.
+ *
* @alias BoxGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.minimum The minimum x, y, and z coordinates of the box.
* @param {Cartesian3} options.maximum The maximum x, y, and z coordinates of the box.
- * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
+ * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
+ *
* @see BoxGeometry.fromDimensions
* @see BoxGeometry.createGeometry
* @see Packable
+ *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Box.html|Cesium Sandcastle Box Demo}
+ *
* @example
* const box = new Cesium.BoxGeometry({
* vertexFormat : Cesium.VertexFormat.POSITION_ONLY,
@@ -64,17 +69,22 @@ function BoxGeometry(options) {
/**
* Creates a cube centered at the origin given its dimensions.
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.dimensions The width, depth, and height of the box stored in the x, y, and z coordinates of the Cartesian3
, respectively.
- * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
+ * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
* @returns {BoxGeometry}
- * @throws {DeveloperError} All dimensions components must be greater than or equal to zero.
+ *
+ * @exception {DeveloperError} All dimensions components must be greater than or equal to zero.
+ *
+ *
* @example
* const box = Cesium.BoxGeometry.fromDimensions({
* vertexFormat : Cesium.VertexFormat.POSITION_ONLY,
* dimensions : new Cesium.Cartesian3(500000.0, 500000.0, 500000.0)
* });
* const geometry = Cesium.BoxGeometry.createGeometry(box);
+ *
* @see BoxGeometry.createGeometry
*/
BoxGeometry.fromDimensions = function (options) {
@@ -100,8 +110,12 @@ BoxGeometry.fromDimensions = function (options) {
/**
* Creates a cube from the dimensions of an AxisAlignedBoundingBox.
+ *
* @param {AxisAlignedBoundingBox} boundingBox A description of the AxisAlignedBoundingBox.
* @returns {BoxGeometry}
+ *
+ *
+ *
* @example
* const aabb = Cesium.AxisAlignedBoundingBox.fromPoints(Cesium.Cartesian3.fromDegreesArray([
* -72.0, 40.0,
@@ -111,6 +125,7 @@ BoxGeometry.fromDimensions = function (options) {
* -68.0, 40.0
* ]));
* const box = Cesium.BoxGeometry.fromAxisAlignedBoundingBox(aabb);
+ *
* @see BoxGeometry.createGeometry
*/
BoxGeometry.fromAxisAlignedBoundingBox = function (boundingBox) {
@@ -133,9 +148,11 @@ BoxGeometry.packedLength =
/**
* Stores the provided instance into the provided array.
+ *
* @param {BoxGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
BoxGeometry.pack = function (value, array, startingIndex) {
@@ -176,8 +193,9 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {BoxGeometry} [result] The object into which to store the result.
* @returns {BoxGeometry} The modified result parameter or a new BoxGeometry instance if one was not provided.
*/
@@ -221,6 +239,7 @@ BoxGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of a box, including its vertices, indices, and a bounding sphere.
+ *
* @param {BoxGeometry} boxGeometry A description of the box.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
@@ -857,6 +876,7 @@ let unitBoxGeometry;
/**
* Returns the geometric representation of a unit box, including its vertices, indices, and a bounding sphere.
* @returns {Geometry} The computed vertices and indices.
+ *
* @private
*/
BoxGeometry.getUnitBox = function () {
diff --git a/packages/engine/Source/Core/BoxOutlineGeometry.js b/packages/engine/Source/Core/BoxOutlineGeometry.js
index c546ac53de36..5e18ee05e9b1 100644
--- a/packages/engine/Source/Core/BoxOutlineGeometry.js
+++ b/packages/engine/Source/Core/BoxOutlineGeometry.js
@@ -15,14 +15,18 @@ const diffScratch = new Cartesian3();
/**
* A description of the outline of a cube centered at the origin.
+ *
* @alias BoxOutlineGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.minimum The minimum x, y, and z coordinates of the box.
* @param {Cartesian3} options.maximum The maximum x, y, and z coordinates of the box.
+ *
* @see BoxOutlineGeometry.fromDimensions
* @see BoxOutlineGeometry.createGeometry
* @see Packable
+ *
* @example
* const box = new Cesium.BoxOutlineGeometry({
* maximum : new Cesium.Cartesian3(250000.0, 250000.0, 250000.0),
@@ -57,15 +61,20 @@ function BoxOutlineGeometry(options) {
/**
* Creates an outline of a cube centered at the origin given its dimensions.
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.dimensions The width, depth, and height of the box stored in the x, y, and z coordinates of the Cartesian3
, respectively.
* @returns {BoxOutlineGeometry}
- * @throws {DeveloperError} All dimensions components must be greater than or equal to zero.
+ *
+ * @exception {DeveloperError} All dimensions components must be greater than or equal to zero.
+ *
+ *
* @example
* const box = Cesium.BoxOutlineGeometry.fromDimensions({
* dimensions : new Cesium.Cartesian3(500000.0, 500000.0, 500000.0)
* });
* const geometry = Cesium.BoxOutlineGeometry.createGeometry(box);
+ *
* @see BoxOutlineGeometry.createGeometry
*/
BoxOutlineGeometry.fromDimensions = function (options) {
@@ -90,8 +99,12 @@ BoxOutlineGeometry.fromDimensions = function (options) {
/**
* Creates an outline of a cube from the dimensions of an AxisAlignedBoundingBox.
+ *
* @param {AxisAlignedBoundingBox} boundingBox A description of the AxisAlignedBoundingBox.
* @returns {BoxOutlineGeometry}
+ *
+ *
+ *
* @example
* const aabb = Cesium.AxisAlignedBoundingBox.fromPoints(Cesium.Cartesian3.fromDegreesArray([
* -72.0, 40.0,
@@ -101,6 +114,7 @@ BoxOutlineGeometry.fromDimensions = function (options) {
* -68.0, 40.0
* ]));
* const box = Cesium.BoxOutlineGeometry.fromAxisAlignedBoundingBox(aabb);
+ *
* @see BoxOutlineGeometry.createGeometry
*/
BoxOutlineGeometry.fromAxisAlignedBoundingBox = function (boundingBox) {
@@ -122,9 +136,11 @@ BoxOutlineGeometry.packedLength = 2 * Cartesian3.packedLength + 1;
/**
* Stores the provided instance into the provided array.
+ *
* @param {BoxOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
BoxOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -155,8 +171,9 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {BoxOutlineGeometry} [result] The object into which to store the result.
* @returns {BoxOutlineGeometry} The modified result parameter or a new BoxOutlineGeometry instance if one was not provided.
*/
@@ -191,6 +208,7 @@ BoxOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an outline of a box, including its vertices, indices, and a bounding sphere.
+ *
* @param {BoxOutlineGeometry} boxGeometry A description of the box outline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/Cartesian2.js b/packages/engine/Source/Core/Cartesian2.js
index 1ba0d086f7a2..9d7d8137359c 100644
--- a/packages/engine/Source/Core/Cartesian2.js
+++ b/packages/engine/Source/Core/Cartesian2.js
@@ -7,9 +7,11 @@ import CesiumMath from "./Math.js";
/**
* A 2D Cartesian point.
* @alias Cartesian2
- * @class
- * @param {number} [x] The X component.
- * @param {number} [y] The Y component.
+ * @constructor
+ *
+ * @param {number} [x=0.0] The X component.
+ * @param {number} [y=0.0] The Y component.
+ *
* @see Cartesian3
* @see Cartesian4
* @see Packable
@@ -32,6 +34,7 @@ function Cartesian2(x, y) {
/**
* Creates a Cartesian2 instance from x and y coordinates.
+ *
* @param {number} x The x coordinate.
* @param {number} y The y coordinate.
* @param {Cartesian2} [result] The object onto which to store the result.
@@ -49,6 +52,7 @@ Cartesian2.fromElements = function (x, y, result) {
/**
* Duplicates a Cartesian2 instance.
+ *
* @param {Cartesian2} cartesian The Cartesian to duplicate.
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if one was not provided. (Returns undefined if cartesian is undefined)
@@ -70,6 +74,7 @@ Cartesian2.clone = function (cartesian, result) {
* Creates a Cartesian2 instance from an existing Cartesian3. This simply takes the
* x and y properties of the Cartesian3 and drops z.
* @function
+ *
* @param {Cartesian3} cartesian The Cartesian3 instance to create a Cartesian2 instance from.
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if one was not provided.
@@ -80,6 +85,7 @@ Cartesian2.fromCartesian3 = Cartesian2.clone;
* Creates a Cartesian2 instance from an existing Cartesian4. This simply takes the
* x and y properties of the Cartesian4 and drops z and w.
* @function
+ *
* @param {Cartesian4} cartesian The Cartesian4 instance to create a Cartesian2 instance from.
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if one was not provided.
@@ -94,9 +100,11 @@ Cartesian2.packedLength = 2;
/**
* Stores the provided instance into the provided array.
+ *
* @param {Cartesian2} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
Cartesian2.pack = function (value, array, startingIndex) {
@@ -115,8 +123,9 @@ Cartesian2.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Cartesian2} [result] The object into which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if one was not provided.
*/
@@ -137,6 +146,7 @@ Cartesian2.unpack = function (array, startingIndex, result) {
/**
* Flattens an array of Cartesian2s into an array of components.
+ *
* @param {Cartesian2[]} array The array of cartesians to pack.
* @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 2 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 2) elements.
* @returns {number[]} The packed array.
@@ -168,6 +178,7 @@ Cartesian2.packArray = function (array, result) {
/**
* Unpacks an array of cartesian components into an array of Cartesian2s.
+ *
* @param {number[]} array The array of components to unpack.
* @param {Cartesian2[]} [result] The array onto which to store the result.
* @returns {Cartesian2[]} The unpacked array.
@@ -198,10 +209,12 @@ Cartesian2.unpackArray = function (array, result) {
/**
* Creates a Cartesian2 from two consecutive elements in an array.
* @function
+ *
* @param {number[]} array The array whose two consecutive elements correspond to the x and y components, respectively.
* @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to the x component.
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if one was not provided.
+ *
* @example
* // Create a Cartesian2 with (1.0, 2.0)
* const v = [1.0, 2.0];
@@ -215,6 +228,7 @@ Cartesian2.fromArray = Cartesian2.unpack;
/**
* Computes the value of the maximum component for the supplied Cartesian.
+ *
* @param {Cartesian2} cartesian The cartesian to use.
* @returns {number} The value of the maximum component.
*/
@@ -228,6 +242,7 @@ Cartesian2.maximumComponent = function (cartesian) {
/**
* Computes the value of the minimum component for the supplied Cartesian.
+ *
* @param {Cartesian2} cartesian The cartesian to use.
* @returns {number} The value of the minimum component.
*/
@@ -241,6 +256,7 @@ Cartesian2.minimumComponent = function (cartesian) {
/**
* Compares two Cartesians and computes a Cartesian which contains the minimum components of the supplied Cartesians.
+ *
* @param {Cartesian2} first A cartesian to compare.
* @param {Cartesian2} second A cartesian to compare.
* @param {Cartesian2} result The object into which to store the result.
@@ -261,6 +277,7 @@ Cartesian2.minimumByComponent = function (first, second, result) {
/**
* Compares two Cartesians and computes a Cartesian which contains the maximum components of the supplied Cartesians.
+ *
* @param {Cartesian2} first A cartesian to compare.
* @param {Cartesian2} second A cartesian to compare.
* @param {Cartesian2} result The object into which to store the result.
@@ -280,6 +297,7 @@ Cartesian2.maximumByComponent = function (first, second, result) {
/**
* Constrain a value to lie between two values.
+ *
* @param {Cartesian2} value The value to clamp.
* @param {Cartesian2} min The minimum bound.
* @param {Cartesian2} max The maximum bound.
@@ -305,6 +323,7 @@ Cartesian2.clamp = function (value, min, max, result) {
/**
* Computes the provided Cartesian's squared magnitude.
+ *
* @param {Cartesian2} cartesian The Cartesian instance whose squared magnitude is to be computed.
* @returns {number} The squared magnitude.
*/
@@ -318,6 +337,7 @@ Cartesian2.magnitudeSquared = function (cartesian) {
/**
* Computes the Cartesian's magnitude (length).
+ *
* @param {Cartesian2} cartesian The Cartesian instance whose magnitude is to be computed.
* @returns {number} The magnitude.
*/
@@ -329,9 +349,11 @@ const distanceScratch = new Cartesian2();
/**
* Computes the distance between two points.
+ *
* @param {Cartesian2} left The first point to compute the distance from.
* @param {Cartesian2} right The second point to compute the distance to.
* @returns {number} The distance between two points.
+ *
* @example
* // Returns 1.0
* const d = Cesium.Cartesian2.distance(new Cesium.Cartesian2(1.0, 0.0), new Cesium.Cartesian2(2.0, 0.0));
@@ -349,9 +371,11 @@ Cartesian2.distance = function (left, right) {
/**
* Computes the squared distance between two points. Comparing squared distances
* using this function is more efficient than comparing distances using {@link Cartesian2#distance}.
+ *
* @param {Cartesian2} left The first point to compute the distance from.
* @param {Cartesian2} right The second point to compute the distance to.
* @returns {number} The distance between two points.
+ *
* @example
* // Returns 4.0, not 2.0
* const d = Cesium.Cartesian2.distance(new Cesium.Cartesian2(1.0, 0.0), new Cesium.Cartesian2(3.0, 0.0));
@@ -368,6 +392,7 @@ Cartesian2.distanceSquared = function (left, right) {
/**
* Computes the normalized form of the supplied Cartesian.
+ *
* @param {Cartesian2} cartesian The Cartesian to be normalized.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter.
@@ -394,6 +419,7 @@ Cartesian2.normalize = function (cartesian, result) {
/**
* Computes the dot (scalar) product of two Cartesians.
+ *
* @param {Cartesian2} left The first Cartesian.
* @param {Cartesian2} right The second Cartesian.
* @returns {number} The dot product.
@@ -409,6 +435,7 @@ Cartesian2.dot = function (left, right) {
/**
* Computes the magnitude of the cross product that would result from implicitly setting the Z coordinate of the input vectors to 0
+ *
* @param {Cartesian2} left The first Cartesian.
* @param {Cartesian2} right The second Cartesian.
* @returns {number} The cross product.
@@ -424,6 +451,7 @@ Cartesian2.cross = function (left, right) {
/**
* Computes the componentwise product of two Cartesians.
+ *
* @param {Cartesian2} left The first Cartesian.
* @param {Cartesian2} right The second Cartesian.
* @param {Cartesian2} result The object onto which to store the result.
@@ -443,6 +471,7 @@ Cartesian2.multiplyComponents = function (left, right, result) {
/**
* Computes the componentwise quotient of two Cartesians.
+ *
* @param {Cartesian2} left The first Cartesian.
* @param {Cartesian2} right The second Cartesian.
* @param {Cartesian2} result The object onto which to store the result.
@@ -462,6 +491,7 @@ Cartesian2.divideComponents = function (left, right, result) {
/**
* Computes the componentwise sum of two Cartesians.
+ *
* @param {Cartesian2} left The first Cartesian.
* @param {Cartesian2} right The second Cartesian.
* @param {Cartesian2} result The object onto which to store the result.
@@ -481,6 +511,7 @@ Cartesian2.add = function (left, right, result) {
/**
* Computes the componentwise difference of two Cartesians.
+ *
* @param {Cartesian2} left The first Cartesian.
* @param {Cartesian2} right The second Cartesian.
* @param {Cartesian2} result The object onto which to store the result.
@@ -500,6 +531,7 @@ Cartesian2.subtract = function (left, right, result) {
/**
* Multiplies the provided Cartesian componentwise by the provided scalar.
+ *
* @param {Cartesian2} cartesian The Cartesian to be scaled.
* @param {number} scalar The scalar to multiply with.
* @param {Cartesian2} result The object onto which to store the result.
@@ -519,6 +551,7 @@ Cartesian2.multiplyByScalar = function (cartesian, scalar, result) {
/**
* Divides the provided Cartesian componentwise by the provided scalar.
+ *
* @param {Cartesian2} cartesian The Cartesian to be divided.
* @param {number} scalar The scalar to divide by.
* @param {Cartesian2} result The object onto which to store the result.
@@ -538,6 +571,7 @@ Cartesian2.divideByScalar = function (cartesian, scalar, result) {
/**
* Negates the provided Cartesian.
+ *
* @param {Cartesian2} cartesian The Cartesian to be negated.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter.
@@ -555,6 +589,7 @@ Cartesian2.negate = function (cartesian, result) {
/**
* Computes the absolute value of the provided Cartesian.
+ *
* @param {Cartesian2} cartesian The Cartesian whose absolute value is to be computed.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter.
@@ -573,6 +608,7 @@ Cartesian2.abs = function (cartesian, result) {
const lerpScratch = new Cartesian2();
/**
* Computes the linear interpolation or extrapolation at t using the provided cartesians.
+ *
* @param {Cartesian2} start The value corresponding to t at 0.0.
* @param {Cartesian2} end The value corresponding to t at 1.0.
* @param {number} t The point along t at which to interpolate.
@@ -596,6 +632,7 @@ const angleBetweenScratch = new Cartesian2();
const angleBetweenScratch2 = new Cartesian2();
/**
* Returns the angle, in radians, between the provided Cartesians.
+ *
* @param {Cartesian2} left The first Cartesian.
* @param {Cartesian2} right The second Cartesian.
* @returns {number} The angle between the Cartesians.
@@ -616,6 +653,7 @@ Cartesian2.angleBetween = function (left, right) {
const mostOrthogonalAxisScratch = new Cartesian2();
/**
* Returns the axis that is most orthogonal to the provided Cartesian.
+ *
* @param {Cartesian2} cartesian The Cartesian on which to find the most orthogonal axis.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The most orthogonal axis.
@@ -641,6 +679,7 @@ Cartesian2.mostOrthogonalAxis = function (cartesian, result) {
/**
* Compares the provided Cartesians componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {Cartesian2} [left] The first Cartesian.
* @param {Cartesian2} [right] The second Cartesian.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -656,9 +695,6 @@ Cartesian2.equals = function (left, right) {
};
/**
- * @param cartesian
- * @param array
- * @param offset
* @private
*/
Cartesian2.equalsArray = function (cartesian, array, offset) {
@@ -669,10 +705,11 @@ Cartesian2.equalsArray = function (cartesian, array, offset) {
* Compares the provided Cartesians componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
+ *
* @param {Cartesian2} [left] The first Cartesian.
* @param {Cartesian2} [right] The second Cartesian.
- * @param {number} [relativeEpsilon] The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
*/
Cartesian2.equalsEpsilon = function (
@@ -702,6 +739,7 @@ Cartesian2.equalsEpsilon = function (
/**
* An immutable Cartesian2 instance initialized to (0.0, 0.0).
+ *
* @type {Cartesian2}
* @constant
*/
@@ -709,6 +747,7 @@ Cartesian2.ZERO = Object.freeze(new Cartesian2(0.0, 0.0));
/**
* An immutable Cartesian2 instance initialized to (1.0, 1.0).
+ *
* @type {Cartesian2}
* @constant
*/
@@ -716,6 +755,7 @@ Cartesian2.ONE = Object.freeze(new Cartesian2(1.0, 1.0));
/**
* An immutable Cartesian2 instance initialized to (1.0, 0.0).
+ *
* @type {Cartesian2}
* @constant
*/
@@ -723,6 +763,7 @@ Cartesian2.UNIT_X = Object.freeze(new Cartesian2(1.0, 0.0));
/**
* An immutable Cartesian2 instance initialized to (0.0, 1.0).
+ *
* @type {Cartesian2}
* @constant
*/
@@ -730,6 +771,7 @@ Cartesian2.UNIT_Y = Object.freeze(new Cartesian2(0.0, 1.0));
/**
* Duplicates this Cartesian2 instance.
+ *
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if one was not provided.
*/
@@ -740,6 +782,7 @@ Cartesian2.prototype.clone = function (result) {
/**
* Compares this Cartesian against the provided Cartesian componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {Cartesian2} [right] The right hand side Cartesian.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -751,9 +794,10 @@ Cartesian2.prototype.equals = function (right) {
* Compares this Cartesian against the provided Cartesian componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
+ *
* @param {Cartesian2} [right] The right hand side Cartesian.
- * @param {number} [relativeEpsilon] The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if they are within the provided epsilon, false
otherwise.
*/
Cartesian2.prototype.equalsEpsilon = function (
@@ -771,6 +815,7 @@ Cartesian2.prototype.equalsEpsilon = function (
/**
* Creates a string representing this Cartesian in the format '(x, y)'.
+ *
* @returns {string} A string representing the provided Cartesian in the format '(x, y)'.
*/
Cartesian2.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/Cartesian3.js b/packages/engine/Source/Core/Cartesian3.js
index 7a13e07a60d6..934917052da6 100644
--- a/packages/engine/Source/Core/Cartesian3.js
+++ b/packages/engine/Source/Core/Cartesian3.js
@@ -7,10 +7,12 @@ import CesiumMath from "./Math.js";
/**
* A 3D Cartesian point.
* @alias Cartesian3
- * @class
- * @param {number} [x] The X component.
- * @param {number} [y] The Y component.
- * @param {number} [z] The Z component.
+ * @constructor
+ *
+ * @param {number} [x=0.0] The X component.
+ * @param {number} [y=0.0] The Y component.
+ * @param {number} [z=0.0] The Z component.
+ *
* @see Cartesian2
* @see Cartesian4
* @see Packable
@@ -40,6 +42,7 @@ function Cartesian3(x, y, z) {
/**
* Converts the provided Spherical into Cartesian3 coordinates.
+ *
* @param {Spherical} spherical The Spherical to be converted to Cartesian3.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.
@@ -65,6 +68,7 @@ Cartesian3.fromSpherical = function (spherical, result) {
/**
* Creates a Cartesian3 instance from x, y and z coordinates.
+ *
* @param {number} x The x coordinate.
* @param {number} y The y coordinate.
* @param {number} z The z coordinate.
@@ -84,6 +88,7 @@ Cartesian3.fromElements = function (x, y, z, result) {
/**
* Duplicates a Cartesian3 instance.
+ *
* @param {Cartesian3} cartesian The Cartesian to duplicate.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided. (Returns undefined if cartesian is undefined)
@@ -106,6 +111,7 @@ Cartesian3.clone = function (cartesian, result) {
* Creates a Cartesian3 instance from an existing Cartesian4. This simply takes the
* x, y, and z properties of the Cartesian4 and drops w.
* @function
+ *
* @param {Cartesian4} cartesian The Cartesian4 instance to create a Cartesian3 instance from.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.
@@ -120,9 +126,11 @@ Cartesian3.packedLength = 3;
/**
* Stores the provided instance into the provided array.
+ *
* @param {Cartesian3} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
Cartesian3.pack = function (value, array, startingIndex) {
@@ -142,8 +150,9 @@ Cartesian3.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Cartesian3} [result] The object into which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.
*/
@@ -165,6 +174,7 @@ Cartesian3.unpack = function (array, startingIndex, result) {
/**
* Flattens an array of Cartesian3s into an array of components.
+ *
* @param {Cartesian3[]} array The array of cartesians to pack.
* @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 3 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 3) elements.
* @returns {number[]} The packed array.
@@ -196,6 +206,7 @@ Cartesian3.packArray = function (array, result) {
/**
* Unpacks an array of cartesian components into an array of Cartesian3s.
+ *
* @param {number[]} array The array of components to unpack.
* @param {Cartesian3[]} [result] The array onto which to store the result.
* @returns {Cartesian3[]} The unpacked array.
@@ -226,10 +237,12 @@ Cartesian3.unpackArray = function (array, result) {
/**
* Creates a Cartesian3 from three consecutive elements in an array.
* @function
+ *
* @param {number[]} array The array whose three consecutive elements correspond to the x, y, and z components, respectively.
* @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to the x component.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.
+ *
* @example
* // Create a Cartesian3 with (1.0, 2.0, 3.0)
* const v = [1.0, 2.0, 3.0];
@@ -243,6 +256,7 @@ Cartesian3.fromArray = Cartesian3.unpack;
/**
* Computes the value of the maximum component for the supplied Cartesian.
+ *
* @param {Cartesian3} cartesian The cartesian to use.
* @returns {number} The value of the maximum component.
*/
@@ -256,6 +270,7 @@ Cartesian3.maximumComponent = function (cartesian) {
/**
* Computes the value of the minimum component for the supplied Cartesian.
+ *
* @param {Cartesian3} cartesian The cartesian to use.
* @returns {number} The value of the minimum component.
*/
@@ -269,6 +284,7 @@ Cartesian3.minimumComponent = function (cartesian) {
/**
* Compares two Cartesians and computes a Cartesian which contains the minimum components of the supplied Cartesians.
+ *
* @param {Cartesian3} first A cartesian to compare.
* @param {Cartesian3} second A cartesian to compare.
* @param {Cartesian3} result The object into which to store the result.
@@ -290,6 +306,7 @@ Cartesian3.minimumByComponent = function (first, second, result) {
/**
* Compares two Cartesians and computes a Cartesian which contains the maximum components of the supplied Cartesians.
+ *
* @param {Cartesian3} first A cartesian to compare.
* @param {Cartesian3} second A cartesian to compare.
* @param {Cartesian3} result The object into which to store the result.
@@ -310,8 +327,8 @@ Cartesian3.maximumByComponent = function (first, second, result) {
/**
* Constrain a value to lie between two values.
+ *
* @param {Cartesian3} cartesian The value to clamp.
- * @param value
* @param {Cartesian3} min The minimum bound.
* @param {Cartesian3} max The maximum bound.
* @param {Cartesian3} result The object into which to store the result.
@@ -338,6 +355,7 @@ Cartesian3.clamp = function (value, min, max, result) {
/**
* Computes the provided Cartesian's squared magnitude.
+ *
* @param {Cartesian3} cartesian The Cartesian instance whose squared magnitude is to be computed.
* @returns {number} The squared magnitude.
*/
@@ -355,6 +373,7 @@ Cartesian3.magnitudeSquared = function (cartesian) {
/**
* Computes the Cartesian's magnitude (length).
+ *
* @param {Cartesian3} cartesian The Cartesian instance whose magnitude is to be computed.
* @returns {number} The magnitude.
*/
@@ -366,9 +385,11 @@ const distanceScratch = new Cartesian3();
/**
* Computes the distance between two points.
+ *
* @param {Cartesian3} left The first point to compute the distance from.
* @param {Cartesian3} right The second point to compute the distance to.
* @returns {number} The distance between two points.
+ *
* @example
* // Returns 1.0
* const d = Cesium.Cartesian3.distance(new Cesium.Cartesian3(1.0, 0.0, 0.0), new Cesium.Cartesian3(2.0, 0.0, 0.0));
@@ -386,9 +407,11 @@ Cartesian3.distance = function (left, right) {
/**
* Computes the squared distance between two points. Comparing squared distances
* using this function is more efficient than comparing distances using {@link Cartesian3#distance}.
+ *
* @param {Cartesian3} left The first point to compute the distance from.
* @param {Cartesian3} right The second point to compute the distance to.
* @returns {number} The distance between two points.
+ *
* @example
* // Returns 4.0, not 2.0
* const d = Cesium.Cartesian3.distanceSquared(new Cesium.Cartesian3(1.0, 0.0, 0.0), new Cesium.Cartesian3(3.0, 0.0, 0.0));
@@ -405,6 +428,7 @@ Cartesian3.distanceSquared = function (left, right) {
/**
* Computes the normalized form of the supplied Cartesian.
+ *
* @param {Cartesian3} cartesian The Cartesian to be normalized.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
@@ -432,6 +456,7 @@ Cartesian3.normalize = function (cartesian, result) {
/**
* Computes the dot (scalar) product of two Cartesians.
+ *
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @returns {number} The dot product.
@@ -447,6 +472,7 @@ Cartesian3.dot = function (left, right) {
/**
* Computes the componentwise product of two Cartesians.
+ *
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @param {Cartesian3} result The object onto which to store the result.
@@ -467,6 +493,7 @@ Cartesian3.multiplyComponents = function (left, right, result) {
/**
* Computes the componentwise quotient of two Cartesians.
+ *
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @param {Cartesian3} result The object onto which to store the result.
@@ -487,6 +514,7 @@ Cartesian3.divideComponents = function (left, right, result) {
/**
* Computes the componentwise sum of two Cartesians.
+ *
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @param {Cartesian3} result The object onto which to store the result.
@@ -507,6 +535,7 @@ Cartesian3.add = function (left, right, result) {
/**
* Computes the componentwise difference of two Cartesians.
+ *
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @param {Cartesian3} result The object onto which to store the result.
@@ -527,6 +556,7 @@ Cartesian3.subtract = function (left, right, result) {
/**
* Multiplies the provided Cartesian componentwise by the provided scalar.
+ *
* @param {Cartesian3} cartesian The Cartesian to be scaled.
* @param {number} scalar The scalar to multiply with.
* @param {Cartesian3} result The object onto which to store the result.
@@ -547,6 +577,7 @@ Cartesian3.multiplyByScalar = function (cartesian, scalar, result) {
/**
* Divides the provided Cartesian componentwise by the provided scalar.
+ *
* @param {Cartesian3} cartesian The Cartesian to be divided.
* @param {number} scalar The scalar to divide by.
* @param {Cartesian3} result The object onto which to store the result.
@@ -567,6 +598,7 @@ Cartesian3.divideByScalar = function (cartesian, scalar, result) {
/**
* Negates the provided Cartesian.
+ *
* @param {Cartesian3} cartesian The Cartesian to be negated.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
@@ -585,6 +617,7 @@ Cartesian3.negate = function (cartesian, result) {
/**
* Computes the absolute value of the provided Cartesian.
+ *
* @param {Cartesian3} cartesian The Cartesian whose absolute value is to be computed.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
@@ -604,6 +637,7 @@ Cartesian3.abs = function (cartesian, result) {
const lerpScratch = new Cartesian3();
/**
* Computes the linear interpolation or extrapolation at t using the provided cartesians.
+ *
* @param {Cartesian3} start The value corresponding to t at 0.0.
* @param {Cartesian3} end The value corresponding to t at 1.0.
* @param {number} t The point along t at which to interpolate.
@@ -627,6 +661,7 @@ const angleBetweenScratch = new Cartesian3();
const angleBetweenScratch2 = new Cartesian3();
/**
* Returns the angle, in radians, between the provided Cartesians.
+ *
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @returns {number} The angle between the Cartesians.
@@ -653,6 +688,7 @@ Cartesian3.angleBetween = function (left, right) {
const mostOrthogonalAxisScratch = new Cartesian3();
/**
* Returns the axis that is most orthogonal to the provided Cartesian.
+ *
* @param {Cartesian3} cartesian The Cartesian on which to find the most orthogonal axis.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The most orthogonal axis.
@@ -702,6 +738,7 @@ Cartesian3.projectVector = function (a, b, result) {
/**
* Compares the provided Cartesians componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {Cartesian3} [left] The first Cartesian.
* @param {Cartesian3} [right] The second Cartesian.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -718,9 +755,6 @@ Cartesian3.equals = function (left, right) {
};
/**
- * @param cartesian
- * @param array
- * @param offset
* @private
*/
Cartesian3.equalsArray = function (cartesian, array, offset) {
@@ -735,10 +769,11 @@ Cartesian3.equalsArray = function (cartesian, array, offset) {
* Compares the provided Cartesians componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
+ *
* @param {Cartesian3} [left] The first Cartesian.
* @param {Cartesian3} [right] The second Cartesian.
- * @param {number} [relativeEpsilon] The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
*/
Cartesian3.equalsEpsilon = function (
@@ -774,6 +809,7 @@ Cartesian3.equalsEpsilon = function (
/**
* Computes the cross (outer) product of two Cartesians.
+ *
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @param {Cartesian3} result The object onto which to store the result.
@@ -826,12 +862,14 @@ Cartesian3.midpoint = function (left, right, result) {
/**
* Returns a Cartesian3 position from longitude and latitude values given in degrees.
+ *
* @param {number} longitude The longitude, in degrees
* @param {number} latitude The latitude, in degrees
- * @param {number} [height] The height, in meters, above the ellipsoid.
- * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the position lies.
+ * @param {number} [height=0.0] The height, in meters, above the ellipsoid.
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The position
+ *
* @example
* const position = Cesium.Cartesian3.fromDegrees(-115.0, 37.0);
*/
@@ -862,12 +900,14 @@ const wgs84RadiiSquared = new Cartesian3(
/**
* Returns a Cartesian3 position from longitude and latitude values given in radians.
+ *
* @param {number} longitude The longitude, in radians
* @param {number} latitude The latitude, in radians
- * @param {number} [height] The height, in meters, above the ellipsoid.
- * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the position lies.
+ * @param {number} [height=0.0] The height, in meters, above the ellipsoid.
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The position
+ *
* @example
* const position = Cesium.Cartesian3.fromRadians(-2.007, 0.645);
*/
@@ -907,10 +947,12 @@ Cartesian3.fromRadians = function (
/**
* Returns an array of Cartesian3 positions given an array of longitude and latitude values given in degrees.
+ *
* @param {number[]} coordinates A list of longitude and latitude values. Values alternate [longitude, latitude, longitude, latitude...].
- * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the coordinates lie.
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the coordinates lie.
* @param {Cartesian3[]} [result] An array of Cartesian3 objects to store the result.
* @returns {Cartesian3[]} The array of positions.
+ *
* @example
* const positions = Cesium.Cartesian3.fromDegreesArray([-115.0, 37.0, -107.0, 33.0]);
*/
@@ -949,10 +991,12 @@ Cartesian3.fromDegreesArray = function (coordinates, ellipsoid, result) {
/**
* Returns an array of Cartesian3 positions given an array of longitude and latitude values given in radians.
+ *
* @param {number[]} coordinates A list of longitude and latitude values. Values alternate [longitude, latitude, longitude, latitude...].
- * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the coordinates lie.
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the coordinates lie.
* @param {Cartesian3[]} [result] An array of Cartesian3 objects to store the result.
* @returns {Cartesian3[]} The array of positions.
+ *
* @example
* const positions = Cesium.Cartesian3.fromRadiansArray([-2.007, 0.645, -1.867, .575]);
*/
@@ -991,10 +1035,12 @@ Cartesian3.fromRadiansArray = function (coordinates, ellipsoid, result) {
/**
* Returns an array of Cartesian3 positions given an array of longitude, latitude and height values where longitude and latitude are given in degrees.
+ *
* @param {number[]} coordinates A list of longitude, latitude and height values. Values alternate [longitude, latitude, height, longitude, latitude, height...].
- * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the position lies.
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
* @param {Cartesian3[]} [result] An array of Cartesian3 objects to store the result.
* @returns {Cartesian3[]} The array of positions.
+ *
* @example
* const positions = Cesium.Cartesian3.fromDegreesArrayHeights([-115.0, 37.0, 100000.0, -107.0, 33.0, 150000.0]);
*/
@@ -1034,10 +1080,12 @@ Cartesian3.fromDegreesArrayHeights = function (coordinates, ellipsoid, result) {
/**
* Returns an array of Cartesian3 positions given an array of longitude, latitude and height values where longitude and latitude are given in radians.
+ *
* @param {number[]} coordinates A list of longitude, latitude and height values. Values alternate [longitude, latitude, height, longitude, latitude, height...].
- * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the position lies.
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
* @param {Cartesian3[]} [result] An array of Cartesian3 objects to store the result.
* @returns {Cartesian3[]} The array of positions.
+ *
* @example
* const positions = Cesium.Cartesian3.fromRadiansArrayHeights([-2.007, 0.645, 100000.0, -1.867, .575, 150000.0]);
*/
@@ -1077,6 +1125,7 @@ Cartesian3.fromRadiansArrayHeights = function (coordinates, ellipsoid, result) {
/**
* An immutable Cartesian3 instance initialized to (0.0, 0.0, 0.0).
+ *
* @type {Cartesian3}
* @constant
*/
@@ -1084,6 +1133,7 @@ Cartesian3.ZERO = Object.freeze(new Cartesian3(0.0, 0.0, 0.0));
/**
* An immutable Cartesian3 instance initialized to (1.0, 1.0, 1.0).
+ *
* @type {Cartesian3}
* @constant
*/
@@ -1091,6 +1141,7 @@ Cartesian3.ONE = Object.freeze(new Cartesian3(1.0, 1.0, 1.0));
/**
* An immutable Cartesian3 instance initialized to (1.0, 0.0, 0.0).
+ *
* @type {Cartesian3}
* @constant
*/
@@ -1098,6 +1149,7 @@ Cartesian3.UNIT_X = Object.freeze(new Cartesian3(1.0, 0.0, 0.0));
/**
* An immutable Cartesian3 instance initialized to (0.0, 1.0, 0.0).
+ *
* @type {Cartesian3}
* @constant
*/
@@ -1105,6 +1157,7 @@ Cartesian3.UNIT_Y = Object.freeze(new Cartesian3(0.0, 1.0, 0.0));
/**
* An immutable Cartesian3 instance initialized to (0.0, 0.0, 1.0).
+ *
* @type {Cartesian3}
* @constant
*/
@@ -1112,6 +1165,7 @@ Cartesian3.UNIT_Z = Object.freeze(new Cartesian3(0.0, 0.0, 1.0));
/**
* Duplicates this Cartesian3 instance.
+ *
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.
*/
@@ -1122,6 +1176,7 @@ Cartesian3.prototype.clone = function (result) {
/**
* Compares this Cartesian against the provided Cartesian componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {Cartesian3} [right] The right hand side Cartesian.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -1133,9 +1188,10 @@ Cartesian3.prototype.equals = function (right) {
* Compares this Cartesian against the provided Cartesian componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
+ *
* @param {Cartesian3} [right] The right hand side Cartesian.
- * @param {number} [relativeEpsilon] The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if they are within the provided epsilon, false
otherwise.
*/
Cartesian3.prototype.equalsEpsilon = function (
@@ -1153,6 +1209,7 @@ Cartesian3.prototype.equalsEpsilon = function (
/**
* Creates a string representing this Cartesian in the format '(x, y, z)'.
+ *
* @returns {string} A string representing this Cartesian in the format '(x, y, z)'.
*/
Cartesian3.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/Cartesian4.js b/packages/engine/Source/Core/Cartesian4.js
index 3b008d6a0d3c..fa841cc9b2aa 100644
--- a/packages/engine/Source/Core/Cartesian4.js
+++ b/packages/engine/Source/Core/Cartesian4.js
@@ -7,11 +7,13 @@ import CesiumMath from "./Math.js";
/**
* A 4D Cartesian point.
* @alias Cartesian4
- * @class
- * @param {number} [x] The X component.
- * @param {number} [y] The Y component.
- * @param {number} [z] The Z component.
- * @param {number} [w] The W component.
+ * @constructor
+ *
+ * @param {number} [x=0.0] The X component.
+ * @param {number} [y=0.0] The Y component.
+ * @param {number} [z=0.0] The Z component.
+ * @param {number} [w=0.0] The W component.
+ *
* @see Cartesian2
* @see Cartesian3
* @see Packable
@@ -48,6 +50,7 @@ function Cartesian4(x, y, z, w) {
/**
* Creates a Cartesian4 instance from x, y, z and w coordinates.
+ *
* @param {number} x The x coordinate.
* @param {number} y The y coordinate.
* @param {number} z The z coordinate.
@@ -70,6 +73,7 @@ Cartesian4.fromElements = function (x, y, z, w, result) {
/**
* Creates a Cartesian4 instance from a {@link Color}. red
, green
, blue
,
* and alpha
map to x
, y
, z
, and w
, respectively.
+ *
* @param {Color} color The source color.
* @param {Cartesian4} [result] The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.
@@ -91,6 +95,7 @@ Cartesian4.fromColor = function (color, result) {
/**
* Duplicates a Cartesian4 instance.
+ *
* @param {Cartesian4} cartesian The Cartesian to duplicate.
* @param {Cartesian4} [result] The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided. (Returns undefined if cartesian is undefined)
@@ -119,9 +124,11 @@ Cartesian4.packedLength = 4;
/**
* Stores the provided instance into the provided array.
+ *
* @param {Cartesian4} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
Cartesian4.pack = function (value, array, startingIndex) {
@@ -142,8 +149,9 @@ Cartesian4.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Cartesian4} [result] The object into which to store the result.
* @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.
*/
@@ -166,6 +174,7 @@ Cartesian4.unpack = function (array, startingIndex, result) {
/**
* Flattens an array of Cartesian4s into an array of components.
+ *
* @param {Cartesian4[]} array The array of cartesians to pack.
* @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 4 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 4) elements.
* @returns {number[]} The packed array.
@@ -197,6 +206,7 @@ Cartesian4.packArray = function (array, result) {
/**
* Unpacks an array of cartesian components into an array of Cartesian4s.
+ *
* @param {number[]} array The array of components to unpack.
* @param {Cartesian4[]} [result] The array onto which to store the result.
* @returns {Cartesian4[]} The unpacked array.
@@ -227,10 +237,12 @@ Cartesian4.unpackArray = function (array, result) {
/**
* Creates a Cartesian4 from four consecutive elements in an array.
* @function
+ *
* @param {number[]} array The array whose four consecutive elements correspond to the x, y, z, and w components, respectively.
* @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to the x component.
* @param {Cartesian4} [result] The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.
+ *
* @example
* // Create a Cartesian4 with (1.0, 2.0, 3.0, 4.0)
* const v = [1.0, 2.0, 3.0, 4.0];
@@ -244,6 +256,7 @@ Cartesian4.fromArray = Cartesian4.unpack;
/**
* Computes the value of the maximum component for the supplied Cartesian.
+ *
* @param {Cartesian4} cartesian The cartesian to use.
* @returns {number} The value of the maximum component.
*/
@@ -257,6 +270,7 @@ Cartesian4.maximumComponent = function (cartesian) {
/**
* Computes the value of the minimum component for the supplied Cartesian.
+ *
* @param {Cartesian4} cartesian The cartesian to use.
* @returns {number} The value of the minimum component.
*/
@@ -270,6 +284,7 @@ Cartesian4.minimumComponent = function (cartesian) {
/**
* Compares two Cartesians and computes a Cartesian which contains the minimum components of the supplied Cartesians.
+ *
* @param {Cartesian4} first A cartesian to compare.
* @param {Cartesian4} second A cartesian to compare.
* @param {Cartesian4} result The object into which to store the result.
@@ -292,6 +307,7 @@ Cartesian4.minimumByComponent = function (first, second, result) {
/**
* Compares two Cartesians and computes a Cartesian which contains the maximum components of the supplied Cartesians.
+ *
* @param {Cartesian4} first A cartesian to compare.
* @param {Cartesian4} second A cartesian to compare.
* @param {Cartesian4} result The object into which to store the result.
@@ -314,6 +330,7 @@ Cartesian4.maximumByComponent = function (first, second, result) {
/**
* Constrain a value to lie between two values.
+ *
* @param {Cartesian4} value The value to clamp.
* @param {Cartesian4} min The minimum bound.
* @param {Cartesian4} max The maximum bound.
@@ -343,6 +360,7 @@ Cartesian4.clamp = function (value, min, max, result) {
/**
* Computes the provided Cartesian's squared magnitude.
+ *
* @param {Cartesian4} cartesian The Cartesian instance whose squared magnitude is to be computed.
* @returns {number} The squared magnitude.
*/
@@ -361,6 +379,7 @@ Cartesian4.magnitudeSquared = function (cartesian) {
/**
* Computes the Cartesian's magnitude (length).
+ *
* @param {Cartesian4} cartesian The Cartesian instance whose magnitude is to be computed.
* @returns {number} The magnitude.
*/
@@ -372,9 +391,11 @@ const distanceScratch = new Cartesian4();
/**
* Computes the 4-space distance between two points.
+ *
* @param {Cartesian4} left The first point to compute the distance from.
* @param {Cartesian4} right The second point to compute the distance to.
* @returns {number} The distance between two points.
+ *
* @example
* // Returns 1.0
* const d = Cesium.Cartesian4.distance(
@@ -394,9 +415,11 @@ Cartesian4.distance = function (left, right) {
/**
* Computes the squared distance between two points. Comparing squared distances
* using this function is more efficient than comparing distances using {@link Cartesian4#distance}.
+ *
* @param {Cartesian4} left The first point to compute the distance from.
* @param {Cartesian4} right The second point to compute the distance to.
* @returns {number} The distance between two points.
+ *
* @example
* // Returns 4.0, not 2.0
* const d = Cesium.Cartesian4.distance(
@@ -415,6 +438,7 @@ Cartesian4.distanceSquared = function (left, right) {
/**
* Computes the normalized form of the supplied Cartesian.
+ *
* @param {Cartesian4} cartesian The Cartesian to be normalized.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
@@ -448,6 +472,7 @@ Cartesian4.normalize = function (cartesian, result) {
/**
* Computes the dot (scalar) product of two Cartesians.
+ *
* @param {Cartesian4} left The first Cartesian.
* @param {Cartesian4} right The second Cartesian.
* @returns {number} The dot product.
@@ -465,6 +490,7 @@ Cartesian4.dot = function (left, right) {
/**
* Computes the componentwise product of two Cartesians.
+ *
* @param {Cartesian4} left The first Cartesian.
* @param {Cartesian4} right The second Cartesian.
* @param {Cartesian4} result The object onto which to store the result.
@@ -486,6 +512,7 @@ Cartesian4.multiplyComponents = function (left, right, result) {
/**
* Computes the componentwise quotient of two Cartesians.
+ *
* @param {Cartesian4} left The first Cartesian.
* @param {Cartesian4} right The second Cartesian.
* @param {Cartesian4} result The object onto which to store the result.
@@ -507,6 +534,7 @@ Cartesian4.divideComponents = function (left, right, result) {
/**
* Computes the componentwise sum of two Cartesians.
+ *
* @param {Cartesian4} left The first Cartesian.
* @param {Cartesian4} right The second Cartesian.
* @param {Cartesian4} result The object onto which to store the result.
@@ -528,6 +556,7 @@ Cartesian4.add = function (left, right, result) {
/**
* Computes the componentwise difference of two Cartesians.
+ *
* @param {Cartesian4} left The first Cartesian.
* @param {Cartesian4} right The second Cartesian.
* @param {Cartesian4} result The object onto which to store the result.
@@ -549,6 +578,7 @@ Cartesian4.subtract = function (left, right, result) {
/**
* Multiplies the provided Cartesian componentwise by the provided scalar.
+ *
* @param {Cartesian4} cartesian The Cartesian to be scaled.
* @param {number} scalar The scalar to multiply with.
* @param {Cartesian4} result The object onto which to store the result.
@@ -570,6 +600,7 @@ Cartesian4.multiplyByScalar = function (cartesian, scalar, result) {
/**
* Divides the provided Cartesian componentwise by the provided scalar.
+ *
* @param {Cartesian4} cartesian The Cartesian to be divided.
* @param {number} scalar The scalar to divide by.
* @param {Cartesian4} result The object onto which to store the result.
@@ -591,6 +622,7 @@ Cartesian4.divideByScalar = function (cartesian, scalar, result) {
/**
* Negates the provided Cartesian.
+ *
* @param {Cartesian4} cartesian The Cartesian to be negated.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
@@ -610,6 +642,7 @@ Cartesian4.negate = function (cartesian, result) {
/**
* Computes the absolute value of the provided Cartesian.
+ *
* @param {Cartesian4} cartesian The Cartesian whose absolute value is to be computed.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
@@ -630,6 +663,7 @@ Cartesian4.abs = function (cartesian, result) {
const lerpScratch = new Cartesian4();
/**
* Computes the linear interpolation or extrapolation at t using the provided cartesians.
+ *
* @param {Cartesian4} start The value corresponding to t at 0.0.
* @param {Cartesian4}end The value corresponding to t at 1.0.
* @param {number} t The point along t at which to interpolate.
@@ -652,6 +686,7 @@ Cartesian4.lerp = function (start, end, t, result) {
const mostOrthogonalAxisScratch = new Cartesian4();
/**
* Returns the axis that is most orthogonal to the provided Cartesian.
+ *
* @param {Cartesian4} cartesian The Cartesian on which to find the most orthogonal axis.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The most orthogonal axis.
@@ -695,6 +730,7 @@ Cartesian4.mostOrthogonalAxis = function (cartesian, result) {
/**
* Compares the provided Cartesians componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {Cartesian4} [left] The first Cartesian.
* @param {Cartesian4} [right] The second Cartesian.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -712,9 +748,6 @@ Cartesian4.equals = function (left, right) {
};
/**
- * @param cartesian
- * @param array
- * @param offset
* @private
*/
Cartesian4.equalsArray = function (cartesian, array, offset) {
@@ -730,10 +763,11 @@ Cartesian4.equalsArray = function (cartesian, array, offset) {
* Compares the provided Cartesians componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
+ *
* @param {Cartesian4} [left] The first Cartesian.
* @param {Cartesian4} [right] The second Cartesian.
- * @param {number} [relativeEpsilon] The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
*/
Cartesian4.equalsEpsilon = function (
@@ -775,6 +809,7 @@ Cartesian4.equalsEpsilon = function (
/**
* An immutable Cartesian4 instance initialized to (0.0, 0.0, 0.0, 0.0).
+ *
* @type {Cartesian4}
* @constant
*/
@@ -782,6 +817,7 @@ Cartesian4.ZERO = Object.freeze(new Cartesian4(0.0, 0.0, 0.0, 0.0));
/**
* An immutable Cartesian4 instance initialized to (1.0, 1.0, 1.0, 1.0).
+ *
* @type {Cartesian4}
* @constant
*/
@@ -789,6 +825,7 @@ Cartesian4.ONE = Object.freeze(new Cartesian4(1.0, 1.0, 1.0, 1.0));
/**
* An immutable Cartesian4 instance initialized to (1.0, 0.0, 0.0, 0.0).
+ *
* @type {Cartesian4}
* @constant
*/
@@ -796,6 +833,7 @@ Cartesian4.UNIT_X = Object.freeze(new Cartesian4(1.0, 0.0, 0.0, 0.0));
/**
* An immutable Cartesian4 instance initialized to (0.0, 1.0, 0.0, 0.0).
+ *
* @type {Cartesian4}
* @constant
*/
@@ -803,6 +841,7 @@ Cartesian4.UNIT_Y = Object.freeze(new Cartesian4(0.0, 1.0, 0.0, 0.0));
/**
* An immutable Cartesian4 instance initialized to (0.0, 0.0, 1.0, 0.0).
+ *
* @type {Cartesian4}
* @constant
*/
@@ -810,6 +849,7 @@ Cartesian4.UNIT_Z = Object.freeze(new Cartesian4(0.0, 0.0, 1.0, 0.0));
/**
* An immutable Cartesian4 instance initialized to (0.0, 0.0, 0.0, 1.0).
+ *
* @type {Cartesian4}
* @constant
*/
@@ -817,6 +857,7 @@ Cartesian4.UNIT_W = Object.freeze(new Cartesian4(0.0, 0.0, 0.0, 1.0));
/**
* Duplicates this Cartesian4 instance.
+ *
* @param {Cartesian4} [result] The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.
*/
@@ -827,6 +868,7 @@ Cartesian4.prototype.clone = function (result) {
/**
* Compares this Cartesian against the provided Cartesian componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {Cartesian4} [right] The right hand side Cartesian.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -838,9 +880,10 @@ Cartesian4.prototype.equals = function (right) {
* Compares this Cartesian against the provided Cartesian componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
+ *
* @param {Cartesian4} [right] The right hand side Cartesian.
- * @param {number} [relativeEpsilon] The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if they are within the provided epsilon, false
otherwise.
*/
Cartesian4.prototype.equalsEpsilon = function (
@@ -858,6 +901,7 @@ Cartesian4.prototype.equalsEpsilon = function (
/**
* Creates a string representing this Cartesian in the format '(x, y, z, w)'.
+ *
* @returns {string} A string representing the provided Cartesian in the format '(x, y, z, w)'.
*/
Cartesian4.prototype.toString = function () {
@@ -874,6 +918,7 @@ const littleEndian = testU8[0] === 0x44;
/**
* Packs an arbitrary floating point value to 4 values representable using uint8.
+ *
* @param {number} value A floating point number.
* @param {Cartesian4} [result] The Cartesian4 that will contain the packed float.
* @returns {Cartesian4} A Cartesian4 representing the float packed to values in x, y, z, and w.
@@ -907,6 +952,7 @@ Cartesian4.packFloat = function (value, result) {
/**
* Unpacks a float packed using Cartesian4.packFloat.
+ *
* @param {Cartesian4} packedFloat A Cartesian4 containing a float packed to 4 values representable using uint8.
* @returns {number} The unpacked float.
* @private
diff --git a/packages/engine/Source/Core/Cartographic.js b/packages/engine/Source/Core/Cartographic.js
index 992f6e264d8d..87957c75bdce 100644
--- a/packages/engine/Source/Core/Cartographic.js
+++ b/packages/engine/Source/Core/Cartographic.js
@@ -8,10 +8,12 @@ import scaleToGeodeticSurface from "./scaleToGeodeticSurface.js";
/**
* A position defined by longitude, latitude, and height.
* @alias Cartographic
- * @class
- * @param {number} [longitude] The longitude, in radians.
- * @param {number} [latitude] The latitude, in radians.
- * @param {number} [height] The height, in meters, above the ellipsoid.
+ * @constructor
+ *
+ * @param {number} [longitude=0.0] The longitude, in radians.
+ * @param {number} [latitude=0.0] The latitude, in radians.
+ * @param {number} [height=0.0] The height, in meters, above the ellipsoid.
+ *
* @see Ellipsoid
*/
function Cartographic(longitude, latitude, height) {
@@ -40,9 +42,10 @@ function Cartographic(longitude, latitude, height) {
/**
* Creates a new Cartographic instance from longitude and latitude
* specified in radians.
+ *
* @param {number} longitude The longitude, in radians.
* @param {number} latitude The latitude, in radians.
- * @param {number} [height] The height, in meters, above the ellipsoid.
+ * @param {number} [height=0.0] The height, in meters, above the ellipsoid.
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided.
*/
@@ -68,9 +71,10 @@ Cartographic.fromRadians = function (longitude, latitude, height, result) {
* Creates a new Cartographic instance from longitude and latitude
* specified in degrees. The values in the resulting object will
* be in radians.
+ *
* @param {number} longitude The longitude, in degrees.
* @param {number} latitude The latitude, in degrees.
- * @param {number} [height] The height, in meters, above the ellipsoid.
+ * @param {number} [height=0.0] The height, in meters, above the ellipsoid.
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided.
*/
@@ -103,8 +107,9 @@ const wgs84CenterToleranceSquared = CesiumMath.EPSILON1;
/**
* Creates a new Cartographic instance from a Cartesian position. The values in the
* resulting object will be in radians.
+ *
* @param {Cartesian3} cartesian The Cartesian position to convert to cartographic representation.
- * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the position lies.
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.
*/
@@ -158,8 +163,9 @@ Cartographic.fromCartesian = function (cartesian, ellipsoid, result) {
/**
* Creates a new Cartesian3 instance from a Cartographic input. The values in the inputted
* object should be in radians.
+ *
* @param {Cartographic} cartographic Input to be converted into a Cartesian3 output.
- * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the position lies.
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The position
*/
@@ -179,6 +185,7 @@ Cartographic.toCartesian = function (cartographic, ellipsoid, result) {
/**
* Duplicates a Cartographic instance.
+ *
* @param {Cartographic} cartographic The cartographic to duplicate.
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided. (Returns undefined if cartographic is undefined)
@@ -203,6 +210,7 @@ Cartographic.clone = function (cartographic, result) {
/**
* Compares the provided cartographics componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {Cartographic} [left] The first cartographic.
* @param {Cartographic} [right] The second cartographic.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -222,9 +230,10 @@ Cartographic.equals = function (left, right) {
* Compares the provided cartographics componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
+ *
* @param {Cartographic} [left] The first cartographic.
* @param {Cartographic} [right] The second cartographic.
- * @param {number} [epsilon] The epsilon to use for equality testing.
+ * @param {number} [epsilon=0] The epsilon to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
*/
Cartographic.equalsEpsilon = function (left, right, epsilon) {
@@ -242,6 +251,7 @@ Cartographic.equalsEpsilon = function (left, right, epsilon) {
/**
* An immutable Cartographic instance initialized to (0.0, 0.0, 0.0).
+ *
* @type {Cartographic}
* @constant
*/
@@ -249,6 +259,7 @@ Cartographic.ZERO = Object.freeze(new Cartographic(0.0, 0.0, 0.0));
/**
* Duplicates this instance.
+ *
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided.
*/
@@ -259,6 +270,7 @@ Cartographic.prototype.clone = function (result) {
/**
* Compares the provided against this cartographic componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {Cartographic} [right] The second cartographic.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
@@ -270,8 +282,9 @@ Cartographic.prototype.equals = function (right) {
* Compares the provided against this cartographic componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
+ *
* @param {Cartographic} [right] The second cartographic.
- * @param {number} [epsilon] The epsilon to use for equality testing.
+ * @param {number} [epsilon=0] The epsilon to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
*/
Cartographic.prototype.equalsEpsilon = function (right, epsilon) {
@@ -280,6 +293,7 @@ Cartographic.prototype.equalsEpsilon = function (right, epsilon) {
/**
* Creates a string representing this cartographic in the format '(longitude, latitude, height)'.
+ *
* @returns {string} A string representing the provided cartographic in the format '(longitude, latitude, height)'.
*/
Cartographic.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/CartographicGeocoderService.js b/packages/engine/Source/Core/CartographicGeocoderService.js
index a146d9541227..149edc6270c7 100644
--- a/packages/engine/Source/Core/CartographicGeocoderService.js
+++ b/packages/engine/Source/Core/CartographicGeocoderService.js
@@ -4,8 +4,9 @@ import Check from "./Check.js";
/**
* Geocodes queries containing longitude and latitude coordinates and an optional height.
* Query format: `longitude latitude (height)` with longitude/latitude in degrees and height in meters.
+ *
* @alias CartographicGeocoderService
- * @class
+ * @constructor
*/
function CartographicGeocoderService() {}
@@ -26,6 +27,7 @@ Object.defineProperties(CartographicGeocoderService.prototype, {
/**
* @function
+ *
* @param {string} query The query to be sent to the geocoder service
* @returns {Promise}
*/
diff --git a/packages/engine/Source/Core/CatmullRomSpline.js b/packages/engine/Source/Core/CatmullRomSpline.js
index 017d44880006..8f7c4ea6d9f2 100644
--- a/packages/engine/Source/Core/CatmullRomSpline.js
+++ b/packages/engine/Source/Core/CatmullRomSpline.js
@@ -107,8 +107,10 @@ const lastTangentScratch = new Cartesian3();
* A Catmull-Rom spline is a cubic spline where the tangent at control points,
* except the first and last, are computed using the previous and next control points.
* Catmull-Rom splines are in the class C1 .
+ *
* @alias CatmullRomSpline
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {number[]} options.times An array of strictly increasing, unit-less, floating-point times at each point.
* The values are in no way connected to the clock time. They are the parameterization for the curve.
@@ -117,8 +119,11 @@ const lastTangentScratch = new Cartesian3();
* If the tangent is not given, it will be estimated.
* @param {Cartesian3} [options.lastTangent] The tangent of the curve at the last control point.
* If the tangent is not given, it will be estimated.
- * @throws {DeveloperError} points.length must be greater than or equal to 2.
- * @throws {DeveloperError} times.length must be equal to points.length.
+ *
+ * @exception {DeveloperError} points.length must be greater than or equal to 2.
+ * @exception {DeveloperError} times.length must be equal to points.length.
+ *
+ *
* @example
* // spline above the earth from Philadelphia to Los Angeles
* const spline = new Cesium.CatmullRomSpline({
@@ -134,6 +139,7 @@ const lastTangentScratch = new Cartesian3();
*
* const p0 = spline.evaluate(times[i]); // equal to positions[i]
* const p1 = spline.evaluate(times[i] + delta); // interpolated value when delta < times[i + 1] - times[i]
+ *
* @see ConstantSpline
* @see SteppedSpline
* @see HermiteSpline
@@ -192,7 +198,9 @@ function CatmullRomSpline(options) {
Object.defineProperties(CatmullRomSpline.prototype, {
/**
* An array of times for the control points.
+ *
* @memberof CatmullRomSpline.prototype
+ *
* @type {number[]}
* @readonly
*/
@@ -204,7 +212,9 @@ Object.defineProperties(CatmullRomSpline.prototype, {
/**
* An array of {@link Cartesian3} control points.
+ *
* @memberof CatmullRomSpline.prototype
+ *
* @type {Cartesian3[]}
* @readonly
*/
@@ -216,7 +226,9 @@ Object.defineProperties(CatmullRomSpline.prototype, {
/**
* The tangent at the first control point.
+ *
* @memberof CatmullRomSpline.prototype
+ *
* @type {Cartesian3}
* @readonly
*/
@@ -228,7 +240,9 @@ Object.defineProperties(CatmullRomSpline.prototype, {
/**
* The tangent at the last control point.
+ *
* @memberof CatmullRomSpline.prototype
+ *
* @type {Cartesian3}
* @readonly
*/
@@ -265,9 +279,11 @@ CatmullRomSpline.catmullRomCoefficientMatrix = new Matrix4(
* Finds an index i
in times
such that the parameter
* time
is in the interval [times[i], times[i + 1]]
.
* @function
+ *
* @param {number} time The time.
* @returns {number} The index for the element at the start of the interval.
- * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ *
+ * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
@@ -276,25 +292,29 @@ CatmullRomSpline.prototype.findTimeInterval = Spline.prototype.findTimeInterval;
/**
* Wraps the given time to the period covered by the spline.
* @function
+ *
* @param {number} time The time.
- * @returns {number} The time, wrapped around to the updated animation.
+ * @return {number} The time, wrapped around to the updated animation.
*/
CatmullRomSpline.prototype.wrapTime = Spline.prototype.wrapTime;
/**
* Clamps the given time to the period covered by the spline.
* @function
+ *
* @param {number} time The time.
- * @returns {number} The time, clamped to the animation period.
+ * @return {number} The time, clamped to the animation period.
*/
CatmullRomSpline.prototype.clampTime = Spline.prototype.clampTime;
/**
* Evaluates the curve at a given time.
+ *
* @param {number} time The time at which to evaluate the curve.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new instance of the point on the curve at the given time.
- * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ *
+ * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
diff --git a/packages/engine/Source/Core/CesiumTerrainProvider.js b/packages/engine/Source/Core/CesiumTerrainProvider.js
index 70baa6485d59..c70769c02fcf 100644
--- a/packages/engine/Source/Core/CesiumTerrainProvider.js
+++ b/packages/engine/Source/Core/CesiumTerrainProvider.js
@@ -38,9 +38,10 @@ function LayerInformation(layer) {
}
/**
- * @typedef {object} CesiumTerrainProvider.ConstructorOptions
+ * @typedef {Object} CesiumTerrainProvider.ConstructorOptions
*
* Initialization options for the CesiumTerrainProvider constructor
+ *
* @property {boolean} [requestVertexNormals=false] Flag that indicates if the client should request additional lighting information from the server, in the form of per vertex normals if available.
* @property {boolean} [requestWaterMask=false] Flag that indicates if the client should request per tile water masks from the server, if available.
* @property {boolean} [requestMetadata=true] Flag that indicates if the client should request per tile metadata from the server, if available.
@@ -50,8 +51,10 @@ function LayerInformation(layer) {
/**
* Used to track creation details while fetching initial metadata
- * @class
+ *
+ * @constructor
* @private
+ *
* @param {CesiumTerrainProvider.ConstructorOptions} options An object describing initialization options
*/
function TerrainProviderBuilder(options) {
@@ -83,7 +86,9 @@ function TerrainProviderBuilder(options) {
/**
* Complete CesiumTerrainProvider creation based on builder values.
+ *
* @private
+ *
* @param {CesiumTerrainProvider} provider
*/
TerrainProviderBuilder.prototype.build = function (provider) {
@@ -445,9 +450,12 @@ async function requestLayerJson(terrainProviderBuilder, provider) {
* {@link https://github.com/AnalyticalGraphicsInc/quantized-mesh Quantized Mesh}
* {@link https://github.com/AnalyticalGraphicsInc/cesium/wiki/heightmap-1.0 Height Map}
*
+ *
* @alias CesiumTerrainProvider
- * @class
+ * @constructor
+ *
* @param {CesiumTerrainProvider.ConstructorOptions} [options] An object describing initialization options
+ *
* @example
* // Create Arctic DEM terrain with normals.
* try {
@@ -459,6 +467,7 @@ async function requestLayerJson(terrainProviderBuilder, provider) {
* } catch (error) {
* console.log(error);
* }
+ *
* @see createWorldTerrain
* @see CesiumTerrainProvider.fromUrl
* @see CesiumTerrainProvider.fromIonAssetId
@@ -520,6 +529,7 @@ function CesiumTerrainProvider(options) {
/**
* When using the Quantized-Mesh format, a tile may be returned that includes additional extensions, such as PerVertexNormals, watermask, etc.
* This enumeration defines the unique identifiers for each type of extension data that has been appended to the standard mesh data.
+ *
* @namespace QuantizedMeshExtensionIds
* @see CesiumTerrainProvider
* @private
@@ -527,6 +537,7 @@ function CesiumTerrainProvider(options) {
const QuantizedMeshExtensionIds = {
/**
* Oct-Encoded Per-Vertex Normals are included as an extension to the tile mesh
+ *
* @type {number}
* @constant
* @default 1
@@ -534,6 +545,7 @@ const QuantizedMeshExtensionIds = {
OCT_VERTEX_NORMALS: 1,
/**
* A watermask is included as an extension to the tile mesh
+ *
* @type {number}
* @constant
* @default 2
@@ -541,6 +553,7 @@ const QuantizedMeshExtensionIds = {
WATER_MASK: 2,
/**
* A json object contain metadata about the tile
+ *
* @type {number}
* @constant
* @default 4
@@ -827,13 +840,16 @@ function createQuantizedMeshTerrainData(provider, buffer, level, x, y, layer) {
/**
* Requests the geometry for a given tile. The result must include terrain data and
* may optionally include a water mask and an indication of which child tiles are available.
+ *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
* @param {Request} [request] The request object. Intended for internal use only.
+ *
* @returns {Promise|undefined} A promise for the requested geometry. If this method
* returns undefined instead of a promise, it is an indication that too many requests are already
* pending and the request will be retried later.
+ *
*/
CesiumTerrainProvider.prototype.requestTileGeometry = function (
x,
@@ -1128,6 +1144,7 @@ Object.defineProperties(CesiumTerrainProvider.prototype, {
/**
* Gets the maximum geometric error allowed in a tile at a given level.
+ *
* @param {number} level The tile level for which to get the maximum geometric error.
* @returns {number} The maximum geometric error.
*/
@@ -1144,9 +1161,11 @@ CesiumTerrainProvider.prototype.getLevelMaximumGeometricError = function (
* {@link https://github.com/AnalyticalGraphicsInc/quantized-mesh Quantized Mesh}
* {@link https://github.com/AnalyticalGraphicsInc/cesium/wiki/heightmap-1.0 Height Map}
*
+ *
* @param {number} assetId The Cesium ion asset id.
* @param {CesiumTerrainProvider.ConstructorOptions} [options] An object describing initialization options.
* @returns {Promise}
+ *
* @example
* // Create Arctic DEM terrain with normals.
* try {
@@ -1158,11 +1177,12 @@ CesiumTerrainProvider.prototype.getLevelMaximumGeometricError = function (
* } catch (error) {
* console.log(error);
* }
- * @throws {RuntimeError} layer.json does not specify a format
- * @throws {RuntimeError} layer.json specifies an unknown format
- * @throws {RuntimeError} layer.json specifies an unsupported quantized-mesh version
- * @throws {RuntimeError} layer.json does not specify a tiles property, or specifies an empty array
- * @throws {RuntimeError} layer.json does not specify any tile URL templates
+ *
+ * @exception {RuntimeError} layer.json does not specify a format
+ * @exception {RuntimeError} layer.json specifies an unknown format
+ * @exception {RuntimeError} layer.json specifies an unsupported quantized-mesh version
+ * @exception {RuntimeError} layer.json does not specify a tiles property, or specifies an empty array
+ * @exception {RuntimeError} layer.json does not specify any tile URL templates
*/
CesiumTerrainProvider.fromIonAssetId = async function (assetId, options) {
//>>includeStart('debug', pragmas.debug);
@@ -1180,9 +1200,11 @@ CesiumTerrainProvider.fromIonAssetId = async function (assetId, options) {
* {@link https://github.com/AnalyticalGraphicsInc/quantized-mesh Quantized Mesh}
* {@link https://github.com/AnalyticalGraphicsInc/cesium/wiki/heightmap-1.0 Height Map}
*
- * @param {Resource | string | Promise | Promise} url The URL of the Cesium terrain server.
+ *
+ * @param {Resource|String|Promise|Promise} url The URL of the Cesium terrain server.
* @param {CesiumTerrainProvider.ConstructorOptions} [options] An object describing initialization options.
* @returns {Promise}
+ *
* @example
* // Create Arctic DEM terrain with normals.
* try {
@@ -1195,11 +1217,12 @@ CesiumTerrainProvider.fromIonAssetId = async function (assetId, options) {
* } catch (error) {
* console.log(error);
* }
- * @throws {RuntimeError} layer.json does not specify a format
- * @throws {RuntimeError} layer.json specifies an unknown format
- * @throws {RuntimeError} layer.json specifies an unsupported quantized-mesh version
- * @throws {RuntimeError} layer.json does not specify a tiles property, or specifies an empty array
- * @throws {RuntimeError} layer.json does not specify any tile URL templates
+ *
+ * @exception {RuntimeError} layer.json does not specify a format
+ * @exception {RuntimeError} layer.json specifies an unknown format
+ * @exception {RuntimeError} layer.json specifies an unsupported quantized-mesh version
+ * @exception {RuntimeError} layer.json does not specify a tiles property, or specifies an empty array
+ * @exception {RuntimeError} layer.json does not specify any tile URL templates
*/
CesiumTerrainProvider.fromUrl = async function (url, options) {
//>>includeStart('debug', pragmas.debug);
@@ -1230,6 +1253,7 @@ CesiumTerrainProvider.fromUrl = async function (url, options) {
/**
* Determines whether data for a tile is available to be loaded.
+ *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -1267,6 +1291,7 @@ CesiumTerrainProvider.prototype.getTileDataAvailable = function (x, y, level) {
/**
* Makes sure we load availability data for a tile
+ *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
diff --git a/packages/engine/Source/Core/Check.js b/packages/engine/Source/Core/Check.js
index 72b46774841b..83f0c9ab0b11 100644
--- a/packages/engine/Source/Core/Check.js
+++ b/packages/engine/Source/Core/Check.js
@@ -22,9 +22,10 @@ function getFailedTypeErrorMessage(actual, expected, name) {
/**
* Throws if test is not defined
+ *
* @param {string} name The name of the variable being tested
* @param {*} test The value that is to be checked
- * @throws {DeveloperError} test must be defined
+ * @exception {DeveloperError} test must be defined
*/
Check.defined = function (name, test) {
if (!defined(test)) {
@@ -34,9 +35,10 @@ Check.defined = function (name, test) {
/**
* Throws if test is not typeof 'function'
+ *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
- * @throws {DeveloperError} test must be typeof 'function'
+ * @exception {DeveloperError} test must be typeof 'function'
*/
Check.typeOf.func = function (name, test) {
if (typeof test !== "function") {
@@ -48,9 +50,10 @@ Check.typeOf.func = function (name, test) {
/**
* Throws if test is not typeof 'string'
+ *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
- * @throws {DeveloperError} test must be typeof 'string'
+ * @exception {DeveloperError} test must be typeof 'string'
*/
Check.typeOf.string = function (name, test) {
if (typeof test !== "string") {
@@ -62,9 +65,10 @@ Check.typeOf.string = function (name, test) {
/**
* Throws if test is not typeof 'number'
+ *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
- * @throws {DeveloperError} test must be typeof 'number'
+ * @exception {DeveloperError} test must be typeof 'number'
*/
Check.typeOf.number = function (name, test) {
if (typeof test !== "number") {
@@ -76,10 +80,11 @@ Check.typeOf.number = function (name, test) {
/**
* Throws if test is not typeof 'number' and less than limit
+ *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
* @param {number} limit The limit value to compare against
- * @throws {DeveloperError} test must be typeof 'number' and less than limit
+ * @exception {DeveloperError} test must be typeof 'number' and less than limit
*/
Check.typeOf.number.lessThan = function (name, test, limit) {
Check.typeOf.number(name, test);
@@ -92,10 +97,11 @@ Check.typeOf.number.lessThan = function (name, test, limit) {
/**
* Throws if test is not typeof 'number' and less than or equal to limit
+ *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
* @param {number} limit The limit value to compare against
- * @throws {DeveloperError} test must be typeof 'number' and less than or equal to limit
+ * @exception {DeveloperError} test must be typeof 'number' and less than or equal to limit
*/
Check.typeOf.number.lessThanOrEquals = function (name, test, limit) {
Check.typeOf.number(name, test);
@@ -108,10 +114,11 @@ Check.typeOf.number.lessThanOrEquals = function (name, test, limit) {
/**
* Throws if test is not typeof 'number' and greater than limit
+ *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
* @param {number} limit The limit value to compare against
- * @throws {DeveloperError} test must be typeof 'number' and greater than limit
+ * @exception {DeveloperError} test must be typeof 'number' and greater than limit
*/
Check.typeOf.number.greaterThan = function (name, test, limit) {
Check.typeOf.number(name, test);
@@ -124,10 +131,11 @@ Check.typeOf.number.greaterThan = function (name, test, limit) {
/**
* Throws if test is not typeof 'number' and greater than or equal to limit
+ *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
* @param {number} limit The limit value to compare against
- * @throws {DeveloperError} test must be typeof 'number' and greater than or equal to limit
+ * @exception {DeveloperError} test must be typeof 'number' and greater than or equal to limit
*/
Check.typeOf.number.greaterThanOrEquals = function (name, test, limit) {
Check.typeOf.number(name, test);
@@ -140,9 +148,10 @@ Check.typeOf.number.greaterThanOrEquals = function (name, test, limit) {
/**
* Throws if test is not typeof 'object'
+ *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
- * @throws {DeveloperError} test must be typeof 'object'
+ * @exception {DeveloperError} test must be typeof 'object'
*/
Check.typeOf.object = function (name, test) {
if (typeof test !== "object") {
@@ -154,9 +163,10 @@ Check.typeOf.object = function (name, test) {
/**
* Throws if test is not typeof 'boolean'
+ *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
- * @throws {DeveloperError} test must be typeof 'boolean'
+ * @exception {DeveloperError} test must be typeof 'boolean'
*/
Check.typeOf.bool = function (name, test) {
if (typeof test !== "boolean") {
@@ -168,9 +178,10 @@ Check.typeOf.bool = function (name, test) {
/**
* Throws if test is not typeof 'bigint'
+ *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
- * @throws {DeveloperError} test must be typeof 'bigint'
+ * @exception {DeveloperError} test must be typeof 'bigint'
*/
Check.typeOf.bigint = function (name, test) {
if (typeof test !== "bigint") {
@@ -182,11 +193,12 @@ Check.typeOf.bigint = function (name, test) {
/**
* Throws if test1 and test2 is not typeof 'number' and not equal in value
+ *
* @param {string} name1 The name of the first variable being tested
* @param {string} name2 The name of the second variable being tested against
* @param {*} test1 The value to test
* @param {*} test2 The value to test against
- * @throws {DeveloperError} test1 and test2 should be type of 'number' and be equal in value
+ * @exception {DeveloperError} test1 and test2 should be type of 'number' and be equal in value
*/
Check.typeOf.number.equals = function (name1, name2, test1, test2) {
Check.typeOf.number(name1, test1);
diff --git a/packages/engine/Source/Core/CircleGeometry.js b/packages/engine/Source/Core/CircleGeometry.js
index 043c422931f2..78e6387c15a0 100644
--- a/packages/engine/Source/Core/CircleGeometry.js
+++ b/packages/engine/Source/Core/CircleGeometry.js
@@ -8,21 +8,26 @@ import VertexFormat from "./VertexFormat.js";
/**
* A description of a circle on the ellipsoid. Circle geometry can be rendered with both {@link Primitive} and {@link GroundPrimitive}.
+ *
* @alias CircleGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.center The circle's center point in the fixed frame.
* @param {number} options.radius The radius in meters.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid the circle will be on.
- * @param {number} [options.height] The distance in meters between the circle and the ellipsoid surface.
- * @param {number} [options.granularity] The angular distance between points on the circle in radians.
- * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
- * @param {number} [options.extrudedHeight] The distance in meters between the circle's extruded face and the ellipsoid surface.
- * @param {number} [options.stRotation] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
- * @throws {DeveloperError} radius must be greater than zero.
- * @throws {DeveloperError} granularity must be greater than zero.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid the circle will be on.
+ * @param {number} [options.height=0.0] The distance in meters between the circle and the ellipsoid surface.
+ * @param {number} [options.granularity=0.02] The angular distance between points on the circle in radians.
+ * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
+ * @param {number} [options.extrudedHeight=0.0] The distance in meters between the circle's extruded face and the ellipsoid surface.
+ * @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
+ *
+ * @exception {DeveloperError} radius must be greater than zero.
+ * @exception {DeveloperError} granularity must be greater than zero.
+ *
* @see CircleGeometry.createGeometry
* @see Packable
+ *
* @example
* // Create a circle.
* const circle = new Cesium.CircleGeometry({
@@ -63,9 +68,11 @@ CircleGeometry.packedLength = EllipseGeometry.packedLength;
/**
* Stores the provided instance into the provided array.
+ *
* @param {CircleGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
CircleGeometry.pack = function (value, array, startingIndex) {
@@ -96,8 +103,9 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {CircleGeometry} [result] The object into which to store the result.
* @returns {CircleGeometry} The modified result parameter or a new CircleGeometry instance if one was not provided.
*/
@@ -138,6 +146,7 @@ CircleGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of a circle on an ellipsoid, including its vertices, indices, and a bounding sphere.
+ *
* @param {CircleGeometry} circleGeometry A description of the circle.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
@@ -146,9 +155,6 @@ CircleGeometry.createGeometry = function (circleGeometry) {
};
/**
- * @param circleGeometry
- * @param minHeightFunc
- * @param maxHeightFunc
* @private
*/
CircleGeometry.createShadowVolume = function (
diff --git a/packages/engine/Source/Core/CircleOutlineGeometry.js b/packages/engine/Source/Core/CircleOutlineGeometry.js
index f9044cdee5e4..80e40987de19 100644
--- a/packages/engine/Source/Core/CircleOutlineGeometry.js
+++ b/packages/engine/Source/Core/CircleOutlineGeometry.js
@@ -7,20 +7,25 @@ import Ellipsoid from "./Ellipsoid.js";
/**
* A description of the outline of a circle on the ellipsoid.
+ *
* @alias CircleOutlineGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.center The circle's center point in the fixed frame.
* @param {number} options.radius The radius in meters.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid the circle will be on.
- * @param {number} [options.height] The distance in meters between the circle and the ellipsoid surface.
- * @param {number} [options.granularity] The angular distance between points on the circle in radians.
- * @param {number} [options.extrudedHeight] The distance in meters between the circle's extruded face and the ellipsoid surface.
- * @param {number} [options.numberOfVerticalLines] Number of lines to draw between the top and bottom of an extruded circle.
- * @throws {DeveloperError} radius must be greater than zero.
- * @throws {DeveloperError} granularity must be greater than zero.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid the circle will be on.
+ * @param {number} [options.height=0.0] The distance in meters between the circle and the ellipsoid surface.
+ * @param {number} [options.granularity=0.02] The angular distance between points on the circle in radians.
+ * @param {number} [options.extrudedHeight=0.0] The distance in meters between the circle's extruded face and the ellipsoid surface.
+ * @param {number} [options.numberOfVerticalLines=16] Number of lines to draw between the top and bottom of an extruded circle.
+ *
+ * @exception {DeveloperError} radius must be greater than zero.
+ * @exception {DeveloperError} granularity must be greater than zero.
+ *
* @see CircleOutlineGeometry.createGeometry
* @see Packable
+ *
* @example
* // Create a circle.
* const circle = new Cesium.CircleOutlineGeometry({
@@ -59,9 +64,11 @@ CircleOutlineGeometry.packedLength = EllipseOutlineGeometry.packedLength;
/**
* Stores the provided instance into the provided array.
+ *
* @param {CircleOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
CircleOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -94,8 +101,9 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {CircleOutlineGeometry} [result] The object into which to store the result.
* @returns {CircleOutlineGeometry} The modified result parameter or a new CircleOutlineGeometry instance if one was not provided.
*/
@@ -131,6 +139,7 @@ CircleOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an outline of a circle on an ellipsoid, including its vertices, indices, and a bounding sphere.
+ *
* @param {CircleOutlineGeometry} circleGeometry A description of the circle.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/Clock.js b/packages/engine/Source/Core/Clock.js
index eb227c37e1dc..8bdea4fbf34c 100644
--- a/packages/engine/Source/Core/Clock.js
+++ b/packages/engine/Source/Core/Clock.js
@@ -9,18 +9,23 @@ import JulianDate from "./JulianDate.js";
/**
* A simple clock for keeping track of simulated time.
+ *
* @alias Clock
- * @class
+ * @constructor
+ *
* @param {object} [options] Object with the following properties:
* @param {JulianDate} [options.startTime] The start time of the clock.
* @param {JulianDate} [options.stopTime] The stop time of the clock.
* @param {JulianDate} [options.currentTime] The current time.
- * @param {number} [options.multiplier] Determines how much time advances when {@link Clock#tick} is called, negative values allow for advancing backwards.
- * @param {ClockStep} [options.clockStep] Determines if calls to {@link Clock#tick} are frame dependent or system clock dependent.
- * @param {ClockRange} [options.clockRange] Determines how the clock should behave when {@link Clock#startTime} or {@link Clock#stopTime} is reached.
- * @param {boolean} [options.canAnimate] Indicates whether {@link Clock#tick} can advance time. This could be false if data is being buffered, for example. The clock will only tick when both {@link Clock#canAnimate} and {@link Clock#shouldAnimate} are true.
- * @param {boolean} [options.shouldAnimate] Indicates whether {@link Clock#tick} should attempt to advance time. The clock will only tick when both {@link Clock#canAnimate} and {@link Clock#shouldAnimate} are true.
- * @throws {DeveloperError} startTime must come before stopTime.
+ * @param {number} [options.multiplier=1.0] Determines how much time advances when {@link Clock#tick} is called, negative values allow for advancing backwards.
+ * @param {ClockStep} [options.clockStep=ClockStep.SYSTEM_CLOCK_MULTIPLIER] Determines if calls to {@link Clock#tick} are frame dependent or system clock dependent.
+ * @param {ClockRange} [options.clockRange=ClockRange.UNBOUNDED] Determines how the clock should behave when {@link Clock#startTime} or {@link Clock#stopTime} is reached.
+ * @param {boolean} [options.canAnimate=true] Indicates whether {@link Clock#tick} can advance time. This could be false if data is being buffered, for example. The clock will only tick when both {@link Clock#canAnimate} and {@link Clock#shouldAnimate} are true.
+ * @param {boolean} [options.shouldAnimate=false] Indicates whether {@link Clock#tick} should attempt to advance time. The clock will only tick when both {@link Clock#canAnimate} and {@link Clock#shouldAnimate} are true.
+ *
+ * @exception {DeveloperError} startTime must come before stopTime.
+ *
+ *
* @example
* // Create a clock that loops on Christmas day 2013 and runs in real-time.
* const clock = new Cesium.Clock({
@@ -30,6 +35,7 @@ import JulianDate from "./JulianDate.js";
* clockRange : Cesium.ClockRange.LOOP_STOP,
* clockStep : Cesium.ClockStep.SYSTEM_CLOCK_MULTIPLIER
* });
+ *
* @see ClockStep
* @see ClockRange
* @see JulianDate
@@ -249,6 +255,7 @@ Object.defineProperties(Clock.prototype, {
* Advances the clock from the current time based on the current configuration options.
* tick should be called every frame, regardless of whether animation is taking place
* or not. To control animation, use the {@link Clock#shouldAnimate} property.
+ *
* @returns {JulianDate} The new value of the {@link Clock#currentTime} property.
*/
Clock.prototype.tick = function () {
diff --git a/packages/engine/Source/Core/ClockRange.js b/packages/engine/Source/Core/ClockRange.js
index 9b02a4b67e2f..8a8e83f76572 100644
--- a/packages/engine/Source/Core/ClockRange.js
+++ b/packages/engine/Source/Core/ClockRange.js
@@ -1,13 +1,16 @@
/**
* Constants used by {@link Clock#tick} to determine behavior
* when {@link Clock#startTime} or {@link Clock#stopTime} is reached.
+ *
* @enum {number}
+ *
* @see Clock
* @see ClockStep
*/
const ClockRange = {
/**
* {@link Clock#tick} will always advances the clock in its current direction.
+ *
* @type {number}
* @constant
*/
@@ -16,6 +19,7 @@ const ClockRange = {
/**
* When {@link Clock#startTime} or {@link Clock#stopTime} is reached,
* {@link Clock#tick} will not advance {@link Clock#currentTime} any further.
+ *
* @type {number}
* @constant
*/
@@ -26,6 +30,7 @@ const ClockRange = {
* {@link Clock#currentTime} to the opposite end of the interval. When
* time is moving backwards, {@link Clock#tick} will not advance past
* {@link Clock#startTime}
+ *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/ClockStep.js b/packages/engine/Source/Core/ClockStep.js
index bc814af1fa4f..0494677f9d09 100644
--- a/packages/engine/Source/Core/ClockStep.js
+++ b/packages/engine/Source/Core/ClockStep.js
@@ -1,7 +1,9 @@
/**
* Constants to determine how much time advances with each call
* to {@link Clock#tick}.
+ *
* @enum {number}
+ *
* @see Clock
* @see ClockRange
*/
@@ -9,6 +11,7 @@ const ClockStep = {
/**
* {@link Clock#tick} advances the current time by a fixed step,
* which is the number of seconds specified by {@link Clock#multiplier}.
+ *
* @type {number}
* @constant
*/
@@ -17,6 +20,7 @@ const ClockStep = {
/**
* {@link Clock#tick} advances the current time by the amount of system
* time elapsed since the previous call multiplied by {@link Clock#multiplier}.
+ *
* @type {number}
* @constant
*/
@@ -25,6 +29,7 @@ const ClockStep = {
/**
* {@link Clock#tick} sets the clock to the current system time;
* ignoring all other settings.
+ *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/Color.js b/packages/engine/Source/Core/Color.js
index 4fe14868bd00..23683732133b 100644
--- a/packages/engine/Source/Core/Color.js
+++ b/packages/engine/Source/Core/Color.js
@@ -26,12 +26,14 @@ function hue2rgb(m1, m2, h) {
/**
* A color, specified using red, green, blue, and alpha values,
* which range from 0
(no intensity) to 1.0
(full intensity).
- * @param {number} [red] The red component.
- * @param {number} [green] The green component.
- * @param {number} [blue] The blue component.
- * @param {number} [alpha] The alpha component.
- * @class
+ * @param {number} [red=1.0] The red component.
+ * @param {number} [green=1.0] The green component.
+ * @param {number} [blue=1.0] The blue component.
+ * @param {number} [alpha=1.0] The alpha component.
+ *
+ * @constructor
* @alias Color
+ *
* @see Packable
*/
function Color(red, green, blue, alpha) {
@@ -64,6 +66,7 @@ function Color(red, green, blue, alpha) {
/**
* Creates a Color instance from a {@link Cartesian4}. x
, y
, z
,
* and w
map to red
, green
, blue
, and alpha
, respectively.
+ *
* @param {Cartesian4} cartesian The source cartesian.
* @param {Color} [result] The object onto which to store the result.
* @returns {Color} The modified result parameter or a new Color instance if one was not provided.
@@ -87,10 +90,11 @@ Color.fromCartesian4 = function (cartesian, result) {
/**
* Creates a new Color specified using red, green, blue, and alpha values
* that are in the range of 0 to 255, converting them internally to a range of 0.0 to 1.0.
- * @param {number} [red] The red component.
- * @param {number} [green] The green component.
- * @param {number} [blue] The blue component.
- * @param {number} [alpha] The alpha component.
+ *
+ * @param {number} [red=255] The red component.
+ * @param {number} [green=255] The green component.
+ * @param {number} [blue=255] The blue component.
+ * @param {number} [alpha=255] The alpha component.
* @param {Color} [result] The object onto which to store the result.
* @returns {Color} The modified result parameter or a new Color instance if one was not provided.
*/
@@ -114,10 +118,12 @@ Color.fromBytes = function (red, green, blue, alpha, result) {
/**
* Creates a new Color that has the same red, green, and blue components
* of the specified color, but with the specified alpha value.
+ *
* @param {Color} color The base color
* @param {number} alpha The new alpha component.
* @param {Color} [result] The object onto which to store the result.
* @returns {Color} The modified result parameter or a new Color instance if one was not provided.
+ *
* @example const translucentRed = Cesium.Color.fromAlpha(Cesium.Color.RED, 0.9);
*/
Color.fromAlpha = function (color, alpha, result) {
@@ -149,11 +155,14 @@ if (FeatureDetection.supportsTypedArrays()) {
/**
* Creates a new Color from a single numeric unsigned 32-bit RGBA value, using the endianness
* of the system.
+ *
* @param {number} rgba A single numeric unsigned 32-bit RGBA value.
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The color object.
+ *
* @example
* const color = Cesium.Color.fromRgba(0x67ADDFFF);
+ *
* @see Color#toRgba
*/
Color.fromRgba = function (rgba, result) {
@@ -170,12 +179,14 @@ Color.fromRgba = function (rgba, result) {
/**
* Creates a Color instance from hue, saturation, and lightness.
- * @param {number} [hue] The hue angle 0...1
- * @param {number} [saturation] The saturation value 0...1
- * @param {number} [lightness] The lightness value 0...1
- * @param {number} [alpha] The alpha component 0...1
+ *
+ * @param {number} [hue=0] The hue angle 0...1
+ * @param {number} [saturation=0] The saturation value 0...1
+ * @param {number} [lightness=0] The lightness value 0...1
+ * @param {number} [alpha=1.0] The alpha component 0...1
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The color object.
+ *
* @see {@link http://www.w3.org/TR/css3-color/#hsl-color|CSS color values}
*/
Color.fromHsl = function (hue, saturation, lightness, alpha, result) {
@@ -216,25 +227,28 @@ Color.fromHsl = function (hue, saturation, lightness, alpha, result) {
/**
* Creates a random color using the provided options. For reproducible random colors, you should
* call {@link CesiumMath#setRandomNumberSeed} once at the beginning of your application.
+ *
* @param {object} [options] Object with the following properties:
* @param {number} [options.red] If specified, the red component to use instead of a randomized value.
- * @param {number} [options.minimumRed] The maximum red value to generate if none was specified.
- * @param {number} [options.maximumRed] The minimum red value to generate if none was specified.
+ * @param {number} [options.minimumRed=0.0] The maximum red value to generate if none was specified.
+ * @param {number} [options.maximumRed=1.0] The minimum red value to generate if none was specified.
* @param {number} [options.green] If specified, the green component to use instead of a randomized value.
- * @param {number} [options.minimumGreen] The maximum green value to generate if none was specified.
- * @param {number} [options.maximumGreen] The minimum green value to generate if none was specified.
+ * @param {number} [options.minimumGreen=0.0] The maximum green value to generate if none was specified.
+ * @param {number} [options.maximumGreen=1.0] The minimum green value to generate if none was specified.
* @param {number} [options.blue] If specified, the blue component to use instead of a randomized value.
- * @param {number} [options.minimumBlue] The maximum blue value to generate if none was specified.
- * @param {number} [options.maximumBlue] The minimum blue value to generate if none was specified.
+ * @param {number} [options.minimumBlue=0.0] The maximum blue value to generate if none was specified.
+ * @param {number} [options.maximumBlue=1.0] The minimum blue value to generate if none was specified.
* @param {number} [options.alpha] If specified, the alpha component to use instead of a randomized value.
- * @param {number} [options.minimumAlpha] The maximum alpha value to generate if none was specified.
- * @param {number} [options.maximumAlpha] The minimum alpha value to generate if none was specified.
+ * @param {number} [options.minimumAlpha=0.0] The maximum alpha value to generate if none was specified.
+ * @param {number} [options.maximumAlpha=1.0] The minimum alpha value to generate if none was specified.
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The modified result parameter or a new instance if result was undefined.
- * @throws {DeveloperError} minimumRed must be less than or equal to maximumRed.
- * @throws {DeveloperError} minimumGreen must be less than or equal to maximumGreen.
- * @throws {DeveloperError} minimumBlue must be less than or equal to maximumBlue.
- * @throws {DeveloperError} minimumAlpha must be less than or equal to maximumAlpha.
+ *
+ * @exception {DeveloperError} minimumRed must be less than or equal to maximumRed.
+ * @exception {DeveloperError} minimumGreen must be less than or equal to maximumGreen.
+ * @exception {DeveloperError} minimumBlue must be less than or equal to maximumBlue.
+ * @exception {DeveloperError} minimumAlpha must be less than or equal to maximumAlpha.
+ *
* @example
* //Create a completely random color
* const color = Cesium.Color.fromRandom();
@@ -344,12 +358,16 @@ const hslParenthesesMatcher = /^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[
/**
* Creates a Color instance from a CSS color value.
+ *
* @param {string} color The CSS color value in #rgb, #rgba, #rrggbb, #rrggbbaa, rgb(), rgba(), hsl(), or hsla() format.
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The color object, or undefined if the string was not a valid CSS color.
+ *
+ *
* @example
* const cesiumBlue = Cesium.Color.fromCssColorString('#67ADDF');
* const green = Cesium.Color.fromCssColorString('green');
+ *
* @see {@link http://www.w3.org/TR/css3-color|CSS color values}
*/
Color.fromCssColorString = function (color, result) {
@@ -423,9 +441,11 @@ Color.packedLength = 4;
/**
* Stores the provided instance into the provided array.
+ *
* @param {Color} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
Color.pack = function (value, array, startingIndex) {
@@ -445,8 +465,9 @@ Color.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Color} [result] The object into which to store the result.
* @returns {Color} The modified result parameter or a new Color instance if one was not provided.
*/
@@ -469,6 +490,7 @@ Color.unpack = function (array, startingIndex, result) {
/**
* Converts a 'byte' color component in the range of 0 to 255 into
* a 'float' color component in the range of 0 to 1.0.
+ *
* @param {number} number The number to be converted.
* @returns {number} The converted number.
*/
@@ -479,6 +501,7 @@ Color.byteToFloat = function (number) {
/**
* Converts a 'float' color component in the range of 0 to 1.0 into
* a 'byte' color component in the range of 0 to 255.
+ *
* @param {number} number The number to be converted.
* @returns {number} The converted number.
*/
@@ -488,6 +511,7 @@ Color.floatToByte = function (number) {
/**
* Duplicates a Color.
+ *
* @param {Color} color The Color to duplicate.
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The modified result parameter or a new instance if result was undefined. (Returns undefined if color is undefined)
@@ -508,6 +532,7 @@ Color.clone = function (color, result) {
/**
* Returns true if the first Color equals the second color.
+ *
* @param {Color} left The first Color to compare for equality.
* @param {Color} right The second Color to compare for equality.
* @returns {boolean} true
if the Colors are equal; otherwise, false
.
@@ -525,9 +550,6 @@ Color.equals = function (left, right) {
};
/**
- * @param color
- * @param array
- * @param offset
* @private
*/
Color.equalsArray = function (color, array, offset) {
@@ -541,6 +563,7 @@ Color.equalsArray = function (color, array, offset) {
/**
* Returns a duplicate of a Color instance.
+ *
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The modified result parameter or a new instance if result was undefined.
*/
@@ -550,6 +573,7 @@ Color.prototype.clone = function (result) {
/**
* Returns true if this Color equals other.
+ *
* @param {Color} other The Color to compare for equality.
* @returns {boolean} true
if the Colors are equal; otherwise, false
.
*/
@@ -559,8 +583,9 @@ Color.prototype.equals = function (other) {
/**
* Returns true
if this Color equals other componentwise within the specified epsilon.
+ *
* @param {Color} other The Color to compare for equality.
- * @param {number} [epsilon] The epsilon to use for equality testing.
+ * @param {number} [epsilon=0.0] The epsilon to use for equality testing.
* @returns {boolean} true
if the Colors are equal within the specified epsilon; otherwise, false
.
*/
Color.prototype.equalsEpsilon = function (other, epsilon) {
@@ -576,6 +601,7 @@ Color.prototype.equalsEpsilon = function (other, epsilon) {
/**
* Creates a string representing this Color in the format '(red, green, blue, alpha)'.
+ *
* @returns {string} A string representing this Color in the format '(red, green, blue, alpha)'.
*/
Color.prototype.toString = function () {
@@ -584,7 +610,9 @@ Color.prototype.toString = function () {
/**
* Creates a string containing the CSS color value for this color.
+ *
* @returns {string} The CSS equivalent of this color.
+ *
* @see {@link http://www.w3.org/TR/css3-color/#rgba-color|CSS RGB or RGBA color values}
*/
Color.prototype.toCssColorString = function () {
@@ -599,6 +627,7 @@ Color.prototype.toCssColorString = function () {
/**
* Creates a string containing CSS hex string color value for this color.
+ *
* @returns {string} The CSS hex string equivalent of this color.
*/
Color.prototype.toCssHexString = function () {
@@ -627,6 +656,7 @@ Color.prototype.toCssHexString = function () {
/**
* Converts this color to an array of red, green, blue, and alpha values
* that are in the range of 0 to 255.
+ *
* @param {number[]} [result] The array to store the result in, if undefined a new instance will be created.
* @returns {number[]} The modified result parameter or a new instance if result was undefined.
*/
@@ -649,9 +679,13 @@ Color.prototype.toBytes = function (result) {
/**
* Converts this color to a single numeric unsigned 32-bit RGBA value, using the endianness
* of the system.
+ *
* @returns {number} A single numeric unsigned 32-bit RGBA value.
+ *
+ *
* @example
* const rgba = Cesium.Color.BLUE.toRgba();
+ *
* @see Color.fromRgba
*/
Color.prototype.toRgba = function () {
@@ -665,9 +699,11 @@ Color.prototype.toRgba = function () {
/**
* Brightens this color by the provided magnitude.
+ *
* @param {number} magnitude A positive number indicating the amount to brighten.
* @param {Color} result The object onto which to store the result.
* @returns {Color} The modified result parameter.
+ *
* @example
* const brightBlue = Cesium.Color.BLUE.brighten(0.5, new Cesium.Color());
*/
@@ -688,9 +724,11 @@ Color.prototype.brighten = function (magnitude, result) {
/**
* Darkens this color by the provided magnitude.
+ *
* @param {number} magnitude A positive number indicating the amount to darken.
* @param {Color} result The object onto which to store the result.
* @returns {Color} The modified result parameter.
+ *
* @example
* const darkBlue = Cesium.Color.BLUE.darken(0.5, new Cesium.Color());
*/
@@ -712,9 +750,11 @@ Color.prototype.darken = function (magnitude, result) {
/**
* Creates a new Color that has the same red, green, and blue components
* as this Color, but with the specified alpha value.
+ *
* @param {number} alpha The new alpha component.
* @param {Color} [result] The object onto which to store the result.
* @returns {Color} The modified result parameter or a new Color instance if one was not provided.
+ *
* @example const translucentRed = Cesium.Color.RED.withAlpha(0.9);
*/
Color.prototype.withAlpha = function (alpha, result) {
@@ -723,6 +763,7 @@ Color.prototype.withAlpha = function (alpha, result) {
/**
* Computes the componentwise sum of two Colors.
+ *
* @param {Color} left The first Color.
* @param {Color} right The second Color.
* @param {Color} result The object onto which to store the result.
@@ -744,6 +785,7 @@ Color.add = function (left, right, result) {
/**
* Computes the componentwise difference of two Colors.
+ *
* @param {Color} left The first Color.
* @param {Color} right The second Color.
* @param {Color} result The object onto which to store the result.
@@ -765,6 +807,7 @@ Color.subtract = function (left, right, result) {
/**
* Computes the componentwise product of two Colors.
+ *
* @param {Color} left The first Color.
* @param {Color} right The second Color.
* @param {Color} result The object onto which to store the result.
@@ -786,6 +829,7 @@ Color.multiply = function (left, right, result) {
/**
* Computes the componentwise quotient of two Colors.
+ *
* @param {Color} left The first Color.
* @param {Color} right The second Color.
* @param {Color} result The object onto which to store the result.
@@ -807,6 +851,7 @@ Color.divide = function (left, right, result) {
/**
* Computes the componentwise modulus of two Colors.
+ *
* @param {Color} left The first Color.
* @param {Color} right The second Color.
* @param {Color} result The object onto which to store the result.
@@ -828,6 +873,7 @@ Color.mod = function (left, right, result) {
/**
* Computes the linear interpolation or extrapolation at t between the provided colors.
+ *
* @param {Color} start The color corresponding to t at 0.0.
* @param {Color} end The color corresponding to t at 1.0.
* @param {number} t The point along t at which to interpolate.
@@ -851,6 +897,7 @@ Color.lerp = function (start, end, t, result) {
/**
* Multiplies the provided Color componentwise by the provided scalar.
+ *
* @param {Color} color The Color to be scaled.
* @param {number} scalar The scalar to multiply with.
* @param {Color} result The object onto which to store the result.
@@ -872,6 +919,7 @@ Color.multiplyByScalar = function (color, scalar, result) {
/**
* Divides the provided Color componentwise by the provided scalar.
+ *
* @param {Color} color The Color to be divided.
* @param {number} scalar The scalar to divide with.
* @param {Color} result The object onto which to store the result.
@@ -894,6 +942,7 @@ Color.divideByScalar = function (color, scalar, result) {
/**
* An immutable Color instance initialized to CSS color #F0F8FF
*
+ *
* @constant
* @type {Color}
*/
@@ -902,6 +951,7 @@ Color.ALICEBLUE = Object.freeze(Color.fromCssColorString("#F0F8FF"));
/**
* An immutable Color instance initialized to CSS color #FAEBD7
*
+ *
* @constant
* @type {Color}
*/
@@ -910,6 +960,7 @@ Color.ANTIQUEWHITE = Object.freeze(Color.fromCssColorString("#FAEBD7"));
/**
* An immutable Color instance initialized to CSS color #00FFFF
*
+ *
* @constant
* @type {Color}
*/
@@ -918,6 +969,7 @@ Color.AQUA = Object.freeze(Color.fromCssColorString("#00FFFF"));
/**
* An immutable Color instance initialized to CSS color #7FFFD4
*
+ *
* @constant
* @type {Color}
*/
@@ -926,6 +978,7 @@ Color.AQUAMARINE = Object.freeze(Color.fromCssColorString("#7FFFD4"));
/**
* An immutable Color instance initialized to CSS color #F0FFFF
*
+ *
* @constant
* @type {Color}
*/
@@ -934,6 +987,7 @@ Color.AZURE = Object.freeze(Color.fromCssColorString("#F0FFFF"));
/**
* An immutable Color instance initialized to CSS color #F5F5DC
*
+ *
* @constant
* @type {Color}
*/
@@ -942,6 +996,7 @@ Color.BEIGE = Object.freeze(Color.fromCssColorString("#F5F5DC"));
/**
* An immutable Color instance initialized to CSS color #FFE4C4
*
+ *
* @constant
* @type {Color}
*/
@@ -950,6 +1005,7 @@ Color.BISQUE = Object.freeze(Color.fromCssColorString("#FFE4C4"));
/**
* An immutable Color instance initialized to CSS color #000000
*
+ *
* @constant
* @type {Color}
*/
@@ -958,6 +1014,7 @@ Color.BLACK = Object.freeze(Color.fromCssColorString("#000000"));
/**
* An immutable Color instance initialized to CSS color #FFEBCD
*
+ *
* @constant
* @type {Color}
*/
@@ -966,6 +1023,7 @@ Color.BLANCHEDALMOND = Object.freeze(Color.fromCssColorString("#FFEBCD"));
/**
* An immutable Color instance initialized to CSS color #0000FF
*
+ *
* @constant
* @type {Color}
*/
@@ -974,6 +1032,7 @@ Color.BLUE = Object.freeze(Color.fromCssColorString("#0000FF"));
/**
* An immutable Color instance initialized to CSS color #8A2BE2
*
+ *
* @constant
* @type {Color}
*/
@@ -982,6 +1041,7 @@ Color.BLUEVIOLET = Object.freeze(Color.fromCssColorString("#8A2BE2"));
/**
* An immutable Color instance initialized to CSS color #A52A2A
*
+ *
* @constant
* @type {Color}
*/
@@ -990,6 +1050,7 @@ Color.BROWN = Object.freeze(Color.fromCssColorString("#A52A2A"));
/**
* An immutable Color instance initialized to CSS color #DEB887
*
+ *
* @constant
* @type {Color}
*/
@@ -998,6 +1059,7 @@ Color.BURLYWOOD = Object.freeze(Color.fromCssColorString("#DEB887"));
/**
* An immutable Color instance initialized to CSS color #5F9EA0
*
+ *
* @constant
* @type {Color}
*/
@@ -1005,6 +1067,7 @@ Color.CADETBLUE = Object.freeze(Color.fromCssColorString("#5F9EA0"));
/**
* An immutable Color instance initialized to CSS color #7FFF00
*
+ *
* @constant
* @type {Color}
*/
@@ -1013,6 +1076,7 @@ Color.CHARTREUSE = Object.freeze(Color.fromCssColorString("#7FFF00"));
/**
* An immutable Color instance initialized to CSS color #D2691E
*
+ *
* @constant
* @type {Color}
*/
@@ -1021,6 +1085,7 @@ Color.CHOCOLATE = Object.freeze(Color.fromCssColorString("#D2691E"));
/**
* An immutable Color instance initialized to CSS color #FF7F50
*
+ *
* @constant
* @type {Color}
*/
@@ -1029,6 +1094,7 @@ Color.CORAL = Object.freeze(Color.fromCssColorString("#FF7F50"));
/**
* An immutable Color instance initialized to CSS color #6495ED
*
+ *
* @constant
* @type {Color}
*/
@@ -1037,6 +1103,7 @@ Color.CORNFLOWERBLUE = Object.freeze(Color.fromCssColorString("#6495ED"));
/**
* An immutable Color instance initialized to CSS color #FFF8DC
*
+ *
* @constant
* @type {Color}
*/
@@ -1045,6 +1112,7 @@ Color.CORNSILK = Object.freeze(Color.fromCssColorString("#FFF8DC"));
/**
* An immutable Color instance initialized to CSS color #DC143C
*
+ *
* @constant
* @type {Color}
*/
@@ -1053,6 +1121,7 @@ Color.CRIMSON = Object.freeze(Color.fromCssColorString("#DC143C"));
/**
* An immutable Color instance initialized to CSS color #00FFFF
*
+ *
* @constant
* @type {Color}
*/
@@ -1061,6 +1130,7 @@ Color.CYAN = Object.freeze(Color.fromCssColorString("#00FFFF"));
/**
* An immutable Color instance initialized to CSS color #00008B
*
+ *
* @constant
* @type {Color}
*/
@@ -1069,6 +1139,7 @@ Color.DARKBLUE = Object.freeze(Color.fromCssColorString("#00008B"));
/**
* An immutable Color instance initialized to CSS color #008B8B
*
+ *
* @constant
* @type {Color}
*/
@@ -1077,6 +1148,7 @@ Color.DARKCYAN = Object.freeze(Color.fromCssColorString("#008B8B"));
/**
* An immutable Color instance initialized to CSS color #B8860B
*
+ *
* @constant
* @type {Color}
*/
@@ -1085,6 +1157,7 @@ Color.DARKGOLDENROD = Object.freeze(Color.fromCssColorString("#B8860B"));
/**
* An immutable Color instance initialized to CSS color #A9A9A9
*
+ *
* @constant
* @type {Color}
*/
@@ -1093,6 +1166,7 @@ Color.DARKGRAY = Object.freeze(Color.fromCssColorString("#A9A9A9"));
/**
* An immutable Color instance initialized to CSS color #006400
*
+ *
* @constant
* @type {Color}
*/
@@ -1101,6 +1175,7 @@ Color.DARKGREEN = Object.freeze(Color.fromCssColorString("#006400"));
/**
* An immutable Color instance initialized to CSS color #A9A9A9
*
+ *
* @constant
* @type {Color}
*/
@@ -1109,6 +1184,7 @@ Color.DARKGREY = Color.DARKGRAY;
/**
* An immutable Color instance initialized to CSS color #BDB76B
*
+ *
* @constant
* @type {Color}
*/
@@ -1117,6 +1193,7 @@ Color.DARKKHAKI = Object.freeze(Color.fromCssColorString("#BDB76B"));
/**
* An immutable Color instance initialized to CSS color #8B008B
*
+ *
* @constant
* @type {Color}
*/
@@ -1125,6 +1202,7 @@ Color.DARKMAGENTA = Object.freeze(Color.fromCssColorString("#8B008B"));
/**
* An immutable Color instance initialized to CSS color #556B2F
*
+ *
* @constant
* @type {Color}
*/
@@ -1133,6 +1211,7 @@ Color.DARKOLIVEGREEN = Object.freeze(Color.fromCssColorString("#556B2F"));
/**
* An immutable Color instance initialized to CSS color #FF8C00
*
+ *
* @constant
* @type {Color}
*/
@@ -1141,6 +1220,7 @@ Color.DARKORANGE = Object.freeze(Color.fromCssColorString("#FF8C00"));
/**
* An immutable Color instance initialized to CSS color #9932CC
*
+ *
* @constant
* @type {Color}
*/
@@ -1149,6 +1229,7 @@ Color.DARKORCHID = Object.freeze(Color.fromCssColorString("#9932CC"));
/**
* An immutable Color instance initialized to CSS color #8B0000
*
+ *
* @constant
* @type {Color}
*/
@@ -1157,6 +1238,7 @@ Color.DARKRED = Object.freeze(Color.fromCssColorString("#8B0000"));
/**
* An immutable Color instance initialized to CSS color #E9967A
*
+ *
* @constant
* @type {Color}
*/
@@ -1165,6 +1247,7 @@ Color.DARKSALMON = Object.freeze(Color.fromCssColorString("#E9967A"));
/**
* An immutable Color instance initialized to CSS color #8FBC8F
*
+ *
* @constant
* @type {Color}
*/
@@ -1173,6 +1256,7 @@ Color.DARKSEAGREEN = Object.freeze(Color.fromCssColorString("#8FBC8F"));
/**
* An immutable Color instance initialized to CSS color #483D8B
*
+ *
* @constant
* @type {Color}
*/
@@ -1181,6 +1265,7 @@ Color.DARKSLATEBLUE = Object.freeze(Color.fromCssColorString("#483D8B"));
/**
* An immutable Color instance initialized to CSS color #2F4F4F
*
+ *
* @constant
* @type {Color}
*/
@@ -1189,6 +1274,7 @@ Color.DARKSLATEGRAY = Object.freeze(Color.fromCssColorString("#2F4F4F"));
/**
* An immutable Color instance initialized to CSS color #2F4F4F
*
+ *
* @constant
* @type {Color}
*/
@@ -1197,6 +1283,7 @@ Color.DARKSLATEGREY = Color.DARKSLATEGRAY;
/**
* An immutable Color instance initialized to CSS color #00CED1
*
+ *
* @constant
* @type {Color}
*/
@@ -1205,6 +1292,7 @@ Color.DARKTURQUOISE = Object.freeze(Color.fromCssColorString("#00CED1"));
/**
* An immutable Color instance initialized to CSS color #9400D3
*
+ *
* @constant
* @type {Color}
*/
@@ -1213,6 +1301,7 @@ Color.DARKVIOLET = Object.freeze(Color.fromCssColorString("#9400D3"));
/**
* An immutable Color instance initialized to CSS color #FF1493
*
+ *
* @constant
* @type {Color}
*/
@@ -1221,6 +1310,7 @@ Color.DEEPPINK = Object.freeze(Color.fromCssColorString("#FF1493"));
/**
* An immutable Color instance initialized to CSS color #00BFFF
*
+ *
* @constant
* @type {Color}
*/
@@ -1229,6 +1319,7 @@ Color.DEEPSKYBLUE = Object.freeze(Color.fromCssColorString("#00BFFF"));
/**
* An immutable Color instance initialized to CSS color #696969
*
+ *
* @constant
* @type {Color}
*/
@@ -1237,6 +1328,7 @@ Color.DIMGRAY = Object.freeze(Color.fromCssColorString("#696969"));
/**
* An immutable Color instance initialized to CSS color #696969
*
+ *
* @constant
* @type {Color}
*/
@@ -1245,6 +1337,7 @@ Color.DIMGREY = Color.DIMGRAY;
/**
* An immutable Color instance initialized to CSS color #1E90FF
*
+ *
* @constant
* @type {Color}
*/
@@ -1253,6 +1346,7 @@ Color.DODGERBLUE = Object.freeze(Color.fromCssColorString("#1E90FF"));
/**
* An immutable Color instance initialized to CSS color #B22222
*
+ *
* @constant
* @type {Color}
*/
@@ -1261,6 +1355,7 @@ Color.FIREBRICK = Object.freeze(Color.fromCssColorString("#B22222"));
/**
* An immutable Color instance initialized to CSS color #FFFAF0
*
+ *
* @constant
* @type {Color}
*/
@@ -1269,6 +1364,7 @@ Color.FLORALWHITE = Object.freeze(Color.fromCssColorString("#FFFAF0"));
/**
* An immutable Color instance initialized to CSS color #228B22
*
+ *
* @constant
* @type {Color}
*/
@@ -1277,6 +1373,7 @@ Color.FORESTGREEN = Object.freeze(Color.fromCssColorString("#228B22"));
/**
* An immutable Color instance initialized to CSS color #FF00FF
*
+ *
* @constant
* @type {Color}
*/
@@ -1285,6 +1382,7 @@ Color.FUCHSIA = Object.freeze(Color.fromCssColorString("#FF00FF"));
/**
* An immutable Color instance initialized to CSS color #DCDCDC
*
+ *
* @constant
* @type {Color}
*/
@@ -1293,6 +1391,7 @@ Color.GAINSBORO = Object.freeze(Color.fromCssColorString("#DCDCDC"));
/**
* An immutable Color instance initialized to CSS color #F8F8FF
*
+ *
* @constant
* @type {Color}
*/
@@ -1301,6 +1400,7 @@ Color.GHOSTWHITE = Object.freeze(Color.fromCssColorString("#F8F8FF"));
/**
* An immutable Color instance initialized to CSS color #FFD700
*
+ *
* @constant
* @type {Color}
*/
@@ -1309,6 +1409,7 @@ Color.GOLD = Object.freeze(Color.fromCssColorString("#FFD700"));
/**
* An immutable Color instance initialized to CSS color #DAA520
*
+ *
* @constant
* @type {Color}
*/
@@ -1317,6 +1418,7 @@ Color.GOLDENROD = Object.freeze(Color.fromCssColorString("#DAA520"));
/**
* An immutable Color instance initialized to CSS color #808080
*
+ *
* @constant
* @type {Color}
*/
@@ -1325,6 +1427,7 @@ Color.GRAY = Object.freeze(Color.fromCssColorString("#808080"));
/**
* An immutable Color instance initialized to CSS color #008000
*
+ *
* @constant
* @type {Color}
*/
@@ -1333,6 +1436,7 @@ Color.GREEN = Object.freeze(Color.fromCssColorString("#008000"));
/**
* An immutable Color instance initialized to CSS color #ADFF2F
*
+ *
* @constant
* @type {Color}
*/
@@ -1341,6 +1445,7 @@ Color.GREENYELLOW = Object.freeze(Color.fromCssColorString("#ADFF2F"));
/**
* An immutable Color instance initialized to CSS color #808080
*
+ *
* @constant
* @type {Color}
*/
@@ -1349,6 +1454,7 @@ Color.GREY = Color.GRAY;
/**
* An immutable Color instance initialized to CSS color #F0FFF0
*
+ *
* @constant
* @type {Color}
*/
@@ -1357,6 +1463,7 @@ Color.HONEYDEW = Object.freeze(Color.fromCssColorString("#F0FFF0"));
/**
* An immutable Color instance initialized to CSS color #FF69B4
*
+ *
* @constant
* @type {Color}
*/
@@ -1365,6 +1472,7 @@ Color.HOTPINK = Object.freeze(Color.fromCssColorString("#FF69B4"));
/**
* An immutable Color instance initialized to CSS color #CD5C5C
*
+ *
* @constant
* @type {Color}
*/
@@ -1373,6 +1481,7 @@ Color.INDIANRED = Object.freeze(Color.fromCssColorString("#CD5C5C"));
/**
* An immutable Color instance initialized to CSS color #4B0082
*
+ *
* @constant
* @type {Color}
*/
@@ -1381,6 +1490,7 @@ Color.INDIGO = Object.freeze(Color.fromCssColorString("#4B0082"));
/**
* An immutable Color instance initialized to CSS color #FFFFF0
*
+ *
* @constant
* @type {Color}
*/
@@ -1389,6 +1499,7 @@ Color.IVORY = Object.freeze(Color.fromCssColorString("#FFFFF0"));
/**
* An immutable Color instance initialized to CSS color #F0E68C
*
+ *
* @constant
* @type {Color}
*/
@@ -1397,6 +1508,7 @@ Color.KHAKI = Object.freeze(Color.fromCssColorString("#F0E68C"));
/**
* An immutable Color instance initialized to CSS color #E6E6FA
*
+ *
* @constant
* @type {Color}
*/
@@ -1405,6 +1517,7 @@ Color.LAVENDER = Object.freeze(Color.fromCssColorString("#E6E6FA"));
/**
* An immutable Color instance initialized to CSS color #FFF0F5
*
+ *
* @constant
* @type {Color}
*/
@@ -1413,6 +1526,7 @@ Color.LAVENDAR_BLUSH = Object.freeze(Color.fromCssColorString("#FFF0F5"));
/**
* An immutable Color instance initialized to CSS color #7CFC00
*
+ *
* @constant
* @type {Color}
*/
@@ -1421,6 +1535,7 @@ Color.LAWNGREEN = Object.freeze(Color.fromCssColorString("#7CFC00"));
/**
* An immutable Color instance initialized to CSS color #FFFACD
*
+ *
* @constant
* @type {Color}
*/
@@ -1429,6 +1544,7 @@ Color.LEMONCHIFFON = Object.freeze(Color.fromCssColorString("#FFFACD"));
/**
* An immutable Color instance initialized to CSS color #ADD8E6
*
+ *
* @constant
* @type {Color}
*/
@@ -1437,6 +1553,7 @@ Color.LIGHTBLUE = Object.freeze(Color.fromCssColorString("#ADD8E6"));
/**
* An immutable Color instance initialized to CSS color #F08080
*
+ *
* @constant
* @type {Color}
*/
@@ -1445,6 +1562,7 @@ Color.LIGHTCORAL = Object.freeze(Color.fromCssColorString("#F08080"));
/**
* An immutable Color instance initialized to CSS color #E0FFFF
*
+ *
* @constant
* @type {Color}
*/
@@ -1453,6 +1571,7 @@ Color.LIGHTCYAN = Object.freeze(Color.fromCssColorString("#E0FFFF"));
/**
* An immutable Color instance initialized to CSS color #FAFAD2
*
+ *
* @constant
* @type {Color}
*/
@@ -1461,6 +1580,7 @@ Color.LIGHTGOLDENRODYELLOW = Object.freeze(Color.fromCssColorString("#FAFAD2"));
/**
* An immutable Color instance initialized to CSS color #D3D3D3
*
+ *
* @constant
* @type {Color}
*/
@@ -1469,6 +1589,7 @@ Color.LIGHTGRAY = Object.freeze(Color.fromCssColorString("#D3D3D3"));
/**
* An immutable Color instance initialized to CSS color #90EE90
*
+ *
* @constant
* @type {Color}
*/
@@ -1477,6 +1598,7 @@ Color.LIGHTGREEN = Object.freeze(Color.fromCssColorString("#90EE90"));
/**
* An immutable Color instance initialized to CSS color #D3D3D3
*
+ *
* @constant
* @type {Color}
*/
@@ -1485,6 +1607,7 @@ Color.LIGHTGREY = Color.LIGHTGRAY;
/**
* An immutable Color instance initialized to CSS color #FFB6C1
*
+ *
* @constant
* @type {Color}
*/
@@ -1493,6 +1616,7 @@ Color.LIGHTPINK = Object.freeze(Color.fromCssColorString("#FFB6C1"));
/**
* An immutable Color instance initialized to CSS color #20B2AA
*
+ *
* @constant
* @type {Color}
*/
@@ -1501,6 +1625,7 @@ Color.LIGHTSEAGREEN = Object.freeze(Color.fromCssColorString("#20B2AA"));
/**
* An immutable Color instance initialized to CSS color #87CEFA
*
+ *
* @constant
* @type {Color}
*/
@@ -1509,6 +1634,7 @@ Color.LIGHTSKYBLUE = Object.freeze(Color.fromCssColorString("#87CEFA"));
/**
* An immutable Color instance initialized to CSS color #778899
*
+ *
* @constant
* @type {Color}
*/
@@ -1517,6 +1643,7 @@ Color.LIGHTSLATEGRAY = Object.freeze(Color.fromCssColorString("#778899"));
/**
* An immutable Color instance initialized to CSS color #778899
*
+ *
* @constant
* @type {Color}
*/
@@ -1525,6 +1652,7 @@ Color.LIGHTSLATEGREY = Color.LIGHTSLATEGRAY;
/**
* An immutable Color instance initialized to CSS color #B0C4DE
*
+ *
* @constant
* @type {Color}
*/
@@ -1533,6 +1661,7 @@ Color.LIGHTSTEELBLUE = Object.freeze(Color.fromCssColorString("#B0C4DE"));
/**
* An immutable Color instance initialized to CSS color #FFFFE0
*
+ *
* @constant
* @type {Color}
*/
@@ -1541,6 +1670,7 @@ Color.LIGHTYELLOW = Object.freeze(Color.fromCssColorString("#FFFFE0"));
/**
* An immutable Color instance initialized to CSS color #00FF00
*
+ *
* @constant
* @type {Color}
*/
@@ -1549,6 +1679,7 @@ Color.LIME = Object.freeze(Color.fromCssColorString("#00FF00"));
/**
* An immutable Color instance initialized to CSS color #32CD32
*
+ *
* @constant
* @type {Color}
*/
@@ -1557,6 +1688,7 @@ Color.LIMEGREEN = Object.freeze(Color.fromCssColorString("#32CD32"));
/**
* An immutable Color instance initialized to CSS color #FAF0E6
*
+ *
* @constant
* @type {Color}
*/
@@ -1565,6 +1697,7 @@ Color.LINEN = Object.freeze(Color.fromCssColorString("#FAF0E6"));
/**
* An immutable Color instance initialized to CSS color #FF00FF
*
+ *
* @constant
* @type {Color}
*/
@@ -1573,6 +1706,7 @@ Color.MAGENTA = Object.freeze(Color.fromCssColorString("#FF00FF"));
/**
* An immutable Color instance initialized to CSS color #800000
*
+ *
* @constant
* @type {Color}
*/
@@ -1581,6 +1715,7 @@ Color.MAROON = Object.freeze(Color.fromCssColorString("#800000"));
/**
* An immutable Color instance initialized to CSS color #66CDAA
*
+ *
* @constant
* @type {Color}
*/
@@ -1589,6 +1724,7 @@ Color.MEDIUMAQUAMARINE = Object.freeze(Color.fromCssColorString("#66CDAA"));
/**
* An immutable Color instance initialized to CSS color #0000CD
*
+ *
* @constant
* @type {Color}
*/
@@ -1597,6 +1733,7 @@ Color.MEDIUMBLUE = Object.freeze(Color.fromCssColorString("#0000CD"));
/**
* An immutable Color instance initialized to CSS color #BA55D3
*
+ *
* @constant
* @type {Color}
*/
@@ -1605,6 +1742,7 @@ Color.MEDIUMORCHID = Object.freeze(Color.fromCssColorString("#BA55D3"));
/**
* An immutable Color instance initialized to CSS color #9370DB
*
+ *
* @constant
* @type {Color}
*/
@@ -1613,6 +1751,7 @@ Color.MEDIUMPURPLE = Object.freeze(Color.fromCssColorString("#9370DB"));
/**
* An immutable Color instance initialized to CSS color #3CB371
*
+ *
* @constant
* @type {Color}
*/
@@ -1621,6 +1760,7 @@ Color.MEDIUMSEAGREEN = Object.freeze(Color.fromCssColorString("#3CB371"));
/**
* An immutable Color instance initialized to CSS color #7B68EE
*
+ *
* @constant
* @type {Color}
*/
@@ -1629,6 +1769,7 @@ Color.MEDIUMSLATEBLUE = Object.freeze(Color.fromCssColorString("#7B68EE"));
/**
* An immutable Color instance initialized to CSS color #00FA9A
*
+ *
* @constant
* @type {Color}
*/
@@ -1637,6 +1778,7 @@ Color.MEDIUMSPRINGGREEN = Object.freeze(Color.fromCssColorString("#00FA9A"));
/**
* An immutable Color instance initialized to CSS color #48D1CC
*
+ *
* @constant
* @type {Color}
*/
@@ -1645,6 +1787,7 @@ Color.MEDIUMTURQUOISE = Object.freeze(Color.fromCssColorString("#48D1CC"));
/**
* An immutable Color instance initialized to CSS color #C71585
*
+ *
* @constant
* @type {Color}
*/
@@ -1653,6 +1796,7 @@ Color.MEDIUMVIOLETRED = Object.freeze(Color.fromCssColorString("#C71585"));
/**
* An immutable Color instance initialized to CSS color #191970
*
+ *
* @constant
* @type {Color}
*/
@@ -1661,6 +1805,7 @@ Color.MIDNIGHTBLUE = Object.freeze(Color.fromCssColorString("#191970"));
/**
* An immutable Color instance initialized to CSS color #F5FFFA
*
+ *
* @constant
* @type {Color}
*/
@@ -1669,6 +1814,7 @@ Color.MINTCREAM = Object.freeze(Color.fromCssColorString("#F5FFFA"));
/**
* An immutable Color instance initialized to CSS color #FFE4E1
*
+ *
* @constant
* @type {Color}
*/
@@ -1677,6 +1823,7 @@ Color.MISTYROSE = Object.freeze(Color.fromCssColorString("#FFE4E1"));
/**
* An immutable Color instance initialized to CSS color #FFE4B5
*
+ *
* @constant
* @type {Color}
*/
@@ -1685,6 +1832,7 @@ Color.MOCCASIN = Object.freeze(Color.fromCssColorString("#FFE4B5"));
/**
* An immutable Color instance initialized to CSS color #FFDEAD
*
+ *
* @constant
* @type {Color}
*/
@@ -1693,6 +1841,7 @@ Color.NAVAJOWHITE = Object.freeze(Color.fromCssColorString("#FFDEAD"));
/**
* An immutable Color instance initialized to CSS color #000080
*
+ *
* @constant
* @type {Color}
*/
@@ -1701,6 +1850,7 @@ Color.NAVY = Object.freeze(Color.fromCssColorString("#000080"));
/**
* An immutable Color instance initialized to CSS color #FDF5E6
*
+ *
* @constant
* @type {Color}
*/
@@ -1709,6 +1859,7 @@ Color.OLDLACE = Object.freeze(Color.fromCssColorString("#FDF5E6"));
/**
* An immutable Color instance initialized to CSS color #808000
*
+ *
* @constant
* @type {Color}
*/
@@ -1717,6 +1868,7 @@ Color.OLIVE = Object.freeze(Color.fromCssColorString("#808000"));
/**
* An immutable Color instance initialized to CSS color #6B8E23
*
+ *
* @constant
* @type {Color}
*/
@@ -1725,6 +1877,7 @@ Color.OLIVEDRAB = Object.freeze(Color.fromCssColorString("#6B8E23"));
/**
* An immutable Color instance initialized to CSS color #FFA500
*
+ *
* @constant
* @type {Color}
*/
@@ -1733,6 +1886,7 @@ Color.ORANGE = Object.freeze(Color.fromCssColorString("#FFA500"));
/**
* An immutable Color instance initialized to CSS color #FF4500
*
+ *
* @constant
* @type {Color}
*/
@@ -1741,6 +1895,7 @@ Color.ORANGERED = Object.freeze(Color.fromCssColorString("#FF4500"));
/**
* An immutable Color instance initialized to CSS color #DA70D6
*
+ *
* @constant
* @type {Color}
*/
@@ -1749,6 +1904,7 @@ Color.ORCHID = Object.freeze(Color.fromCssColorString("#DA70D6"));
/**
* An immutable Color instance initialized to CSS color #EEE8AA
*
+ *
* @constant
* @type {Color}
*/
@@ -1757,6 +1913,7 @@ Color.PALEGOLDENROD = Object.freeze(Color.fromCssColorString("#EEE8AA"));
/**
* An immutable Color instance initialized to CSS color #98FB98
*
+ *
* @constant
* @type {Color}
*/
@@ -1765,6 +1922,7 @@ Color.PALEGREEN = Object.freeze(Color.fromCssColorString("#98FB98"));
/**
* An immutable Color instance initialized to CSS color #AFEEEE
*
+ *
* @constant
* @type {Color}
*/
@@ -1773,6 +1931,7 @@ Color.PALETURQUOISE = Object.freeze(Color.fromCssColorString("#AFEEEE"));
/**
* An immutable Color instance initialized to CSS color #DB7093
*
+ *
* @constant
* @type {Color}
*/
@@ -1781,6 +1940,7 @@ Color.PALEVIOLETRED = Object.freeze(Color.fromCssColorString("#DB7093"));
/**
* An immutable Color instance initialized to CSS color #FFEFD5
*
+ *
* @constant
* @type {Color}
*/
@@ -1789,6 +1949,7 @@ Color.PAPAYAWHIP = Object.freeze(Color.fromCssColorString("#FFEFD5"));
/**
* An immutable Color instance initialized to CSS color #FFDAB9
*
+ *
* @constant
* @type {Color}
*/
@@ -1797,6 +1958,7 @@ Color.PEACHPUFF = Object.freeze(Color.fromCssColorString("#FFDAB9"));
/**
* An immutable Color instance initialized to CSS color #CD853F
*
+ *
* @constant
* @type {Color}
*/
@@ -1805,6 +1967,7 @@ Color.PERU = Object.freeze(Color.fromCssColorString("#CD853F"));
/**
* An immutable Color instance initialized to CSS color #FFC0CB
*
+ *
* @constant
* @type {Color}
*/
@@ -1813,6 +1976,7 @@ Color.PINK = Object.freeze(Color.fromCssColorString("#FFC0CB"));
/**
* An immutable Color instance initialized to CSS color #DDA0DD
*
+ *
* @constant
* @type {Color}
*/
@@ -1821,6 +1985,7 @@ Color.PLUM = Object.freeze(Color.fromCssColorString("#DDA0DD"));
/**
* An immutable Color instance initialized to CSS color #B0E0E6
*
+ *
* @constant
* @type {Color}
*/
@@ -1829,6 +1994,7 @@ Color.POWDERBLUE = Object.freeze(Color.fromCssColorString("#B0E0E6"));
/**
* An immutable Color instance initialized to CSS color #800080
*
+ *
* @constant
* @type {Color}
*/
@@ -1837,6 +2003,7 @@ Color.PURPLE = Object.freeze(Color.fromCssColorString("#800080"));
/**
* An immutable Color instance initialized to CSS color #FF0000
*
+ *
* @constant
* @type {Color}
*/
@@ -1845,6 +2012,7 @@ Color.RED = Object.freeze(Color.fromCssColorString("#FF0000"));
/**
* An immutable Color instance initialized to CSS color #BC8F8F
*
+ *
* @constant
* @type {Color}
*/
@@ -1853,6 +2021,7 @@ Color.ROSYBROWN = Object.freeze(Color.fromCssColorString("#BC8F8F"));
/**
* An immutable Color instance initialized to CSS color #4169E1
*
+ *
* @constant
* @type {Color}
*/
@@ -1861,6 +2030,7 @@ Color.ROYALBLUE = Object.freeze(Color.fromCssColorString("#4169E1"));
/**
* An immutable Color instance initialized to CSS color #8B4513
*
+ *
* @constant
* @type {Color}
*/
@@ -1869,6 +2039,7 @@ Color.SADDLEBROWN = Object.freeze(Color.fromCssColorString("#8B4513"));
/**
* An immutable Color instance initialized to CSS color #FA8072
*
+ *
* @constant
* @type {Color}
*/
@@ -1877,6 +2048,7 @@ Color.SALMON = Object.freeze(Color.fromCssColorString("#FA8072"));
/**
* An immutable Color instance initialized to CSS color #F4A460
*
+ *
* @constant
* @type {Color}
*/
@@ -1885,6 +2057,7 @@ Color.SANDYBROWN = Object.freeze(Color.fromCssColorString("#F4A460"));
/**
* An immutable Color instance initialized to CSS color #2E8B57
*
+ *
* @constant
* @type {Color}
*/
@@ -1893,6 +2066,7 @@ Color.SEAGREEN = Object.freeze(Color.fromCssColorString("#2E8B57"));
/**
* An immutable Color instance initialized to CSS color #FFF5EE
*
+ *
* @constant
* @type {Color}
*/
@@ -1901,6 +2075,7 @@ Color.SEASHELL = Object.freeze(Color.fromCssColorString("#FFF5EE"));
/**
* An immutable Color instance initialized to CSS color #A0522D
*
+ *
* @constant
* @type {Color}
*/
@@ -1909,6 +2084,7 @@ Color.SIENNA = Object.freeze(Color.fromCssColorString("#A0522D"));
/**
* An immutable Color instance initialized to CSS color #C0C0C0
*
+ *
* @constant
* @type {Color}
*/
@@ -1917,6 +2093,7 @@ Color.SILVER = Object.freeze(Color.fromCssColorString("#C0C0C0"));
/**
* An immutable Color instance initialized to CSS color #87CEEB
*
+ *
* @constant
* @type {Color}
*/
@@ -1925,6 +2102,7 @@ Color.SKYBLUE = Object.freeze(Color.fromCssColorString("#87CEEB"));
/**
* An immutable Color instance initialized to CSS color #6A5ACD
*
+ *
* @constant
* @type {Color}
*/
@@ -1933,6 +2111,7 @@ Color.SLATEBLUE = Object.freeze(Color.fromCssColorString("#6A5ACD"));
/**
* An immutable Color instance initialized to CSS color #708090
*
+ *
* @constant
* @type {Color}
*/
@@ -1941,6 +2120,7 @@ Color.SLATEGRAY = Object.freeze(Color.fromCssColorString("#708090"));
/**
* An immutable Color instance initialized to CSS color #708090
*
+ *
* @constant
* @type {Color}
*/
@@ -1949,6 +2129,7 @@ Color.SLATEGREY = Color.SLATEGRAY;
/**
* An immutable Color instance initialized to CSS color #FFFAFA
*
+ *
* @constant
* @type {Color}
*/
@@ -1957,6 +2138,7 @@ Color.SNOW = Object.freeze(Color.fromCssColorString("#FFFAFA"));
/**
* An immutable Color instance initialized to CSS color #00FF7F
*
+ *
* @constant
* @type {Color}
*/
@@ -1965,6 +2147,7 @@ Color.SPRINGGREEN = Object.freeze(Color.fromCssColorString("#00FF7F"));
/**
* An immutable Color instance initialized to CSS color #4682B4
*
+ *
* @constant
* @type {Color}
*/
@@ -1973,6 +2156,7 @@ Color.STEELBLUE = Object.freeze(Color.fromCssColorString("#4682B4"));
/**
* An immutable Color instance initialized to CSS color #D2B48C
*
+ *
* @constant
* @type {Color}
*/
@@ -1981,6 +2165,7 @@ Color.TAN = Object.freeze(Color.fromCssColorString("#D2B48C"));
/**
* An immutable Color instance initialized to CSS color #008080
*
+ *
* @constant
* @type {Color}
*/
@@ -1989,6 +2174,7 @@ Color.TEAL = Object.freeze(Color.fromCssColorString("#008080"));
/**
* An immutable Color instance initialized to CSS color #D8BFD8
*
+ *
* @constant
* @type {Color}
*/
@@ -1997,6 +2183,7 @@ Color.THISTLE = Object.freeze(Color.fromCssColorString("#D8BFD8"));
/**
* An immutable Color instance initialized to CSS color #FF6347
*
+ *
* @constant
* @type {Color}
*/
@@ -2005,6 +2192,7 @@ Color.TOMATO = Object.freeze(Color.fromCssColorString("#FF6347"));
/**
* An immutable Color instance initialized to CSS color #40E0D0
*
+ *
* @constant
* @type {Color}
*/
@@ -2013,6 +2201,7 @@ Color.TURQUOISE = Object.freeze(Color.fromCssColorString("#40E0D0"));
/**
* An immutable Color instance initialized to CSS color #EE82EE
*
+ *
* @constant
* @type {Color}
*/
@@ -2021,6 +2210,7 @@ Color.VIOLET = Object.freeze(Color.fromCssColorString("#EE82EE"));
/**
* An immutable Color instance initialized to CSS color #F5DEB3
*
+ *
* @constant
* @type {Color}
*/
@@ -2029,6 +2219,7 @@ Color.WHEAT = Object.freeze(Color.fromCssColorString("#F5DEB3"));
/**
* An immutable Color instance initialized to CSS color #FFFFFF
*
+ *
* @constant
* @type {Color}
*/
@@ -2037,6 +2228,7 @@ Color.WHITE = Object.freeze(Color.fromCssColorString("#FFFFFF"));
/**
* An immutable Color instance initialized to CSS color #F5F5F5
*
+ *
* @constant
* @type {Color}
*/
@@ -2045,6 +2237,7 @@ Color.WHITESMOKE = Object.freeze(Color.fromCssColorString("#F5F5F5"));
/**
* An immutable Color instance initialized to CSS color #FFFF00
*
+ *
* @constant
* @type {Color}
*/
@@ -2053,6 +2246,7 @@ Color.YELLOW = Object.freeze(Color.fromCssColorString("#FFFF00"));
/**
* An immutable Color instance initialized to CSS color #9ACD32
*
+ *
* @constant
* @type {Color}
*/
@@ -2061,6 +2255,7 @@ Color.YELLOWGREEN = Object.freeze(Color.fromCssColorString("#9ACD32"));
/**
* An immutable Color instance initialized to CSS transparent.
*
+ *
* @constant
* @type {Color}
*/
diff --git a/packages/engine/Source/Core/ColorGeometryInstanceAttribute.js b/packages/engine/Source/Core/ColorGeometryInstanceAttribute.js
index 47e3dca1e402..1b409b4255b3 100644
--- a/packages/engine/Source/Core/ColorGeometryInstanceAttribute.js
+++ b/packages/engine/Source/Core/ColorGeometryInstanceAttribute.js
@@ -6,12 +6,16 @@ import DeveloperError from "./DeveloperError.js";
/**
* Value and type information for per-instance geometry color.
+ *
* @alias ColorGeometryInstanceAttribute
- * @class
- * @param {number} [red] The red component.
- * @param {number} [green] The green component.
- * @param {number} [blue] The blue component.
- * @param {number} [alpha] The alpha component.
+ * @constructor
+ *
+ * @param {number} [red=1.0] The red component.
+ * @param {number} [green=1.0] The green component.
+ * @param {number} [blue=1.0] The blue component.
+ * @param {number} [alpha=1.0] The alpha component.
+ *
+ *
* @example
* const instance = new Cesium.GeometryInstance({
* geometry : Cesium.BoxGeometry.fromDimensions({
@@ -24,6 +28,7 @@ import DeveloperError from "./DeveloperError.js";
* color : new Cesium.ColorGeometryInstanceAttribute(red, green, blue, alpha)
* }
* });
+ *
* @see GeometryInstance
* @see GeometryInstanceAttribute
*/
@@ -35,7 +40,9 @@ function ColorGeometryInstanceAttribute(red, green, blue, alpha) {
/**
* The values for the attributes stored in a typed array.
+ *
* @type Uint8Array
+ *
* @default [255, 255, 255, 255]
*/
this.value = new Uint8Array([
@@ -50,9 +57,12 @@ Object.defineProperties(ColorGeometryInstanceAttribute.prototype, {
/**
* The datatype of each component in the attribute, e.g., individual elements in
* {@link ColorGeometryInstanceAttribute#value}.
+ *
* @memberof ColorGeometryInstanceAttribute.prototype
+ *
* @type {ComponentDatatype}
* @readonly
+ *
* @default {@link ComponentDatatype.UNSIGNED_BYTE}
*/
componentDatatype: {
@@ -63,9 +73,12 @@ Object.defineProperties(ColorGeometryInstanceAttribute.prototype, {
/**
* The number of components in the attributes, i.e., {@link ColorGeometryInstanceAttribute#value}.
+ *
* @memberof ColorGeometryInstanceAttribute.prototype
+ *
* @type {number}
* @readonly
+ *
* @default 4
*/
componentsPerAttribute: {
@@ -78,9 +91,12 @@ Object.defineProperties(ColorGeometryInstanceAttribute.prototype, {
* When true
and componentDatatype
is an integer format,
* indicate that the components should be mapped to the range [0, 1] (unsigned)
* or [-1, 1] (signed) when they are accessed as floating-point for rendering.
+ *
* @memberof ColorGeometryInstanceAttribute.prototype
+ *
* @type {boolean}
* @readonly
+ *
* @default true
*/
normalize: {
@@ -92,8 +108,10 @@ Object.defineProperties(ColorGeometryInstanceAttribute.prototype, {
/**
* Creates a new {@link ColorGeometryInstanceAttribute} instance given the provided {@link Color}.
+ *
* @param {Color} color The color.
* @returns {ColorGeometryInstanceAttribute} The new {@link ColorGeometryInstanceAttribute} instance.
+ *
* @example
* const instance = new Cesium.GeometryInstance({
* geometry : geometry,
@@ -119,9 +137,12 @@ ColorGeometryInstanceAttribute.fromColor = function (color) {
/**
* Converts a color to a typed array that can be used to assign a color attribute.
+ *
* @param {Color} color The color.
* @param {Uint8Array} [result] The array to store the result in, if undefined a new instance will be created.
+ *
* @returns {Uint8Array} The modified result parameter or a new instance if result was undefined.
+ *
* @example
* const attributes = primitive.getGeometryInstanceAttributes('an id');
* attributes.color = Cesium.ColorGeometryInstanceAttribute.toValue(Cesium.Color.AQUA, attributes.color);
@@ -142,6 +163,7 @@ ColorGeometryInstanceAttribute.toValue = function (color, result) {
/**
* Compares the provided ColorGeometryInstanceAttributes and returns
* true
if they are equal, false
otherwise.
+ *
* @param {ColorGeometryInstanceAttribute} [left] The first ColorGeometryInstanceAttribute.
* @param {ColorGeometryInstanceAttribute} [right] The second ColorGeometryInstanceAttribute.
* @returns {boolean} true
if left and right are equal, false
otherwise.
diff --git a/packages/engine/Source/Core/ComponentDatatype.js b/packages/engine/Source/Core/ComponentDatatype.js
index b1fd596d6e84..9e92afe2696b 100644
--- a/packages/engine/Source/Core/ComponentDatatype.js
+++ b/packages/engine/Source/Core/ComponentDatatype.js
@@ -6,12 +6,14 @@ import WebGLConstants from "./WebGLConstants.js";
/**
* WebGL component datatypes. Components are intrinsics,
* which form attributes, which form vertices.
+ *
* @enum {number}
*/
const ComponentDatatype = {
/**
* 8-bit signed byte corresponding to gl.BYTE
and the type
* of an element in Int8Array
.
+ *
* @type {number}
* @constant
*/
@@ -20,6 +22,7 @@ const ComponentDatatype = {
/**
* 8-bit unsigned byte corresponding to UNSIGNED_BYTE
and the type
* of an element in Uint8Array
.
+ *
* @type {number}
* @constant
*/
@@ -28,6 +31,7 @@ const ComponentDatatype = {
/**
* 16-bit signed short corresponding to SHORT
and the type
* of an element in Int16Array
.
+ *
* @type {number}
* @constant
*/
@@ -36,6 +40,7 @@ const ComponentDatatype = {
/**
* 16-bit unsigned short corresponding to UNSIGNED_SHORT
and the type
* of an element in Uint16Array
.
+ *
* @type {number}
* @constant
*/
@@ -44,7 +49,9 @@ const ComponentDatatype = {
/**
* 32-bit signed int corresponding to INT
and the type
* of an element in Int32Array
.
- * @memberof ComponentDatatype
+ *
+ * @memberOf ComponentDatatype
+ *
* @type {number}
* @constant
*/
@@ -53,7 +60,9 @@ const ComponentDatatype = {
/**
* 32-bit unsigned int corresponding to UNSIGNED_INT
and the type
* of an element in Uint32Array
.
- * @memberof ComponentDatatype
+ *
+ * @memberOf ComponentDatatype
+ *
* @type {number}
* @constant
*/
@@ -62,6 +71,7 @@ const ComponentDatatype = {
/**
* 32-bit floating-point corresponding to FLOAT
and the type
* of an element in Float32Array
.
+ *
* @type {number}
* @constant
*/
@@ -71,7 +81,9 @@ const ComponentDatatype = {
* 64-bit floating-point corresponding to gl.DOUBLE
(in Desktop OpenGL;
* this is not supported in WebGL, and is emulated in Cesium via {@link GeometryPipeline.encodeAttribute})
* and the type of an element in Float64Array
.
- * @memberof ComponentDatatype
+ *
+ * @memberOf ComponentDatatype
+ *
* @type {number}
* @constant
* @default 0x140A
@@ -81,9 +93,12 @@ const ComponentDatatype = {
/**
* Returns the size, in bytes, of the corresponding datatype.
+ *
* @param {ComponentDatatype} componentDatatype The component datatype to get the size of.
* @returns {number} The size in bytes.
- * @throws {DeveloperError} componentDatatype is not a valid value.
+ *
+ * @exception {DeveloperError} componentDatatype is not a valid value.
+ *
* @example
* // Returns Int8Array.BYTES_PER_ELEMENT
* const size = Cesium.ComponentDatatype.getSizeInBytes(Cesium.ComponentDatatype.BYTE);
@@ -121,6 +136,7 @@ ComponentDatatype.getSizeInBytes = function (componentDatatype) {
/**
* Gets the {@link ComponentDatatype} for the provided TypedArray instance.
+ *
* @param {Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} array The typed array.
* @returns {ComponentDatatype} The ComponentDatatype for the provided array, or undefined if the array is not a TypedArray.
*/
@@ -159,8 +175,10 @@ ComponentDatatype.fromTypedArray = function (array) {
/**
* Validates that the provided component datatype is a valid {@link ComponentDatatype}
+ *
* @param {ComponentDatatype} componentDatatype The component datatype to validate.
* @returns {boolean} true
if the provided component datatype is a valid value; otherwise, false
.
+ *
* @example
* if (!Cesium.ComponentDatatype.validate(componentDatatype)) {
* throw new Cesium.DeveloperError('componentDatatype must be a valid value.');
@@ -182,10 +200,13 @@ ComponentDatatype.validate = function (componentDatatype) {
/**
* Creates a typed array corresponding to component data type.
+ *
* @param {ComponentDatatype} componentDatatype The component data type.
* @param {number|Array} valuesOrLength The length of the array to create or an array.
* @returns {Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} A typed array.
- * @throws {DeveloperError} componentDatatype is not a valid value.
+ *
+ * @exception {DeveloperError} componentDatatype is not a valid value.
+ *
* @example
* // creates a Float32Array with length of 100
* const typedArray = Cesium.ComponentDatatype.createTypedArray(Cesium.ComponentDatatype.FLOAT, 100);
@@ -229,12 +250,14 @@ ComponentDatatype.createTypedArray = function (
/**
* Creates a typed view of an array of bytes.
+ *
* @param {ComponentDatatype} componentDatatype The type of the view to create.
* @param {ArrayBuffer} buffer The buffer storage to use for the view.
* @param {number} [byteOffset] The offset, in bytes, to the first element in the view.
* @param {number} [length] The number of elements in the view.
* @returns {Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} A typed array view of the buffer.
- * @throws {DeveloperError} componentDatatype is not a valid value.
+ *
+ * @exception {DeveloperError} componentDatatype is not a valid value.
*/
ComponentDatatype.createArrayBufferView = function (
componentDatatype,
@@ -284,9 +307,11 @@ ComponentDatatype.createArrayBufferView = function (
/**
* Get the ComponentDatatype from its name.
+ *
* @param {string} name The name of the ComponentDatatype.
* @returns {ComponentDatatype} The ComponentDatatype.
- * @throws {DeveloperError} name is not a valid value.
+ *
+ * @exception {DeveloperError} name is not a valid value.
*/
ComponentDatatype.fromName = function (name) {
switch (name) {
diff --git a/packages/engine/Source/Core/CompressedTextureBuffer.js b/packages/engine/Source/Core/CompressedTextureBuffer.js
index e313b89fccb8..632c4b9a757f 100644
--- a/packages/engine/Source/Core/CompressedTextureBuffer.js
+++ b/packages/engine/Source/Core/CompressedTextureBuffer.js
@@ -3,7 +3,8 @@ import defined from "./defined.js";
/**
* Describes a compressed texture and contains a compressed texture buffer.
* @alias CompressedTextureBuffer
- * @class
+ * @constructor
+ *
* @param {PixelFormat} internalFormat The pixel format of the compressed texture.
* @param {PixelDatatype} pixelDatatype The pixel datatype of the compressed texture.
* @param {number} width The width of the texture.
@@ -84,8 +85,9 @@ Object.defineProperties(CompressedTextureBuffer.prototype, {
/**
* Creates a shallow clone of a compressed texture buffer.
+ *
* @param {CompressedTextureBuffer} object The compressed texture buffer to be cloned.
- * @returns {CompressedTextureBuffer} A shallow clone of the compressed texture buffer.
+ * @return {CompressedTextureBuffer} A shallow clone of the compressed texture buffer.
*/
CompressedTextureBuffer.clone = function (object) {
if (!defined(object)) {
@@ -103,7 +105,8 @@ CompressedTextureBuffer.clone = function (object) {
/**
* Creates a shallow clone of this compressed texture buffer.
- * @returns {CompressedTextureBuffer} A shallow clone of the compressed texture buffer.
+ *
+ * @return {CompressedTextureBuffer} A shallow clone of the compressed texture buffer.
*/
CompressedTextureBuffer.prototype.clone = function () {
return CompressedTextureBuffer.clone(this);
diff --git a/packages/engine/Source/Core/ConstantSpline.js b/packages/engine/Source/Core/ConstantSpline.js
index 745104c71a82..032003de3a3f 100644
--- a/packages/engine/Source/Core/ConstantSpline.js
+++ b/packages/engine/Source/Core/ConstantSpline.js
@@ -5,14 +5,18 @@ import Spline from "./Spline.js";
/**
* A spline that evaluates to a constant value. Although this follows the {@link Spline} interface,
* it does not maintain an internal array of times since its value never changes.
+ *
* @alias ConstantSpline
- * @class
+ * @constructor
+ *
* @param {number|Cartesian3|Quaternion} value The constant value that the spline evaluates to.
+ *
* @example
* const position = new Cesium.Cartesian3(1.0, 2.0, 3.0);
* const spline = new Cesium.ConstantSpline(position);
*
* const p0 = spline.evaluate(0.0);
+ *
* @see LinearSpline
* @see HermiteSpline
* @see CatmullRomSpline
@@ -27,7 +31,9 @@ function ConstantSpline(value) {
Object.defineProperties(ConstantSpline.prototype, {
/**
* The constant value that the spline evaluates to.
+ *
* @memberof ConstantSpline.prototype
+ *
* @type {number|Cartesian3|Quaternion}
* @readonly
*/
@@ -44,8 +50,10 @@ Object.defineProperties(ConstantSpline.prototype, {
*
* Since a constant spline has no internal times array, this will throw an error.
* @function
+ *
* @param {number} time The time.
- * @throws {DeveloperError} findTimeInterval cannot be called on a ConstantSpline.
+ *
+ * @exception {DeveloperError} findTimeInterval cannot be called on a ConstantSpline.
*/
ConstantSpline.prototype.findTimeInterval = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -58,8 +66,9 @@ ConstantSpline.prototype.findTimeInterval = function (time) {
/**
* Wraps the given time to the period covered by the spline.
* @function
+ *
* @param {number} time The time.
- * @returns {number} The time, wrapped around to the updated animation.
+ * @return {number} The time, wrapped around to the updated animation.
*/
ConstantSpline.prototype.wrapTime = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -72,8 +81,9 @@ ConstantSpline.prototype.wrapTime = function (time) {
/**
* Clamps the given time to the period covered by the spline.
* @function
+ *
* @param {number} time The time.
- * @returns {number} The time, clamped to the animation period.
+ * @return {number} The time, clamped to the animation period.
*/
ConstantSpline.prototype.clampTime = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -86,6 +96,7 @@ ConstantSpline.prototype.clampTime = function (time) {
/**
* Evaluates the curve at a given time.
* @function
+ *
* @param {number} time The time at which to evaluate the curve.
* @param {Cartesian3|Quaternion} [result] The object onto which to store the result.
* @returns {number|Cartesian3|Quaternion} The modified result parameter or the value that the constant spline represents.
diff --git a/packages/engine/Source/Core/CoplanarPolygonGeometry.js b/packages/engine/Source/Core/CoplanarPolygonGeometry.js
index 9f460ff7d569..208a1059e051 100644
--- a/packages/engine/Source/Core/CoplanarPolygonGeometry.js
+++ b/packages/engine/Source/Core/CoplanarPolygonGeometry.js
@@ -223,14 +223,17 @@ function createGeometryFromPolygon(
/**
* A description of a polygon composed of arbitrary coplanar positions.
+ *
* @alias CoplanarPolygonGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {PolygonHierarchy} options.polygonHierarchy A polygon hierarchy that can include holes.
- * @param {number} [options.stRotation] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
- * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
+ * @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
+ * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
* @param {PolygonHierarchy} [options.textureCoordinates] Texture coordinates as a {@link PolygonHierarchy} of {@link Cartesian2} points.
+ *
* @example
* const polygonGeometry = new Cesium.CoplanarPolygonGeometry({
* polygonHierarchy: new Cesium.PolygonHierarchy(
@@ -241,6 +244,7 @@ function createGeometryFromPolygon(
* -80.0, 30.0, 0.0
* ]))
* });
+ *
*/
function CoplanarPolygonGeometry(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -282,13 +286,15 @@ function CoplanarPolygonGeometry(options) {
/**
* A description of a coplanar polygon from an array of positions.
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of positions that defined the corner points of the polygon.
- * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
- * @param {number} [options.stRotation] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
+ * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
+ * @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
* @param {PolygonHierarchy} [options.textureCoordinates] Texture coordinates as a {@link PolygonHierarchy} of {@link Cartesian2} points.
* @returns {CoplanarPolygonGeometry}
+ *
* @example
* // create a polygon from points
* const polygon = Cesium.CoplanarPolygonGeometry.fromPositions({
@@ -301,6 +307,7 @@ function CoplanarPolygonGeometry(options) {
* ])
* });
* const geometry = Cesium.PolygonGeometry.createGeometry(polygon);
+ *
* @see PolygonGeometry#createGeometry
*/
CoplanarPolygonGeometry.fromPositions = function (options) {
@@ -324,9 +331,11 @@ CoplanarPolygonGeometry.fromPositions = function (options) {
/**
* Stores the provided instance into the provided array.
+ *
* @param {CoplanarPolygonGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
CoplanarPolygonGeometry.pack = function (value, array, startingIndex) {
@@ -373,8 +382,9 @@ const scratchOptions = {
};
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {CoplanarPolygonGeometry} [result] The object into which to store the result.
* @returns {CoplanarPolygonGeometry} The modified result parameter or a new CoplanarPolygonGeometry instance if one was not provided.
*/
@@ -436,6 +446,7 @@ CoplanarPolygonGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an arbitrary coplanar polygon, including its vertices, indices, and a bounding sphere.
+ *
* @param {CoplanarPolygonGeometry} polygonGeometry A description of the polygon.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/CoplanarPolygonOutlineGeometry.js b/packages/engine/Source/Core/CoplanarPolygonOutlineGeometry.js
index c7dd4cf3e507..0f9009676708 100644
--- a/packages/engine/Source/Core/CoplanarPolygonOutlineGeometry.js
+++ b/packages/engine/Source/Core/CoplanarPolygonOutlineGeometry.js
@@ -50,11 +50,15 @@ function createGeometryFromPositions(positions) {
/**
* A description of the outline of a polygon composed of arbitrary coplanar positions.
+ *
* @alias CoplanarPolygonOutlineGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {PolygonHierarchy} options.polygonHierarchy A polygon hierarchy that can include holes.
+ *
* @see CoplanarPolygonOutlineGeometry.createGeometry
+ *
* @example
* const polygonOutline = new Cesium.CoplanarPolygonOutlineGeometry({
* positions : Cesium.Cartesian3.fromDegreesArrayHeights([
@@ -89,6 +93,7 @@ function CoplanarPolygonOutlineGeometry(options) {
/**
* A description of a coplanar polygon outline from an array of positions.
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of positions that defined the corner points of the polygon.
* @returns {CoplanarPolygonOutlineGeometry}
@@ -110,9 +115,11 @@ CoplanarPolygonOutlineGeometry.fromPositions = function (options) {
/**
* Stores the provided instance into the provided array.
+ *
* @param {CoplanarPolygonOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
CoplanarPolygonOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -140,8 +147,9 @@ const scratchOptions = {
};
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {CoplanarPolygonOutlineGeometry} [result] The object into which to store the result.
* @returns {CoplanarPolygonOutlineGeometry} The modified result parameter or a new CoplanarPolygonOutlineGeometry instance if one was not provided.
*/
@@ -177,6 +185,7 @@ CoplanarPolygonOutlineGeometry.unpack = function (
/**
* Computes the geometric representation of an arbitrary coplanar polygon, including its vertices, indices, and a bounding sphere.
+ *
* @param {CoplanarPolygonOutlineGeometry} polygonGeometry A description of the polygon.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/CornerType.js b/packages/engine/Source/Core/CornerType.js
index cd3939763eb6..c2c4ed23e41f 100644
--- a/packages/engine/Source/Core/CornerType.js
+++ b/packages/engine/Source/Core/CornerType.js
@@ -1,7 +1,9 @@
/**
* Style options for corners.
+ *
* @demo The {@link https://sandcastle.cesium.com/index.html?src=Corridor.html&label=Geometries|Corridor Demo}
* demonstrates the three corner types, as used by {@link CorridorGraphics}.
+ *
* @enum {number}
*/
const CornerType = {
diff --git a/packages/engine/Source/Core/CorridorGeometry.js b/packages/engine/Source/Core/CorridorGeometry.js
index c21731407acc..e5dd6af5ab53 100644
--- a/packages/engine/Source/Core/CorridorGeometry.js
+++ b/packages/engine/Source/Core/CorridorGeometry.js
@@ -1043,20 +1043,25 @@ function computeRectangle(positions, ellipsoid, width, cornerType, result) {
/**
* A description of a corridor. Corridor geometry can be rendered with both {@link Primitive} and {@link GroundPrimitive}.
+ *
* @alias CorridorGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of positions that define the center of the corridor.
* @param {number} options.width The distance between the edges of the corridor in meters.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
- * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {number} [options.height] The distance in meters between the ellipsoid surface and the positions.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
+ * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {number} [options.height=0] The distance in meters between the ellipsoid surface and the positions.
* @param {number} [options.extrudedHeight] The distance in meters between the ellipsoid surface and the extruded face.
- * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
- * @param {CornerType} [options.cornerType] Determines the style of the corners.
+ * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
+ * @param {CornerType} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
+ *
* @see CorridorGeometry.createGeometry
* @see Packable
+ *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Corridor.html|Cesium Sandcastle Corridor Demo}
+ *
* @example
* const corridor = new Cesium.CorridorGeometry({
* vertexFormat : Cesium.VertexFormat.POSITION_ONLY,
@@ -1111,9 +1116,11 @@ function CorridorGeometry(options) {
/**
* Stores the provided instance into the provided array.
+ *
* @param {CorridorGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
CorridorGeometry.pack = function (value, array, startingIndex) {
@@ -1166,8 +1173,9 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {CorridorGeometry} [result] The object into which to store the result.
* @returns {CorridorGeometry} The modified result parameter or a new CorridorGeometry instance if one was not provided.
*/
@@ -1234,12 +1242,14 @@ CorridorGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the bounding rectangle given the provided options
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of positions that define the center of the corridor.
* @param {number} options.width The distance between the edges of the corridor in meters.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
- * @param {CornerType} [options.cornerType] Determines the style of the corners.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
+ * @param {CornerType} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
* @param {Rectangle} [result] An object in which to store the result.
+ *
* @returns {Rectangle} The result rectangle.
*/
CorridorGeometry.computeRectangle = function (options, result) {
@@ -1260,6 +1270,7 @@ CorridorGeometry.computeRectangle = function (options, result) {
/**
* Computes the geometric representation of a corridor, including its vertices, indices, and a bounding sphere.
+ *
* @param {CorridorGeometry} corridorGeometry A description of the corridor.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
@@ -1346,9 +1357,6 @@ CorridorGeometry.createGeometry = function (corridorGeometry) {
};
/**
- * @param corridorGeometry
- * @param minHeightFunc
- * @param maxHeightFunc
* @private
*/
CorridorGeometry.createShadowVolume = function (
diff --git a/packages/engine/Source/Core/CorridorGeometryLibrary.js b/packages/engine/Source/Core/CorridorGeometryLibrary.js
index fb6fa0da93c4..f564f6b85513 100644
--- a/packages/engine/Source/Core/CorridorGeometryLibrary.js
+++ b/packages/engine/Source/Core/CorridorGeometryLibrary.js
@@ -178,10 +178,6 @@ function addShiftedPositions(positions, left, scalar, calculatedPositions) {
}
/**
- * @param attribute
- * @param value
- * @param front
- * @param back
* @private
*/
CorridorGeometryLibrary.addAttribute = function (
@@ -209,7 +205,6 @@ const scratchForwardProjection = new Cartesian3();
const scratchBackwardProjection = new Cartesian3();
/**
- * @param params
* @private
*/
CorridorGeometryLibrary.computePositions = function (params) {
diff --git a/packages/engine/Source/Core/CorridorOutlineGeometry.js b/packages/engine/Source/Core/CorridorOutlineGeometry.js
index 884e9f5664ee..66a39d04bd3b 100644
--- a/packages/engine/Source/Core/CorridorOutlineGeometry.js
+++ b/packages/engine/Source/Core/CorridorOutlineGeometry.js
@@ -354,17 +354,21 @@ function computePositionsExtruded(params) {
/**
* A description of a corridor outline.
+ *
* @alias CorridorOutlineGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of positions that define the center of the corridor outline.
* @param {number} options.width The distance between the edges of the corridor outline.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
- * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {number} [options.height] The distance in meters between the positions and the ellipsoid surface.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
+ * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {number} [options.height=0] The distance in meters between the positions and the ellipsoid surface.
* @param {number} [options.extrudedHeight] The distance in meters between the extruded face and the ellipsoid surface.
- * @param {CornerType} [options.cornerType] Determines the style of the corners.
+ * @param {CornerType} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
+ *
* @see CorridorOutlineGeometry.createGeometry
+ *
* @example
* const corridor = new Cesium.CorridorOutlineGeometry({
* positions : Cesium.Cartesian3.fromDegreesArray([-72.0, 40.0, -70.0, 35.0]),
@@ -409,9 +413,11 @@ function CorridorOutlineGeometry(options) {
/**
* Stores the provided instance into the provided array.
+ *
* @param {CorridorOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
CorridorOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -457,8 +463,9 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {CorridorOutlineGeometry} [result] The object into which to store the result.
* @returns {CorridorOutlineGeometry} The modified result parameter or a new CorridorOutlineGeometry instance if one was not provided.
*/
@@ -513,6 +520,7 @@ CorridorOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of a corridor, including its vertices, indices, and a bounding sphere.
+ *
* @param {CorridorOutlineGeometry} corridorOutlineGeometry A description of the corridor.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/Credit.js b/packages/engine/Source/Core/Credit.js
index 5ee6aa74a1d3..8a00b3fc993f 100644
--- a/packages/engine/Source/Core/Credit.js
+++ b/packages/engine/Source/Core/Credit.js
@@ -9,10 +9,13 @@ const creditToId = {};
/**
* A credit contains data pertaining to how to display attributions/credits for certain content on the screen.
* @param {string} html An string representing an html code snippet
- * @param {boolean} [showOnScreen] If true, the credit will be visible in the main credit container. Otherwise, it will appear in a popover
+ * @param {boolean} [showOnScreen=false] If true, the credit will be visible in the main credit container. Otherwise, it will appear in a popover
+ *
* @alias Credit
- * @class
- * @throws {DeveloperError} html is required.
+ * @constructor
+ *
+ * @exception {DeveloperError} html is required.
+ *
* @example
* // Create a credit with a tooltip, image and link
* const credit = new Cesium.Credit(' ');
@@ -57,6 +60,7 @@ Object.defineProperties(Credit.prototype, {
* @memberof Credit.prototype
* @type {number}
* @readonly
+ *
* @private
*/
id: {
@@ -109,6 +113,7 @@ Object.defineProperties(Credit.prototype, {
/**
* Returns true if the credits are equal
+ *
* @param {Credit} left The first credit
* @param {Credit} right The second credit
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -125,6 +130,7 @@ Credit.equals = function (left, right) {
/**
* Returns true if the credits are equal
+ *
* @param {Credit} credit The credit to compare to.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
@@ -142,7 +148,7 @@ Credit.prototype.isIon = function () {
/**
* @private
* @param attribution
- * @returns {Credit}
+ * @return {Credit}
*/
Credit.getIonCredit = function (attribution) {
const showOnScreen =
@@ -154,6 +160,7 @@ Credit.getIonCredit = function (attribution) {
/**
* Duplicates a Credit instance.
+ *
* @param {Credit} [credit] The Credit to duplicate.
* @returns {Credit} A new Credit instance that is a duplicate of the one provided. (Returns undefined if the credit is undefined)
*/
diff --git a/packages/engine/Source/Core/CubicRealPolynomial.js b/packages/engine/Source/Core/CubicRealPolynomial.js
index 04bf04ff5cbf..b199a322dcb4 100644
--- a/packages/engine/Source/Core/CubicRealPolynomial.js
+++ b/packages/engine/Source/Core/CubicRealPolynomial.js
@@ -3,12 +3,14 @@ import QuadraticRealPolynomial from "./QuadraticRealPolynomial.js";
/**
* Defines functions for 3rd order polynomial functions of one variable with only real coefficients.
+ *
* @namespace CubicRealPolynomial
*/
const CubicRealPolynomial = {};
/**
* Provides the discriminant of the cubic equation from the supplied coefficients.
+ *
* @param {number} a The coefficient of the 3rd order monomial.
* @param {number} b The coefficient of the 2nd order monomial.
* @param {number} c The coefficient of the 1st order monomial.
@@ -152,6 +154,7 @@ function computeRealRoots(a, b, c, d) {
/**
* Provides the real valued roots of the cubic polynomial with the provided coefficients.
+ *
* @param {number} a The coefficient of the 3rd order monomial.
* @param {number} b The coefficient of the 2nd order monomial.
* @param {number} c The coefficient of the 1st order monomial.
diff --git a/packages/engine/Source/Core/CullingVolume.js b/packages/engine/Source/Core/CullingVolume.js
index 301b9b9885d1..080d4a0a7688 100644
--- a/packages/engine/Source/Core/CullingVolume.js
+++ b/packages/engine/Source/Core/CullingVolume.js
@@ -8,8 +8,10 @@ import Plane from "./Plane.js";
/**
* The culling volume defined by planes.
+ *
* @alias CullingVolume
- * @class
+ * @constructor
+ *
* @param {Cartesian4[]} [planes] An array of clipping planes.
*/
function CullingVolume(planes) {
@@ -35,6 +37,7 @@ const scratchPlane = new Plane(new Cartesian3(1.0, 0.0, 0.0), 0.0);
/**
* Constructs a culling volume from a bounding sphere. Creates six planes that create a box containing the sphere.
* The planes are aligned to the x, y, and z axes in world coordinates.
+ *
* @param {BoundingSphere} boundingSphere The bounding sphere used to create the culling volume.
* @param {CullingVolume} [result] The object onto which to store the result.
* @returns {CullingVolume} The culling volume created from the bounding sphere.
@@ -99,6 +102,7 @@ CullingVolume.fromBoundingSphere = function (boundingSphere, result) {
/**
* Determines whether a bounding volume intersects the culling volume.
+ *
* @param {object} boundingVolume The bounding volume whose intersection with the culling volume is to be tested.
* @returns {Intersect} Intersect.OUTSIDE, Intersect.INTERSECTING, or Intersect.INSIDE.
*/
@@ -127,12 +131,14 @@ CullingVolume.prototype.computeVisibility = function (boundingVolume) {
/**
* Determines whether a bounding volume intersects the culling volume.
+ *
* @param {object} boundingVolume The bounding volume whose intersection with the culling volume is to be tested.
* @param {number} parentPlaneMask A bit mask from the boundingVolume's parent's check against the same culling
* volume, such that if (planeMask & (1 << planeIndex) === 0), for k < 31, then
* the parent (and therefore this) volume is completely inside plane[planeIndex]
* and that plane check can be skipped.
* @returns {number} A plane mask as described above (which can be applied to this boundingVolume's children).
+ *
* @private
*/
CullingVolume.prototype.computeVisibilityWithPlaneMask = function (
@@ -185,6 +191,7 @@ CullingVolume.prototype.computeVisibilityWithPlaneMask = function (
/**
* For plane masks (as used in {@link CullingVolume#computeVisibilityWithPlaneMask}), this special value
* represents the case where the object bounding volume is entirely outside the culling volume.
+ *
* @type {number}
* @private
*/
@@ -193,6 +200,7 @@ CullingVolume.MASK_OUTSIDE = 0xffffffff;
/**
* For plane masks (as used in {@link CullingVolume.prototype.computeVisibilityWithPlaneMask}), this value
* represents the case where the object bounding volume is entirely inside the culling volume.
+ *
* @type {number}
* @private
*/
@@ -201,6 +209,7 @@ CullingVolume.MASK_INSIDE = 0x00000000;
/**
* For plane masks (as used in {@link CullingVolume.prototype.computeVisibilityWithPlaneMask}), this value
* represents the case where the object bounding volume (may) intersect all planes of the culling volume.
+ *
* @type {number}
* @private
*/
diff --git a/packages/engine/Source/Core/CustomHeightmapTerrainProvider.js b/packages/engine/Source/Core/CustomHeightmapTerrainProvider.js
index e8ddb1a3f280..75400c584831 100644
--- a/packages/engine/Source/Core/CustomHeightmapTerrainProvider.js
+++ b/packages/engine/Source/Core/CustomHeightmapTerrainProvider.js
@@ -24,8 +24,10 @@ import TerrainProvider from "./TerrainProvider.js";
* There are some limitations such as no water mask, no vertex normals, and no
* availability, so a full-fledged {@link TerrainProvider} subclass is better suited
* for these more sophisticated use cases.
+ *
* @alias CustomHeightmapTerrainProvider
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {CustomHeightmapTerrainProvider.GeometryCallback} options.callback The callback function for requesting tile geometry.
* @param {number} options.width The number of columns per heightmap tile.
@@ -37,6 +39,7 @@ import TerrainProvider from "./TerrainProvider.js";
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
* parameter is specified, the WGS84 ellipsoid is used.
* @param {Credit|string} [options.credit] A credit for the data source, which is displayed on the canvas.
+ *
* @example
* const viewer = new Cesium.Viewer("cesiumContainer", {
* terrainProvider: new Cesium.CustomHeightmapTerrainProvider({
@@ -47,6 +50,7 @@ import TerrainProvider from "./TerrainProvider.js";
* },
* }),
* });
+ *
* @see TerrainProvider
*/
function CustomHeightmapTerrainProvider(options) {
@@ -184,10 +188,12 @@ Object.defineProperties(CustomHeightmapTerrainProvider.prototype, {
/**
* Requests the geometry for a given tile. The result includes terrain
* data and indicates that all child tiles are available.
+ *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
* @param {Request} [request] The request object. Intended for internal use only.
+ *
* @returns {Promise|undefined} A promise for the requested geometry. If this method
* returns undefined instead of a promise, it is an indication that too many requests are already
* pending and the request will be retried later.
@@ -223,6 +229,7 @@ CustomHeightmapTerrainProvider.prototype.requestTileGeometry = function (
/**
* Gets the maximum geometric error allowed in a tile at a given level.
+ *
* @param {number} level The tile level for which to get the maximum geometric error.
* @returns {number} The maximum geometric error.
*/
@@ -234,6 +241,7 @@ CustomHeightmapTerrainProvider.prototype.getLevelMaximumGeometricError = functio
/**
* Determines whether data for a tile is available to be loaded.
+ *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -249,6 +257,7 @@ CustomHeightmapTerrainProvider.prototype.getTileDataAvailable = function (
/**
* Makes sure we load availability data for a tile
+ *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
diff --git a/packages/engine/Source/Core/CylinderGeometry.js b/packages/engine/Source/Core/CylinderGeometry.js
index aeaeb16b8c58..a2b620c57a72 100644
--- a/packages/engine/Source/Core/CylinderGeometry.js
+++ b/packages/engine/Source/Core/CylinderGeometry.js
@@ -23,16 +23,21 @@ const positionScratch = new Cartesian3();
/**
* A description of a cylinder.
+ *
* @alias CylinderGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {number} options.length The length of the cylinder.
* @param {number} options.topRadius The radius of the top of the cylinder.
* @param {number} options.bottomRadius The radius of the bottom of the cylinder.
- * @param {number} [options.slices] The number of edges around the perimeter of the cylinder.
- * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
- * @throws {DeveloperError} options.slices must be greater than or equal to 3.
+ * @param {number} [options.slices=128] The number of edges around the perimeter of the cylinder.
+ * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
+ *
+ * @exception {DeveloperError} options.slices must be greater than or equal to 3.
+ *
* @see CylinderGeometry.createGeometry
+ *
* @example
* // create cylinder geometry
* const cylinder = new Cesium.CylinderGeometry({
@@ -93,9 +98,11 @@ CylinderGeometry.packedLength = VertexFormat.packedLength + 5;
/**
* Stores the provided instance into the provided array.
+ *
* @param {CylinderGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
CylinderGeometry.pack = function (value, array, startingIndex) {
@@ -134,8 +141,9 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {CylinderGeometry} [result] The object into which to store the result.
* @returns {CylinderGeometry} The modified result parameter or a new CylinderGeometry instance if one was not provided.
*/
@@ -184,6 +192,7 @@ CylinderGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of a cylinder, including its vertices, indices, and a bounding sphere.
+ *
* @param {CylinderGeometry} cylinderGeometry A description of the cylinder.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
@@ -451,6 +460,7 @@ let unitCylinderGeometry;
/**
* Returns the geometric representation of a unit cylinder, including its vertices, indices, and a bounding sphere.
* @returns {Geometry} The computed vertices and indices.
+ *
* @private
*/
CylinderGeometry.getUnitCylinder = function () {
diff --git a/packages/engine/Source/Core/CylinderGeometryLibrary.js b/packages/engine/Source/Core/CylinderGeometryLibrary.js
index 2684aa44f582..c6784a518572 100644
--- a/packages/engine/Source/Core/CylinderGeometryLibrary.js
+++ b/packages/engine/Source/Core/CylinderGeometryLibrary.js
@@ -6,11 +6,6 @@ import CesiumMath from "./Math.js";
const CylinderGeometryLibrary = {};
/**
- * @param length
- * @param topRadius
- * @param bottomRadius
- * @param slices
- * @param fill
* @private
*/
CylinderGeometryLibrary.computePositions = function (
diff --git a/packages/engine/Source/Core/CylinderOutlineGeometry.js b/packages/engine/Source/Core/CylinderOutlineGeometry.js
index 6db05747e9fa..bd587dcb4084 100644
--- a/packages/engine/Source/Core/CylinderOutlineGeometry.js
+++ b/packages/engine/Source/Core/CylinderOutlineGeometry.js
@@ -18,20 +18,25 @@ const radiusScratch = new Cartesian2();
/**
* A description of the outline of a cylinder.
+ *
* @alias CylinderOutlineGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {number} options.length The length of the cylinder.
* @param {number} options.topRadius The radius of the top of the cylinder.
* @param {number} options.bottomRadius The radius of the bottom of the cylinder.
- * @param {number} [options.slices] The number of edges around the perimeter of the cylinder.
- * @param {number} [options.numberOfVerticalLines] Number of lines to draw between the top and bottom surfaces of the cylinder.
- * @throws {DeveloperError} options.length must be greater than 0.
- * @throws {DeveloperError} options.topRadius must be greater than 0.
- * @throws {DeveloperError} options.bottomRadius must be greater than 0.
- * @throws {DeveloperError} bottomRadius and topRadius cannot both equal 0.
- * @throws {DeveloperError} options.slices must be greater than or equal to 3.
+ * @param {number} [options.slices=128] The number of edges around the perimeter of the cylinder.
+ * @param {number} [options.numberOfVerticalLines=16] Number of lines to draw between the top and bottom surfaces of the cylinder.
+ *
+ * @exception {DeveloperError} options.length must be greater than 0.
+ * @exception {DeveloperError} options.topRadius must be greater than 0.
+ * @exception {DeveloperError} options.bottomRadius must be greater than 0.
+ * @exception {DeveloperError} bottomRadius and topRadius cannot both equal 0.
+ * @exception {DeveloperError} options.slices must be greater than or equal to 3.
+ *
* @see CylinderOutlineGeometry.createGeometry
+ *
* @example
* // create cylinder geometry
* const cylinder = new Cesium.CylinderOutlineGeometry({
@@ -85,9 +90,11 @@ CylinderOutlineGeometry.packedLength = 6;
/**
* Stores the provided instance into the provided array.
+ *
* @param {CylinderOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
CylinderOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -119,8 +126,9 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {CylinderOutlineGeometry} [result] The object into which to store the result.
* @returns {CylinderOutlineGeometry} The modified result parameter or a new CylinderOutlineGeometry instance if one was not provided.
*/
@@ -162,6 +170,7 @@ CylinderOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an outline of a cylinder, including its vertices, indices, and a bounding sphere.
+ *
* @param {CylinderOutlineGeometry} cylinderGeometry A description of the cylinder outline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/DefaultProxy.js b/packages/engine/Source/Core/DefaultProxy.js
index 3fc521247bb7..8000b305da2a 100644
--- a/packages/engine/Source/Core/DefaultProxy.js
+++ b/packages/engine/Source/Core/DefaultProxy.js
@@ -1,9 +1,11 @@
/**
* A simple proxy that appends the desired resource as the sole query parameter
* to the given proxy URL.
+ *
* @alias DefaultProxy
- * @class
- * @augments {Proxy}
+ * @constructor
+ * @extends {Proxy}
+ *
* @param {string} proxy The proxy URL that will be used to requests all resources.
*/
function DefaultProxy(proxy) {
@@ -12,6 +14,7 @@ function DefaultProxy(proxy) {
/**
* Get the final URL to use to request a given resource.
+ *
* @param {string} resource The resource to request.
* @returns {string} proxied resource
*/
diff --git a/packages/engine/Source/Core/DeveloperError.js b/packages/engine/Source/Core/DeveloperError.js
index c6978a64bb7c..a330471eef23 100644
--- a/packages/engine/Source/Core/DeveloperError.js
+++ b/packages/engine/Source/Core/DeveloperError.js
@@ -9,10 +9,13 @@ import defined from "./defined.js";
* On the other hand, a {@link RuntimeError} indicates an exception that may
* be thrown at runtime, e.g., out of memory, that the calling code should be prepared
* to catch.
+ *
* @alias DeveloperError
- * @class
- * @augments Error
+ * @constructor
+ * @extends Error
+ *
* @param {string} [message] The error message for this exception.
+ *
* @see RuntimeError
*/
function DeveloperError(message) {
diff --git a/packages/engine/Source/Core/DistanceDisplayCondition.js b/packages/engine/Source/Core/DistanceDisplayCondition.js
index 95b658426199..e00e08aec341 100644
--- a/packages/engine/Source/Core/DistanceDisplayCondition.js
+++ b/packages/engine/Source/Core/DistanceDisplayCondition.js
@@ -4,10 +4,13 @@ import DeveloperError from "./DeveloperError.js";
/**
* Determines visibility based on the distance to the camera.
+ *
* @alias DistanceDisplayCondition
- * @class
- * @param {number} [near] The smallest distance in the interval where the object is visible.
- * @param {number} [far] The largest distance in the interval where the object is visible.
+ * @constructor
+ *
+ * @param {number} [near=0.0] The smallest distance in the interval where the object is visible.
+ * @param {number} [far=Number.MAX_VALUE] The largest distance in the interval where the object is visible.
+ *
* @example
* // Make a billboard that is only visible when the distance to the camera is between 10 and 20 meters.
* billboard.distanceDisplayCondition = new Cesium.DistanceDisplayCondition(10.0, 20.0);
@@ -59,9 +62,11 @@ DistanceDisplayCondition.packedLength = 2;
/**
* Stores the provided instance into the provided array.
+ *
* @param {DistanceDisplayCondition} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
DistanceDisplayCondition.pack = function (value, array, startingIndex) {
@@ -84,8 +89,9 @@ DistanceDisplayCondition.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {DistanceDisplayCondition} [result] The object into which to store the result.
* @returns {DistanceDisplayCondition} The modified result parameter or a new DistanceDisplayCondition instance if one was not provided.
*/
@@ -108,9 +114,10 @@ DistanceDisplayCondition.unpack = function (array, startingIndex, result) {
/**
* Determines if two distance display conditions are equal.
+ *
* @param {DistanceDisplayCondition} left A distance display condition.
* @param {DistanceDisplayCondition} right Another distance display condition.
- * @returns {boolean} Whether the two distance display conditions are equal.
+ * @return {boolean} Whether the two distance display conditions are equal.
*/
DistanceDisplayCondition.equals = function (left, right) {
return (
@@ -124,9 +131,10 @@ DistanceDisplayCondition.equals = function (left, right) {
/**
* Duplicates a distance display condition instance.
+ *
* @param {DistanceDisplayCondition} [value] The distance display condition to duplicate.
* @param {DistanceDisplayCondition} [result] The result onto which to store the result.
- * @returns {DistanceDisplayCondition} The duplicated instance.
+ * @return {DistanceDisplayCondition} The duplicated instance.
*/
DistanceDisplayCondition.clone = function (value, result) {
if (!defined(value)) {
@@ -144,8 +152,9 @@ DistanceDisplayCondition.clone = function (value, result) {
/**
* Duplicates this instance.
+ *
* @param {DistanceDisplayCondition} [result] The result onto which to store the result.
- * @returns {DistanceDisplayCondition} The duplicated instance.
+ * @return {DistanceDisplayCondition} The duplicated instance.
*/
DistanceDisplayCondition.prototype.clone = function (result) {
return DistanceDisplayCondition.clone(this, result);
@@ -153,8 +162,9 @@ DistanceDisplayCondition.prototype.clone = function (result) {
/**
* Determines if this distance display condition is equal to another.
+ *
* @param {DistanceDisplayCondition} other Another distance display condition.
- * @returns {boolean} Whether this distance display condition is equal to the other.
+ * @return {boolean} Whether this distance display condition is equal to the other.
*/
DistanceDisplayCondition.prototype.equals = function (other) {
return DistanceDisplayCondition.equals(this, other);
diff --git a/packages/engine/Source/Core/DistanceDisplayConditionGeometryInstanceAttribute.js b/packages/engine/Source/Core/DistanceDisplayConditionGeometryInstanceAttribute.js
index 13e90c7d85d5..6bf81bd70db0 100644
--- a/packages/engine/Source/Core/DistanceDisplayConditionGeometryInstanceAttribute.js
+++ b/packages/engine/Source/Core/DistanceDisplayConditionGeometryInstanceAttribute.js
@@ -5,11 +5,15 @@ import DeveloperError from "./DeveloperError.js";
/**
* Value and type information for per-instance geometry attribute that determines if the geometry instance has a distance display condition.
+ *
* @alias DistanceDisplayConditionGeometryInstanceAttribute
- * @class
- * @param {number} [near] The near distance.
- * @param {number} [far] The far distance.
- * @throws {DeveloperError} far must be greater than near.
+ * @constructor
+ *
+ * @param {number} [near=0.0] The near distance.
+ * @param {number} [far=Number.MAX_VALUE] The far distance.
+ *
+ * @exception {DeveloperError} far must be greater than near.
+ *
* @example
* const instance = new Cesium.GeometryInstance({
* geometry : new Cesium.BoxGeometry({
@@ -24,6 +28,7 @@ import DeveloperError from "./DeveloperError.js";
* distanceDisplayCondition : new Cesium.DistanceDisplayConditionGeometryInstanceAttribute(100.0, 10000.0)
* }
* });
+ *
* @see GeometryInstance
* @see GeometryInstanceAttribute
*/
@@ -41,7 +46,9 @@ function DistanceDisplayConditionGeometryInstanceAttribute(near, far) {
/**
* The values for the attributes stored in a typed array.
+ *
* @type {Float32Array}
+ *
* @default [0.0, 0.0, Number.MAX_VALUE]
*/
this.value = new Float32Array([near, far]);
@@ -53,9 +60,12 @@ Object.defineProperties(
/**
* The datatype of each component in the attribute, e.g., individual elements in
* {@link DistanceDisplayConditionGeometryInstanceAttribute#value}.
+ *
* @memberof DistanceDisplayConditionGeometryInstanceAttribute.prototype
+ *
* @type {ComponentDatatype}
* @readonly
+ *
* @default {@link ComponentDatatype.FLOAT}
*/
componentDatatype: {
@@ -66,9 +76,12 @@ Object.defineProperties(
/**
* The number of components in the attributes, i.e., {@link DistanceDisplayConditionGeometryInstanceAttribute#value}.
+ *
* @memberof DistanceDisplayConditionGeometryInstanceAttribute.prototype
+ *
* @type {number}
* @readonly
+ *
* @default 3
*/
componentsPerAttribute: {
@@ -81,9 +94,12 @@ Object.defineProperties(
* When true
and componentDatatype
is an integer format,
* indicate that the components should be mapped to the range [0, 1] (unsigned)
* or [-1, 1] (signed) when they are accessed as floating-point for rendering.
+ *
* @memberof DistanceDisplayConditionGeometryInstanceAttribute.prototype
+ *
* @type {boolean}
* @readonly
+ *
* @default false
*/
normalize: {
@@ -96,9 +112,12 @@ Object.defineProperties(
/**
* Creates a new {@link DistanceDisplayConditionGeometryInstanceAttribute} instance given the provided an enabled flag and {@link DistanceDisplayCondition}.
+ *
* @param {DistanceDisplayCondition} distanceDisplayCondition The distance display condition.
* @returns {DistanceDisplayConditionGeometryInstanceAttribute} The new {@link DistanceDisplayConditionGeometryInstanceAttribute} instance.
- * @throws {DeveloperError} distanceDisplayCondition.far must be greater than distanceDisplayCondition.near
+ *
+ * @exception {DeveloperError} distanceDisplayCondition.far must be greater than distanceDisplayCondition.near
+ *
* @example
* const distanceDisplayCondition = new Cesium.DistanceDisplayCondition(100.0, 10000.0);
* const instance = new Cesium.GeometryInstance({
@@ -130,9 +149,11 @@ DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition =
/**
* Converts a distance display condition to a typed array that can be used to assign a distance display condition attribute.
+ *
* @param {DistanceDisplayCondition} distanceDisplayCondition The distance display condition value.
* @param {Float32Array} [result] The array to store the result in, if undefined a new instance will be created.
* @returns {Float32Array} The modified result parameter or a new instance if result was undefined.
+ *
* @example
* const attributes = primitive.getGeometryInstanceAttributes('an id');
* attributes.distanceDisplayCondition = Cesium.DistanceDisplayConditionGeometryInstanceAttribute.toValue(distanceDisplayCondition, attributes.distanceDisplayCondition);
diff --git a/packages/engine/Source/Core/DoubleEndedPriorityQueue.js b/packages/engine/Source/Core/DoubleEndedPriorityQueue.js
index adcaee3713e2..e0abcf5f6e0f 100644
--- a/packages/engine/Source/Core/DoubleEndedPriorityQueue.js
+++ b/packages/engine/Source/Core/DoubleEndedPriorityQueue.js
@@ -5,9 +5,11 @@ import defined from "./defined.js";
/**
* Array-backed min-max heap implementation of a double-ended priority queue.
* This data structure allows for efficient removal of minimum and maximum elements.
+ *
* @alias DoubleEndedPriorityQueue
- * @class
+ * @constructor
* @private
+ *
* @param {object} options Object with the following properties:
* @param {DoubleEndedPriorityQueue.ComparatorCallback} options.comparator The comparator to use for the queue. If comparator(a, b) is less than 0, a is lower priority than b.
* @param {number} [options.maximumLength] The maximum length of the queue. If an element is inserted when the queue is at full capacity, the minimum element is removed. By default, the size of the queue is unlimited.
@@ -36,7 +38,9 @@ function DoubleEndedPriorityQueue(options) {
Object.defineProperties(DoubleEndedPriorityQueue.prototype, {
/**
* Gets the number of elements in the queue.
+ *
* @memberof DoubleEndedPriorityQueue.prototype
+ *
* @type {number}
* @readonly
*/
@@ -51,7 +55,9 @@ Object.defineProperties(DoubleEndedPriorityQueue.prototype, {
* If set to a smaller value than the current length of the queue, the lowest priority elements are removed.
* If an element is inserted when the queue is at full capacity, the minimum element is removed.
* If set to undefined, the size of the queue is unlimited.
+ *
* @memberof DoubleEndedPriorityQueue.prototype
+ *
* @type {number}
* @readonly
*/
@@ -79,7 +85,9 @@ Object.defineProperties(DoubleEndedPriorityQueue.prototype, {
/**
* Gets the internal array.
+ *
* @memberof DoubleEndedPriorityQueue.prototype
+ *
* @type {Array}
* @readonly
*/
@@ -92,7 +100,9 @@ Object.defineProperties(DoubleEndedPriorityQueue.prototype, {
/**
* The comparator used by the queue.
* If comparator(a, b) is less than 0, a is lower priority than b.
+ *
* @memberof DoubleEndedPriorityQueue.prototype
+ *
* @type {DoubleEndedPriorityQueue.ComparatorCallback}
* @readonly
*/
@@ -105,6 +115,7 @@ Object.defineProperties(DoubleEndedPriorityQueue.prototype, {
/**
* Clones the double ended priority queue.
+ *
* @returns {DoubleEndedPriorityQueue} The cloned double ended priority queue.
*/
DoubleEndedPriorityQueue.prototype.clone = function () {
@@ -161,6 +172,7 @@ DoubleEndedPriorityQueue.prototype.resort = function () {
* Inserts an element into the queue.
* If the queue is at full capacity, the minimum element is removed.
* The new element is returned (and not added) if it is less than or equal priority to the minimum element.
+ *
* @param {*} element
* @returns {*|undefined} The minimum element if the queue is at full capacity. Returns undefined if there is no maximum length.
*/
@@ -195,6 +207,7 @@ DoubleEndedPriorityQueue.prototype.insert = function (element) {
/**
* Removes the minimum element from the queue and returns it.
* If the queue is empty, the return value is undefined.
+ *
* @returns {*|undefined} The minimum element, or undefined if the queue is empty.
*/
DoubleEndedPriorityQueue.prototype.removeMinimum = function () {
@@ -222,6 +235,7 @@ DoubleEndedPriorityQueue.prototype.removeMinimum = function () {
/**
* Removes the maximum element from the queue and returns it.
* If the queue is empty, the return value is undefined.
+ *
* @returns {*|undefined} The maximum element, or undefined if the queue is empty.
*/
DoubleEndedPriorityQueue.prototype.removeMaximum = function () {
@@ -258,6 +272,7 @@ DoubleEndedPriorityQueue.prototype.removeMaximum = function () {
/**
* Gets the minimum element in the queue.
* If the queue is empty, the result is undefined.
+ *
* @returns {*|undefined} element
*/
@@ -274,6 +289,7 @@ DoubleEndedPriorityQueue.prototype.getMinimum = function () {
/**
* Gets the maximum element in the queue.
* If the queue is empty, the result is undefined.
+ *
* @returns {*|undefined} element
*/
DoubleEndedPriorityQueue.prototype.getMaximum = function () {
diff --git a/packages/engine/Source/Core/DoublyLinkedList.js b/packages/engine/Source/Core/DoublyLinkedList.js
index af7ebfc093bb..a8f17a7b0e93 100644
--- a/packages/engine/Source/Core/DoublyLinkedList.js
+++ b/packages/engine/Source/Core/DoublyLinkedList.js
@@ -18,9 +18,6 @@ Object.defineProperties(DoublyLinkedList.prototype, {
});
/**
- * @param item
- * @param previous
- * @param next
* @private
*/
function DoublyLinkedListNode(item, previous, next) {
@@ -32,7 +29,7 @@ function DoublyLinkedListNode(item, previous, next) {
/**
* Adds the item to the end of the list
* @param {*} [item]
- * @returns {DoublyLinkedListNode}
+ * @return {DoublyLinkedListNode}
*/
DoublyLinkedList.prototype.add = function (item) {
const node = new DoublyLinkedListNode(item, this.tail, undefined);
diff --git a/packages/engine/Source/Core/EarthOrientationParameters.js b/packages/engine/Source/Core/EarthOrientationParameters.js
index 3c1ddb5ed2b3..514d9284a584 100644
--- a/packages/engine/Source/Core/EarthOrientationParameters.js
+++ b/packages/engine/Source/Core/EarthOrientationParameters.js
@@ -16,17 +16,20 @@ import TimeStandard from "./TimeStandard.js";
* the International Celestial Reference Frame (ICRF) to the International Terrestrial
* Reference Frame (ITRF).
* This object is normally not instantiated directly, use {@link EarthOrientationParameters.fromUrl}.
+ *
* @alias EarthOrientationParameters
- * @class
+ * @constructor
+ *
* @param {object} [options] Object with the following properties:
* @param {object} [options.data] The actual EOP data. If neither this
* parameter nor options.data is specified, all EOP values are assumed
* to be 0.0.
- * @param {boolean} [options.addNewLeapSeconds] True if leap seconds that
+ * @param {boolean} [options.addNewLeapSeconds=true] True if leap seconds that
* are specified in the EOP data but not in {@link JulianDate.leapSeconds}
* should be added to {@link JulianDate.leapSeconds}. False if
* new leap seconds should be handled correctly in the context
* of the EOP data but otherwise ignored.
+ *
* @private
*/
function EarthOrientationParameters(options) {
@@ -77,11 +80,12 @@ function EarthOrientationParameters(options) {
* to be 0.0. If options.data is specified, this parameter is
* ignored.
* @param {object} [options] Object with the following properties:
- * @param {boolean} [options.addNewLeapSeconds] True if leap seconds that
+ * @param {boolean} [options.addNewLeapSeconds=true] True if leap seconds that
* are specified in the EOP data but not in {@link JulianDate.leapSeconds}
* should be added to {@link JulianDate.leapSeconds}. False if
* new leap seconds should be handled correctly in the context
* of the EOP data but otherwise ignored.
+ *
* @example
* // An example EOP data file, EOP.json:
* {
@@ -92,6 +96,7 @@ function EarthOrientationParameters(options) {
* "2011-07-03T00:00:00Z",55745.0,2.262286080161428e-7,2.1191157519929706e-6,-0.2905572,1.9e-6,-3.490658503988659e-10,6.981317007977318e-10,34.0
* ]
* }
+ *
* @example
* // Loading the EOP data
* const eop = await Cesium.EarthOrientationParameters.fromUrl('Data/EOP.json');
@@ -143,13 +148,16 @@ EarthOrientationParameters.NONE = Object.freeze({
/**
* Computes the Earth Orientation Parameters (EOP) for a given date by interpolating.
* If the EOP data has not yet been download, this method returns undefined.
+ *
* @param {JulianDate} date The date for each to evaluate the EOP.
* @param {EarthOrientationParametersSample} [result] The instance to which to copy the result.
* If this parameter is undefined, a new instance is created and returned.
* @returns {EarthOrientationParametersSample} The EOP evaluated at the given date, or
* undefined if the data necessary to evaluate EOP at the date has not yet been
* downloaded.
- * @throws {RuntimeError} The loaded EOP data has an error and cannot be used.
+ *
+ * @exception {RuntimeError} The loaded EOP data has an error and cannot be used.
+ *
* @see EarthOrientationParameters#fromUrl
*/
EarthOrientationParameters.prototype.compute = function (date, result) {
diff --git a/packages/engine/Source/Core/EarthOrientationParametersSample.js b/packages/engine/Source/Core/EarthOrientationParametersSample.js
index 37c41a992617..336e564da4b8 100644
--- a/packages/engine/Source/Core/EarthOrientationParametersSample.js
+++ b/packages/engine/Source/Core/EarthOrientationParametersSample.js
@@ -1,12 +1,15 @@
/**
* A set of Earth Orientation Parameters (EOP) sampled at a time.
+ *
* @alias EarthOrientationParametersSample
- * @class
+ * @constructor
+ *
* @param {number} xPoleWander The pole wander about the X axis, in radians.
* @param {number} yPoleWander The pole wander about the Y axis, in radians.
* @param {number} xPoleOffset The offset to the Celestial Intermediate Pole (CIP) about the X axis, in radians.
* @param {number} yPoleOffset The offset to the Celestial Intermediate Pole (CIP) about the Y axis, in radians.
* @param {number} ut1MinusUtc The difference in time standards, UT1 - UTC, in seconds.
+ *
* @private
*/
function EarthOrientationParametersSample(
diff --git a/packages/engine/Source/Core/EasingFunction.js b/packages/engine/Source/Core/EasingFunction.js
index cf93b832ce27..0b8cc00c2e86 100644
--- a/packages/engine/Source/Core/EasingFunction.js
+++ b/packages/engine/Source/Core/EasingFunction.js
@@ -4,11 +4,13 @@ import { Easing } from "@tweenjs/tween.js";
* Easing functions for use with TweenCollection. These function are from
* {@link https://github.com/sole/tween.js/|Tween.js} and Robert Penner. See the
* {@link http://sole.github.io/tween.js/examples/03_graphs.html|Tween.js graphs for each function}.
+ *
* @namespace
*/
const EasingFunction = {
/**
* Linear easing.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -16,18 +18,21 @@ const EasingFunction = {
/**
* Quadratic in.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
QUADRATIC_IN: Easing.Quadratic.In,
/**
* Quadratic out.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
QUADRATIC_OUT: Easing.Quadratic.Out,
/**
* Quadratic in then out.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -35,18 +40,21 @@ const EasingFunction = {
/**
* Cubic in.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
CUBIC_IN: Easing.Cubic.In,
/**
* Cubic out.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
CUBIC_OUT: Easing.Cubic.Out,
/**
* Cubic in then out.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -54,18 +62,21 @@ const EasingFunction = {
/**
* Quartic in.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
QUARTIC_IN: Easing.Quartic.In,
/**
* Quartic out.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
QUARTIC_OUT: Easing.Quartic.Out,
/**
* Quartic in then out.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -73,18 +84,21 @@ const EasingFunction = {
/**
* Quintic in.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
QUINTIC_IN: Easing.Quintic.In,
/**
* Quintic out.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
QUINTIC_OUT: Easing.Quintic.Out,
/**
* Quintic in then out.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -92,18 +106,21 @@ const EasingFunction = {
/**
* Sinusoidal in.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
SINUSOIDAL_IN: Easing.Sinusoidal.In,
/**
* Sinusoidal out.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
SINUSOIDAL_OUT: Easing.Sinusoidal.Out,
/**
* Sinusoidal in then out.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -111,18 +128,21 @@ const EasingFunction = {
/**
* Exponential in.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
EXPONENTIAL_IN: Easing.Exponential.In,
/**
* Exponential out.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
EXPONENTIAL_OUT: Easing.Exponential.Out,
/**
* Exponential in then out.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -130,18 +150,21 @@ const EasingFunction = {
/**
* Circular in.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
CIRCULAR_IN: Easing.Circular.In,
/**
* Circular out.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
CIRCULAR_OUT: Easing.Circular.Out,
/**
* Circular in then out.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -149,18 +172,21 @@ const EasingFunction = {
/**
* Elastic in.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
ELASTIC_IN: Easing.Elastic.In,
/**
* Elastic out.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
ELASTIC_OUT: Easing.Elastic.Out,
/**
* Elastic in then out.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -168,18 +194,21 @@ const EasingFunction = {
/**
* Back in.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
BACK_IN: Easing.Back.In,
/**
* Back out.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
BACK_OUT: Easing.Back.Out,
/**
* Back in then out.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -187,18 +216,21 @@ const EasingFunction = {
/**
* Bounce in.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
BOUNCE_IN: Easing.Bounce.In,
/**
* Bounce out.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
BOUNCE_OUT: Easing.Bounce.Out,
/**
* Bounce in then out.
+ *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -210,10 +242,12 @@ const EasingFunction = {
* @callback EasingFunction.Callback
* @param {number} time The time in the range [0, 1]
.
* @returns {number} The value of the function at the given time.
+ *
* @example
* function quadraticIn(time) {
* return time * time;
* }
+ *
* @example
* function quadraticOut(time) {
* return time * (2.0 - time);
diff --git a/packages/engine/Source/Core/EllipseGeometry.js b/packages/engine/Source/Core/EllipseGeometry.js
index 36d16ebb838c..483ec135780b 100644
--- a/packages/engine/Source/Core/EllipseGeometry.js
+++ b/packages/engine/Source/Core/EllipseGeometry.js
@@ -884,22 +884,27 @@ function computeRectangle(
/**
* A description of an ellipse on an ellipsoid. Ellipse geometry can be rendered with both {@link Primitive} and {@link GroundPrimitive}.
+ *
* @alias EllipseGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.center The ellipse's center point in the fixed frame.
* @param {number} options.semiMajorAxis The length of the ellipse's semi-major axis in meters.
* @param {number} options.semiMinorAxis The length of the ellipse's semi-minor axis in meters.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid the ellipse will be on.
- * @param {number} [options.height] The distance in meters between the ellipse and the ellipsoid surface.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid the ellipse will be on.
+ * @param {number} [options.height=0.0] The distance in meters between the ellipse and the ellipsoid surface.
* @param {number} [options.extrudedHeight] The distance in meters between the ellipse's extruded face and the ellipsoid surface.
- * @param {number} [options.rotation] The angle of rotation counter-clockwise from north.
- * @param {number} [options.stRotation] The rotation of the texture coordinates counter-clockwise from north.
- * @param {number} [options.granularity] The angular distance between points on the ellipse in radians.
- * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
- * @throws {DeveloperError} semiMajorAxis and semiMinorAxis must be greater than zero.
- * @throws {DeveloperError} semiMajorAxis must be greater than or equal to the semiMinorAxis.
- * @throws {DeveloperError} granularity must be greater than zero.
+ * @param {number} [options.rotation=0.0] The angle of rotation counter-clockwise from north.
+ * @param {number} [options.stRotation=0.0] The rotation of the texture coordinates counter-clockwise from north.
+ * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The angular distance between points on the ellipse in radians.
+ * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
+ *
+ * @exception {DeveloperError} semiMajorAxis and semiMinorAxis must be greater than zero.
+ * @exception {DeveloperError} semiMajorAxis must be greater than or equal to the semiMinorAxis.
+ * @exception {DeveloperError} granularity must be greater than zero.
+ *
+ *
* @example
* // Create an ellipse.
* const ellipse = new Cesium.EllipseGeometry({
@@ -909,6 +914,7 @@ function computeRectangle(
* rotation : Cesium.Math.toRadians(60.0)
* });
* const geometry = Cesium.EllipseGeometry.createGeometry(ellipse);
+ *
* @see EllipseGeometry.createGeometry
*/
function EllipseGeometry(options) {
@@ -971,9 +977,11 @@ EllipseGeometry.packedLength =
/**
* Stores the provided instance into the provided array.
+ *
* @param {EllipseGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
EllipseGeometry.pack = function (value, array, startingIndex) {
@@ -1026,8 +1034,9 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {EllipseGeometry} [result] The object into which to store the result.
* @returns {EllipseGeometry} The modified result parameter or a new EllipseGeometry instance if one was not provided.
*/
@@ -1095,14 +1104,16 @@ EllipseGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the bounding rectangle based on the provided options
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.center The ellipse's center point in the fixed frame.
* @param {number} options.semiMajorAxis The length of the ellipse's semi-major axis in meters.
* @param {number} options.semiMinorAxis The length of the ellipse's semi-minor axis in meters.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid the ellipse will be on.
- * @param {number} [options.rotation] The angle of rotation counter-clockwise from north.
- * @param {number} [options.granularity] The angular distance between points on the ellipse in radians.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid the ellipse will be on.
+ * @param {number} [options.rotation=0.0] The angle of rotation counter-clockwise from north.
+ * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The angular distance between points on the ellipse in radians.
* @param {Rectangle} [result] An object in which to store the result
+ *
* @returns {Rectangle} The result rectangle
*/
EllipseGeometry.computeRectangle = function (options, result) {
@@ -1145,6 +1156,7 @@ EllipseGeometry.computeRectangle = function (options, result) {
/**
* Computes the geometric representation of a ellipse on an ellipsoid, including its vertices, indices, and a bounding sphere.
+ *
* @param {EllipseGeometry} ellipseGeometry A description of the ellipse.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
@@ -1214,9 +1226,6 @@ EllipseGeometry.createGeometry = function (ellipseGeometry) {
};
/**
- * @param ellipseGeometry
- * @param minHeightFunc
- * @param maxHeightFunc
* @private
*/
EllipseGeometry.createShadowVolume = function (
diff --git a/packages/engine/Source/Core/EllipseGeometryLibrary.js b/packages/engine/Source/Core/EllipseGeometryLibrary.js
index b0ea2b26247d..acf09c2a2f33 100644
--- a/packages/engine/Source/Core/EllipseGeometryLibrary.js
+++ b/packages/engine/Source/Core/EllipseGeometryLibrary.js
@@ -54,9 +54,6 @@ const scratchCartesian3 = new Cartesian3();
const scratchNormal = new Cartesian3();
/**
* Returns the positions raised to the given heights
- * @param positions
- * @param options
- * @param extrude
* @private
*/
EllipseGeometryLibrary.raisePositionsToHeight = function (
@@ -111,9 +108,6 @@ const eastVecScratch = new Cartesian3();
const northVecScratch = new Cartesian3();
/**
* Returns an array of positions that make up the ellipse.
- * @param options
- * @param addFillPositions
- * @param addEdgePositions
* @private
*/
EllipseGeometryLibrary.computeEllipsePositions = function (
diff --git a/packages/engine/Source/Core/EllipseOutlineGeometry.js b/packages/engine/Source/Core/EllipseOutlineGeometry.js
index 3c2dc70f9160..3593c2db0b9c 100644
--- a/packages/engine/Source/Core/EllipseOutlineGeometry.js
+++ b/packages/engine/Source/Core/EllipseOutlineGeometry.js
@@ -180,22 +180,27 @@ function computeExtrudedEllipse(options) {
/**
* A description of the outline of an ellipse on an ellipsoid.
+ *
* @alias EllipseOutlineGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.center The ellipse's center point in the fixed frame.
* @param {number} options.semiMajorAxis The length of the ellipse's semi-major axis in meters.
* @param {number} options.semiMinorAxis The length of the ellipse's semi-minor axis in meters.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid the ellipse will be on.
- * @param {number} [options.height] The distance in meters between the ellipse and the ellipsoid surface.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid the ellipse will be on.
+ * @param {number} [options.height=0.0] The distance in meters between the ellipse and the ellipsoid surface.
* @param {number} [options.extrudedHeight] The distance in meters between the ellipse's extruded face and the ellipsoid surface.
- * @param {number} [options.rotation] The angle from north (counter-clockwise) in radians.
- * @param {number} [options.granularity] The angular distance between points on the ellipse in radians.
- * @param {number} [options.numberOfVerticalLines] Number of lines to draw between the top and bottom surface of an extruded ellipse.
- * @throws {DeveloperError} semiMajorAxis and semiMinorAxis must be greater than zero.
- * @throws {DeveloperError} semiMajorAxis must be greater than or equal to the semiMinorAxis.
- * @throws {DeveloperError} granularity must be greater than zero.
+ * @param {number} [options.rotation=0.0] The angle from north (counter-clockwise) in radians.
+ * @param {number} [options.granularity=0.02] The angular distance between points on the ellipse in radians.
+ * @param {number} [options.numberOfVerticalLines=16] Number of lines to draw between the top and bottom surface of an extruded ellipse.
+ *
+ * @exception {DeveloperError} semiMajorAxis and semiMinorAxis must be greater than zero.
+ * @exception {DeveloperError} semiMajorAxis must be greater than or equal to the semiMinorAxis.
+ * @exception {DeveloperError} granularity must be greater than zero.
+ *
* @see EllipseOutlineGeometry.createGeometry
+ *
* @example
* const ellipse = new Cesium.EllipseOutlineGeometry({
* center : Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883),
@@ -265,9 +270,11 @@ EllipseOutlineGeometry.packedLength =
/**
* Stores the provided instance into the provided array.
+ *
* @param {EllipseOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
EllipseOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -317,8 +324,9 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {EllipseOutlineGeometry} [result] The object into which to store the result.
* @returns {EllipseOutlineGeometry} The modified result parameter or a new EllipseOutlineGeometry instance if one was not provided.
*/
@@ -377,6 +385,7 @@ EllipseOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an outline of an ellipse on an ellipsoid, including its vertices, indices, and a bounding sphere.
+ *
* @param {EllipseOutlineGeometry} ellipseGeometry A description of the ellipse.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/Ellipsoid.js b/packages/engine/Source/Core/Ellipsoid.js
index d07c10c6e013..22cdecd06d79 100644
--- a/packages/engine/Source/Core/Ellipsoid.js
+++ b/packages/engine/Source/Core/Ellipsoid.js
@@ -61,11 +61,14 @@ function initialize(ellipsoid, x, y, z) {
* Rather than constructing this object directly, one of the provided
* constants is normally used.
* @alias Ellipsoid
- * @class
- * @param {number} [x] The radius in the x direction.
- * @param {number} [y] The radius in the y direction.
- * @param {number} [z] The radius in the z direction.
- * @throws {DeveloperError} All radii components must be greater than or equal to zero.
+ * @constructor
+ *
+ * @param {number} [x=0] The radius in the x direction.
+ * @param {number} [y=0] The radius in the y direction.
+ * @param {number} [z=0] The radius in the z direction.
+ *
+ * @exception {DeveloperError} All radii components must be greater than or equal to zero.
+ *
* @see Ellipsoid.fromCartesian3
* @see Ellipsoid.WGS84
* @see Ellipsoid.UNIT_SPHERE
@@ -166,6 +169,7 @@ Object.defineProperties(Ellipsoid.prototype, {
/**
* Duplicates an Ellipsoid instance.
+ *
* @param {Ellipsoid} ellipsoid The ellipsoid to duplicate.
* @param {Ellipsoid} [result] The object onto which to store the result, or undefined if a new
* instance should be created.
@@ -195,11 +199,14 @@ Ellipsoid.clone = function (ellipsoid, result) {
/**
* Computes an Ellipsoid from a Cartesian specifying the radii in x, y, and z directions.
- * @param {Cartesian3} [cartesian] The ellipsoid's radius in the x, y, and z directions.
+ *
+ * @param {Cartesian3} [cartesian=Cartesian3.ZERO] The ellipsoid's radius in the x, y, and z directions.
* @param {Ellipsoid} [result] The object onto which to store the result, or undefined if a new
* instance should be created.
* @returns {Ellipsoid} A new Ellipsoid instance.
- * @throws {DeveloperError} All radii components must be greater than or equal to zero.
+ *
+ * @exception {DeveloperError} All radii components must be greater than or equal to zero.
+ *
* @see Ellipsoid.WGS84
* @see Ellipsoid.UNIT_SPHERE
*/
@@ -218,6 +225,7 @@ Ellipsoid.fromCartesian3 = function (cartesian, result) {
/**
* An Ellipsoid instance initialized to the WGS84 standard.
+ *
* @type {Ellipsoid}
* @constant
*/
@@ -227,6 +235,7 @@ Ellipsoid.WGS84 = Object.freeze(
/**
* An Ellipsoid instance initialized to radii of (1.0, 1.0, 1.0).
+ *
* @type {Ellipsoid}
* @constant
*/
@@ -234,6 +243,7 @@ Ellipsoid.UNIT_SPHERE = Object.freeze(new Ellipsoid(1.0, 1.0, 1.0));
/**
* An Ellipsoid instance initialized to a sphere with the lunar radius.
+ *
* @type {Ellipsoid}
* @constant
*/
@@ -247,6 +257,7 @@ Ellipsoid.MOON = Object.freeze(
/**
* Duplicates an Ellipsoid instance.
+ *
* @param {Ellipsoid} [result] The object onto which to store the result, or undefined if a new
* instance should be created.
* @returns {Ellipsoid} The cloned Ellipsoid.
@@ -263,9 +274,11 @@ Ellipsoid.packedLength = Cartesian3.packedLength;
/**
* Stores the provided instance into the provided array.
+ *
* @param {Ellipsoid} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
Ellipsoid.pack = function (value, array, startingIndex) {
@@ -283,8 +296,9 @@ Ellipsoid.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Ellipsoid} [result] The object into which to store the result.
* @returns {Ellipsoid} The modified result parameter or a new Ellipsoid instance if one was not provided.
*/
@@ -302,6 +316,7 @@ Ellipsoid.unpack = function (array, startingIndex, result) {
/**
* Computes the unit vector directed from the center of this ellipsoid toward the provided Cartesian position.
* @function
+ *
* @param {Cartesian3} cartesian The Cartesian for which to to determine the geocentric normal.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.
@@ -310,6 +325,7 @@ Ellipsoid.prototype.geocentricSurfaceNormal = Cartesian3.normalize;
/**
* Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.
+ *
* @param {Cartographic} cartographic The cartographic position for which to to determine the geodetic normal.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.
@@ -341,6 +357,7 @@ Ellipsoid.prototype.geodeticSurfaceNormalCartographic = function (
/**
* Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.
+ *
* @param {Cartesian3} cartesian The Cartesian position for which to to determine the surface normal.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided, or undefined if a normal cannot be found.
@@ -373,9 +390,11 @@ const cartographicToCartesianK = new Cartesian3();
/**
* Converts the provided cartographic to Cartesian representation.
+ *
* @param {Cartographic} cartographic The cartographic position.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.
+ *
* @example
* //Create a Cartographic and determine it's Cartesian representation on a WGS84 ellipsoid.
* const position = new Cesium.Cartographic(Cesium.Math.toRadians(21), Cesium.Math.toRadians(78), 5000);
@@ -399,9 +418,11 @@ Ellipsoid.prototype.cartographicToCartesian = function (cartographic, result) {
/**
* Converts the provided array of cartographics to an array of Cartesians.
+ *
* @param {Cartographic[]} cartographics An array of cartographic positions.
* @param {Cartesian3[]} [result] The object onto which to store the result.
* @returns {Cartesian3[]} The modified result parameter or a new Array instance if none was provided.
+ *
* @example
* //Convert an array of Cartographics and determine their Cartesian representation on a WGS84 ellipsoid.
* const positions = [new Cesium.Cartographic(Cesium.Math.toRadians(21), Cesium.Math.toRadians(78), 0),
@@ -436,9 +457,11 @@ const cartesianToCartographicH = new Cartesian3();
/**
* Converts the provided cartesian to cartographic representation.
* The cartesian is undefined at the center of the ellipsoid.
+ *
* @param {Cartesian3} cartesian The Cartesian position to convert to cartographic representation.
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.
+ *
* @example
* //Create a Cartesian and determine it's Cartographic representation on a WGS84 ellipsoid.
* const position = new Cesium.Cartesian3(17832.12, 83234.52, 952313.73);
@@ -471,9 +494,11 @@ Ellipsoid.prototype.cartesianToCartographic = function (cartesian, result) {
/**
* Converts the provided array of cartesians to an array of cartographics.
+ *
* @param {Cartesian3[]} cartesians An array of Cartesian positions.
* @param {Cartographic[]} [result] The object onto which to store the result.
* @returns {Cartographic[]} The modified result parameter or a new Array instance if none was provided.
+ *
* @example
* //Create an array of Cartesians and determine their Cartographic representation on a WGS84 ellipsoid.
* const positions = [new Cesium.Cartesian3(17832.12, 83234.52, 952313.73),
@@ -505,6 +530,7 @@ Ellipsoid.prototype.cartesianArrayToCartographicArray = function (
* Scales the provided Cartesian position along the geodetic surface normal
* so that it is on the surface of this ellipsoid. If the position is
* at the center of the ellipsoid, this function returns undefined.
+ *
* @param {Cartesian3} cartesian The Cartesian position to scale.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter, a new Cartesian3 instance if none was provided, or undefined if the position is at the center.
@@ -522,6 +548,7 @@ Ellipsoid.prototype.scaleToGeodeticSurface = function (cartesian, result) {
/**
* Scales the provided Cartesian position along the geocentric surface normal
* so that it is on the surface of this ellipsoid.
+ *
* @param {Cartesian3} cartesian The Cartesian position to scale.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.
@@ -554,6 +581,7 @@ Ellipsoid.prototype.scaleToGeocentricSurface = function (cartesian, result) {
/**
* Transforms a Cartesian X, Y, Z position to the ellipsoid-scaled space by multiplying
* its components by the result of {@link Ellipsoid#oneOverRadii}.
+ *
* @param {Cartesian3} position The position to transform.
* @param {Cartesian3} [result] The position to which to copy the result, or undefined to create and
* return a new instance.
@@ -574,6 +602,7 @@ Ellipsoid.prototype.transformPositionToScaledSpace = function (
/**
* Transforms a Cartesian X, Y, Z position from the ellipsoid-scaled space by multiplying
* its components by the result of {@link Ellipsoid#radii}.
+ *
* @param {Cartesian3} position The position to transform.
* @param {Cartesian3} [result] The position to which to copy the result, or undefined to create and
* return a new instance.
@@ -594,6 +623,7 @@ Ellipsoid.prototype.transformPositionFromScaledSpace = function (
/**
* Compares this Ellipsoid against the provided Ellipsoid componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {Ellipsoid} [right] The other Ellipsoid.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -606,6 +636,7 @@ Ellipsoid.prototype.equals = function (right) {
/**
* Creates a string representing this Ellipsoid in the format '(radii.x, radii.y, radii.z)'.
+ *
* @returns {string} A string representing this ellipsoid in the format '(radii.x, radii.y, radii.z)'.
*/
Ellipsoid.prototype.toString = function () {
@@ -614,17 +645,19 @@ Ellipsoid.prototype.toString = function () {
/**
* Computes a point which is the intersection of the surface normal with the z-axis.
+ *
* @param {Cartesian3} position the position. must be on the surface of the ellipsoid.
- * @param {number} [buffer] A buffer to subtract from the ellipsoid size when checking if the point is inside the ellipsoid.
+ * @param {number} [buffer = 0.0] A buffer to subtract from the ellipsoid size when checking if the point is inside the ellipsoid.
* In earth case, with common earth datums, there is no need for this buffer since the intersection point is always (relatively) very close to the center.
* In WGS84 datum, intersection point is at max z = +-42841.31151331382 (0.673% of z-axis).
* Intersection point could be outside the ellipsoid if the ratio of MajorAxis / AxisOfRotation is bigger than the square root of 2
* @param {Cartesian3} [result] The cartesian to which to copy the result, or undefined to create and
* return a new instance.
* @returns {Cartesian3 | undefined} the intersection point if it's inside the ellipsoid, undefined otherwise
- * @throws {DeveloperError} position is required.
- * @throws {DeveloperError} Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y).
- * @throws {DeveloperError} Ellipsoid.radii.z must be greater than 0.
+ *
+ * @exception {DeveloperError} position is required.
+ * @exception {DeveloperError} Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y).
+ * @exception {DeveloperError} Ellipsoid.radii.z must be greater than 0.
*/
Ellipsoid.prototype.getSurfaceNormalIntersectionWithZAxis = function (
position,
@@ -672,10 +705,12 @@ const scratchEndpoint = new Cartesian3();
/**
* Computes the ellipsoid curvatures at a given position on the surface.
+ *
* @param {Cartesian3} surfacePosition The position on the ellipsoid surface where curvatures will be calculated.
* @param {Cartesian2} [result] The cartesian to which to copy the result, or undefined to create and return a new instance.
* @returns {Cartesian2} The local curvature of the ellipsoid surface at the provided position, in east and north directions.
- * @throws {DeveloperError} position is required.
+ *
+ * @exception {DeveloperError} position is required.
*/
Ellipsoid.prototype.getLocalCurvature = function (surfacePosition, result) {
//>>includeStart('debug', pragmas.debug);
@@ -729,10 +764,12 @@ const weights = [
/**
* Compute the 10th order Gauss-Legendre Quadrature of the given definite integral.
+ *
* @param {number} a The lower bound for the integration.
* @param {number} b The upper bound for the integration.
* @param {Ellipsoid~RealValuedScalarFunction} func The function to integrate.
* @returns {number} The value of the integral of the given function over the given domain.
+ *
* @private
*/
function gaussLegendreQuadrature(a, b, func) {
@@ -761,14 +798,17 @@ function gaussLegendreQuadrature(a, b, func) {
/**
* A real valued scalar function.
* @callback Ellipsoid~RealValuedScalarFunction
+ *
* @param {number} x The value used to evaluate the function.
* @returns {number} The value of the function at x.
+ *
* @private
*/
/**
* Computes an approximation of the surface area of a rectangle on the surface of an ellipsoid using
* Gauss-Legendre 10th order quadrature.
+ *
* @param {Rectangle} rectangle The rectangle used for computing the surface area.
* @returns {number} The approximate area of the rectangle on the surface of this ellipsoid.
*/
diff --git a/packages/engine/Source/Core/EllipsoidGeodesic.js b/packages/engine/Source/Core/EllipsoidGeodesic.js
index 4657522f04a9..6416b8241149 100644
--- a/packages/engine/Source/Core/EllipsoidGeodesic.js
+++ b/packages/engine/Source/Core/EllipsoidGeodesic.js
@@ -274,11 +274,13 @@ function computeProperties(ellipsoidGeodesic, start, end, ellipsoid) {
/**
* Initializes a geodesic on the ellipsoid connecting the two provided planetodetic points.
+ *
* @alias EllipsoidGeodesic
- * @class
+ * @constructor
+ *
* @param {Cartographic} [start] The initial planetodetic point on the path.
* @param {Cartographic} [end] The final planetodetic point on the path.
- * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the geodesic lies.
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the geodesic lies.
*/
function EllipsoidGeodesic(start, end, ellipsoid) {
const e = defaultValue(ellipsoid, Ellipsoid.WGS84);
@@ -385,6 +387,7 @@ Object.defineProperties(EllipsoidGeodesic.prototype, {
/**
* Sets the start and end points of the geodesic
+ *
* @param {Cartographic} start The initial planetodetic point on the path.
* @param {Cartographic} end The final planetodetic point on the path.
*/
@@ -399,6 +402,7 @@ EllipsoidGeodesic.prototype.setEndPoints = function (start, end) {
/**
* Provides the location of a point at the indicated portion along the geodesic.
+ *
* @param {number} fraction The portion of the distance between the initial and final points.
* @param {Cartographic} [result] The object in which to store the result.
* @returns {Cartographic} The location of the point along the geodesic.
@@ -415,10 +419,12 @@ EllipsoidGeodesic.prototype.interpolateUsingFraction = function (
/**
* Provides the location of a point at the indicated distance along the geodesic.
+ *
* @param {number} distance The distance from the inital point to the point of interest along the geodesic
* @param {Cartographic} [result] The object in which to store the result.
* @returns {Cartographic} The location of the point along the geodesic.
- * @throws {DeveloperError} start and end must be set before calling function interpolateUsingSurfaceDistance
+ *
+ * @exception {DeveloperError} start and end must be set before calling function interpolateUsingSurfaceDistance
*/
EllipsoidGeodesic.prototype.interpolateUsingSurfaceDistance = function (
distance,
diff --git a/packages/engine/Source/Core/EllipsoidGeometry.js b/packages/engine/Source/Core/EllipsoidGeometry.js
index 91f36295640d..e6a8409dc78b 100644
--- a/packages/engine/Source/Core/EllipsoidGeometry.js
+++ b/packages/engine/Source/Core/EllipsoidGeometry.js
@@ -27,21 +27,26 @@ const sin = Math.sin;
/**
* A description of an ellipsoid centered at the origin.
+ *
* @alias EllipsoidGeometry
- * @class
+ * @constructor
+ *
* @param {object} [options] Object with the following properties:
- * @param {Cartesian3} [options.radii] The radii of the ellipsoid in the x, y, and z directions.
- * @param {Cartesian3} [options.innerRadii] The inner radii of the ellipsoid in the x, y, and z directions.
- * @param {number} [options.minimumClock] The minimum angle lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
- * @param {number} [options.maximumClock] The maximum angle lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
- * @param {number} [options.minimumCone] The minimum angle measured from the positive z-axis and toward the negative z-axis.
- * @param {number} [options.maximumCone] The maximum angle measured from the positive z-axis and toward the negative z-axis.
- * @param {number} [options.stackPartitions] The number of times to partition the ellipsoid into stacks.
- * @param {number} [options.slicePartitions] The number of times to partition the ellipsoid into radial slices.
+ * @param {Cartesian3} [options.radii=Cartesian3(1.0, 1.0, 1.0)] The radii of the ellipsoid in the x, y, and z directions.
+ * @param {Cartesian3} [options.innerRadii=options.radii] The inner radii of the ellipsoid in the x, y, and z directions.
+ * @param {number} [options.minimumClock=0.0] The minimum angle lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
+ * @param {number} [options.maximumClock=2*PI] The maximum angle lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
+ * @param {number} [options.minimumCone=0.0] The minimum angle measured from the positive z-axis and toward the negative z-axis.
+ * @param {number} [options.maximumCone=PI] The maximum angle measured from the positive z-axis and toward the negative z-axis.
+ * @param {number} [options.stackPartitions=64] The number of times to partition the ellipsoid into stacks.
+ * @param {number} [options.slicePartitions=64] The number of times to partition the ellipsoid into radial slices.
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- * @throws {DeveloperError} options.slicePartitions cannot be less than three.
- * @throws {DeveloperError} options.stackPartitions cannot be less than three.
+ *
+ * @exception {DeveloperError} options.slicePartitions cannot be less than three.
+ * @exception {DeveloperError} options.stackPartitions cannot be less than three.
+ *
* @see EllipsoidGeometry#createGeometry
+ *
* @example
* const ellipsoid = new Cesium.EllipsoidGeometry({
* vertexFormat : Cesium.VertexFormat.POSITION_ONLY,
@@ -97,9 +102,11 @@ EllipsoidGeometry.packedLength =
/**
* Stores the provided instance into the provided array.
+ *
* @param {EllipsoidGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
EllipsoidGeometry.pack = function (value, array, startingIndex) {
@@ -152,8 +159,9 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {EllipsoidGeometry} [result] The object into which to store the result.
* @returns {EllipsoidGeometry} The modified result parameter or a new EllipsoidGeometry instance if one was not provided.
*/
@@ -216,6 +224,7 @@ EllipsoidGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an ellipsoid, including its vertices, indices, and a bounding sphere.
+ *
* @param {EllipsoidGeometry} ellipsoidGeometry A description of the ellipsoid.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
@@ -623,6 +632,7 @@ let unitEllipsoidGeometry;
/**
* Returns the geometric representation of a unit ellipsoid, including its vertices, indices, and a bounding sphere.
* @returns {Geometry} The computed vertices and indices.
+ *
* @private
*/
EllipsoidGeometry.getUnitEllipsoid = function () {
diff --git a/packages/engine/Source/Core/EllipsoidOutlineGeometry.js b/packages/engine/Source/Core/EllipsoidOutlineGeometry.js
index db110af304a1..53b1fd403a97 100644
--- a/packages/engine/Source/Core/EllipsoidOutlineGeometry.js
+++ b/packages/engine/Source/Core/EllipsoidOutlineGeometry.js
@@ -19,21 +19,25 @@ const sin = Math.sin;
/**
* A description of the outline of an ellipsoid centered at the origin.
+ *
* @alias EllipsoidOutlineGeometry
- * @class
+ * @constructor
+ *
* @param {object} [options] Object with the following properties:
- * @param {Cartesian3} [options.radii] The radii of the ellipsoid in the x, y, and z directions.
- * @param {Cartesian3} [options.innerRadii] The inner radii of the ellipsoid in the x, y, and z directions.
- * @param {number} [options.minimumClock] The minimum angle lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
- * @param {number} [options.maximumClock] The maximum angle lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
- * @param {number} [options.minimumCone] The minimum angle measured from the positive z-axis and toward the negative z-axis.
- * @param {number} [options.maximumCone] The maximum angle measured from the positive z-axis and toward the negative z-axis.
- * @param {number} [options.stackPartitions] The count of stacks for the ellipsoid (1 greater than the number of parallel lines).
- * @param {number} [options.slicePartitions] The count of slices for the ellipsoid (Equal to the number of radial lines).
+ * @param {Cartesian3} [options.radii=Cartesian3(1.0, 1.0, 1.0)] The radii of the ellipsoid in the x, y, and z directions.
+ * @param {Cartesian3} [options.innerRadii=options.radii] The inner radii of the ellipsoid in the x, y, and z directions.
+ * @param {number} [options.minimumClock=0.0] The minimum angle lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
+ * @param {number} [options.maximumClock=2*PI] The maximum angle lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
+ * @param {number} [options.minimumCone=0.0] The minimum angle measured from the positive z-axis and toward the negative z-axis.
+ * @param {number} [options.maximumCone=PI] The maximum angle measured from the positive z-axis and toward the negative z-axis.
+ * @param {number} [options.stackPartitions=10] The count of stacks for the ellipsoid (1 greater than the number of parallel lines).
+ * @param {number} [options.slicePartitions=8] The count of slices for the ellipsoid (Equal to the number of radial lines).
* @param {number} [options.subdivisions=128] The number of points per line, determining the granularity of the curvature.
- * @throws {DeveloperError} options.stackPartitions must be greater than or equal to one.
- * @throws {DeveloperError} options.slicePartitions must be greater than or equal to zero.
- * @throws {DeveloperError} options.subdivisions must be greater than or equal to zero.
+ *
+ * @exception {DeveloperError} options.stackPartitions must be greater than or equal to one.
+ * @exception {DeveloperError} options.slicePartitions must be greater than or equal to zero.
+ * @exception {DeveloperError} options.subdivisions must be greater than or equal to zero.
+ *
* @example
* const ellipsoid = new Cesium.EllipsoidOutlineGeometry({
* radii : new Cesium.Cartesian3(1000000.0, 500000.0, 500000.0),
@@ -98,9 +102,11 @@ EllipsoidOutlineGeometry.packedLength = 2 * Cartesian3.packedLength + 8;
/**
* Stores the provided instance into the provided array.
+ *
* @param {EllipsoidOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
EllipsoidOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -150,8 +156,9 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {EllipsoidOutlineGeometry} [result] The object into which to store the result.
* @returns {EllipsoidOutlineGeometry} The modified result parameter or a new EllipsoidOutlineGeometry instance if one was not provided.
*/
@@ -209,6 +216,7 @@ EllipsoidOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an outline of an ellipsoid, including its vertices, indices, and a bounding sphere.
+ *
* @param {EllipsoidOutlineGeometry} ellipsoidGeometry A description of the ellipsoid outline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/EllipsoidRhumbLine.js b/packages/engine/Source/Core/EllipsoidRhumbLine.js
index f533b4eef245..51b410622677 100644
--- a/packages/engine/Source/Core/EllipsoidRhumbLine.js
+++ b/packages/engine/Source/Core/EllipsoidRhumbLine.js
@@ -379,12 +379,15 @@ function interpolateUsingSurfaceDistance(
/**
* Initializes a rhumb line on the ellipsoid connecting the two provided planetodetic points.
+ *
* @alias EllipsoidRhumbLine
- * @class
+ * @constructor
+ *
* @param {Cartographic} [start] The initial planetodetic point on the path.
* @param {Cartographic} [end] The final planetodetic point on the path.
- * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the rhumb line lies.
- * @throws {DeveloperError} angle between start and end must be at least 0.0125 radians.
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rhumb line lies.
+ *
+ * @exception {DeveloperError} angle between start and end must be at least 0.0125 radians.
*/
function EllipsoidRhumbLine(start, end, ellipsoid) {
const e = defaultValue(ellipsoid, Ellipsoid.WGS84);
@@ -474,10 +477,11 @@ Object.defineProperties(EllipsoidRhumbLine.prototype, {
/**
* Create a rhumb line using an initial position with a heading and distance.
+ *
* @param {Cartographic} start The initial planetodetic point on the path.
* @param {number} heading The heading in radians.
* @param {number} distance The rhumb line distance between the start and end point.
- * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the rhumb line lies.
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rhumb line lies.
* @param {EllipsoidRhumbLine} [result] The object in which to store the result.
* @returns {EllipsoidRhumbLine} The EllipsoidRhumbLine object.
*/
@@ -524,6 +528,7 @@ EllipsoidRhumbLine.fromStartHeadingDistance = function (
/**
* Sets the start and end points of the rhumb line.
+ *
* @param {Cartographic} start The initial planetodetic point on the path.
* @param {Cartographic} end The final planetodetic point on the path.
*/
@@ -538,6 +543,7 @@ EllipsoidRhumbLine.prototype.setEndPoints = function (start, end) {
/**
* Provides the location of a point at the indicated portion along the rhumb line.
+ *
* @param {number} fraction The portion of the distance between the initial and final points.
* @param {Cartographic} [result] The object in which to store the result.
* @returns {Cartographic} The location of the point along the rhumb line.
@@ -554,10 +560,12 @@ EllipsoidRhumbLine.prototype.interpolateUsingFraction = function (
/**
* Provides the location of a point at the indicated distance along the rhumb line.
+ *
* @param {number} distance The distance from the inital point to the point of interest along the rhumbLine.
* @param {Cartographic} [result] The object in which to store the result.
* @returns {Cartographic} The location of the point along the rhumb line.
- * @throws {DeveloperError} start and end must be set before calling function interpolateUsingSurfaceDistance
+ *
+ * @exception {DeveloperError} start and end must be set before calling function interpolateUsingSurfaceDistance
*/
EllipsoidRhumbLine.prototype.interpolateUsingSurfaceDistance = function (
distance,
@@ -585,10 +593,12 @@ EllipsoidRhumbLine.prototype.interpolateUsingSurfaceDistance = function (
/**
* Provides the location of a point at the indicated longitude along the rhumb line.
* If the longitude is outside the range of start and end points, the first intersection with the longitude from the start point in the direction of the heading is returned. This follows the spiral property of a rhumb line.
+ *
* @param {number} intersectionLongitude The longitude, in radians, at which to find the intersection point from the starting point using the heading.
* @param {Cartographic} [result] The object in which to store the result.
* @returns {Cartographic} The location of the intersection point along the rhumb line, undefined if there is no intersection or infinite intersections.
- * @throws {DeveloperError} start and end must be set before calling function findIntersectionWithLongitude.
+ *
+ * @exception {DeveloperError} start and end must be set before calling function findIntersectionWithLongitude.
*/
EllipsoidRhumbLine.prototype.findIntersectionWithLongitude = function (
intersectionLongitude,
@@ -687,10 +697,12 @@ EllipsoidRhumbLine.prototype.findIntersectionWithLongitude = function (
/**
* Provides the location of a point at the indicated latitude along the rhumb line.
* If the latitude is outside the range of start and end points, the first intersection with the latitude from that start point in the direction of the heading is returned. This follows the spiral property of a rhumb line.
+ *
* @param {number} intersectionLatitude The latitude, in radians, at which to find the intersection point from the starting point using the heading.
* @param {Cartographic} [result] The object in which to store the result.
* @returns {Cartographic} The location of the intersection point along the rhumb line, undefined if there is no intersection or infinite intersections.
- * @throws {DeveloperError} start and end must be set before calling function findIntersectionWithLongitude.
+ *
+ * @exception {DeveloperError} start and end must be set before calling function findIntersectionWithLongitude.
*/
EllipsoidRhumbLine.prototype.findIntersectionWithLatitude = function (
intersectionLatitude,
diff --git a/packages/engine/Source/Core/EllipsoidTangentPlane.js b/packages/engine/Source/Core/EllipsoidTangentPlane.js
index 83086f28df79..47157fe0f4b5 100644
--- a/packages/engine/Source/Core/EllipsoidTangentPlane.js
+++ b/packages/engine/Source/Core/EllipsoidTangentPlane.js
@@ -19,10 +19,12 @@ const scratchCart4 = new Cartesian4();
* If origin is not on the surface of the ellipsoid, it's surface projection will be used.
* If origin is at the center of the ellipsoid, an exception will be thrown.
* @alias EllipsoidTangentPlane
- * @class
+ * @constructor
+ *
* @param {Cartesian3} origin The point on the surface of the ellipsoid where the tangent plane touches.
- * @param {Ellipsoid} [ellipsoid] The ellipsoid to use.
- * @throws {DeveloperError} origin must not be at the center of the ellipsoid.
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to use.
+ *
+ * @exception {DeveloperError} origin must not be at the center of the ellipsoid.
*/
function EllipsoidTangentPlane(origin, ellipsoid) {
//>>includeStart('debug', pragmas.debug);
@@ -132,8 +134,9 @@ const tmp = new AxisAlignedBoundingBox();
/**
* Creates a new instance from the provided ellipsoid and the center
* point of the provided Cartesians.
+ *
* @param {Cartesian3[]} cartesians The list of positions surrounding the center point.
- * @param {Ellipsoid} [ellipsoid] The ellipsoid to use.
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to use.
* @returns {EllipsoidTangentPlane} The new instance of EllipsoidTangentPlane.
*/
EllipsoidTangentPlane.fromPoints = function (cartesians, ellipsoid) {
@@ -150,6 +153,7 @@ const scratchProjectPointOntoPlaneCartesian3 = new Cartesian3();
/**
* Computes the projection of the provided 3D position onto the 2D plane, radially outward from the {@link EllipsoidTangentPlane.ellipsoid} coordinate system origin.
+ *
* @param {Cartesian3} cartesian The point to project.
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if none was provided. Undefined if there is no intersection point
@@ -202,7 +206,9 @@ EllipsoidTangentPlane.prototype.projectPointOntoPlane = function (
/**
* Computes the projection of the provided 3D positions onto the 2D plane (where possible), radially outward from the global origin.
* The resulting array may be shorter than the input array - if a single projection is impossible it will not be included.
+ *
* @see EllipsoidTangentPlane.projectPointOntoPlane
+ *
* @param {Cartesian3[]} cartesians The array of points to project.
* @param {Cartesian2[]} [result] The array of Cartesian2 instances onto which to store results.
* @returns {Cartesian2[]} The modified result parameter or a new array of Cartesian2 instances if none was provided.
@@ -234,6 +240,7 @@ EllipsoidTangentPlane.prototype.projectPointsOntoPlane = function (
/**
* Computes the projection of the provided 3D position onto the 2D plane, along the plane normal.
+ *
* @param {Cartesian3} cartesian The point to project.
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if none was provided.
@@ -283,7 +290,9 @@ EllipsoidTangentPlane.prototype.projectPointToNearestOnPlane = function (
/**
* Computes the projection of the provided 3D positions onto the 2D plane, along the plane normal.
+ *
* @see EllipsoidTangentPlane.projectPointToNearestOnPlane
+ *
* @param {Cartesian3[]} cartesians The array of points to project.
* @param {Cartesian2[]} [result] The array of Cartesian2 instances onto which to store results.
* @returns {Cartesian2[]} The modified result parameter or a new array of Cartesian2 instances if none was provided. This will have the same length as cartesians
.
@@ -311,6 +320,7 @@ EllipsoidTangentPlane.prototype.projectPointsToNearestOnPlane = function (
const projectPointsOntoEllipsoidScratch = new Cartesian3();
/**
* Computes the projection of the provided 2D position onto the 3D ellipsoid.
+ *
* @param {Cartesian2} cartesian The points to project.
* @param {Cartesian3} [result] The Cartesian3 instance to store result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.
@@ -344,6 +354,7 @@ EllipsoidTangentPlane.prototype.projectPointOntoEllipsoid = function (
/**
* Computes the projection of the provided 2D positions onto the 3D ellipsoid.
+ *
* @param {Cartesian2[]} cartesians The array of points to project.
* @param {Cartesian3[]} [result] The array of Cartesian3 instances onto which to store results.
* @returns {Cartesian3[]} The modified result parameter or a new array of Cartesian3 instances if none was provided.
diff --git a/packages/engine/Source/Core/EllipsoidTerrainProvider.js b/packages/engine/Source/Core/EllipsoidTerrainProvider.js
index 7cbf46d3847c..659918c58221 100644
--- a/packages/engine/Source/Core/EllipsoidTerrainProvider.js
+++ b/packages/engine/Source/Core/EllipsoidTerrainProvider.js
@@ -9,8 +9,10 @@ import TerrainProvider from "./TerrainProvider.js";
/**
* A very simple {@link TerrainProvider} that produces geometry by tessellating an ellipsoidal
* surface.
+ *
* @alias EllipsoidTerrainProvider
- * @class
+ * @constructor
+ *
* @param {object} [options] Object with the following properties:
* @param {TilingScheme} [options.tilingScheme] The tiling scheme specifying how the ellipsoidal
* surface is broken into tiles. If this parameter is not provided, a {@link GeographicTilingScheme}
@@ -18,6 +20,7 @@ import TerrainProvider from "./TerrainProvider.js";
* @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If the tilingScheme is specified,
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
* parameter is specified, the WGS84 ellipsoid is used.
+ *
* @see TerrainProvider
*/
function EllipsoidTerrainProvider(options) {
@@ -124,10 +127,12 @@ Object.defineProperties(EllipsoidTerrainProvider.prototype, {
/**
* Requests the geometry for a given tile. The result includes terrain
* data and indicates that all child tiles are available.
+ *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
* @param {Request} [request] The request object. Intended for internal use only.
+ *
* @returns {Promise|undefined} A promise for the requested geometry. If this method
* returns undefined instead of a promise, it is an indication that too many requests are already
* pending and the request will be retried later.
@@ -151,6 +156,7 @@ EllipsoidTerrainProvider.prototype.requestTileGeometry = function (
/**
* Gets the maximum geometric error allowed in a tile at a given level.
+ *
* @param {number} level The tile level for which to get the maximum geometric error.
* @returns {number} The maximum geometric error.
*/
@@ -162,6 +168,7 @@ EllipsoidTerrainProvider.prototype.getLevelMaximumGeometricError = function (
/**
* Determines whether data for a tile is available to be loaded.
+ *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -177,6 +184,7 @@ EllipsoidTerrainProvider.prototype.getTileDataAvailable = function (
/**
* Makes sure we load availability data for a tile
+ *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
diff --git a/packages/engine/Source/Core/EllipsoidalOccluder.js b/packages/engine/Source/Core/EllipsoidalOccluder.js
index 9bbf825ca778..e94d8bbcbf3d 100644
--- a/packages/engine/Source/Core/EllipsoidalOccluder.js
+++ b/packages/engine/Source/Core/EllipsoidalOccluder.js
@@ -11,17 +11,22 @@ import Rectangle from "./Rectangle.js";
* an {@link Ellipsoid} and a camera position. The ellipsoid is assumed to be located at the
* origin of the coordinate system. This class uses the algorithm described in the
* {@link https://cesium.com/blog/2013/04/25/Horizon-culling/|Horizon Culling} blog post.
+ *
* @alias EllipsoidalOccluder
+ *
* @param {Ellipsoid} ellipsoid The ellipsoid to use as an occluder.
* @param {Cartesian3} [cameraPosition] The coordinate of the viewer/camera. If this parameter is not
* specified, {@link EllipsoidalOccluder#cameraPosition} must be called before
* testing visibility.
- * @class
+ *
+ * @constructor
+ *
* @example
* // Construct an ellipsoidal occluder with radii 1.0, 1.1, and 0.9.
* const cameraPosition = new Cesium.Cartesian3(5.0, 6.0, 7.0);
* const occluderEllipsoid = new Cesium.Ellipsoid(1.0, 1.1, 0.9);
* const occluder = new Cesium.EllipsoidalOccluder(occluderEllipsoid, cameraPosition);
+ *
* @private
*/
function EllipsoidalOccluder(ellipsoid, cameraPosition) {
@@ -80,8 +85,10 @@ const scratchCartesian = new Cartesian3();
/**
* Determines whether or not a point, the occludee
, is hidden from view by the occluder.
+ *
* @param {Cartesian3} occludee The point to test for visibility.
* @returns {boolean} true
if the occludee is visible; otherwise false
.
+ *
* @example
* const cameraPosition = new Cesium.Cartesian3(0, 0, 2.5);
* const ellipsoid = new Cesium.Ellipsoid(1.0, 1.1, 0.9);
@@ -106,8 +113,10 @@ EllipsoidalOccluder.prototype.isPointVisible = function (occludee) {
* Determines whether or not a point expressed in the ellipsoid scaled space, is hidden from view by the
* occluder. To transform a Cartesian X, Y, Z position in the coordinate system aligned with the ellipsoid
* into the scaled space, call {@link Ellipsoid#transformPositionToScaledSpace}.
+ *
* @param {Cartesian3} occludeeScaledSpacePosition The point to test for visibility, represented in the scaled space.
* @returns {boolean} true
if the occludee is visible; otherwise false
.
+ *
* @example
* const cameraPosition = new Cesium.Cartesian3(0, 0, 2.5);
* const ellipsoid = new Cesium.Ellipsoid(1.0, 1.1, 0.9);
@@ -134,8 +143,8 @@ const scratchCameraPositionInScaledSpaceShrunk = new Cartesian3();
* the ellipsoid. This is intended to be used with points generated by
* {@link EllipsoidalOccluder#computeHorizonCullingPointPossiblyUnderEllipsoid} or
* {@link EllipsoidalOccluder#computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid}.
+ *
* @param {Cartesian3} occludeeScaledSpacePosition The point to test for visibility, represented in the scaled space of the possibly-shrunk ellipsoid.
- * @param minimumHeight
* @returns {boolean} true
if the occludee is visible; otherwise false
.
*/
EllipsoidalOccluder.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid = function (
@@ -174,6 +183,7 @@ EllipsoidalOccluder.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid =
* the horizon, all of the positions are guaranteed to be below the horizon as well. The returned point
* is expressed in the ellipsoid-scaled space and is suitable for use with
* {@link EllipsoidalOccluder#isScaledSpacePointVisible}.
+ *
* @param {Cartesian3} directionToPoint The direction that the computed point will lie along.
* A reasonable direction to use is the direction from the center of the ellipsoid to
* the center of the bounding sphere computed from the positions. The direction need not
@@ -204,6 +214,7 @@ const scratchEllipsoidShrunk = Ellipsoid.clone(Ellipsoid.UNIT_SPHERE);
* point relative to an ellipsoid that has been shrunk by the minimum height when the minimum height is below
* the ellipsoid. The returned point is expressed in the possibly-shrunk ellipsoid-scaled space and is suitable
* for use with {@link EllipsoidalOccluder#isScaledSpacePointVisiblePossiblyUnderEllipsoid}.
+ *
* @param {Cartesian3} directionToPoint The direction that the computed point will lie along.
* A reasonable direction to use is the direction from the center of the ellipsoid to
* the center of the bounding sphere computed from the positions. The direction need not
@@ -238,6 +249,7 @@ EllipsoidalOccluder.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid =
* the horizon, all of the positions are guaranteed to be below the horizon as well. The returned point
* is expressed in the ellipsoid-scaled space and is suitable for use with
* {@link EllipsoidalOccluder#isScaledSpacePointVisible}.
+ *
* @param {Cartesian3} directionToPoint The direction that the computed point will lie along.
* A reasonable direction to use is the direction from the center of the ellipsoid to
* the center of the bounding sphere computed from the positions. The direction need not
@@ -245,8 +257,8 @@ EllipsoidalOccluder.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid =
* @param {number[]} vertices The vertices from which to compute the horizon culling point. The positions
* must be expressed in a reference frame centered at the ellipsoid and aligned with the
* ellipsoid's axes.
- * @param {number} [stride]
- * @param {Cartesian3} [center]
+ * @param {number} [stride=3]
+ * @param {Cartesian3} [center=Cartesian3.ZERO]
* @param {Cartesian3} [result] The instance on which to store the result instead of allocating a new instance.
* @returns {Cartesian3} The computed horizon culling point, expressed in the ellipsoid-scaled space.
*/
@@ -272,6 +284,7 @@ EllipsoidalOccluder.prototype.computeHorizonCullingPointFromVertices = function
* point relative to an ellipsoid that has been shrunk by the minimum height when the minimum height is below
* the ellipsoid. The returned point is expressed in the possibly-shrunk ellipsoid-scaled space and is suitable
* for use with {@link EllipsoidalOccluder#isScaledSpacePointVisiblePossiblyUnderEllipsoid}.
+ *
* @param {Cartesian3} directionToPoint The direction that the computed point will lie along.
* A reasonable direction to use is the direction from the center of the ellipsoid to
* the center of the bounding sphere computed from the positions. The direction need not
@@ -279,8 +292,8 @@ EllipsoidalOccluder.prototype.computeHorizonCullingPointFromVertices = function
* @param {number[]} vertices The vertices from which to compute the horizon culling point. The positions
* must be expressed in a reference frame centered at the ellipsoid and aligned with the
* ellipsoid's axes.
- * @param {number} [stride]
- * @param {Cartesian3} [center]
+ * @param {number} [stride=3]
+ * @param {Cartesian3} [center=Cartesian3.ZERO]
* @param {number} [minimumHeight] The minimum height of all vertices. If this value is undefined, all vertices are assumed to be above the ellipsoid.
* @param {Cartesian3} [result] The instance on which to store the result instead of allocating a new instance.
* @returns {Cartesian3} The computed horizon culling point, expressed in the possibly-shrunk ellipsoid-scaled space.
@@ -315,6 +328,7 @@ const subsampleScratch = [];
* the horizon, the ellipsoid-conforming rectangle is guaranteed to be below the horizon as well.
* The returned point is expressed in the ellipsoid-scaled space and is suitable for use with
* {@link EllipsoidalOccluder#isScaledSpacePointVisible}.
+ *
* @param {Rectangle} rectangle The rectangle for which to compute the horizon culling point.
* @param {Ellipsoid} ellipsoid The ellipsoid on which the rectangle is defined. This may be different from
* the ellipsoid used by this instance for occlusion testing.
diff --git a/packages/engine/Source/Core/EncodedCartesian3.js b/packages/engine/Source/Core/EncodedCartesian3.js
index b623102ee6ec..b6df42a5ffd4 100644
--- a/packages/engine/Source/Core/EncodedCartesian3.js
+++ b/packages/engine/Source/Core/EncodedCartesian3.js
@@ -9,13 +9,16 @@ import defined from "./defined.js";
* This is used to encode positions in vertex buffers for rendering without jittering artifacts
* as described in {@link http://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.
*
+ *
* @alias EncodedCartesian3
- * @class
+ * @constructor
+ *
* @private
*/
function EncodedCartesian3() {
/**
* The high bits for each component. Bits 0 to 22 store the whole value. Bits 23 to 31 are not used.
+ *
* @type {Cartesian3}
* @default {@link Cartesian3.ZERO}
*/
@@ -23,6 +26,7 @@ function EncodedCartesian3() {
/**
* The low bits for each component. Bits 7 to 22 store the whole value, and bits 0 to 6 store the fraction. Bits 23 to 31 are not used.
+ *
* @type {Cartesian3}
* @default {@link Cartesian3.ZERO}
*/
@@ -36,9 +40,11 @@ function EncodedCartesian3() {
*
* The fixed-point encoding follows {@link http://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.
*
+ *
* @param {number} value The floating-point value to encode.
* @param {object} [result] The object onto which to store the result.
* @returns {object} The modified result parameter or a new instance if one was not provided.
+ *
* @example
* const value = 1234567.1234567;
* const splitValue = Cesium.EncodedCartesian3.encode(value);
@@ -80,9 +86,11 @@ const scratchEncode = {
*
* The fixed-point encoding follows {@link https://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.
*
+ *
* @param {Cartesian3} cartesian The cartesian to encode.
* @param {EncodedCartesian3} [result] The object onto which to store the result.
* @returns {EncodedCartesian3} The modified result parameter or a new EncodedCartesian3 instance if one was not provided.
+ *
* @example
* const cart = new Cesium.Cartesian3(-10000000.0, 0.0, 10000000.0);
* const encoded = Cesium.EncodedCartesian3.fromCartesian(cart);
@@ -122,10 +130,13 @@ const encodedP = new EncodedCartesian3();
*
* This is used to create interleaved high-precision position vertex attributes.
*
+ *
* @param {Cartesian3} cartesian The cartesian to encode.
* @param {number[]} cartesianArray The array to write to.
* @param {number} index The index into the array to start writing. Six elements will be written.
- * @throws {DeveloperError} index must be a number greater than or equal to 0.
+ *
+ * @exception {DeveloperError} index must be a number greater than or equal to 0.
+ *
* @example
* const positions = [
* new Cesium.Cartesian3(),
diff --git a/packages/engine/Source/Core/Event.js b/packages/engine/Source/Core/Event.js
index 307ffdd84efd..cf53ef966052 100644
--- a/packages/engine/Source/Core/Event.js
+++ b/packages/engine/Source/Core/Event.js
@@ -5,9 +5,10 @@ import defined from "./defined.js";
* A generic utility class for managing subscribers for a particular event.
* This class is usually instantiated inside of a container class and
* exposed as a property for others to subscribe to.
+ *
* @alias Event
* @template Listener extends (...args: any[]) => void = (...args: any[]) => void
- * @class
+ * @constructor
* @example
* MyObject.prototype.myListener = function(arg1, arg2) {
* this.myArg1Copy = arg1;
@@ -45,10 +46,12 @@ Object.defineProperties(Event.prototype, {
* Registers a callback function to be executed whenever the event is raised.
* An optional scope can be provided to serve as the this
pointer
* in which the function will execute.
+ *
* @param {Listener} listener The function to be executed when the event is raised.
* @param {object} [scope] An optional object scope to serve as the this
* pointer in which the listener function will execute.
* @returns {Event.RemoveCallback} A function that will remove this event listener when invoked.
+ *
* @see Event#raiseEvent
* @see Event#removeEventListener
*/
@@ -68,9 +71,11 @@ Event.prototype.addEventListener = function (listener, scope) {
/**
* Unregisters a previously registered callback.
+ *
* @param {Listener} listener The function to be unregistered.
* @param {object} [scope] The scope that was originally passed to addEventListener.
* @returns {boolean} true
if the listener was removed; false
if the listener and scope are not registered with the event.
+ *
* @see Event#addEventListener
* @see Event#raiseEvent
*/
@@ -114,7 +119,9 @@ function compareNumber(a, b) {
/**
* Raises the event by calling each registered listener with all supplied arguments.
+ *
* @param {...Parameters} arguments This method takes any number of parameters and passes them through to the listener functions.
+ *
* @see Event#addEventListener
* @see Event#removeEventListener
*/
diff --git a/packages/engine/Source/Core/EventHelper.js b/packages/engine/Source/Core/EventHelper.js
index 4065ebcfc17a..e9a024c64597 100644
--- a/packages/engine/Source/Core/EventHelper.js
+++ b/packages/engine/Source/Core/EventHelper.js
@@ -5,8 +5,11 @@ import DeveloperError from "./DeveloperError.js";
* A convenience object that simplifies the common pattern of attaching event listeners
* to several events, then removing all those listeners at once later, for example, in
* a destroy method.
+ *
* @alias EventHelper
- * @class
+ * @constructor
+ *
+ *
* @example
* const helper = new Cesium.EventHelper();
*
@@ -15,6 +18,7 @@ import DeveloperError from "./DeveloperError.js";
*
* // later...
* helper.removeAll();
+ *
* @see Event
*/
function EventHelper() {
@@ -23,11 +27,13 @@ function EventHelper() {
/**
* Adds a listener to an event, and records the registration to be cleaned up later.
+ *
* @param {Event} event The event to attach to.
* @param {Function} listener The function to be executed when the event is raised.
* @param {object} [scope] An optional object scope to serve as the this
* pointer in which the listener function will execute.
* @returns {EventHelper.RemoveCallback} A function that will remove this event listener when invoked.
+ *
* @see Event#addEventListener
*/
EventHelper.prototype.add = function (event, listener, scope) {
@@ -50,6 +56,7 @@ EventHelper.prototype.add = function (event, listener, scope) {
/**
* Unregisters all previously added listeners.
+ *
* @see Event#removeEventListener
*/
EventHelper.prototype.removeAll = function () {
diff --git a/packages/engine/Source/Core/ExtrapolationType.js b/packages/engine/Source/Core/ExtrapolationType.js
index cf47de17cac1..a62b453818a4 100644
--- a/packages/engine/Source/Core/ExtrapolationType.js
+++ b/packages/engine/Source/Core/ExtrapolationType.js
@@ -1,12 +1,15 @@
/**
* Constants to determine how an interpolated value is extrapolated
* when querying outside the bounds of available data.
+ *
* @enum {number}
+ *
* @see SampledProperty
*/
const ExtrapolationType = {
/**
* No extrapolation occurs.
+ *
* @type {number}
* @constant
*/
@@ -14,6 +17,7 @@ const ExtrapolationType = {
/**
* The first or last value is used when outside the range of sample data.
+ *
* @type {number}
* @constant
*/
@@ -21,6 +25,7 @@ const ExtrapolationType = {
/**
* The value is extrapolated.
+ *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/FeatureDetection.js b/packages/engine/Source/Core/FeatureDetection.js
index 53adf83059d1..795f79e34e4b 100644
--- a/packages/engine/Source/Core/FeatureDetection.js
+++ b/packages/engine/Source/Core/FeatureDetection.js
@@ -296,6 +296,7 @@ if (typeof ArrayBuffer !== "undefined") {
/**
* A set of functions to detect whether the current browser supports
* various features.
+ *
* @namespace FeatureDetection
*/
const FeatureDetection = {
@@ -323,6 +324,7 @@ const FeatureDetection = {
/**
* Detects whether the current browser supports Basis Universal textures and the web assembly modules needed to transcode them.
+ *
* @param {Scene} scene
* @returns {boolean} true if the browser supports web assembly modules and the scene supports Basis Universal textures, false if not.
*/
@@ -332,7 +334,9 @@ FeatureDetection.supportsBasis = function (scene) {
/**
* Detects whether the current browser supports the full screen standard.
+ *
* @returns {boolean} true if the browser supports the full screen standard, false if not.
+ *
* @see Fullscreen
* @see {@link http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html|W3C Fullscreen Living Specification}
*/
@@ -342,7 +346,9 @@ FeatureDetection.supportsFullscreen = function () {
/**
* Detects whether the current browser supports typed arrays.
+ *
* @returns {boolean} true if the browser supports typed arrays, false if not.
+ *
* @see {@link https://tc39.es/ecma262/#sec-typedarray-objects|Typed Array Specification}
*/
FeatureDetection.supportsTypedArrays = function () {
@@ -351,7 +357,9 @@ FeatureDetection.supportsTypedArrays = function () {
/**
* Detects whether the current browser supports BigInt64Array typed arrays.
+ *
* @returns {boolean} true if the browser supports BigInt64Array typed arrays, false if not.
+ *
* @see {@link https://tc39.es/ecma262/#sec-typedarray-objects|Typed Array Specification}
*/
FeatureDetection.supportsBigInt64Array = function () {
@@ -360,7 +368,9 @@ FeatureDetection.supportsBigInt64Array = function () {
/**
* Detects whether the current browser supports BigUint64Array typed arrays.
+ *
* @returns {boolean} true if the browser supports BigUint64Array typed arrays, false if not.
+ *
* @see {@link https://tc39.es/ecma262/#sec-typedarray-objects|Typed Array Specification}
*/
FeatureDetection.supportsBigUint64Array = function () {
@@ -369,7 +379,9 @@ FeatureDetection.supportsBigUint64Array = function () {
/**
* Detects whether the current browser supports BigInt.
+ *
* @returns {boolean} true if the browser supports BigInt, false if not.
+ *
* @see {@link https://tc39.es/ecma262/#sec-bigint-objects|BigInt Specification}
*/
FeatureDetection.supportsBigInt = function () {
@@ -378,7 +390,9 @@ FeatureDetection.supportsBigInt = function () {
/**
* Detects whether the current browser supports Web Workers.
+ *
* @returns {boolean} true if the browsers supports Web Workers, false if not.
+ *
* @see {@link http://www.w3.org/TR/workers/}
*/
FeatureDetection.supportsWebWorkers = function () {
@@ -387,7 +401,9 @@ FeatureDetection.supportsWebWorkers = function () {
/**
* Detects whether the current browser supports Web Assembly.
+ *
* @returns {boolean} true if the browsers supports Web Assembly, false if not.
+ *
* @see {@link https://developer.mozilla.org/en-US/docs/WebAssembly}
*/
FeatureDetection.supportsWebAssembly = function () {
@@ -396,8 +412,10 @@ FeatureDetection.supportsWebAssembly = function () {
/**
* Detects whether the current browser supports a WebGL2 rendering context for the specified scene.
+ *
* @param {Scene} scene the Cesium scene specifying the rendering context
* @returns {boolean} true if the browser supports a WebGL2 rendering context, false if not.
+ *
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext|WebGL2RenderingContext}
*/
FeatureDetection.supportsWebgl2 = function (scene) {
diff --git a/packages/engine/Source/Core/FrustumGeometry.js b/packages/engine/Source/Core/FrustumGeometry.js
index 2fd553f49804..46fcb8cfb785 100644
--- a/packages/engine/Source/Core/FrustumGeometry.js
+++ b/packages/engine/Source/Core/FrustumGeometry.js
@@ -21,13 +21,15 @@ const ORTHOGRAPHIC = 1;
/**
* Describes a frustum at the given the origin and orientation.
+ *
* @alias FrustumGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {PerspectiveFrustum|OrthographicFrustum} options.frustum The frustum.
* @param {Cartesian3} options.origin The origin of the frustum.
* @param {Quaternion} options.orientation The orientation of the frustum.
- * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
+ * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
*/
function FrustumGeometry(options) {
//>>includeStart('debug', pragmas.debug);
@@ -79,9 +81,11 @@ function FrustumGeometry(options) {
/**
* Stores the provided instance into the provided array.
+ *
* @param {FrustumGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
FrustumGeometry.pack = function (value, array, startingIndex) {
@@ -124,8 +128,9 @@ const scratchVertexFormat = new VertexFormat();
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {FrustumGeometry} [result] The object into which to store the result.
*/
FrustumGeometry.unpack = function (array, startingIndex, result) {
@@ -372,6 +377,7 @@ FrustumGeometry._computeNearFarPlanes = function (
/**
* Computes the geometric representation of a frustum, including its vertices, indices, and a bounding sphere.
+ *
* @param {FrustumGeometry} frustumGeometry A description of the frustum.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/FrustumOutlineGeometry.js b/packages/engine/Source/Core/FrustumOutlineGeometry.js
index 2bfa020fa3d5..e49aea1bd141 100644
--- a/packages/engine/Source/Core/FrustumOutlineGeometry.js
+++ b/packages/engine/Source/Core/FrustumOutlineGeometry.js
@@ -18,8 +18,10 @@ const ORTHOGRAPHIC = 1;
/**
* A description of the outline of a frustum with the given the origin and orientation.
+ *
* @alias FrustumOutlineGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {PerspectiveFrustum|OrthographicFrustum} options.frustum The frustum.
* @param {Cartesian3} options.origin The origin of the frustum.
@@ -69,9 +71,11 @@ function FrustumOutlineGeometry(options) {
/**
* Stores the provided instance into the provided array.
+ *
* @param {FrustumOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
FrustumOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -111,8 +115,9 @@ const scratchPackorigin = new Cartesian3();
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {FrustumOutlineGeometry} [result] The object into which to store the result.
*/
FrustumOutlineGeometry.unpack = function (array, startingIndex, result) {
@@ -174,6 +179,7 @@ FrustumOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of a frustum outline, including its vertices, indices, and a bounding sphere.
+ *
* @param {FrustumOutlineGeometry} frustumGeometry A description of the frustum.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/Fullscreen.js b/packages/engine/Source/Core/Fullscreen.js
index c94a16eb7a8f..3b18de25a213 100644
--- a/packages/engine/Source/Core/Fullscreen.js
+++ b/packages/engine/Source/Core/Fullscreen.js
@@ -12,7 +12,9 @@ const _names = {
/**
* Browser-independent functions for working with the standard fullscreen API.
+ *
* @namespace Fullscreen
+ *
* @see {@link http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html|W3C Fullscreen Living Specification}
*/
const Fullscreen = {};
@@ -108,6 +110,7 @@ Object.defineProperties(Fullscreen, {
/**
* Detects whether the browser supports the standard fullscreen API.
+ *
* @returns {boolean} true
if the browser supports the standard fullscreen API,
* false
otherwise.
*/
@@ -210,8 +213,10 @@ Fullscreen.supportsFullscreen = function () {
/**
* Asynchronously requests the browser to enter fullscreen mode on the given element.
* If fullscreen mode is not supported by the browser, does nothing.
+ *
* @param {object} element The HTML element which will be placed into fullscreen mode.
* @param {object} [vrDevice] The HMDVRDevice device.
+ *
* @example
* // Put the entire page into fullscreen.
* Cesium.Fullscreen.requestFullscreen(document.body)
diff --git a/packages/engine/Source/Core/GeocodeType.js b/packages/engine/Source/Core/GeocodeType.js
index b27bf22cb149..3348b6d5ffbf 100644
--- a/packages/engine/Source/Core/GeocodeType.js
+++ b/packages/engine/Source/Core/GeocodeType.js
@@ -6,6 +6,7 @@
const GeocodeType = {
/**
* Perform a search where the input is considered complete.
+ *
* @type {number}
* @constant
*/
@@ -14,6 +15,7 @@ const GeocodeType = {
/**
* Perform an auto-complete using partial input, typically
* reserved for providing possible results as a user is typing.
+ *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/GeocoderService.js b/packages/engine/Source/Core/GeocoderService.js
index a5b93a6599c3..5c02ec2bdff8 100644
--- a/packages/engine/Source/Core/GeocoderService.js
+++ b/packages/engine/Source/Core/GeocoderService.js
@@ -13,7 +13,8 @@ import DeveloperError from "./DeveloperError.js";
* Provides geocoding through an external service. This type describes an interface and
* is not intended to be used.
* @alias GeocoderService
- * @class
+ * @constructor
+ *
* @see BingMapsGeocoderService
* @see PeliasGeocoderService
* @see OpenCageGeocoderService
@@ -50,6 +51,7 @@ GeocoderService.getCreditsFromResult = function (geocoderResult) {
/**
* @function
+ *
* @param {string} query The query to be sent to the geocoder service
* @param {GeocodeType} [type=GeocodeType.SEARCH] The type of geocode to perform.
* @returns {Promise}
diff --git a/packages/engine/Source/Core/GeographicProjection.js b/packages/engine/Source/Core/GeographicProjection.js
index ec274e1254f3..f6ac972c6272 100644
--- a/packages/engine/Source/Core/GeographicProjection.js
+++ b/packages/engine/Source/Core/GeographicProjection.js
@@ -10,9 +10,12 @@ import Ellipsoid from "./Ellipsoid.js";
* them by the {@link Ellipsoid#maximumRadius}. This projection
* is commonly known as geographic, equirectangular, equidistant cylindrical, or plate carrée. It
* is also known as EPSG:4326.
+ *
* @alias GeographicProjection
- * @class
- * @param {Ellipsoid} [ellipsoid] The ellipsoid.
+ * @constructor
+ *
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid.
+ *
* @see WebMercatorProjection
*/
function GeographicProjection(ellipsoid) {
@@ -24,7 +27,9 @@ function GeographicProjection(ellipsoid) {
Object.defineProperties(GeographicProjection.prototype, {
/**
* Gets the {@link Ellipsoid}.
+ *
* @memberof GeographicProjection.prototype
+ *
* @type {Ellipsoid}
* @readonly
*/
@@ -39,6 +44,7 @@ Object.defineProperties(GeographicProjection.prototype, {
* Projects a set of {@link Cartographic} coordinates, in radians, to map coordinates, in meters.
* X and Y are the longitude and latitude, respectively, multiplied by the maximum radius of the
* ellipsoid. Z is the unmodified height.
+ *
* @param {Cartographic} cartographic The coordinates to project.
* @param {Cartesian3} [result] An instance into which to copy the result. If this parameter is
* undefined, a new instance is created and returned.
@@ -67,6 +73,7 @@ GeographicProjection.prototype.project = function (cartographic, result) {
* Unprojects a set of projected {@link Cartesian3} coordinates, in meters, to {@link Cartographic}
* coordinates, in radians. Longitude and Latitude are the X and Y coordinates, respectively,
* divided by the maximum radius of the ellipsoid. Height is the unmodified Z coordinate.
+ *
* @param {Cartesian3} cartesian The Cartesian position to unproject with height (z) in meters.
* @param {Cartographic} [result] An instance into which to copy the result. If this parameter is
* undefined, a new instance is created and returned.
diff --git a/packages/engine/Source/Core/GeographicTilingScheme.js b/packages/engine/Source/Core/GeographicTilingScheme.js
index cea6b8af90d7..0b2ce78a3576 100644
--- a/packages/engine/Source/Core/GeographicTilingScheme.js
+++ b/packages/engine/Source/Core/GeographicTilingScheme.js
@@ -11,15 +11,17 @@ import Rectangle from "./Rectangle.js";
* A tiling scheme for geometry referenced to a simple {@link GeographicProjection} where
* longitude and latitude are directly mapped to X and Y. This projection is commonly
* known as geographic, equirectangular, equidistant cylindrical, or plate carrée.
+ *
* @alias GeographicTilingScheme
- * @class
+ * @constructor
+ *
* @param {object} [options] Object with the following properties:
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid whose surface is being tiled. Defaults to
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid whose surface is being tiled. Defaults to
* the WGS84 ellipsoid.
- * @param {Rectangle} [options.rectangle] The rectangle, in radians, covered by the tiling scheme.
- * @param {number} [options.numberOfLevelZeroTilesX] The number of tiles in the X direction at level zero of
+ * @param {Rectangle} [options.rectangle=Rectangle.MAX_VALUE] The rectangle, in radians, covered by the tiling scheme.
+ * @param {number} [options.numberOfLevelZeroTilesX=2] The number of tiles in the X direction at level zero of
* the tile tree.
- * @param {number} [options.numberOfLevelZeroTilesY] The number of tiles in the Y direction at level zero of
+ * @param {number} [options.numberOfLevelZeroTilesY=1] The number of tiles in the Y direction at level zero of
* the tile tree.
*/
function GeographicTilingScheme(options) {
@@ -75,6 +77,7 @@ Object.defineProperties(GeographicTilingScheme.prototype, {
/**
* Gets the total number of tiles in the X direction at a specified level-of-detail.
+ *
* @param {number} level The level-of-detail.
* @returns {number} The number of tiles in the X direction at the given level.
*/
@@ -84,6 +87,7 @@ GeographicTilingScheme.prototype.getNumberOfXTilesAtLevel = function (level) {
/**
* Gets the total number of tiles in the Y direction at a specified level-of-detail.
+ *
* @param {number} level The level-of-detail.
* @returns {number} The number of tiles in the Y direction at the given level.
*/
@@ -94,6 +98,7 @@ GeographicTilingScheme.prototype.getNumberOfYTilesAtLevel = function (level) {
/**
* Transforms a rectangle specified in geodetic radians to the native coordinate system
* of this tiling scheme.
+ *
* @param {Rectangle} rectangle The rectangle to transform.
* @param {Rectangle} [result] The instance to which to copy the result, or undefined if a new instance
* should be created.
@@ -127,6 +132,7 @@ GeographicTilingScheme.prototype.rectangleToNativeRectangle = function (
/**
* Converts tile x, y coordinates and level to a rectangle expressed in the native coordinates
* of the tiling scheme.
+ *
* @param {number} x The integer x coordinate of the tile.
* @param {number} y The integer y coordinate of the tile.
* @param {number} level The tile level-of-detail. Zero is the least detailed.
@@ -151,6 +157,7 @@ GeographicTilingScheme.prototype.tileXYToNativeRectangle = function (
/**
* Converts tile x, y coordinates and level to a cartographic rectangle in radians.
+ *
* @param {number} x The integer x coordinate of the tile.
* @param {number} y The integer y coordinate of the tile.
* @param {number} level The tile level-of-detail. Zero is the least detailed.
@@ -192,6 +199,7 @@ GeographicTilingScheme.prototype.tileXYToRectangle = function (
/**
* Calculates the tile x, y coordinates of the tile containing
* a given cartographic position.
+ *
* @param {Cartographic} position The position.
* @param {number} level The tile level-of-detail. Zero is the least detailed.
* @param {Cartesian2} [result] The instance to which to copy the result, or undefined if a new instance
diff --git a/packages/engine/Source/Core/Geometry.js b/packages/engine/Source/Core/Geometry.js
index 65f01a60c2a1..d9e6873a919a 100644
--- a/packages/engine/Source/Core/Geometry.js
+++ b/packages/engine/Source/Core/Geometry.js
@@ -22,13 +22,16 @@ import Transforms from "./Transforms.js";
*
* Geometries can be transformed and optimized using functions in {@link GeometryPipeline}.
*
+ *
* @alias Geometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {GeometryAttributes} options.attributes Attributes, which make up the geometry's vertices.
- * @param {PrimitiveType} [options.primitiveType] The type of primitives in the geometry.
+ * @param {PrimitiveType} [options.primitiveType=PrimitiveType.TRIANGLES] The type of primitives in the geometry.
* @param {Uint16Array|Uint32Array} [options.indices] Optional index data that determines the primitives in the geometry.
* @param {BoundingSphere} [options.boundingSphere] An optional bounding sphere that fully enclosed the geometry.
+ *
* @see PolygonGeometry
* @see RectangleGeometry
* @see EllipseGeometry
@@ -37,7 +40,9 @@ import Transforms from "./Transforms.js";
* @see SimplePolylineGeometry
* @see BoxGeometry
* @see EllipsoidGeometry
+ *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Geometry%20and%20Appearances.html|Geometry and Appearances Demo}
+ *
* @example
* // Create geometry with a position attribute and indexed lines.
* const positions = new Float64Array([
@@ -76,11 +81,11 @@ function Geometry(options) {
* There are reserved attribute names with well-known semantics. The following attributes
* are created by a Geometry (depending on the provided {@link VertexFormat}.
*
- * position
- 3D vertex position. 64-bit floating-point (for precision). 3 components per attribute. See {@link VertexFormat#position}.
- * normal
- Normal (normalized), commonly used for lighting. 32-bit floating-point. 3 components per attribute. See {@link VertexFormat#normal}.
- * st
- 2D texture coordinate. 32-bit floating-point. 2 components per attribute. See {@link VertexFormat#st}.
- * bitangent
- Bitangent (normalized), used for tangent-space effects like bump mapping. 32-bit floating-point. 3 components per attribute. See {@link VertexFormat#bitangent}.
- * tangent
- Tangent (normalized), used for tangent-space effects like bump mapping. 32-bit floating-point. 3 components per attribute. See {@link VertexFormat#tangent}.
+ * position
- 3D vertex position. 64-bit floating-point (for precision). 3 components per attribute. See {@link VertexFormat#position}.
+ * normal
- Normal (normalized), commonly used for lighting. 32-bit floating-point. 3 components per attribute. See {@link VertexFormat#normal}.
+ * st
- 2D texture coordinate. 32-bit floating-point. 2 components per attribute. See {@link VertexFormat#st}.
+ * bitangent
- Bitangent (normalized), used for tangent-space effects like bump mapping. 32-bit floating-point. 3 components per attribute. See {@link VertexFormat#bitangent}.
+ * tangent
- Tangent (normalized), used for tangent-space effects like bump mapping. 32-bit floating-point. 3 components per attribute. See {@link VertexFormat#tangent}.
*
*
*
@@ -88,22 +93,27 @@ function Geometry(options) {
* to a Geometry by a {@link Primitive} or {@link GeometryPipeline} functions to prepare
* the geometry for rendering.
*
- * position3DHigh
- High 32 bits for encoded 64-bit position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
- * position3DLow
- Low 32 bits for encoded 64-bit position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
- * position2DHigh
- High 32 bits for encoded 64-bit 2D (Columbus view) position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
- * position2DLow
- Low 32 bits for encoded 64-bit 2D (Columbus view) position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
- * color
- RGBA color (normalized) usually from {@link GeometryInstance#color}. 32-bit floating-point. 4 components per attribute.
- * pickColor
- RGBA color used for picking. 32-bit floating-point. 4 components per attribute.
+ * position3DHigh
- High 32 bits for encoded 64-bit position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
+ * position3DLow
- Low 32 bits for encoded 64-bit position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
+ * position2DHigh
- High 32 bits for encoded 64-bit 2D (Columbus view) position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
+ * position2DLow
- Low 32 bits for encoded 64-bit 2D (Columbus view) position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
+ * color
- RGBA color (normalized) usually from {@link GeometryInstance#color}. 32-bit floating-point. 4 components per attribute.
+ * pickColor
- RGBA color used for picking. 32-bit floating-point. 4 components per attribute.
*
*
+ *
* @type GeometryAttributes
+ *
* @default undefined
+ *
+ *
* @example
* geometry.attributes.position = new Cesium.GeometryAttribute({
* componentDatatype : Cesium.ComponentDatatype.FLOAT,
* componentsPerAttribute : 3,
* values : new Float32Array(0)
* });
+ *
* @see GeometryAttribute
* @see VertexFormat
*/
@@ -112,7 +122,9 @@ function Geometry(options) {
/**
* Optional index data that - along with {@link Geometry#primitiveType} -
* determines the primitives in the geometry.
+ *
* @type {Array}
+ *
* @default undefined
*/
this.indices = options.indices;
@@ -120,7 +132,9 @@ function Geometry(options) {
/**
* The type of primitives in the geometry. This is most often {@link PrimitiveType.TRIANGLES},
* but can varying based on the specific geometry.
+ *
* @type PrimitiveType
+ *
* @default undefined
*/
this.primitiveType = defaultValue(
@@ -131,7 +145,9 @@ function Geometry(options) {
/**
* An optional bounding sphere that fully encloses the geometry. This is
* commonly used for culling.
+ *
* @type BoundingSphere
+ *
* @default undefined
*/
this.boundingSphere = options.boundingSphere;
@@ -156,8 +172,10 @@ function Geometry(options) {
/**
* Computes the number of vertices in a geometry. The runtime is linear with
* respect to the number of attributes in a vertex, not the number of vertices.
+ *
* @param {Geometry} geometry The geometry.
* @returns {number} The number of vertices in the geometry.
+ *
* @example
* const numVertices = Cesium.Geometry.computeNumberOfVertices(geometry);
*/
@@ -224,6 +242,7 @@ const rotation2DScratch = new Matrix2();
*
* RectangleGeometry has its own version of this method that computes remapping coordinates using cartographic space
* as an intermediary instead of local ENU, which is more accurate for large-area rectangles.
+ *
* @param {Cartesian3[]} positions Array of positions outlining the geometry
* @param {number} stRotation Texture coordinate rotation.
* @param {Ellipsoid} ellipsoid Ellipsoid for projecting and generating local vectors.
diff --git a/packages/engine/Source/Core/GeometryAttribute.js b/packages/engine/Source/Core/GeometryAttribute.js
index d3606b058295..18c27af5d07e 100644
--- a/packages/engine/Source/Core/GeometryAttribute.js
+++ b/packages/engine/Source/Core/GeometryAttribute.js
@@ -6,14 +6,19 @@ import DeveloperError from "./DeveloperError.js";
* Values and type information for geometry attributes. A {@link Geometry}
* generally contains one or more attributes. All attributes together form
* the geometry's vertices.
+ *
* @alias GeometryAttribute
- * @class
+ * @constructor
+ *
* @param {object} [options] Object with the following properties:
* @param {ComponentDatatype} [options.componentDatatype] The datatype of each component in the attribute, e.g., individual elements in values.
* @param {number} [options.componentsPerAttribute] A number between 1 and 4 that defines the number of components in an attributes.
- * @param {boolean} [options.normalize] When true
and componentDatatype
is an integer format, indicate that the components should be mapped to the range [0, 1] (unsigned) or [-1, 1] (signed) when they are accessed as floating-point for rendering.
+ * @param {boolean} [options.normalize=false] When true
and componentDatatype
is an integer format, indicate that the components should be mapped to the range [0, 1] (unsigned) or [-1, 1] (signed) when they are accessed as floating-point for rendering.
* @param {number[]|Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} [options.values] The values for the attributes stored in a typed array.
- * @throws {DeveloperError} options.componentsPerAttribute must be between 1 and 4.
+ *
+ * @exception {DeveloperError} options.componentsPerAttribute must be between 1 and 4.
+ *
+ *
* @example
* const geometry = new Cesium.Geometry({
* attributes : {
@@ -29,6 +34,7 @@ import DeveloperError from "./DeveloperError.js";
* },
* primitiveType : Cesium.PrimitiveType.LINE_LOOP
* });
+ *
* @see Geometry
*/
function GeometryAttribute(options) {
@@ -57,7 +63,9 @@ function GeometryAttribute(options) {
/**
* The datatype of each component in the attribute, e.g., individual elements in
* {@link GeometryAttribute#values}.
+ *
* @type {ComponentDatatype}
+ *
* @default undefined
*/
this.componentDatatype = options.componentDatatype;
@@ -66,8 +74,11 @@ function GeometryAttribute(options) {
* A number between 1 and 4 that defines the number of components in an attributes.
* For example, a position attribute with x, y, and z components would have 3 as
* shown in the code example.
+ *
* @type {number}
+ *
* @default undefined
+ *
* @example
* attribute.componentDatatype = Cesium.ComponentDatatype.FLOAT;
* attribute.componentsPerAttribute = 3;
@@ -86,8 +97,11 @@ function GeometryAttribute(options) {
*
* This is commonly used when storing colors using {@link ComponentDatatype.UNSIGNED_BYTE}.
*
+ *
* @type {boolean}
+ *
* @default false
+ *
* @example
* attribute.componentDatatype = Cesium.ComponentDatatype.UNSIGNED_BYTE;
* attribute.componentsPerAttribute = 4;
@@ -105,8 +119,11 @@ function GeometryAttribute(options) {
* The values for the attributes stored in a typed array. In the code example,
* every three elements in values
defines one attributes since
* componentsPerAttribute
is 3.
+ *
* @type {number[]|Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array}
+ *
* @default undefined
+ *
* @example
* attribute.componentDatatype = Cesium.ComponentDatatype.FLOAT;
* attribute.componentsPerAttribute = 3;
diff --git a/packages/engine/Source/Core/GeometryAttributes.js b/packages/engine/Source/Core/GeometryAttributes.js
index bc78bccf09d0..a681ded710bd 100644
--- a/packages/engine/Source/Core/GeometryAttributes.js
+++ b/packages/engine/Source/Core/GeometryAttributes.js
@@ -6,9 +6,9 @@ import defaultValue from "./defaultValue.js";
*
* Attributes are always stored non-interleaved in a Geometry.
*
- * @param options
+ *
* @alias GeometryAttributes
- * @class
+ * @constructor
*/
function GeometryAttributes(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -18,7 +18,9 @@ function GeometryAttributes(options) {
*
* 64-bit floating-point (for precision). 3 components per attribute.
*
+ *
* @type GeometryAttribute
+ *
* @default undefined
*/
this.position = options.position;
@@ -28,7 +30,9 @@ function GeometryAttributes(options) {
*
* 32-bit floating-point. 3 components per attribute.
*
+ *
* @type GeometryAttribute
+ *
* @default undefined
*/
this.normal = options.normal;
@@ -38,7 +42,9 @@ function GeometryAttributes(options) {
*
* 32-bit floating-point. 2 components per attribute
*
+ *
* @type GeometryAttribute
+ *
* @default undefined
*/
this.st = options.st;
@@ -48,7 +54,9 @@ function GeometryAttributes(options) {
*
* 32-bit floating-point. 3 components per attribute.
*
+ *
* @type GeometryAttribute
+ *
* @default undefined
*/
this.bitangent = options.bitangent;
@@ -58,7 +66,9 @@ function GeometryAttributes(options) {
*
* 32-bit floating-point. 3 components per attribute.
*
+ *
* @type GeometryAttribute
+ *
* @default undefined
*/
this.tangent = options.tangent;
@@ -68,7 +78,9 @@ function GeometryAttributes(options) {
*
* 8-bit unsigned integer. 4 components per attribute.
*
+ *
* @type GeometryAttribute
+ *
* @default undefined
*/
this.color = options.color;
diff --git a/packages/engine/Source/Core/GeometryFactory.js b/packages/engine/Source/Core/GeometryFactory.js
index 0658e4e758f9..10ee22d3cf1e 100644
--- a/packages/engine/Source/Core/GeometryFactory.js
+++ b/packages/engine/Source/Core/GeometryFactory.js
@@ -3,7 +3,8 @@ import DeveloperError from "../Core/DeveloperError.js";
/**
* Base class for all geometry creation utility classes that can be passed to {@link GeometryInstance}
* for asynchronous geometry creation.
- * @class
+ *
+ * @constructor
* @class
* @abstract
*/
@@ -13,6 +14,7 @@ function GeometryFactory() {
/**
* Returns a geometry.
+ *
* @param {GeometryFactory} geometryFactory A description of the circle.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/GeometryInstance.js b/packages/engine/Source/Core/GeometryInstance.js
index c51d297f318a..572d9b81ef68 100644
--- a/packages/engine/Source/Core/GeometryInstance.js
+++ b/packages/engine/Source/Core/GeometryInstance.js
@@ -8,13 +8,17 @@ import Matrix4 from "./Matrix4.js";
* different locations and colored uniquely. For example, one {@link BoxGeometry} can
* be instanced several times, each with a different modelMatrix
to change
* its position, rotation, and scale.
+ *
* @alias GeometryInstance
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {Geometry|GeometryFactory} options.geometry The geometry to instance.
- * @param {Matrix4} [options.modelMatrix] The model matrix that transforms to transform the geometry from model to world coordinates.
+ * @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The model matrix that transforms to transform the geometry from model to world coordinates.
* @param {object} [options.id] A user-defined object to return when the instance is picked with {@link Scene#pick} or get/set per-instance attributes with {@link Primitive#getGeometryInstanceAttributes}.
* @param {object} [options.attributes] Per-instance attributes like a show or color attribute shown in the example below.
+ *
+ *
* @example
* // Create geometry for a box, and two instances that refer to it.
* // One instance positions the box on the bottom and colored aqua.
@@ -41,6 +45,7 @@ import Matrix4 from "./Matrix4.js";
* },
* id : 'top'
* });
+ *
* @see Geometry
*/
function GeometryInstance(options) {
@@ -54,7 +59,9 @@ function GeometryInstance(options) {
/**
* The geometry being instanced.
+ *
* @type Geometry
+ *
* @default undefined
*/
this.geometry = options.geometry;
@@ -64,7 +71,9 @@ function GeometryInstance(options) {
* When this is the identity matrix, the geometry is drawn in world coordinates, i.e., Earth's WGS84 coordinates.
* Local reference frames can be used by providing a different transformation matrix, like that returned
* by {@link Transforms.eastNorthUpToFixedFrame}.
+ *
* @type Matrix4
+ *
* @default Matrix4.IDENTITY
*/
this.modelMatrix = Matrix4.clone(
@@ -73,8 +82,11 @@ function GeometryInstance(options) {
/**
* User-defined object returned when the instance is picked or used to get/set per-instance attributes.
+ *
* @type {object}
+ *
* @default undefined
+ *
* @see Scene#pick
* @see Primitive#getGeometryInstanceAttributes
*/
@@ -82,6 +94,7 @@ function GeometryInstance(options) {
/**
* Used for picking primitives that wrap geometry instances.
+ *
* @private
*/
this.pickPrimitive = options.pickPrimitive;
@@ -89,7 +102,9 @@ function GeometryInstance(options) {
/**
* Per-instance attributes like {@link ColorGeometryInstanceAttribute} or {@link ShowGeometryInstanceAttribute}.
* {@link Geometry} attributes varying per vertex; these attributes are constant for the entire instance.
+ *
* @type {object}
+ *
* @default undefined
*/
this.attributes = defaultValue(options.attributes, {});
diff --git a/packages/engine/Source/Core/GeometryInstanceAttribute.js b/packages/engine/Source/Core/GeometryInstanceAttribute.js
index 18c35a7614b9..f857326cf747 100644
--- a/packages/engine/Source/Core/GeometryInstanceAttribute.js
+++ b/packages/engine/Source/Core/GeometryInstanceAttribute.js
@@ -4,14 +4,19 @@ import DeveloperError from "./DeveloperError.js";
/**
* Values and type information for per-instance geometry attributes.
+ *
* @alias GeometryInstanceAttribute
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {ComponentDatatype} options.componentDatatype The datatype of each component in the attribute, e.g., individual elements in values.
* @param {number} options.componentsPerAttribute A number between 1 and 4 that defines the number of components in an attributes.
- * @param {boolean} [options.normalize] When true
and componentDatatype
is an integer format, indicate that the components should be mapped to the range [0, 1] (unsigned) or [-1, 1] (signed) when they are accessed as floating-point for rendering.
+ * @param {boolean} [options.normalize=false] When true
and componentDatatype
is an integer format, indicate that the components should be mapped to the range [0, 1] (unsigned) or [-1, 1] (signed) when they are accessed as floating-point for rendering.
* @param {number[]} options.value The value for the attribute.
- * @throws {DeveloperError} options.componentsPerAttribute must be between 1 and 4.
+ *
+ * @exception {DeveloperError} options.componentsPerAttribute must be between 1 and 4.
+ *
+ *
* @example
* const instance = new Cesium.GeometryInstance({
* geometry : Cesium.BoxGeometry.fromDimensions({
@@ -29,6 +34,7 @@ import DeveloperError from "./DeveloperError.js";
* })
* }
* });
+ *
* @see ColorGeometryInstanceAttribute
* @see ShowGeometryInstanceAttribute
* @see DistanceDisplayConditionGeometryInstanceAttribute
@@ -59,7 +65,9 @@ function GeometryInstanceAttribute(options) {
/**
* The datatype of each component in the attribute, e.g., individual elements in
* {@link GeometryInstanceAttribute#value}.
+ *
* @type ComponentDatatype
+ *
* @default undefined
*/
this.componentDatatype = options.componentDatatype;
@@ -68,8 +76,11 @@ function GeometryInstanceAttribute(options) {
* A number between 1 and 4 that defines the number of components in an attributes.
* For example, a position attribute with x, y, and z components would have 3 as
* shown in the code example.
+ *
* @type {number}
+ *
* @default undefined
+ *
* @example
* show : new Cesium.GeometryInstanceAttribute({
* componentDatatype : Cesium.ComponentDatatype.UNSIGNED_BYTE,
@@ -87,8 +98,11 @@ function GeometryInstanceAttribute(options) {
*
* This is commonly used when storing colors using {@link ComponentDatatype.UNSIGNED_BYTE}.
*
+ *
* @type {boolean}
+ *
* @default false
+ *
* @example
* attribute.componentDatatype = Cesium.ComponentDatatype.UNSIGNED_BYTE;
* attribute.componentsPerAttribute = 4;
@@ -106,8 +120,11 @@ function GeometryInstanceAttribute(options) {
* The values for the attributes stored in a typed array. In the code example,
* every three elements in values
defines one attributes since
* componentsPerAttribute
is 3.
+ *
* @type {number[]}
+ *
* @default undefined
+ *
* @example
* show : new Cesium.GeometryInstanceAttribute({
* componentDatatype : Cesium.ComponentDatatype.UNSIGNED_BYTE,
diff --git a/packages/engine/Source/Core/GeometryPipeline.js b/packages/engine/Source/Core/GeometryPipeline.js
index d7633ca5dcd2..37e56ec2a16b 100644
--- a/packages/engine/Source/Core/GeometryPipeline.js
+++ b/packages/engine/Source/Core/GeometryPipeline.js
@@ -26,7 +26,9 @@ import Tipsify from "./Tipsify.js";
/**
* Content pipeline functions for geometries.
+ *
* @namespace GeometryPipeline
+ *
* @see Geometry
*/
const GeometryPipeline = {};
@@ -105,9 +107,12 @@ function triangleFanToLines(triangles) {
*
* This is commonly used to create a wireframe geometry for visual debugging.
*
+ *
* @param {Geometry} geometry The geometry to modify.
* @returns {Geometry} The modified geometry
argument, with its triangle indices converted to lines.
- * @throws {DeveloperError} geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN.
+ *
+ * @exception {DeveloperError} geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN.
+ *
* @example
* geometry = Cesium.GeometryPipeline.toWireframe(geometry);
*/
@@ -148,11 +153,14 @@ GeometryPipeline.toWireframe = function (geometry) {
* Creates a new {@link Geometry} with LINES
representing the provided
* attribute (attributeName
) for the provided geometry. This is used to
* visualize vector attributes like normals, tangents, and bitangents.
+ *
* @param {Geometry} geometry The Geometry
instance with the attribute.
- * @param {string} [attributeName] The name of the attribute.
- * @param {number} [length] The length of each line segment in meters. This can be negative to point the vector in the opposite direction.
+ * @param {string} [attributeName='normal'] The name of the attribute.
+ * @param {number} [length=10000.0] The length of each line segment in meters. This can be negative to point the vector in the opposite direction.
* @returns {Geometry} A new Geometry
instance with line segments for the vector.
- * @throws {DeveloperError} geometry.attributes must have an attribute with the same name as the attributeName parameter.
+ *
+ * @exception {DeveloperError} geometry.attributes must have an attribute with the same name as the attributeName parameter.
+ *
* @example
* const geometry = Cesium.GeometryPipeline.createLineSegmentsForVectors(instance.geometry, 'bitangent', 100000.0);
*/
@@ -218,8 +226,10 @@ GeometryPipeline.createLineSegmentsForVectors = function (
/**
* Creates an object that maps attribute names to unique locations (indices)
* for matching vertex attributes and shader programs.
+ *
* @param {Geometry} geometry The geometry, which is not modified, to create the object for.
* @returns {object} An object with attribute name / index pairs.
+ *
* @example
* const attributeLocations = Cesium.GeometryPipeline.createAttributeLocations(geometry);
* // Example output
@@ -291,11 +301,16 @@ GeometryPipeline.createAttributeLocations = function (geometry) {
/**
* Reorders a geometry's attributes and indices
to achieve better performance from the GPU's pre-vertex-shader cache.
+ *
* @param {Geometry} geometry The geometry to modify.
* @returns {Geometry} The modified geometry
argument, with its attributes and indices reordered for the GPU's pre-vertex-shader cache.
- * @throws {DeveloperError} Each attribute array in geometry.attributes must have the same number of attributes.
+ *
+ * @exception {DeveloperError} Each attribute array in geometry.attributes must have the same number of attributes.
+ *
+ *
* @example
* geometry = Cesium.GeometryPipeline.reorderForPreVertexCache(geometry);
+ *
* @see GeometryPipeline.reorderForPostVertexCache
*/
GeometryPipeline.reorderForPreVertexCache = function (geometry) {
@@ -377,12 +392,17 @@ GeometryPipeline.reorderForPreVertexCache = function (geometry) {
* Reorders a geometry's indices
to achieve better performance from the GPU's
* post vertex-shader cache by using the Tipsify algorithm. If the geometry primitiveType
* is not TRIANGLES
or the geometry does not have an indices
, this function has no effect.
+ *
* @param {Geometry} geometry The geometry to modify.
- * @param {number} [cacheCapacity] The number of vertices that can be held in the GPU's vertex cache.
+ * @param {number} [cacheCapacity=24] The number of vertices that can be held in the GPU's vertex cache.
* @returns {Geometry} The modified geometry
argument, with its indices reordered for the post-vertex-shader cache.
- * @throws {DeveloperError} cacheCapacity must be greater than two.
+ *
+ * @exception {DeveloperError} cacheCapacity must be greater than two.
+ *
+ *
* @example
* geometry = Cesium.GeometryPipeline.reorderForPostVertexCache(geometry);
+ *
* @see GeometryPipeline.reorderForPreVertexCache
* @see {@link http://gfx.cs.princ0eton.edu/pubs/Sander_2007_%3ETR/tipsy.pdf|Fast Triangle Reordering for Vertex Locality and Reduced Overdraw}
* by Sander, Nehab, and Barczak
@@ -463,10 +483,13 @@ function copyVertex(destinationAttributes, sourceAttributes, index) {
*
* If the geometry does not have any indices
, this function has no effect.
*
+ *
* @param {Geometry} geometry The geometry to be split into multiple geometries.
* @returns {Geometry[]} An array of geometries, each with indices that fit into unsigned shorts.
- * @throws {DeveloperError} geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS
- * @throws {DeveloperError} All geometry attribute lists must have the same number of attributes.
+ *
+ * @exception {DeveloperError} geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS
+ * @exception {DeveloperError} All geometry attribute lists must have the same number of attributes.
+ *
* @example
* const geometries = Cesium.GeometryPipeline.fitToUnsignedShortIndices(geometry);
*/
@@ -576,15 +599,18 @@ const scratchProjectTo2DCartographic = new Cartographic();
*
* If the geometry does not have a position
, this function has no effect.
*
+ *
* @param {Geometry} geometry The geometry to modify.
* @param {string} attributeName The name of the attribute.
* @param {string} attributeName3D The name of the attribute in 3D.
* @param {string} attributeName2D The name of the attribute in 2D.
- * @param {object} [projection] The projection to use.
+ * @param {object} [projection=new GeographicProjection()] The projection to use.
* @returns {Geometry} The modified geometry
argument with position3D
and position2D
attributes.
- * @throws {DeveloperError} geometry must have attribute matching the attributeName argument.
- * @throws {DeveloperError} The attribute componentDatatype must be ComponentDatatype.DOUBLE.
- * @throws {DeveloperError} Could not project a point to 2D.
+ *
+ * @exception {DeveloperError} geometry must have attribute matching the attributeName argument.
+ * @exception {DeveloperError} The attribute componentDatatype must be ComponentDatatype.DOUBLE.
+ * @exception {DeveloperError} Could not project a point to 2D.
+ *
* @example
* geometry = Cesium.GeometryPipeline.projectTo2D(geometry, 'position', 'position3D', 'position2D');
*/
@@ -686,13 +712,16 @@ const encodedResult = {
*
* This is commonly used to create high-precision position vertex attributes.
*
+ *
* @param {Geometry} geometry The geometry to modify.
* @param {string} attributeName The name of the attribute.
* @param {string} attributeHighName The name of the attribute for the encoded high bits.
* @param {string} attributeLowName The name of the attribute for the encoded low bits.
* @returns {Geometry} The modified geometry
argument, with its encoded attribute.
- * @throws {DeveloperError} geometry must have attribute matching the attributeName argument.
- * @throws {DeveloperError} The attribute componentDatatype must be ComponentDatatype.DOUBLE.
+ *
+ * @exception {DeveloperError} geometry must have attribute matching the attributeName argument.
+ * @exception {DeveloperError} The attribute componentDatatype must be ComponentDatatype.DOUBLE.
+ *
* @example
* geometry = Cesium.GeometryPipeline.encodeAttribute(geometry, 'position3D', 'position3DHigh', 'position3DLow');
*/
@@ -797,8 +826,10 @@ const normalMatrix = new Matrix3();
* the instance's modelMatrix
to {@link Matrix4.IDENTITY} and transforms the
* following attributes if they are present: position
, normal
,
* tangent
, and bitangent
.
+ *
* @param {GeometryInstance} instance The geometry instance to modify.
* @returns {GeometryInstance} The modified instance
argument, with its attributes transforms to world coordinates.
+ *
* @example
* Cesium.GeometryPipeline.transformToWorldCoordinates(instance);
*/
@@ -1049,17 +1080,23 @@ function combineGeometries(instances, propertyName) {
*
* This is used by {@link Primitive} to efficiently render a large amount of static data.
*
+ *
* @private
+ *
* @param {GeometryInstance[]} [instances] The array of {@link GeometryInstance} objects whose geometry will be combined.
* @returns {Geometry} A single geometry created from the provided geometry instances.
- * @throws {DeveloperError} All instances must have the same modelMatrix.
- * @throws {DeveloperError} All instance geometries must have an indices or not have one.
- * @throws {DeveloperError} All instance geometries must have the same primitiveType.
+ *
+ * @exception {DeveloperError} All instances must have the same modelMatrix.
+ * @exception {DeveloperError} All instance geometries must have an indices or not have one.
+ * @exception {DeveloperError} All instance geometries must have the same primitiveType.
+ *
+ *
* @example
* for (let i = 0; i < instances.length; ++i) {
* Cesium.GeometryPipeline.transformToWorldCoordinates(instances[i]);
* }
* const geometries = Cesium.GeometryPipeline.combineInstances(instances);
+ *
* @see GeometryPipeline.transformToWorldCoordinates
*/
GeometryPipeline.combineInstances = function (instances) {
@@ -1113,10 +1150,13 @@ const v2 = new Cartesian3();
* Computes per-vertex normals for a geometry containing TRIANGLES
by averaging the normals of
* all triangles incident to the vertex. The result is a new normal
attribute added to the geometry.
* This assumes a counter-clockwise winding order.
+ *
* @param {Geometry} geometry The geometry to modify.
* @returns {Geometry} The modified geometry
argument with the computed normal
attribute.
- * @throws {DeveloperError} geometry.indices length must be greater than 0 and be a multiple of 3.
- * @throws {DeveloperError} geometry.primitiveType must be {@link PrimitiveType.TRIANGLES}.
+ *
+ * @exception {DeveloperError} geometry.indices length must be greater than 0 and be a multiple of 3.
+ * @exception {DeveloperError} geometry.primitiveType must be {@link PrimitiveType.TRIANGLES}.
+ *
* @example
* Cesium.GeometryPipeline.computeNormal(geometry);
*/
@@ -1281,10 +1321,13 @@ const tScratch = new Cartesian3();
* Based on Computing Tangent Space Basis Vectors
* for an Arbitrary Mesh by Eric Lengyel.
*
+ *
* @param {Geometry} geometry The geometry to modify.
* @returns {Geometry} The modified geometry
argument with the computed tangent
and bitangent
attributes.
- * @throws {DeveloperError} geometry.indices length must be greater than 0 and be a multiple of 3.
- * @throws {DeveloperError} geometry.primitiveType must be {@link PrimitiveType.TRIANGLES}.
+ *
+ * @exception {DeveloperError} geometry.indices length must be greater than 0 and be a multiple of 3.
+ * @exception {DeveloperError} geometry.primitiveType must be {@link PrimitiveType.TRIANGLES}.
+ *
* @example
* Cesium.GeometryPipeline.computeTangentAndBiTangent(geometry);
*/
@@ -1428,8 +1471,10 @@ const toEncode3 = new Cartesian3();
let encodeResult2 = new Cartesian2();
/**
* Compresses and packs geometry normal attribute values to save memory.
+ *
* @param {Geometry} geometry The geometry to modify.
* @returns {Geometry} The modified geometry
argument, with its normals compressed and packed.
+ *
* @example
* geometry = Cesium.GeometryPipeline.compressVertices(geometry);
*/
@@ -3196,9 +3241,12 @@ function splitLongitudePolyline(instance) {
* intersect the International Date Line and Prime Meridian so that no primitives cross longitude
* -180/180 degrees. This is not required for 3D drawing, but is required for
* correcting drawing in 2D and Columbus view.
+ *
* @private
+ *
* @param {GeometryInstance} instance The instance to modify.
* @returns {GeometryInstance} The modified instance
argument, with it's geometry split at the International Date Line.
+ *
* @example
* instance = Cesium.GeometryPipeline.splitLongitude(instance);
*/
diff --git a/packages/engine/Source/Core/GoogleEarthEnterpriseMetadata.js b/packages/engine/Source/Core/GoogleEarthEnterpriseMetadata.js
index 81e30cbeae43..4cbb8c58a9fa 100644
--- a/packages/engine/Source/Core/GoogleEarthEnterpriseMetadata.js
+++ b/packages/engine/Source/Core/GoogleEarthEnterpriseMetadata.js
@@ -35,12 +35,14 @@ const defaultKey = stringToBuffer(
*
*
* Provides metadata using the Google Earth Enterprise REST API. This is used by the GoogleEarthEnterpriseImageryProvider
- * and GoogleEarthEnterpriseTerrainProvider to share metadata requests.
- * @param resourceOrUrl
+ * and GoogleEarthEnterpriseTerrainProvider to share metadata requests.
+ *
* @alias GoogleEarthEnterpriseMetadata
- * @class
+ * @constructor
+ *
* @see GoogleEarthEnterpriseImageryProvider
* @see GoogleEarthEnterpriseTerrainProvider
+ *
*/
function GoogleEarthEnterpriseMetadata(resourceOrUrl) {
/**
@@ -138,7 +140,9 @@ Object.defineProperties(GoogleEarthEnterpriseMetadata.prototype, {
/**
* Creates a metadata object using the Google Earth Enterprise REST API. This is used by the GoogleEarthEnterpriseImageryProvider
* and GoogleEarthEnterpriseTerrainProvider to share metadata requests.
- * @param {Resource | string} resourceOrUrl The url of the Google Earth Enterprise server hosting the imagery.
+ *
+ * @param {Resource|String} resourceOrUrl The url of the Google Earth Enterprise server hosting the imagery.
+ *
* @returns {Promise} A promise which resolves to the created GoogleEarthEnterpriseMetadata instance/
*/
GoogleEarthEnterpriseMetadata.fromUrl = async function (resourceOrUrl) {
@@ -178,9 +182,11 @@ GoogleEarthEnterpriseMetadata.fromUrl = async function (resourceOrUrl) {
/**
* Converts a tiles (x, y, level) position into a quadkey used to request an image
* from a Google Earth Enterprise server.
+ *
* @param {number} x The tile's x coordinate.
* @param {number} y The tile's y coordinate.
* @param {number} level The tile's zoom level.
+ *
* @see GoogleEarthEnterpriseMetadata#quadKeyToTileXY
*/
GoogleEarthEnterpriseMetadata.tileXYToQuadKey = function (x, y, level) {
@@ -218,7 +224,9 @@ GoogleEarthEnterpriseMetadata.tileXYToQuadKey = function (x, y, level) {
/**
* Converts a tile's quadkey used to request an image from a Google Earth Enterprise server into the
* (x, y, level) position.
+ *
* @param {string} quadkey The tile's quad key
+ *
* @see GoogleEarthEnterpriseMetadata#tileXYToQuadKey
*/
GoogleEarthEnterpriseMetadata.quadKeyToTileXY = function (quadkey) {
@@ -284,9 +292,11 @@ const taskProcessor = new TaskProcessor("decodeGoogleEarthEnterprisePacket");
/**
* Retrieves a Google Earth Enterprise quadtree packet.
- * @param {string} [quadKey] The quadkey to retrieve the packet for.
- * @param {number} [version] The cnode version to be used in the request.
+ *
+ * @param {string} [quadKey=''] The quadkey to retrieve the packet for.
+ * @param {number} [version=1] The cnode version to be used in the request.
* @param {Request} [request] The request object. Intended for internal use only.
+ *
* @private
*/
GoogleEarthEnterpriseMetadata.prototype.getQuadTreePacket = function (
@@ -361,11 +371,14 @@ GoogleEarthEnterpriseMetadata.prototype.getQuadTreePacket = function (
/**
* Populates the metadata subtree down to the specified tile.
+ *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
* @param {Request} [request] The request object. Intended for internal use only.
+ *
* @returns {Promise} A promise that resolves to the tile info for the requested quad key
+ *
* @private
*/
GoogleEarthEnterpriseMetadata.prototype.populateSubtree = function (
@@ -445,10 +458,12 @@ function populateSubtree(that, quadKey, request) {
/**
* Gets information about a tile
+ *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
* @returns {GoogleEarthEnterpriseTileInformation|undefined} Information about the tile or undefined if it isn't loaded.
+ *
* @private
*/
GoogleEarthEnterpriseMetadata.prototype.getTileInformation = function (
@@ -462,8 +477,10 @@ GoogleEarthEnterpriseMetadata.prototype.getTileInformation = function (
/**
* Gets information about a tile from a quadKey
+ *
* @param {string} quadkey The quadkey for the tile
* @returns {GoogleEarthEnterpriseTileInformation|undefined} Information about the tile or undefined if it isn't loaded.
+ *
* @private
*/
GoogleEarthEnterpriseMetadata.prototype.getTileInformationFromQuadKey = function (
diff --git a/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainData.js b/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainData.js
index 3438c0018f76..f343aff99575 100644
--- a/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainData.js
+++ b/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainData.js
@@ -18,13 +18,15 @@ import TerrainMesh from "./TerrainMesh.js";
/**
* Terrain data for a single tile from a Google Earth Enterprise server.
+ *
* @alias GoogleEarthEnterpriseTerrainData
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {ArrayBuffer} options.buffer The buffer containing terrain data.
* @param {number} options.negativeAltitudeExponentBias Multiplier for negative terrain heights that are encoded as very small positive values.
* @param {number} options.negativeElevationThreshold Threshold for negative values
- * @param {number} [options.childTileMask] A bit mask indicating which of this tile's four children exist.
+ * @param {number} [options.childTileMask=15] A bit mask indicating which of this tile's four children exist.
* If a child's bit is set, geometry will be requested for that tile as well when it
* is needed. If the bit is cleared, the child tile is not requested and geometry is
* instead upsampled from the parent. The bit values are as follows:
@@ -35,9 +37,11 @@ import TerrainMesh from "./TerrainMesh.js";
* 2 4 Northeast
* 3 8 Northwest
*
- * @param {boolean} [options.createdByUpsampling] True if this instance was created by upsampling another instance;
+ * @param {boolean} [options.createdByUpsampling=false] True if this instance was created by upsampling another instance;
* otherwise, false.
* @param {Credit[]} [options.credits] Array of credits for this tile.
+ *
+ *
* @example
* const buffer = ...
* const childTileMask = ...
@@ -45,6 +49,7 @@ import TerrainMesh from "./TerrainMesh.js";
* buffer : heightBuffer,
* childTileMask : childTileMask
* });
+ *
* @see TerrainData
* @see HeightmapTerrainData
* @see QuantizedMeshTerrainData
@@ -124,15 +129,17 @@ const rectangleScratch = new Rectangle();
/**
* Creates a {@link TerrainMesh} from this terrain data.
+ *
* @private
+ *
* @param {object} options Object with the following properties:
* @param {TilingScheme} options.tilingScheme The tiling scheme to which this tile belongs.
* @param {number} options.x The X coordinate of the tile for which to create the terrain data.
* @param {number} options.y The Y coordinate of the tile for which to create the terrain data.
* @param {number} options.level The level of the tile for which to create the terrain data.
- * @param {number} [options.exaggeration] The scale used to exaggerate the terrain.
- * @param {number} [options.exaggerationRelativeHeight] The height from which terrain is exaggerated.
- * @param {boolean} [options.throttle] If true, indicates that this operation will need to be retried if too many asynchronous mesh creations are already in progress.
+ * @param {number} [options.exaggeration=1.0] The scale used to exaggerate the terrain.
+ * @param {number} [options.exaggerationRelativeHeight=0.0] The height from which terrain is exaggerated.
+ * @param {boolean} [options.throttle=true] If true, indicates that this operation will need to be retried if too many asynchronous mesh creations are already in progress.
* @returns {Promise|undefined} A promise for the terrain mesh, or undefined if too many
* asynchronous mesh creations are already in progress and the operation should
* be retried later.
@@ -228,6 +235,7 @@ GoogleEarthEnterpriseTerrainData.prototype.createMesh = function (options) {
/**
* Computes the terrain height at a specified longitude and latitude.
+ *
* @param {Rectangle} rectangle The rectangle covered by this terrain data.
* @param {number} longitude The longitude in radians.
* @param {number} latitude The latitude in radians.
@@ -266,6 +274,7 @@ const upsampleTaskProcessor = new TaskProcessor(
/**
* Upsamples this terrain data for use by a descendant tile. The resulting instance will contain a subset of the
* height samples in this instance, interpolated if necessary.
+ *
* @param {TilingScheme} tilingScheme The tiling scheme of this terrain data.
* @param {number} thisX The X coordinate of this tile in the tiling scheme.
* @param {number} thisY The Y coordinate of this tile in the tiling scheme.
@@ -377,6 +386,7 @@ GoogleEarthEnterpriseTerrainData.prototype.upsample = function (
* {@link HeightmapTerrainData.childTileMask}. The given child tile coordinates are assumed
* to be one of the four children of this tile. If non-child tile coordinates are
* given, the availability of the southeast child tile is returned.
+ *
* @param {number} thisX The tile X coordinate of this (the parent) tile.
* @param {number} thisY The tile Y coordinate of this (the parent) tile.
* @param {number} childX The tile X coordinate of the child tile to check for availability.
@@ -412,6 +422,7 @@ GoogleEarthEnterpriseTerrainData.prototype.isChildAvailable = function (
* terrain data. If this value is false, the data was obtained from some other source, such
* as by downloading it from a remote server. This method should return true for instances
* returned from a call to {@link HeightmapTerrainData#upsample}.
+ *
* @returns {boolean} True if this instance was created by upsampling; otherwise, false.
*/
GoogleEarthEnterpriseTerrainData.prototype.wasCreatedByUpsampling = function () {
diff --git a/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainProvider.js b/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainProvider.js
index 1e54829da9df..acfb9349ad40 100644
--- a/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainProvider.js
+++ b/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainProvider.js
@@ -65,9 +65,10 @@ TerrainCache.prototype.tidy = function () {
};
/**
- * @typedef {object} GoogleEarthEnterpriseTerrainProvider.ConstructorOptions
+ * @typedef {Object} GoogleEarthEnterpriseTerrainProvider.ConstructorOptions
*
* Initialization options for GoogleEarthEnterpriseTerrainProvider constructor
+ *
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
* @property {Credit|string} [credit] A credit for the data source, which is displayed on the canvas.
*/
@@ -78,16 +79,21 @@ TerrainCache.prototype.tidy = function () {
*
*
* Provides tiled terrain using the Google Earth Enterprise REST API.
+ *
* @alias GoogleEarthEnterpriseTerrainProvider
- * @class
+ * @constructor
+ *
* @param {GoogleEarthEnterpriseTerrainProvider.ConstructorOptions} [options] An object describing initialization options
+ *
* @see GoogleEarthEnterpriseTerrainProvider.fromMetadata
* @see GoogleEarthEnterpriseMetadata.fromUrl
* @see GoogleEarthEnterpriseImageryProvider
* @see CesiumTerrainProvider
+ *
* @example
* const geeMetadata = await GoogleEarthEnterpriseMetadata.fromUrl("http://www.example.com");
* const gee = Cesium.GoogleEarthEnterpriseTerrainProvider.fromMetadata(geeMetadata);
+ *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
*/
function GoogleEarthEnterpriseTerrainProvider(options) {
@@ -228,11 +234,15 @@ Object.defineProperties(GoogleEarthEnterpriseTerrainProvider.prototype, {
/**
* Creates a GoogleEarthTerrainProvider from GoogleEarthEnterpriseMetadata
+ *
* @param {GoogleEarthEnterpriseMetadata} metadata A metadata object that can be used to share metadata requests with a GoogleEarthEnterpriseImageryProvider.
* @param {GoogleEarthEnterpriseTerrainProvider.ConstructorOptions} options An object describing initialization options
* @returns {GoogleEarthEnterpriseTerrainProvider}
+ *
* @see GoogleEarthEnterpriseMetadata.fromUrl
- * @throws {RuntimeError} metadata does not specify terrain
+ *
+ * @exception {RuntimeError} metadata does not specify terrain
+ *
* @example
* const geeMetadata = await GoogleEarthEnterpriseMetadata.fromUrl("http://www.example.com");
* const gee = Cesium.GoogleEarthEnterpriseTerrainProvider.fromMetadata(geeMetadata);
@@ -279,6 +289,7 @@ function computeChildMask(quadKey, info, metadata) {
/**
* Requests the geometry for a given tile. The result must include terrain data and
* may optionally include a water mask and an indication of which child tiles are available.
+ *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -471,6 +482,7 @@ GoogleEarthEnterpriseTerrainProvider.prototype.requestTileGeometry = function (
/**
* Gets the maximum geometric error allowed in a tile at a given level.
+ *
* @param {number} level The tile level for which to get the maximum geometric error.
* @returns {number} The maximum geometric error.
*/
@@ -482,6 +494,7 @@ GoogleEarthEnterpriseTerrainProvider.prototype.getLevelMaximumGeometricError = f
/**
* Determines whether data for a tile is available to be loaded.
+ *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -538,6 +551,7 @@ GoogleEarthEnterpriseTerrainProvider.prototype.getTileDataAvailable = function (
/**
* Makes sure we load availability data for a tile
+ *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
diff --git a/packages/engine/Source/Core/GoogleEarthEnterpriseTileInformation.js b/packages/engine/Source/Core/GoogleEarthEnterpriseTileInformation.js
index 8172c7462a08..e1caecb56ae5 100644
--- a/packages/engine/Source/Core/GoogleEarthEnterpriseTileInformation.js
+++ b/packages/engine/Source/Core/GoogleEarthEnterpriseTileInformation.js
@@ -10,12 +10,14 @@ const terrainBitmask = 0x80;
/**
* Contains information about each tile from a Google Earth Enterprise server
+ *
* @param {number} bits Bitmask that contains the type of data and available children for each tile.
* @param {number} cnodeVersion Version of the request for subtree metadata.
* @param {number} imageryVersion Version of the request for imagery tile.
* @param {number} terrainVersion Version of the request for terrain tile.
* @param {number} imageryProvider Id of imagery provider.
* @param {number} terrainProvider Id of terrain provider.
+ *
* @private
*/
function GoogleEarthEnterpriseTileInformation(
@@ -38,6 +40,7 @@ function GoogleEarthEnterpriseTileInformation(
/**
* Creates GoogleEarthEnterpriseTileInformation from an object
+ *
* @param {object} info Object to be cloned
* @param {GoogleEarthEnterpriseTileInformation} [result] The object onto which to store the result.
* @returns {GoogleEarthEnterpriseTileInformation} The modified result parameter or a new GoogleEarthEnterpriseTileInformation instance if none was provided.
@@ -68,6 +71,7 @@ GoogleEarthEnterpriseTileInformation.clone = function (info, result) {
/**
* Sets the parent for the tile
+ *
* @param {GoogleEarthEnterpriseTileInformation} parent Parent tile
*/
GoogleEarthEnterpriseTileInformation.prototype.setParent = function (parent) {
@@ -76,6 +80,7 @@ GoogleEarthEnterpriseTileInformation.prototype.setParent = function (parent) {
/**
* Gets whether a subtree is available
+ *
* @returns {boolean} true if subtree is available, false otherwise.
*/
GoogleEarthEnterpriseTileInformation.prototype.hasSubtree = function () {
@@ -84,6 +89,7 @@ GoogleEarthEnterpriseTileInformation.prototype.hasSubtree = function () {
/**
* Gets whether imagery is available
+ *
* @returns {boolean} true if imagery is available, false otherwise.
*/
GoogleEarthEnterpriseTileInformation.prototype.hasImagery = function () {
@@ -92,6 +98,7 @@ GoogleEarthEnterpriseTileInformation.prototype.hasImagery = function () {
/**
* Gets whether terrain is available
+ *
* @returns {boolean} true if terrain is available, false otherwise.
*/
GoogleEarthEnterpriseTileInformation.prototype.hasTerrain = function () {
@@ -100,6 +107,7 @@ GoogleEarthEnterpriseTileInformation.prototype.hasTerrain = function () {
/**
* Gets whether any children are present
+ *
* @returns {boolean} true if any children are available, false otherwise.
*/
GoogleEarthEnterpriseTileInformation.prototype.hasChildren = function () {
@@ -108,7 +116,9 @@ GoogleEarthEnterpriseTileInformation.prototype.hasChildren = function () {
/**
* Gets whether a specified child is available
+ *
* @param {number} index Index of child tile
+ *
* @returns {boolean} true if child is available, false otherwise
*/
GoogleEarthEnterpriseTileInformation.prototype.hasChild = function (index) {
@@ -117,6 +127,7 @@ GoogleEarthEnterpriseTileInformation.prototype.hasChild = function (index) {
/**
* Gets bitmask containing children
+ *
* @returns {number} Children bitmask
*/
GoogleEarthEnterpriseTileInformation.prototype.getChildBitmask = function () {
diff --git a/packages/engine/Source/Core/GoogleMaps.js b/packages/engine/Source/Core/GoogleMaps.js
index 0bce7a3c79d9..6a15e5d0d509 100644
--- a/packages/engine/Source/Core/GoogleMaps.js
+++ b/packages/engine/Source/Core/GoogleMaps.js
@@ -6,20 +6,24 @@ import Resource from "./Resource.js";
*
* An API key is only required if you are directly using any Google Maps APIs, such as through {@link createGooglePhotorealistic3DTileset}.
* Follow instructions for managing API keys for the Google Maps Platform at {@link https://developers.google.com/maps/documentation/embed/get-api-key}
+ *
* @see createGooglePhotorealistic3DTileset
* @see https://developers.google.com/maps/documentation/embed/get-api-key
+ *
* @namespace GoogleMaps
*/
const GoogleMaps = {};
/**
* Gets or sets the default Google Maps API key.
+ *
* @type {undefined|string}
*/
GoogleMaps.defaultApiKey = undefined;
/**
* Gets or sets the default Google Map Tiles API endpoint.
+ *
* @type {string|Resource}
* @default https://tile.googleapis.com/v1/
*/
diff --git a/packages/engine/Source/Core/GregorianDate.js b/packages/engine/Source/Core/GregorianDate.js
index d49132df5e3c..4fb7446d61db 100644
--- a/packages/engine/Source/Core/GregorianDate.js
+++ b/packages/engine/Source/Core/GregorianDate.js
@@ -9,7 +9,8 @@ const daysInYear = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
* Represents a Gregorian date in a more precise format than the JavaScript Date object.
* In addition to submillisecond precision, this object can also represent leap seconds.
* @alias GregorianDate
- * @class
+ * @constructor
+ *
* @param {number} [year] The year as a whole number.
* @param {number} [month] The month as a whole number with range [1, 12].
* @param {number} [day] The day of the month as a whole number starting at 1.
@@ -18,6 +19,7 @@ const daysInYear = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
* @param {number} [second] The second of the minute as a whole number with range [0, 60], with 60 representing a leap second.
* @param {number} [millisecond] The millisecond of the second as a floating point number with range [0.0, 1000.0).
* @param {boolean} [isLeapSecond] Whether this time is during a leap second.
+ *
* @see JulianDate#toGregorianDate
*/
function GregorianDate(
diff --git a/packages/engine/Source/Core/GroundPolylineGeometry.js b/packages/engine/Source/Core/GroundPolylineGeometry.js
index cb7afce3afa8..6e05f930f4bb 100644
--- a/packages/engine/Source/Core/GroundPolylineGeometry.js
+++ b/packages/engine/Source/Core/GroundPolylineGeometry.js
@@ -45,16 +45,21 @@ const WALL_INITIAL_MAX_HEIGHT = 1000.0;
/**
* A description of a polyline on terrain or 3D Tiles. Only to be used with {@link GroundPolylinePrimitive}.
+ *
* @alias GroundPolylineGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Options with the following properties:
* @param {Cartesian3[]} options.positions An array of {@link Cartesian3} defining the polyline's points. Heights above the ellipsoid will be ignored.
- * @param {number} [options.width] The screen space width in pixels.
- * @param {number} [options.granularity] The distance interval in meters used for interpolating options.points. Defaults to 9999.0 meters. Zero indicates no interpolation.
- * @param {boolean} [options.loop] Whether during geometry creation a line segment will be added between the last and first line positions to make this Polyline a loop.
- * @param {ArcType} [options.arcType] The type of line the polyline segments must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
- * @throws {DeveloperError} At least two positions are required.
+ * @param {number} [options.width=1.0] The screen space width in pixels.
+ * @param {number} [options.granularity=9999.0] The distance interval in meters used for interpolating options.points. Defaults to 9999.0 meters. Zero indicates no interpolation.
+ * @param {boolean} [options.loop=false] Whether during geometry creation a line segment will be added between the last and first line positions to make this Polyline a loop.
+ * @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polyline segments must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
+ *
+ * @exception {DeveloperError} At least two positions are required.
+ *
* @see GroundPolylinePrimitive
+ *
* @example
* const positions = Cesium.Cartesian3.fromDegreesArray([
* -112.1340164450331, 36.05494287836128,
@@ -153,6 +158,7 @@ Object.defineProperties(GroundPolylineGeometry.prototype, {
/**
* Set the GroundPolylineGeometry's projection and ellipsoid.
* Used by GroundPolylinePrimitive to signal scene information to the geometry for generating 2D attributes.
+ *
* @param {GroundPolylineGeometry} groundPolylineGeometry GroundPolylinGeometry describing a polyline on terrain or 3D Tiles.
* @param {Projection} mapProjection A MapProjection used for projecting cartographic coordinates to 2D.
* @private
@@ -277,9 +283,11 @@ function getPosition(ellipsoid, cartographic, height, result) {
/**
* Stores the provided instance into the provided array.
+ *
* @param {PolygonGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
GroundPolylineGeometry.pack = function (value, array, startingIndex) {
@@ -316,8 +324,9 @@ GroundPolylineGeometry.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {PolygonGeometry} [result] The object into which to store the result.
*/
GroundPolylineGeometry.unpack = function (array, startingIndex, result) {
@@ -442,6 +451,7 @@ const cartographicIntersectionScratch = new Cartographic();
* Computes shadow volumes for the ground polyline, consisting of its vertices, indices, and a bounding sphere.
* Vertices are "fat," packing all the data needed in each volume to describe a line on terrain or 3D Tiles.
* Should not be called independent of {@link GroundPolylinePrimitive}.
+ *
* @param {GroundPolylineGeometry} groundPolylineGeometry
* @private
*/
@@ -1374,7 +1384,7 @@ function generateGeometryAttributes(
texcoordNormalization2DX = segmentLength2D / length2D;
texcoordNormalization2DY = lengthSoFar2D / length2D;
}
- /** Pack */
+ /** Pack **/
for (j = 0; j < 8; j++) {
const vec4Index = vec4sWriteIndex + j * 4;
const vec2Index = vec2sWriteIndex + j * 2;
@@ -1636,6 +1646,7 @@ function getVec4GeometryAttribute(typedArray) {
/**
* Approximates an ellipsoid-tangent vector in 2D by projecting the end point into 2D.
* Exposed for testing.
+ *
* @param {MapProjection} projection Map Projection for projecting coordinates to 2D.
* @param {Cartographic} cartographic The cartographic origin point of the normal.
* Used to check if the normal crosses the IDL during projection.
diff --git a/packages/engine/Source/Core/HeadingPitchRange.js b/packages/engine/Source/Core/HeadingPitchRange.js
index 0c312952eb1f..6d9ae0e71ee7 100644
--- a/packages/engine/Source/Core/HeadingPitchRange.js
+++ b/packages/engine/Source/Core/HeadingPitchRange.js
@@ -7,10 +7,11 @@ import defined from "./defined.js";
* Pitch is the rotation from the local xy-plane. Positive pitch angles are above the plane. Negative pitch
* angles are below the plane. Range is the distance from the center of the frame.
* @alias HeadingPitchRange
- * @class
- * @param {number} [heading] The heading angle in radians.
- * @param {number} [pitch] The pitch angle in radians.
- * @param {number} [range] The distance from the center in meters.
+ * @constructor
+ *
+ * @param {number} [heading=0.0] The heading angle in radians.
+ * @param {number} [pitch=0.0] The pitch angle in radians.
+ * @param {number} [range=0.0] The distance from the center in meters.
*/
function HeadingPitchRange(heading, pitch, range) {
/**
@@ -38,6 +39,7 @@ function HeadingPitchRange(heading, pitch, range) {
/**
* Duplicates a HeadingPitchRange instance.
+ *
* @param {HeadingPitchRange} hpr The HeadingPitchRange to duplicate.
* @param {HeadingPitchRange} [result] The object onto which to store the result.
* @returns {HeadingPitchRange} The modified result parameter or a new HeadingPitchRange instance if one was not provided. (Returns undefined if hpr is undefined)
diff --git a/packages/engine/Source/Core/HeadingPitchRoll.js b/packages/engine/Source/Core/HeadingPitchRoll.js
index cdbfaef6bb54..92a3dadfefc2 100644
--- a/packages/engine/Source/Core/HeadingPitchRoll.js
+++ b/packages/engine/Source/Core/HeadingPitchRoll.js
@@ -8,10 +8,11 @@ import CesiumMath from "./Math.js";
* negative z axis. Pitch is the rotation about the negative y axis. Roll is the rotation about
* the positive x axis.
* @alias HeadingPitchRoll
- * @class
- * @param {number} [heading] The heading component in radians.
- * @param {number} [pitch] The pitch component in radians.
- * @param {number} [roll] The roll component in radians.
+ * @constructor
+ *
+ * @param {number} [heading=0.0] The heading component in radians.
+ * @param {number} [pitch=0.0] The pitch component in radians.
+ * @param {number} [roll=0.0] The roll component in radians.
*/
function HeadingPitchRoll(heading, pitch, roll) {
/**
@@ -36,6 +37,7 @@ function HeadingPitchRoll(heading, pitch, roll) {
/**
* Computes the heading, pitch and roll from a quaternion (see http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles )
+ *
* @param {Quaternion} quaternion The quaternion from which to retrieve heading, pitch, and roll, all expressed in radians.
* @param {HeadingPitchRoll} [result] The object in which to store the result. If not provided, a new instance is created and returned.
* @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if one was not provided.
@@ -66,6 +68,7 @@ HeadingPitchRoll.fromQuaternion = function (quaternion, result) {
/**
* Returns a new HeadingPitchRoll instance from angles given in degrees.
+ *
* @param {number} heading the heading in degrees
* @param {number} pitch the pitch in degrees
* @param {number} roll the heading in degrees
@@ -95,6 +98,7 @@ HeadingPitchRoll.fromDegrees = function (heading, pitch, roll, result) {
/**
* Duplicates a HeadingPitchRoll instance.
+ *
* @param {HeadingPitchRoll} headingPitchRoll The HeadingPitchRoll to duplicate.
* @param {HeadingPitchRoll} [result] The object onto which to store the result.
* @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if one was not provided. (Returns undefined if headingPitchRoll is undefined)
@@ -119,6 +123,7 @@ HeadingPitchRoll.clone = function (headingPitchRoll, result) {
/**
* Compares the provided HeadingPitchRolls componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {HeadingPitchRoll} [left] The first HeadingPitchRoll.
* @param {HeadingPitchRoll} [right] The second HeadingPitchRoll.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -138,10 +143,11 @@ HeadingPitchRoll.equals = function (left, right) {
* Compares the provided HeadingPitchRolls componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
+ *
* @param {HeadingPitchRoll} [left] The first HeadingPitchRoll.
* @param {HeadingPitchRoll} [right] The second HeadingPitchRoll.
- * @param {number} [relativeEpsilon] The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
*/
HeadingPitchRoll.equalsEpsilon = function (
@@ -177,6 +183,7 @@ HeadingPitchRoll.equalsEpsilon = function (
/**
* Duplicates this HeadingPitchRoll instance.
+ *
* @param {HeadingPitchRoll} [result] The object onto which to store the result.
* @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if one was not provided.
*/
@@ -187,6 +194,7 @@ HeadingPitchRoll.prototype.clone = function (result) {
/**
* Compares this HeadingPitchRoll against the provided HeadingPitchRoll componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {HeadingPitchRoll} [right] The right hand side HeadingPitchRoll.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -198,9 +206,10 @@ HeadingPitchRoll.prototype.equals = function (right) {
* Compares this HeadingPitchRoll against the provided HeadingPitchRoll componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
+ *
* @param {HeadingPitchRoll} [right] The right hand side HeadingPitchRoll.
- * @param {number} [relativeEpsilon] The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if they are within the provided epsilon, false
otherwise.
*/
HeadingPitchRoll.prototype.equalsEpsilon = function (
@@ -218,6 +227,7 @@ HeadingPitchRoll.prototype.equalsEpsilon = function (
/**
* Creates a string representing this HeadingPitchRoll in the format '(heading, pitch, roll)' in radians.
+ *
* @returns {string} A string representing the provided HeadingPitchRoll in the format '(heading, pitch, roll)'.
*/
HeadingPitchRoll.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/Heap.js b/packages/engine/Source/Core/Heap.js
index f93b11d92827..700475cedc55 100644
--- a/packages/engine/Source/Core/Heap.js
+++ b/packages/engine/Source/Core/Heap.js
@@ -4,9 +4,11 @@ import defined from "./defined.js";
/**
* Array implementation of a heap.
+ *
* @alias Heap
- * @class
+ * @constructor
* @private
+ *
* @param {object} options Object with the following properties:
* @param {Heap.ComparatorCallback} options.comparator The comparator to use for the heap. If comparator(a, b) is less than 0, sort a to a lower index than b, otherwise sort to a higher index.
*/
@@ -25,7 +27,9 @@ function Heap(options) {
Object.defineProperties(Heap.prototype, {
/**
* Gets the length of the heap.
+ *
* @memberof Heap.prototype
+ *
* @type {number}
* @readonly
*/
@@ -37,7 +41,9 @@ Object.defineProperties(Heap.prototype, {
/**
* Gets the internal array.
+ *
* @memberof Heap.prototype
+ *
* @type {Array}
* @readonly
*/
@@ -49,7 +55,9 @@ Object.defineProperties(Heap.prototype, {
/**
* Gets and sets the maximum length of the heap.
+ *
* @memberof Heap.prototype
+ *
* @type {number}
*/
maximumLength: {
@@ -76,7 +84,9 @@ Object.defineProperties(Heap.prototype, {
/**
* The comparator to use for the heap. If comparator(a, b) is less than 0, sort a to a lower index than b, otherwise sort to a higher index.
+ *
* @memberof Heap.prototype
+ *
* @type {Heap.ComparatorCallback}
*/
comparator: {
@@ -94,6 +104,7 @@ function swap(array, a, b) {
/**
* Resizes the internal array of the heap.
+ *
* @param {number} [length] The length to resize internal array to. Defaults to the current length of the heap.
*/
Heap.prototype.reserve = function (length) {
@@ -103,7 +114,8 @@ Heap.prototype.reserve = function (length) {
/**
* Update the heap so that index and all descendants satisfy the heap property.
- * @param {number} [index] The starting index to heapify from.
+ *
+ * @param {number} [index=0] The starting index to heapify from.
*/
Heap.prototype.heapify = function (index) {
index = defaultValue(index, 0);
@@ -148,8 +160,10 @@ Heap.prototype.resort = function () {
/**
* Insert an element into the heap. If the length would grow greater than maximumLength
* of the heap, extra elements are removed.
+ *
* @param {*} element The element to insert
- * @returns {*} The element that was removed from the heap if the heap is at full capacity.
+ *
+ * @return {*} The element that was removed from the heap if the heap is at full capacity.
*/
Heap.prototype.insert = function (element) {
//>>includeStart('debug', pragmas.debug);
@@ -189,7 +203,8 @@ Heap.prototype.insert = function (element) {
/**
* Remove the element specified by index from the heap and return it.
- * @param {number} [index] The index to remove.
+ *
+ * @param {number} [index=0] The index to remove.
* @returns {*} The specified element of the heap.
*/
Heap.prototype.pop = function (index) {
diff --git a/packages/engine/Source/Core/HeightmapEncoding.js b/packages/engine/Source/Core/HeightmapEncoding.js
index 433f6251da22..ba66c785b839 100644
--- a/packages/engine/Source/Core/HeightmapEncoding.js
+++ b/packages/engine/Source/Core/HeightmapEncoding.js
@@ -1,10 +1,12 @@
/**
* The encoding that is used for a heightmap
+ *
* @enum {number}
*/
const HeightmapEncoding = {
/**
* No encoding
+ *
* @type {number}
* @constant
*/
@@ -12,8 +14,10 @@ const HeightmapEncoding = {
/**
* LERC encoding
+ *
* @type {number}
* @constant
+ *
* @see {@link https://github.com/Esri/lerc|The LERC specification}
*/
LERC: 1,
diff --git a/packages/engine/Source/Core/HeightmapTerrainData.js b/packages/engine/Source/Core/HeightmapTerrainData.js
index 725451e3a855..fab32e682b89 100644
--- a/packages/engine/Source/Core/HeightmapTerrainData.js
+++ b/packages/engine/Source/Core/HeightmapTerrainData.js
@@ -19,13 +19,15 @@ import TerrainProvider from "./TerrainProvider.js";
/**
* Terrain data for a single tile where the terrain data is represented as a heightmap. A heightmap
* is a rectangular array of heights in row-major order from north to south and west to east.
+ *
* @alias HeightmapTerrainData
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} options.buffer The buffer containing height data.
* @param {number} options.width The width (longitude direction) of the heightmap, in samples.
* @param {number} options.height The height (latitude direction) of the heightmap, in samples.
- * @param {number} [options.childTileMask] A bit mask indicating which of this tile's four children exist.
+ * @param {number} [options.childTileMask=15] A bit mask indicating which of this tile's four children exist.
* If a child's bit is set, geometry will be requested for that tile as well when it
* is needed. If the bit is cleared, the child tile is not requested and geometry is
* instead upsampled from the parent. The bit values are as follows:
@@ -40,25 +42,25 @@ import TerrainProvider from "./TerrainProvider.js";
* Uint8Array or image where a value of 255 indicates water and a value of 0 indicates land.
* Values in between 0 and 255 are allowed as well to smoothly blend between land and water.
* @param {object} [options.structure] An object describing the structure of the height data.
- * @param {number} [options.structure.heightScale] The factor by which to multiply height samples in order to obtain
+ * @param {number} [options.structure.heightScale=1.0] The factor by which to multiply height samples in order to obtain
* the height above the heightOffset, in meters. The heightOffset is added to the resulting
* height after multiplying by the scale.
- * @param {number} [options.structure.heightOffset] The offset to add to the scaled height to obtain the final
+ * @param {number} [options.structure.heightOffset=0.0] The offset to add to the scaled height to obtain the final
* height in meters. The offset is added after the height sample is multiplied by the
* heightScale.
- * @param {number} [options.structure.elementsPerHeight] The number of elements in the buffer that make up a single height
+ * @param {number} [options.structure.elementsPerHeight=1] The number of elements in the buffer that make up a single height
* sample. This is usually 1, indicating that each element is a separate height sample. If
* it is greater than 1, that number of elements together form the height sample, which is
* computed according to the structure.elementMultiplier and structure.isBigEndian properties.
- * @param {number} [options.structure.stride] The number of elements to skip to get from the first element of
+ * @param {number} [options.structure.stride=1] The number of elements to skip to get from the first element of
* one height to the first element of the next height.
- * @param {number} [options.structure.elementMultiplier] The multiplier used to compute the height value when the
+ * @param {number} [options.structure.elementMultiplier=256.0] The multiplier used to compute the height value when the
* stride property is greater than 1. For example, if the stride is 4 and the strideMultiplier
* is 256, the height is computed as follows:
* `height = buffer[index] + buffer[index + 1] * 256 + buffer[index + 2] * 256 * 256 + buffer[index + 3] * 256 * 256 * 256`
* This is assuming that the isBigEndian property is false. If it is true, the order of the
* elements is reversed.
- * @param {boolean} [options.structure.isBigEndian] Indicates endianness of the elements in the buffer when the
+ * @param {boolean} [options.structure.isBigEndian=false] Indicates endianness of the elements in the buffer when the
* stride property is greater than 1. If this property is false, the first element is the
* low-order element. If it is true, the first element is the high-order element.
* @param {number} [options.structure.lowestEncodedHeight] The lowest value that can be stored in the height buffer. Any heights that are lower
@@ -69,9 +71,11 @@ import TerrainProvider from "./TerrainProvider.js";
* than this value after encoding with the `heightScale` and `heightOffset` are clamped to this value. For example, if the height
* buffer is a `Uint16Array`, this value should be `256 * 256 - 1` or 65535 because a `Uint16Array` cannot store numbers larger
* than 65535. If this parameter is not specified, no maximum value is enforced.
- * @param {HeightmapEncoding} [options.encoding] The encoding that is used on the buffer.
+ * @param {HeightmapEncoding} [options.encoding=HeightmapEncoding.NONE] The encoding that is used on the buffer.
* @param {boolean} [options.createdByUpsampling=false] True if this instance was created by upsampling another instance;
* otherwise, false.
+ *
+ *
* @example
* const buffer = ...
* const heightBuffer = new Uint16Array(buffer, 0, that._heightmapWidth * that._heightmapWidth);
@@ -84,6 +88,7 @@ import TerrainProvider from "./TerrainProvider.js";
* childTileMask : childTileMask,
* waterMask : waterMask
* });
+ *
* @see TerrainData
* @see QuantizedMeshTerrainData
* @see GoogleEarthEnterpriseTerrainData
@@ -187,15 +192,17 @@ const createMeshTaskProcessorThrottle = new TaskProcessor(
/**
* Creates a {@link TerrainMesh} from this terrain data.
+ *
* @private
+ *
* @param {object} options Object with the following properties:
* @param {TilingScheme} options.tilingScheme The tiling scheme to which this tile belongs.
* @param {number} options.x The X coordinate of the tile for which to create the terrain data.
* @param {number} options.y The Y coordinate of the tile for which to create the terrain data.
* @param {number} options.level The level of the tile for which to create the terrain data.
- * @param {number} [options.exaggeration] The scale used to exaggerate the terrain.
- * @param {number} [options.exaggerationRelativeHeight] The height relative to which terrain is exaggerated.
- * @param {boolean} [options.throttle] If true, indicates that this operation will need to be retried if too many asynchronous mesh creations are already in progress.
+ * @param {number} [options.exaggeration=1.0] The scale used to exaggerate the terrain.
+ * @param {number} [options.exaggerationRelativeHeight=0.0] The height relative to which terrain is exaggerated.
+ * @param {boolean} [options.throttle=true] If true, indicates that this operation will need to be retried if too many asynchronous mesh creations are already in progress.
* @returns {Promise|undefined} A promise for the terrain mesh, or undefined if too many
* asynchronous mesh creations are already in progress and the operation should
* be retried later.
@@ -314,8 +321,9 @@ HeightmapTerrainData.prototype.createMesh = function (options) {
* @param {number} options.x The X coordinate of the tile for which to create the terrain data.
* @param {number} options.y The Y coordinate of the tile for which to create the terrain data.
* @param {number} options.level The level of the tile for which to create the terrain data.
- * @param {number} [options.exaggeration] The scale used to exaggerate the terrain.
- * @param {number} [options.exaggerationRelativeHeight] The height relative to which terrain is exaggerated.
+ * @param {number} [options.exaggeration=1.0] The scale used to exaggerate the terrain.
+ * @param {number} [options.exaggerationRelativeHeight=0.0] The height relative to which terrain is exaggerated.
+ *
* @private
*/
HeightmapTerrainData.prototype._createMeshSync = function (options) {
@@ -413,6 +421,7 @@ HeightmapTerrainData.prototype._createMeshSync = function (options) {
/**
* Computes the terrain height at a specified longitude and latitude.
+ *
* @param {Rectangle} rectangle The rectangle covered by this terrain data.
* @param {number} longitude The longitude in radians.
* @param {number} latitude The latitude in radians.
@@ -483,6 +492,7 @@ HeightmapTerrainData.prototype.interpolateHeight = function (
/**
* Upsamples this terrain data for use by a descendant tile. The resulting instance will contain a subset of the
* height samples in this instance, interpolated if necessary.
+ *
* @param {TilingScheme} tilingScheme The tiling scheme of this terrain data.
* @param {number} thisX The X coordinate of this tile in the tiling scheme.
* @param {number} thisY The Y coordinate of this tile in the tiling scheme.
@@ -633,6 +643,7 @@ HeightmapTerrainData.prototype.upsample = function (
* {@link HeightmapTerrainData.childTileMask}. The given child tile coordinates are assumed
* to be one of the four children of this tile. If non-child tile coordinates are
* given, the availability of the southeast child tile is returned.
+ *
* @param {number} thisX The tile X coordinate of this (the parent) tile.
* @param {number} thisY The tile Y coordinate of this (the parent) tile.
* @param {number} childX The tile X coordinate of the child tile to check for availability.
@@ -676,6 +687,7 @@ HeightmapTerrainData.prototype.isChildAvailable = function (
* terrain data. If this value is false, the data was obtained from some other source, such
* as by downloading it from a remote server. This method should return true for instances
* returned from a call to {@link HeightmapTerrainData#upsample}.
+ *
* @returns {boolean} True if this instance was created by upsampling; otherwise, false.
*/
HeightmapTerrainData.prototype.wasCreatedByUpsampling = function () {
diff --git a/packages/engine/Source/Core/HeightmapTessellator.js b/packages/engine/Source/Core/HeightmapTessellator.js
index 09e203f06eca..be566f845e34 100644
--- a/packages/engine/Source/Core/HeightmapTessellator.js
+++ b/packages/engine/Source/Core/HeightmapTessellator.js
@@ -17,13 +17,16 @@ import WebMercatorProjection from "./WebMercatorProjection.js";
/**
* Contains functions to create a mesh from a heightmap image.
+ *
* @namespace HeightmapTessellator
+ *
* @private
*/
const HeightmapTessellator = {};
/**
* The default structure of a heightmap, as given to {@link HeightmapTessellator.computeVertices}.
+ *
* @constant
*/
HeightmapTessellator.DEFAULT_STRUCTURE = Object.freeze({
@@ -42,6 +45,7 @@ const maximumScratch = new Cartesian3();
/**
* Fills an array of vertices from a heightmap image.
+ *
* @param {object} options Object with the following properties:
* @param {Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} options.heightmap The heightmap to tessellate.
* @param {number} options.width The width of the heightmap, in height samples.
@@ -50,27 +54,27 @@ const maximumScratch = new Cartesian3();
* @param {Rectangle} options.nativeRectangle A rectangle in the native coordinates of the heightmap's projection. For
* a heightmap with a geographic projection, this is degrees. For the web mercator
* projection, this is meters.
- * @param {number} [options.exaggeration] The scale used to exaggerate the terrain.
- * @param {number} [options.exaggerationRelativeHeight] The height from which terrain is exaggerated.
+ * @param {number} [options.exaggeration=1.0] The scale used to exaggerate the terrain.
+ * @param {number} [options.exaggerationRelativeHeight=0.0] The height from which terrain is exaggerated.
* @param {Rectangle} [options.rectangle] The rectangle covered by the heightmap, in geodetic coordinates with north, south, east and
* west properties in radians. Either rectangle or nativeRectangle must be provided. If both
* are provided, they're assumed to be consistent.
- * @param {boolean} [options.isGeographic] True if the heightmap uses a {@link GeographicProjection}, or false if it uses
+ * @param {boolean} [options.isGeographic=true] True if the heightmap uses a {@link GeographicProjection}, or false if it uses
* a {@link WebMercatorProjection}.
- * @param {Cartesian3} [options.relativeToCenter] The positions will be computed as Cartesian3.subtract(worldPosition, relativeToCenter)
.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to which the heightmap applies.
+ * @param {Cartesian3} [options.relativeToCenter=Cartesian3.ZERO] The positions will be computed as Cartesian3.subtract(worldPosition, relativeToCenter)
.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to which the heightmap applies.
* @param {object} [options.structure] An object describing the structure of the height data.
- * @param {number} [options.structure.heightScale] The factor by which to multiply height samples in order to obtain
+ * @param {number} [options.structure.heightScale=1.0] The factor by which to multiply height samples in order to obtain
* the height above the heightOffset, in meters. The heightOffset is added to the resulting
* height after multiplying by the scale.
- * @param {number} [options.structure.heightOffset] The offset to add to the scaled height to obtain the final
+ * @param {number} [options.structure.heightOffset=0.0] The offset to add to the scaled height to obtain the final
* height in meters. The offset is added after the height sample is multiplied by the
* heightScale.
- * @param {number} [options.structure.elementsPerHeight] The number of elements in the buffer that make up a single height
+ * @param {number} [options.structure.elementsPerHeight=1] The number of elements in the buffer that make up a single height
* sample. This is usually 1, indicating that each element is a separate height sample. If
* it is greater than 1, that number of elements together form the height sample, which is
* computed according to the structure.elementMultiplier and structure.isBigEndian properties.
- * @param {number} [options.structure.stride] The number of elements to skip to get from the first element of
+ * @param {number} [options.structure.stride=1] The number of elements to skip to get from the first element of
* one height to the first element of the next height.
* @param {number} [options.structure.elementMultiplier=256.0] The multiplier used to compute the height value when the
* stride property is greater than 1. For example, if the stride is 4 and the strideMultiplier
@@ -89,6 +93,7 @@ const maximumScratch = new Cartesian3();
* @param {boolean} [options.structure.isBigEndian=false] Indicates endianness of the elements in the buffer when the
* stride property is greater than 1. If this property is false, the first element is the
* low-order element. If it is true, the first element is the high-order element.
+ *
* @example
* const width = 5;
* const height = 5;
diff --git a/packages/engine/Source/Core/HermitePolynomialApproximation.js b/packages/engine/Source/Core/HermitePolynomialApproximation.js
index f74d04bdb202..c2737cd26d28 100644
--- a/packages/engine/Source/Core/HermitePolynomialApproximation.js
+++ b/packages/engine/Source/Core/HermitePolynomialApproximation.js
@@ -63,6 +63,7 @@ function calculateCoefficientTerm(
/**
* An {@link InterpolationAlgorithm} for performing Hermite interpolation.
+ *
* @namespace HermitePolynomialApproximation
*/
const HermitePolynomialApproximation = {
@@ -71,11 +72,12 @@ const HermitePolynomialApproximation = {
/**
* Given the desired degree, returns the number of data points required for interpolation.
+ *
* @param {number} degree The desired degree of interpolation.
- * @param {number} [inputOrder] The order of the inputs (0 means just the data, 1 means the data and its derivative, etc).
+ * @param {number} [inputOrder=0] The order of the inputs (0 means just the data, 1 means the data and its derivative, etc).
* @returns {number} The number of required data points needed for the desired degree of interpolation.
- * @throws {DeveloperError} degree must be 0 or greater.
- * @throws {DeveloperError} inputOrder must be 0 or greater.
+ * @exception {DeveloperError} degree must be 0 or greater.
+ * @exception {DeveloperError} inputOrder must be 0 or greater.
*/
HermitePolynomialApproximation.getRequiredDataPoints = function (
degree,
@@ -100,6 +102,7 @@ HermitePolynomialApproximation.getRequiredDataPoints = function (
/**
* Interpolates values using Hermite Polynomial Approximation.
+ *
* @param {number} x The independent variable for which the dependent variables will be interpolated.
* @param {number[]} xTable The array of independent variables to use to interpolate. The values
* in this array must be in increasing order and the same value must not occur twice in the array.
@@ -195,6 +198,7 @@ const arrayScratch = [];
/**
* Interpolates values using Hermite Polynomial Approximation.
+ *
* @param {number} x The independent variable for which the dependent variables will be interpolated.
* @param {number[]} xTable The array of independent variables to use to interpolate. The values
* in this array must be in increasing order and the same value must not occur twice in the array.
@@ -205,6 +209,7 @@ const arrayScratch = [];
* @param {number} inputOrder The number of derivatives supplied for input.
* @param {number} outputOrder The number of derivatives desired for output.
* @param {number[]} [result] An existing array into which to store the result.
+ *
* @returns {number[]} The array of interpolated values, or the result parameter if one was provided.
*/
HermitePolynomialApproximation.interpolate = function (
diff --git a/packages/engine/Source/Core/HermiteSpline.js b/packages/engine/Source/Core/HermiteSpline.js
index 6c01aad24e96..629e81e7687a 100644
--- a/packages/engine/Source/Core/HermiteSpline.js
+++ b/packages/engine/Source/Core/HermiteSpline.js
@@ -115,18 +115,22 @@ function generateNatural(points) {
* tangents are defined for points [1, n - 1]. For example, when interpolating a segment of the curve between points[i]
and
* points[i + 1]
, the tangents at the points will be outTangents[i]
and inTangents[i]
,
* respectively.
+ *
* @alias HermiteSpline
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {number[]} options.times An array of strictly increasing, unit-less, floating-point times at each point.
* The values are in no way connected to the clock time. They are the parameterization for the curve.
* @param {Cartesian3[]} options.points The array of control points.
* @param {Cartesian3[]} options.inTangents The array of incoming tangents at each control point.
* @param {Cartesian3[]} options.outTangents The array of outgoing tangents at each control point.
- * @throws {DeveloperError} points.length must be greater than or equal to 2.
- * @throws {DeveloperError} times.length must be equal to points.length.
- * @throws {DeveloperError} inTangents and outTangents must have a length equal to points.length - 1.
- * @throws {DeveloperError} inTangents and outTangents must be of the same type as points.
+ *
+ * @exception {DeveloperError} points.length must be greater than or equal to 2.
+ * @exception {DeveloperError} times.length must be equal to points.length.
+ * @exception {DeveloperError} inTangents and outTangents must have a length equal to points.length - 1.
+ * @exception {DeveloperError} inTangents and outTangents must be of the same type as points.
+ *
* @example
* // Create a G1 continuous Hermite spline
* const times = [ 0.0, 1.5, 3.0, 4.5, 6.0 ];
@@ -154,6 +158,7 @@ function generateNatural(points) {
* });
*
* const p0 = spline.evaluate(times[0]);
+ *
* @see ConstantSpline
* @see SteppedSpline
* @see LinearSpline
@@ -221,7 +226,9 @@ function HermiteSpline(options) {
Object.defineProperties(HermiteSpline.prototype, {
/**
* An array of times for the control points.
+ *
* @memberof HermiteSpline.prototype
+ *
* @type {number[]}
* @readonly
*/
@@ -233,7 +240,9 @@ Object.defineProperties(HermiteSpline.prototype, {
/**
* An array of control points.
+ *
* @memberof HermiteSpline.prototype
+ *
* @type {Cartesian3[]}
* @readonly
*/
@@ -245,7 +254,9 @@ Object.defineProperties(HermiteSpline.prototype, {
/**
* An array of incoming tangents at each control point.
+ *
* @memberof HermiteSpline.prototype
+ *
* @type {Cartesian3[]}
* @readonly
*/
@@ -257,7 +268,9 @@ Object.defineProperties(HermiteSpline.prototype, {
/**
* An array of outgoing tangents at each control point.
+ *
* @memberof HermiteSpline.prototype
+ *
* @type {Cartesian3[]}
* @readonly
*/
@@ -271,14 +284,17 @@ Object.defineProperties(HermiteSpline.prototype, {
/**
* Creates a spline where the tangents at each control point are the same.
* The curves are guaranteed to be at least in the class C1 .
+ *
* @param {object} options Object with the following properties:
* @param {number[]} options.times The array of control point times.
* @param {Cartesian3[]} options.points The array of control points.
* @param {Cartesian3[]} options.tangents The array of tangents at the control points.
* @returns {HermiteSpline} A hermite spline.
- * @throws {DeveloperError} points, times and tangents are required.
- * @throws {DeveloperError} points.length must be greater than or equal to 2.
- * @throws {DeveloperError} times, points and tangents must have the same length.
+ *
+ * @exception {DeveloperError} points, times and tangents are required.
+ * @exception {DeveloperError} points.length must be greater than or equal to 2.
+ * @exception {DeveloperError} times, points and tangents must have the same length.
+ *
* @example
* const points = [
* new Cesium.Cartesian3(1235398.0, -4810983.0, 4146266.0),
@@ -340,13 +356,16 @@ HermiteSpline.createC1 = function (options) {
/**
* Creates a natural cubic spline. The tangents at the control points are generated
* to create a curve in the class C2 .
+ *
* @param {object} options Object with the following properties:
* @param {number[]} options.times The array of control point times.
* @param {Cartesian3[]} options.points The array of control points.
* @returns {HermiteSpline|LinearSpline} A hermite spline, or a linear spline if less than 3 control points were given.
- * @throws {DeveloperError} points and times are required.
- * @throws {DeveloperError} points.length must be greater than or equal to 2.
- * @throws {DeveloperError} times.length must be equal to points.length.
+ *
+ * @exception {DeveloperError} points and times are required.
+ * @exception {DeveloperError} points.length must be greater than or equal to 2.
+ * @exception {DeveloperError} times.length must be equal to points.length.
+ *
* @example
* // Create a natural cubic spline above the earth from Philadelphia to Los Angeles.
* const spline = Cesium.HermiteSpline.createNaturalCubic({
@@ -402,16 +421,19 @@ HermiteSpline.createNaturalCubic = function (options) {
/**
* Creates a clamped cubic spline. The tangents at the interior control points are generated
* to create a curve in the class C2 .
+ *
* @param {object} options Object with the following properties:
* @param {number[]} options.times The array of control point times.
* @param {number[]|Cartesian3[]} options.points The array of control points.
* @param {Cartesian3} options.firstTangent The outgoing tangent of the first control point.
* @param {Cartesian3} options.lastTangent The incoming tangent of the last control point.
* @returns {HermiteSpline|LinearSpline} A hermite spline, or a linear spline if less than 3 control points were given.
- * @throws {DeveloperError} points, times, firstTangent and lastTangent are required.
- * @throws {DeveloperError} points.length must be greater than or equal to 2.
- * @throws {DeveloperError} times.length must be equal to points.length.
- * @throws {DeveloperError} firstTangent and lastTangent must be of the same type as points.
+ *
+ * @exception {DeveloperError} points, times, firstTangent and lastTangent are required.
+ * @exception {DeveloperError} points.length must be greater than or equal to 2.
+ * @exception {DeveloperError} times.length must be equal to points.length.
+ * @exception {DeveloperError} firstTangent and lastTangent must be of the same type as points.
+ *
* @example
* // Create a clamped cubic spline above the earth from Philadelphia to Los Angeles.
* const spline = Cesium.HermiteSpline.createClampedCubic({
@@ -500,9 +522,11 @@ HermiteSpline.hermiteCoefficientMatrix = new Matrix4(
* Finds an index i
in times
such that the parameter
* time
is in the interval [times[i], times[i + 1]]
.
* @function
+ *
* @param {number} time The time.
* @returns {number} The index for the element at the start of the interval.
- * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ *
+ * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
@@ -514,25 +538,29 @@ const scratchTemp = new Cartesian3();
/**
* Wraps the given time to the period covered by the spline.
* @function
+ *
* @param {number} time The time.
- * @returns {number} The time, wrapped around to the updated animation.
+ * @return {number} The time, wrapped around to the updated animation.
*/
HermiteSpline.prototype.wrapTime = Spline.prototype.wrapTime;
/**
* Clamps the given time to the period covered by the spline.
* @function
+ *
* @param {number} time The time.
- * @returns {number} The time, clamped to the animation period.
+ * @return {number} The time, clamped to the animation period.
*/
HermiteSpline.prototype.clampTime = Spline.prototype.clampTime;
/**
* Evaluates the curve at a given time.
+ *
* @param {number} time The time at which to evaluate the curve.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new instance of the point on the curve at the given time.
- * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ *
+ * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
diff --git a/packages/engine/Source/Core/HilbertOrder.js b/packages/engine/Source/Core/HilbertOrder.js
index 335fb936a217..540a1ea493b4 100644
--- a/packages/engine/Source/Core/HilbertOrder.js
+++ b/packages/engine/Source/Core/HilbertOrder.js
@@ -3,12 +3,14 @@ import DeveloperError from "./DeveloperError.js";
/**
* Hilbert Order helper functions.
+ *
* @namespace HilbertOrder
*/
const HilbertOrder = {};
/**
* Computes the Hilbert index at the given level from 2D coordinates.
+ *
* @param {number} level The level of the curve
* @param {number} x The X coordinate
* @param {number} y The Y coordinate
@@ -52,6 +54,7 @@ HilbertOrder.encode2D = function (level, x, y) {
/**
* Computes the 2D coordinates from the Hilbert index at the given level.
+ *
* @param {number} level The level of the curve
* @param {bigint} index The Hilbert index
* @returns {number[]} An array containing the 2D coordinates ([x, y]) corresponding to the Morton index.
@@ -95,10 +98,6 @@ HilbertOrder.decode2D = function (level, index) {
};
/**
- * @param n
- * @param p
- * @param rx
- * @param ry
* @private
*/
function rotate(n, p, rx, ry) {
diff --git a/packages/engine/Source/Core/Iau2000Orientation.js b/packages/engine/Source/Core/Iau2000Orientation.js
index 7dc5d50b8024..e9595a481194 100644
--- a/packages/engine/Source/Core/Iau2000Orientation.js
+++ b/packages/engine/Source/Core/Iau2000Orientation.js
@@ -8,7 +8,9 @@ import TimeConstants from "./TimeConstants.js";
* This is a collection of the orientation information available for central bodies.
* The data comes from the Report of the IAU/IAG Working Group on Cartographic
* Coordinates and Rotational Elements: 2000.
+ *
* @namespace Iau2000Orientation
+ *
* @private
*/
const Iau2000Orientation = {};
@@ -33,7 +35,8 @@ let dateTT = new JulianDate();
/**
* Compute the orientation parameters for the Moon.
- * @param {JulianDate} [date] The date to evaluate the parameters.
+ *
+ * @param {JulianDate} [date=JulianDate.now()] The date to evaluate the parameters.
* @param {IauOrientationParameters} [result] The object onto which to store the result.
* @returns {IauOrientationParameters} The modified result parameter or a new instance representing the orientation of the Earth's Moon.
* @private
diff --git a/packages/engine/Source/Core/Iau2006XysData.js b/packages/engine/Source/Core/Iau2006XysData.js
index 04399d65776d..c09aec64a55c 100644
--- a/packages/engine/Source/Core/Iau2006XysData.js
+++ b/packages/engine/Source/Core/Iau2006XysData.js
@@ -9,17 +9,20 @@ import TimeStandard from "./TimeStandard.js";
/**
* A set of IAU2006 XYS data that is used to evaluate the transformation between the International
* Celestial Reference Frame (ICRF) and the International Terrestrial Reference Frame (ITRF).
+ *
* @alias Iau2006XysData
- * @class
+ * @constructor
+ *
* @param {object} [options] Object with the following properties:
- * @param {Resource|string} [options.xysFileUrlTemplate] A template URL for obtaining the XYS data. In the template,
+ * @param {Resource|string} [options.xysFileUrlTemplate='Assets/IAU2006_XYS/IAU2006_XYS_{0}.json'] A template URL for obtaining the XYS data. In the template,
* `{0}` will be replaced with the file index.
- * @param {number} [options.interpolationOrder] The order of interpolation to perform on the XYS data.
- * @param {number} [options.sampleZeroJulianEphemerisDate] The Julian ephemeris date (JED) of the
+ * @param {number} [options.interpolationOrder=9] The order of interpolation to perform on the XYS data.
+ * @param {number} [options.sampleZeroJulianEphemerisDate=2442396.5] The Julian ephemeris date (JED) of the
* first XYS sample.
- * @param {number} [options.stepSizeDays] The step size, in days, between successive XYS samples.
- * @param {number} [options.samplesPerXysFile] The number of samples in each XYS file.
- * @param {number} [options.totalSamples] The total number of samples in all XYS files.
+ * @param {number} [options.stepSizeDays=1.0] The step size, in days, between successive XYS samples.
+ * @param {number} [options.samplesPerXysFile=1000] The number of samples in each XYS file.
+ * @param {number} [options.totalSamples=27426] The total number of samples in all XYS files.
+ *
* @private
*/
function Iau2006XysData(options) {
@@ -81,6 +84,7 @@ function getDaysSinceEpoch(xys, dayTT, secondTT) {
/**
* Preloads XYS data for a specified date range.
+ *
* @param {number} startDayTT The Julian day number of the beginning of the interval to preload, expressed in
* the Terrestrial Time (TT) time standard.
* @param {number} startSecondTT The seconds past noon of the beginning of the interval to preload, expressed in
@@ -133,6 +137,7 @@ Iau2006XysData.prototype.preload = function (
/**
* Computes the XYS values for a given date by interpolating. If the required data is not yet downloaded,
* this method will return undefined.
+ *
* @param {number} dayTT The Julian day number for which to compute the XYS value, expressed in
* the Terrestrial Time (TT) time standard.
* @param {number} secondTT The seconds past noon of the date for which to compute the XYS value, expressed in
@@ -141,6 +146,7 @@ Iau2006XysData.prototype.preload = function (
* is undefined, a new instance is allocated and returned.
* @returns {Iau2006XysSample} The interpolated XYS values, or undefined if the required data for this
* computation has not yet been downloaded.
+ *
* @see Iau2006XysData#preload
*/
Iau2006XysData.prototype.computeXysRadians = function (
diff --git a/packages/engine/Source/Core/Iau2006XysSample.js b/packages/engine/Source/Core/Iau2006XysSample.js
index b09244db62b9..e0a83e0c3258 100644
--- a/packages/engine/Source/Core/Iau2006XysSample.js
+++ b/packages/engine/Source/Core/Iau2006XysSample.js
@@ -1,10 +1,13 @@
/**
* An IAU 2006 XYS value sampled at a particular time.
+ *
* @alias Iau2006XysSample
- * @class
+ * @constructor
+ *
* @param {number} x The X value.
* @param {number} y The Y value.
* @param {number} s The S value.
+ *
* @private
*/
function Iau2006XysSample(x, y, s) {
diff --git a/packages/engine/Source/Core/IauOrientationAxes.js b/packages/engine/Source/Core/IauOrientationAxes.js
index c6b6cd4b130f..098867325578 100644
--- a/packages/engine/Source/Core/IauOrientationAxes.js
+++ b/packages/engine/Source/Core/IauOrientationAxes.js
@@ -10,9 +10,12 @@ import Quaternion from "./Quaternion.js";
* The Axes representing the orientation of a Globe as represented by the data
* from the IAU/IAG Working Group reports on rotational elements.
* @alias IauOrientationAxes
- * @class
+ * @constructor
+ *
* @param {IauOrientationAxes.ComputeFunction} [computeFunction] The function that computes the {@link IauOrientationParameters} given a {@link JulianDate}.
+ *
* @see Iau2000Orientation
+ *
* @private
*/
function IauOrientationAxes(computeFunction) {
@@ -64,6 +67,7 @@ const quatScratch = new Quaternion();
/**
* Computes a rotation from ICRF to a Globe's Fixed axes.
+ *
* @param {JulianDate} date The date to evaluate the matrix.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter or a new instance of the rotation from ICRF to Fixed.
diff --git a/packages/engine/Source/Core/IauOrientationParameters.js b/packages/engine/Source/Core/IauOrientationParameters.js
index 2dff5eadeeee..ba72c47384e6 100644
--- a/packages/engine/Source/Core/IauOrientationParameters.js
+++ b/packages/engine/Source/Core/IauOrientationParameters.js
@@ -5,11 +5,9 @@
* These parameters correspond to the parameters in the Report from the IAU/IAG Working Group
* except that they are expressed in radians.
*
- * @param rightAscension
- * @param declination
- * @param rotation
- * @param rotationRate
+ *
* @namespace IauOrientationParameters
+ *
* @private
*/
function IauOrientationParameters(
@@ -22,6 +20,7 @@ function IauOrientationParameters(
* The right ascension of the north pole of the body with respect to
* the International Celestial Reference Frame, in radians.
* @type {number}
+ *
* @private
*/
this.rightAscension = rightAscension;
@@ -30,6 +29,7 @@ function IauOrientationParameters(
* The declination of the north pole of the body with respect to
* the International Celestial Reference Frame, in radians.
* @type {number}
+ *
* @private
*/
this.declination = declination;
@@ -38,6 +38,7 @@ function IauOrientationParameters(
* The rotation about the north pole used to align a set of axes with
* the meridian defined by the IAU report, in radians.
* @type {number}
+ *
* @private
*/
this.rotation = rotation;
@@ -45,6 +46,7 @@ function IauOrientationParameters(
/**
* The instantaneous rotation rate about the north pole, in radians per second.
* @type {number}
+ *
* @private
*/
this.rotationRate = rotationRate;
diff --git a/packages/engine/Source/Core/IndexDatatype.js b/packages/engine/Source/Core/IndexDatatype.js
index a77dcf5a0e63..6a31e2ce9426 100644
--- a/packages/engine/Source/Core/IndexDatatype.js
+++ b/packages/engine/Source/Core/IndexDatatype.js
@@ -6,12 +6,14 @@ import WebGLConstants from "./WebGLConstants.js";
/**
* Constants for WebGL index datatypes. These corresponds to the
* type
parameter of {@link http://www.khronos.org/opengles/sdk/docs/man/xhtml/glDrawElements.xml|drawElements}.
+ *
* @enum {number}
*/
const IndexDatatype = {
/**
* 8-bit unsigned byte corresponding to UNSIGNED_BYTE
and the type
* of an element in Uint8Array
.
+ *
* @type {number}
* @constant
*/
@@ -20,6 +22,7 @@ const IndexDatatype = {
/**
* 16-bit unsigned short corresponding to UNSIGNED_SHORT
and the type
* of an element in Uint16Array
.
+ *
* @type {number}
* @constant
*/
@@ -28,6 +31,7 @@ const IndexDatatype = {
/**
* 32-bit unsigned int corresponding to UNSIGNED_INT
and the type
* of an element in Uint32Array
.
+ *
* @type {number}
* @constant
*/
@@ -36,8 +40,10 @@ const IndexDatatype = {
/**
* Returns the size, in bytes, of the corresponding datatype.
+ *
* @param {IndexDatatype} indexDatatype The index datatype to get the size of.
* @returns {number} The size in bytes.
+ *
* @example
* // Returns 2
* const size = Cesium.IndexDatatype.getSizeInBytes(Cesium.IndexDatatype.UNSIGNED_SHORT);
@@ -61,6 +67,7 @@ IndexDatatype.getSizeInBytes = function (indexDatatype) {
/**
* Gets the datatype with a given size in bytes.
+ *
* @param {number} sizeInBytes The size of a single index in bytes.
* @returns {IndexDatatype} The index datatype with the given size.
*/
@@ -83,8 +90,10 @@ IndexDatatype.fromSizeInBytes = function (sizeInBytes) {
/**
* Validates that the provided index datatype is a valid {@link IndexDatatype}.
+ *
* @param {IndexDatatype} indexDatatype The index datatype to validate.
* @returns {boolean} true
if the provided index datatype is a valid value; otherwise, false
.
+ *
* @example
* if (!Cesium.IndexDatatype.validate(indexDatatype)) {
* throw new Cesium.DeveloperError('indexDatatype must be a valid value.');
@@ -102,9 +111,11 @@ IndexDatatype.validate = function (indexDatatype) {
/**
* Creates a typed array that will store indices, using either
* or Uint32Array
depending on the number of vertices.
+ *
* @param {number} numberOfVertices Number of vertices that the indices will reference.
* @param {number|Array} indicesLengthOrArray Passed through to the typed array constructor.
* @returns {Uint16Array|Uint32Array} A Uint16Array
or Uint32Array
constructed with indicesLengthOrArray
.
+ *
* @example
* this.indices = Cesium.IndexDatatype.createTypedArray(positions.length / 3, numberOfIndices);
*/
@@ -128,11 +139,13 @@ IndexDatatype.createTypedArray = function (
/**
* Creates a typed array from a source array buffer. The resulting typed array will store indices, using either
* or Uint32Array
depending on the number of vertices.
+ *
* @param {number} numberOfVertices Number of vertices that the indices will reference.
* @param {ArrayBuffer} sourceArray Passed through to the typed array constructor.
* @param {number} byteOffset Passed through to the typed array constructor.
* @param {number} length Passed through to the typed array constructor.
* @returns {Uint16Array|Uint32Array} A Uint16Array
or Uint32Array
constructed with sourceArray
, byteOffset
, and length
.
+ *
*/
IndexDatatype.createTypedArrayFromArrayBuffer = function (
numberOfVertices,
@@ -161,6 +174,7 @@ IndexDatatype.createTypedArrayFromArrayBuffer = function (
/**
* Gets the {@link IndexDatatype} for the provided TypedArray instance.
+ *
* @param {Uint8Array|Uint16Array|Uint32Array} array The typed array.
* @returns {IndexDatatype} The IndexDatatype for the provided array, or undefined if the array is not a Uint8Array, Uint16Array, or Uint32Array.
*/
diff --git a/packages/engine/Source/Core/InterpolationAlgorithm.js b/packages/engine/Source/Core/InterpolationAlgorithm.js
index d2ef9c5ad8b3..b050eda4ddb8 100644
--- a/packages/engine/Source/Core/InterpolationAlgorithm.js
+++ b/packages/engine/Source/Core/InterpolationAlgorithm.js
@@ -2,7 +2,9 @@ import DeveloperError from "./DeveloperError.js";
/**
* The interface for interpolation algorithms.
+ *
* @interface InterpolationAlgorithm
+ *
* @see LagrangePolynomialApproximation
* @see LinearApproximation
* @see HermitePolynomialApproximation
@@ -18,6 +20,7 @@ InterpolationAlgorithm.type = undefined;
/**
* Given the desired degree, returns the number of data points required for interpolation.
* @function
+ *
* @param {number} degree The desired degree of interpolation.
* @returns {number} The number of required data points needed for the desired degree of interpolation.
*/
@@ -27,6 +30,7 @@ InterpolationAlgorithm.getRequiredDataPoints =
/**
* Performs zero order interpolation.
* @function
+ *
* @param {number} x The independent variable for which the dependent variables will be interpolated.
* @param {number[]} xTable The array of independent variables to use to interpolate. The values
* in this array must be in increasing order and the same value must not occur twice in the array.
@@ -35,6 +39,7 @@ InterpolationAlgorithm.getRequiredDataPoints =
* @param {number} yStride The number of dependent variable values in yTable corresponding to
* each independent variable value in xTable.
* @param {number[]} [result] An existing array into which to store the result.
+ *
* @returns {number[]} The array of interpolated values, or the result parameter if one was provided.
*/
InterpolationAlgorithm.interpolateOrderZero =
diff --git a/packages/engine/Source/Core/InterpolationType.js b/packages/engine/Source/Core/InterpolationType.js
index cbc2dea864e2..50b6e4b3fc8f 100644
--- a/packages/engine/Source/Core/InterpolationType.js
+++ b/packages/engine/Source/Core/InterpolationType.js
@@ -1,6 +1,8 @@
/**
* An enum describing the type of interpolation used in a glTF animation.
+ *
* @enum {number}
+ *
* @private
*/
const InterpolationType = {
diff --git a/packages/engine/Source/Core/Intersect.js b/packages/engine/Source/Core/Intersect.js
index 37b812ad1788..dada0889bd41 100644
--- a/packages/engine/Source/Core/Intersect.js
+++ b/packages/engine/Source/Core/Intersect.js
@@ -3,11 +3,13 @@
* object is located. The object can either be fully contained within the frustum (INSIDE),
* partially inside the frustum and partially outside (INTERSECTING), or somewhere entirely
* outside of the frustum's 6 planes (OUTSIDE).
+ *
* @enum {number}
*/
const Intersect = {
/**
* Represents that an object is not contained within the frustum.
+ *
* @type {number}
* @constant
*/
@@ -15,6 +17,7 @@ const Intersect = {
/**
* Represents that an object intersects one of the frustum's planes.
+ *
* @type {number}
* @constant
*/
@@ -22,6 +25,7 @@ const Intersect = {
/**
* Represents that an object is fully within the frustum.
+ *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/IntersectionTests.js b/packages/engine/Source/Core/IntersectionTests.js
index 35d930556be1..295b467bdb45 100644
--- a/packages/engine/Source/Core/IntersectionTests.js
+++ b/packages/engine/Source/Core/IntersectionTests.js
@@ -12,12 +12,14 @@ import Ray from "./Ray.js";
/**
* Functions for computing the intersection between geometries such as rays, planes, triangles, and ellipsoids.
+ *
* @namespace IntersectionTests
*/
const IntersectionTests = {};
/**
* Computes the intersection of a ray and a plane.
+ *
* @param {Ray} ray The ray.
* @param {Plane} plane The plane.
* @param {Cartesian3} [result] The object onto which to store the result.
@@ -68,12 +70,14 @@ const scratchQVec = new Cartesian3();
*
* Implements {@link https://cadxfem.org/inf/Fast%20MinimumStorage%20RayTriangle%20Intersection.pdf|
* Fast Minimum Storage Ray/Triangle Intersection} by Tomas Moller and Ben Trumbore.
+ *
* @memberof IntersectionTests
+ *
* @param {Ray} ray The ray.
* @param {Cartesian3} p0 The first vertex of the triangle.
* @param {Cartesian3} p1 The second vertex of the triangle.
* @param {Cartesian3} p2 The third vertex of the triangle.
- * @param {boolean} [cullBackFaces] If true
, will only compute an intersection with the front face of the triangle
+ * @param {boolean} [cullBackFaces=false] If true
, will only compute an intersection with the front face of the triangle
* and return undefined for intersections with the back face.
* @returns {number} The intersection as a parametric distance along the ray, or undefined if there is no intersection.
*/
@@ -166,12 +170,14 @@ IntersectionTests.rayTriangleParametric = function (
*
* Implements {@link https://cadxfem.org/inf/Fast%20MinimumStorage%20RayTriangle%20Intersection.pdf|
* Fast Minimum Storage Ray/Triangle Intersection} by Tomas Moller and Ben Trumbore.
+ *
* @memberof IntersectionTests
+ *
* @param {Ray} ray The ray.
* @param {Cartesian3} p0 The first vertex of the triangle.
* @param {Cartesian3} p1 The second vertex of the triangle.
* @param {Cartesian3} p2 The third vertex of the triangle.
- * @param {boolean} [cullBackFaces] If true
, will only compute an intersection with the front face of the triangle
+ * @param {boolean} [cullBackFaces=false] If true
, will only compute an intersection with the front face of the triangle
* and return undefined for intersections with the back face.
* @param {Cartesian3} [result] The Cartesian3
onto which to store the result.
* @returns {Cartesian3} The intersection point or undefined if there is no intersections.
@@ -208,12 +214,13 @@ const scratchLineSegmentTriangleRay = new Ray();
/**
* Computes the intersection of a line segment and a triangle.
* @memberof IntersectionTests
+ *
* @param {Cartesian3} v0 The an end point of the line segment.
* @param {Cartesian3} v1 The other end point of the line segment.
* @param {Cartesian3} p0 The first vertex of the triangle.
* @param {Cartesian3} p1 The second vertex of the triangle.
* @param {Cartesian3} p2 The third vertex of the triangle.
- * @param {boolean} [cullBackFaces] If true
, will only compute an intersection with the front face of the triangle
+ * @param {boolean} [cullBackFaces=false] If true
, will only compute an intersection with the front face of the triangle
* and return undefined for intersections with the back face.
* @param {Cartesian3} [result] The Cartesian3
onto which to store the result.
* @returns {Cartesian3} The intersection point or undefined if there is no intersections.
@@ -334,6 +341,7 @@ function raySphere(ray, sphere, result) {
/**
* Computes the intersection points of a ray with a sphere.
* @memberof IntersectionTests
+ *
* @param {Ray} ray The ray.
* @param {BoundingSphere} sphere The sphere.
* @param {Interval} [result] The result onto which to store the result.
@@ -363,6 +371,7 @@ const scratchLineSegmentRay = new Ray();
/**
* Computes the intersection points of a line segment with a sphere.
* @memberof IntersectionTests
+ *
* @param {Cartesian3} p0 An end point of the line segment.
* @param {Cartesian3} p1 The other end point of the line segment.
* @param {BoundingSphere} sphere The sphere.
@@ -404,6 +413,7 @@ const scratchW = new Cartesian3();
/**
* Computes the intersection points of a ray with an ellipsoid.
+ *
* @param {Ray} ray The ray.
* @param {Ellipsoid} ellipsoid The ellipsoid.
* @returns {Interval} The interval containing scalar points along the ray or undefined if there are no intersections.
@@ -499,11 +509,6 @@ function addWithCancellationCheck(left, right, tolerance) {
}
/**
- * @param A
- * @param b
- * @param c
- * @param x
- * @param w
* @private
*/
IntersectionTests.quadraticVectorExpression = function (A, b, c, x, w) {
@@ -652,6 +657,7 @@ const surfPointScratch = new Cartographic();
/**
* Provides the point along the ray which is nearest to the ellipsoid.
+ *
* @param {Ray} ray The ray.
* @param {Ellipsoid} ellipsoid The ellipsoid.
* @returns {Cartesian3} The nearest planetodetic point on the ray.
@@ -791,11 +797,13 @@ const lineSegmentPlaneDifference = new Cartesian3();
/**
* Computes the intersection of a line segment and a plane.
+ *
* @param {Cartesian3} endPoint0 An end point of the line segment.
* @param {Cartesian3} endPoint1 The other end point of the line segment.
* @param {Plane} plane The plane.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The intersection point or undefined if there is no intersection.
+ *
* @example
* const origin = Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883);
* const normal = ellipsoid.geodeticSurfaceNormal(origin);
@@ -858,11 +866,13 @@ IntersectionTests.lineSegmentPlane = function (
/**
* Computes the intersection of a triangle and a plane
+ *
* @param {Cartesian3} p0 First point of the triangle
* @param {Cartesian3} p1 Second point of the triangle
* @param {Cartesian3} p2 Third point of the triangle
* @param {Plane} plane Intersection plane
* @returns {object} An object with properties positions
and indices
, which are arrays that represent three triangles that do not cross the plane. (Undefined if no intersection exists)
+ *
* @example
* const origin = Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883);
* const normal = ellipsoid.geodeticSurfaceNormal(origin);
diff --git a/packages/engine/Source/Core/Intersections2D.js b/packages/engine/Source/Core/Intersections2D.js
index 8beab6cfed0c..df98e06093db 100644
--- a/packages/engine/Source/Core/Intersections2D.js
+++ b/packages/engine/Source/Core/Intersections2D.js
@@ -6,6 +6,7 @@ import DeveloperError from "./DeveloperError.js";
/**
* Contains functions for operating on 2D triangles.
+ *
* @namespace Intersections2D
*/
const Intersections2D = {};
@@ -14,6 +15,7 @@ const Intersections2D = {};
* Splits a 2D triangle at given axis-aligned threshold value and returns the resulting
* polygon on a given side of the threshold. The resulting polygon may have 0, 1, 2,
* 3, or 4 vertices.
+ *
* @param {number} threshold The threshold coordinate value at which to clip the triangle.
* @param {boolean} keepAbove true to keep the portion of the triangle above the threshold, or false
* to keep the portion below.
@@ -30,6 +32,7 @@ const Intersections2D = {};
* index of each of the two original vertices forming the line segment that
* the new vertex lies on, and the fraction of the distance from the first
* vertex to the second one.
+ *
* @example
* const result = Cesium.Intersections2D.clipTriangleAtAxisAlignedThreshold(0.5, false, 0.2, 0.6, 0.4);
* // result === [2, 0, -1, 1, 0, 0.25, -1, 1, 2, 0.5]
@@ -213,6 +216,7 @@ Intersections2D.clipTriangleAtAxisAlignedThreshold = function (
/**
* Compute the barycentric coordinates of a 2D position within a 2D triangle.
+ *
* @param {number} x The x coordinate of the position for which to find the barycentric coordinates.
* @param {number} y The y coordinate of the position for which to find the barycentric coordinates.
* @param {number} x1 The x coordinate of the triangle's first vertex.
@@ -224,6 +228,7 @@ Intersections2D.clipTriangleAtAxisAlignedThreshold = function (
* @param {Cartesian3} [result] The instance into to which to copy the result. If this parameter
* is undefined, a new instance is created and returned.
* @returns {Cartesian3} The barycentric coordinates of the position within the triangle.
+ *
* @example
* const result = Cesium.Intersections2D.computeBarycentricCoordinates(0.0, 0.0, 0.0, 1.0, -1, -0.5, 1, -0.5);
* // result === new Cesium.Cartesian3(1.0 / 3.0, 1.0 / 3.0, 1.0 / 3.0);
@@ -288,6 +293,7 @@ Intersections2D.computeBarycentricCoordinates = function (
/**
* Compute the intersection between 2 line segments
+ *
* @param {number} x00 The x coordinate of the first line's first vertex.
* @param {number} y00 The y coordinate of the first line's first vertex.
* @param {number} x01 The x coordinate of the first line's second vertex.
@@ -299,6 +305,7 @@ Intersections2D.computeBarycentricCoordinates = function (
* @param {Cartesian2} [result] The instance into to which to copy the result. If this parameter
* is undefined, a new instance is created and returned.
* @returns {Cartesian2} The intersection point, undefined if there is no intersection point or lines are coincident.
+ *
* @example
* const result = Cesium.Intersections2D.computeLineSegmentLineSegmentIntersection(0.0, 0.0, 0.0, 2.0, -1, 1, 1, 1);
* // result === new Cesium.Cartesian2(0.0, 1.0);
diff --git a/packages/engine/Source/Core/Interval.js b/packages/engine/Source/Core/Interval.js
index abfa8bc72d6f..4f8f99c8b962 100644
--- a/packages/engine/Source/Core/Interval.js
+++ b/packages/engine/Source/Core/Interval.js
@@ -3,9 +3,10 @@ import defaultValue from "./defaultValue.js";
/**
* Represents the closed interval [start, stop].
* @alias Interval
- * @class
- * @param {number} [start] The beginning of the interval.
- * @param {number} [stop] The end of the interval.
+ * @constructor
+ *
+ * @param {number} [start=0.0] The beginning of the interval.
+ * @param {number} [stop=0.0] The end of the interval.
*/
function Interval(start, stop) {
/**
diff --git a/packages/engine/Source/Core/Ion.js b/packages/engine/Source/Core/Ion.js
index 249e70fe315f..a0a4bba815e1 100644
--- a/packages/engine/Source/Core/Ion.js
+++ b/packages/engine/Source/Core/Ion.js
@@ -11,6 +11,7 @@ const defaultAccessToken =
* An ion access token is only required if you are using any ion related APIs.
* A default access token is provided for evaluation purposes only.
* Sign up for a free ion account and get your own access token at {@link https://cesium.com}
+ *
* @see IonResource
* @see IonImageryProvider
* @see IonGeocoderService
@@ -22,12 +23,14 @@ const Ion = {};
/**
* Gets or sets the default Cesium ion access token.
+ *
* @type {string}
*/
Ion.defaultAccessToken = defaultAccessToken;
/**
* Gets or sets the default Cesium ion server.
+ *
* @type {string|Resource}
* @default https://api.cesium.com
*/
diff --git a/packages/engine/Source/Core/IonGeocoderService.js b/packages/engine/Source/Core/IonGeocoderService.js
index 2a71001b0d12..7ff6f6260d2d 100644
--- a/packages/engine/Source/Core/IonGeocoderService.js
+++ b/packages/engine/Source/Core/IonGeocoderService.js
@@ -9,11 +9,13 @@ import Resource from "./Resource.js";
/**
* Provides geocoding through Cesium ion.
* @alias IonGeocoderService
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {Scene} options.scene The scene
- * @param {string} [options.accessToken] The access token to use.
- * @param {string|Resource} [options.server] The resource to the Cesium ion API server.
+ * @param {string} [options.accessToken=Ion.defaultAccessToken] The access token to use.
+ * @param {string|Resource} [options.server=Ion.defaultServer] The resource to the Cesium ion API server.
+ *
* @see Ion
*/
function IonGeocoderService(options) {
@@ -66,9 +68,9 @@ Object.defineProperties(IonGeocoderService.prototype, {
/**
* @function
- * @param geocodeType
+ *
* @param {string} query The query to be sent to the geocoder service
- * @param {GeocodeType} [type] The type of geocode to perform.
+ * @param {GeocodeType} [type=GeocodeType.SEARCH] The type of geocode to perform.
* @returns {Promise}
*/
IonGeocoderService.prototype.geocode = async function (query, geocodeType) {
diff --git a/packages/engine/Source/Core/IonResource.js b/packages/engine/Source/Core/IonResource.js
index 550c163d26ff..b0dfe6bd43ff 100644
--- a/packages/engine/Source/Core/IonResource.js
+++ b/packages/engine/Source/Core/IonResource.js
@@ -10,11 +10,14 @@ import RuntimeError from "./RuntimeError.js";
/**
* A {@link Resource} instance that encapsulates Cesium ion asset access.
* This object is normally not instantiated directly, use {@link IonResource.fromAssetId}.
+ *
* @alias IonResource
- * @class
+ * @constructor
* @augments Resource
+ *
* @param {object} endpoint The result of the Cesium ion asset endpoint service.
* @param {Resource} endpointResource The resource used to retrieve the endpoint.
+ *
* @see Ion
* @see IonImageryProvider
* @see createWorldTerrain
@@ -76,11 +79,13 @@ if (defined(Object.create)) {
/**
* Asynchronously creates an instance.
+ *
* @param {number} assetId The Cesium ion asset id.
* @param {object} [options] An object with the following properties:
- * @param {string} [options.accessToken] The access token to use.
- * @param {string|Resource} [options.server] The resource to the Cesium ion API server.
+ * @param {string} [options.accessToken=Ion.defaultAccessToken] The access token to use.
+ * @param {string|Resource} [options.server=Ion.defaultServer] The resource to the Cesium ion API server.
* @returns {Promise} A Promise to am instance representing the Cesium ion Asset.
+ *
* @example
* // Load a Cesium3DTileset with asset ID of 124624234
* try {
@@ -90,6 +95,7 @@ if (defined(Object.create)) {
* } catch (error) {
* console.error(`Error creating tileset: ${error}`);
* }
+ *
* @example
* //Load a CZML file with asset ID of 10890
* Cesium.IonResource.fromAssetId(10890)
@@ -111,6 +117,7 @@ IonResource.fromAssetId = function (assetId, options) {
Object.defineProperties(IonResource.prototype, {
/**
* Gets the credits required for attribution of the asset.
+ *
* @memberof IonResource.prototype
* @type {Credit[]}
* @readonly
@@ -137,11 +144,7 @@ Object.defineProperties(IonResource.prototype, {
},
});
-/**
- * @param endpoint
- * @param endpointResource
- * @private
- */
+/** @private */
IonResource.getCreditsFromEndpoint = function (endpoint, endpointResource) {
const credits = endpoint.attributions.map(Credit.getIonCredit);
const defaultTokenCredit = Ion.getDefaultTokenCredit(
@@ -210,8 +213,6 @@ IonResource.prototype._makeRequest = function (options) {
};
/**
- * @param assetId
- * @param options
* @private
*/
IonResource._createEndpointResource = function (assetId, options) {
diff --git a/packages/engine/Source/Core/Iso8601.js b/packages/engine/Source/Core/Iso8601.js
index b477550baa14..3b491f54c380 100644
--- a/packages/engine/Source/Core/Iso8601.js
+++ b/packages/engine/Source/Core/Iso8601.js
@@ -16,7 +16,9 @@ const MAXIMUM_INTERVAL = Object.freeze(
/**
* Constants related to ISO8601 support.
+ *
* @namespace
+ *
* @see {@link http://en.wikipedia.org/wiki/ISO_8601|ISO 8601 on Wikipedia}
* @see JulianDate
* @see TimeInterval
@@ -25,6 +27,7 @@ const Iso8601 = {
/**
* A {@link JulianDate} representing the earliest time representable by an ISO8601 date.
* This is equivalent to the date string '0000-01-01T00:00:00Z'
+ *
* @type {JulianDate}
* @constant
*/
@@ -33,6 +36,7 @@ const Iso8601 = {
/**
* A {@link JulianDate} representing the latest time representable by an ISO8601 date.
* This is equivalent to the date string '9999-12-31T24:00:00Z'
+ *
* @type {JulianDate}
* @constant
*/
@@ -41,6 +45,7 @@ const Iso8601 = {
/**
* A {@link TimeInterval} representing the largest interval representable by an ISO8601 interval.
* This is equivalent to the interval string '0000-01-01T00:00:00Z/9999-12-31T24:00:00Z'
+ *
* @type {TimeInterval}
* @constant
*/
diff --git a/packages/engine/Source/Core/JulianDate.js b/packages/engine/Source/Core/JulianDate.js
index fe08e5009f48..3e8a6ec24d5e 100644
--- a/packages/engine/Source/Core/JulianDate.js
+++ b/packages/engine/Source/Core/JulianDate.js
@@ -197,10 +197,11 @@ const iso8601ErrorMessage = "Invalid ISO 8601 date.";
* leap seconds, the date is always stored in the International Atomic Time standard
* {@link TimeStandard.TAI}.
* @alias JulianDate
- * @class
- * @param {number} [julianDayNumber] The Julian Day Number representing the number of whole days. Fractional days will also be handled correctly.
- * @param {number} [secondsOfDay] The number of seconds into the current Julian Day Number. Fractional seconds, negative seconds and seconds greater than a day will be handled correctly.
- * @param {TimeStandard} [timeStandard] The time standard in which the first two parameters are defined.
+ * @constructor
+ *
+ * @param {number} [julianDayNumber=0.0] The Julian Day Number representing the number of whole days. Fractional days will also be handled correctly.
+ * @param {number} [secondsOfDay=0.0] The number of seconds into the current Julian Day Number. Fractional seconds, negative seconds and seconds greater than a day will be handled correctly.
+ * @param {TimeStandard} [timeStandard=TimeStandard.UTC] The time standard in which the first two parameters are defined.
*/
function JulianDate(julianDayNumber, secondsOfDay, timeStandard) {
/**
@@ -234,10 +235,12 @@ function JulianDate(julianDayNumber, secondsOfDay, timeStandard) {
/**
* Creates a new instance from a GregorianDate.
+ *
* @param {GregorianDate} date A GregorianDate.
* @param {JulianDate} [result] An existing instance to use for the result.
* @returns {JulianDate} The modified result parameter or a new instance if none was provided.
- * @throws {DeveloperError} date must be a valid GregorianDate.
+ *
+ * @exception {DeveloperError} date must be a valid GregorianDate.
*/
JulianDate.fromGregorianDate = function (date, result) {
//>>includeStart('debug', pragmas.debug);
@@ -265,10 +268,12 @@ JulianDate.fromGregorianDate = function (date, result) {
/**
* Creates a new instance from a JavaScript Date.
+ *
* @param {Date} date A JavaScript Date.
* @param {JulianDate} [result] An existing instance to use for the result.
* @returns {JulianDate} The modified result parameter or a new instance if none was provided.
- * @throws {DeveloperError} date must be a valid JavaScript Date.
+ *
+ * @exception {DeveloperError} date must be a valid JavaScript Date.
*/
JulianDate.fromDate = function (date, result) {
//>>includeStart('debug', pragmas.debug);
@@ -298,10 +303,12 @@ JulianDate.fromDate = function (date, result) {
* Creates a new instance from a from an {@link http://en.wikipedia.org/wiki/ISO_8601|ISO 8601} date.
* This method is superior to Date.parse
because it will handle all valid formats defined by the ISO 8601
* specification, including leap seconds and sub-millisecond times, which discarded by most JavaScript implementations.
+ *
* @param {string} iso8601String An ISO 8601 date.
* @param {JulianDate} [result] An existing instance to use for the result.
* @returns {JulianDate} The modified result parameter or a new instance if none was provided.
- * @throws {DeveloperError} Invalid ISO 8601 date.
+ *
+ * @exception {DeveloperError} Invalid ISO 8601 date.
*/
JulianDate.fromIso8601 = function (iso8601String, result) {
//>>includeStart('debug', pragmas.debug);
@@ -601,6 +608,7 @@ JulianDate.fromIso8601 = function (iso8601String, result) {
/**
* Creates a new instance that represents the current system time.
* This is equivalent to calling JulianDate.fromDate(new Date());
.
+ *
* @param {JulianDate} [result] An existing instance to use for the result.
* @returns {JulianDate} The modified result parameter or a new instance if none was provided.
*/
@@ -612,6 +620,7 @@ const toGregorianDateScratch = new JulianDate(0, 0, TimeStandard.TAI);
/**
* Creates a {@link GregorianDate} from the provided instance.
+ *
* @param {JulianDate} julianDate The date to be converted.
* @param {GregorianDate} [result] An existing instance to use for the result.
* @returns {GregorianDate} The modified result parameter or a new instance if none was provided.
@@ -703,6 +712,7 @@ JulianDate.toGregorianDate = function (julianDate, result) {
* Since JavaScript dates are only accurate to the nearest millisecond and
* cannot represent a leap second, consider using {@link JulianDate.toGregorianDate} instead.
* If the provided JulianDate is during a leap second, the previous second is used.
+ *
* @param {JulianDate} julianDate The date to be converted.
* @returns {Date} A new instance representing the provided date.
*/
@@ -733,6 +743,7 @@ JulianDate.toDate = function (julianDate) {
/**
* Creates an ISO8601 representation of the provided date.
+ *
* @param {JulianDate} julianDate The date to be converted.
* @param {number} [precision] The number of fractional digits used to represent the seconds component. By default, the most precise representation is used.
* @returns {string} The ISO8601 representation of the provided date.
@@ -821,6 +832,7 @@ JulianDate.toIso8601 = function (julianDate, precision) {
/**
* Duplicates a JulianDate instance.
+ *
* @param {JulianDate} julianDate The date to duplicate.
* @param {JulianDate} [result] An existing instance to use for the result.
* @returns {JulianDate} The modified result parameter or a new instance if none was provided. Returns undefined if julianDate is undefined.
@@ -843,6 +855,7 @@ JulianDate.clone = function (julianDate, result) {
/**
* Compares two instances.
+ *
* @param {JulianDate} left The first instance.
* @param {JulianDate} right The second instance.
* @returns {number} A negative value if left is less than right, a positive value if left is greater than right, or zero if left and right are equal.
@@ -866,6 +879,7 @@ JulianDate.compare = function (left, right) {
/**
* Compares two instances and returns true
if they are equal, false
otherwise.
+ *
* @param {JulianDate} [left] The first instance.
* @param {JulianDate} [right] The second instance.
* @returns {boolean} true
if the dates are equal; otherwise, false
.
@@ -885,9 +899,10 @@ JulianDate.equals = function (left, right) {
* each other. That is, in order for the dates to be considered equal (and for
* this function to return true
), the absolute value of the difference between them, in
* seconds, must be less than epsilon
.
+ *
* @param {JulianDate} [left] The first instance.
* @param {JulianDate} [right] The second instance.
- * @param {number} [epsilon] The maximum number of seconds that should separate the two instances.
+ * @param {number} [epsilon=0] The maximum number of seconds that should separate the two instances.
* @returns {boolean} true
if the two dates are within epsilon
seconds of each other; otherwise false
.
*/
JulianDate.equalsEpsilon = function (left, right, epsilon) {
@@ -903,6 +918,7 @@ JulianDate.equalsEpsilon = function (left, right, epsilon) {
/**
* Computes the total number of whole and fractional days represented by the provided instance.
+ *
* @param {JulianDate} julianDate The date.
* @returns {number} The Julian date as single floating point number.
*/
@@ -920,6 +936,7 @@ JulianDate.totalDays = function (julianDate) {
/**
* Computes the difference in seconds between the provided instance.
+ *
* @param {JulianDate} left The first instance.
* @param {JulianDate} right The second instance.
* @returns {number} The difference, in seconds, when subtracting right
from left
.
@@ -941,6 +958,7 @@ JulianDate.secondsDifference = function (left, right) {
/**
* Computes the difference in days between the provided instance.
+ *
* @param {JulianDate} left The first instance.
* @param {JulianDate} right The second instance.
* @returns {number} The difference, in days, when subtracting right
from left
.
@@ -963,6 +981,7 @@ JulianDate.daysDifference = function (left, right) {
/**
* Computes the number of seconds the provided instance is ahead of UTC.
+ *
* @param {JulianDate} julianDate The date.
* @returns {number} The number of seconds the provided instance is ahead of UTC
*/
@@ -986,6 +1005,7 @@ JulianDate.computeTaiMinusUtc = function (julianDate) {
/**
* Adds the provided number of seconds to the provided date instance.
+ *
* @param {JulianDate} julianDate The date.
* @param {number} seconds The number of seconds to add or subtract.
* @param {JulianDate} result An existing instance to use for the result.
@@ -1013,6 +1033,7 @@ JulianDate.addSeconds = function (julianDate, seconds, result) {
/**
* Adds the provided number of minutes to the provided date instance.
+ *
* @param {JulianDate} julianDate The date.
* @param {number} minutes The number of minutes to add or subtract.
* @param {JulianDate} result An existing instance to use for the result.
@@ -1038,6 +1059,7 @@ JulianDate.addMinutes = function (julianDate, minutes, result) {
/**
* Adds the provided number of hours to the provided date instance.
+ *
* @param {JulianDate} julianDate The date.
* @param {number} hours The number of hours to add or subtract.
* @param {JulianDate} result An existing instance to use for the result.
@@ -1063,6 +1085,7 @@ JulianDate.addHours = function (julianDate, hours, result) {
/**
* Adds the provided number of days to the provided date instance.
+ *
* @param {JulianDate} julianDate The date.
* @param {number} days The number of days to add or subtract.
* @param {JulianDate} result An existing instance to use for the result.
@@ -1087,6 +1110,7 @@ JulianDate.addDays = function (julianDate, days, result) {
/**
* Compares the provided instances and returns true
if left
is earlier than right
, false
otherwise.
+ *
* @param {JulianDate} left The first instance.
* @param {JulianDate} right The second instance.
* @returns {boolean} true
if left
is earlier than right
, false
otherwise.
@@ -1097,6 +1121,7 @@ JulianDate.lessThan = function (left, right) {
/**
* Compares the provided instances and returns true
if left
is earlier than or equal to right
, false
otherwise.
+ *
* @param {JulianDate} left The first instance.
* @param {JulianDate} right The second instance.
* @returns {boolean} true
if left
is earlier than or equal to right
, false
otherwise.
@@ -1107,6 +1132,7 @@ JulianDate.lessThanOrEquals = function (left, right) {
/**
* Compares the provided instances and returns true
if left
is later than right
, false
otherwise.
+ *
* @param {JulianDate} left The first instance.
* @param {JulianDate} right The second instance.
* @returns {boolean} true
if left
is later than right
, false
otherwise.
@@ -1117,6 +1143,7 @@ JulianDate.greaterThan = function (left, right) {
/**
* Compares the provided instances and returns true
if left
is later than or equal to right
, false
otherwise.
+ *
* @param {JulianDate} left The first instance.
* @param {JulianDate} right The second instance.
* @returns {boolean} true
if left
is later than or equal to right
, false
otherwise.
@@ -1127,6 +1154,7 @@ JulianDate.greaterThanOrEquals = function (left, right) {
/**
* Duplicates this instance.
+ *
* @param {JulianDate} [result] An existing instance to use for the result.
* @returns {JulianDate} The modified result parameter or a new instance if none was provided.
*/
@@ -1136,6 +1164,7 @@ JulianDate.prototype.clone = function (result) {
/**
* Compares this and the provided instance and returns true
if they are equal, false
otherwise.
+ *
* @param {JulianDate} [right] The second instance.
* @returns {boolean} true
if the dates are equal; otherwise, false
.
*/
@@ -1148,8 +1177,9 @@ JulianDate.prototype.equals = function (right) {
* each other. That is, in order for the dates to be considered equal (and for
* this function to return true
), the absolute value of the difference between them, in
* seconds, must be less than epsilon
.
+ *
* @param {JulianDate} [right] The second instance.
- * @param {number} [epsilon] The maximum number of seconds that should separate the two instances.
+ * @param {number} [epsilon=0] The maximum number of seconds that should separate the two instances.
* @returns {boolean} true
if the two dates are within epsilon
seconds of each other; otherwise false
.
*/
JulianDate.prototype.equalsEpsilon = function (right, epsilon) {
@@ -1158,6 +1188,7 @@ JulianDate.prototype.equalsEpsilon = function (right, epsilon) {
/**
* Creates a string representing this date in ISO8601 format.
+ *
* @returns {string} A string representing this date in ISO8601 format.
*/
JulianDate.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/KTX2Transcoder.js b/packages/engine/Source/Core/KTX2Transcoder.js
index 61d23848b760..f570a32dc691 100644
--- a/packages/engine/Source/Core/KTX2Transcoder.js
+++ b/packages/engine/Source/Core/KTX2Transcoder.js
@@ -6,6 +6,7 @@ import TaskProcessor from "./TaskProcessor.js";
/**
* Transcodes KTX2 textures using web workers.
+ *
* @private
*/
function KTX2Transcoder() {}
diff --git a/packages/engine/Source/Core/KeyboardEventModifier.js b/packages/engine/Source/Core/KeyboardEventModifier.js
index bb9e7106c299..ede05482c421 100644
--- a/packages/engine/Source/Core/KeyboardEventModifier.js
+++ b/packages/engine/Source/Core/KeyboardEventModifier.js
@@ -1,11 +1,13 @@
/**
* This enumerated type is for representing keyboard modifiers. These are keys
* that are held down in addition to other event types.
+ *
* @enum {number}
*/
const KeyboardEventModifier = {
/**
* Represents the shift key being held down.
+ *
* @type {number}
* @constant
*/
@@ -13,6 +15,7 @@ const KeyboardEventModifier = {
/**
* Represents the control key being held down.
+ *
* @type {number}
* @constant
*/
@@ -20,6 +23,7 @@ const KeyboardEventModifier = {
/**
* Represents the alt key being held down.
+ *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/LagrangePolynomialApproximation.js b/packages/engine/Source/Core/LagrangePolynomialApproximation.js
index 8e2fcd83a3e0..67c15aa28fb1 100644
--- a/packages/engine/Source/Core/LagrangePolynomialApproximation.js
+++ b/packages/engine/Source/Core/LagrangePolynomialApproximation.js
@@ -2,6 +2,7 @@ import defined from "./defined.js";
/**
* An {@link InterpolationAlgorithm} for performing Lagrange interpolation.
+ *
* @namespace LagrangePolynomialApproximation
*/
const LagrangePolynomialApproximation = {
@@ -10,6 +11,7 @@ const LagrangePolynomialApproximation = {
/**
* Given the desired degree, returns the number of data points required for interpolation.
+ *
* @param {number} degree The desired degree of interpolation.
* @returns {number} The number of required data points needed for the desired degree of interpolation.
*/
@@ -19,6 +21,7 @@ LagrangePolynomialApproximation.getRequiredDataPoints = function (degree) {
/**
* Interpolates values using Lagrange Polynomial Approximation.
+ *
* @param {number} x The independent variable for which the dependent variables will be interpolated.
* @param {number[]} xTable The array of independent variables to use to interpolate. The values
* in this array must be in increasing order and the same value must not occur twice in the array.
diff --git a/packages/engine/Source/Core/LeapSecond.js b/packages/engine/Source/Core/LeapSecond.js
index eb6b39d7e05f..dbcf62cd453f 100644
--- a/packages/engine/Source/Core/LeapSecond.js
+++ b/packages/engine/Source/Core/LeapSecond.js
@@ -2,7 +2,8 @@
* Describes a single leap second, which is constructed from a {@link JulianDate} and a
* numerical offset representing the number of seconds TAI is ahead of the UTC time standard.
* @alias LeapSecond
- * @class
+ * @constructor
+ *
* @param {JulianDate} [date] A Julian date representing the time of the leap second.
* @param {number} [offset] The cumulative number of seconds that TAI is ahead of UTC at the provided date.
*/
diff --git a/packages/engine/Source/Core/LinearApproximation.js b/packages/engine/Source/Core/LinearApproximation.js
index b36168e60722..c605a7f4fb39 100644
--- a/packages/engine/Source/Core/LinearApproximation.js
+++ b/packages/engine/Source/Core/LinearApproximation.js
@@ -3,6 +3,7 @@ import DeveloperError from "./DeveloperError.js";
/**
* An {@link InterpolationAlgorithm} for performing linear interpolation.
+ *
* @namespace LinearApproximation
*/
const LinearApproximation = {
@@ -15,6 +16,7 @@ const LinearApproximation = {
* always returns 2.
* @param {number} degree The desired degree of interpolation.
* @returns {number} This function always returns 2.
+ *
*/
LinearApproximation.getRequiredDataPoints = function (degree) {
return 2;
@@ -22,6 +24,7 @@ LinearApproximation.getRequiredDataPoints = function (degree) {
/**
* Interpolates values using linear approximation.
+ *
* @param {number} x The independent variable for which the dependent variables will be interpolated.
* @param {number[]} xTable The array of independent variables to use to interpolate. The values
* in this array must be in increasing order and the same value must not occur twice in the array.
diff --git a/packages/engine/Source/Core/LinearSpline.js b/packages/engine/Source/Core/LinearSpline.js
index 0b5adb604489..d067d318cc26 100644
--- a/packages/engine/Source/Core/LinearSpline.js
+++ b/packages/engine/Source/Core/LinearSpline.js
@@ -6,14 +6,19 @@ import Spline from "./Spline.js";
/**
* A spline that uses piecewise linear interpolation to create a curve.
+ *
* @alias LinearSpline
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {number[]} options.times An array of strictly increasing, unit-less, floating-point times at each point.
* The values are in no way connected to the clock time. They are the parameterization for the curve.
* @param {number[]|Cartesian3[]} options.points The array of control points.
- * @throws {DeveloperError} points.length must be greater than or equal to 2.
- * @throws {DeveloperError} times.length must be equal to points.length.
+ *
+ * @exception {DeveloperError} points.length must be greater than or equal to 2.
+ * @exception {DeveloperError} times.length must be equal to points.length.
+ *
+ *
* @example
* const times = [ 0.0, 1.5, 3.0, 4.5, 6.0 ];
* const spline = new Cesium.LinearSpline({
@@ -28,6 +33,7 @@ import Spline from "./Spline.js";
* });
*
* const p0 = spline.evaluate(times[0]);
+ *
* @see ConstantSpline
* @see SteppedSpline
* @see HermiteSpline
@@ -65,7 +71,9 @@ function LinearSpline(options) {
Object.defineProperties(LinearSpline.prototype, {
/**
* An array of times for the control points.
+ *
* @memberof LinearSpline.prototype
+ *
* @type {number[]}
* @readonly
*/
@@ -77,7 +85,9 @@ Object.defineProperties(LinearSpline.prototype, {
/**
* An array of {@link Cartesian3} control points.
+ *
* @memberof LinearSpline.prototype
+ *
* @type {number[]|Cartesian3[]}
* @readonly
*/
@@ -92,9 +102,11 @@ Object.defineProperties(LinearSpline.prototype, {
* Finds an index i
in times
such that the parameter
* time
is in the interval [times[i], times[i + 1]]
.
* @function
+ *
* @param {number} time The time.
* @returns {number} The index for the element at the start of the interval.
- * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ *
+ * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
@@ -103,25 +115,29 @@ LinearSpline.prototype.findTimeInterval = Spline.prototype.findTimeInterval;
/**
* Wraps the given time to the period covered by the spline.
* @function
+ *
* @param {number} time The time.
- * @returns {number} The time, wrapped around to the updated animation.
+ * @return {number} The time, wrapped around to the updated animation.
*/
LinearSpline.prototype.wrapTime = Spline.prototype.wrapTime;
/**
* Clamps the given time to the period covered by the spline.
* @function
+ *
* @param {number} time The time.
- * @returns {number} The time, clamped to the animation period.
+ * @return {number} The time, clamped to the animation period.
*/
LinearSpline.prototype.clampTime = Spline.prototype.clampTime;
/**
* Evaluates the curve at a given time.
+ *
* @param {number} time The time at which to evaluate the curve.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {number|Cartesian3} The modified result parameter or a new instance of the point on the curve at the given time.
- * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ *
+ * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
diff --git a/packages/engine/Source/Core/ManagedArray.js b/packages/engine/Source/Core/ManagedArray.js
index 1a7499115ac4..9eeb280e5ffd 100644
--- a/packages/engine/Source/Core/ManagedArray.js
+++ b/packages/engine/Source/Core/ManagedArray.js
@@ -3,10 +3,12 @@ import defaultValue from "./defaultValue.js";
/**
* A wrapper around arrays so that the internal length of the array can be manually managed.
+ *
* @alias ManagedArray
- * @class
+ * @constructor
* @private
- * @param {number} [length] The initial length of the array.
+ *
+ * @param {number} [length=0] The initial length of the array.
*/
function ManagedArray(length) {
length = defaultValue(length, 0);
@@ -18,6 +20,7 @@ Object.defineProperties(ManagedArray.prototype, {
/**
* Gets or sets the length of the array.
* If the set length is greater than the length of the internal array, the internal array is resized.
+ *
* @memberof ManagedArray.prototype
* @type {number}
*/
@@ -45,6 +48,7 @@ Object.defineProperties(ManagedArray.prototype, {
/**
* Gets the internal array.
+ *
* @memberof ManagedArray.prototype
* @type {Array}
* @readonly
@@ -58,6 +62,7 @@ Object.defineProperties(ManagedArray.prototype, {
/**
* Gets the element at an index.
+ *
* @param {number} index The index to get.
*/
ManagedArray.prototype.get = function (index) {
@@ -70,6 +75,7 @@ ManagedArray.prototype.get = function (index) {
/**
* Sets the element at an index. Resizes the array if index is greater than the length of the array.
+ *
* @param {number} index The index to set.
* @param {*} element The element to set at index.
*/
@@ -86,6 +92,7 @@ ManagedArray.prototype.set = function (index, element) {
/**
* Returns the last element in the array without modifying the array.
+ *
* @returns {*} The last element in the array.
*/
ManagedArray.prototype.peek = function () {
@@ -94,6 +101,7 @@ ManagedArray.prototype.peek = function () {
/**
* Push an element into the array.
+ *
* @param {*} element The element to push.
*/
ManagedArray.prototype.push = function (element) {
@@ -103,6 +111,7 @@ ManagedArray.prototype.push = function (element) {
/**
* Pop an element from the array.
+ *
* @returns {*} The last element in the array.
*/
ManagedArray.prototype.pop = function () {
@@ -116,6 +125,7 @@ ManagedArray.prototype.pop = function () {
/**
* Resize the internal array if length > _array.length.
+ *
* @param {number} length The length.
*/
ManagedArray.prototype.reserve = function (length) {
@@ -130,6 +140,7 @@ ManagedArray.prototype.reserve = function (length) {
/**
* Resize the array.
+ *
* @param {number} length The length.
*/
ManagedArray.prototype.resize = function (length) {
@@ -142,6 +153,7 @@ ManagedArray.prototype.resize = function (length) {
/**
* Trim the internal array to the specified length. Defaults to the current length.
+ *
* @param {number} [length] The length.
*/
ManagedArray.prototype.trim = function (length) {
diff --git a/packages/engine/Source/Core/MapProjection.js b/packages/engine/Source/Core/MapProjection.js
index 58364facc6dc..f630e69575d8 100644
--- a/packages/engine/Source/Core/MapProjection.js
+++ b/packages/engine/Source/Core/MapProjection.js
@@ -3,9 +3,11 @@ import DeveloperError from "./DeveloperError.js";
/**
* Defines how geodetic ellipsoid coordinates ({@link Cartographic}) project to a
* flat map like Cesium's 2D and Columbus View modes.
+ *
* @alias MapProjection
- * @class
+ * @constructor
* @abstract
+ *
* @see GeographicProjection
* @see WebMercatorProjection
*/
@@ -16,7 +18,9 @@ function MapProjection() {
Object.defineProperties(MapProjection.prototype, {
/**
* Gets the {@link Ellipsoid}.
+ *
* @memberof MapProjection.prototype
+ *
* @type {Ellipsoid}
* @readonly
*/
@@ -27,8 +31,10 @@ Object.defineProperties(MapProjection.prototype, {
/**
* Projects {@link Cartographic} coordinates, in radians, to projection-specific map coordinates, in meters.
+ *
* @memberof MapProjection
* @function
+ *
* @param {Cartographic} cartographic The coordinates to project.
* @param {Cartesian3} [result] An instance into which to copy the result. If this parameter is
* undefined, a new instance is created and returned.
@@ -41,8 +47,10 @@ MapProjection.prototype.project = DeveloperError.throwInstantiationError;
/**
* Unprojects projection-specific map {@link Cartesian3} coordinates, in meters, to {@link Cartographic}
* coordinates, in radians.
+ *
* @memberof MapProjection
* @function
+ *
* @param {Cartesian3} cartesian The Cartesian position to unproject with height (z) in meters.
* @param {Cartographic} [result] An instance into which to copy the result. If this parameter is
* undefined, a new instance is created and returned.
diff --git a/packages/engine/Source/Core/Math.js b/packages/engine/Source/Core/Math.js
index f33e984740d8..59ae199d8dc0 100644
--- a/packages/engine/Source/Core/Math.js
+++ b/packages/engine/Source/Core/Math.js
@@ -6,6 +6,7 @@ import DeveloperError from "./DeveloperError.js";
/**
* Math functions.
+ *
* @exports CesiumMath
* @alias Math
*/
@@ -199,6 +200,7 @@ CesiumMath.FOUR_GIGABYTES = 4 * 1024 * 1024 * 1024;
/**
* Returns the sign of the value; 1 if the value is positive, -1 if the value is
* negative, or 0 if the value is 0.
+ *
* @function
* @param {number} value The value to return the sign of.
* @returns {number} The sign of value.
@@ -226,8 +228,9 @@ CesiumMath.signNotZero = function (value) {
/**
* Converts a scalar value in the range [-1.0, 1.0] to a SNORM in the range [0, rangeMaximum]
* @param {number} value The scalar value in the range [-1.0, 1.0]
- * @param {number} [rangeMaximum] The maximum value in the mapped range, 255 by default.
+ * @param {number} [rangeMaximum=255] The maximum value in the mapped range, 255 by default.
* @returns {number} A SNORM value, where 0 maps to -1.0 and rangeMaximum maps to 1.0.
+ *
* @see CesiumMath.fromSNorm
*/
CesiumMath.toSNorm = function (value, rangeMaximum) {
@@ -240,8 +243,9 @@ CesiumMath.toSNorm = function (value, rangeMaximum) {
/**
* Converts a SNORM value in the range [0, rangeMaximum] to a scalar in the range [-1.0, 1.0].
* @param {number} value SNORM value in the range [0, rangeMaximum]
- * @param {number} [rangeMaximum] The maximum value in the SNORM range, 255 by default.
+ * @param {number} [rangeMaximum=255] The maximum value in the SNORM range, 255 by default.
* @returns {number} Scalar in the range [-1.0, 1.0].
+ *
* @see CesiumMath.toSNorm
*/
CesiumMath.fromSNorm = function (value, rangeMaximum) {
@@ -272,16 +276,17 @@ CesiumMath.normalize = function (value, rangeMinimum, rangeMaximum) {
* where e is Euler's number, approximately 2.71828183.
*
* Special cases:
- *
- * If the argument is NaN, then the result is NaN.
+ *
+ * If the argument is NaN, then the result is NaN.
*
- * If the argument is infinite, then the result is an infinity
- * with the same sign as the argument.
+ * If the argument is infinite, then the result is an infinity
+ * with the same sign as the argument.
+ *
+ * If the argument is zero, then the result is a zero with the
+ * same sign as the argument.
+ *
+ *
*
- * If the argument is zero, then the result is a zero with the
- * same sign as the argument.
- *
- *
* @function
* @param {number} value The number whose hyperbolic sine is to be returned.
* @returns {number} The hyperbolic sine of value
.
@@ -297,14 +302,15 @@ CesiumMath.sinh = defaultValue(Math.sinh, function sinh(value) {
* where e is Euler's number, approximately 2.71828183.
*
* Special cases:
- *
- * If the argument is NaN, then the result is NaN.
+ *
+ * If the argument is NaN, then the result is NaN.
+ *
+ * If the argument is infinite, then the result is positive infinity.
*
- * If the argument is infinite, then the result is positive infinity.
+ * If the argument is zero, then the result is 1.0.
+ *
+ *
*
- * If the argument is zero, then the result is 1.0.
- *
- *
* @function
* @param {number} value The number whose hyperbolic cosine is to be returned.
* @returns {number} The hyperbolic cosine of value
.
@@ -315,10 +321,12 @@ CesiumMath.cosh = defaultValue(Math.cosh, function cosh(value) {
/**
* Computes the linear interpolation of two values.
+ *
* @param {number} p The start value to interpolate.
* @param {number} q The end value to interpolate.
* @param {number} time The time of interpolation generally in the range [0.0, 1.0]
.
* @returns {number} The linearly interpolated value.
+ *
* @example
* const n = Cesium.Math.lerp(0.0, 2.0, 0.5); // returns 1.0
*/
@@ -328,6 +336,7 @@ CesiumMath.lerp = function (p, q, time) {
/**
* pi
+ *
* @type {number}
* @constant
*/
@@ -335,6 +344,7 @@ CesiumMath.PI = Math.PI;
/**
* 1/pi
+ *
* @type {number}
* @constant
*/
@@ -342,6 +352,7 @@ CesiumMath.ONE_OVER_PI = 1.0 / Math.PI;
/**
* pi/2
+ *
* @type {number}
* @constant
*/
@@ -349,6 +360,7 @@ CesiumMath.PI_OVER_TWO = Math.PI / 2.0;
/**
* pi/3
+ *
* @type {number}
* @constant
*/
@@ -356,6 +368,7 @@ CesiumMath.PI_OVER_THREE = Math.PI / 3.0;
/**
* pi/4
+ *
* @type {number}
* @constant
*/
@@ -363,6 +376,7 @@ CesiumMath.PI_OVER_FOUR = Math.PI / 4.0;
/**
* pi/6
+ *
* @type {number}
* @constant
*/
@@ -370,6 +384,7 @@ CesiumMath.PI_OVER_SIX = Math.PI / 6.0;
/**
* 3pi/2
+ *
* @type {number}
* @constant
*/
@@ -377,6 +392,7 @@ CesiumMath.THREE_PI_OVER_TWO = (3.0 * Math.PI) / 2.0;
/**
* 2pi
+ *
* @type {number}
* @constant
*/
@@ -384,6 +400,7 @@ CesiumMath.TWO_PI = 2.0 * Math.PI;
/**
* 1/2pi
+ *
* @type {number}
* @constant
*/
@@ -391,6 +408,7 @@ CesiumMath.ONE_OVER_TWO_PI = 1.0 / (2.0 * Math.PI);
/**
* The number of radians in a degree.
+ *
* @type {number}
* @constant
*/
@@ -398,6 +416,7 @@ CesiumMath.RADIANS_PER_DEGREE = Math.PI / 180.0;
/**
* The number of degrees in a radian.
+ *
* @type {number}
* @constant
*/
@@ -405,6 +424,7 @@ CesiumMath.DEGREES_PER_RADIAN = 180.0 / Math.PI;
/**
* The number of radians in an arc second.
+ *
* @type {number}
* @constant
*/
@@ -440,8 +460,10 @@ CesiumMath.toDegrees = function (radians) {
/**
* Converts a longitude value, in radians, to the range [-Math.PI
, Math.PI
).
+ *
* @param {number} angle The longitude value, in radians, to convert to the range [-Math.PI
, Math.PI
).
* @returns {number} The equivalent longitude value in the range [-Math.PI
, Math.PI
).
+ *
* @example
* // Convert 270 degrees to -90 degrees longitude
* const longitude = Cesium.Math.convertLongitudeRange(Cesium.Math.toRadians(270.0));
@@ -469,8 +491,10 @@ CesiumMath.convertLongitudeRange = function (angle) {
/**
* Convenience function that clamps a latitude value, in radians, to the range [-Math.PI/2
, Math.PI/2
).
* Useful for sanitizing data before use in objects requiring correct range.
+ *
* @param {number} angle The latitude value, in radians, to clamp to the range [-Math.PI/2
, Math.PI/2
).
* @returns {number} The latitude value clamped to the range [-Math.PI/2
, Math.PI/2
).
+ *
* @example
* // Clamp 108 degrees latitude to 90 degrees latitude
* const latitude = Cesium.Math.clampToLatitudeRange(Cesium.Math.toRadians(108.0));
@@ -491,6 +515,7 @@ CesiumMath.clampToLatitudeRange = function (angle) {
/**
* Produces an angle in the range -Pi <= angle <= Pi which is equivalent to the provided angle.
+ *
* @param {number} angle in radians
* @returns {number} The angle in the range [-CesiumMath.PI
, CesiumMath.PI
].
*/
@@ -510,6 +535,7 @@ CesiumMath.negativePiToPi = function (angle) {
/**
* Produces an angle in the range 0 <= angle <= 2Pi which is equivalent to the provided angle.
+ *
* @param {number} angle in radians
* @returns {number} The angle in the range [0, CesiumMath.TWO_PI
].
*/
@@ -536,6 +562,7 @@ CesiumMath.zeroToTwoPi = function (angle) {
/**
* The modulo operation that also works for negative dividends.
+ *
* @param {number} m The dividend.
* @param {number} n The divisor.
* @returns {number} The remainder.
@@ -566,11 +593,13 @@ CesiumMath.mod = function (m, n) {
* to avoid problems due to roundoff error when comparing floating-point values directly. The values are
* first compared using an absolute tolerance test. If that fails, a relative tolerance test is performed.
* Use this test if you are unsure of the magnitudes of left and right.
+ *
* @param {number} left The first value to compare.
* @param {number} right The other value to compare.
- * @param {number} [relativeEpsilon] The maximum inclusive delta between left
and right
for the relative tolerance test.
- * @param {number} [absoluteEpsilon] The maximum inclusive delta between left
and right
for the absolute tolerance test.
+ * @param {number} [relativeEpsilon=0] The maximum inclusive delta between left
and right
for the relative tolerance test.
+ * @param {number} [absoluteEpsilon=relativeEpsilon] The maximum inclusive delta between left
and right
for the absolute tolerance test.
* @returns {boolean} true
if the values are equal within the epsilon; otherwise, false
.
+ *
* @example
* const a = Cesium.Math.equalsEpsilon(0.0, 0.01, Cesium.Math.EPSILON2); // true
* const b = Cesium.Math.equalsEpsilon(0.0, 0.1, Cesium.Math.EPSILON2); // false
@@ -604,6 +633,7 @@ CesiumMath.equalsEpsilon = function (
/**
* Determines if the left value is less than the right value. If the two values are within
* absoluteEpsilon
of each other, they are considered equal and this function returns false.
+ *
* @param {number} left The first number to compare.
* @param {number} right The second number to compare.
* @param {number} absoluteEpsilon The absolute epsilon to use in comparison.
@@ -629,6 +659,7 @@ CesiumMath.lessThan = function (left, right, absoluteEpsilon) {
/**
* Determines if the left value is less than or equal to the right value. If the two values are within
* absoluteEpsilon
of each other, they are considered equal and this function returns true.
+ *
* @param {number} left The first number to compare.
* @param {number} right The second number to compare.
* @param {number} absoluteEpsilon The absolute epsilon to use in comparison.
@@ -653,6 +684,7 @@ CesiumMath.lessThanOrEquals = function (left, right, absoluteEpsilon) {
/**
* Determines if the left value is greater the right value. If the two values are within
* absoluteEpsilon
of each other, they are considered equal and this function returns false.
+ *
* @param {number} left The first number to compare.
* @param {number} right The second number to compare.
* @param {number} absoluteEpsilon The absolute epsilon to use in comparison.
@@ -678,6 +710,7 @@ CesiumMath.greaterThan = function (left, right, absoluteEpsilon) {
/**
* Determines if the left value is greater than or equal to the right value. If the two values are within
* absoluteEpsilon
of each other, they are considered equal and this function returns true.
+ *
* @param {number} left The first number to compare.
* @param {number} right The second number to compare.
* @param {number} absoluteEpsilon The absolute epsilon to use in comparison.
@@ -703,12 +736,17 @@ const factorials = [1];
/**
* Computes the factorial of the provided number.
+ *
* @param {number} n The number whose factorial is to be computed.
* @returns {number} The factorial of the provided number or undefined if the number is less than 0.
- * @throws {DeveloperError} A number greater than or equal to 0 is required.
+ *
+ * @exception {DeveloperError} A number greater than or equal to 0 is required.
+ *
+ *
* @example
* //Compute 7!, which is equal to 5040
* const computedFactorial = Cesium.Math.factorial(7);
+ *
* @see {@link http://en.wikipedia.org/wiki/Factorial|Factorial on Wikipedia}
*/
CesiumMath.factorial = function (n) {
@@ -734,11 +772,14 @@ CesiumMath.factorial = function (n) {
/**
* Increments a number with a wrapping to a minimum value if the number exceeds the maximum value.
+ *
* @param {number} [n] The number to be incremented.
* @param {number} [maximumValue] The maximum incremented value before rolling over to the minimum value.
- * @param {number} [minimumValue] The number reset to after the maximum value has been exceeded.
+ * @param {number} [minimumValue=0.0] The number reset to after the maximum value has been exceeded.
* @returns {number} The incremented number.
- * @throws {DeveloperError} Maximum value must be greater than minimum value.
+ *
+ * @exception {DeveloperError} Maximum value must be greater than minimum value.
+ *
* @example
* const n = Cesium.Math.incrementWrap(5, 10, 0); // returns 6
* const m = Cesium.Math.incrementWrap(10, 10, 0); // returns 0
@@ -765,9 +806,12 @@ CesiumMath.incrementWrap = function (n, maximumValue, minimumValue) {
/**
* Determines if a non-negative integer is a power of two.
* The maximum allowed input is (2^32)-1 due to 32-bit bitwise operator limitation in Javascript.
+ *
* @param {number} n The integer to test in the range [0, (2^32)-1].
* @returns {boolean} true
if the number if a power of two; otherwise, false
.
- * @throws {DeveloperError} A number between 0 and (2^32)-1 is required.
+ *
+ * @exception {DeveloperError} A number between 0 and (2^32)-1 is required.
+ *
* @example
* const t = Cesium.Math.isPowerOfTwo(16); // true
* const f = Cesium.Math.isPowerOfTwo(20); // false
@@ -785,9 +829,12 @@ CesiumMath.isPowerOfTwo = function (n) {
/**
* Computes the next power-of-two integer greater than or equal to the provided non-negative integer.
* The maximum allowed input is 2^31 due to 32-bit bitwise operator limitation in Javascript.
+ *
* @param {number} n The integer to test in the range [0, 2^31].
* @returns {number} The next power-of-two integer.
- * @throws {DeveloperError} A number between 0 and 2^31 is required.
+ *
+ * @exception {DeveloperError} A number between 0 and 2^31 is required.
+ *
* @example
* const n = Cesium.Math.nextPowerOfTwo(29); // 32
* const m = Cesium.Math.nextPowerOfTwo(32); // 32
@@ -814,9 +861,12 @@ CesiumMath.nextPowerOfTwo = function (n) {
/**
* Computes the previous power-of-two integer less than or equal to the provided non-negative integer.
* The maximum allowed input is (2^32)-1 due to 32-bit bitwise operator limitation in Javascript.
+ *
* @param {number} n The integer to test in the range [0, (2^32)-1].
* @returns {number} The previous power-of-two integer.
- * @throws {DeveloperError} A number between 0 and (2^32)-1 is required.
+ *
+ * @exception {DeveloperError} A number between 0 and (2^32)-1 is required.
+ *
* @example
* const n = Cesium.Math.previousPowerOfTwo(29); // 16
* const m = Cesium.Math.previousPowerOfTwo(32); // 32
@@ -843,6 +893,7 @@ CesiumMath.previousPowerOfTwo = function (n) {
/**
* Constraint a value to lie between two values.
+ *
* @param {number} value The value to clamp.
* @param {number} min The minimum value.
* @param {number} max The maximum value.
@@ -863,6 +914,7 @@ let randomNumberGenerator = new MersenneTwister();
/**
* Sets the seed used by the random number generator
* in {@link CesiumMath#nextRandomNumber}.
+ *
* @param {number} seed An integer used as the seed.
*/
CesiumMath.setRandomNumberSeed = function (seed) {
@@ -878,7 +930,9 @@ CesiumMath.setRandomNumberSeed = function (seed) {
/**
* Generates a random floating point number in the range of [0.0, 1.0)
* using a Mersenne twister.
+ *
* @returns {number} A random number in the range of [0.0, 1.0).
+ *
* @see CesiumMath.setRandomNumberSeed
* @see {@link http://en.wikipedia.org/wiki/Mersenne_twister|Mersenne twister on Wikipedia}
*/
@@ -888,6 +942,7 @@ CesiumMath.nextRandomNumber = function () {
/**
* Generates a random number between two numbers.
+ *
* @param {number} min The minimum value.
* @param {number} max The maximum value.
* @returns {number} A random number between the min and max.
@@ -899,6 +954,7 @@ CesiumMath.randomBetween = function (min, max) {
/**
* Computes Math.acos(value)
, but first clamps value
to the range [-1.0, 1.0]
* so that the function will never return NaN.
+ *
* @param {number} value The value for which to compute acos.
* @returns {number} The acos of the value if the value is in the range [-1.0, 1.0], or the acos of -1.0 or 1.0,
* whichever is closer, if the value is outside the range.
@@ -915,6 +971,7 @@ CesiumMath.acosClamped = function (value) {
/**
* Computes Math.asin(value)
, but first clamps value
to the range [-1.0, 1.0]
* so that the function will never return NaN.
+ *
* @param {number} value The value for which to compute asin.
* @returns {number} The asin of the value if the value is in the range [-1.0, 1.0], or the asin of -1.0 or 1.0,
* whichever is closer, if the value is outside the range.
@@ -930,6 +987,7 @@ CesiumMath.asinClamped = function (value) {
/**
* Finds the chord length between two points given the circle's radius and the angle between the points.
+ *
* @param {number} angle The angle between the two points.
* @param {number} radius The radius of the circle.
* @returns {number} The chord length.
@@ -948,6 +1006,7 @@ CesiumMath.chordLength = function (angle, radius) {
/**
* Finds the logarithm of a number to a base.
+ *
* @param {number} number The number.
* @param {number} base The base.
* @returns {number} The result.
@@ -967,6 +1026,7 @@ CesiumMath.logBase = function (number, base) {
/**
* Finds the cube root of a number.
* Returns NaN if number
is not provided.
+ *
* @function
* @param {number} [number] The number.
* @returns {number} The result.
@@ -978,6 +1038,7 @@ CesiumMath.cbrt = defaultValue(Math.cbrt, function cbrt(number) {
/**
* Finds the base 2 logarithm of a number.
+ *
* @function
* @param {number} number The number.
* @returns {number} The result.
@@ -987,8 +1048,6 @@ CesiumMath.log2 = defaultValue(Math.log2, function log2(number) {
});
/**
- * @param distanceToCamera
- * @param density
* @private
*/
CesiumMath.fog = function (distanceToCamera, density) {
@@ -1003,6 +1062,7 @@ CesiumMath.fog = function (distanceToCamera, density) {
* which in turn is based on "Efficient approximations for the arctangent function,"
* Rajan, S. Sichun Wang Inkol, R. Joyal, A., May 2006.
* Adapted from ShaderFastLibs under MIT License.
+ *
* @param {number} x An input number in the range [-1, 1]
* @returns {number} An approximation of atan(x)
*/
@@ -1018,6 +1078,7 @@ CesiumMath.fastApproximateAtan = function (x) {
* Computes a fast approximation of Atan2(x, y) for arbitrary input scalars.
*
* Range reduction math based on nvidia's cg reference implementation: http://developer.download.nvidia.com/cg/atan2.html
+ *
* @param {number} x An input number that isn't zero if y is zero.
* @param {number} y An input number that isn't zero if x is zero.
* @returns {number} An approximation of atan2(x, y)
diff --git a/packages/engine/Source/Core/Matrix2.js b/packages/engine/Source/Core/Matrix2.js
index a75390436979..7f0cba621c0d 100644
--- a/packages/engine/Source/Core/Matrix2.js
+++ b/packages/engine/Source/Core/Matrix2.js
@@ -8,12 +8,14 @@ import DeveloperError from "./DeveloperError.js";
* A 2x2 matrix, indexable as a column-major order array.
* Constructor parameters are in row-major order for code readability.
* @alias Matrix2
- * @class
+ * @constructor
* @implements {ArrayLike}
- * @param {number} [column0Row0] The value for column 0, row 0.
- * @param {number} [column1Row0] The value for column 1, row 0.
- * @param {number} [column0Row1] The value for column 0, row 1.
- * @param {number} [column1Row1] The value for column 1, row 1.
+ *
+ * @param {number} [column0Row0=0.0] The value for column 0, row 0.
+ * @param {number} [column1Row0=0.0] The value for column 1, row 0.
+ * @param {number} [column0Row1=0.0] The value for column 0, row 1.
+ * @param {number} [column1Row1=0.0] The value for column 1, row 1.
+ *
* @see Matrix2.fromArray
* @see Matrix2.fromColumnMajorArray
* @see Matrix2.fromRowMajorArray
@@ -38,9 +40,11 @@ Matrix2.packedLength = 4;
/**
* Stores the provided instance into the provided array.
+ *
* @param {Matrix2} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
Matrix2.pack = function (value, array, startingIndex) {
@@ -61,8 +65,9 @@ Matrix2.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Matrix2} [result] The object into which to store the result.
* @returns {Matrix2} The modified result parameter or a new Matrix2 instance if one was not provided.
*/
@@ -87,6 +92,7 @@ Matrix2.unpack = function (array, startingIndex, result) {
/**
* Flattens an array of Matrix2s into an array of components. The components
* are stored in column-major order.
+ *
* @param {Matrix2[]} array The array of matrices to pack.
* @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 4 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 4) elements.
* @returns {number[]} The packed array.
@@ -118,6 +124,7 @@ Matrix2.packArray = function (array, result) {
/**
* Unpacks an array of column-major matrix components into an array of Matrix2s.
+ *
* @param {number[]} array The array of components to unpack.
* @param {Matrix2[]} [result] The array onto which to store the result.
* @returns {Matrix2[]} The unpacked array.
@@ -147,6 +154,7 @@ Matrix2.unpackArray = function (array, result) {
/**
* Duplicates a Matrix2 instance.
+ *
* @param {Matrix2} matrix The matrix to duplicate.
* @param {Matrix2} [result] The object onto which to store the result.
* @returns {Matrix2} The modified result parameter or a new Matrix2 instance if one was not provided. (Returns undefined if matrix is undefined)
@@ -167,11 +175,13 @@ Matrix2.clone = function (matrix, result) {
/**
* Creates a Matrix2 from 4 consecutive elements in an array.
+ *
* @function
* @param {number[]} array The array whose 4 consecutive elements correspond to the positions of the matrix. Assumes column-major order.
* @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to first column first row position in the matrix.
* @param {Matrix2} [result] The object onto which to store the result.
* @returns {Matrix2} The modified result parameter or a new Matrix2 instance if one was not provided.
+ *
* @example
* // Create the Matrix2:
* // [1.0, 2.0]
@@ -187,6 +197,7 @@ Matrix2.clone = function (matrix, result) {
Matrix2.fromArray = Matrix2.unpack;
/**
* Creates a Matrix2 instance from a column-major order array.
+ *
* @param {number[]} values The column-major order array.
* @param {Matrix2} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix2} The modified result parameter, or a new Matrix2 instance if one was not provided.
@@ -202,6 +213,7 @@ Matrix2.fromColumnMajorArray = function (values, result) {
/**
* Creates a Matrix2 instance from a row-major order array.
* The resulting matrix will be in column-major order.
+ *
* @param {number[]} values The row-major order array.
* @param {Matrix2} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix2} The modified result parameter, or a new Matrix2 instance if one was not provided.
@@ -223,9 +235,11 @@ Matrix2.fromRowMajorArray = function (values, result) {
/**
* Computes a Matrix2 instance representing a non-uniform scale.
+ *
* @param {Cartesian2} scale The x and y scale factors.
* @param {Matrix2} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix2} The modified result parameter, or a new Matrix2 instance if one was not provided.
+ *
* @example
* // Creates
* // [7.0, 0.0]
@@ -250,9 +264,11 @@ Matrix2.fromScale = function (scale, result) {
/**
* Computes a Matrix2 instance representing a uniform scale.
+ *
* @param {number} scale The uniform scale factor.
* @param {Matrix2} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix2} The modified result parameter, or a new Matrix2 instance if one was not provided.
+ *
* @example
* // Creates
* // [2.0, 0.0]
@@ -277,9 +293,11 @@ Matrix2.fromUniformScale = function (scale, result) {
/**
* Creates a rotation matrix.
+ *
* @param {number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.
* @param {Matrix2} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix2} The modified result parameter, or a new Matrix2 instance if one was not provided.
+ *
* @example
* // Rotate a point 45 degrees counterclockwise.
* const p = new Cesium.Cartesian2(5, 6);
@@ -307,6 +325,7 @@ Matrix2.fromRotation = function (angle, result) {
/**
* Creates an Array from the provided Matrix2 instance.
* The array will be in column-major order.
+ *
* @param {Matrix2} matrix The matrix to use..
* @param {number[]} [result] The Array onto which to store the result.
* @returns {number[]} The modified Array parameter or a new Array instance if one was not provided.
@@ -328,11 +347,14 @@ Matrix2.toArray = function (matrix, result) {
/**
* Computes the array index of the element at the provided row and column.
+ *
* @param {number} row The zero-based index of the row.
* @param {number} column The zero-based index of the column.
* @returns {number} The index of the element at the provided row and column.
- * @throws {DeveloperError} row must be 0 or 1.
- * @throws {DeveloperError} column must be 0 or 1.
+ *
+ * @exception {DeveloperError} row must be 0 or 1.
+ * @exception {DeveloperError} column must be 0 or 1.
+ *
* @example
* const myMatrix = new Cesium.Matrix2();
* const column1Row0Index = Cesium.Matrix2.getElementIndex(1, 0);
@@ -353,11 +375,13 @@ Matrix2.getElementIndex = function (column, row) {
/**
* Retrieves a copy of the matrix column at the provided index as a Cartesian2 instance.
+ *
* @param {Matrix2} matrix The matrix to use.
* @param {number} index The zero-based index of the column to retrieve.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter.
- * @throws {DeveloperError} index must be 0 or 1.
+ *
+ * @exception {DeveloperError} index must be 0 or 1.
*/
Matrix2.getColumn = function (matrix, index, result) {
//>>includeStart('debug', pragmas.debug);
@@ -380,12 +404,14 @@ Matrix2.getColumn = function (matrix, index, result) {
/**
* Computes a new matrix that replaces the specified column in the provided matrix with the provided Cartesian2 instance.
+ *
* @param {Matrix2} matrix The matrix to use.
* @param {number} index The zero-based index of the column to set.
* @param {Cartesian2} cartesian The Cartesian whose values will be assigned to the specified column.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
- * @throws {DeveloperError} index must be 0 or 1.
+ *
+ * @exception {DeveloperError} index must be 0 or 1.
*/
Matrix2.setColumn = function (matrix, index, cartesian, result) {
//>>includeStart('debug', pragmas.debug);
@@ -407,11 +433,13 @@ Matrix2.setColumn = function (matrix, index, cartesian, result) {
/**
* Retrieves a copy of the matrix row at the provided index as a Cartesian2 instance.
+ *
* @param {Matrix2} matrix The matrix to use.
* @param {number} index The zero-based index of the row to retrieve.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter.
- * @throws {DeveloperError} index must be 0 or 1.
+ *
+ * @exception {DeveloperError} index must be 0 or 1.
*/
Matrix2.getRow = function (matrix, index, result) {
//>>includeStart('debug', pragmas.debug);
@@ -433,12 +461,14 @@ Matrix2.getRow = function (matrix, index, result) {
/**
* Computes a new matrix that replaces the specified row in the provided matrix with the provided Cartesian2 instance.
+ *
* @param {Matrix2} matrix The matrix to use.
* @param {number} index The zero-based index of the row to set.
* @param {Cartesian2} cartesian The Cartesian whose values will be assigned to the specified row.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
- * @throws {DeveloperError} index must be 0 or 1.
+ *
+ * @exception {DeveloperError} index must be 0 or 1.
*/
Matrix2.setRow = function (matrix, index, cartesian, result) {
//>>includeStart('debug', pragmas.debug);
@@ -462,10 +492,12 @@ const scaleScratch1 = new Cartesian2();
/**
* Computes a new matrix that replaces the scale with the provided scale.
* This assumes the matrix is an affine transformation.
+ *
* @param {Matrix2} matrix The matrix to use.
* @param {Cartesian2} scale The scale that replaces the scale of the provided matrix.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
+ *
* @see Matrix2.setUniformScale
* @see Matrix2.fromScale
* @see Matrix2.fromUniformScale
@@ -497,10 +529,12 @@ const scaleScratch2 = new Cartesian2();
/**
* Computes a new matrix that replaces the scale with the provided uniform scale.
* This assumes the matrix is an affine transformation.
+ *
* @param {Matrix2} matrix The matrix to use.
* @param {number} scale The uniform scale that replaces the scale of the provided matrix.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
+ *
* @see Matrix2.setScale
* @see Matrix2.fromScale
* @see Matrix2.fromUniformScale
@@ -531,9 +565,11 @@ const scratchColumn = new Cartesian2();
/**
* Extracts the non-uniform scale assuming the matrix is an affine transformation.
+ *
* @param {Matrix2} matrix The matrix.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter.
+ *
* @see Matrix2.multiplyByScale
* @see Matrix2.multiplyByUniformScale
* @see Matrix2.fromScale
@@ -561,6 +597,7 @@ const scaleScratch3 = new Cartesian2();
/**
* Computes the maximum scale assuming the matrix is an affine transformation.
* The maximum scale is the maximum length of the column vectors.
+ *
* @param {Matrix2} matrix The matrix.
* @returns {number} The maximum scale.
*/
@@ -573,10 +610,12 @@ const scaleScratch4 = new Cartesian2();
/**
* Sets the rotation assuming the matrix is an affine transformation.
+ *
* @param {Matrix2} matrix The matrix.
* @param {Matrix2} rotation The rotation matrix.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
+ *
* @see Matrix2.fromRotation
* @see Matrix2.getRotation
*/
@@ -600,9 +639,11 @@ const scaleScratch5 = new Cartesian2();
/**
* Extracts the rotation matrix assuming the matrix is an affine transformation.
+ *
* @param {Matrix2} matrix The matrix.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
+ *
* @see Matrix2.setRotation
* @see Matrix2.fromRotation
*/
@@ -624,6 +665,7 @@ Matrix2.getRotation = function (matrix, result) {
/**
* Computes the product of two matrices.
+ *
* @param {Matrix2} left The first matrix.
* @param {Matrix2} right The second matrix.
* @param {Matrix2} result The object onto which to store the result.
@@ -650,6 +692,7 @@ Matrix2.multiply = function (left, right, result) {
/**
* Computes the sum of two matrices.
+ *
* @param {Matrix2} left The first matrix.
* @param {Matrix2} right The second matrix.
* @param {Matrix2} result The object onto which to store the result.
@@ -671,6 +714,7 @@ Matrix2.add = function (left, right, result) {
/**
* Computes the difference of two matrices.
+ *
* @param {Matrix2} left The first matrix.
* @param {Matrix2} right The second matrix.
* @param {Matrix2} result The object onto which to store the result.
@@ -692,6 +736,7 @@ Matrix2.subtract = function (left, right, result) {
/**
* Computes the product of a matrix and a column vector.
+ *
* @param {Matrix2} matrix The matrix.
* @param {Cartesian2} cartesian The column.
* @param {Cartesian2} result The object onto which to store the result.
@@ -714,6 +759,7 @@ Matrix2.multiplyByVector = function (matrix, cartesian, result) {
/**
* Computes the product of a matrix and a scalar.
+ *
* @param {Matrix2} matrix The matrix.
* @param {number} scalar The number to multiply by.
* @param {Matrix2} result The object onto which to store the result.
@@ -735,13 +781,17 @@ Matrix2.multiplyByScalar = function (matrix, scalar, result) {
/**
* Computes the product of a matrix times a (non-uniform) scale, as if the scale were a scale matrix.
+ *
* @param {Matrix2} matrix The matrix on the left-hand side.
* @param {Cartesian2} scale The non-uniform scale on the right-hand side.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
+ *
+ *
* @example
* // Instead of Cesium.Matrix2.multiply(m, Cesium.Matrix2.fromScale(scale), m);
* Cesium.Matrix2.multiplyByScale(m, scale, m);
+ *
* @see Matrix2.multiplyByUniformScale
* @see Matrix2.fromScale
* @see Matrix2.fromUniformScale
@@ -766,13 +816,16 @@ Matrix2.multiplyByScale = function (matrix, scale, result) {
/**
* Computes the product of a matrix times a uniform scale, as if the scale were a scale matrix.
+ *
* @param {Matrix2} matrix The matrix on the left-hand side.
* @param {number} scale The uniform scale on the right-hand side.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
+ *
* @example
* // Instead of Cesium.Matrix2.multiply(m, Cesium.Matrix2.fromUniformScale(scale), m);
* Cesium.Matrix2.multiplyByUniformScale(m, scale, m);
+ *
* @see Matrix2.multiplyByScale
* @see Matrix2.fromScale
* @see Matrix2.fromUniformScale
@@ -797,6 +850,7 @@ Matrix2.multiplyByUniformScale = function (matrix, scale, result) {
/**
* Creates a negated copy of the provided matrix.
+ *
* @param {Matrix2} matrix The matrix to negate.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
@@ -816,6 +870,7 @@ Matrix2.negate = function (matrix, result) {
/**
* Computes the transpose of the provided matrix.
+ *
* @param {Matrix2} matrix The matrix to transpose.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
@@ -840,6 +895,7 @@ Matrix2.transpose = function (matrix, result) {
/**
* Computes a matrix, which contains the absolute (unsigned) values of the provided matrix's elements.
+ *
* @param {Matrix2} matrix The matrix with signed elements.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
@@ -861,6 +917,7 @@ Matrix2.abs = function (matrix, result) {
/**
* Compares the provided matrices componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {Matrix2} [left] The first matrix.
* @param {Matrix2} [right] The second matrix.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -878,9 +935,6 @@ Matrix2.equals = function (left, right) {
};
/**
- * @param matrix
- * @param array
- * @param offset
* @private
*/
Matrix2.equalsArray = function (matrix, array, offset) {
@@ -896,9 +950,10 @@ Matrix2.equalsArray = function (matrix, array, offset) {
* Compares the provided matrices componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
+ *
* @param {Matrix2} [left] The first matrix.
* @param {Matrix2} [right] The second matrix.
- * @param {number} [epsilon] The epsilon to use for equality testing.
+ * @param {number} [epsilon=0] The epsilon to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
*/
Matrix2.equalsEpsilon = function (left, right, epsilon) {
@@ -916,6 +971,7 @@ Matrix2.equalsEpsilon = function (left, right, epsilon) {
/**
* An immutable Matrix2 instance initialized to the identity matrix.
+ *
* @type {Matrix2}
* @constant
*/
@@ -923,6 +979,7 @@ Matrix2.IDENTITY = Object.freeze(new Matrix2(1.0, 0.0, 0.0, 1.0));
/**
* An immutable Matrix2 instance initialized to the zero matrix.
+ *
* @type {Matrix2}
* @constant
*/
@@ -930,8 +987,10 @@ Matrix2.ZERO = Object.freeze(new Matrix2(0.0, 0.0, 0.0, 0.0));
/**
* The index into Matrix2 for column 0, row 0.
+ *
* @type {number}
* @constant
+ *
* @example
* const matrix = new Cesium.Matrix2();
* matrix[Cesium.Matrix2.COLUMN0ROW0] = 5.0; // set column 0, row 0 to 5.0
@@ -940,8 +999,10 @@ Matrix2.COLUMN0ROW0 = 0;
/**
* The index into Matrix2 for column 0, row 1.
+ *
* @type {number}
* @constant
+ *
* @example
* const matrix = new Cesium.Matrix2();
* matrix[Cesium.Matrix2.COLUMN0ROW1] = 5.0; // set column 0, row 1 to 5.0
@@ -950,8 +1011,10 @@ Matrix2.COLUMN0ROW1 = 1;
/**
* The index into Matrix2 for column 1, row 0.
+ *
* @type {number}
* @constant
+ *
* @example
* const matrix = new Cesium.Matrix2();
* matrix[Cesium.Matrix2.COLUMN1ROW0] = 5.0; // set column 1, row 0 to 5.0
@@ -960,8 +1023,10 @@ Matrix2.COLUMN1ROW0 = 2;
/**
* The index into Matrix2 for column 1, row 1.
+ *
* @type {number}
* @constant
+ *
* @example
* const matrix = new Cesium.Matrix2();
* matrix[Cesium.Matrix2.COLUMN1ROW1] = 5.0; // set column 1, row 1 to 5.0
@@ -972,6 +1037,7 @@ Object.defineProperties(Matrix2.prototype, {
/**
* Gets the number of items in the collection.
* @memberof Matrix2.prototype
+ *
* @type {number}
*/
length: {
@@ -983,6 +1049,7 @@ Object.defineProperties(Matrix2.prototype, {
/**
* Duplicates the provided Matrix2 instance.
+ *
* @param {Matrix2} [result] The object onto which to store the result.
* @returns {Matrix2} The modified result parameter or a new Matrix2 instance if one was not provided.
*/
@@ -993,6 +1060,7 @@ Matrix2.prototype.clone = function (result) {
/**
* Compares this matrix to the provided matrix componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {Matrix2} [right] The right hand side matrix.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -1004,8 +1072,9 @@ Matrix2.prototype.equals = function (right) {
* Compares this matrix to the provided matrix componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
+ *
* @param {Matrix2} [right] The right hand side matrix.
- * @param {number} [epsilon] The epsilon to use for equality testing.
+ * @param {number} [epsilon=0] The epsilon to use for equality testing.
* @returns {boolean} true
if they are within the provided epsilon, false
otherwise.
*/
Matrix2.prototype.equalsEpsilon = function (right, epsilon) {
@@ -1015,6 +1084,7 @@ Matrix2.prototype.equalsEpsilon = function (right, epsilon) {
/**
* Creates a string representing this Matrix with each row being
* on a separate line and in the format '(column0, column1)'.
+ *
* @returns {string} A string representing the provided Matrix with each row being on a separate line and in the format '(column0, column1)'.
*/
Matrix2.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/Matrix3.js b/packages/engine/Source/Core/Matrix3.js
index 0b3d563a8dc1..80b4a5185c24 100644
--- a/packages/engine/Source/Core/Matrix3.js
+++ b/packages/engine/Source/Core/Matrix3.js
@@ -9,17 +9,19 @@ import CesiumMath from "./Math.js";
* A 3x3 matrix, indexable as a column-major order array.
* Constructor parameters are in row-major order for code readability.
* @alias Matrix3
- * @class
+ * @constructor
* @implements {ArrayLike}
- * @param {number} [column0Row0] The value for column 0, row 0.
- * @param {number} [column1Row0] The value for column 1, row 0.
- * @param {number} [column2Row0] The value for column 2, row 0.
- * @param {number} [column0Row1] The value for column 0, row 1.
- * @param {number} [column1Row1] The value for column 1, row 1.
- * @param {number} [column2Row1] The value for column 2, row 1.
- * @param {number} [column0Row2] The value for column 0, row 2.
- * @param {number} [column1Row2] The value for column 1, row 2.
+ *
+ * @param {number} [column0Row0=0.0] The value for column 0, row 0.
+ * @param {number} [column1Row0=0.0] The value for column 1, row 0.
+ * @param {number} [column2Row0=0.0] The value for column 2, row 0.
+ * @param {number} [column0Row1=0.0] The value for column 0, row 1.
+ * @param {number} [column1Row1=0.0] The value for column 1, row 1.
+ * @param {number} [column2Row1=0.0] The value for column 2, row 1.
+ * @param {number} [column0Row2=0.0] The value for column 0, row 2.
+ * @param {number} [column1Row2=0.0] The value for column 1, row 2.
* @param {number} [column2Row2=0.0] The value for column 2, row 2.
+ *
* @see Matrix3.fromArray
* @see Matrix3.fromColumnMajorArray
* @see Matrix3.fromRowMajorArray
@@ -64,9 +66,11 @@ Matrix3.packedLength = 9;
/**
* Stores the provided instance into the provided array.
+ *
* @param {Matrix3} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
Matrix3.pack = function (value, array, startingIndex) {
@@ -92,8 +96,9 @@ Matrix3.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Matrix3} [result] The object into which to store the result.
* @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided.
*/
@@ -123,6 +128,7 @@ Matrix3.unpack = function (array, startingIndex, result) {
/**
* Flattens an array of Matrix3s into an array of components. The components
* are stored in column-major order.
+ *
* @param {Matrix3[]} array The array of matrices to pack.
* @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 9 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 9) elements.
* @returns {number[]} The packed array.
@@ -154,6 +160,7 @@ Matrix3.packArray = function (array, result) {
/**
* Unpacks an array of column-major matrix components into an array of Matrix3s.
+ *
* @param {number[]} array The array of components to unpack.
* @param {Matrix3[]} [result] The array onto which to store the result.
* @returns {Matrix3[]} The unpacked array.
@@ -183,6 +190,7 @@ Matrix3.unpackArray = function (array, result) {
/**
* Duplicates a Matrix3 instance.
+ *
* @param {Matrix3} matrix The matrix to duplicate.
* @param {Matrix3} [result] The object onto which to store the result.
* @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided. (Returns undefined if matrix is undefined)
@@ -218,11 +226,13 @@ Matrix3.clone = function (matrix, result) {
/**
* Creates a Matrix3 from 9 consecutive elements in an array.
+ *
* @function
* @param {number[]} array The array whose 9 consecutive elements correspond to the positions of the matrix. Assumes column-major order.
* @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to first column first row position in the matrix.
* @param {Matrix3} [result] The object onto which to store the result.
* @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided.
+ *
* @example
* // Create the Matrix3:
* // [1.0, 2.0, 3.0]
@@ -240,6 +250,7 @@ Matrix3.fromArray = Matrix3.unpack;
/**
* Creates a Matrix3 instance from a column-major order array.
+ *
* @param {number[]} values The column-major order array.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
@@ -255,6 +266,7 @@ Matrix3.fromColumnMajorArray = function (values, result) {
/**
* Creates a Matrix3 instance from a row-major order array.
* The resulting matrix will be in column-major order.
+ *
* @param {number[]} values The row-major order array.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
@@ -291,6 +303,7 @@ Matrix3.fromRowMajorArray = function (values, result) {
/**
* Computes a 3x3 rotation matrix from the provided quaternion.
+ *
* @param {Quaternion} quaternion the quaternion to use.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The 3x3 rotation matrix from this quaternion.
@@ -340,6 +353,7 @@ Matrix3.fromQuaternion = function (quaternion, result) {
/**
* Computes a 3x3 rotation matrix from the provided headingPitchRoll. (see http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles )
+ *
* @param {HeadingPitchRoll} headingPitchRoll the headingPitchRoll to use.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The 3x3 rotation matrix from this headingPitchRoll.
@@ -385,9 +399,11 @@ Matrix3.fromHeadingPitchRoll = function (headingPitchRoll, result) {
/**
* Computes a Matrix3 instance representing a non-uniform scale.
+ *
* @param {Cartesian3} scale The x, y, and z scale factors.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
+ *
* @example
* // Creates
* // [7.0, 0.0, 0.0]
@@ -418,9 +434,11 @@ Matrix3.fromScale = function (scale, result) {
/**
* Computes a Matrix3 instance representing a uniform scale.
+ *
* @param {number} scale The uniform scale factor.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
+ *
* @example
* // Creates
* // [2.0, 0.0, 0.0]
@@ -451,9 +469,11 @@ Matrix3.fromUniformScale = function (scale, result) {
/**
* Computes a Matrix3 instance representing the cross product equivalent matrix of a Cartesian3 vector.
+ *
* @param {Cartesian3} vector the vector on the left hand side of the cross product operation.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
+ *
* @example
* // Creates
* // [0.0, -9.0, 8.0]
@@ -494,9 +514,11 @@ Matrix3.fromCrossProduct = function (vector, result) {
/**
* Creates a rotation matrix around the x-axis.
+ *
* @param {number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
+ *
* @example
* // Rotate a point 45 degrees counterclockwise around the x-axis.
* const p = new Cesium.Cartesian3(5, 6, 7);
@@ -540,9 +562,11 @@ Matrix3.fromRotationX = function (angle, result) {
/**
* Creates a rotation matrix around the y-axis.
+ *
* @param {number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
+ *
* @example
* // Rotate a point 45 degrees counterclockwise around the y-axis.
* const p = new Cesium.Cartesian3(5, 6, 7);
@@ -586,9 +610,11 @@ Matrix3.fromRotationY = function (angle, result) {
/**
* Creates a rotation matrix around the z-axis.
+ *
* @param {number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
+ *
* @example
* // Rotate a point 45 degrees counterclockwise around the z-axis.
* const p = new Cesium.Cartesian3(5, 6, 7);
@@ -633,6 +659,7 @@ Matrix3.fromRotationZ = function (angle, result) {
/**
* Creates an Array from the provided Matrix3 instance.
* The array will be in column-major order.
+ *
* @param {Matrix3} matrix The matrix to use..
* @param {number[]} [result] The Array onto which to store the result.
* @returns {number[]} The modified Array parameter or a new Array instance if one was not provided.
@@ -669,11 +696,14 @@ Matrix3.toArray = function (matrix, result) {
/**
* Computes the array index of the element at the provided row and column.
+ *
* @param {number} column The zero-based index of the column.
* @param {number} row The zero-based index of the row.
* @returns {number} The index of the element at the provided row and column.
- * @throws {DeveloperError} row must be 0, 1, or 2.
- * @throws {DeveloperError} column must be 0, 1, or 2.
+ *
+ * @exception {DeveloperError} row must be 0, 1, or 2.
+ * @exception {DeveloperError} column must be 0, 1, or 2.
+ *
* @example
* const myMatrix = new Cesium.Matrix3();
* const column1Row0Index = Cesium.Matrix3.getElementIndex(1, 0);
@@ -693,11 +723,13 @@ Matrix3.getElementIndex = function (column, row) {
/**
* Retrieves a copy of the matrix column at the provided index as a Cartesian3 instance.
+ *
* @param {Matrix3} matrix The matrix to use.
* @param {number} index The zero-based index of the column to retrieve.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
- * @throws {DeveloperError} index must be 0, 1, or 2.
+ *
+ * @exception {DeveloperError} index must be 0, 1, or 2.
*/
Matrix3.getColumn = function (matrix, index, result) {
//>>includeStart('debug', pragmas.debug);
@@ -720,12 +752,14 @@ Matrix3.getColumn = function (matrix, index, result) {
/**
* Computes a new matrix that replaces the specified column in the provided matrix with the provided Cartesian3 instance.
+ *
* @param {Matrix3} matrix The matrix to use.
* @param {number} index The zero-based index of the column to set.
* @param {Cartesian3} cartesian The Cartesian whose values will be assigned to the specified column.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- * @throws {DeveloperError} index must be 0, 1, or 2.
+ *
+ * @exception {DeveloperError} index must be 0, 1, or 2.
*/
Matrix3.setColumn = function (matrix, index, cartesian, result) {
//>>includeStart('debug', pragmas.debug);
@@ -746,11 +780,13 @@ Matrix3.setColumn = function (matrix, index, cartesian, result) {
/**
* Retrieves a copy of the matrix row at the provided index as a Cartesian3 instance.
+ *
* @param {Matrix3} matrix The matrix to use.
* @param {number} index The zero-based index of the row to retrieve.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
- * @throws {DeveloperError} index must be 0, 1, or 2.
+ *
+ * @exception {DeveloperError} index must be 0, 1, or 2.
*/
Matrix3.getRow = function (matrix, index, result) {
//>>includeStart('debug', pragmas.debug);
@@ -772,12 +808,14 @@ Matrix3.getRow = function (matrix, index, result) {
/**
* Computes a new matrix that replaces the specified row in the provided matrix with the provided Cartesian3 instance.
+ *
* @param {Matrix3} matrix The matrix to use.
* @param {number} index The zero-based index of the row to set.
* @param {Cartesian3} cartesian The Cartesian whose values will be assigned to the specified row.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- * @throws {DeveloperError} index must be 0, 1, or 2.
+ *
+ * @exception {DeveloperError} index must be 0, 1, or 2.
*/
Matrix3.setRow = function (matrix, index, cartesian, result) {
//>>includeStart('debug', pragmas.debug);
@@ -800,10 +838,12 @@ const scaleScratch1 = new Cartesian3();
/**
* Computes a new matrix that replaces the scale with the provided scale.
* This assumes the matrix is an affine transformation.
+ *
* @param {Matrix3} matrix The matrix to use.
* @param {Cartesian3} scale The scale that replaces the scale of the provided matrix.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
+ *
* @see Matrix3.setUniformScale
* @see Matrix3.fromScale
* @see Matrix3.fromUniformScale
@@ -841,10 +881,12 @@ const scaleScratch2 = new Cartesian3();
/**
* Computes a new matrix that replaces the scale with the provided uniform scale.
* This assumes the matrix is an affine transformation.
+ *
* @param {Matrix3} matrix The matrix to use.
* @param {number} scale The uniform scale that replaces the scale of the provided matrix.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
+ *
* @see Matrix3.setScale
* @see Matrix3.fromScale
* @see Matrix3.fromUniformScale
@@ -881,9 +923,11 @@ const scratchColumn = new Cartesian3();
/**
* Extracts the non-uniform scale assuming the matrix is an affine transformation.
+ *
* @param {Matrix3} matrix The matrix.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
+ *
* @see Matrix3.multiplyByScale
* @see Matrix3.multiplyByUniformScale
* @see Matrix3.fromScale
@@ -914,6 +958,7 @@ const scaleScratch3 = new Cartesian3();
/**
* Computes the maximum scale assuming the matrix is an affine transformation.
* The maximum scale is the maximum length of the column vectors.
+ *
* @param {Matrix3} matrix The matrix.
* @returns {number} The maximum scale.
*/
@@ -926,10 +971,12 @@ const scaleScratch4 = new Cartesian3();
/**
* Sets the rotation assuming the matrix is an affine transformation.
+ *
* @param {Matrix3} matrix The matrix.
* @param {Matrix3} rotation The rotation matrix.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
+ *
* @see Matrix3.getRotation
*/
Matrix3.setRotation = function (matrix, rotation, result) {
@@ -957,9 +1004,11 @@ const scaleScratch5 = new Cartesian3();
/**
* Extracts the rotation matrix assuming the matrix is an affine transformation.
+ *
* @param {Matrix3} matrix The matrix.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
+ *
* @see Matrix3.setRotation
*/
Matrix3.getRotation = function (matrix, result) {
@@ -985,6 +1034,7 @@ Matrix3.getRotation = function (matrix, result) {
/**
* Computes the product of two matrices.
+ *
* @param {Matrix3} left The first matrix.
* @param {Matrix3} right The second matrix.
* @param {Matrix3} result The object onto which to store the result.
@@ -1032,6 +1082,7 @@ Matrix3.multiply = function (left, right, result) {
/**
* Computes the sum of two matrices.
+ *
* @param {Matrix3} left The first matrix.
* @param {Matrix3} right The second matrix.
* @param {Matrix3} result The object onto which to store the result.
@@ -1058,6 +1109,7 @@ Matrix3.add = function (left, right, result) {
/**
* Computes the difference of two matrices.
+ *
* @param {Matrix3} left The first matrix.
* @param {Matrix3} right The second matrix.
* @param {Matrix3} result The object onto which to store the result.
@@ -1084,6 +1136,7 @@ Matrix3.subtract = function (left, right, result) {
/**
* Computes the product of a matrix and a column vector.
+ *
* @param {Matrix3} matrix The matrix.
* @param {Cartesian3} cartesian The column.
* @param {Cartesian3} result The object onto which to store the result.
@@ -1112,6 +1165,7 @@ Matrix3.multiplyByVector = function (matrix, cartesian, result) {
/**
* Computes the product of a matrix and a scalar.
+ *
* @param {Matrix3} matrix The matrix.
* @param {number} scalar The number to multiply by.
* @param {Matrix3} result The object onto which to store the result.
@@ -1138,13 +1192,17 @@ Matrix3.multiplyByScalar = function (matrix, scalar, result) {
/**
* Computes the product of a matrix times a (non-uniform) scale, as if the scale were a scale matrix.
+ *
* @param {Matrix3} matrix The matrix on the left-hand side.
* @param {Cartesian3} scale The non-uniform scale on the right-hand side.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
+ *
+ *
* @example
* // Instead of Cesium.Matrix3.multiply(m, Cesium.Matrix3.fromScale(scale), m);
* Cesium.Matrix3.multiplyByScale(m, scale, m);
+ *
* @see Matrix3.multiplyByUniformScale
* @see Matrix3.fromScale
* @see Matrix3.fromUniformScale
@@ -1174,13 +1232,16 @@ Matrix3.multiplyByScale = function (matrix, scale, result) {
/**
* Computes the product of a matrix times a uniform scale, as if the scale were a scale matrix.
+ *
* @param {Matrix3} matrix The matrix on the left-hand side.
* @param {number} scale The uniform scale on the right-hand side.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
+ *
* @example
* // Instead of Cesium.Matrix3.multiply(m, Cesium.Matrix3.fromUniformScale(scale), m);
* Cesium.Matrix3.multiplyByUniformScale(m, scale, m);
+ *
* @see Matrix3.multiplyByScale
* @see Matrix3.fromScale
* @see Matrix3.fromUniformScale
@@ -1210,6 +1271,7 @@ Matrix3.multiplyByUniformScale = function (matrix, scale, result) {
/**
* Creates a negated copy of the provided matrix.
+ *
* @param {Matrix3} matrix The matrix to negate.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
@@ -1234,6 +1296,7 @@ Matrix3.negate = function (matrix, result) {
/**
* Computes the transpose of the provided matrix.
+ *
* @param {Matrix3} matrix The matrix to transpose.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
@@ -1364,9 +1427,11 @@ const jMatrixTranspose = new Matrix3();
* The values along the diagonal of the diagonal matrix are the eigenvalues. The columns
* of the unitary matrix are the corresponding eigenvectors.
*
+ *
* @param {Matrix3} matrix The matrix to decompose into diagonal and unitary matrix. Expected to be symmetric.
* @param {object} [result] An object with unitary and diagonal properties which are matrices onto which to store the result.
* @returns {object} An object with unitary and diagonal properties which are the unitary and diagonal matrices, respectively.
+ *
* @example
* const a = //... symetric matrix
* const result = {
@@ -1427,6 +1492,7 @@ Matrix3.computeEigenDecomposition = function (matrix, result) {
/**
* Computes a matrix, which contains the absolute (unsigned) values of the provided matrix's elements.
+ *
* @param {Matrix3} matrix The matrix with signed elements.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
@@ -1452,6 +1518,7 @@ Matrix3.abs = function (matrix, result) {
/**
* Computes the determinant of the provided matrix.
+ *
* @param {Matrix3} matrix The matrix to use.
* @returns {number} The value of the determinant of the matrix.
*/
@@ -1479,10 +1546,12 @@ Matrix3.determinant = function (matrix) {
/**
* Computes the inverse of the provided matrix.
+ *
* @param {Matrix3} matrix The matrix to invert.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- * @throws {DeveloperError} matrix is not invertible.
+ *
+ * @exception {DeveloperError} matrix is not invertible.
*/
Matrix3.inverse = function (matrix, result) {
//>>includeStart('debug', pragmas.debug);
@@ -1526,6 +1595,7 @@ const scratchTransposeMatrix = new Matrix3();
/**
* Computes the inverse transpose of a matrix.
+ *
* @param {Matrix3} matrix The matrix to transpose and invert.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
@@ -1545,6 +1615,7 @@ Matrix3.inverseTranspose = function (matrix, result) {
/**
* Compares the provided matrices componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {Matrix3} [left] The first matrix.
* @param {Matrix3} [right] The second matrix.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -1570,9 +1641,10 @@ Matrix3.equals = function (left, right) {
* Compares the provided matrices componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
+ *
* @param {Matrix3} [left] The first matrix.
* @param {Matrix3} [right] The second matrix.
- * @param {number} [epsilon] The epsilon to use for equality testing.
+ * @param {number} [epsilon=0] The epsilon to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
*/
Matrix3.equalsEpsilon = function (left, right, epsilon) {
@@ -1596,6 +1668,7 @@ Matrix3.equalsEpsilon = function (left, right, epsilon) {
/**
* An immutable Matrix3 instance initialized to the identity matrix.
+ *
* @type {Matrix3}
* @constant
*/
@@ -1605,6 +1678,7 @@ Matrix3.IDENTITY = Object.freeze(
/**
* An immutable Matrix3 instance initialized to the zero matrix.
+ *
* @type {Matrix3}
* @constant
*/
@@ -1614,6 +1688,7 @@ Matrix3.ZERO = Object.freeze(
/**
* The index into Matrix3 for column 0, row 0.
+ *
* @type {number}
* @constant
*/
@@ -1621,6 +1696,7 @@ Matrix3.COLUMN0ROW0 = 0;
/**
* The index into Matrix3 for column 0, row 1.
+ *
* @type {number}
* @constant
*/
@@ -1628,6 +1704,7 @@ Matrix3.COLUMN0ROW1 = 1;
/**
* The index into Matrix3 for column 0, row 2.
+ *
* @type {number}
* @constant
*/
@@ -1635,6 +1712,7 @@ Matrix3.COLUMN0ROW2 = 2;
/**
* The index into Matrix3 for column 1, row 0.
+ *
* @type {number}
* @constant
*/
@@ -1642,6 +1720,7 @@ Matrix3.COLUMN1ROW0 = 3;
/**
* The index into Matrix3 for column 1, row 1.
+ *
* @type {number}
* @constant
*/
@@ -1649,6 +1728,7 @@ Matrix3.COLUMN1ROW1 = 4;
/**
* The index into Matrix3 for column 1, row 2.
+ *
* @type {number}
* @constant
*/
@@ -1656,6 +1736,7 @@ Matrix3.COLUMN1ROW2 = 5;
/**
* The index into Matrix3 for column 2, row 0.
+ *
* @type {number}
* @constant
*/
@@ -1663,6 +1744,7 @@ Matrix3.COLUMN2ROW0 = 6;
/**
* The index into Matrix3 for column 2, row 1.
+ *
* @type {number}
* @constant
*/
@@ -1670,6 +1752,7 @@ Matrix3.COLUMN2ROW1 = 7;
/**
* The index into Matrix3 for column 2, row 2.
+ *
* @type {number}
* @constant
*/
@@ -1679,6 +1762,7 @@ Object.defineProperties(Matrix3.prototype, {
/**
* Gets the number of items in the collection.
* @memberof Matrix3.prototype
+ *
* @type {number}
*/
length: {
@@ -1690,6 +1774,7 @@ Object.defineProperties(Matrix3.prototype, {
/**
* Duplicates the provided Matrix3 instance.
+ *
* @param {Matrix3} [result] The object onto which to store the result.
* @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided.
*/
@@ -1700,6 +1785,7 @@ Matrix3.prototype.clone = function (result) {
/**
* Compares this matrix to the provided matrix componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {Matrix3} [right] The right hand side matrix.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -1708,9 +1794,6 @@ Matrix3.prototype.equals = function (right) {
};
/**
- * @param matrix
- * @param array
- * @param offset
* @private
*/
Matrix3.equalsArray = function (matrix, array, offset) {
@@ -1731,8 +1814,9 @@ Matrix3.equalsArray = function (matrix, array, offset) {
* Compares this matrix to the provided matrix componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
+ *
* @param {Matrix3} [right] The right hand side matrix.
- * @param {number} [epsilon] The epsilon to use for equality testing.
+ * @param {number} [epsilon=0] The epsilon to use for equality testing.
* @returns {boolean} true
if they are within the provided epsilon, false
otherwise.
*/
Matrix3.prototype.equalsEpsilon = function (right, epsilon) {
@@ -1742,6 +1826,7 @@ Matrix3.prototype.equalsEpsilon = function (right, epsilon) {
/**
* Creates a string representing this Matrix with each row being
* on a separate line and in the format '(column0, column1, column2)'.
+ *
* @returns {string} A string representing the provided Matrix with each row being on a separate line and in the format '(column0, column1, column2)'.
*/
Matrix3.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/Matrix4.js b/packages/engine/Source/Core/Matrix4.js
index 7d520e5d525e..ecdaa3c0d001 100644
--- a/packages/engine/Source/Core/Matrix4.js
+++ b/packages/engine/Source/Core/Matrix4.js
@@ -12,16 +12,17 @@ import RuntimeError from "./RuntimeError.js";
* A 4x4 matrix, indexable as a column-major order array.
* Constructor parameters are in row-major order for code readability.
* @alias Matrix4
- * @class
+ * @constructor
* @implements {ArrayLike}
- * @param {number} [column0Row0] The value for column 0, row 0.
- * @param {number} [column1Row0] The value for column 1, row 0.
- * @param {number} [column2Row0] The value for column 2, row 0.
- * @param {number} [column3Row0] The value for column 3, row 0.
- * @param {number} [column0Row1] The value for column 0, row 1.
- * @param {number} [column1Row1] The value for column 1, row 1.
- * @param {number} [column2Row1] The value for column 2, row 1.
- * @param {number} [column3Row1] The value for column 3, row 1.
+ *
+ * @param {number} [column0Row0=0.0] The value for column 0, row 0.
+ * @param {number} [column1Row0=0.0] The value for column 1, row 0.
+ * @param {number} [column2Row0=0.0] The value for column 2, row 0.
+ * @param {number} [column3Row0=0.0] The value for column 3, row 0.
+ * @param {number} [column0Row1=0.0] The value for column 0, row 1.
+ * @param {number} [column1Row1=0.0] The value for column 1, row 1.
+ * @param {number} [column2Row1=0.0] The value for column 2, row 1.
+ * @param {number} [column3Row1=0.0] The value for column 3, row 1.
* @param {number} [column0Row2=0.0] The value for column 0, row 2.
* @param {number} [column1Row2=0.0] The value for column 1, row 2.
* @param {number} [column2Row2=0.0] The value for column 2, row 2.
@@ -30,6 +31,7 @@ import RuntimeError from "./RuntimeError.js";
* @param {number} [column1Row3=0.0] The value for column 1, row 3.
* @param {number} [column2Row3=0.0] The value for column 2, row 3.
* @param {number} [column3Row3=0.0] The value for column 3, row 3.
+ *
* @see Matrix4.fromArray
* @see Matrix4.fromColumnMajorArray
* @see Matrix4.fromRowMajorArray
@@ -95,9 +97,11 @@ Matrix4.packedLength = 16;
/**
* Stores the provided instance into the provided array.
+ *
* @param {Matrix4} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
Matrix4.pack = function (value, array, startingIndex) {
@@ -130,8 +134,9 @@ Matrix4.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Matrix4} [result] The object into which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided.
*/
@@ -168,6 +173,7 @@ Matrix4.unpack = function (array, startingIndex, result) {
/**
* Flattens an array of Matrix4s into an array of components. The components
* are stored in column-major order.
+ *
* @param {Matrix4[]} array The array of matrices to pack.
* @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 16 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 16) elements.
* @returns {number[]} The packed array.
@@ -199,6 +205,7 @@ Matrix4.packArray = function (array, result) {
/**
* Unpacks an array of column-major matrix components into an array of Matrix4s.
+ *
* @param {number[]} array The array of components to unpack.
* @param {Matrix4[]} [result] The array onto which to store the result.
* @returns {Matrix4[]} The unpacked array.
@@ -228,6 +235,7 @@ Matrix4.unpackArray = function (array, result) {
/**
* Duplicates a Matrix4 instance.
+ *
* @param {Matrix4} matrix The matrix to duplicate.
* @param {Matrix4} [result] The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided. (Returns undefined if matrix is undefined)
@@ -278,10 +286,12 @@ Matrix4.clone = function (matrix, result) {
/**
* Creates a Matrix4 from 16 consecutive elements in an array.
* @function
+ *
* @param {number[]} array The array whose 16 consecutive elements correspond to the positions of the matrix. Assumes column-major order.
* @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to first column first row position in the matrix.
* @param {Matrix4} [result] The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided.
+ *
* @example
* // Create the Matrix4:
* // [1.0, 2.0, 3.0, 4.0]
@@ -300,6 +310,7 @@ Matrix4.fromArray = Matrix4.unpack;
/**
* Computes a Matrix4 instance from a column-major order array.
+ *
* @param {number[]} values The column-major order array.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
@@ -315,6 +326,7 @@ Matrix4.fromColumnMajorArray = function (values, result) {
/**
* Computes a Matrix4 instance from a row-major order array.
* The resulting matrix will be in column-major order.
+ *
* @param {number[]} values The row-major order array.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
@@ -366,8 +378,9 @@ Matrix4.fromRowMajorArray = function (values, result) {
/**
* Computes a Matrix4 instance from a Matrix3 representing the rotation
* and a Cartesian3 representing the translation.
+ *
* @param {Matrix3} rotation The upper left portion of the matrix representing the rotation.
- * @param {Cartesian3} [translation] The upper right portion of the matrix representing the translation.
+ * @param {Cartesian3} [translation=Cartesian3.ZERO] The upper right portion of the matrix representing the translation.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
*/
@@ -421,11 +434,13 @@ Matrix4.fromRotationTranslation = function (rotation, translation, result) {
/**
* Computes a Matrix4 instance from a translation, rotation, and scale (TRS)
* representation with the rotation represented as a quaternion.
+ *
* @param {Cartesian3} translation The translation transformation.
* @param {Quaternion} rotation The rotation transformation.
* @param {Cartesian3} scale The non-uniform scale transformation.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
+ *
* @example
* const result = Cesium.Matrix4.fromTranslationQuaternionRotationScale(
* new Cesium.Cartesian3(1.0, 2.0, 3.0), // translation
@@ -498,6 +513,7 @@ Matrix4.fromTranslationQuaternionRotationScale = function (
/**
* Creates a Matrix4 instance from a {@link TranslationRotationScale} instance.
+ *
* @param {TranslationRotationScale} translationRotationScale The instance.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
@@ -520,9 +536,11 @@ Matrix4.fromTranslationRotationScale = function (
/**
* Creates a Matrix4 instance from a Cartesian3 representing the translation.
+ *
* @param {Cartesian3} translation The upper right portion of the matrix representing the translation.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
+ *
* @see Matrix4.multiplyByTranslation
*/
Matrix4.fromTranslation = function (translation, result) {
@@ -535,9 +553,11 @@ Matrix4.fromTranslation = function (translation, result) {
/**
* Computes a Matrix4 instance representing a non-uniform scale.
+ *
* @param {Cartesian3} scale The x, y, and z scale factors.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
+ *
* @example
* // Creates
* // [7.0, 0.0, 0.0, 0.0]
@@ -593,9 +613,11 @@ Matrix4.fromScale = function (scale, result) {
/**
* Computes a Matrix4 instance representing a uniform scale.
+ *
* @param {number} scale The uniform scale factor.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
+ *
* @example
* // Creates
* // [2.0, 0.0, 0.0, 0.0]
@@ -651,6 +673,7 @@ Matrix4.fromUniformScale = function (scale, result) {
/**
* Creates a rotation matrix.
+ *
* @param {Matrix3} rotation The rotation matrix.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
@@ -692,6 +715,7 @@ const fromCameraU = new Cartesian3();
/**
* Computes a Matrix4 instance from a Camera.
+ *
* @param {Camera} camera The camera to use.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
@@ -793,16 +817,18 @@ Matrix4.fromCamera = function (camera, result) {
/**
* Computes a Matrix4 instance representing a perspective transformation matrix.
+ *
* @param {number} fovY The field of view along the Y axis in radians.
* @param {number} aspectRatio The aspect ratio.
* @param {number} near The distance to the near plane in meters.
* @param {number} far The distance to the far plane in meters.
* @param {Matrix4} result The object in which the result will be stored.
* @returns {Matrix4} The modified result parameter.
- * @throws {DeveloperError} fovY must be in (0, PI].
- * @throws {DeveloperError} aspectRatio must be greater than zero.
- * @throws {DeveloperError} near must be greater than zero.
- * @throws {DeveloperError} far must be greater than zero.
+ *
+ * @exception {DeveloperError} fovY must be in (0, PI].
+ * @exception {DeveloperError} aspectRatio must be greater than zero.
+ * @exception {DeveloperError} near must be greater than zero.
+ * @exception {DeveloperError} far must be greater than zero.
*/
Matrix4.computePerspectiveFieldOfView = function (
fovY,
@@ -847,6 +873,7 @@ Matrix4.computePerspectiveFieldOfView = function (
/**
* Computes a Matrix4 instance representing an orthographic transformation matrix.
+ *
* @param {number} left The number of meters to the left of the camera that will be in view.
* @param {number} right The number of meters to the right of the camera that will be in view.
* @param {number} bottom The number of meters below of the camera that will be in view.
@@ -907,6 +934,7 @@ Matrix4.computeOrthographicOffCenter = function (
/**
* Computes a Matrix4 instance representing an off center perspective transformation.
+ *
* @param {number} left The number of meters to the left of the camera that will be in view.
* @param {number} right The number of meters to the right of the camera that will be in view.
* @param {number} bottom The number of meters below of the camera that will be in view.
@@ -964,6 +992,7 @@ Matrix4.computePerspectiveOffCenter = function (
/**
* Computes a Matrix4 instance representing an infinite off center perspective transformation.
+ *
* @param {number} left The number of meters to the left of the camera that will be in view.
* @param {number} right The number of meters to the right of the camera that will be in view.
* @param {number} bottom The number of meters below of the camera that will be in view.
@@ -1018,11 +1047,13 @@ Matrix4.computeInfinitePerspectiveOffCenter = function (
/**
* Computes a Matrix4 instance that transforms from normalized device coordinates to window coordinates.
- * @param {object} [viewport] The viewport's corners as shown in Example 1.
- * @param {number} [nearDepthRange] The near plane distance in window coordinates.
- * @param {number} [farDepthRange] The far plane distance in window coordinates.
+ *
+ * @param {object} [viewport = { x : 0.0, y : 0.0, width : 0.0, height : 0.0 }] The viewport's corners as shown in Example 1.
+ * @param {number} [nearDepthRange=0.0] The near plane distance in window coordinates.
+ * @param {number} [farDepthRange=1.0] The far plane distance in window coordinates.
* @param {Matrix4} [result] The object in which the result will be stored.
* @returns {Matrix4} The modified result parameter.
+ *
* @example
* // Create viewport transformation using an explicit viewport and depth range.
* const m = Cesium.Matrix4.computeViewportTransformation({
@@ -1084,6 +1115,7 @@ Matrix4.computeViewportTransformation = function (
/**
* Computes a Matrix4 instance that transforms from world space to view space.
+ *
* @param {Cartesian3} position The position of the camera.
* @param {Cartesian3} direction The forward direction.
* @param {Cartesian3} up The up direction.
@@ -1122,9 +1154,11 @@ Matrix4.computeView = function (position, direction, up, right, result) {
/**
* Computes an Array from the provided Matrix4 instance.
* The array will be in column-major order.
+ *
* @param {Matrix4} matrix The matrix to use..
* @param {number[]} [result] The Array onto which to store the result.
* @returns {number[]} The modified Array parameter or a new Array instance if one was not provided.
+ *
* @example
* //create an array from an instance of Matrix4
* // m = [10.0, 14.0, 18.0, 22.0]
@@ -1182,11 +1216,14 @@ Matrix4.toArray = function (matrix, result) {
/**
* Computes the array index of the element at the provided row and column.
+ *
* @param {number} row The zero-based index of the row.
* @param {number} column The zero-based index of the column.
* @returns {number} The index of the element at the provided row and column.
- * @throws {DeveloperError} row must be 0, 1, 2, or 3.
- * @throws {DeveloperError} column must be 0, 1, 2, or 3.
+ *
+ * @exception {DeveloperError} row must be 0, 1, 2, or 3.
+ * @exception {DeveloperError} column must be 0, 1, 2, or 3.
+ *
* @example
* const myMatrix = new Cesium.Matrix4();
* const column1Row0Index = Cesium.Matrix4.getElementIndex(1, 0);
@@ -1207,11 +1244,14 @@ Matrix4.getElementIndex = function (column, row) {
/**
* Retrieves a copy of the matrix column at the provided index as a Cartesian4 instance.
+ *
* @param {Matrix4} matrix The matrix to use.
* @param {number} index The zero-based index of the column to retrieve.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
- * @throws {DeveloperError} index must be 0, 1, 2, or 3.
+ *
+ * @exception {DeveloperError} index must be 0, 1, 2, or 3.
+ *
* @example
* //returns a Cartesian4 instance with values from the specified column
* // m = [10.0, 11.0, 12.0, 13.0]
@@ -1221,6 +1261,7 @@ Matrix4.getElementIndex = function (column, row) {
*
* //Example 1: Creates an instance of Cartesian
* const a = Cesium.Matrix4.getColumn(m, 2, new Cesium.Cartesian4());
+ *
* @example
* //Example 2: Sets values for Cartesian instance
* const a = new Cesium.Cartesian4();
@@ -1253,12 +1294,15 @@ Matrix4.getColumn = function (matrix, index, result) {
/**
* Computes a new matrix that replaces the specified column in the provided matrix with the provided Cartesian4 instance.
+ *
* @param {Matrix4} matrix The matrix to use.
* @param {number} index The zero-based index of the column to set.
* @param {Cartesian4} cartesian The Cartesian whose values will be assigned to the specified column.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- * @throws {DeveloperError} index must be 0, 1, 2, or 3.
+ *
+ * @exception {DeveloperError} index must be 0, 1, 2, or 3.
+ *
* @example
* //creates a new Matrix4 instance with new column values from the Cartesian4 instance
* // m = [10.0, 11.0, 12.0, 13.0]
@@ -1296,11 +1340,14 @@ Matrix4.setColumn = function (matrix, index, cartesian, result) {
/**
* Retrieves a copy of the matrix row at the provided index as a Cartesian4 instance.
+ *
* @param {Matrix4} matrix The matrix to use.
* @param {number} index The zero-based index of the row to retrieve.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
- * @throws {DeveloperError} index must be 0, 1, 2, or 3.
+ *
+ * @exception {DeveloperError} index must be 0, 1, 2, or 3.
+ *
* @example
* //returns a Cartesian4 instance with values from the specified column
* // m = [10.0, 11.0, 12.0, 13.0]
@@ -1310,6 +1357,7 @@ Matrix4.setColumn = function (matrix, index, cartesian, result) {
*
* //Example 1: Returns an instance of Cartesian
* const a = Cesium.Matrix4.getRow(m, 2, new Cesium.Cartesian4());
+ *
* @example
* //Example 2: Sets values for a Cartesian instance
* const a = new Cesium.Cartesian4();
@@ -1341,12 +1389,15 @@ Matrix4.getRow = function (matrix, index, result) {
/**
* Computes a new matrix that replaces the specified row in the provided matrix with the provided Cartesian4 instance.
+ *
* @param {Matrix4} matrix The matrix to use.
* @param {number} index The zero-based index of the row to set.
* @param {Cartesian4} cartesian The Cartesian whose values will be assigned to the specified row.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- * @throws {DeveloperError} index must be 0, 1, 2, or 3.
+ *
+ * @exception {DeveloperError} index must be 0, 1, 2, or 3.
+ *
* @example
* //create a new Matrix4 instance with new row values from the Cartesian4 instance
* // m = [10.0, 11.0, 12.0, 13.0]
@@ -1384,6 +1435,7 @@ Matrix4.setRow = function (matrix, index, cartesian, result) {
/**
* Computes a new matrix that replaces the translation in the rightmost column of the provided
* matrix with the provided translation. This assumes the matrix is an affine transformation.
+ *
* @param {Matrix4} matrix The matrix to use.
* @param {Cartesian3} translation The translation that replaces the translation of the provided matrix.
* @param {Matrix4} result The object onto which to store the result.
@@ -1424,10 +1476,12 @@ const scaleScratch1 = new Cartesian3();
/**
* Computes a new matrix that replaces the scale with the provided scale.
* This assumes the matrix is an affine transformation.
+ *
* @param {Matrix4} matrix The matrix to use.
* @param {Cartesian3} scale The scale that replaces the scale of the provided matrix.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
+ *
* @see Matrix4.setUniformScale
* @see Matrix4.fromScale
* @see Matrix4.fromUniformScale
@@ -1475,10 +1529,12 @@ const scaleScratch2 = new Cartesian3();
/**
* Computes a new matrix that replaces the scale with the provided uniform scale.
* This assumes the matrix is an affine transformation.
+ *
* @param {Matrix4} matrix The matrix to use.
* @param {number} scale The uniform scale that replaces the scale of the provided matrix.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
+ *
* @see Matrix4.setScale
* @see Matrix4.fromScale
* @see Matrix4.fromUniformScale
@@ -1525,9 +1581,11 @@ const scratchColumn = new Cartesian3();
/**
* Extracts the non-uniform scale assuming the matrix is an affine transformation.
+ *
* @param {Matrix4} matrix The matrix.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter
+ *
* @see Matrix4.multiplyByScale
* @see Matrix4.multiplyByUniformScale
* @see Matrix4.fromScale
@@ -1559,6 +1617,7 @@ const scaleScratch3 = new Cartesian3();
* Computes the maximum scale assuming the matrix is an affine transformation.
* The maximum scale is the maximum length of the column vectors in the upper-left
* 3x3 matrix.
+ *
* @param {Matrix4} matrix The matrix.
* @returns {number} The maximum scale.
*/
@@ -1571,10 +1630,12 @@ const scaleScratch4 = new Cartesian3();
/**
* Sets the rotation assuming the matrix is an affine transformation.
+ *
* @param {Matrix4} matrix The matrix.
* @param {Matrix3} rotation The rotation matrix.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
+ *
* @see Matrix4.fromRotation
* @see Matrix4.getRotation
*/
@@ -1613,9 +1674,11 @@ const scaleScratch5 = new Cartesian3();
/**
* Extracts the rotation matrix assuming the matrix is an affine transformation.
+ *
* @param {Matrix4} matrix The matrix.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
+ *
* @see Matrix4.setRotation
* @see Matrix4.fromRotation
*/
@@ -1644,6 +1707,7 @@ Matrix4.getRotation = function (matrix, result) {
/**
* Computes the product of two matrices.
+ *
* @param {Matrix4} left The first matrix.
* @param {Matrix4} right The second matrix.
* @param {Matrix4} result The object onto which to store the result.
@@ -1747,6 +1811,7 @@ Matrix4.multiply = function (left, right, result) {
/**
* Computes the sum of two matrices.
+ *
* @param {Matrix4} left The first matrix.
* @param {Matrix4} right The second matrix.
* @param {Matrix4} result The object onto which to store the result.
@@ -1780,6 +1845,7 @@ Matrix4.add = function (left, right, result) {
/**
* Computes the difference of two matrices.
+ *
* @param {Matrix4} left The first matrix.
* @param {Matrix4} right The second matrix.
* @param {Matrix4} result The object onto which to store the result.
@@ -1819,10 +1885,12 @@ Matrix4.subtract = function (left, right, result) {
* The matrix is not verified to be in the proper form.
* This method is faster than computing the product for general 4x4
* matrices using {@link Matrix4.multiply}.
+ *
* @param {Matrix4} left The first matrix.
* @param {Matrix4} right The second matrix.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
+ *
* @example
* const m1 = new Cesium.Matrix4(1.0, 6.0, 7.0, 0.0, 2.0, 5.0, 8.0, 0.0, 3.0, 4.0, 9.0, 0.0, 0.0, 0.0, 0.0, 1.0);
* const m2 = Cesium.Transforms.eastNorthUpToFixedFrame(new Cesium.Cartesian3(1.0, 1.0, 1.0));
@@ -1903,10 +1971,12 @@ Matrix4.multiplyTransformation = function (left, right, result) {
* Multiplies a transformation matrix (with a bottom row of [0.0, 0.0, 0.0, 1.0]
)
* by a 3x3 rotation matrix. This is an optimization
* for Matrix4.multiply(m, Matrix4.fromRotationTranslation(rotation), m);
with less allocations and arithmetic operations.
+ *
* @param {Matrix4} matrix The matrix on the left-hand side.
* @param {Matrix3} rotation The 3x3 rotation matrix on the right-hand side.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
+ *
* @example
* // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromRotationTranslation(rotation), m);
* Cesium.Matrix4.multiplyByMatrix3(m, rotation, m);
@@ -1973,10 +2043,12 @@ Matrix4.multiplyByMatrix3 = function (matrix, rotation, result) {
* Multiplies a transformation matrix (with a bottom row of [0.0, 0.0, 0.0, 1.0]
)
* by an implicit translation matrix defined by a {@link Cartesian3}. This is an optimization
* for Matrix4.multiply(m, Matrix4.fromTranslation(position), m);
with less allocations and arithmetic operations.
+ *
* @param {Matrix4} matrix The matrix on the left-hand side.
* @param {Cartesian3} translation The translation on the right-hand side.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
+ *
* @example
* // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromTranslation(position), m);
* Cesium.Matrix4.multiplyByTranslation(m, position, m);
@@ -2021,13 +2093,17 @@ Matrix4.multiplyByTranslation = function (matrix, translation, result) {
* for Matrix4.multiply(m, Matrix4.fromUniformScale(scale), m);
, where
* m
must be an affine matrix.
* This function performs fewer allocations and arithmetic operations.
+ *
* @param {Matrix4} matrix The affine matrix on the left-hand side.
* @param {Cartesian3} scale The non-uniform scale on the right-hand side.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
+ *
+ *
* @example
* // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromScale(scale), m);
* Cesium.Matrix4.multiplyByScale(m, scale, m);
+ *
* @see Matrix4.multiplyByUniformScale
* @see Matrix4.fromScale
* @see Matrix4.fromUniformScale
@@ -2076,13 +2152,16 @@ Matrix4.multiplyByScale = function (matrix, scale, result) {
/**
* Computes the product of a matrix times a uniform scale, as if the scale were a scale matrix.
+ *
* @param {Matrix4} matrix The matrix on the left-hand side.
* @param {number} scale The uniform scale on the right-hand side.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
+ *
* @example
* // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromUniformScale(scale), m);
* Cesium.Matrix4.multiplyByUniformScale(m, scale, m);
+ *
* @see Matrix4.multiplyByScale
* @see Matrix4.fromScale
* @see Matrix4.fromUniformScale
@@ -2122,6 +2201,7 @@ Matrix4.multiplyByUniformScale = function (matrix, scale, result) {
/**
* Computes the product of a matrix and a column vector.
+ *
* @param {Matrix4} matrix The matrix.
* @param {Cartesian4} cartesian The vector.
* @param {Cartesian4} result The object onto which to store the result.
@@ -2154,10 +2234,12 @@ Matrix4.multiplyByVector = function (matrix, cartesian, result) {
/**
* Computes the product of a matrix and a {@link Cartesian3}. This is equivalent to calling {@link Matrix4.multiplyByVector}
* with a {@link Cartesian4} with a w
component of zero.
+ *
* @param {Matrix4} matrix The matrix.
* @param {Cartesian3} cartesian The point.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
+ *
* @example
* const p = new Cesium.Cartesian3(1.0, 2.0, 3.0);
* const result = Cesium.Matrix4.multiplyByPointAsVector(matrix, p, new Cesium.Cartesian3());
@@ -2189,10 +2271,12 @@ Matrix4.multiplyByPointAsVector = function (matrix, cartesian, result) {
/**
* Computes the product of a matrix and a {@link Cartesian3}. This is equivalent to calling {@link Matrix4.multiplyByVector}
* with a {@link Cartesian4} with a w
component of 1, but returns a {@link Cartesian3} instead of a {@link Cartesian4}.
+ *
* @param {Matrix4} matrix The matrix.
* @param {Cartesian3} cartesian The point.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
+ *
* @example
* const p = new Cesium.Cartesian3(1.0, 2.0, 3.0);
* const result = Cesium.Matrix4.multiplyByPoint(matrix, p, new Cesium.Cartesian3());
@@ -2220,10 +2304,12 @@ Matrix4.multiplyByPoint = function (matrix, cartesian, result) {
/**
* Computes the product of a matrix and a scalar.
+ *
* @param {Matrix4} matrix The matrix.
* @param {number} scalar The number to multiply by.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
+ *
* @example
* //create a Matrix4 instance which is a scaled version of the supplied Matrix4
* // m = [10.0, 11.0, 12.0, 13.0]
@@ -2267,9 +2353,11 @@ Matrix4.multiplyByScalar = function (matrix, scalar, result) {
/**
* Computes a negated copy of the provided matrix.
+ *
* @param {Matrix4} matrix The matrix to negate.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
+ *
* @example
* //create a new Matrix4 instance which is a negation of a Matrix4
* // m = [10.0, 11.0, 12.0, 13.0]
@@ -2312,9 +2400,11 @@ Matrix4.negate = function (matrix, result) {
/**
* Computes the transpose of the provided matrix.
+ *
* @param {Matrix4} matrix The matrix to transpose.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
+ *
* @example
* //returns transpose of a Matrix4
* // m = [10.0, 11.0, 12.0, 13.0]
@@ -2364,6 +2454,7 @@ Matrix4.transpose = function (matrix, result) {
/**
* Computes a matrix, which contains the absolute (unsigned) values of the provided matrix's elements.
+ *
* @param {Matrix4} matrix The matrix with signed elements.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
@@ -2397,9 +2488,11 @@ Matrix4.abs = function (matrix, result) {
/**
* Compares the provided matrices componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {Matrix4} [left] The first matrix.
* @param {Matrix4} [right] The second matrix.
* @returns {boolean} true
if left and right are equal, false
otherwise.
+ *
* @example
* //compares two Matrix4 instances
*
@@ -2456,10 +2549,12 @@ Matrix4.equals = function (left, right) {
* Compares the provided matrices componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
+ *
* @param {Matrix4} [left] The first matrix.
* @param {Matrix4} [right] The second matrix.
- * @param {number} [epsilon] The epsilon to use for equality testing.
+ * @param {number} [epsilon=0] The epsilon to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
+ *
* @example
* //compares two Matrix4 instances
*
@@ -2509,6 +2604,7 @@ Matrix4.equalsEpsilon = function (left, right, epsilon) {
/**
* Gets the translation portion of the provided matrix, assuming the matrix is an affine transformation matrix.
+ *
* @param {Matrix4} matrix The matrix to use.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
@@ -2527,9 +2623,11 @@ Matrix4.getTranslation = function (matrix, result) {
/**
* Gets the upper left 3x3 matrix of the provided matrix.
+ *
* @param {Matrix4} matrix The matrix to use.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
+ *
* @example
* // returns a Matrix3 instance from a Matrix4 instance
*
@@ -2573,10 +2671,12 @@ const scratchExpectedBottomRow = new Cartesian4(0.0, 0.0, 0.0, 1.0);
* If the determinant is zero, the matrix can not be inverted, and an exception is thrown.
* If the matrix is a proper rigid transformation, it is more efficient
* to invert it with {@link Matrix4.inverseTransformation}.
+ *
* @param {Matrix4} matrix The matrix to invert.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- * @throws {RuntimeError} matrix is not invertible because its determinate is zero.
+ *
+ * @exception {RuntimeError} matrix is not invertible because its determinate is zero.
*/
Matrix4.inverse = function (matrix, result) {
//>>includeStart('debug', pragmas.debug);
@@ -2787,6 +2887,7 @@ Matrix4.inverse = function (matrix, result) {
* The matrix is not verified to be in the proper form.
* This method is faster than computing the inverse for a general 4x4
* matrix using {@link Matrix4.inverse}.
+ *
* @param {Matrix4} matrix The matrix to invert.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
@@ -2844,6 +2945,7 @@ const scratchTransposeMatrix = new Matrix4();
/**
* Computes the inverse transpose of a matrix.
+ *
* @param {Matrix4} matrix The matrix to transpose and invert.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
@@ -2862,6 +2964,7 @@ Matrix4.inverseTranspose = function (matrix, result) {
/**
* An immutable Matrix4 instance initialized to the identity matrix.
+ *
* @type {Matrix4}
* @constant
*/
@@ -2888,6 +2991,7 @@ Matrix4.IDENTITY = Object.freeze(
/**
* An immutable Matrix4 instance initialized to the zero matrix.
+ *
* @type {Matrix4}
* @constant
*/
@@ -2914,6 +3018,7 @@ Matrix4.ZERO = Object.freeze(
/**
* The index into Matrix4 for column 0, row 0.
+ *
* @type {number}
* @constant
*/
@@ -2921,6 +3026,7 @@ Matrix4.COLUMN0ROW0 = 0;
/**
* The index into Matrix4 for column 0, row 1.
+ *
* @type {number}
* @constant
*/
@@ -2928,6 +3034,7 @@ Matrix4.COLUMN0ROW1 = 1;
/**
* The index into Matrix4 for column 0, row 2.
+ *
* @type {number}
* @constant
*/
@@ -2935,6 +3042,7 @@ Matrix4.COLUMN0ROW2 = 2;
/**
* The index into Matrix4 for column 0, row 3.
+ *
* @type {number}
* @constant
*/
@@ -2942,6 +3050,7 @@ Matrix4.COLUMN0ROW3 = 3;
/**
* The index into Matrix4 for column 1, row 0.
+ *
* @type {number}
* @constant
*/
@@ -2949,6 +3058,7 @@ Matrix4.COLUMN1ROW0 = 4;
/**
* The index into Matrix4 for column 1, row 1.
+ *
* @type {number}
* @constant
*/
@@ -2956,6 +3066,7 @@ Matrix4.COLUMN1ROW1 = 5;
/**
* The index into Matrix4 for column 1, row 2.
+ *
* @type {number}
* @constant
*/
@@ -2963,6 +3074,7 @@ Matrix4.COLUMN1ROW2 = 6;
/**
* The index into Matrix4 for column 1, row 3.
+ *
* @type {number}
* @constant
*/
@@ -2970,6 +3082,7 @@ Matrix4.COLUMN1ROW3 = 7;
/**
* The index into Matrix4 for column 2, row 0.
+ *
* @type {number}
* @constant
*/
@@ -2977,6 +3090,7 @@ Matrix4.COLUMN2ROW0 = 8;
/**
* The index into Matrix4 for column 2, row 1.
+ *
* @type {number}
* @constant
*/
@@ -2984,6 +3098,7 @@ Matrix4.COLUMN2ROW1 = 9;
/**
* The index into Matrix4 for column 2, row 2.
+ *
* @type {number}
* @constant
*/
@@ -2991,6 +3106,7 @@ Matrix4.COLUMN2ROW2 = 10;
/**
* The index into Matrix4 for column 2, row 3.
+ *
* @type {number}
* @constant
*/
@@ -2998,6 +3114,7 @@ Matrix4.COLUMN2ROW3 = 11;
/**
* The index into Matrix4 for column 3, row 0.
+ *
* @type {number}
* @constant
*/
@@ -3005,6 +3122,7 @@ Matrix4.COLUMN3ROW0 = 12;
/**
* The index into Matrix4 for column 3, row 1.
+ *
* @type {number}
* @constant
*/
@@ -3012,6 +3130,7 @@ Matrix4.COLUMN3ROW1 = 13;
/**
* The index into Matrix4 for column 3, row 2.
+ *
* @type {number}
* @constant
*/
@@ -3019,6 +3138,7 @@ Matrix4.COLUMN3ROW2 = 14;
/**
* The index into Matrix4 for column 3, row 3.
+ *
* @type {number}
* @constant
*/
@@ -3028,6 +3148,7 @@ Object.defineProperties(Matrix4.prototype, {
/**
* Gets the number of items in the collection.
* @memberof Matrix4.prototype
+ *
* @type {number}
*/
length: {
@@ -3039,6 +3160,7 @@ Object.defineProperties(Matrix4.prototype, {
/**
* Duplicates the provided Matrix4 instance.
+ *
* @param {Matrix4} [result] The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided.
*/
@@ -3049,6 +3171,7 @@ Matrix4.prototype.clone = function (result) {
/**
* Compares this matrix to the provided matrix componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {Matrix4} [right] The right hand side matrix.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -3057,9 +3180,6 @@ Matrix4.prototype.equals = function (right) {
};
/**
- * @param matrix
- * @param array
- * @param offset
* @private
*/
Matrix4.equalsArray = function (matrix, array, offset) {
@@ -3087,8 +3207,9 @@ Matrix4.equalsArray = function (matrix, array, offset) {
* Compares this matrix to the provided matrix componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
+ *
* @param {Matrix4} [right] The right hand side matrix.
- * @param {number} [epsilon] The epsilon to use for equality testing.
+ * @param {number} [epsilon=0] The epsilon to use for equality testing.
* @returns {boolean} true
if they are within the provided epsilon, false
otherwise.
*/
Matrix4.prototype.equalsEpsilon = function (right, epsilon) {
@@ -3098,6 +3219,7 @@ Matrix4.prototype.equalsEpsilon = function (right, epsilon) {
/**
* Computes a string representing this Matrix with each row being
* on a separate line and in the format '(column0, column1, column2, column3)'.
+ *
* @returns {string} A string representing the provided Matrix with each row being on a separate line and in the format '(column0, column1, column2, column3)'.
*/
Matrix4.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/MorphWeightSpline.js b/packages/engine/Source/Core/MorphWeightSpline.js
index ec94d11df1bf..d566c1e604f7 100644
--- a/packages/engine/Source/Core/MorphWeightSpline.js
+++ b/packages/engine/Source/Core/MorphWeightSpline.js
@@ -6,8 +6,10 @@ import Spline from "./Spline.js";
/**
* A spline that linearly interpolates over an array of weight values used by morph targets.
+ *
* @alias MorphWeightSpline
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {number[]} options.times An array of strictly increasing, unit-less, floating-point times at each point.
* The values are in no way connected to the clock time. They are the parameterization for the curve.
@@ -15,8 +17,11 @@ import Spline from "./Spline.js";
* that all weights for the targets are given in chronological order and order in which they appear in
* the glTF from which the morph targets come. This means for 2 targets, weights = [w(0,0), w(0,1), w(1,0), w(1,1) ...]
* where i and j in w(i,j) are the time indices and target indices, respectively.
- * @throws {DeveloperError} weights.length must be greater than or equal to 2.
- * @throws {DeveloperError} times.length must be a factor of weights.length.
+ *
+ * @exception {DeveloperError} weights.length must be greater than or equal to 2.
+ * @exception {DeveloperError} times.length must be a factor of weights.length.
+ *
+ *
* @example
* const times = [ 0.0, 1.5, 3.0, 4.5, 6.0 ];
* const weights = [0.0, 1.0, 0.25, 0.75, 0.5, 0.5, 0.75, 0.25, 1.0, 0.0]; //Two targets
@@ -26,6 +31,7 @@ import Spline from "./Spline.js";
* });
*
* const p0 = spline.evaluate(times[0]);
+ *
* @see ConstantSpline
* @see SteppedSpline
* @see LinearSpline
@@ -60,7 +66,9 @@ function MorphWeightSpline(options) {
Object.defineProperties(MorphWeightSpline.prototype, {
/**
* An array of times for the control weights.
+ *
* @memberof WeightSpline.prototype
+ *
* @type {number[]}
* @readonly
*/
@@ -72,7 +80,9 @@ Object.defineProperties(MorphWeightSpline.prototype, {
/**
* An array of floating-point array control weights.
+ *
* @memberof WeightSpline.prototype
+ *
* @type {number[]}
* @readonly
*/
@@ -87,9 +97,11 @@ Object.defineProperties(MorphWeightSpline.prototype, {
* Finds an index i
in times
such that the parameter
* time
is in the interval [times[i], times[i + 1]]
.
* @function
+ *
* @param {number} time The time.
* @returns {number} The index for the element at the start of the interval.
- * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ *
+ * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
@@ -99,25 +111,29 @@ MorphWeightSpline.prototype.findTimeInterval =
/**
* Wraps the given time to the period covered by the spline.
* @function
+ *
* @param {number} time The time.
- * @returns {number} The time, wrapped around to the updated animation.
+ * @return {number} The time, wrapped around to the updated animation.
*/
MorphWeightSpline.prototype.wrapTime = Spline.prototype.wrapTime;
/**
* Clamps the given time to the period covered by the spline.
* @function
+ *
* @param {number} time The time.
- * @returns {number} The time, clamped to the animation period.
+ * @return {number} The time, clamped to the animation period.
*/
MorphWeightSpline.prototype.clampTime = Spline.prototype.clampTime;
/**
* Evaluates the curve at a given time.
+ *
* @param {number} time The time at which to evaluate the curve.
* @param {number[]} [result] The object onto which to store the result.
* @returns {number[]} The modified result parameter or a new instance of the point on the curve at the given time.
- * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ *
+ * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
diff --git a/packages/engine/Source/Core/MortonOrder.js b/packages/engine/Source/Core/MortonOrder.js
index b1a8ee27b88a..390abf913957 100644
--- a/packages/engine/Source/Core/MortonOrder.js
+++ b/packages/engine/Source/Core/MortonOrder.js
@@ -5,6 +5,7 @@ import DeveloperError from "./DeveloperError.js";
/**
* Morton Order (aka Z-Order Curve) helper functions.
* @see {@link https://en.wikipedia.org/wiki/Z-order_curve}
+ *
* @namespace MortonOrder
* @private
*/
@@ -14,15 +15,17 @@ const MortonOrder = {};
* Inserts one 0 bit of spacing between a number's bits. This is the opposite of removeOneSpacing.
*
* Example:
- * input: 6
- * input (binary): 110
- * output (binary): 10100
- * ^ ^ (added)
- * output: 20
+ * input: 6
+ * input (binary): 110
+ * output (binary): 10100
+ * ^ ^ (added)
+ * output: 20
+ *
* @private
* @param {number} v A 16-bit unsigned integer.
* @returns {number} A 32-bit unsigned integer.
* @see {@link https://fgiesen.wordpress.com/2009/12/13/decoding-morton-codes/}
+ * @private
*/
function insertOneSpacing(v) {
v = (v ^ (v << 8)) & 0x00ff00ff;
@@ -36,11 +39,12 @@ function insertOneSpacing(v) {
* Inserts two 0 bits of spacing between a number's bits. This is the opposite of removeTwoSpacing.
*
* Example:
- * input: 6
- * input (binary): 110
- * output (binary): 1001000
- * ^^ ^^ (added)
- * output: 72
+ * input: 6
+ * input (binary): 110
+ * output (binary): 1001000
+ * ^^ ^^ (added)
+ * output: 72
+ *
* @private
* @param {number} v A 10-bit unsigned integer.
* @returns {number} A 30-bit unsigned integer.
@@ -58,11 +62,12 @@ function insertTwoSpacing(v) {
* Removes one bit of spacing between bits. This is the opposite of insertOneSpacing.
*
* Example:
- * input: 20
- * input (binary): 10100
- * ^ ^ (removed)
- * output (binary): 110
- * output: 6
+ * input: 20
+ * input (binary): 10100
+ * ^ ^ (removed)
+ * output (binary): 110
+ * output: 6
+ *
* @private
* @param {number} v A 32-bit unsigned integer.
* @returns {number} A 16-bit unsigned integer.
@@ -81,11 +86,12 @@ function removeOneSpacing(v) {
* Removes two bits of spacing between bits. This is the opposite of insertTwoSpacing.
*
* Example:
- * input: 72
- * input (binary): 1001000
- * ^^ ^^ (removed)
- * output (binary): 110
- * output: 6
+ * input: 72
+ * input (binary): 1001000
+ * ^^ ^^ (removed)
+ * output (binary): 110
+ * output: 6
+ *
* @private
* @param {number} v A 30-bit unsigned integer.
* @returns {number} A 10-bit unsigned integer.
@@ -103,6 +109,7 @@ function removeTwoSpacing(v) {
/**
* Computes the Morton index from 2D coordinates. This is equivalent to interleaving their bits.
* The inputs must be 16-bit unsigned integers (resulting in 32-bit Morton index) due to 32-bit bitwise operator limitation in JavaScript.
+ *
* @param {number} x The X coordinate in the range [0, (2^16)-1].
* @param {number} y The Y coordinate in the range [0, (2^16)-1].
* @returns {number} The Morton index.
@@ -127,6 +134,7 @@ MortonOrder.encode2D = function (x, y) {
/**
* Computes the 2D coordinates from a Morton index. This is equivalent to deinterleaving their bits.
* The input must be a 32-bit unsigned integer (resulting in 16 bits per coordinate) due to 32-bit bitwise operator limitation in JavaScript.
+ *
* @param {number} mortonIndex The Morton index in the range [0, (2^32)-1].
* @param {number[]} [result] The array onto which to store the result.
* @returns {number[]} An array containing the 2D coordinates correspoding to the Morton index.
@@ -152,6 +160,7 @@ MortonOrder.decode2D = function (mortonIndex, result) {
/**
* Computes the Morton index from 3D coordinates. This is equivalent to interleaving their bits.
* The inputs must be 10-bit unsigned integers (resulting in 30-bit Morton index) due to 32-bit bitwise operator limitation in JavaScript.
+ *
* @param {number} x The X coordinate in the range [0, (2^10)-1].
* @param {number} y The Y coordinate in the range [0, (2^10)-1].
* @param {number} z The Z coordinate in the range [0, (2^10)-1].
@@ -178,6 +187,7 @@ MortonOrder.encode3D = function (x, y, z) {
/**
* Computes the 3D coordinates from a Morton index. This is equivalent to deinterleaving their bits.
* The input must be a 30-bit unsigned integer (resulting in 10 bits per coordinate) due to 32-bit bitwise operator limitation in JavaScript.
+ *
* @param {number} mortonIndex The Morton index in the range [0, (2^30)-1].
* @param {number[]} [result] The array onto which to store the result.
* @returns {number[]} An array containing the 3D coordinates corresponding to the Morton index.
diff --git a/packages/engine/Source/Core/NearFarScalar.js b/packages/engine/Source/Core/NearFarScalar.js
index e681b9fda726..9b693fcc6387 100644
--- a/packages/engine/Source/Core/NearFarScalar.js
+++ b/packages/engine/Source/Core/NearFarScalar.js
@@ -5,11 +5,13 @@ import DeveloperError from "./DeveloperError.js";
/**
* Represents a scalar value's lower and upper bound at a near distance and far distance in eye space.
* @alias NearFarScalar
- * @class
- * @param {number} [near] The lower bound of the camera range.
- * @param {number} [nearValue] The value at the lower bound of the camera range.
- * @param {number} [far] The upper bound of the camera range.
- * @param {number} [farValue] The value at the upper bound of the camera range.
+ * @constructor
+ *
+ * @param {number} [near=0.0] The lower bound of the camera range.
+ * @param {number} [nearValue=0.0] The value at the lower bound of the camera range.
+ * @param {number} [far=1.0] The upper bound of the camera range.
+ * @param {number} [farValue=0.0] The value at the upper bound of the camera range.
+ *
* @see Packable
*/
function NearFarScalar(near, nearValue, far, farValue) {
@@ -41,6 +43,7 @@ function NearFarScalar(near, nearValue, far, farValue) {
/**
* Duplicates a NearFarScalar instance.
+ *
* @param {NearFarScalar} nearFarScalar The NearFarScalar to duplicate.
* @param {NearFarScalar} [result] The object onto which to store the result.
* @returns {NearFarScalar} The modified result parameter or a new NearFarScalar instance if one was not provided. (Returns undefined if nearFarScalar is undefined)
@@ -74,9 +77,11 @@ NearFarScalar.packedLength = 4;
/**
* Stores the provided instance into the provided array.
+ *
* @param {NearFarScalar} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
NearFarScalar.pack = function (value, array, startingIndex) {
@@ -101,8 +106,9 @@ NearFarScalar.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {NearFarScalar} [result] The object into which to store the result.
* @returns {NearFarScalar} The modified result parameter or a new NearFarScalar instance if one was not provided.
*/
@@ -128,6 +134,7 @@ NearFarScalar.unpack = function (array, startingIndex, result) {
/**
* Compares the provided NearFarScalar and returns true
if they are equal,
* false
otherwise.
+ *
* @param {NearFarScalar} [left] The first NearFarScalar.
* @param {NearFarScalar} [right] The second NearFarScalar.
* @returns {boolean} true
if left and right are equal; otherwise false
.
@@ -146,6 +153,7 @@ NearFarScalar.equals = function (left, right) {
/**
* Duplicates this instance.
+ *
* @param {NearFarScalar} [result] The object onto which to store the result.
* @returns {NearFarScalar} The modified result parameter or a new NearFarScalar instance if one was not provided.
*/
@@ -156,6 +164,7 @@ NearFarScalar.prototype.clone = function (result) {
/**
* Compares this instance to the provided NearFarScalar and returns true
if they are equal,
* false
otherwise.
+ *
* @param {NearFarScalar} [right] The right hand side NearFarScalar.
* @returns {boolean} true
if left and right are equal; otherwise false
.
*/
diff --git a/packages/engine/Source/Core/Occluder.js b/packages/engine/Source/Core/Occluder.js
index e6603c3469f5..cf247a0c3600 100644
--- a/packages/engine/Source/Core/Occluder.js
+++ b/packages/engine/Source/Core/Occluder.js
@@ -12,10 +12,14 @@ import Visibility from "./Visibility.js";
* Creates an Occluder derived from an object's position and radius, as well as the camera position.
* The occluder can be used to determine whether or not other objects are visible or hidden behind the
* visible horizon defined by the occluder and camera position.
+ *
* @alias Occluder
+ *
* @param {BoundingSphere} occluderBoundingSphere The bounding sphere surrounding the occluder.
* @param {Cartesian3} cameraPosition The coordinate of the viewer/camera.
- * @class
+ *
+ * @constructor
+ *
* @example
* // Construct an occluder one unit away from the origin with a radius of one.
* const cameraPosition = Cesium.Cartesian3.ZERO;
@@ -133,6 +137,7 @@ Object.defineProperties(Occluder.prototype, {
/**
* Creates an occluder from a bounding sphere and the camera position.
+ *
* @param {BoundingSphere} occluderBoundingSphere The bounding sphere surrounding the occluder.
* @param {Cartesian3} cameraPosition The coordinate of the viewer/camera.
* @param {Occluder} [result] The object onto which to store the result.
@@ -168,14 +173,18 @@ const tempVecScratch = new Cartesian3();
/**
* Determines whether or not a point, the occludee
, is hidden from view by the occluder.
+ *
* @param {Cartesian3} occludee The point surrounding the occludee object.
* @returns {boolean} true
if the occludee is visible; otherwise false
.
+ *
+ *
* @example
* const cameraPosition = new Cesium.Cartesian3(0, 0, 0);
* const littleSphere = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -1), 0.25);
* const occluder = new Cesium.Occluder(littleSphere, cameraPosition);
* const point = new Cesium.Cartesian3(0, 0, -3);
* occluder.isPointVisible(point); //returns true
+ *
* @see Occluder#computeVisibility
*/
Occluder.prototype.isPointVisible = function (occludee) {
@@ -200,14 +209,18 @@ const occludeePositionScratch = new Cartesian3();
/**
* Determines whether or not a sphere, the occludee
, is hidden from view by the occluder.
+ *
* @param {BoundingSphere} occludee The bounding sphere surrounding the occludee object.
* @returns {boolean} true
if the occludee is visible; otherwise false
.
+ *
+ *
* @example
* const cameraPosition = new Cesium.Cartesian3(0, 0, 0);
* const littleSphere = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -1), 0.25);
* const occluder = new Cesium.Occluder(littleSphere, cameraPosition);
* const bigSphere = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -3), 1);
* occluder.isBoundingSphereVisible(bigSphere); //returns true
+ *
* @see Occluder#computeVisibility
*/
Occluder.prototype.isBoundingSphereVisible = function (occludee) {
@@ -275,16 +288,20 @@ Occluder.prototype.isBoundingSphereVisible = function (occludee) {
const tempScratch = new Cartesian3();
/**
* Determine to what extent an occludee is visible (not visible, partially visible, or fully visible).
+ *
* @param {BoundingSphere} occludeeBS The bounding sphere of the occludee.
* @returns {Visibility} Visibility.NONE if the occludee is not visible,
* Visibility.PARTIAL if the occludee is partially visible, or
* Visibility.FULL if the occludee is fully visible.
+ *
+ *
* @example
* const sphere1 = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -1.5), 0.5);
* const sphere2 = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -2.5), 0.5);
* const cameraPosition = new Cesium.Cartesian3(0, 0, 0);
* const occluder = new Cesium.Occluder(sphere1, cameraPosition);
* occluder.computeVisibility(sphere2); //returns Visibility.NONE
+ *
* @see Occluder#isVisible
*/
Occluder.prototype.computeVisibility = function (occludeeBS) {
@@ -368,13 +385,16 @@ const occludeePointScratch = new Cartesian3();
* called for objects that do not move relative to the occluder and is large, such as a chunk of
* terrain. You are better off not calling this and using the object's bounding sphere for objects
* such as a satellite or ground vehicle.
+ *
* @param {BoundingSphere} occluderBoundingSphere The bounding sphere surrounding the occluder.
* @param {Cartesian3} occludeePosition The point where the occludee (bounding sphere of radius 0) is located.
* @param {Cartesian3[]} positions List of altitude points on the horizon near the surface of the occluder.
* @returns {object} An object containing two attributes: occludeePoint
and valid
* which is a boolean value.
- * @throws {DeveloperError} positions
must contain at least one element.
- * @throws {DeveloperError} occludeePosition
must have a value other than occluderBoundingSphere.center
.
+ *
+ * @exception {DeveloperError} positions
must contain at least one element.
+ * @exception {DeveloperError} occludeePosition
must have a value other than occluderBoundingSphere.center
.
+ *
* @example
* const cameraPosition = new Cesium.Cartesian3(0, 0, 0);
* const occluderBoundingSphere = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -8), 2);
@@ -477,8 +497,9 @@ Occluder.computeOccludeePoint = function (
const computeOccludeePointFromRectangleScratch = [];
/**
* Computes a point that can be used as the occludee position to the visibility functions from a rectangle.
+ *
* @param {Rectangle} rectangle The rectangle used to create a bounding sphere.
- * @param {Ellipsoid} [ellipsoid] The ellipsoid used to determine positions of the rectangle.
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid used to determine positions of the rectangle.
* @returns {object} An object containing two attributes: occludeePoint
and valid
* which is a boolean value.
*/
diff --git a/packages/engine/Source/Core/OffsetGeometryInstanceAttribute.js b/packages/engine/Source/Core/OffsetGeometryInstanceAttribute.js
index 7518e755a6d3..039d0b2136af 100644
--- a/packages/engine/Source/Core/OffsetGeometryInstanceAttribute.js
+++ b/packages/engine/Source/Core/OffsetGeometryInstanceAttribute.js
@@ -5,12 +5,16 @@ import defined from "./defined.js";
/**
* Value and type information for per-instance geometry attribute that determines the geometry instance offset
+ *
* @alias OffsetGeometryInstanceAttribute
- * @class
- * @param {number} [x] The x translation
- * @param {number} [y] The y translation
- * @param {number} [z] The z translation
+ * @constructor
+ *
+ * @param {number} [x=0] The x translation
+ * @param {number} [y=0] The y translation
+ * @param {number} [z=0] The z translation
+ *
* @private
+ *
* @see GeometryInstance
* @see GeometryInstanceAttribute
*/
@@ -21,6 +25,7 @@ function OffsetGeometryInstanceAttribute(x, y, z) {
/**
* The values for the attributes stored in a typed array.
+ *
* @type Float32Array
*/
this.value = new Float32Array([x, y, z]);
@@ -30,9 +35,12 @@ Object.defineProperties(OffsetGeometryInstanceAttribute.prototype, {
/**
* The datatype of each component in the attribute, e.g., individual elements in
* {@link OffsetGeometryInstanceAttribute#value}.
+ *
* @memberof OffsetGeometryInstanceAttribute.prototype
+ *
* @type {ComponentDatatype}
* @readonly
+ *
* @default {@link ComponentDatatype.FLOAT}
*/
componentDatatype: {
@@ -43,9 +51,12 @@ Object.defineProperties(OffsetGeometryInstanceAttribute.prototype, {
/**
* The number of components in the attributes, i.e., {@link OffsetGeometryInstanceAttribute#value}.
+ *
* @memberof OffsetGeometryInstanceAttribute.prototype
+ *
* @type {number}
* @readonly
+ *
* @default 3
*/
componentsPerAttribute: {
@@ -58,9 +69,12 @@ Object.defineProperties(OffsetGeometryInstanceAttribute.prototype, {
* When true
and componentDatatype
is an integer format,
* indicate that the components should be mapped to the range [0, 1] (unsigned)
* or [-1, 1] (signed) when they are accessed as floating-point for rendering.
+ *
* @memberof OffsetGeometryInstanceAttribute.prototype
+ *
* @type {boolean}
* @readonly
+ *
* @default false
*/
normalize: {
@@ -72,6 +86,7 @@ Object.defineProperties(OffsetGeometryInstanceAttribute.prototype, {
/**
* Creates a new {@link OffsetGeometryInstanceAttribute} instance given the provided an enabled flag and {@link DistanceDisplayCondition}.
+ *
* @param {Cartesian3} offset The cartesian offset
* @returns {OffsetGeometryInstanceAttribute} The new {@link OffsetGeometryInstanceAttribute} instance.
*/
@@ -85,9 +100,11 @@ OffsetGeometryInstanceAttribute.fromCartesian3 = function (offset) {
/**
* Converts a distance display condition to a typed array that can be used to assign a distance display condition attribute.
+ *
* @param {Cartesian3} offset The cartesian offset
* @param {Float32Array} [result] The array to store the result in, if undefined a new instance will be created.
* @returns {Float32Array} The modified result parameter or a new instance if result was undefined.
+ *
* @example
* const attributes = primitive.getGeometryInstanceAttributes('an id');
* attributes.modelMatrix = Cesium.OffsetGeometryInstanceAttribute.toValue(modelMatrix, attributes.modelMatrix);
diff --git a/packages/engine/Source/Core/OpenCageGeocoderService.js b/packages/engine/Source/Core/OpenCageGeocoderService.js
index 7ba7f631e808..139a7f194f2d 100644
--- a/packages/engine/Source/Core/OpenCageGeocoderService.js
+++ b/packages/engine/Source/Core/OpenCageGeocoderService.js
@@ -10,7 +10,8 @@ import Resource from "./Resource.js";
/**
* Provides geocoding via a {@link https://opencagedata.com/|OpenCage} server.
* @alias OpenCageGeocoderService
- * @class
+ * @constructor
+ *
* @param {Resource|string} url The endpoint to the OpenCage server.
* @param {string} apiKey The OpenCage API Key.
* @param {object} [params] An object with the following properties (See https://opencagedata.com/api#forward-opt):
@@ -27,6 +28,7 @@ import Resource from "./Resource.js";
* @param {number} [options.no_record] When set to 1 the query contents are not logged.
* @param {number} [options.pretty] When set to 1 results are 'pretty' printed for easier reading. Useful for debugging.
* @param {string} [options.proximity] Provides the geocoder with a hint to bias results in favour of those closer to the specified location (For example: 41.40139,2.12870).
+ *
* @example
* // Configure a Viewer to use the OpenCage Geocoder
* const viewer = new Cesium.Viewer('cesiumContainer', {
@@ -92,6 +94,7 @@ Object.defineProperties(OpenCageGeocoderService.prototype, {
/**
* @function
+ *
* @param {string} query The query to be sent to the geocoder service
* @returns {Promise}
*/
diff --git a/packages/engine/Source/Core/OrientedBoundingBox.js b/packages/engine/Source/Core/OrientedBoundingBox.js
index 2f34973ef945..c7fe3c292285 100644
--- a/packages/engine/Source/Core/OrientedBoundingBox.js
+++ b/packages/engine/Source/Core/OrientedBoundingBox.js
@@ -20,17 +20,21 @@ import Rectangle from "./Rectangle.js";
* Creates an instance of an OrientedBoundingBox.
* An OrientedBoundingBox of some object is a closed and convex rectangular cuboid. It can provide a tighter bounding volume than {@link BoundingSphere} or {@link AxisAlignedBoundingBox} in many cases.
* @alias OrientedBoundingBox
- * @class
- * @param {Cartesian3} [center] The center of the box.
- * @param {Matrix3} [halfAxes] The three orthogonal half-axes of the bounding box.
+ * @constructor
+ *
+ * @param {Cartesian3} [center=Cartesian3.ZERO] The center of the box.
+ * @param {Matrix3} [halfAxes=Matrix3.ZERO] The three orthogonal half-axes of the bounding box.
* Equivalently, the transformation matrix, to rotate and scale a 2x2x2
* cube centered at the origin.
+ *
+ *
* @example
* // Create an OrientedBoundingBox using a transformation matrix, a position where the box will be translated, and a scale.
* const center = new Cesium.Cartesian3(1.0, 0.0, 0.0);
* const halfAxes = Cesium.Matrix3.fromScale(new Cesium.Cartesian3(1.0, 3.0, 2.0), new Cesium.Matrix3());
*
* const obb = new Cesium.OrientedBoundingBox(center, halfAxes);
+ *
* @see BoundingSphere
* @see BoundingRectangle
*/
@@ -60,9 +64,11 @@ OrientedBoundingBox.packedLength =
/**
* Stores the provided instance into the provided array.
+ *
* @param {OrientedBoundingBox} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
OrientedBoundingBox.pack = function (value, array, startingIndex) {
@@ -81,8 +87,9 @@ OrientedBoundingBox.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {OrientedBoundingBox} [result] The object into which to store the result.
* @returns {OrientedBoundingBox} The modified result parameter or a new OrientedBoundingBox instance if one was not provided.
*/
@@ -122,9 +129,11 @@ const scratchEigenResult = {
* Computes an instance of an OrientedBoundingBox of the given positions.
* This is an implementation of Stefan Gottschalk's Collision Queries using Oriented Bounding Boxes solution (PHD thesis).
* Reference: http://gamma.cs.unc.edu/users/gottschalk/main.pdf
+ *
* @param {Cartesian3[]} [positions] List of {@link Cartesian3} points that the bounding box will enclose.
* @param {OrientedBoundingBox} [result] The object onto which to store the result.
* @returns {OrientedBoundingBox} The modified result parameter or a new OrientedBoundingBox instance if one was not provided.
+ *
* @example
* // Compute an object oriented bounding box enclosing two points.
* const box = Cesium.OrientedBoundingBox.fromPoints([new Cesium.Cartesian3(2, 0, 0), new Cesium.Cartesian3(-2, 0, 0)]);
@@ -319,15 +328,17 @@ const scratchPlane = new Plane(Cartesian3.UNIT_X, 0.0);
/**
* Computes an OrientedBoundingBox that bounds a {@link Rectangle} on the surface of an {@link Ellipsoid}.
* There are no guarantees about the orientation of the bounding box.
+ *
* @param {Rectangle} rectangle The cartographic rectangle on the surface of the ellipsoid.
- * @param {number} [minimumHeight] The minimum height (elevation) within the tile.
- * @param {number} [maximumHeight] The maximum height (elevation) within the tile.
- * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the rectangle is defined.
+ * @param {number} [minimumHeight=0.0] The minimum height (elevation) within the tile.
+ * @param {number} [maximumHeight=0.0] The maximum height (elevation) within the tile.
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rectangle is defined.
* @param {OrientedBoundingBox} [result] The object onto which to store the result.
* @returns {OrientedBoundingBox} The modified result parameter or a new OrientedBoundingBox instance if none was provided.
- * @throws {DeveloperError} rectangle.width must be between 0 and 2 * pi.
- * @throws {DeveloperError} rectangle.height must be between 0 and pi.
- * @throws {DeveloperError} ellipsoid must be an ellipsoid of revolution (radii.x == radii.y
)
+ *
+ * @exception {DeveloperError} rectangle.width must be between 0 and 2 * pi.
+ * @exception {DeveloperError} rectangle.height must be between 0 and pi.
+ * @exception {DeveloperError} ellipsoid must be an ellipsoid of revolution (radii.x == radii.y
)
*/
OrientedBoundingBox.fromRectangle = function (
rectangle,
@@ -601,6 +612,7 @@ OrientedBoundingBox.fromRectangle = function (
/**
* Computes an OrientedBoundingBox that bounds an affine transformation.
+ *
* @param {Matrix4} transformation The affine transformation.
* @param {OrientedBoundingBox} [result] The object onto which to store the result.
* @returns {OrientedBoundingBox} The modified result parameter or a new OrientedBoundingBox instance if none was provided.
@@ -626,6 +638,7 @@ OrientedBoundingBox.fromTransformation = function (transformation, result) {
/**
* Duplicates a OrientedBoundingBox instance.
+ *
* @param {OrientedBoundingBox} box The bounding box to duplicate.
* @param {OrientedBoundingBox} [result] The object onto which to store the result.
* @returns {OrientedBoundingBox} The modified result parameter or a new OrientedBoundingBox instance if none was provided. (Returns undefined if box is undefined)
@@ -647,6 +660,7 @@ OrientedBoundingBox.clone = function (box, result) {
/**
* Determines which side of a plane the oriented bounding box is located.
+ *
* @param {OrientedBoundingBox} box The oriented bounding box to test.
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire box is on the side of the plane
@@ -709,9 +723,11 @@ const scratchPPrime = new Cartesian3();
/**
* Computes the estimated distance squared from the closest point on a bounding box to a point.
+ *
* @param {OrientedBoundingBox} box The box.
* @param {Cartesian3} cartesian The point
* @returns {number} The distance squared from the oriented bounding box to the point. Returns 0 if the point is inside the box.
+ *
* @example
* // Sort bounding boxes from back to front
* boxes.sort(function(a, b) {
@@ -866,6 +882,7 @@ const scratchToCenter = new Cartesian3();
*
* If you imagine the infinite number of planes with normal direction, this computes the smallest distance to the
* closest and farthest planes from position that intersect the bounding box.
+ *
* @param {OrientedBoundingBox} box The bounding box to calculate the distance to.
* @param {Cartesian3} position The position to calculate the distance from.
* @param {Cartesian3} direction The direction from position.
@@ -1005,6 +1022,7 @@ const scratchZAxis = new Cartesian3();
/**
* Computes the eight corners of an oriented bounding box. The corners are ordered by (-X, -Y, -Z), (-X, -Y, +Z), (-X, +Y, -Z), (-X, +Y, +Z), (+X, -Y, -Z), (+X, -Y, +Z), (+X, +Y, -Z), (+X, +Y, +Z).
+ *
* @param {OrientedBoundingBox} box The oriented bounding box.
* @param {Cartesian3[]} [result] An array of eight {@link Cartesian3} instances onto which to store the corners.
* @returns {Cartesian3[]} The modified result parameter or a new array if none was provided.
@@ -1080,6 +1098,7 @@ const scratchRotationScale = new Matrix3();
/**
* Computes a transformation matrix from an oriented bounding box.
+ *
* @param {OrientedBoundingBox} box The oriented bounding box.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new {@link Matrix4} instance if none was provided.
@@ -1106,6 +1125,7 @@ const scratchBoundingSphere = new BoundingSphere();
/**
* Determines whether or not a bounding box is hidden from view by the occluder.
+ *
* @param {OrientedBoundingBox} box The bounding box surrounding the occludee object.
* @param {Occluder} occluder The occluder.
* @returns {boolean} true
if the box is not visible; otherwise false
.
@@ -1130,6 +1150,7 @@ OrientedBoundingBox.isOccluded = function (box, occluder) {
/**
* Determines which side of a plane the oriented bounding box is located.
+ *
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire box is on the side of the plane
* the normal is pointing, {@link Intersect.OUTSIDE} if the entire box is
@@ -1142,8 +1163,10 @@ OrientedBoundingBox.prototype.intersectPlane = function (plane) {
/**
* Computes the estimated distance squared from the closest point on a bounding box to a point.
+ *
* @param {Cartesian3} cartesian The point
* @returns {number} The estimated distance squared from the bounding sphere to the point.
+ *
* @example
* // Sort bounding boxes from back to front
* boxes.sort(function(a, b) {
@@ -1159,6 +1182,7 @@ OrientedBoundingBox.prototype.distanceSquaredTo = function (cartesian) {
*
* If you imagine the infinite number of planes with normal direction, this computes the smallest distance to the
* closest and farthest planes from position that intersect the bounding box.
+ *
* @param {Cartesian3} position The position to calculate the distance from.
* @param {Cartesian3} direction The direction from position.
* @param {Interval} [result] A Interval to store the nearest and farthest distances.
@@ -1179,6 +1203,7 @@ OrientedBoundingBox.prototype.computePlaneDistances = function (
/**
* Computes the eight corners of an oriented bounding box. The corners are ordered by (-X, -Y, -Z), (-X, -Y, +Z), (-X, +Y, -Z), (-X, +Y, +Z), (+X, -Y, -Z), (+X, -Y, +Z), (+X, +Y, -Z), (+X, +Y, +Z).
+ *
* @param {Cartesian3[]} [result] An array of eight {@link Cartesian3} instances onto which to store the corners.
* @returns {Cartesian3[]} The modified result parameter or a new array if none was provided.
*/
@@ -1188,6 +1213,7 @@ OrientedBoundingBox.prototype.computeCorners = function (result) {
/**
* Computes a transformation matrix from an oriented bounding box.
+ *
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new {@link Matrix4} instance if none was provided.
*/
@@ -1197,6 +1223,7 @@ OrientedBoundingBox.prototype.computeTransformation = function (result) {
/**
* Determines whether or not a bounding box is hidden from view by the occluder.
+ *
* @param {Occluder} occluder The occluder.
* @returns {boolean} true
if the sphere is not visible; otherwise false
.
*/
@@ -1207,6 +1234,7 @@ OrientedBoundingBox.prototype.isOccluded = function (occluder) {
/**
* Compares the provided OrientedBoundingBox componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {OrientedBoundingBox} left The first OrientedBoundingBox.
* @param {OrientedBoundingBox} right The second OrientedBoundingBox.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -1223,6 +1251,7 @@ OrientedBoundingBox.equals = function (left, right) {
/**
* Duplicates this OrientedBoundingBox instance.
+ *
* @param {OrientedBoundingBox} [result] The object onto which to store the result.
* @returns {OrientedBoundingBox} The modified result parameter or a new OrientedBoundingBox instance if one was not provided.
*/
@@ -1233,6 +1262,7 @@ OrientedBoundingBox.prototype.clone = function (result) {
/**
* Compares this OrientedBoundingBox against the provided OrientedBoundingBox componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {OrientedBoundingBox} [right] The right hand side OrientedBoundingBox.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/Core/OrthographicFrustum.js b/packages/engine/Source/Core/OrthographicFrustum.js
index bea3ce1112a8..e94dcb868101 100644
--- a/packages/engine/Source/Core/OrthographicFrustum.js
+++ b/packages/engine/Source/Core/OrthographicFrustum.js
@@ -10,13 +10,16 @@ import OrthographicOffCenterFrustum from "./OrthographicOffCenterFrustum.js";
* Each plane is represented by a {@link Cartesian4} object, where the x, y, and z components
* define the unit vector normal to the plane, and the w component is the distance of the
* plane from the origin/camera position.
+ *
* @alias OrthographicFrustum
- * @class
+ * @constructor
+ *
* @param {object} [options] An object with the following properties:
* @param {number} [options.width] The width of the frustum in meters.
* @param {number} [options.aspectRatio] The aspect ratio of the frustum's width to it's height.
- * @param {number} [options.near] The distance of the near plane.
- * @param {number} [options.far] The distance of the far plane.
+ * @param {number} [options.near=1.0] The distance of the near plane.
+ * @param {number} [options.far=500000000.0] The distance of the far plane.
+ *
* @example
* const maxRadii = ellipsoid.maximumRadius;
*
@@ -70,9 +73,11 @@ OrthographicFrustum.packedLength = 4;
/**
* Stores the provided instance into the provided array.
+ *
* @param {OrthographicFrustum} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
OrthographicFrustum.pack = function (value, array, startingIndex) {
@@ -93,8 +98,9 @@ OrthographicFrustum.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {OrthographicFrustum} [result] The object into which to store the result.
* @returns {OrthographicFrustum} The modified result parameter or a new OrthographicFrustum instance if one was not provided.
*/
@@ -195,10 +201,12 @@ Object.defineProperties(OrthographicFrustum.prototype, {
/**
* Creates a culling volume for this frustum.
+ *
* @param {Cartesian3} position The eye position.
* @param {Cartesian3} direction The view direction.
* @param {Cartesian3} up The up direction.
* @returns {CullingVolume} A culling volume at the given position and orientation.
+ *
* @example
* // Check if a bounding volume intersects the frustum.
* const cullingVolume = frustum.computeCullingVolume(cameraPosition, cameraDirection, cameraUp);
@@ -215,15 +223,18 @@ OrthographicFrustum.prototype.computeCullingVolume = function (
/**
* Returns the pixel's width and height in meters.
+ *
* @param {number} drawingBufferWidth The width of the drawing buffer.
* @param {number} drawingBufferHeight The height of the drawing buffer.
* @param {number} distance The distance to the near plane in meters.
* @param {number} pixelRatio The scaling factor from pixel space to coordinate space.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new instance of {@link Cartesian2} with the pixel's width and height in the x and y properties, respectively.
- * @throws {DeveloperError} drawingBufferWidth must be greater than zero.
- * @throws {DeveloperError} drawingBufferHeight must be greater than zero.
- * @throws {DeveloperError} pixelRatio must be greater than zero.
+ *
+ * @exception {DeveloperError} drawingBufferWidth must be greater than zero.
+ * @exception {DeveloperError} drawingBufferHeight must be greater than zero.
+ * @exception {DeveloperError} pixelRatio must be greater than zero.
+ *
* @example
* // Example 1
* // Get the width and height of a pixel.
@@ -248,6 +259,7 @@ OrthographicFrustum.prototype.getPixelDimensions = function (
/**
* Returns a duplicate of a OrthographicFrustum instance.
+ *
* @param {OrthographicFrustum} [result] The object onto which to store the result.
* @returns {OrthographicFrustum} The modified result parameter or a new OrthographicFrustum instance if one was not provided.
*/
@@ -275,6 +287,7 @@ OrthographicFrustum.prototype.clone = function (result) {
/**
* Compares the provided OrthographicFrustum componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {OrthographicFrustum} [other] The right hand side OrthographicFrustum.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -297,9 +310,10 @@ OrthographicFrustum.prototype.equals = function (other) {
* Compares the provided OrthographicFrustum componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
+ *
* @param {OrthographicFrustum} other The right hand side OrthographicFrustum.
* @param {number} relativeEpsilon The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if this and other are within the provided epsilon, false
otherwise.
*/
OrthographicFrustum.prototype.equalsEpsilon = function (
diff --git a/packages/engine/Source/Core/OrthographicOffCenterFrustum.js b/packages/engine/Source/Core/OrthographicOffCenterFrustum.js
index a2f6335a5468..b99d0c5065bf 100644
--- a/packages/engine/Source/Core/OrthographicOffCenterFrustum.js
+++ b/packages/engine/Source/Core/OrthographicOffCenterFrustum.js
@@ -12,15 +12,18 @@ import Matrix4 from "./Matrix4.js";
* Each plane is represented by a {@link Cartesian4} object, where the x, y, and z components
* define the unit vector normal to the plane, and the w component is the distance of the
* plane from the origin/camera position.
+ *
* @alias OrthographicOffCenterFrustum
- * @class
+ * @constructor
+ *
* @param {object} [options] An object with the following properties:
* @param {number} [options.left] The left clipping plane distance.
* @param {number} [options.right] The right clipping plane distance.
* @param {number} [options.top] The top clipping plane distance.
* @param {number} [options.bottom] The bottom clipping plane distance.
- * @param {number} [options.near] The near clipping plane distance.
- * @param {number} [options.far] The far clipping plane distance.
+ * @param {number} [options.near=1.0] The near clipping plane distance.
+ * @param {number} [options.far=500000000.0] The far clipping plane distance.
+ *
* @example
* const maxRadii = ellipsoid.maximumRadius;
*
@@ -165,10 +168,12 @@ const negateScratch = new Cartesian3();
/**
* Creates a culling volume for this frustum.
+ *
* @param {Cartesian3} position The eye position.
* @param {Cartesian3} direction The view direction.
* @param {Cartesian3} up The up direction.
* @returns {CullingVolume} A culling volume at the given position and orientation.
+ *
* @example
* // Check if a bounding volume intersects the frustum.
* const cullingVolume = frustum.computeCullingVolume(cameraPosition, cameraDirection, cameraUp);
@@ -287,15 +292,18 @@ OrthographicOffCenterFrustum.prototype.computeCullingVolume = function (
/**
* Returns the pixel's width and height in meters.
+ *
* @param {number} drawingBufferWidth The width of the drawing buffer.
* @param {number} drawingBufferHeight The height of the drawing buffer.
* @param {number} distance The distance to the near plane in meters.
* @param {number} pixelRatio The scaling factor from pixel space to coordinate space.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new instance of {@link Cartesian2} with the pixel's width and height in the x and y properties, respectively.
- * @throws {DeveloperError} drawingBufferWidth must be greater than zero.
- * @throws {DeveloperError} drawingBufferHeight must be greater than zero.
- * @throws {DeveloperError} pixelRatio must be greater than zero.
+ *
+ * @exception {DeveloperError} drawingBufferWidth must be greater than zero.
+ * @exception {DeveloperError} drawingBufferHeight must be greater than zero.
+ * @exception {DeveloperError} pixelRatio must be greater than zero.
+ *
* @example
* // Example 1
* // Get the width and height of a pixel.
@@ -348,6 +356,7 @@ OrthographicOffCenterFrustum.prototype.getPixelDimensions = function (
/**
* Returns a duplicate of a OrthographicOffCenterFrustum instance.
+ *
* @param {OrthographicOffCenterFrustum} [result] The object onto which to store the result.
* @returns {OrthographicOffCenterFrustum} The modified result parameter or a new OrthographicOffCenterFrustum instance if one was not provided.
*/
@@ -377,6 +386,7 @@ OrthographicOffCenterFrustum.prototype.clone = function (result) {
/**
* Compares the provided OrthographicOffCenterFrustum componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {OrthographicOffCenterFrustum} [other] The right hand side OrthographicOffCenterFrustum.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -397,9 +407,10 @@ OrthographicOffCenterFrustum.prototype.equals = function (other) {
* Compares the provided OrthographicOffCenterFrustum componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
+ *
* @param {OrthographicOffCenterFrustum} other The right hand side OrthographicOffCenterFrustum.
* @param {number} relativeEpsilon The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if this and other are within the provided epsilon, false
otherwise.
*/
OrthographicOffCenterFrustum.prototype.equalsEpsilon = function (
diff --git a/packages/engine/Source/Core/Packable.js b/packages/engine/Source/Core/Packable.js
index 4ec3aad0171e..ef167bed20d1 100644
--- a/packages/engine/Source/Core/Packable.js
+++ b/packages/engine/Source/Core/Packable.js
@@ -4,7 +4,9 @@ import DeveloperError from "./DeveloperError.js";
* Static interface for types which can store their values as packed
* elements in an array. These methods and properties are expected to be
* defined on a constructor function.
+ *
* @interface Packable
+ *
* @see PackableForInterpolation
*/
const Packable = {
@@ -17,6 +19,7 @@ const Packable = {
/**
* Stores the provided instance into the provided array.
* @function
+ *
* @param {*} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
@@ -26,6 +29,7 @@ const Packable = {
/**
* Retrieves an instance from a packed array.
* @function
+ *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {object} [result] The object into which to store the result.
diff --git a/packages/engine/Source/Core/PackableForInterpolation.js b/packages/engine/Source/Core/PackableForInterpolation.js
index bb0de34fed5c..11e4a3885884 100644
--- a/packages/engine/Source/Core/PackableForInterpolation.js
+++ b/packages/engine/Source/Core/PackableForInterpolation.js
@@ -4,7 +4,9 @@ import DeveloperError from "./DeveloperError.js";
* Static interface for {@link Packable} types which are interpolated in a
* different representation than their packed value. These methods and
* properties are expected to be defined on a constructor function.
+ *
* @namespace PackableForInterpolation
+ *
* @see Packable
*/
const PackableForInterpolation = {
@@ -17,6 +19,7 @@ const PackableForInterpolation = {
/**
* Converts a packed array into a form suitable for interpolation.
* @function
+ *
* @param {number[]} packedArray The packed array.
* @param {number} [startingIndex=0] The index of the first element to be converted.
* @param {number} [lastIndex=packedArray.length] The index of the last element to be converted.
@@ -27,6 +30,7 @@ const PackableForInterpolation = {
/**
* Retrieves an instance from a packed array converted with {@link PackableForInterpolation.convertPackedArrayForInterpolation}.
* @function
+ *
* @param {number[]} array The array previously packed for interpolation.
* @param {number[]} sourceArray The original packed array.
* @param {number} [startingIndex=0] The startingIndex used to convert the array.
diff --git a/packages/engine/Source/Core/PeliasGeocoderService.js b/packages/engine/Source/Core/PeliasGeocoderService.js
index 195f638e3cf3..30da8c2c43c1 100644
--- a/packages/engine/Source/Core/PeliasGeocoderService.js
+++ b/packages/engine/Source/Core/PeliasGeocoderService.js
@@ -8,8 +8,10 @@ import Resource from "./Resource.js";
/**
* Provides geocoding via a {@link https://pelias.io/|Pelias} server.
* @alias PeliasGeocoderService
- * @class
+ * @constructor
+ *
* @param {Resource|string} url The endpoint to the Pelias server.
+ *
* @example
* // Configure a Viewer to use the Pelias server hosted by https://geocode.earth/
* const viewer = new Cesium.Viewer('cesiumContainer', {
@@ -58,8 +60,9 @@ Object.defineProperties(PeliasGeocoderService.prototype, {
/**
* @function
+ *
* @param {string} query The query to be sent to the geocoder service
- * @param {GeocodeType} [type] The type of geocode to perform.
+ * @param {GeocodeType} [type=GeocodeType.SEARCH] The type of geocode to perform.
* @returns {Promise}
*/
PeliasGeocoderService.prototype.geocode = async function (query, type) {
diff --git a/packages/engine/Source/Core/PerspectiveFrustum.js b/packages/engine/Source/Core/PerspectiveFrustum.js
index 0d3273305898..0442961c533f 100644
--- a/packages/engine/Source/Core/PerspectiveFrustum.js
+++ b/packages/engine/Source/Core/PerspectiveFrustum.js
@@ -10,15 +10,18 @@ import PerspectiveOffCenterFrustum from "./PerspectiveOffCenterFrustum.js";
* Each plane is represented by a {@link Cartesian4} object, where the x, y, and z components
* define the unit vector normal to the plane, and the w component is the distance of the
* plane from the origin/camera position.
+ *
* @alias PerspectiveFrustum
- * @class
+ * @constructor
+ *
* @param {object} [options] An object with the following properties:
* @param {number} [options.fov] The angle of the field of view (FOV), in radians.
* @param {number} [options.aspectRatio] The aspect ratio of the frustum's width to it's height.
- * @param {number} [options.near] The distance of the near plane.
- * @param {number} [options.far] The distance of the far plane.
- * @param {number} [options.xOffset] The offset in the x direction.
- * @param {number} [options.yOffset] The offset in the y direction.
+ * @param {number} [options.near=1.0] The distance of the near plane.
+ * @param {number} [options.far=500000000.0] The distance of the far plane.
+ * @param {number} [options.xOffset=0.0] The offset in the x direction.
+ * @param {number} [options.yOffset=0.0] The offset in the y direction.
+ *
* @example
* const frustum = new Cesium.PerspectiveFrustum({
* fov : Cesium.Math.PI_OVER_THREE,
@@ -26,6 +29,7 @@ import PerspectiveOffCenterFrustum from "./PerspectiveOffCenterFrustum.js";
* near : 1.0,
* far : 1000.0
* });
+ *
* @see PerspectiveOffCenterFrustum
*/
function PerspectiveFrustum(options) {
@@ -95,9 +99,11 @@ PerspectiveFrustum.packedLength = 6;
/**
* Stores the provided instance into the provided array.
+ *
* @param {PerspectiveFrustum} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
PerspectiveFrustum.pack = function (value, array, startingIndex) {
@@ -120,8 +126,9 @@ PerspectiveFrustum.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {PerspectiveFrustum} [result] The object into which to store the result.
* @returns {PerspectiveFrustum} The modified result parameter or a new PerspectiveFrustum instance if one was not provided.
*/
@@ -218,6 +225,7 @@ Object.defineProperties(PerspectiveFrustum.prototype, {
* @memberof PerspectiveFrustum.prototype
* @type {Matrix4}
* @readonly
+ *
* @see PerspectiveFrustum#infiniteProjectionMatrix
*/
projectionMatrix: {
@@ -232,6 +240,7 @@ Object.defineProperties(PerspectiveFrustum.prototype, {
* @memberof PerspectiveFrustum.prototype
* @type {Matrix4}
* @readonly
+ *
* @see PerspectiveFrustum#projectionMatrix
*/
infiniteProjectionMatrix: {
@@ -283,10 +292,12 @@ Object.defineProperties(PerspectiveFrustum.prototype, {
/**
* Creates a culling volume for this frustum.
+ *
* @param {Cartesian3} position The eye position.
* @param {Cartesian3} direction The view direction.
* @param {Cartesian3} up The up direction.
* @returns {CullingVolume} A culling volume at the given position and orientation.
+ *
* @example
* // Check if a bounding volume intersects the frustum.
* const cullingVolume = frustum.computeCullingVolume(cameraPosition, cameraDirection, cameraUp);
@@ -303,19 +314,23 @@ PerspectiveFrustum.prototype.computeCullingVolume = function (
/**
* Returns the pixel's width and height in meters.
+ *
* @param {number} drawingBufferWidth The width of the drawing buffer.
* @param {number} drawingBufferHeight The height of the drawing buffer.
* @param {number} distance The distance to the near plane in meters.
* @param {number} pixelRatio The scaling factor from pixel space to coordinate space.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new instance of {@link Cartesian2} with the pixel's width and height in the x and y properties, respectively.
- * @throws {DeveloperError} drawingBufferWidth must be greater than zero.
- * @throws {DeveloperError} drawingBufferHeight must be greater than zero.
- * @throws {DeveloperError} pixelRatio must be greater than zero.
+ *
+ * @exception {DeveloperError} drawingBufferWidth must be greater than zero.
+ * @exception {DeveloperError} drawingBufferHeight must be greater than zero.
+ * @exception {DeveloperError} pixelRatio must be greater than zero.
+ *
* @example
* // Example 1
* // Get the width and height of a pixel.
* const pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 1.0, scene.pixelRatio, new Cesium.Cartesian2());
+ *
* @example
* // Example 2
* // Get the width and height of a pixel if the near plane was set to 'distance'.
@@ -346,6 +361,7 @@ PerspectiveFrustum.prototype.getPixelDimensions = function (
/**
* Returns a duplicate of a PerspectiveFrustum instance.
+ *
* @param {PerspectiveFrustum} [result] The object onto which to store the result.
* @returns {PerspectiveFrustum} The modified result parameter or a new PerspectiveFrustum instance if one was not provided.
*/
@@ -373,6 +389,7 @@ PerspectiveFrustum.prototype.clone = function (result) {
/**
* Compares the provided PerspectiveFrustum componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {PerspectiveFrustum} [other] The right hand side PerspectiveFrustum.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -395,9 +412,10 @@ PerspectiveFrustum.prototype.equals = function (other) {
* Compares the provided PerspectiveFrustum componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
+ *
* @param {PerspectiveFrustum} other The right hand side PerspectiveFrustum.
* @param {number} relativeEpsilon The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if this and other are within the provided epsilon, false
otherwise.
*/
PerspectiveFrustum.prototype.equalsEpsilon = function (
diff --git a/packages/engine/Source/Core/PerspectiveOffCenterFrustum.js b/packages/engine/Source/Core/PerspectiveOffCenterFrustum.js
index 84ba0ac5b536..00339b199d60 100644
--- a/packages/engine/Source/Core/PerspectiveOffCenterFrustum.js
+++ b/packages/engine/Source/Core/PerspectiveOffCenterFrustum.js
@@ -12,15 +12,18 @@ import Matrix4 from "./Matrix4.js";
* Each plane is represented by a {@link Cartesian4} object, where the x, y, and z components
* define the unit vector normal to the plane, and the w component is the distance of the
* plane from the origin/camera position.
+ *
* @alias PerspectiveOffCenterFrustum
- * @class
+ * @constructor
+ *
* @param {object} [options] An object with the following properties:
* @param {number} [options.left] The left clipping plane distance.
* @param {number} [options.right] The right clipping plane distance.
* @param {number} [options.top] The top clipping plane distance.
* @param {number} [options.bottom] The bottom clipping plane distance.
- * @param {number} [options.near] The near clipping plane distance.
- * @param {number} [options.far] The far clipping plane distance.
+ * @param {number} [options.near=1.0] The near clipping plane distance.
+ * @param {number} [options.far=500000000.0] The far clipping plane distance.
+ *
* @example
* const frustum = new Cesium.PerspectiveOffCenterFrustum({
* left : -1.0,
@@ -30,6 +33,7 @@ import Matrix4 from "./Matrix4.js";
* near : 1.0,
* far : 100.0
* });
+ *
* @see PerspectiveFrustum
*/
function PerspectiveOffCenterFrustum(options) {
@@ -159,6 +163,7 @@ Object.defineProperties(PerspectiveOffCenterFrustum.prototype, {
* @memberof PerspectiveOffCenterFrustum.prototype
* @type {Matrix4}
* @readonly
+ *
* @see PerspectiveOffCenterFrustum#infiniteProjectionMatrix
*/
projectionMatrix: {
@@ -173,6 +178,7 @@ Object.defineProperties(PerspectiveOffCenterFrustum.prototype, {
* @memberof PerspectiveOffCenterFrustum.prototype
* @type {Matrix4}
* @readonly
+ *
* @see PerspectiveOffCenterFrustum#projectionMatrix
*/
infiniteProjectionMatrix: {
@@ -189,10 +195,12 @@ const getPlanesFarCenter = new Cartesian3();
const getPlanesNormal = new Cartesian3();
/**
* Creates a culling volume for this frustum.
+ *
* @param {Cartesian3} position The eye position.
* @param {Cartesian3} direction The view direction.
* @param {Cartesian3} up The up direction.
* @returns {CullingVolume} A culling volume at the given position and orientation.
+ *
* @example
* // Check if a bounding volume intersects the frustum.
* const cullingVolume = frustum.computeCullingVolume(cameraPosition, cameraDirection, cameraUp);
@@ -330,19 +338,23 @@ PerspectiveOffCenterFrustum.prototype.computeCullingVolume = function (
/**
* Returns the pixel's width and height in meters.
+ *
* @param {number} drawingBufferWidth The width of the drawing buffer.
* @param {number} drawingBufferHeight The height of the drawing buffer.
* @param {number} distance The distance to the near plane in meters.
* @param {number} pixelRatio The scaling factor from pixel space to coordinate space.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new instance of {@link Cartesian2} with the pixel's width and height in the x and y properties, respectively.
- * @throws {DeveloperError} drawingBufferWidth must be greater than zero.
- * @throws {DeveloperError} drawingBufferHeight must be greater than zero.
- * @throws {DeveloperError} pixelRatio must be greater than zero.
+ *
+ * @exception {DeveloperError} drawingBufferWidth must be greater than zero.
+ * @exception {DeveloperError} drawingBufferHeight must be greater than zero.
+ * @exception {DeveloperError} pixelRatio must be greater than zero.
+ *
* @example
* // Example 1
* // Get the width and height of a pixel.
* const pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 1.0, scene.pixelRatio, new Cesium.Cartesian2());
+ *
* @example
* // Example 2
* // Get the width and height of a pixel if the near plane was set to 'distance'.
@@ -404,6 +416,7 @@ PerspectiveOffCenterFrustum.prototype.getPixelDimensions = function (
/**
* Returns a duplicate of a PerspectiveOffCenterFrustum instance.
+ *
* @param {PerspectiveOffCenterFrustum} [result] The object onto which to store the result.
* @returns {PerspectiveOffCenterFrustum} The modified result parameter or a new PerspectiveFrustum instance if one was not provided.
*/
@@ -433,6 +446,7 @@ PerspectiveOffCenterFrustum.prototype.clone = function (result) {
/**
* Compares the provided PerspectiveOffCenterFrustum componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {PerspectiveOffCenterFrustum} [other] The right hand side PerspectiveOffCenterFrustum.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
@@ -453,9 +467,10 @@ PerspectiveOffCenterFrustum.prototype.equals = function (other) {
* Compares the provided PerspectiveOffCenterFrustum componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
+ *
* @param {PerspectiveOffCenterFrustum} other The right hand side PerspectiveOffCenterFrustum.
* @param {number} relativeEpsilon The relative epsilon tolerance to use for equality testing.
- * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if this and other are within the provided epsilon, false
otherwise.
*/
PerspectiveOffCenterFrustum.prototype.equalsEpsilon = function (
diff --git a/packages/engine/Source/Core/PinBuilder.js b/packages/engine/Source/Core/PinBuilder.js
index 56cd4b554faf..143477b41c9d 100644
--- a/packages/engine/Source/Core/PinBuilder.js
+++ b/packages/engine/Source/Core/PinBuilder.js
@@ -12,8 +12,10 @@ import writeTextToCanvas from "./writeTextToCanvas.js";
*
* Example pins generated using both the maki icon set, which ships with Cesium, and single character text.
*
+ *
* @alias PinBuilder
- * @class
+ * @constructor
+ *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Map%20Pins.html|Cesium Sandcastle PinBuilder Demo}
*/
function PinBuilder() {
@@ -22,6 +24,7 @@ function PinBuilder() {
/**
* Creates an empty pin of the specified color and size.
+ *
* @param {Color} color The color of the pin.
* @param {number} size The size of the pin, in pixels.
* @returns {HTMLCanvasElement} The canvas element that represents the generated pin.
@@ -40,6 +43,7 @@ PinBuilder.prototype.fromColor = function (color, size) {
/**
* Creates a pin with the specified icon, color, and size.
+ *
* @param {Resource|string} url The url of the image to be stamped onto the pin.
* @param {Color} color The color of the pin.
* @param {number} size The size of the pin, in pixels.
@@ -62,6 +66,7 @@ PinBuilder.prototype.fromUrl = function (url, color, size) {
/**
* Creates a pin with the specified {@link https://www.mapbox.com/maki/|maki} icon identifier, color, and size.
+ *
* @param {string} id The id of the maki icon to be stamped onto the pin.
* @param {Color} color The color of the pin.
* @param {number} size The size of the pin, in pixels.
@@ -91,6 +96,7 @@ PinBuilder.prototype.fromMakiIconId = function (id, color, size) {
/**
* Creates a pin with the specified text, color, and size. The text will be sized to be as large as possible
* while still being contained completely within the pin.
+ *
* @param {string} text The text to be stamped onto the pin.
* @param {Color} color The color of the pin.
* @param {number} size The size of the pin, in pixels.
diff --git a/packages/engine/Source/Core/PixelFormat.js b/packages/engine/Source/Core/PixelFormat.js
index 9e849149a2e5..6f7061252aa7 100644
--- a/packages/engine/Source/Core/PixelFormat.js
+++ b/packages/engine/Source/Core/PixelFormat.js
@@ -3,11 +3,13 @@ import WebGLConstants from "./WebGLConstants.js";
/**
* The format of a pixel, i.e., the number of components it has and what they represent.
+ *
* @enum {number}
*/
const PixelFormat = {
/**
* A pixel format containing a depth value.
+ *
* @type {number}
* @constant
*/
@@ -15,6 +17,7 @@ const PixelFormat = {
/**
* A pixel format containing a depth and stencil value, most often used with {@link PixelDatatype.UNSIGNED_INT_24_8}.
+ *
* @type {number}
* @constant
*/
@@ -22,6 +25,7 @@ const PixelFormat = {
/**
* A pixel format containing an alpha channel.
+ *
* @type {number}
* @constant
*/
@@ -29,6 +33,7 @@ const PixelFormat = {
/**
* A pixel format containing a red channel
+ *
* @type {number}
* @constant
*/
@@ -36,6 +41,7 @@ const PixelFormat = {
/**
* A pixel format containing red and green channels.
+ *
* @type {number}
* @constant
*/
@@ -43,6 +49,7 @@ const PixelFormat = {
/**
* A pixel format containing red, green, and blue channels.
+ *
* @type {number}
* @constant
*/
@@ -50,6 +57,7 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels.
+ *
* @type {number}
* @constant
*/
@@ -57,6 +65,7 @@ const PixelFormat = {
/**
* A pixel format containing a luminance (intensity) channel.
+ *
* @type {number}
* @constant
*/
@@ -64,6 +73,7 @@ const PixelFormat = {
/**
* A pixel format containing luminance (intensity) and alpha channels.
+ *
* @type {number}
* @constant
*/
@@ -71,6 +81,7 @@ const PixelFormat = {
/**
* A pixel format containing red, green, and blue channels that is DXT1 compressed.
+ *
* @type {number}
* @constant
*/
@@ -78,6 +89,7 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is DXT1 compressed.
+ *
* @type {number}
* @constant
*/
@@ -85,6 +97,7 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is DXT3 compressed.
+ *
* @type {number}
* @constant
*/
@@ -92,6 +105,7 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is DXT5 compressed.
+ *
* @type {number}
* @constant
*/
@@ -99,6 +113,7 @@ const PixelFormat = {
/**
* A pixel format containing red, green, and blue channels that is PVR 4bpp compressed.
+ *
* @type {number}
* @constant
*/
@@ -106,6 +121,7 @@ const PixelFormat = {
/**
* A pixel format containing red, green, and blue channels that is PVR 2bpp compressed.
+ *
* @type {number}
* @constant
*/
@@ -113,6 +129,7 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is PVR 4bpp compressed.
+ *
* @type {number}
* @constant
*/
@@ -120,6 +137,7 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is PVR 2bpp compressed.
+ *
* @type {number}
* @constant
*/
@@ -127,6 +145,7 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is ASTC compressed.
+ *
* @type {number}
* @constant
*/
@@ -134,6 +153,7 @@ const PixelFormat = {
/**
* A pixel format containing red, green, and blue channels that is ETC1 compressed.
+ *
* @type {number}
* @constant
*/
@@ -141,6 +161,7 @@ const PixelFormat = {
/**
* A pixel format containing red, green, and blue channels that is ETC2 compressed.
+ *
* @type {number}
* @constant
*/
@@ -148,6 +169,7 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is ETC2 compressed.
+ *
* @type {number}
* @constant
*/
@@ -155,6 +177,7 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is BC7 compressed.
+ *
* @type {number}
* @constant
*/
@@ -162,7 +185,6 @@ const PixelFormat = {
};
/**
- * @param pixelFormat
* @private
*/
PixelFormat.componentsLength = function (pixelFormat) {
@@ -184,7 +206,6 @@ PixelFormat.componentsLength = function (pixelFormat) {
};
/**
- * @param pixelFormat
* @private
*/
PixelFormat.validate = function (pixelFormat) {
@@ -215,7 +236,6 @@ PixelFormat.validate = function (pixelFormat) {
};
/**
- * @param pixelFormat
* @private
*/
PixelFormat.isColorFormat = function (pixelFormat) {
@@ -230,7 +250,6 @@ PixelFormat.isColorFormat = function (pixelFormat) {
};
/**
- * @param pixelFormat
* @private
*/
PixelFormat.isDepthFormat = function (pixelFormat) {
@@ -241,7 +260,6 @@ PixelFormat.isDepthFormat = function (pixelFormat) {
};
/**
- * @param pixelFormat
* @private
*/
PixelFormat.isCompressedFormat = function (pixelFormat) {
@@ -263,7 +281,6 @@ PixelFormat.isCompressedFormat = function (pixelFormat) {
};
/**
- * @param pixelFormat
* @private
*/
PixelFormat.isDXTFormat = function (pixelFormat) {
@@ -276,7 +293,6 @@ PixelFormat.isDXTFormat = function (pixelFormat) {
};
/**
- * @param pixelFormat
* @private
*/
PixelFormat.isPVRTCFormat = function (pixelFormat) {
@@ -289,7 +305,6 @@ PixelFormat.isPVRTCFormat = function (pixelFormat) {
};
/**
- * @param pixelFormat
* @private
*/
PixelFormat.isASTCFormat = function (pixelFormat) {
@@ -297,7 +312,6 @@ PixelFormat.isASTCFormat = function (pixelFormat) {
};
/**
- * @param pixelFormat
* @private
*/
PixelFormat.isETC1Format = function (pixelFormat) {
@@ -305,7 +319,6 @@ PixelFormat.isETC1Format = function (pixelFormat) {
};
/**
- * @param pixelFormat
* @private
*/
PixelFormat.isETC2Format = function (pixelFormat) {
@@ -316,7 +329,6 @@ PixelFormat.isETC2Format = function (pixelFormat) {
};
/**
- * @param pixelFormat
* @private
*/
PixelFormat.isBC7Format = function (pixelFormat) {
@@ -324,9 +336,6 @@ PixelFormat.isBC7Format = function (pixelFormat) {
};
/**
- * @param pixelFormat
- * @param width
- * @param height
* @private
*/
PixelFormat.compressedTextureSizeInBytes = function (
@@ -366,10 +375,6 @@ PixelFormat.compressedTextureSizeInBytes = function (
};
/**
- * @param pixelFormat
- * @param pixelDatatype
- * @param width
- * @param height
* @private
*/
PixelFormat.textureSizeInBytes = function (
@@ -388,9 +393,6 @@ PixelFormat.textureSizeInBytes = function (
};
/**
- * @param pixelFormat
- * @param pixelDatatype
- * @param width
* @private
*/
PixelFormat.alignmentInBytes = function (pixelFormat, pixelDatatype, width) {
@@ -403,8 +405,8 @@ PixelFormat.alignmentInBytes = function (pixelFormat, pixelDatatype, width) {
* @private
* @param {PixelFormat} pixelFormat The pixel format.
* @param {PixelDatatype} pixelDatatype The pixel datatype.
- * @param {number} width The width of the texture.
- * @param {number} height The height of the texture.
+ * @param {Number} width The width of the texture.
+ * @param {Number} height The height of the texture.
* @returns {TypedArray} The typed array.
*/
PixelFormat.createTypedArray = function (
@@ -433,11 +435,6 @@ PixelFormat.createTypedArray = function (
};
/**
- * @param bufferView
- * @param pixelFormat
- * @param pixelDatatype
- * @param width
- * @param height
* @private
*/
PixelFormat.flipY = function (
@@ -469,9 +466,6 @@ PixelFormat.flipY = function (
};
/**
- * @param pixelFormat
- * @param pixelDatatype
- * @param context
* @private
*/
PixelFormat.toInternalFormat = function (pixelFormat, pixelDatatype, context) {
diff --git a/packages/engine/Source/Core/Plane.js b/packages/engine/Source/Core/Plane.js
index 39397903b8fb..ab9ee77567c9 100644
--- a/packages/engine/Source/Core/Plane.js
+++ b/packages/engine/Source/Core/Plane.js
@@ -14,18 +14,22 @@ import Matrix4 from "./Matrix4.js";
* where (a, b, c) is the plane's normal
, d is the signed
* distance
to the plane, and (x, y, z) is any point on
* the plane.
+ *
* @alias Plane
- * @class
+ * @constructor
+ *
* @param {Cartesian3} normal The plane's normal (normalized).
* @param {number} distance The shortest distance from the origin to the plane. The sign of
* distance
determines which side of the plane the origin
* is on. If distance
is positive, the origin is in the half-space
* in the direction of the normal; if negative, the origin is in the half-space
* opposite to the normal; if zero, the plane passes through the origin.
+ *
* @example
* // The plane x=0
* const plane = new Cesium.Plane(Cesium.Cartesian3.UNIT_X, 0.0);
- * @throws {DeveloperError} Normal must be normalized
+ *
+ * @exception {DeveloperError} Normal must be normalized
*/
function Plane(normal, distance) {
//>>includeStart('debug', pragmas.debug);
@@ -44,6 +48,7 @@ function Plane(normal, distance) {
/**
* The plane's normal.
+ *
* @type {Cartesian3}
*/
this.normal = Cartesian3.clone(normal);
@@ -54,6 +59,7 @@ function Plane(normal, distance) {
* is on. If distance
is positive, the origin is in the half-space
* in the direction of the normal; if negative, the origin is in the half-space
* opposite to the normal; if zero, the plane passes through the origin.
+ *
* @type {number}
*/
this.distance = distance;
@@ -61,15 +67,18 @@ function Plane(normal, distance) {
/**
* Creates a plane from a normal and a point on the plane.
+ *
* @param {Cartesian3} point The point on the plane.
* @param {Cartesian3} normal The plane's normal (normalized).
* @param {Plane} [result] The object onto which to store the result.
* @returns {Plane} A new plane instance or the modified result parameter.
+ *
* @example
* const point = Cesium.Cartesian3.fromDegrees(-72.0, 40.0);
* const normal = ellipsoid.geodeticSurfaceNormal(point);
* const tangentPlane = Cesium.Plane.fromPointNormal(point, normal);
- * @throws {DeveloperError} Normal must be normalized
+ *
+ * @exception {DeveloperError} Normal must be normalized
*/
Plane.fromPointNormal = function (point, normal, result) {
//>>includeStart('debug', pragmas.debug);
@@ -100,10 +109,12 @@ Plane.fromPointNormal = function (point, normal, result) {
const scratchNormal = new Cartesian3();
/**
* Creates a plane from the general equation
+ *
* @param {Cartesian4} coefficients The plane's normal (normalized).
* @param {Plane} [result] The object onto which to store the result.
* @returns {Plane} A new plane instance or the modified result parameter.
- * @throws {DeveloperError} Normal must be normalized
+ *
+ * @exception {DeveloperError} Normal must be normalized
*/
Plane.fromCartesian4 = function (coefficients, result) {
//>>includeStart('debug', pragmas.debug);
@@ -139,6 +150,7 @@ Plane.fromCartesian4 = function (coefficients, result) {
* is on. If the distance is positive, the point is in the half-space
* in the direction of the normal; if negative, the point is in the half-space
* opposite to the normal; if zero, the plane passes through the point.
+ *
* @param {Plane} plane The plane.
* @param {Cartesian3} point The point.
* @returns {number} The signed shortest distance of the point to the plane.
@@ -186,6 +198,7 @@ const scratchPlaneCartesian4 = new Cartesian4();
const scratchTransformNormal = new Cartesian3();
/**
* Transforms the plane by the given transformation matrix.
+ *
* @param {Plane} plane The plane.
* @param {Matrix4} transform The transformation matrix.
* @param {Plane} [result] The object into which to store the result.
@@ -233,6 +246,7 @@ Plane.transform = function (plane, transform, result) {
/**
* Duplicates a Plane instance.
+ *
* @param {Plane} plane The plane to duplicate.
* @param {Plane} [result] The object onto which to store the result.
* @returns {Plane} The modified result parameter or a new Plane instance if one was not provided.
@@ -255,6 +269,7 @@ Plane.clone = function (plane, result) {
/**
* Compares the provided Planes by normal and distance and returns
* true
if they are equal, false
otherwise.
+ *
* @param {Plane} left The first plane.
* @param {Plane} right The second plane.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -273,6 +288,7 @@ Plane.equals = function (left, right) {
/**
* A constant initialized to the XY plane passing through the origin, with normal in positive Z.
+ *
* @type {Plane}
* @constant
*/
@@ -280,6 +296,7 @@ Plane.ORIGIN_XY_PLANE = Object.freeze(new Plane(Cartesian3.UNIT_Z, 0.0));
/**
* A constant initialized to the YZ plane passing through the origin, with normal in positive X.
+ *
* @type {Plane}
* @constant
*/
@@ -287,6 +304,7 @@ Plane.ORIGIN_YZ_PLANE = Object.freeze(new Plane(Cartesian3.UNIT_X, 0.0));
/**
* A constant initialized to the ZX plane passing through the origin, with normal in positive Y.
+ *
* @type {Plane}
* @constant
*/
diff --git a/packages/engine/Source/Core/PlaneGeometry.js b/packages/engine/Source/Core/PlaneGeometry.js
index 6d21a0962bce..8bc861fd149f 100644
--- a/packages/engine/Source/Core/PlaneGeometry.js
+++ b/packages/engine/Source/Core/PlaneGeometry.js
@@ -12,10 +12,13 @@ import VertexFormat from "./VertexFormat.js";
/**
* Describes geometry representing a plane centered at the origin, with a unit width and length.
+ *
* @alias PlaneGeometry
- * @class
+ * @constructor
+ *
* @param {object} [options] Object with the following properties:
- * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
+ * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
+ *
* @example
* const planeGeometry = new Cesium.PlaneGeometry({
* vertexFormat : Cesium.VertexFormat.POSITION_ONLY
@@ -38,9 +41,11 @@ PlaneGeometry.packedLength = VertexFormat.packedLength;
/**
* Stores the provided instance into the provided array.
+ *
* @param {PlaneGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
PlaneGeometry.pack = function (value, array, startingIndex) {
@@ -63,8 +68,9 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {PlaneGeometry} [result] The object into which to store the result.
* @returns {PlaneGeometry} The modified result parameter or a new PlaneGeometry instance if one was not provided.
*/
@@ -95,6 +101,7 @@ const max = new Cartesian3(0.5, 0.5, 0.0);
/**
* Computes the geometric representation of a plane, including its vertices, indices, and a bounding sphere.
+ *
* @param {PlaneGeometry} planeGeometry A description of the plane.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/PlaneOutlineGeometry.js b/packages/engine/Source/Core/PlaneOutlineGeometry.js
index d2d1d81a1b85..e116db3d6fe2 100644
--- a/packages/engine/Source/Core/PlaneOutlineGeometry.js
+++ b/packages/engine/Source/Core/PlaneOutlineGeometry.js
@@ -10,8 +10,10 @@ import PrimitiveType from "./PrimitiveType.js";
/**
* Describes geometry representing the outline of a plane centered at the origin, with a unit width and length.
+ *
* @alias PlaneOutlineGeometry
- * @class
+ * @constructor
+ *
*/
function PlaneOutlineGeometry() {
this._workerName = "createPlaneOutlineGeometry";
@@ -25,8 +27,10 @@ PlaneOutlineGeometry.packedLength = 0;
/**
* Stores the provided instance into the provided array.
+ *
* @param {PlaneOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
+ *
* @returns {number[]} The array that was packed into
*/
PlaneOutlineGeometry.pack = function (value, array) {
@@ -40,8 +44,9 @@ PlaneOutlineGeometry.pack = function (value, array) {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {PlaneOutlineGeometry} [result] The object into which to store the result.
* @returns {PlaneOutlineGeometry} The modified result parameter or a new PlaneOutlineGeometry instance if one was not provided.
*/
@@ -62,6 +67,7 @@ const max = new Cartesian3(0.5, 0.5, 0.0);
/**
* Computes the geometric representation of an outline of a plane, including its vertices, indices, and a bounding sphere.
+ *
* @returns {Geometry|undefined} The computed vertices and indices.
*/
PlaneOutlineGeometry.createGeometry = function () {
diff --git a/packages/engine/Source/Core/PolygonGeometry.js b/packages/engine/Source/Core/PolygonGeometry.js
index 8eaed1986de9..6e8e9988dead 100644
--- a/packages/engine/Source/Core/PolygonGeometry.js
+++ b/packages/engine/Source/Core/PolygonGeometry.js
@@ -575,24 +575,29 @@ function createGeometryFromPositionsExtruded(
/**
* A description of a polygon on the ellipsoid. The polygon is defined by a polygon hierarchy. Polygon geometry can be rendered with both {@link Primitive} and {@link GroundPrimitive}.
+ *
* @alias PolygonGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {PolygonHierarchy} options.polygonHierarchy A polygon hierarchy that can include holes.
- * @param {number} [options.height] The distance in meters between the polygon and the ellipsoid surface.
+ * @param {number} [options.height=0.0] The distance in meters between the polygon and the ellipsoid surface.
* @param {number} [options.extrudedHeight] The distance in meters between the polygon's extruded face and the ellipsoid surface.
- * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
- * @param {number} [options.stRotation] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
- * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {boolean} [options.perPositionHeight] Use the height of options.positions for each position instead of using options.height to determine the height.
- * @param {boolean} [options.closeTop] When false, leaves off the top of an extruded polygon open.
- * @param {boolean} [options.closeBottom] When false, leaves off the bottom of an extruded polygon open.
+ * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
+ * @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
+ * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {boolean} [options.perPositionHeight=false] Use the height of options.positions for each position instead of using options.height to determine the height.
+ * @param {boolean} [options.closeTop=true] When false, leaves off the top of an extruded polygon open.
+ * @param {boolean} [options.closeBottom=true] When false, leaves off the bottom of an extruded polygon open.
* @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polygon edges must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
* @param {PolygonHierarchy} [options.textureCoordinates] Texture coordinates as a {@link PolygonHierarchy} of {@link Cartesian2} points. Has no effect for ground primitives.
+ *
* @see PolygonGeometry#createGeometry
* @see PolygonGeometry#fromPositions
+ *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Polygon.html|Cesium Sandcastle Polygon Demo}
+ *
* @example
* // 1. create a polygon from points
* const polygon = new Cesium.PolygonGeometry({
@@ -747,20 +752,22 @@ function PolygonGeometry(options) {
/**
* A description of a polygon from an array of positions. Polygon geometry can be rendered with both {@link Primitive} and {@link GroundPrimitive}.
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of positions that defined the corner points of the polygon.
- * @param {number} [options.height] The height of the polygon.
+ * @param {number} [options.height=0.0] The height of the polygon.
* @param {number} [options.extrudedHeight] The height of the polygon extrusion.
- * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
- * @param {number} [options.stRotation] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
- * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {boolean} [options.perPositionHeight] Use the height of options.positions for each position instead of using options.height to determine the height.
- * @param {boolean} [options.closeTop] When false, leaves off the top of an extruded polygon open.
- * @param {boolean} [options.closeBottom] When false, leaves off the bottom of an extruded polygon open.
- * @param {ArcType} [options.arcType] The type of line the polygon edges must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
+ * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
+ * @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
+ * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {boolean} [options.perPositionHeight=false] Use the height of options.positions for each position instead of using options.height to determine the height.
+ * @param {boolean} [options.closeTop=true] When false, leaves off the top of an extruded polygon open.
+ * @param {boolean} [options.closeBottom=true] When false, leaves off the bottom of an extruded polygon open.
+ * @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polygon edges must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
* @param {PolygonHierarchy} [options.textureCoordinates] Texture coordinates as a {@link PolygonHierarchy} of {@link Cartesian2} points. Has no effect for ground primitives.
* @returns {PolygonGeometry}
+ *
* @example
* // create a polygon from points
* const polygon = Cesium.PolygonGeometry.fromPositions({
@@ -773,6 +780,7 @@ function PolygonGeometry(options) {
* ])
* });
* const geometry = Cesium.PolygonGeometry.createGeometry(polygon);
+ *
* @see PolygonGeometry#createGeometry
*/
PolygonGeometry.fromPositions = function (options) {
@@ -804,9 +812,11 @@ PolygonGeometry.fromPositions = function (options) {
/**
* Stores the provided instance into the provided array.
+ *
* @param {PolygonGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
PolygonGeometry.pack = function (value, array, startingIndex) {
@@ -865,8 +875,9 @@ const dummyOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {PolygonGeometry} [result] The object into which to store the result.
*/
PolygonGeometry.unpack = function (array, startingIndex, result) {
@@ -1027,10 +1038,12 @@ const polygon = {
/**
* Computes a rectangle which encloses the polygon defined by the list of positions, including cases over the international date line and the poles.
+ *
* @param {Cartesian3[]} positions A linear ring defining the outer boundary of the polygon.
- * @param {Ellipsoid} [ellipsoid] The ellipsoid to be used as a reference.
- * @param {ArcType} [arcType] The type of line the polygon edges must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
+ * @param {ArcType} [arcType=ArcType.GEODESIC] The type of line the polygon edges must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
* @param {Rectangle} [result] An object in which to store the result.
+ *
* @returns {Rectangle} The result rectangle
*/
PolygonGeometry.computeRectangleFromPositions = function (
@@ -1258,6 +1271,7 @@ function computeBoundingRectangle(outerRing, rectangle, ellipsoid, stRotation) {
/**
* Computes the geometric representation of a polygon, including its vertices, indices, and a bounding sphere.
+ *
* @param {PolygonGeometry} polygonGeometry A description of the polygon.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
@@ -1488,9 +1502,6 @@ PolygonGeometry.createGeometry = function (polygonGeometry) {
};
/**
- * @param polygonGeometry
- * @param minHeightFunc
- * @param maxHeightFunc
* @private
*/
PolygonGeometry.createShadowVolume = function (
diff --git a/packages/engine/Source/Core/PolygonGeometryLibrary.js b/packages/engine/Source/Core/PolygonGeometryLibrary.js
index 287d1f72b25a..2381d80d4e73 100644
--- a/packages/engine/Source/Core/PolygonGeometryLibrary.js
+++ b/packages/engine/Source/Core/PolygonGeometryLibrary.js
@@ -190,12 +190,14 @@ PolygonGeometryLibrary.subdivideRhumbLineCount = function (
/**
* Subdivides texture coordinates based on the subdivision of the associated world positions.
+ *
* @param {Cartesian2} t0 First texture coordinate.
* @param {Cartesian2} t1 Second texture coordinate.
* @param {Cartesian3} p0 First world position.
* @param {Cartesian3} p1 Second world position.
* @param {number} minDistance Minimum distance for a segment.
* @param {Cartesian2[]} result The subdivided texture coordinates.
+ *
* @private
*/
PolygonGeometryLibrary.subdivideTexcoordLine = function (
@@ -261,6 +263,7 @@ PolygonGeometryLibrary.subdivideLine = function (p0, p1, minDistance, result) {
/**
* Subdivides texture coordinates based on the subdivision of the associated world positions using a rhumb line.
+ *
* @param {Cartesian2} t0 First texture coordinate.
* @param {Cartesian2} t1 Second texture coordinate.
* @param {Ellipsoid} ellipsoid The ellipsoid.
@@ -268,6 +271,7 @@ PolygonGeometryLibrary.subdivideLine = function (p0, p1, minDistance, result) {
* @param {Cartesian3} p1 Second world position.
* @param {number} minDistance Minimum distance for a segment.
* @param {Cartesian2[]} result The subdivided texture coordinates.
+ *
* @private
*/
PolygonGeometryLibrary.subdivideTexcoordRhumbLine = function (
@@ -683,10 +687,12 @@ function wirePolygon(
/**
* Splits an array of polygons, defined as a list of Cartesian3 positions in counter-clockwise winding order, along the equator.
+ *
* @param {Array} outerRings An array of polygons, defined as a list of Cartesian3 positions in counter-clockwise winding order.
* @param {Ellipsoid} ellipsoid The ellipsoid to be used as a reference.
* @param {ArcType} arcType The type of line the polygon edges must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
* @param {Array} [result] An array of split polygons.
+ *
* @returns {Array} An array of split polygons.
*/
PolygonGeometryLibrary.splitPolygonsOnEquator = function (
diff --git a/packages/engine/Source/Core/PolygonHierarchy.js b/packages/engine/Source/Core/PolygonHierarchy.js
index 92aff2c5f4c3..a1751f6f7284 100644
--- a/packages/engine/Source/Core/PolygonHierarchy.js
+++ b/packages/engine/Source/Core/PolygonHierarchy.js
@@ -4,7 +4,8 @@ import defined from "./defined.js";
* An hierarchy of linear rings which define a polygon and its holes.
* The holes themselves may also have holes which nest inner polygons.
* @alias PolygonHierarchy
- * @class
+ * @constructor
+ *
* @param {Cartesian3[]} [positions] A linear ring defining the outer boundary of the polygon or hole.
* @param {PolygonHierarchy[]} [holes] An array of polygon hierarchies defining holes in the polygon.
*/
diff --git a/packages/engine/Source/Core/PolygonOutlineGeometry.js b/packages/engine/Source/Core/PolygonOutlineGeometry.js
index a236749970ef..14c235d55c48 100644
--- a/packages/engine/Source/Core/PolygonOutlineGeometry.js
+++ b/packages/engine/Source/Core/PolygonOutlineGeometry.js
@@ -264,19 +264,23 @@ function createGeometryFromPositionsExtruded(
/**
* A description of the outline of a polygon on the ellipsoid. The polygon is defined by a polygon hierarchy.
+ *
* @alias PolygonOutlineGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {PolygonHierarchy} options.polygonHierarchy A polygon hierarchy that can include holes.
- * @param {number} [options.height] The distance in meters between the polygon and the ellipsoid surface.
+ * @param {number} [options.height=0.0] The distance in meters between the polygon and the ellipsoid surface.
* @param {number} [options.extrudedHeight] The distance in meters between the polygon's extruded face and the ellipsoid surface.
- * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
- * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {boolean} [options.perPositionHeight] Use the height of options.positions for each position instead of using options.height to determine the height.
- * @param {ArcType} [options.arcType] The type of path the outline must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
+ * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
+ * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {boolean} [options.perPositionHeight=false] Use the height of options.positions for each position instead of using options.height to determine the height.
+ * @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of path the outline must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
+ *
* @see PolygonOutlineGeometry#createGeometry
* @see PolygonOutlineGeometry#fromPositions
+ *
* @example
* // 1. create a polygon outline from points
* const polygon = new Cesium.PolygonOutlineGeometry({
@@ -411,9 +415,11 @@ function PolygonOutlineGeometry(options) {
/**
* Stores the provided instance into the provided array.
+ *
* @param {PolygonOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
PolygonOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -453,8 +459,9 @@ const dummyOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {PolygonOutlineGeometry} [result] The object into which to store the result.
* @returns {PolygonOutlineGeometry} The modified result parameter or a new PolygonOutlineGeometry instance if one was not provided.
*/
@@ -506,15 +513,18 @@ PolygonOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* A description of a polygon outline from an array of positions.
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of positions that defined the corner points of the polygon.
- * @param {number} [options.height] The height of the polygon.
+ * @param {number} [options.height=0.0] The height of the polygon.
* @param {number} [options.extrudedHeight] The height of the polygon extrusion.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
- * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {boolean} [options.perPositionHeight] Use the height of options.positions for each position instead of using options.height to determine the height.
- * @param {ArcType} [options.arcType] The type of path the outline must follow. Valid options are {@link LinkType.GEODESIC} and {@link ArcType.RHUMB}.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
+ * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {boolean} [options.perPositionHeight=false] Use the height of options.positions for each position instead of using options.height to determine the height.
+ * @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of path the outline must follow. Valid options are {@link LinkType.GEODESIC} and {@link ArcType.RHUMB}.
* @returns {PolygonOutlineGeometry}
+ *
+ *
* @example
* // create a polygon from points
* const polygon = Cesium.PolygonOutlineGeometry.fromPositions({
@@ -527,6 +537,7 @@ PolygonOutlineGeometry.unpack = function (array, startingIndex, result) {
* ])
* });
* const geometry = Cesium.PolygonOutlineGeometry.createGeometry(polygon);
+ *
* @see PolygonOutlineGeometry#createGeometry
*/
PolygonOutlineGeometry.fromPositions = function (options) {
@@ -553,6 +564,7 @@ PolygonOutlineGeometry.fromPositions = function (options) {
/**
* Computes the geometric representation of a polygon outline, including its vertices, indices, and a bounding sphere.
+ *
* @param {PolygonOutlineGeometry} polygonGeometry A description of the polygon outline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/PolygonPipeline.js b/packages/engine/Source/Core/PolygonPipeline.js
index 4275266fb0bf..539c656f8d29 100644
--- a/packages/engine/Source/Core/PolygonPipeline.js
+++ b/packages/engine/Source/Core/PolygonPipeline.js
@@ -23,8 +23,7 @@ const scaleToGeodeticHeightP = new Cartesian3();
const PolygonPipeline = {};
/**
- * @param positions
- * @throws {DeveloperError} At least three positions are required.
+ * @exception {DeveloperError} At least three positions are required.
*/
PolygonPipeline.computeArea2D = function (positions) {
//>>includeStart('debug', pragmas.debug);
@@ -50,9 +49,9 @@ PolygonPipeline.computeArea2D = function (positions) {
};
/**
- * @param positions
* @returns {WindingOrder} The winding order.
- * @throws {DeveloperError} At least three positions are required.
+ *
+ * @exception {DeveloperError} At least three positions are required.
*/
PolygonPipeline.computeWindingOrder2D = function (positions) {
const area = PolygonPipeline.computeArea2D(positions);
@@ -61,6 +60,7 @@ PolygonPipeline.computeWindingOrder2D = function (positions) {
/**
* Triangulate a polygon.
+ *
* @param {Cartesian2[]} positions Cartesian2 array containing the vertices of the polygon
* @param {number[]} [holes] An array of the staring indices of the holes.
* @returns {number[]} Index array representing triangles that fill the polygon
@@ -88,14 +88,16 @@ const subdivisionTexcoordMidScratch = new Cartesian2();
/**
* Subdivides positions and raises points to the surface of the ellipsoid.
+ *
* @param {Ellipsoid} ellipsoid The ellipsoid the polygon in on.
* @param {Cartesian3[]} positions An array of {@link Cartesian3} positions of the polygon.
* @param {number[]} indices An array of indices that determines the triangles in the polygon.
* @param {Cartesian2[]} texcoords An optional array of {@link Cartesian2} texture coordinates of the polygon.
- * @param {number} [granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @throws {DeveloperError} At least three indices are required.
- * @throws {DeveloperError} The number of indices must be divisable by three.
- * @throws {DeveloperError} Granularity must be greater than zero.
+ * @param {number} [granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ *
+ * @exception {DeveloperError} At least three indices are required.
+ * @exception {DeveloperError} The number of indices must be divisable by three.
+ * @exception {DeveloperError} Granularity must be greater than zero.
*/
PolygonPipeline.computeSubdivision = function (
ellipsoid,
@@ -321,14 +323,16 @@ const subdivisionCartographicScratch = new Cartographic();
/**
* Subdivides positions on rhumb lines and raises points to the surface of the ellipsoid.
+ *
* @param {Ellipsoid} ellipsoid The ellipsoid the polygon in on.
* @param {Cartesian3[]} positions An array of {@link Cartesian3} positions of the polygon.
* @param {number[]} indices An array of indices that determines the triangles in the polygon.
* @param {Cartesian2[]} texcoords An optional array of {@link Cartesian2} texture coordinates of the polygon.
- * @param {number} [granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @throws {DeveloperError} At least three indices are required.
- * @throws {DeveloperError} The number of indices must be divisable by three.
- * @throws {DeveloperError} Granularity must be greater than zero.
+ * @param {number} [granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ *
+ * @exception {DeveloperError} At least three indices are required.
+ * @exception {DeveloperError} The number of indices must be divisable by three.
+ * @exception {DeveloperError} Granularity must be greater than zero.
*/
PolygonPipeline.computeRhumbLineSubdivision = function (
ellipsoid,
@@ -580,10 +584,11 @@ PolygonPipeline.computeRhumbLineSubdivision = function (
/**
* Scales each position of a geometry's position attribute to a height, in place.
+ *
* @param {number[]} positions The array of numbers representing the positions to be scaled
- * @param {number} [height] The desired height to add to the positions
- * @param {Ellipsoid} [ellipsoid] The ellipsoid on which the positions lie.
- * @param {boolean} [scaleToSurface] true
if the positions need to be scaled to the surface before the height is added.
+ * @param {number} [height=0.0] The desired height to add to the positions
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
+ * @param {boolean} [scaleToSurface=true] true
if the positions need to be scaled to the surface before the height is added.
* @returns {number[]} The input array of positions, scaled to height
*/
PolygonPipeline.scaleToGeodeticHeight = function (
diff --git a/packages/engine/Source/Core/PolylineGeometry.js b/packages/engine/Source/Core/PolylineGeometry.js
index f6688e086080..a5f50ef1680a 100644
--- a/packages/engine/Source/Core/PolylineGeometry.js
+++ b/packages/engine/Source/Core/PolylineGeometry.js
@@ -63,22 +63,28 @@ function interpolateColors(p0, p1, color0, color1, numPoints) {
* A description of a polyline modeled as a line strip; the first two positions define a line segment,
* and each additional position defines a line segment from the previous position. The polyline is capable of
* displaying with a material.
+ *
* @alias PolylineGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of {@link Cartesian3} defining the positions in the polyline as a line strip.
- * @param {number} [options.width] The width in pixels.
+ * @param {number} [options.width=1.0] The width in pixels.
* @param {Color[]} [options.colors] An Array of {@link Color} defining the per vertex or per segment colors.
- * @param {boolean} [options.colorsPerVertex] A boolean that determines whether the colors will be flat across each segment of the line or interpolated across the vertices.
- * @param {ArcType} [options.arcType] The type of line the polyline segments must follow.
- * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude if options.arcType is not ArcType.NONE. Determines the number of positions in the buffer.
- * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
- * @throws {DeveloperError} At least two positions are required.
- * @throws {DeveloperError} width must be greater than or equal to one.
- * @throws {DeveloperError} colors has an invalid length.
+ * @param {boolean} [options.colorsPerVertex=false] A boolean that determines whether the colors will be flat across each segment of the line or interpolated across the vertices.
+ * @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polyline segments must follow.
+ * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude if options.arcType is not ArcType.NONE. Determines the number of positions in the buffer.
+ * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
+ *
+ * @exception {DeveloperError} At least two positions are required.
+ * @exception {DeveloperError} width must be greater than or equal to one.
+ * @exception {DeveloperError} colors has an invalid length.
+ *
* @see PolylineGeometry#createGeometry
+ *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Polyline.html|Cesium Sandcastle Polyline Demo}
+ *
* @example
* // A polyline with two connected line segments
* const polyline = new Cesium.PolylineGeometry({
@@ -145,9 +151,11 @@ function PolylineGeometry(options) {
/**
* Stores the provided instance into the provided array.
+ *
* @param {PolylineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
PolylineGeometry.pack = function (value, array, startingIndex) {
@@ -209,8 +217,9 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {PolylineGeometry} [result] The object into which to store the result.
* @returns {PolylineGeometry} The modified result parameter or a new PolylineGeometry instance if one was not provided.
*/
@@ -283,6 +292,7 @@ const scratchNextPosition = new Cartesian3();
/**
* Computes the geometric representation of a polyline, including its vertices, indices, and a bounding sphere.
+ *
* @param {PolylineGeometry} polylineGeometry A description of the polyline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/PolylinePipeline.js b/packages/engine/Source/Core/PolylinePipeline.js
index 5c7338f3f7f0..dccbae1ec08f 100644
--- a/packages/engine/Source/Core/PolylinePipeline.js
+++ b/packages/engine/Source/Core/PolylinePipeline.js
@@ -182,19 +182,23 @@ function generateCartesianRhumbArc(
/**
* Breaks a {@link Polyline} into segments such that it does not cross the ±180 degree meridian of an ellipsoid.
+ *
* @param {Cartesian3[]} positions The polyline's Cartesian positions.
- * @param {Matrix4} [modelMatrix] The polyline's model matrix. Assumed to be an affine
+ * @param {Matrix4} [modelMatrix=Matrix4.IDENTITY] The polyline's model matrix. Assumed to be an affine
* transformation matrix, where the upper left 3x3 elements are a rotation matrix, and
* the upper three elements in the fourth column are the translation. The bottom row is assumed to be [0, 0, 0, 1].
* The matrix is not verified to be in the proper form.
* @returns {object} An object with a positions
property that is an array of positions and a
* segments
property.
+ *
+ *
* @example
* const polylines = new Cesium.PolylineCollection();
* const polyline = polylines.add(...);
* const positions = polyline.positions;
* const modelMatrix = polylines.modelMatrix;
* const segments = Cesium.PolylinePipeline.wrapLongitude(positions, modelMatrix);
+ *
* @see PolygonPipeline.wrapLongitude
* @see Polyline
* @see PolylineCollection
@@ -305,10 +309,11 @@ PolylinePipeline.wrapLongitude = function (positions, modelMatrix) {
* Subdivides polyline and raises all points to the specified height. Returns an array of numbers to represent the positions.
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions The array of type {Cartesian3} representing positions.
- * @param {number|number[]} [options.height] A number or array of numbers representing the heights of each position.
- * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid on which the positions lie.
+ * @param {number|number[]} [options.height=0.0] A number or array of numbers representing the heights of each position.
+ * @param {number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
* @returns {number[]} A new array of positions of type {number} that have been subdivided and raised to the surface of the ellipsoid.
+ *
* @example
* const positions = Cesium.Cartesian3.fromDegreesArray([
* -105.0, 40.0,
@@ -411,10 +416,11 @@ const scratchCartographic1 = new Cartographic();
* Subdivides polyline and raises all points to the specified height using Rhumb lines. Returns an array of numbers to represent the positions.
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions The array of type {Cartesian3} representing positions.
- * @param {number|number[]} [options.height] A number or array of numbers representing the heights of each position.
- * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid on which the positions lie.
+ * @param {number|number[]} [options.height=0.0] A number or array of numbers representing the heights of each position.
+ * @param {number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
* @returns {number[]} A new array of positions of type {number} that have been subdivided and raised to the surface of the ellipsoid.
+ *
* @example
* const positions = Cesium.Cartesian3.fromDegreesArray([
* -105.0, 40.0,
@@ -516,10 +522,11 @@ PolylinePipeline.generateRhumbArc = function (options) {
* Subdivides polyline and raises all points to the specified height. Returns an array of new {Cartesian3} positions.
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions The array of type {Cartesian3} representing positions.
- * @param {number|number[]} [options.height] A number or array of numbers representing the heights of each position.
- * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid on which the positions lie.
+ * @param {number|number[]} [options.height=0.0] A number or array of numbers representing the heights of each position.
+ * @param {number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
* @returns {Cartesian3[]} A new array of cartesian3 positions that have been subdivided and raised to the surface of the ellipsoid.
+ *
* @example
* const positions = Cesium.Cartesian3.fromDegreesArray([
* -105.0, 40.0,
@@ -545,10 +552,11 @@ PolylinePipeline.generateCartesianArc = function (options) {
* Subdivides polyline and raises all points to the specified height using Rhumb Lines. Returns an array of new {Cartesian3} positions.
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions The array of type {Cartesian3} representing positions.
- * @param {number|number[]} [options.height] A number or array of numbers representing the heights of each position.
- * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid on which the positions lie.
+ * @param {number|number[]} [options.height=0.0] A number or array of numbers representing the heights of each position.
+ * @param {number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
* @returns {Cartesian3[]} A new array of cartesian3 positions that have been subdivided and raised to the surface of the ellipsoid.
+ *
* @example
* const positions = Cesium.Cartesian3.fromDegreesArray([
* -105.0, 40.0,
diff --git a/packages/engine/Source/Core/PolylineVolumeGeometry.js b/packages/engine/Source/Core/PolylineVolumeGeometry.js
index 94e5cd355736..fe5aa704bbfc 100644
--- a/packages/engine/Source/Core/PolylineVolumeGeometry.js
+++ b/packages/engine/Source/Core/PolylineVolumeGeometry.js
@@ -171,17 +171,22 @@ function computeAttributes(
/**
* A description of a polyline with a volume (a 2D shape extruded along a polyline).
+ *
* @alias PolylineVolumeGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.polylinePositions An array of {@link Cartesian3} positions that define the center of the polyline volume.
* @param {Cartesian2[]} options.shapePositions An array of {@link Cartesian2} positions that define the shape to be extruded along the polyline
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
- * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
- * @param {CornerType} [options.cornerType] Determines the style of the corners.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
+ * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
+ * @param {CornerType} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
+ *
* @see PolylineVolumeGeometry#createGeometry
+ *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Polyline%20Volume.html|Cesium Sandcastle Polyline Volume Demo}
+ *
* @example
* function computeCircle(radius) {
* const positions = [];
@@ -243,9 +248,11 @@ function PolylineVolumeGeometry(options) {
/**
* Stores the provided instance into the provided array.
+ *
* @param {PolylineVolumeGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
PolylineVolumeGeometry.pack = function (value, array, startingIndex) {
@@ -303,8 +310,9 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {PolylineVolumeGeometry} [result] The object into which to store the result.
* @returns {PolylineVolumeGeometry} The modified result parameter or a new PolylineVolumeGeometry instance if one was not provided.
*/
@@ -368,6 +376,7 @@ const brScratch = new BoundingRectangle();
/**
* Computes the geometric representation of a polyline with a volume, including its vertices, indices, and a bounding sphere.
+ *
* @param {PolylineVolumeGeometry} polylineVolumeGeometry A description of the polyline volume.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/PolylineVolumeOutlineGeometry.js b/packages/engine/Source/Core/PolylineVolumeOutlineGeometry.js
index e06e8c135126..facd80c11dfd 100644
--- a/packages/engine/Source/Core/PolylineVolumeOutlineGeometry.js
+++ b/packages/engine/Source/Core/PolylineVolumeOutlineGeometry.js
@@ -76,15 +76,19 @@ function computeAttributes(positions, shape) {
/**
* A description of a polyline with a volume (a 2D shape extruded along a polyline).
+ *
* @alias PolylineVolumeOutlineGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.polylinePositions An array of positions that define the center of the polyline volume.
* @param {Cartesian2[]} options.shapePositions An array of positions that define the shape to be extruded along the polyline
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
- * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {CornerType} [options.cornerType] Determines the style of the corners.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
+ * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {CornerType} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
+ *
* @see PolylineVolumeOutlineGeometry#createGeometry
+ *
* @example
* function computeCircle(radius) {
* const positions = [];
@@ -141,9 +145,11 @@ function PolylineVolumeOutlineGeometry(options) {
/**
* Stores the provided instance into the provided array.
+ *
* @param {PolylineVolumeOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
PolylineVolumeOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -197,8 +203,9 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {PolylineVolumeOutlineGeometry} [result] The object into which to store the result.
* @returns {PolylineVolumeOutlineGeometry} The modified result parameter or a new PolylineVolumeOutlineGeometry instance if one was not provided.
*/
@@ -254,6 +261,7 @@ const brScratch = new BoundingRectangle();
/**
* Computes the geometric representation of the outline of a polyline with a volume, including its vertices, indices, and a bounding sphere.
+ *
* @param {PolylineVolumeOutlineGeometry} polylineVolumeOutlineGeometry A description of the polyline volume outline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/PrimitiveType.js b/packages/engine/Source/Core/PrimitiveType.js
index b1e464032a11..9be8354aa0b7 100644
--- a/packages/engine/Source/Core/PrimitiveType.js
+++ b/packages/engine/Source/Core/PrimitiveType.js
@@ -2,11 +2,13 @@ import WebGLConstants from "./WebGLConstants.js";
/**
* The type of a geometric primitive, i.e., points, lines, and triangles.
+ *
* @enum {number}
*/
const PrimitiveType = {
/**
* Points primitive where each vertex (or index) is a separate point.
+ *
* @type {number}
* @constant
*/
@@ -14,6 +16,7 @@ const PrimitiveType = {
/**
* Lines primitive where each two vertices (or indices) is a line segment. Line segments are not necessarily connected.
+ *
* @type {number}
* @constant
*/
@@ -22,6 +25,7 @@ const PrimitiveType = {
/**
* Line loop primitive where each vertex (or index) after the first connects a line to
* the previous vertex, and the last vertex implicitly connects to the first.
+ *
* @type {number}
* @constant
*/
@@ -29,6 +33,7 @@ const PrimitiveType = {
/**
* Line strip primitive where each vertex (or index) after the first connects a line to the previous vertex.
+ *
* @type {number}
* @constant
*/
@@ -36,6 +41,7 @@ const PrimitiveType = {
/**
* Triangles primitive where each three vertices (or indices) is a triangle. Triangles do not necessarily share edges.
+ *
* @type {number}
* @constant
*/
@@ -44,6 +50,7 @@ const PrimitiveType = {
/**
* Triangle strip primitive where each vertex (or index) after the first two connect to
* the previous two vertices forming a triangle. For example, this can be used to model a wall.
+ *
* @type {number}
* @constant
*/
@@ -53,6 +60,7 @@ const PrimitiveType = {
* Triangle fan primitive where each vertex (or index) after the first two connect to
* the previous vertex and the first vertex forming a triangle. For example, this can be used
* to model a cone or circle.
+ *
* @type {number}
* @constant
*/
@@ -60,7 +68,6 @@ const PrimitiveType = {
};
/**
- * @param primitiveType
* @private
*/
PrimitiveType.isLines = function (primitiveType) {
@@ -72,7 +79,6 @@ PrimitiveType.isLines = function (primitiveType) {
};
/**
- * @param primitiveType
* @private
*/
PrimitiveType.isTriangles = function (primitiveType) {
@@ -84,7 +90,6 @@ PrimitiveType.isTriangles = function (primitiveType) {
};
/**
- * @param primitiveType
* @private
*/
PrimitiveType.validate = function (primitiveType) {
diff --git a/packages/engine/Source/Core/Proxy.js b/packages/engine/Source/Core/Proxy.js
index 775cb7ce30aa..c16a27f1ad1f 100644
--- a/packages/engine/Source/Core/Proxy.js
+++ b/packages/engine/Source/Core/Proxy.js
@@ -2,8 +2,10 @@ import DeveloperError from "./DeveloperError.js";
/**
* Base class for proxying requested made by {@link Resource}.
+ *
* @alias Proxy
- * @class
+ * @constructor
+ *
* @see DefaultProxy
*/
function Proxy() {
@@ -12,6 +14,7 @@ function Proxy() {
/**
* Get the final URL to use to request a given resource.
+ *
* @param {string} resource The resource to request.
* @returns {string} proxied resource
* @function
diff --git a/packages/engine/Source/Core/QuadraticRealPolynomial.js b/packages/engine/Source/Core/QuadraticRealPolynomial.js
index 14515354dc0d..17a0fe1031f8 100644
--- a/packages/engine/Source/Core/QuadraticRealPolynomial.js
+++ b/packages/engine/Source/Core/QuadraticRealPolynomial.js
@@ -3,12 +3,14 @@ import CesiumMath from "./Math.js";
/**
* Defines functions for 2nd order polynomial functions of one variable with only real coefficients.
+ *
* @namespace QuadraticRealPolynomial
*/
const QuadraticRealPolynomial = {};
/**
* Provides the discriminant of the quadratic equation from the supplied coefficients.
+ *
* @param {number} a The coefficient of the 2nd order monomial.
* @param {number} b The coefficient of the 1st order monomial.
* @param {number} c The coefficient of the 0th order monomial.
@@ -45,6 +47,7 @@ function addWithCancellationCheck(left, right, tolerance) {
/**
* Provides the real valued roots of the quadratic polynomial with the provided coefficients.
+ *
* @param {number} a The coefficient of the 2nd order monomial.
* @param {number} b The coefficient of the 1st order monomial.
* @param {number} c The coefficient of the 0th order monomial.
diff --git a/packages/engine/Source/Core/QuantizedMeshTerrainData.js b/packages/engine/Source/Core/QuantizedMeshTerrainData.js
index 056d76b855fa..f3c8d45d7cad 100644
--- a/packages/engine/Source/Core/QuantizedMeshTerrainData.js
+++ b/packages/engine/Source/Core/QuantizedMeshTerrainData.js
@@ -20,8 +20,10 @@ import TerrainMesh from "./TerrainMesh.js";
* as 16-bit values in the range 0 to 32767. Longitude and latitude are zero at the southwest corner
* of the tile and 32767 at the northeast corner. Height is zero at the minimum height in the tile
* and 32767 at the maximum height in the tile.
+ *
* @alias QuantizedMeshTerrainData
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {Uint16Array} options.quantizedVertices The buffer containing the quantized mesh.
* @param {Uint16Array|Uint32Array} options.indices The indices specifying how the quantized vertices are linked
@@ -41,7 +43,7 @@ import TerrainMesh from "./TerrainMesh.js";
* @param {number} options.southSkirtHeight The height of the skirt to add on the southern edge of the tile.
* @param {number} options.eastSkirtHeight The height of the skirt to add on the eastern edge of the tile.
* @param {number} options.northSkirtHeight The height of the skirt to add on the northern edge of the tile.
- * @param {number} [options.childTileMask] A bit mask indicating which of this tile's four children exist.
+ * @param {number} [options.childTileMask=15] A bit mask indicating which of this tile's four children exist.
* If a child's bit is set, geometry will be requested for that tile as well when it
* is needed. If the bit is cleared, the child tile is not requested and geometry is
* instead upsampled from the parent. The bit values are as follows:
@@ -52,11 +54,13 @@ import TerrainMesh from "./TerrainMesh.js";
* 2 4 Northwest
* 3 8 Northeast
*
- * @param {boolean} [options.createdByUpsampling] True if this instance was created by upsampling another instance;
+ * @param {boolean} [options.createdByUpsampling=false] True if this instance was created by upsampling another instance;
* otherwise, false.
* @param {Uint8Array} [options.encodedNormals] The buffer containing per vertex normals, encoded using 'oct' encoding
* @param {Uint8Array} [options.waterMask] The buffer containing the watermask.
* @param {Credit[]} [options.credits] Array of credits for this tile.
+ *
+ *
* @example
* const data = new Cesium.QuantizedMeshTerrainData({
* minimumHeight : -100,
@@ -82,6 +86,7 @@ import TerrainMesh from "./TerrainMesh.js";
* eastSkirtHeight : 1.0,
* northSkirtHeight : 1.0
* });
+ *
* @see TerrainData
* @see HeightmapTerrainData
* @see GoogleEarthEnterpriseTerrainData
@@ -267,15 +272,17 @@ const createMeshTaskProcessorThrottle = new TaskProcessor(
/**
* Creates a {@link TerrainMesh} from this terrain data.
+ *
* @private
+ *
* @param {object} options Object with the following properties:
* @param {TilingScheme} options.tilingScheme The tiling scheme to which this tile belongs.
* @param {number} options.x The X coordinate of the tile for which to create the terrain data.
* @param {number} options.y The Y coordinate of the tile for which to create the terrain data.
* @param {number} options.level The level of the tile for which to create the terrain data.
- * @param {number} [options.exaggeration] The scale used to exaggerate the terrain.
- * @param {number} [options.exaggerationRelativeHeight] The height relative to which terrain is exaggerated.
- * @param {boolean} [options.throttle] If true, indicates that this operation will need to be retried if too many asynchronous mesh creations are already in progress.
+ * @param {number} [options.exaggeration=1.0] The scale used to exaggerate the terrain.
+ * @param {number} [options.exaggerationRelativeHeight=0.0] The height relative to which terrain is exaggerated.
+ * @param {boolean} [options.throttle=true] If true, indicates that this operation will need to be retried if too many asynchronous mesh creations are already in progress.
* @returns {Promise|undefined} A promise for the terrain mesh, or undefined if too many
* asynchronous mesh creations are already in progress and the operation should
* be retried later.
@@ -409,6 +416,7 @@ const upsampleTaskProcessor = new TaskProcessor(
/**
* Upsamples this terrain data for use by a descendant tile. The resulting instance will contain a subset of the
* vertices in this instance, interpolated if necessary.
+ *
* @param {TilingScheme} tilingScheme The tiling scheme of this terrain data.
* @param {number} thisX The X coordinate of this tile in the tiling scheme.
* @param {number} thisY The Y coordinate of this tile in the tiling scheme.
@@ -553,6 +561,7 @@ const barycentricCoordinateScratch = new Cartesian3();
/**
* Computes the terrain height at a specified longitude and latitude.
+ *
* @param {Rectangle} rectangle The rectangle covered by this terrain data.
* @param {number} longitude The longitude in radians.
* @param {number} latitude The latitude in radians.
@@ -710,6 +719,7 @@ function interpolateHeight(terrainData, u, v) {
* {@link HeightmapTerrainData.childTileMask}. The given child tile coordinates are assumed
* to be one of the four children of this tile. If non-child tile coordinates are
* given, the availability of the southeast child tile is returned.
+ *
* @param {number} thisX The tile X coordinate of this (the parent) tile.
* @param {number} thisY The tile Y coordinate of this (the parent) tile.
* @param {number} childX The tile X coordinate of the child tile to check for availability.
@@ -753,6 +763,7 @@ QuantizedMeshTerrainData.prototype.isChildAvailable = function (
* terrain data. If this value is false, the data was obtained from some other source, such
* as by downloading it from a remote server. This method should return true for instances
* returned from a call to {@link HeightmapTerrainData#upsample}.
+ *
* @returns {boolean} True if this instance was created by upsampling; otherwise, false.
*/
QuantizedMeshTerrainData.prototype.wasCreatedByUpsampling = function () {
diff --git a/packages/engine/Source/Core/QuarticRealPolynomial.js b/packages/engine/Source/Core/QuarticRealPolynomial.js
index 9d81a95087b7..c71888ad4fae 100644
--- a/packages/engine/Source/Core/QuarticRealPolynomial.js
+++ b/packages/engine/Source/Core/QuarticRealPolynomial.js
@@ -5,12 +5,14 @@ import QuadraticRealPolynomial from "./QuadraticRealPolynomial.js";
/**
* Defines functions for 4th order polynomial functions of one variable with only real coefficients.
+ *
* @namespace QuarticRealPolynomial
*/
const QuarticRealPolynomial = {};
/**
* Provides the discriminant of the quartic equation from the supplied coefficients.
+ *
* @param {number} a The coefficient of the 4th order monomial.
* @param {number} b The coefficient of the 3rd order monomial.
* @param {number} c The coefficient of the 2nd order monomial.
@@ -260,6 +262,7 @@ function neumark(a3, a2, a1, a0) {
/**
* Provides the real valued roots of the quartic polynomial with the provided coefficients.
+ *
* @param {number} a The coefficient of the 4th order monomial.
* @param {number} b The coefficient of the 3rd order monomial.
* @param {number} c The coefficient of the 2nd order monomial.
diff --git a/packages/engine/Source/Core/Quaternion.js b/packages/engine/Source/Core/Quaternion.js
index 81a4db2f9234..333e353b7816 100644
--- a/packages/engine/Source/Core/Quaternion.js
+++ b/packages/engine/Source/Core/Quaternion.js
@@ -9,11 +9,13 @@ import Matrix3 from "./Matrix3.js";
/**
* A set of 4-dimensional coordinates used to represent rotation in 3-dimensional space.
* @alias Quaternion
- * @class
- * @param {number} [x] The X component.
- * @param {number} [y] The Y component.
- * @param {number} [z] The Z component.
- * @param {number} [w] The W component.
+ * @constructor
+ *
+ * @param {number} [x=0.0] The X component.
+ * @param {number} [y=0.0] The Y component.
+ * @param {number} [z=0.0] The Z component.
+ * @param {number} [w=0.0] The W component.
+ *
* @see PackableForInterpolation
*/
function Quaternion(x, y, z, w) {
@@ -50,6 +52,7 @@ let fromAxisAngleScratch = new Cartesian3();
/**
* Computes a quaternion representing a rotation around an axis.
+ *
* @param {Cartesian3} axis The axis of rotation.
* @param {number} angle The angle in radians to rotate around the axis.
* @param {Quaternion} [result] The object onto which to store the result.
@@ -83,9 +86,11 @@ const fromRotationMatrixNext = [1, 2, 0];
const fromRotationMatrixQuat = new Array(3);
/**
* Computes a Quaternion from the provided Matrix3 instance.
+ *
* @param {Matrix3} matrix The rotation matrix.
* @param {Quaternion} [result] The object onto which to store the result.
* @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.
+ *
* @see Matrix3.fromQuaternion
*/
Quaternion.fromRotationMatrix = function (matrix, result) {
@@ -174,6 +179,7 @@ let scratchRollQuaternion = new Quaternion();
* Computes a rotation from the given heading, pitch and roll angles. Heading is the rotation about the
* negative z axis. Pitch is the rotation about the negative y axis. Roll is the rotation about
* the positive x axis.
+ *
* @param {HeadingPitchRoll} headingPitchRoll The rotation expressed as a heading, pitch and roll.
* @param {Quaternion} [result] The object onto which to store the result.
* @returns {Quaternion} The modified result parameter or a new Quaternion instance if none was provided.
@@ -220,9 +226,11 @@ Quaternion.packedLength = 4;
/**
* Stores the provided instance into the provided array.
+ *
* @param {Quaternion} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
Quaternion.pack = function (value, array, startingIndex) {
@@ -243,8 +251,9 @@ Quaternion.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Quaternion} [result] The object into which to store the result.
* @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.
*/
@@ -273,9 +282,10 @@ Quaternion.packedInterpolationLength = 3;
/**
* Converts a packed array into a form suitable for interpolation.
+ *
* @param {number[]} packedArray The packed array.
- * @param {number} [startingIndex] The index of the first element to be converted.
- * @param {number} [lastIndex] The index of the last element to be converted.
+ * @param {number} [startingIndex=0] The index of the first element to be converted.
+ * @param {number} [lastIndex=packedArray.length] The index of the last element to be converted.
* @param {number[]} [result] The object into which to store the result.
*/
Quaternion.convertPackedArrayForInterpolation = function (
@@ -331,10 +341,11 @@ Quaternion.convertPackedArrayForInterpolation = function (
/**
* Retrieves an instance from a packed array converted with {@link convertPackedArrayForInterpolation}.
+ *
* @param {number[]} array The array previously packed for interpolation.
* @param {number[]} sourceArray The original packed array.
- * @param {number} [firstIndex] The firstIndex used to convert the array.
- * @param {number} [lastIndex] The lastIndex used to convert the array.
+ * @param {number} [firstIndex=0] The firstIndex used to convert the array.
+ * @param {number} [lastIndex=packedArray.length] The lastIndex used to convert the array.
* @param {Quaternion} [result] The object into which to store the result.
* @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.
*/
@@ -372,6 +383,7 @@ Quaternion.unpackInterpolationResult = function (
/**
* Duplicates a Quaternion instance.
+ *
* @param {Quaternion} quaternion The quaternion to duplicate.
* @param {Quaternion} [result] The object onto which to store the result.
* @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided. (Returns undefined if quaternion is undefined)
@@ -399,6 +411,7 @@ Quaternion.clone = function (quaternion, result) {
/**
* Computes the conjugate of the provided quaternion.
+ *
* @param {Quaternion} quaternion The quaternion to conjugate.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
@@ -418,6 +431,7 @@ Quaternion.conjugate = function (quaternion, result) {
/**
* Computes magnitude squared for the provided quaternion.
+ *
* @param {Quaternion} quaternion The quaternion to conjugate.
* @returns {number} The magnitude squared.
*/
@@ -436,6 +450,7 @@ Quaternion.magnitudeSquared = function (quaternion) {
/**
* Computes magnitude for the provided quaternion.
+ *
* @param {Quaternion} quaternion The quaternion to conjugate.
* @returns {number} The magnitude.
*/
@@ -445,6 +460,7 @@ Quaternion.magnitude = function (quaternion) {
/**
* Computes the normalized form of the provided quaternion.
+ *
* @param {Quaternion} quaternion The quaternion to normalize.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
@@ -469,6 +485,7 @@ Quaternion.normalize = function (quaternion, result) {
/**
* Computes the inverse of the provided quaternion.
+ *
* @param {Quaternion} quaternion The quaternion to normalize.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
@@ -485,6 +502,7 @@ Quaternion.inverse = function (quaternion, result) {
/**
* Computes the componentwise sum of two quaternions.
+ *
* @param {Quaternion} left The first quaternion.
* @param {Quaternion} right The second quaternion.
* @param {Quaternion} result The object onto which to store the result.
@@ -506,6 +524,7 @@ Quaternion.add = function (left, right, result) {
/**
* Computes the componentwise difference of two quaternions.
+ *
* @param {Quaternion} left The first quaternion.
* @param {Quaternion} right The second quaternion.
* @param {Quaternion} result The object onto which to store the result.
@@ -527,6 +546,7 @@ Quaternion.subtract = function (left, right, result) {
/**
* Negates the provided quaternion.
+ *
* @param {Quaternion} quaternion The quaternion to be negated.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
@@ -546,6 +566,7 @@ Quaternion.negate = function (quaternion, result) {
/**
* Computes the dot (scalar) product of two quaternions.
+ *
* @param {Quaternion} left The first quaternion.
* @param {Quaternion} right The second quaternion.
* @returns {number} The dot product.
@@ -563,6 +584,7 @@ Quaternion.dot = function (left, right) {
/**
* Computes the product of two quaternions.
+ *
* @param {Quaternion} left The first quaternion.
* @param {Quaternion} right The second quaternion.
* @param {Quaternion} result The object onto which to store the result.
@@ -599,6 +621,7 @@ Quaternion.multiply = function (left, right, result) {
/**
* Multiplies the provided quaternion componentwise by the provided scalar.
+ *
* @param {Quaternion} quaternion The quaternion to be scaled.
* @param {number} scalar The scalar to multiply with.
* @param {Quaternion} result The object onto which to store the result.
@@ -620,6 +643,7 @@ Quaternion.multiplyByScalar = function (quaternion, scalar, result) {
/**
* Divides the provided quaternion componentwise by the provided scalar.
+ *
* @param {Quaternion} quaternion The quaternion to be divided.
* @param {number} scalar The scalar to divide by.
* @param {Quaternion} result The object onto which to store the result.
@@ -641,6 +665,7 @@ Quaternion.divideByScalar = function (quaternion, scalar, result) {
/**
* Computes the axis of rotation of the provided quaternion.
+ *
* @param {Quaternion} quaternion The quaternion to use.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
@@ -671,6 +696,7 @@ Quaternion.computeAxis = function (quaternion, result) {
/**
* Computes the angle of rotation of the provided quaternion.
+ *
* @param {Quaternion} quaternion The quaternion to use.
* @returns {number} The angle of rotation.
*/
@@ -688,6 +714,7 @@ Quaternion.computeAngle = function (quaternion) {
let lerpScratch = new Quaternion();
/**
* Computes the linear interpolation or extrapolation at t using the provided quaternions.
+ *
* @param {Quaternion} start The value corresponding to t at 0.0.
* @param {Quaternion} end The value corresponding to t at 1.0.
* @param {number} t The point along t at which to interpolate.
@@ -712,11 +739,13 @@ let slerpScaledP = new Quaternion();
let slerpScaledR = new Quaternion();
/**
* Computes the spherical linear interpolation or extrapolation at t using the provided quaternions.
+ *
* @param {Quaternion} start The value corresponding to t at 0.0.
* @param {Quaternion} end The value corresponding to t at 1.0.
* @param {number} t The point along t at which to interpolate.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
+ *
* @see Quaternion#fastSlerp
*/
Quaternion.slerp = function (start, end, t, result) {
@@ -760,6 +789,7 @@ Quaternion.slerp = function (start, end, t, result) {
/**
* The logarithmic quaternion function.
+ *
* @param {Quaternion} quaternion The unit quaternion.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
@@ -782,6 +812,7 @@ Quaternion.log = function (quaternion, result) {
/**
* The exponential quaternion function.
+ *
* @param {Cartesian3} cartesian The cartesian.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
@@ -815,11 +846,13 @@ const squadScratchQuaternion1 = new Quaternion();
/**
* Computes an inner quadrangle point.
* This will compute quaternions that ensure a squad curve is C1 .
+ *
* @param {Quaternion} q0 The first quaternion.
* @param {Quaternion} q1 The second quaternion.
* @param {Quaternion} q2 The third quaternion.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
+ *
* @see Quaternion#squad
*/
Quaternion.computeInnerQuadrangle = function (q0, q1, q2, result) {
@@ -847,6 +880,7 @@ Quaternion.computeInnerQuadrangle = function (q0, q1, q2, result) {
/**
* Computes the spherical quadrangle interpolation between quaternions.
+ *
* @param {Quaternion} q0 The first quaternion.
* @param {Quaternion} q1 The second quaternion.
* @param {Quaternion} s0 The first inner quadrangle.
@@ -854,6 +888,8 @@ Quaternion.computeInnerQuadrangle = function (q0, q1, q2, result) {
* @param {number} t The time in [0,1] used to interpolate.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
+ *
+ *
* @example
* // 1. compute the squad interpolation between two quaternions on a curve
* const s0 = Cesium.Quaternion.computeInnerQuadrangle(quaternions[i - 1], quaternions[i], quaternions[i + 1], new Cesium.Quaternion());
@@ -863,6 +899,7 @@ Quaternion.computeInnerQuadrangle = function (q0, q1, q2, result) {
* // 2. compute the squad interpolation as above but where the first quaternion is a end point.
* const s1 = Cesium.Quaternion.computeInnerQuadrangle(quaternions[0], quaternions[1], quaternions[2], new Cesium.Quaternion());
* const q = Cesium.Quaternion.squad(quaternions[0], quaternions[1], quaternions[0], s1, t, new Cesium.Quaternion());
+ *
* @see Quaternion#computeInnerQuadrangle
*/
Quaternion.squad = function (q0, q1, s0, s1, t, result) {
@@ -901,11 +938,13 @@ v[7] = (opmu * 8.0) / 17.0;
/**
* Computes the spherical linear interpolation or extrapolation at t using the provided quaternions.
* This implementation is faster than {@link Quaternion#slerp}, but is only accurate up to 10-6 .
+ *
* @param {Quaternion} start The value corresponding to t at 0.0.
* @param {Quaternion} end The value corresponding to t at 1.0.
* @param {number} t The point along t at which to interpolate.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
+ *
* @see Quaternion#slerp
*/
Quaternion.fastSlerp = function (start, end, t, result) {
@@ -976,6 +1015,7 @@ Quaternion.fastSlerp = function (start, end, t, result) {
/**
* Computes the spherical quadrangle interpolation between quaternions.
* An implementation that is faster than {@link Quaternion#squad}, but less accurate.
+ *
* @param {Quaternion} q0 The first quaternion.
* @param {Quaternion} q1 The second quaternion.
* @param {Quaternion} s0 The first inner quadrangle.
@@ -983,6 +1023,7 @@ Quaternion.fastSlerp = function (start, end, t, result) {
* @param {number} t The time in [0,1] used to interpolate.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter or a new instance if none was provided.
+ *
* @see Quaternion#squad
*/
Quaternion.fastSquad = function (q0, q1, s0, s1, t, result) {
@@ -1003,6 +1044,7 @@ Quaternion.fastSquad = function (q0, q1, s0, s1, t, result) {
/**
* Compares the provided quaternions componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {Quaternion} [left] The first quaternion.
* @param {Quaternion} [right] The second quaternion.
* @returns {boolean} true
if left and right are equal, false
otherwise.
@@ -1023,9 +1065,10 @@ Quaternion.equals = function (left, right) {
* Compares the provided quaternions componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
+ *
* @param {Quaternion} [left] The first quaternion.
* @param {Quaternion} [right] The second quaternion.
- * @param {number} [epsilon] The epsilon to use for equality testing.
+ * @param {number} [epsilon=0] The epsilon to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
*/
Quaternion.equalsEpsilon = function (left, right, epsilon) {
@@ -1044,6 +1087,7 @@ Quaternion.equalsEpsilon = function (left, right, epsilon) {
/**
* An immutable Quaternion instance initialized to (0.0, 0.0, 0.0, 0.0).
+ *
* @type {Quaternion}
* @constant
*/
@@ -1051,6 +1095,7 @@ Quaternion.ZERO = Object.freeze(new Quaternion(0.0, 0.0, 0.0, 0.0));
/**
* An immutable Quaternion instance initialized to (0.0, 0.0, 0.0, 1.0).
+ *
* @type {Quaternion}
* @constant
*/
@@ -1058,6 +1103,7 @@ Quaternion.IDENTITY = Object.freeze(new Quaternion(0.0, 0.0, 0.0, 1.0));
/**
* Duplicates this Quaternion instance.
+ *
* @param {Quaternion} [result] The object onto which to store the result.
* @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.
*/
@@ -1068,6 +1114,7 @@ Quaternion.prototype.clone = function (result) {
/**
* Compares this and the provided quaternion componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {Quaternion} [right] The right hand side quaternion.
* @returns {boolean} true
if left and right are equal, false
otherwise.
*/
@@ -1079,8 +1126,9 @@ Quaternion.prototype.equals = function (right) {
* Compares this and the provided quaternion componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
+ *
* @param {Quaternion} [right] The right hand side quaternion.
- * @param {number} [epsilon] The epsilon to use for equality testing.
+ * @param {number} [epsilon=0] The epsilon to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
*/
Quaternion.prototype.equalsEpsilon = function (right, epsilon) {
@@ -1089,6 +1137,7 @@ Quaternion.prototype.equalsEpsilon = function (right, epsilon) {
/**
* Returns a string representing this quaternion in the format (x, y, z, w).
+ *
* @returns {string} A string representing this Quaternion.
*/
Quaternion.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/QuaternionSpline.js b/packages/engine/Source/Core/QuaternionSpline.js
index 1a236c4845cf..a469c068c92f 100644
--- a/packages/engine/Source/Core/QuaternionSpline.js
+++ b/packages/engine/Source/Core/QuaternionSpline.js
@@ -29,15 +29,19 @@ function createEvaluateFunction(spline) {
/**
* A spline that uses spherical linear (slerp) interpolation to create a quaternion curve.
* The generated curve is in the class C1 .
+ *
* @alias QuaternionSpline
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {number[]} options.times An array of strictly increasing, unit-less, floating-point times at each point.
* The values are in no way connected to the clock time. They are the parameterization for the curve.
* @param {Quaternion[]} options.points The array of {@link Quaternion} control points.
- * @throws {DeveloperError} points and times are required
- * @throws {DeveloperError} points.length must be greater than or equal to 2.
- * @throws {DeveloperError} times.length must be equal to points.length.
+ *
+ * @exception {DeveloperError} points and times are required
+ * @exception {DeveloperError} points.length must be greater than or equal to 2.
+ * @exception {DeveloperError} times.length must be equal to points.length.
+
* @see ConstantSpline
* @see SteppedSpline
* @see HermiteSpline
@@ -75,7 +79,9 @@ function QuaternionSpline(options) {
Object.defineProperties(QuaternionSpline.prototype, {
/**
* An array of times for the control points.
+ *
* @memberof QuaternionSpline.prototype
+ *
* @type {number[]}
* @readonly
*/
@@ -87,7 +93,9 @@ Object.defineProperties(QuaternionSpline.prototype, {
/**
* An array of {@link Quaternion} control points.
+ *
* @memberof QuaternionSpline.prototype
+ *
* @type {Quaternion[]}
* @readonly
*/
@@ -102,9 +110,11 @@ Object.defineProperties(QuaternionSpline.prototype, {
* Finds an index i
in times
such that the parameter
* time
is in the interval [times[i], times[i + 1]]
.
* @function
+ *
* @param {number} time The time.
* @returns {number} The index for the element at the start of the interval.
- * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ *
+ * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
@@ -113,25 +123,29 @@ QuaternionSpline.prototype.findTimeInterval = Spline.prototype.findTimeInterval;
/**
* Wraps the given time to the period covered by the spline.
* @function
+ *
* @param {number} time The time.
- * @returns {number} The time, wrapped around to the updated animation.
+ * @return {number} The time, wrapped around to the updated animation.
*/
QuaternionSpline.prototype.wrapTime = Spline.prototype.wrapTime;
/**
* Clamps the given time to the period covered by the spline.
* @function
+ *
* @param {number} time The time.
- * @returns {number} The time, clamped to the animation period.
+ * @return {number} The time, clamped to the animation period.
*/
QuaternionSpline.prototype.clampTime = Spline.prototype.clampTime;
/**
* Evaluates the curve at a given time.
+ *
* @param {number} time The time at which to evaluate the curve.
* @param {Quaternion} [result] The object onto which to store the result.
* @returns {Quaternion} The modified result parameter or a new instance of the point on the curve at the given time.
- * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ *
+ * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
diff --git a/packages/engine/Source/Core/Queue.js b/packages/engine/Source/Core/Queue.js
index 6d46f8cc14d8..b21cff76d1a4 100644
--- a/packages/engine/Source/Core/Queue.js
+++ b/packages/engine/Source/Core/Queue.js
@@ -1,7 +1,8 @@
/**
* A queue that can enqueue items at the end, and dequeue items from the front.
+ *
* @alias Queue
- * @class
+ * @constructor
*/
function Queue() {
this._array = [];
@@ -12,7 +13,9 @@ function Queue() {
Object.defineProperties(Queue.prototype, {
/**
* The length of the queue.
+ *
* @memberof Queue.prototype
+ *
* @type {number}
* @readonly
*/
@@ -25,6 +28,7 @@ Object.defineProperties(Queue.prototype, {
/**
* Enqueues the specified item.
+ *
* @param {*} item The item to enqueue.
*/
Queue.prototype.enqueue = function (item) {
@@ -34,6 +38,7 @@ Queue.prototype.enqueue = function (item) {
/**
* Dequeues an item. Returns undefined if the queue is empty.
+ *
* @returns {*} The the dequeued item.
*/
Queue.prototype.dequeue = function () {
@@ -61,6 +66,7 @@ Queue.prototype.dequeue = function () {
/**
* Returns the item at the front of the queue. Returns undefined if the queue is empty.
+ *
* @returns {*} The item at the front of the queue.
*/
Queue.prototype.peek = function () {
@@ -73,6 +79,7 @@ Queue.prototype.peek = function () {
/**
* Check whether this queue contains the specified item.
+ *
* @param {*} item The item to search for.
*/
Queue.prototype.contains = function (item) {
@@ -88,6 +95,7 @@ Queue.prototype.clear = function () {
/**
* Sort the items in the queue in-place.
+ *
* @param {Queue.Comparator} compareFunction A function that defines the sort order.
*/
Queue.prototype.sort = function (compareFunction) {
@@ -103,11 +111,13 @@ Queue.prototype.sort = function (compareFunction) {
/**
* A function used to compare two items while sorting a queue.
* @callback Queue.Comparator
+ *
* @param {*} a An item in the array.
* @param {*} b An item in the array.
* @returns {number} Returns a negative value if a
is less than b
,
* a positive value if a
is greater than b
, or
* 0 if a
is equal to b
.
+ *
* @example
* function compareNumbers(a, b) {
* return a - b;
diff --git a/packages/engine/Source/Core/Ray.js b/packages/engine/Source/Core/Ray.js
index fb6440ee718d..6b63229d65b0 100644
--- a/packages/engine/Source/Core/Ray.js
+++ b/packages/engine/Source/Core/Ray.js
@@ -6,9 +6,10 @@ import defined from "./defined.js";
/**
* Represents a ray that extends infinitely from the provided origin in the provided direction.
* @alias Ray
- * @class
- * @param {Cartesian3} [origin] The origin of the ray.
- * @param {Cartesian3} [direction] The direction of the ray.
+ * @constructor
+ *
+ * @param {Cartesian3} [origin=Cartesian3.ZERO] The origin of the ray.
+ * @param {Cartesian3} [direction=Cartesian3.ZERO] The direction of the ray.
*/
function Ray(origin, direction) {
direction = Cartesian3.clone(defaultValue(direction, Cartesian3.ZERO));
@@ -32,6 +33,7 @@ function Ray(origin, direction) {
/**
* Duplicates a Ray instance.
+ *
* @param {Ray} ray The ray to duplicate.
* @param {Ray} [result] The object onto which to store the result.
* @returns {Ray} The modified result parameter or a new Ray instance if one was not provided. (Returns undefined if ray is undefined)
@@ -51,10 +53,12 @@ Ray.clone = function (ray, result) {
/**
* Computes the point along the ray given by r(t) = o + t*d,
* where o is the origin of the ray and d is the direction.
+ *
* @param {Ray} ray The ray.
* @param {number} t A scalar value.
* @param {Cartesian3} [result] The object in which the result will be stored.
* @returns {Cartesian3} The modified result parameter, or a new instance if none was provided.
+ *
* @example
* //Get the first intersection point of a ray and an ellipsoid.
* const intersection = Cesium.IntersectionTests.rayEllipsoid(ray, ellipsoid);
diff --git a/packages/engine/Source/Core/Rectangle.js b/packages/engine/Source/Core/Rectangle.js
index 8ab21c504211..ffbcf09b4684 100644
--- a/packages/engine/Source/Core/Rectangle.js
+++ b/packages/engine/Source/Core/Rectangle.js
@@ -10,17 +10,21 @@ import Matrix4 from "./Matrix4.js";
/**
* A two dimensional region specified as longitude and latitude coordinates.
+ *
* @alias Rectangle
- * @class
- * @param {number} [west] The westernmost longitude, in radians, in the range [-Pi, Pi].
- * @param {number} [south] The southernmost latitude, in radians, in the range [-Pi/2, Pi/2].
- * @param {number} [east] The easternmost longitude, in radians, in the range [-Pi, Pi].
- * @param {number} [north] The northernmost latitude, in radians, in the range [-Pi/2, Pi/2].
+ * @constructor
+ *
+ * @param {number} [west=0.0] The westernmost longitude, in radians, in the range [-Pi, Pi].
+ * @param {number} [south=0.0] The southernmost latitude, in radians, in the range [-Pi/2, Pi/2].
+ * @param {number} [east=0.0] The easternmost longitude, in radians, in the range [-Pi, Pi].
+ * @param {number} [north=0.0] The northernmost latitude, in radians, in the range [-Pi/2, Pi/2].
+ *
* @see Packable
*/
function Rectangle(west, south, east, north) {
/**
* The westernmost longitude in radians in the range [-Pi, Pi].
+ *
* @type {number}
* @default 0.0
*/
@@ -28,6 +32,7 @@ function Rectangle(west, south, east, north) {
/**
* The southernmost latitude in radians in the range [-Pi/2, Pi/2].
+ *
* @type {number}
* @default 0.0
*/
@@ -35,6 +40,7 @@ function Rectangle(west, south, east, north) {
/**
* The easternmost longitude in radians in the range [-Pi, Pi].
+ *
* @type {number}
* @default 0.0
*/
@@ -42,6 +48,7 @@ function Rectangle(west, south, east, north) {
/**
* The northernmost latitude in radians in the range [-Pi/2, Pi/2].
+ *
* @type {number}
* @default 0.0
*/
@@ -82,9 +89,11 @@ Rectangle.packedLength = 4;
/**
* Stores the provided instance into the provided array.
+ *
* @param {Rectangle} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
Rectangle.pack = function (value, array, startingIndex) {
@@ -105,8 +114,9 @@ Rectangle.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Rectangle} [result] The object into which to store the result.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if one was not provided.
*/
@@ -159,12 +169,14 @@ Rectangle.computeHeight = function (rectangle) {
/**
* Creates a rectangle given the boundary longitude and latitude in degrees.
- * @param {number} [west] The westernmost longitude in degrees in the range [-180.0, 180.0].
- * @param {number} [south] The southernmost latitude in degrees in the range [-90.0, 90.0].
- * @param {number} [east] The easternmost longitude in degrees in the range [-180.0, 180.0].
- * @param {number} [north] The northernmost latitude in degrees in the range [-90.0, 90.0].
+ *
+ * @param {number} [west=0.0] The westernmost longitude in degrees in the range [-180.0, 180.0].
+ * @param {number} [south=0.0] The southernmost latitude in degrees in the range [-90.0, 90.0].
+ * @param {number} [east=0.0] The easternmost longitude in degrees in the range [-180.0, 180.0].
+ * @param {number} [north=0.0] The northernmost latitude in degrees in the range [-90.0, 90.0].
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
+ *
* @example
* const rectangle = Cesium.Rectangle.fromDegrees(0.0, 20.0, 10.0, 30.0);
*/
@@ -188,12 +200,14 @@ Rectangle.fromDegrees = function (west, south, east, north, result) {
/**
* Creates a rectangle given the boundary longitude and latitude in radians.
- * @param {number} [west] The westernmost longitude in radians in the range [-Math.PI, Math.PI].
- * @param {number} [south] The southernmost latitude in radians in the range [-Math.PI/2, Math.PI/2].
- * @param {number} [east] The easternmost longitude in radians in the range [-Math.PI, Math.PI].
- * @param {number} [north] The northernmost latitude in radians in the range [-Math.PI/2, Math.PI/2].
+ *
+ * @param {number} [west=0.0] The westernmost longitude in radians in the range [-Math.PI, Math.PI].
+ * @param {number} [south=0.0] The southernmost latitude in radians in the range [-Math.PI/2, Math.PI/2].
+ * @param {number} [east=0.0] The easternmost longitude in radians in the range [-Math.PI, Math.PI].
+ * @param {number} [north=0.0] The northernmost latitude in radians in the range [-Math.PI/2, Math.PI/2].
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
+ *
* @example
* const rectangle = Cesium.Rectangle.fromRadians(0.0, Math.PI/4, Math.PI/8, 3*Math.PI/4);
*/
@@ -212,6 +226,7 @@ Rectangle.fromRadians = function (west, south, east, north, result) {
/**
* Creates the smallest possible Rectangle that encloses all positions in the provided array.
+ *
* @param {Cartographic[]} cartographics The list of Cartographic instances.
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
@@ -268,8 +283,9 @@ Rectangle.fromCartographicArray = function (cartographics, result) {
/**
* Creates the smallest possible Rectangle that encloses all positions in the provided array.
+ *
* @param {Cartesian3[]} cartesians The list of Cartesian instances.
- * @param {Ellipsoid} [ellipsoid] The ellipsoid the cartesians are on.
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid the cartesians are on.
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
*/
@@ -335,8 +351,10 @@ for (let n = 0; n < fromBoundingSpherePositionsScratch.length; ++n) {
}
/**
* Create a rectangle from a bounding sphere, ignoring height.
+ *
+ *
* @param {BoundingSphere} boundingSphere The bounding sphere.
- * @param {Ellipsoid} [ellipsoid] The ellipsoid.
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid.
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
*/
@@ -410,6 +428,7 @@ Rectangle.fromBoundingSphere = function (boundingSphere, ellipsoid, result) {
/**
* Duplicates a Rectangle.
+ *
* @param {Rectangle} rectangle The rectangle to clone.
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided. (Returns undefined if rectangle is undefined)
@@ -439,9 +458,10 @@ Rectangle.clone = function (rectangle, result) {
* Compares the provided Rectangles componentwise and returns
* true
if they pass an absolute or relative tolerance test,
* false
otherwise.
+ *
* @param {Rectangle} [left] The first Rectangle.
* @param {Rectangle} [right] The second Rectangle.
- * @param {number} [absoluteEpsilon] The absolute epsilon tolerance to use for equality testing.
+ * @param {number} [absoluteEpsilon=0] The absolute epsilon tolerance to use for equality testing.
* @returns {boolean} true
if left and right are within the provided epsilon, false
otherwise.
*/
Rectangle.equalsEpsilon = function (left, right, absoluteEpsilon) {
@@ -460,6 +480,7 @@ Rectangle.equalsEpsilon = function (left, right, absoluteEpsilon) {
/**
* Duplicates this Rectangle.
+ *
* @param {Rectangle} [result] The object onto which to store the result.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
*/
@@ -470,6 +491,7 @@ Rectangle.prototype.clone = function (result) {
/**
* Compares the provided Rectangle with this Rectangle componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {Rectangle} [other] The Rectangle to compare.
* @returns {boolean} true
if the Rectangles are equal, false
otherwise.
*/
@@ -480,6 +502,7 @@ Rectangle.prototype.equals = function (other) {
/**
* Compares the provided rectangles and returns true
if they are equal,
* false
otherwise.
+ *
* @param {Rectangle} [left] The first Rectangle.
* @param {Rectangle} [right] The second Rectangle.
* @returns {boolean} true
if left and right are equal; otherwise false
.
@@ -500,8 +523,9 @@ Rectangle.equals = function (left, right) {
* Compares the provided Rectangle with this Rectangle componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
+ *
* @param {Rectangle} [other] The Rectangle to compare.
- * @param {number} [epsilon] The epsilon to use for equality testing.
+ * @param {number} [epsilon=0] The epsilon to use for equality testing.
* @returns {boolean} true
if the Rectangles are within the provided epsilon, false
otherwise.
*/
Rectangle.prototype.equalsEpsilon = function (other, epsilon) {
@@ -510,11 +534,13 @@ Rectangle.prototype.equalsEpsilon = function (other, epsilon) {
/**
* Checks a Rectangle's properties and throws if they are not in valid ranges.
+ *
* @param {Rectangle} rectangle The rectangle to validate
- * @throws {DeveloperError} north
must be in the interval [-Pi/2
, Pi/2
].
- * @throws {DeveloperError} south
must be in the interval [-Pi/2
, Pi/2
].
- * @throws {DeveloperError} east
must be in the interval [-Pi
, Pi
].
- * @throws {DeveloperError} west
must be in the interval [-Pi
, Pi
].
+ *
+ * @exception {DeveloperError} north
must be in the interval [-Pi/2
, Pi/2
].
+ * @exception {DeveloperError} south
must be in the interval [-Pi/2
, Pi/2
].
+ * @exception {DeveloperError} east
must be in the interval [-Pi
, Pi
].
+ * @exception {DeveloperError} west
must be in the interval [-Pi
, Pi
].
*/
Rectangle.validate = function (rectangle) {
//>>includeStart('debug', pragmas.debug);
@@ -548,6 +574,7 @@ Rectangle.validate = function (rectangle) {
/**
* Computes the southwest corner of a rectangle.
+ *
* @param {Rectangle} rectangle The rectangle for which to find the corner
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if none was provided.
@@ -568,6 +595,7 @@ Rectangle.southwest = function (rectangle, result) {
/**
* Computes the northwest corner of a rectangle.
+ *
* @param {Rectangle} rectangle The rectangle for which to find the corner
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if none was provided.
@@ -588,6 +616,7 @@ Rectangle.northwest = function (rectangle, result) {
/**
* Computes the northeast corner of a rectangle.
+ *
* @param {Rectangle} rectangle The rectangle for which to find the corner
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if none was provided.
@@ -608,6 +637,7 @@ Rectangle.northeast = function (rectangle, result) {
/**
* Computes the southeast corner of a rectangle.
+ *
* @param {Rectangle} rectangle The rectangle for which to find the corner
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if none was provided.
@@ -628,6 +658,7 @@ Rectangle.southeast = function (rectangle, result) {
/**
* Computes the center of a rectangle.
+ *
* @param {Rectangle} rectangle The rectangle for which to find the center
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if none was provided.
@@ -663,6 +694,7 @@ Rectangle.center = function (rectangle, result) {
* the same angle can be represented with multiple values as well as the wrapping of longitude at the
* anti-meridian. For a simple intersection that ignores these factors and can be used with projected
* coordinates, see {@link Rectangle.simpleIntersection}.
+ *
* @param {Rectangle} rectangle On rectangle to find an intersection
* @param {Rectangle} otherRectangle Another rectangle to find an intersection
* @param {Rectangle} [result] The object onto which to store the result.
@@ -729,6 +761,7 @@ Rectangle.intersection = function (rectangle, otherRectangle, result) {
* does not attempt to put the angular coordinates into a consistent range or to account for crossing the
* anti-meridian. As such, it can be used for rectangles where the coordinates are not simply latitude
* and longitude (i.e. projected coordinates).
+ *
* @param {Rectangle} rectangle On rectangle to find an intersection
* @param {Rectangle} otherRectangle Another rectangle to find an intersection
* @param {Rectangle} [result] The object onto which to store the result.
@@ -762,6 +795,7 @@ Rectangle.simpleIntersection = function (rectangle, otherRectangle, result) {
/**
* Computes a rectangle that is the union of two rectangles.
+ *
* @param {Rectangle} rectangle A rectangle to enclose in rectangle.
* @param {Rectangle} otherRectangle A rectangle to enclose in a rectangle.
* @param {Rectangle} [result] The object onto which to store the result.
@@ -812,6 +846,7 @@ Rectangle.union = function (rectangle, otherRectangle, result) {
/**
* Computes a rectangle by enlarging the provided rectangle until it contains the provided cartographic.
+ *
* @param {Rectangle} rectangle A rectangle to expand.
* @param {Cartographic} cartographic A cartographic to enclose in a rectangle.
* @param {Rectangle} [result] The object onto which to store the result.
@@ -837,6 +872,7 @@ Rectangle.expand = function (rectangle, cartographic, result) {
/**
* Returns true if the cartographic is on or inside the rectangle, false otherwise.
+ *
* @param {Rectangle} rectangle The rectangle
* @param {Cartographic} cartographic The cartographic to test.
* @returns {boolean} true if the provided cartographic is inside the rectangle, false otherwise.
@@ -874,9 +910,10 @@ const subsampleLlaScratch = new Cartographic();
* Samples a rectangle so that it includes a list of Cartesian points suitable for passing to
* {@link BoundingSphere#fromPoints}. Sampling is necessary to account
* for rectangles that cover the poles or cross the equator.
+ *
* @param {Rectangle} rectangle The rectangle to subsample.
- * @param {Ellipsoid} [ellipsoid] The ellipsoid to use.
- * @param {number} [surfaceHeight] The height of the rectangle above the ellipsoid.
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to use.
+ * @param {number} [surfaceHeight=0.0] The height of the rectangle above the ellipsoid.
* @param {Cartesian3[]} [result] The array of Cartesians onto which to store the result.
* @returns {Cartesian3[]} The modified result parameter or a new Array of Cartesians instances if none was provided.
*/
@@ -948,6 +985,7 @@ Rectangle.subsample = function (rectangle, ellipsoid, surfaceHeight, result) {
/**
* Computes a subsection of a rectangle from normalized coordinates in the range [0.0, 1.0].
+ *
* @param {Rectangle} rectangle The rectangle to subsection.
* @param {number} westLerp The west interpolation factor in the range [0.0, 1.0]. Must be less than or equal to eastLerp.
* @param {number} southLerp The south interpolation factor in the range [0.0, 1.0]. Must be less than or equal to northLerp.
@@ -1018,6 +1056,7 @@ Rectangle.subsection = function (
/**
* The largest possible rectangle.
+ *
* @type {Rectangle}
* @constant
*/
diff --git a/packages/engine/Source/Core/RectangleCollisionChecker.js b/packages/engine/Source/Core/RectangleCollisionChecker.js
index 01075d6f2c1e..bb8cdb516840 100644
--- a/packages/engine/Source/Core/RectangleCollisionChecker.js
+++ b/packages/engine/Source/Core/RectangleCollisionChecker.js
@@ -28,6 +28,7 @@ RectangleWithId.fromRectangleAndId = function (id, rectangle, result) {
/**
* Insert a rectangle into the collision checker.
+ *
* @param {string} id Unique string ID for the rectangle being inserted.
* @param {Rectangle} rectangle A Rectangle
* @private
@@ -53,6 +54,7 @@ function idCompare(a, b) {
const removalScratch = new RectangleWithId();
/**
* Remove a rectangle from the collision checker.
+ *
* @param {string} id Unique string ID for the rectangle being removed.
* @param {Rectangle} rectangle A Rectangle
* @private
@@ -74,6 +76,7 @@ RectangleCollisionChecker.prototype.remove = function (id, rectangle) {
const collisionScratch = new RectangleWithId();
/**
* Checks if a given rectangle collides with any of the rectangles in the collection.
+ *
* @param {Rectangle} rectangle A Rectangle that should be checked against the rectangles in the collision checker.
* @returns {boolean} Whether the rectangle collides with any of the rectangles in the collision checker.
*/
diff --git a/packages/engine/Source/Core/RectangleGeometry.js b/packages/engine/Source/Core/RectangleGeometry.js
index a6fd585b3f03..7e0b8d5ae7d7 100644
--- a/packages/engine/Source/Core/RectangleGeometry.js
+++ b/packages/engine/Source/Core/RectangleGeometry.js
@@ -971,24 +971,30 @@ function computeRectangle(rectangle, granularity, rotation, ellipsoid, result) {
/**
* A description of a cartographic rectangle on an ellipsoid centered at the origin. Rectangle geometry can be rendered with both {@link Primitive} and {@link GroundPrimitive}.
+ *
* @alias RectangleGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {Rectangle} options.rectangle A cartographic rectangle with north, south, east and west properties in radians.
- * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid on which the rectangle lies.
- * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {number} [options.height] The distance in meters between the rectangle and the ellipsoid surface.
- * @param {number} [options.rotation] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
- * @param {number} [options.stRotation] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
+ * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rectangle lies.
+ * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {number} [options.height=0.0] The distance in meters between the rectangle and the ellipsoid surface.
+ * @param {number} [options.rotation=0.0] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
+ * @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
* @param {number} [options.extrudedHeight] The distance in meters between the rectangle's extruded face and the ellipsoid surface.
- * @throws {DeveloperError} options.rectangle.north
must be in the interval [-Pi/2
, Pi/2
].
- * @throws {DeveloperError} options.rectangle.south
must be in the interval [-Pi/2
, Pi/2
].
- * @throws {DeveloperError} options.rectangle.east
must be in the interval [-Pi
, Pi
].
- * @throws {DeveloperError} options.rectangle.west
must be in the interval [-Pi
, Pi
].
- * @throws {DeveloperError} options.rectangle.north
must be greater than options.rectangle.south
.
+ *
+ * @exception {DeveloperError} options.rectangle.north
must be in the interval [-Pi/2
, Pi/2
].
+ * @exception {DeveloperError} options.rectangle.south
must be in the interval [-Pi/2
, Pi/2
].
+ * @exception {DeveloperError} options.rectangle.east
must be in the interval [-Pi
, Pi
].
+ * @exception {DeveloperError} options.rectangle.west
must be in the interval [-Pi
, Pi
].
+ * @exception {DeveloperError} options.rectangle.north
must be greater than options.rectangle.south
.
+ *
* @see RectangleGeometry#createGeometry
+ *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Rectangle.html|Cesium Sandcastle Rectangle Demo}
+ *
* @example
* // 1. create a rectangle
* const rectangle = new Cesium.RectangleGeometry({
@@ -1060,9 +1066,11 @@ RectangleGeometry.packedLength =
/**
* Stores the provided instance into the provided array.
+ *
* @param {RectangleGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
RectangleGeometry.pack = function (value, array, startingIndex) {
@@ -1110,8 +1118,9 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {RectangleGeometry} [result] The object into which to store the result.
* @returns {RectangleGeometry} The modified result parameter or a new RectangleGeometry instance if one was not provided.
*/
@@ -1173,12 +1182,14 @@ RectangleGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the bounding rectangle based on the provided options
+ *
* @param {object} options Object with the following properties:
* @param {Rectangle} options.rectangle A cartographic rectangle with north, south, east and west properties in radians.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid on which the rectangle lies.
- * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {number} [options.rotation] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rectangle lies.
+ * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {number} [options.rotation=0.0] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
* @param {Rectangle} [result] An object in which to store the result.
+ *
* @returns {Rectangle} The result rectangle
*/
RectangleGeometry.computeRectangle = function (options, result) {
@@ -1211,9 +1222,11 @@ const quaternionScratch = new Quaternion();
const centerScratch = new Cartographic();
/**
* Computes the geometric representation of a rectangle, including its vertices, indices, and a bounding sphere.
+ *
* @param {RectangleGeometry} rectangleGeometry A description of the rectangle.
* @returns {Geometry|undefined} The computed vertices and indices.
- * @throws {DeveloperError} Rotated rectangle is invalid.
+ *
+ * @exception {DeveloperError} Rotated rectangle is invalid.
*/
RectangleGeometry.createGeometry = function (rectangleGeometry) {
if (
@@ -1332,9 +1345,6 @@ RectangleGeometry.createGeometry = function (rectangleGeometry) {
};
/**
- * @param rectangleGeometry
- * @param minHeightFunc
- * @param maxHeightFunc
* @private
*/
RectangleGeometry.createShadowVolume = function (
diff --git a/packages/engine/Source/Core/RectangleGeometryLibrary.js b/packages/engine/Source/Core/RectangleGeometryLibrary.js
index 6e17ca2546d1..a413d08c82da 100644
--- a/packages/engine/Source/Core/RectangleGeometryLibrary.js
+++ b/packages/engine/Source/Core/RectangleGeometryLibrary.js
@@ -17,13 +17,6 @@ const sqrt = Math.sqrt;
const RectangleGeometryLibrary = {};
/**
- * @param computedOptions
- * @param ellipsoid
- * @param computeST
- * @param row
- * @param col
- * @param position
- * @param st
* @private
*/
RectangleGeometryLibrary.computePosition = function (
@@ -152,13 +145,6 @@ function getRotationOptions(
}
/**
- * @param rectangle
- * @param granularity
- * @param rotation
- * @param stRotation
- * @param boundingRectangleScratch
- * @param nwCornerResult
- * @param stNwCornerResult
* @private
*/
RectangleGeometryLibrary.computeOptions = function (
diff --git a/packages/engine/Source/Core/RectangleOutlineGeometry.js b/packages/engine/Source/Core/RectangleOutlineGeometry.js
index fbdf9ee2cabb..35988cb7daf8 100644
--- a/packages/engine/Source/Core/RectangleOutlineGeometry.js
+++ b/packages/engine/Source/Core/RectangleOutlineGeometry.js
@@ -241,21 +241,26 @@ function constructExtrudedRectangle(rectangleGeometry, computedOptions) {
/**
* A description of the outline of a a cartographic rectangle on an ellipsoid centered at the origin.
+ *
* @alias RectangleOutlineGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {Rectangle} options.rectangle A cartographic rectangle with north, south, east and west properties in radians.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid on which the rectangle lies.
- * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- * @param {number} [options.height] The distance in meters between the rectangle and the ellipsoid surface.
- * @param {number} [options.rotation] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rectangle lies.
+ * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {number} [options.height=0.0] The distance in meters between the rectangle and the ellipsoid surface.
+ * @param {number} [options.rotation=0.0] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
* @param {number} [options.extrudedHeight] The distance in meters between the rectangle's extruded face and the ellipsoid surface.
- * @throws {DeveloperError} options.rectangle.north
must be in the interval [-Pi/2
, Pi/2
].
- * @throws {DeveloperError} options.rectangle.south
must be in the interval [-Pi/2
, Pi/2
].
- * @throws {DeveloperError} options.rectangle.east
must be in the interval [-Pi
, Pi
].
- * @throws {DeveloperError} options.rectangle.west
must be in the interval [-Pi
, Pi
].
- * @throws {DeveloperError} options.rectangle.north
must be greater than rectangle.south
.
+ *
+ * @exception {DeveloperError} options.rectangle.north
must be in the interval [-Pi/2
, Pi/2
].
+ * @exception {DeveloperError} options.rectangle.south
must be in the interval [-Pi/2
, Pi/2
].
+ * @exception {DeveloperError} options.rectangle.east
must be in the interval [-Pi
, Pi
].
+ * @exception {DeveloperError} options.rectangle.west
must be in the interval [-Pi
, Pi
].
+ * @exception {DeveloperError} options.rectangle.north
must be greater than rectangle.south
.
+ *
* @see RectangleOutlineGeometry#createGeometry
+ *
* @example
* const rectangle = new Cesium.RectangleOutlineGeometry({
* ellipsoid : Cesium.Ellipsoid.WGS84,
@@ -309,9 +314,11 @@ RectangleOutlineGeometry.packedLength =
/**
* Stores the provided instance into the provided array.
+ *
* @param {RectangleOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
RectangleOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -356,8 +363,9 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {RectangleOutlineGeometry} [result] The object into which to store the result.
* @returns {RectangleOutlineGeometry} The modified result parameter or a new Quaternion instance if one was not provided.
*/
@@ -407,9 +415,11 @@ RectangleOutlineGeometry.unpack = function (array, startingIndex, result) {
const nwScratch = new Cartographic();
/**
* Computes the geometric representation of an outline of a rectangle, including its vertices, indices, and a bounding sphere.
+ *
* @param {RectangleOutlineGeometry} rectangleGeometry A description of the rectangle outline.
* @returns {Geometry|undefined} The computed vertices and indices.
- * @throws {DeveloperError} Rotated rectangle is invalid.
+ *
+ * @exception {DeveloperError} Rotated rectangle is invalid.
*/
RectangleOutlineGeometry.createGeometry = function (rectangleGeometry) {
const rectangle = rectangleGeometry._rectangle;
diff --git a/packages/engine/Source/Core/ReferenceFrame.js b/packages/engine/Source/Core/ReferenceFrame.js
index 5f84dab72422..fdc899040355 100644
--- a/packages/engine/Source/Core/ReferenceFrame.js
+++ b/packages/engine/Source/Core/ReferenceFrame.js
@@ -1,10 +1,12 @@
/**
* Constants for identifying well-known reference frames.
+ *
* @enum {number}
*/
const ReferenceFrame = {
/**
* The fixed frame.
+ *
* @type {number}
* @constant
*/
@@ -12,6 +14,7 @@ const ReferenceFrame = {
/**
* The inertial frame.
+ *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/Request.js b/packages/engine/Source/Core/Request.js
index 0a5b82030e19..0274ab3e4d55 100644
--- a/packages/engine/Source/Core/Request.js
+++ b/packages/engine/Source/Core/Request.js
@@ -5,17 +5,19 @@ import RequestType from "./RequestType.js";
/**
* Stores information for making a request. In general this does not need to be constructed directly.
+ *
* @alias Request
- * @class
+ * @constructor
+
* @param {object} [options] An object with the following properties:
* @param {string} [options.url] The url to request.
* @param {Request.RequestCallback} [options.requestFunction] The function that makes the actual data request.
* @param {Request.CancelCallback} [options.cancelFunction] The function that is called when the request is cancelled.
* @param {Request.PriorityCallback} [options.priorityFunction] The function that is called to update the request's priority, which occurs once per frame.
- * @param {number} [options.priority] The initial priority of the request.
- * @param {boolean} [options.throttle] Whether to throttle and prioritize the request. If false, the request will be sent immediately. If true, the request will be throttled and sent based on priority.
- * @param {boolean} [options.throttleByServer] Whether to throttle the request by server.
- * @param {RequestType} [options.type] The type of request.
+ * @param {number} [options.priority=0.0] The initial priority of the request.
+ * @param {boolean} [options.throttle=false] Whether to throttle and prioritize the request. If false, the request will be sent immediately. If true, the request will be throttled and sent based on priority.
+ * @param {boolean} [options.throttleByServer=false] Whether to throttle the request by server.
+ * @param {RequestType} [options.type=RequestType.OTHER] The type of request.
* @param {string} [options.serverKey] A key used to identify the server that a request is going to.
*/
function Request(options) {
@@ -26,24 +28,28 @@ function Request(options) {
/**
* The URL to request.
+ *
* @type {string}
*/
this.url = options.url;
/**
* The function that makes the actual data request.
+ *
* @type {Request.RequestCallback}
*/
this.requestFunction = options.requestFunction;
/**
* The function that is called when the request is cancelled.
+ *
* @type {Request.CancelCallback}
*/
this.cancelFunction = options.cancelFunction;
/**
* The function that is called to update the request's priority, which occurs once per frame.
+ *
* @type {Request.PriorityCallback}
*/
this.priorityFunction = options.priorityFunction;
@@ -54,6 +60,7 @@ function Request(options) {
* A request that does not have a priority function defaults to a priority of 0.
*
* If priorityFunction is defined, this value is updated every frame with the result of that call.
+ *
* @type {number}
* @default 0.0
*/
@@ -62,8 +69,10 @@ function Request(options) {
/**
* Whether to throttle and prioritize the request. If false, the request will be sent immediately. If true, the
* request will be throttled and sent based on priority.
+ *
* @type {boolean}
* @readonly
+ *
* @default false
*/
this.throttle = throttle;
@@ -72,29 +81,36 @@ function Request(options) {
* Whether to throttle the request by server. Browsers typically support about 6-8 parallel connections
* for HTTP/1 servers, and an unlimited amount of connections for HTTP/2 servers. Setting this value
* to true
is preferable for requests going through HTTP/1 servers.
+ *
* @type {boolean}
* @readonly
+ *
* @default false
*/
this.throttleByServer = throttleByServer;
/**
* Type of request.
+ *
* @type {RequestType}
* @readonly
+ *
* @default RequestType.OTHER
*/
this.type = defaultValue(options.type, RequestType.OTHER);
/**
* A key used to identify the server that a request is going to. It is derived from the url's authority and scheme.
+ *
* @type {string}
+ *
* @private
*/
this.serverKey = options.serverKey;
/**
* The current state of the request.
+ *
* @type {RequestState}
* @readonly
*/
@@ -102,14 +118,18 @@ function Request(options) {
/**
* The requests's deferred promise.
+ *
* @type {object}
+ *
* @private
*/
this.deferred = undefined;
/**
* Whether the request was explicitly cancelled.
+ *
* @type {boolean}
+ *
* @private
*/
this.cancelled = false;
@@ -117,6 +137,7 @@ function Request(options) {
/**
* Mark the request as cancelled.
+ *
* @private
*/
Request.prototype.cancel = function () {
@@ -125,7 +146,9 @@ Request.prototype.cancel = function () {
/**
* Duplicates a Request instance.
+ *
* @param {Request} [result] The object onto which to store the result.
+ *
* @returns {Request} The modified result parameter or a new Resource instance if one was not provided.
*/
Request.prototype.clone = function (result) {
diff --git a/packages/engine/Source/Core/RequestErrorEvent.js b/packages/engine/Source/Core/RequestErrorEvent.js
index a62cc2ffaed4..41f0e685e550 100644
--- a/packages/engine/Source/Core/RequestErrorEvent.js
+++ b/packages/engine/Source/Core/RequestErrorEvent.js
@@ -3,8 +3,10 @@ import parseResponseHeaders from "./parseResponseHeaders.js";
/**
* An event that is raised when a request encounters an error.
- * @class
+ *
+ * @constructor
* @alias RequestErrorEvent
+ *
* @param {number} [statusCode] The HTTP error status code, such as 404.
* @param {object} [response] The response included along with the error.
* @param {string|object} [responseHeaders] The response headers, represented either as an object literal or as a
@@ -14,6 +16,7 @@ function RequestErrorEvent(statusCode, response, responseHeaders) {
/**
* The HTTP error status code, such as 404. If the error does not have a particular
* HTTP code, this property will be undefined.
+ *
* @type {number}
*/
this.statusCode = statusCode;
@@ -21,6 +24,7 @@ function RequestErrorEvent(statusCode, response, responseHeaders) {
/**
* The response included along with the error. If the error does not include a response,
* this property will be undefined.
+ *
* @type {object}
*/
this.response = response;
@@ -28,6 +32,7 @@ function RequestErrorEvent(statusCode, response, responseHeaders) {
/**
* The headers included in the response, represented as an object literal of key/value pairs.
* If the error does not include any headers, this property will be undefined.
+ *
* @type {object}
*/
this.responseHeaders = responseHeaders;
@@ -40,6 +45,7 @@ function RequestErrorEvent(statusCode, response, responseHeaders) {
/**
* Creates a string representing this RequestErrorEvent.
* @memberof RequestErrorEvent
+ *
* @returns {string} A string representing the provided RequestErrorEvent.
*/
RequestErrorEvent.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/RequestScheduler.js b/packages/engine/Source/Core/RequestScheduler.js
index 615fc5dae9a1..2caded8f67b9 100644
--- a/packages/engine/Source/Core/RequestScheduler.js
+++ b/packages/engine/Source/Core/RequestScheduler.js
@@ -43,7 +43,9 @@ const requestCompletedEvent = new Event();
* to retain control over the number of requests in CesiumJS is important because due to events such as changes in the camera position,
* a lot of new requests may be generated and a lot of in-flight requests may become redundant. The request scheduler manually constrains the
* number of requests so that newer requests wait in a shorter queue and don't have to compete for bandwidth with requests that have expired.
+ *
* @namespace RequestScheduler
+ *
*/
function RequestScheduler() {}
@@ -66,8 +68,10 @@ RequestScheduler.maximumRequestsPerServer = 18;
* A per server key list of overrides to use for throttling instead of maximumRequestsPerServer
.
* Useful when streaming data from a known HTTP/2 or HTTP/3 server.
* @type {object}
+ *
* @example
* RequestScheduler.requestsByServer["myserver.com:443"] = 18;
+ *
* @example
* RequestScheduler.requestsByServer = {
* "api.cesium.com:443": 18,
@@ -94,6 +98,7 @@ RequestScheduler.debugShowStatistics = false;
/**
* An event that's raised when a request is completed. Event handlers are passed
* the error object if the request fails.
+ *
* @type {Event}
* @default Event()
* @private
@@ -103,7 +108,9 @@ RequestScheduler.requestCompletedEvent = requestCompletedEvent;
Object.defineProperties(RequestScheduler, {
/**
* Returns the statistics used by the request scheduler.
+ *
* @memberof RequestScheduler
+ *
* @type {object}
* @readonly
* @private
@@ -116,7 +123,9 @@ Object.defineProperties(RequestScheduler, {
/**
* The maximum size of the priority heap. This limits the number of requests that are sorted by priority. Only applies to requests that are not yet active.
+ *
* @memberof RequestScheduler
+ *
* @type {number}
* @default 20
* @private
@@ -150,8 +159,8 @@ function updatePriority(request) {
/**
* Check if there are open slots for a particular server key. If desiredRequests is greater than 1, this checks if the queue has room for scheduling multiple requests.
* @param {string} serverKey The server key returned by {@link RequestScheduler.getServerKey}.
- * @param {number} [desiredRequests] How many requests the caller plans to request
- * @returns {boolean} True if there are enough open slots for desiredRequests
more requests.
+ * @param {number} [desiredRequests=1] How many requests the caller plans to request
+ * @return {boolean} True if there are enough open slots for desiredRequests
more requests.
* @private
*/
RequestScheduler.serverHasOpenSlots = function (serverKey, desiredRequests) {
@@ -172,7 +181,8 @@ RequestScheduler.serverHasOpenSlots = function (serverKey, desiredRequests) {
* are from. This is used in {@link Multiple3DTileContent} for determining when
* all requests can be scheduled
* @param {number} desiredRequests The number of requests the caller intends to make
- * @returns {boolean} true
if the heap has enough available slots to meet the desiredRequests. false
otherwise.
+ * @return {boolean} true
if the heap has enough available slots to meet the desiredRequests. false
otherwise.
+ *
* @private
*/
RequestScheduler.heapHasOpenSlots = function (desiredRequests) {
@@ -331,6 +341,7 @@ RequestScheduler.update = function () {
/**
* Get the server key from a given url.
+ *
* @param {string} url The url.
* @returns {string} The server key.
* @private
@@ -363,8 +374,11 @@ RequestScheduler.getServerKey = function (url) {
/**
* Issue a request. If request.throttle is false, the request is sent immediately. Otherwise the request will be
* queued and sorted by priority before being sent.
+ *
* @param {Request} request The request object.
+ *
* @returns {Promise|undefined} A Promise for the requested data, or undefined if this request does not have high enough priority to be issued.
+ *
* @private
*/
RequestScheduler.request = function (request) {
@@ -464,6 +478,7 @@ function updateStatistics() {
/**
* For testing only. Clears any requests that may not have completed from previous tests.
+ *
* @private
*/
RequestScheduler.clearForSpecs = function () {
@@ -490,7 +505,7 @@ RequestScheduler.clearForSpecs = function () {
/**
* For testing only.
- * @param serverKey
+ *
* @private
*/
RequestScheduler.numberOfActiveRequestsByServer = function (serverKey) {
@@ -499,6 +514,7 @@ RequestScheduler.numberOfActiveRequestsByServer = function (serverKey) {
/**
* For testing only.
+ *
* @private
*/
RequestScheduler.requestHeap = requestHeap;
diff --git a/packages/engine/Source/Core/RequestState.js b/packages/engine/Source/Core/RequestState.js
index 1f33e7dc7516..fe83c4ffb640 100644
--- a/packages/engine/Source/Core/RequestState.js
+++ b/packages/engine/Source/Core/RequestState.js
@@ -1,10 +1,12 @@
/**
* State of the request.
+ *
* @enum {number}
*/
const RequestState = {
/**
* Initial unissued state.
+ *
* @type {number}
* @constant
*/
@@ -12,6 +14,7 @@ const RequestState = {
/**
* Issued but not yet active. Will become active when open slots are available.
+ *
* @type {number}
* @constant
*/
@@ -19,6 +22,7 @@ const RequestState = {
/**
* Actual http request has been sent.
+ *
* @type {number}
* @constant
*/
@@ -26,6 +30,7 @@ const RequestState = {
/**
* Request completed successfully.
+ *
* @type {number}
* @constant
*/
@@ -33,6 +38,7 @@ const RequestState = {
/**
* Request was cancelled, either explicitly or automatically because of low priority.
+ *
* @type {number}
* @constant
*/
@@ -40,6 +46,7 @@ const RequestState = {
/**
* Request failed.
+ *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/RequestType.js b/packages/engine/Source/Core/RequestType.js
index 6b8da515c836..e8cda3d64974 100644
--- a/packages/engine/Source/Core/RequestType.js
+++ b/packages/engine/Source/Core/RequestType.js
@@ -1,10 +1,12 @@
/**
* An enum identifying the type of request. Used for finer grained logging and priority sorting.
+ *
* @enum {number}
*/
const RequestType = {
/**
* Terrain request.
+ *
* @type {number}
* @constant
*/
@@ -12,6 +14,7 @@ const RequestType = {
/**
* Imagery request.
+ *
* @type {number}
* @constant
*/
@@ -19,6 +22,7 @@ const RequestType = {
/**
* 3D Tiles request.
+ *
* @type {number}
* @constant
*/
@@ -26,6 +30,7 @@ const RequestType = {
/**
* Other request.
+ *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/Resource.js b/packages/engine/Source/Core/Resource.js
index ef0613d6d31c..cec46808118d 100644
--- a/packages/engine/Source/Core/Resource.js
+++ b/packages/engine/Source/Core/Resource.js
@@ -40,6 +40,7 @@ const xhrBlobSupported = (function () {
* @typedef {object} Resource.ConstructorOptions
*
* Initialization options for the Resource constructor
+ *
* @property {string} url The url of the resource.
* @property {object} [queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @property {object} [templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
@@ -53,9 +54,12 @@ const xhrBlobSupported = (function () {
/**
* A resource that includes the location and any other parameters we need to retrieve it or create derived resources. It also provides the ability to retry requests.
+ *
* @alias Resource
- * @class
+ * @constructor
+ *
* @param {string|Resource.ConstructorOptions} options A url or an object describing initialization options
+ *
* @example
* function refreshTokenRetryCallback(resource, error) {
* if (error.statusCode === 403) {
@@ -104,30 +108,35 @@ function Resource(options) {
/**
* Additional HTTP headers that will be sent with the request.
+ *
* @type {object}
*/
this.headers = defaultClone(options.headers, {});
/**
* A Request object that will be used. Intended for internal use only.
+ *
* @type {Request}
*/
this.request = defaultValue(options.request, new Request());
/**
* A proxy to be used when loading the resource.
+ *
* @type {Proxy}
*/
this.proxy = options.proxy;
/**
* Function to call when a request for this resource fails. If it returns true or a Promise that resolves to true, the request will be retried.
+ *
* @type {Function}
*/
this.retryCallback = options.retryCallback;
/**
* The number of times the retryCallback should be called before giving up.
+ *
* @type {number}
*/
this.retryAttempts = defaultValue(options.retryAttempts, 0);
@@ -145,9 +154,12 @@ function Resource(options) {
/**
* Clones a value if it is defined, otherwise returns the default value
+ *
* @param {object} [value] The value to clone.
* @param {object} [defaultValue] The default value.
+ *
* @returns {object} A clone of value or the defaultValue.
+ *
* @private
*/
function defaultClone(value, defaultValue) {
@@ -156,8 +168,11 @@ function defaultClone(value, defaultValue) {
/**
* A helper function to create a resource depending on whether we have a String or a Resource
+ *
* @param {Resource|string} resource A Resource or a String to use when creating a new Resource.
+ *
* @returns {Resource} If resource is a String, a Resource constructed with the url and options. Otherwise the resource parameter is returned.
+ *
* @private
*/
Resource.createIfNeeded = function (resource) {
@@ -183,7 +198,9 @@ Resource.createIfNeeded = function (resource) {
let supportsImageBitmapOptionsPromise;
/**
* A helper function to check whether createImageBitmap supports passing ImageBitmapOptions.
+ *
* @returns {Promise} A promise that resolves to true if this browser supports creating an ImageBitmap with options.
+ *
* @private
*/
Resource.supportsImageBitmapOptions = function () {
@@ -239,8 +256,10 @@ Resource.supportsImageBitmapOptions = function () {
Object.defineProperties(Resource, {
/**
* Returns true if blobs are supported.
+ *
* @memberof Resource
* @type {boolean}
+ *
* @readonly
*/
isBlobSupported: {
@@ -253,8 +272,10 @@ Object.defineProperties(Resource, {
Object.defineProperties(Resource.prototype, {
/**
* Query parameters appended to the url.
+ *
* @memberof Resource.prototype
* @type {object}
+ *
* @readonly
*/
queryParameters: {
@@ -265,8 +286,10 @@ Object.defineProperties(Resource.prototype, {
/**
* The key/value pairs used to replace template parameters in the url.
+ *
* @memberof Resource.prototype
* @type {object}
+ *
* @readonly
*/
templateValues: {
@@ -277,6 +300,7 @@ Object.defineProperties(Resource.prototype, {
/**
* The url to the resource with template values replaced, query string appended and encoded by proxy if one was set.
+ *
* @memberof Resource.prototype
* @type {string}
*/
@@ -291,8 +315,10 @@ Object.defineProperties(Resource.prototype, {
/**
* The file extension of the resource.
+ *
* @memberof Resource.prototype
* @type {string}
+ *
* @readonly
*/
extension: {
@@ -303,6 +329,7 @@ Object.defineProperties(Resource.prototype, {
/**
* True if the Resource refers to a data URI.
+ *
* @memberof Resource.prototype
* @type {boolean}
*/
@@ -314,6 +341,7 @@ Object.defineProperties(Resource.prototype, {
/**
* True if the Resource refers to a blob URI.
+ *
* @memberof Resource.prototype
* @type {boolean}
*/
@@ -325,6 +353,7 @@ Object.defineProperties(Resource.prototype, {
/**
* True if the Resource refers to a cross origin URL.
+ *
* @memberof Resource.prototype
* @type {boolean}
*/
@@ -336,6 +365,7 @@ Object.defineProperties(Resource.prototype, {
/**
* True if the Resource has request headers. This is equivalent to checking if the headers property has any keys.
+ *
* @memberof Resource.prototype
* @type {boolean}
*/
@@ -359,6 +389,7 @@ Object.defineProperties(Resource.prototype, {
/**
* Override Object#toString so that implicit string conversion gives the
* complete URL represented by this Resource.
+ *
* @returns {string} The URL represented by this Resource
*/
Resource.prototype.toString = function () {
@@ -367,10 +398,12 @@ Resource.prototype.toString = function () {
/**
* Parse a url string, and store its info
+ *
* @param {string} url The input url string.
* @param {boolean} merge If true, we'll merge with the resource's existing queryParameters. Otherwise they will be replaced.
* @param {boolean} preserveQuery If true duplicate parameters will be concatenated into an array. If false, keys in url will take precedence.
* @param {string} [baseUrl] If supplied, and input url is a relative url, it will be made absolute relative to baseUrl
+ *
* @private
*/
Resource.prototype.parseUrl = function (url, merge, preserveQuery, baseUrl) {
@@ -394,8 +427,10 @@ Resource.prototype.parseUrl = function (url, merge, preserveQuery, baseUrl) {
/**
* Parses a query string and returns the object equivalent.
+ *
* @param {string} queryString The query string
* @returns {object}
+ *
* @private
*/
function parseQueryString(queryString) {
@@ -413,10 +448,13 @@ function parseQueryString(queryString) {
/**
* This combines a map of query parameters.
+ *
* @param {object} q1 The first map of query parameters. Values in this map will take precedence if preserveQueryParameters is false.
* @param {object} q2 The second map of query parameters.
* @param {boolean} preserveQueryParameters If true duplicate parameters will be concatenated into an array. If false, keys in q1 will take precedence.
+ *
* @returns {object} The combined map of query parameters.
+ *
* @example
* const q1 = {
* a: 1,
@@ -462,6 +500,7 @@ function parseQueryString(queryString) {
* // d: 7
* // };
* combineQueryParameters(q1, q3, false);
+ *
* @private
*/
function combineQueryParameters(q1, q2, preserveQueryParameters) {
@@ -491,8 +530,10 @@ function combineQueryParameters(q1, q2, preserveQueryParameters) {
/**
* Returns the url, optional with the query string and processed by a proxy.
- * @param {boolean} [query] If true, the query string is included.
- * @param {boolean} [proxy] If true, the url is processed by the proxy object, if defined.
+ *
+ * @param {boolean} [query=false] If true, the query string is included.
+ * @param {boolean} [proxy=false] If true, the url is processed by the proxy object, if defined.
+ *
* @returns {string} The url with all the requested components.
*/
Resource.prototype.getUrlComponent = function (query, proxy) {
@@ -530,8 +571,10 @@ Resource.prototype.getUrlComponent = function (query, proxy) {
/**
* Converts a query object into a string.
+ *
* @param {object} queryObject The object with query parameters
* @returns {string}
+ *
* @private
*/
function stringifyQuery(queryObject) {
@@ -550,9 +593,10 @@ function stringifyQuery(queryObject) {
/**
* Combines the specified object and the existing query parameters. This allows you to add many parameters at once,
- * as opposed to adding them one at a time to the queryParameters property. If a value is already set, it will be replaced with the new value.
+ * as opposed to adding them one at a time to the queryParameters property. If a value is already set, it will be replaced with the new value.
+ *
* @param {object} params The query parameters
- * @param {boolean} [useAsDefault] If true the params will be used as the default values, so they will only be set if they are undefined.
+ * @param {boolean} [useAsDefault=false] If true the params will be used as the default values, so they will only be set if they are undefined.
*/
Resource.prototype.setQueryParameters = function (params, useAsDefault) {
if (useAsDefault) {
@@ -572,7 +616,8 @@ Resource.prototype.setQueryParameters = function (params, useAsDefault) {
/**
* Combines the specified object and the existing query parameters. This allows you to add many parameters at once,
- * as opposed to adding them one at a time to the queryParameters property.
+ * as opposed to adding them one at a time to the queryParameters property.
+ *
* @param {object} params The query parameters
*/
Resource.prototype.appendQueryParameters = function (params) {
@@ -585,9 +630,10 @@ Resource.prototype.appendQueryParameters = function (params) {
/**
* Combines the specified object and the existing template values. This allows you to add many values at once,
- * as opposed to adding them one at a time to the templateValues property. If a value is already set, it will become an array and the new value will be appended.
+ * as opposed to adding them one at a time to the templateValues property. If a value is already set, it will become an array and the new value will be appended.
+ *
* @param {object} template The template values
- * @param {boolean} [useAsDefault] If true the values will be used as the default values, so they will only be set if they are undefined.
+ * @param {boolean} [useAsDefault=false] If true the values will be used as the default values, so they will only be set if they are undefined.
*/
Resource.prototype.setTemplateValues = function (template, useAsDefault) {
if (useAsDefault) {
@@ -599,16 +645,18 @@ Resource.prototype.setTemplateValues = function (template, useAsDefault) {
/**
* Returns a resource relative to the current instance. All properties remain the same as the current instance unless overridden in options.
+ *
* @param {object} options An object with the following properties
* @param {string} [options.url] The url that will be resolved relative to the url of the current instance.
* @param {object} [options.queryParameters] An object containing query parameters that will be combined with those of the current instance.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}). These will be combined with those of the current instance.
- * @param {object} [options.headers] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The function to call when loading the resource fails.
* @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
- * @param {boolean} [options.preserveQueryParameters] If true, this will keep all query parameters from the current resource and derived resource. If false, derived parameters will replace those of the current resource.
+ * @param {boolean} [options.preserveQueryParameters=false] If true, this will keep all query parameters from the current resource and derived resource. If false, derived parameters will replace those of the current resource.
+ *
* @returns {Resource} The resource derived from the current one.
*/
Resource.prototype.getDerivedResource = function (options) {
@@ -653,8 +701,11 @@ Resource.prototype.getDerivedResource = function (options) {
/**
* Called when a resource fails to load. This will call the retryCallback function if defined until retryAttempts is reached.
+ *
* @param {RequestErrorEvent} [error] The error that was encountered.
+ *
* @returns {Promise} A promise to a boolean, that if true will cause the resource request to be retried.
+ *
* @private
*/
Resource.prototype.retryOnError = function (error) {
@@ -676,7 +727,9 @@ Resource.prototype.retryOnError = function (error) {
/**
* Duplicates a Resource instance.
+ *
* @param {Resource} [result] The object onto which to store the result.
+ *
* @returns {Resource} The modified result parameter or a new Resource instance if one was not provided.
*/
Resource.prototype.clone = function (result) {
@@ -710,7 +763,9 @@ Resource.prototype.clone = function (result) {
/**
* Returns the base path of the Resource.
- * @param {boolean} [includeQuery] Whether or not to include the query string and fragment form the uri
+ *
+ * @param {boolean} [includeQuery = false] Whether or not to include the query string and fragment form the uri
+ *
* @returns {string} The base URI of the resource
*/
Resource.prototype.getBaseUri = function (includeQuery) {
@@ -729,7 +784,9 @@ Resource.prototype.appendForwardSlash = function () {
* an ArrayBuffer once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
+ *
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
+ *
* @example
* // load a single URL asynchronously
* resource.fetchArrayBuffer().then(function(arrayBuffer) {
@@ -737,6 +794,7 @@ Resource.prototype.appendForwardSlash = function () {
* }).catch(function(error) {
* // an error occurred
* });
+ *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -748,14 +806,15 @@ Resource.prototype.fetchArrayBuffer = function () {
/**
* Creates a Resource and calls fetchArrayBuffer() on it.
+ *
* @param {string|object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
*/
@@ -769,7 +828,9 @@ Resource.fetchArrayBuffer = function (options) {
* a Blob once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
+ *
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
+ *
* @example
* // load a single URL asynchronously
* resource.fetchBlob().then(function(blob) {
@@ -777,6 +838,7 @@ Resource.fetchArrayBuffer = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
+ *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -788,14 +850,15 @@ Resource.prototype.fetchBlob = function () {
/**
* Creates a Resource and calls fetchBlob() on it.
+ *
* @param {string|object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
*/
@@ -808,12 +871,15 @@ Resource.fetchBlob = function (options) {
* Asynchronously loads the given image resource. Returns a promise that will resolve to
* an {@link https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap|ImageBitmap} if preferImageBitmap
is true and the browser supports createImageBitmap
or otherwise an
* {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement|Image} once loaded, or reject if the image failed to load.
+ *
* @param {object} [options] An object with the following properties.
- * @param {boolean} [options.preferBlob] If true, we will load the image via a blob.
- * @param {boolean} [options.preferImageBitmap] If true, image will be decoded during fetch and an ImageBitmap
is returned.
- * @param {boolean} [options.flipY] If true, image will be vertically flipped during decode. Only applies if the browser supports createImageBitmap
.
- * @param {boolean} [options.skipColorSpaceConversion] If true, any custom gamma or color profiles in the image will be ignored. Only applies if the browser supports createImageBitmap
.
+ * @param {boolean} [options.preferBlob=false] If true, we will load the image via a blob.
+ * @param {boolean} [options.preferImageBitmap=false] If true, image will be decoded during fetch and an ImageBitmap
is returned.
+ * @param {boolean} [options.flipY=false] If true, image will be vertically flipped during decode. Only applies if the browser supports createImageBitmap
.
+ * @param {boolean} [options.skipColorSpaceConversion=false] If true, any custom gamma or color profiles in the image will be ignored. Only applies if the browser supports createImageBitmap
.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
+ *
+ *
* @example
* // load a single image asynchronously
* resource.fetchImage().then(function(image) {
@@ -826,6 +892,7 @@ Resource.fetchBlob = function (options) {
* Promise.all([resource1.fetchImage(), resource2.fetchImage()]).then(function(images) {
* // images is an array containing all the loaded images
* });
+ *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -931,11 +998,12 @@ Resource.prototype.fetchImage = function (options) {
/**
* Fetches an image and returns a promise to it.
+ *
* @param {object} [options] An object with the following properties.
* @param {Resource} [options.resource] Resource object that points to an image to fetch.
* @param {boolean} [options.preferImageBitmap] If true, image will be decoded during fetch and an ImageBitmap
is returned.
* @param {boolean} [options.flipY] If true, image will be vertically flipped during decode. Only applies if the browser supports createImageBitmap
.
- * @param {boolean} [options.skipColorSpaceConversion] If true, any custom gamma or color profiles in the image will be ignored. Only applies if the browser supports createImageBitmap
.
+ * @param {boolean} [options.skipColorSpaceConversion=false] If true, any custom gamma or color profiles in the image will be ignored. Only applies if the browser supports createImageBitmap
.
* @private
*/
function fetchImage(options) {
@@ -997,19 +1065,20 @@ function fetchImage(options) {
/**
* Creates a Resource and calls fetchImage() on it.
+ *
* @param {string|object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
- * @param {boolean} [options.flipY] Whether to vertically flip the image during fetch and decode. Only applies when requesting an image and the browser supports createImageBitmap
.
+ * @param {boolean} [options.flipY=false] Whether to vertically flip the image during fetch and decode. Only applies when requesting an image and the browser supports createImageBitmap
.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
- * @param {boolean} [options.preferBlob] If true, we will load the image via a blob.
- * @param {boolean} [options.preferImageBitmap] If true, image will be decoded during fetch and an ImageBitmap
is returned.
- * @param {boolean} [options.skipColorSpaceConversion] If true, any custom gamma or color profiles in the image will be ignored. Only applies when requesting an image and the browser supports createImageBitmap
.
+ * @param {boolean} [options.preferBlob=false] If true, we will load the image via a blob.
+ * @param {boolean} [options.preferImageBitmap=false] If true, image will be decoded during fetch and an ImageBitmap
is returned.
+ * @param {boolean} [options.skipColorSpaceConversion=false] If true, any custom gamma or color profiles in the image will be ignored. Only applies when requesting an image and the browser supports createImageBitmap
.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
*/
Resource.fetchImage = function (options) {
@@ -1027,7 +1096,9 @@ Resource.fetchImage = function (options) {
* a String once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
+ *
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
+ *
* @example
* // load text from a URL, setting a custom header
* const resource = new Resource({
@@ -1041,6 +1112,7 @@ Resource.fetchImage = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
+ *
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest|XMLHttpRequest}
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
@@ -1053,14 +1125,15 @@ Resource.prototype.fetchText = function () {
/**
* Creates a Resource and calls fetchText() on it.
+ *
* @param {string|object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
*/
@@ -1077,13 +1150,17 @@ Resource.fetchText = function (options) {
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled. This function
* adds 'Accept: application/json,*/*;q=0.01' to the request headers, if not
* already specified.
+ *
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
+ *
+ *
* @example
* resource.fetchJson().then(function(jsonData) {
* // Do something with the JSON object
* }).catch(function(error) {
* // an error occurred
* });
+ *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1109,14 +1186,15 @@ Resource.prototype.fetchJson = function () {
/**
* Creates a Resource and calls fetchJson() on it.
+ *
* @param {string|object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
*/
@@ -1130,7 +1208,10 @@ Resource.fetchJson = function (options) {
* an XML Document once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
+ *
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
+ *
+ *
* @example
* // load XML from a URL, setting a custom header
* Cesium.loadXML('http://someUrl.com/someXML.xml', {
@@ -1140,6 +1221,7 @@ Resource.fetchJson = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
+ *
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest|XMLHttpRequest}
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
@@ -1153,14 +1235,15 @@ Resource.prototype.fetchXML = function () {
/**
* Creates a Resource and calls fetchXML() on it.
+ *
* @param {string|object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
*/
@@ -1171,8 +1254,11 @@ Resource.fetchXML = function (options) {
/**
* Requests a resource using JSONP.
- * @param {string} [callbackParameterName] The callback parameter name that the server expects.
+ *
+ * @param {string} [callbackParameterName='callback'] The callback parameter name that the server expects.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
+ *
+ *
* @example
* // load a data asynchronously
* resource.fetchJsonp().then(function(data) {
@@ -1180,6 +1266,7 @@ Resource.fetchXML = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
+ *
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
Resource.prototype.fetchJsonp = function (callbackParameterName) {
@@ -1250,16 +1337,17 @@ function fetchJsonp(resource, callbackParameterName, functionName) {
/**
* Creates a Resource from a URL and calls fetchJsonp() on it.
+ *
* @param {string|object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
- * @param {string} [options.callbackParameterName] The callback parameter name that the server expects.
+ * @param {string} [options.callbackParameterName='callback'] The callback parameter name that the server expects.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
*/
Resource.fetchJsonp = function (options) {
@@ -1268,7 +1356,6 @@ Resource.fetchJsonp = function (options) {
};
/**
- * @param options
* @private
*/
Resource.prototype._makeRequest = function (options) {
@@ -1336,7 +1423,9 @@ Resource.prototype._makeRequest = function (options) {
/**
* Checks to make sure the Resource isn't already being requested.
+ *
* @param {Request} request The request to check.
+ *
* @private
*/
function checkAndResetRequest(request) {
@@ -1411,11 +1500,14 @@ function decodeDataUri(dataUriRegexResult, responseType) {
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled. It's recommended that you use
* the more specific functions eg. fetchJson, fetchBlob, etc.
+ *
* @param {object} [options] Object with the following properties:
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {object} [options.headers] Additional HTTP headers to send with the request, if any.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
+ *
+ *
* @example
* resource.fetch()
* .then(function(body) {
@@ -1423,6 +1515,7 @@ function decodeDataUri(dataUriRegexResult, responseType) {
* }).catch(function(error) {
* // an error occurred
* });
+ *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1435,14 +1528,15 @@ Resource.prototype.fetch = function (options) {
/**
* Creates a Resource from a URL and calls fetch() on it.
+ *
* @param {string|object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
@@ -1462,11 +1556,14 @@ Resource.fetch = function (options) {
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
+ *
* @param {object} [options] Object with the following properties:
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {object} [options.headers] Additional HTTP headers to send with the request, if any.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
+ *
+ *
* @example
* resource.delete()
* .then(function(body) {
@@ -1474,6 +1571,7 @@ Resource.fetch = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
+ *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1486,15 +1584,16 @@ Resource.prototype.delete = function (options) {
/**
* Creates a Resource from a URL and calls delete() on it.
+ *
* @param {string|object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} [options.data] Data that is posted with the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
@@ -1515,11 +1614,14 @@ Resource.delete = function (options) {
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
+ *
* @param {object} [options] Object with the following properties:
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {object} [options.headers] Additional HTTP headers to send with the request, if any.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
+ *
+ *
* @example
* resource.head()
* .then(function(headers) {
@@ -1527,6 +1629,7 @@ Resource.delete = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
+ *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1539,14 +1642,15 @@ Resource.prototype.head = function (options) {
/**
* Creates a Resource from a URL and calls head() on it.
+ *
* @param {string|object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
@@ -1566,11 +1670,14 @@ Resource.head = function (options) {
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
+ *
* @param {object} [options] Object with the following properties:
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {object} [options.headers] Additional HTTP headers to send with the request, if any.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
+ *
+ *
* @example
* resource.options()
* .then(function(headers) {
@@ -1578,6 +1685,7 @@ Resource.head = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
+ *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1590,14 +1698,15 @@ Resource.prototype.options = function (options) {
/**
* Creates a Resource from a URL and calls options() on it.
+ *
* @param {string|object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
@@ -1617,6 +1726,7 @@ Resource.options = function (options) {
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
+ *
* @param {object} data Data that is posted with the resource.
* @param {object} [options] Object with the following properties:
* @param {object} [options.data] Data that is posted with the resource.
@@ -1624,6 +1734,8 @@ Resource.options = function (options) {
* @param {object} [options.headers] Additional HTTP headers to send with the request, if any.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
+ *
+ *
* @example
* resource.post(data)
* .then(function(result) {
@@ -1631,6 +1743,7 @@ Resource.options = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
+ *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1646,15 +1759,16 @@ Resource.prototype.post = function (data, options) {
/**
* Creates a Resource from a URL and calls post() on it.
+ *
* @param {object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} options.data Data that is posted with the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
@@ -1674,12 +1788,15 @@ Resource.post = function (options) {
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
+ *
* @param {object} data Data that is posted with the resource.
* @param {object} [options] Object with the following properties:
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {object} [options.headers] Additional HTTP headers to send with the request, if any.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
+ *
+ *
* @example
* resource.put(data)
* .then(function(result) {
@@ -1687,6 +1804,7 @@ Resource.post = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
+ *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1702,15 +1820,16 @@ Resource.prototype.put = function (data, options) {
/**
* Creates a Resource from a URL and calls put() on it.
+ *
* @param {object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} options.data Data that is posted with the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
@@ -1730,12 +1849,15 @@ Resource.put = function (options) {
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
+ *
* @param {object} data Data that is posted with the resource.
* @param {object} [options] Object with the following properties:
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {object} [options.headers] Additional HTTP headers to send with the request, if any.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle
is true and the request does not have high enough priority.
+ *
+ *
* @example
* resource.patch(data)
* .then(function(result) {
@@ -1743,6 +1865,7 @@ Resource.put = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
+ *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1758,15 +1881,16 @@ Resource.prototype.patch = function (data, options) {
/**
* Creates a Resource from a URL and calls patch() on it.
+ *
* @param {object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} options.data Data that is posted with the resource.
* @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
* @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {object} [options.headers] Additional HTTP headers that will be sent.
+ * @param {object} [options.headers={}] Additional HTTP headers that will be sent.
* @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
* @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.
+ * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
* @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
@@ -1783,6 +1907,7 @@ Resource.patch = function (options) {
/**
* Contains implementations of functions that can be replaced for testing
+ *
* @private
*/
Resource._Implementations = {};
@@ -1901,8 +2026,7 @@ Resource._Implementations.createImage = function (
/**
* Wrapper for createImageBitmap
- * @param blob
- * @param options
+ *
* @private
*/
Resource.createImageBitmapFromBlob = function (blob, options) {
@@ -2114,6 +2238,7 @@ Resource._Implementations.loadAndExecuteScript = function (
/**
* The default implementations
+ *
* @private
*/
Resource._DefaultImplementations = {};
@@ -2126,6 +2251,7 @@ Resource._DefaultImplementations.loadAndExecuteScript =
/**
* A resource instance initialized to the current browser location
+ *
* @type {Resource}
* @constant
*/
@@ -2141,6 +2267,7 @@ Resource.DEFAULT = Object.freeze(
/**
* A function that returns the value of the property.
* @callback Resource.RetryCallback
+ *
* @param {Resource} [resource] The resource that failed to load.
* @param {RequestErrorEvent} [error] The error that occurred during the loading of the resource.
* @returns {boolean|Promise} If true or a promise that resolved to true, the resource will be retried. Otherwise the failure will be returned.
diff --git a/packages/engine/Source/Core/RuntimeError.js b/packages/engine/Source/Core/RuntimeError.js
index ccf62acbce0d..8bbd56d74efe 100644
--- a/packages/engine/Source/Core/RuntimeError.js
+++ b/packages/engine/Source/Core/RuntimeError.js
@@ -8,10 +8,13 @@ import defined from "./defined.js";
* On the other hand, a {@link DeveloperError} indicates an exception due
* to a developer error, e.g., invalid argument, that usually indicates a bug in the
* calling code.
+ *
* @alias RuntimeError
- * @class
- * @augments Error
+ * @constructor
+ * @extends Error
+ *
* @param {string} [message] The error message for this exception.
+ *
* @see DeveloperError
*/
function RuntimeError(message) {
diff --git a/packages/engine/Source/Core/S2Cell.js b/packages/engine/Source/Core/S2Cell.js
index ed9da916afa5..67a05266fce4 100644
--- a/packages/engine/Source/Core/S2Cell.js
+++ b/packages/engine/Source/Core/S2Cell.js
@@ -32,13 +32,13 @@ import RuntimeError from "./RuntimeError.js";
* of the cell along the Hilbert curve. After the positions bits is the sentinel bit, which is always set to 1, and it indicates the level of the
* cell. Again, the level can be between 0 and 30 in S2.
*
- * Note: In the illustration below, the face bits are marked with 'f', the position bits are marked with 'p', the zero bits are marked with '-'.
+ * Note: In the illustration below, the face bits are marked with 'f', the position bits are marked with 'p', the zero bits are marked with '-'.
*
- * Cell ID (base 10): 3170534137668829184
- * Cell ID (base 2) : 0010110000000000000000000000000000000000000000000000000000000000
+ * Cell ID (base 10): 3170534137668829184
+ * Cell ID (base 2) : 0010110000000000000000000000000000000000000000000000000000000000
*
- * 001 0110000000000000000000000000000000000000000000000000000000000
- * fff pps----------------------------------------------------------
+ * 001 0110000000000000000000000000000000000000000000000000000000000
+ * fff pps----------------------------------------------------------
*
* For the cell above, we can see that it lies on face 1 (01), with a Hilbert index of 1 (1).
*
@@ -48,43 +48,43 @@ import RuntimeError from "./RuntimeError.js";
* Cells in S2 subdivide recursively using quadtree subdivision. For each cell, you can get a child of index [0-3]. To compute the child at index i,
* insert the base 2 representation of i to the right of the parent's position bits. Ensure that the sentinel bit is also shifted two places to the right.
*
- * Parent Cell ID (base 10) : 3170534137668829184
- * Parent Cell ID (base 2) : 0010110000000000000000000000000000000000000000000000000000000000
+ * Parent Cell ID (base 10) : 3170534137668829184
+ * Parent Cell ID (base 2) : 0010110000000000000000000000000000000000000000000000000000000000
*
- * 001 0110000000000000000000000000000000000000000000000000000000000
- * fff pps----------------------------------------------------------
+ * 001 0110000000000000000000000000000000000000000000000000000000000
+ * fff pps----------------------------------------------------------
*
- * To get the 3rd child of the cell above, we insert the binary representation of 3 to the right of the parent's position bits:
+ * To get the 3rd child of the cell above, we insert the binary representation of 3 to the right of the parent's position bits:
*
- * Note: In the illustration below, the bits to be added are highlighted with '^'.
+ * Note: In the illustration below, the bits to be added are highlighted with '^'.
*
- * 001 0111100000000000000000000000000000000000000000000000000000000
- * fff pppps--------------------------------------------------------
- * ^^
+ * 001 0111100000000000000000000000000000000000000000000000000000000
+ * fff pppps--------------------------------------------------------
+ * ^^
*
- * Child(3) Cell ID (base 10) : 3386706919782612992
- * Child(3) Cell ID (base 2) : 0010111100000000000000000000000000000000000000000000000000000000
+ * Child(3) Cell ID (base 10) : 3386706919782612992
+ * Child(3) Cell ID (base 2) : 0010111100000000000000000000000000000000000000000000000000000000
*
* Cell Token:
* -----------
* To provide a more concise representation of the S2 cell ID, we can use their hexadecimal representation.
*
- * Cell ID (base 10): 3170534137668829184
- * Cell ID (base 2) : 0010110000000000000000000000000000000000000000000000000000000000
+ * Cell ID (base 10): 3170534137668829184
+ * Cell ID (base 2) : 0010110000000000000000000000000000000000000000000000000000000000
*
- * We remove all trailing zero bits, until we reach the nybble (4 bits) that contains the sentinel bit.
+ * We remove all trailing zero bits, until we reach the nybble (4 bits) that contains the sentinel bit.
*
- * Note: In the illustration below, the bits to be removed are highlighted with 'X'.
+ * Note: In the illustration below, the bits to be removed are highlighted with 'X'.
*
- * 0010110000000000000000000000000000000000000000000000000000000000
- * fffpps--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+ * 0010110000000000000000000000000000000000000000000000000000000000
+ * fffpps--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*
- * We convert the remaining bits to their hexadecimal representation.
+ * We convert the remaining bits to their hexadecimal representation.
*
- * Base 2: 0010 1100
- * Base 16: "2" "c"
+ * Base 2: 0010 1100
+ * Base 16: "2" "c"
*
- * Cell Token: "2c"
+ * Cell Token: "2c"
*
* To compute the cell ID from the token, we simply add enough zeros to the right to make the ID span 64 bits.
*
@@ -93,13 +93,14 @@ import RuntimeError from "./RuntimeError.js";
*
* To go from a cell in S2 to a point on the ellipsoid, the following order of transforms is applied:
*
- * 1. (Cell ID): S2 cell ID
- * 2. (Face, I, J): Leaf cell coordinates, where i and j are in range [0, 2^30 - 1]
- * 3. (Face, S, T): Cell space coordinates, where s and t are in range [0, 1].
- * 4. (Face, Si, Ti): Discrete cell space coordinates, where si and ti are in range [0, 2^31]
- * 5. (Face, U, V): Cube space coordinates, where u and v are in range [-1, 1]. We apply the non-linear quadratic transform here.
- * 6. (X, Y, Z): Direction vector, where vector may not be unit length. Can be normalized to obtain point on unit sphere
- * 7. (Latitude, Longitude): Direction vector, where latitude is in range [-90, 90] and longitude is in range [-180, 180]
+ * 1. (Cell ID): S2 cell ID
+ * 2. (Face, I, J): Leaf cell coordinates, where i and j are in range [0, 2^30 - 1]
+ * 3. (Face, S, T): Cell space coordinates, where s and t are in range [0, 1].
+ * 4. (Face, Si, Ti): Discrete cell space coordinates, where si and ti are in range [0, 2^31]
+ * 5. (Face, U, V): Cube space coordinates, where u and v are in range [-1, 1]. We apply the non-linear quadratic transform here.
+ * 6. (X, Y, Z): Direction vector, where vector may not be unit length. Can be normalized to obtain point on unit sphere
+ * 7. (Latitude, Longitude): Direction vector, where latitude is in range [-90, 90] and longitude is in range [-180, 180]
+ *
* @ignore
*/
@@ -149,8 +150,10 @@ const S2_POSITION_TO_ORIENTATION_MASK = [
/**
* Represents a cell in the S2 geometry library.
+ *
* @alias S2Cell
- * @class
+ * @constructor
+ *
* @param {bigint} [cellId] The 64-bit S2CellId.
* @private
*/
@@ -173,6 +176,7 @@ function S2Cell(cellId) {
/**
* Creates a new S2Cell from a token. A token is a hexadecimal representation of the 64-bit S2CellId.
+ *
* @param {string} token The token for the S2 Cell.
* @returns {S2Cell} Returns a new S2Cell.
* @private
@@ -190,6 +194,7 @@ S2Cell.fromToken = function (token) {
/**
* Validates an S2 cell ID.
+ *
* @param {bigint} [cellId] The S2CellId.
* @returns {boolean} Returns true if the cell ID is valid, returns false otherwise.
* @private
@@ -223,6 +228,7 @@ S2Cell.isValidId = function (cellId) {
/**
* Validates an S2 cell token.
+ *
* @param {string} [token] The hexadecimal representation of an S2CellId.
* @returns {boolean} Returns true if the token is valid, returns false otherwise.
* @private
@@ -241,6 +247,7 @@ S2Cell.isValidToken = function (token) {
/**
* Converts an S2 cell token to a 64-bit S2 cell ID.
+ *
* @param {string} [token] The hexadecimal representation of an S2CellId. Expected to be a valid S2 token.
* @returns {bigint} Returns the S2 cell ID.
* @private
@@ -255,6 +262,7 @@ S2Cell.getIdFromToken = function (token) {
/**
* Converts a 64-bit S2 cell ID to an S2 cell token.
+ *
* @param {bigint} [cellId] The S2 cell ID.
* @returns {string} Returns hexadecimal representation of an S2CellId.
* @private
@@ -275,6 +283,7 @@ S2Cell.getTokenFromId = function (cellId) {
/**
* Gets the level of the cell from the cell ID.
+ *
* @param {bigint} [cellId] The S2 cell ID.
* @returns {number} Returns the level of the cell.
* @private
@@ -304,6 +313,7 @@ S2Cell.getLevel = function (cellId) {
/**
* Gets the child cell of the cell at the given index.
+ *
* @param {number} index An integer index of the child.
* @returns {S2Cell} The child of the S2Cell.
* @private
@@ -330,6 +340,7 @@ S2Cell.prototype.getChild = function (index) {
/**
* Gets the parent cell of an S2Cell.
+ *
* @returns {S2Cell} Returns the parent of the S2Cell.
* @private
*/
@@ -349,7 +360,7 @@ S2Cell.prototype.getParent = function () {
/**
* Gets the parent cell at the given level.
- * @param level
+ *
* @returns {S2Cell} Returns the parent of the S2Cell.
* @private
*/
@@ -365,8 +376,8 @@ S2Cell.prototype.getParentAtLevel = function (level) {
/**
* Get center of the S2 cell.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid.
- * @param ellipsoid
+ *
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid.
* @returns {Cartesian3} The position of center of the S2 cell.
* @private
*/
@@ -386,9 +397,9 @@ S2Cell.prototype.getCenter = function (ellipsoid) {
/**
* Get vertex of the S2 cell. Vertices are indexed in CCW order.
+ *
* @param {number} index An integer index of the vertex. Must be in the range [0-3].
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid.
- * @param ellipsoid
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid.
* @returns {Cartesian3} The position of the vertex of the S2 cell.
* @private
*/
@@ -415,6 +426,7 @@ S2Cell.prototype.getVertex = function (index, ellipsoid) {
/**
* Creates an S2Cell from its face, position along the Hilbert curve for a given level.
+ *
* @param {number} face The root face of S2 this cell is on. Must be in the range [0-5].
* @param {bigint} position The position along the Hilbert curve. Must be in the range [0-4**level).
* @param {number} level The level of the S2 curve. Must be in the range [0-30].
@@ -455,8 +467,6 @@ S2Cell.fromFacePositionLevel = function (face, position, level) {
};
/**
- * @param cellId
- * @param level
* @private
*/
function getS2Center(cellId, level) {
@@ -464,9 +474,6 @@ function getS2Center(cellId, level) {
return convertFaceSiTitoXYZ(faceSiTi[0], faceSiTi[1], faceSiTi[2]);
}
/**
- * @param cellId
- * @param level
- * @param index
* @private
*/
function getS2Vertex(cellId, level, index) {
@@ -480,8 +487,6 @@ function getS2Vertex(cellId, level, index) {
// S2 Coordinate Conversions
/**
- * @param cellId
- * @param level
* @private
*/
function convertCellIdToFaceSiTi(cellId, level) {
@@ -504,7 +509,6 @@ function convertCellIdToFaceSiTi(cellId, level) {
}
/**
- * @param cellId
* @private
*/
function convertCellIdToFaceIJ(cellId) {
@@ -542,9 +546,6 @@ function convertCellIdToFaceIJ(cellId) {
}
/**
- * @param face
- * @param si
- * @param ti
* @private
*/
function convertFaceSiTitoXYZ(face, si, ti) {
@@ -557,9 +558,6 @@ function convertFaceSiTitoXYZ(face, si, ti) {
}
/**
- * @param face
- * @param u
- * @param v
* @private
*/
function convertFaceUVtoXYZ(face, u, v) {
@@ -586,7 +584,6 @@ function convertFaceUVtoXYZ(face, u, v) {
*
* For a more detailed comparison of these transform methods, see
* {@link https://github.com/google/s2geometry/blob/0c4c460bdfe696da303641771f9def900b3e440f/src/s2/s2metrics.cc}
- * @param s
* @private
*/
function convertSTtoUV(s) {
@@ -597,7 +594,6 @@ function convertSTtoUV(s) {
}
/**
- * @param si
* @private
*/
function convertSiTitoST(si) {
@@ -605,8 +601,6 @@ function convertSiTitoST(si) {
}
/**
- * @param ij
- * @param level
* @private
*/
function convertIJLeveltoBoundUV(ij, level) {
@@ -622,7 +616,6 @@ function convertIJLeveltoBoundUV(ij, level) {
}
/**
- * @param level
* @private
*/
function getSizeIJ(level) {
@@ -630,7 +623,6 @@ function getSizeIJ(level) {
}
/**
- * @param i
* @private
*/
function convertIJtoSTMinimum(i) {
@@ -645,12 +637,6 @@ function convertIJtoSTMinimum(i) {
* recursively.
*
* See {@link https://github.com/google/s2geometry/blob/c59d0ca01ae3976db7f8abdc83fcc871a3a95186/src/s2/s2cell_id.cc#L75-L109}
- * @param level
- * @param i
- * @param j
- * @param originalOrientation
- * @param position
- * @param orientation
* @private
*/
function generateLookupCell(
@@ -727,7 +713,6 @@ function generateLookupTable() {
/**
* Return the lowest-numbered bit that is on for this cell id
- * @param cellId
* @private
*/
function lsb(cellId) {
@@ -736,7 +721,6 @@ function lsb(cellId) {
/**
* Return the lowest-numbered bit that is on for cells at the given level.
- * @param level
* @private
*/
function lsbForLevel(level) {
@@ -818,7 +802,6 @@ const Mod67BitPosition = [
/**
* Return the number of trailing zeros in number.
- * @param x
* @private
*/
function countTrailingZeroBits(x) {
diff --git a/packages/engine/Source/Core/ScreenSpaceEventHandler.js b/packages/engine/Source/Core/ScreenSpaceEventHandler.js
index bcaf7ff2abcd..0c2fb86c6079 100644
--- a/packages/engine/Source/Core/ScreenSpaceEventHandler.js
+++ b/packages/engine/Source/Core/ScreenSpaceEventHandler.js
@@ -896,6 +896,7 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @typedef {object} ScreenSpaceEventHandler.PositionedEvent
*
* An Event that occurs at a single position on screen.
+ *
* @property {Cartesian2} position
*/
@@ -903,6 +904,7 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @callback ScreenSpaceEventHandler.PositionedEventCallback
*
* The callback invoked when a positioned event triggers an event listener.
+ *
* @param {ScreenSpaceEventHandler.PositionedEvent} event The event which triggered the listener
*/
@@ -910,6 +912,7 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @typedef {object} ScreenSpaceEventHandler.MotionEvent
*
* An Event that starts at one position and ends at another.
+ *
* @property {Cartesian2} startPosition
* @property {Cartesian2} endPosition
*/
@@ -918,6 +921,7 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @callback ScreenSpaceEventHandler.MotionEventCallback
*
* The callback invoked when a motion event triggers an event listener.
+ *
* @param {ScreenSpaceEventHandler.MotionEvent} event The event which triggered the listener
*/
@@ -925,6 +929,7 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @typedef {object} ScreenSpaceEventHandler.TwoPointEvent
*
* An Event that occurs at a two positions on screen.
+ *
* @property {Cartesian2} position1
* @property {Cartesian2} position2
*/
@@ -933,6 +938,7 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @callback ScreenSpaceEventHandler.TwoPointEventCallback
*
* The callback invoked when a two-point event triggers an event listener.
+ *
* @param {ScreenSpaceEventHandler.TwoPointEvent} event The event which triggered the listener
*/
@@ -940,6 +946,7 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @typedef {object} ScreenSpaceEventHandler.TwoPointMotionEvent
*
* An Event that starts at a two positions on screen and moves to two other positions.
+ *
* @property {Cartesian2} position1
* @property {Cartesian2} position2
* @property {Cartesian2} previousPosition1
@@ -950,6 +957,7 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @callback ScreenSpaceEventHandler.TwoPointMotionEventCallback
*
* The callback invoked when a two-point motion event triggers an event listener.
+ *
* @param {ScreenSpaceEventHandler.TwoPointMotionEvent} event The event which triggered the listener
*/
@@ -957,15 +965,19 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @callback ScreenSpaceEventHandler.WheelEventCallback
*
* The callback invoked when a mouse-wheel event triggers an event listener.
+ *
* @param {number} delta The amount that the mouse wheel moved
*/
/**
* Handles user input events. Custom functions can be added to be executed on
* when the user enters input.
+ *
* @alias ScreenSpaceEventHandler
- * @param {HTMLCanvasElement} [element] The element to add events to.
- * @class
+ *
+ * @param {HTMLCanvasElement} [element=document] The element to add events to.
+ *
+ * @constructor
*/
function ScreenSpaceEventHandler(element) {
this._inputEvents = {};
@@ -1001,10 +1013,12 @@ function ScreenSpaceEventHandler(element) {
/**
* Set a function to be executed on an input event.
+ *
* @param {ScreenSpaceEventHandler.PositionedEventCallback|ScreenSpaceEventHandler.MotionEventCallback|ScreenSpaceEventHandler.WheelEventCallback|ScreenSpaceEventHandler.TwoPointEventCallback|ScreenSpaceEventHandler.TwoPointMotionEventCallback} action Function to be executed when the input event occurs.
* @param {ScreenSpaceEventType} type The ScreenSpaceEventType of input event.
* @param {KeyboardEventModifier} [modifier] A KeyboardEventModifier key that is held when a type
* event occurs.
+ *
* @see ScreenSpaceEventHandler#getInputAction
* @see ScreenSpaceEventHandler#removeInputAction
*/
@@ -1028,10 +1042,13 @@ ScreenSpaceEventHandler.prototype.setInputAction = function (
/**
* Returns the function to be executed on an input event.
+ *
* @param {ScreenSpaceEventType} type The ScreenSpaceEventType of input event.
* @param {KeyboardEventModifier} [modifier] A KeyboardEventModifier key that is held when a type
* event occurs.
+ *
* @returns {ScreenSpaceEventHandler.PositionedEventCallback|ScreenSpaceEventHandler.MotionEventCallback|ScreenSpaceEventHandler.WheelEventCallback|ScreenSpaceEventHandler.TwoPointEventCallback|ScreenSpaceEventHandler.TwoPointMotionEventCallback} The function to be executed on an input event.
+ *
* @see ScreenSpaceEventHandler#setInputAction
* @see ScreenSpaceEventHandler#removeInputAction
*/
@@ -1048,9 +1065,11 @@ ScreenSpaceEventHandler.prototype.getInputAction = function (type, modifier) {
/**
* Removes the function to be executed on an input event.
+ *
* @param {ScreenSpaceEventType} type The ScreenSpaceEventType of input event.
* @param {KeyboardEventModifier} [modifier] A KeyboardEventModifier key that is held when a type
* event occurs.
+ *
* @see ScreenSpaceEventHandler#getInputAction
* @see ScreenSpaceEventHandler#setInputAction
*/
@@ -1073,7 +1092,9 @@ ScreenSpaceEventHandler.prototype.removeInputAction = function (
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
+ *
* @returns {boolean} true
if this object was destroyed; otherwise, false
.
+ *
* @see ScreenSpaceEventHandler#destroy
*/
ScreenSpaceEventHandler.prototype.isDestroyed = function () {
@@ -1086,9 +1107,13 @@ ScreenSpaceEventHandler.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined
) to the object as done in the example.
- * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ *
+ * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ *
+ *
* @example
* handler = handler && handler.destroy();
+ *
* @see ScreenSpaceEventHandler#isDestroyed
*/
ScreenSpaceEventHandler.prototype.destroy = function () {
diff --git a/packages/engine/Source/Core/ScreenSpaceEventType.js b/packages/engine/Source/Core/ScreenSpaceEventType.js
index b55f4b7d6648..cb5f633f39b4 100644
--- a/packages/engine/Source/Core/ScreenSpaceEventType.js
+++ b/packages/engine/Source/Core/ScreenSpaceEventType.js
@@ -1,10 +1,12 @@
/**
* This enumerated type is for classifying mouse events: down, up, click, double click, move and move while a button is held down.
+ *
* @enum {number}
*/
const ScreenSpaceEventType = {
/**
* Represents a mouse left button down event.
+ *
* @type {number}
* @constant
*/
@@ -12,6 +14,7 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse left button up event.
+ *
* @type {number}
* @constant
*/
@@ -19,6 +22,7 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse left click event.
+ *
* @type {number}
* @constant
*/
@@ -26,6 +30,7 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse left double click event.
+ *
* @type {number}
* @constant
*/
@@ -33,6 +38,7 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse left button down event.
+ *
* @type {number}
* @constant
*/
@@ -40,6 +46,7 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse right button up event.
+ *
* @type {number}
* @constant
*/
@@ -47,6 +54,7 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse right click event.
+ *
* @type {number}
* @constant
*/
@@ -54,6 +62,7 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse middle button down event.
+ *
* @type {number}
* @constant
*/
@@ -61,6 +70,7 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse middle button up event.
+ *
* @type {number}
* @constant
*/
@@ -68,6 +78,7 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse middle click event.
+ *
* @type {number}
* @constant
*/
@@ -75,6 +86,7 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse move event.
+ *
* @type {number}
* @constant
*/
@@ -82,6 +94,7 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse wheel event.
+ *
* @type {number}
* @constant
*/
@@ -89,6 +102,7 @@ const ScreenSpaceEventType = {
/**
* Represents the start of a two-finger event on a touch surface.
+ *
* @type {number}
* @constant
*/
@@ -96,6 +110,7 @@ const ScreenSpaceEventType = {
/**
* Represents the end of a two-finger event on a touch surface.
+ *
* @type {number}
* @constant
*/
@@ -103,6 +118,7 @@ const ScreenSpaceEventType = {
/**
* Represents a change of a two-finger event on a touch surface.
+ *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/ShowGeometryInstanceAttribute.js b/packages/engine/Source/Core/ShowGeometryInstanceAttribute.js
index 1fc3d308dba8..ddef78ca7af9 100644
--- a/packages/engine/Source/Core/ShowGeometryInstanceAttribute.js
+++ b/packages/engine/Source/Core/ShowGeometryInstanceAttribute.js
@@ -5,9 +5,13 @@ import DeveloperError from "./DeveloperError.js";
/**
* Value and type information for per-instance geometry attribute that determines if the geometry instance will be shown.
+ *
* @alias ShowGeometryInstanceAttribute
- * @class
- * @param {boolean} [show] Determines if the geometry instance will be shown.
+ * @constructor
+ *
+ * @param {boolean} [show=true] Determines if the geometry instance will be shown.
+ *
+ *
* @example
* const instance = new Cesium.GeometryInstance({
* geometry : new Cesium.BoxGeometry({
@@ -22,6 +26,7 @@ import DeveloperError from "./DeveloperError.js";
* show : new Cesium.ShowGeometryInstanceAttribute(false)
* }
* });
+ *
* @see GeometryInstance
* @see GeometryInstanceAttribute
*/
@@ -30,7 +35,9 @@ function ShowGeometryInstanceAttribute(show) {
/**
* The values for the attributes stored in a typed array.
+ *
* @type Uint8Array
+ *
* @default [1.0]
*/
this.value = ShowGeometryInstanceAttribute.toValue(show);
@@ -40,9 +47,12 @@ Object.defineProperties(ShowGeometryInstanceAttribute.prototype, {
/**
* The datatype of each component in the attribute, e.g., individual elements in
* {@link ColorGeometryInstanceAttribute#value}.
+ *
* @memberof ShowGeometryInstanceAttribute.prototype
+ *
* @type {ComponentDatatype}
* @readonly
+ *
* @default {@link ComponentDatatype.UNSIGNED_BYTE}
*/
componentDatatype: {
@@ -53,9 +63,12 @@ Object.defineProperties(ShowGeometryInstanceAttribute.prototype, {
/**
* The number of components in the attributes, i.e., {@link ColorGeometryInstanceAttribute#value}.
+ *
* @memberof ShowGeometryInstanceAttribute.prototype
+ *
* @type {number}
* @readonly
+ *
* @default 1
*/
componentsPerAttribute: {
@@ -68,9 +81,12 @@ Object.defineProperties(ShowGeometryInstanceAttribute.prototype, {
* When true
and componentDatatype
is an integer format,
* indicate that the components should be mapped to the range [0, 1] (unsigned)
* or [-1, 1] (signed) when they are accessed as floating-point for rendering.
+ *
* @memberof ShowGeometryInstanceAttribute.prototype
+ *
* @type {boolean}
* @readonly
+ *
* @default true
*/
normalize: {
@@ -82,9 +98,11 @@ Object.defineProperties(ShowGeometryInstanceAttribute.prototype, {
/**
* Converts a boolean show to a typed array that can be used to assign a show attribute.
+ *
* @param {boolean} show The show value.
* @param {Uint8Array} [result] The array to store the result in, if undefined a new instance will be created.
* @returns {Uint8Array} The modified result parameter or a new instance if result was undefined.
+ *
* @example
* const attributes = primitive.getGeometryInstanceAttributes('an id');
* attributes.show = Cesium.ShowGeometryInstanceAttribute.toValue(true, attributes.show);
diff --git a/packages/engine/Source/Core/Simon1994PlanetaryPositions.js b/packages/engine/Source/Core/Simon1994PlanetaryPositions.js
index cc71bc65191b..9a26ab3eb886 100644
--- a/packages/engine/Source/Core/Simon1994PlanetaryPositions.js
+++ b/packages/engine/Source/Core/Simon1994PlanetaryPositions.js
@@ -10,6 +10,7 @@ import TimeStandard from "./TimeStandard.js";
/**
* Contains functions for finding the Cartesian coordinates of the sun and the moon in the
* Earth-centered inertial frame.
+ *
* @namespace Simon1994PlanetaryPositions
*/
const Simon1994PlanetaryPositions = {};
@@ -628,6 +629,7 @@ const axesTransformation = new Matrix3(
let translation = new Cartesian3();
/**
* Computes the position of the Sun in the Earth-centered inertial frame
+ *
* @param {JulianDate} [julianDate] The time at which to compute the Sun's position, if not provided the current system time is used.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} Calculated sun position
@@ -659,6 +661,7 @@ Simon1994PlanetaryPositions.computeSunPositionInEarthInertialFrame = function (
/**
* Computes the position of the Moon in the Earth-centered inertial frame
+ *
* @param {JulianDate} [julianDate] The time at which to compute the Sun's position, if not provided the current system time is used.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} Calculated moon position
diff --git a/packages/engine/Source/Core/SimplePolylineGeometry.js b/packages/engine/Source/Core/SimplePolylineGeometry.js
index 47779992fd8b..cabcb2312d4b 100644
--- a/packages/engine/Source/Core/SimplePolylineGeometry.js
+++ b/packages/engine/Source/Core/SimplePolylineGeometry.js
@@ -58,18 +58,23 @@ function interpolateColors(p0, p1, color0, color1, minDistance, array, offset) {
/**
* A description of a polyline modeled as a line strip; the first two positions define a line segment,
* and each additional position defines a line segment from the previous position.
+ *
* @alias SimplePolylineGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of {@link Cartesian3} defining the positions in the polyline as a line strip.
* @param {Color[]} [options.colors] An Array of {@link Color} defining the per vertex or per segment colors.
- * @param {boolean} [options.colorsPerVertex] A boolean that determines whether the colors will be flat across each segment of the line or interpolated across the vertices.
- * @param {ArcType} [options.arcType] The type of line the polyline segments must follow.
- * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude if options.arcType is not ArcType.NONE. Determines the number of positions in the buffer.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid to be used as a reference.
- * @throws {DeveloperError} At least two positions are required.
- * @throws {DeveloperError} colors has an invalid length.
+ * @param {boolean} [options.colorsPerVertex=false] A boolean that determines whether the colors will be flat across each segment of the line or interpolated across the vertices.
+ * @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polyline segments must follow.
+ * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude if options.arcType is not ArcType.NONE. Determines the number of positions in the buffer.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
+ *
+ * @exception {DeveloperError} At least two positions are required.
+ * @exception {DeveloperError} colors has an invalid length.
+ *
* @see SimplePolylineGeometry#createGeometry
+ *
* @example
* // A polyline with two connected line segments
* const polyline = new Cesium.SimplePolylineGeometry({
@@ -124,9 +129,11 @@ function SimplePolylineGeometry(options) {
/**
* Stores the provided instance into the provided array.
+ *
* @param {SimplePolylineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
SimplePolylineGeometry.pack = function (value, array, startingIndex) {
@@ -171,8 +178,9 @@ SimplePolylineGeometry.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {SimplePolylineGeometry} [result] The object into which to store the result.
* @returns {SimplePolylineGeometry} The modified result parameter or a new SimplePolylineGeometry instance if one was not provided.
*/
@@ -241,6 +249,7 @@ const generateArcOptionsScratch = {
/**
* Computes the geometric representation of a simple polyline, including its vertices, indices, and a bounding sphere.
+ *
* @param {SimplePolylineGeometry} simplePolylineGeometry A description of the polyline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/SphereGeometry.js b/packages/engine/Source/Core/SphereGeometry.js
index e49576082797..14246063e2f2 100644
--- a/packages/engine/Source/Core/SphereGeometry.js
+++ b/packages/engine/Source/Core/SphereGeometry.js
@@ -7,16 +7,21 @@ import VertexFormat from "./VertexFormat.js";
/**
* A description of a sphere centered at the origin.
+ *
* @alias SphereGeometry
- * @class
+ * @constructor
+ *
* @param {object} [options] Object with the following properties:
- * @param {number} [options.radius] The radius of the sphere.
- * @param {number} [options.stackPartitions] The number of times to partition the ellipsoid into stacks.
- * @param {number} [options.slicePartitions] The number of times to partition the ellipsoid into radial slices.
- * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
- * @throws {DeveloperError} options.slicePartitions cannot be less than three.
- * @throws {DeveloperError} options.stackPartitions cannot be less than three.
+ * @param {number} [options.radius=1.0] The radius of the sphere.
+ * @param {number} [options.stackPartitions=64] The number of times to partition the ellipsoid into stacks.
+ * @param {number} [options.slicePartitions=64] The number of times to partition the ellipsoid into radial slices.
+ * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
+ *
+ * @exception {DeveloperError} options.slicePartitions cannot be less than three.
+ * @exception {DeveloperError} options.stackPartitions cannot be less than three.
+ *
* @see SphereGeometry#createGeometry
+ *
* @example
* const sphere = new Cesium.SphereGeometry({
* radius : 100.0,
@@ -46,9 +51,11 @@ SphereGeometry.packedLength = EllipsoidGeometry.packedLength;
/**
* Stores the provided instance into the provided array.
+ *
* @param {SphereGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
SphereGeometry.pack = function (value, array, startingIndex) {
@@ -70,8 +77,9 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {SphereGeometry} [result] The object into which to store the result.
* @returns {SphereGeometry} The modified result parameter or a new SphereGeometry instance if one was not provided.
*/
@@ -100,6 +108,7 @@ SphereGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of a sphere, including its vertices, indices, and a bounding sphere.
+ *
* @param {SphereGeometry} sphereGeometry A description of the sphere.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/SphereOutlineGeometry.js b/packages/engine/Source/Core/SphereOutlineGeometry.js
index 9641d05d191f..f8a182129a04 100644
--- a/packages/engine/Source/Core/SphereOutlineGeometry.js
+++ b/packages/engine/Source/Core/SphereOutlineGeometry.js
@@ -6,16 +6,20 @@ import EllipsoidOutlineGeometry from "./EllipsoidOutlineGeometry.js";
/**
* A description of the outline of a sphere.
+ *
* @alias SphereOutlineGeometry
- * @class
+ * @constructor
+ *
* @param {object} [options] Object with the following properties:
- * @param {number} [options.radius] The radius of the sphere.
- * @param {number} [options.stackPartitions] The count of stacks for the sphere (1 greater than the number of parallel lines).
- * @param {number} [options.slicePartitions] The count of slices for the sphere (Equal to the number of radial lines).
- * @param {number} [options.subdivisions] The number of points per line, determining the granularity of the curvature .
- * @throws {DeveloperError} options.stackPartitions must be greater than or equal to one.
- * @throws {DeveloperError} options.slicePartitions must be greater than or equal to zero.
- * @throws {DeveloperError} options.subdivisions must be greater than or equal to zero.
+ * @param {number} [options.radius=1.0] The radius of the sphere.
+ * @param {number} [options.stackPartitions=10] The count of stacks for the sphere (1 greater than the number of parallel lines).
+ * @param {number} [options.slicePartitions=8] The count of slices for the sphere (Equal to the number of radial lines).
+ * @param {number} [options.subdivisions=200] The number of points per line, determining the granularity of the curvature .
+ *
+ * @exception {DeveloperError} options.stackPartitions must be greater than or equal to one.
+ * @exception {DeveloperError} options.slicePartitions must be greater than or equal to zero.
+ * @exception {DeveloperError} options.subdivisions must be greater than or equal to zero.
+ *
* @example
* const sphere = new Cesium.SphereOutlineGeometry({
* radius : 100.0,
@@ -46,9 +50,11 @@ SphereOutlineGeometry.packedLength = EllipsoidOutlineGeometry.packedLength;
/**
* Stores the provided instance into the provided array.
+ *
* @param {SphereOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
SphereOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -74,8 +80,9 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {SphereOutlineGeometry} [result] The object into which to store the result.
* @returns {SphereOutlineGeometry} The modified result parameter or a new SphereOutlineGeometry instance if one was not provided.
*/
@@ -101,6 +108,7 @@ SphereOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an outline of a sphere, including its vertices, indices, and a bounding sphere.
+ *
* @param {SphereOutlineGeometry} sphereGeometry A description of the sphere outline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/Spherical.js b/packages/engine/Source/Core/Spherical.js
index 7a96d35c639e..57dca19407fd 100644
--- a/packages/engine/Source/Core/Spherical.js
+++ b/packages/engine/Source/Core/Spherical.js
@@ -4,11 +4,13 @@ import defined from "./defined.js";
/**
* A set of curvilinear 3-dimensional coordinates.
+ *
* @alias Spherical
- * @class
- * @param {number} [clock] The angular coordinate lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
- * @param {number} [cone] The angular coordinate measured from the positive z-axis and toward the negative z-axis.
- * @param {number} [magnitude] The linear coordinate measured from the origin.
+ * @constructor
+ *
+ * @param {number} [clock=0.0] The angular coordinate lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
+ * @param {number} [cone=0.0] The angular coordinate measured from the positive z-axis and toward the negative z-axis.
+ * @param {number} [magnitude=1.0] The linear coordinate measured from the origin.
*/
function Spherical(clock, cone, magnitude) {
/**
@@ -33,6 +35,7 @@ function Spherical(clock, cone, magnitude) {
/**
* Converts the provided Cartesian3 into Spherical coordinates.
+ *
* @param {Cartesian3} cartesian3 The Cartesian3 to be converted to Spherical.
* @param {Spherical} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Spherical} The modified result parameter, or a new instance if one was not provided.
@@ -59,6 +62,7 @@ Spherical.fromCartesian3 = function (cartesian3, result) {
/**
* Creates a duplicate of a Spherical.
+ *
* @param {Spherical} spherical The spherical to clone.
* @param {Spherical} [result] The object to store the result into, if undefined a new instance will be created.
* @returns {Spherical} The modified result parameter or a new instance if result was undefined. (Returns undefined if spherical is undefined)
@@ -80,6 +84,7 @@ Spherical.clone = function (spherical, result) {
/**
* Computes the normalized version of the provided spherical.
+ *
* @param {Spherical} spherical The spherical to be normalized.
* @param {Spherical} [result] The object to store the result into, if undefined a new instance will be created.
* @returns {Spherical} The modified result parameter or a new instance if result was undefined.
@@ -101,6 +106,7 @@ Spherical.normalize = function (spherical, result) {
/**
* Returns true if the first spherical is equal to the second spherical, false otherwise.
+ *
* @param {Spherical} left The first Spherical to be compared.
* @param {Spherical} right The second Spherical to be compared.
* @returns {boolean} true if the first spherical is equal to the second spherical, false otherwise.
@@ -118,9 +124,10 @@ Spherical.equals = function (left, right) {
/**
* Returns true if the first spherical is within the provided epsilon of the second spherical, false otherwise.
+ *
* @param {Spherical} left The first Spherical to be compared.
* @param {Spherical} right The second Spherical to be compared.
- * @param {number} [epsilon] The epsilon to compare against.
+ * @param {number} [epsilon=0.0] The epsilon to compare against.
* @returns {boolean} true if the first spherical is within the provided epsilon of the second spherical, false otherwise.
*/
Spherical.equalsEpsilon = function (left, right, epsilon) {
@@ -137,6 +144,7 @@ Spherical.equalsEpsilon = function (left, right, epsilon) {
/**
* Returns true if this spherical is equal to the provided spherical, false otherwise.
+ *
* @param {Spherical} other The Spherical to be compared.
* @returns {boolean} true if this spherical is equal to the provided spherical, false otherwise.
*/
@@ -146,6 +154,7 @@ Spherical.prototype.equals = function (other) {
/**
* Creates a duplicate of this Spherical.
+ *
* @param {Spherical} [result] The object to store the result into, if undefined a new instance will be created.
* @returns {Spherical} The modified result parameter or a new instance if result was undefined.
*/
@@ -155,6 +164,7 @@ Spherical.prototype.clone = function (result) {
/**
* Returns true if this spherical is within the provided epsilon of the provided spherical, false otherwise.
+ *
* @param {Spherical} other The Spherical to be compared.
* @param {number} epsilon The epsilon to compare against.
* @returns {boolean} true if this spherical is within the provided epsilon of the provided spherical, false otherwise.
@@ -165,6 +175,7 @@ Spherical.prototype.equalsEpsilon = function (other, epsilon) {
/**
* Returns a string representing this instance in the format (clock, cone, magnitude).
+ *
* @returns {string} A string representing this instance.
*/
Spherical.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/Spline.js b/packages/engine/Source/Core/Spline.js
index 5e47d72067e1..5dba9c6d77e6 100644
--- a/packages/engine/Source/Core/Spline.js
+++ b/packages/engine/Source/Core/Spline.js
@@ -8,8 +8,10 @@ import Quaternion from "./Quaternion.js";
/**
* Creates a curve parameterized and evaluated by time. This type describes an interface
* and is not intended to be instantiated directly.
+ *
* @alias Spline
- * @class
+ * @constructor
+ *
* @see CatmullRomSpline
* @see LinearSpline
* @see HermiteSpline
@@ -37,9 +39,12 @@ function Spline() {
/**
* Gets the type of the point. This helps a spline determine how to interpolate
* and return its values.
+ *
* @param {number|Cartesian3|Quaternion} point
* @returns {*} The type of the point.
- * @throws {DeveloperError} value must be a Cartesian3, Quaternion, or number.
+ *
+ * @exception {DeveloperError} value must be a Cartesian3, Quaternion, or number.
+ *
* @private
*/
Spline.getPointType = function (point) {
@@ -63,10 +68,12 @@ Spline.getPointType = function (point) {
/**
* Evaluates the curve at a given time.
* @function
+ *
* @param {number} time The time at which to evaluate the curve.
* @param {Cartesian3|Quaternion|number[]} [result] The object onto which to store the result.
* @returns {Cartesian3|Quaternion|number[]} The modified result parameter or a new instance of the point on the curve at the given time.
- * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ *
+ * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
@@ -75,10 +82,12 @@ Spline.prototype.evaluate = DeveloperError.throwInstantiationError;
/**
* Finds an index i
in times
such that the parameter
* time
is in the interval [times[i], times[i + 1]]
.
+ *
* @param {number} time The time.
* @param {number} startIndex The index from which to start the search.
* @returns {number} The index for the element at the start of the interval.
- * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ *
+ * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
@@ -136,8 +145,9 @@ Spline.prototype.findTimeInterval = function (time, startIndex) {
/**
* Wraps the given time to the period covered by the spline.
* @function
+ *
* @param {number} time The time.
- * @returns {number} The time, wrapped around the animation period.
+ * @return {number} The time, wrapped around the animation period.
*/
Spline.prototype.wrapTime = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -163,8 +173,9 @@ Spline.prototype.wrapTime = function (time) {
/**
* Clamps the given time to the period covered by the spline.
* @function
+ *
* @param {number} time The time.
- * @returns {number} The time, clamped to the animation period.
+ * @return {number} The time, clamped to the animation period.
*/
Spline.prototype.clampTime = function (time) {
//>>includeStart('debug', pragmas.debug);
diff --git a/packages/engine/Source/Core/SteppedSpline.js b/packages/engine/Source/Core/SteppedSpline.js
index f69c6e96f4c8..4f3242a2f0db 100644
--- a/packages/engine/Source/Core/SteppedSpline.js
+++ b/packages/engine/Source/Core/SteppedSpline.js
@@ -5,13 +5,17 @@ import Spline from "./Spline.js";
/**
* A spline that is composed of piecewise constants representing a step function.
+ *
* @alias SteppedSpline
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {number[]} options.times An array of strictly increasing, unit-less, floating-point times at each point. The values are in no way connected to the clock time. They are the parameterization for the curve.
* @param {number[]|Cartesian3[]|Quaternion[]} options.points The array of control points.
- * @throws {DeveloperError} points.length must be greater than or equal to 2.
- * @throws {DeveloperError} times.length must be equal to points.length.
+ *
+ * @exception {DeveloperError} points.length must be greater than or equal to 2.
+ * @exception {DeveloperError} times.length must be equal to points.length.
+ *
* @example
* const times = [ 0.0, 1.5, 3.0, 4.5, 6.0 ];
* const spline = new Cesium.SteppedSpline({
@@ -26,6 +30,7 @@ import Spline from "./Spline.js";
* });
*
* const p0 = spline.evaluate(times[0]);
+ *
* @see ConstantSpline
* @see CatmullRomSpline
* @see HermiteSpline
@@ -63,7 +68,9 @@ function SteppedSpline(options) {
Object.defineProperties(SteppedSpline.prototype, {
/**
* An array of times for the control points.
+ *
* @memberof SteppedSpline.prototype
+ *
* @type {number[]}
* @readonly
*/
@@ -75,7 +82,9 @@ Object.defineProperties(SteppedSpline.prototype, {
/**
* An array of control points.
+ *
* @memberof SteppedSpline.prototype
+ *
* @type {number[]|Cartesian3[]|Quaternion[]}
* @readonly
*/
@@ -90,10 +99,12 @@ Object.defineProperties(SteppedSpline.prototype, {
* Finds an index i
in times
such that the parameter
* time
is in the interval [times[i], times[i + 1]]
.
* @function
+ *
* @param {number} time The time.
* @param {number} startIndex The index from which to start the search.
* @returns {number} The index for the element at the start of the interval.
- * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ *
+ * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
@@ -102,25 +113,29 @@ SteppedSpline.prototype.findTimeInterval = Spline.prototype.findTimeInterval;
/**
* Wraps the given time to the period covered by the spline.
* @function
+ *
* @param {number} time The time.
- * @returns {number} The time, wrapped around to the updated animation.
+ * @return {number} The time, wrapped around to the updated animation.
*/
SteppedSpline.prototype.wrapTime = Spline.prototype.wrapTime;
/**
* Clamps the given time to the period covered by the spline.
* @function
+ *
* @param {number} time The time.
- * @returns {number} The time, clamped to the animation period.
+ * @return {number} The time, clamped to the animation period.
*/
SteppedSpline.prototype.clampTime = Spline.prototype.clampTime;
/**
* Evaluates the curve at a given time.
+ *
* @param {number} time The time at which to evaluate the curve.
* @param {Cartesian3|Quaternion} [result] The object onto which to store the result.
* @returns {number|Cartesian3|Quaternion} The modified result parameter or a new instance of the point on the curve at the given time.
- * @throws {DeveloperError} time must be in the range [t0 , tn ]
, where t0
+ *
+ * @exception {DeveloperError} time must be in the range [t0 , tn ]
, where t0
* is the first element in the array times
and tn
is the last element
* in the array times
.
*/
diff --git a/packages/engine/Source/Core/Stereographic.js b/packages/engine/Source/Core/Stereographic.js
index c679469935f3..d632ab326c44 100644
--- a/packages/engine/Source/Core/Stereographic.js
+++ b/packages/engine/Source/Core/Stereographic.js
@@ -98,7 +98,8 @@ const scratchCartesian = new Cartesian3();
/**
* Computes the latitude based on an ellipsoid.
- * @param {Ellipsoid} [ellipsoid] The ellipsoid on which to compute the longitude.
+ *
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which to compute the longitude.
* @returns {number} The latitude
*/
Stereographic.prototype.getLatitude = function (ellipsoid) {
@@ -123,6 +124,7 @@ const scratchProjectPointOntoPlaneCartesian3 = new Cartesian3();
/**
* Computes the projection of the provided 3D position onto the 2D polar plane, radially outward from the provided origin.
+ *
* @param {Cartesian3} cartesian The point to project.
* @param {Stereographic} [result] The object onto which to store the result.
* @returns {Sterographic} The modified result parameter or a new Sterographic instance if none was provided.
@@ -172,6 +174,7 @@ Stereographic.fromCartesian = function (cartesian, result) {
/**
* Computes the projection of the provided 3D positions onto the 2D polar plane, radially outward from the provided origin.
+ *
* @param {Cartesian3[]} cartesians The points to project.
* @param {Stereographic[]} [result] The object onto which to store the result.
* @returns {Sterographic[]} The modified result parameter or a new Sterographic instance if none was provided.
@@ -195,6 +198,7 @@ Stereographic.fromCartesianArray = function (cartesians, result) {
/**
* Duplicates a Stereographic instance.
+ *
* @param {Stereographic} stereographic The Stereographic to duplicate.
* @param {Stereographic} [result] The object onto which to store the result.
* @returns {Stereographic} The modified result parameter or a new Stereographic instance if one was not provided. (Returns undefined if stereographic is undefined)
@@ -218,6 +222,7 @@ Stereographic.clone = function (stereographic, result) {
/**
* An Ellipsoid instance initialized to radii of (0.5, 0.5, 0.5).
+ *
* @type {Stereographic}
* @constant
*/
diff --git a/packages/engine/Source/Core/TaskProcessor.js b/packages/engine/Source/Core/TaskProcessor.js
index 31e3e32a89f8..9eca8d863e1b 100644
--- a/packages/engine/Source/Core/TaskProcessor.js
+++ b/packages/engine/Source/Core/TaskProcessor.js
@@ -173,10 +173,12 @@ async function getWebAssemblyLoaderConfig(processor, wasmOptions) {
* returning results asynchronously via a promise.
*
* The Worker is not constructed until a task is scheduled.
+ *
* @alias TaskProcessor
- * @class
+ * @constructor
+ *
* @param {string} workerPath The Url to the worker. This can either be an absolute path or relative to the Cesium Workers folder.
- * @param {number} [maximumActiveTasks] The maximum number of active tasks. Once exceeded,
+ * @param {number} [maximumActiveTasks=Number.POSITIVE_INFINITY] The maximum number of active tasks. Once exceeded,
* scheduleTask will not queue any more tasks, allowing
* work to be rescheduled in future frames.
*/
@@ -270,11 +272,13 @@ async function scheduleTask(processor, parameters, transferableObjects) {
* tasks active than the maximum set by the constructor, will immediately return undefined.
* Otherwise, returns a promise that will resolve to the result posted back by the worker when
* finished.
+ *
* @param {object} parameters Any input data that will be posted to the worker.
- * @param {object[]} [transferableObjects] An array of objects contained in parameters that should be
+ * @param {Object[]} [transferableObjects] An array of objects contained in parameters that should be
* transferred to the worker instead of copied.
* @returns {Promise|undefined} Either a promise that will resolve to the result when available, or undefined
* if there are too many active tasks,
+ *
* @example
* const taskProcessor = new Cesium.TaskProcessor('myWorkerPath');
* const promise = taskProcessor.scheduleTask({
@@ -308,12 +312,14 @@ TaskProcessor.prototype.scheduleTask = function (
* Posts a message to a web worker with configuration to initialize loading
* and compiling a web assembly module asynchronously, as well as an optional
* fallback JavaScript module to use if Web Assembly is not supported.
+ *
* @param {object} [webAssemblyOptions] An object with the following properties:
* @param {string} [webAssemblyOptions.modulePath] The path of the web assembly JavaScript wrapper module.
* @param {string} [webAssemblyOptions.wasmBinaryFile] The path of the web assembly binary file.
* @param {string} [webAssemblyOptions.fallbackModulePath] The path of the fallback JavaScript module to use if web assembly is not supported.
* @returns {Promise<*>} A promise that resolves to the result when the web worker has loaded and compiled the web assembly module and is ready to process tasks.
- * @throws {RuntimeError} This browser does not support Web Assembly, and no backup module was provided
+ *
+ * @exception {RuntimeError} This browser does not support Web Assembly, and no backup module was provided
*/
TaskProcessor.prototype.initWebAssemblyModule = async function (
webAssemblyOptions
@@ -365,7 +371,9 @@ TaskProcessor.prototype.initWebAssemblyModule = async function (
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed
will result in a {@link DeveloperError} exception.
+ *
* @returns {boolean} True if this object was destroyed; otherwise, false.
+ *
* @see TaskProcessor#destroy
*/
TaskProcessor.prototype.isDestroyed = function () {
@@ -388,7 +396,9 @@ TaskProcessor.prototype.destroy = function () {
/**
* An event that's raised when a task is completed successfully. Event handlers are passed
* the error object is a task fails.
+ *
* @type {Event}
+ *
* @private
*/
TaskProcessor.taskCompletedEvent = taskCompletedEvent;
diff --git a/packages/engine/Source/Core/TerrainData.js b/packages/engine/Source/Core/TerrainData.js
index 7e632d67e3e3..029c30687e1e 100644
--- a/packages/engine/Source/Core/TerrainData.js
+++ b/packages/engine/Source/Core/TerrainData.js
@@ -3,8 +3,10 @@ import DeveloperError from "./DeveloperError.js";
/**
* Terrain data for a single tile. This type describes an
* interface and is not intended to be instantiated directly.
+ *
* @alias TerrainData
- * @class
+ * @constructor
+ *
* @see HeightmapTerrainData
* @see QuantizedMeshTerrainData
* @see GoogleEarthEnterpriseTerrainData
@@ -37,6 +39,7 @@ Object.defineProperties(TerrainData.prototype, {
/**
* Computes the terrain height at a specified longitude and latitude.
* @function
+ *
* @param {Rectangle} rectangle The rectangle covered by this terrain data.
* @param {number} longitude The longitude in radians.
* @param {number} latitude The latitude in radians.
@@ -53,6 +56,7 @@ TerrainData.prototype.interpolateHeight =
* to be one of the four children of this tile. If non-child tile coordinates are
* given, the availability of the southeast child tile is returned.
* @function
+ *
* @param {number} thisX The tile X coordinate of this (the parent) tile.
* @param {number} thisY The tile Y coordinate of this (the parent) tile.
* @param {number} childX The tile X coordinate of the child tile to check for availability.
@@ -64,7 +68,9 @@ TerrainData.prototype.isChildAvailable = DeveloperError.throwInstantiationError;
/**
* Creates a {@link TerrainMesh} from this terrain data.
* @function
+ *
* @private
+ *
* @param {object} options Object with the following properties:
* @param {TilingScheme} options.tilingScheme The tiling scheme to which this tile belongs.
* @param {number} options.x The X coordinate of the tile for which to create the terrain data.
@@ -82,6 +88,7 @@ TerrainData.prototype.createMesh = DeveloperError.throwInstantiationError;
/**
* Upsamples this terrain data for use by a descendant tile.
* @function
+ *
* @param {TilingScheme} tilingScheme The tiling scheme of this terrain data.
* @param {number} thisX The X coordinate of this tile in the tiling scheme.
* @param {number} thisY The Y coordinate of this tile in the tiling scheme.
@@ -101,6 +108,7 @@ TerrainData.prototype.upsample = DeveloperError.throwInstantiationError;
* as by downloading it from a remote server. This method should return true for instances
* returned from a call to {@link TerrainData#upsample}.
* @function
+ *
* @returns {boolean} True if this instance was created by upsampling; otherwise, false.
*/
TerrainData.prototype.wasCreatedByUpsampling =
@@ -108,6 +116,7 @@ TerrainData.prototype.wasCreatedByUpsampling =
/**
* The maximum number of asynchronous tasks used for terrain processing.
+ *
* @type {number}
* @private
*/
diff --git a/packages/engine/Source/Core/TerrainEncoding.js b/packages/engine/Source/Core/TerrainEncoding.js
index 1aa3dca5bd92..d688341f25b9 100644
--- a/packages/engine/Source/Core/TerrainEncoding.js
+++ b/packages/engine/Source/Core/TerrainEncoding.js
@@ -20,18 +20,21 @@ const SHIFT_LEFT_12 = Math.pow(2.0, 12.0);
/**
* Data used to quantize and pack the terrain mesh. The position can be unpacked for picking and all attributes
* are unpacked in the vertex shader.
+ *
* @alias TerrainEncoding
- * @class
+ * @constructor
+ *
* @param {Cartesian3} center The center point of the vertices.
* @param {AxisAlignedBoundingBox} axisAlignedBoundingBox The bounds of the tile in the east-north-up coordinates at the tiles center.
* @param {number} minimumHeight The minimum height.
* @param {number} maximumHeight The maximum height.
* @param {Matrix4} fromENU The east-north-up to fixed frame matrix at the center of the terrain mesh.
* @param {boolean} hasVertexNormals If the mesh has vertex normals.
- * @param {boolean} [hasWebMercatorT] true if the terrain data includes a Web Mercator texture coordinate; otherwise, false.
- * @param {boolean} [hasGeodeticSurfaceNormals] true if the terrain data includes geodetic surface normals; otherwise, false.
- * @param {number} [exaggeration] A scalar used to exaggerate terrain.
- * @param {number} [exaggerationRelativeHeight] The relative height from which terrain is exaggerated.
+ * @param {boolean} [hasWebMercatorT=false] true if the terrain data includes a Web Mercator texture coordinate; otherwise, false.
+ * @param {boolean} [hasGeodeticSurfaceNormals=false] true if the terrain data includes geodetic surface normals; otherwise, false.
+ * @param {number} [exaggeration=1.0] A scalar used to exaggerate terrain.
+ * @param {number} [exaggerationRelativeHeight=0.0] The relative height from which terrain is exaggerated.
+ *
* @private
*/
function TerrainEncoding(
diff --git a/packages/engine/Source/Core/TerrainMesh.js b/packages/engine/Source/Core/TerrainMesh.js
index 04e1a7e51b47..60a939b5404b 100644
--- a/packages/engine/Source/Core/TerrainMesh.js
+++ b/packages/engine/Source/Core/TerrainMesh.js
@@ -3,8 +3,10 @@ import defaultValue from "./defaultValue.js";
/**
* A mesh plus related metadata for a single tile of terrain. Instances of this type are
* usually created from raw {@link TerrainData}.
+ *
* @alias TerrainMesh
- * @class
+ * @constructor
+ *
* @param {Cartesian3} center The center of the tile. Vertex positions are specified relative to this center.
* @param {Float32Array} vertices The vertex data, including positions, texture coordinates, and heights.
* The vertex data is in the order [X, Y, Z, H, U, V], where X, Y, and Z represent
@@ -19,13 +21,14 @@ import defaultValue from "./defaultValue.js";
* @param {Cartesian3} occludeePointInScaledSpace The occludee point of the tile, represented in ellipsoid-
* scaled space, and used for horizon culling. If this point is below the horizon,
* the tile is considered to be entirely below the horizon.
- * @param {number} [vertexStride] The number of components in each vertex.
+ * @param {number} [vertexStride=6] The number of components in each vertex.
* @param {OrientedBoundingBox} [orientedBoundingBox] A bounding box that completely contains the tile.
* @param {TerrainEncoding} encoding Information used to decode the mesh.
* @param {number[]} westIndicesSouthToNorth The indices of the vertices on the Western edge of the tile, ordered from South to North (clockwise).
* @param {number[]} southIndicesEastToWest The indices of the vertices on the Southern edge of the tile, ordered from East to West (clockwise).
* @param {number[]} eastIndicesNorthToSouth The indices of the vertices on the Eastern edge of the tile, ordered from North to South (clockwise).
* @param {number[]} northIndicesWestToEast The indices of the vertices on the Northern edge of the tile, ordered from West to East (clockwise).
+ *
* @private
*/
function TerrainMesh(
diff --git a/packages/engine/Source/Core/TerrainProvider.js b/packages/engine/Source/Core/TerrainProvider.js
index cc14f89bdb77..6478b2eeb3a4 100644
--- a/packages/engine/Source/Core/TerrainProvider.js
+++ b/packages/engine/Source/Core/TerrainProvider.js
@@ -7,8 +7,10 @@ import CesiumMath from "./Math.js";
* Provides terrain or other geometry for the surface of an ellipsoid. The surface geometry is
* organized into a pyramid of tiles according to a {@link TilingScheme}. This type describes an
* interface and is not intended to be instantiated directly.
+ *
* @alias TerrainProvider
- * @class
+ * @constructor
+ *
* @see EllipsoidTerrainProvider
* @see CesiumTerrainProvider
* @see VRTheWorldTerrainProvider
@@ -94,6 +96,7 @@ const regularGridIndicesCache = [];
* this function multiple times with the same grid width and height returns the
* same list of indices. The total number of vertices must be less than or equal
* to 65536.
+ *
* @param {number} width The number of vertices in the regular grid in the horizontal direction.
* @param {number} height The number of vertices in the regular grid in the vertical direction.
* @returns {Uint16Array|Uint32Array} The list of indices. Uint16Array gets returned for 64KB or less and Uint32Array for 4GB or less.
@@ -132,8 +135,6 @@ TerrainProvider.getRegularGridIndices = function (width, height) {
const regularGridAndEdgeIndicesCache = [];
/**
- * @param width
- * @param height
* @private
*/
TerrainProvider.getRegularGridIndicesAndEdgeIndices = function (width, height) {
@@ -175,8 +176,6 @@ TerrainProvider.getRegularGridIndicesAndEdgeIndices = function (width, height) {
const regularGridAndSkirtAndEdgeIndicesCache = [];
/**
- * @param width
- * @param height
* @private
*/
TerrainProvider.getRegularGridAndSkirtIndicesAndEdgeIndices = function (
@@ -237,13 +236,6 @@ TerrainProvider.getRegularGridAndSkirtIndicesAndEdgeIndices = function (
};
/**
- * @param westIndicesSouthToNorth
- * @param southIndicesEastToWest
- * @param eastIndicesNorthToSouth
- * @param northIndicesWestToEast
- * @param vertexCount
- * @param indices
- * @param offset
* @private
*/
TerrainProvider.addSkirtIndices = function (
@@ -361,6 +353,7 @@ TerrainProvider.heightmapTerrainQuality = 0.25;
/**
* Determines an appropriate geometric error estimate when the geometry comes from a heightmap.
+ *
* @param {Ellipsoid} ellipsoid The ellipsoid to which the terrain is attached.
* @param {number} tileImageWidth The width, in pixels, of the heightmap associated with a single tile.
* @param {number} numberOfTilesAtLevelZero The number of tiles in the horizontal direction at tile level zero.
@@ -384,10 +377,12 @@ TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap = function (
* Requests the geometry for a given tile. The result must include terrain data and
* may optionally include a water mask and an indication of which child tiles are available.
* @function
+ *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
* @param {Request} [request] The request object. Intended for internal use only.
+ *
* @returns {Promise|undefined} A promise for the requested geometry. If this method
* returns undefined instead of a promise, it is an indication that too many requests are already
* pending and the request will be retried later.
@@ -398,6 +393,7 @@ TerrainProvider.prototype.requestTileGeometry =
/**
* Gets the maximum geometric error allowed in a tile at a given level.
* @function
+ *
* @param {number} level The tile level for which to get the maximum geometric error.
* @returns {number} The maximum geometric error.
*/
@@ -407,6 +403,7 @@ TerrainProvider.prototype.getLevelMaximumGeometricError =
/**
* Determines whether data for a tile is available to be loaded.
* @function
+ *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -418,6 +415,7 @@ TerrainProvider.prototype.getTileDataAvailable =
/**
* Makes sure we load availability data for a tile
* @function
+ *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -430,6 +428,7 @@ export default TerrainProvider;
/**
* A function that is called when an error occurs.
* @callback TerrainProvider.ErrorEvent
+ *
* @this TerrainProvider
* @param {TileProviderError} err An object holding details about the error that occurred.
*/
diff --git a/packages/engine/Source/Core/TerrainQuantization.js b/packages/engine/Source/Core/TerrainQuantization.js
index 5c867e4f1aff..8e623e6ca988 100644
--- a/packages/engine/Source/Core/TerrainQuantization.js
+++ b/packages/engine/Source/Core/TerrainQuantization.js
@@ -1,11 +1,14 @@
/**
* This enumerated type is used to determine how the vertices of the terrain mesh are compressed.
+ *
* @enum {number}
+ *
* @private
*/
const TerrainQuantization = {
/**
* The vertices are not compressed.
+ *
* @type {number}
* @constant
*/
@@ -13,6 +16,7 @@ const TerrainQuantization = {
/**
* The vertices are compressed to 12 bits.
+ *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/TileAvailability.js b/packages/engine/Source/Core/TileAvailability.js
index 5d97d4e95352..0a6a74a3eed7 100644
--- a/packages/engine/Source/Core/TileAvailability.js
+++ b/packages/engine/Source/Core/TileAvailability.js
@@ -5,8 +5,10 @@ import Rectangle from "./Rectangle.js";
/**
* Reports the availability of tiles in a {@link TilingScheme}.
+ *
* @alias TileAvailability
- * @class
+ * @constructor
+ *
* @param {TilingScheme} tilingScheme The tiling scheme in which to report availability.
* @param {number} maximumLevel The maximum tile level that is potentially available.
*/
@@ -34,6 +36,7 @@ function findNode(level, x, y, nodes) {
/**
* Marks a rectangular range of tiles in a particular level as being available. For best performance,
* add your ranges in order of increasing level.
+ *
* @param {number} level The level.
* @param {number} startX The X coordinate of the first available tiles at the level.
* @param {number} startY The Y coordinate of the first available tiles at the level.
@@ -88,8 +91,9 @@ TileAvailability.prototype.addAvailableTileRange = function (
* Determines the level of the most detailed tile covering the position. This function
* usually completes in time logarithmic to the number of rectangles added with
* {@link TileAvailability#addAvailableTileRange}.
+ *
* @param {Cartographic} position The position for which to determine the maximum available level. The height component is ignored.
- * @returns {number} The level of the most detailed tile covering the position.
+ * @return {number} The level of the most detailed tile covering the position.
* @throws {DeveloperError} If position is outside any tile according to the tiling scheme.
*/
TileAvailability.prototype.computeMaximumLevelAtPosition = function (position) {
@@ -121,8 +125,9 @@ const eastScratch = new Rectangle();
* function may be safely passed to {@link sampleTerrain} for any position within the rectangle. This function
* usually completes in time logarithmic to the number of rectangles added with
* {@link TileAvailability#addAvailableTileRange}.
+ *
* @param {Rectangle} rectangle The rectangle.
- * @returns {number} The best available level for the entire rectangle.
+ * @return {number} The best available level for the entire rectangle.
*/
TileAvailability.prototype.computeBestAvailableLevelOverRectangle = function (
rectangle
@@ -185,7 +190,7 @@ const cartographicScratch = new Cartographic();
* @param {number} level The tile level to check.
* @param {number} x The X coordinate of the tile to check.
* @param {number} y The Y coordinate of the tile to check.
- * @returns {boolean} True if the tile is available; otherwise, false.
+ * @return {boolean} True if the tile is available; otherwise, false.
*/
TileAvailability.prototype.isTileAvailable = function (level, x, y) {
// Get the center of the tile and find the maximum level at that position.
@@ -208,16 +213,17 @@ TileAvailability.prototype.isTileAvailable = function (level, x, y) {
* If a child's bit is set, a tile is available for that child. If it is cleared,
* the tile is not available. The bit values are as follows:
*
- * Bit Position Bit Value Child Tile
- * 0 1 Southwest
- * 1 2 Southeast
- * 2 4 Northwest
- * 3 8 Northeast
+ * Bit Position Bit Value Child Tile
+ * 0 1 Southwest
+ * 1 2 Southeast
+ * 2 4 Northwest
+ * 3 8 Northeast
*
+ *
* @param {number} level The level of the parent tile.
* @param {number} x The X coordinate of the parent tile.
* @param {number} y The Y coordinate of the parent tile.
- * @returns {number} The bit mask indicating child availability.
+ * @return {number} The bit mask indicating child availability.
*/
TileAvailability.prototype.computeChildMaskForTile = function (level, x, y) {
const childLevel = level + 1;
diff --git a/packages/engine/Source/Core/TileProviderError.js b/packages/engine/Source/Core/TileProviderError.js
index ccba271261be..97fd0320dcb3 100644
--- a/packages/engine/Source/Core/TileProviderError.js
+++ b/packages/engine/Source/Core/TileProviderError.js
@@ -4,8 +4,10 @@ import formatError from "./formatError.js";
/**
* Provides details about an error that occurred in an {@link ImageryProvider} or a {@link TerrainProvider}.
+ *
* @alias TileProviderError
- * @class
+ * @constructor
+ *
* @param {ImageryProvider|TerrainProvider} provider The imagery or terrain provider that experienced the error.
* @param {string} message A message describing the error.
* @param {number} [x] The X coordinate of the tile that experienced the error, or undefined if the error
@@ -14,7 +16,7 @@ import formatError from "./formatError.js";
* is not specific to a particular tile.
* @param {number} [level] The level of the tile that experienced the error, or undefined if the error
* is not specific to a particular tile.
- * @param {number} [timesRetried] The number of times this operation has been retried.
+ * @param {number} [timesRetried=0] The number of times this operation has been retried.
* @param {Error} [error] The error or exception that occurred, if any.
*/
function TileProviderError(
@@ -86,6 +88,7 @@ function TileProviderError(
* Reports an error in an {@link ImageryProvider} or {@link TerrainProvider} by raising an event if it has any listeners, or by
* logging the error to the console if the event has no listeners. This method also tracks the number
* of times the operation has been retried.
+ *
* @param {TileProviderError} previousError The error instance returned by this function the last
* time it was called for this error, or undefined if this is the first time this error has
* occurred.
@@ -151,6 +154,7 @@ TileProviderError.reportError = function (
/**
* Reports success of an operation by resetting the retry count of a previous error, if any. This way,
* if the error occurs again in the future, the listeners will be informed that it has not yet been retried.
+ *
* @param {TileProviderError} previousError The previous error, or undefined if this operation has
* not previously resulted in an error.
*/
diff --git a/packages/engine/Source/Core/TilingScheme.js b/packages/engine/Source/Core/TilingScheme.js
index 014258ee054b..7429de380a95 100644
--- a/packages/engine/Source/Core/TilingScheme.js
+++ b/packages/engine/Source/Core/TilingScheme.js
@@ -6,9 +6,10 @@ import DeveloperError from "./DeveloperError.js";
* At level of detail one, each of the level zero tiles has four children, two in each direction.
* At level of detail two, each of the level one tiles has four children, two in each direction.
* This continues for as many levels as are present in the geometry or imagery source.
- * @param options
+ *
* @alias TilingScheme
- * @class
+ * @constructor
+ *
* @see WebMercatorTilingScheme
* @see GeographicTilingScheme
*/
@@ -52,6 +53,7 @@ Object.defineProperties(TilingScheme.prototype, {
/**
* Gets the total number of tiles in the X direction at a specified level-of-detail.
* @function
+ *
* @param {number} level The level-of-detail.
* @returns {number} The number of tiles in the X direction at the given level.
*/
@@ -61,6 +63,7 @@ TilingScheme.prototype.getNumberOfXTilesAtLevel =
/**
* Gets the total number of tiles in the Y direction at a specified level-of-detail.
* @function
+ *
* @param {number} level The level-of-detail.
* @returns {number} The number of tiles in the Y direction at the given level.
*/
@@ -71,6 +74,7 @@ TilingScheme.prototype.getNumberOfYTilesAtLevel =
* Transforms a rectangle specified in geodetic radians to the native coordinate system
* of this tiling scheme.
* @function
+ *
* @param {Rectangle} rectangle The rectangle to transform.
* @param {Rectangle} [result] The instance to which to copy the result, or undefined if a new instance
* should be created.
@@ -84,6 +88,7 @@ TilingScheme.prototype.rectangleToNativeRectangle =
* Converts tile x, y coordinates and level to a rectangle expressed in the native coordinates
* of the tiling scheme.
* @function
+ *
* @param {number} x The integer x coordinate of the tile.
* @param {number} y The integer y coordinate of the tile.
* @param {number} level The tile level-of-detail. Zero is the least detailed.
@@ -98,6 +103,7 @@ TilingScheme.prototype.tileXYToNativeRectangle =
/**
* Converts tile x, y coordinates and level to a cartographic rectangle in radians.
* @function
+ *
* @param {number} x The integer x coordinate of the tile.
* @param {number} y The integer y coordinate of the tile.
* @param {number} level The tile level-of-detail. Zero is the least detailed.
@@ -113,6 +119,7 @@ TilingScheme.prototype.tileXYToRectangle =
* Calculates the tile x, y coordinates of the tile containing
* a given cartographic position.
* @function
+ *
* @param {Cartographic} position The position.
* @param {number} level The tile level-of-detail. Zero is the least detailed.
* @param {Cartesian2} [result] The instance to which to copy the result, or undefined if a new instance
diff --git a/packages/engine/Source/Core/TimeConstants.js b/packages/engine/Source/Core/TimeConstants.js
index ee0798f86074..72ae3cad38d7 100644
--- a/packages/engine/Source/Core/TimeConstants.js
+++ b/packages/engine/Source/Core/TimeConstants.js
@@ -1,7 +1,10 @@
/**
* Constants for time conversions like those done by {@link JulianDate}.
+ *
* @namespace TimeConstants
+ *
* @see JulianDate
+ *
* @private
*/
const TimeConstants = {
diff --git a/packages/engine/Source/Core/TimeInterval.js b/packages/engine/Source/Core/TimeInterval.js
index 8b474b13bb52..6350ce23ca35 100644
--- a/packages/engine/Source/Core/TimeInterval.js
+++ b/packages/engine/Source/Core/TimeInterval.js
@@ -7,14 +7,17 @@ import JulianDate from "./JulianDate.js";
/**
* An interval defined by a start and a stop time; optionally including those times as part of the interval.
* Arbitrary data can optionally be associated with each instance for used with {@link TimeIntervalCollection}.
+ *
* @alias TimeInterval
- * @class
+ * @constructor
+ *
* @param {object} [options] Object with the following properties:
- * @param {JulianDate} [options.start] The start time of the interval.
- * @param {JulianDate} [options.stop] The stop time of the interval.
- * @param {boolean} [options.isStartIncluded] true
if options.start
is included in the interval, false
otherwise.
- * @param {boolean} [options.isStopIncluded] true
if options.stop
is included in the interval, false
otherwise.
+ * @param {JulianDate} [options.start=new JulianDate()] The start time of the interval.
+ * @param {JulianDate} [options.stop=new JulianDate()] The stop time of the interval.
+ * @param {boolean} [options.isStartIncluded=true] true
if options.start
is included in the interval, false
otherwise.
+ * @param {boolean} [options.isStopIncluded=true] true
if options.stop
is included in the interval, false
otherwise.
* @param {object} [options.data] Arbitrary data associated with this interval.
+ *
* @example
* // Create an instance that spans August 1st, 1980 and is associated
* // with a Cartesian position.
@@ -25,6 +28,7 @@ import JulianDate from "./JulianDate.js";
* isStopIncluded : false,
* data : Cesium.Cartesian3.fromDegrees(39.921037, -75.170082)
* });
+ *
* @example
* // Create two instances from ISO 8601 intervals with associated numeric data
* // then compute their intersection, summing the data they contain.
@@ -47,6 +51,7 @@ import JulianDate from "./JulianDate.js";
* Cesium.TimeInterval.intersect(left, right, intersection, function(leftData, rightData) {
* return leftData + rightData;
* });
+ *
* @example
* // Check if an interval contains a specific time.
* const dateToCheck = Cesium.JulianDate.fromIso8601('1982-09-08T11:30:00Z');
@@ -120,11 +125,13 @@ const scratchInterval = {
/**
* Creates a new instance from a {@link http://en.wikipedia.org/wiki/ISO_8601|ISO 8601} interval.
+ *
* @throws DeveloperError if options.iso8601 does not match proper formatting.
+ *
* @param {object} options Object with the following properties:
* @param {string} options.iso8601 An ISO 8601 interval.
- * @param {boolean} [options.isStartIncluded] true
if options.start
is included in the interval, false
otherwise.
- * @param {boolean} [options.isStopIncluded] true
if options.stop
is included in the interval, false
otherwise.
+ * @param {boolean} [options.isStartIncluded=true] true
if options.start
is included in the interval, false
otherwise.
+ * @param {boolean} [options.isStopIncluded=true] true
if options.stop
is included in the interval, false
otherwise.
* @param {object} [options.data] Arbitrary data associated with this interval.
* @param {TimeInterval} [result] An existing instance to use for the result.
* @returns {TimeInterval} The modified result parameter or a new instance if none was provided.
@@ -166,6 +173,7 @@ TimeInterval.fromIso8601 = function (options, result) {
/**
* Creates an ISO8601 representation of the provided interval.
+ *
* @param {TimeInterval} timeInterval The interval to be converted.
* @param {number} [precision] The number of fractional digits used to represent the seconds component. By default, the most precise representation is used.
* @returns {string} The ISO8601 representation of the provided interval.
@@ -183,6 +191,7 @@ TimeInterval.toIso8601 = function (timeInterval, precision) {
/**
* Duplicates the provided instance.
+ *
* @param {TimeInterval} [timeInterval] The instance to clone.
* @param {TimeInterval} [result] An existing instance to use for the result.
* @returns {TimeInterval} The modified result parameter or a new instance if none was provided.
@@ -204,6 +213,7 @@ TimeInterval.clone = function (timeInterval, result) {
/**
* Compares two instances and returns true
if they are equal, false
otherwise.
+ *
* @param {TimeInterval} [left] The first instance.
* @param {TimeInterval} [right] The second instance.
* @param {TimeInterval.DataComparer} [dataComparer] A function which compares the data of the two intervals. If omitted, reference equality is used.
@@ -229,9 +239,10 @@ TimeInterval.equals = function (left, right, dataComparer) {
* each other. That is, in order for the dates to be considered equal (and for
* this function to return true
), the absolute value of the difference between them, in
* seconds, must be less than epsilon
.
+ *
* @param {TimeInterval} [left] The first instance.
* @param {TimeInterval} [right] The second instance.
- * @param {number} [epsilon] The maximum number of seconds that should separate the two instances.
+ * @param {number} [epsilon=0] The maximum number of seconds that should separate the two instances.
* @param {TimeInterval.DataComparer} [dataComparer] A function which compares the data of the two intervals. If omitted, reference equality is used.
* @returns {boolean} true
if the two dates are within epsilon
seconds of each other; otherwise false
.
*/
@@ -254,6 +265,7 @@ TimeInterval.equalsEpsilon = function (left, right, epsilon, dataComparer) {
/**
* Computes the intersection of two intervals, optionally merging their data.
+ *
* @param {TimeInterval} left The first interval.
* @param {TimeInterval} [right] The second interval.
* @param {TimeInterval} [result] An existing instance to use for the result.
@@ -316,6 +328,7 @@ TimeInterval.intersect = function (left, right, result, mergeCallback) {
/**
* Checks if the specified date is inside the provided interval.
+ *
* @param {TimeInterval} timeInterval The interval.
* @param {JulianDate} julianDate The date to check.
* @returns {boolean} true
if the interval contains the specified date, false
otherwise.
@@ -348,6 +361,7 @@ TimeInterval.contains = function (timeInterval, julianDate) {
/**
* Duplicates this instance.
+ *
* @param {TimeInterval} [result] An existing instance to use for the result.
* @returns {TimeInterval} The modified result parameter or a new instance if none was provided.
*/
@@ -358,6 +372,7 @@ TimeInterval.prototype.clone = function (result) {
/**
* Compares this instance against the provided instance componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {TimeInterval} [right] The right hand side interval.
* @param {TimeInterval.DataComparer} [dataComparer] A function which compares the data of the two intervals. If omitted, reference equality is used.
* @returns {boolean} true
if they are equal, false
otherwise.
@@ -370,8 +385,9 @@ TimeInterval.prototype.equals = function (right, dataComparer) {
* Compares this instance against the provided instance componentwise and returns
* true
if they are within the provided epsilon,
* false
otherwise.
+ *
* @param {TimeInterval} [right] The right hand side interval.
- * @param {number} [epsilon] The epsilon to use for equality testing.
+ * @param {number} [epsilon=0] The epsilon to use for equality testing.
* @param {TimeInterval.DataComparer} [dataComparer] A function which compares the data of the two intervals. If omitted, reference equality is used.
* @returns {boolean} true
if they are within the provided epsilon, false
otherwise.
*/
@@ -381,6 +397,7 @@ TimeInterval.prototype.equalsEpsilon = function (right, epsilon, dataComparer) {
/**
* Creates a string representing this TimeInterval in ISO8601 format.
+ *
* @returns {string} A string representing this TimeInterval in ISO8601 format.
*/
TimeInterval.prototype.toString = function () {
@@ -389,6 +406,7 @@ TimeInterval.prototype.toString = function () {
/**
* An immutable empty interval.
+ *
* @type {TimeInterval}
* @constant
*/
@@ -404,6 +422,7 @@ TimeInterval.EMPTY = Object.freeze(
/**
* Function interface for merging interval data.
* @callback TimeInterval.MergeCallback
+ *
* @param {*} leftData The first data instance.
* @param {*} rightData The second data instance.
* @returns {*} The result of merging the two data instances.
diff --git a/packages/engine/Source/Core/TimeIntervalCollection.js b/packages/engine/Source/Core/TimeIntervalCollection.js
index fba4812d475f..0d17ace07214 100644
--- a/packages/engine/Source/Core/TimeIntervalCollection.js
+++ b/packages/engine/Source/Core/TimeIntervalCollection.js
@@ -16,7 +16,8 @@ function compareIntervalStartTimes(left, right) {
/**
* A non-overlapping collection of {@link TimeInterval} instances sorted by start time.
* @alias TimeIntervalCollection
- * @class
+ * @constructor
+ *
* @param {TimeInterval[]} [intervals] An array of intervals to add to the collection.
*/
function TimeIntervalCollection(intervals) {
@@ -126,6 +127,7 @@ Object.defineProperties(TimeIntervalCollection.prototype, {
/**
* Compares this instance against the provided instance componentwise and returns
* true
if they are equal, false
otherwise.
+ *
* @param {TimeIntervalCollection} [right] The right hand side collection.
* @param {TimeInterval.DataComparer} [dataComparer] A function which compares the data of the two intervals. If omitted, reference equality is used.
* @returns {boolean} true
if they are equal, false
otherwise.
@@ -153,6 +155,7 @@ TimeIntervalCollection.prototype.equals = function (right, dataComparer) {
/**
* Gets the interval at the specified index.
+ *
* @param {number} index The index of the interval to retrieve.
* @returns {TimeInterval|undefined} The interval at the specified index, or undefined
if no interval exists as that index.
*/
@@ -178,6 +181,7 @@ TimeIntervalCollection.prototype.removeAll = function () {
/**
* Finds and returns the interval that contains the specified date.
+ *
* @param {JulianDate} date The date to search for.
* @returns {TimeInterval|undefined} The interval containing the specified date, undefined
if no such interval exists.
*/
@@ -188,6 +192,7 @@ TimeIntervalCollection.prototype.findIntervalContainingDate = function (date) {
/**
* Finds and returns the data for the interval that contains the specified date.
+ *
* @param {JulianDate} date The date to search for.
* @returns {object} The data for the interval containing the specified date, or undefined
if no such interval exists.
*/
@@ -200,6 +205,7 @@ TimeIntervalCollection.prototype.findDataForIntervalContainingDate = function (
/**
* Checks if the specified date is inside this collection.
+ *
* @param {JulianDate} julianDate The date to check.
* @returns {boolean} true
if the collection contains the specified date, false
otherwise.
*/
@@ -211,6 +217,7 @@ const indexOfScratch = new TimeInterval();
/**
* Finds and returns the index of the interval in the collection that contains the specified date.
+ *
* @param {JulianDate} date The date to search for.
* @returns {number} The index of the interval that contains the specified date, if no such interval exists,
* it returns a negative number which is the bitwise complement of the index of the next interval that
@@ -261,6 +268,7 @@ TimeIntervalCollection.prototype.indexOf = function (date) {
/**
* Returns the first interval in the collection that matches the specified parameters.
* All parameters are optional and undefined
parameters are treated as a don't care condition.
+ *
* @param {object} [options] Object with the following properties:
* @param {JulianDate} [options.start] The start time of the interval.
* @param {JulianDate} [options.stop] The stop time of the interval.
@@ -295,6 +303,7 @@ TimeIntervalCollection.prototype.findInterval = function (options) {
* Adds an interval to the collection, merging intervals that contain the same data and
* splitting intervals of different data as needed in order to maintain a non-overlapping collection.
* The data in the new interval takes precedence over any existing intervals in the collection.
+ *
* @param {TimeInterval} interval The interval to add.
* @param {TimeInterval.DataComparer} [dataComparer] A function which compares the data of the two intervals. If omitted, reference equality is used.
*/
@@ -494,6 +503,7 @@ TimeIntervalCollection.prototype.addInterval = function (
/**
* Removes the specified interval from this interval collection, creating a hole over the specified interval.
* The data property of the input interval is ignored.
+ *
* @param {TimeInterval} interval The interval to remove.
* @returns {boolean} true
if the interval was removed, false
if no part of the interval was in the collection.
*/
@@ -652,6 +662,7 @@ TimeIntervalCollection.prototype.removeInterval = function (interval) {
/**
* Creates a new instance that is the intersection of this collection and the provided collection.
+ *
* @param {TimeIntervalCollection} other The collection to intersect with.
* @param {TimeInterval.DataComparer} [dataComparer] A function which compares the data of the two intervals. If omitted, reference equality is used.
* @param {TimeInterval.MergeCallback} [mergeCallback] A function which merges the data of the two intervals. If omitted, the data from the left interval will be used.
@@ -719,12 +730,13 @@ TimeIntervalCollection.prototype.intersect = function (
/**
* Creates a new instance from a JulianDate array.
+ *
* @param {object} options Object with the following properties:
* @param {JulianDate[]} options.julianDates An array of ISO 8601 dates.
- * @param {boolean} [options.isStartIncluded] true
if start time is included in the interval, false
otherwise.
- * @param {boolean} [options.isStopIncluded] true
if stop time is included in the interval, false
otherwise.
- * @param {boolean} [options.leadingInterval] true
if you want to add a interval from Iso8601.MINIMUM_VALUE to start time, false
otherwise.
- * @param {boolean} [options.trailingInterval] true
if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, false
otherwise.
+ * @param {boolean} [options.isStartIncluded=true] true
if start time is included in the interval, false
otherwise.
+ * @param {boolean} [options.isStopIncluded=true] true
if stop time is included in the interval, false
otherwise.
+ * @param {boolean} [options.leadingInterval=false] true
if you want to add a interval from Iso8601.MINIMUM_VALUE to start time, false
otherwise.
+ * @param {boolean} [options.trailingInterval=false] true
if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, false
otherwise.
* @param {Function} [options.dataCallback] A function that will be return the data that is called with each interval before it is added to the collection. If unspecified, the data will be the index in the collection.
* @param {TimeIntervalCollection} [result] An existing instance to use for the result.
* @returns {TimeIntervalCollection} The modified result parameter or a new instance if none was provided.
@@ -808,10 +820,12 @@ const monthLengths = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
/**
* Adds duration represented as a GregorianDate to a JulianDate
+ *
* @param {JulianDate} julianDate The date.
* @param {GregorianDate} duration An duration represented as a GregorianDate.
* @param {JulianDate} result An existing instance to use for the result.
* @returns {JulianDate} The modified result parameter.
+ *
* @private
*/
function addToDate(julianDate, duration, result) {
@@ -883,9 +897,11 @@ const durationRegex = /P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+
/**
* Parses ISO8601 duration string
+ *
* @param {string} iso8601 An ISO 8601 duration.
* @param {GregorianDate} result An existing instance to use for the result.
* @returns {boolean} True is parsing succeeded, false otherwise
+ *
* @private
*/
function parseDuration(iso8601, result) {
@@ -964,12 +980,13 @@ function parseDuration(iso8601, result) {
const scratchDuration = new GregorianDate();
/**
* Creates a new instance from an {@link http://en.wikipedia.org/wiki/ISO_8601|ISO 8601} time interval (start/end/duration).
+ *
* @param {object} options Object with the following properties:
* @param {string} options.iso8601 An ISO 8601 interval.
- * @param {boolean} [options.isStartIncluded] true
if start time is included in the interval, false
otherwise.
- * @param {boolean} [options.isStopIncluded] true
if stop time is included in the interval, false
otherwise.
- * @param {boolean} [options.leadingInterval] true
if you want to add a interval from Iso8601.MINIMUM_VALUE to start time, false
otherwise.
- * @param {boolean} [options.trailingInterval] true
if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, false
otherwise.
+ * @param {boolean} [options.isStartIncluded=true] true
if start time is included in the interval, false
otherwise.
+ * @param {boolean} [options.isStopIncluded=true] true
if stop time is included in the interval, false
otherwise.
+ * @param {boolean} [options.leadingInterval=false] true
if you want to add a interval from Iso8601.MINIMUM_VALUE to start time, false
otherwise.
+ * @param {boolean} [options.trailingInterval=false] true
if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, false
otherwise.
* @param {Function} [options.dataCallback] A function that will be return the data that is called with each interval before it is added to the collection. If unspecified, the data will be the index in the collection.
* @param {TimeIntervalCollection} [result] An existing instance to use for the result.
* @returns {TimeIntervalCollection} The modified result parameter or a new instance if none was provided.
@@ -1020,12 +1037,13 @@ TimeIntervalCollection.fromIso8601 = function (options, result) {
/**
* Creates a new instance from a {@link http://en.wikipedia.org/wiki/ISO_8601|ISO 8601} date array.
+ *
* @param {object} options Object with the following properties:
* @param {string[]} options.iso8601Dates An array of ISO 8601 dates.
- * @param {boolean} [options.isStartIncluded] true
if start time is included in the interval, false
otherwise.
- * @param {boolean} [options.isStopIncluded] true
if stop time is included in the interval, false
otherwise.
- * @param {boolean} [options.leadingInterval] true
if you want to add a interval from Iso8601.MINIMUM_VALUE to start time, false
otherwise.
- * @param {boolean} [options.trailingInterval] true
if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, false
otherwise.
+ * @param {boolean} [options.isStartIncluded=true] true
if start time is included in the interval, false
otherwise.
+ * @param {boolean} [options.isStopIncluded=true] true
if stop time is included in the interval, false
otherwise.
+ * @param {boolean} [options.leadingInterval=false] true
if you want to add a interval from Iso8601.MINIMUM_VALUE to start time, false
otherwise.
+ * @param {boolean} [options.trailingInterval=false] true
if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, false
otherwise.
* @param {Function} [options.dataCallback] A function that will be return the data that is called with each interval before it is added to the collection. If unspecified, the data will be the index in the collection.
* @param {TimeIntervalCollection} [result] An existing instance to use for the result.
* @returns {TimeIntervalCollection} The modified result parameter or a new instance if none was provided.
@@ -1057,14 +1075,15 @@ TimeIntervalCollection.fromIso8601DateArray = function (options, result) {
/**
* Creates a new instance from a {@link http://en.wikipedia.org/wiki/ISO_8601|ISO 8601} duration array.
+ *
* @param {object} options Object with the following properties:
* @param {JulianDate} options.epoch An date that the durations are relative to.
* @param {string} options.iso8601Durations An array of ISO 8601 durations.
- * @param {boolean} [options.relativeToPrevious] true
if durations are relative to previous date, false
if always relative to the epoch.
- * @param {boolean} [options.isStartIncluded] true
if start time is included in the interval, false
otherwise.
- * @param {boolean} [options.isStopIncluded] true
if stop time is included in the interval, false
otherwise.
- * @param {boolean} [options.leadingInterval] true
if you want to add a interval from Iso8601.MINIMUM_VALUE to start time, false
otherwise.
- * @param {boolean} [options.trailingInterval] true
if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, false
otherwise.
+ * @param {boolean} [options.relativeToPrevious=false] true
if durations are relative to previous date, false
if always relative to the epoch.
+ * @param {boolean} [options.isStartIncluded=true] true
if start time is included in the interval, false
otherwise.
+ * @param {boolean} [options.isStopIncluded=true] true
if stop time is included in the interval, false
otherwise.
+ * @param {boolean} [options.leadingInterval=false] true
if you want to add a interval from Iso8601.MINIMUM_VALUE to start time, false
otherwise.
+ * @param {boolean} [options.trailingInterval=false] true
if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, false
otherwise.
* @param {Function} [options.dataCallback] A function that will be return the data that is called with each interval before it is added to the collection. If unspecified, the data will be the index in the collection.
* @param {TimeIntervalCollection} [result] An existing instance to use for the result.
* @returns {TimeIntervalCollection} The modified result parameter or a new instance if none was provided.
diff --git a/packages/engine/Source/Core/TimeStandard.js b/packages/engine/Source/Core/TimeStandard.js
index 020e66c89477..022772f8f3ee 100644
--- a/packages/engine/Source/Core/TimeStandard.js
+++ b/packages/engine/Source/Core/TimeStandard.js
@@ -1,6 +1,8 @@
/**
* Provides the type of time standards which JulianDate can take as input.
+ *
* @enum {number}
+ *
* @see JulianDate
*/
const TimeStandard = {
@@ -10,6 +12,7 @@ const TimeStandard = {
* UTC is related to TAI according to the relationship
* UTC = TAI - deltaT
where deltaT
is the number of leap
* seconds which have been introduced as of the time in TAI.
+ *
* @type {number}
* @constant
*/
@@ -18,6 +21,7 @@ const TimeStandard = {
/**
* Represents the International Atomic Time (TAI) time standard.
* TAI is the principal time standard to which the other time standards are related.
+ *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/Tipsify.js b/packages/engine/Source/Core/Tipsify.js
index c94a3dca33a6..d40e9ac5cfa7 100644
--- a/packages/engine/Source/Core/Tipsify.js
+++ b/packages/engine/Source/Core/Tipsify.js
@@ -7,25 +7,31 @@ import DeveloperError from "./DeveloperError.js";
* vertex-shader cache. This is based on the 2007 SIGGRAPH paper
* 'Fast Triangle Reordering for Vertex Locality and Reduced Overdraw.'
* The runtime is linear but several passes are made.
+ *
* @namespace Tipsify
+ *
* @see
* Fast Triangle Reordering for Vertex Locality and Reduced Overdraw
* by Sander, Nehab, and Barczak
+ *
* @private
*/
const Tipsify = {};
/**
* Calculates the average cache miss ratio (ACMR) for a given set of indices.
+ *
* @param {object} options Object with the following properties:
* @param {number[]} options.indices Lists triads of numbers corresponding to the indices of the vertices
* in the vertex buffer that define the geometry's triangles.
* @param {number} [options.maximumIndex] The maximum value of the elements in args.indices
.
* If not supplied, this value will be computed.
- * @param {number} [options.cacheSize] The number of vertices that can be stored in the cache at any one time.
+ * @param {number} [options.cacheSize=24] The number of vertices that can be stored in the cache at any one time.
* @returns {number} The average cache miss ratio (ACMR).
- * @throws {DeveloperError} indices length must be a multiple of three.
- * @throws {DeveloperError} cacheSize must be greater than two.
+ *
+ * @exception {DeveloperError} indices length must be a multiple of three.
+ * @exception {DeveloperError} cacheSize must be greater than two.
+ *
* @example
* const indices = [0, 1, 2, 3, 4, 5];
* const maxIndex = 5;
@@ -92,15 +98,18 @@ Tipsify.calculateACMR = function (options) {
/**
* Optimizes triangles for the post-vertex shader cache.
+ *
* @param {object} options Object with the following properties:
* @param {number[]} options.indices Lists triads of numbers corresponding to the indices of the vertices
* in the vertex buffer that define the geometry's triangles.
* @param {number} [options.maximumIndex] The maximum value of the elements in args.indices
.
* If not supplied, this value will be computed.
- * @param {number} [options.cacheSize] The number of vertices that can be stored in the cache at any one time.
+ * @param {number} [options.cacheSize=24] The number of vertices that can be stored in the cache at any one time.
* @returns {number[]} A list of the input indices in an optimized order.
- * @throws {DeveloperError} indices length must be a multiple of three.
- * @throws {DeveloperError} cacheSize must be greater than two.
+ *
+ * @exception {DeveloperError} indices length must be a multiple of three.
+ * @exception {DeveloperError} cacheSize must be greater than two.
+ *
* @example
* const indices = [0, 1, 2, 3, 4, 5];
* const maxIndex = 5;
diff --git a/packages/engine/Source/Core/Transforms.js b/packages/engine/Source/Core/Transforms.js
index 8042b7d5c8a9..8cd38f391f64 100644
--- a/packages/engine/Source/Core/Transforms.js
+++ b/packages/engine/Source/Core/Transforms.js
@@ -21,6 +21,7 @@ import TimeConstants from "./TimeConstants.js";
/**
* Contains functions for transforming positions to various reference frames.
+ *
* @namespace Transforms
*/
const Transforms = {};
@@ -93,7 +94,7 @@ let scratchThirdCartesian = new Cartesian3();
* 'east', 'north', 'up', 'west', 'south' or 'down'.
* @param {string} secondAxis name of the second axis of the local reference frame. Must be
* 'east', 'north', 'up', 'west', 'south' or 'down'.
- * @returns {Transforms.LocalFrameToFixedFrame} The function that will computes a
+ * @return {Transforms.LocalFrameToFixedFrame} The function that will computes a
* 4x4 transformation matrix from a reference frame, with first axis and second axis compliant with the parameters,
*/
Transforms.localFrameToFixedFrameGenerator = function (firstAxis, secondAxis) {
@@ -261,11 +262,13 @@ Transforms.localFrameToFixedFrameGenerator = function (firstAxis, secondAxis) {
* The y
axis points in the local north direction.
* The z
axis points in the direction of the ellipsoid surface normal which passes through the position.
*
+ *
* @function
* @param {Cartesian3} origin The center point of the local reference frame.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
* @param {Matrix4} [result] The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
+ *
* @example
* // Get the transform from local east-north-up at cartographic (0.0, 0.0) to Earth's fixed frame.
* const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);
@@ -285,11 +288,13 @@ Transforms.eastNorthUpToFixedFrame = Transforms.localFrameToFixedFrameGenerator(
* The y
axis points in the local east direction.
* The z
axis points in the opposite direction of the ellipsoid surface normal which passes through the position.
*
+ *
* @function
* @param {Cartesian3} origin The center point of the local reference frame.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
* @param {Matrix4} [result] The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
+ *
* @example
* // Get the transform from local north-east-down at cartographic (0.0, 0.0) to Earth's fixed frame.
* const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);
@@ -309,11 +314,13 @@ Transforms.northEastDownToFixedFrame = Transforms.localFrameToFixedFrameGenerato
* The y
axis points in the direction of the ellipsoid surface normal which passes through the position.
* The z
axis points in the local east direction.
*
+ *
* @function
* @param {Cartesian3} origin The center point of the local reference frame.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
* @param {Matrix4} [result] The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
+ *
* @example
* // Get the transform from local north-up-east at cartographic (0.0, 0.0) to Earth's fixed frame.
* const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);
@@ -333,11 +340,13 @@ Transforms.northUpEastToFixedFrame = Transforms.localFrameToFixedFrameGenerator(
* The y
axis points in the local west direction.
* The z
axis points in the direction of the ellipsoid surface normal which passes through the position.
*
+ *
* @function
* @param {Cartesian3} origin The center point of the local reference frame.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
* @param {Matrix4} [result] The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
+ *
* @example
* // Get the transform from local north-West-Up at cartographic (0.0, 0.0) to Earth's fixed frame.
* const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);
@@ -357,13 +366,15 @@ const scratchHPRMatrix4 = new Matrix4();
* centered at the provided origin to the provided ellipsoid's fixed reference frame. Heading is the rotation from the local east
* direction where a positive angle is increasing eastward. Pitch is the rotation from the local east-north plane. Positive pitch angles
* are above the plane. Negative pitch angles are below the plane. Roll is the first rotation applied about the local east axis.
+ *
* @param {Cartesian3} origin The center point of the local reference frame.
* @param {HeadingPitchRoll} headingPitchRoll The heading, pitch, and roll.
- * @param {Ellipsoid} [ellipsoid] The ellipsoid whose fixed frame is used in the transformation.
- * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform] A 4x4 transformation
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
+ * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation
* matrix from a reference frame to the provided ellipsoid's fixed reference frame
* @param {Matrix4} [result] The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
+ *
* @example
* // Get the transform from local heading-pitch-roll at cartographic (0.0, 0.0) to Earth's fixed frame.
* const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);
@@ -410,13 +421,15 @@ const scratchHPRMatrix3 = new Matrix3();
* centered at the provided origin. Heading is the rotation from the local east
* direction where a positive angle is increasing eastward. Pitch is the rotation from the local east-north plane. Positive pitch angles
* are above the plane. Negative pitch angles are below the plane. Roll is the first rotation applied about the local east axis.
+ *
* @param {Cartesian3} origin The center point of the local reference frame.
* @param {HeadingPitchRoll} headingPitchRoll The heading, pitch, and roll.
- * @param {Ellipsoid} [ellipsoid] The ellipsoid whose fixed frame is used in the transformation.
- * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform] A 4x4 transformation
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
+ * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation
* matrix from a reference frame to the provided ellipsoid's fixed reference frame
* @param {Quaternion} [result] The object onto which to store the result.
* @returns {Quaternion} The modified result parameter or a new Quaternion instance if none was provided.
+ *
* @example
* // Get the quaternion from local heading-pitch-roll at cartographic (0.0, 0.0) to Earth's fixed frame.
* const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);
@@ -458,9 +471,10 @@ const hprQuaternionScratch = new Quaternion();
* Computes heading-pitch-roll angles from a transform in a particular reference frame. Heading is the rotation from the local east
* direction where a positive angle is increasing eastward. Pitch is the rotation from the local east-north plane. Positive pitch angles
* are above the plane. Negative pitch angles are below the plane. Roll is the first rotation applied about the local east axis.
+ *
* @param {Matrix4} transform The transform
- * @param {Ellipsoid} [ellipsoid] The ellipsoid whose fixed frame is used in the transformation.
- * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform] A 4x4 transformation
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
+ * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation
* matrix from a reference frame to the provided ellipsoid's fixed reference frame
* @param {HeadingPitchRoll} [result] The object onto which to store the result.
* @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if none was provided.
@@ -527,9 +541,11 @@ let dateInUtc = new JulianDate();
/**
* Computes a rotation matrix to transform a point or vector from True Equator Mean Equinox (TEME) axes to the
* pseudo-fixed axes at a given time. This method treats the UT1 time standard as equivalent to UTC.
+ *
* @param {JulianDate} date The time at which to compute the rotation matrix.
* @param {Matrix3} [result] The object onto which to store the result.
* @returns {Matrix3} The modified result parameter or a new Matrix3 instance if none was provided.
+ *
* @example
* //Set the view to the inertial frame.
* scene.postUpdate.addEventListener(function(scene, time) {
@@ -609,8 +625,10 @@ Transforms.computeTemeToPseudoFixedMatrix = function (date, result) {
* The source of IAU 2006 XYS data, used for computing the transformation between the
* Fixed and ICRF axes.
* @type {Iau2006XysData}
+ *
* @see Transforms.computeIcrfToFixedMatrix
* @see Transforms.computeFixedToIcrfMatrix
+ *
* @private
*/
Transforms.iau2006XysData = new Iau2006XysData();
@@ -620,8 +638,10 @@ Transforms.iau2006XysData = new Iau2006XysData();
* between the Fixed and ICRF axes. By default, zero values are used for all EOP values,
* yielding a reasonable but not completely accurate representation of the ICRF axes.
* @type {EarthOrientationParameters}
+ *
* @see Transforms.computeIcrfToFixedMatrix
* @see Transforms.computeFixedToIcrfMatrix
+ *
* @private
*/
Transforms.earthOrientationParameters = EarthOrientationParameters.NONE;
@@ -633,14 +653,18 @@ const j2000ttDays = 2451545.0;
* Preloads the data necessary to transform between the ICRF and Fixed axes, in either
* direction, over a given interval. This function returns a promise that, when resolved,
* indicates that the preload has completed.
+ *
* @param {TimeInterval} timeInterval The interval to preload.
* @returns {Promise} A promise that, when resolved, indicates that the preload has completed
* and evaluation of the transformation between the fixed and ICRF axes will
* no longer return undefined for a time inside the interval.
+ *
+ *
* @example
* const interval = new Cesium.TimeInterval(...);
* await Cesium.Transforms.preloadIcrfFixed(interval));
* // the data is now loaded
+ *
* @see Transforms.computeIcrfToFixedMatrix
* @see Transforms.computeFixedToIcrfMatrix
*/
@@ -663,11 +687,14 @@ Transforms.preloadIcrfFixed = function (timeInterval) {
* Reference Frame (GCRF/ICRF) inertial frame axes to the Earth-Fixed frame axes (ITRF)
* at a given time. This function may return undefined if the data necessary to
* do the transformation is not yet loaded.
+ *
* @param {JulianDate} date The time at which to compute the rotation matrix.
* @param {Matrix3} [result] The object onto which to store the result. If this parameter is
* not specified, a new instance is created and returned.
* @returns {Matrix3} The rotation matrix, or undefined if the data necessary to do the
* transformation is not yet loaded.
+ *
+ *
* @example
* scene.postUpdate.addEventListener(function(scene, time) {
* // View in ICRF.
@@ -678,6 +705,7 @@ Transforms.preloadIcrfFixed = function (timeInterval) {
* camera.lookAtTransform(transform, offset);
* }
* });
+ *
* @see Transforms.preloadIcrfFixed
*/
Transforms.computeIcrfToFixedMatrix = function (date, result) {
@@ -715,11 +743,14 @@ const rotation2Scratch = new Matrix3();
* to the International Celestial Reference Frame (GCRF/ICRF) inertial frame axes
* at a given time. This function may return undefined if the data necessary to
* do the transformation is not yet loaded.
+ *
* @param {JulianDate} date The time at which to compute the rotation matrix.
* @param {Matrix3} [result] The object onto which to store the result. If this parameter is
* not specified, a new instance is created and returned.
* @returns {Matrix3} The rotation matrix, or undefined if the data necessary to do the
* transformation is not yet loaded.
+ *
+ *
* @example
* // Transform a point from the Fixed axes to the ICRF axes.
* const now = Cesium.JulianDate.now();
@@ -729,6 +760,7 @@ const rotation2Scratch = new Matrix3();
* if (Cesium.defined(fixedToIcrf)) {
* pointInInertial = Cesium.Matrix3.multiplyByVector(fixedToIcrf, pointInFixed, pointInInertial);
* }
+ *
* @see Transforms.preloadIcrfFixed
*/
Transforms.computeFixedToIcrfMatrix = function (date, result) {
@@ -847,6 +879,7 @@ const pointToWindowCoordinatesTemp = new Cartesian4();
/**
* Transform a point from model coordinates to window coordinates.
+ *
* @param {Matrix4} modelViewProjectionMatrix The 4x4 model-view-projection matrix.
* @param {Matrix4} viewportTransformation The 4x4 viewport transformation.
* @param {Cartesian3} point The point to transform.
@@ -870,10 +903,6 @@ Transforms.pointToWindowCoordinates = function (
};
/**
- * @param modelViewProjectionMatrix
- * @param viewportTransformation
- * @param point
- * @param result
* @private
*/
Transforms.pointToGLWindowCoordinates = function (
@@ -918,9 +947,10 @@ const upScratch = new Cartesian3();
/**
* Transform a position and velocity to a rotation matrix.
+ *
* @param {Cartesian3} position The position to transform.
* @param {Cartesian3} velocity The velocity vector to transform.
- * @param {Ellipsoid} [ellipsoid] The ellipsoid whose fixed frame is used in the transformation.
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
* @param {Matrix3} [result] The object onto which to store the result.
* @returns {Matrix3} The modified result parameter or a new Matrix3 instance if none was provided.
*/
@@ -1000,9 +1030,6 @@ const scratchFromENU = new Matrix4();
const scratchToENU = new Matrix4();
/**
- * @param projection
- * @param matrix
- * @param result
* @private
*/
Transforms.basisTo2D = function (projection, matrix, result) {
@@ -1062,9 +1089,6 @@ Transforms.basisTo2D = function (projection, matrix, result) {
};
/**
- * @param projection
- * @param center
- * @param result
* @private
*/
Transforms.wgs84To2DModelMatrix = function (projection, center, result) {
diff --git a/packages/engine/Source/Core/TranslationRotationScale.js b/packages/engine/Source/Core/TranslationRotationScale.js
index 154e25a4e172..f3ce144596a3 100644
--- a/packages/engine/Source/Core/TranslationRotationScale.js
+++ b/packages/engine/Source/Core/TranslationRotationScale.js
@@ -10,10 +10,11 @@ const defaultRotation = Quaternion.IDENTITY;
/**
* An affine transformation defined by a translation, rotation, and scale.
* @alias TranslationRotationScale
- * @class
- * @param {Cartesian3} [translation] A {@link Cartesian3} specifying the (x, y, z) translation to apply to the node.
- * @param {Quaternion} [rotation] A {@link Quaternion} specifying the (x, y, z, w) rotation to apply to the node.
- * @param {Cartesian3} [scale] A {@link Cartesian3} specifying the (x, y, z) scaling to apply to the node.
+ * @constructor
+ *
+ * @param {Cartesian3} [translation=Cartesian3.ZERO] A {@link Cartesian3} specifying the (x, y, z) translation to apply to the node.
+ * @param {Quaternion} [rotation=Quaternion.IDENTITY] A {@link Quaternion} specifying the (x, y, z, w) rotation to apply to the node.
+ * @param {Cartesian3} [scale=new Cartesian3(1.0, 1.0, 1.0)] A {@link Cartesian3} specifying the (x, y, z) scaling to apply to the node.
*/
function TranslationRotationScale(translation, rotation, scale) {
/**
@@ -43,6 +44,7 @@ function TranslationRotationScale(translation, rotation, scale) {
/**
* Compares this instance against the provided instance and returns
* true
if they are equal, false
otherwise.
+ *
* @param {TranslationRotationScale} [right] The right hand side TranslationRotationScale.
* @returns {boolean} true
if they are equal, false
otherwise.
*/
diff --git a/packages/engine/Source/Core/TridiagonalSystemSolver.js b/packages/engine/Source/Core/TridiagonalSystemSolver.js
index 4d2df23da9a1..b53dabc7e3e4 100644
--- a/packages/engine/Source/Core/TridiagonalSystemSolver.js
+++ b/packages/engine/Source/Core/TridiagonalSystemSolver.js
@@ -5,20 +5,25 @@ import DeveloperError from "./DeveloperError.js";
/**
* Uses the Tridiagonal Matrix Algorithm, also known as the Thomas Algorithm, to solve
* a system of linear equations where the coefficient matrix is a tridiagonal matrix.
+ *
* @namespace TridiagonalSystemSolver
*/
const TridiagonalSystemSolver = {};
/**
* Solves a tridiagonal system of linear equations.
+ *
* @param {number[]} diagonal An array with length n
that contains the diagonal of the coefficient matrix.
* @param {number[]} lower An array with length n - 1
that contains the lower diagonal of the coefficient matrix.
* @param {number[]} upper An array with length n - 1
that contains the upper diagonal of the coefficient matrix.
* @param {Cartesian3[]} right An array of Cartesians with length n
that is the right side of the system of equations.
- * @throws {DeveloperError} diagonal and right must have the same lengths.
- * @throws {DeveloperError} lower and upper must have the same lengths.
- * @throws {DeveloperError} lower and upper must be one less than the length of diagonal.
+ *
+ * @exception {DeveloperError} diagonal and right must have the same lengths.
+ * @exception {DeveloperError} lower and upper must have the same lengths.
+ * @exception {DeveloperError} lower and upper must be one less than the length of diagonal.
+ *
* @performance Linear time.
+ *
* @example
* const lowerDiagonal = [1.0, 1.0, 1.0, 1.0];
* const diagonal = [2.0, 4.0, 4.0, 4.0, 2.0];
@@ -32,6 +37,7 @@ const TridiagonalSystemSolver = {};
* ];
*
* const solution = Cesium.TridiagonalSystemSolver.solve(lowerDiagonal, diagonal, upperDiagonal, rightHandSide);
+ *
* @returns {Cartesian3[]} An array of Cartesians with length n
that is the solution to the tridiagonal system of equations.
*/
TridiagonalSystemSolver.solve = function (lower, diagonal, upper, right) {
diff --git a/packages/engine/Source/Core/TrustedServers.js b/packages/engine/Source/Core/TrustedServers.js
index bbd857a300d7..92b24ae7cef5 100644
--- a/packages/engine/Source/Core/TrustedServers.js
+++ b/packages/engine/Source/Core/TrustedServers.js
@@ -5,7 +5,9 @@ import DeveloperError from "./DeveloperError.js";
/**
* A singleton that contains all of the servers that are trusted. Credentials will be sent with
* any requests to these servers.
+ *
* @namespace TrustedServers
+ *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
*/
const TrustedServers = {};
@@ -13,8 +15,10 @@ let _servers = {};
/**
* Adds a trusted server to the registry
+ *
* @param {string} host The host to be added.
* @param {number} port The port used to access the host.
+ *
* @example
* // Add a trusted server
* TrustedServers.add('my.server.com', 80);
@@ -37,8 +41,10 @@ TrustedServers.add = function (host, port) {
/**
* Removes a trusted server from the registry
+ *
* @param {string} host The host to be removed.
* @param {number} port The port used to access the host.
+ *
* @example
* // Remove a trusted server
* TrustedServers.remove('my.server.com', 80);
@@ -96,8 +102,11 @@ function getAuthority(url) {
/**
* Tests whether a server is trusted or not. The server must have been added with the port if it is included in the url.
+ *
* @param {string} url The url to be tested against the trusted list
+ *
* @returns {boolean} Returns true if url is trusted, false otherwise.
+ *
* @example
* // Add server
* TrustedServers.add('my.server.com', 81);
@@ -126,6 +135,7 @@ TrustedServers.contains = function (url) {
/**
* Clears the registry
+ *
* @example
* // Remove a trusted server
* TrustedServers.clear();
diff --git a/packages/engine/Source/Core/VRTheWorldTerrainProvider.js b/packages/engine/Source/Core/VRTheWorldTerrainProvider.js
index 4f1eccca6673..9586c423571f 100644
--- a/packages/engine/Source/Core/VRTheWorldTerrainProvider.js
+++ b/packages/engine/Source/Core/VRTheWorldTerrainProvider.js
@@ -20,17 +20,20 @@ function DataRectangle(rectangle, maxLevel) {
}
/**
- * @typedef {object} VRTheWorldTerrainProvider.ConstructorOptions
+ * @typedef {Object} VRTheWorldTerrainProvider.ConstructorOptions
*
* Initialization options for the VRTheWorldTerrainProvider constructor
+ *
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
* @property {Credit|string} [credit] A credit for the data source, which is displayed on the canvas.
*/
/**
* Used to track creation details while fetching initial metadata
- * @class
+ *
+ * @constructor
* @private
+ *
* @param {VRTheWorldTerrainProvider.ConstructorOptions} options An object describing initialization options
*/
function TerrainProviderBuilder(options) {
@@ -136,14 +139,18 @@ async function requestMetadata(terrainProviderBuilder, resource, provider) {
*
* A {@link TerrainProvider} that produces terrain geometry by tessellating height maps
* retrieved from a {@link http://vr-theworld.com/|VT MÄK VR-TheWorld server}.
+ *
* @alias VRTheWorldTerrainProvider
- * @class
+ * @constructor
+ *
* @param {VRTheWorldTerrainProvider.ConstructorOptions} [options] An object describing initialization options.
+ *
* @example
* const terrainProvider = await Cesium.VRTheWorldTerrainProvider.fromUrl(
* "https://www.vr-theworld.com/vr-theworld/tiles1.0.0/73/"
* );
* viewer.terrainProvider = terrainProvider;
+ *
* @see TerrainProvider
*/
function VRTheWorldTerrainProvider(options) {
@@ -255,15 +262,18 @@ Object.defineProperties(VRTheWorldTerrainProvider.prototype, {
/**
* Creates a {@link TerrainProvider} that produces terrain geometry by tessellating height maps
* retrieved from a {@link http://vr-theworld.com/|VT MÄK VR-TheWorld server}.
- * @param {Resource | string} url The URL of the VR-TheWorld TileMap.
+ *
+ * @param {Resource|String} url The URL of the VR-TheWorld TileMap.
* @param {VRTheWorldTerrainProvider.ConstructorOptions} [options] An object describing initialization options.
* @returns {Promise}
+ *
* @example
* const terrainProvider = await Cesium.VRTheWorldTerrainProvider.fromUrl(
* "https://www.vr-theworld.com/vr-theworld/tiles1.0.0/73/"
* );
* viewer.terrainProvider = terrainProvider;
- * @throws {RuntimeError} metadata specifies and unknown SRS
+ *
+ * @exception {RuntimeError} metadata specifies and unknown SRS
*/
VRTheWorldTerrainProvider.fromUrl = async function (url, options) {
//>>includeStart('debug', pragmas.debug);
@@ -287,6 +297,7 @@ VRTheWorldTerrainProvider.fromUrl = async function (url, options) {
/**
* Requests the geometry for a given tile. The result includes terrain
* data and indicates that all child tiles are available.
+ *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -330,6 +341,7 @@ VRTheWorldTerrainProvider.prototype.requestTileGeometry = function (
/**
* Gets the maximum geometric error allowed in a tile at a given level.
+ *
* @param {number} level The tile level for which to get the maximum geometric error.
* @returns {number} The maximum geometric error.
*/
@@ -416,6 +428,7 @@ function isTileInRectangle(tilingScheme, rectangle, x, y, level) {
/**
* Determines whether data for a tile is available to be loaded.
+ *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -431,6 +444,7 @@ VRTheWorldTerrainProvider.prototype.getTileDataAvailable = function (
/**
* Makes sure we load availability data for a tile
+ *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
diff --git a/packages/engine/Source/Core/VertexFormat.js b/packages/engine/Source/Core/VertexFormat.js
index 18ab1444cbde..9754d06ba676 100644
--- a/packages/engine/Source/Core/VertexFormat.js
+++ b/packages/engine/Source/Core/VertexFormat.js
@@ -6,15 +6,19 @@ import DeveloperError from "./DeveloperError.js";
* A vertex format defines what attributes make up a vertex. A VertexFormat can be provided
* to a {@link Geometry} to request that certain properties be computed, e.g., just position,
* position and normal, etc.
+ *
* @param {object} [options] An object with boolean properties corresponding to VertexFormat properties as shown in the code example.
+ *
* @alias VertexFormat
- * @class
+ * @constructor
+ *
* @example
* // Create a vertex format with position and 2D texture coordinate attributes.
* const format = new Cesium.VertexFormat({
* position : true,
* st : true
* });
+ *
* @see Geometry#attributes
* @see Packable
*/
@@ -26,7 +30,9 @@ function VertexFormat(options) {
*
* 64-bit floating-point (for precision). 3 components per attribute.
*
+ *
* @type {boolean}
+ *
* @default false
*/
this.position = defaultValue(options.position, false);
@@ -36,7 +42,9 @@ function VertexFormat(options) {
*
* 32-bit floating-point. 3 components per attribute.
*
+ *
* @type {boolean}
+ *
* @default false
*/
this.normal = defaultValue(options.normal, false);
@@ -46,7 +54,9 @@ function VertexFormat(options) {
*
* 32-bit floating-point. 2 components per attribute
*
+ *
* @type {boolean}
+ *
* @default false
*/
this.st = defaultValue(options.st, false);
@@ -56,7 +66,9 @@ function VertexFormat(options) {
*
* 32-bit floating-point. 3 components per attribute.
*
+ *
* @type {boolean}
+ *
* @default false
*/
this.bitangent = defaultValue(options.bitangent, false);
@@ -66,7 +78,9 @@ function VertexFormat(options) {
*
* 32-bit floating-point. 3 components per attribute.
*
+ *
* @type {boolean}
+ *
* @default false
*/
this.tangent = defaultValue(options.tangent, false);
@@ -76,7 +90,9 @@ function VertexFormat(options) {
*
* 8-bit unsigned byte. 3 components per attribute.
*
+ *
* @type {boolean}
+ *
* @default false
*/
this.color = defaultValue(options.color, false);
@@ -84,8 +100,10 @@ function VertexFormat(options) {
/**
* An immutable vertex format with only a position attribute.
+ *
* @type {VertexFormat}
* @constant
+ *
* @see VertexFormat#position
*/
VertexFormat.POSITION_ONLY = Object.freeze(
@@ -97,8 +115,10 @@ VertexFormat.POSITION_ONLY = Object.freeze(
/**
* An immutable vertex format with position and normal attributes.
* This is compatible with per-instance color appearances like {@link PerInstanceColorAppearance}.
+ *
* @type {VertexFormat}
* @constant
+ *
* @see VertexFormat#position
* @see VertexFormat#normal
*/
@@ -113,8 +133,10 @@ VertexFormat.POSITION_AND_NORMAL = Object.freeze(
* An immutable vertex format with position, normal, and st attributes.
* This is compatible with {@link MaterialAppearance} when {@link MaterialAppearance#materialSupport}
* is TEXTURED/code>.
+ *
* @type {VertexFormat}
* @constant
+ *
* @see VertexFormat#position
* @see VertexFormat#normal
* @see VertexFormat#st
@@ -130,8 +152,10 @@ VertexFormat.POSITION_NORMAL_AND_ST = Object.freeze(
/**
* An immutable vertex format with position and st attributes.
* This is compatible with {@link EllipsoidSurfaceAppearance}.
+ *
* @type {VertexFormat}
* @constant
+ *
* @see VertexFormat#position
* @see VertexFormat#st
*/
@@ -144,8 +168,10 @@ VertexFormat.POSITION_AND_ST = Object.freeze(
/**
* An immutable vertex format with position and color attributes.
+ *
* @type {VertexFormat}
* @constant
+ *
* @see VertexFormat#position
* @see VertexFormat#color
*/
@@ -158,8 +184,10 @@ VertexFormat.POSITION_AND_COLOR = Object.freeze(
/**
* An immutable vertex format with well-known attributes: position, normal, st, tangent, and bitangent.
+ *
* @type {VertexFormat}
* @constant
+ *
* @see VertexFormat#position
* @see VertexFormat#normal
* @see VertexFormat#st
@@ -181,8 +209,10 @@ VertexFormat.ALL = Object.freeze(
* This is compatible with most appearances and materials; however
* normal and st attributes are not always required. When this is
* known in advance, another VertexFormat
should be used.
+ *
* @type {VertexFormat}
* @constant
+ *
* @see VertexFormat#position
* @see VertexFormat#normal
*/
@@ -196,9 +226,11 @@ VertexFormat.packedLength = 6;
/**
* Stores the provided instance into the provided array.
+ *
* @param {VertexFormat} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
VertexFormat.pack = function (value, array, startingIndex) {
@@ -225,8 +257,9 @@ VertexFormat.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {VertexFormat} [result] The object into which to store the result.
* @returns {VertexFormat} The modified result parameter or a new VertexFormat instance if one was not provided.
*/
@@ -254,6 +287,7 @@ VertexFormat.unpack = function (array, startingIndex, result) {
/**
* Duplicates a VertexFormat instance.
+ *
* @param {VertexFormat} vertexFormat The vertex format to duplicate.
* @param {VertexFormat} [result] The object onto which to store the result.
* @returns {VertexFormat} The modified result parameter or a new VertexFormat instance if one was not provided. (Returns undefined if vertexFormat is undefined)
diff --git a/packages/engine/Source/Core/VerticalExaggeration.js b/packages/engine/Source/Core/VerticalExaggeration.js
index 1d67f45aad0e..5a9744691e29 100644
--- a/packages/engine/Source/Core/VerticalExaggeration.js
+++ b/packages/engine/Source/Core/VerticalExaggeration.js
@@ -10,6 +10,7 @@ const VerticalExaggeration = {};
/**
* Scales a height relative to an offset.
+ *
* @param {number} height The height.
* @param {number} scale A scalar used to exaggerate the terrain. If the value is 1.0 there will be no effect.
* @param {number} relativeHeight The height relative to which terrain is exaggerated. If the value is 0.0 terrain will be exaggerated relative to the ellipsoid surface.
@@ -30,6 +31,7 @@ const scratchCartographic = new Cartographic();
/**
* Scales a position by exaggeration.
+ *
* @param {Cartesian3} position The position.
* @param {Ellipsoid} ellipsoid The ellipsoid.
* @param {number} verticalExaggeration A scalar used to exaggerate the terrain. If the value is 1.0 there will be no effect.
diff --git a/packages/engine/Source/Core/VideoSynchronizer.js b/packages/engine/Source/Core/VideoSynchronizer.js
index 04ec918a6f4a..5599dcae75cf 100644
--- a/packages/engine/Source/Core/VideoSynchronizer.js
+++ b/packages/engine/Source/Core/VideoSynchronizer.js
@@ -6,13 +6,16 @@ import JulianDate from "./JulianDate.js";
/**
* Synchronizes a video element with a simulation clock.
+ *
* @alias VideoSynchronizer
- * @class
+ * @constructor
+ *
* @param {object} [options] Object with the following properties:
* @param {Clock} [options.clock] The clock instance used to drive the video.
* @param {HTMLVideoElement} [options.element] The video element to be synchronized.
- * @param {JulianDate} [options.epoch] The simulation time that marks the start of the video.
- * @param {number} [options.tolerance] The maximum amount of time, in seconds, that the clock and video can diverge.
+ * @param {JulianDate} [options.epoch=Iso8601.MINIMUM_VALUE] The simulation time that marks the start of the video.
+ * @param {number} [options.tolerance=1.0] The maximum amount of time, in seconds, that the clock and video can diverge.
+ *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Video.html|Video Material Demo}
*/
function VideoSynchronizer(options) {
@@ -53,6 +56,7 @@ function VideoSynchronizer(options) {
Object.defineProperties(VideoSynchronizer.prototype, {
/**
* Gets or sets the clock used to drive the video element.
+ *
* @memberof VideoSynchronizer.prototype
* @type {Clock}
*/
@@ -84,6 +88,7 @@ Object.defineProperties(VideoSynchronizer.prototype, {
},
/**
* Gets or sets the video element to synchronize.
+ *
* @memberof VideoSynchronizer.prototype
* @type {HTMLVideoElement}
*/
@@ -117,7 +122,8 @@ Object.defineProperties(VideoSynchronizer.prototype, {
/**
* Destroys and resources used by the object. Once an object is destroyed, it should not be used.
- * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
+ *
+ * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
*/
VideoSynchronizer.prototype.destroy = function () {
this.element = undefined;
@@ -127,6 +133,7 @@ VideoSynchronizer.prototype.destroy = function () {
/**
* Returns true if this object was destroyed; otherwise, false.
+ *
* @returns {boolean} True if this object was destroyed; otherwise, false.
*/
VideoSynchronizer.prototype.isDestroyed = function () {
diff --git a/packages/engine/Source/Core/Visibility.js b/packages/engine/Source/Core/Visibility.js
index 4dc02fa487e1..21c80db3db8e 100644
--- a/packages/engine/Source/Core/Visibility.js
+++ b/packages/engine/Source/Core/Visibility.js
@@ -3,11 +3,13 @@
* is visible during horizon culling. An occluder may fully block an occludee, in which case
* it has no visibility, may partially block an occludee from view, or may not block it at all,
* leading to full visibility.
+ *
* @enum {number}
*/
const Visibility = {
/**
* Represents that no part of an object is visible.
+ *
* @type {number}
* @constant
*/
@@ -15,6 +17,7 @@ const Visibility = {
/**
* Represents that part, but not all, of an object is visible
+ *
* @type {number}
* @constant
*/
@@ -22,6 +25,7 @@ const Visibility = {
/**
* Represents that an object is visible in its entirety.
+ *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/VulkanConstants.js b/packages/engine/Source/Core/VulkanConstants.js
index 08b3eb00d931..5252ff1df36d 100644
--- a/packages/engine/Source/Core/VulkanConstants.js
+++ b/packages/engine/Source/Core/VulkanConstants.js
@@ -2,6 +2,7 @@
* Enum containing Vulkan Constant values by name.
*
* These match the constants from the {@link https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-definition|Vulkan 1.2 specification}.
+ *
* @enum {number}
* @private
*/
diff --git a/packages/engine/Source/Core/WallGeometry.js b/packages/engine/Source/Core/WallGeometry.js
index db53e19cb35b..a67e0a882268 100644
--- a/packages/engine/Source/Core/WallGeometry.js
+++ b/packages/engine/Source/Core/WallGeometry.js
@@ -25,23 +25,29 @@ const scratchNormal = new Cartesian3();
/**
* A description of a wall, which is similar to a KML line string. A wall is defined by a series of points,
* which extrude down to the ground. Optionally, they can extrude downwards to a specified height.
+ *
* @alias WallGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of Cartesian objects, which are the points of the wall.
- * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
* @param {number[]} [options.maximumHeights] An array parallel to positions
that give the maximum height of the
* wall at positions
. If undefined, the height of each position in used.
* @param {number[]} [options.minimumHeights] An array parallel to positions
that give the minimum height of the
* wall at positions
. If undefined, the height at each position is 0.0.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid for coordinate manipulation
- * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
- * @throws {DeveloperError} positions length must be greater than or equal to 2.
- * @throws {DeveloperError} positions and maximumHeights must have the same length.
- * @throws {DeveloperError} positions and minimumHeights must have the same length.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid for coordinate manipulation
+ * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
+ *
+ * @exception {DeveloperError} positions length must be greater than or equal to 2.
+ * @exception {DeveloperError} positions and maximumHeights must have the same length.
+ * @exception {DeveloperError} positions and minimumHeights must have the same length.
+ *
* @see WallGeometry#createGeometry
* @see WallGeometry#fromConstantHeight
+ *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Wall.html|Cesium Sandcastle Wall Demo}
+ *
* @example
* // create a wall that spans from ground level to 10000 meters
* const wall = new Cesium.WallGeometry({
@@ -117,9 +123,11 @@ function WallGeometry(options) {
/**
* Stores the provided instance into the provided array.
+ *
* @param {WallGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
WallGeometry.pack = function (value, array, startingIndex) {
@@ -188,8 +196,9 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {WallGeometry} [result] The object into which to store the result.
* @returns {WallGeometry} The modified result parameter or a new WallGeometry instance if one was not provided.
*/
@@ -264,15 +273,18 @@ WallGeometry.unpack = function (array, startingIndex, result) {
/**
* A description of a wall, which is similar to a KML line string. A wall is defined by a series of points,
* which extrude down to the ground. Optionally, they can extrude downwards to a specified height.
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of Cartesian objects, which are the points of the wall.
* @param {number} [options.maximumHeight] A constant that defines the maximum height of the
* wall at positions
. If undefined, the height of each position in used.
* @param {number} [options.minimumHeight] A constant that defines the minimum height of the
* wall at positions
. If undefined, the height at each position is 0.0.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid for coordinate manipulation
- * @param {VertexFormat} [options.vertexFormat] The vertex attributes to be computed.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid for coordinate manipulation
+ * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
* @returns {WallGeometry}
+ *
+ *
* @example
* // create a wall that spans from 10000 meters to 20000 meters
* const wall = Cesium.WallGeometry.fromConstantHeights({
@@ -287,6 +299,7 @@ WallGeometry.unpack = function (array, startingIndex, result) {
* maximumHeight : 10000.0
* });
* const geometry = Cesium.WallGeometry.createGeometry(wall);
+ *
* @see WallGeometry#createGeometry
*/
WallGeometry.fromConstantHeights = function (options) {
@@ -335,6 +348,7 @@ WallGeometry.fromConstantHeights = function (options) {
/**
* Computes the geometric representation of a wall, including its vertices, indices, and a bounding sphere.
+ *
* @param {WallGeometry} wallGeometry A description of the wall.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/WallGeometryLibrary.js b/packages/engine/Source/Core/WallGeometryLibrary.js
index cfb10ad94e34..679cf4114e4b 100644
--- a/packages/engine/Source/Core/WallGeometryLibrary.js
+++ b/packages/engine/Source/Core/WallGeometryLibrary.js
@@ -109,12 +109,6 @@ const generateArcOptionsScratch = {
};
/**
- * @param ellipsoid
- * @param wallPositions
- * @param maximumHeights
- * @param minimumHeights
- * @param granularity
- * @param duplicateCorners
* @private
*/
WallGeometryLibrary.computePositions = function (
diff --git a/packages/engine/Source/Core/WallOutlineGeometry.js b/packages/engine/Source/Core/WallOutlineGeometry.js
index 56fc3fd5ee62..e68299c14144 100644
--- a/packages/engine/Source/Core/WallOutlineGeometry.js
+++ b/packages/engine/Source/Core/WallOutlineGeometry.js
@@ -19,21 +19,26 @@ const scratchCartesian3Position2 = new Cartesian3();
/**
* A description of a wall outline. A wall is defined by a series of points,
* which extrude down to the ground. Optionally, they can extrude downwards to a specified height.
+ *
* @alias WallOutlineGeometry
- * @class
+ * @constructor
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of Cartesian objects, which are the points of the wall.
- * @param {number} [options.granularity] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
+ * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
* @param {number[]} [options.maximumHeights] An array parallel to positions
that give the maximum height of the
* wall at positions
. If undefined, the height of each position in used.
* @param {number[]} [options.minimumHeights] An array parallel to positions
that give the minimum height of the
* wall at positions
. If undefined, the height at each position is 0.0.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid for coordinate manipulation
- * @throws {DeveloperError} positions length must be greater than or equal to 2.
- * @throws {DeveloperError} positions and maximumHeights must have the same length.
- * @throws {DeveloperError} positions and minimumHeights must have the same length.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid for coordinate manipulation
+ *
+ * @exception {DeveloperError} positions length must be greater than or equal to 2.
+ * @exception {DeveloperError} positions and maximumHeights must have the same length.
+ * @exception {DeveloperError} positions and minimumHeights must have the same length.
+ *
* @see WallGeometry#createGeometry
* @see WallGeometry#fromConstantHeight
+ *
* @example
* // create a wall outline that spans from ground level to 10000 meters
* const wall = new Cesium.WallOutlineGeometry({
@@ -106,9 +111,11 @@ function WallOutlineGeometry(options) {
/**
* Stores the provided instance into the provided array.
+ *
* @param {WallOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- * @param {number} [startingIndex] The index into the array at which to start packing the elements.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ *
* @returns {number[]} The array that was packed into
*/
WallOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -172,8 +179,9 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
+ *
* @param {number[]} array The packed array.
- * @param {number} [startingIndex] The starting index of the element to be unpacked.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {WallOutlineGeometry} [result] The object into which to store the result.
* @returns {WallOutlineGeometry} The modified result parameter or a new WallOutlineGeometry instance if one was not provided.
*/
@@ -240,14 +248,17 @@ WallOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* A description of a walloutline. A wall is defined by a series of points,
* which extrude down to the ground. Optionally, they can extrude downwards to a specified height.
+ *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of Cartesian objects, which are the points of the wall.
* @param {number} [options.maximumHeight] A constant that defines the maximum height of the
* wall at positions
. If undefined, the height of each position in used.
* @param {number} [options.minimumHeight] A constant that defines the minimum height of the
* wall at positions
. If undefined, the height at each position is 0.0.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid for coordinate manipulation
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid for coordinate manipulation
* @returns {WallOutlineGeometry}
+ *
+ *
* @example
* // create a wall that spans from 10000 meters to 20000 meters
* const wall = Cesium.WallOutlineGeometry.fromConstantHeights({
@@ -262,6 +273,7 @@ WallOutlineGeometry.unpack = function (array, startingIndex, result) {
* maximumHeight : 10000.0
* });
* const geometry = Cesium.WallOutlineGeometry.createGeometry(wall);
+ *
* @see WallOutlineGeometry#createGeometry
*/
WallOutlineGeometry.fromConstantHeights = function (options) {
@@ -309,6 +321,7 @@ WallOutlineGeometry.fromConstantHeights = function (options) {
/**
* Computes the geometric representation of a wall outline, including its vertices, indices, and a bounding sphere.
+ *
* @param {WallOutlineGeometry} wallGeometry A description of the wall outline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/WebGLConstants.js b/packages/engine/Source/Core/WebGLConstants.js
index 3416c2ecc45d..8e99cd67b542 100644
--- a/packages/engine/Source/Core/WebGLConstants.js
+++ b/packages/engine/Source/Core/WebGLConstants.js
@@ -6,6 +6,7 @@
* These match the constants from the [WebGL 1.0]{@link https://www.khronos.org/registry/webgl/specs/latest/1.0/}
* and [WebGL 2.0]{@link https://www.khronos.org/registry/webgl/specs/latest/2.0/}
* specifications.
+ *
* @enum {number}
*/
const WebGLConstants = {
diff --git a/packages/engine/Source/Core/WebMercatorProjection.js b/packages/engine/Source/Core/WebMercatorProjection.js
index 3228c69d2bcc..79a7cb309ec2 100644
--- a/packages/engine/Source/Core/WebMercatorProjection.js
+++ b/packages/engine/Source/Core/WebMercatorProjection.js
@@ -10,9 +10,12 @@ import CesiumMath from "./Math.js";
* The map projection used by Google Maps, Bing Maps, and most of ArcGIS Online, EPSG:3857. This
* projection use longitude and latitude expressed with the WGS84 and transforms them to Mercator using
* the spherical (rather than ellipsoidal) equations.
+ *
* @alias WebMercatorProjection
- * @class
- * @param {Ellipsoid} [ellipsoid] The ellipsoid.
+ * @constructor
+ *
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid.
+ *
* @see GeographicProjection
*/
function WebMercatorProjection(ellipsoid) {
@@ -24,7 +27,9 @@ function WebMercatorProjection(ellipsoid) {
Object.defineProperties(WebMercatorProjection.prototype, {
/**
* Gets the {@link Ellipsoid}.
+ *
* @memberof WebMercatorProjection.prototype
+ *
* @type {Ellipsoid}
* @readonly
*/
@@ -38,6 +43,7 @@ Object.defineProperties(WebMercatorProjection.prototype, {
/**
* Converts a Mercator angle, in the range -PI to PI, to a geodetic latitude
* in the range -PI/2 to PI/2.
+ *
* @param {number} mercatorAngle The angle to convert.
* @returns {number} The geodetic latitude in radians.
*/
@@ -50,6 +56,7 @@ WebMercatorProjection.mercatorAngleToGeodeticLatitude = function (
/**
* Converts a geodetic latitude in radians, in the range -PI/2 to PI/2, to a Mercator
* angle in the range -PI to PI.
+ *
* @param {number} latitude The geodetic latitude in radians.
* @returns {number} The Mercator angle.
*/
@@ -74,7 +81,8 @@ WebMercatorProjection.geodeticLatitudeToMercatorAngle = function (latitude) {
* square. That is, the rectangle is equal in the X and Y directions.
*
* The constant value is computed by calling:
- * WebMercatorProjection.mercatorAngleToGeodeticLatitude(Math.PI)
+ * WebMercatorProjection.mercatorAngleToGeodeticLatitude(Math.PI)
+ *
* @type {number}
*/
WebMercatorProjection.MaximumLatitude = WebMercatorProjection.mercatorAngleToGeodeticLatitude(
@@ -85,6 +93,7 @@ WebMercatorProjection.MaximumLatitude = WebMercatorProjection.mercatorAngleToGeo
* Converts geodetic ellipsoid coordinates, in radians, to the equivalent Web Mercator
* X, Y, Z coordinates expressed in meters and returned in a {@link Cartesian3}. The height
* is copied unmodified to the Z coordinate.
+ *
* @param {Cartographic} cartographic The cartographic coordinates in radians.
* @param {Cartesian3} [result] The instance to which to copy the result, or undefined if a
* new instance should be created.
@@ -113,6 +122,7 @@ WebMercatorProjection.prototype.project = function (cartographic, result) {
* Converts Web Mercator X, Y coordinates, expressed in meters, to a {@link Cartographic}
* containing geodetic ellipsoid coordinates. The Z coordinate is copied unmodified to the
* height.
+ *
* @param {Cartesian3} cartesian The web mercator Cartesian position to unrproject with height (z) in meters.
* @param {Cartographic} [result] The instance to which to copy the result, or undefined if a
* new instance should be created.
diff --git a/packages/engine/Source/Core/WebMercatorTilingScheme.js b/packages/engine/Source/Core/WebMercatorTilingScheme.js
index f3af8fcc5077..2266870b131e 100644
--- a/packages/engine/Source/Core/WebMercatorTilingScheme.js
+++ b/packages/engine/Source/Core/WebMercatorTilingScheme.js
@@ -8,14 +8,16 @@ import WebMercatorProjection from "./WebMercatorProjection.js";
/**
* A tiling scheme for geometry referenced to a {@link WebMercatorProjection}, EPSG:3857. This is
* the tiling scheme used by Google Maps, Microsoft Bing Maps, and most of ESRI ArcGIS Online.
+ *
* @alias WebMercatorTilingScheme
- * @class
+ * @constructor
+ *
* @param {object} [options] Object with the following properties:
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid whose surface is being tiled. Defaults to
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid whose surface is being tiled. Defaults to
* the WGS84 ellipsoid.
- * @param {number} [options.numberOfLevelZeroTilesX] The number of tiles in the X direction at level zero of
+ * @param {number} [options.numberOfLevelZeroTilesX=1] The number of tiles in the X direction at level zero of
* the tile tree.
- * @param {number} [options.numberOfLevelZeroTilesY] The number of tiles in the Y direction at level zero of
+ * @param {number} [options.numberOfLevelZeroTilesY=1] The number of tiles in the Y direction at level zero of
* the tile tree.
* @param {Cartesian2} [options.rectangleSouthwestInMeters] The southwest corner of the rectangle covered by the
* tiling scheme, in meters. If this parameter or rectangleNortheastInMeters is not specified, the entire
@@ -110,6 +112,7 @@ Object.defineProperties(WebMercatorTilingScheme.prototype, {
/**
* Gets the total number of tiles in the X direction at a specified level-of-detail.
+ *
* @param {number} level The level-of-detail.
* @returns {number} The number of tiles in the X direction at the given level.
*/
@@ -119,6 +122,7 @@ WebMercatorTilingScheme.prototype.getNumberOfXTilesAtLevel = function (level) {
/**
* Gets the total number of tiles in the Y direction at a specified level-of-detail.
+ *
* @param {number} level The level-of-detail.
* @returns {number} The number of tiles in the Y direction at the given level.
*/
@@ -129,6 +133,7 @@ WebMercatorTilingScheme.prototype.getNumberOfYTilesAtLevel = function (level) {
/**
* Transforms a rectangle specified in geodetic radians to the native coordinate system
* of this tiling scheme.
+ *
* @param {Rectangle} rectangle The rectangle to transform.
* @param {Rectangle} [result] The instance to which to copy the result, or undefined if a new instance
* should be created.
@@ -157,6 +162,7 @@ WebMercatorTilingScheme.prototype.rectangleToNativeRectangle = function (
/**
* Converts tile x, y coordinates and level to a rectangle expressed in the native coordinates
* of the tiling scheme.
+ *
* @param {number} x The integer x coordinate of the tile.
* @param {number} y The integer y coordinate of the tile.
* @param {number} level The tile level-of-detail. Zero is the least detailed.
@@ -199,6 +205,7 @@ WebMercatorTilingScheme.prototype.tileXYToNativeRectangle = function (
/**
* Converts tile x, y coordinates and level to a cartographic rectangle in radians.
+ *
* @param {number} x The integer x coordinate of the tile.
* @param {number} y The integer y coordinate of the tile.
* @param {number} level The tile level-of-detail. Zero is the least detailed.
@@ -233,6 +240,7 @@ WebMercatorTilingScheme.prototype.tileXYToRectangle = function (
/**
* Calculates the tile x, y coordinates of the tile containing
* a given cartographic position.
+ *
* @param {Cartographic} position The position.
* @param {number} level The tile level-of-detail. Zero is the least detailed.
* @param {Cartesian2} [result] The instance to which to copy the result, or undefined if a new instance
diff --git a/packages/engine/Source/Core/WindingOrder.js b/packages/engine/Source/Core/WindingOrder.js
index c4ae3f9d0f31..e9696c5ebb53 100644
--- a/packages/engine/Source/Core/WindingOrder.js
+++ b/packages/engine/Source/Core/WindingOrder.js
@@ -2,11 +2,13 @@ import WebGLConstants from "./WebGLConstants.js";
/**
* Winding order defines the order of vertices for a triangle to be considered front-facing.
+ *
* @enum {number}
*/
const WindingOrder = {
/**
* Vertices are in clockwise order.
+ *
* @type {number}
* @constant
*/
@@ -14,6 +16,7 @@ const WindingOrder = {
/**
* Vertices are in counter-clockwise order.
+ *
* @type {number}
* @constant
*/
@@ -21,7 +24,6 @@ const WindingOrder = {
};
/**
- * @param windingOrder
* @private
*/
WindingOrder.validate = function (windingOrder) {
diff --git a/packages/engine/Source/Core/WireframeIndexGenerator.js b/packages/engine/Source/Core/WireframeIndexGenerator.js
index 7d05ea2d6897..6100dad6effd 100644
--- a/packages/engine/Source/Core/WireframeIndexGenerator.js
+++ b/packages/engine/Source/Core/WireframeIndexGenerator.js
@@ -5,6 +5,7 @@ import PrimitiveType from "./PrimitiveType.js";
/**
* Functions for generating indices for model wireframes. The indices are
* outputted as typed arrays, which can then be put into buffers for rendering.
+ *
* @namespace WireframeIndexGenerator
* @private
*/
@@ -161,10 +162,13 @@ function createWireframeFromTriangleFanIndices(vertexCount, originalIndices) {
/**
* Generates a wireframe index buffer for a primitive, either by reindexing the existing indices
* or creating them from scratch if the model had none.
+ *
* @param {PrimitiveType} primitiveType The primitive type.
* @param {number} vertexCount The number of vertices in the primitive.
* @param {Uint8Array|Uint16Array|Uint32Array} [originalIndices] A typed array containing the original indices of the primitive.
- * @returns {Uint16Array|Uint32Array} A typed array with the wireframe indices, or undefined if the primitive type does not use triangles.
+ *
+ * @return {Uint16Array|Uint32Array} A typed array with the wireframe indices, or undefined if the primitive type does not use triangles.
+ *
* @private
*/
WireframeIndexGenerator.createWireframeIndices = function (
@@ -196,9 +200,11 @@ WireframeIndexGenerator.createWireframeIndices = function (
/**
* Gets the number of indices in the wireframe index buffer of a primitive type.
+ *
* @param {PrimitiveType} primitiveType The primitive type.
* @param {number} originalCount The original number of vertices or indices in the primitive.
- * @returns {number} The number of indices in the primitive's wireframe.
+ * @return {number} The number of indices in the primitive's wireframe.
+ *
* @private
*/
WireframeIndexGenerator.getWireframeIndicesCount = function (
diff --git a/packages/engine/Source/Core/appendForwardSlash.js b/packages/engine/Source/Core/appendForwardSlash.js
index f69589dc528f..0bfeb2cf357a 100644
--- a/packages/engine/Source/Core/appendForwardSlash.js
+++ b/packages/engine/Source/Core/appendForwardSlash.js
@@ -1,5 +1,4 @@
/**
- * @param url
* @private
*/
function appendForwardSlash(url) {
diff --git a/packages/engine/Source/Core/arrayRemoveDuplicates.js b/packages/engine/Source/Core/arrayRemoveDuplicates.js
index be614a001c36..c001def63001 100644
--- a/packages/engine/Source/Core/arrayRemoveDuplicates.js
+++ b/packages/engine/Source/Core/arrayRemoveDuplicates.js
@@ -7,11 +7,13 @@ const removeDuplicatesEpsilon = CesiumMath.EPSILON10;
/**
* Removes adjacent duplicate values in an array of values.
+ *
* @param {any[]} [values] The array of values.
* @param {Function} equalsEpsilon Function to compare values with an epsilon. Boolean equalsEpsilon(left, right, epsilon).
- * @param {boolean} [wrapAround] Compare the last value in the array against the first value. If they are equal, the last value is removed.
- * @param {number[]} [removedIndices] Store the indices that correspond to the duplicate items removed from the array, if there were any.
+ * @param {boolean} [wrapAround=false] Compare the last value in the array against the first value. If they are equal, the last value is removed.
+ * @param {number[]} [removedIndices=undefined] Store the indices that correspond to the duplicate items removed from the array, if there were any.
* @returns {any[]|undefined} A new array of values with no adjacent duplicate values or the input array if no duplicates were found.
+ *
* @example
* // Returns [(1.0, 1.0, 1.0), (2.0, 2.0, 2.0), (3.0, 3.0, 3.0), (1.0, 1.0, 1.0)]
* const values = [
@@ -21,6 +23,7 @@ const removeDuplicatesEpsilon = CesiumMath.EPSILON10;
* new Cesium.Cartesian3(3.0, 3.0, 3.0),
* new Cesium.Cartesian3(1.0, 1.0, 1.0)];
* const nonDuplicatevalues = Cesium.PolylinePipeline.removeDuplicates(values, Cartesian3.equalsEpsilon);
+ *
* @example
* // Returns [(1.0, 1.0, 1.0), (2.0, 2.0, 2.0), (3.0, 3.0, 3.0)]
* const values = [
@@ -30,6 +33,7 @@ const removeDuplicatesEpsilon = CesiumMath.EPSILON10;
* new Cesium.Cartesian3(3.0, 3.0, 3.0),
* new Cesium.Cartesian3(1.0, 1.0, 1.0)];
* const nonDuplicatevalues = Cesium.PolylinePipeline.removeDuplicates(values, Cartesian3.equalsEpsilon, true);
+ *
* @example
* // Returns [(1.0, 1.0, 1.0), (2.0, 2.0, 2.0), (3.0, 3.0, 3.0)]
* // removedIndices will be equal to [1, 3, 5]
diff --git a/packages/engine/Source/Core/barycentricCoordinates.js b/packages/engine/Source/Core/barycentricCoordinates.js
index 8a424d0c5f2c..0e8f7930cb17 100644
--- a/packages/engine/Source/Core/barycentricCoordinates.js
+++ b/packages/engine/Source/Core/barycentricCoordinates.js
@@ -10,13 +10,16 @@ const scratchCartesian3 = new Cartesian3();
/**
* Computes the barycentric coordinates for a point with respect to a triangle.
+ *
* @function
+ *
* @param {Cartesian2|Cartesian3} point The point to test.
* @param {Cartesian2|Cartesian3} p0 The first point of the triangle, corresponding to the barycentric x-axis.
* @param {Cartesian2|Cartesian3} p1 The second point of the triangle, corresponding to the barycentric y-axis.
* @param {Cartesian2|Cartesian3} p2 The third point of the triangle, corresponding to the barycentric z-axis.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3|undefined} The modified result parameter or a new Cartesian3 instance if one was not provided. If the triangle is degenerate the function will return undefined.
+ *
* @example
* // Returns Cartesian3.UNIT_X
* const p = new Cesium.Cartesian3(-1.0, 0.0, 0.0);
diff --git a/packages/engine/Source/Core/binarySearch.js b/packages/engine/Source/Core/binarySearch.js
index 55ab469cb7c1..5cbb2890b96a 100644
--- a/packages/engine/Source/Core/binarySearch.js
+++ b/packages/engine/Source/Core/binarySearch.js
@@ -2,6 +2,7 @@ import Check from "./Check.js";
/**
* Finds an item in a sorted array.
+ *
* @function
* @param {Array} array The sorted array to search.
* @param {*} itemToFind The item to find in the array.
@@ -11,6 +12,7 @@ import Check from "./Check.js";
* does not exist, the return value is a negative number which is the bitwise complement (~)
* of the index before which the itemToFind should be inserted in order to maintain the
* sorted order of the array.
+ *
* @example
* // Create a comparator function to search through an array of numbers.
* function comparator(a, b) {
@@ -50,11 +52,13 @@ function binarySearch(array, itemToFind, comparator) {
/**
* A function used to compare two items while performing a binary search.
* @callback binarySearchComparator
+ *
* @param {*} a An item in the array.
* @param {*} b The item being searched for.
* @returns {number} Returns a negative value if a
is less than b
,
* a positive value if a
is greater than b
, or
* 0 if a
is equal to b
.
+ *
* @example
* function compareNumbers(a, b) {
* return a - b;
diff --git a/packages/engine/Source/Core/buildModuleUrl.js b/packages/engine/Source/Core/buildModuleUrl.js
index f19816477449..88a1982fbb7f 100644
--- a/packages/engine/Source/Core/buildModuleUrl.js
+++ b/packages/engine/Source/Core/buildModuleUrl.js
@@ -93,8 +93,10 @@ let implementation;
/**
* Given a relative URL under the Cesium base URL, returns an absolute URL.
* @function
+ *
* @param {string} relativeUrl The relative path.
* @returns {string} The absolutely URL representation of the provided path.
+ *
* @example
* const viewer = new Cesium.Viewer("cesiumContainer", {
* baseLayer: Cesium.ImageryLayer.fromProviderAsync(
@@ -142,6 +144,7 @@ buildModuleUrl.setBaseUrl = function (value) {
/**
* Gets the base URL for resolving modules.
+ *
* @function
* @returns {string} The configured base URL
*/
diff --git a/packages/engine/Source/Core/clone.js b/packages/engine/Source/Core/clone.js
index aab8184b09f6..f366c04b1826 100644
--- a/packages/engine/Source/Core/clone.js
+++ b/packages/engine/Source/Core/clone.js
@@ -2,9 +2,11 @@ import defaultValue from "./defaultValue.js";
/**
* Clones an object, returning a new object containing the same properties.
+ *
* @function
+ *
* @param {object} object The object to clone.
- * @param {boolean} [deep] If true, all properties will be deep cloned recursively.
+ * @param {boolean} [deep=false] If true, all properties will be deep cloned recursively.
* @returns {object} The cloned object.
*/
function clone(object, deep) {
diff --git a/packages/engine/Source/Core/combine.js b/packages/engine/Source/Core/combine.js
index 8a1224896877..98d5cf74c6d0 100644
--- a/packages/engine/Source/Core/combine.js
+++ b/packages/engine/Source/Core/combine.js
@@ -5,6 +5,7 @@ import defined from "./defined.js";
* Merges two objects, copying their properties onto a new combined object. When two objects have the same
* property, the value of the property on the first object is used. If either object is undefined,
* it will be treated as an empty object.
+ *
* @example
* const object1 = {
* propOne : 1,
@@ -23,10 +24,12 @@ import defined from "./defined.js";
* // value1 : 10
* // }
* // }
+ *
* @param {object} [object1] The first object to merge.
* @param {object} [object2] The second object to merge.
- * @param {boolean} [deep] Perform a recursive merge.
+ * @param {boolean} [deep=false] Perform a recursive merge.
* @returns {object} The combined object containing all properties from both objects.
+ *
* @function
*/
function combine(object1, object2, deep) {
diff --git a/packages/engine/Source/Core/createGuid.js b/packages/engine/Source/Core/createGuid.js
index c01d60f1c5a3..f11200d302a2 100644
--- a/packages/engine/Source/Core/createGuid.js
+++ b/packages/engine/Source/Core/createGuid.js
@@ -1,9 +1,14 @@
/**
* Creates a Globally unique identifier (GUID) string. A GUID is 128 bits long, and can guarantee uniqueness across space and time.
+ *
* @function
+ *
* @returns {string}
+ *
+ *
* @example
* this.guid = Cesium.createGuid();
+ *
* @see {@link http://www.ietf.org/rfc/rfc4122.txt|RFC 4122 A Universally Unique IDentifier (UUID) URN Namespace}
*/
function createGuid() {
diff --git a/packages/engine/Source/Core/createWorldBathymetryAsync.js b/packages/engine/Source/Core/createWorldBathymetryAsync.js
index 5e17eb3d6332..b01fa3626571 100644
--- a/packages/engine/Source/Core/createWorldBathymetryAsync.js
+++ b/packages/engine/Source/Core/createWorldBathymetryAsync.js
@@ -3,11 +3,15 @@ import defaultValue from "./defaultValue.js";
/**
* Creates a {@link CesiumTerrainProvider} instance for the {@link https://cesium.com/content/#cesium-world-bathymetry|Cesium World Bathymetry}.
+ *
* @function
- * @param {object} [options] Object with the following properties:
- * @param {boolean} [options.requestVertexNormals] Flag that indicates if the client should request additional lighting information from the server if available.
+ *
+ * @param {Object} [options] Object with the following properties:
+ * @param {Boolean} [options.requestVertexNormals=false] Flag that indicates if the client should request additional lighting information from the server if available.
* @returns {Promise} A promise that resolves to the created CesiumTerrainProvider
+ *
* @see Ion
+ *
* @example
* // Create Cesium World Bathymetry with default settings
* try {
@@ -17,6 +21,7 @@ import defaultValue from "./defaultValue.js";
* } catch (error) {
* console.log(error);
* }
+ *
* @example
* // Create Cesium World Bathymetry with normals.
* try {
@@ -28,6 +33,7 @@ import defaultValue from "./defaultValue.js";
* } catch (error) {
* console.log(error);
* }
+ *
*/
function createWorldBathymetryAsync(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
diff --git a/packages/engine/Source/Core/createWorldTerrainAsync.js b/packages/engine/Source/Core/createWorldTerrainAsync.js
index a8a3b846244b..ec931a8ed4e6 100644
--- a/packages/engine/Source/Core/createWorldTerrainAsync.js
+++ b/packages/engine/Source/Core/createWorldTerrainAsync.js
@@ -3,12 +3,16 @@ import defaultValue from "./defaultValue.js";
/**
* Creates a {@link CesiumTerrainProvider} instance for the {@link https://cesium.com/content/#cesium-world-terrain|Cesium World Terrain}.
+ *
* @function
- * @param {object} [options] Object with the following properties:
- * @param {boolean} [options.requestVertexNormals] Flag that indicates if the client should request additional lighting information from the server if available.
- * @param {boolean} [options.requestWaterMask] Flag that indicates if the client should request per tile water masks from the server if available.
+ *
+ * @param {Object} [options] Object with the following properties:
+ * @param {Boolean} [options.requestVertexNormals=false] Flag that indicates if the client should request additional lighting information from the server if available.
+ * @param {Boolean} [options.requestWaterMask=false] Flag that indicates if the client should request per tile water masks from the server if available.
* @returns {Promise} A promise that resolves to the created CesiumTerrainProvider
+ *
* @see Ion
+ *
* @example
* // Create Cesium World Terrain with default settings
* try {
@@ -18,6 +22,7 @@ import defaultValue from "./defaultValue.js";
* } catch (error) {
* console.log(error);
* }
+ *
* @example
* // Create Cesium World Terrain with water and normals.
* try {
@@ -30,6 +35,7 @@ import defaultValue from "./defaultValue.js";
* } catch (error) {
* console.log(error);
* }
+ *
*/
function createWorldTerrainAsync(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
diff --git a/packages/engine/Source/Core/decodeGoogleEarthEnterpriseData.js b/packages/engine/Source/Core/decodeGoogleEarthEnterpriseData.js
index c138d0c79e05..46d76894f5b9 100644
--- a/packages/engine/Source/Core/decodeGoogleEarthEnterpriseData.js
+++ b/packages/engine/Source/Core/decodeGoogleEarthEnterpriseData.js
@@ -6,8 +6,10 @@ const compressedMagicSwap = 0xadde6874;
/**
* Decodes data that is received from the Google Earth Enterprise server.
+ *
* @param {ArrayBuffer} key The key used during decoding.
* @param {ArrayBuffer} data The data to be decoded.
+ *
* @private
*/
function decodeGoogleEarthEnterpriseData(key, data) {
diff --git a/packages/engine/Source/Core/defaultValue.js b/packages/engine/Source/Core/defaultValue.js
index 47dcf05cf643..50c20d554986 100644
--- a/packages/engine/Source/Core/defaultValue.js
+++ b/packages/engine/Source/Core/defaultValue.js
@@ -1,10 +1,13 @@
/**
* Returns the first parameter if not undefined, otherwise the second parameter.
* Useful for setting a default value for a parameter.
+ *
* @function
+ *
* @param {*} a
* @param {*} b
* @returns {*} Returns the first parameter if not undefined, otherwise the second parameter.
+ *
* @example
* param = Cesium.defaultValue(param, 'default');
*/
diff --git a/packages/engine/Source/Core/defer.js b/packages/engine/Source/Core/defer.js
index f23180b2b3e1..2e6c510fc22c 100644
--- a/packages/engine/Source/Core/defer.js
+++ b/packages/engine/Source/Core/defer.js
@@ -1,17 +1,20 @@
/**
* A function used to resolve a promise upon completion .
* @callback defer.resolve
+ *
* @param {*} value The resulting value.
*/
/**
* A function used to reject a promise upon failure.
* @callback defer.reject
+ *
* @param {*} error The error.
*/
/**
* An object which contains a promise object, and functions to resolve or reject the promise.
+ *
* @typedef {object} defer.deferred
* @property {defer.resolve} resolve Resolves the promise when called.
* @property {defer.reject} reject Rejects the promise when called.
diff --git a/packages/engine/Source/Core/defined.js b/packages/engine/Source/Core/defined.js
index 06cd99b7a0af..5040c613e7c3 100644
--- a/packages/engine/Source/Core/defined.js
+++ b/packages/engine/Source/Core/defined.js
@@ -1,7 +1,9 @@
/**
* @function
+ *
* @param {*} value The object.
* @returns {boolean} Returns true if the object is defined, returns false otherwise.
+ *
* @example
* if (Cesium.defined(positions)) {
* doSomething();
diff --git a/packages/engine/Source/Core/deprecationWarning.js b/packages/engine/Source/Core/deprecationWarning.js
index e6e7d335cb37..0b9c727b8290 100644
--- a/packages/engine/Source/Core/deprecationWarning.js
+++ b/packages/engine/Source/Core/deprecationWarning.js
@@ -6,9 +6,12 @@ import oneTimeWarning from "./oneTimeWarning.js";
* Logs a deprecation message to the console. Use this function instead of
* console.log
directly since this does not log duplicate messages
* unless it is called from multiple workers.
+ *
* @function deprecationWarning
+ *
* @param {string} identifier The unique identifier for this deprecated API.
* @param {string} message The message to log to the console.
+ *
* @example
* // Deprecated function or class
* function Foo() {
@@ -35,6 +38,7 @@ import oneTimeWarning from "./oneTimeWarning.js";
* }
* }
* });
+ *
* @private
*/
function deprecationWarning(identifier, message) {
diff --git a/packages/engine/Source/Core/destroyObject.js b/packages/engine/Source/Core/destroyObject.js
index 550d54f0d66f..40093a8ba362 100644
--- a/packages/engine/Source/Core/destroyObject.js
+++ b/packages/engine/Source/Core/destroyObject.js
@@ -15,16 +15,21 @@ function returnTrue() {
* need to be explicitly released. Client code calls an object's destroy
function,
* which then releases the native resource and calls destroyObject
to put itself
* in a destroyed state.
+ *
* @function
+ *
* @param {object} object The object to destroy.
* @param {string} [message] The message to include in the exception that is thrown if
* a destroyed object's function is called.
+ *
+ *
* @example
* // How a texture would destroy itself.
* this.destroy = function () {
* _gl.deleteTexture(_texture);
* return Cesium.destroyObject(this);
* };
+ *
* @see DeveloperError
*/
function destroyObject(object, message) {
diff --git a/packages/engine/Source/Core/formatError.js b/packages/engine/Source/Core/formatError.js
index 2eb5cfc07eda..3ef17614f97a 100644
--- a/packages/engine/Source/Core/formatError.js
+++ b/packages/engine/Source/Core/formatError.js
@@ -3,7 +3,9 @@ import defined from "./defined.js";
/**
* Formats an error object into a String. If available, uses name, message, and stack
* properties, otherwise, falls back on toString().
+ *
* @function
+ *
* @param {*} object The item to find in the array.
* @returns {string} A string containing the formatted error.
*/
diff --git a/packages/engine/Source/Core/getAbsoluteUri.js b/packages/engine/Source/Core/getAbsoluteUri.js
index b9c3fbce69a6..63f5e7cb9d92 100644
--- a/packages/engine/Source/Core/getAbsoluteUri.js
+++ b/packages/engine/Source/Core/getAbsoluteUri.js
@@ -6,9 +6,11 @@ import DeveloperError from "./DeveloperError.js";
/**
* Given a relative Uri and a base Uri, returns the absolute Uri of the relative Uri.
* @function
+ *
* @param {string} relative The relative Uri.
* @param {string} [base] The base Uri.
* @returns {string} The absolute Uri of the given relative Uri.
+ *
* @example
* //absolute Uri will be "https://test.com/awesome.png";
* const absoluteUri = Cesium.getAbsoluteUri('awesome.png', 'https://test.com');
diff --git a/packages/engine/Source/Core/getBaseUri.js b/packages/engine/Source/Core/getBaseUri.js
index 79753b47b935..78c600cafbcb 100644
--- a/packages/engine/Source/Core/getBaseUri.js
+++ b/packages/engine/Source/Core/getBaseUri.js
@@ -5,9 +5,11 @@ import DeveloperError from "./DeveloperError.js";
/**
* Given a URI, returns the base path of the URI.
* @function
+ *
* @param {string} uri The Uri.
- * @param {boolean} [includeQuery] Whether or not to include the query string and fragment form the uri
+ * @param {boolean} [includeQuery = false] Whether or not to include the query string and fragment form the uri
* @returns {string} The base path of the Uri.
+ *
* @example
* // basePath will be "/Gallery/";
* const basePath = Cesium.getBaseUri('/Gallery/simple.czml?value=true&example=false');
diff --git a/packages/engine/Source/Core/getExtensionFromUri.js b/packages/engine/Source/Core/getExtensionFromUri.js
index 0994dd8e0024..f51ea912d353 100644
--- a/packages/engine/Source/Core/getExtensionFromUri.js
+++ b/packages/engine/Source/Core/getExtensionFromUri.js
@@ -5,8 +5,10 @@ import DeveloperError from "./DeveloperError.js";
/**
* Given a URI, returns the extension of the URI.
* @function getExtensionFromUri
+ *
* @param {string} uri The Uri.
* @returns {string} The extension of the Uri.
+ *
* @example
* //extension will be "czml";
* const extension = Cesium.getExtensionFromUri('/Gallery/simple.czml?value=true&example=false');
diff --git a/packages/engine/Source/Core/getFilenameFromUri.js b/packages/engine/Source/Core/getFilenameFromUri.js
index a721010e6068..ee250c0173ec 100644
--- a/packages/engine/Source/Core/getFilenameFromUri.js
+++ b/packages/engine/Source/Core/getFilenameFromUri.js
@@ -5,8 +5,10 @@ import DeveloperError from "./DeveloperError.js";
/**
* Given a URI, returns the last segment of the URI, removing any path or query information.
* @function getFilenameFromUri
+ *
* @param {string} uri The Uri.
* @returns {string} The last segment of the Uri.
+ *
* @example
* //fileName will be"simple.czml";
* const fileName = Cesium.getFilenameFromUri('/Gallery/simple.czml?value=true&example=false');
diff --git a/packages/engine/Source/Core/getImageFromTypedArray.js b/packages/engine/Source/Core/getImageFromTypedArray.js
index 12b1a75aa837..43d32b93d780 100644
--- a/packages/engine/Source/Core/getImageFromTypedArray.js
+++ b/packages/engine/Source/Core/getImageFromTypedArray.js
@@ -1,9 +1,11 @@
/**
* Constructs an image from a TypedArray of pixel values
+ *
* @param {Uint8Array} typedArray The array of pixel values
* @param {number} width The width of the image to create
* @param {number} height The height of the image to create
* @returns {HTMLCanvasElement} A new canvas containing the constructed image
+ *
* @private
*/
function getImageFromTypedArray(typedArray, width, height) {
diff --git a/packages/engine/Source/Core/getImagePixels.js b/packages/engine/Source/Core/getImagePixels.js
index a31cfcfc46cf..055ab47c85bd 100644
--- a/packages/engine/Source/Core/getImagePixels.js
+++ b/packages/engine/Source/Core/getImagePixels.js
@@ -5,7 +5,9 @@ const context2DsByWidthAndHeight = {};
/**
* Extract a pixel array from a loaded image. Draws the image
* into a canvas so it can read the pixels back.
+ *
* @function getImagePixels
+ *
* @param {HTMLImageElement|ImageBitmap} image The image to extract pixels from.
* @param {number} width The width of the image. If not defined, then image.width is assigned.
* @param {number} height The height of the image. If not defined, then image.height is assigned.
diff --git a/packages/engine/Source/Core/getJsonFromTypedArray.js b/packages/engine/Source/Core/getJsonFromTypedArray.js
index 863d001ff10b..ff5e2f4c51f9 100644
--- a/packages/engine/Source/Core/getJsonFromTypedArray.js
+++ b/packages/engine/Source/Core/getJsonFromTypedArray.js
@@ -2,11 +2,14 @@ import getStringFromTypedArray from "./getStringFromTypedArray.js";
/**
* Parses JSON from a Uint8Array.
+ *
* @function
+ *
* @param {Uint8Array} uint8Array The Uint8Array to read from.
- * @param {number} [byteOffset] The byte offset to start reading from.
+ * @param {number} [byteOffset=0] The byte offset to start reading from.
* @param {number} [byteLength] The byte length to read. If byteLength is omitted the remainder of the buffer is read.
* @returns {object} An object containing the parsed JSON.
+ *
* @private
*/
function getJsonFromTypedArray(uint8Array, byteOffset, byteLength) {
diff --git a/packages/engine/Source/Core/getMagic.js b/packages/engine/Source/Core/getMagic.js
index 77e706812f30..ffad591f4477 100644
--- a/packages/engine/Source/Core/getMagic.js
+++ b/packages/engine/Source/Core/getMagic.js
@@ -2,8 +2,6 @@ import defaultValue from "./defaultValue.js";
import getStringFromTypedArray from "./getStringFromTypedArray.js";
/**
- * @param uint8Array
- * @param byteOffset
* @private
*/
function getMagic(uint8Array, byteOffset) {
diff --git a/packages/engine/Source/Core/getStringFromTypedArray.js b/packages/engine/Source/Core/getStringFromTypedArray.js
index 9e5cd8df8c60..2b3c04fe394b 100644
--- a/packages/engine/Source/Core/getStringFromTypedArray.js
+++ b/packages/engine/Source/Core/getStringFromTypedArray.js
@@ -5,11 +5,14 @@ import RuntimeError from "./RuntimeError.js";
/**
* Reads a string from a Uint8Array.
+ *
* @function
+ *
* @param {Uint8Array} uint8Array The Uint8Array to read from.
- * @param {number} [byteOffset] The byte offset to start reading from.
+ * @param {number} [byteOffset=0] The byte offset to start reading from.
* @param {number} [byteLength] The byte length to read. If byteLength is omitted the remainder of the buffer is read.
* @returns {string} The string.
+ *
* @private
*/
function getStringFromTypedArray(uint8Array, byteOffset, byteLength) {
diff --git a/packages/engine/Source/Core/getTimestamp.js b/packages/engine/Source/Core/getTimestamp.js
index 1dde356e120f..6c1ce26a1874 100644
--- a/packages/engine/Source/Core/getTimestamp.js
+++ b/packages/engine/Source/Core/getTimestamp.js
@@ -3,7 +3,9 @@
* are expressed in milliseconds, but it is not specified what the milliseconds are
* measured from. This function uses performance.now() if it is available, or Date.now()
* otherwise.
+ *
* @function getTimestamp
+ *
* @returns {number} The timestamp in milliseconds since some unspecified reference time.
*/
let getTimestamp;
diff --git a/packages/engine/Source/Core/isBitSet.js b/packages/engine/Source/Core/isBitSet.js
index 72bb942a3072..ebeedbd473ed 100644
--- a/packages/engine/Source/Core/isBitSet.js
+++ b/packages/engine/Source/Core/isBitSet.js
@@ -1,6 +1,4 @@
/**
- * @param bits
- * @param mask
* @private
*/
function isBitSet(bits, mask) {
diff --git a/packages/engine/Source/Core/isBlobUri.js b/packages/engine/Source/Core/isBlobUri.js
index cc7447d763bd..9e3f6c384599 100644
--- a/packages/engine/Source/Core/isBlobUri.js
+++ b/packages/engine/Source/Core/isBlobUri.js
@@ -4,9 +4,12 @@ const blobUriRegex = /^blob:/i;
/**
* Determines if the specified uri is a blob uri.
+ *
* @function isBlobUri
+ *
* @param {string} uri The uri to test.
* @returns {boolean} true when the uri is a blob uri; otherwise, false.
+ *
* @private
*/
function isBlobUri(uri) {
diff --git a/packages/engine/Source/Core/isCrossOriginUrl.js b/packages/engine/Source/Core/isCrossOriginUrl.js
index bc8cfaa0f8a7..45570389c956 100644
--- a/packages/engine/Source/Core/isCrossOriginUrl.js
+++ b/packages/engine/Source/Core/isCrossOriginUrl.js
@@ -4,7 +4,7 @@ let a;
/**
* Given a URL, determine whether that URL is considered cross-origin to the current page.
- * @param url
+ *
* @private
*/
function isCrossOriginUrl(url) {
diff --git a/packages/engine/Source/Core/isDataUri.js b/packages/engine/Source/Core/isDataUri.js
index aea5d78d888a..bb5ef14bef0f 100644
--- a/packages/engine/Source/Core/isDataUri.js
+++ b/packages/engine/Source/Core/isDataUri.js
@@ -4,9 +4,12 @@ const dataUriRegex = /^data:/i;
/**
* Determines if the specified uri is a data uri.
+ *
* @function isDataUri
+ *
* @param {string} uri The uri to test.
* @returns {boolean} true when the uri is a data uri; otherwise, false.
+ *
* @private
*/
function isDataUri(uri) {
diff --git a/packages/engine/Source/Core/isLeapYear.js b/packages/engine/Source/Core/isLeapYear.js
index 742a5211ece6..404b3725b9e8 100644
--- a/packages/engine/Source/Core/isLeapYear.js
+++ b/packages/engine/Source/Core/isLeapYear.js
@@ -2,9 +2,12 @@ import DeveloperError from "./DeveloperError.js";
/**
* Determines if a given date is a leap year.
+ *
* @function isLeapYear
+ *
* @param {number} year The year to be tested.
* @returns {boolean} True if year
is a leap year.
+ *
* @example
* const leapYear = Cesium.isLeapYear(2000); // true
*/
diff --git a/packages/engine/Source/Core/loadAndExecuteScript.js b/packages/engine/Source/Core/loadAndExecuteScript.js
index 41af6b9724c5..fbf52cf7370f 100644
--- a/packages/engine/Source/Core/loadAndExecuteScript.js
+++ b/packages/engine/Source/Core/loadAndExecuteScript.js
@@ -1,5 +1,4 @@
/**
- * @param url
* @private
*/
function loadAndExecuteScript(url) {
diff --git a/packages/engine/Source/Core/loadImageFromTypedArray.js b/packages/engine/Source/Core/loadImageFromTypedArray.js
index db3a91ca7f9f..3c0bd64cc9d4 100644
--- a/packages/engine/Source/Core/loadImageFromTypedArray.js
+++ b/packages/engine/Source/Core/loadImageFromTypedArray.js
@@ -4,7 +4,6 @@ import defined from "./defined.js";
import Resource from "./Resource.js";
/**
- * @param options
* @private
*/
function loadImageFromTypedArray(options) {
diff --git a/packages/engine/Source/Core/loadKTX2.js b/packages/engine/Source/Core/loadKTX2.js
index fb88474b7ae5..8359640fc854 100644
--- a/packages/engine/Source/Core/loadKTX2.js
+++ b/packages/engine/Source/Core/loadKTX2.js
@@ -4,6 +4,7 @@ import KTX2Transcoder from "./KTX2Transcoder.js";
/**
* Stores the supported formats that KTX2 can transcode to. Called during context creation.
+ *
* @param {boolean} s3tc Whether or not S3TC is supported
* @param {boolean} pvrtc Whether or not PVRTC is supported
* @param {boolean} astc Whether or not ASTC is supported
@@ -41,22 +42,26 @@ loadKTX2.setKTX2SupportedFormats = function (
*
* The following are part of the KTX2 format specification but are not supported:
*
- *