@openglobus/og 0.24.2 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{js/Globe.d.ts → Globe.d.ts} +16 -18
- package/lib/{js/Object3d.d.ts → Object3d.d.ts} +1 -1
- package/lib/{@openglobus/js/camera → camera}/Camera.d.ts +16 -22
- package/lib/{@openglobus/js/camera → camera}/Frustum.d.ts +1 -1
- package/lib/control/CameraFrameComposer.d.ts +35 -0
- package/lib/control/KeyboardNavigation.d.ts +32 -0
- package/lib/control/MouseWheelZoomControl.d.ts +1 -0
- package/lib/{js/control → control/atmosphere}/Atmosphere.d.ts +9 -6
- package/lib/{@openglobus/js/control → control/atmosphere}/AtmosphereConfig.d.ts +6 -6
- package/lib/{js/control → control}/index.d.ts +3 -1
- package/lib/control/object3dManager/Object3dCollection.d.ts +21 -0
- package/lib/control/object3dManager/Object3dCollectionView.d.ts +15 -0
- package/lib/control/object3dManager/Object3dItemView.d.ts +10 -0
- package/lib/control/object3dManager/Object3dManager.d.ts +28 -0
- package/lib/control/object3dManager/Object3dManagerDialog.d.ts +23 -0
- package/lib/{js/control → control}/visibleExtent/Segment.d.ts +3 -3
- package/lib/entity/LabelWorker.worker.d.ts +1 -0
- package/lib/{@openglobus/js/index.d.ts → index.d.ts} +1 -0
- package/lib/og.css +1 -0
- package/lib/og.es.js +1 -0
- package/lib/{@openglobus/js/renderer → renderer}/Renderer.d.ts +28 -28
- package/lib/{@openglobus/js/scene → scene}/Planet.d.ts +3 -3
- package/lib/{@openglobus/js/segment → segment}/Segment.d.ts +1 -1
- package/lib/{js/segment → segment}/segmentHelper.d.ts +1 -1
- package/lib/{@openglobus/js/shaders → shaders/atmos}/atmos.d.ts +7 -5
- package/lib/{@openglobus/js/shaders → shaders/billboard}/billboard.d.ts +1 -1
- package/lib/shaders/drawnode/drawnode.d.ts +8 -0
- package/lib/{@openglobus/js/shaders/geoObject.d.ts → shaders/geo_object/geo_object.d.ts} +1 -1
- package/lib/{@openglobus/js/shaders → shaders/label}/label.d.ts +1 -1
- package/lib/{@openglobus/js/shaders → shaders/polyline}/polyline.d.ts +1 -1
- package/lib/shaders/ray/ray.d.ts +2 -0
- package/lib/{@openglobus/js/shaders → shaders/tone_mapping}/toneMapping.d.ts +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/{@openglobus/js/ui → ui}/Dialog.d.ts +1 -1
- package/lib/{@openglobus/js/ui → ui}/View.d.ts +1 -0
- package/lib/{@openglobus/js/utils → utils}/BaseWorker.d.ts +2 -2
- package/lib/utils/PlainSegmentWorker.worker.d.ts +1 -0
- package/lib/utils/TerrainWorker.worker.d.ts +1 -0
- package/lib/{@openglobus/js/utils → utils}/objParser.d.ts +1 -1
- package/lib/{js/utils → utils}/shared.d.ts +16 -0
- package/lib/{js/webgl → webgl}/Framebuffer.d.ts +21 -5
- package/lib/{@openglobus/js/webgl → webgl}/Handler.d.ts +0 -1
- package/package.json +75 -68
- package/css/og.css +0 -1342
- package/lib/@openglobus/js/Globe.d.ts +0 -145
- package/lib/@openglobus/js/Object3d.d.ts +0 -81
- package/lib/@openglobus/js/control/Atmosphere.d.ts +0 -40
- package/lib/@openglobus/js/control/KeyboardNavigation.d.ts +0 -28
- package/lib/@openglobus/js/control/index.d.ts +0 -30
- package/lib/@openglobus/js/segment/segmentHelper.d.ts +0 -18
- package/lib/@openglobus/js/shaders/bloom.d.ts +0 -2
- package/lib/@openglobus/js/shaders/blur.d.ts +0 -3
- package/lib/@openglobus/js/shaders/drawnode.d.ts +0 -10
- package/lib/@openglobus/js/shaders/lumFilter.d.ts +0 -2
- package/lib/@openglobus/js/shaders/ray.d.ts +0 -2
- package/lib/@openglobus/js/shaders/utils.d.ts +0 -1
- package/lib/@openglobus/js/utils/shared.d.ts +0 -287
- package/lib/@openglobus/js/webgl/Framebuffer.d.ts +0 -97
- package/lib/@openglobus/og.css +0 -1
- package/lib/@openglobus/og.esm.js +0 -2
- package/lib/@openglobus/og.esm.js.map +0 -1
- package/lib/@openglobus/og.umd.js +0 -2
- package/lib/@openglobus/og.umd.js.map +0 -1
- package/lib/@openglobus/res/fonts/Ephesis-Regular.json +0 -4648
- package/lib/@openglobus/res/fonts/Ephesis-Regular.ttf.cfg +0 -1282
- package/lib/@openglobus/res/fonts/Ephesis-Regular.ttf.png +0 -0
- package/lib/@openglobus/res/fonts/Karla-Bold.json +0 -5252
- package/lib/@openglobus/res/fonts/Karla-Bold.ttf.cfg +0 -920
- package/lib/@openglobus/res/fonts/Karla-Bold.ttf.png +0 -0
- package/lib/@openglobus/res/fonts/Karla-Light.json +0 -5252
- package/lib/@openglobus/res/fonts/Karla-Light.ttf.cfg +0 -830
- package/lib/@openglobus/res/fonts/Karla-Light.ttf.png +0 -0
- package/lib/@openglobus/res/fonts/Karla-Medium.json +0 -5252
- package/lib/@openglobus/res/fonts/Karla-Medium.ttf.cfg +0 -1196
- package/lib/@openglobus/res/fonts/Karla-Medium.ttf.png +0 -0
- package/lib/@openglobus/res/fonts/NotoSansArabic-Regular.json +0 -3332
- package/lib/@openglobus/res/fonts/NotoSansArabic-Regular.ttf.cfg +0 -1370
- package/lib/@openglobus/res/fonts/NotoSansArabic-Regular.ttf.png +0 -0
- package/lib/@openglobus/res/fonts/arial.js +0 -4325
- package/lib/js/Clock.d.ts +0 -106
- package/lib/js/Clock.js +0 -141
- package/lib/js/Deferred.d.ts +0 -6
- package/lib/js/Deferred.js +0 -13
- package/lib/js/Events.d.ts +0 -90
- package/lib/js/Events.js +0 -145
- package/lib/js/Extent.d.ts +0 -145
- package/lib/js/Extent.js +0 -278
- package/lib/js/Globe.js +0 -289
- package/lib/js/ImageCanvas.d.ts +0 -128
- package/lib/js/ImageCanvas.js +0 -203
- package/lib/js/Lock.d.ts +0 -15
- package/lib/js/Lock.js +0 -27
- package/lib/js/LonLat.d.ts +0 -128
- package/lib/js/LonLat.js +0 -192
- package/lib/js/Object3d.js +0 -508
- package/lib/js/Popup.d.ts +0 -49
- package/lib/js/Popup.js +0 -160
- package/lib/js/QueueArray.d.ts +0 -16
- package/lib/js/QueueArray.js +0 -63
- package/lib/js/Rectangle.d.ts +0 -76
- package/lib/js/Rectangle.js +0 -77
- package/lib/js/Stack.d.ts +0 -20
- package/lib/js/Stack.js +0 -42
- package/lib/js/astro/astro.d.ts +0 -39
- package/lib/js/astro/astro.js +0 -43
- package/lib/js/astro/earth.d.ts +0 -8
- package/lib/js/astro/earth.js +0 -75
- package/lib/js/astro/jd.d.ts +0 -234
- package/lib/js/astro/jd.js +0 -416
- package/lib/js/astro/orbit.d.ts +0 -5
- package/lib/js/astro/orbit.js +0 -104
- package/lib/js/astro/rotation.d.ts +0 -2
- package/lib/js/astro/rotation.js +0 -25
- package/lib/js/bv/Box.d.ts +0 -32
- package/lib/js/bv/Box.js +0 -53
- package/lib/js/bv/Sphere.d.ts +0 -37
- package/lib/js/bv/Sphere.js +0 -31
- package/lib/js/bv/index.d.ts +0 -3
- package/lib/js/bv/index.js +0 -3
- package/lib/js/camera/Camera.d.ts +0 -361
- package/lib/js/camera/Camera.js +0 -541
- package/lib/js/camera/Frustum.d.ts +0 -142
- package/lib/js/camera/Frustum.js +0 -246
- package/lib/js/camera/PlanetCamera.d.ts +0 -247
- package/lib/js/camera/PlanetCamera.js +0 -513
- package/lib/js/camera/index.d.ts +0 -3
- package/lib/js/camera/index.js +0 -3
- package/lib/js/cons.d.ts +0 -40
- package/lib/js/cons.js +0 -92
- package/lib/js/control/Atmosphere.js +0 -401
- package/lib/js/control/AtmosphereConfig.d.ts +0 -59
- package/lib/js/control/AtmosphereConfig.js +0 -348
- package/lib/js/control/CameraLock.d.ts +0 -38
- package/lib/js/control/CameraLock.js +0 -216
- package/lib/js/control/CompassButton.d.ts +0 -16
- package/lib/js/control/CompassButton.js +0 -118
- package/lib/js/control/Control.d.ts +0 -100
- package/lib/js/control/Control.js +0 -137
- package/lib/js/control/DebugInfo.d.ts +0 -25
- package/lib/js/control/DebugInfo.js +0 -318
- package/lib/js/control/DrawingSwitcher.d.ts +0 -13
- package/lib/js/control/DrawingSwitcher.js +0 -94
- package/lib/js/control/EarthCoordinates.d.ts +0 -41
- package/lib/js/control/EarthCoordinates.js +0 -161
- package/lib/js/control/GeoImageDragControl.d.ts +0 -22
- package/lib/js/control/GeoImageDragControl.js +0 -102
- package/lib/js/control/KeyboardNavigation.d.ts +0 -28
- package/lib/js/control/KeyboardNavigation.js +0 -143
- package/lib/js/control/LayerAnimation.d.ts +0 -71
- package/lib/js/control/LayerAnimation.js +0 -283
- package/lib/js/control/LayerSwitcher.d.ts +0 -38
- package/lib/js/control/LayerSwitcher.js +0 -151
- package/lib/js/control/Lighting.d.ts +0 -54
- package/lib/js/control/Lighting.js +0 -459
- package/lib/js/control/MouseNavigation.d.ts +0 -76
- package/lib/js/control/MouseNavigation.js +0 -414
- package/lib/js/control/MouseWheelZoomControl.d.ts +0 -0
- package/lib/js/control/MouseWheelZoomControl.js +0 -270
- package/lib/js/control/OldMouseNavigation.d.ts +0 -65
- package/lib/js/control/OldMouseNavigation.js +0 -368
- package/lib/js/control/RulerSwitcher.d.ts +0 -18
- package/lib/js/control/RulerSwitcher.js +0 -57
- package/lib/js/control/ScaleControl.d.ts +0 -25
- package/lib/js/control/ScaleControl.js +0 -97
- package/lib/js/control/SegmentBoundVisualization.d.ts +0 -13
- package/lib/js/control/SegmentBoundVisualization.js +0 -37
- package/lib/js/control/ShowFps.d.ts +0 -10
- package/lib/js/control/ShowFps.js +0 -20
- package/lib/js/control/SimpleNavigation.d.ts +0 -43
- package/lib/js/control/SimpleNavigation.js +0 -196
- package/lib/js/control/SimpleSkyBackground.d.ts +0 -18
- package/lib/js/control/SimpleSkyBackground.js +0 -187
- package/lib/js/control/Sun.d.ts +0 -34
- package/lib/js/control/Sun.js +0 -117
- package/lib/js/control/ToggleWireframe.d.ts +0 -15
- package/lib/js/control/ToggleWireframe.js +0 -28
- package/lib/js/control/TouchNavigation.d.ts +0 -53
- package/lib/js/control/TouchNavigation.js +0 -266
- package/lib/js/control/ZoomControl.d.ts +0 -28
- package/lib/js/control/ZoomControl.js +0 -86
- package/lib/js/control/drawing/DrawingControl.d.ts +0 -12
- package/lib/js/control/drawing/DrawingControl.js +0 -35
- package/lib/js/control/drawing/LineStringDrawingScene.d.ts +0 -15
- package/lib/js/control/drawing/LineStringDrawingScene.js +0 -139
- package/lib/js/control/drawing/PolygonDrawingScene.d.ts +0 -98
- package/lib/js/control/drawing/PolygonDrawingScene.js +0 -533
- package/lib/js/control/elevationProfile/ElevationProfile.d.ts +0 -77
- package/lib/js/control/elevationProfile/ElevationProfile.js +0 -248
- package/lib/js/control/elevationProfile/ElevationProfileButtonsView.d.ts +0 -15
- package/lib/js/control/elevationProfile/ElevationProfileButtonsView.js +0 -61
- package/lib/js/control/elevationProfile/ElevationProfileControl.d.ts +0 -33
- package/lib/js/control/elevationProfile/ElevationProfileControl.js +0 -151
- package/lib/js/control/elevationProfile/ElevationProfileLegend.d.ts +0 -20
- package/lib/js/control/elevationProfile/ElevationProfileLegend.js +0 -82
- package/lib/js/control/elevationProfile/ElevationProfileScene.d.ts +0 -80
- package/lib/js/control/elevationProfile/ElevationProfileScene.js +0 -542
- package/lib/js/control/elevationProfile/ElevationProfileView.d.ts +0 -65
- package/lib/js/control/elevationProfile/ElevationProfileView.js +0 -504
- package/lib/js/control/elevationProfile/PointListDialog.d.ts +0 -12
- package/lib/js/control/elevationProfile/PointListDialog.js +0 -57
- package/lib/js/control/geoObjectEditor/ArrowEntity.d.ts +0 -15
- package/lib/js/control/geoObjectEditor/ArrowEntity.js +0 -59
- package/lib/js/control/geoObjectEditor/AxisTrackEntity.d.ts +0 -9
- package/lib/js/control/geoObjectEditor/AxisTrackEntity.js +0 -93
- package/lib/js/control/geoObjectEditor/GeoObjectEditor.d.ts +0 -13
- package/lib/js/control/geoObjectEditor/GeoObjectEditor.js +0 -30
- package/lib/js/control/geoObjectEditor/GeoObjectEditorDialog.d.ts +0 -69
- package/lib/js/control/geoObjectEditor/GeoObjectEditorDialog.js +0 -488
- package/lib/js/control/geoObjectEditor/GeoObjectEditorScene.d.ts +0 -127
- package/lib/js/control/geoObjectEditor/GeoObjectEditorScene.js +0 -549
- package/lib/js/control/geoObjectEditor/MoveAxisEntity.d.ts +0 -17
- package/lib/js/control/geoObjectEditor/MoveAxisEntity.js +0 -107
- package/lib/js/control/geoObjectEditor/MovePlaneEntity.d.ts +0 -7
- package/lib/js/control/geoObjectEditor/MovePlaneEntity.js +0 -31
- package/lib/js/control/geoObjectEditor/RotateEntity.d.ts +0 -9
- package/lib/js/control/geoObjectEditor/RotateEntity.js +0 -105
- package/lib/js/control/geoObjectEditor/colors.d.ts +0 -8
- package/lib/js/control/geoObjectEditor/colors.js +0 -8
- package/lib/js/control/heightRuler/HeightRuler.d.ts +0 -7
- package/lib/js/control/heightRuler/HeightRuler.js +0 -11
- package/lib/js/control/heightRuler/HeightRulerScene.d.ts +0 -35
- package/lib/js/control/heightRuler/HeightRulerScene.js +0 -181
- package/lib/js/control/heightRuler/HeightRulerSwitcher.d.ts +0 -6
- package/lib/js/control/heightRuler/HeightRulerSwitcher.js +0 -13
- package/lib/js/control/index.js +0 -30
- package/lib/js/control/ruler/Ruler.d.ts +0 -14
- package/lib/js/control/ruler/Ruler.js +0 -23
- package/lib/js/control/ruler/RulerScene.d.ts +0 -88
- package/lib/js/control/ruler/RulerScene.js +0 -324
- package/lib/js/control/selection/Selection.d.ts +0 -56
- package/lib/js/control/selection/Selection.js +0 -78
- package/lib/js/control/selection/SelectionScene.d.ts +0 -44
- package/lib/js/control/selection/SelectionScene.js +0 -272
- package/lib/js/control/timeline/TimelineControl.d.ts +0 -18
- package/lib/js/control/timeline/TimelineControl.js +0 -81
- package/lib/js/control/timeline/TimelineModel.d.ts +0 -41
- package/lib/js/control/timeline/TimelineModel.js +0 -104
- package/lib/js/control/timeline/TimelineView.d.ts +0 -86
- package/lib/js/control/timeline/TimelineView.js +0 -363
- package/lib/js/control/timeline/timelineUtils.d.ts +0 -12
- package/lib/js/control/timeline/timelineUtils.js +0 -112
- package/lib/js/control/visibleExtent/Segment.js +0 -1301
- package/lib/js/control/visibleExtent/VisibleExtent.js +0 -56
- package/lib/js/control/visibleExtent/drawnode.d.ts +0 -7
- package/lib/js/control/visibleExtent/drawnode.js +0 -718
- package/lib/js/ellipsoid/Ellipsoid.d.ts +0 -194
- package/lib/js/ellipsoid/Ellipsoid.js +0 -459
- package/lib/js/ellipsoid/index.d.ts +0 -4
- package/lib/js/ellipsoid/index.js +0 -4
- package/lib/js/ellipsoid/mars.d.ts +0 -6
- package/lib/js/ellipsoid/mars.js +0 -6
- package/lib/js/ellipsoid/moon.d.ts +0 -6
- package/lib/js/ellipsoid/moon.js +0 -6
- package/lib/js/ellipsoid/wgs84.d.ts +0 -6
- package/lib/js/ellipsoid/wgs84.js +0 -6
- package/lib/js/entity/BaseBillboard.d.ts +0 -225
- package/lib/js/entity/BaseBillboard.js +0 -284
- package/lib/js/entity/BaseBillboardHandler.d.ts +0 -81
- package/lib/js/entity/BaseBillboardHandler.js +0 -546
- package/lib/js/entity/Billboard.d.ts +0 -114
- package/lib/js/entity/Billboard.js +0 -127
- package/lib/js/entity/BillboardHandler.d.ts +0 -15
- package/lib/js/entity/BillboardHandler.js +0 -103
- package/lib/js/entity/Entity.d.ts +0 -630
- package/lib/js/entity/Entity.js +0 -957
- package/lib/js/entity/EntityCollection.d.ts +0 -368
- package/lib/js/entity/EntityCollection.js +0 -655
- package/lib/js/entity/GeoObject.d.ts +0 -257
- package/lib/js/entity/GeoObject.js +0 -318
- package/lib/js/entity/GeoObjectHandler.d.ts +0 -81
- package/lib/js/entity/GeoObjectHandler.js +0 -515
- package/lib/js/entity/Geometry.d.ts +0 -125
- package/lib/js/entity/Geometry.js +0 -291
- package/lib/js/entity/GeometryHandler.d.ts +0 -86
- package/lib/js/entity/GeometryHandler.js +0 -745
- package/lib/js/entity/InstanceData.d.ts +0 -76
- package/lib/js/entity/InstanceData.js +0 -347
- package/lib/js/entity/Label.d.ts +0 -230
- package/lib/js/entity/Label.js +0 -322
- package/lib/js/entity/LabelHandler.d.ts +0 -65
- package/lib/js/entity/LabelHandler.js +0 -696
- package/lib/js/entity/LabelWorker.d.ts +0 -15
- package/lib/js/entity/LabelWorker.js +0 -163
- package/lib/js/entity/PointCloud.d.ts +0 -179
- package/lib/js/entity/PointCloud.js +0 -327
- package/lib/js/entity/PointCloudHandler.d.ts +0 -42
- package/lib/js/entity/PointCloudHandler.js +0 -82
- package/lib/js/entity/Polyline.d.ts +0 -360
- package/lib/js/entity/Polyline.js +0 -1635
- package/lib/js/entity/PolylineHandler.d.ts +0 -29
- package/lib/js/entity/PolylineHandler.js +0 -103
- package/lib/js/entity/Ray.d.ts +0 -135
- package/lib/js/entity/Ray.js +0 -171
- package/lib/js/entity/RayHandler.d.ts +0 -70
- package/lib/js/entity/RayHandler.js +0 -496
- package/lib/js/entity/Strip.d.ts +0 -141
- package/lib/js/entity/Strip.js +0 -417
- package/lib/js/entity/StripHandler.d.ts +0 -42
- package/lib/js/entity/StripHandler.js +0 -110
- package/lib/js/entity/index.d.ts +0 -10
- package/lib/js/entity/index.js +0 -10
- package/lib/js/index.d.ts +0 -34
- package/lib/js/index.js +0 -34
- package/lib/js/input/KeyboardHandler.d.ts +0 -33
- package/lib/js/input/KeyboardHandler.js +0 -159
- package/lib/js/input/MouseHandler.d.ts +0 -17
- package/lib/js/input/MouseHandler.js +0 -92
- package/lib/js/input/TouchHandler.d.ts +0 -11
- package/lib/js/input/TouchHandler.js +0 -42
- package/lib/js/input/input.d.ts +0 -3
- package/lib/js/input/input.js +0 -47
- package/lib/js/layer/BaseGeoImage.d.ts +0 -146
- package/lib/js/layer/BaseGeoImage.js +0 -382
- package/lib/js/layer/Bing.d.ts +0 -5
- package/lib/js/layer/Bing.js +0 -41
- package/lib/js/layer/CanvasTiles.d.ts +0 -104
- package/lib/js/layer/CanvasTiles.js +0 -292
- package/lib/js/layer/GeoImage.d.ts +0 -62
- package/lib/js/layer/GeoImage.js +0 -133
- package/lib/js/layer/GeoTexture2d.d.ts +0 -18
- package/lib/js/layer/GeoTexture2d.js +0 -37
- package/lib/js/layer/GeoVideo.d.ts +0 -69
- package/lib/js/layer/GeoVideo.js +0 -157
- package/lib/js/layer/KML.d.ts +0 -74
- package/lib/js/layer/KML.js +0 -303
- package/lib/js/layer/Layer.d.ts +0 -416
- package/lib/js/layer/Layer.js +0 -734
- package/lib/js/layer/Material.d.ts +0 -34
- package/lib/js/layer/Material.js +0 -69
- package/lib/js/layer/OpenStreetMap.d.ts +0 -5
- package/lib/js/layer/OpenStreetMap.js +0 -19
- package/lib/js/layer/Vector.d.ts +0 -240
- package/lib/js/layer/Vector.js +0 -767
- package/lib/js/layer/WMS.d.ts +0 -76
- package/lib/js/layer/WMS.js +0 -112
- package/lib/js/layer/XYZ.d.ts +0 -149
- package/lib/js/layer/XYZ.js +0 -299
- package/lib/js/layer/index.d.ts +0 -12
- package/lib/js/layer/index.js +0 -12
- package/lib/js/light/LightSource.d.ts +0 -36
- package/lib/js/light/LightSource.js +0 -86
- package/lib/js/math/Line2.d.ts +0 -11
- package/lib/js/math/Line2.js +0 -21
- package/lib/js/math/Line3.d.ts +0 -28
- package/lib/js/math/Line3.js +0 -85
- package/lib/js/math/Mat3.d.ts +0 -77
- package/lib/js/math/Mat3.js +0 -139
- package/lib/js/math/Mat4.d.ts +0 -204
- package/lib/js/math/Mat4.js +0 -487
- package/lib/js/math/Plane.d.ts +0 -22
- package/lib/js/math/Plane.js +0 -118
- package/lib/js/math/Quat.d.ts +0 -393
- package/lib/js/math/Quat.js +0 -794
- package/lib/js/math/Ray.d.ts +0 -72
- package/lib/js/math/Ray.js +0 -211
- package/lib/js/math/Vec2.d.ts +0 -332
- package/lib/js/math/Vec2.js +0 -495
- package/lib/js/math/Vec3.d.ts +0 -488
- package/lib/js/math/Vec3.js +0 -828
- package/lib/js/math/Vec4.d.ts +0 -163
- package/lib/js/math/Vec4.js +0 -211
- package/lib/js/math/coder.d.ts +0 -53
- package/lib/js/math/coder.js +0 -101
- package/lib/js/math/index.d.ts +0 -14
- package/lib/js/math/index.js +0 -11
- package/lib/js/math.d.ts +0 -266
- package/lib/js/math.js +0 -379
- package/lib/js/mercator.d.ts +0 -92
- package/lib/js/mercator.js +0 -120
- package/lib/js/proj/EPSG3857.d.ts +0 -9
- package/lib/js/proj/EPSG3857.js +0 -9
- package/lib/js/proj/EPSG4326.d.ts +0 -9
- package/lib/js/proj/EPSG4326.js +0 -9
- package/lib/js/proj/Proj.d.ts +0 -43
- package/lib/js/proj/Proj.js +0 -38
- package/lib/js/proj/equi.d.ts +0 -9
- package/lib/js/proj/equi.js +0 -9
- package/lib/js/quadTree/EPSG4326/EPSG4326QuadTreeStrategy.d.ts +0 -6
- package/lib/js/quadTree/EPSG4326/EPSG4326QuadTreeStrategy.js +0 -16
- package/lib/js/quadTree/EntityCollectionNode.d.ts +0 -46
- package/lib/js/quadTree/EntityCollectionNode.js +0 -262
- package/lib/js/quadTree/EntityCollectionsTreeStrategy.d.ts +0 -25
- package/lib/js/quadTree/EntityCollectionsTreeStrategy.js +0 -49
- package/lib/js/quadTree/Node.d.ts +0 -80
- package/lib/js/quadTree/Node.js +0 -712
- package/lib/js/quadTree/QuadTreeStrategy.d.ts +0 -39
- package/lib/js/quadTree/QuadTreeStrategy.js +0 -98
- package/lib/js/quadTree/earth/EarthEntityCollectionNodeLonLat.d.ts +0 -19
- package/lib/js/quadTree/earth/EarthEntityCollectionNodeLonLat.js +0 -74
- package/lib/js/quadTree/earth/EarthEntityCollectionsTreeStrategy.d.ts +0 -19
- package/lib/js/quadTree/earth/EarthEntityCollectionsTreeStrategy.js +0 -103
- package/lib/js/quadTree/earth/EarthQuadTreeStrategy.d.ts +0 -27
- package/lib/js/quadTree/earth/EarthQuadTreeStrategy.js +0 -77
- package/lib/js/quadTree/equi/EquiEntityCollectionNodeLonLat.d.ts +0 -18
- package/lib/js/quadTree/equi/EquiEntityCollectionNodeLonLat.js +0 -70
- package/lib/js/quadTree/equi/EquiEntityCollectionsTreeStrategy.d.ts +0 -17
- package/lib/js/quadTree/equi/EquiEntityCollectionsTreeStrategy.js +0 -75
- package/lib/js/quadTree/equi/EquiQuadTreeStrategy.d.ts +0 -19
- package/lib/js/quadTree/equi/EquiQuadTreeStrategy.js +0 -62
- package/lib/js/quadTree/index.d.ts +0 -12
- package/lib/js/quadTree/index.js +0 -12
- package/lib/js/quadTree/quadTree.d.ts +0 -40
- package/lib/js/quadTree/quadTree.js +0 -66
- package/lib/js/quadTree/wgs84/Wgs84QuadTreeStrategy.d.ts +0 -6
- package/lib/js/quadTree/wgs84/Wgs84QuadTreeStrategy.js +0 -15
- package/lib/js/renderer/Renderer.d.ts +0 -343
- package/lib/js/renderer/Renderer.js +0 -969
- package/lib/js/renderer/RendererEvents.d.ts +0 -245
- package/lib/js/renderer/RendererEvents.js +0 -870
- package/lib/js/scene/Axes.d.ts +0 -12
- package/lib/js/scene/Axes.js +0 -59
- package/lib/js/scene/BaseNode.d.ts +0 -61
- package/lib/js/scene/BaseNode.js +0 -69
- package/lib/js/scene/Planet.d.ts +0 -641
- package/lib/js/scene/Planet.js +0 -1617
- package/lib/js/scene/RenderNode.d.ts +0 -135
- package/lib/js/scene/RenderNode.js +0 -313
- package/lib/js/scene/SkyBox.d.ts +0 -13
- package/lib/js/scene/SkyBox.js +0 -87
- package/lib/js/scene/index.d.ts +0 -5
- package/lib/js/scene/index.js +0 -5
- package/lib/js/segment/Segment.d.ts +0 -289
- package/lib/js/segment/Segment.js +0 -1212
- package/lib/js/segment/SegmentLonLat.d.ts +0 -40
- package/lib/js/segment/SegmentLonLat.js +0 -111
- package/lib/js/segment/SegmentLonLatEqui.d.ts +0 -13
- package/lib/js/segment/SegmentLonLatEqui.js +0 -46
- package/lib/js/segment/Slice.d.ts +0 -13
- package/lib/js/segment/Slice.js +0 -33
- package/lib/js/segment/segmentHelper.js +0 -180
- package/lib/js/shaders/atmos.d.ts +0 -20
- package/lib/js/shaders/atmos.js +0 -326
- package/lib/js/shaders/billboard.d.ts +0 -3
- package/lib/js/shaders/billboard.js +0 -214
- package/lib/js/shaders/bloom.d.ts +0 -2
- package/lib/js/shaders/bloom.js +0 -32
- package/lib/js/shaders/blur.d.ts +0 -3
- package/lib/js/shaders/blur.js +0 -68
- package/lib/js/shaders/depth.d.ts +0 -2
- package/lib/js/shaders/depth.js +0 -40
- package/lib/js/shaders/drawnode.d.ts +0 -10
- package/lib/js/shaders/drawnode.js +0 -1008
- package/lib/js/shaders/geoObject.d.ts +0 -4
- package/lib/js/shaders/geoObject.js +0 -294
- package/lib/js/shaders/label.d.ts +0 -4
- package/lib/js/shaders/label.js +0 -589
- package/lib/js/shaders/lumFilter.d.ts +0 -2
- package/lib/js/shaders/lumFilter.js +0 -36
- package/lib/js/shaders/pointCloud.d.ts +0 -2
- package/lib/js/shaders/pointCloud.js +0 -32
- package/lib/js/shaders/polyline.d.ts +0 -3
- package/lib/js/shaders/polyline.js +0 -364
- package/lib/js/shaders/ray.d.ts +0 -2
- package/lib/js/shaders/ray.js +0 -80
- package/lib/js/shaders/screenFrame.d.ts +0 -2
- package/lib/js/shaders/screenFrame.js +0 -26
- package/lib/js/shaders/skybox.d.ts +0 -2
- package/lib/js/shaders/skybox.js +0 -28
- package/lib/js/shaders/toneMapping.d.ts +0 -2
- package/lib/js/shaders/toneMapping.js +0 -85
- package/lib/js/shaders/utils.d.ts +0 -1
- package/lib/js/shaders/utils.js +0 -97
- package/lib/js/terrain/BilTerrain.d.ts +0 -19
- package/lib/js/terrain/BilTerrain.js +0 -153
- package/lib/js/terrain/EmptyTerrain.d.ts +0 -113
- package/lib/js/terrain/EmptyTerrain.js +0 -113
- package/lib/js/terrain/Geoid.d.ts +0 -33
- package/lib/js/terrain/Geoid.js +0 -191
- package/lib/js/terrain/GlobusRgbTerrain.d.ts +0 -7
- package/lib/js/terrain/GlobusRgbTerrain.js +0 -25
- package/lib/js/terrain/GlobusTerrain.d.ts +0 -140
- package/lib/js/terrain/GlobusTerrain.js +0 -351
- package/lib/js/terrain/RgbTerrain.d.ts +0 -43
- package/lib/js/terrain/RgbTerrain.js +0 -428
- package/lib/js/terrain/index.d.ts +0 -6
- package/lib/js/terrain/index.js +0 -6
- package/lib/js/ui/Button.d.ts +0 -33
- package/lib/js/ui/Button.js +0 -78
- package/lib/js/ui/ButtonGroup.d.ts +0 -16
- package/lib/js/ui/ButtonGroup.js +0 -41
- package/lib/js/ui/Checkbox.d.ts +0 -32
- package/lib/js/ui/Checkbox.js +0 -110
- package/lib/js/ui/Color.d.ts +0 -23
- package/lib/js/ui/Color.js +0 -59
- package/lib/js/ui/Dialog.d.ts +0 -59
- package/lib/js/ui/Dialog.js +0 -193
- package/lib/js/ui/Input.d.ts +0 -33
- package/lib/js/ui/Input.js +0 -107
- package/lib/js/ui/Slider.d.ts +0 -39
- package/lib/js/ui/Slider.js +0 -129
- package/lib/js/ui/ToggleButton.d.ts +0 -21
- package/lib/js/ui/ToggleButton.js +0 -42
- package/lib/js/ui/View.d.ts +0 -39
- package/lib/js/ui/View.js +0 -157
- package/lib/js/ui/icons.d.ts +0 -1
- package/lib/js/ui/icons.js +0 -3
- package/lib/js/utils/BaseWorker.d.ts +0 -14
- package/lib/js/utils/BaseWorker.js +0 -47
- package/lib/js/utils/FontAtlas.d.ts +0 -82
- package/lib/js/utils/FontAtlas.js +0 -220
- package/lib/js/utils/GeoImageCreator.d.ts +0 -34
- package/lib/js/utils/GeoImageCreator.js +0 -163
- package/lib/js/utils/ImagesCacheManager.d.ts +0 -22
- package/lib/js/utils/ImagesCacheManager.js +0 -63
- package/lib/js/utils/Loader.d.ts +0 -63
- package/lib/js/utils/Loader.js +0 -156
- package/lib/js/utils/NormalMapCreator.d.ts +0 -53
- package/lib/js/utils/NormalMapCreator.js +0 -310
- package/lib/js/utils/PlainSegmentWorker.d.ts +0 -24
- package/lib/js/utils/PlainSegmentWorker.js +0 -385
- package/lib/js/utils/TerrainWorker.d.ts +0 -28
- package/lib/js/utils/TerrainWorker.js +0 -551
- package/lib/js/utils/TextureAtlas.d.ts +0 -115
- package/lib/js/utils/TextureAtlas.js +0 -231
- package/lib/js/utils/VectorTileCreator.d.ts +0 -18
- package/lib/js/utils/VectorTileCreator.js +0 -320
- package/lib/js/utils/colorTable.d.ts +0 -3
- package/lib/js/utils/colorTable.js +0 -143
- package/lib/js/utils/earcut.d.ts +0 -7
- package/lib/js/utils/earcut.js +0 -536
- package/lib/js/utils/objParser.d.ts +0 -56
- package/lib/js/utils/objParser.js +0 -293
- package/lib/js/utils/shared.js +0 -961
- package/lib/js/utils/units.d.ts +0 -16
- package/lib/js/utils/units.js +0 -61
- package/lib/js/webgl/BaseFramebuffer.d.ts +0 -52
- package/lib/js/webgl/BaseFramebuffer.js +0 -88
- package/lib/js/webgl/Framebuffer.js +0 -256
- package/lib/js/webgl/Handler.d.ts +0 -491
- package/lib/js/webgl/Handler.js +0 -1035
- package/lib/js/webgl/Multisample.d.ts +0 -28
- package/lib/js/webgl/Multisample.js +0 -77
- package/lib/js/webgl/Program.d.ts +0 -159
- package/lib/js/webgl/Program.js +0 -306
- package/lib/js/webgl/ProgramController.d.ts +0 -87
- package/lib/js/webgl/ProgramController.js +0 -110
- package/lib/js/webgl/index.d.ts +0 -6
- package/lib/js/webgl/index.js +0 -6
- package/lib/js/webgl/types.d.ts +0 -9
- package/lib/js/webgl/types.js +0 -26
- package/lib/js/webgl/variableHandlers.d.ts +0 -22
- package/lib/js/webgl/variableHandlers.js +0 -78
- /package/lib/{@openglobus/js/Clock.d.ts → Clock.d.ts} +0 -0
- /package/lib/{@openglobus/js/Deferred.d.ts → Deferred.d.ts} +0 -0
- /package/lib/{@openglobus/js/Events.d.ts → Events.d.ts} +0 -0
- /package/lib/{@openglobus/js/Extent.d.ts → Extent.d.ts} +0 -0
- /package/lib/{@openglobus/js/ImageCanvas.d.ts → ImageCanvas.d.ts} +0 -0
- /package/lib/{@openglobus/js/Lock.d.ts → Lock.d.ts} +0 -0
- /package/lib/{@openglobus/js/LonLat.d.ts → LonLat.d.ts} +0 -0
- /package/lib/{@openglobus/js/Popup.d.ts → Popup.d.ts} +0 -0
- /package/lib/{@openglobus/js/QueueArray.d.ts → QueueArray.d.ts} +0 -0
- /package/lib/{@openglobus/js/Rectangle.d.ts → Rectangle.d.ts} +0 -0
- /package/lib/{@openglobus/js/Stack.d.ts → Stack.d.ts} +0 -0
- /package/lib/{@openglobus/js/astro → astro}/astro.d.ts +0 -0
- /package/lib/{@openglobus/js/astro → astro}/earth.d.ts +0 -0
- /package/lib/{@openglobus/js/astro → astro}/jd.d.ts +0 -0
- /package/lib/{@openglobus/js/astro → astro}/orbit.d.ts +0 -0
- /package/lib/{@openglobus/js/astro → astro}/rotation.d.ts +0 -0
- /package/lib/{@openglobus/js/bv → bv}/Box.d.ts +0 -0
- /package/lib/{@openglobus/js/bv → bv}/Sphere.d.ts +0 -0
- /package/lib/{@openglobus/js/bv → bv}/index.d.ts +0 -0
- /package/lib/{@openglobus/js/camera → camera}/PlanetCamera.d.ts +0 -0
- /package/lib/{@openglobus/js/camera → camera}/index.d.ts +0 -0
- /package/lib/{@openglobus/js/cons.d.ts → cons.d.ts} +0 -0
- /package/lib/{@openglobus/js/control → control}/CameraLock.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/CompassButton.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/Control.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/DebugInfo.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/DrawingSwitcher.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/EarthCoordinates.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/GeoImageDragControl.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/LayerAnimation.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/LayerSwitcher.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/Lighting.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/MouseNavigation.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/OldMouseNavigation.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/RulerSwitcher.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/ScaleControl.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/SegmentBoundVisualization.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/ShowFps.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/SimpleNavigation.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/SimpleSkyBackground.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/Sun.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/ToggleWireframe.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/TouchNavigation.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/ZoomControl.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/drawing/DrawingControl.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/drawing/LineStringDrawingScene.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/drawing/PolygonDrawingScene.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfile.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfileButtonsView.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfileControl.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfileLegend.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfileScene.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfileView.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/elevationProfile/PointListDialog.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/geoObjectEditor/ArrowEntity.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/geoObjectEditor/AxisTrackEntity.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/geoObjectEditor/GeoObjectEditor.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/geoObjectEditor/GeoObjectEditorDialog.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/geoObjectEditor/GeoObjectEditorScene.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/geoObjectEditor/MoveAxisEntity.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/geoObjectEditor/MovePlaneEntity.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/geoObjectEditor/RotateEntity.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/geoObjectEditor/colors.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/heightRuler/HeightRuler.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/heightRuler/HeightRulerScene.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/heightRuler/HeightRulerSwitcher.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/ruler/Ruler.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/ruler/RulerScene.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/selection/Selection.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/selection/SelectionScene.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/timeline/TimelineControl.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/timeline/TimelineModel.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/timeline/TimelineView.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/timeline/timelineUtils.d.ts +0 -0
- /package/lib/{js/control → control}/visibleExtent/VisibleExtent.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/visibleExtent/drawnode.d.ts +0 -0
- /package/lib/{@openglobus/js/ellipsoid → ellipsoid}/Ellipsoid.d.ts +0 -0
- /package/lib/{@openglobus/js/ellipsoid → ellipsoid}/index.d.ts +0 -0
- /package/lib/{@openglobus/js/ellipsoid → ellipsoid}/mars.d.ts +0 -0
- /package/lib/{@openglobus/js/ellipsoid → ellipsoid}/moon.d.ts +0 -0
- /package/lib/{@openglobus/js/ellipsoid → ellipsoid}/wgs84.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/BaseBillboard.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/BaseBillboardHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/Billboard.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/BillboardHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/Entity.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/EntityCollection.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/GeoObject.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/GeoObjectHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/Geometry.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/GeometryHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/InstanceData.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/Label.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/LabelHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/LabelWorker.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/PointCloud.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/PointCloudHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/Polyline.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/PolylineHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/Ray.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/RayHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/Strip.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/StripHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/index.d.ts +0 -0
- /package/lib/{@openglobus/js/input → input}/KeyboardHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/input → input}/MouseHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/input → input}/TouchHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/input → input}/input.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/BaseGeoImage.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/Bing.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/CanvasTiles.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/GeoImage.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/GeoTexture2d.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/GeoVideo.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/KML.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/Layer.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/Material.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/OpenStreetMap.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/Vector.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/WMS.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/XYZ.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/index.d.ts +0 -0
- /package/lib/{@openglobus/js/light → light}/LightSource.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/Line2.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/Line3.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/Mat3.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/Mat4.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/Plane.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/Quat.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/Ray.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/Vec2.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/Vec3.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/Vec4.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/coder.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/index.d.ts +0 -0
- /package/lib/{@openglobus/js/math.d.ts → math.d.ts} +0 -0
- /package/lib/{@openglobus/js/mercator.d.ts → mercator.d.ts} +0 -0
- /package/lib/{@openglobus/js/proj → proj}/EPSG3857.d.ts +0 -0
- /package/lib/{@openglobus/js/proj → proj}/EPSG4326.d.ts +0 -0
- /package/lib/{@openglobus/js/proj → proj}/Proj.d.ts +0 -0
- /package/lib/{@openglobus/js/proj → proj}/equi.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/EPSG4326/EPSG4326QuadTreeStrategy.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/EntityCollectionNode.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/EntityCollectionsTreeStrategy.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/Node.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/QuadTreeStrategy.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/earth/EarthEntityCollectionNodeLonLat.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/earth/EarthEntityCollectionsTreeStrategy.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/earth/EarthQuadTreeStrategy.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/equi/EquiEntityCollectionNodeLonLat.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/equi/EquiEntityCollectionsTreeStrategy.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/equi/EquiQuadTreeStrategy.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/index.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/quadTree.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/wgs84/Wgs84QuadTreeStrategy.d.ts +0 -0
- /package/lib/{@openglobus/js/renderer → renderer}/RendererEvents.d.ts +0 -0
- /package/lib/{@openglobus/res → res}/fonts/Roboto-Regular.json +0 -0
- /package/lib/{@openglobus/res → res}/fonts/Roboto-Regular.ttf.cfg +0 -0
- /package/lib/{@openglobus/res → res}/fonts/Roboto-Regular.ttf.png +0 -0
- /package/lib/{@openglobus/res → res}/fonts/arial.json +0 -0
- /package/lib/{@openglobus/res → res}/fonts/arial.ttf.cfg +0 -0
- /package/lib/{@openglobus/res → res}/fonts/arial.ttf.png +0 -0
- /package/lib/{@openglobus/res → res}/night-4326.png +0 -0
- /package/lib/{@openglobus/res → res}/night.png +0 -0
- /package/lib/{@openglobus/res → res}/spec.png +0 -0
- /package/lib/{@openglobus/js/scene → scene}/Axes.d.ts +0 -0
- /package/lib/{@openglobus/js/scene → scene}/BaseNode.d.ts +0 -0
- /package/lib/{@openglobus/js/scene → scene}/RenderNode.d.ts +0 -0
- /package/lib/{@openglobus/js/scene → scene}/SkyBox.d.ts +0 -0
- /package/lib/{@openglobus/js/scene → scene}/index.d.ts +0 -0
- /package/lib/{@openglobus/js/segment → segment}/SegmentLonLat.d.ts +0 -0
- /package/lib/{@openglobus/js/segment → segment}/SegmentLonLatEqui.d.ts +0 -0
- /package/lib/{@openglobus/js/segment → segment}/Slice.d.ts +0 -0
- /package/lib/{@openglobus/js/shaders → shaders}/depth.d.ts +0 -0
- /package/lib/{@openglobus/js/shaders → shaders}/pointCloud.d.ts +0 -0
- /package/lib/{@openglobus/js/shaders → shaders}/screenFrame.d.ts +0 -0
- /package/lib/{@openglobus/js/shaders → shaders}/skybox.d.ts +0 -0
- /package/lib/{@openglobus/js/terrain → terrain}/BilTerrain.d.ts +0 -0
- /package/lib/{@openglobus/js/terrain → terrain}/EmptyTerrain.d.ts +0 -0
- /package/lib/{@openglobus/js/terrain → terrain}/Geoid.d.ts +0 -0
- /package/lib/{@openglobus/js/terrain → terrain}/GlobusRgbTerrain.d.ts +0 -0
- /package/lib/{@openglobus/js/terrain → terrain}/GlobusTerrain.d.ts +0 -0
- /package/lib/{@openglobus/js/terrain → terrain}/RgbTerrain.d.ts +0 -0
- /package/lib/{@openglobus/js/terrain → terrain}/index.d.ts +0 -0
- /package/lib/{@openglobus/js/ui → ui}/Button.d.ts +0 -0
- /package/lib/{@openglobus/js/ui → ui}/ButtonGroup.d.ts +0 -0
- /package/lib/{@openglobus/js/ui → ui}/Checkbox.d.ts +0 -0
- /package/lib/{@openglobus/js/ui → ui}/Color.d.ts +0 -0
- /package/lib/{@openglobus/js/ui → ui}/Input.d.ts +0 -0
- /package/lib/{@openglobus/js/ui → ui}/Slider.d.ts +0 -0
- /package/lib/{@openglobus/js/ui → ui}/ToggleButton.d.ts +0 -0
- /package/lib/{@openglobus/js/ui → ui}/icons.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/FontAtlas.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/GeoImageCreator.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/ImagesCacheManager.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/Loader.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/NormalMapCreator.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/PlainSegmentWorker.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/TerrainWorker.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/TextureAtlas.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/VectorTileCreator.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/colorTable.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/earcut.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/units.d.ts +0 -0
- /package/lib/{@openglobus/js/webgl → webgl}/BaseFramebuffer.d.ts +0 -0
- /package/lib/{@openglobus/js/webgl → webgl}/Multisample.d.ts +0 -0
- /package/lib/{@openglobus/js/webgl → webgl}/Program.d.ts +0 -0
- /package/lib/{@openglobus/js/webgl → webgl}/ProgramController.d.ts +0 -0
- /package/lib/{@openglobus/js/webgl → webgl}/index.d.ts +0 -0
- /package/lib/{@openglobus/js/webgl → webgl}/types.d.ts +0 -0
- /package/lib/{@openglobus/js/webgl → webgl}/variableHandlers.d.ts +0 -0
package/lib/js/math/Vec3.js
DELETED
|
@@ -1,828 +0,0 @@
|
|
|
1
|
-
import { Quat } from "./Quat";
|
|
2
|
-
import { Vec4 } from "./Vec4";
|
|
3
|
-
/**
|
|
4
|
-
* Class represents a 3d vector.
|
|
5
|
-
* @class
|
|
6
|
-
* @param {number} [x] - First value.
|
|
7
|
-
* @param {number} [y] - Second value.
|
|
8
|
-
* @param {number} [z] - Third value.
|
|
9
|
-
*/
|
|
10
|
-
export class Vec3 {
|
|
11
|
-
constructor(x = 0.0, y = 0.0, z = 0.0) {
|
|
12
|
-
this.x = x;
|
|
13
|
-
this.y = y;
|
|
14
|
-
this.z = z;
|
|
15
|
-
}
|
|
16
|
-
/** @const */
|
|
17
|
-
static get UP() {
|
|
18
|
-
return new Vec3(0, 1, 0);
|
|
19
|
-
}
|
|
20
|
-
/** @const */
|
|
21
|
-
static get DOWN() {
|
|
22
|
-
return new Vec3(0, -1, 0);
|
|
23
|
-
}
|
|
24
|
-
/** @const */
|
|
25
|
-
static get RIGHT() {
|
|
26
|
-
return new Vec3(1, 0, 0);
|
|
27
|
-
}
|
|
28
|
-
/** @const */
|
|
29
|
-
static get LEFT() {
|
|
30
|
-
return new Vec3(-1, 0, 0);
|
|
31
|
-
}
|
|
32
|
-
/** @const */
|
|
33
|
-
static get FORWARD() {
|
|
34
|
-
return new Vec3(0, 0, -1);
|
|
35
|
-
}
|
|
36
|
-
/** @const */
|
|
37
|
-
static get BACKWARD() {
|
|
38
|
-
return new Vec3(0, 0, 1);
|
|
39
|
-
}
|
|
40
|
-
/** @const */
|
|
41
|
-
static get ZERO() {
|
|
42
|
-
return new Vec3();
|
|
43
|
-
}
|
|
44
|
-
/** @const */
|
|
45
|
-
static get UNIT_X() {
|
|
46
|
-
return new Vec3(1, 0, 0);
|
|
47
|
-
}
|
|
48
|
-
/** @const */
|
|
49
|
-
static get UNIT_Y() {
|
|
50
|
-
return new Vec3(0, 1, 0);
|
|
51
|
-
}
|
|
52
|
-
/** @const */
|
|
53
|
-
static get UNIT_Z() {
|
|
54
|
-
return new Vec3(0, 0, 1);
|
|
55
|
-
}
|
|
56
|
-
/** @const */
|
|
57
|
-
static get NORTH() {
|
|
58
|
-
return Vec3.UNIT_Z;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Separate 63 bit Vec3 to two Vec3 32-bit float values.
|
|
62
|
-
* @function
|
|
63
|
-
* @param {Vec3} v - Double type value.
|
|
64
|
-
* @param {Vec3} high - Out vector high values.
|
|
65
|
-
* @param {Vec3} low - Out vector low values.
|
|
66
|
-
*/
|
|
67
|
-
static doubleToTwoFloats(v, high, low) {
|
|
68
|
-
let x = v.x, y = v.y, z = v.z;
|
|
69
|
-
if (x >= 0.0) {
|
|
70
|
-
let doubleHigh = Math.floor(x / 65536.0) * 65536.0;
|
|
71
|
-
high.x = Math.fround(doubleHigh);
|
|
72
|
-
low.x = Math.fround(x - doubleHigh);
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
let doubleHigh = Math.floor(-x / 65536.0) * 65536.0;
|
|
76
|
-
high.x = Math.fround(-doubleHigh);
|
|
77
|
-
low.x = Math.fround(x + doubleHigh);
|
|
78
|
-
}
|
|
79
|
-
if (y >= 0.0) {
|
|
80
|
-
let doubleHigh = Math.floor(y / 65536.0) * 65536.0;
|
|
81
|
-
high.y = Math.fround(doubleHigh);
|
|
82
|
-
low.y = Math.fround(y - doubleHigh);
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
let doubleHigh = Math.floor(-y / 65536.0) * 65536.0;
|
|
86
|
-
high.y = Math.fround(-doubleHigh);
|
|
87
|
-
low.y = Math.fround(y + doubleHigh);
|
|
88
|
-
}
|
|
89
|
-
if (z >= 0.0) {
|
|
90
|
-
let doubleHigh = Math.floor(z / 65536.0) * 65536.0;
|
|
91
|
-
high.z = Math.fround(doubleHigh);
|
|
92
|
-
low.z = Math.fround(z - doubleHigh);
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
let doubleHigh = Math.floor(-z / 65536.0) * 65536.0;
|
|
96
|
-
high.z = Math.fround(-doubleHigh);
|
|
97
|
-
low.z = Math.fround(z + doubleHigh);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Separate 63 bit Vec3 to two Vec3 32-bit float values.
|
|
102
|
-
* @function
|
|
103
|
-
* @param {Vec3} v - Double type value.
|
|
104
|
-
* @param {Float32Array} high - Out vector high values.
|
|
105
|
-
* @param {Float32Array} low - Out vector low values.
|
|
106
|
-
* @returns {Array.<number>} Encoded array. (exactly 2 entries)
|
|
107
|
-
*/
|
|
108
|
-
static doubleToTwoFloat32Array(v, high, low) {
|
|
109
|
-
let x = v.x, y = v.y, z = v.z;
|
|
110
|
-
if (x >= 0.0) {
|
|
111
|
-
let doubleHigh = Math.floor(x / 65536.0) * 65536.0;
|
|
112
|
-
high[0] = Math.fround(doubleHigh);
|
|
113
|
-
low[0] = Math.fround(x - doubleHigh);
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
let doubleHigh = Math.floor(-x / 65536.0) * 65536.0;
|
|
117
|
-
high[0] = Math.fround(-doubleHigh);
|
|
118
|
-
low[0] = Math.fround(x + doubleHigh);
|
|
119
|
-
}
|
|
120
|
-
if (y >= 0.0) {
|
|
121
|
-
let doubleHigh = Math.floor(y / 65536.0) * 65536.0;
|
|
122
|
-
high[1] = Math.fround(doubleHigh);
|
|
123
|
-
low[1] = Math.fround(y - doubleHigh);
|
|
124
|
-
}
|
|
125
|
-
else {
|
|
126
|
-
let doubleHigh = Math.floor(-y / 65536.0) * 65536.0;
|
|
127
|
-
high[1] = Math.fround(-doubleHigh);
|
|
128
|
-
low[1] = Math.fround(y + doubleHigh);
|
|
129
|
-
}
|
|
130
|
-
if (z >= 0.0) {
|
|
131
|
-
let doubleHigh = Math.floor(z / 65536.0) * 65536.0;
|
|
132
|
-
high[2] = Math.fround(doubleHigh);
|
|
133
|
-
low[2] = Math.fround(z - doubleHigh);
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
let doubleHigh = Math.floor(-z / 65536.0) * 65536.0;
|
|
137
|
-
high[2] = Math.fround(-doubleHigh);
|
|
138
|
-
low[2] = Math.fround(z + doubleHigh);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Creates 3d vector from array.
|
|
143
|
-
* @function
|
|
144
|
-
* @param {NumberArray2 | NumberArray3 | NumberArray4} arr - Input array (exactly 3 entries)
|
|
145
|
-
* @returns {Vec3} -
|
|
146
|
-
*/
|
|
147
|
-
static fromVec(arr) {
|
|
148
|
-
return new Vec3(arr[0], arr[1], arr[2]);
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Gets angle between two vectors.
|
|
152
|
-
* @static
|
|
153
|
-
* @param {Vec3} a - First vector.
|
|
154
|
-
* @param {Vec3} b - Second vector.
|
|
155
|
-
* @returns {number} -
|
|
156
|
-
*/
|
|
157
|
-
static angle(a, b) {
|
|
158
|
-
// the same
|
|
159
|
-
// let d = a.dot(b) / Math.sqrt(a.length2() * b.length2());
|
|
160
|
-
// return Math.acos(Math.max(-1, Math.min(1, d)));
|
|
161
|
-
let dotProduct = a.dot(b);
|
|
162
|
-
let crossProduct = a.cross(b).length();
|
|
163
|
-
return Math.atan2(crossProduct, dotProduct);
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Returns two vectors linear interpolation.
|
|
167
|
-
* @static
|
|
168
|
-
* @param {Vec3} v1 - Start vector.
|
|
169
|
-
* @param {Vec3} v2 - End vector.
|
|
170
|
-
* @param {number} l - Interpolate value.
|
|
171
|
-
* @returns {Vec3} -
|
|
172
|
-
*/
|
|
173
|
-
static lerp(v1, v2, l) {
|
|
174
|
-
return new Vec3(v1.x + (v2.x - v1.x) * l, v1.y + (v2.y - v1.y) * l, v1.z + (v2.z - v1.z) * l);
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Returns summary vector.
|
|
178
|
-
* @static
|
|
179
|
-
* @param {Vec3} a - First vector.
|
|
180
|
-
* @param {Vec3} b - Second vector.
|
|
181
|
-
* @returns {Vec3} - Summary vector.
|
|
182
|
-
*/
|
|
183
|
-
static add(a, b) {
|
|
184
|
-
let res = new Vec3(a.x, a.y, a.z);
|
|
185
|
-
res.addA(b);
|
|
186
|
-
return res;
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Returns two vectors subtraction.
|
|
190
|
-
* @static
|
|
191
|
-
* @param {Vec3} a - First vector.
|
|
192
|
-
* @param {Vec3} b - Second vector.
|
|
193
|
-
* @returns {Vec3} - Vectors subtraction.
|
|
194
|
-
*/
|
|
195
|
-
static sub(a, b) {
|
|
196
|
-
let res = new Vec3(a.x, a.y, a.z);
|
|
197
|
-
res.subA(b);
|
|
198
|
-
return res;
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Returns scaled vector.
|
|
202
|
-
* @static
|
|
203
|
-
* @param {Vec3} a - Input vector.
|
|
204
|
-
* @param {number} scale - Scale value.
|
|
205
|
-
* @returns {Vec3} -
|
|
206
|
-
*/
|
|
207
|
-
static scale(a, scale) {
|
|
208
|
-
return a.scaleTo(scale);
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* Returns two vectors production.
|
|
212
|
-
* @static
|
|
213
|
-
* @param {Vec3} a - First vector.
|
|
214
|
-
* @param {Vec3} b - Second vector.
|
|
215
|
-
* @returns {Vec3} -
|
|
216
|
-
*/
|
|
217
|
-
static mul(a, b) {
|
|
218
|
-
let res = new Vec3(a.x, a.y, a.z);
|
|
219
|
-
res.mulA(b);
|
|
220
|
-
return res;
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* Returns true if two vectors are non-collinear.
|
|
224
|
-
* @public
|
|
225
|
-
* @param {Vec3} a - First vector.
|
|
226
|
-
* @param {Vec3} b - Second vector.
|
|
227
|
-
* @returns {Vec3} -
|
|
228
|
-
*/
|
|
229
|
-
static noncollinear(a, b) {
|
|
230
|
-
return Boolean(a.y * b.z - a.z * b.y || a.z * b.x - a.x * b.z || a.x * b.y - a.y * b.z);
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* Get projection of the vector to plane where n - normal to the plane.
|
|
234
|
-
* @static
|
|
235
|
-
* @param {Vec3} b - Vector to project.
|
|
236
|
-
* @param {Vec3} n - Plane normal.
|
|
237
|
-
* @param {Vec3} [def] - Default value for non existed result.
|
|
238
|
-
* @returns {Vec3} -
|
|
239
|
-
*/
|
|
240
|
-
static proj_b_to_plane(b, n, def) {
|
|
241
|
-
let res = b.sub(n.scaleTo(n.dot(b) / n.dot(n)));
|
|
242
|
-
if (def && res.isZero()) {
|
|
243
|
-
return new Vec3(def.x, def.y, def.z);
|
|
244
|
-
}
|
|
245
|
-
return res;
|
|
246
|
-
}
|
|
247
|
-
/**
|
|
248
|
-
* Get projection of the first vector to the second.
|
|
249
|
-
* @static
|
|
250
|
-
* @param {Vec3} b - First vector.
|
|
251
|
-
* @param {Vec3} a - Second vector.
|
|
252
|
-
* @returns {Vec3} -
|
|
253
|
-
*/
|
|
254
|
-
static proj_b_to_a(b, a) {
|
|
255
|
-
return a.scaleTo(a.dot(b) / a.dot(a));
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* Makes vectors normalized and orthogonal to each other.
|
|
259
|
-
* Normalizes normal. Normalizes tangent and makes sure it is orthogonal to normal (that is, angle between them is 90 degrees).
|
|
260
|
-
* @static
|
|
261
|
-
* @param {Vec3} normal - Normal vector.
|
|
262
|
-
* @param {Vec3} tangent - Tangent vector.
|
|
263
|
-
* @returns {Vec3} -
|
|
264
|
-
*/
|
|
265
|
-
static orthoNormalize(normal, tangent) {
|
|
266
|
-
normal = normal.getNormal();
|
|
267
|
-
normal.scale(tangent.dot(normal));
|
|
268
|
-
return tangent.subA(normal).normalize();
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* Returns vector components division product one to another.
|
|
272
|
-
* @static
|
|
273
|
-
* @param {Vec3} a - First vector.
|
|
274
|
-
* @param {Vec3} b - Second vector.
|
|
275
|
-
* @returns {Vec3} -
|
|
276
|
-
*/
|
|
277
|
-
static div(a, b) {
|
|
278
|
-
let res = new Vec3(a.x, a.y, a.z);
|
|
279
|
-
res.divA(b);
|
|
280
|
-
return res;
|
|
281
|
-
}
|
|
282
|
-
static length2(a) {
|
|
283
|
-
return a.length2();
|
|
284
|
-
}
|
|
285
|
-
// static length(a: Vec3): number {
|
|
286
|
-
// return a.length();
|
|
287
|
-
// }
|
|
288
|
-
static dot(a, b) {
|
|
289
|
-
return a.dot(b);
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
* Converts to 4d vector, Fourth value is 1.0.
|
|
293
|
-
* @public
|
|
294
|
-
* @returns {Vec4} -
|
|
295
|
-
*/
|
|
296
|
-
toVec4() {
|
|
297
|
-
return new Vec4(this.x, this.y, this.z, 1.0);
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* Returns clone vector.
|
|
301
|
-
* @public
|
|
302
|
-
* @returns {Vec3} -
|
|
303
|
-
*/
|
|
304
|
-
clone() {
|
|
305
|
-
return new Vec3(this.x, this.y, this.z);
|
|
306
|
-
}
|
|
307
|
-
/**
|
|
308
|
-
* Converts vector to text string.
|
|
309
|
-
* @public
|
|
310
|
-
* @returns {string} -
|
|
311
|
-
*/
|
|
312
|
-
toString() {
|
|
313
|
-
return `(${this.x},${this.y},${this.z})`;
|
|
314
|
-
}
|
|
315
|
-
/**
|
|
316
|
-
* Returns true if vector's values are zero.
|
|
317
|
-
* @public
|
|
318
|
-
* @returns {boolean} -
|
|
319
|
-
*/
|
|
320
|
-
isZero() {
|
|
321
|
-
return !(this.x || this.y || this.z);
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* Get projection of the first vector to the second.
|
|
325
|
-
* @static
|
|
326
|
-
* @param {Vec3} a - Project vector.
|
|
327
|
-
* @returns {Vec3} -
|
|
328
|
-
*/
|
|
329
|
-
projToVec(a) {
|
|
330
|
-
return a.scaleTo(a.dot(this) / a.dot(a));
|
|
331
|
-
}
|
|
332
|
-
/**
|
|
333
|
-
* Compares with vector. Returns true if it equals another.
|
|
334
|
-
* @public
|
|
335
|
-
* @param {Vec3} p - Vector to compare.
|
|
336
|
-
* @returns {boolean} -
|
|
337
|
-
*/
|
|
338
|
-
equal(p) {
|
|
339
|
-
return this.x === p.x && this.y === p.y && this.z === p.z;
|
|
340
|
-
}
|
|
341
|
-
/**
|
|
342
|
-
* Copy input vector's values.
|
|
343
|
-
* @param {Vec3} p - Vector to copy.
|
|
344
|
-
* @returns {Vec3} -
|
|
345
|
-
*/
|
|
346
|
-
copy(p) {
|
|
347
|
-
this.x = p.x;
|
|
348
|
-
this.y = p.y;
|
|
349
|
-
this.z = p.z;
|
|
350
|
-
return this;
|
|
351
|
-
}
|
|
352
|
-
/**
|
|
353
|
-
* Gets vector's length.
|
|
354
|
-
* @public
|
|
355
|
-
* @returns {number} -
|
|
356
|
-
*/
|
|
357
|
-
length() {
|
|
358
|
-
return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
|
|
359
|
-
}
|
|
360
|
-
/**
|
|
361
|
-
* Returns squared vector's length.
|
|
362
|
-
* @public
|
|
363
|
-
* @returns {number} -
|
|
364
|
-
*/
|
|
365
|
-
length2() {
|
|
366
|
-
return this.x * this.x + this.y * this.y + this.z * this.z;
|
|
367
|
-
}
|
|
368
|
-
/**
|
|
369
|
-
* Converts vector's values to a quaternion object.
|
|
370
|
-
* @public
|
|
371
|
-
* @returns {Quat} -
|
|
372
|
-
*/
|
|
373
|
-
getQuat() {
|
|
374
|
-
return new Quat(this.x, this.y, this.z);
|
|
375
|
-
}
|
|
376
|
-
/**
|
|
377
|
-
* Adds vector to the current.
|
|
378
|
-
* @public
|
|
379
|
-
* @param {Vec3} p - Point to add.
|
|
380
|
-
* @returns {Vec3} -
|
|
381
|
-
*/
|
|
382
|
-
addA(p) {
|
|
383
|
-
this.x += p.x;
|
|
384
|
-
this.y += p.y;
|
|
385
|
-
this.z += p.z;
|
|
386
|
-
return this;
|
|
387
|
-
}
|
|
388
|
-
/**
|
|
389
|
-
* Gets two vectors summarization.
|
|
390
|
-
* @public
|
|
391
|
-
* @param {Vec3} p - Vector to add.
|
|
392
|
-
* @returns {Vec3} Returns a sum vector.
|
|
393
|
-
*/
|
|
394
|
-
add(p) {
|
|
395
|
-
return new Vec3(this.x + p.x, this.y + p.y, this.z + p.z);
|
|
396
|
-
}
|
|
397
|
-
/**
|
|
398
|
-
* Gets two vectors summarization.
|
|
399
|
-
* @public
|
|
400
|
-
* @param {Vec3} p - Vector to add.
|
|
401
|
-
* @returns {Vec3} Returns a sum vector.
|
|
402
|
-
*/
|
|
403
|
-
addRes(p, res) {
|
|
404
|
-
return res.set(this.x + p.x, this.y + p.y, this.z + p.z);
|
|
405
|
-
}
|
|
406
|
-
/**
|
|
407
|
-
* Subtract vector from the current.
|
|
408
|
-
* @public
|
|
409
|
-
* @param {Vec3} p - Subtract vector.
|
|
410
|
-
* @returns {Vec3} -
|
|
411
|
-
*/
|
|
412
|
-
subA(p) {
|
|
413
|
-
this.x -= p.x;
|
|
414
|
-
this.y -= p.y;
|
|
415
|
-
this.z -= p.z;
|
|
416
|
-
return this;
|
|
417
|
-
}
|
|
418
|
-
/**
|
|
419
|
-
* Gets vector subtraction.
|
|
420
|
-
* @public
|
|
421
|
-
* @param {Vec3} p - Subtract vector.
|
|
422
|
-
* @return {Vec3} Returns new instance of a subtraction
|
|
423
|
-
*/
|
|
424
|
-
sub(p) {
|
|
425
|
-
return new Vec3(this.x - p.x, this.y - p.y, this.z - p.z);
|
|
426
|
-
}
|
|
427
|
-
/**
|
|
428
|
-
* Scale current vector.
|
|
429
|
-
* @public
|
|
430
|
-
* @param {number} scale - Scale value.
|
|
431
|
-
* @returns {Vec3} -
|
|
432
|
-
*/
|
|
433
|
-
scale(scale) {
|
|
434
|
-
this.x *= scale;
|
|
435
|
-
this.y *= scale;
|
|
436
|
-
this.z *= scale;
|
|
437
|
-
return this;
|
|
438
|
-
}
|
|
439
|
-
/**
|
|
440
|
-
* Scale current vector to another instance.
|
|
441
|
-
* @public
|
|
442
|
-
* @param {number} scale - Scale value.
|
|
443
|
-
* @returns {Vec3} -
|
|
444
|
-
*/
|
|
445
|
-
scaleTo(scale) {
|
|
446
|
-
return new Vec3(this.x * scale, this.y * scale, this.z * scale);
|
|
447
|
-
}
|
|
448
|
-
/**
|
|
449
|
-
* Multiply current vector object to another and store result in the current instance.
|
|
450
|
-
* @public
|
|
451
|
-
* @param {Vec3} vec - Multiply vector.
|
|
452
|
-
* @returns {Vec3} -
|
|
453
|
-
*/
|
|
454
|
-
mulA(vec) {
|
|
455
|
-
this.x *= vec.x;
|
|
456
|
-
this.y *= vec.y;
|
|
457
|
-
this.z *= vec.z;
|
|
458
|
-
return this;
|
|
459
|
-
}
|
|
460
|
-
/**
|
|
461
|
-
* Multiply current vector object to another and returns new vector instance.
|
|
462
|
-
* @public
|
|
463
|
-
* @param {Vec3} vec - Multiply vector.
|
|
464
|
-
* @returns {Vec3} -
|
|
465
|
-
*/
|
|
466
|
-
mul(vec) {
|
|
467
|
-
return new Vec3(this.x * vec.x, this.y * vec.y, this.z * vec.z);
|
|
468
|
-
}
|
|
469
|
-
/**
|
|
470
|
-
* Multiply current vector object to another and returns new vector instance.
|
|
471
|
-
* @public
|
|
472
|
-
* @param {Vec3} vec - Multiply vector.
|
|
473
|
-
* @returns {Vec3} -
|
|
474
|
-
*/
|
|
475
|
-
mulRes(vec, res) {
|
|
476
|
-
return res.set(this.x * vec.x, this.y * vec.y, this.z * vec.z);
|
|
477
|
-
}
|
|
478
|
-
/**
|
|
479
|
-
* Divide current vector's components to another. Results stores in the current vector object.
|
|
480
|
-
* @public
|
|
481
|
-
* @param {Vec3} vec - Div vector.
|
|
482
|
-
* @returns {Vec3} -
|
|
483
|
-
*/
|
|
484
|
-
divA(vec) {
|
|
485
|
-
this.x /= vec.x;
|
|
486
|
-
this.y /= vec.y;
|
|
487
|
-
this.z /= vec.z;
|
|
488
|
-
return this;
|
|
489
|
-
}
|
|
490
|
-
/**
|
|
491
|
-
* Divide current vector's components to another and returns new vector instance.
|
|
492
|
-
* @public
|
|
493
|
-
* @param {Vec3} vec - Div vector.
|
|
494
|
-
* @returns {Vec3} -
|
|
495
|
-
*/
|
|
496
|
-
div(vec) {
|
|
497
|
-
return new Vec3(this.x / vec.x, this.y / vec.y, this.z / vec.z);
|
|
498
|
-
}
|
|
499
|
-
/**
|
|
500
|
-
* Gets vectors dot production.
|
|
501
|
-
* @public
|
|
502
|
-
* @param {Vec3} a - Another vector.
|
|
503
|
-
* @returns {number} -
|
|
504
|
-
*/
|
|
505
|
-
dot(a) {
|
|
506
|
-
return a.x * this.x + a.y * this.y + a.z * this.z;
|
|
507
|
-
}
|
|
508
|
-
/**
|
|
509
|
-
* Gets vectors dot production.
|
|
510
|
-
* @public
|
|
511
|
-
* @param {Array.<number>} arr - Array vector. (exactly 3 entries)
|
|
512
|
-
* @returns {number} -
|
|
513
|
-
*/
|
|
514
|
-
dotArr(arr) {
|
|
515
|
-
return arr[0] * this.x + arr[1] * this.y + arr[2] * this.z;
|
|
516
|
-
}
|
|
517
|
-
/**
|
|
518
|
-
* Gets vectors cross production.
|
|
519
|
-
* @public
|
|
520
|
-
* @param {Vec3} point3 - Another vector.
|
|
521
|
-
* @returns {Vec3} -
|
|
522
|
-
*/
|
|
523
|
-
cross(point3) {
|
|
524
|
-
return new Vec3(this.y * point3.z - this.z * point3.y, this.z * point3.x - this.x * point3.z, this.x * point3.y - this.y * point3.x);
|
|
525
|
-
}
|
|
526
|
-
/**
|
|
527
|
-
* Sets vector to zero.
|
|
528
|
-
* @public
|
|
529
|
-
* @returns {Vec3} -
|
|
530
|
-
*/
|
|
531
|
-
clear() {
|
|
532
|
-
this.x = this.y = this.z = 0;
|
|
533
|
-
return this;
|
|
534
|
-
}
|
|
535
|
-
/**
|
|
536
|
-
* Returns normalized vector.
|
|
537
|
-
* @public
|
|
538
|
-
* @returns {Vec3} -
|
|
539
|
-
*/
|
|
540
|
-
getNormal() {
|
|
541
|
-
let res = new Vec3();
|
|
542
|
-
res.copy(this);
|
|
543
|
-
let length = 1.0 / res.length();
|
|
544
|
-
res.x *= length;
|
|
545
|
-
res.y *= length;
|
|
546
|
-
res.z *= length;
|
|
547
|
-
return res;
|
|
548
|
-
}
|
|
549
|
-
/**
|
|
550
|
-
* Returns normalized vector.
|
|
551
|
-
* @deprecated
|
|
552
|
-
* @public
|
|
553
|
-
* @returns {Vec3} -
|
|
554
|
-
*/
|
|
555
|
-
normal() {
|
|
556
|
-
let res = new Vec3();
|
|
557
|
-
res.copy(this);
|
|
558
|
-
let length = 1.0 / res.length();
|
|
559
|
-
res.x *= length;
|
|
560
|
-
res.y *= length;
|
|
561
|
-
res.z *= length;
|
|
562
|
-
return res;
|
|
563
|
-
}
|
|
564
|
-
/**
|
|
565
|
-
* Returns normalized negate vector.
|
|
566
|
-
* @public
|
|
567
|
-
* @returns {Vec3} -
|
|
568
|
-
*/
|
|
569
|
-
normalNegate() {
|
|
570
|
-
let res = new Vec3();
|
|
571
|
-
res.copy(this);
|
|
572
|
-
let length = -1.0 / res.length();
|
|
573
|
-
res.x *= length;
|
|
574
|
-
res.y *= length;
|
|
575
|
-
res.z *= length;
|
|
576
|
-
return res;
|
|
577
|
-
}
|
|
578
|
-
/**
|
|
579
|
-
* Returns normalized negate scale vector.
|
|
580
|
-
* @public
|
|
581
|
-
* @returns {Vec3} -
|
|
582
|
-
*/
|
|
583
|
-
normalNegateScale(scale) {
|
|
584
|
-
let res = new Vec3();
|
|
585
|
-
res.copy(this);
|
|
586
|
-
let length = -scale / res.length();
|
|
587
|
-
res.x *= length;
|
|
588
|
-
res.y *= length;
|
|
589
|
-
res.z *= length;
|
|
590
|
-
return res;
|
|
591
|
-
}
|
|
592
|
-
/**
|
|
593
|
-
* Returns normalized scale vector.
|
|
594
|
-
* @public
|
|
595
|
-
* @returns {Vec3} -
|
|
596
|
-
*/
|
|
597
|
-
normalScale(scale) {
|
|
598
|
-
let res = new Vec3();
|
|
599
|
-
res.copy(this);
|
|
600
|
-
let length = scale / res.length();
|
|
601
|
-
res.x *= length;
|
|
602
|
-
res.y *= length;
|
|
603
|
-
res.z *= length;
|
|
604
|
-
return res;
|
|
605
|
-
}
|
|
606
|
-
/**
|
|
607
|
-
* Normalize current vector.
|
|
608
|
-
* @public
|
|
609
|
-
* @returns {Vec3} -
|
|
610
|
-
*/
|
|
611
|
-
normalize() {
|
|
612
|
-
let length = 1.0 / this.length();
|
|
613
|
-
this.x *= length;
|
|
614
|
-
this.y *= length;
|
|
615
|
-
this.z *= length;
|
|
616
|
-
return this;
|
|
617
|
-
}
|
|
618
|
-
/**
|
|
619
|
-
* Converts vector to a number array.
|
|
620
|
-
* @public
|
|
621
|
-
* @returns {Array.<number>} - (exactly 3 entries)
|
|
622
|
-
* @deprecated
|
|
623
|
-
*/
|
|
624
|
-
toVec() {
|
|
625
|
-
return [this.x, this.y, this.z];
|
|
626
|
-
}
|
|
627
|
-
/**
|
|
628
|
-
* Converts vector to a number array.
|
|
629
|
-
* @public
|
|
630
|
-
* @returns {Array.<number>} - (exactly 3 entries)
|
|
631
|
-
*/
|
|
632
|
-
toArray() {
|
|
633
|
-
return [this.x, this.y, this.z];
|
|
634
|
-
}
|
|
635
|
-
/**
|
|
636
|
-
* Gets distance to point.
|
|
637
|
-
* @public
|
|
638
|
-
* @param {Vec3} p - Distant point.
|
|
639
|
-
* @returns {number} -
|
|
640
|
-
*/
|
|
641
|
-
distance(p) {
|
|
642
|
-
let dx = this.x - p.x, dy = this.y - p.y, dz = this.z - p.z;
|
|
643
|
-
return Math.sqrt(dx * dx + dy * dy + dz * dz);
|
|
644
|
-
}
|
|
645
|
-
/**
|
|
646
|
-
* Gets square distance to point.
|
|
647
|
-
* @public
|
|
648
|
-
* @param {Vec3} p - Distant point.
|
|
649
|
-
* @returns {number} -
|
|
650
|
-
*/
|
|
651
|
-
distance2(p) {
|
|
652
|
-
let dx = this.x - p.x, dy = this.y - p.y, dz = this.z - p.z;
|
|
653
|
-
return dx * dx + dy * dy + dz * dz;
|
|
654
|
-
}
|
|
655
|
-
/**
|
|
656
|
-
* Sets vector's values.
|
|
657
|
-
* @public
|
|
658
|
-
* @param {number} x - Value X.
|
|
659
|
-
* @param {number} y - Value Y.
|
|
660
|
-
* @param {number} z - Value Z.
|
|
661
|
-
* @returns {Vec3} -
|
|
662
|
-
*/
|
|
663
|
-
set(x, y, z) {
|
|
664
|
-
this.x = x;
|
|
665
|
-
this.y = y;
|
|
666
|
-
this.z = z;
|
|
667
|
-
return this;
|
|
668
|
-
}
|
|
669
|
-
/**
|
|
670
|
-
* Negate current vector.
|
|
671
|
-
* @public
|
|
672
|
-
* @returns {Vec3} -
|
|
673
|
-
*/
|
|
674
|
-
negate() {
|
|
675
|
-
this.x = -this.x;
|
|
676
|
-
this.y = -this.y;
|
|
677
|
-
this.z = -this.z;
|
|
678
|
-
return this;
|
|
679
|
-
}
|
|
680
|
-
/**
|
|
681
|
-
* Negate current vector to another instance.
|
|
682
|
-
* @public
|
|
683
|
-
* @returns {Vec3} -
|
|
684
|
-
*/
|
|
685
|
-
negateTo() {
|
|
686
|
-
return new Vec3(-this.x, -this.y, -this.z);
|
|
687
|
-
}
|
|
688
|
-
/**
|
|
689
|
-
* Gets projected point coordinates of the current vector on the ray.
|
|
690
|
-
* @public
|
|
691
|
-
* @param {Vec3} pos - Ray position.
|
|
692
|
-
* @param {Vec3} direction - Ray direction.
|
|
693
|
-
* @returns {Vec3} -
|
|
694
|
-
*/
|
|
695
|
-
projToRay(pos, direction) {
|
|
696
|
-
let v = Vec3.proj_b_to_a(Vec3.sub(this, pos), direction);
|
|
697
|
-
v.addA(pos);
|
|
698
|
-
return v;
|
|
699
|
-
}
|
|
700
|
-
/**
|
|
701
|
-
* Gets angle between two vectors.
|
|
702
|
-
* @public
|
|
703
|
-
* @param {Vec3} a - Another vector.
|
|
704
|
-
* @returns {number} -
|
|
705
|
-
*/
|
|
706
|
-
angle(a) {
|
|
707
|
-
return Vec3.angle(this, a);
|
|
708
|
-
}
|
|
709
|
-
/**
|
|
710
|
-
* Returns two vectors linear interpolation.
|
|
711
|
-
* @public
|
|
712
|
-
* @param {Vec3} v2 - End vector.
|
|
713
|
-
* @param {number} l - Interpolate value.
|
|
714
|
-
* @returns {Vec3} -
|
|
715
|
-
*/
|
|
716
|
-
lerp(v2, l) {
|
|
717
|
-
return new Vec3(this.x + (v2.x - this.x) * l, this.y + (v2.y - this.y) * l, this.z + (v2.z - this.z) * l);
|
|
718
|
-
}
|
|
719
|
-
/**
|
|
720
|
-
* Returns vector interpolation by v(t) = v1 * t + v2 * (1 - t)
|
|
721
|
-
* @public
|
|
722
|
-
* @param {Vec3} v2 - End vector.
|
|
723
|
-
* @param {number} t - Interpolate value.
|
|
724
|
-
* @returns {Vec3} -
|
|
725
|
-
*/
|
|
726
|
-
smerp(v2, t) {
|
|
727
|
-
let one_d = 1 - t;
|
|
728
|
-
return new Vec3(this.x * t + v2.x * one_d, this.y * t + v2.y * one_d, this.z * t + v2.z * one_d);
|
|
729
|
-
}
|
|
730
|
-
static get LERP_DELTA() {
|
|
731
|
-
return 1e-6;
|
|
732
|
-
}
|
|
733
|
-
/**
|
|
734
|
-
* Spherically interpolates between two vectors.
|
|
735
|
-
* Interpolates between current and v2 vector by amount t. The difference between this and linear interpolation (aka, "lerp") is that
|
|
736
|
-
* the vectors are treated as directions rather than points in space. The direction of the returned vector is interpolated
|
|
737
|
-
* by the angle and its magnitude is interpolated between the magnitudes of from and to.
|
|
738
|
-
* @public
|
|
739
|
-
* @param {Vec3} v2 -
|
|
740
|
-
* @param {number} t - The parameter t is clamped to the range [0, 1].
|
|
741
|
-
* @returns {Vec3} -
|
|
742
|
-
*/
|
|
743
|
-
slerp(v2, t) {
|
|
744
|
-
let res = new Vec3();
|
|
745
|
-
if (t <= 0.0) {
|
|
746
|
-
res.copy(this);
|
|
747
|
-
return res;
|
|
748
|
-
}
|
|
749
|
-
else if (t >= 1.0) {
|
|
750
|
-
res.copy(v2);
|
|
751
|
-
return res;
|
|
752
|
-
}
|
|
753
|
-
let omega, sinom, scale0, scale1;
|
|
754
|
-
let cosom = this.dot(v2);
|
|
755
|
-
if (1.0 - cosom > Vec3.LERP_DELTA) {
|
|
756
|
-
omega = Math.acos(cosom);
|
|
757
|
-
sinom = Math.sin(omega);
|
|
758
|
-
scale0 = Math.sin((1.0 - t) * omega) / sinom;
|
|
759
|
-
scale1 = Math.sin(t * omega) / sinom;
|
|
760
|
-
}
|
|
761
|
-
else {
|
|
762
|
-
scale0 = 1.0 - t;
|
|
763
|
-
scale1 = t;
|
|
764
|
-
}
|
|
765
|
-
return Vec3.add(this.scaleTo(scale0), v2.scale(scale1));
|
|
766
|
-
}
|
|
767
|
-
mulVecA(a) {
|
|
768
|
-
this.x *= a.x;
|
|
769
|
-
this.y *= a.y;
|
|
770
|
-
this.z *= a.z;
|
|
771
|
-
return this;
|
|
772
|
-
}
|
|
773
|
-
/**
|
|
774
|
-
* Gets the shortest arc quaternion to rotate this vector to the destination vector.
|
|
775
|
-
* @param {Vec3} dest -
|
|
776
|
-
* @param {Vec3} fallbackAxis -
|
|
777
|
-
* @returns {Quat} -
|
|
778
|
-
* @todo: TEST IT!
|
|
779
|
-
*/
|
|
780
|
-
getRotationTo(dest, fallbackAxis) {
|
|
781
|
-
// Based on Stan Melax's article in Game Programming Gems
|
|
782
|
-
// Copy, since cannot modify local
|
|
783
|
-
let v0 = this.clone();
|
|
784
|
-
let v1 = dest.clone();
|
|
785
|
-
v0.normalize();
|
|
786
|
-
v1.normalize();
|
|
787
|
-
let d = v0.dot(v1);
|
|
788
|
-
// If dot == 1, vectors are the same
|
|
789
|
-
if (d >= 1.0) {
|
|
790
|
-
return Quat.IDENTITY.clone();
|
|
791
|
-
}
|
|
792
|
-
if (d < 1e-6 - 1.0) {
|
|
793
|
-
if (!fallbackAxis.equal(Vec3.ZERO)) {
|
|
794
|
-
// rotate 180 degrees about the fallback axis
|
|
795
|
-
return Quat.axisAngleToQuat(fallbackAxis, Math.PI);
|
|
796
|
-
}
|
|
797
|
-
else {
|
|
798
|
-
// Generate an axis
|
|
799
|
-
let axis = Vec3.UNIT_X.cross(v0);
|
|
800
|
-
if (axis.isZero()) {
|
|
801
|
-
// pick another if colinear
|
|
802
|
-
axis = Vec3.UNIT_Y.cross(v0);
|
|
803
|
-
}
|
|
804
|
-
axis.normalize();
|
|
805
|
-
return Quat.axisAngleToQuat(axis, Math.PI);
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
else {
|
|
809
|
-
let s = Math.sqrt((1 + d) * 2);
|
|
810
|
-
let invs = 1.0 / s;
|
|
811
|
-
let c = v0.cross(v1);
|
|
812
|
-
let q = new Quat(c.x * invs, c.y * invs, c.z * invs, s * 0.5);
|
|
813
|
-
q.normalize();
|
|
814
|
-
return q;
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
/**
|
|
819
|
-
* Vector 3d object creator.
|
|
820
|
-
* @function
|
|
821
|
-
* @param {number} [x] - value X.
|
|
822
|
-
* @param {number} [y] - value Y.
|
|
823
|
-
* @param {number} [z] - value Z.
|
|
824
|
-
* @returns {Vec3} -
|
|
825
|
-
*/
|
|
826
|
-
export function vec3(x = 0, y = 0, z = 0) {
|
|
827
|
-
return new Vec3(x, y, z);
|
|
828
|
-
}
|