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,547 +0,0 @@
|
|
|
1
|
-
import {Component} from '../Component.js';
|
|
2
|
-
import {WEBGL_INFO} from "../webglInfo.js";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @desc Configures Scalable Ambient Obscurance (SAO) for a {@link Scene}.
|
|
6
|
-
*
|
|
7
|
-
* <a href="https://yjkkit.github.io/yjkkit-sdk/examples/#postEffects_SAO_OTCConferenceCenter"><img src="http://yjkkit.io/img/docs/SAO/saoEnabledDisabled.gif"></a>
|
|
8
|
-
*
|
|
9
|
-
* [[Run this example](https://yjkkit.github.io/yjkkit-sdk/examples/#postEeffects_SAO_OTCConferenceCenter)]
|
|
10
|
-
*
|
|
11
|
-
* ## Overview
|
|
12
|
-
*
|
|
13
|
-
* SAO approximates [Ambient Occlusion](https://en.wikipedia.org/wiki/Ambient_occlusion) in realtime. It darkens creases, cavities and surfaces
|
|
14
|
-
* that are close to each other, which tend to be occluded from ambient light and appear darker.
|
|
15
|
-
*
|
|
16
|
-
* The animated GIF above shows the effect as we repeatedly enable and disable SAO. When SAO is enabled, we can see darkening
|
|
17
|
-
* in regions such as the corners, and the crevices between stairs. This increases the amount of detail we can see when ambient
|
|
18
|
-
* light is high, or when objects have uniform colors across their surfaces. Run the example to experiment with the various
|
|
19
|
-
* SAO configurations.
|
|
20
|
-
*
|
|
21
|
-
* yjkkit's implementation of SAO is based on the paper [Scalable Ambient Obscurance](https://research.nvidia.com/sites/default/files/pubs/2012-06_Scalable-Ambient-Obscurance/McGuire12SAO.pdf).
|
|
22
|
-
*
|
|
23
|
-
* ## Caveats
|
|
24
|
-
*
|
|
25
|
-
* Currently, SAO only works with perspective and orthographic projections. Therefore, to use SAO, make sure {@link Camera#projection} is
|
|
26
|
-
* either "perspective" or "ortho".
|
|
27
|
-
*
|
|
28
|
-
* {@link SAO#scale} and {@link SAO#intensity} must be tuned to the distance
|
|
29
|
-
* between {@link Perspective#near} and {@link Perspective#far}, or the distance
|
|
30
|
-
* between {@link Ortho#near} and {@link Ortho#far}, depending on which of those two projections the {@link Camera} is currently
|
|
31
|
-
* using. Use the [live example](https://yjkkit.github.io/yjkkit-sdk/examples/#postEeffects_SAO_OTCConferenceCenter) to get a
|
|
32
|
-
* feel for that.
|
|
33
|
-
*
|
|
34
|
-
* ## Usage
|
|
35
|
-
*
|
|
36
|
-
* In the example below, we'll start by logging a warning message to the console if SAO is not supported by the
|
|
37
|
-
* system.
|
|
38
|
-
*
|
|
39
|
-
*Then we'll enable and configure SAO, position the camera, and configure the near and far perspective and orthographic
|
|
40
|
-
* clipping planes. Finally, we'll use {@link XKTLoaderPlugin} to load the OTC Conference Center model.
|
|
41
|
-
*
|
|
42
|
-
* ````javascript
|
|
43
|
-
* import {Viewer, XKTLoaderPlugin} from "yjkkit-sdk.es.js";
|
|
44
|
-
*
|
|
45
|
-
* const viewer = new Viewer({
|
|
46
|
-
* canvasId: "myCanvas",
|
|
47
|
-
* transparent: true
|
|
48
|
-
* });
|
|
49
|
-
*
|
|
50
|
-
* const sao = viewer.scene.sao;
|
|
51
|
-
*
|
|
52
|
-
* if (!sao.supported) {
|
|
53
|
-
* sao.warn("SAO is not supported on this system - ignoring SAO configs")
|
|
54
|
-
* }
|
|
55
|
-
*
|
|
56
|
-
* sao.enabled = true; // Enable SAO - only works if supported (see above)
|
|
57
|
-
* sao.intensity = 0.15;
|
|
58
|
-
* sao.bias = 0.5;
|
|
59
|
-
* sao.scale = 1.0;
|
|
60
|
-
* sao.minResolution = 0.0;
|
|
61
|
-
* sao.numSamples = 10;
|
|
62
|
-
* sao.kernelRadius = 100;
|
|
63
|
-
* sao.blendCutoff = 0.1;
|
|
64
|
-
*
|
|
65
|
-
* const camera = viewer.scene.camera;
|
|
66
|
-
*
|
|
67
|
-
* camera.eye = [3.69, 5.83, -23.98];
|
|
68
|
-
* camera.look = [84.31, -29.88, -116.21];
|
|
69
|
-
* camera.up = [0.18, 0.96, -0.21];
|
|
70
|
-
*
|
|
71
|
-
* camera.perspective.near = 0.1;
|
|
72
|
-
* camera.perspective.far = 2000.0;
|
|
73
|
-
*
|
|
74
|
-
* camera.ortho.near = 0.1;
|
|
75
|
-
* camera.ortho.far = 2000.0;
|
|
76
|
-
* camera.projection = "perspective";
|
|
77
|
-
*
|
|
78
|
-
* const xktLoader = new XKTLoaderPlugin(viewer);
|
|
79
|
-
*
|
|
80
|
-
* const model = xktLoader.load({
|
|
81
|
-
* id: "myModel",
|
|
82
|
-
* src: "./models/xkt/OTCConferenceCenter.xkt"
|
|
83
|
-
* edges: true
|
|
84
|
-
* });
|
|
85
|
-
* ````
|
|
86
|
-
*
|
|
87
|
-
* [[Run this example](https://yjkkit.github.io/yjkkit-sdk/examples/#postEeffects_SAO_OTCConferenceCenter)]
|
|
88
|
-
*
|
|
89
|
-
* ## Efficiency
|
|
90
|
-
*
|
|
91
|
-
* SAO can incur some rendering overhead, especially on objects that are viewed close to the camera. For this reason,
|
|
92
|
-
* it's recommended to use a low value for {@link SAO#kernelRadius}. A low radius will sample pixels that are close
|
|
93
|
-
* to the source pixel, which will allow the GPU to efficiently cache those pixels. When {@link Camera#projection} is "perspective",
|
|
94
|
-
* objects near to the viewpoint will use larger radii than farther pixels. Therefore, computing SAO for close objects
|
|
95
|
-
* is more expensive than for objects far away, that occupy fewer pixels on the canvas.
|
|
96
|
-
*
|
|
97
|
-
* ## Selectively enabling SAO for models
|
|
98
|
-
*
|
|
99
|
-
* When loading multiple models into a Scene, we sometimes only want SAO on the models that are actually going to
|
|
100
|
-
* show it, such as the architecture or structure, and not show SAO on models that won't show it well, such as the
|
|
101
|
-
* electrical wiring, or plumbing.
|
|
102
|
-
*
|
|
103
|
-
* To illustrate, lets load some of the models for the West Riverside Hospital. We'll enable SAO on the structure model,
|
|
104
|
-
* but disable it on the electrical and plumbing.
|
|
105
|
-
*
|
|
106
|
-
* This will only apply SAO to those models if {@link SAO#supported} and {@link SAO#enabled} are both true.
|
|
107
|
-
*
|
|
108
|
-
* Note, by the way, how we load the models in sequence. Since XKTLoaderPlugin uses scratch memory as part of its loading
|
|
109
|
-
* process, this allows the plugin to reuse that same memory across multiple loads, instead of having to create multiple
|
|
110
|
-
* pools of scratch memory.
|
|
111
|
-
*
|
|
112
|
-
* ````javascript
|
|
113
|
-
* const structure = xktLoader.load({
|
|
114
|
-
* id: "structure",
|
|
115
|
-
* src: "./models/xkt/WestRiverSideHospital/structure.xkt"
|
|
116
|
-
* edges: true,
|
|
117
|
-
* saoEnabled: true
|
|
118
|
-
* });
|
|
119
|
-
*
|
|
120
|
-
* structure.on("loaded", () => {
|
|
121
|
-
*
|
|
122
|
-
* const electrical = xktLoader.load({
|
|
123
|
-
* id: "electrical",
|
|
124
|
-
* src: "./models/xkt/WestRiverSideHospital/electrical.xkt",
|
|
125
|
-
* edges: true
|
|
126
|
-
* });
|
|
127
|
-
*
|
|
128
|
-
* electrical.on("loaded", () => {
|
|
129
|
-
*
|
|
130
|
-
* const plumbing = xktLoader.load({
|
|
131
|
-
* id: "plumbing",
|
|
132
|
-
* src: "./models/xkt/WestRiverSideHospital/plumbing.xkt",
|
|
133
|
-
* edges: true
|
|
134
|
-
* });
|
|
135
|
-
* });
|
|
136
|
-
* });
|
|
137
|
-
* ````
|
|
138
|
-
*
|
|
139
|
-
* ## Disabling SAO while camera is moving
|
|
140
|
-
*
|
|
141
|
-
* For smoother interaction with large models on low-power hardware, we can disable SAO while the {@link Camera} is moving:
|
|
142
|
-
*
|
|
143
|
-
* ````javascript
|
|
144
|
-
* const timeoutDuration = 150; // Milliseconds
|
|
145
|
-
* var timer = timeoutDuration;
|
|
146
|
-
* var saoDisabled = false;
|
|
147
|
-
*
|
|
148
|
-
* const onCameraMatrix = scene.camera.on("matrix", () => {
|
|
149
|
-
* timer = timeoutDuration;
|
|
150
|
-
* if (!saoDisabled) {
|
|
151
|
-
* scene.sao.enabled = false;
|
|
152
|
-
* saoDisabled = true;
|
|
153
|
-
* }
|
|
154
|
-
* });
|
|
155
|
-
*
|
|
156
|
-
* const onSceneTick = scene.on("tick", (tickEvent) => {
|
|
157
|
-
* if (!saoDisabled) {
|
|
158
|
-
* return;
|
|
159
|
-
* }
|
|
160
|
-
* timer -= tickEvent.deltaTime; // Milliseconds
|
|
161
|
-
* if (timer <= 0) {
|
|
162
|
-
* if (saoDisabled) {
|
|
163
|
-
* scene.sao.enabled = true;
|
|
164
|
-
* saoDisabled = false;
|
|
165
|
-
* }
|
|
166
|
-
* }
|
|
167
|
-
* });
|
|
168
|
-
* ````
|
|
169
|
-
*
|
|
170
|
-
* [[Run this example](https://yjkkit.github.io/yjkkit-sdk/examples/#techniques_nonInteractiveQuality)]
|
|
171
|
-
*/
|
|
172
|
-
class SAO extends Component {
|
|
173
|
-
|
|
174
|
-
/** @private */
|
|
175
|
-
constructor(owner, cfg = {}) {
|
|
176
|
-
|
|
177
|
-
super(owner, cfg);
|
|
178
|
-
|
|
179
|
-
const ua = navigator.userAgent.match(/(opera|chrome|safari|firefox|msie|mobile)\/?\s*(\.?\d+(\.\d+)*)/i);
|
|
180
|
-
const isSafari = (ua && ua[1].toLowerCase() === "safari");
|
|
181
|
-
|
|
182
|
-
this._supported = (!isSafari) &&
|
|
183
|
-
WEBGL_INFO.SUPPORTED_EXTENSIONS["OES_standard_derivatives"]; // For computing normals in SAO fragment shader
|
|
184
|
-
|
|
185
|
-
this.enabled = cfg.enabled;
|
|
186
|
-
this.kernelRadius = cfg.kernelRadius;
|
|
187
|
-
this.intensity = cfg.intensity;
|
|
188
|
-
this.bias = cfg.bias;
|
|
189
|
-
this.scale = cfg.scale;
|
|
190
|
-
this.minResolution = cfg.minResolution;
|
|
191
|
-
this.numSamples = cfg.numSamples;
|
|
192
|
-
this.blur = cfg.blur;
|
|
193
|
-
this.blendCutoff = cfg.blendCutoff;
|
|
194
|
-
this.blendFactor = cfg.blendFactor;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Gets whether or not SAO is supported by this browser and GPU.
|
|
199
|
-
*
|
|
200
|
-
* Even when enabled, SAO will only work if supported.
|
|
201
|
-
*
|
|
202
|
-
* @type {Boolean}
|
|
203
|
-
*/
|
|
204
|
-
get supported() {
|
|
205
|
-
return this._supported;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Sets whether SAO is enabled for the {@link Scene}.
|
|
210
|
-
*
|
|
211
|
-
* Even when enabled, SAO will only work if supported.
|
|
212
|
-
*
|
|
213
|
-
* Default value is ````false````.
|
|
214
|
-
*
|
|
215
|
-
* @type {Boolean}
|
|
216
|
-
*/
|
|
217
|
-
set enabled(value) {
|
|
218
|
-
value = !!value;
|
|
219
|
-
if (this._enabled === value) {
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
this._enabled = value;
|
|
223
|
-
this.glRedraw();
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* Gets whether SAO is enabled for the {@link Scene}.
|
|
228
|
-
*
|
|
229
|
-
* Even when enabled, SAO will only apply if supported.
|
|
230
|
-
*
|
|
231
|
-
* Default value is ````false````.
|
|
232
|
-
*
|
|
233
|
-
* @type {Boolean}
|
|
234
|
-
*/
|
|
235
|
-
get enabled() {
|
|
236
|
-
return this._enabled;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* Returns true if SAO is currently possible, where it is supported, enabled, and the current scene state is compatible.
|
|
241
|
-
* Called internally by renderer logic.
|
|
242
|
-
* @private
|
|
243
|
-
* @returns {boolean}
|
|
244
|
-
*/
|
|
245
|
-
get possible() {
|
|
246
|
-
if (!this._supported) {
|
|
247
|
-
return false;
|
|
248
|
-
}
|
|
249
|
-
if (!this._enabled) {
|
|
250
|
-
return false;
|
|
251
|
-
}
|
|
252
|
-
const projection = this.scene.camera.projection;
|
|
253
|
-
if (projection === "customProjection") {
|
|
254
|
-
return false;
|
|
255
|
-
}
|
|
256
|
-
if (projection === "frustum") {
|
|
257
|
-
return false;
|
|
258
|
-
}
|
|
259
|
-
return true;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* @private
|
|
264
|
-
* @returns {boolean|*}
|
|
265
|
-
*/
|
|
266
|
-
get active() {
|
|
267
|
-
return this._active;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Sets the maximum area that SAO takes into account when checking for possible occlusion for each fragment.
|
|
272
|
-
*
|
|
273
|
-
* Default value is ````100.0````.
|
|
274
|
-
*
|
|
275
|
-
* @type {Number}
|
|
276
|
-
*/
|
|
277
|
-
set kernelRadius(value) {
|
|
278
|
-
if (value === undefined || value === null) {
|
|
279
|
-
value = 100.0;
|
|
280
|
-
}
|
|
281
|
-
if (this._kernelRadius === value) {
|
|
282
|
-
return;
|
|
283
|
-
}
|
|
284
|
-
this._kernelRadius = value;
|
|
285
|
-
this.glRedraw();
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
/**
|
|
289
|
-
* Gets the maximum area that SAO takes into account when checking for possible occlusion for each fragment.
|
|
290
|
-
*
|
|
291
|
-
* Default value is ````100.0````.
|
|
292
|
-
*
|
|
293
|
-
* @type {Number}
|
|
294
|
-
*/
|
|
295
|
-
get kernelRadius() {
|
|
296
|
-
return this._kernelRadius;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* Sets the degree of darkening (ambient obscurance) produced by the SAO effect.
|
|
301
|
-
*
|
|
302
|
-
* Default value is ````0.15````.
|
|
303
|
-
*
|
|
304
|
-
* @type {Number}
|
|
305
|
-
*/
|
|
306
|
-
set intensity(value) {
|
|
307
|
-
if (value === undefined || value === null) {
|
|
308
|
-
value = 0.15;
|
|
309
|
-
}
|
|
310
|
-
if (this._intensity === value) {
|
|
311
|
-
return;
|
|
312
|
-
}
|
|
313
|
-
this._intensity = value;
|
|
314
|
-
this.glRedraw();
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
/**
|
|
318
|
-
* Gets the degree of darkening (ambient obscurance) produced by the SAO effect.
|
|
319
|
-
*
|
|
320
|
-
* Default value is ````0.15````.
|
|
321
|
-
*
|
|
322
|
-
* @type {Number}
|
|
323
|
-
*/
|
|
324
|
-
get intensity() {
|
|
325
|
-
return this._intensity;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
/**
|
|
329
|
-
* Sets the SAO bias.
|
|
330
|
-
*
|
|
331
|
-
* Default value is ````0.5````.
|
|
332
|
-
*
|
|
333
|
-
* @type {Number}
|
|
334
|
-
*/
|
|
335
|
-
set bias(value) {
|
|
336
|
-
if (value === undefined || value === null) {
|
|
337
|
-
value = 0.5;
|
|
338
|
-
}
|
|
339
|
-
if (this._bias === value) {
|
|
340
|
-
return;
|
|
341
|
-
}
|
|
342
|
-
this._bias = value;
|
|
343
|
-
this.glRedraw();
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
/**
|
|
347
|
-
* Gets the SAO bias.
|
|
348
|
-
*
|
|
349
|
-
* Default value is ````0.5````.
|
|
350
|
-
*
|
|
351
|
-
* @type {Number}
|
|
352
|
-
*/
|
|
353
|
-
get bias() {
|
|
354
|
-
return this._bias;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* Sets the SAO occlusion scale.
|
|
359
|
-
*
|
|
360
|
-
* Default value is ````1.0````.
|
|
361
|
-
*
|
|
362
|
-
* @type {Number}
|
|
363
|
-
*/
|
|
364
|
-
set scale(value) {
|
|
365
|
-
if (value === undefined || value === null) {
|
|
366
|
-
value = 1.0;
|
|
367
|
-
}
|
|
368
|
-
if (this._scale === value) {
|
|
369
|
-
return;
|
|
370
|
-
}
|
|
371
|
-
this._scale = value;
|
|
372
|
-
this.glRedraw();
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* Gets the SAO occlusion scale.
|
|
377
|
-
*
|
|
378
|
-
* Default value is ````1.0````.
|
|
379
|
-
*
|
|
380
|
-
* @type {Number}
|
|
381
|
-
*/
|
|
382
|
-
get scale() {
|
|
383
|
-
return this._scale;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* Sets the SAO minimum resolution.
|
|
388
|
-
*
|
|
389
|
-
* Default value is ````0.0````.
|
|
390
|
-
*
|
|
391
|
-
* @type {Number}
|
|
392
|
-
*/
|
|
393
|
-
set minResolution(value) {
|
|
394
|
-
if (value === undefined || value === null) {
|
|
395
|
-
value = 0.0;
|
|
396
|
-
}
|
|
397
|
-
if (this._minResolution === value) {
|
|
398
|
-
return;
|
|
399
|
-
}
|
|
400
|
-
this._minResolution = value;
|
|
401
|
-
this.glRedraw();
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
/**
|
|
405
|
-
* Gets the SAO minimum resolution.
|
|
406
|
-
*
|
|
407
|
-
* Default value is ````0.0````.
|
|
408
|
-
*
|
|
409
|
-
* @type {Number}
|
|
410
|
-
*/
|
|
411
|
-
get minResolution() {
|
|
412
|
-
return this._minResolution;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
/**
|
|
416
|
-
* Sets the number of SAO samples.
|
|
417
|
-
*
|
|
418
|
-
* Default value is ````10````.
|
|
419
|
-
*
|
|
420
|
-
* Update this sparingly, since it causes a shader recompile.
|
|
421
|
-
*
|
|
422
|
-
* @type {Number}
|
|
423
|
-
*/
|
|
424
|
-
set numSamples(value) {
|
|
425
|
-
if (value === undefined || value === null) {
|
|
426
|
-
value = 10;
|
|
427
|
-
}
|
|
428
|
-
if (this._numSamples === value) {
|
|
429
|
-
return;
|
|
430
|
-
}
|
|
431
|
-
this._numSamples = value;
|
|
432
|
-
this.glRedraw();
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
/**
|
|
436
|
-
* Gets the number of SAO samples.
|
|
437
|
-
*
|
|
438
|
-
* Default value is ````10````.
|
|
439
|
-
*
|
|
440
|
-
* @type {Number}
|
|
441
|
-
*/
|
|
442
|
-
get numSamples() {
|
|
443
|
-
return this._numSamples;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
/**
|
|
447
|
-
* Sets whether Guassian blur is enabled.
|
|
448
|
-
*
|
|
449
|
-
* Default value is ````true````.
|
|
450
|
-
*
|
|
451
|
-
* @type {Boolean}
|
|
452
|
-
*/
|
|
453
|
-
set blur(value) {
|
|
454
|
-
value = (value !== false);
|
|
455
|
-
if (this._blur === value) {
|
|
456
|
-
return;
|
|
457
|
-
}
|
|
458
|
-
this._blur = value;
|
|
459
|
-
this.glRedraw();
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
/**
|
|
463
|
-
* Gets whether Guassian blur is enabled.
|
|
464
|
-
*
|
|
465
|
-
* Default value is ````true````.
|
|
466
|
-
*
|
|
467
|
-
* @type {Boolean}
|
|
468
|
-
*/
|
|
469
|
-
get blur() {
|
|
470
|
-
return this._blur;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
/**
|
|
474
|
-
* Sets the SAO blend cutoff.
|
|
475
|
-
*
|
|
476
|
-
* Default value is ````0.3````.
|
|
477
|
-
*
|
|
478
|
-
* Normally you don't need to alter this.
|
|
479
|
-
*
|
|
480
|
-
* @type {Number}
|
|
481
|
-
*/
|
|
482
|
-
set blendCutoff(value) {
|
|
483
|
-
if (value === undefined || value === null) {
|
|
484
|
-
value = 0.3;
|
|
485
|
-
}
|
|
486
|
-
if (this._blendCutoff === value) {
|
|
487
|
-
return;
|
|
488
|
-
}
|
|
489
|
-
this._blendCutoff = value;
|
|
490
|
-
this.glRedraw();
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
/**
|
|
494
|
-
* Gets the SAO blend cutoff.
|
|
495
|
-
*
|
|
496
|
-
* Default value is ````0.3````.
|
|
497
|
-
*
|
|
498
|
-
* Normally you don't need to alter this.
|
|
499
|
-
*
|
|
500
|
-
* @type {Number}
|
|
501
|
-
*/
|
|
502
|
-
get blendCutoff() {
|
|
503
|
-
return this._blendCutoff;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
/**
|
|
507
|
-
* Sets the SAO blend factor.
|
|
508
|
-
*
|
|
509
|
-
* Default value is ````1.0````.
|
|
510
|
-
*
|
|
511
|
-
* Normally you don't need to alter this.
|
|
512
|
-
*
|
|
513
|
-
* @type {Number}
|
|
514
|
-
*/
|
|
515
|
-
set blendFactor(value) {
|
|
516
|
-
if (value === undefined || value === null) {
|
|
517
|
-
value = 1.0;
|
|
518
|
-
}
|
|
519
|
-
if (this._blendFactor === value) {
|
|
520
|
-
return;
|
|
521
|
-
}
|
|
522
|
-
this._blendFactor = value;
|
|
523
|
-
this.glRedraw();
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
/**
|
|
527
|
-
* Gets the SAO blend scale.
|
|
528
|
-
*
|
|
529
|
-
* Default value is ````1.0````.
|
|
530
|
-
*
|
|
531
|
-
* Normally you don't need to alter this.
|
|
532
|
-
*
|
|
533
|
-
* @type {Number}
|
|
534
|
-
*/
|
|
535
|
-
get blendFactor() {
|
|
536
|
-
return this._blendFactor;
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
/**
|
|
540
|
-
* Destroys this component.
|
|
541
|
-
*/
|
|
542
|
-
destroy() {
|
|
543
|
-
super.destroy();
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
export {SAO};
|