angular-three-soba 1.14.0 → 2.0.0-beta.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/README.md +2 -2
- package/abstractions/{lib/billboard → billboard}/billboard.d.ts +14 -4
- package/abstractions/catmull-rom-line/catmull-rom-line.d.ts +25 -0
- package/abstractions/cubic-bezier-line/cubic-bezier-line.d.ts +25 -0
- package/abstractions/{lib/edges → edges}/edges.d.ts +11 -7
- package/abstractions/{lib/gizmo-helper → gizmo-helper}/gizmo-helper.d.ts +16 -23
- package/abstractions/gizmo-helper/gizmo-viewcube/gizmo-viewcube-edge.d.ts +22 -0
- package/abstractions/gizmo-helper/gizmo-viewcube/gizmo-viewcube-face.d.ts +30 -0
- package/abstractions/gizmo-helper/gizmo-viewcube/gizmo-viewcube-inputs.d.ts +32 -0
- package/abstractions/{lib/gizmo-helper → gizmo-helper}/gizmo-viewcube/gizmo-viewcube.d.ts +2 -3
- package/abstractions/{lib/gizmo-helper → gizmo-helper}/gizmo-viewport/gizmo-viewport-axis.d.ts +28 -9
- package/abstractions/{lib/gizmo-helper → gizmo-helper}/gizmo-viewport/gizmo-viewport.d.ts +23 -4
- package/abstractions/index.d.ts +11 -11
- package/abstractions/line/line-input.d.ts +42 -0
- package/abstractions/line/line.d.ts +35 -0
- package/abstractions/{lib/quadratic-bezier-line → quadratic-bezier-line}/quadratic-bezier-line.d.ts +12 -8
- package/abstractions/text/text.d.ts +77 -0
- package/abstractions/text-3d/text-3d.d.ts +74 -0
- package/cameras/{lib/camera → camera}/camera-content.d.ts +1 -1
- package/cameras/{lib/camera → camera}/camera.d.ts +12 -8
- package/cameras/cube-camera/cube-camera.d.ts +42 -0
- package/cameras/index.d.ts +5 -4
- package/cameras/{lib/orthographic-camera → orthographic-camera}/orthographic-camera.d.ts +14 -5
- package/controls/index.d.ts +1 -1
- package/controls/{lib/orbit-controls → orbit-controls}/orbit-controls.d.ts +19 -11
- package/esm2022/abstractions/angular-three-soba-abstractions.mjs +1 -1
- package/esm2022/abstractions/billboard/billboard.mjs +71 -0
- package/esm2022/abstractions/catmull-rom-line/catmull-rom-line.mjs +131 -0
- package/esm2022/abstractions/cubic-bezier-line/cubic-bezier-line.mjs +113 -0
- package/esm2022/abstractions/edges/edges.mjs +93 -0
- package/esm2022/abstractions/gizmo-helper/gizmo-helper.mjs +210 -0
- package/esm2022/abstractions/gizmo-helper/gizmo-viewcube/constants.mjs +31 -0
- package/esm2022/abstractions/gizmo-helper/gizmo-viewcube/gizmo-viewcube-edge.mjs +95 -0
- package/esm2022/abstractions/gizmo-helper/gizmo-viewcube/gizmo-viewcube-face.mjs +155 -0
- package/esm2022/abstractions/gizmo-helper/gizmo-viewcube/gizmo-viewcube-inputs.mjs +62 -0
- package/esm2022/abstractions/gizmo-helper/gizmo-viewcube/gizmo-viewcube.mjs +80 -0
- package/esm2022/abstractions/gizmo-helper/gizmo-viewport/gizmo-viewport-axis.mjs +206 -0
- package/esm2022/abstractions/gizmo-helper/gizmo-viewport/gizmo-viewport.mjs +273 -0
- package/esm2022/abstractions/index.mjs +12 -12
- package/esm2022/abstractions/line/line-input.mjs +113 -0
- package/esm2022/abstractions/line/line.mjs +165 -0
- package/esm2022/abstractions/quadratic-bezier-line/quadratic-bezier-line.mjs +128 -0
- package/esm2022/abstractions/text/text.mjs +275 -0
- package/esm2022/abstractions/text-3d/text-3d.mjs +167 -0
- package/esm2022/angular-three-soba.mjs +1 -1
- package/esm2022/cameras/angular-three-soba-cameras.mjs +1 -1
- package/esm2022/cameras/camera/camera-content.mjs +21 -0
- package/esm2022/cameras/camera/camera.mjs +71 -0
- package/esm2022/cameras/cube-camera/cube-camera.mjs +131 -0
- package/esm2022/cameras/index.mjs +6 -5
- package/esm2022/cameras/orthographic-camera/orthographic-camera.mjs +99 -0
- package/esm2022/cameras/perspective-camera/perspective-camera.mjs +47 -0
- package/esm2022/controls/angular-three-soba-controls.mjs +1 -1
- package/esm2022/controls/index.mjs +2 -2
- package/esm2022/controls/orbit-controls/orbit-controls.mjs +165 -0
- package/esm2022/index.mjs +1 -1
- package/esm2022/loaders/angular-three-soba-loaders.mjs +1 -1
- package/esm2022/loaders/gltf-loader/gltf-loader.mjs +33 -0
- package/esm2022/loaders/index.mjs +5 -6
- package/esm2022/loaders/loader/loader.mjs +133 -0
- package/esm2022/loaders/progress/progress.mjs +52 -0
- package/esm2022/loaders/texture-loader/texture-loader.mjs +28 -0
- package/esm2022/materials/angular-three-soba-materials.mjs +1 -1
- package/esm2022/materials/index.mjs +6 -6
- package/esm2022/materials/mesh-distort-material/mesh-distort-material.mjs +73 -0
- package/esm2022/materials/mesh-reflector-material/mesh-reflector-material.mjs +383 -0
- package/esm2022/materials/mesh-refraction-material/mesh-refraction-material.mjs +168 -0
- package/esm2022/materials/mesh-transmission-material/mesh-transmission-material.mjs +257 -0
- package/esm2022/materials/mesh-wobble-material/mesh-wobble-material.mjs +66 -0
- package/esm2022/misc/angular-three-soba-misc.mjs +1 -1
- package/esm2022/misc/animations/animations.mjs +55 -0
- package/esm2022/misc/bake-shadows/bake-shadows.mjs +24 -0
- package/esm2022/misc/depth-buffer/depth-buffer.mjs +46 -0
- package/esm2022/misc/fbo/fbo.mjs +47 -0
- package/esm2022/misc/index.mjs +5 -5
- package/esm2022/performance/adaptive/adaptive-dpr.mjs +46 -0
- package/esm2022/performance/adaptive/adaptive-events.mjs +31 -0
- package/esm2022/performance/angular-three-soba-performance.mjs +1 -1
- package/esm2022/performance/detailed/detailed.mjs +61 -0
- package/esm2022/performance/index.mjs +7 -5
- package/esm2022/performance/instances/instance.mjs +48 -0
- package/esm2022/performance/instances/instances.mjs +189 -0
- package/esm2022/performance/instances/position-mesh.mjs +52 -0
- package/esm2022/performance/stats/stats.mjs +79 -0
- package/esm2022/shaders/angular-three-soba-shaders.mjs +1 -1
- package/esm2022/shaders/blur-pass/blur-pass.mjs +61 -0
- package/esm2022/shaders/caustics-material/caustics-material.mjs +128 -0
- package/esm2022/shaders/caustics-material/caustics-projection-material.mjs +33 -0
- package/esm2022/shaders/convolution-material/convolution-material.mjs +94 -0
- package/esm2022/shaders/discard-material/discard-material.mjs +3 -0
- package/esm2022/shaders/index.mjs +15 -15
- package/esm2022/shaders/mesh-distort-material/mesh-distort-material.mjs +55 -0
- package/esm2022/shaders/mesh-reflector-material/mesh-reflector-material.mjs +223 -0
- package/esm2022/shaders/mesh-refraction-material/mesh-refraction-material.mjs +170 -0
- package/esm2022/shaders/mesh-transmission-material/mesh-transmission-material.mjs +268 -0
- package/esm2022/shaders/mesh-wobble-material/mesh-wobble-material.mjs +37 -0
- package/esm2022/shaders/shader-material/shader-material.mjs +34 -0
- package/esm2022/shaders/soft-shadow-material/soft-shadow-material.mjs +33 -0
- package/esm2022/shaders/sparkles-material/sparkles-material.mjs +47 -0
- package/esm2022/shaders/spot-light-material/spot-light-material.mjs +86 -0
- package/esm2022/shaders/star-field-material/star-field-material.mjs +32 -0
- package/esm2022/staging/accumulative-shadows/accumulative-shadows.mjs +283 -0
- package/esm2022/staging/accumulative-shadows/progressive-light-map.mjs +108 -0
- package/esm2022/staging/accumulative-shadows/randomized-lights.mjs +208 -0
- package/esm2022/staging/angular-three-soba-staging.mjs +1 -1
- package/esm2022/staging/bounds/bounds.mjs +307 -0
- package/esm2022/staging/camera-shake/camera-shake.mjs +117 -0
- package/esm2022/staging/caustics/caustisc.mjs +384 -0
- package/esm2022/staging/center/center.mjs +148 -0
- package/esm2022/staging/cloud/cloud.mjs +164 -0
- package/esm2022/staging/contact-shadows/contact-shadows.mjs +249 -0
- package/esm2022/staging/environment/assets.mjs +13 -0
- package/esm2022/staging/environment/environment-cube.mjs +49 -0
- package/esm2022/staging/environment/environment-ground.mjs +43 -0
- package/esm2022/staging/environment/environment-input.mjs +106 -0
- package/esm2022/staging/environment/environment-map.mjs +53 -0
- package/esm2022/staging/environment/environment-portal.mjs +135 -0
- package/esm2022/staging/environment/environment.mjs +78 -0
- package/esm2022/staging/environment/utils.mjs +84 -0
- package/esm2022/staging/float/float.mjs +82 -0
- package/esm2022/staging/index.mjs +18 -18
- package/esm2022/staging/sky/sky.mjs +114 -0
- package/esm2022/staging/sparkles/sparkles.mjs +161 -0
- package/esm2022/staging/spot-light/spot-light-input.mjs +75 -0
- package/esm2022/staging/spot-light/spot-light-shadow-mesh-input.mjs +57 -0
- package/esm2022/staging/spot-light/spot-light-shadow-mesh.mjs +256 -0
- package/esm2022/staging/spot-light/spot-light.mjs +94 -0
- package/esm2022/staging/spot-light/volumetric-mesh.mjs +101 -0
- package/esm2022/staging/stage/stage.mjs +374 -0
- package/esm2022/staging/stars/stars.mjs +148 -0
- package/fesm2022/angular-three-soba-abstractions.mjs +1116 -890
- package/fesm2022/angular-three-soba-abstractions.mjs.map +1 -1
- package/fesm2022/angular-three-soba-cameras.mjs +126 -122
- package/fesm2022/angular-three-soba-cameras.mjs.map +1 -1
- package/fesm2022/angular-three-soba-controls.mjs +72 -54
- package/fesm2022/angular-three-soba-controls.mjs.map +1 -1
- package/fesm2022/angular-three-soba-loaders.mjs +147 -131
- package/fesm2022/angular-three-soba-loaders.mjs.map +1 -1
- package/fesm2022/angular-three-soba-materials.mjs +340 -258
- package/fesm2022/angular-three-soba-materials.mjs.map +1 -1
- package/fesm2022/angular-three-soba-misc.mjs +140 -123
- package/fesm2022/angular-three-soba-misc.mjs.map +1 -1
- package/fesm2022/angular-three-soba-performance.mjs +383 -106
- package/fesm2022/angular-three-soba-performance.mjs.map +1 -1
- package/fesm2022/angular-three-soba-shaders.mjs +57 -9
- package/fesm2022/angular-three-soba-shaders.mjs.map +1 -1
- package/fesm2022/angular-three-soba-staging.mjs +1609 -1561
- package/fesm2022/angular-three-soba-staging.mjs.map +1 -1
- package/fesm2022/angular-three-soba.mjs.map +1 -1
- package/loaders/gltf-loader/gltf-loader.d.ts +9 -0
- package/loaders/index.d.ts +4 -5
- package/loaders/{lib/loader → loader}/loader.d.ts +20 -15
- package/loaders/progress/progress.d.ts +9 -0
- package/loaders/texture-loader/texture-loader.d.ts +7 -0
- package/materials/index.d.ts +5 -5
- package/materials/{lib/mesh-distort-material → mesh-distort-material}/mesh-distort-material.d.ts +11 -5
- package/materials/mesh-reflector-material/mesh-reflector-material.d.ts +81 -0
- package/materials/mesh-refraction-material/mesh-refraction-material.d.ts +50 -0
- package/materials/{lib/mesh-transmission-material → mesh-transmission-material}/mesh-transmission-material.d.ts +51 -6
- package/materials/{lib/mesh-wobble-material → mesh-wobble-material}/mesh-wobble-material.d.ts +9 -3
- package/misc/animations/animations.d.ts +13 -0
- package/misc/{lib/bake-shadows → bake-shadows}/bake-shadows.d.ts +2 -5
- package/misc/depth-buffer/depth-buffer.d.ts +9 -0
- package/misc/{lib/fbo → fbo}/fbo.d.ts +4 -2
- package/misc/index.d.ts +4 -4
- package/package.json +19 -17
- package/performance/{lib/adaptive → adaptive}/adaptive-dpr.d.ts +4 -7
- package/performance/{lib/adaptive → adaptive}/adaptive-events.d.ts +2 -6
- package/performance/detailed/detailed.d.ts +20 -0
- package/performance/index.d.ts +6 -4
- package/performance/instances/instance.d.ts +9 -0
- package/performance/instances/instances.d.ts +35 -0
- package/performance/instances/position-mesh.d.ts +10 -0
- package/performance/{lib/stats → stats}/stats.d.ts +10 -7
- package/plugin/package.json +1 -1
- package/plugin/src/generators/init/compat.js.map +1 -1
- package/plugin/src/generators/init/init.d.ts +1 -1
- package/plugin/src/generators/init/init.js +1 -1
- package/plugin/src/generators/init/init.js.map +1 -1
- package/plugin/src/index.js.map +1 -1
- package/shaders/{lib/blur-pass → blur-pass}/blur-pass.d.ts +2 -2
- package/shaders/index.d.ts +14 -14
- package/shaders/{lib/mesh-distort-material → mesh-distort-material}/mesh-distort-material.d.ts +1 -1
- package/shaders/{lib/mesh-wobble-material → mesh-wobble-material}/mesh-wobble-material.d.ts +1 -0
- package/shaders/{lib/soft-shadow-material → soft-shadow-material}/soft-shadow-material.d.ts +2 -2
- package/shaders/sparkles-material/sparkles-material.d.ts +3 -0
- package/staging/{lib/accumulative-shadows → accumulative-shadows}/accumulative-shadows.d.ts +55 -17
- package/staging/{lib/accumulative-shadows → accumulative-shadows}/progressive-light-map.d.ts +2 -2
- package/staging/{lib/accumulative-shadows → accumulative-shadows}/randomized-lights.d.ts +45 -10
- package/staging/{lib/bounds → bounds}/bounds.d.ts +32 -22
- package/staging/{lib/camera-shake → camera-shake}/camera-shake.d.ts +15 -11
- package/staging/{lib/caustics/caustics.d.ts → caustics/caustisc.d.ts} +36 -13
- package/staging/{lib/center → center}/center.d.ts +30 -8
- package/staging/cloud/cloud.d.ts +48 -0
- package/staging/{lib/contact-shadows → contact-shadows}/contact-shadows.d.ts +38 -10
- package/staging/environment/environment-cube.d.ts +11 -0
- package/staging/environment/environment-ground.d.ts +13 -0
- package/staging/environment/environment-input.d.ts +68 -0
- package/staging/environment/environment-map.d.ts +11 -0
- package/staging/{lib/environment → environment}/environment-portal.d.ts +5 -7
- package/staging/{lib/environment → environment}/environment.d.ts +2 -2
- package/staging/environment/utils.d.ts +7 -0
- package/staging/float/float.d.ts +27 -0
- package/staging/index.d.ts +17 -17
- package/staging/{lib/sky → sky}/sky.d.ts +26 -5
- package/staging/{lib/sparkles → sparkles}/sparkles.d.ts +30 -10
- package/staging/{lib/spot-light → spot-light}/spot-light-input.d.ts +24 -2
- package/staging/{lib/spot-light/shadow-mesh-input.d.ts → spot-light/spot-light-shadow-mesh-input.d.ts} +18 -3
- package/staging/spot-light/spot-light-shadow-mesh.d.ts +38 -0
- package/staging/{lib/spot-light → spot-light}/spot-light.d.ts +11 -5
- package/staging/{lib/spot-light → spot-light}/volumetric-mesh.d.ts +8 -5
- package/staging/{lib/stage → stage}/stage.d.ts +33 -14
- package/staging/{lib/stars → stars}/stars.d.ts +21 -7
- package/abstractions/lib/catmull-rom-line/catmull-rom-line.d.ts +0 -15
- package/abstractions/lib/cubic-bezier-line/cubic-bezier-line.d.ts +0 -15
- package/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-edge.d.ts +0 -16
- package/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-face.d.ts +0 -24
- package/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-inputs.d.ts +0 -14
- package/abstractions/lib/line/line-input.d.ts +0 -19
- package/abstractions/lib/line/line.d.ts +0 -21
- package/abstractions/lib/text/text.d.ts +0 -21
- package/abstractions/lib/text-3d/text-3d.d.ts +0 -39
- package/assets/default-spot-light-shadow.glsl +0 -10
- package/cameras/lib/cube-camera/cube-camera.d.ts +0 -27
- package/esm2022/abstractions/lib/billboard/billboard.mjs +0 -74
- package/esm2022/abstractions/lib/catmull-rom-line/catmull-rom-line.mjs +0 -120
- package/esm2022/abstractions/lib/cubic-bezier-line/cubic-bezier-line.mjs +0 -99
- package/esm2022/abstractions/lib/edges/edges.mjs +0 -96
- package/esm2022/abstractions/lib/gizmo-helper/gizmo-helper.mjs +0 -213
- package/esm2022/abstractions/lib/gizmo-helper/gizmo-viewcube/constants.mjs +0 -31
- package/esm2022/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-edge.mjs +0 -92
- package/esm2022/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-face.mjs +0 -184
- package/esm2022/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube-inputs.mjs +0 -46
- package/esm2022/abstractions/lib/gizmo-helper/gizmo-viewcube/gizmo-viewcube.mjs +0 -134
- package/esm2022/abstractions/lib/gizmo-helper/gizmo-viewport/gizmo-viewport-axis.mjs +0 -195
- package/esm2022/abstractions/lib/gizmo-helper/gizmo-viewport/gizmo-viewport.mjs +0 -267
- package/esm2022/abstractions/lib/line/line-input.mjs +0 -76
- package/esm2022/abstractions/lib/line/line.mjs +0 -133
- package/esm2022/abstractions/lib/quadratic-bezier-line/quadratic-bezier-line.mjs +0 -128
- package/esm2022/abstractions/lib/text/text.mjs +0 -115
- package/esm2022/abstractions/lib/text-3d/text-3d.mjs +0 -145
- package/esm2022/cameras/lib/camera/camera-content.mjs +0 -21
- package/esm2022/cameras/lib/camera/camera.mjs +0 -75
- package/esm2022/cameras/lib/cube-camera/cube-camera.mjs +0 -131
- package/esm2022/cameras/lib/orthographic-camera/orthographic-camera.mjs +0 -93
- package/esm2022/cameras/lib/perspective-camera/perspective-camera.mjs +0 -47
- package/esm2022/controls/lib/orbit-controls/orbit-controls.mjs +0 -147
- package/esm2022/loaders/lib/cube-texture-loader/cube-texture-loader.mjs +0 -10
- package/esm2022/loaders/lib/gltf-loader/gltf-loader.mjs +0 -32
- package/esm2022/loaders/lib/loader/loader.mjs +0 -134
- package/esm2022/loaders/lib/progress/progress.mjs +0 -39
- package/esm2022/loaders/lib/texture-loader/texture-loader.mjs +0 -19
- package/esm2022/materials/lib/mesh-distort-material/mesh-distort-material.mjs +0 -75
- package/esm2022/materials/lib/mesh-reflector-material/mesh-reflector-material.mjs +0 -328
- package/esm2022/materials/lib/mesh-refraction-material/mesh-refraction-material.mjs +0 -158
- package/esm2022/materials/lib/mesh-transmission-material/mesh-transmission-material.mjs +0 -238
- package/esm2022/materials/lib/mesh-wobble-material/mesh-wobble-material.mjs +0 -68
- package/esm2022/misc/lib/animations/animations.mjs +0 -52
- package/esm2022/misc/lib/bake-shadows/bake-shadows.mjs +0 -26
- package/esm2022/misc/lib/depth-buffer/depth-buffer.mjs +0 -39
- package/esm2022/misc/lib/fbo/fbo.mjs +0 -39
- package/esm2022/performance/lib/adaptive/adaptive-dpr.mjs +0 -47
- package/esm2022/performance/lib/adaptive/adaptive-events.mjs +0 -37
- package/esm2022/performance/lib/detailed/detailed.mjs +0 -54
- package/esm2022/performance/lib/stats/stats.mjs +0 -80
- package/esm2022/shaders/lib/blur-pass/blur-pass.mjs +0 -61
- package/esm2022/shaders/lib/caustics-material/caustics-material.mjs +0 -128
- package/esm2022/shaders/lib/caustics-projection-material/caustics-projection-material.mjs +0 -33
- package/esm2022/shaders/lib/convolution-material/convolution-material.mjs +0 -94
- package/esm2022/shaders/lib/discard-material/discard-material.mjs +0 -3
- package/esm2022/shaders/lib/mesh-distort-material/mesh-distort-material.mjs +0 -55
- package/esm2022/shaders/lib/mesh-reflector-material/mesh-reflector-material.mjs +0 -223
- package/esm2022/shaders/lib/mesh-refraction-material/mesh-refraction-material.mjs +0 -169
- package/esm2022/shaders/lib/mesh-transmission-material/mesh-transmission-material.mjs +0 -268
- package/esm2022/shaders/lib/mesh-wobble-material/mesh-wobble-material.mjs +0 -37
- package/esm2022/shaders/lib/shader-material/shader-material.mjs +0 -34
- package/esm2022/shaders/lib/soft-shadow-material/soft-shadow-material.mjs +0 -33
- package/esm2022/shaders/lib/spot-light-material/spot-light-material.mjs +0 -86
- package/esm2022/shaders/lib/star-field-material/star-field-material.mjs +0 -32
- package/esm2022/staging/lib/accumulative-shadows/accumulative-shadows.mjs +0 -249
- package/esm2022/staging/lib/accumulative-shadows/progressive-light-map.mjs +0 -108
- package/esm2022/staging/lib/accumulative-shadows/randomized-lights.mjs +0 -201
- package/esm2022/staging/lib/bounds/bounds.mjs +0 -284
- package/esm2022/staging/lib/camera-shake/camera-shake.mjs +0 -122
- package/esm2022/staging/lib/caustics/caustics.mjs +0 -364
- package/esm2022/staging/lib/center/center.mjs +0 -143
- package/esm2022/staging/lib/cloud/cloud.mjs +0 -160
- package/esm2022/staging/lib/contact-shadows/contact-shadows.mjs +0 -228
- package/esm2022/staging/lib/environment/assets.mjs +0 -13
- package/esm2022/staging/lib/environment/environment-cube.mjs +0 -41
- package/esm2022/staging/lib/environment/environment-ground.mjs +0 -67
- package/esm2022/staging/lib/environment/environment-inputs.mjs +0 -87
- package/esm2022/staging/lib/environment/environment-map.mjs +0 -39
- package/esm2022/staging/lib/environment/environment-portal.mjs +0 -111
- package/esm2022/staging/lib/environment/environment.mjs +0 -165
- package/esm2022/staging/lib/environment/utils.mjs +0 -70
- package/esm2022/staging/lib/float/float.mjs +0 -77
- package/esm2022/staging/lib/sky/sky.mjs +0 -109
- package/esm2022/staging/lib/sparkles/sparkles.mjs +0 -210
- package/esm2022/staging/lib/spot-light/common.mjs +0 -42
- package/esm2022/staging/lib/spot-light/shadow-mesh-input.mjs +0 -51
- package/esm2022/staging/lib/spot-light/spot-light-input.mjs +0 -62
- package/esm2022/staging/lib/spot-light/spot-light-shadow-no-shader.mjs +0 -74
- package/esm2022/staging/lib/spot-light/spot-light-shadow-shader.mjs +0 -126
- package/esm2022/staging/lib/spot-light/spot-light-shadow.mjs +0 -63
- package/esm2022/staging/lib/spot-light/spot-light.mjs +0 -117
- package/esm2022/staging/lib/spot-light/volumetric-mesh.mjs +0 -86
- package/esm2022/staging/lib/stage/stage.mjs +0 -368
- package/esm2022/staging/lib/stars/stars.mjs +0 -140
- package/loaders/lib/cube-texture-loader/cube-texture-loader.d.ts +0 -3
- package/loaders/lib/gltf-loader/gltf-loader.d.ts +0 -8
- package/loaders/lib/progress/progress.d.ts +0 -16
- package/loaders/lib/texture-loader/texture-loader.d.ts +0 -5
- package/materials/lib/mesh-reflector-material/mesh-reflector-material.d.ts +0 -41
- package/materials/lib/mesh-refraction-material/mesh-refraction-material.d.ts +0 -28
- package/misc/lib/animations/animations.d.ts +0 -13
- package/misc/lib/depth-buffer/depth-buffer.d.ts +0 -7
- package/performance/lib/detailed/detailed.d.ts +0 -13
- package/staging/lib/cloud/cloud.d.ts +0 -23
- package/staging/lib/environment/environment-cube.d.ts +0 -11
- package/staging/lib/environment/environment-ground.d.ts +0 -9
- package/staging/lib/environment/environment-inputs.d.ts +0 -28
- package/staging/lib/environment/environment-map.d.ts +0 -10
- package/staging/lib/environment/utils.d.ts +0 -8
- package/staging/lib/float/float.d.ts +0 -16
- package/staging/lib/spot-light/common.d.ts +0 -3
- package/staging/lib/spot-light/spot-light-shadow-no-shader.d.ts +0 -14
- package/staging/lib/spot-light/spot-light-shadow-shader.d.ts +0 -25
- package/staging/lib/spot-light/spot-light-shadow.d.ts +0 -6
- /package/abstractions/{lib/gizmo-helper → gizmo-helper}/gizmo-viewcube/constants.d.ts +0 -0
- /package/cameras/{lib/perspective-camera → perspective-camera}/perspective-camera.d.ts +0 -0
- /package/plugin/{README.md → libs/plugin/README.md} +0 -0
- /package/shaders/{lib/caustics-material → caustics-material}/caustics-material.d.ts +0 -0
- /package/shaders/{lib/caustics-projection-material → caustics-material}/caustics-projection-material.d.ts +0 -0
- /package/shaders/{lib/convolution-material → convolution-material}/convolution-material.d.ts +0 -0
- /package/shaders/{lib/discard-material → discard-material}/discard-material.d.ts +0 -0
- /package/shaders/{lib/mesh-reflector-material → mesh-reflector-material}/mesh-reflector-material.d.ts +0 -0
- /package/shaders/{lib/mesh-refraction-material → mesh-refraction-material}/mesh-refraction-material.d.ts +0 -0
- /package/shaders/{lib/mesh-transmission-material → mesh-transmission-material}/mesh-transmission-material.d.ts +0 -0
- /package/shaders/{lib/shader-material → shader-material}/shader-material.d.ts +0 -0
- /package/shaders/{lib/spot-light-material → spot-light-material}/spot-light-material.d.ts +0 -0
- /package/shaders/{lib/star-field-material → star-field-material}/star-field-material.d.ts +0 -0
- /package/staging/{lib/environment → environment}/assets.d.ts +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { EventEmitter, OnChanges } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { NgtSignalStore } from 'angular-three';
|
|
3
3
|
import { NgtsAccumulativeShadows } from '../accumulative-shadows/accumulative-shadows';
|
|
4
4
|
import { NgtsRandomizedLights } from '../accumulative-shadows/randomized-lights';
|
|
5
5
|
import { NgtsCenter } from '../center/center';
|
|
6
6
|
import { NgtsContactShadows } from '../contact-shadows/contact-shadows';
|
|
7
7
|
import { NgtsEnvironmentPresetsType } from '../environment/assets';
|
|
8
|
-
import {
|
|
8
|
+
import { NgtsEnvironmentInput } from '../environment/environment-input';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
type NgtsStageShadows = Partial<NgtsAccumulativeShadows> & Partial<NgtsRandomizedLights> & Partial<NgtsContactShadows> & {
|
|
11
11
|
type: 'contact' | 'accumulative';
|
|
@@ -18,33 +18,33 @@ type NgtsStageShadows = Partial<NgtsAccumulativeShadows> & Partial<NgtsRandomize
|
|
|
18
18
|
/** Shadow map size, default: 1024 */
|
|
19
19
|
size?: number;
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
interface NgtsStageProps {
|
|
22
22
|
/** Lighting setup, default: "rembrandt" */
|
|
23
|
-
preset
|
|
23
|
+
preset: 'rembrandt' | 'portrait' | 'upfront' | 'soft' | {
|
|
24
24
|
main: [x: number, y: number, z: number];
|
|
25
25
|
fill: [x: number, y: number, z: number];
|
|
26
26
|
};
|
|
27
27
|
/** Controls the ground shadows, default: "contact" */
|
|
28
|
-
shadows
|
|
28
|
+
shadows: boolean | 'contact' | 'accumulative' | NgtsStageShadows;
|
|
29
29
|
/** Optionally wraps and thereby centers the models using <Bounds>, can also be a margin, default: true */
|
|
30
|
-
adjustCamera
|
|
30
|
+
adjustCamera: boolean | number;
|
|
31
31
|
/** The default environment, default: "city" */
|
|
32
|
-
environment
|
|
32
|
+
environment: NgtsEnvironmentPresetsType | Partial<NgtsEnvironmentInput>;
|
|
33
33
|
/** The lighting intensity, default: 0.5 */
|
|
34
|
-
intensity
|
|
34
|
+
intensity: number;
|
|
35
35
|
/** To adjust centering, default: undefined */
|
|
36
36
|
center?: Partial<NgtsCenter>;
|
|
37
|
-
}
|
|
37
|
+
}
|
|
38
38
|
export declare class NgtsStageRefit implements OnChanges {
|
|
39
|
-
private
|
|
39
|
+
#private;
|
|
40
40
|
radius: number;
|
|
41
41
|
adjustCamera: boolean;
|
|
42
42
|
ngOnChanges(): void;
|
|
43
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsStageRefit, never>;
|
|
44
44
|
static ɵdir: i0.ɵɵDirectiveDeclaration<NgtsStageRefit, "ngts-stage-refit", never, { "radius": { "alias": "radius"; "required": false; }; "adjustCamera": { "alias": "adjustCamera"; "required": false; }; }, {}, never, never, true, never>;
|
|
45
45
|
}
|
|
46
|
-
export declare class NgtsStage extends
|
|
47
|
-
private
|
|
46
|
+
export declare class NgtsStage extends NgtSignalStore<NgtsStageProps> {
|
|
47
|
+
#private;
|
|
48
48
|
readonly Number: NumberConstructor;
|
|
49
49
|
set preset(preset: NgtsStageProps['preset']);
|
|
50
50
|
set shadows(shadows: NgtsStageProps['shadows']);
|
|
@@ -54,18 +54,37 @@ export declare class NgtsStage extends NgtRxStore<NgtsStageProps> {
|
|
|
54
54
|
set center(center: NgtsStageProps['center']);
|
|
55
55
|
centered: EventEmitter<{
|
|
56
56
|
parent: import("three").Object3D<import("three").Event>;
|
|
57
|
+
/** To adjust centering, default: undefined */
|
|
57
58
|
container: import("three").Object3D<import("three").Event>;
|
|
58
59
|
width: number;
|
|
59
60
|
height: number;
|
|
60
61
|
depth: number;
|
|
61
62
|
boundingBox: import("three").Box3;
|
|
62
63
|
boundingSphere: import("three").Sphere;
|
|
63
|
-
center: import("three").Vector3;
|
|
64
|
+
center: import("three").Vector3;
|
|
64
65
|
verticalAlignment: number;
|
|
65
66
|
horizontalAlignment: number;
|
|
66
67
|
depthAlignment: number;
|
|
67
68
|
}>;
|
|
68
|
-
|
|
69
|
+
readonly boundingState: import("@angular/core").WritableSignal<{
|
|
70
|
+
radius: number;
|
|
71
|
+
width: number;
|
|
72
|
+
height: number;
|
|
73
|
+
depth: number;
|
|
74
|
+
}>;
|
|
75
|
+
readonly stageShadows: import("@angular/core").Signal<boolean | "contact" | "accumulative" | NgtsStageShadows>;
|
|
76
|
+
readonly stageIntensity: import("@angular/core").Signal<number>;
|
|
77
|
+
readonly stageAdjustCamera: import("@angular/core").Signal<number | boolean>;
|
|
78
|
+
readonly stageCenter: import("@angular/core").Signal<Partial<NgtsCenter> | undefined>;
|
|
79
|
+
readonly config: import("@angular/core").Signal<{
|
|
80
|
+
main: number[];
|
|
81
|
+
fill: number[];
|
|
82
|
+
}>;
|
|
83
|
+
readonly shadowsInfo: import("@angular/core").Signal<any>;
|
|
84
|
+
readonly spotLightPosition: import("@angular/core").Signal<[number, number, number]>;
|
|
85
|
+
readonly pointLightPosition: import("@angular/core").Signal<number[]>;
|
|
86
|
+
readonly environmentInfo: import("@angular/core").Signal<Partial<NgtsEnvironmentInput> | null>;
|
|
87
|
+
constructor();
|
|
69
88
|
onCentered(props: {
|
|
70
89
|
/** The next parent above <Center> */
|
|
71
90
|
parent: THREE.Object3D;
|
|
@@ -1,20 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NgtSignalStore } from 'angular-three';
|
|
2
2
|
import * as THREE from 'three';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export
|
|
4
|
+
export interface NgtsStarsState {
|
|
5
|
+
radius: number;
|
|
6
|
+
depth: number;
|
|
7
|
+
count: number;
|
|
8
|
+
factor: number;
|
|
9
|
+
saturation: number;
|
|
10
|
+
fade: boolean;
|
|
11
|
+
speed: number;
|
|
12
|
+
}
|
|
13
|
+
export declare class NgtsStars extends NgtSignalStore<NgtsStarsState> {
|
|
14
|
+
#private;
|
|
5
15
|
readonly AdditiveBlending: 2;
|
|
6
16
|
readonly material: THREE.ShaderMaterial;
|
|
7
|
-
starsRef: import("angular-three").NgtInjectedRef<THREE.Points<THREE.BufferGeometry
|
|
17
|
+
starsRef: import("angular-three").NgtInjectedRef<THREE.Points<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>;
|
|
8
18
|
set radius(radius: number);
|
|
9
19
|
set depth(depth: number);
|
|
10
20
|
set count(count: number);
|
|
11
21
|
set factor(factor: number);
|
|
12
22
|
set saturation(saturation: number);
|
|
13
|
-
set
|
|
23
|
+
set starsFade(fade: boolean);
|
|
14
24
|
set speed(speed: number);
|
|
15
|
-
|
|
25
|
+
readonly fade: import("@angular/core").Signal<boolean>;
|
|
26
|
+
readonly bufferAttributes: import("@angular/core").Signal<{
|
|
27
|
+
positions: Float32Array;
|
|
28
|
+
colors: Float32Array;
|
|
29
|
+
sizes: Float32Array;
|
|
30
|
+
}>;
|
|
16
31
|
constructor();
|
|
17
|
-
onBeforeRender({ clock }: NgtRenderState): void;
|
|
18
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsStars, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsStars, "ngts-stars", never, { "starsRef": { "alias": "starsRef"; "required": false; }; "radius": { "alias": "radius"; "required": false; }; "depth": { "alias": "depth"; "required": false; }; "count": { "alias": "count"; "required": false; }; "factor": { "alias": "factor"; "required": false; }; "saturation": { "alias": "saturation"; "required": false; }; "
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsStars, "ngts-stars", never, { "starsRef": { "alias": "starsRef"; "required": false; }; "radius": { "alias": "radius"; "required": false; }; "depth": { "alias": "depth"; "required": false; }; "count": { "alias": "count"; "required": false; }; "factor": { "alias": "factor"; "required": false; }; "saturation": { "alias": "saturation"; "required": false; }; "starsFade": { "alias": "fade"; "required": false; }; "speed": { "alias": "speed"; "required": false; }; }, {}, never, never, true, never>;
|
|
20
34
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import { Line2 } from 'three-stdlib';
|
|
3
|
-
import { NgtsLineInput } from '../line/line-input';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class NgtsCatmullRomLine extends NgtsLineInput {
|
|
6
|
-
lineRef: import("angular-three").NgtInjectedRef<Line2>;
|
|
7
|
-
set points(points: Array<THREE.Vector3 | THREE.Vector2 | [number, number, number] | [number, number] | number>);
|
|
8
|
-
set closed(closed: boolean);
|
|
9
|
-
set curveType(curveType: 'centripetal' | 'chordal' | 'catmullrom');
|
|
10
|
-
set tension(tension: number);
|
|
11
|
-
set segments(segments: number);
|
|
12
|
-
initialize(): void;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsCatmullRomLine, never>;
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsCatmullRomLine, "ngts-catmull-rom-line[points]", never, { "lineRef": { "alias": "lineRef"; "required": false; }; "points": { "alias": "points"; "required": false; }; "closed": { "alias": "closed"; "required": false; }; "curveType": { "alias": "curveType"; "required": false; }; "tension": { "alias": "tension"; "required": false; }; "segments": { "alias": "segments"; "required": false; }; }, {}, never, never, true, never>;
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import { Line2 } from 'three-stdlib';
|
|
3
|
-
import { NgtsLineInput } from '../line/line-input';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class NgtsCubicBezierLine extends NgtsLineInput {
|
|
6
|
-
lineRef: import("angular-three").NgtInjectedRef<Line2>;
|
|
7
|
-
set start(start: THREE.Vector3 | [number, number, number]);
|
|
8
|
-
set end(end: THREE.Vector3 | [number, number, number]);
|
|
9
|
-
set midA(midA: THREE.Vector3 | [number, number, number]);
|
|
10
|
-
set midB(midB: THREE.Vector3 | [number, number, number]);
|
|
11
|
-
set segments(segments: number);
|
|
12
|
-
initialize(): void;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsCubicBezierLine, never>;
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsCubicBezierLine, "ngts-cubic-bezier-line[start][end][midA][midB]", never, { "lineRef": { "alias": "lineRef"; "required": false; }; "start": { "alias": "start"; "required": false; }; "end": { "alias": "end"; "required": false; }; "midA": { "alias": "midA"; "required": false; }; "midB": { "alias": "midB"; "required": false; }; "segments": { "alias": "segments"; "required": false; }; }, {}, never, never, true, never>;
|
|
15
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { NgtThreeEvent } from 'angular-three';
|
|
2
|
-
import { Vector3 } from 'three';
|
|
3
|
-
import { NgtsGizmoViewcubeInputs } from './gizmo-viewcube-inputs';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class NgtsGizmoViewcubeEdgeCube extends NgtsGizmoViewcubeInputs {
|
|
6
|
-
readonly gizmoHelperApi: import("../gizmo-helper").NgtsGizmoHelperApi;
|
|
7
|
-
hover: boolean;
|
|
8
|
-
set dimensions(dimensions: [number, number, number]);
|
|
9
|
-
set position(position: Vector3);
|
|
10
|
-
initialize(): void;
|
|
11
|
-
onPointerMove(event: NgtThreeEvent<PointerEvent>): void;
|
|
12
|
-
onPointerOut(event: NgtThreeEvent<PointerEvent>): void;
|
|
13
|
-
onClick(event: NgtThreeEvent<MouseEvent>): void;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsGizmoViewcubeEdgeCube, never>;
|
|
15
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsGizmoViewcubeEdgeCube, "ngts-gizmo-viewcube-edge-cube[dimensions][position]", never, { "dimensions": { "alias": "dimensions"; "required": false; }; "position": { "alias": "position"; "required": false; }; }, {}, never, never, true, never>;
|
|
16
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { NgtThreeEvent } from 'angular-three';
|
|
2
|
-
import { NgtsGizmoViewcubeInputs } from './gizmo-viewcube-inputs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class NgtsGizmoViewcubeFaceMaterial extends NgtsGizmoViewcubeInputs {
|
|
5
|
-
private readonly document;
|
|
6
|
-
set index(index: number);
|
|
7
|
-
set hover(hover: boolean);
|
|
8
|
-
set font(font: string);
|
|
9
|
-
set color(color: string);
|
|
10
|
-
initialize(): void;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsGizmoViewcubeFaceMaterial, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsGizmoViewcubeFaceMaterial, "ngts-gizmo-viewcube-face-material[hover][index]", never, { "index": { "alias": "index"; "required": false; }; "hover": { "alias": "hover"; "required": false; }; "font": { "alias": "font"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
|
|
13
|
-
}
|
|
14
|
-
export declare class NgtsGizmoViewcubeFaceCube extends NgtsGizmoViewcubeInputs {
|
|
15
|
-
readonly gizmoHelperApi: import("../gizmo-helper").NgtsGizmoHelperApi;
|
|
16
|
-
set font(font: string);
|
|
17
|
-
set color(color: string);
|
|
18
|
-
hover: number;
|
|
19
|
-
onPointerMove(event: NgtThreeEvent<PointerEvent>): void;
|
|
20
|
-
onPointerOut(event: NgtThreeEvent<PointerEvent>): void;
|
|
21
|
-
onClick(event: NgtThreeEvent<MouseEvent>): void;
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsGizmoViewcubeFaceCube, never>;
|
|
23
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsGizmoViewcubeFaceCube, "ngts-gizmo-viewcube-face-cube", never, { "font": { "alias": "font"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
|
|
24
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import { NgtRxStore, NgtStore, NgtThreeEvent } from 'angular-three';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare abstract class NgtsGizmoViewcubeInputs extends NgtRxStore {
|
|
5
|
-
protected readonly store: NgtStore;
|
|
6
|
-
set opacity(opacity: number);
|
|
7
|
-
set hoverColor(hoverColor: string);
|
|
8
|
-
set textColor(textColor: string);
|
|
9
|
-
set strokeColor(strokeColor: string);
|
|
10
|
-
set faces(faces: string[]);
|
|
11
|
-
set clickEmitter(clickEmitter: EventEmitter<NgtThreeEvent<MouseEvent>>);
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsGizmoViewcubeInputs, never>;
|
|
13
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgtsGizmoViewcubeInputs, never, never, { "opacity": { "alias": "opacity"; "required": false; }; "hoverColor": { "alias": "hoverColor"; "required": false; }; "textColor": { "alias": "textColor"; "required": false; }; "strokeColor": { "alias": "strokeColor"; "required": false; }; "faces": { "alias": "faces"; "required": false; }; "clickEmitter": { "alias": "clickEmitter"; "required": false; }; }, {}, never, never, false, never>;
|
|
14
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { NgtRxStore } from 'angular-three';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare abstract class NgtsLineInput extends NgtRxStore {
|
|
4
|
-
set vertexColors(vertexColors: Array<THREE.Color | [number, number, number]>);
|
|
5
|
-
set lineWidth(lineWidth: number);
|
|
6
|
-
set alphaToCoverage(alphaToCoverage: boolean);
|
|
7
|
-
set color(color: THREE.ColorRepresentation);
|
|
8
|
-
set dashed(dashed: boolean);
|
|
9
|
-
set dashScale(dashScale: number);
|
|
10
|
-
set dashSize(dashSize: number);
|
|
11
|
-
set dashOffset(dashOffset: number);
|
|
12
|
-
set gapSize(gapSize: number);
|
|
13
|
-
set resolution(resolution: THREE.Vector2);
|
|
14
|
-
set wireframe(wireframe: boolean);
|
|
15
|
-
set worldUnits(worldUnits: boolean);
|
|
16
|
-
initialize(): void;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsLineInput, never>;
|
|
18
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgtsLineInput, never, never, { "vertexColors": { "alias": "vertexColors"; "required": false; }; "lineWidth": { "alias": "lineWidth"; "required": false; }; "alphaToCoverage": { "alias": "alphaToCoverage"; "required": false; }; "color": { "alias": "color"; "required": false; }; "dashed": { "alias": "dashed"; "required": false; }; "dashScale": { "alias": "dashScale"; "required": false; }; "dashSize": { "alias": "dashSize"; "required": false; }; "dashOffset": { "alias": "dashOffset"; "required": false; }; "gapSize": { "alias": "gapSize"; "required": false; }; "resolution": { "alias": "resolution"; "required": false; }; "wireframe": { "alias": "wireframe"; "required": false; }; "worldUnits": { "alias": "worldUnits"; "required": false; }; }, {}, never, never, false, never>;
|
|
19
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { NgtAfterAttach } from 'angular-three';
|
|
3
|
-
import * as THREE from 'three';
|
|
4
|
-
import { Line2, LineMaterial, LineSegments2 } from 'three-stdlib';
|
|
5
|
-
import { NgtsLineInput } from './line-input';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class NgtsLine extends NgtsLineInput implements OnInit {
|
|
8
|
-
readonly Boolean: BooleanConstructor;
|
|
9
|
-
readonly lineMaterial: LineMaterial;
|
|
10
|
-
private readonly store;
|
|
11
|
-
line: Line2 | LineSegments2 | null;
|
|
12
|
-
lineRef: import("angular-three").NgtInjectedRef<Line2 | LineSegments2>;
|
|
13
|
-
set points(points: Array<THREE.Vector3 | THREE.Vector2 | [number, number, number] | [number, number] | number>);
|
|
14
|
-
set segments(segments: boolean);
|
|
15
|
-
onAfterAttach({ parent }: NgtAfterAttach<Line2 | LineSegments2>): void;
|
|
16
|
-
initialize(): void;
|
|
17
|
-
ngOnInit(): void;
|
|
18
|
-
private disposeGeometry;
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsLine, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsLine, "ngts-line[points]", never, { "lineRef": { "alias": "lineRef"; "required": false; }; "points": { "alias": "points"; "required": false; }; "segments": { "alias": "segments"; "required": false; }; }, {}, never, never, true, never>;
|
|
21
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { NgtRxStore } from 'angular-three';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class NgtsText extends NgtRxStore implements OnInit, OnDestroy {
|
|
5
|
-
textRef: import("angular-three").NgtInjectedRef<Text>;
|
|
6
|
-
set text(text: string);
|
|
7
|
-
set characters(characters: string);
|
|
8
|
-
set font(font: string);
|
|
9
|
-
set anchorX(anchorX: number | 'left' | 'center' | 'right');
|
|
10
|
-
set anchorY(anchorY: number | 'top' | 'top-baseline' | 'middle' | 'bottom-baseline' | 'bottom');
|
|
11
|
-
sync: EventEmitter<Text>;
|
|
12
|
-
initialize(): void;
|
|
13
|
-
private readonly store;
|
|
14
|
-
readonly troikaText: any;
|
|
15
|
-
ngOnInit(): void;
|
|
16
|
-
ngOnDestroy(): void;
|
|
17
|
-
private preloadFont;
|
|
18
|
-
private syncText;
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsText, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsText, "ngts-text[text]", never, { "textRef": { "alias": "textRef"; "required": false; }; "text": { "alias": "text"; "required": false; }; "characters": { "alias": "characters"; "required": false; }; "font": { "alias": "font"; "required": false; }; "anchorX": { "alias": "anchorX"; "required": false; }; "anchorY": { "alias": "anchorY"; "required": false; }; }, { "sync": "sync"; }, never, ["*"], true, never>;
|
|
21
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { NgtRxStore } from 'angular-three';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
declare type Glyph = {
|
|
4
|
-
_cachedOutline: string[];
|
|
5
|
-
ha: number;
|
|
6
|
-
o: string;
|
|
7
|
-
};
|
|
8
|
-
declare type FontData = {
|
|
9
|
-
boundingBox: {
|
|
10
|
-
yMax: number;
|
|
11
|
-
yMin: number;
|
|
12
|
-
};
|
|
13
|
-
familyName: string;
|
|
14
|
-
glyphs: {
|
|
15
|
-
[k: string]: Glyph;
|
|
16
|
-
};
|
|
17
|
-
resolution: number;
|
|
18
|
-
underlineThickness: number;
|
|
19
|
-
};
|
|
20
|
-
export declare class NgtsText3D extends NgtRxStore {
|
|
21
|
-
set font(font: FontData | string);
|
|
22
|
-
set text(text: string);
|
|
23
|
-
set bevelEnabled(bevelEnabled: boolean);
|
|
24
|
-
set bevelOffset(bevelOffset: number);
|
|
25
|
-
set bevelSize(bevelSize: number);
|
|
26
|
-
set bevelThickness(bevelThickness: number);
|
|
27
|
-
set curveSegments(curveSegments: number);
|
|
28
|
-
set bevelSegments(bevelSegments: number);
|
|
29
|
-
set height(height: number);
|
|
30
|
-
set size(size: number);
|
|
31
|
-
set lineHeight(lineHeight: number);
|
|
32
|
-
set letterSpacing(letterSpacing: number);
|
|
33
|
-
initialize(): void;
|
|
34
|
-
private readonly font$;
|
|
35
|
-
readonly geometryArgs$: import("rxjs").Observable<any[]>;
|
|
36
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsText3D, never>;
|
|
37
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsText3D, "ngts-text-3d[font]", never, { "font": { "alias": "font"; "required": false; }; "text": { "alias": "text"; "required": false; }; "bevelEnabled": { "alias": "bevelEnabled"; "required": false; }; "bevelOffset": { "alias": "bevelOffset"; "required": false; }; "bevelSize": { "alias": "bevelSize"; "required": false; }; "bevelThickness": { "alias": "bevelThickness"; "required": false; }; "curveSegments": { "alias": "curveSegments"; "required": false; }; "bevelSegments": { "alias": "bevelSegments"; "required": false; }; "height": { "alias": "height"; "required": false; }; "size": { "alias": "size"; "required": false; }; "lineHeight": { "alias": "lineHeight"; "required": false; }; "letterSpacing": { "alias": "letterSpacing"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
38
|
-
}
|
|
39
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
2
|
-
import { NgtRxStore } from 'angular-three';
|
|
3
|
-
import * as THREE from 'three';
|
|
4
|
-
import { NgtsCameraContent } from '../camera/camera-content';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class NgtsCubeCamera extends NgtRxStore {
|
|
7
|
-
groupRef: ElementRef<THREE.Group>;
|
|
8
|
-
cameraContent?: NgtsCameraContent;
|
|
9
|
-
readonly cameraRef: import("angular-three").NgtInjectedRef<THREE.CubeCamera>;
|
|
10
|
-
/** Number of frames to render, Infinity */
|
|
11
|
-
set frames(frames: number);
|
|
12
|
-
/** Resolution of the FBO, 256 */
|
|
13
|
-
set resolution(resolution: number);
|
|
14
|
-
/** Camera near, 0.1 */
|
|
15
|
-
set near(near: number);
|
|
16
|
-
/** Camera far, 1000 */
|
|
17
|
-
set far(far: number);
|
|
18
|
-
/** Custom environment map that is temporarily set as the scenes background */
|
|
19
|
-
set envMap(envMap: THREE.Texture);
|
|
20
|
-
/** Custom fog that is temporarily set as the scenes fog */
|
|
21
|
-
set fog(fog: THREE.Fog | THREE.FogExp2);
|
|
22
|
-
private readonly store;
|
|
23
|
-
initialize(): void;
|
|
24
|
-
constructor();
|
|
25
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsCubeCamera, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsCubeCamera, "ngts-cube-camera", never, { "frames": { "alias": "frames"; "required": false; }; "resolution": { "alias": "resolution"; "required": false; }; "near": { "alias": "near"; "required": false; }; "far": { "alias": "far"; "required": false; }; "envMap": { "alias": "envMap"; "required": false; }; "fog": { "alias": "fog"; "required": false; }; }, {}, ["cameraContent"], never, true, never>;
|
|
27
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { Component, CUSTOM_ELEMENTS_SCHEMA, Input } from '@angular/core';
|
|
2
|
-
import { extend, injectNgtRef, NgtRxStore } from 'angular-three';
|
|
3
|
-
import { Group } from 'three';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
extend({ Group });
|
|
6
|
-
class NgtsBillboard extends NgtRxStore {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(...arguments);
|
|
9
|
-
this.billboardRef = injectNgtRef();
|
|
10
|
-
}
|
|
11
|
-
set follow(follow) {
|
|
12
|
-
this.set({ follow });
|
|
13
|
-
}
|
|
14
|
-
set lockX(lockX) {
|
|
15
|
-
this.set({ lockX });
|
|
16
|
-
}
|
|
17
|
-
set lockY(lockY) {
|
|
18
|
-
this.set({ lockY });
|
|
19
|
-
}
|
|
20
|
-
set lockZ(lockZ) {
|
|
21
|
-
this.set({ lockZ });
|
|
22
|
-
}
|
|
23
|
-
initialize() {
|
|
24
|
-
super.initialize();
|
|
25
|
-
this.set({ follow: true, lockX: false, lockY: false, lockZ: false });
|
|
26
|
-
}
|
|
27
|
-
onBeforeRender({ state, object }) {
|
|
28
|
-
const { follow, lockX, lockY, lockZ } = this.get();
|
|
29
|
-
if (!follow)
|
|
30
|
-
return;
|
|
31
|
-
// save prev rotation in case we're locking axises
|
|
32
|
-
const prevRotation = object.rotation.clone();
|
|
33
|
-
// always face the camera
|
|
34
|
-
state.camera.getWorldQuaternion(object.quaternion);
|
|
35
|
-
// readjust any axis that is locked
|
|
36
|
-
if (lockX)
|
|
37
|
-
object.rotation.x = prevRotation.x;
|
|
38
|
-
if (lockY)
|
|
39
|
-
object.rotation.y = prevRotation.y;
|
|
40
|
-
if (lockZ)
|
|
41
|
-
object.rotation.z = prevRotation.z;
|
|
42
|
-
}
|
|
43
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtsBillboard, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
44
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtsBillboard, isStandalone: true, selector: "ngts-billboard", inputs: { billboardRef: "billboardRef", follow: "follow", lockX: "lockX", lockY: "lockY", lockZ: "lockZ" }, usesInheritance: true, ngImport: i0, template: `
|
|
45
|
-
<ngt-group ngtCompound [ref]="billboardRef" (beforeRender)="onBeforeRender($any($event))">
|
|
46
|
-
<ng-content />
|
|
47
|
-
</ngt-group>
|
|
48
|
-
`, isInline: true }); }
|
|
49
|
-
}
|
|
50
|
-
export { NgtsBillboard };
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtsBillboard, decorators: [{
|
|
52
|
-
type: Component,
|
|
53
|
-
args: [{
|
|
54
|
-
selector: 'ngts-billboard',
|
|
55
|
-
standalone: true,
|
|
56
|
-
template: `
|
|
57
|
-
<ngt-group ngtCompound [ref]="billboardRef" (beforeRender)="onBeforeRender($any($event))">
|
|
58
|
-
<ng-content />
|
|
59
|
-
</ngt-group>
|
|
60
|
-
`,
|
|
61
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
62
|
-
}]
|
|
63
|
-
}], propDecorators: { billboardRef: [{
|
|
64
|
-
type: Input
|
|
65
|
-
}], follow: [{
|
|
66
|
-
type: Input
|
|
67
|
-
}], lockX: [{
|
|
68
|
-
type: Input
|
|
69
|
-
}], lockY: [{
|
|
70
|
-
type: Input
|
|
71
|
-
}], lockZ: [{
|
|
72
|
-
type: Input
|
|
73
|
-
}] } });
|
|
74
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmlsbGJvYXJkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9hbmd1bGFyLXRocmVlLXNvYmEvYWJzdHJhY3Rpb25zL3NyYy9saWIvYmlsbGJvYXJkL2JpbGxib2FyZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLHNCQUFzQixFQUFFLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6RSxPQUFPLEVBQUUsTUFBTSxFQUFFLFlBQVksRUFBd0IsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3ZGLE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSxPQUFPLENBQUM7O0FBRTlCLE1BQU0sQ0FBQyxFQUFFLEtBQUssRUFBRSxDQUFDLENBQUM7QUFFbEIsTUFVYSxhQUFjLFNBQVEsVUFBVTtJQVY3Qzs7UUFXYSxpQkFBWSxHQUFHLFlBQVksRUFBUyxDQUFDO0tBa0NqRDtJQWhDRyxJQUFhLE1BQU0sQ0FBQyxNQUF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9ja1k6IGZhbHNlLCBsb2NrWjogZmFsc2UgfSk7XG4gICAgfVxuXG4gICAgb25CZWZvcmVSZW5kZXIoeyBzdGF0ZSwgb2JqZWN0IH06IE5ndEJlZm9yZVJlbmRlckV2ZW50PEdyb3VwPikge1xuICAgICAgICBjb25zdCB7IGZvbGxvdywgbG9ja1gsIGxvY2tZLCBsb2NrWiB9ID0gdGhpcy5nZXQoKTtcbiAgICAgICAgaWYgKCFmb2xsb3cpIHJldHVybjtcblxuICAgICAgICAvLyBzYXZlIHByZXYgcm90YXRpb24gaW4gY2FzZSB3ZSdyZSBsb2NraW5nIGF4aXNlc1xuICAgICAgICBjb25zdCBwcmV2Um90YXRpb24gPSBvYmplY3Qucm90YXRpb24uY2xvbmUoKTtcbiAgICAgICAgLy8gYWx3YXlzIGZhY2UgdGhlIGNhbWVyYVxuICAgICAgICBzdGF0ZS5jYW1lcmEuZ2V0V29ybGRRdWF0ZXJuaW9uKG9iamVjdC5xdWF0ZXJuaW9uKTtcblxuICAgICAgICAvLyByZWFkanVzdCBhbnkgYXhpcyB0aGF0IGlzIGxvY2tlZFxuICAgICAgICBpZiAobG9ja1gpIG9iamVjdC5yb3RhdGlvbi54ID0gcHJldlJvdGF0aW9uLng7XG4gICAgICAgIGlmIChsb2NrWSkgb2JqZWN0LnJvdGF0aW9uLnkgPSBwcmV2Um90YXRpb24ueTtcbiAgICAgICAgaWYgKGxvY2taKSBvYmplY3Qucm90YXRpb24ueiA9IHByZXZSb3RhdGlvbi56O1xuICAgIH1cbn1cbiJdfQ==
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { Component, CUSTOM_ELEMENTS_SCHEMA, Input } from '@angular/core';
|
|
2
|
-
import { injectNgtRef, startWithUndefined } from 'angular-three';
|
|
3
|
-
import { combineLatest, map } from 'rxjs';
|
|
4
|
-
import * as THREE from 'three';
|
|
5
|
-
import { CatmullRomCurve3 } from 'three';
|
|
6
|
-
import { NgtsLine } from '../line/line';
|
|
7
|
-
import { NgtsLineInput } from '../line/line-input';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
class NgtsCatmullRomLine extends NgtsLineInput {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.lineRef = injectNgtRef();
|
|
13
|
-
}
|
|
14
|
-
set points(points) {
|
|
15
|
-
this.set({ points });
|
|
16
|
-
}
|
|
17
|
-
set closed(closed) {
|
|
18
|
-
this.set({ closed });
|
|
19
|
-
}
|
|
20
|
-
set curveType(curveType) {
|
|
21
|
-
this.set({ curveType });
|
|
22
|
-
}
|
|
23
|
-
set tension(tension) {
|
|
24
|
-
this.set({ tension });
|
|
25
|
-
}
|
|
26
|
-
set segments(segments) {
|
|
27
|
-
this.set({ segments });
|
|
28
|
-
}
|
|
29
|
-
initialize() {
|
|
30
|
-
super.initialize();
|
|
31
|
-
this.set({ closed: false, curveType: 'centripetal', tension: 0.5, segments: 64 });
|
|
32
|
-
this.connect('curve', combineLatest([
|
|
33
|
-
this.select('points'),
|
|
34
|
-
this.select('closed'),
|
|
35
|
-
this.select('curveType'),
|
|
36
|
-
this.select('tension'),
|
|
37
|
-
]).pipe(map(([points, closed, curveType, tension]) => {
|
|
38
|
-
const mappedPoints = points.map((p) => p instanceof THREE.Vector3 ? p : new THREE.Vector3(...p));
|
|
39
|
-
return new CatmullRomCurve3(mappedPoints, closed, curveType, tension);
|
|
40
|
-
})));
|
|
41
|
-
this.connect('segmentedPoints', combineLatest([this.select('curve'), this.select('segments')]).pipe(map(([curve, segments]) => curve.getPoints(segments))));
|
|
42
|
-
this.connect('interpolatedVertexColors', combineLatest([this.select('vertexColors').pipe(startWithUndefined()), this.select('segments')]).pipe(map(([vertexColors, segments]) => {
|
|
43
|
-
if (!vertexColors || vertexColors.length < 2)
|
|
44
|
-
return undefined;
|
|
45
|
-
if (vertexColors.length === segments + 1)
|
|
46
|
-
return vertexColors;
|
|
47
|
-
const mappedColors = vertexColors.map((color) => color instanceof THREE.Color ? color : new THREE.Color(...color));
|
|
48
|
-
if (this.get('closed'))
|
|
49
|
-
mappedColors.push(mappedColors[0].clone());
|
|
50
|
-
const iColors = [mappedColors[0]];
|
|
51
|
-
const divisions = segments / (mappedColors.length - 1);
|
|
52
|
-
for (let i = 0; i < segments; i++) {
|
|
53
|
-
const alpha = (i % divisions) / divisions;
|
|
54
|
-
const colorIndex = Math.floor(i / divisions);
|
|
55
|
-
iColors.push(mappedColors[colorIndex].clone().lerp(mappedColors[colorIndex + 1], alpha));
|
|
56
|
-
}
|
|
57
|
-
iColors.push(mappedColors[mappedColors.length - 1]);
|
|
58
|
-
})));
|
|
59
|
-
}
|
|
60
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtsCatmullRomLine, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
61
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtsCatmullRomLine, isStandalone: true, selector: "ngts-catmull-rom-line[points]", inputs: { lineRef: "lineRef", points: "points", closed: "closed", curveType: "curveType", tension: "tension", segments: "segments" }, usesInheritance: true, ngImport: i0, template: `
|
|
62
|
-
<ngts-line
|
|
63
|
-
[lineRef]="lineRef"
|
|
64
|
-
[points]="get('segmentedPoints')"
|
|
65
|
-
[color]="get('color')"
|
|
66
|
-
[vertexColors]="get('interpolatedVertexColors')"
|
|
67
|
-
[resolution]="get('resolution')"
|
|
68
|
-
[lineWidth]="get('lineWidth')"
|
|
69
|
-
[alphaToCoverage]="get('alphaToCoverage')"
|
|
70
|
-
[dashed]="get('dashed')"
|
|
71
|
-
[dashScale]="get('dashScale')"
|
|
72
|
-
[dashOffset]="get('dashOffset')"
|
|
73
|
-
[dashSize]="get('dashSize')"
|
|
74
|
-
[gapSize]="get('gapSize')"
|
|
75
|
-
[wireframe]="get('wireframe')"
|
|
76
|
-
[worldUnits]="get('worldUnits')"
|
|
77
|
-
/>
|
|
78
|
-
`, isInline: true, dependencies: [{ kind: "component", type: NgtsLine, selector: "ngts-line[points]", inputs: ["lineRef", "points", "segments"] }] }); }
|
|
79
|
-
}
|
|
80
|
-
export { NgtsCatmullRomLine };
|
|
81
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtsCatmullRomLine, decorators: [{
|
|
82
|
-
type: Component,
|
|
83
|
-
args: [{
|
|
84
|
-
selector: 'ngts-catmull-rom-line[points]',
|
|
85
|
-
standalone: true,
|
|
86
|
-
template: `
|
|
87
|
-
<ngts-line
|
|
88
|
-
[lineRef]="lineRef"
|
|
89
|
-
[points]="get('segmentedPoints')"
|
|
90
|
-
[color]="get('color')"
|
|
91
|
-
[vertexColors]="get('interpolatedVertexColors')"
|
|
92
|
-
[resolution]="get('resolution')"
|
|
93
|
-
[lineWidth]="get('lineWidth')"
|
|
94
|
-
[alphaToCoverage]="get('alphaToCoverage')"
|
|
95
|
-
[dashed]="get('dashed')"
|
|
96
|
-
[dashScale]="get('dashScale')"
|
|
97
|
-
[dashOffset]="get('dashOffset')"
|
|
98
|
-
[dashSize]="get('dashSize')"
|
|
99
|
-
[gapSize]="get('gapSize')"
|
|
100
|
-
[wireframe]="get('wireframe')"
|
|
101
|
-
[worldUnits]="get('worldUnits')"
|
|
102
|
-
/>
|
|
103
|
-
`,
|
|
104
|
-
imports: [NgtsLine],
|
|
105
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
106
|
-
}]
|
|
107
|
-
}], propDecorators: { lineRef: [{
|
|
108
|
-
type: Input
|
|
109
|
-
}], points: [{
|
|
110
|
-
type: Input
|
|
111
|
-
}], closed: [{
|
|
112
|
-
type: Input
|
|
113
|
-
}], curveType: [{
|
|
114
|
-
type: Input
|
|
115
|
-
}], tension: [{
|
|
116
|
-
type: Input
|
|
117
|
-
}], segments: [{
|
|
118
|
-
type: Input
|
|
119
|
-
}] } });
|
|
120
|
-
//# sourceMappingURL=data:application/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Z21lbnRzKHNlZ21lbnRzOiBudW1iZXIpIHtcbiAgICAgICAgdGhpcy5zZXQoeyBzZWdtZW50cyB9KTtcbiAgICB9XG5cbiAgICBvdmVycmlkZSBpbml0aWFsaXplKCk6IHZvaWQge1xuICAgICAgICBzdXBlci5pbml0aWFsaXplKCk7XG4gICAgICAgIHRoaXMuc2V0KHsgY2xvc2VkOiBmYWxzZSwgY3VydmVUeXBlOiAnY2VudHJpcGV0YWwnLCB0ZW5zaW9uOiAwLjUsIHNlZ21lbnRzOiA2NCB9KTtcbiAgICAgICAgdGhpcy5jb25uZWN0KFxuICAgICAgICAgICAgJ2N1cnZlJyxcbiAgICAgICAgICAgIGNvbWJpbmVMYXRlc3QoW1xuICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0KCdwb2ludHMnKSxcbiAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdCgnY2xvc2VkJyksXG4gICAgICAgICAgICAgICAgdGhpcy5zZWxlY3QoJ2N1cnZlVHlwZScpLFxuICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0KCd0ZW5zaW9uJyksXG4gICAgICAgICAgICBdKS5waXBlKFxuICAgICAgICAgICAgICAgIG1hcCgoW3BvaW50cywgY2xvc2VkLCBjdXJ2ZVR5cGUsIHRlbnNpb25dKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG1hcHBlZFBvaW50cyA9IChwb2ludHMgYXMgTmd0c0NhdG11bGxSb21MaW5lWydwb2ludHMnXSkubWFwKChwKSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgcCBpbnN0YW5jZW9mIFRIUkVFLlZlY3RvcjMgPyBwIDogbmV3IFRIUkVFLlZlY3RvcjMoLi4uKHAgYXMgW251bWJlciwgbnVtYmVyLCBudW1iZXJdKSlcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBDYXRtdWxsUm9tQ3VydmUzKG1hcHBlZFBvaW50cywgY2xvc2VkLCBjdXJ2ZVR5cGUsIHRlbnNpb24pO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICApXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5jb25uZWN0KFxuICAgICAgICAgICAgJ3NlZ21lbnRlZFBvaW50cycsXG4gICAgICAgICAgICBjb21iaW5lTGF0ZXN0KFt0aGlzLnNlbGVjdCgnY3VydmUnKSwgdGhpcy5zZWxlY3QoJ3NlZ21lbnRzJyldKS5waXBlKFxuICAgICAgICAgICAgICAgIG1hcCgoW2N1cnZlLCBzZWdtZW50c10pID0+IGN1cnZlLmdldFBvaW50cyhzZWdtZW50cykpXG4gICAgICAgICAgICApXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5jb25uZWN0KFxuICAgICAgICAgICAgJ2ludGVycG9sYXRlZFZlcnRleENvbG9ycycsXG4gICAgICAgICAgICBjb21iaW5lTGF0ZXN0KFt0aGlzLnNlbGVjdCgndmVydGV4Q29sb3JzJykucGlwZShzdGFydFdpdGhVbmRlZmluZWQoKSksIHRoaXMuc2VsZWN0KCdzZWdtZW50cycpXSkucGlwZShcbiAgICAgICAgICAgICAgICBtYXAoKFt2ZXJ0ZXhDb2xvcnMsIHNlZ21lbnRzXSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXZlcnRleENvbG9ycyB8fCB2ZXJ0ZXhDb2xvcnMubGVuZ3RoIDwgMikgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHZlcnRleENvbG9ycy5sZW5ndGggPT09IHNlZ21lbnRzICsgMSkgcmV0dXJuIHZlcnRleENvbG9ycztcblxuICAgICAgICAgICAgICAgICAgICBjb25zdCBtYXBwZWRDb2xvcnMgPSB2ZXJ0ZXhDb2xvcnMubWFwKChjb2xvcjogVEhSRUUuQ29sb3IgfCBbbnVtYmVyLCBudW1iZXIsIG51bWJlcl0pID0+XG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xvciBpbnN0YW5jZW9mIFRIUkVFLkNvbG9yID8gY29sb3IgOiBuZXcgVEhSRUUuQ29sb3IoLi4uY29sb3IpXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmdldCgnY2xvc2VkJykpIG1hcHBlZENvbG9ycy5wdXNoKG1hcHBlZENvbG9yc1swXS5jbG9uZSgpKTtcblxuICAgICAgICAgICAgICAgICAgICBjb25zdCBpQ29sb3JzOiBUSFJFRS5Db2xvcltdID0gW21hcHBlZENvbG9yc1swXV07XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGRpdmlzaW9ucyA9IHNlZ21lbnRzIC8gKG1hcHBlZENvbG9ycy5sZW5ndGggLSAxKTtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBzZWdtZW50czsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBhbHBoYSA9IChpICUgZGl2aXNpb25zKSAvIGRpdmlzaW9ucztcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGNvbG9ySW5kZXggPSBNYXRoLmZsb29yKGkgLyBkaXZpc2lvbnMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaUNvbG9ycy5wdXNoKG1hcHBlZENvbG9yc1tjb2xvckluZGV4XS5jbG9uZSgpLmxlcnAobWFwcGVkQ29sb3JzW2NvbG9ySW5kZXggKyAxXSwgYWxwaGEpKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpQ29sb3JzLnB1c2gobWFwcGVkQ29sb3JzW21hcHBlZENvbG9ycy5sZW5ndGggLSAxXSk7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIClcbiAgICAgICAgKTtcbiAgICB9XG59XG4iXX0=
|