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,394 +1,347 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { Directive, computed, untracked, input, viewChild, contentChild, TemplateRef, Component, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, afterNextRender } from '@angular/core';
|
|
3
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
4
|
+
import { injectStore, merge, pick, omit, extend, injectBeforeRender, NgtArgs } from 'angular-three';
|
|
5
|
+
import { assertInjector } from 'ngxtension/assert-injector';
|
|
6
|
+
import { injectAutoEffect } from 'ngxtension/auto-effect';
|
|
7
|
+
import { mergeInputs } from 'ngxtension/inject-inputs';
|
|
8
|
+
import { WebGLCubeRenderTarget, HalfFloatType, CubeCamera, Group, OrthographicCamera, PerspectiveCamera } from 'three';
|
|
9
|
+
import { injectFBO } from 'angular-three-soba/misc';
|
|
8
10
|
|
|
9
11
|
class NgtsCameraContent {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.template = inject(TemplateRef);
|
|
12
|
-
this.ngtsCameraContent = '';
|
|
13
|
-
}
|
|
14
12
|
static ngTemplateContextGuard(_, ctx) {
|
|
15
13
|
return true;
|
|
16
14
|
}
|
|
17
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
18
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
15
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgtsCameraContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
16
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.0", type: NgtsCameraContent, isStandalone: true, selector: "ng-template[cameraContent]", ngImport: i0 }); }
|
|
19
17
|
}
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgtsCameraContent, decorators: [{
|
|
21
19
|
type: Directive,
|
|
22
|
-
args: [{ selector: 'ng-template[
|
|
23
|
-
}]
|
|
24
|
-
type: Input
|
|
25
|
-
}] } });
|
|
20
|
+
args: [{ standalone: true, selector: 'ng-template[cameraContent]' }]
|
|
21
|
+
}] });
|
|
26
22
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return
|
|
23
|
+
function injectCubeCamera(options, { injector } = {}) {
|
|
24
|
+
return assertInjector(injectCubeCamera, injector, () => {
|
|
25
|
+
const autoEffect = injectAutoEffect();
|
|
26
|
+
const store = injectStore();
|
|
27
|
+
const gl = store.select('gl');
|
|
28
|
+
const scene = store.select('scene');
|
|
29
|
+
// backfill the options with default values
|
|
30
|
+
const mergedOptions = merge(options, { resolution: 256, near: 0.1, far: 1000 }, 'backfill');
|
|
31
|
+
const resolution = pick(mergedOptions, 'resolution');
|
|
32
|
+
const near = pick(mergedOptions, 'near');
|
|
33
|
+
const far = pick(mergedOptions, 'far');
|
|
34
|
+
const fbo = computed(() => {
|
|
35
|
+
const fbo = new WebGLCubeRenderTarget(resolution());
|
|
36
|
+
fbo.texture.type = HalfFloatType;
|
|
37
|
+
return fbo;
|
|
38
|
+
});
|
|
39
|
+
autoEffect(() => {
|
|
40
|
+
const _fbo = fbo();
|
|
41
|
+
return () => {
|
|
42
|
+
_fbo.dispose();
|
|
43
|
+
};
|
|
46
44
|
});
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
onCleanup(() => fbo.dispose());
|
|
45
|
+
const camera = computed(() => {
|
|
46
|
+
return new CubeCamera(near(), far(), fbo());
|
|
50
47
|
});
|
|
51
|
-
const _camera = computed(() => new THREE.CubeCamera(near(), far(), _fbo()));
|
|
52
|
-
let originalFog;
|
|
53
|
-
let originalBackground;
|
|
54
48
|
const update = computed(() => {
|
|
55
|
-
const [
|
|
49
|
+
const [_scene, _gl, _camera, { envMap, fog }] = [scene(), gl(), camera(), untracked(mergedOptions)];
|
|
50
|
+
let originalFog;
|
|
51
|
+
let originalBackground;
|
|
56
52
|
return () => {
|
|
57
|
-
originalFog =
|
|
58
|
-
originalBackground =
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
53
|
+
originalFog = _scene.fog;
|
|
54
|
+
originalBackground = _scene.background;
|
|
55
|
+
_scene.background = envMap || originalBackground;
|
|
56
|
+
_scene.fog = fog || originalFog;
|
|
57
|
+
_camera.update(_gl, _scene);
|
|
58
|
+
_scene.fog = originalFog;
|
|
59
|
+
_scene.background = originalBackground;
|
|
64
60
|
};
|
|
65
61
|
});
|
|
66
|
-
return { fbo
|
|
62
|
+
return { fbo, camera, update };
|
|
67
63
|
});
|
|
68
64
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.2", type: NgtsCubeCameraContent, isStandalone: true, selector: "ng-template[ngtsCubeCameraContent]", ngImport: i0 }); }
|
|
76
|
-
}
|
|
77
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtsCubeCameraContent, decorators: [{
|
|
78
|
-
type: Directive,
|
|
79
|
-
args: [{ selector: 'ng-template[ngtsCubeCameraContent]', standalone: true }]
|
|
80
|
-
}] });
|
|
65
|
+
const defaultOptions$2 = {
|
|
66
|
+
frames: Infinity,
|
|
67
|
+
resolution: 256,
|
|
68
|
+
near: 0.1,
|
|
69
|
+
far: 1000,
|
|
70
|
+
};
|
|
81
71
|
class NgtsCubeCamera {
|
|
82
|
-
/** Resolution of the FBO, 256 */
|
|
83
|
-
set _resolution(resolution) {
|
|
84
|
-
this.inputs.set({ resolution });
|
|
85
|
-
}
|
|
86
|
-
/** Camera near, 0.1 */
|
|
87
|
-
set _near(near) {
|
|
88
|
-
this.inputs.set({ near });
|
|
89
|
-
}
|
|
90
|
-
/** Camera far, 1000 */
|
|
91
|
-
set _far(far) {
|
|
92
|
-
this.inputs.set({ far });
|
|
93
|
-
}
|
|
94
|
-
/** Custom environment map that is temporarily set as the scenes background */
|
|
95
|
-
set _envMap(envMap) {
|
|
96
|
-
this.inputs.set({ envMap });
|
|
97
|
-
}
|
|
98
|
-
/** Custom fog that is temporarily set as the scenes fog */
|
|
99
|
-
set _fog(fog) {
|
|
100
|
-
this.inputs.set({ fog });
|
|
101
|
-
}
|
|
102
72
|
constructor() {
|
|
103
|
-
this.
|
|
104
|
-
this.
|
|
105
|
-
this.cubeCamera =
|
|
106
|
-
this.
|
|
107
|
-
this.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
ngOnInit() {
|
|
113
|
-
this.contentRef = this.anchor.createEmbeddedView(this.cameraContent, { texture: this.texture });
|
|
114
|
-
}
|
|
115
|
-
beforeRender() {
|
|
73
|
+
this.options = input(defaultOptions$2, { transform: mergeInputs(defaultOptions$2) });
|
|
74
|
+
this.parameters = omit(this.options, ['fog', 'near', 'far', 'envMap', 'resolution', 'frames']);
|
|
75
|
+
this.cubeCamera = injectCubeCamera(pick(this.options, ['near', 'far', 'envMap', 'fog', 'resolution']));
|
|
76
|
+
this.camera = this.cubeCamera.camera;
|
|
77
|
+
this.texture = pick(this.cubeCamera.fbo, 'texture');
|
|
78
|
+
this.group = viewChild.required('group');
|
|
79
|
+
this.cameraContent = contentChild(NgtsCameraContent, { read: TemplateRef });
|
|
80
|
+
extend({ Group });
|
|
116
81
|
let count = 0;
|
|
117
82
|
injectBeforeRender(() => {
|
|
118
|
-
const
|
|
119
|
-
if (!
|
|
83
|
+
const group = this.group().nativeElement;
|
|
84
|
+
if (!group)
|
|
120
85
|
return;
|
|
86
|
+
const frames = this.options().frames;
|
|
121
87
|
const update = this.cubeCamera.update();
|
|
122
|
-
const frames = this.inputs.get('frames');
|
|
123
88
|
if (frames === Infinity || count < frames) {
|
|
124
|
-
|
|
89
|
+
group.visible = false;
|
|
125
90
|
update();
|
|
126
|
-
|
|
91
|
+
group.visible = true;
|
|
127
92
|
count++;
|
|
128
93
|
}
|
|
129
94
|
});
|
|
130
95
|
}
|
|
131
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
132
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
133
|
-
<ngt-group
|
|
134
|
-
<ngt-primitive *args="[
|
|
135
|
-
<ngt-group
|
|
136
|
-
<ng-container
|
|
96
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgtsCubeCamera, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
97
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.1.0", type: NgtsCubeCamera, isStandalone: true, selector: "ngts-cube-camera", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "cameraContent", first: true, predicate: NgtsCameraContent, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "group", first: true, predicate: ["group"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
98
|
+
<ngt-group [parameters]="parameters()">
|
|
99
|
+
<ngt-primitive *args="[camera()]" />
|
|
100
|
+
<ngt-group #group>
|
|
101
|
+
<ng-container [ngTemplateOutlet]="cameraContent() ?? null" [ngTemplateOutletContext]="{ $implicit: texture }" />
|
|
137
102
|
</ngt-group>
|
|
138
103
|
</ngt-group>
|
|
139
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }] }); }
|
|
104
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
140
105
|
}
|
|
141
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgtsCubeCamera, decorators: [{
|
|
142
107
|
type: Component,
|
|
143
108
|
args: [{
|
|
144
109
|
selector: 'ngts-cube-camera',
|
|
145
110
|
standalone: true,
|
|
146
111
|
template: `
|
|
147
|
-
<ngt-group
|
|
148
|
-
<ngt-primitive *args="[
|
|
149
|
-
<ngt-group
|
|
150
|
-
<ng-container
|
|
112
|
+
<ngt-group [parameters]="parameters()">
|
|
113
|
+
<ngt-primitive *args="[camera()]" />
|
|
114
|
+
<ngt-group #group>
|
|
115
|
+
<ng-container [ngTemplateOutlet]="cameraContent() ?? null" [ngTemplateOutletContext]="{ $implicit: texture }" />
|
|
151
116
|
</ngt-group>
|
|
152
117
|
</ngt-group>
|
|
153
118
|
`,
|
|
154
119
|
imports: [NgtArgs, NgTemplateOutlet],
|
|
155
120
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
121
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
156
122
|
}]
|
|
157
|
-
}], ctorParameters:
|
|
158
|
-
type: Input
|
|
159
|
-
}], cameraContent: [{
|
|
160
|
-
type: ContentChild,
|
|
161
|
-
args: [NgtsCubeCameraContent, { static: true, read: TemplateRef }]
|
|
162
|
-
}], anchor: [{
|
|
163
|
-
type: ViewChild,
|
|
164
|
-
args: ['anchor', { static: true, read: ViewContainerRef }]
|
|
165
|
-
}], _resolution: [{
|
|
166
|
-
type: Input,
|
|
167
|
-
args: [{ alias: 'resolution' }]
|
|
168
|
-
}], _near: [{
|
|
169
|
-
type: Input,
|
|
170
|
-
args: [{ alias: 'near' }]
|
|
171
|
-
}], _far: [{
|
|
172
|
-
type: Input,
|
|
173
|
-
args: [{ alias: 'far' }]
|
|
174
|
-
}], _envMap: [{
|
|
175
|
-
type: Input,
|
|
176
|
-
args: [{ alias: 'envMap' }]
|
|
177
|
-
}], _fog: [{
|
|
178
|
-
type: Input,
|
|
179
|
-
args: [{ alias: 'fog' }]
|
|
180
|
-
}] } });
|
|
123
|
+
}], ctorParameters: () => [] });
|
|
181
124
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
this.inputs.set({ frames });
|
|
191
|
-
}
|
|
192
|
-
set _resolution(resolution) {
|
|
193
|
-
this.inputs.set({ resolution });
|
|
194
|
-
}
|
|
195
|
-
set _envMap(envMap) {
|
|
196
|
-
this.inputs.set({ envMap });
|
|
197
|
-
}
|
|
125
|
+
extend({ OrthographicCamera, Group });
|
|
126
|
+
const defaultOptions$1 = {
|
|
127
|
+
frames: Infinity,
|
|
128
|
+
resolution: 256,
|
|
129
|
+
makeDefault: false,
|
|
130
|
+
manual: false,
|
|
131
|
+
};
|
|
132
|
+
class NgtsOrthographicCamera {
|
|
198
133
|
constructor() {
|
|
199
|
-
this.
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
makeDefault
|
|
203
|
-
manual
|
|
134
|
+
this.options = input(defaultOptions$1, { transform: mergeInputs(defaultOptions$1) });
|
|
135
|
+
this.parameters = omit(this.options, [
|
|
136
|
+
'envMap',
|
|
137
|
+
'makeDefault',
|
|
138
|
+
'manual',
|
|
139
|
+
'frames',
|
|
140
|
+
'resolution',
|
|
141
|
+
'left',
|
|
142
|
+
'top',
|
|
143
|
+
'bottom',
|
|
144
|
+
'right',
|
|
145
|
+
]);
|
|
146
|
+
this.content = contentChild(TemplateRef);
|
|
147
|
+
this.cameraContent = contentChild(NgtsCameraContent, { read: TemplateRef });
|
|
148
|
+
this.cameraRef = viewChild.required('camera');
|
|
149
|
+
this.groupRef = viewChild.required('group');
|
|
150
|
+
this.autoEffect = injectAutoEffect();
|
|
151
|
+
this.store = injectStore();
|
|
152
|
+
this.camera = this.store.select('camera');
|
|
153
|
+
this.size = this.store.select('size');
|
|
154
|
+
this.left = computed(() => this.options().left ?? this.size().width / -2);
|
|
155
|
+
this.right = computed(() => this.options().right ?? this.size().width / 2);
|
|
156
|
+
this.top = computed(() => this.options().top ?? this.size().height / 2);
|
|
157
|
+
this.bottom = computed(() => this.options().bottom ?? this.size().height / -2);
|
|
158
|
+
this.manual = pick(this.options, 'manual');
|
|
159
|
+
this.makeDefault = pick(this.options, 'makeDefault');
|
|
160
|
+
this.resolution = pick(this.options, 'resolution');
|
|
161
|
+
this.fbo = injectFBO(() => ({ width: this.resolution() }));
|
|
162
|
+
this.texture = pick(this.fbo, 'texture');
|
|
163
|
+
afterNextRender(() => {
|
|
164
|
+
this.autoEffect(() => {
|
|
165
|
+
if (!this.manual()) {
|
|
166
|
+
this.cameraRef().nativeElement.updateProjectionMatrix();
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
this.autoEffect(() => {
|
|
170
|
+
if (this.makeDefault()) {
|
|
171
|
+
const oldCam = untracked(this.camera);
|
|
172
|
+
this.store.update({ camera: this.cameraRef().nativeElement });
|
|
173
|
+
return () => this.store.update(() => ({ camera: oldCam }));
|
|
174
|
+
}
|
|
175
|
+
return;
|
|
176
|
+
});
|
|
177
|
+
this.cameraRef().nativeElement.updateProjectionMatrix();
|
|
204
178
|
});
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
179
|
+
let count = 0;
|
|
180
|
+
let oldEnvMap = null;
|
|
181
|
+
injectBeforeRender(({ gl, scene }) => {
|
|
182
|
+
const [{ frames, envMap }, group, camera, fbo] = [
|
|
183
|
+
this.options(),
|
|
184
|
+
this.groupRef().nativeElement,
|
|
185
|
+
this.cameraRef().nativeElement,
|
|
186
|
+
this.fbo(),
|
|
187
|
+
];
|
|
188
|
+
if (this.cameraContent() && group && camera && fbo && (frames === Infinity || count < frames)) {
|
|
189
|
+
group.visible = false;
|
|
190
|
+
gl.setRenderTarget(fbo);
|
|
191
|
+
oldEnvMap = scene.background;
|
|
192
|
+
if (envMap)
|
|
193
|
+
scene.background = envMap;
|
|
194
|
+
gl.render(scene, camera);
|
|
195
|
+
scene.background = oldEnvMap;
|
|
196
|
+
gl.setRenderTarget(null);
|
|
197
|
+
group.visible = true;
|
|
198
|
+
count++;
|
|
220
199
|
}
|
|
221
200
|
});
|
|
222
201
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
effect(() => {
|
|
226
|
-
const camera = this.cameraRef.nativeElement;
|
|
227
|
-
if (!manual() && camera)
|
|
228
|
-
camera.updateProjectionMatrix();
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtsCamera, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
232
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.2", type: NgtsCamera, inputs: { _makeDefault: ["makeDefault", "_makeDefault"], _manual: ["manual", "_manual"], _frames: ["frames", "_frames"], _resolution: ["resolution", "_resolution"], _envMap: ["envMap", "_envMap"], cameraRef: "cameraRef" }, ngImport: i0 }); }
|
|
233
|
-
}
|
|
234
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtsCamera, decorators: [{
|
|
235
|
-
type: Directive
|
|
236
|
-
}], ctorParameters: function () { return []; }, propDecorators: { _makeDefault: [{
|
|
237
|
-
type: Input,
|
|
238
|
-
args: [{ alias: 'makeDefault' }]
|
|
239
|
-
}], _manual: [{
|
|
240
|
-
type: Input,
|
|
241
|
-
args: [{ alias: 'manual' }]
|
|
242
|
-
}], _frames: [{
|
|
243
|
-
type: Input,
|
|
244
|
-
args: [{ alias: 'frames' }]
|
|
245
|
-
}], _resolution: [{
|
|
246
|
-
type: Input,
|
|
247
|
-
args: [{ alias: 'resolution' }]
|
|
248
|
-
}], _envMap: [{
|
|
249
|
-
type: Input,
|
|
250
|
-
args: [{ alias: 'envMap' }]
|
|
251
|
-
}], cameraRef: [{
|
|
252
|
-
type: Input
|
|
253
|
-
}] } });
|
|
254
|
-
|
|
255
|
-
extend({ OrthographicCamera, Group });
|
|
256
|
-
class NgtsOrthographicCamera extends NgtsCamera {
|
|
257
|
-
constructor() {
|
|
258
|
-
super(...arguments);
|
|
259
|
-
this.orthographicInputs = signalStore({
|
|
260
|
-
left: 0,
|
|
261
|
-
right: 0,
|
|
262
|
-
top: 0,
|
|
263
|
-
bottom: 0,
|
|
264
|
-
});
|
|
265
|
-
this.left = this.orthographicInputs.select('left');
|
|
266
|
-
this.right = this.orthographicInputs.select('right');
|
|
267
|
-
this.top = this.orthographicInputs.select('top');
|
|
268
|
-
this.bottom = this.orthographicInputs.select('bottom');
|
|
269
|
-
this.size = this.store.select('size');
|
|
270
|
-
this.cameraLeft = computed(() => this.left() || this.size().width / -2);
|
|
271
|
-
this.cameraRight = computed(() => this.right() || this.size().width / 2);
|
|
272
|
-
this.cameraTop = computed(() => this.top() || this.size().height / 2);
|
|
273
|
-
this.cameraBottom = computed(() => this.bottom() || this.size().height / -2);
|
|
274
|
-
}
|
|
275
|
-
set _left(left) {
|
|
276
|
-
this.orthographicInputs.set({ left });
|
|
277
|
-
}
|
|
278
|
-
set _right(right) {
|
|
279
|
-
this.orthographicInputs.set({ right });
|
|
280
|
-
}
|
|
281
|
-
set _top(top) {
|
|
282
|
-
this.orthographicInputs.set({ top });
|
|
283
|
-
}
|
|
284
|
-
set _bottom(bottom) {
|
|
285
|
-
this.orthographicInputs.set({ bottom });
|
|
286
|
-
}
|
|
287
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgtsOrthographicCamera, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
288
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: NgtsOrthographicCamera, isStandalone: true, selector: "ngts-orthographic-camera", inputs: { _left: ["left", "_left"], _right: ["right", "_right"], _top: ["top", "_top"], _bottom: ["bottom", "_bottom"] }, queries: [{ propertyName: "cameraContent", first: true, predicate: NgtsCameraContent, descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
202
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgtsOrthographicCamera, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
203
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.1.0", type: NgtsOrthographicCamera, isStandalone: true, selector: "ngts-orthographic-camera", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "content", first: true, predicate: TemplateRef, descendants: true, isSignal: true }, { propertyName: "cameraContent", first: true, predicate: NgtsCameraContent, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "cameraRef", first: true, predicate: ["camera"], descendants: true, isSignal: true }, { propertyName: "groupRef", first: true, predicate: ["group"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
289
204
|
<ngt-orthographic-camera
|
|
290
|
-
|
|
291
|
-
[
|
|
292
|
-
[
|
|
293
|
-
[
|
|
294
|
-
[
|
|
295
|
-
[
|
|
205
|
+
#camera
|
|
206
|
+
[left]="left()"
|
|
207
|
+
[right]="right()"
|
|
208
|
+
[top]="top()"
|
|
209
|
+
[bottom]="bottom()"
|
|
210
|
+
[parameters]="parameters()"
|
|
296
211
|
>
|
|
297
|
-
<ng-container
|
|
298
|
-
*ngIf="cameraContent && !cameraContent.ngtsCameraContent"
|
|
299
|
-
[ngTemplateOutlet]="cameraContent.template"
|
|
300
|
-
/>
|
|
212
|
+
<ng-container [ngTemplateOutlet]="content() ?? null" />
|
|
301
213
|
</ngt-orthographic-camera>
|
|
302
|
-
|
|
303
|
-
|
|
214
|
+
|
|
215
|
+
<ngt-group #group>
|
|
216
|
+
<ng-container [ngTemplateOutlet]="cameraContent() ?? null" [ngTemplateOutletContext]="{ $implicit: texture }" />
|
|
304
217
|
</ngt-group>
|
|
305
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
|
218
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
306
219
|
}
|
|
307
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
220
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgtsOrthographicCamera, decorators: [{
|
|
308
221
|
type: Component,
|
|
309
222
|
args: [{
|
|
310
223
|
selector: 'ngts-orthographic-camera',
|
|
311
224
|
standalone: true,
|
|
312
225
|
template: `
|
|
313
226
|
<ngt-orthographic-camera
|
|
314
|
-
|
|
315
|
-
[
|
|
316
|
-
[
|
|
317
|
-
[
|
|
318
|
-
[
|
|
319
|
-
[
|
|
227
|
+
#camera
|
|
228
|
+
[left]="left()"
|
|
229
|
+
[right]="right()"
|
|
230
|
+
[top]="top()"
|
|
231
|
+
[bottom]="bottom()"
|
|
232
|
+
[parameters]="parameters()"
|
|
320
233
|
>
|
|
321
|
-
<ng-container
|
|
322
|
-
*ngIf="cameraContent && !cameraContent.ngtsCameraContent"
|
|
323
|
-
[ngTemplateOutlet]="cameraContent.template"
|
|
324
|
-
/>
|
|
234
|
+
<ng-container [ngTemplateOutlet]="content() ?? null" />
|
|
325
235
|
</ngt-orthographic-camera>
|
|
326
|
-
|
|
327
|
-
|
|
236
|
+
|
|
237
|
+
<ngt-group #group>
|
|
238
|
+
<ng-container [ngTemplateOutlet]="cameraContent() ?? null" [ngTemplateOutletContext]="{ $implicit: texture }" />
|
|
328
239
|
</ngt-group>
|
|
329
240
|
`,
|
|
330
|
-
imports: [
|
|
241
|
+
imports: [NgTemplateOutlet],
|
|
242
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
331
243
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
332
244
|
}]
|
|
333
|
-
}],
|
|
334
|
-
type: ContentChild,
|
|
335
|
-
args: [NgtsCameraContent]
|
|
336
|
-
}], _left: [{
|
|
337
|
-
type: Input,
|
|
338
|
-
args: [{ alias: 'left' }]
|
|
339
|
-
}], _right: [{
|
|
340
|
-
type: Input,
|
|
341
|
-
args: [{ alias: 'right' }]
|
|
342
|
-
}], _top: [{
|
|
343
|
-
type: Input,
|
|
344
|
-
args: [{ alias: 'top' }]
|
|
345
|
-
}], _bottom: [{
|
|
346
|
-
type: Input,
|
|
347
|
-
args: [{ alias: 'bottom' }]
|
|
348
|
-
}] } });
|
|
245
|
+
}], ctorParameters: () => [] });
|
|
349
246
|
|
|
350
247
|
extend({ PerspectiveCamera, Group });
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
248
|
+
const defaultOptions = {
|
|
249
|
+
frames: Infinity,
|
|
250
|
+
resolution: 256,
|
|
251
|
+
makeDefault: false,
|
|
252
|
+
manual: false,
|
|
253
|
+
};
|
|
254
|
+
class NgtsPerspectiveCamera {
|
|
255
|
+
constructor() {
|
|
256
|
+
this.options = input(defaultOptions, { transform: mergeInputs(defaultOptions) });
|
|
257
|
+
this.parameters = omit(this.options, ['envMap', 'makeDefault', 'manual', 'frames', 'resolution']);
|
|
258
|
+
this.content = contentChild(TemplateRef);
|
|
259
|
+
this.cameraContent = contentChild(NgtsCameraContent, { read: TemplateRef });
|
|
260
|
+
this.cameraRef = viewChild.required('camera');
|
|
261
|
+
this.groupRef = viewChild.required('group');
|
|
262
|
+
this.autoEffect = injectAutoEffect();
|
|
263
|
+
this.store = injectStore();
|
|
264
|
+
this.camera = this.store.select('camera');
|
|
265
|
+
this.size = this.store.select('size');
|
|
266
|
+
this.manual = pick(this.options, 'manual');
|
|
267
|
+
this.makeDefault = pick(this.options, 'makeDefault');
|
|
268
|
+
this.resolution = pick(this.options, 'resolution');
|
|
269
|
+
this.fbo = injectFBO(() => ({ width: this.resolution() }));
|
|
270
|
+
this.texture = pick(this.fbo, 'texture');
|
|
271
|
+
afterNextRender(() => {
|
|
272
|
+
this.autoEffect(() => {
|
|
273
|
+
if (!this.manual()) {
|
|
274
|
+
this.cameraRef().nativeElement.aspect = this.size().width / this.size().height;
|
|
275
|
+
this.cameraRef().nativeElement.updateProjectionMatrix();
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
this.autoEffect(() => {
|
|
279
|
+
if (this.makeDefault()) {
|
|
280
|
+
const oldCam = untracked(this.camera);
|
|
281
|
+
this.store.update({ camera: this.cameraRef().nativeElement });
|
|
282
|
+
return () => this.store.update(() => ({ camera: oldCam }));
|
|
283
|
+
}
|
|
284
|
+
return;
|
|
285
|
+
});
|
|
286
|
+
this.cameraRef().nativeElement.updateProjectionMatrix();
|
|
287
|
+
});
|
|
288
|
+
let count = 0;
|
|
289
|
+
let oldEnvMap = null;
|
|
290
|
+
injectBeforeRender(({ gl, scene }) => {
|
|
291
|
+
const [{ frames, envMap }, group, camera, fbo] = [
|
|
292
|
+
this.options(),
|
|
293
|
+
this.groupRef().nativeElement,
|
|
294
|
+
this.cameraRef().nativeElement,
|
|
295
|
+
this.fbo(),
|
|
296
|
+
];
|
|
297
|
+
if (this.cameraContent() && group && camera && fbo && (frames === Infinity || count < frames)) {
|
|
298
|
+
group.visible = false;
|
|
299
|
+
gl.setRenderTarget(fbo);
|
|
300
|
+
oldEnvMap = scene.background;
|
|
301
|
+
if (envMap)
|
|
302
|
+
scene.background = envMap;
|
|
303
|
+
gl.render(scene, camera);
|
|
304
|
+
scene.background = oldEnvMap;
|
|
305
|
+
gl.setRenderTarget(null);
|
|
306
|
+
group.visible = true;
|
|
307
|
+
count++;
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgtsPerspectiveCamera, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
312
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.1.0", type: NgtsPerspectiveCamera, isStandalone: true, selector: "ngts-perspective-camera", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "content", first: true, predicate: TemplateRef, descendants: true, isSignal: true }, { propertyName: "cameraContent", first: true, predicate: NgtsCameraContent, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "cameraRef", first: true, predicate: ["camera"], descendants: true, isSignal: true }, { propertyName: "groupRef", first: true, predicate: ["group"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
313
|
+
<ngt-perspective-camera #camera [parameters]="parameters()">
|
|
314
|
+
<ng-container [ngTemplateOutlet]="content() ?? null" />
|
|
359
315
|
</ngt-perspective-camera>
|
|
360
|
-
|
|
361
|
-
|
|
316
|
+
|
|
317
|
+
<ngt-group #group>
|
|
318
|
+
<ng-container [ngTemplateOutlet]="cameraContent() ?? null" [ngTemplateOutletContext]="{ $implicit: texture }" />
|
|
362
319
|
</ngt-group>
|
|
363
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
|
320
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
364
321
|
}
|
|
365
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
322
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgtsPerspectiveCamera, decorators: [{
|
|
366
323
|
type: Component,
|
|
367
324
|
args: [{
|
|
368
325
|
selector: 'ngts-perspective-camera',
|
|
369
326
|
standalone: true,
|
|
370
327
|
template: `
|
|
371
|
-
<ngt-perspective-camera [
|
|
372
|
-
<ng-container
|
|
373
|
-
*ngIf="cameraContent && !cameraContent.ngtsCameraContent"
|
|
374
|
-
[ngTemplateOutlet]="cameraContent.template"
|
|
375
|
-
/>
|
|
328
|
+
<ngt-perspective-camera #camera [parameters]="parameters()">
|
|
329
|
+
<ng-container [ngTemplateOutlet]="content() ?? null" />
|
|
376
330
|
</ngt-perspective-camera>
|
|
377
|
-
|
|
378
|
-
|
|
331
|
+
|
|
332
|
+
<ngt-group #group>
|
|
333
|
+
<ng-container [ngTemplateOutlet]="cameraContent() ?? null" [ngTemplateOutletContext]="{ $implicit: texture }" />
|
|
379
334
|
</ngt-group>
|
|
380
335
|
`,
|
|
381
|
-
imports: [
|
|
336
|
+
imports: [NgTemplateOutlet],
|
|
337
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
382
338
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
383
339
|
}]
|
|
384
|
-
}],
|
|
385
|
-
type: ContentChild,
|
|
386
|
-
args: [NgtsCameraContent]
|
|
387
|
-
}] } });
|
|
340
|
+
}], ctorParameters: () => [] });
|
|
388
341
|
|
|
389
342
|
/**
|
|
390
343
|
* Generated bundle index. Do not edit.
|
|
391
344
|
*/
|
|
392
345
|
|
|
393
|
-
export { NgtsCameraContent, NgtsCubeCamera,
|
|
346
|
+
export { NgtsCameraContent, NgtsCubeCamera, NgtsOrthographicCamera, NgtsPerspectiveCamera, injectCubeCamera };
|
|
394
347
|
//# sourceMappingURL=angular-three-soba-cameras.mjs.map
|