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,316 +0,0 @@
|
|
|
1
|
-
import {Component} from '../Component.js';
|
|
2
|
-
import {RenderState} from '../webgl/RenderState.js';
|
|
3
|
-
import {math} from '../math/math.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @desc Defines its {@link Camera}'s perspective projection as a frustum-shaped view volume.
|
|
7
|
-
*
|
|
8
|
-
* * Located at {@link Camera#frustum}.
|
|
9
|
-
* * Allows to explicitly set the positions of the left, right, top, bottom, near and far planes, which is useful for asymmetrical view volumes, such as for stereo viewing.
|
|
10
|
-
* * {@link Frustum#near} and {@link Frustum#far} specify the distances to the WebGL clipping planes.
|
|
11
|
-
*/
|
|
12
|
-
class Frustum extends Component {
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
@private
|
|
16
|
-
*/
|
|
17
|
-
get type() {
|
|
18
|
-
return "Frustum";
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* @constructor
|
|
23
|
-
* @private
|
|
24
|
-
*/
|
|
25
|
-
constructor(camera, cfg = {}) {
|
|
26
|
-
|
|
27
|
-
super(camera, cfg);
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* The Camera this Frustum belongs to.
|
|
31
|
-
*
|
|
32
|
-
* @property camera
|
|
33
|
-
* @type {Camera}
|
|
34
|
-
* @final
|
|
35
|
-
*/
|
|
36
|
-
this.camera = camera;
|
|
37
|
-
|
|
38
|
-
this._state = new RenderState({
|
|
39
|
-
matrix: math.mat4(),
|
|
40
|
-
inverseMatrix: math.mat4(),
|
|
41
|
-
transposedMatrix: math.mat4(),
|
|
42
|
-
near: 0.1,
|
|
43
|
-
far: 10000.0
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
this._left = -1.0;
|
|
47
|
-
this._right = 1.0;
|
|
48
|
-
this._bottom = -1.0;
|
|
49
|
-
this._top = 1.0;
|
|
50
|
-
|
|
51
|
-
this._inverseMatrixDirty = true;
|
|
52
|
-
this._transposedMatrixDirty = true;
|
|
53
|
-
|
|
54
|
-
// Set component properties
|
|
55
|
-
|
|
56
|
-
this.left = cfg.left;
|
|
57
|
-
this.right = cfg.right;
|
|
58
|
-
this.bottom = cfg.bottom;
|
|
59
|
-
this.top = cfg.top;
|
|
60
|
-
this.near = cfg.near;
|
|
61
|
-
this.far = cfg.far;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
_update() {
|
|
65
|
-
|
|
66
|
-
math.frustumMat4(this._left, this._right, this._bottom, this._top, this._state.near, this._state.far, this._state.matrix);
|
|
67
|
-
|
|
68
|
-
this._inverseMatrixDirty = true;
|
|
69
|
-
this._transposedMatrixDirty = true;
|
|
70
|
-
|
|
71
|
-
this.glRedraw();
|
|
72
|
-
|
|
73
|
-
this.fire("matrix", this._state.matrix);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Sets the position of the Frustum's left plane on the View-space X-axis.
|
|
78
|
-
*
|
|
79
|
-
* Fires a {@link Frustum#left:emits} emits on change.
|
|
80
|
-
*
|
|
81
|
-
* @param {Number} value New left frustum plane position.
|
|
82
|
-
*/
|
|
83
|
-
set left(value) {
|
|
84
|
-
this._left = (value !== undefined && value !== null) ? value : -1.0;
|
|
85
|
-
this._needUpdate(0);
|
|
86
|
-
this.fire("left", this._left);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Gets the position of the Frustum's left plane on the View-space X-axis.
|
|
91
|
-
*
|
|
92
|
-
* @return {Number} Left frustum plane position.
|
|
93
|
-
*/
|
|
94
|
-
get left() {
|
|
95
|
-
return this._left;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Sets the position of the Frustum's right plane on the View-space X-axis.
|
|
100
|
-
*
|
|
101
|
-
* Fires a {@link Frustum#right:emits} emits on change.
|
|
102
|
-
*
|
|
103
|
-
* @param {Number} value New right frustum plane position.
|
|
104
|
-
*/
|
|
105
|
-
set right(value) {
|
|
106
|
-
this._right = (value !== undefined && value !== null) ? value : 1.0;
|
|
107
|
-
this._needUpdate(0);
|
|
108
|
-
this.fire("right", this._right);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Gets the position of the Frustum's right plane on the View-space X-axis.
|
|
113
|
-
*
|
|
114
|
-
* Fires a {@link Frustum#right:emits} emits on change.
|
|
115
|
-
*
|
|
116
|
-
* @return {Number} Right frustum plane position.
|
|
117
|
-
*/
|
|
118
|
-
get right() {
|
|
119
|
-
return this._right;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Sets the position of the Frustum's top plane on the View-space Y-axis.
|
|
124
|
-
*
|
|
125
|
-
* Fires a {@link Frustum#top:emits} emits on change.
|
|
126
|
-
*
|
|
127
|
-
* @param {Number} value New top frustum plane position.
|
|
128
|
-
*/
|
|
129
|
-
set top(value) {
|
|
130
|
-
this._top = (value !== undefined && value !== null) ? value : 1.0;
|
|
131
|
-
this._needUpdate(0);
|
|
132
|
-
this.fire("top", this._top);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Gets the position of the Frustum's top plane on the View-space Y-axis.
|
|
137
|
-
*
|
|
138
|
-
* Fires a {@link Frustum#top:emits} emits on change.
|
|
139
|
-
*
|
|
140
|
-
* @return {Number} Top frustum plane position.
|
|
141
|
-
*/
|
|
142
|
-
get top() {
|
|
143
|
-
return this._top;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Sets the position of the Frustum's bottom plane on the View-space Y-axis.
|
|
148
|
-
*
|
|
149
|
-
* Fires a {@link Frustum#bottom:emits} emits on change.
|
|
150
|
-
*
|
|
151
|
-
* @emits {"bottom"} event with the value of this property whenever it changes.
|
|
152
|
-
*
|
|
153
|
-
* @param {Number} value New bottom frustum plane position.
|
|
154
|
-
*/
|
|
155
|
-
set bottom(value) {
|
|
156
|
-
this._bottom = (value !== undefined && value !== null) ? value : -1.0;
|
|
157
|
-
this._needUpdate(0);
|
|
158
|
-
this.fire("bottom", this._bottom);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Gets the position of the Frustum's bottom plane on the View-space Y-axis.
|
|
163
|
-
*
|
|
164
|
-
* Fires a {@link Frustum#bottom:emits} emits on change.
|
|
165
|
-
*
|
|
166
|
-
* @return {Number} Bottom frustum plane position.
|
|
167
|
-
*/
|
|
168
|
-
get bottom() {
|
|
169
|
-
return this._bottom;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* Sets the position of the Frustum's near plane on the positive View-space Z-axis.
|
|
174
|
-
*
|
|
175
|
-
* Fires a {@link Frustum#near:emits} emits on change.
|
|
176
|
-
*
|
|
177
|
-
* Default value is ````0.1````.
|
|
178
|
-
*
|
|
179
|
-
* @param {Number} value New Frustum near plane position.
|
|
180
|
-
*/
|
|
181
|
-
set near(value) {
|
|
182
|
-
this._state.near = (value !== undefined && value !== null) ? value : 0.1;
|
|
183
|
-
this._needUpdate(0);
|
|
184
|
-
this.fire("near", this._state.near);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Gets the position of the Frustum's near plane on the positive View-space Z-axis.
|
|
189
|
-
*
|
|
190
|
-
* Fires a {@link Frustum#near:emits} emits on change.
|
|
191
|
-
*
|
|
192
|
-
* Default value is ````0.1````.
|
|
193
|
-
*
|
|
194
|
-
* @return {Number} Near frustum plane position.
|
|
195
|
-
*/
|
|
196
|
-
get near() {
|
|
197
|
-
return this._state.near;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* Sets the position of the Frustum's far plane on the positive View-space Z-axis.
|
|
202
|
-
*
|
|
203
|
-
* Fires a {@link Frustum#far:emits} emits on change.
|
|
204
|
-
*
|
|
205
|
-
* Default value is ````10000.0````.
|
|
206
|
-
*
|
|
207
|
-
* @param {Number} value New far frustum plane position.
|
|
208
|
-
*/
|
|
209
|
-
set far(value) {
|
|
210
|
-
this._state.far = (value !== undefined && value !== null) ? value : 10000.0;
|
|
211
|
-
this._needUpdate(0);
|
|
212
|
-
this.fire("far", this._state.far);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* Gets the position of the Frustum's far plane on the positive View-space Z-axis.
|
|
217
|
-
*
|
|
218
|
-
* Default value is ````10000.0````.
|
|
219
|
-
*
|
|
220
|
-
* @return {Number} Far frustum plane position.
|
|
221
|
-
*/
|
|
222
|
-
get far() {
|
|
223
|
-
return this._state.far;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* Gets the Frustum's projection transform matrix.
|
|
228
|
-
*
|
|
229
|
-
* Fires a {@link Frustum#matrix:emits} emits on change.
|
|
230
|
-
*
|
|
231
|
-
* Default value is ````[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]````.
|
|
232
|
-
*
|
|
233
|
-
* @returns {Number[]} The Frustum's projection matrix matrix.
|
|
234
|
-
*/
|
|
235
|
-
get matrix() {
|
|
236
|
-
if (this._updateScheduled) {
|
|
237
|
-
this._doUpdate();
|
|
238
|
-
}
|
|
239
|
-
return this._state.matrix;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* Gets the inverse of {@link Frustum#matrix}.
|
|
244
|
-
*
|
|
245
|
-
* @returns {Number[]} The inverse orthographic projection matrix.
|
|
246
|
-
*/
|
|
247
|
-
get inverseMatrix() {
|
|
248
|
-
if (this._updateScheduled) {
|
|
249
|
-
this._doUpdate();
|
|
250
|
-
}
|
|
251
|
-
if (this._inverseMatrixDirty) {
|
|
252
|
-
math.inverseMat4(this._state.matrix, this._state.inverseMatrix);
|
|
253
|
-
this._inverseMatrixDirty = false;
|
|
254
|
-
}
|
|
255
|
-
return this._state.inverseMatrix;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
* Gets the transpose of {@link Frustum#matrix}.
|
|
260
|
-
*
|
|
261
|
-
* @returns {Number[]} The transpose of {@link Frustum#matrix}.
|
|
262
|
-
*/
|
|
263
|
-
get transposedMatrix() {
|
|
264
|
-
if (this._updateScheduled) {
|
|
265
|
-
this._doUpdate();
|
|
266
|
-
}
|
|
267
|
-
if (this._transposedMatrixDirty) {
|
|
268
|
-
math.transposeMat4(this._state.matrix, this._state.transposedMatrix);
|
|
269
|
-
this._transposedMatrixDirty = false;
|
|
270
|
-
}
|
|
271
|
-
return this._state.transposedMatrix;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* Un-projects the given Canvas-space coordinates, using this Frustum projection.
|
|
276
|
-
*
|
|
277
|
-
* @param {Number[]} canvasPos Inputs 2D Canvas-space coordinates.
|
|
278
|
-
* @param {Number} screenZ Inputs Screen-space Z coordinate.
|
|
279
|
-
* @param {Number[]} screenPos Outputs 3D Screen/Clip-space coordinates.
|
|
280
|
-
* @param {Number[]} viewPos Outputs un-projected 3D View-space coordinates.
|
|
281
|
-
* @param {Number[]} worldPos Outputs un-projected 3D World-space coordinates.
|
|
282
|
-
*/
|
|
283
|
-
unproject(canvasPos, screenZ, screenPos, viewPos, worldPos) {
|
|
284
|
-
|
|
285
|
-
const canvas = this.scene.canvas.canvas;
|
|
286
|
-
|
|
287
|
-
const halfCanvasWidth = canvas.offsetWidth / 2.0;
|
|
288
|
-
const halfCanvasHeight = canvas.offsetHeight / 2.0;
|
|
289
|
-
|
|
290
|
-
screenPos[0] = (canvasPos[0] - halfCanvasWidth) / halfCanvasWidth;
|
|
291
|
-
screenPos[1] = (canvasPos[1] - halfCanvasHeight) / halfCanvasHeight;
|
|
292
|
-
screenPos[2] = screenZ;
|
|
293
|
-
screenPos[3] = 1.0;
|
|
294
|
-
|
|
295
|
-
math.mulMat4v4(this.inverseMatrix, screenPos, viewPos);
|
|
296
|
-
math.mulVec3Scalar(viewPos, 1.0 / viewPos[3]);
|
|
297
|
-
|
|
298
|
-
viewPos[3] = 1.0;
|
|
299
|
-
viewPos[1] *= -1;
|
|
300
|
-
|
|
301
|
-
math.mulMat4v4(this.camera.inverseViewMatrix, viewPos, worldPos);
|
|
302
|
-
|
|
303
|
-
return worldPos;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
/** @private
|
|
307
|
-
*
|
|
308
|
-
*/
|
|
309
|
-
destroy() {
|
|
310
|
-
super.destroy();
|
|
311
|
-
this._state.destroy();
|
|
312
|
-
super.destroy();
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
export {Frustum};
|
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
import {Component} from '../Component.js';
|
|
2
|
-
import {RenderState} from '../webgl/RenderState.js';
|
|
3
|
-
import {math} from '../math/math.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @desc Defines its {@link Camera}'s orthographic projection as a box-shaped view volume.
|
|
7
|
-
*
|
|
8
|
-
* * Located at {@link Camera#ortho}.
|
|
9
|
-
* * Works like Blender's orthographic projection, where the positions of the left, right, top and bottom planes are implicitly
|
|
10
|
-
* indicated with a single {@link Ortho#scale} property, which causes the frustum to be symmetrical on X and Y axis, large enough to
|
|
11
|
-
* contain the number of units given by {@link Ortho#scale}.
|
|
12
|
-
* * {@link Ortho#near} and {@link Ortho#far} indicated the distances to the WebGL clipping planes.
|
|
13
|
-
*/
|
|
14
|
-
class Ortho extends Component {
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
@private
|
|
18
|
-
*/
|
|
19
|
-
get type() {
|
|
20
|
-
return "Ortho";
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* @constructor
|
|
25
|
-
* @private
|
|
26
|
-
*/
|
|
27
|
-
constructor(camera, cfg = {}) {
|
|
28
|
-
|
|
29
|
-
super(camera, cfg);
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* The Camera this Ortho belongs to.
|
|
33
|
-
*
|
|
34
|
-
* @property camera
|
|
35
|
-
* @type {Camera}
|
|
36
|
-
* @final
|
|
37
|
-
*/
|
|
38
|
-
this.camera = camera;
|
|
39
|
-
|
|
40
|
-
this._state = new RenderState({
|
|
41
|
-
matrix: math.mat4(),
|
|
42
|
-
inverseMatrix: math.mat4(),
|
|
43
|
-
transposedMatrix: math.mat4(),
|
|
44
|
-
near: 0.1,
|
|
45
|
-
far: 2000.0
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
this._inverseMatrixDirty = true;
|
|
49
|
-
this._transposedMatrixDirty = true;
|
|
50
|
-
|
|
51
|
-
this.scale = cfg.scale;
|
|
52
|
-
this.near = cfg.near;
|
|
53
|
-
this.far = cfg.far;
|
|
54
|
-
|
|
55
|
-
this._onCanvasBoundary = this.scene.canvas.on("boundary", this._needUpdate, this);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
_update() {
|
|
59
|
-
|
|
60
|
-
const WIDTH_INDEX = 2;
|
|
61
|
-
const HEIGHT_INDEX = 3;
|
|
62
|
-
|
|
63
|
-
const scene = this.scene;
|
|
64
|
-
const scale = this._scale;
|
|
65
|
-
const halfSize = 0.5 * scale;
|
|
66
|
-
|
|
67
|
-
const boundary = scene.viewport.boundary;
|
|
68
|
-
const boundaryWidth = boundary[WIDTH_INDEX];
|
|
69
|
-
const boundaryHeight = boundary[HEIGHT_INDEX];
|
|
70
|
-
const aspect = boundaryWidth / boundaryHeight;
|
|
71
|
-
|
|
72
|
-
let left;
|
|
73
|
-
let right;
|
|
74
|
-
let top;
|
|
75
|
-
let bottom;
|
|
76
|
-
|
|
77
|
-
if (boundaryWidth > boundaryHeight) {
|
|
78
|
-
left = -halfSize;
|
|
79
|
-
right = halfSize;
|
|
80
|
-
top = halfSize / aspect;
|
|
81
|
-
bottom = -halfSize / aspect;
|
|
82
|
-
|
|
83
|
-
} else {
|
|
84
|
-
left = -halfSize * aspect;
|
|
85
|
-
right = halfSize * aspect;
|
|
86
|
-
top = halfSize;
|
|
87
|
-
bottom = -halfSize;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
math.orthoMat4c(left, right, bottom, top, this._state.near, this._state.far, this._state.matrix);
|
|
91
|
-
|
|
92
|
-
this._inverseMatrixDirty = true;
|
|
93
|
-
this._transposedMatrixDirty = true;
|
|
94
|
-
|
|
95
|
-
this.glRedraw();
|
|
96
|
-
|
|
97
|
-
this.fire("matrix", this._state.matrix);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Sets scale factor for this Ortho's extents on X and Y axis.
|
|
103
|
-
*
|
|
104
|
-
* Clamps to minimum value of ````0.01```.
|
|
105
|
-
*
|
|
106
|
-
* Fires a "scale" event on change.
|
|
107
|
-
*
|
|
108
|
-
* Default value is ````1.0````
|
|
109
|
-
* @param {Number} value New scale value.
|
|
110
|
-
*/
|
|
111
|
-
set scale(value) {
|
|
112
|
-
if (value === undefined || value === null) {
|
|
113
|
-
value = 1.0;
|
|
114
|
-
}
|
|
115
|
-
if (value <= 0) {
|
|
116
|
-
value = 0.01;
|
|
117
|
-
}
|
|
118
|
-
this._scale = value;
|
|
119
|
-
this._needUpdate(0);
|
|
120
|
-
this.fire("scale", this._scale);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Gets scale factor for this Ortho's extents on X and Y axis.
|
|
125
|
-
*
|
|
126
|
-
* Clamps to minimum value of ````0.01```.
|
|
127
|
-
*
|
|
128
|
-
* Default value is ````1.0````
|
|
129
|
-
*
|
|
130
|
-
* @returns {Number} New Ortho scale value.
|
|
131
|
-
*/
|
|
132
|
-
get scale() {
|
|
133
|
-
return this._scale;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Sets the position of the Ortho's near plane on the positive View-space Z-axis.
|
|
138
|
-
*
|
|
139
|
-
* Fires a "near" emits on change.
|
|
140
|
-
*
|
|
141
|
-
* Default value is ````0.1````.
|
|
142
|
-
*
|
|
143
|
-
* @param {Number} value New Ortho near plane position.
|
|
144
|
-
*/
|
|
145
|
-
set near(value) {
|
|
146
|
-
const near = (value !== undefined && value !== null) ? value : 0.1;
|
|
147
|
-
if (this._state.near === near) {
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
this._state.near = near;
|
|
151
|
-
this._needUpdate(0);
|
|
152
|
-
this.fire("near", this._state.near);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Gets the position of the Ortho's near plane on the positive View-space Z-axis.
|
|
157
|
-
*
|
|
158
|
-
* Default value is ````0.1````.
|
|
159
|
-
*
|
|
160
|
-
* @returns {Number} New Ortho near plane position.
|
|
161
|
-
*/
|
|
162
|
-
get near() {
|
|
163
|
-
return this._state.near;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Sets the position of the Ortho's far plane on the positive View-space Z-axis.
|
|
168
|
-
*
|
|
169
|
-
* Fires a "far" event on change.
|
|
170
|
-
*
|
|
171
|
-
* Default value is ````2000.0````.
|
|
172
|
-
*
|
|
173
|
-
* @param {Number} value New far ortho plane position.
|
|
174
|
-
*/
|
|
175
|
-
set far(value) {
|
|
176
|
-
const far = (value !== undefined && value !== null) ? value : 2000.0;
|
|
177
|
-
if (this._state.far === far) {
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
this._state.far = far;
|
|
181
|
-
this._needUpdate(0);
|
|
182
|
-
this.fire("far", this._state.far);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Gets the position of the Ortho's far plane on the positive View-space Z-axis.
|
|
187
|
-
*
|
|
188
|
-
* Default value is ````10000.0````.
|
|
189
|
-
*
|
|
190
|
-
* @returns {Number} New far ortho plane position.
|
|
191
|
-
*/
|
|
192
|
-
get far() {
|
|
193
|
-
return this._state.far;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Gets the Ortho's projection transform matrix.
|
|
198
|
-
*
|
|
199
|
-
* Fires a "matrix" event on change.
|
|
200
|
-
*
|
|
201
|
-
* Default value is ````[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]````.
|
|
202
|
-
*
|
|
203
|
-
* @returns {Number[]} The Ortho's projection matrix.
|
|
204
|
-
*/
|
|
205
|
-
get matrix() {
|
|
206
|
-
if (this._updateScheduled) {
|
|
207
|
-
this._doUpdate();
|
|
208
|
-
}
|
|
209
|
-
return this._state.matrix;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* Gets the inverse of {@link Ortho#matrix}.
|
|
214
|
-
*
|
|
215
|
-
* @returns {Number[]} The inverse of {@link Ortho#matrix}.
|
|
216
|
-
*/
|
|
217
|
-
get inverseMatrix() {
|
|
218
|
-
if (this._updateScheduled) {
|
|
219
|
-
this._doUpdate();
|
|
220
|
-
}
|
|
221
|
-
if (this._inverseMatrixDirty) {
|
|
222
|
-
math.inverseMat4(this._state.matrix, this._state.inverseMatrix);
|
|
223
|
-
this._inverseMatrixDirty = false;
|
|
224
|
-
}
|
|
225
|
-
return this._state.inverseMatrix;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* Gets the transpose of {@link Ortho#matrix}.
|
|
230
|
-
*
|
|
231
|
-
* @returns {Number[]} The transpose of {@link Ortho#matrix}.
|
|
232
|
-
*/
|
|
233
|
-
get transposedMatrix() {
|
|
234
|
-
if (this._updateScheduled) {
|
|
235
|
-
this._doUpdate();
|
|
236
|
-
}
|
|
237
|
-
if (this._transposedMatrixDirty) {
|
|
238
|
-
math.transposeMat4(this._state.matrix, this._state.transposedMatrix);
|
|
239
|
-
this._transposedMatrixDirty = false;
|
|
240
|
-
}
|
|
241
|
-
return this._state.transposedMatrix;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* Un-projects the given Canvas-space coordinates, using this Ortho projection.
|
|
246
|
-
*
|
|
247
|
-
* @param {Number[]} canvasPos Inputs 2D Canvas-space coordinates.
|
|
248
|
-
* @param {Number} screenZ Inputs Screen-space Z coordinate.
|
|
249
|
-
* @param {Number[]} screenPos Outputs 3D Screen/Clip-space coordinates.
|
|
250
|
-
* @param {Number[]} viewPos Outputs un-projected 3D View-space coordinates.
|
|
251
|
-
* @param {Number[]} worldPos Outputs un-projected 3D World-space coordinates.
|
|
252
|
-
*/
|
|
253
|
-
unproject(canvasPos, screenZ, screenPos, viewPos, worldPos) {
|
|
254
|
-
|
|
255
|
-
const canvas = this.scene.canvas.canvas;
|
|
256
|
-
|
|
257
|
-
const halfCanvasWidth = canvas.offsetWidth / 2.0;
|
|
258
|
-
const halfCanvasHeight = canvas.offsetHeight / 2.0;
|
|
259
|
-
|
|
260
|
-
screenPos[0] = (canvasPos[0] - halfCanvasWidth) / halfCanvasWidth;
|
|
261
|
-
screenPos[1] = (canvasPos[1] - halfCanvasHeight) / halfCanvasHeight;
|
|
262
|
-
screenPos[2] = screenZ;
|
|
263
|
-
screenPos[3] = 1.0;
|
|
264
|
-
|
|
265
|
-
math.mulMat4v4(this.inverseMatrix, screenPos, viewPos);
|
|
266
|
-
math.mulVec3Scalar(viewPos, 1.0 / viewPos[3]);
|
|
267
|
-
|
|
268
|
-
viewPos[3] = 1.0;
|
|
269
|
-
viewPos[1] *= -1;
|
|
270
|
-
|
|
271
|
-
math.mulMat4v4(this.camera.inverseViewMatrix, viewPos, worldPos);
|
|
272
|
-
|
|
273
|
-
return worldPos;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/** @private
|
|
277
|
-
*
|
|
278
|
-
*/
|
|
279
|
-
destroy() {
|
|
280
|
-
super.destroy();
|
|
281
|
-
this._state.destroy();
|
|
282
|
-
this.scene.canvas.off(this._onCanvasBoundary);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
export {Ortho};
|