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
package/staging/README.md
CHANGED
|
@@ -1,3 +1,473 @@
|
|
|
1
|
-
# angular-three-soba/staging
|
|
1
|
+
# `angular-three-soba/staging`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This secondary entry point includes miscellaneous utilities and components for animations, shadows, frame buffer objects (FBOs), and more. It requires `@pmndrs/vanilla` and `@monogrid/gainmap-js` as additional dependencies.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install @pmndrs/vanilla @monogrid/gainmap-js
|
|
7
|
+
# yarn add @pmndrs/vanilla @monogrid/gainmap-js
|
|
8
|
+
# pnpm add @pmndrs/vanilla @monogrid/gainmap-js
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## TOC
|
|
12
|
+
|
|
13
|
+
- [NgtsAccumulativeShadows](#ngtsaccumulativeshadows)
|
|
14
|
+
- [NgtsRandomizedLights](#ngtsrandomizedlights)
|
|
15
|
+
- [NgtsBBAnchor](#ngtsbbanchor)
|
|
16
|
+
- [NgtsCameraShake](#ngtscamerashake)
|
|
17
|
+
- [NgtsCenter](#ngtscenter)
|
|
18
|
+
- [NgtsContactShadows](#ngtscontactshadows)
|
|
19
|
+
- [NgtsEnvironment](#ngtsenvironment)
|
|
20
|
+
- [NgtsLightformer](#ngtslightformer)
|
|
21
|
+
- [NgtsFloat](#ngtsfloat)
|
|
22
|
+
- [MatcapTexture](#matcaptexture)
|
|
23
|
+
- [NormalTexture](#normaltexture)
|
|
24
|
+
- [NgtsRenderTexture](#ngtsrendertexture)
|
|
25
|
+
- [NgtsBounds](#ngtsbounds)
|
|
26
|
+
- [NgtsStage](#ngtsstage)
|
|
27
|
+
- [NgtsCaustics](#ngtscaustics)
|
|
28
|
+
- [NgtsSky](#ngtssky)
|
|
29
|
+
- [NgtsSpotLight](#ngtsspotlight)
|
|
30
|
+
- [NgtsSpotLightShadow](#ngtsspotlightshadow)
|
|
31
|
+
- [NgtsBackdrop](#ngtsbackdrop)
|
|
32
|
+
|
|
33
|
+
## NgtsAccumulativeShadows
|
|
34
|
+
|
|
35
|
+
A planar, Y-up oriented shadow-catcher that can accumulate into soft shadows and has zero performance impact after all frames have accumulated. It can be temporal, it will accumulate over time, or instantaneous, which might be expensive depending on how many frames you render.
|
|
36
|
+
|
|
37
|
+
You must pair it with lightsources (and scene objects!) that cast shadows, which go into the children slot. Best use it with the `NgtsRandomizedLights` component, which jiggles a set of lights around, creating realistic raycast-like shadows and ambient occlusion.
|
|
38
|
+
|
|
39
|
+
### Object Inputs (NgtsAccumulativeShadowsOptions)
|
|
40
|
+
|
|
41
|
+
| Property | Description | Default Value |
|
|
42
|
+
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
|
|
43
|
+
| `frames` | How many frames it can render, more yields cleaner results but takes more time. | 40 |
|
|
44
|
+
| `blend` | If frames is set to Infinity, blend controls the refresh ratio. | 20 |
|
|
45
|
+
| `limit` | Can limit the amount of frames rendered if frames is set to Infinity, usually to get some performance back once a movable scene has settled. | Infinity |
|
|
46
|
+
| `scale` | Scale of the plane. | 10 |
|
|
47
|
+
| `temporal` | Temporal accumulates shadows over time which is more performant but has a visual regression over instant results. | false |
|
|
48
|
+
| `opacity` | Opacity of the plane. | 1 |
|
|
49
|
+
| `alphaTest` | Discards alpha pixels. | 0.75 |
|
|
50
|
+
| `color` | Shadow color. | 'black' |
|
|
51
|
+
| `colorBlend` | Color blend, how much colors turn to black. 0 is black. | 2 |
|
|
52
|
+
| `resolution` | Buffer resolution. | 1024 |
|
|
53
|
+
| `toneMapped` | Texture tone mapping. | true |
|
|
54
|
+
|
|
55
|
+
```html
|
|
56
|
+
<ngt-color *args="['goldenrod']" attach="background" />
|
|
57
|
+
<accumulative-shadows-suzi />
|
|
58
|
+
|
|
59
|
+
<ngts-accumulative-shadows [options]="accumulativeShadowsOptions()">
|
|
60
|
+
<ngts-randomized-lights [options]="{ amount: 8, radius: 4, ambient: 0.5, bias: 0.001, position: [5, 5, -10] }" />
|
|
61
|
+
</ngts-accumulative-shadows>
|
|
62
|
+
|
|
63
|
+
<ngts-orbit-controls [options]="{ autoRotate: true }" />
|
|
64
|
+
<ngts-environment [options]="{ preset: 'city' }" />
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## NgtsRandomizedLights
|
|
68
|
+
|
|
69
|
+
A randomized light that internally runs multiple lights and jiggles them. See below, you would normally pair it with AccumulativeShadows. This component is context aware, paired with `NgtsAccumulativeShadows` it will take the number of frames from its parent.
|
|
70
|
+
|
|
71
|
+
### Object Inputs (NgtsRandomizedLightsOptions)
|
|
72
|
+
|
|
73
|
+
| Property | Description | Default Value |
|
|
74
|
+
| ----------- | --------------------------------------------------------------- | ------------- |
|
|
75
|
+
| `amount` | The number of lights to create. | 1 |
|
|
76
|
+
| `radius` | The radius within which the lights will be randomly positioned. | 1 |
|
|
77
|
+
| `ambient` | The ambient light intensity. | 0.5 |
|
|
78
|
+
| `position` | The base position of the lights. | [0, 0, 0] |
|
|
79
|
+
| `intensity` | The intensity of the lights. | 1 |
|
|
80
|
+
| `bias` | The shadow bias for the lights. | 0.001 |
|
|
81
|
+
| `mapSize` | The size of the shadow map for the lights. | 1024 |
|
|
82
|
+
|
|
83
|
+
```html
|
|
84
|
+
<ngts-randomized-lights [options]="{ amount: 8, radius: 4, ambient: 0.5, bias: 0.001, position: [5, 5, -10] }" />
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## NgtsBBAnchor
|
|
88
|
+
|
|
89
|
+
A component using AABB (Axis-aligned bounding boxes) to offset children position by specified multipliers (anchor property) on each axis. You can use this component to change children positioning in regard of the parent's bounding box, eg. pinning Html component to one of the parent's corners. Multipliers determine the offset value based on the AABB's size:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
childrenAnchor = boundingBoxPosition + (boundingBoxSize \* anchor / 2)
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Object Inputs (NgtsBBAnchorOptions)
|
|
96
|
+
|
|
97
|
+
| Property | Description | Default Value |
|
|
98
|
+
| -------- | --------------------------------------------------------- | ------------- |
|
|
99
|
+
| `anchor` | The anchor point, a vector3 or an array of three numbers. | [0, 0, 0] |
|
|
100
|
+
|
|
101
|
+
```html
|
|
102
|
+
<ngts-bb-anchor [options]="{ anchor: [0, 1, 0] }">
|
|
103
|
+
<ngt-mesh></ngt-mesh>
|
|
104
|
+
</ngts-bb-anchor>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## NgtsCameraShake
|
|
108
|
+
|
|
109
|
+
A component for applying a configurable camera shake effect. Currently only supports rotational camera shake.
|
|
110
|
+
|
|
111
|
+
If you use shake in combination with controls make sure to set the `makeDefault` option on your controls, in that case you do not have to pass them via the `controls` option.
|
|
112
|
+
|
|
113
|
+
### Object Inputs (NgtsCameraShakeOptions)
|
|
114
|
+
|
|
115
|
+
| Property | Description | Default Value |
|
|
116
|
+
| ---------------- | --------------------------------------------------------------------- | ------------- |
|
|
117
|
+
| `intensity` | Initial intensity of the shake. | 1 |
|
|
118
|
+
| `decay` | Should the intensity decay over time? | false |
|
|
119
|
+
| `decayRate` | If decay is true, this is the rate at which intensity will reduce at. | 0.65 |
|
|
120
|
+
| `maxYaw` | Max amount camera can yaw in either direction. | 0.1 |
|
|
121
|
+
| `maxPitch` | Max amount camera can pitch in either direction. | 0.1 |
|
|
122
|
+
| `maxRoll` | Max amount camera can roll in either direction. | 0.1 |
|
|
123
|
+
| `yawFrequency` | Frequency of the the yaw rotation. | 0.1 |
|
|
124
|
+
| `pitchFrequency` | Frequency of the pitch rotation. | 0.1 |
|
|
125
|
+
| `rollFrequency` | Frequency of the roll rotation. | 0.1 |
|
|
126
|
+
|
|
127
|
+
```html
|
|
128
|
+
<ngts-camera-shake [options]="{ intensity: 1, decay: false, decayRate: 0.65, maxYaw: 0.1, maxPitch: 0.1 }" />
|
|
129
|
+
<ngts-orbit-controls [options]="{ makeDefault: true }" />
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## NgtsCenter
|
|
133
|
+
|
|
134
|
+
Calculates a boundary box and centers its children accordingly.
|
|
135
|
+
|
|
136
|
+
### Object Inputs (NgtsCenterOptions)
|
|
137
|
+
|
|
138
|
+
| Property | Description | Default Value |
|
|
139
|
+
| ---------- | ------------------------------------------------------------------------ | ------------- |
|
|
140
|
+
| `top` | Aligns children to the top of the bounding box. | false |
|
|
141
|
+
| `right` | Aligns children to the right of the bounding box. | false |
|
|
142
|
+
| `bottom` | Aligns children to the bottom of the bounding box. | false |
|
|
143
|
+
| `left` | Aligns children to the left of the bounding box. | false |
|
|
144
|
+
| `front` | Aligns children to the front of the bounding box. | false |
|
|
145
|
+
| `back` | Aligns children to the back of the bounding box. | false |
|
|
146
|
+
| `disable` | Disables all axes centering. | false |
|
|
147
|
+
| `disableX` | Disables centering on the X axis. | false |
|
|
148
|
+
| `disableY` | Disables centering on the Y axis. | false |
|
|
149
|
+
| `disableZ` | Disables centering on the Z axis. | false |
|
|
150
|
+
| `precise` | Precision of the bounding box calculation. See THREE.Box3.setFromObject. | true |
|
|
151
|
+
|
|
152
|
+
```html
|
|
153
|
+
<ngts-center [options]="{ top: true, right: true }">
|
|
154
|
+
<ngt-mesh></ngt-mesh>
|
|
155
|
+
</ngts-center>
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## NgtsContactShadows
|
|
159
|
+
|
|
160
|
+
A contact shadow implementation, facing upwards (positive Y) by default. scale can be a positive number or a 2D array `[x: number, y: number]`.
|
|
161
|
+
|
|
162
|
+
### Object Inputs (NgtsContactShadowsOptions)
|
|
163
|
+
|
|
164
|
+
| Property | Description | Default Value |
|
|
165
|
+
| ------------ | ------------------------------------------------------------------------------- | ------------- |
|
|
166
|
+
| `opacity` | Opacity of the shadows. | 1 |
|
|
167
|
+
| `width` | Width of the shadow plane. | 1 |
|
|
168
|
+
| `height` | Height of the shadow plane. | 1 |
|
|
169
|
+
| `blur` | Blur radius of the shadows. | 1 |
|
|
170
|
+
| `far` | Far distance of the shadow camera. | 10 |
|
|
171
|
+
| `resolution` | Resolution of the shadow map. | 512 |
|
|
172
|
+
| `smooth` | Whether to apply smoothing to the shadows. | true |
|
|
173
|
+
| `color` | Color of the shadows. | '#000000' |
|
|
174
|
+
| `depthWrite` | Whether the shadows should write to the depth buffer. | false |
|
|
175
|
+
| `frames` | How many frames it can render, more yields cleaner results but takes more time. | 40 |
|
|
176
|
+
|
|
177
|
+
```html
|
|
178
|
+
<ngts-contact-shadows
|
|
179
|
+
[options]="{ opacity: 1, width: 1, height: 1, blur: 1, far: 10, resolution: 512, smooth: true, color: '#000000', depthWrite: false }"
|
|
180
|
+
/>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Since this is a rather expensive effect you can limit the amount of frames it renders when your objects are static. For instance making it render only once:
|
|
184
|
+
|
|
185
|
+
```html
|
|
186
|
+
<ngts-contact-shadows
|
|
187
|
+
[options]="{ opacity: 1, width: 1, height: 1, blur: 1, far: 10, resolution: 512, smooth: true, color: '#000000', depthWrite: false, frames: 1 }"
|
|
188
|
+
/>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## NgtsEnvironment
|
|
192
|
+
|
|
193
|
+
Sets up a global cubemap, which affects the default `scene.environment`, and optionally `scene.background`, unless a custom scene has been passed. A selection of presets from [HDRI Haven](https://hdrihaven.com/) are available for convenience.
|
|
194
|
+
|
|
195
|
+
### Object Inputs (NgtsEnvironmentOptions)
|
|
196
|
+
|
|
197
|
+
| Property | Description | Default Value |
|
|
198
|
+
| ------------ | -------------------------------------------------------------------------- | ------------- |
|
|
199
|
+
| `background` | Whether to use the environment map as the background. | true |
|
|
200
|
+
| `files` | Array of cubemap files OR single equirectangular file. | |
|
|
201
|
+
| `path` | Path to the cubemap files OR single equirectangular file. | |
|
|
202
|
+
| `preset` | One of the available presets: sunset, dawn, night, warehouse, forest, etc. | |
|
|
203
|
+
| `scene` | Custom scene to apply the environment map to. | |
|
|
204
|
+
|
|
205
|
+
The simplest way to use it is to provide a preset (linking towards common HDRI Haven assets hosted on github). 👉 Note: `preset` property is not meant to be used in production environments and may fail as it relies on CDNs.
|
|
206
|
+
|
|
207
|
+
Current presets are
|
|
208
|
+
|
|
209
|
+
- apartment: 'lebombo_1k.hdr'
|
|
210
|
+
- city: 'potsdamer_platz_1k.hdr'
|
|
211
|
+
- dawn: 'kiara_1_dawn_1k.hdr'
|
|
212
|
+
- forest: 'forest_slope_1k.hdr'
|
|
213
|
+
- lobby: 'st_fagans_interior_1k.hdr'
|
|
214
|
+
- night: 'dikhololo_night_1k.hdr'
|
|
215
|
+
- park: 'rooitou_park_1k.hdr'
|
|
216
|
+
- studio: 'studio_small_03_1k.hdr'
|
|
217
|
+
- sunset: 'venice_sunset_1k.hdr'
|
|
218
|
+
- warehouse: 'empty_warehouse_01_1k.hdr'
|
|
219
|
+
|
|
220
|
+
```html
|
|
221
|
+
<ngts-environment [options]="{ preset: 'city' }" />
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
If you provide children you can even render a custom environment. It will render the contents into an off-buffer and film a single frame with a cube camera (whose options you can configure: near=1, far=1000, resolution=256).
|
|
225
|
+
|
|
226
|
+
```html
|
|
227
|
+
<ngts-environment [options]="{ background: true }">
|
|
228
|
+
<ng-template>
|
|
229
|
+
<ngt-mesh>
|
|
230
|
+
<ngt-sphere-geometry />
|
|
231
|
+
<ngt-mesh-basic-material [side]="BackSide" />
|
|
232
|
+
</ngt-mesh>
|
|
233
|
+
</ng-template>
|
|
234
|
+
</ngts-environment>
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
Environment can also be ground projected, that is, put your model on the "ground" within the environment map.
|
|
238
|
+
|
|
239
|
+
```html
|
|
240
|
+
<ngts-environment [options]="{ ground: true }" />
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
You can provide optional options to configure this projection.
|
|
244
|
+
|
|
245
|
+
```html
|
|
246
|
+
<ngts-environment [options]="{ ground: { height: 15, radius: 60, scale: 1000 } }" />
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
## NgtsLightformer
|
|
250
|
+
|
|
251
|
+
This component draws flat rectangles, circles or rings, mimicking the look of a light-former. You can set the output intensity, which will effect emissiveness once you put it into an HDRI `NgtsEnvironment`, where it mostly belongs. It will act like a real light without the expense, you can have as many as you want.
|
|
252
|
+
|
|
253
|
+
### Object Inputs (NgtsLightformerOptions)
|
|
254
|
+
|
|
255
|
+
| Property | Description | Default Value |
|
|
256
|
+
| ------------ | -------------------------------------------------------------------- | ------------- |
|
|
257
|
+
| `toneMapped` | Whether the material is tone mapped. | false |
|
|
258
|
+
| `color` | The color of the lightformer. | 'white' |
|
|
259
|
+
| `form` | The shape of the lightformer. Can be 'circle', 'ring', or 'rect'. | 'rect' |
|
|
260
|
+
| `scale` | The scale of the lightformer. Can be a number or an array [x, y, z]. | 1 |
|
|
261
|
+
| `intensity` | The intensity of the light emitted by the lightformer. | 1 |
|
|
262
|
+
| `target` | The target position for the lightformer to look at. | |
|
|
263
|
+
|
|
264
|
+
```html
|
|
265
|
+
<ngts-environment>
|
|
266
|
+
<ng-template>
|
|
267
|
+
<ngts-lightformer [options]="{ toneMapped: false, color: 'white', form: 'rect', scale: 1, intensity: 1 }" />
|
|
268
|
+
</ng-template>
|
|
269
|
+
</ngts-environment>
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
## NgtsFloat
|
|
273
|
+
|
|
274
|
+
A component that simulates floating objects by applying a configurable up and down motion.
|
|
275
|
+
|
|
276
|
+
### Object Inputs (NgtsFloatOptions)
|
|
277
|
+
|
|
278
|
+
| Property | Description | Default Value |
|
|
279
|
+
| ------------------- | --------------------------------------------------------------------- | ------------- |
|
|
280
|
+
| `speed` | The speed of the floating animation. | 1 |
|
|
281
|
+
| `rotationIntensity` | The intensity of the rotation during the floating animation. | 1 |
|
|
282
|
+
| `floatIntensity` | The intensity of the vertical movement during the floating animation. | 1 |
|
|
283
|
+
|
|
284
|
+
```html
|
|
285
|
+
<ngts-float [options]="{ speed: 1, rotationIntensity: 1, floatIntensity: 1 }">
|
|
286
|
+
<ngt-mesh>
|
|
287
|
+
<ngt-sphere-geometry />
|
|
288
|
+
<ngt-mesh-standard-material [color]="'#ff0000'" />
|
|
289
|
+
</ngt-mesh>
|
|
290
|
+
</ngts-float>
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
## MatcapTexture
|
|
294
|
+
|
|
295
|
+
### `injectMatcapTexture`
|
|
296
|
+
|
|
297
|
+
This function injects a matcap texture (or textures) into your scene. It takes a function matcap that returns the URL of the matcap texture file (or an array of URLs) and returns a signal that holds the loading result.
|
|
298
|
+
|
|
299
|
+
> Matcap repository: https://github.com/emmelleppi/matcaps
|
|
300
|
+
|
|
301
|
+
> Note: `injectMatcapTexture` is not meant to be used in production environments as it relies on third-party CDN.
|
|
302
|
+
|
|
303
|
+
```ts
|
|
304
|
+
function injectMatcapTexture(
|
|
305
|
+
matcap: () => string | string[],
|
|
306
|
+
{
|
|
307
|
+
onLoad,
|
|
308
|
+
injector,
|
|
309
|
+
}: {
|
|
310
|
+
onLoad?: (matcapTextures: Texture[]) => void;
|
|
311
|
+
injector?: Injector;
|
|
312
|
+
} = {},
|
|
313
|
+
): Signal<NgtLoaderResults<string, Texture> | null>;
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### `NgtsMatcapTexture`
|
|
317
|
+
|
|
318
|
+
A structural directive that provides a matcap texture to be used with other materials.
|
|
319
|
+
|
|
320
|
+
```html
|
|
321
|
+
<ngt-mesh [geometry]="gltf.nodes.Suzanne.geometry">
|
|
322
|
+
<ngt-mesh-matcap-material *matcapTexture="options(); let texture" [matcap]="texture()" />
|
|
323
|
+
</ngt-mesh>
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
## NormalTexture
|
|
327
|
+
|
|
328
|
+
### `injectNormalTexture`
|
|
329
|
+
|
|
330
|
+
This function injects a normal texture (or textures) into your scene. It takes a function normal that returns the URL of the normal texture file (or an array of URLs) and returns a signal that holds the loading result.
|
|
331
|
+
|
|
332
|
+
> Normal repository: https://github.com/emmelleppi/normal-maps
|
|
333
|
+
|
|
334
|
+
> Note: `injectNormalTexture` is not meant to be used in production environments as it relies on third-party CDN.
|
|
335
|
+
|
|
336
|
+
```ts
|
|
337
|
+
function injectNormalTexture(
|
|
338
|
+
normal: () => string | string[],
|
|
339
|
+
{
|
|
340
|
+
onLoad,
|
|
341
|
+
injector,
|
|
342
|
+
}: {
|
|
343
|
+
onLoad?: (normalTextures: Texture[]) => void;
|
|
344
|
+
injector?: Injector;
|
|
345
|
+
} = {},
|
|
346
|
+
): Signal<NgtLoaderResults<string, Texture> | null>;
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
### `NgtsNormalTexture`
|
|
350
|
+
|
|
351
|
+
A structural directive that provides a normal texture to be used with other materials.
|
|
352
|
+
|
|
353
|
+
```html
|
|
354
|
+
<ngt-mesh [geometry]="gltf.nodes.Suzanne.geometry">
|
|
355
|
+
<ngt-mesh-normal-material *normalTexture="options(); let texture" [normal]="texture()" />
|
|
356
|
+
</ngt-mesh>
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
## NgtsRenderTexture
|
|
360
|
+
|
|
361
|
+
This component allows you to render a live scene into a texture which you can then apply to a material. The contents of it run inside a portal and are separate from the rest of the canvas, therefore you can have events in there, environment maps, etc.
|
|
362
|
+
|
|
363
|
+
### Object Inputs (NgtsRenderTextureOptions)
|
|
364
|
+
|
|
365
|
+
| Property | Description | Default Value |
|
|
366
|
+
| ----------------- | ---------------------------------------- | ------------- |
|
|
367
|
+
| `resolution` | Resolution of the render texture. | 1024 |
|
|
368
|
+
| `scene` | Custom scene to render into the texture. | |
|
|
369
|
+
| `camera` | Custom camera to render the scene with. | |
|
|
370
|
+
| `width` | Width of the texture. | |
|
|
371
|
+
| `height` | Height of the texture. | |
|
|
372
|
+
| `samples` | The number of samples for the texture. | 4 |
|
|
373
|
+
| `stencilBuffer` | Whether to use a stencil buffer. | false |
|
|
374
|
+
| `depthBuffer` | Whether to use a depth buffer. | true |
|
|
375
|
+
| `generateMipmaps` | Whether to generate mipmaps. | false |
|
|
376
|
+
| `renderPriority` | The render priority of the texture. | 0 |
|
|
377
|
+
| `eventPriority` | The event priority of the texture. | 0 |
|
|
378
|
+
| `frames` | The number of frames to render. | Infinity |
|
|
379
|
+
| `compute` | A function to compute the event. | |
|
|
380
|
+
|
|
381
|
+
Required `NgtsRenderTextureContent`
|
|
382
|
+
|
|
383
|
+
```html
|
|
384
|
+
<ngt-mesh>
|
|
385
|
+
<ngt-mesh-basic-material>
|
|
386
|
+
<ngts-render-texture>
|
|
387
|
+
<app-render-texture *renderTextureContent />
|
|
388
|
+
<!-- this can be any portal content: a off-buffer scene with its own lights, cameras etc... -->
|
|
389
|
+
</ngts-render-texture>
|
|
390
|
+
</ngt-mesh-basic-material>
|
|
391
|
+
</ngt-mesh>
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
## NgtsBounds
|
|
395
|
+
|
|
396
|
+
Calculates a boundary box and centers the camera accordingly. If you are using camera controls, make sure to pass them the `makeDefault` option. `fit` fits the current view on first render. `clip` sets the cameras near/far planes. `observe` will trigger on window resize. To control the damping animation, use `maxDuration` to set the animation length in seconds, and `interpolateFunc` to define how the animation changes over time (should be an increasing function in [0, 1] interval, `interpolateFunc(0) === 0`, `interpolateFunc(1) === 1`).
|
|
397
|
+
|
|
398
|
+
### Object Inputs (NgtsBoundsOptions)
|
|
399
|
+
|
|
400
|
+
| Property | Description | Default Value |
|
|
401
|
+
| ------------- | -------------------------------------- | ------------- |
|
|
402
|
+
| `fit` | Fits the current view on first render. | false |
|
|
403
|
+
| `clip` | Sets the cameras near/far planes. | false |
|
|
404
|
+
| `observe` | Triggers on window resize. | false |
|
|
405
|
+
| `maxDuration` | The animation length in seconds. | 1 |
|
|
406
|
+
|
|
407
|
+
## NgtsSpotLightShadow
|
|
408
|
+
|
|
409
|
+
A shadow caster that can help cast shadows of different patterns (textures) onto the scene.
|
|
410
|
+
|
|
411
|
+
### Object Inputs (NgtsSpotLightShadowOptions)
|
|
412
|
+
|
|
413
|
+
| Property | Description | Default Value |
|
|
414
|
+
| ----------- | ----------------------------------------------------------- | ------------- |
|
|
415
|
+
| `distance` | Distance between the shadow caster and light. | 0.4 |
|
|
416
|
+
| `alphaTest` | Sets the alpha value to be used when running an alpha test. | 0.5 |
|
|
417
|
+
| `scale` | Scale of the shadow caster plane. | 1 |
|
|
418
|
+
| `width` | Width of the shadow map. The higher the more expensive. | 512 |
|
|
419
|
+
| `height` | Height of the shadow map. The higher the more expensive. | 512 |
|
|
420
|
+
| `map` | Texture - Pattern of the shadow. | |
|
|
421
|
+
|
|
422
|
+
```html
|
|
423
|
+
<ngts-spot-light>
|
|
424
|
+
<ngts-spot-light-shadow
|
|
425
|
+
[options]="{
|
|
426
|
+
distance: 0.4,
|
|
427
|
+
alphaTest: 0.5,
|
|
428
|
+
scale: 1,
|
|
429
|
+
width: 512,
|
|
430
|
+
height: 512,
|
|
431
|
+
}"
|
|
432
|
+
/>
|
|
433
|
+
</ngts-spot-light>
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
An optional `shader` input lets you run a custom shader to modify/add effects to your shadow texture. The shader provides the following uniforms and varyings.
|
|
437
|
+
|
|
438
|
+
| Type | Name | Notes |
|
|
439
|
+
| ------------------- | ------------ | -------------------------------------- |
|
|
440
|
+
| `varying vec2` | `vUv` | UVs of the shadow casting plane |
|
|
441
|
+
| `uniform sampler2D` | `uShadowMap` | The texture provided to the `map` prop |
|
|
442
|
+
| `uniform float` | `uTime` | Current time |
|
|
443
|
+
|
|
444
|
+
Treat the output of the shader like an alpha map where `1` is opaque and `0` is transparent.
|
|
445
|
+
|
|
446
|
+
```glsl
|
|
447
|
+
gl_FragColor = vec4(vec3(1.), 1.); // Opaque
|
|
448
|
+
gl_FragColor = vec4(vec3(0.), 1.); // Transparent
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
```html
|
|
452
|
+
<ngts-spot-light>
|
|
453
|
+
<ngts-spot-light-shadow [shader]="customShader" [options]="shadowOptions" />
|
|
454
|
+
</ngts-spot-light>
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
## NgtsBackdrop
|
|
458
|
+
|
|
459
|
+
A curved plane, like a studio backdrop. This is for presentational purposes, to break up light and shadows more interestingly.
|
|
460
|
+
|
|
461
|
+
### Object Inputs (NgtsBackdropOptions)
|
|
462
|
+
|
|
463
|
+
| Property | Description | Default Value |
|
|
464
|
+
| --------------- | -------------------------------------------- | ------------- |
|
|
465
|
+
| `floor` | Stretches the floor segment. | 0.25 |
|
|
466
|
+
| `segments` | Mesh-resolution. | 20 |
|
|
467
|
+
| `receiveShadow` | Whether the backdrop should receive shadows. | false |
|
|
468
|
+
|
|
469
|
+
```html
|
|
470
|
+
<ngts-backdrop [options]="{ floor: 0.25, segments: 20 }">
|
|
471
|
+
<ngt-mesh-standard-material color="#353540" />
|
|
472
|
+
</ngts-backdrop>
|
|
473
|
+
```
|
package/staging/index.d.ts
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './
|
|
14
|
-
export * from './
|
|
15
|
-
export * from './
|
|
16
|
-
export * from './
|
|
17
|
-
export { NgtsSpotLightShadow } from './spot-light
|
|
18
|
-
export * from './
|
|
19
|
-
export * from './stage/stage';
|
|
20
|
-
export * from './stars/stars';
|
|
21
|
-
export * from './wireframe/wireframe';
|
|
1
|
+
export * from './lib/accumulative-shadows';
|
|
2
|
+
export * from './lib/backdrop';
|
|
3
|
+
export * from './lib/bb-anchor';
|
|
4
|
+
export * from './lib/bounds';
|
|
5
|
+
export * from './lib/camera-shake';
|
|
6
|
+
export * from './lib/caustics';
|
|
7
|
+
export * from './lib/center';
|
|
8
|
+
export * from './lib/contact-shadows';
|
|
9
|
+
export * from './lib/environment';
|
|
10
|
+
export * from './lib/float';
|
|
11
|
+
export * from './lib/lightformer';
|
|
12
|
+
export * from './lib/matcap-texture';
|
|
13
|
+
export * from './lib/normal-texture';
|
|
14
|
+
export * from './lib/randomized-lights';
|
|
15
|
+
export * from './lib/render-texture';
|
|
16
|
+
export * from './lib/sky';
|
|
17
|
+
export { NgtsSpotLight, NgtsSpotLightOptions, NgtsSpotLightShadow } from './lib/spot-light';
|
|
18
|
+
export * from './lib/stage';
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { NgtGroup } from 'angular-three';
|
|
3
|
+
import { Group, Mesh, PlaneGeometry } from 'three';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface NgtsAccumulativeShadowsOptions extends Partial<NgtGroup> {
|
|
6
|
+
/** How many frames it can render, more yields cleaner results but takes more time, 40 */
|
|
7
|
+
frames: number;
|
|
8
|
+
/** If frames === Infinity blend controls the refresh ratio, 100 */
|
|
9
|
+
blend: number;
|
|
10
|
+
/** Can limit the amount of frames rendered if frames === Infinity, usually to get some performance back once a movable scene has settled, Infinity */
|
|
11
|
+
limit: number;
|
|
12
|
+
/** Scale of the plane, */
|
|
13
|
+
scale: number;
|
|
14
|
+
/** Temporal accumulates shadows over time which is more performant but has a visual regression over instant results, false */
|
|
15
|
+
temporal?: boolean;
|
|
16
|
+
/** Opacity of the plane, 1 */
|
|
17
|
+
opacity: number;
|
|
18
|
+
/** Discards alpha pixels, 0.65 */
|
|
19
|
+
alphaTest: number;
|
|
20
|
+
/** Shadow color, black */
|
|
21
|
+
color: string;
|
|
22
|
+
/** Colorblend, how much colors turn to black, 0 is black, 2 */
|
|
23
|
+
colorBlend: number;
|
|
24
|
+
/** Buffer resolution, 1024 */
|
|
25
|
+
resolution: number;
|
|
26
|
+
/** Texture tonemapping */
|
|
27
|
+
toneMapped: boolean;
|
|
28
|
+
}
|
|
29
|
+
export declare class NgtsAccumulativeShadows {
|
|
30
|
+
nullTraversal: () => null;
|
|
31
|
+
Math: Math;
|
|
32
|
+
options: import("@angular/core").InputSignalWithTransform<NgtsAccumulativeShadowsOptions, "" | Partial<NgtsAccumulativeShadowsOptions>>;
|
|
33
|
+
parameters: import("@angular/core").Signal<Omit<NgtsAccumulativeShadowsOptions, "scale" | "frames" | "blend" | "limit" | "temporal" | "opacity" | "alphaTest" | "color" | "colorBlend" | "resolution" | "toneMapped">>;
|
|
34
|
+
lights: import("@angular/core").Signal<ElementRef<Group<import("three").Object3DEventMap>>>;
|
|
35
|
+
plane: import("@angular/core").Signal<ElementRef<Mesh<PlaneGeometry, import("three").ShaderMaterial & {
|
|
36
|
+
map: import("three").Texture | null;
|
|
37
|
+
color: import("three").Color;
|
|
38
|
+
alphaTest: number;
|
|
39
|
+
opacity: number;
|
|
40
|
+
blend: number;
|
|
41
|
+
}, import("three").Object3DEventMap>>>;
|
|
42
|
+
private store;
|
|
43
|
+
private gl;
|
|
44
|
+
private camera;
|
|
45
|
+
private scene;
|
|
46
|
+
private invalidate;
|
|
47
|
+
private opacity;
|
|
48
|
+
private alphaTest;
|
|
49
|
+
private limit;
|
|
50
|
+
private resolution;
|
|
51
|
+
private previousPLM;
|
|
52
|
+
private pLM;
|
|
53
|
+
scale: import("@angular/core").Signal<number>;
|
|
54
|
+
toneMapped: import("@angular/core").Signal<boolean>;
|
|
55
|
+
color: import("@angular/core").Signal<string>;
|
|
56
|
+
colorBlend: import("@angular/core").Signal<number>;
|
|
57
|
+
map: import("@angular/core").Signal<import("three").Texture>;
|
|
58
|
+
lightsMap: Map<string, () => void>;
|
|
59
|
+
temporal: import("@angular/core").Signal<boolean>;
|
|
60
|
+
frames: import("@angular/core").Signal<number>;
|
|
61
|
+
blend: import("@angular/core").Signal<number>;
|
|
62
|
+
count: number;
|
|
63
|
+
constructor();
|
|
64
|
+
getMesh(): Mesh<PlaneGeometry, import("three").ShaderMaterial & {
|
|
65
|
+
map: import("three").Texture | null;
|
|
66
|
+
color: import("three").Color;
|
|
67
|
+
alphaTest: number;
|
|
68
|
+
opacity: number;
|
|
69
|
+
blend: number;
|
|
70
|
+
}, import("three").Object3DEventMap>;
|
|
71
|
+
reset(): void;
|
|
72
|
+
update(frames?: number): void;
|
|
73
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsAccumulativeShadows, never>;
|
|
74
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsAccumulativeShadows, "ngts-accumulative-shadows", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
75
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { NgtGroup } from 'angular-three';
|
|
3
|
+
import { Group, PlaneGeometry } from 'three';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface NgtsBackdropOptions extends Partial<NgtGroup> {
|
|
6
|
+
floor: number;
|
|
7
|
+
segments: number;
|
|
8
|
+
receiveShadow?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare class NgtsBackdrop {
|
|
11
|
+
protected readonly Math: Math;
|
|
12
|
+
options: import("@angular/core").InputSignalWithTransform<NgtsBackdropOptions, "" | Partial<NgtsBackdropOptions>>;
|
|
13
|
+
parameters: import("@angular/core").Signal<Omit<NgtsBackdropOptions, "receiveShadow" | "floor" | "segments">>;
|
|
14
|
+
group: import("@angular/core").Signal<ElementRef<Group<import("three").Object3DEventMap>>>;
|
|
15
|
+
plane: import("@angular/core").Signal<ElementRef<PlaneGeometry> | undefined>;
|
|
16
|
+
receiveShadow: import("@angular/core").Signal<boolean | undefined>;
|
|
17
|
+
segments: import("@angular/core").Signal<number>;
|
|
18
|
+
private floor;
|
|
19
|
+
constructor();
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsBackdrop, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsBackdrop, "ngts-backdrop", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { NgtGroup, NgtVector3 } from 'angular-three';
|
|
3
|
+
import { Group, Object3D } from 'three';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface NgtsBBAnchorOptions extends Partial<NgtGroup> {
|
|
6
|
+
anchor: NgtVector3;
|
|
7
|
+
}
|
|
8
|
+
export declare class NgtsBBAnchor {
|
|
9
|
+
options: import("@angular/core").InputSignal<NgtsBBAnchorOptions>;
|
|
10
|
+
parameters: import("@angular/core").Signal<Omit<NgtsBBAnchorOptions, "anchor">>;
|
|
11
|
+
bbAnchorRef: import("@angular/core").Signal<ElementRef<Group<import("three").Object3DEventMap>>>;
|
|
12
|
+
parent: import("@angular/core").WritableSignal<Object3D<import("three").Object3DEventMap> | null>;
|
|
13
|
+
private anchor;
|
|
14
|
+
constructor();
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsBBAnchor, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsBBAnchor, "ngts-bb-anchor", never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
17
|
+
}
|