csyjk 1.1.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- package/.babelrc +7 -0
- package/.idea/modules.xml +8 -0
- package/.idea/xx.iml +12 -0
- package/dist/app.js +43 -0
- package/{index.html → dist/index.html} +0 -0
- package/{style.css → dist/style.css} +1 -1
- package/package.json +40 -5
- package/public/gltf.js +2241 -0
- package/public/index.html +10 -0
- package/src/index.js +3 -0
- package/src/lib/gltf/assets/check.jpg +0 -0
- package/src/lib/gltf/assets/iconfont/iconfont.css +358 -0
- package/src/lib/gltf/assets/iconfont/iconfont.eot +0 -0
- package/src/lib/gltf/assets/iconfont/iconfont.js +1 -0
- package/src/lib/gltf/assets/iconfont/iconfont.json +604 -0
- package/src/lib/gltf/assets/iconfont/iconfont.svg +189 -0
- 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 +15 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/extras/ContextMenu/ContextMenu.js +863 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/extras/ContextMenu/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/extras/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/index.js +3 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AngleMeasurementsPlugin/AngleMeasurement.js +462 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AngleMeasurementsPlugin/AngleMeasurementsControl.js +279 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AngleMeasurementsPlugin/AngleMeasurementsPlugin.js +262 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AngleMeasurementsPlugin/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AnnotationsPlugin/Annotation.js +362 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AnnotationsPlugin/AnnotationsPlugin.js +575 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AnnotationsPlugin/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AxisGizmoPlugin/AxisGizmoPlugin.js +333 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AxisGizmoPlugin/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/BCFViewpointsPlugin/BCFViewpointsPlugin.js +777 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/BCFViewpointsPlugin/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.js +525 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControl.js +242 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.js +297 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/DistanceMeasurementsPlugin/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/FastNavPlugin/FastNavPlugin.js +345 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/FastNavPlugin/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/GLTFDefaultDataSource.js +122 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.js +462 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/GLTFPerformanceModelLoader.js +508 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/GLTFSceneGraphLoader.js +922 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/index.js +2 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/NavCubePlugin/CubeTextureCanvas.js +273 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/NavCubePlugin/NavCubePlugin.js +687 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/NavCubePlugin/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/OBJLoaderPlugin/OBJLoaderPlugin.js +145 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/OBJLoaderPlugin/OBJSceneGraphLoader.js +777 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/OBJLoaderPlugin/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/STLLoaderPlugin/STLDefaultDataSource.js +33 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/STLLoaderPlugin/STLLoaderPlugin.js +273 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/STLLoaderPlugin/STLSceneGraphLoader.js +313 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/STLLoaderPlugin/index.js +2 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/Control.js +1328 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/Overview.js +249 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/Plane.js +169 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/SectionPlanesPlugin.js +403 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SkyboxesPlugin/SkyboxesPlugin.js +134 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SkyboxesPlugin/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/IFCStoreyPlanObjectStates.js +77 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/Storey.js +61 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/StoreyMap.js +57 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/StoreyViewsPlugin.js +822 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/ModelTreeView.js +888 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/TreeViewNode.js +88 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/TreeViewPlugin.js +624 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/modelValidation.js +87 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/ViewCullPlugin/ViewCullPlugin.js +295 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/ViewCullPlugin/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/XKTDefaultDataSource.js +78 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/XKTLoaderPlugin.js +847 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/index.js +2 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV1.js +167 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV2.js +228 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV3.js +220 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV4.js +279 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV5.js +244 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV6.js +301 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV7.js +426 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV8.js +479 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/lib/pako.js +6818 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/XML3DLoaderPlugin.js +238 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/XML3DSceneGraphLoader.js +1279 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/.jshintrc +11 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/deflate.js +2060 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/inflate.js +2155 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/mime-types.js +1002 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/pako/codecs.js +64 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/z-worker.js +153 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/zip-ext.js +267 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/zip-fs.js +553 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/zip.js +991 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/zlib-asm/codecs.js +49 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/index.js +17 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/lib/culling/ObjectCullStates.js +205 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/lib/html/Dot.js +78 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/lib/html/Label.js +97 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/lib/html/Wire.js +95 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/Plugin.js +112 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/Viewer.js +372 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/index.js +3 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/IFCObjectDefaultColors.js +162 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/IFCObjectDefaults.js +39 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/MetaModel.js +145 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/MetaObject.js +215 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/MetaScene.js +311 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/CameraControl.js +1669 -0
- 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 +312 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/controllers/PanController.js +112 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/controllers/PickController.js +193 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/controllers/PivotController.js +289 -0
- 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 +122 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/KeyboardPanRotateDollyHandler.js +186 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/MouseMiscHandler.js +68 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/MousePanRotateDollyHandler.js +439 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/MousePickHandler.js +361 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/TouchPanRotateAndDollyHandler.js +258 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/TouchPickHandler.js +197 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/mouspan.js +498 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/Component.js +908 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/Entity.js +475 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/ImagePlane/ImagePlane.js +570 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/ImagePlane/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/PerformanceModel.js +2623 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/ENTITY_FLAGS.js +21 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/PerformanceMesh.js +262 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/PerformanceNode.js +697 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/RENDER_PASSES.js +34 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/ScratchMemory.js +63 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/compression.js +183 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/LinesBatchingBuffer.js +33 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/LinesBatchingLayer.js +736 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/LinesBatchingRenderers.js +68 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/renderers/LinesBatchingColorRenderer.js +295 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/renderers/LinesBatchingSilhouetteRenderer.js +327 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesInstancing/LinesInstancingLayer.js +698 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesInstancing/LinesInstancingRenderers.js +68 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesInstancing/renderers/LinesInstancingColorRenderer.js +364 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesInstancing/renderers/LinesInstancingSilhouetteRenderer.js +356 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/PointsBatchingBuffer.js +33 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/PointsBatchingLayer.js +776 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/PointsBatchingRenderers.js +113 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingColorRenderer.js +340 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingOcclusionRenderer.js +312 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingPickDepthRenderer.js +343 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingPickMeshRenderer.js +331 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingShadowRenderer.js +242 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingSilhouetteRenderer.js +348 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/PointsInstancingLayer.js +737 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/PointsInstancingRenderers.js +143 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingColorRenderer.js +373 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingDepthRenderer.js +366 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingOcclusionRenderer.js +370 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingPickDepthRenderer.js +386 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingPickMeshRenderer.js +376 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingShadowRenderer.js +293 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingSilhouetteRenderer.js +382 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/TrianglesBatchingBuffer.js +37 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/TrianglesBatchingLayer.js +1017 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/TrianglesBatchingRenderers.js +246 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingColorQualityRenderer.js +809 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingColorRenderer.js +504 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingDepthRenderer.js +297 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingEdgesColorRenderer.js +300 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingEdgesRenderer.js +322 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingNormalsRenderer.js +311 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingOcclusionRenderer.js +291 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingPickDepthRenderer.js +319 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingPickMeshRenderer.js +305 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingPickNormalsRenderer.js +300 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingShadowRenderer.js +242 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingSilhouetteRenderer.js +323 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/TrianglesInstancingLayer.js +969 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/TrianglesInstancingRenderers.js +246 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingColorQualityRenderer.js +859 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingColorRenderer.js +557 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingDepthRenderer.js +341 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingEdgesColorRenderer.js +338 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingEdgesRenderer.js +356 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingNormalsRenderer.js +354 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingOcclusionRenderer.js +329 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingPickDepthRenderer.js +358 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingPickMeshRenderer.js +349 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingPickNormalsRenderer.js +363 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingShadowRenderer.js +284 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingSilhouetteRenderer.js +354 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/Camera.js +880 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/CameraFlightAnimation.js +669 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/CameraPath.js +194 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/CameraPathAnimation.js +326 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/CustomProjection.js +149 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/Frustum.js +316 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/Ortho.js +286 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/Perspective.js +302 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/index.js +2 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/canvas/Canvas.js +464 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/canvas/Spinner.js +323 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/core.js +234 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/Geometry.js +33 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/ReadableGeometry.js +689 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/VBOGeometry.js +327 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildBoxGeometry.js +238 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildBoxLinesGeometry.js +106 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildCylinderGeometry.js +271 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildGridGeometry.js +102 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildPlaneGeometry.js +168 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildSphereGeometry.js +161 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildTorusGeometry.js +172 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildVectorTextGeometry.js +1721 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/index.js +8 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/index.js +4 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/loaders/index.js +2 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/loaders/load3DSGeometry.js +103 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/loaders/loadOBJGeometry.js +130 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/index.js +18 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/input/Input.js +1475 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/libs/canvas2image.js +218 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/libs/k3d.js +1032 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/AmbientLight.js +175 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/CubeTexture.js +156 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/DirLight.js +314 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/Light.js +29 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/LightMap.js +77 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/PointLight.js +395 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/ReflectionMap.js +79 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/Shadow.js +138 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/index.js +5 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/marker/Marker.js +382 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/marker/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/EdgeMaterial.js +359 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/EmphasisMaterial.js +577 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/Fresnel.js +222 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/LambertMaterial.js +378 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/LinesMaterial.js +169 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/Material.js +39 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/MetallicMaterial.js +820 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/PhongMaterial.js +860 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/PointsMaterial.js +320 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/SpecularMaterial.js +807 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/Texture.js +522 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/index.js +8 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/Frustum.js +118 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/buildEdgeIndices.js +162 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/geometryCompressionUtils.js +353 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/math.js +5302 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/rtcCoords.js +132 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mementos/CameraMemento.js +200 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mementos/ModelMemento.js +272 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mementos/ObjectsMemento.js +259 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mementos/index.js +3 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/Mesh.js +2165 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/draw/DrawRenderer.js +978 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/draw/DrawShaderSource.js +1566 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/emphasis/EmphasisEdgesRenderer.js +249 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/emphasis/EmphasisEdgesShaderSource.js +163 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/emphasis/EmphasisFillRenderer.js +276 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/emphasis/EmphasisFillShaderSource.js +269 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/occlusion/OcclusionRenderer.js +207 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/occlusion/OcclusionShaderSource.js +156 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/pick/PickMeshRenderer.js +210 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/pick/PickMeshShaderSource.js +146 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/pick/PickTriangleRenderer.js +186 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/pick/PickTriangleShaderSource.js +120 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/shadow/ShadowRenderer.js +214 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/shadow/ShadowShaderSource.js +96 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/metriqs/Metriqs.js +259 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/nodes/Node.js +1356 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/nodes/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/CubicBezierCurve.js +194 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/Curve.js +183 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/Path.js +239 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/QuadraticBezierCurve.js +161 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/SplineCurve.js +133 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/index.js +5 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/postfx/SAO.js +547 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/scene/Scene.js +2481 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/sectionPlane/SectionPlane.js +194 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/sectionPlane/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/skybox/Skybox.js +119 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/skybox/index.js +1 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/stats.js +45 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/utils/Map.js +45 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/utils/Queue.js +56 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/utils/index.js +2 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/utils.js +452 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/viewport/Viewport.js +212 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/ArrayBuf.js +121 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Attribute.js +23 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Drawable.js +270 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/FrameContext.js +259 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/PickResult.js +317 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Pickable.js +69 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Program.js +179 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/RenderBuffer.js +315 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/RenderFlags.js +203 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/RenderState.js +40 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Renderer.js +1300 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Sampler.js +18 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Shader.js +49 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Texture2D.js +217 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/occlusion/OcclusionLayer.js +214 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/occlusion/OcclusionTester.js +432 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/sao/SAODepthLimitedBlurRenderer.js +326 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/sao/SAOOcclusionRenderer.js +375 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/webglEnums.js +61 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webglInfo.js +48 -0
- package/src/lib/gltf/gltf.css +392 -0
- package/src/lib/gltf/gltf.js +2241 -0
- package/webpack.config.js +70 -0
- package/app.js +0 -43
@@ -0,0 +1,132 @@
|
|
1
|
+
import {math} from './math.js';
|
2
|
+
|
3
|
+
const tempVec3a = math.vec3();
|
4
|
+
const tempAABB3 = math.AABB3();
|
5
|
+
|
6
|
+
/**
|
7
|
+
* Given a view matrix and a relative-to-center (RTC) coordinate origin, returns a view matrix
|
8
|
+
* to transform RTC coordinates to View-space.
|
9
|
+
*
|
10
|
+
* The returned view matrix is
|
11
|
+
*
|
12
|
+
* @private
|
13
|
+
*/
|
14
|
+
const createRTCViewMat = (function () {
|
15
|
+
|
16
|
+
const tempMat = new Float32Array(16);
|
17
|
+
const rtcCenterWorld = new Float64Array(4);
|
18
|
+
const rtcCenterView = new Float64Array(4);
|
19
|
+
|
20
|
+
return function (viewMat, rtcCenter, rtcViewMat = tempMat) {
|
21
|
+
rtcCenterWorld[0] = rtcCenter[0];
|
22
|
+
rtcCenterWorld[1] = rtcCenter[1];
|
23
|
+
rtcCenterWorld[2] = rtcCenter[2];
|
24
|
+
rtcCenterWorld[3] = 1;
|
25
|
+
math.transformVec4(viewMat, rtcCenterWorld, rtcCenterView);
|
26
|
+
math.setMat4Translation(viewMat, rtcCenterView, rtcViewMat);
|
27
|
+
return rtcViewMat;
|
28
|
+
}
|
29
|
+
}());
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Converts a World-space 3D position to RTC.
|
33
|
+
*
|
34
|
+
* Given a double-precision World-space position, returns a double-precision relative-to-center (RTC) center pos
|
35
|
+
* and a single-precision offset fom that center.
|
36
|
+
*
|
37
|
+
* @param {Float64Array} worldPos The World-space position.
|
38
|
+
* @param {Float64Array} rtcCenter Double-precision relative-to-center (RTC) center pos.
|
39
|
+
* @param {Float32Array} rtcPos Single-precision offset fom that center.
|
40
|
+
*/
|
41
|
+
function worldToRTCPos(worldPos, rtcCenter, rtcPos) {
|
42
|
+
|
43
|
+
const xHigh = Float32Array.from([worldPos[0]])[0];
|
44
|
+
const xLow = worldPos[0] - xHigh;
|
45
|
+
|
46
|
+
const yHigh = Float32Array.from([worldPos[1]])[0];
|
47
|
+
const yLow = worldPos[1] - yHigh;
|
48
|
+
|
49
|
+
const zHigh = Float32Array.from([worldPos[2]])[0];
|
50
|
+
const zLow = worldPos[2] - zHigh;
|
51
|
+
|
52
|
+
rtcCenter[0] = xHigh;
|
53
|
+
rtcCenter[1] = yHigh;
|
54
|
+
rtcCenter[2] = zHigh;
|
55
|
+
|
56
|
+
rtcPos[0] = xLow;
|
57
|
+
rtcPos[1] = yLow;
|
58
|
+
rtcPos[2] = zLow;
|
59
|
+
}
|
60
|
+
|
61
|
+
|
62
|
+
/**
|
63
|
+
* Converts a flat array of double-precision positions to RTC positions.
|
64
|
+
*
|
65
|
+
* Returns the RTC positions, along with a computed RTC center for those positions.
|
66
|
+
*
|
67
|
+
* When computing the RTC position, this function uses a modulus operation to ensure that, whenever possible,
|
68
|
+
* identical RTC positions are reused for different positions arrays.
|
69
|
+
*
|
70
|
+
* @param {Float64Array} worldPositions Flat array of World-space 3D positions.
|
71
|
+
* @param {Float64Array} rtcPositions Outputs the computed flat array of 3D RTC positions.
|
72
|
+
* @param {Float64Array} rtcCenter Outputs the computed double-precision relative-to-center (RTC) center pos.
|
73
|
+
* @param {Number} [cellSize=10000000] The size of each coordinate cell within the RTC coordinate system.
|
74
|
+
* @returns {Boolean} ````True```` if the positions actually needed conversion to RTC, else ````false````. When
|
75
|
+
* ````false````, we can safely ignore the data returned in ````rtcPositions```` and ````rtcCenter````,
|
76
|
+
* since ````rtcCenter```` will equal ````[0,0,0]````, and ````rtcPositions```` will contain identical values to ````positions````.
|
77
|
+
*/
|
78
|
+
function worldToRTCPositions(worldPositions, rtcPositions, rtcCenter, cellSize = 10000000) {
|
79
|
+
|
80
|
+
const center = math.getPositionsCenter(worldPositions, tempVec3a);
|
81
|
+
|
82
|
+
const rtcCenterX = Math.round(center[0] / cellSize) * cellSize;
|
83
|
+
const rtcCenterY = Math.round(center[1] / cellSize) * cellSize;
|
84
|
+
const rtcCenterZ = Math.round(center[2] / cellSize) * cellSize;
|
85
|
+
|
86
|
+
for (let i = 0, len = worldPositions.length; i < len; i += 3) {
|
87
|
+
rtcPositions[i + 0] = worldPositions[i + 0] - rtcCenterX;
|
88
|
+
rtcPositions[i + 1] = worldPositions[i + 1] - rtcCenterY;
|
89
|
+
rtcPositions[i + 2] = worldPositions[i + 2] - rtcCenterZ;
|
90
|
+
}
|
91
|
+
|
92
|
+
rtcCenter[0] = rtcCenterX;
|
93
|
+
rtcCenter[1] = rtcCenterY;
|
94
|
+
rtcCenter[2] = rtcCenterZ;
|
95
|
+
|
96
|
+
const rtcNeeded = (rtcCenter[0] !== 0 || rtcCenter[1] !== 0 || rtcCenter[2] !== 0);
|
97
|
+
|
98
|
+
return rtcNeeded;
|
99
|
+
}
|
100
|
+
|
101
|
+
/**
|
102
|
+
* Converts an RTC 3D position to World-space.
|
103
|
+
*
|
104
|
+
* @param {Float64Array} rtcCenter Double-precision relative-to-center (RTC) center pos.
|
105
|
+
* @param {Float32Array} rtcPos Single-precision offset fom that center.
|
106
|
+
* @param {Float64Array} worldPos The World-space position.
|
107
|
+
*/
|
108
|
+
function rtcToWorldPos(rtcCenter, rtcPos, worldPos) {
|
109
|
+
worldPos[0] = rtcCenter[0] + rtcPos[0];
|
110
|
+
worldPos[1] = rtcCenter[1] + rtcPos[1];
|
111
|
+
worldPos[2] = rtcCenter[2] + rtcPos[2];
|
112
|
+
return worldPos;
|
113
|
+
}
|
114
|
+
|
115
|
+
/**
|
116
|
+
* Given a 3D plane defined by distance from origin and direction, and an RTC center position,
|
117
|
+
* return a plane position that is relative to the RTC center.
|
118
|
+
*
|
119
|
+
* @param dist
|
120
|
+
* @param dir
|
121
|
+
* @param rtcCenter
|
122
|
+
* @param rtcPlanePos
|
123
|
+
* @returns {*}
|
124
|
+
*/
|
125
|
+
function getPlaneRTCPos(dist, dir, rtcCenter, rtcPlanePos) {
|
126
|
+
const rtcCenterToPlaneDist = math.dotVec3(dir, rtcCenter) + dist;
|
127
|
+
const dirNormalized = math.normalizeVec3(dir, tempVec3a);
|
128
|
+
math.mulVec3Scalar(dirNormalized, -rtcCenterToPlaneDist, rtcPlanePos);
|
129
|
+
return rtcPlanePos;
|
130
|
+
}
|
131
|
+
|
132
|
+
export {createRTCViewMat, worldToRTCPos, worldToRTCPositions, rtcToWorldPos, getPlaneRTCPos};
|
@@ -0,0 +1,200 @@
|
|
1
|
+
import {math} from "../math/math.js";
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @desc Saves and restores the state of a {@link Scene}'s {@link Camera}.
|
5
|
+
*
|
6
|
+
* ## See Also
|
7
|
+
*
|
8
|
+
* * {@link ModelMemento} - Saves and restores a snapshot of the visual state of the {@link Entity}'s of a model within a {@link Scene}.
|
9
|
+
* * {@link ObjectsMemento} - Saves and restores a snapshot of the visual state of the {@link Entity}'s that represent objects within a {@link Scene}.
|
10
|
+
*
|
11
|
+
* ## Usage
|
12
|
+
*
|
13
|
+
* In the example below, we'll create a {@link Viewer} and use an {@link XKTLoaderPlugin} to load an ````.xkt```` model. When the model has loaded, we'll save a snapshot of the {@link Camera} state in an CameraMemento. Then we'll move the Camera, and then we'll restore its original state again from the CameraMemento.
|
14
|
+
*
|
15
|
+
* ````javascript
|
16
|
+
* import {Viewer, XKTLoaderPlugin, CameraMemento} from "yjkkit-sdk.es.js";
|
17
|
+
*
|
18
|
+
* const viewer = new Viewer({
|
19
|
+
* canvasId: "myCanvas"
|
20
|
+
* });
|
21
|
+
*
|
22
|
+
* // Load a model
|
23
|
+
* const xktLoader = new XKTLoaderPlugin(viewer);
|
24
|
+
*
|
25
|
+
* const model = xktLoader.load({
|
26
|
+
* id: "myModel",
|
27
|
+
* src: "./models/xkt/schependomlaan/schependomlaan.xkt"
|
28
|
+
* });
|
29
|
+
*
|
30
|
+
* // Set camera
|
31
|
+
* viewer.camera.eye = [-2.56, 8.38, 8.27];
|
32
|
+
* viewer.camera.look = [13.44, 3.31, -14.83];
|
33
|
+
* viewer.camera.up = [0.10, 0.98, -0.14];
|
34
|
+
*
|
35
|
+
* model.on("loaded", () => {
|
36
|
+
*
|
37
|
+
* // Model has loaded
|
38
|
+
*
|
39
|
+
* // Save memento of camera state
|
40
|
+
* const cameraMemento = new CameraMemento();
|
41
|
+
*
|
42
|
+
* cameraMemento.saveCamera(viewer.scene);
|
43
|
+
*
|
44
|
+
* // Move the camera
|
45
|
+
* viewer.camera.eye = [45.3, 2.00, 5.13];
|
46
|
+
* viewer.camera.look = [0.0, 5.5, 10.0];
|
47
|
+
* viewer.camera.up = [0.10, 0.98, -0.14];
|
48
|
+
*
|
49
|
+
* // Restore the camera state again
|
50
|
+
* objectsMemento.restoreCamera(viewer.scene);
|
51
|
+
* });
|
52
|
+
* ````
|
53
|
+
*/
|
54
|
+
class CameraMemento {
|
55
|
+
|
56
|
+
/**
|
57
|
+
* Creates a CameraState.
|
58
|
+
*
|
59
|
+
* @param {Scene} [scene] When given, immediately saves the state of the given {@link Scene}'s {@link Camera}.
|
60
|
+
*/
|
61
|
+
constructor(scene) {
|
62
|
+
|
63
|
+
/** @private */
|
64
|
+
this._eye = math.vec3();
|
65
|
+
|
66
|
+
/** @private */
|
67
|
+
this._look = math.vec3();
|
68
|
+
|
69
|
+
/** @private */
|
70
|
+
this._up = math.vec3();
|
71
|
+
|
72
|
+
/** @private */
|
73
|
+
this._projection = {};
|
74
|
+
|
75
|
+
if (scene) {
|
76
|
+
this.saveCamera(scene);
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
/**
|
81
|
+
* Saves the state of the given {@link Scene}'s {@link Camera}.
|
82
|
+
*
|
83
|
+
* @param {Scene} scene The scene that contains the {@link Camera}.
|
84
|
+
*/
|
85
|
+
saveCamera(scene) {
|
86
|
+
|
87
|
+
const camera = scene.camera;
|
88
|
+
const project = camera.project;
|
89
|
+
|
90
|
+
this._eye.set(camera.eye);
|
91
|
+
this._look.set(camera.look);
|
92
|
+
this._up.set(camera.up);
|
93
|
+
|
94
|
+
switch (camera.projection) {
|
95
|
+
|
96
|
+
case "perspective":
|
97
|
+
this._projection = {
|
98
|
+
projection: "perspective",
|
99
|
+
fov: project.fov,
|
100
|
+
fovAxis: project.fovAxis,
|
101
|
+
near: project.near,
|
102
|
+
far: project.far
|
103
|
+
};
|
104
|
+
break;
|
105
|
+
|
106
|
+
case "ortho":
|
107
|
+
this._projection = {
|
108
|
+
projection: "ortho",
|
109
|
+
scale: project.scale,
|
110
|
+
near: project.near,
|
111
|
+
far: project.far
|
112
|
+
};
|
113
|
+
break;
|
114
|
+
|
115
|
+
case "frustum":
|
116
|
+
this._projection = {
|
117
|
+
projection: "frustum",
|
118
|
+
left: project.left,
|
119
|
+
right: project.right,
|
120
|
+
top: project.top,
|
121
|
+
bottom: project.bottom,
|
122
|
+
near: project.near,
|
123
|
+
far: project.far
|
124
|
+
};
|
125
|
+
break;
|
126
|
+
|
127
|
+
case "custom":
|
128
|
+
this._projection = {
|
129
|
+
projection: "custom",
|
130
|
+
matrix: project.matrix.slice()
|
131
|
+
};
|
132
|
+
break;
|
133
|
+
}
|
134
|
+
}
|
135
|
+
|
136
|
+
/**
|
137
|
+
* Restores a {@link Scene}'s {@link Camera} to the state previously captured with {@link CameraMemento#saveCamera}.
|
138
|
+
*
|
139
|
+
* @param {Scene} scene The scene.
|
140
|
+
* @param {Function} [done] When this callback is given, will fly the {@link Camera} to the saved state then fire the callback. Otherwise will just jump the Camera to the saved state.
|
141
|
+
*/
|
142
|
+
restoreCamera(scene, done) {
|
143
|
+
|
144
|
+
const camera = scene.camera;
|
145
|
+
const savedProjection = this._projection;
|
146
|
+
|
147
|
+
function restoreProjection() {
|
148
|
+
|
149
|
+
switch (savedProjection.type) {
|
150
|
+
|
151
|
+
case "perspective":
|
152
|
+
camera.perspective.fov = savedProjection.fov;
|
153
|
+
camera.perspective.fovAxis = savedProjection.fovAxis;
|
154
|
+
camera.perspective.near = savedProjection.near;
|
155
|
+
camera.perspective.far = savedProjection.far;
|
156
|
+
break;
|
157
|
+
|
158
|
+
case "ortho":
|
159
|
+
camera.ortho.scale = savedProjection.scale;
|
160
|
+
camera.ortho.near = savedProjection.near;
|
161
|
+
camera.ortho.far = savedProjection.far;
|
162
|
+
break;
|
163
|
+
|
164
|
+
case "frustum":
|
165
|
+
camera.frustum.left = savedProjection.left;
|
166
|
+
camera.frustum.right = savedProjection.right;
|
167
|
+
camera.frustum.top = savedProjection.top;
|
168
|
+
camera.frustum.bottom = savedProjection.bottom;
|
169
|
+
camera.frustum.near = savedProjection.near;
|
170
|
+
camera.frustum.far = savedProjection.far;
|
171
|
+
break;
|
172
|
+
|
173
|
+
case "custom":
|
174
|
+
camera.customProjection.matrix = savedProjection.matrix;
|
175
|
+
break;
|
176
|
+
}
|
177
|
+
}
|
178
|
+
|
179
|
+
if (done) {
|
180
|
+
scene.viewer.cameraFlight.flyTo({
|
181
|
+
eye: this._eye,
|
182
|
+
look: this._look,
|
183
|
+
up: this._up,
|
184
|
+
orthoScale: savedProjection.scale,
|
185
|
+
projection: savedProjection.projection
|
186
|
+
}, () => {
|
187
|
+
restoreProjection();
|
188
|
+
done();
|
189
|
+
});
|
190
|
+
} else {
|
191
|
+
camera.eye = this._eye;
|
192
|
+
camera.look = this._look;
|
193
|
+
camera.up = this._up;
|
194
|
+
restoreProjection();
|
195
|
+
camera.projection = savedProjection.projection;
|
196
|
+
}
|
197
|
+
}
|
198
|
+
}
|
199
|
+
|
200
|
+
export {CameraMemento};
|
@@ -0,0 +1,272 @@
|
|
1
|
+
import {math} from "../math/math.js";
|
2
|
+
import {utils} from "../utils.js";
|
3
|
+
|
4
|
+
const color = math.vec3();
|
5
|
+
|
6
|
+
/**
|
7
|
+
* @desc Saves and restores a snapshot of the visual state of the {@link Entity}'s of a model within a {@link Scene}.
|
8
|
+
*
|
9
|
+
* ## Usage
|
10
|
+
*
|
11
|
+
* In the example below, we'll create a {@link Viewer} and use an {@link XKTLoaderPlugin} to load an ````.xkt```` model. When the model has loaded, we'll hide a couple of {@link Entity}s and save a snapshot of the visual states of all its Entitys in an ModelMemento. Then we'll show all the Entitys
|
12
|
+
* again, and then we'll restore the visual states of all the Entitys again from the ModelMemento, which will hide those two Entitys again.
|
13
|
+
*
|
14
|
+
* ## See Also
|
15
|
+
*
|
16
|
+
* * {@link CameraMemento} - Saves and restores the state of a {@link Scene}'s {@link Camera}.
|
17
|
+
* * {@link ObjectsMemento} - Saves and restores a snapshot of the visual state of the {@link Entity}'s that represent objects within a {@link Scene}.
|
18
|
+
*
|
19
|
+
* ````javascript
|
20
|
+
* import {Viewer, XKTLoaderPlugin, ModelMemento} from "yjkkit-sdk.es.js";
|
21
|
+
*
|
22
|
+
* const viewer = new Viewer({
|
23
|
+
* canvasId: "myCanvas"
|
24
|
+
* });
|
25
|
+
*
|
26
|
+
* // Load a model
|
27
|
+
* const xktLoader = new XKTLoaderPlugin(viewer);
|
28
|
+
*
|
29
|
+
* const model = xktLoader.load({
|
30
|
+
* id: "myModel",
|
31
|
+
* src: "./models/xkt/schependomlaan/schependomlaan.xkt"
|
32
|
+
* });
|
33
|
+
*
|
34
|
+
* model.on("loaded", () => {
|
35
|
+
*
|
36
|
+
* // Model has loaded
|
37
|
+
*
|
38
|
+
* // Hide a couple of objects
|
39
|
+
* viewer.scene.objects["0u4wgLe6n0ABVaiXyikbkA"].visible = false;
|
40
|
+
* viewer.scene.objects["3u4wgLe3n0AXVaiXyikbYO"].visible = false;
|
41
|
+
*
|
42
|
+
* // Save memento of all object states, which includes those two hidden objects
|
43
|
+
* const ModelMemento = new ModelMemento();
|
44
|
+
*
|
45
|
+
* const metaModel = viewer.metaScene.metaModels
|
46
|
+
* ModelMemento.saveObjects(viewer.scene);
|
47
|
+
*
|
48
|
+
* // Show all objects
|
49
|
+
* viewer.scene.setObjectsVisible(viewer.scene.objectIds, true);
|
50
|
+
*
|
51
|
+
* // Restore the objects states again, which involves hiding those two objects again
|
52
|
+
* ModelMemento.restoreObjects(viewer.scene);
|
53
|
+
* });
|
54
|
+
* `````
|
55
|
+
*
|
56
|
+
* ## Masking Saved State
|
57
|
+
*
|
58
|
+
* We can optionally supply a mask to focus what state we save and restore.
|
59
|
+
*
|
60
|
+
* For example, to save and restore only the {@link Entity#visible} and {@link Entity#clippable} states:
|
61
|
+
*
|
62
|
+
* ````javascript
|
63
|
+
* ModelMemento.saveObjects(viewer.scene, {
|
64
|
+
* visible: true,
|
65
|
+
* clippable: true
|
66
|
+
* });
|
67
|
+
*
|
68
|
+
* //...
|
69
|
+
*
|
70
|
+
* // Restore the objects states again
|
71
|
+
* ModelMemento.restoreObjects(viewer.scene);
|
72
|
+
* ````
|
73
|
+
*/
|
74
|
+
class ModelMemento {
|
75
|
+
|
76
|
+
/**
|
77
|
+
* Creates a ModelMemento.
|
78
|
+
*
|
79
|
+
* @param {MetaModel} [metaModel] When given, immediately saves the model's {@link Entity} states to this ModelMemento.
|
80
|
+
*/
|
81
|
+
constructor(metaModel) {
|
82
|
+
|
83
|
+
/** @private */
|
84
|
+
this.objectsVisible = [];
|
85
|
+
|
86
|
+
/** @private */
|
87
|
+
this.objectsEdges = [];
|
88
|
+
|
89
|
+
/** @private */
|
90
|
+
this.objectsXrayed = [];
|
91
|
+
|
92
|
+
/** @private */
|
93
|
+
this.objectsHighlighted = [];
|
94
|
+
|
95
|
+
/** @private */
|
96
|
+
this.objectsSelected = [];
|
97
|
+
|
98
|
+
/** @private */
|
99
|
+
this.objectsClippable = [];
|
100
|
+
|
101
|
+
/** @private */
|
102
|
+
this.objectsPickable = [];
|
103
|
+
|
104
|
+
/** @private */
|
105
|
+
this.objectsColorize = [];
|
106
|
+
|
107
|
+
/** @private */
|
108
|
+
this.objectsOpacity = [];
|
109
|
+
|
110
|
+
/** @private */
|
111
|
+
this.numObjects = 0;
|
112
|
+
|
113
|
+
if (metaModel) {
|
114
|
+
const metaScene = metaModel.metaScene;
|
115
|
+
const scene = metaScene.scene;
|
116
|
+
this.saveObjects(scene, metaModel);
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
120
|
+
/**
|
121
|
+
* Saves a snapshot of the visual state of the {@link Entity}'s that represent objects within a model.
|
122
|
+
*
|
123
|
+
* @param {Scene} scene The scene.
|
124
|
+
* @param {MetaModel} metaModel Represents the model. Corresponds with an {@link Entity} that represents the model in the scene.
|
125
|
+
* @param {Object} [mask] Masks what state gets saved. Saves all state when not supplied.
|
126
|
+
* @param {boolean} [mask.visible] Saves {@link Entity#visible} values when ````true````.
|
127
|
+
* @param {boolean} [mask.visible] Saves {@link Entity#visible} values when ````true````.
|
128
|
+
* @param {boolean} [mask.edges] Saves {@link Entity#edges} values when ````true````.
|
129
|
+
* @param {boolean} [mask.xrayed] Saves {@link Entity#xrayed} values when ````true````.
|
130
|
+
* @param {boolean} [mask.highlighted] Saves {@link Entity#highlighted} values when ````true````.
|
131
|
+
* @param {boolean} [mask.selected] Saves {@link Entity#selected} values when ````true````.
|
132
|
+
* @param {boolean} [mask.clippable] Saves {@link Entity#clippable} values when ````true````.
|
133
|
+
* @param {boolean} [mask.pickable] Saves {@link Entity#pickable} values when ````true````.
|
134
|
+
* @param {boolean} [mask.colorize] Saves {@link Entity#colorize} values when ````true````.
|
135
|
+
* @param {boolean} [mask.opacity] Saves {@link Entity#opacity} values when ````true````.
|
136
|
+
*/
|
137
|
+
saveObjects(scene, metaModel, mask) {
|
138
|
+
|
139
|
+
const rootMetaObject = metaModel.rootMetaObject;
|
140
|
+
if (!rootMetaObject) {
|
141
|
+
return;
|
142
|
+
}
|
143
|
+
|
144
|
+
const objectIds = rootMetaObject.getObjectIDsInSubtree();
|
145
|
+
|
146
|
+
this.numObjects = 0;
|
147
|
+
|
148
|
+
this._mask = mask ? utils.apply(mask, {}) : null;
|
149
|
+
|
150
|
+
const objects = scene.objects;
|
151
|
+
const visible = (!mask || mask.visible);
|
152
|
+
const edges = (!mask || mask.edges);
|
153
|
+
const xrayed = (!mask || mask.xrayed);
|
154
|
+
const highlighted = (!mask || mask.highlighted);
|
155
|
+
const selected = (!mask || mask.selected);
|
156
|
+
const clippable = (!mask || mask.clippable);
|
157
|
+
const pickable = (!mask || mask.pickable);
|
158
|
+
const colorize = (!mask || mask.colorize);
|
159
|
+
const opacity = (!mask || mask.opacity);
|
160
|
+
|
161
|
+
for (var i = 0, len = objectIds.length; i < len; i++) {
|
162
|
+
const objectId = objectIds[i];
|
163
|
+
const object = objects[objectId];
|
164
|
+
if (!object) {
|
165
|
+
continue;
|
166
|
+
}
|
167
|
+
if (visible) {
|
168
|
+
this.objectsVisible[i] = object.visible;
|
169
|
+
}
|
170
|
+
if (edges) {
|
171
|
+
this.objectsEdges[i] = object.edges;
|
172
|
+
}
|
173
|
+
if (xrayed) {
|
174
|
+
this.objectsXrayed[i] = object.xrayed;
|
175
|
+
}
|
176
|
+
if (highlighted) {
|
177
|
+
this.objectsHighlighted[i] = object.highlighted;
|
178
|
+
}
|
179
|
+
if (selected) {
|
180
|
+
this.objectsSelected[i] = object.selected;
|
181
|
+
}
|
182
|
+
if (clippable) {
|
183
|
+
this.objectsClippable[i] = object.clippable;
|
184
|
+
}
|
185
|
+
if (pickable) {
|
186
|
+
this.objectsPickable[i] = object.pickable;
|
187
|
+
}
|
188
|
+
if (colorize) {
|
189
|
+
const objectColor = object.colorize;
|
190
|
+
this.objectsColorize[i * 3 + 0] = objectColor[0];
|
191
|
+
this.objectsColorize[i * 3 + 1] = objectColor[1];
|
192
|
+
this.objectsColorize[i * 3 + 2] = objectColor[2];
|
193
|
+
}
|
194
|
+
if (opacity) {
|
195
|
+
this.objectsOpacity[i] = object.opacity;
|
196
|
+
}
|
197
|
+
this.numObjects++;
|
198
|
+
}
|
199
|
+
}
|
200
|
+
|
201
|
+
/**
|
202
|
+
* Restores a {@link Scene}'s {@link Entity}'s to their state previously captured with {@link ModelMemento#saveObjects}.
|
203
|
+
*
|
204
|
+
* Assumes that the model has not been destroyed or modified since saving.
|
205
|
+
*
|
206
|
+
* @param {Scene} scene The scene that was given to {@link ModelMemento#saveObjects}.
|
207
|
+
* @param {MetaModel} metaModel The metamodel that was given to {@link ModelMemento#saveObjects}.
|
208
|
+
*/
|
209
|
+
restoreObjects(scene, metaModel) {
|
210
|
+
|
211
|
+
const rootMetaObject = metaModel.rootMetaObject;
|
212
|
+
if (!rootMetaObject) {
|
213
|
+
return;
|
214
|
+
}
|
215
|
+
|
216
|
+
const objectIds = rootMetaObject.getObjectIDsInSubtree();
|
217
|
+
|
218
|
+
const mask = this._mask;
|
219
|
+
|
220
|
+
const visible = (!mask || mask.visible);
|
221
|
+
const edges = (!mask || mask.edges);
|
222
|
+
const xrayed = (!mask || mask.xrayed);
|
223
|
+
const highlighted = (!mask || mask.highlighted);
|
224
|
+
const selected = (!mask || mask.selected);
|
225
|
+
const clippable = (!mask || mask.clippable);
|
226
|
+
const pickable = (!mask || mask.pickable);
|
227
|
+
const colorize = (!mask || mask.colorize);
|
228
|
+
const opacity = (!mask || mask.opacity);
|
229
|
+
|
230
|
+
const objects = scene.objects;
|
231
|
+
|
232
|
+
for (var i = 0, len = objectIds.length; i < len; i++) {
|
233
|
+
const objectId = objectIds[i];
|
234
|
+
const object = objects[objectId];
|
235
|
+
if (!object) {
|
236
|
+
continue;
|
237
|
+
}
|
238
|
+
if (visible) {
|
239
|
+
object.visible = this.objectsVisible[i];
|
240
|
+
}
|
241
|
+
if (edges) {
|
242
|
+
object.edges = this.objectsEdges[i];
|
243
|
+
}
|
244
|
+
if (xrayed) {
|
245
|
+
object.xrayed = this.objectsXrayed[i];
|
246
|
+
}
|
247
|
+
if (highlighted) {
|
248
|
+
object.highlighted = this.objectsHighlighted[i];
|
249
|
+
}
|
250
|
+
if (selected) {
|
251
|
+
object.selected = this.objectsSelected[i];
|
252
|
+
}
|
253
|
+
if (clippable) {
|
254
|
+
object.clippable = this.objectsClippable[i];
|
255
|
+
}
|
256
|
+
if (pickable) {
|
257
|
+
object.pickable = this.objectsPickable[i];
|
258
|
+
}
|
259
|
+
if (colorize) {
|
260
|
+
color[0] = this.objectsColorize[i * 3 + 0];
|
261
|
+
color[1] = this.objectsColorize[i * 3 + 1];
|
262
|
+
color[2] = this.objectsColorize[i * 3 + 2];
|
263
|
+
object.colorize = color;
|
264
|
+
}
|
265
|
+
if (opacity) {
|
266
|
+
object.opacity = this.objectsOpacity[i];
|
267
|
+
}
|
268
|
+
}
|
269
|
+
}
|
270
|
+
}
|
271
|
+
|
272
|
+
export {ModelMemento};
|