angular-three-soba 2.0.0-beta.26 → 2.0.0-beta.261
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 +62 -4
- package/abstractions/README.md +278 -2
- package/abstractions/index.d.ts +11 -6
- package/abstractions/lib/catmull-rom-line.d.ts +648 -0
- package/abstractions/lib/cubic-bezier-line.d.ts +19 -0
- package/abstractions/lib/edges.d.ts +850 -0
- package/abstractions/lib/gradient-texture.d.ts +24 -0
- package/abstractions/lib/grid.d.ts +339 -0
- package/abstractions/lib/helper.d.ts +25 -0
- package/abstractions/lib/line.d.ts +41 -0
- package/abstractions/lib/prism-geometry.d.ts +30 -0
- package/abstractions/lib/quadratic-bezier-line.d.ts +21 -0
- package/abstractions/lib/text-3d.d.ts +338 -0
- package/abstractions/lib/text.d.ts +55 -0
- package/cameras/README.md +91 -2
- package/cameras/index.d.ts +4 -4
- package/cameras/lib/camera-content.d.ts +10 -0
- package/cameras/lib/cube-camera.d.ts +38 -0
- package/cameras/lib/orthographic-camera.d.ts +40 -0
- package/cameras/lib/perspective-camera.d.ts +36 -0
- package/controls/README.md +95 -2
- package/controls/index.d.ts +2 -1
- package/controls/lib/camera-controls.d.ts +31 -0
- package/controls/lib/orbit-controls.d.ts +38 -0
- package/esm2022/abstractions/index.mjs +12 -7
- package/esm2022/abstractions/lib/catmull-rom-line.mjs +76 -0
- package/esm2022/abstractions/lib/cubic-bezier-line.mjs +51 -0
- package/esm2022/abstractions/lib/edges.mjs +70 -0
- package/esm2022/abstractions/lib/gradient-texture.mjs +91 -0
- package/esm2022/abstractions/lib/grid.mjs +103 -0
- package/esm2022/abstractions/lib/helper.mjs +80 -0
- package/esm2022/abstractions/lib/line.mjs +123 -0
- package/esm2022/abstractions/lib/prism-geometry.mjs +55 -0
- package/esm2022/abstractions/lib/quadratic-bezier-line.mjs +73 -0
- package/esm2022/abstractions/lib/text-3d.mjs +98 -0
- package/esm2022/abstractions/lib/text.mjs +92 -0
- package/esm2022/cameras/index.mjs +5 -5
- package/esm2022/cameras/lib/camera-content.mjs +14 -0
- package/esm2022/cameras/lib/cube-camera.mjs +111 -0
- package/esm2022/cameras/lib/orthographic-camera.mjs +131 -0
- package/esm2022/cameras/lib/perspective-camera.mjs +104 -0
- package/esm2022/controls/index.mjs +3 -2
- package/esm2022/controls/lib/camera-controls.mjs +127 -0
- package/esm2022/controls/lib/orbit-controls.mjs +126 -0
- package/esm2022/loaders/index.mjs +6 -5
- package/esm2022/loaders/lib/font-loader.mjs +49 -0
- package/esm2022/loaders/lib/gltf-loader.mjs +33 -0
- package/esm2022/loaders/lib/loader.mjs +109 -0
- package/esm2022/loaders/lib/progress.mjs +51 -0
- package/esm2022/loaders/lib/texture-loader.mjs +32 -0
- package/esm2022/materials/index.mjs +7 -7
- package/esm2022/materials/lib/custom-shader-material.mjs +71 -0
- package/esm2022/materials/lib/mesh-distort-material.mjs +42 -0
- package/esm2022/materials/lib/mesh-reflector-material.mjs +278 -0
- package/esm2022/materials/lib/mesh-refraction-material.mjs +144 -0
- package/esm2022/materials/lib/mesh-transmission-material.mjs +188 -0
- package/esm2022/materials/lib/mesh-wobble-material.mjs +42 -0
- package/esm2022/misc/index.mjs +10 -14
- package/esm2022/misc/lib/animations.mjs +74 -0
- package/esm2022/misc/lib/bake-shadows.mjs +26 -0
- package/esm2022/misc/lib/computed-attribute.mjs +56 -0
- package/esm2022/misc/lib/constants.mjs +5 -0
- package/esm2022/misc/lib/decal.mjs +135 -0
- package/esm2022/misc/lib/deprecated.mjs +15 -0
- package/esm2022/misc/lib/depth-buffer.mjs +39 -0
- package/esm2022/misc/lib/fbo.mjs +89 -0
- package/esm2022/misc/lib/sampler.mjs +121 -0
- package/esm2022/shaders/index.mjs +3 -18
- package/esm2022/shaders/lib/grid-material.mjs +81 -0
- package/esm2022/shaders/lib/mesh-refraction-material.mjs +163 -0
- package/esm2022/staging/index.mjs +19 -22
- package/esm2022/staging/lib/accumulative-shadows.mjs +182 -0
- package/esm2022/staging/lib/backdrop.mjs +73 -0
- package/esm2022/staging/lib/bb-anchor.mjs +58 -0
- package/esm2022/staging/lib/bounds.mjs +286 -0
- package/esm2022/staging/lib/camera-shake.mjs +69 -0
- package/esm2022/staging/lib/caustics.mjs +188 -0
- package/esm2022/staging/lib/center.mjs +113 -0
- package/esm2022/staging/lib/contact-shadows.mjs +201 -0
- package/esm2022/staging/lib/environment.mjs +465 -0
- package/esm2022/staging/lib/float.mjs +60 -0
- package/esm2022/staging/lib/lightformer.mjs +107 -0
- package/esm2022/staging/lib/matcap-texture.mjs +81 -0
- package/esm2022/staging/lib/normal-texture.mjs +85 -0
- package/esm2022/staging/lib/randomized-lights.mjs +104 -0
- package/esm2022/staging/lib/render-texture.mjs +213 -0
- package/esm2022/staging/lib/sky.mjs +86 -0
- package/esm2022/staging/lib/spot-light.mjs +450 -0
- package/esm2022/staging/lib/stage.mjs +236 -0
- package/esm2022/vanilla-exports/angular-three-soba-vanilla-exports.mjs +5 -0
- package/esm2022/vanilla-exports/index.mjs +3 -0
- package/fesm2022/angular-three-soba-abstractions.mjs +739 -718
- package/fesm2022/angular-three-soba-abstractions.mjs.map +1 -1
- package/fesm2022/angular-three-soba-cameras.mjs +260 -307
- package/fesm2022/angular-three-soba-cameras.mjs.map +1 -1
- package/fesm2022/angular-three-soba-controls.mjs +174 -110
- package/fesm2022/angular-three-soba-controls.mjs.map +1 -1
- package/fesm2022/angular-three-soba-loaders.mjs +151 -129
- package/fesm2022/angular-three-soba-loaders.mjs.map +1 -1
- package/fesm2022/angular-three-soba-materials.mjs +511 -764
- package/fesm2022/angular-three-soba-materials.mjs.map +1 -1
- package/fesm2022/angular-three-soba-misc.mjs +405 -2149
- package/fesm2022/angular-three-soba-misc.mjs.map +1 -1
- package/fesm2022/angular-three-soba-shaders.mjs +33 -1373
- package/fesm2022/angular-three-soba-shaders.mjs.map +1 -1
- package/fesm2022/angular-three-soba-staging.mjs +2329 -3538
- package/fesm2022/angular-three-soba-staging.mjs.map +1 -1
- package/fesm2022/angular-three-soba-vanilla-exports.mjs +6 -0
- package/fesm2022/angular-three-soba-vanilla-exports.mjs.map +1 -0
- package/loaders/README.md +130 -2
- package/loaders/index.d.ts +5 -4
- package/loaders/lib/font-loader.d.ts +27 -0
- package/loaders/lib/gltf-loader.d.ts +21 -0
- package/loaders/lib/loader.d.ts +29 -0
- package/loaders/lib/progress.d.ts +9 -0
- package/loaders/lib/texture-loader.d.ts +13 -0
- package/materials/README.md +160 -2
- package/materials/index.d.ts +6 -6
- package/materials/lib/custom-shader-material.d.ts +19 -0
- package/materials/lib/mesh-distort-material.d.ts +18 -0
- package/materials/lib/mesh-reflector-material.d.ts +50 -0
- package/materials/lib/mesh-refraction-material.d.ts +42 -0
- package/materials/lib/mesh-transmission-material.d.ts +77 -0
- package/materials/lib/mesh-wobble-material.d.ts +15 -0
- package/metadata.json +1 -1
- package/misc/README.md +217 -2
- package/misc/index.d.ts +9 -13
- package/misc/lib/animations.d.ts +14 -0
- package/misc/lib/computed-attribute.d.ts +69 -0
- package/misc/lib/constants.d.ts +1 -0
- package/misc/lib/decal.d.ts +27 -0
- package/misc/lib/deprecated.d.ts +14 -0
- package/misc/lib/depth-buffer.d.ts +8 -0
- package/misc/lib/fbo.d.ts +47 -0
- package/misc/lib/sampler.d.ts +73 -0
- package/package.json +60 -38
- package/shaders/index.d.ts +2 -17
- package/shaders/lib/grid-material.d.ts +69 -0
- package/shaders/lib/mesh-refraction-material.d.ts +11 -0
- package/staging/README.md +472 -2
- package/staging/index.d.ts +18 -21
- package/staging/lib/accumulative-shadows.d.ts +75 -0
- package/staging/lib/backdrop.d.ts +22 -0
- package/staging/lib/bb-anchor.d.ts +17 -0
- package/staging/lib/bounds.d.ts +47 -0
- package/staging/lib/camera-shake.d.ts +29 -0
- package/staging/lib/caustics.d.ts +53 -0
- package/staging/lib/center.d.ts +422 -0
- package/staging/lib/contact-shadows.d.ts +45 -0
- package/staging/lib/environment.d.ts +159 -0
- package/staging/lib/float.d.ts +19 -0
- package/staging/lib/lightformer.d.ts +334 -0
- package/staging/lib/matcap-texture.d.ts +32 -0
- package/staging/lib/normal-texture.d.ts +37 -0
- package/staging/lib/randomized-lights.d.ts +54 -0
- package/staging/lib/render-texture.d.ts +64 -0
- package/staging/lib/sky.d.ts +32 -0
- package/staging/lib/spot-light.d.ts +120 -0
- package/staging/lib/stage.d.ts +376 -0
- package/vanilla-exports/README.md +3 -0
- package/vanilla-exports/index.d.ts +27 -0
- package/web-types.json +1 -1
- package/abstractions/billboard/billboard.d.ts +0 -28
- package/abstractions/detailed/detailed.d.ts +0 -26
- package/abstractions/edges/edges.d.ts +0 -34
- package/abstractions/grid/grid.d.ts +0 -50
- package/abstractions/text/text.d.ts +0 -82
- package/abstractions/text-3d/text-3d.d.ts +0 -84
- package/assets/distort.vert.glsl +0 -1
- package/cameras/camera/camera-content.d.ts +0 -13
- package/cameras/camera/camera.d.ts +0 -26
- package/cameras/cube-camera/cube-camera.d.ts +0 -69
- package/cameras/orthographic-camera/orthographic-camera.d.ts +0 -37
- package/cameras/perspective-camera/perspective-camera.d.ts +0 -18
- package/controls/orbit-controls/orbit-controls.d.ts +0 -54
- package/esm2022/abstractions/billboard/billboard.mjs +0 -74
- package/esm2022/abstractions/detailed/detailed.mjs +0 -64
- package/esm2022/abstractions/edges/edges.mjs +0 -88
- package/esm2022/abstractions/grid/grid.mjs +0 -180
- package/esm2022/abstractions/text/text.mjs +0 -274
- package/esm2022/abstractions/text-3d/text-3d.mjs +0 -172
- package/esm2022/cameras/camera/camera-content.mjs +0 -21
- package/esm2022/cameras/camera/camera.mjs +0 -77
- package/esm2022/cameras/cube-camera/cube-camera.mjs +0 -161
- package/esm2022/cameras/orthographic-camera/orthographic-camera.mjs +0 -102
- package/esm2022/cameras/perspective-camera/perspective-camera.mjs +0 -46
- package/esm2022/controls/orbit-controls/orbit-controls.mjs +0 -185
- package/esm2022/gizmos/angular-three-soba-gizmos.mjs +0 -5
- package/esm2022/gizmos/gizmo-helper/gizmo-helper.mjs +0 -197
- package/esm2022/gizmos/gizmo-helper/gizmo-viewcube/constants.mjs +0 -31
- package/esm2022/gizmos/gizmo-helper/gizmo-viewcube/gizmo-viewcube-edge.mjs +0 -93
- package/esm2022/gizmos/gizmo-helper/gizmo-viewcube/gizmo-viewcube-face.mjs +0 -150
- package/esm2022/gizmos/gizmo-helper/gizmo-viewcube/gizmo-viewcube-input.mjs +0 -66
- package/esm2022/gizmos/gizmo-helper/gizmo-viewcube/gizmo-viewcube.mjs +0 -71
- package/esm2022/gizmos/gizmo-helper/gizmo-viewport/gizmo-viewport-axis.mjs +0 -195
- package/esm2022/gizmos/gizmo-helper/gizmo-viewport/gizmo-viewport.mjs +0 -272
- package/esm2022/gizmos/index.mjs +0 -4
- package/esm2022/loaders/gltf-loader/gltf-loader.mjs +0 -30
- package/esm2022/loaders/loader/loader.mjs +0 -138
- package/esm2022/loaders/progress/progress.mjs +0 -52
- package/esm2022/loaders/texture-loader/texture-loader.mjs +0 -28
- package/esm2022/materials/mesh-distort-material/mesh-distort-material.mjs +0 -82
- package/esm2022/materials/mesh-reflector-material/mesh-reflector-material.mjs +0 -367
- package/esm2022/materials/mesh-refraction-material/mesh-refraction-material.mjs +0 -171
- package/esm2022/materials/mesh-transmission-material/mesh-transmission-material.mjs +0 -278
- package/esm2022/materials/mesh-wobble-material/mesh-wobble-material.mjs +0 -68
- package/esm2022/materials/point-material/point-material.mjs +0 -50
- package/esm2022/misc/animations/animations.mjs +0 -59
- package/esm2022/misc/bake-shadows/bake-shadows.mjs +0 -24
- package/esm2022/misc/caustics/caustics.mjs +0 -387
- package/esm2022/misc/decal/decal.mjs +0 -187
- package/esm2022/misc/depth-buffer/depth-buffer.mjs +0 -44
- package/esm2022/misc/example/example.mjs +0 -160
- package/esm2022/misc/fbo/fbo.mjs +0 -47
- package/esm2022/misc/html/html-wrapper.mjs +0 -478
- package/esm2022/misc/html/html.mjs +0 -304
- package/esm2022/misc/sampler/sampler.mjs +0 -142
- package/esm2022/misc/shadow/shadow.mjs +0 -111
- package/esm2022/misc/stats-gl/stats-gl.mjs +0 -61
- package/esm2022/misc/trail/trail.mjs +0 -209
- package/esm2022/misc/trail-texture/inject-trail-texture.mjs +0 -17
- package/esm2022/misc/trail-texture/trail-texture.mjs +0 -106
- package/esm2022/modifiers/angular-three-soba-modifiers.mjs +0 -5
- package/esm2022/modifiers/curve-modifier/curve-modifier.mjs +0 -64
- package/esm2022/modifiers/index.mjs +0 -2
- package/esm2022/performances/adaptive-dpr/adaptive-dpr.mjs +0 -44
- package/esm2022/performances/adaptive-events/adaptive-events.mjs +0 -27
- package/esm2022/performances/angular-three-soba-performances.mjs +0 -5
- package/esm2022/performances/index.mjs +0 -8
- package/esm2022/performances/instances/instances.mjs +0 -220
- package/esm2022/performances/instances/position-mesh.mjs +0 -52
- package/esm2022/performances/points/points-input.mjs +0 -64
- package/esm2022/performances/points/points.mjs +0 -326
- package/esm2022/performances/points/position-point.mjs +0 -54
- package/esm2022/performances/segments/segment-object.mjs +0 -9
- package/esm2022/performances/segments/segments.mjs +0 -182
- package/esm2022/shaders/blur-pass/blur-pass.mjs +0 -61
- package/esm2022/shaders/caustics/caustics-material.mjs +0 -130
- package/esm2022/shaders/caustics/caustics-projection-material.mjs +0 -31
- package/esm2022/shaders/convolution-material/convolution-material.mjs +0 -94
- package/esm2022/shaders/discard-material/discard-material.mjs +0 -3
- package/esm2022/shaders/grid-material/grid-material.mjs +0 -77
- package/esm2022/shaders/mesh-distort-material/mesh-distort-material.mjs +0 -56
- package/esm2022/shaders/mesh-reflector-material/mesh-reflector-material.mjs +0 -223
- package/esm2022/shaders/mesh-refraction-material/mesh-refraction-material.mjs +0 -170
- package/esm2022/shaders/mesh-transmission-material/mesh-transmission-material.mjs +0 -268
- package/esm2022/shaders/mesh-wobble-material/mesh-wobble-material.mjs +0 -37
- package/esm2022/shaders/shader-material/shader-material.mjs +0 -34
- package/esm2022/shaders/soft-shadow-material/soft-shadow-material.mjs +0 -25
- package/esm2022/shaders/sparkles-material/sparkles-material.mjs +0 -33
- package/esm2022/shaders/spot-light-material/spot-light-material.mjs +0 -86
- package/esm2022/shaders/star-field-material/star-field-material.mjs +0 -33
- package/esm2022/shaders/wireframe-material/wireframe-material.mjs +0 -247
- package/esm2022/staging/accumulative-shadows/accumulative-shadows.mjs +0 -267
- package/esm2022/staging/accumulative-shadows/progressive-light-map.mjs +0 -108
- package/esm2022/staging/accumulative-shadows/randomized-lights.mjs +0 -206
- package/esm2022/staging/backdrop/backdrop.mjs +0 -77
- package/esm2022/staging/bb-anchor/bb-anchor.mjs +0 -69
- package/esm2022/staging/bounds/bounds.mjs +0 -308
- package/esm2022/staging/camera-shake/camera-shake.mjs +0 -123
- package/esm2022/staging/center/center.mjs +0 -165
- package/esm2022/staging/cloud/cloud.mjs +0 -158
- package/esm2022/staging/contact-shadows/contact-shadows.mjs +0 -246
- package/esm2022/staging/environment/assets.mjs +0 -13
- package/esm2022/staging/environment/environment-cube.mjs +0 -47
- package/esm2022/staging/environment/environment-ground.mjs +0 -41
- package/esm2022/staging/environment/environment-input.mjs +0 -119
- package/esm2022/staging/environment/environment-map.mjs +0 -53
- package/esm2022/staging/environment/environment-portal.mjs +0 -113
- package/esm2022/staging/environment/environment.mjs +0 -61
- package/esm2022/staging/environment/utils.mjs +0 -106
- package/esm2022/staging/float/float.mjs +0 -94
- package/esm2022/staging/matcap-texture/matcap-texture.mjs +0 -64
- package/esm2022/staging/normal-texture/normal-texture.mjs +0 -53
- package/esm2022/staging/sky/sky.mjs +0 -119
- package/esm2022/staging/sparkles/sparkles.mjs +0 -164
- package/esm2022/staging/spot-light/shadow-mesh-input.mjs +0 -63
- package/esm2022/staging/spot-light/shadow-mesh.mjs +0 -266
- package/esm2022/staging/spot-light/spot-light-input.mjs +0 -84
- package/esm2022/staging/spot-light/spot-light.mjs +0 -81
- package/esm2022/staging/spot-light/volumetric-mesh.mjs +0 -98
- package/esm2022/staging/stage/stage.mjs +0 -389
- package/esm2022/staging/stars/stars.mjs +0 -147
- package/esm2022/staging/wireframe/wireframe-input.mjs +0 -191
- package/esm2022/staging/wireframe/wireframe.mjs +0 -228
- package/esm2022/utils/angular-three-soba-utils.mjs +0 -5
- package/esm2022/utils/content/content.mjs +0 -15
- package/esm2022/utils/index.mjs +0 -2
- package/fesm2022/angular-three-soba-gizmos.mjs +0 -1043
- package/fesm2022/angular-three-soba-gizmos.mjs.map +0 -1
- package/fesm2022/angular-three-soba-modifiers.mjs +0 -71
- package/fesm2022/angular-three-soba-modifiers.mjs.map +0 -1
- package/fesm2022/angular-three-soba-performances.mjs +0 -956
- package/fesm2022/angular-three-soba-performances.mjs.map +0 -1
- package/fesm2022/angular-three-soba-utils.mjs +0 -22
- package/fesm2022/angular-three-soba-utils.mjs.map +0 -1
- package/gizmos/README.md +0 -3
- package/gizmos/gizmo-helper/gizmo-helper.d.ts +0 -69
- package/gizmos/gizmo-helper/gizmo-viewcube/constants.d.ts +0 -12
- package/gizmos/gizmo-helper/gizmo-viewcube/gizmo-viewcube-edge.d.ts +0 -22
- package/gizmos/gizmo-helper/gizmo-viewcube/gizmo-viewcube-face.d.ts +0 -29
- package/gizmos/gizmo-helper/gizmo-viewcube/gizmo-viewcube-input.d.ts +0 -33
- package/gizmos/gizmo-helper/gizmo-viewcube/gizmo-viewcube.d.ts +0 -10
- package/gizmos/gizmo-helper/gizmo-viewport/gizmo-viewport-axis.d.ts +0 -40
- package/gizmos/gizmo-helper/gizmo-viewport/gizmo-viewport.d.ts +0 -30
- package/gizmos/index.d.ts +0 -3
- package/loaders/gltf-loader/gltf-loader.d.ts +0 -10
- package/loaders/loader/loader.d.ts +0 -33
- package/loaders/progress/progress.d.ts +0 -9
- package/loaders/texture-loader/texture-loader.d.ts +0 -7
- package/materials/mesh-distort-material/mesh-distort-material.d.ts +0 -40
- package/materials/mesh-reflector-material/mesh-reflector-material.d.ts +0 -99
- package/materials/mesh-refraction-material/mesh-refraction-material.d.ts +0 -62
- package/materials/mesh-transmission-material/mesh-transmission-material.d.ts +0 -107
- package/materials/mesh-wobble-material/mesh-wobble-material.d.ts +0 -29
- package/materials/point-material/point-material.d.ts +0 -24
- package/misc/animations/animations.d.ts +0 -15
- package/misc/caustics/caustics.d.ts +0 -87
- package/misc/decal/decal.d.ts +0 -49
- package/misc/depth-buffer/depth-buffer.d.ts +0 -9
- package/misc/example/example.d.ts +0 -81
- package/misc/fbo/fbo.d.ts +0 -17
- package/misc/html/html-wrapper.d.ts +0 -559
- package/misc/html/html.d.ts +0 -214
- package/misc/sampler/sampler.d.ts +0 -67
- package/misc/shadow/shadow.d.ts +0 -37
- package/misc/stats-gl/stats-gl.d.ts +0 -24
- package/misc/trail/trail.d.ts +0 -57
- package/misc/trail-texture/inject-trail-texture.d.ts +0 -9
- package/misc/trail-texture/trail-texture.d.ts +0 -50
- package/modifiers/README.md +0 -3
- package/modifiers/curve-modifier/curve-modifier.d.ts +0 -23
- package/modifiers/index.d.ts +0 -1
- package/performances/README.md +0 -3
- package/performances/adaptive-dpr/adaptive-dpr.d.ts +0 -14
- package/performances/adaptive-events/adaptive-events.d.ts +0 -9
- package/performances/index.d.ts +0 -7
- package/performances/instances/instances.d.ts +0 -79
- package/performances/instances/position-mesh.d.ts +0 -10
- package/performances/points/points-input.d.ts +0 -32
- package/performances/points/points.d.ts +0 -92
- package/performances/points/position-point.d.ts +0 -11
- package/performances/segments/segment-object.d.ts +0 -7
- package/performances/segments/segments.d.ts +0 -124
- package/shaders/blur-pass/blur-pass.d.ts +0 -23
- package/shaders/caustics/caustics-material.d.ts +0 -4
- package/shaders/caustics/caustics-projection-material.d.ts +0 -4
- package/shaders/convolution-material/convolution-material.d.ts +0 -7
- package/shaders/discard-material/discard-material.d.ts +0 -3
- package/shaders/grid-material/grid-material.d.ts +0 -37
- package/shaders/mesh-distort-material/mesh-distort-material.d.ts +0 -295
- package/shaders/mesh-reflector-material/mesh-reflector-material.d.ts +0 -50
- package/shaders/mesh-refraction-material/mesh-refraction-material.d.ts +0 -4
- package/shaders/mesh-transmission-material/mesh-transmission-material.d.ts +0 -25
- package/shaders/mesh-wobble-material/mesh-wobble-material.d.ts +0 -16
- package/shaders/shader-material/shader-material.d.ts +0 -6
- package/shaders/soft-shadow-material/soft-shadow-material.d.ts +0 -19
- package/shaders/sparkles-material/sparkles-material.d.ts +0 -17
- package/shaders/spot-light-material/spot-light-material.d.ts +0 -13
- package/shaders/star-field-material/star-field-material.d.ts +0 -13
- package/shaders/wireframe-material/wireframe-material.d.ts +0 -58
- package/staging/accumulative-shadows/accumulative-shadows.d.ts +0 -146
- package/staging/accumulative-shadows/progressive-light-map.d.ts +0 -34
- package/staging/accumulative-shadows/randomized-lights.d.ts +0 -90
- package/staging/backdrop/backdrop.d.ts +0 -30
- package/staging/bb-anchor/bb-anchor.d.ts +0 -27
- package/staging/bounds/bounds.d.ts +0 -134
- package/staging/camera-shake/camera-shake.d.ts +0 -43
- package/staging/center/center.d.ts +0 -70
- package/staging/cloud/cloud.d.ts +0 -51
- package/staging/contact-shadows/contact-shadows.d.ts +0 -70
- package/staging/environment/assets.d.ts +0 -13
- package/staging/environment/environment-cube.d.ts +0 -15
- package/staging/environment/environment-ground.d.ts +0 -13
- package/staging/environment/environment-input.d.ts +0 -68
- package/staging/environment/environment-map.d.ts +0 -16
- package/staging/environment/environment-portal.d.ts +0 -18
- package/staging/environment/environment.d.ts +0 -8
- package/staging/environment/utils.d.ts +0 -7
- package/staging/float/float.d.ts +0 -31
- package/staging/matcap-texture/matcap-texture.d.ts +0 -13
- package/staging/normal-texture/normal-texture.d.ts +0 -16
- package/staging/sky/sky.d.ts +0 -48
- package/staging/sparkles/sparkles.d.ts +0 -63
- package/staging/spot-light/shadow-mesh-input.d.ts +0 -29
- package/staging/spot-light/shadow-mesh.d.ts +0 -37
- package/staging/spot-light/spot-light-input.d.ts +0 -38
- package/staging/spot-light/spot-light.d.ts +0 -39
- package/staging/spot-light/volumetric-mesh.d.ts +0 -24
- package/staging/stage/stage.d.ts +0 -130
- package/staging/stars/stars.d.ts +0 -45
- package/staging/wireframe/wireframe-input.d.ts +0 -65
- package/staging/wireframe/wireframe.d.ts +0 -28
- package/utils/README.md +0 -3
- package/utils/content/content.d.ts +0 -8
- package/utils/index.d.ts +0 -1
- /package/misc/{bake-shadows → lib}/bake-shadows.d.ts +0 -0
|
@@ -1,1043 +0,0 @@
|
|
|
1
|
-
import { NgTemplateOutlet, DOCUMENT, NgFor, NgIf } from '@angular/common';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { forwardRef, EventEmitter, computed, effect, TemplateRef, Component, CUSTOM_ELEMENTS_SCHEMA, Input, Output, ContentChild, Directive, inject, signal } from '@angular/core';
|
|
4
|
-
import { extend, createInjectionToken, signalStore, injectNgtRef, injectNgtStore, injectBeforeRender, NgtPortal, NgtPortalContent, NgtArgs, NgtRepeat } from 'angular-three';
|
|
5
|
-
import { NgtsOrthographicCamera } from 'angular-three-soba/cameras';
|
|
6
|
-
import { NgtsSobaContent } from 'angular-three-soba/utils';
|
|
7
|
-
import * as THREE from 'three';
|
|
8
|
-
import { Group, Quaternion, Matrix4, Vector3, Object3D, Mesh, BoxGeometry, MeshBasicMaterial, MeshLambertMaterial, CanvasTexture, AmbientLight, PointLight, Sprite, SpriteMaterial } from 'three';
|
|
9
|
-
import 'three-stdlib';
|
|
10
|
-
|
|
11
|
-
const isOrbitControls = (controls) => {
|
|
12
|
-
return 'minPolarAngle' in controls;
|
|
13
|
-
};
|
|
14
|
-
extend({ Group });
|
|
15
|
-
const [injectNgtsGizmoHelperApi, provideNgtsGizmoHelperApi] = createInjectionToken((gizmoHelper) => gizmoHelper.api, { isRoot: false, deps: [forwardRef(() => NgtsGizmoHelper)] });
|
|
16
|
-
class NgtsGizmoHelper {
|
|
17
|
-
set _alignment(alignment) {
|
|
18
|
-
this.inputs.set({ alignment });
|
|
19
|
-
}
|
|
20
|
-
set _margin(margin) {
|
|
21
|
-
this.inputs.set({ margin });
|
|
22
|
-
}
|
|
23
|
-
set _renderPriority(renderPriority) {
|
|
24
|
-
this.inputs.set({ renderPriority });
|
|
25
|
-
}
|
|
26
|
-
set _autoClear(autoClear) {
|
|
27
|
-
this.inputs.set({ autoClear });
|
|
28
|
-
}
|
|
29
|
-
constructor() {
|
|
30
|
-
this.inputs = signalStore({
|
|
31
|
-
alignment: 'bottom-right',
|
|
32
|
-
margin: [80, 80],
|
|
33
|
-
renderPriority: 1,
|
|
34
|
-
});
|
|
35
|
-
this.gizmoRef = injectNgtRef();
|
|
36
|
-
this.update = new EventEmitter();
|
|
37
|
-
this.store = injectNgtStore();
|
|
38
|
-
this.mainCamera = this.store.select('camera');
|
|
39
|
-
// @ts-expect-error
|
|
40
|
-
this.defaultControls = this.store.select('controls');
|
|
41
|
-
this.invalidate = this.store.select('invalidate');
|
|
42
|
-
this.size = this.store.select('size');
|
|
43
|
-
this.animating = false;
|
|
44
|
-
this.q1 = new Quaternion();
|
|
45
|
-
this.q2 = new Quaternion();
|
|
46
|
-
this.turnRate = 2 * Math.PI; // turn rate in angles per second
|
|
47
|
-
this.matrix = new Matrix4();
|
|
48
|
-
this.radius = 0;
|
|
49
|
-
this.focusPoint = new Vector3(0, 0, 0);
|
|
50
|
-
this.defaultUp = new Vector3(0, 0, 0);
|
|
51
|
-
this.target = new Vector3();
|
|
52
|
-
this.targetPosition = new Vector3();
|
|
53
|
-
this.dummy = new Object3D();
|
|
54
|
-
this.margin = this.inputs.select('margin');
|
|
55
|
-
this.alignment = this.inputs.select('alignment');
|
|
56
|
-
this.virtualCamRef = injectNgtRef();
|
|
57
|
-
this.renderPriority = this.inputs.select('renderPriority');
|
|
58
|
-
this.gizmoPosition = computed(() => {
|
|
59
|
-
const [{ width, height }, [marginX, marginY], alignment] = [this.size(), this.margin(), this.alignment()];
|
|
60
|
-
const x = alignment.endsWith('-center')
|
|
61
|
-
? 0
|
|
62
|
-
: alignment.endsWith('-left')
|
|
63
|
-
? -width / 2 + marginX
|
|
64
|
-
: width / 2 - marginX;
|
|
65
|
-
const y = alignment.startsWith('center-')
|
|
66
|
-
? 0
|
|
67
|
-
: alignment.startsWith('top-')
|
|
68
|
-
? height / 2 - marginY
|
|
69
|
-
: -height / 2 + marginY;
|
|
70
|
-
return [x, y, 0];
|
|
71
|
-
});
|
|
72
|
-
this.api = {
|
|
73
|
-
tweenCamera: (direction) => {
|
|
74
|
-
const [defaultControls, mainCamera, invalidate] = [
|
|
75
|
-
this.defaultControls(),
|
|
76
|
-
this.mainCamera(),
|
|
77
|
-
this.invalidate(),
|
|
78
|
-
];
|
|
79
|
-
this.animating = true;
|
|
80
|
-
if (defaultControls)
|
|
81
|
-
this.focusPoint = defaultControls?.target;
|
|
82
|
-
this.radius = mainCamera.position.distanceTo(this.target);
|
|
83
|
-
// Rotate from current camera orientation
|
|
84
|
-
this.q1.copy(mainCamera.quaternion);
|
|
85
|
-
// To new current camera orientation
|
|
86
|
-
this.targetPosition.copy(direction).multiplyScalar(this.radius).add(this.target);
|
|
87
|
-
this.dummy.lookAt(this.targetPosition);
|
|
88
|
-
this.dummy.up.copy(mainCamera.up);
|
|
89
|
-
this.q2.copy(this.dummy.quaternion);
|
|
90
|
-
invalidate();
|
|
91
|
-
},
|
|
92
|
-
};
|
|
93
|
-
this.trackMainCameraUp();
|
|
94
|
-
this.beforeRender();
|
|
95
|
-
}
|
|
96
|
-
trackMainCameraUp() {
|
|
97
|
-
effect(() => {
|
|
98
|
-
const mainCamera = this.mainCamera();
|
|
99
|
-
this.defaultUp.copy(mainCamera.up);
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
beforeRender() {
|
|
103
|
-
injectBeforeRender(({ delta }) => {
|
|
104
|
-
const [gizmo, virtualCam, defaultControls, mainCamera, invalidate] = [
|
|
105
|
-
this.gizmoRef.nativeElement,
|
|
106
|
-
this.virtualCamRef.nativeElement,
|
|
107
|
-
this.defaultControls(),
|
|
108
|
-
this.mainCamera(),
|
|
109
|
-
this.invalidate(),
|
|
110
|
-
];
|
|
111
|
-
if (gizmo && virtualCam) {
|
|
112
|
-
// Animate step
|
|
113
|
-
if (this.animating) {
|
|
114
|
-
if (this.q1.angleTo(this.q2) < 0.01) {
|
|
115
|
-
this.animating = false;
|
|
116
|
-
// Orbit controls uses UP vector as the orbit axes,
|
|
117
|
-
// so we need to reset it after the animation is done
|
|
118
|
-
// moving it around for the controls to work correctly
|
|
119
|
-
if (isOrbitControls(defaultControls)) {
|
|
120
|
-
mainCamera.up.copy(this.defaultUp);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
const step = delta * this.turnRate;
|
|
125
|
-
// animate position by doing a slerp and then scaling the position on the unit sphere
|
|
126
|
-
this.q1.rotateTowards(this.q2, step);
|
|
127
|
-
// animate orientation
|
|
128
|
-
mainCamera.position
|
|
129
|
-
.set(0, 0, 1)
|
|
130
|
-
.applyQuaternion(this.q1)
|
|
131
|
-
.multiplyScalar(this.radius)
|
|
132
|
-
.add(this.focusPoint);
|
|
133
|
-
mainCamera.up.set(0, 1, 0).applyQuaternion(this.q1).normalize();
|
|
134
|
-
mainCamera.quaternion.copy(this.q1);
|
|
135
|
-
if (this.update.observed)
|
|
136
|
-
this.update.emit();
|
|
137
|
-
else if (defaultControls)
|
|
138
|
-
defaultControls.update();
|
|
139
|
-
invalidate();
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
// Sync Gizmo with main camera orientation
|
|
143
|
-
this.matrix.copy(mainCamera.matrix).invert();
|
|
144
|
-
gizmo.quaternion.setFromRotationMatrix(this.matrix);
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtsGizmoHelper, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
149
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: NgtsGizmoHelper, isStandalone: true, selector: "ngts-gizmo-helper", inputs: { gizmoRef: "gizmoRef", _alignment: ["alignment", "_alignment"], _margin: ["margin", "_margin"], _renderPriority: ["renderPriority", "_renderPriority"], _autoClear: ["autoClear", "_autoClear"] }, outputs: { update: "update" }, providers: [provideNgtsGizmoHelperApi()], queries: [{ propertyName: "content", first: true, predicate: NgtsSobaContent, descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: `
|
|
150
|
-
<ngt-portal [renderPriority]="renderPriority()">
|
|
151
|
-
<ng-template ngtPortalContent>
|
|
152
|
-
<ngts-orthographic-camera [makeDefault]="true" [position]="[0, 0, 200]" [cameraRef]="virtualCamRef" />
|
|
153
|
-
<ngt-group [ref]="gizmoRef" [position]="gizmoPosition()">
|
|
154
|
-
<ng-container *ngTemplateOutlet="content" />
|
|
155
|
-
</ngt-group>
|
|
156
|
-
</ng-template>
|
|
157
|
-
</ngt-portal>
|
|
158
|
-
`, isInline: true, dependencies: [{ kind: "component", type: NgtPortal, selector: "ngt-portal", inputs: ["container", "state", "autoRender", "autoRenderPriority"], outputs: ["beforeRender"] }, { kind: "directive", type: NgtPortalContent, selector: "ng-template[ngtPortalContent]" }, { kind: "component", type: NgtsOrthographicCamera, selector: "ngts-orthographic-camera", inputs: ["left", "right", "top", "bottom"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
159
|
-
}
|
|
160
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtsGizmoHelper, decorators: [{
|
|
161
|
-
type: Component,
|
|
162
|
-
args: [{
|
|
163
|
-
selector: 'ngts-gizmo-helper',
|
|
164
|
-
standalone: true,
|
|
165
|
-
template: `
|
|
166
|
-
<ngt-portal [renderPriority]="renderPriority()">
|
|
167
|
-
<ng-template ngtPortalContent>
|
|
168
|
-
<ngts-orthographic-camera [makeDefault]="true" [position]="[0, 0, 200]" [cameraRef]="virtualCamRef" />
|
|
169
|
-
<ngt-group [ref]="gizmoRef" [position]="gizmoPosition()">
|
|
170
|
-
<ng-container *ngTemplateOutlet="content" />
|
|
171
|
-
</ngt-group>
|
|
172
|
-
</ng-template>
|
|
173
|
-
</ngt-portal>
|
|
174
|
-
`,
|
|
175
|
-
imports: [NgtPortal, NgtPortalContent, NgtsOrthographicCamera, NgTemplateOutlet],
|
|
176
|
-
providers: [provideNgtsGizmoHelperApi()],
|
|
177
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
178
|
-
}]
|
|
179
|
-
}], ctorParameters: function () { return []; }, propDecorators: { gizmoRef: [{
|
|
180
|
-
type: Input
|
|
181
|
-
}], _alignment: [{
|
|
182
|
-
type: Input,
|
|
183
|
-
args: [{ alias: 'alignment' }]
|
|
184
|
-
}], _margin: [{
|
|
185
|
-
type: Input,
|
|
186
|
-
args: [{ alias: 'margin' }]
|
|
187
|
-
}], _renderPriority: [{
|
|
188
|
-
type: Input,
|
|
189
|
-
args: [{ alias: 'renderPriority' }]
|
|
190
|
-
}], _autoClear: [{
|
|
191
|
-
type: Input,
|
|
192
|
-
args: [{ alias: 'autoClear' }]
|
|
193
|
-
}], update: [{
|
|
194
|
-
type: Output
|
|
195
|
-
}], content: [{
|
|
196
|
-
type: ContentChild,
|
|
197
|
-
args: [NgtsSobaContent, { static: true, read: TemplateRef }]
|
|
198
|
-
}] } });
|
|
199
|
-
|
|
200
|
-
const colors = { bg: '#f0f0f0', hover: '#999', text: 'black', stroke: 'black' };
|
|
201
|
-
const defaultFaces = ['Right', 'Left', 'Top', 'Bottom', 'Front', 'Back'];
|
|
202
|
-
const makePositionVector = (xyz) => new THREE.Vector3(...xyz).multiplyScalar(0.38);
|
|
203
|
-
const corners = [
|
|
204
|
-
[1, 1, 1],
|
|
205
|
-
[1, 1, -1],
|
|
206
|
-
[1, -1, 1],
|
|
207
|
-
[1, -1, -1],
|
|
208
|
-
[-1, 1, 1],
|
|
209
|
-
[-1, 1, -1],
|
|
210
|
-
[-1, -1, 1],
|
|
211
|
-
[-1, -1, -1],
|
|
212
|
-
].map(makePositionVector);
|
|
213
|
-
const cornerDimensions = [0.25, 0.25, 0.25];
|
|
214
|
-
const edges = [
|
|
215
|
-
[1, 1, 0],
|
|
216
|
-
[1, 0, 1],
|
|
217
|
-
[1, 0, -1],
|
|
218
|
-
[1, -1, 0],
|
|
219
|
-
[0, 1, 1],
|
|
220
|
-
[0, 1, -1],
|
|
221
|
-
[0, -1, 1],
|
|
222
|
-
[0, -1, -1],
|
|
223
|
-
[-1, 1, 0],
|
|
224
|
-
[-1, 0, 1],
|
|
225
|
-
[-1, 0, -1],
|
|
226
|
-
[-1, -1, 0],
|
|
227
|
-
].map(makePositionVector);
|
|
228
|
-
const edgeDimensions = edges.map((edge) => edge.toArray().map((axis) => (axis == 0 ? 0.5 : 0.25)));
|
|
229
|
-
|
|
230
|
-
class NgtsGizmoViewcubeInput {
|
|
231
|
-
constructor() {
|
|
232
|
-
this.inputs = signalStore({});
|
|
233
|
-
this.viewcubeClick = new EventEmitter();
|
|
234
|
-
this.hoverColor = this.inputs.select('hoverColor');
|
|
235
|
-
this.opacity = this.inputs.select('opacity');
|
|
236
|
-
this.textColor = this.inputs.select('textColor');
|
|
237
|
-
this.strokeColor = this.inputs.select('strokeColor');
|
|
238
|
-
this.faces = this.inputs.select('faces');
|
|
239
|
-
this.font = this.inputs.select('font');
|
|
240
|
-
this.color = this.inputs.select('color');
|
|
241
|
-
}
|
|
242
|
-
set _opacity(opacity) {
|
|
243
|
-
this.inputs.set({ opacity });
|
|
244
|
-
}
|
|
245
|
-
set _hoverColor(hoverColor) {
|
|
246
|
-
this.inputs.set({ hoverColor });
|
|
247
|
-
}
|
|
248
|
-
set _textColor(textColor) {
|
|
249
|
-
this.inputs.set({ textColor });
|
|
250
|
-
}
|
|
251
|
-
set _strokeColor(strokeColor) {
|
|
252
|
-
this.inputs.set({ strokeColor });
|
|
253
|
-
}
|
|
254
|
-
set _faces(faces) {
|
|
255
|
-
this.inputs.set({ faces });
|
|
256
|
-
}
|
|
257
|
-
set _font(font) {
|
|
258
|
-
this.inputs.set({ font });
|
|
259
|
-
}
|
|
260
|
-
set _color(color) {
|
|
261
|
-
this.inputs.set({ color });
|
|
262
|
-
}
|
|
263
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtsGizmoViewcubeInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
264
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.2", type: NgtsGizmoViewcubeInput, inputs: { _opacity: ["opacity", "_opacity"], _hoverColor: ["hoverColor", "_hoverColor"], _textColor: ["textColor", "_textColor"], _strokeColor: ["strokeColor", "_strokeColor"], _faces: ["faces", "_faces"], _font: ["font", "_font"], _color: ["color", "_color"] }, outputs: { viewcubeClick: "viewcubeClick" }, ngImport: i0 }); }
|
|
265
|
-
}
|
|
266
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtsGizmoViewcubeInput, decorators: [{
|
|
267
|
-
type: Directive
|
|
268
|
-
}], propDecorators: { _opacity: [{
|
|
269
|
-
type: Input,
|
|
270
|
-
args: [{ alias: 'opacity' }]
|
|
271
|
-
}], _hoverColor: [{
|
|
272
|
-
type: Input,
|
|
273
|
-
args: [{ alias: 'hoverColor' }]
|
|
274
|
-
}], _textColor: [{
|
|
275
|
-
type: Input,
|
|
276
|
-
args: [{ alias: 'textColor' }]
|
|
277
|
-
}], _strokeColor: [{
|
|
278
|
-
type: Input,
|
|
279
|
-
args: [{ alias: 'strokeColor' }]
|
|
280
|
-
}], _faces: [{
|
|
281
|
-
type: Input,
|
|
282
|
-
args: [{ alias: 'faces' }]
|
|
283
|
-
}], _font: [{
|
|
284
|
-
type: Input,
|
|
285
|
-
args: [{ alias: 'font' }]
|
|
286
|
-
}], _color: [{
|
|
287
|
-
type: Input,
|
|
288
|
-
args: [{ alias: 'color' }]
|
|
289
|
-
}], viewcubeClick: [{
|
|
290
|
-
type: Output
|
|
291
|
-
}] } });
|
|
292
|
-
|
|
293
|
-
extend({ Mesh, BoxGeometry, MeshBasicMaterial });
|
|
294
|
-
class NgtsGizmoViewcubeEdgeCube {
|
|
295
|
-
set _dimensions(dimensions) {
|
|
296
|
-
this.inputs.set({ dimensions });
|
|
297
|
-
}
|
|
298
|
-
set _position(position) {
|
|
299
|
-
this.inputs.set({ position });
|
|
300
|
-
}
|
|
301
|
-
constructor() {
|
|
302
|
-
this.inputs = signalStore();
|
|
303
|
-
this.gizmoApi = injectNgtsGizmoHelperApi();
|
|
304
|
-
this.viewcubeInput = inject(NgtsGizmoViewcubeInput);
|
|
305
|
-
this.hover = signal(false);
|
|
306
|
-
this.position = this.inputs.select('position');
|
|
307
|
-
this.dimensions = this.inputs.select('dimensions');
|
|
308
|
-
this.viewcubeInput.inputs.patch({ hoverColor: colors.hover });
|
|
309
|
-
}
|
|
310
|
-
onPointerMove(event) {
|
|
311
|
-
event.stopPropagation();
|
|
312
|
-
this.hover.set(true);
|
|
313
|
-
}
|
|
314
|
-
onPointerOut(event) {
|
|
315
|
-
event.stopPropagation();
|
|
316
|
-
this.hover.set(false);
|
|
317
|
-
}
|
|
318
|
-
onClick(event) {
|
|
319
|
-
if (this.viewcubeInput.viewcubeClick.observed) {
|
|
320
|
-
this.viewcubeInput.viewcubeClick.emit(event);
|
|
321
|
-
}
|
|
322
|
-
else {
|
|
323
|
-
event.stopPropagation();
|
|
324
|
-
this.gizmoApi.tweenCamera(this.position());
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtsGizmoViewcubeEdgeCube, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
328
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: NgtsGizmoViewcubeEdgeCube, isStandalone: true, selector: "ngts-gizmo-viewcube-edge-cube", inputs: { _dimensions: ["dimensions", "_dimensions"], _position: ["position", "_position"] }, ngImport: i0, template: `
|
|
329
|
-
<ngt-mesh
|
|
330
|
-
[scale]="1.01"
|
|
331
|
-
[position]="position()"
|
|
332
|
-
(pointermove)="onPointerMove($event)"
|
|
333
|
-
(pointerout)="onPointerOut($event)"
|
|
334
|
-
(click)="onClick($event)"
|
|
335
|
-
>
|
|
336
|
-
<ngt-box-geometry *args="dimensions()" />
|
|
337
|
-
<ngt-mesh-basic-material
|
|
338
|
-
[color]="hover() ? viewcubeInput.hoverColor() : 'white'"
|
|
339
|
-
[transparent]="true"
|
|
340
|
-
[opacity]="0.6"
|
|
341
|
-
[visible]="hover()"
|
|
342
|
-
/>
|
|
343
|
-
</ngt-mesh>
|
|
344
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }] }); }
|
|
345
|
-
}
|
|
346
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtsGizmoViewcubeEdgeCube, decorators: [{
|
|
347
|
-
type: Component,
|
|
348
|
-
args: [{
|
|
349
|
-
selector: 'ngts-gizmo-viewcube-edge-cube',
|
|
350
|
-
standalone: true,
|
|
351
|
-
template: `
|
|
352
|
-
<ngt-mesh
|
|
353
|
-
[scale]="1.01"
|
|
354
|
-
[position]="position()"
|
|
355
|
-
(pointermove)="onPointerMove($event)"
|
|
356
|
-
(pointerout)="onPointerOut($event)"
|
|
357
|
-
(click)="onClick($event)"
|
|
358
|
-
>
|
|
359
|
-
<ngt-box-geometry *args="dimensions()" />
|
|
360
|
-
<ngt-mesh-basic-material
|
|
361
|
-
[color]="hover() ? viewcubeInput.hoverColor() : 'white'"
|
|
362
|
-
[transparent]="true"
|
|
363
|
-
[opacity]="0.6"
|
|
364
|
-
[visible]="hover()"
|
|
365
|
-
/>
|
|
366
|
-
</ngt-mesh>
|
|
367
|
-
`,
|
|
368
|
-
imports: [NgtArgs],
|
|
369
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
370
|
-
}]
|
|
371
|
-
}], ctorParameters: function () { return []; }, propDecorators: { _dimensions: [{
|
|
372
|
-
type: Input,
|
|
373
|
-
args: [{ required: true, alias: 'dimensions' }]
|
|
374
|
-
}], _position: [{
|
|
375
|
-
type: Input,
|
|
376
|
-
args: [{ required: true, alias: 'position' }]
|
|
377
|
-
}] } });
|
|
378
|
-
|
|
379
|
-
extend({ MeshLambertMaterial, Mesh, BoxGeometry });
|
|
380
|
-
class NgtsGizmoViewcubeFaceMaterial {
|
|
381
|
-
set _index(index) {
|
|
382
|
-
this.inputs.set({ index });
|
|
383
|
-
}
|
|
384
|
-
set _hover(hover) {
|
|
385
|
-
this.inputs.set({ hover });
|
|
386
|
-
}
|
|
387
|
-
constructor() {
|
|
388
|
-
this.inputs = signalStore();
|
|
389
|
-
this.document = inject(DOCUMENT);
|
|
390
|
-
this.store = injectNgtStore();
|
|
391
|
-
this.gl = this.store.select('gl');
|
|
392
|
-
this.viewcubeInput = inject(NgtsGizmoViewcubeInput);
|
|
393
|
-
this.index = this.inputs.select('index');
|
|
394
|
-
this.hover = this.inputs.select('hover');
|
|
395
|
-
this.texture = computed(() => {
|
|
396
|
-
const [index, color, font, faces, textColor, strokeColor] = [
|
|
397
|
-
this.index(),
|
|
398
|
-
this.viewcubeInput.color(),
|
|
399
|
-
this.viewcubeInput.font(),
|
|
400
|
-
this.viewcubeInput.faces(),
|
|
401
|
-
this.viewcubeInput.textColor(),
|
|
402
|
-
this.viewcubeInput.strokeColor(),
|
|
403
|
-
];
|
|
404
|
-
const canvas = this.document.createElement('canvas');
|
|
405
|
-
canvas.width = 128;
|
|
406
|
-
canvas.height = 128;
|
|
407
|
-
const context = canvas.getContext('2d');
|
|
408
|
-
context.fillStyle = color;
|
|
409
|
-
context.fillRect(0, 0, canvas.width, canvas.height);
|
|
410
|
-
context.strokeStyle = strokeColor;
|
|
411
|
-
context.strokeRect(0, 0, canvas.width, canvas.height);
|
|
412
|
-
context.font = font;
|
|
413
|
-
context.textAlign = 'center';
|
|
414
|
-
context.fillStyle = textColor;
|
|
415
|
-
context.fillText(faces[index].toUpperCase(), 64, 76);
|
|
416
|
-
return new CanvasTexture(canvas);
|
|
417
|
-
});
|
|
418
|
-
this.viewcubeInput.inputs.patch({
|
|
419
|
-
color: colors.bg,
|
|
420
|
-
font: '20px Inter var, Arial, sans-serif',
|
|
421
|
-
faces: defaultFaces,
|
|
422
|
-
hoverColor: colors.hover,
|
|
423
|
-
textColor: colors.text,
|
|
424
|
-
strokeColor: colors.stroke,
|
|
425
|
-
opacity: 1,
|
|
426
|
-
});
|
|
427
|
-
}
|
|
428
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtsGizmoViewcubeFaceMaterial, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
429
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: NgtsGizmoViewcubeFaceMaterial, isStandalone: true, selector: "ngts-gizmo-viewcube-face-material", inputs: { _index: ["index", "_index"], _hover: ["hover", "_hover"] }, ngImport: i0, template: `
|
|
430
|
-
<ngt-mesh-lambert-material
|
|
431
|
-
[attach]="['material', index()]"
|
|
432
|
-
[map]="texture()"
|
|
433
|
-
[color]="hover() ? viewcubeInput.hoverColor() : viewcubeInput.color()"
|
|
434
|
-
[opacity]="viewcubeInput.opacity()"
|
|
435
|
-
[transparent]="true"
|
|
436
|
-
>
|
|
437
|
-
<ngt-value [rawValue]="gl().capabilities.getMaxAnisotropy() || 1" attach="map.anisotrophy" />
|
|
438
|
-
</ngt-mesh-lambert-material>
|
|
439
|
-
`, isInline: true }); }
|
|
440
|
-
}
|
|
441
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtsGizmoViewcubeFaceMaterial, decorators: [{
|
|
442
|
-
type: Component,
|
|
443
|
-
args: [{
|
|
444
|
-
selector: 'ngts-gizmo-viewcube-face-material',
|
|
445
|
-
standalone: true,
|
|
446
|
-
template: `
|
|
447
|
-
<ngt-mesh-lambert-material
|
|
448
|
-
[attach]="['material', index()]"
|
|
449
|
-
[map]="texture()"
|
|
450
|
-
[color]="hover() ? viewcubeInput.hoverColor() : viewcubeInput.color()"
|
|
451
|
-
[opacity]="viewcubeInput.opacity()"
|
|
452
|
-
[transparent]="true"
|
|
453
|
-
>
|
|
454
|
-
<ngt-value [rawValue]="gl().capabilities.getMaxAnisotropy() || 1" attach="map.anisotrophy" />
|
|
455
|
-
</ngt-mesh-lambert-material>
|
|
456
|
-
`,
|
|
457
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
458
|
-
}]
|
|
459
|
-
}], ctorParameters: function () { return []; }, propDecorators: { _index: [{
|
|
460
|
-
type: Input,
|
|
461
|
-
args: [{ required: true, alias: 'index' }]
|
|
462
|
-
}], _hover: [{
|
|
463
|
-
type: Input,
|
|
464
|
-
args: [{ required: true, alias: 'hover' }]
|
|
465
|
-
}] } });
|
|
466
|
-
class NgtsGizmoViewcubeFaceCube {
|
|
467
|
-
constructor() {
|
|
468
|
-
this.gizmoApi = injectNgtsGizmoHelperApi();
|
|
469
|
-
this.viewcubeInput = inject(NgtsGizmoViewcubeInput);
|
|
470
|
-
this.hover = signal(-1);
|
|
471
|
-
}
|
|
472
|
-
onPointerMove(event) {
|
|
473
|
-
event.stopPropagation();
|
|
474
|
-
this.hover.set(Math.floor(event.faceIndex / 2));
|
|
475
|
-
}
|
|
476
|
-
onPointerOut(event) {
|
|
477
|
-
event.stopPropagation();
|
|
478
|
-
this.hover.set(-1);
|
|
479
|
-
}
|
|
480
|
-
onClick(event) {
|
|
481
|
-
if (this.viewcubeInput.viewcubeClick.observed) {
|
|
482
|
-
this.viewcubeInput.viewcubeClick.emit(event);
|
|
483
|
-
}
|
|
484
|
-
else {
|
|
485
|
-
event.stopPropagation();
|
|
486
|
-
this.gizmoApi.tweenCamera(event.face.normal);
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtsGizmoViewcubeFaceCube, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
490
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: NgtsGizmoViewcubeFaceCube, isStandalone: true, selector: "ngts-gizmo-viewcube-face-cube", ngImport: i0, template: `
|
|
491
|
-
<ngt-mesh
|
|
492
|
-
(pointermove)="onPointerMove($any($event))"
|
|
493
|
-
(pointerout)="onPointerOut($any($event))"
|
|
494
|
-
(click)="onClick($any($event))"
|
|
495
|
-
>
|
|
496
|
-
<ngt-box-geometry />
|
|
497
|
-
<ngts-gizmo-viewcube-face-material *ngFor="let i; repeat: 6" [hover]="hover() === i" [index]="i" />
|
|
498
|
-
</ngt-mesh>
|
|
499
|
-
`, isInline: true, dependencies: [{ kind: "component", type: NgtsGizmoViewcubeFaceMaterial, selector: "ngts-gizmo-viewcube-face-material", inputs: ["index", "hover"] }, { kind: "directive", type: NgtRepeat, selector: "[ngFor][ngForRepeat]", inputs: ["ngForRepeat"] }] }); }
|
|
500
|
-
}
|
|
501
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtsGizmoViewcubeFaceCube, decorators: [{
|
|
502
|
-
type: Component,
|
|
503
|
-
args: [{
|
|
504
|
-
selector: 'ngts-gizmo-viewcube-face-cube',
|
|
505
|
-
standalone: true,
|
|
506
|
-
template: `
|
|
507
|
-
<ngt-mesh
|
|
508
|
-
(pointermove)="onPointerMove($any($event))"
|
|
509
|
-
(pointerout)="onPointerOut($any($event))"
|
|
510
|
-
(click)="onClick($any($event))"
|
|
511
|
-
>
|
|
512
|
-
<ngt-box-geometry />
|
|
513
|
-
<ngts-gizmo-viewcube-face-material *ngFor="let i; repeat: 6" [hover]="hover() === i" [index]="i" />
|
|
514
|
-
</ngt-mesh>
|
|
515
|
-
`,
|
|
516
|
-
imports: [NgtsGizmoViewcubeFaceMaterial, NgtRepeat],
|
|
517
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
518
|
-
}]
|
|
519
|
-
}] });
|
|
520
|
-
|
|
521
|
-
extend({ Group, AmbientLight, PointLight });
|
|
522
|
-
class NgtsGizmoViewcube extends NgtsGizmoViewcubeInput {
|
|
523
|
-
constructor() {
|
|
524
|
-
super(...arguments);
|
|
525
|
-
this.edges = edges;
|
|
526
|
-
this.edgeDimensions = edgeDimensions;
|
|
527
|
-
this.corners = corners;
|
|
528
|
-
this.cornerDimensions = cornerDimensions;
|
|
529
|
-
}
|
|
530
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtsGizmoViewcube, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
531
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: NgtsGizmoViewcube, isStandalone: true, selector: "ngts-gizmo-viewcube", providers: [{ provide: NgtsGizmoViewcubeInput, useExisting: NgtsGizmoViewcube }], usesInheritance: true, ngImport: i0, template: `
|
|
532
|
-
<ngt-group [scale]="60">
|
|
533
|
-
<ngts-gizmo-viewcube-face-cube />
|
|
534
|
-
|
|
535
|
-
<ngts-gizmo-viewcube-edge-cube
|
|
536
|
-
*ngFor="let edge of edges; let i = index"
|
|
537
|
-
[position]="edge"
|
|
538
|
-
[dimensions]="edgeDimensions[i]"
|
|
539
|
-
/>
|
|
540
|
-
|
|
541
|
-
<ngts-gizmo-viewcube-edge-cube
|
|
542
|
-
*ngFor="let corner of corners"
|
|
543
|
-
[position]="corner"
|
|
544
|
-
[dimensions]="cornerDimensions"
|
|
545
|
-
/>
|
|
546
|
-
|
|
547
|
-
<ngt-ambient-light [intensity]="0.5" />
|
|
548
|
-
<ngt-point-light [position]="10" [intensity]="0.5" />
|
|
549
|
-
</ngt-group>
|
|
550
|
-
`, isInline: true, dependencies: [{ kind: "component", type: NgtsGizmoViewcubeEdgeCube, selector: "ngts-gizmo-viewcube-edge-cube", inputs: ["dimensions", "position"] }, { kind: "component", type: NgtsGizmoViewcubeFaceCube, selector: "ngts-gizmo-viewcube-face-cube" }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] }); }
|
|
551
|
-
}
|
|
552
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtsGizmoViewcube, decorators: [{
|
|
553
|
-
type: Component,
|
|
554
|
-
args: [{
|
|
555
|
-
selector: 'ngts-gizmo-viewcube',
|
|
556
|
-
standalone: true,
|
|
557
|
-
template: `
|
|
558
|
-
<ngt-group [scale]="60">
|
|
559
|
-
<ngts-gizmo-viewcube-face-cube />
|
|
560
|
-
|
|
561
|
-
<ngts-gizmo-viewcube-edge-cube
|
|
562
|
-
*ngFor="let edge of edges; let i = index"
|
|
563
|
-
[position]="edge"
|
|
564
|
-
[dimensions]="edgeDimensions[i]"
|
|
565
|
-
/>
|
|
566
|
-
|
|
567
|
-
<ngts-gizmo-viewcube-edge-cube
|
|
568
|
-
*ngFor="let corner of corners"
|
|
569
|
-
[position]="corner"
|
|
570
|
-
[dimensions]="cornerDimensions"
|
|
571
|
-
/>
|
|
572
|
-
|
|
573
|
-
<ngt-ambient-light [intensity]="0.5" />
|
|
574
|
-
<ngt-point-light [position]="10" [intensity]="0.5" />
|
|
575
|
-
</ngt-group>
|
|
576
|
-
`,
|
|
577
|
-
imports: [NgtsGizmoViewcubeEdgeCube, NgtsGizmoViewcubeFaceCube, NgFor],
|
|
578
|
-
providers: [{ provide: NgtsGizmoViewcubeInput, useExisting: NgtsGizmoViewcube }],
|
|
579
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
580
|
-
}]
|
|
581
|
-
}] });
|
|
582
|
-
|
|
583
|
-
extend({ Group, Mesh, BoxGeometry, MeshBasicMaterial, Sprite, SpriteMaterial });
|
|
584
|
-
class NgtsGizmoViewportAxis {
|
|
585
|
-
constructor() {
|
|
586
|
-
this.inputs = signalStore({ scale: [0.8, 0.05, 0.05] });
|
|
587
|
-
this.rotation = this.inputs.select('rotation');
|
|
588
|
-
this.color = this.inputs.select('color');
|
|
589
|
-
this.scale = this.inputs.select('scale');
|
|
590
|
-
}
|
|
591
|
-
set _color(color) {
|
|
592
|
-
this.inputs.set({ color });
|
|
593
|
-
}
|
|
594
|
-
set _rotation(rotation) {
|
|
595
|
-
this.inputs.set({ rotation });
|
|
596
|
-
}
|
|
597
|
-
set _scale(scale) {
|
|
598
|
-
this.inputs.set({ scale });
|
|
599
|
-
}
|
|
600
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtsGizmoViewportAxis, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
601
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: NgtsGizmoViewportAxis, isStandalone: true, selector: "ngts-gizmo-viewport-axis", inputs: { _color: ["color", "_color"], _rotation: ["rotation", "_rotation"], _scale: ["scale", "_scale"] }, ngImport: i0, template: `
|
|
602
|
-
<ngt-group [rotation]="rotation()">
|
|
603
|
-
<ngt-mesh [position]="[0.4, 0, 0]">
|
|
604
|
-
<ngt-box-geometry *args="scale()" />
|
|
605
|
-
<ngt-mesh-basic-material [color]="color()" [toneMapped]="false" />
|
|
606
|
-
</ngt-mesh>
|
|
607
|
-
</ngt-group>
|
|
608
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }] }); }
|
|
609
|
-
}
|
|
610
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtsGizmoViewportAxis, decorators: [{
|
|
611
|
-
type: Component,
|
|
612
|
-
args: [{
|
|
613
|
-
selector: 'ngts-gizmo-viewport-axis',
|
|
614
|
-
standalone: true,
|
|
615
|
-
template: `
|
|
616
|
-
<ngt-group [rotation]="rotation()">
|
|
617
|
-
<ngt-mesh [position]="[0.4, 0, 0]">
|
|
618
|
-
<ngt-box-geometry *args="scale()" />
|
|
619
|
-
<ngt-mesh-basic-material [color]="color()" [toneMapped]="false" />
|
|
620
|
-
</ngt-mesh>
|
|
621
|
-
</ngt-group>
|
|
622
|
-
`,
|
|
623
|
-
imports: [NgtArgs],
|
|
624
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
625
|
-
}]
|
|
626
|
-
}], propDecorators: { _color: [{
|
|
627
|
-
type: Input,
|
|
628
|
-
args: [{ required: true, alias: 'color' }]
|
|
629
|
-
}], _rotation: [{
|
|
630
|
-
type: Input,
|
|
631
|
-
args: [{ required: true, alias: 'rotation' }]
|
|
632
|
-
}], _scale: [{
|
|
633
|
-
type: Input,
|
|
634
|
-
args: [{ alias: 'scale' }]
|
|
635
|
-
}] } });
|
|
636
|
-
class NgtsGizmoViewportAxisHead {
|
|
637
|
-
constructor() {
|
|
638
|
-
this.inputs = signalStore({ axisHeadScale: 1 });
|
|
639
|
-
this.document = inject(DOCUMENT);
|
|
640
|
-
this.store = injectNgtStore();
|
|
641
|
-
this.capabilities = this.store.select('gl', 'capabilities');
|
|
642
|
-
this.active = signal(false);
|
|
643
|
-
this.arcStyle = this.inputs.select('arcStyle');
|
|
644
|
-
this.labelColor = this.inputs.select('labelColor');
|
|
645
|
-
this.font = this.inputs.select('font');
|
|
646
|
-
this.axisHeadScale = this.inputs.select('axisHeadScale');
|
|
647
|
-
this.label = this.inputs.select('label');
|
|
648
|
-
this.texture = computed(() => {
|
|
649
|
-
const [arcStyle, labelColor, font, label] = [this.arcStyle(), this.labelColor(), this.font(), this.label()];
|
|
650
|
-
const canvas = this.document.createElement('canvas');
|
|
651
|
-
canvas.width = 64;
|
|
652
|
-
canvas.height = 64;
|
|
653
|
-
const context = canvas.getContext('2d');
|
|
654
|
-
context.beginPath();
|
|
655
|
-
context.arc(32, 32, 16, 0, 2 * Math.PI);
|
|
656
|
-
context.closePath();
|
|
657
|
-
context.fillStyle = arcStyle;
|
|
658
|
-
context.fill();
|
|
659
|
-
if (label) {
|
|
660
|
-
context.font = font;
|
|
661
|
-
context.textAlign = 'center';
|
|
662
|
-
context.fillStyle = labelColor;
|
|
663
|
-
context.fillText(label, 32, 41);
|
|
664
|
-
}
|
|
665
|
-
return new CanvasTexture(canvas);
|
|
666
|
-
});
|
|
667
|
-
this.scale = computed(() => {
|
|
668
|
-
const [active, axisHeadScale, label] = [this.active(), this.axisHeadScale(), this.label()];
|
|
669
|
-
return (label ? 1 : 0.75) * (active ? 1.2 : 1) * axisHeadScale;
|
|
670
|
-
});
|
|
671
|
-
}
|
|
672
|
-
set _arcStyle(arcStyle) {
|
|
673
|
-
this.inputs.set({ arcStyle });
|
|
674
|
-
}
|
|
675
|
-
set _label(label) {
|
|
676
|
-
this.inputs.set({ label });
|
|
677
|
-
}
|
|
678
|
-
set _labelColor(labelColor) {
|
|
679
|
-
this.inputs.set({ labelColor });
|
|
680
|
-
}
|
|
681
|
-
set _axisHeadScale(axisHeadScale) {
|
|
682
|
-
this.inputs.set({ axisHeadScale });
|
|
683
|
-
}
|
|
684
|
-
set _disabled(disabled) {
|
|
685
|
-
this.inputs.set({ disabled });
|
|
686
|
-
}
|
|
687
|
-
set _font(font) {
|
|
688
|
-
this.inputs.set({ font });
|
|
689
|
-
}
|
|
690
|
-
onPointerOver(event) {
|
|
691
|
-
if (!this.inputs.get('disabled')) {
|
|
692
|
-
event.stopPropagation();
|
|
693
|
-
this.active.set(true);
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
onPointerOut(event) {
|
|
697
|
-
if (!this.inputs.get('disabled')) {
|
|
698
|
-
if (this.viewportClickEmitter?.observed) {
|
|
699
|
-
this.viewportClickEmitter.emit(event);
|
|
700
|
-
}
|
|
701
|
-
else {
|
|
702
|
-
event.stopPropagation();
|
|
703
|
-
this.active.set(false);
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtsGizmoViewportAxisHead, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
708
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: NgtsGizmoViewportAxisHead, isStandalone: true, selector: "ngts-gizmo-viewport-axis-head", inputs: { _arcStyle: ["arcStyle", "_arcStyle"], _label: ["label", "_label"], _labelColor: ["labelColor", "_labelColor"], _axisHeadScale: ["axisHeadScale", "_axisHeadScale"], _disabled: ["disabled", "_disabled"], _font: ["font", "_font"], viewportClickEmitter: "viewportClickEmitter" }, ngImport: i0, template: `
|
|
709
|
-
<ngt-sprite
|
|
710
|
-
ngtCompound
|
|
711
|
-
[scale]="scale()"
|
|
712
|
-
(pointerover)="onPointerOver($event)"
|
|
713
|
-
(pointerout)="onPointerOut($event)"
|
|
714
|
-
>
|
|
715
|
-
<ngt-sprite-material
|
|
716
|
-
[map]="texture()"
|
|
717
|
-
[opacity]="label() ? 1 : 0.75"
|
|
718
|
-
[alphaTest]="0.3"
|
|
719
|
-
[toneMapped]="false"
|
|
720
|
-
>
|
|
721
|
-
<ngt-value [rawValue]="capabilities().getMaxAnisotropy() || 1" attach="map.anisotropy" />
|
|
722
|
-
</ngt-sprite-material>
|
|
723
|
-
</ngt-sprite>
|
|
724
|
-
`, isInline: true }); }
|
|
725
|
-
}
|
|
726
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtsGizmoViewportAxisHead, decorators: [{
|
|
727
|
-
type: Component,
|
|
728
|
-
args: [{
|
|
729
|
-
selector: 'ngts-gizmo-viewport-axis-head',
|
|
730
|
-
standalone: true,
|
|
731
|
-
template: `
|
|
732
|
-
<ngt-sprite
|
|
733
|
-
ngtCompound
|
|
734
|
-
[scale]="scale()"
|
|
735
|
-
(pointerover)="onPointerOver($event)"
|
|
736
|
-
(pointerout)="onPointerOut($event)"
|
|
737
|
-
>
|
|
738
|
-
<ngt-sprite-material
|
|
739
|
-
[map]="texture()"
|
|
740
|
-
[opacity]="label() ? 1 : 0.75"
|
|
741
|
-
[alphaTest]="0.3"
|
|
742
|
-
[toneMapped]="false"
|
|
743
|
-
>
|
|
744
|
-
<ngt-value [rawValue]="capabilities().getMaxAnisotropy() || 1" attach="map.anisotropy" />
|
|
745
|
-
</ngt-sprite-material>
|
|
746
|
-
</ngt-sprite>
|
|
747
|
-
`,
|
|
748
|
-
imports: [NgtArgs],
|
|
749
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
750
|
-
}]
|
|
751
|
-
}], propDecorators: { _arcStyle: [{
|
|
752
|
-
type: Input,
|
|
753
|
-
args: [{ alias: 'arcStyle' }]
|
|
754
|
-
}], _label: [{
|
|
755
|
-
type: Input,
|
|
756
|
-
args: [{ alias: 'label' }]
|
|
757
|
-
}], _labelColor: [{
|
|
758
|
-
type: Input,
|
|
759
|
-
args: [{ alias: 'labelColor' }]
|
|
760
|
-
}], _axisHeadScale: [{
|
|
761
|
-
type: Input,
|
|
762
|
-
args: [{ alias: 'axisHeadScale' }]
|
|
763
|
-
}], _disabled: [{
|
|
764
|
-
type: Input,
|
|
765
|
-
args: [{ alias: 'disabled' }]
|
|
766
|
-
}], _font: [{
|
|
767
|
-
type: Input,
|
|
768
|
-
args: [{ alias: 'font' }]
|
|
769
|
-
}], viewportClickEmitter: [{
|
|
770
|
-
type: Input
|
|
771
|
-
}] } });
|
|
772
|
-
|
|
773
|
-
extend({ Group, AmbientLight, PointLight });
|
|
774
|
-
class NgtsGizmoViewport {
|
|
775
|
-
constructor() {
|
|
776
|
-
this.inputs = signalStore({
|
|
777
|
-
font: '18px Inter var, Arial, sans-serif',
|
|
778
|
-
axisColors: ['#ff2060', '#20df80', '#2080ff'],
|
|
779
|
-
axisHeadScale: 1,
|
|
780
|
-
labels: ['X', 'Y', 'Z'],
|
|
781
|
-
labelColor: '#000',
|
|
782
|
-
});
|
|
783
|
-
this.gizmoApi = injectNgtsGizmoHelperApi();
|
|
784
|
-
this.Math = Math;
|
|
785
|
-
this.viewportClick = new EventEmitter();
|
|
786
|
-
this.axisColors = this.inputs.select('axisColors');
|
|
787
|
-
this.axisScale = this.inputs.select('axisScale');
|
|
788
|
-
this.labels = this.inputs.select('labels');
|
|
789
|
-
this.axisHeadScale = this.inputs.select('axisHeadScale');
|
|
790
|
-
this.labelColor = this.inputs.select('labelColor');
|
|
791
|
-
this.hideNegativeAxes = this.inputs.select('hideNegativeAxes');
|
|
792
|
-
this.hideAxisHeads = this.inputs.select('hideAxisHeads');
|
|
793
|
-
this.disabled = this.inputs.select('disabled');
|
|
794
|
-
this.font = this.inputs.select('font');
|
|
795
|
-
}
|
|
796
|
-
set _axisColors(axisColors) {
|
|
797
|
-
this.inputs.set({ axisColors });
|
|
798
|
-
}
|
|
799
|
-
set _axisScale(axisScale) {
|
|
800
|
-
this.inputs.set({ axisScale });
|
|
801
|
-
}
|
|
802
|
-
set _labels(labels) {
|
|
803
|
-
this.inputs.set({ labels });
|
|
804
|
-
}
|
|
805
|
-
set _axisHeadScale(axisHeadScale) {
|
|
806
|
-
this.inputs.set({ axisHeadScale });
|
|
807
|
-
}
|
|
808
|
-
set _labelColor(labelColor) {
|
|
809
|
-
this.inputs.set({ labelColor });
|
|
810
|
-
}
|
|
811
|
-
set _hideNegativeAxes(hideNegativeAxes) {
|
|
812
|
-
this.inputs.set({ hideNegativeAxes });
|
|
813
|
-
}
|
|
814
|
-
set _hideAxisHeads(hideAxisHeads) {
|
|
815
|
-
this.inputs.set({ hideAxisHeads });
|
|
816
|
-
}
|
|
817
|
-
set _disabled(disabled) {
|
|
818
|
-
this.inputs.set({ disabled });
|
|
819
|
-
}
|
|
820
|
-
set _font(font) {
|
|
821
|
-
this.inputs.set({ font });
|
|
822
|
-
}
|
|
823
|
-
onPointerDown(event) {
|
|
824
|
-
if (!this.inputs.get('disabled')) {
|
|
825
|
-
event.stopPropagation();
|
|
826
|
-
this.gizmoApi.tweenCamera(event.object.position);
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtsGizmoViewport, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
830
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: NgtsGizmoViewport, isStandalone: true, selector: "ngts-gizmo-viewport", inputs: { _axisColors: ["axisColors", "_axisColors"], _axisScale: ["axisScale", "_axisScale"], _labels: ["labels", "_labels"], _axisHeadScale: ["axisHeadScale", "_axisHeadScale"], _labelColor: ["labelColor", "_labelColor"], _hideNegativeAxes: ["hideNegativeAxes", "_hideNegativeAxes"], _hideAxisHeads: ["hideAxisHeads", "_hideAxisHeads"], _disabled: ["disabled", "_disabled"], _font: ["font", "_font"] }, outputs: { viewportClick: "viewportClick" }, ngImport: i0, template: `
|
|
831
|
-
<ngt-group ngtCompound [scale]="40">
|
|
832
|
-
<ngts-gizmo-viewport-axis [color]="axisColors()[0]" [rotation]="[0, 0, 0]" [scale]="axisScale()" />
|
|
833
|
-
<ngts-gizmo-viewport-axis
|
|
834
|
-
[color]="axisColors()[1]"
|
|
835
|
-
[rotation]="[0, 0, Math.PI / 2]"
|
|
836
|
-
[scale]="axisScale()"
|
|
837
|
-
/>
|
|
838
|
-
<ngts-gizmo-viewport-axis
|
|
839
|
-
[color]="axisColors()[2]"
|
|
840
|
-
[rotation]="[0, -Math.PI / 2, 0]"
|
|
841
|
-
[scale]="axisScale()"
|
|
842
|
-
/>
|
|
843
|
-
<ng-container *ngIf="!hideAxisHeads()">
|
|
844
|
-
<ngts-gizmo-viewport-axis-head
|
|
845
|
-
[arcStyle]="axisColors()[0]"
|
|
846
|
-
[position]="[1, 0, 0]"
|
|
847
|
-
[label]="labels()[0]"
|
|
848
|
-
[font]="font()"
|
|
849
|
-
[disabled]="disabled()"
|
|
850
|
-
[labelColor]="labelColor()"
|
|
851
|
-
[viewportClickEmitter]="viewportClick"
|
|
852
|
-
[axisHeadScale]="axisHeadScale()"
|
|
853
|
-
(pointerdown)="onPointerDown($any($event))"
|
|
854
|
-
/>
|
|
855
|
-
<ngts-gizmo-viewport-axis-head
|
|
856
|
-
[arcStyle]="axisColors()[1]"
|
|
857
|
-
[position]="[0, 1, 0]"
|
|
858
|
-
[label]="labels()[1]"
|
|
859
|
-
[font]="font()"
|
|
860
|
-
[disabled]="disabled()"
|
|
861
|
-
[labelColor]="labelColor()"
|
|
862
|
-
[viewportClickEmitter]="viewportClick"
|
|
863
|
-
[axisHeadScale]="axisHeadScale()"
|
|
864
|
-
(pointerdown)="onPointerDown($any($event))"
|
|
865
|
-
/>
|
|
866
|
-
<ngts-gizmo-viewport-axis-head
|
|
867
|
-
[arcStyle]="axisColors()[2]"
|
|
868
|
-
[position]="[0, 0, 1]"
|
|
869
|
-
[label]="labels()[2]"
|
|
870
|
-
[font]="font()"
|
|
871
|
-
[disabled]="disabled()"
|
|
872
|
-
[labelColor]="labelColor()"
|
|
873
|
-
[viewportClickEmitter]="viewportClick"
|
|
874
|
-
[axisHeadScale]="axisHeadScale()"
|
|
875
|
-
(pointerdown)="onPointerDown($any($event))"
|
|
876
|
-
/>
|
|
877
|
-
<ng-container *ngIf="!hideNegativeAxes()">
|
|
878
|
-
<ngts-gizmo-viewport-axis-head
|
|
879
|
-
[arcStyle]="axisColors()[0]"
|
|
880
|
-
[position]="[-1, 0, 0]"
|
|
881
|
-
[font]="font()"
|
|
882
|
-
[disabled]="disabled()"
|
|
883
|
-
[labelColor]="labelColor()"
|
|
884
|
-
[viewportClickEmitter]="viewportClick"
|
|
885
|
-
[axisHeadScale]="axisHeadScale()"
|
|
886
|
-
(pointerdown)="onPointerDown($any($event))"
|
|
887
|
-
/>
|
|
888
|
-
<ngts-gizmo-viewport-axis-head
|
|
889
|
-
[arcStyle]="axisColors()[1]"
|
|
890
|
-
[position]="[0, -1, 0]"
|
|
891
|
-
[font]="font()"
|
|
892
|
-
[disabled]="disabled()"
|
|
893
|
-
[labelColor]="labelColor()"
|
|
894
|
-
[viewportClickEmitter]="viewportClick"
|
|
895
|
-
[axisHeadScale]="axisHeadScale()"
|
|
896
|
-
(pointerdown)="onPointerDown($any($event))"
|
|
897
|
-
/>
|
|
898
|
-
<ngts-gizmo-viewport-axis-head
|
|
899
|
-
[arcStyle]="axisColors()[2]"
|
|
900
|
-
[position]="[0, 0, -1]"
|
|
901
|
-
[font]="font()"
|
|
902
|
-
[disabled]="disabled()"
|
|
903
|
-
[labelColor]="labelColor()"
|
|
904
|
-
[viewportClickEmitter]="viewportClick"
|
|
905
|
-
[axisHeadScale]="axisHeadScale()"
|
|
906
|
-
(pointerdown)="onPointerDown($any($event))"
|
|
907
|
-
/>
|
|
908
|
-
</ng-container>
|
|
909
|
-
</ng-container>
|
|
910
|
-
<ngt-ambient-light [intensity]="0.5"></ngt-ambient-light>
|
|
911
|
-
<ngt-point-light [position]="10" [intensity]="0.5"></ngt-point-light>
|
|
912
|
-
</ngt-group>
|
|
913
|
-
`, isInline: true, dependencies: [{ kind: "component", type: NgtsGizmoViewportAxis, selector: "ngts-gizmo-viewport-axis", inputs: ["color", "rotation", "scale"] }, { kind: "component", type: NgtsGizmoViewportAxisHead, selector: "ngts-gizmo-viewport-axis-head", inputs: ["arcStyle", "label", "labelColor", "axisHeadScale", "disabled", "font", "viewportClickEmitter"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
914
|
-
}
|
|
915
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtsGizmoViewport, decorators: [{
|
|
916
|
-
type: Component,
|
|
917
|
-
args: [{
|
|
918
|
-
selector: 'ngts-gizmo-viewport',
|
|
919
|
-
standalone: true,
|
|
920
|
-
template: `
|
|
921
|
-
<ngt-group ngtCompound [scale]="40">
|
|
922
|
-
<ngts-gizmo-viewport-axis [color]="axisColors()[0]" [rotation]="[0, 0, 0]" [scale]="axisScale()" />
|
|
923
|
-
<ngts-gizmo-viewport-axis
|
|
924
|
-
[color]="axisColors()[1]"
|
|
925
|
-
[rotation]="[0, 0, Math.PI / 2]"
|
|
926
|
-
[scale]="axisScale()"
|
|
927
|
-
/>
|
|
928
|
-
<ngts-gizmo-viewport-axis
|
|
929
|
-
[color]="axisColors()[2]"
|
|
930
|
-
[rotation]="[0, -Math.PI / 2, 0]"
|
|
931
|
-
[scale]="axisScale()"
|
|
932
|
-
/>
|
|
933
|
-
<ng-container *ngIf="!hideAxisHeads()">
|
|
934
|
-
<ngts-gizmo-viewport-axis-head
|
|
935
|
-
[arcStyle]="axisColors()[0]"
|
|
936
|
-
[position]="[1, 0, 0]"
|
|
937
|
-
[label]="labels()[0]"
|
|
938
|
-
[font]="font()"
|
|
939
|
-
[disabled]="disabled()"
|
|
940
|
-
[labelColor]="labelColor()"
|
|
941
|
-
[viewportClickEmitter]="viewportClick"
|
|
942
|
-
[axisHeadScale]="axisHeadScale()"
|
|
943
|
-
(pointerdown)="onPointerDown($any($event))"
|
|
944
|
-
/>
|
|
945
|
-
<ngts-gizmo-viewport-axis-head
|
|
946
|
-
[arcStyle]="axisColors()[1]"
|
|
947
|
-
[position]="[0, 1, 0]"
|
|
948
|
-
[label]="labels()[1]"
|
|
949
|
-
[font]="font()"
|
|
950
|
-
[disabled]="disabled()"
|
|
951
|
-
[labelColor]="labelColor()"
|
|
952
|
-
[viewportClickEmitter]="viewportClick"
|
|
953
|
-
[axisHeadScale]="axisHeadScale()"
|
|
954
|
-
(pointerdown)="onPointerDown($any($event))"
|
|
955
|
-
/>
|
|
956
|
-
<ngts-gizmo-viewport-axis-head
|
|
957
|
-
[arcStyle]="axisColors()[2]"
|
|
958
|
-
[position]="[0, 0, 1]"
|
|
959
|
-
[label]="labels()[2]"
|
|
960
|
-
[font]="font()"
|
|
961
|
-
[disabled]="disabled()"
|
|
962
|
-
[labelColor]="labelColor()"
|
|
963
|
-
[viewportClickEmitter]="viewportClick"
|
|
964
|
-
[axisHeadScale]="axisHeadScale()"
|
|
965
|
-
(pointerdown)="onPointerDown($any($event))"
|
|
966
|
-
/>
|
|
967
|
-
<ng-container *ngIf="!hideNegativeAxes()">
|
|
968
|
-
<ngts-gizmo-viewport-axis-head
|
|
969
|
-
[arcStyle]="axisColors()[0]"
|
|
970
|
-
[position]="[-1, 0, 0]"
|
|
971
|
-
[font]="font()"
|
|
972
|
-
[disabled]="disabled()"
|
|
973
|
-
[labelColor]="labelColor()"
|
|
974
|
-
[viewportClickEmitter]="viewportClick"
|
|
975
|
-
[axisHeadScale]="axisHeadScale()"
|
|
976
|
-
(pointerdown)="onPointerDown($any($event))"
|
|
977
|
-
/>
|
|
978
|
-
<ngts-gizmo-viewport-axis-head
|
|
979
|
-
[arcStyle]="axisColors()[1]"
|
|
980
|
-
[position]="[0, -1, 0]"
|
|
981
|
-
[font]="font()"
|
|
982
|
-
[disabled]="disabled()"
|
|
983
|
-
[labelColor]="labelColor()"
|
|
984
|
-
[viewportClickEmitter]="viewportClick"
|
|
985
|
-
[axisHeadScale]="axisHeadScale()"
|
|
986
|
-
(pointerdown)="onPointerDown($any($event))"
|
|
987
|
-
/>
|
|
988
|
-
<ngts-gizmo-viewport-axis-head
|
|
989
|
-
[arcStyle]="axisColors()[2]"
|
|
990
|
-
[position]="[0, 0, -1]"
|
|
991
|
-
[font]="font()"
|
|
992
|
-
[disabled]="disabled()"
|
|
993
|
-
[labelColor]="labelColor()"
|
|
994
|
-
[viewportClickEmitter]="viewportClick"
|
|
995
|
-
[axisHeadScale]="axisHeadScale()"
|
|
996
|
-
(pointerdown)="onPointerDown($any($event))"
|
|
997
|
-
/>
|
|
998
|
-
</ng-container>
|
|
999
|
-
</ng-container>
|
|
1000
|
-
<ngt-ambient-light [intensity]="0.5"></ngt-ambient-light>
|
|
1001
|
-
<ngt-point-light [position]="10" [intensity]="0.5"></ngt-point-light>
|
|
1002
|
-
</ngt-group>
|
|
1003
|
-
`,
|
|
1004
|
-
imports: [NgtsGizmoViewportAxis, NgtsGizmoViewportAxisHead, NgIf],
|
|
1005
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
1006
|
-
}]
|
|
1007
|
-
}], propDecorators: { _axisColors: [{
|
|
1008
|
-
type: Input,
|
|
1009
|
-
args: [{ alias: 'axisColors' }]
|
|
1010
|
-
}], _axisScale: [{
|
|
1011
|
-
type: Input,
|
|
1012
|
-
args: [{ alias: 'axisScale' }]
|
|
1013
|
-
}], _labels: [{
|
|
1014
|
-
type: Input,
|
|
1015
|
-
args: [{ alias: 'labels' }]
|
|
1016
|
-
}], _axisHeadScale: [{
|
|
1017
|
-
type: Input,
|
|
1018
|
-
args: [{ alias: 'axisHeadScale' }]
|
|
1019
|
-
}], _labelColor: [{
|
|
1020
|
-
type: Input,
|
|
1021
|
-
args: [{ alias: 'labelColor' }]
|
|
1022
|
-
}], _hideNegativeAxes: [{
|
|
1023
|
-
type: Input,
|
|
1024
|
-
args: [{ alias: 'hideNegativeAxes' }]
|
|
1025
|
-
}], _hideAxisHeads: [{
|
|
1026
|
-
type: Input,
|
|
1027
|
-
args: [{ alias: 'hideAxisHeads' }]
|
|
1028
|
-
}], _disabled: [{
|
|
1029
|
-
type: Input,
|
|
1030
|
-
args: [{ alias: 'disabled' }]
|
|
1031
|
-
}], _font: [{
|
|
1032
|
-
type: Input,
|
|
1033
|
-
args: [{ alias: 'font' }]
|
|
1034
|
-
}], viewportClick: [{
|
|
1035
|
-
type: Output
|
|
1036
|
-
}] } });
|
|
1037
|
-
|
|
1038
|
-
/**
|
|
1039
|
-
* Generated bundle index. Do not edit.
|
|
1040
|
-
*/
|
|
1041
|
-
|
|
1042
|
-
export { NgtsGizmoHelper, NgtsGizmoViewcube, NgtsGizmoViewport, injectNgtsGizmoHelperApi, provideNgtsGizmoHelperApi };
|
|
1043
|
-
//# sourceMappingURL=angular-three-soba-gizmos.mjs.map
|