csyjk 1.2.2 → 2.2.2
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/{dist/app.js → app.js} +0 -0
- package/{dist/index.html → index.html} +0 -0
- package/package.json +5 -40
- package/{dist/style.css → style.css} +0 -0
- package/.babelrc +0 -7
- package/.idea/modules.xml +0 -8
- package/.idea/xx.iml +0 -12
- package/public/gltf.js +0 -2241
- package/public/index.html +0 -10
- package/src/index.js +0 -3
- package/src/lib/gltf/assets/check.jpg +0 -0
- package/src/lib/gltf/assets/iconfont/iconfont.css +0 -358
- package/src/lib/gltf/assets/iconfont/iconfont.eot +0 -0
- package/src/lib/gltf/assets/iconfont/iconfont.js +0 -1
- package/src/lib/gltf/assets/iconfont/iconfont.json +0 -604
- package/src/lib/gltf/assets/iconfont/iconfont.svg +0 -189
- package/src/lib/gltf/assets/iconfont/iconfont.ttf +0 -0
- package/src/lib/gltf/assets/iconfont/iconfont.woff +0 -0
- package/src/lib/gltf/assets/iconfont/iconfont.woff2 +0 -0
- package/src/lib/gltf/assets/yjkkit-sdk/index.js +0 -0
- package/src/lib/gltf/assets/yjkkit-sdk/package.json +0 -15
- package/src/lib/gltf/assets/yjkkit-sdk/src/extras/ContextMenu/ContextMenu.js +0 -863
- package/src/lib/gltf/assets/yjkkit-sdk/src/extras/ContextMenu/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/extras/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/index.js +0 -3
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AngleMeasurementsPlugin/AngleMeasurement.js +0 -462
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AngleMeasurementsPlugin/AngleMeasurementsControl.js +0 -279
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AngleMeasurementsPlugin/AngleMeasurementsPlugin.js +0 -262
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AngleMeasurementsPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AnnotationsPlugin/Annotation.js +0 -362
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AnnotationsPlugin/AnnotationsPlugin.js +0 -575
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AnnotationsPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AxisGizmoPlugin/AxisGizmoPlugin.js +0 -333
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AxisGizmoPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/BCFViewpointsPlugin/BCFViewpointsPlugin.js +0 -777
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/BCFViewpointsPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.js +0 -525
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControl.js +0 -242
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.js +0 -297
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/DistanceMeasurementsPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/FastNavPlugin/FastNavPlugin.js +0 -345
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/FastNavPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/GLTFDefaultDataSource.js +0 -122
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.js +0 -462
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/GLTFPerformanceModelLoader.js +0 -508
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/GLTFSceneGraphLoader.js +0 -922
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/index.js +0 -2
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/NavCubePlugin/CubeTextureCanvas.js +0 -273
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/NavCubePlugin/NavCubePlugin.js +0 -687
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/NavCubePlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/OBJLoaderPlugin/OBJLoaderPlugin.js +0 -145
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/OBJLoaderPlugin/OBJSceneGraphLoader.js +0 -777
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/OBJLoaderPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/STLLoaderPlugin/STLDefaultDataSource.js +0 -33
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/STLLoaderPlugin/STLLoaderPlugin.js +0 -273
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/STLLoaderPlugin/STLSceneGraphLoader.js +0 -313
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/STLLoaderPlugin/index.js +0 -2
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/Control.js +0 -1328
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/Overview.js +0 -249
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/Plane.js +0 -169
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/SectionPlanesPlugin.js +0 -403
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SkyboxesPlugin/SkyboxesPlugin.js +0 -134
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SkyboxesPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/IFCStoreyPlanObjectStates.js +0 -77
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/Storey.js +0 -61
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/StoreyMap.js +0 -57
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/StoreyViewsPlugin.js +0 -822
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/ModelTreeView.js +0 -888
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/TreeViewNode.js +0 -88
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/TreeViewPlugin.js +0 -624
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/modelValidation.js +0 -87
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/ViewCullPlugin/ViewCullPlugin.js +0 -295
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/ViewCullPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/XKTDefaultDataSource.js +0 -78
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/XKTLoaderPlugin.js +0 -847
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/index.js +0 -2
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV1.js +0 -167
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV2.js +0 -228
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV3.js +0 -220
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV4.js +0 -279
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV5.js +0 -244
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV6.js +0 -301
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV7.js +0 -426
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV8.js +0 -479
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/lib/pako.js +0 -6818
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/XML3DLoaderPlugin.js +0 -238
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/XML3DSceneGraphLoader.js +0 -1279
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/.jshintrc +0 -11
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/deflate.js +0 -2060
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/inflate.js +0 -2155
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/mime-types.js +0 -1002
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/pako/codecs.js +0 -64
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/z-worker.js +0 -153
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/zip-ext.js +0 -267
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/zip-fs.js +0 -553
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/zip.js +0 -991
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/zlib-asm/codecs.js +0 -49
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/index.js +0 -17
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/lib/culling/ObjectCullStates.js +0 -205
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/lib/html/Dot.js +0 -78
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/lib/html/Label.js +0 -97
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/lib/html/Wire.js +0 -95
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/Plugin.js +0 -112
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/Viewer.js +0 -372
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/index.js +0 -3
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/IFCObjectDefaultColors.js +0 -162
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/IFCObjectDefaults.js +0 -39
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/MetaModel.js +0 -145
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/MetaObject.js +0 -215
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/MetaScene.js +0 -311
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/CameraControl.js +0 -1669
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/cc.js +0 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/CameraUpdater.js +0 -312
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/controllers/PanController.js +0 -112
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/controllers/PickController.js +0 -193
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/controllers/PivotController.js +0 -289
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/cu.js +0 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/KeyboardAxisViewHandler.js +0 -122
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/KeyboardPanRotateDollyHandler.js +0 -186
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/MouseMiscHandler.js +0 -68
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/MousePanRotateDollyHandler.js +0 -439
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/MousePickHandler.js +0 -361
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/TouchPanRotateAndDollyHandler.js +0 -258
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/TouchPickHandler.js +0 -197
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/mouspan.js +0 -498
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/Component.js +0 -908
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/Entity.js +0 -475
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/ImagePlane/ImagePlane.js +0 -570
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/ImagePlane/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/PerformanceModel.js +0 -2623
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/ENTITY_FLAGS.js +0 -21
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/PerformanceMesh.js +0 -262
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/PerformanceNode.js +0 -697
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/RENDER_PASSES.js +0 -34
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/ScratchMemory.js +0 -63
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/compression.js +0 -183
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/LinesBatchingBuffer.js +0 -33
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/LinesBatchingLayer.js +0 -736
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/LinesBatchingRenderers.js +0 -68
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/renderers/LinesBatchingColorRenderer.js +0 -295
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/renderers/LinesBatchingSilhouetteRenderer.js +0 -327
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesInstancing/LinesInstancingLayer.js +0 -698
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesInstancing/LinesInstancingRenderers.js +0 -68
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesInstancing/renderers/LinesInstancingColorRenderer.js +0 -364
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesInstancing/renderers/LinesInstancingSilhouetteRenderer.js +0 -356
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/PointsBatchingBuffer.js +0 -33
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/PointsBatchingLayer.js +0 -776
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/PointsBatchingRenderers.js +0 -113
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingColorRenderer.js +0 -340
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingOcclusionRenderer.js +0 -312
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingPickDepthRenderer.js +0 -343
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingPickMeshRenderer.js +0 -331
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingShadowRenderer.js +0 -242
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingSilhouetteRenderer.js +0 -348
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/PointsInstancingLayer.js +0 -737
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/PointsInstancingRenderers.js +0 -143
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingColorRenderer.js +0 -373
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingDepthRenderer.js +0 -366
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingOcclusionRenderer.js +0 -370
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingPickDepthRenderer.js +0 -386
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingPickMeshRenderer.js +0 -376
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingShadowRenderer.js +0 -293
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingSilhouetteRenderer.js +0 -382
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/TrianglesBatchingBuffer.js +0 -37
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/TrianglesBatchingLayer.js +0 -1017
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/TrianglesBatchingRenderers.js +0 -246
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingColorQualityRenderer.js +0 -809
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingColorRenderer.js +0 -504
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingDepthRenderer.js +0 -297
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingEdgesColorRenderer.js +0 -300
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingEdgesRenderer.js +0 -322
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingNormalsRenderer.js +0 -311
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingOcclusionRenderer.js +0 -291
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingPickDepthRenderer.js +0 -319
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingPickMeshRenderer.js +0 -305
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingPickNormalsRenderer.js +0 -300
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingShadowRenderer.js +0 -242
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingSilhouetteRenderer.js +0 -323
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/TrianglesInstancingLayer.js +0 -969
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/TrianglesInstancingRenderers.js +0 -246
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingColorQualityRenderer.js +0 -859
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingColorRenderer.js +0 -557
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingDepthRenderer.js +0 -341
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingEdgesColorRenderer.js +0 -338
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingEdgesRenderer.js +0 -356
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingNormalsRenderer.js +0 -354
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingOcclusionRenderer.js +0 -329
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingPickDepthRenderer.js +0 -358
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingPickMeshRenderer.js +0 -349
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingPickNormalsRenderer.js +0 -363
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingShadowRenderer.js +0 -284
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingSilhouetteRenderer.js +0 -354
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/Camera.js +0 -880
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/CameraFlightAnimation.js +0 -669
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/CameraPath.js +0 -194
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/CameraPathAnimation.js +0 -326
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/CustomProjection.js +0 -149
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/Frustum.js +0 -316
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/Ortho.js +0 -286
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/Perspective.js +0 -302
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/index.js +0 -2
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/canvas/Canvas.js +0 -464
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/canvas/Spinner.js +0 -323
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/core.js +0 -234
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/Geometry.js +0 -33
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/ReadableGeometry.js +0 -689
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/VBOGeometry.js +0 -327
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildBoxGeometry.js +0 -238
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildBoxLinesGeometry.js +0 -106
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildCylinderGeometry.js +0 -271
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildGridGeometry.js +0 -102
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildPlaneGeometry.js +0 -168
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildSphereGeometry.js +0 -161
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildTorusGeometry.js +0 -172
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildVectorTextGeometry.js +0 -1721
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/index.js +0 -8
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/index.js +0 -4
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/loaders/index.js +0 -2
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/loaders/load3DSGeometry.js +0 -103
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/loaders/loadOBJGeometry.js +0 -130
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/index.js +0 -18
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/input/Input.js +0 -1475
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/libs/canvas2image.js +0 -218
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/libs/k3d.js +0 -1032
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/AmbientLight.js +0 -175
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/CubeTexture.js +0 -156
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/DirLight.js +0 -314
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/Light.js +0 -29
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/LightMap.js +0 -77
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/PointLight.js +0 -395
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/ReflectionMap.js +0 -79
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/Shadow.js +0 -138
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/index.js +0 -5
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/marker/Marker.js +0 -382
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/marker/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/EdgeMaterial.js +0 -359
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/EmphasisMaterial.js +0 -577
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/Fresnel.js +0 -222
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/LambertMaterial.js +0 -378
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/LinesMaterial.js +0 -169
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/Material.js +0 -39
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/MetallicMaterial.js +0 -820
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/PhongMaterial.js +0 -860
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/PointsMaterial.js +0 -320
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/SpecularMaterial.js +0 -807
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/Texture.js +0 -522
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/index.js +0 -8
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/Frustum.js +0 -118
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/buildEdgeIndices.js +0 -162
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/geometryCompressionUtils.js +0 -353
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/math.js +0 -5302
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/rtcCoords.js +0 -132
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mementos/CameraMemento.js +0 -200
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mementos/ModelMemento.js +0 -272
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mementos/ObjectsMemento.js +0 -259
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mementos/index.js +0 -3
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/Mesh.js +0 -2165
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/draw/DrawRenderer.js +0 -978
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/draw/DrawShaderSource.js +0 -1566
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/emphasis/EmphasisEdgesRenderer.js +0 -249
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/emphasis/EmphasisEdgesShaderSource.js +0 -163
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/emphasis/EmphasisFillRenderer.js +0 -276
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/emphasis/EmphasisFillShaderSource.js +0 -269
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/occlusion/OcclusionRenderer.js +0 -207
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/occlusion/OcclusionShaderSource.js +0 -156
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/pick/PickMeshRenderer.js +0 -210
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/pick/PickMeshShaderSource.js +0 -146
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/pick/PickTriangleRenderer.js +0 -186
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/pick/PickTriangleShaderSource.js +0 -120
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/shadow/ShadowRenderer.js +0 -214
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/shadow/ShadowShaderSource.js +0 -96
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/metriqs/Metriqs.js +0 -259
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/nodes/Node.js +0 -1356
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/nodes/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/CubicBezierCurve.js +0 -194
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/Curve.js +0 -183
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/Path.js +0 -239
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/QuadraticBezierCurve.js +0 -161
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/SplineCurve.js +0 -133
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/index.js +0 -5
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/postfx/SAO.js +0 -547
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/scene/Scene.js +0 -2481
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/sectionPlane/SectionPlane.js +0 -194
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/sectionPlane/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/skybox/Skybox.js +0 -119
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/skybox/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/stats.js +0 -45
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/utils/Map.js +0 -45
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/utils/Queue.js +0 -56
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/utils/index.js +0 -2
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/utils.js +0 -452
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/viewport/Viewport.js +0 -212
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/ArrayBuf.js +0 -121
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Attribute.js +0 -23
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Drawable.js +0 -270
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/FrameContext.js +0 -259
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/PickResult.js +0 -317
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Pickable.js +0 -69
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Program.js +0 -179
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/RenderBuffer.js +0 -315
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/RenderFlags.js +0 -203
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/RenderState.js +0 -40
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Renderer.js +0 -1300
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Sampler.js +0 -18
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Shader.js +0 -49
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Texture2D.js +0 -217
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/occlusion/OcclusionLayer.js +0 -214
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/occlusion/OcclusionTester.js +0 -432
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/sao/SAODepthLimitedBlurRenderer.js +0 -326
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/sao/SAOOcclusionRenderer.js +0 -375
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/webglEnums.js +0 -61
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webglInfo.js +0 -48
- package/src/lib/gltf/gltf.css +0 -392
- package/src/lib/gltf/gltf.js +0 -2241
- package/webpack.config.js +0 -70
|
@@ -1,669 +0,0 @@
|
|
|
1
|
-
import {math} from '../math/math.js';
|
|
2
|
-
import {utils} from '../utils.js';
|
|
3
|
-
import {core} from '../core.js';
|
|
4
|
-
import {Component} from '../Component.js';
|
|
5
|
-
|
|
6
|
-
const tempVec3 = math.vec3();
|
|
7
|
-
const newLook = math.vec3();
|
|
8
|
-
const newEye = math.vec3();
|
|
9
|
-
const newUp = math.vec3();
|
|
10
|
-
const newLookEyeVec = math.vec3();
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @desc Jumps or flies the {@link Scene}'s {@link Camera} to a given target.
|
|
14
|
-
*
|
|
15
|
-
* * Located at {@link Viewer#cameraFlight}
|
|
16
|
-
* * Can fly or jump to its target.
|
|
17
|
-
* * While flying, can be stopped, or redirected to a different target.
|
|
18
|
-
* * Can also smoothly transition between ortho and perspective projections.
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* A CameraFlightAnimation's target can be:
|
|
22
|
-
*
|
|
23
|
-
* * specific ````eye````, ````look```` and ````up```` positions,
|
|
24
|
-
* * an axis-aligned World-space bounding box (AABB), or
|
|
25
|
-
* * an instance or ID of any {@link Component} subtype that provides a World-space AABB.
|
|
26
|
-
*
|
|
27
|
-
* A target can also contain a ````projection```` type to transition into. For example, if your {@link Camera#projection} is
|
|
28
|
-
* currently ````"perspective"```` and you supply {@link CameraFlightAnimation#flyTo} with a ````projection```` property
|
|
29
|
-
* equal to "ortho", then CameraFlightAnimation will smoothly transition the Camera into an orthographic projection.
|
|
30
|
-
*
|
|
31
|
-
* Configure {@link CameraFlightAnimation#fit} and {@link CameraFlightAnimation#fitFOV} to make it stop at the point
|
|
32
|
-
* where the target occupies a certain amount of the field-of-view.
|
|
33
|
-
*
|
|
34
|
-
* ## Flying to an Entity
|
|
35
|
-
*
|
|
36
|
-
* Flying to an {@link Entity}:
|
|
37
|
-
*
|
|
38
|
-
* ````Javascript
|
|
39
|
-
* var entity = new Mesh(viewer.scene);
|
|
40
|
-
*
|
|
41
|
-
* // Fly to the Entity's World-space AABB
|
|
42
|
-
* viewer.cameraFlight.flyTo(entity);
|
|
43
|
-
* ````
|
|
44
|
-
* ## Flying to a Position
|
|
45
|
-
*
|
|
46
|
-
* Flying the CameraFlightAnimation from the previous example to specified eye, look and up positions:
|
|
47
|
-
*
|
|
48
|
-
* ````Javascript
|
|
49
|
-
* viewer.cameraFlight.flyTo({
|
|
50
|
-
* eye: [-5,-5,-5],
|
|
51
|
-
* look: [0,0,0]
|
|
52
|
-
* up: [0,1,0],
|
|
53
|
-
* duration: 1 // Default, seconds
|
|
54
|
-
* },() => {
|
|
55
|
-
* // Done
|
|
56
|
-
* });
|
|
57
|
-
* ````
|
|
58
|
-
*
|
|
59
|
-
* ## Flying to an AABB
|
|
60
|
-
*
|
|
61
|
-
* Flying the CameraFlightAnimation from the previous two examples explicitly to the {@link Boundary3D"}}Boundary3D's{{/crossLink}}
|
|
62
|
-
* axis-aligned bounding box:
|
|
63
|
-
*
|
|
64
|
-
* ````Javascript
|
|
65
|
-
* viewer.cameraFlight.flyTo(entity.aabb);
|
|
66
|
-
* ````
|
|
67
|
-
*
|
|
68
|
-
* ## Transitioning Between Projections
|
|
69
|
-
*
|
|
70
|
-
* CameraFlightAnimation also allows us to smoothly transition between Camera projections. We can do that by itself, or
|
|
71
|
-
* in addition to flying the Camera to a target.
|
|
72
|
-
*
|
|
73
|
-
* Let's transition the Camera to orthographic projection:
|
|
74
|
-
*
|
|
75
|
-
* [[Run example](http://yjkkit.github.io/yjkkit-sdk/examples/#camera_CameraFlightAnimation_projection)]
|
|
76
|
-
*
|
|
77
|
-
* ````Javascript
|
|
78
|
-
* viewer.cameraFlight.flyTo({ projection: "ortho", () => {
|
|
79
|
-
* // Done
|
|
80
|
-
* });
|
|
81
|
-
* ````
|
|
82
|
-
*
|
|
83
|
-
* Now let's transition the Camera back to perspective projection:
|
|
84
|
-
*
|
|
85
|
-
* ````Javascript
|
|
86
|
-
* viewer.cameraFlight.flyTo({ projection: "perspective"}, () => {
|
|
87
|
-
* // Done
|
|
88
|
-
* });
|
|
89
|
-
* ````
|
|
90
|
-
*
|
|
91
|
-
* Fly Camera to a position, while transitioning to orthographic projection:
|
|
92
|
-
*
|
|
93
|
-
* ````Javascript
|
|
94
|
-
* viewer.cameraFlight.flyTo({
|
|
95
|
-
* eye: [-100,20,2],
|
|
96
|
-
* look: [0,0,-40],
|
|
97
|
-
* up: [0,1,0],
|
|
98
|
-
* projection: "ortho", () => {
|
|
99
|
-
* // Done
|
|
100
|
-
* });
|
|
101
|
-
* ````
|
|
102
|
-
*/
|
|
103
|
-
class CameraFlightAnimation extends Component {
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* @private
|
|
107
|
-
*/
|
|
108
|
-
get type() {
|
|
109
|
-
return "CameraFlightAnimation";
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
@constructor
|
|
114
|
-
@private
|
|
115
|
-
*/
|
|
116
|
-
constructor(owner, cfg = {}) {
|
|
117
|
-
|
|
118
|
-
super(owner, cfg);
|
|
119
|
-
|
|
120
|
-
this._look1 = math.vec3();
|
|
121
|
-
this._eye1 = math.vec3();
|
|
122
|
-
this._up1 = math.vec3();
|
|
123
|
-
this._look2 = math.vec3();
|
|
124
|
-
this._eye2 = math.vec3();
|
|
125
|
-
this._up2 = math.vec3();
|
|
126
|
-
this._orthoScale1 = 1;
|
|
127
|
-
this._orthoScale2 = 1;
|
|
128
|
-
this._flying = false;
|
|
129
|
-
this._flyEyeLookUp = false;
|
|
130
|
-
this._flyingEye = false;
|
|
131
|
-
this._flyingLook = false;
|
|
132
|
-
this._callback = null;
|
|
133
|
-
this._callbackScope = null;
|
|
134
|
-
this._time1 = null;
|
|
135
|
-
this._time2 = null;
|
|
136
|
-
this.easing = cfg.easing !== false;
|
|
137
|
-
|
|
138
|
-
this.duration = cfg.duration;
|
|
139
|
-
this.fit = cfg.fit;
|
|
140
|
-
this.fitFOV = cfg.fitFOV;
|
|
141
|
-
this.trail = cfg.trail;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Flies the {@link Camera} to a target.
|
|
146
|
-
*
|
|
147
|
-
* * When the target is a boundary, the {@link Camera} will fly towards the target and stop when the target fills most of the canvas.
|
|
148
|
-
* * When the target is an explicit {@link Camera} position, given as ````eye````, ````look```` and ````up````, then CameraFlightAnimation will interpolate the {@link Camera} to that target and stop there.
|
|
149
|
-
*
|
|
150
|
-
* @param {Object|Component} [params=Scene] Either a parameters object or a {@link Component} subtype that has
|
|
151
|
-
* an AABB. Defaults to the {@link Scene}, which causes the {@link Camera} to fit the Scene in view.
|
|
152
|
-
* @param {Number} [params.arc=0] Factor in range ````[0..1]```` indicating how much the {@link Camera#eye} position
|
|
153
|
-
* will swing away from its {@link Camera#look} position as it flies to the target.
|
|
154
|
-
* @param {Number|String|Component} [params.component] ID or instance of a component to fly to. Defaults to the entire {@link Scene}.
|
|
155
|
-
* @param {Number[]} [params.aabb] World-space axis-aligned bounding box (AABB) target to fly to.
|
|
156
|
-
* @param {Number[]} [params.eye] Position to fly the eye position to.
|
|
157
|
-
* @param {Number[]} [params.look] Position to fly the look position to.
|
|
158
|
-
* @param {Number[]} [params.up] Position to fly the up vector to.
|
|
159
|
-
* @param {String} [params.projection] Projection type to transition into as we fly. Can be any of the values of {@link Camera.projection}.
|
|
160
|
-
* @param {Boolean} [params.fit=true] Whether to fit the target to the view volume. Overrides {@link CameraFlightAnimation#fit}.
|
|
161
|
-
* @param {Number} [params.fitFOV] How much of field-of-view, in degrees, that a target {@link Entity} or its AABB should
|
|
162
|
-
* fill the canvas on arrival. Overrides {@link CameraFlightAnimation#fitFOV}.
|
|
163
|
-
* @param {Number} [params.duration] Flight duration in seconds. Overrides {@link CameraFlightAnimation#duration}.
|
|
164
|
-
* @param {Number} [params.orthoScale] Animate the Camera's orthographic scale to this target value. See {@link Ortho#scale}.
|
|
165
|
-
* @param {Function} [callback] Callback fired on arrival.
|
|
166
|
-
* @param {Object} [scope] Optional scope for callback.
|
|
167
|
-
*/
|
|
168
|
-
flyTo(params, callback, scope) {
|
|
169
|
-
|
|
170
|
-
params = params || this.scene;
|
|
171
|
-
|
|
172
|
-
if (this._flying) {
|
|
173
|
-
this.stop();
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
this._flying = false;
|
|
177
|
-
this._flyingEye = false;
|
|
178
|
-
this._flyingLook = false;
|
|
179
|
-
this._flyingEyeLookUp = false;
|
|
180
|
-
|
|
181
|
-
this._callback = callback;
|
|
182
|
-
this._callbackScope = scope;
|
|
183
|
-
|
|
184
|
-
const camera = this.scene.camera;
|
|
185
|
-
const flyToProjection = (!!params.projection) && (params.projection !== camera.projection);
|
|
186
|
-
|
|
187
|
-
this._eye1[0] = camera.eye[0];
|
|
188
|
-
this._eye1[1] = camera.eye[1];
|
|
189
|
-
this._eye1[2] = camera.eye[2];
|
|
190
|
-
|
|
191
|
-
this._look1[0] = camera.look[0];
|
|
192
|
-
this._look1[1] = camera.look[1];
|
|
193
|
-
this._look1[2] = camera.look[2];
|
|
194
|
-
|
|
195
|
-
this._up1[0] = camera.up[0];
|
|
196
|
-
this._up1[1] = camera.up[1];
|
|
197
|
-
this._up1[2] = camera.up[2];
|
|
198
|
-
|
|
199
|
-
this._orthoScale1 = camera.ortho.scale;
|
|
200
|
-
this._orthoScale2 = params.orthoScale || this._orthoScale1;
|
|
201
|
-
|
|
202
|
-
let aabb;
|
|
203
|
-
let eye;
|
|
204
|
-
let look;
|
|
205
|
-
let up;
|
|
206
|
-
let componentId;
|
|
207
|
-
|
|
208
|
-
if (params.aabb) {
|
|
209
|
-
aabb = params.aabb;
|
|
210
|
-
|
|
211
|
-
} else if (params.length === 6) {
|
|
212
|
-
aabb = params;
|
|
213
|
-
|
|
214
|
-
} else if ((params.eye && params.look) || params.up) {
|
|
215
|
-
eye = params.eye;
|
|
216
|
-
look = params.look;
|
|
217
|
-
up = params.up;
|
|
218
|
-
|
|
219
|
-
} else if (params.eye) {
|
|
220
|
-
eye = params.eye;
|
|
221
|
-
|
|
222
|
-
} else if (params.look) {
|
|
223
|
-
look = params.look;
|
|
224
|
-
|
|
225
|
-
} else { // Argument must be an instance or ID of a Component (subtype)
|
|
226
|
-
|
|
227
|
-
let component = params;
|
|
228
|
-
|
|
229
|
-
if (utils.isNumeric(component) || utils.isString(component)) {
|
|
230
|
-
|
|
231
|
-
componentId = component;
|
|
232
|
-
component = this.scene.components[componentId];
|
|
233
|
-
|
|
234
|
-
if (!component) {
|
|
235
|
-
this.error("Component not found: " + utils.inQuotes(componentId));
|
|
236
|
-
if (callback) {
|
|
237
|
-
if (scope) {
|
|
238
|
-
callback.call(scope);
|
|
239
|
-
} else {
|
|
240
|
-
callback();
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
return;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
if (!flyToProjection) {
|
|
247
|
-
aabb = component.aabb || this.scene.aabb;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
const poi = params.poi;
|
|
252
|
-
|
|
253
|
-
if (aabb) {
|
|
254
|
-
|
|
255
|
-
if (aabb[3] < aabb[0] || aabb[4] < aabb[1] || aabb[5] < aabb[2]) { // Don't fly to an inverted boundary
|
|
256
|
-
return;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
if (aabb[3] === aabb[0] && aabb[4] === aabb[1] && aabb[5] === aabb[2]) { // Don't fly to an empty boundary
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
aabb = aabb.slice();
|
|
264
|
-
const aabbCenter = math.getAABB3Center(aabb);
|
|
265
|
-
|
|
266
|
-
this._look2 = poi || aabbCenter;
|
|
267
|
-
|
|
268
|
-
const eyeLookVec = math.subVec3(this._eye1, this._look1, tempVec3);
|
|
269
|
-
const eyeLookVecNorm = math.normalizeVec3(eyeLookVec);
|
|
270
|
-
const diag = poi ? math.getAABB3DiagPoint(aabb, poi) : math.getAABB3Diag(aabb);
|
|
271
|
-
const fitFOV = params.fitFOV || this._fitFOV;
|
|
272
|
-
const sca = Math.abs(diag / Math.tan(fitFOV * math.DEGTORAD));
|
|
273
|
-
|
|
274
|
-
this._orthoScale2 = diag * 1.1;
|
|
275
|
-
|
|
276
|
-
this._eye2[0] = this._look2[0] + (eyeLookVecNorm[0] * sca);
|
|
277
|
-
this._eye2[1] = this._look2[1] + (eyeLookVecNorm[1] * sca);
|
|
278
|
-
this._eye2[2] = this._look2[2] + (eyeLookVecNorm[2] * sca);
|
|
279
|
-
|
|
280
|
-
this._up2[0] = this._up1[0];
|
|
281
|
-
this._up2[1] = this._up1[1];
|
|
282
|
-
this._up2[2] = this._up1[2];
|
|
283
|
-
|
|
284
|
-
this._flyingEyeLookUp = true;
|
|
285
|
-
|
|
286
|
-
} else if (eye || look || up) {
|
|
287
|
-
|
|
288
|
-
this._flyingEyeLookUp = !!eye && !!look && !!up;
|
|
289
|
-
this._flyingEye = !!eye && !look;
|
|
290
|
-
this._flyingLook = !!look && !eye;
|
|
291
|
-
|
|
292
|
-
if (eye) {
|
|
293
|
-
this._eye2[0] = eye[0];
|
|
294
|
-
this._eye2[1] = eye[1];
|
|
295
|
-
this._eye2[2] = eye[2];
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
if (look) {
|
|
299
|
-
this._look2[0] = look[0];
|
|
300
|
-
this._look2[1] = look[1];
|
|
301
|
-
this._look2[2] = look[2];
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
if (up) {
|
|
305
|
-
this._up2[0] = up[0];
|
|
306
|
-
this._up2[1] = up[1];
|
|
307
|
-
this._up2[2] = up[2];
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
if (flyToProjection) {
|
|
312
|
-
|
|
313
|
-
if (params.projection === "ortho" && camera.projection !== "ortho") {
|
|
314
|
-
this._projection2 = "ortho";
|
|
315
|
-
this._projMatrix1 = camera.projMatrix.slice();
|
|
316
|
-
camera.ortho.scale = this._orthoScale2;
|
|
317
|
-
this._projMatrix2 = camera.ortho.matrix.slice();
|
|
318
|
-
camera.projection = "customProjection";
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
if (params.projection === "perspective" && camera.projection !== "perspective") {
|
|
322
|
-
this._projection2 = "perspective";
|
|
323
|
-
this._projMatrix1 = camera.projMatrix.slice();
|
|
324
|
-
this._projMatrix2 = camera.perspective.matrix.slice();
|
|
325
|
-
camera.projection = "customProjection";
|
|
326
|
-
}
|
|
327
|
-
} else {
|
|
328
|
-
this._projection2 = null;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
this.fire("started", params, true);
|
|
332
|
-
|
|
333
|
-
this._time1 = Date.now();
|
|
334
|
-
this._time2 = this._time1 + (params.duration ? params.duration * 1000 : this._duration);
|
|
335
|
-
|
|
336
|
-
this._flying = true; // False as soon as we stop
|
|
337
|
-
|
|
338
|
-
core.scheduleTask(this._update, this);
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* Jumps the {@link Scene}'s {@link Camera} to the given target.
|
|
343
|
-
*
|
|
344
|
-
* * When the target is a boundary, this CameraFlightAnimation will position the {@link Camera} at where the target fills most of the canvas.
|
|
345
|
-
* * When the target is an explicit {@link Camera} position, given as ````eye````, ````look```` and ````up```` vectors, then this CameraFlightAnimation will jump the {@link Camera} to that target.
|
|
346
|
-
*
|
|
347
|
-
* @param {*|Component} params Either a parameters object or a {@link Component} subtype that has a World-space AABB.
|
|
348
|
-
* @param {Number} [params.arc=0] Factor in range [0..1] indicating how much the {@link Camera#eye} will swing away from its {@link Camera#look} as it flies to the target.
|
|
349
|
-
* @param {Number|String|Component} [params.component] ID or instance of a component to fly to.
|
|
350
|
-
* @param {Number[]} [params.aabb] World-space axis-aligned bounding box (AABB) target to fly to.
|
|
351
|
-
* @param {Number[]} [params.eye] Position to fly the eye position to.
|
|
352
|
-
* @param {Number[]} [params.look] Position to fly the look position to.
|
|
353
|
-
* @param {Number[]} [params.up] Position to fly the up vector to.
|
|
354
|
-
* @param {String} [params.projection] Projection type to transition into. Can be any of the values of {@link Camera.projection}.
|
|
355
|
-
* @param {Number} [params.fitFOV] How much of field-of-view, in degrees, that a target {@link Entity} or its AABB should fill the canvas on arrival. Overrides {@link CameraFlightAnimation#fitFOV}.
|
|
356
|
-
* @param {Boolean} [params.fit] Whether to fit the target to the view volume. Overrides {@link CameraFlightAnimation#fit}.
|
|
357
|
-
*/
|
|
358
|
-
jumpTo(params) {
|
|
359
|
-
this._jumpTo(params);
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
_jumpTo(params) {
|
|
363
|
-
|
|
364
|
-
if (this._flying) {
|
|
365
|
-
this.stop();
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
const camera = this.scene.camera;
|
|
369
|
-
|
|
370
|
-
var aabb;
|
|
371
|
-
var componentId;
|
|
372
|
-
var newEye;
|
|
373
|
-
var newLook;
|
|
374
|
-
var newUp;
|
|
375
|
-
|
|
376
|
-
if (params.aabb) { // Boundary3D
|
|
377
|
-
aabb = params.aabb;
|
|
378
|
-
|
|
379
|
-
} else if (params.length === 6) { // AABB
|
|
380
|
-
aabb = params;
|
|
381
|
-
|
|
382
|
-
} else if (params.eye || params.look || params.up) { // Camera pose
|
|
383
|
-
newEye = params.eye;
|
|
384
|
-
newLook = params.look;
|
|
385
|
-
newUp = params.up;
|
|
386
|
-
|
|
387
|
-
} else { // Argument must be an instance or ID of a Component (subtype)
|
|
388
|
-
|
|
389
|
-
let component = params;
|
|
390
|
-
|
|
391
|
-
if (utils.isNumeric(component) || utils.isString(component)) {
|
|
392
|
-
componentId = component;
|
|
393
|
-
component = this.scene.components[componentId];
|
|
394
|
-
if (!component) {
|
|
395
|
-
this.error("Component not found: " + utils.inQuotes(componentId));
|
|
396
|
-
return;
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
aabb = component.aabb || this.scene.aabb;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
const poi = params.poi;
|
|
403
|
-
|
|
404
|
-
if (aabb) {
|
|
405
|
-
|
|
406
|
-
if (aabb[3] <= aabb[0] || aabb[4] <= aabb[1] || aabb[5] <= aabb[2]) { // Don't fly to an empty boundary
|
|
407
|
-
return;
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
var diag = poi ? math.getAABB3DiagPoint(aabb, poi) : math.getAABB3Diag(aabb);
|
|
411
|
-
|
|
412
|
-
newLook = poi || math.getAABB3Center(aabb, newLook);
|
|
413
|
-
|
|
414
|
-
if (this._trail) {
|
|
415
|
-
math.subVec3(camera.look, newLook, newLookEyeVec);
|
|
416
|
-
} else {
|
|
417
|
-
math.subVec3(camera.eye, camera.look, newLookEyeVec);
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
math.normalizeVec3(newLookEyeVec);
|
|
421
|
-
let dist;
|
|
422
|
-
const fit = (params.fit !== undefined) ? params.fit : this._fit;
|
|
423
|
-
|
|
424
|
-
if (fit) {
|
|
425
|
-
dist = Math.abs((diag) / Math.tan((params.fitFOV || this._fitFOV) * math.DEGTORAD));
|
|
426
|
-
|
|
427
|
-
} else {
|
|
428
|
-
dist = math.lenVec3(math.subVec3(camera.eye, camera.look, tempVec3));
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
math.mulVec3Scalar(newLookEyeVec, dist);
|
|
432
|
-
|
|
433
|
-
camera.eye = math.addVec3(newLook, newLookEyeVec, tempVec3);
|
|
434
|
-
camera.look = newLook;
|
|
435
|
-
|
|
436
|
-
this.scene.camera.ortho.scale = diag * 1.1;
|
|
437
|
-
|
|
438
|
-
} else if (newEye || newLook || newUp) {
|
|
439
|
-
|
|
440
|
-
if (newEye) {
|
|
441
|
-
camera.eye = newEye;
|
|
442
|
-
}
|
|
443
|
-
if (newLook) {
|
|
444
|
-
camera.look = newLook;
|
|
445
|
-
}
|
|
446
|
-
if (newUp) {
|
|
447
|
-
camera.up = newUp;
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
if (params.projection) {
|
|
452
|
-
camera.projection = params.projection;
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
_update() {
|
|
457
|
-
if (!this._flying) {
|
|
458
|
-
return;
|
|
459
|
-
}
|
|
460
|
-
const time = Date.now();
|
|
461
|
-
let t = (time - this._time1) / (this._time2 - this._time1);
|
|
462
|
-
const stopping = (t >= 1);
|
|
463
|
-
|
|
464
|
-
if (t > 1) {
|
|
465
|
-
t = 1;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
const tFlight = this.easing ? CameraFlightAnimation._ease(t, 0, 1, 1) : t;
|
|
469
|
-
const camera = this.scene.camera;
|
|
470
|
-
|
|
471
|
-
if (this._flyingEye || this._flyingLook) {
|
|
472
|
-
|
|
473
|
-
if (this._flyingEye) {
|
|
474
|
-
math.subVec3(camera.eye, camera.look, newLookEyeVec);
|
|
475
|
-
camera.eye = math.lerpVec3(tFlight, 0, 1, this._eye1, this._eye2, newEye);
|
|
476
|
-
camera.look = math.subVec3(newEye, newLookEyeVec, newLook);
|
|
477
|
-
} else if (this._flyingLook) {
|
|
478
|
-
camera.look = math.lerpVec3(tFlight, 0, 1, this._look1, this._look2, newLook);
|
|
479
|
-
camera.up = math.lerpVec3(tFlight, 0, 1, this._up1, this._up2, newUp);
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
} else if (this._flyingEyeLookUp) {
|
|
483
|
-
|
|
484
|
-
camera.eye = math.lerpVec3(tFlight, 0, 1, this._eye1, this._eye2, newEye);
|
|
485
|
-
camera.look = math.lerpVec3(tFlight, 0, 1, this._look1, this._look2, newLook);
|
|
486
|
-
camera.up = math.lerpVec3(tFlight, 0, 1, this._up1, this._up2, newUp);
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
if (this._projection2) {
|
|
490
|
-
const tProj = (this._projection2 === "ortho") ? CameraFlightAnimation._easeOutExpo(t, 0, 1, 1) : CameraFlightAnimation._easeInCubic(t, 0, 1, 1);
|
|
491
|
-
camera.customProjection.matrix = math.lerpMat4(tProj, 0, 1, this._projMatrix1, this._projMatrix2);
|
|
492
|
-
|
|
493
|
-
} else {
|
|
494
|
-
camera.ortho.scale = this._orthoScale1 + (t * (this._orthoScale2 - this._orthoScale1));
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
if (stopping) {
|
|
498
|
-
this.stop();
|
|
499
|
-
return;
|
|
500
|
-
}
|
|
501
|
-
core.scheduleTask(this._update, this); // Keep flying
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
static _ease(t, b, c, d) { // Quadratic easing out - decelerating to zero velocity http://gizma.com/easing
|
|
505
|
-
t /= d;
|
|
506
|
-
return -c * t * (t - 2) + b;
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
static _easeInCubic(t, b, c, d) {
|
|
510
|
-
t /= d;
|
|
511
|
-
return c * t * t * t + b;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
static _easeOutExpo(t, b, c, d) {
|
|
515
|
-
return c * (-Math.pow(2, -10 * t / d) + 1) + b;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
/**
|
|
519
|
-
* Stops an earlier flyTo, fires arrival callback.
|
|
520
|
-
*/
|
|
521
|
-
stop() {
|
|
522
|
-
if (!this._flying) {
|
|
523
|
-
return;
|
|
524
|
-
}
|
|
525
|
-
this._flying = false;
|
|
526
|
-
this._time1 = null;
|
|
527
|
-
this._time2 = null;
|
|
528
|
-
if (this._projection2) {
|
|
529
|
-
this.scene.camera.projection = this._projection2;
|
|
530
|
-
}
|
|
531
|
-
const callback = this._callback;
|
|
532
|
-
if (callback) {
|
|
533
|
-
this._callback = null;
|
|
534
|
-
if (this._callbackScope) {
|
|
535
|
-
callback.call(this._callbackScope);
|
|
536
|
-
} else {
|
|
537
|
-
callback();
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
this.fire("stopped", true, true);
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
/**
|
|
544
|
-
* Cancels an earlier flyTo without calling the arrival callback.
|
|
545
|
-
*/
|
|
546
|
-
cancel() {
|
|
547
|
-
if (!this._flying) {
|
|
548
|
-
return;
|
|
549
|
-
}
|
|
550
|
-
this._flying = false;
|
|
551
|
-
this._time1 = null;
|
|
552
|
-
this._time2 = null;
|
|
553
|
-
if (this._callback) {
|
|
554
|
-
this._callback = null;
|
|
555
|
-
}
|
|
556
|
-
this.fire("canceled", true, true);
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
/**
|
|
560
|
-
* Sets the flight duration, in seconds, when calling {@link CameraFlightAnimation#flyTo}.
|
|
561
|
-
*
|
|
562
|
-
* Stops any flight currently in progress.
|
|
563
|
-
*
|
|
564
|
-
* default value is ````0.5````.
|
|
565
|
-
*
|
|
566
|
-
* @param {Number} value New duration value.
|
|
567
|
-
*/
|
|
568
|
-
set duration(value) {
|
|
569
|
-
this._duration = value ? (value * 1000.0) : 500;
|
|
570
|
-
this.stop();
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
/**
|
|
574
|
-
* Gets the flight duration, in seconds, when calling {@link CameraFlightAnimation#flyTo}.
|
|
575
|
-
*
|
|
576
|
-
* default value is ````0.5````.
|
|
577
|
-
*
|
|
578
|
-
* @returns {Number} New duration value.
|
|
579
|
-
*/
|
|
580
|
-
get duration() {
|
|
581
|
-
return this._duration / 1000.0;
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
/**
|
|
585
|
-
* Sets if, when CameraFlightAnimation is flying to a boundary, it will always adjust the distance between the
|
|
586
|
-
* {@link Camera#eye} and {@link Camera#look} so as to ensure that the target boundary is always filling the view volume.
|
|
587
|
-
*
|
|
588
|
-
* When false, the eye will remain at its current distance from the look position.
|
|
589
|
-
*
|
|
590
|
-
* Default value is ````true````.
|
|
591
|
-
*
|
|
592
|
-
* @param {Boolean} value Set ````true```` to activate this behaviour.
|
|
593
|
-
*/
|
|
594
|
-
set fit(value) {
|
|
595
|
-
this._fit = value !== false;
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
/**
|
|
599
|
-
* Gets if, when CameraFlightAnimation is flying to a boundary, it will always adjust the distance between the
|
|
600
|
-
* {@link Camera#eye} and {@link Camera#look} so as to ensure that the target boundary is always filling the view volume.
|
|
601
|
-
*
|
|
602
|
-
* When false, the eye will remain at its current distance from the look position.
|
|
603
|
-
*
|
|
604
|
-
* Default value is ````true````.
|
|
605
|
-
*
|
|
606
|
-
* @returns {Boolean} value Set ````true```` to activate this behaviour.
|
|
607
|
-
*/
|
|
608
|
-
get fit() {
|
|
609
|
-
return this._fit;
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
/**
|
|
613
|
-
* Sets how much of the perspective field-of-view, in degrees, that a target {@link Entity#aabb} should
|
|
614
|
-
* fill the canvas when calling {@link CameraFlightAnimation#flyTo} or {@link CameraFlightAnimation#jumpTo}.
|
|
615
|
-
*
|
|
616
|
-
* Default value is ````45````.
|
|
617
|
-
*
|
|
618
|
-
* @param {Number} value New FOV value.
|
|
619
|
-
*/
|
|
620
|
-
set fitFOV(value) {
|
|
621
|
-
this._fitFOV = value || 45;
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
/**
|
|
625
|
-
* Gets how much of the perspective field-of-view, in degrees, that a target {@link Entity#aabb} should
|
|
626
|
-
* fill the canvas when calling {@link CameraFlightAnimation#flyTo} or {@link CameraFlightAnimation#jumpTo}.
|
|
627
|
-
*
|
|
628
|
-
* Default value is ````45````.
|
|
629
|
-
*
|
|
630
|
-
* @returns {Number} Current FOV value.
|
|
631
|
-
*/
|
|
632
|
-
get fitFOV() {
|
|
633
|
-
return this._fitFOV;
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
/**
|
|
637
|
-
* Sets if this CameraFlightAnimation to point the {@link Camera}
|
|
638
|
-
* in the direction that it is travelling when flying to a target after calling {@link CameraFlightAnimation#flyTo}.
|
|
639
|
-
*
|
|
640
|
-
* Default value is ````true````.
|
|
641
|
-
*
|
|
642
|
-
* @param {Boolean} value Set ````true```` to activate trailing behaviour.
|
|
643
|
-
*/
|
|
644
|
-
set trail(value) {
|
|
645
|
-
this._trail = !!value;
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
/**
|
|
649
|
-
* Gets if this CameraFlightAnimation points the {@link Camera}
|
|
650
|
-
* in the direction that it is travelling when flying to a target after calling {@link CameraFlightAnimation#flyTo}.
|
|
651
|
-
*
|
|
652
|
-
* Default value is ````true````.
|
|
653
|
-
*
|
|
654
|
-
* @returns {Boolean} True if trailing behaviour is active.
|
|
655
|
-
*/
|
|
656
|
-
get trail() {
|
|
657
|
-
return this._trail;
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
/**
|
|
661
|
-
* @private
|
|
662
|
-
*/
|
|
663
|
-
destroy() {
|
|
664
|
-
this.stop();
|
|
665
|
-
super.destroy();
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
export {CameraFlightAnimation};
|