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
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { BlurPass, CausticsMaterial, CausticsProjectionMaterial, MeshDiscardMaterial, MeshDistortMaterial, MeshReflectorMaterial, MeshTransmissionMaterial, MeshWobbleMaterial, ProgressiveLightMap, SoftShadowMaterial, SpotLightMaterial, createCausticsUpdate, shaderMaterial } from '@pmndrs/vanilla';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Generated bundle index. Do not edit.
|
|
5
|
+
*/
|
|
6
|
+
//# sourceMappingURL=angular-three-soba-vanilla-exports.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"angular-three-soba-vanilla-exports.mjs","sources":["../../../../libs/soba/vanilla-exports/src/angular-three-soba-vanilla-exports.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;AAEG"}
|
package/loaders/README.md
CHANGED
|
@@ -1,3 +1,131 @@
|
|
|
1
|
-
# angular-three-soba/loaders
|
|
1
|
+
# `angular-three-soba/loaders`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This secondary entry point includes various loaders for files such as GLTF, textures, and fonts.
|
|
4
|
+
|
|
5
|
+
## TOC
|
|
6
|
+
|
|
7
|
+
- [`injectFont`](#injectfont)
|
|
8
|
+
- [`injectGLTF`](#injectgltf)
|
|
9
|
+
- [`injectTexture`](#injecttexture)
|
|
10
|
+
- [`injectProgress`](#injectprogress)
|
|
11
|
+
- [`NgtsLoader`](#ngtsloader)
|
|
12
|
+
|
|
13
|
+
## `injectFont`
|
|
14
|
+
|
|
15
|
+
Provides a way to inject and load fonts into your Angular component. It takes a function input that returns the font data (either as a `string` URL or a `FontData` object) and an optional injector. It returns a signal that holds the loaded `Font` object or null if not yet loaded.
|
|
16
|
+
|
|
17
|
+
The function also has static methods for preloading and clearing fonts from the cache:
|
|
18
|
+
|
|
19
|
+
- `injectFont.preload(input: () => NgtsFontInput): void`: Preloads a font into the cache.
|
|
20
|
+
- `injectFont.clear(input?: () => NgtsFontInput): void`: Clears a specific font or all fonts from the cache.
|
|
21
|
+
|
|
22
|
+
Please check `NgtsText3D` source for example usage.
|
|
23
|
+
|
|
24
|
+
## `injectGLTF`
|
|
25
|
+
|
|
26
|
+
Injects and loads GLTF models into your Angular component. It takes a function path that returns the URL(s) of the GLTF model(s) and options for Draco and Meshopt compression. It returns a signal that holds the loading results.
|
|
27
|
+
|
|
28
|
+
- Draco: A library for compressing and decompressing 3D geometric meshes and point clouds. Using Draco can significantly reduce the size of 3D models, leading to faster loading times.
|
|
29
|
+
- Meshopt: A collection of tools for optimizing 3D meshes for size and runtime performance. Meshopt compression can further optimize models compressed with Draco.
|
|
30
|
+
|
|
31
|
+
The function also has static methods for preloading and setting the decoder path for Draco:
|
|
32
|
+
|
|
33
|
+
- `injectGLTF.preload(path: () => TUrl, options): void`: Preloads a GLTF model into the cache.
|
|
34
|
+
- `injectGLTF.setDecoderPath(path: string): void`: Sets the decoder path for Draco.
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
@Component({
|
|
38
|
+
selector: 'app-suzi',
|
|
39
|
+
standalone: true,
|
|
40
|
+
template: `
|
|
41
|
+
<ngt-primitive *args="[scene()]" [rotation]="[-0.63, 0, 0]" [scale]="2" [position]="[0, -1.175, 0]" />
|
|
42
|
+
`,
|
|
43
|
+
imports: [NgtArgs],
|
|
44
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
45
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
46
|
+
})
|
|
47
|
+
class Suzi {
|
|
48
|
+
gltf = injectGLTF(() => './suzanne-high-poly.gltf');
|
|
49
|
+
|
|
50
|
+
scene = computed(() => {
|
|
51
|
+
const gltf = this.gltf();
|
|
52
|
+
if (!gltf) return null;
|
|
53
|
+
const { scene, materials } = gltf;
|
|
54
|
+
scene.traverse((obj) => (obj as any).isMesh && (obj.receiveShadow = obj.castShadow = true));
|
|
55
|
+
|
|
56
|
+
const material = materials['default'] as MeshStandardMaterial;
|
|
57
|
+
|
|
58
|
+
material.color.set('orange');
|
|
59
|
+
material.roughness = 0;
|
|
60
|
+
material.normalMap = new CanvasTexture(new FlakesTexture(), UVMapping, RepeatWrapping, RepeatWrapping);
|
|
61
|
+
material.normalMap.flipY = false;
|
|
62
|
+
material.normalMap.repeat.set(40, 40);
|
|
63
|
+
material.normalScale.set(0.05, 0.05);
|
|
64
|
+
|
|
65
|
+
return scene;
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## `injectTexture`
|
|
71
|
+
|
|
72
|
+
Injects and loads textures into your Angular component. It takes a function input that returns the URL(s) of the texture(s) and an optional onLoad callback. It returns a signal that holds the loading results.
|
|
73
|
+
|
|
74
|
+
The function also has a static method for preloading textures:
|
|
75
|
+
|
|
76
|
+
- `injectTexture.preload(input: () => TInput): void`: Preloads a texture into the cache.
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
@Component({
|
|
80
|
+
template: `
|
|
81
|
+
<ngt-mesh>
|
|
82
|
+
<ngt-mesh-physical-material [normalMap]="normalMap()" [roughnessMap]="roughnessMap()" />
|
|
83
|
+
</ngt-mesh>
|
|
84
|
+
`,
|
|
85
|
+
})
|
|
86
|
+
export class MyCmp {
|
|
87
|
+
private textures = injectTexture(() => ({
|
|
88
|
+
roughnessMap: 'roughness_floor.jpeg',
|
|
89
|
+
normalMap: 'NORM.jpg',
|
|
90
|
+
}));
|
|
91
|
+
roughnessMap = computed(() => this.textures()?.roughnessMap || null);
|
|
92
|
+
normalMap = computed(() => this.textures()?.normalMap || null);
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## `injectProgress`
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
function injectProgress(injector?: Injector): Signal<{
|
|
100
|
+
errors: string[];
|
|
101
|
+
active: boolean;
|
|
102
|
+
progress: number;
|
|
103
|
+
item: string;
|
|
104
|
+
loaded: number;
|
|
105
|
+
total: number;
|
|
106
|
+
}>;
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Injects a signal that tracks the progress of asset loading in your Angular component. It returns a signal that holds an object with information about the loading progress, errors, and the currently loading item.
|
|
110
|
+
|
|
111
|
+
## `NgtsLoader`
|
|
112
|
+
|
|
113
|
+
A component that renders a loading screen while THREE.js assets are being loaded.
|
|
114
|
+
|
|
115
|
+
### Object Inputs (`NgtsLoaderOptions`)
|
|
116
|
+
|
|
117
|
+
| Property | Description | Default value |
|
|
118
|
+
| ------------------- | ------------------------------------------------------------------------ | ----------------------------------------------- |
|
|
119
|
+
| `containerClass` | Additional CSS classes for the loader's container. | `''` |
|
|
120
|
+
| `innerClass` | Additional CSS classes for the inner loader element. | `''` |
|
|
121
|
+
| `barClass` | Additional CSS classes for the loader bar element. | `''` |
|
|
122
|
+
| `dataClass` | Additional CSS classes for the text element displaying loading progress. | `''` |
|
|
123
|
+
| `dataInterpolation` | A function that formats the displayed loading progress. | `(value: number) => 'Loading ${p.toFixed(2)}%'` |
|
|
124
|
+
| `initialState` | A function that determines the initial visibility of the loader. | `(value: boolean) => value` |
|
|
125
|
+
|
|
126
|
+
`NgtsLoader` is a normal Angular component that renders HTML so it must be put on the same level of `ngt-canvas`, not within.
|
|
127
|
+
|
|
128
|
+
```html
|
|
129
|
+
<ngt-canvas />
|
|
130
|
+
<ngts-loader [options]="loaderOptions" />
|
|
131
|
+
```
|
package/loaders/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
1
|
+
export * from './lib/font-loader';
|
|
2
|
+
export * from './lib/gltf-loader';
|
|
3
|
+
export * from './lib/loader';
|
|
4
|
+
export * from './lib/progress';
|
|
5
|
+
export * from './lib/texture-loader';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { Font } from 'three-stdlib';
|
|
3
|
+
export type Glyph = {
|
|
4
|
+
_cachedOutline: string[];
|
|
5
|
+
ha: number;
|
|
6
|
+
o: string;
|
|
7
|
+
};
|
|
8
|
+
export type FontData = {
|
|
9
|
+
boundingBox: {
|
|
10
|
+
yMax: number;
|
|
11
|
+
yMin: number;
|
|
12
|
+
};
|
|
13
|
+
familyName: string;
|
|
14
|
+
glyphs: {
|
|
15
|
+
[k: string]: Glyph;
|
|
16
|
+
};
|
|
17
|
+
resolution: number;
|
|
18
|
+
underlineThickness: number;
|
|
19
|
+
};
|
|
20
|
+
export type NgtsFontInput = string | FontData;
|
|
21
|
+
export declare function injectFont(input: () => NgtsFontInput, { injector }?: {
|
|
22
|
+
injector?: Injector;
|
|
23
|
+
}): import("@angular/core").Signal<Font | null>;
|
|
24
|
+
export declare namespace injectFont {
|
|
25
|
+
var preload: (input: () => NgtsFontInput) => void;
|
|
26
|
+
var clear: (input?: () => NgtsFontInput) => void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Injector, Signal } from '@angular/core';
|
|
2
|
+
import { NgtLoaderResults, NgtObjectMap } from 'angular-three';
|
|
3
|
+
import { GLTF, GLTFLoader } from 'three-stdlib';
|
|
4
|
+
export type NgtsGLTF<T extends Partial<NgtObjectMap>> = GLTF & NgtObjectMap & T;
|
|
5
|
+
declare function _injectGLTF<TUrl extends string | string[] | Record<string, string>>(path: () => TUrl, { useDraco, useMeshOpt, injector, extensions, }?: {
|
|
6
|
+
useDraco?: boolean | string;
|
|
7
|
+
useMeshOpt?: boolean;
|
|
8
|
+
injector?: Injector;
|
|
9
|
+
extensions?: (loader: GLTFLoader) => void;
|
|
10
|
+
}): Signal<NgtLoaderResults<TUrl, GLTF & NgtObjectMap> | null>;
|
|
11
|
+
declare namespace _injectGLTF {
|
|
12
|
+
var preload: <TUrl extends string | string[] | Record<string, string>>(path: () => TUrl, { useDraco, useMeshOpt, extensions, }?: {
|
|
13
|
+
useDraco?: boolean | string;
|
|
14
|
+
useMeshOpt?: boolean;
|
|
15
|
+
extensions?: (loader: GLTFLoader) => void;
|
|
16
|
+
}) => void;
|
|
17
|
+
var setDecoderPath: (path: string) => void;
|
|
18
|
+
}
|
|
19
|
+
export type NgtsGLTFLoader = typeof _injectGLTF;
|
|
20
|
+
export declare const injectGLTF: NgtsGLTFLoader;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export interface NgtsLoaderOptions {
|
|
4
|
+
containerClass?: string;
|
|
5
|
+
innerClass?: string;
|
|
6
|
+
barClass?: string;
|
|
7
|
+
dataClass?: string;
|
|
8
|
+
dataInterpolation: (value: number) => string;
|
|
9
|
+
initialState: (value: boolean) => boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare class NgtsLoader {
|
|
12
|
+
private progressState;
|
|
13
|
+
active: import("@angular/core").Signal<boolean>;
|
|
14
|
+
progress: import("@angular/core").Signal<number>;
|
|
15
|
+
options: import("@angular/core").InputSignalWithTransform<NgtsLoaderOptions, "" | Partial<NgtsLoaderOptions>>;
|
|
16
|
+
containerClass: import("@angular/core").Signal<string | undefined>;
|
|
17
|
+
innerClass: import("@angular/core").Signal<string | undefined>;
|
|
18
|
+
barClass: import("@angular/core").Signal<string | undefined>;
|
|
19
|
+
dataClass: import("@angular/core").Signal<string | undefined>;
|
|
20
|
+
initialState: import("@angular/core").Signal<(value: boolean) => boolean>;
|
|
21
|
+
dataInterpolation: import("@angular/core").Signal<(value: number) => string>;
|
|
22
|
+
progressSpanRef: import("@angular/core").Signal<ElementRef<HTMLSpanElement> | undefined>;
|
|
23
|
+
shown: import("@angular/core").WritableSignal<boolean>;
|
|
24
|
+
constructor();
|
|
25
|
+
private setShown;
|
|
26
|
+
private updateProgress;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsLoader, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsLoader, "ngts-loader", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Injector, Signal } from '@angular/core';
|
|
2
|
+
import { NgtLoaderResults } from 'angular-three';
|
|
3
|
+
import { Texture } from 'three';
|
|
4
|
+
declare function _injectTexture<TInput extends string[] | string | Record<string, string>>(input: () => TInput, { onLoad, injector }?: {
|
|
5
|
+
onLoad?: (texture: Texture[]) => void;
|
|
6
|
+
injector?: Injector;
|
|
7
|
+
}): Signal<NgtLoaderResults<TInput, Texture> | null>;
|
|
8
|
+
declare namespace _injectTexture {
|
|
9
|
+
var preload: <TInput extends string[] | string | Record<string, string>>(input: () => TInput) => void;
|
|
10
|
+
}
|
|
11
|
+
export type NgtsTextureLoader = typeof _injectTexture;
|
|
12
|
+
export declare const injectTexture: NgtsTextureLoader;
|
|
13
|
+
export {};
|
package/materials/README.md
CHANGED
|
@@ -1,3 +1,161 @@
|
|
|
1
|
-
# angular-three-soba/materials
|
|
1
|
+
# `angular-three-soba/materials`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This secondary entry point includes a variety of materials for customizing the appearance of your 3D objects.
|
|
4
|
+
|
|
5
|
+
| Package | Description |
|
|
6
|
+
| ------------------------------ | ------------------------------------------------------------------------------------------------------------- |
|
|
7
|
+
| `three-custom-shader-material` | Required by `NgtsCustomShaderMaterial`. A custom shader material that can be used to create custom materials. |
|
|
8
|
+
| `@pmndrs/vanilla` | A list of vanilla THREE.js implementations of various things. |
|
|
9
|
+
| `three-mesh-bvh` | Required by `NgtsMeshRefractionMaterial`. A BVH implementation for three.js. |
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install three-custom-shader-material @pmndrs/vanilla
|
|
13
|
+
# yarn add three-custom-shader-material @pmndrs/vanilla three-mesh-bvh
|
|
14
|
+
# pnpm add three-custom-shader-material @pmndrs/vanilla three-mesh-bvh
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## TOC
|
|
18
|
+
|
|
19
|
+
- [NgtsCustomShaderMaterial](#ngtscustomshadermaterial)
|
|
20
|
+
- [NgtsMeshReflectorMaterial](#ngtsmeshreflectormaterial)
|
|
21
|
+
- [NgtsMeshTransmissionMaterial](#ngtsmeshtransmissionmaterial)
|
|
22
|
+
- [NgtsMeshWobbleMaterial](#ngtsmeshwobblematerial)
|
|
23
|
+
- [NgtsMeshRefractionMaterial](#ngtsmeshrefractionmaterial)
|
|
24
|
+
|
|
25
|
+
## NgtsCustomShaderMaterial
|
|
26
|
+
|
|
27
|
+
A component that allows you to create custom shader materials using the `three-custom-shader-material` library. It provides a flexible way to define your own shaders and control the rendering of your objects.
|
|
28
|
+
|
|
29
|
+
### Object Input (`NgtsCustomShaderMaterialOptions`)
|
|
30
|
+
|
|
31
|
+
| Property | Description | Default Value |
|
|
32
|
+
| ---------------- | ------------------------------------------------------------------ | ------------- |
|
|
33
|
+
| `baseMaterial` | Required. The base material to use for the custom shader material. | `undefined` |
|
|
34
|
+
| `vertexShader` | The vertex shader code. | `undefined` |
|
|
35
|
+
| `fragmentShader` | The fragment shader code. | `undefined` |
|
|
36
|
+
| `uniforms` | An object containing the uniforms for the shader. | `{}` |
|
|
37
|
+
| `defines` | An object containing the defines for the shader. | `{}` |
|
|
38
|
+
| `transparent` | Whether the material is transparent. | `false` |
|
|
39
|
+
| `wireframe` | Whether to render the material in wireframe mode. | `false` |
|
|
40
|
+
| `depthTest` | Whether to enable depth testing. | `true` |
|
|
41
|
+
| `depthWrite` | Whether to write to the depth buffer. | `true` |
|
|
42
|
+
| `clipping` | Whether to enable clipping. | `true` |
|
|
43
|
+
| `extensions` | An object containing extensions for the shader. | `{}` |
|
|
44
|
+
|
|
45
|
+
```html
|
|
46
|
+
<ngt-group>
|
|
47
|
+
<ngt-points>
|
|
48
|
+
<ngt-icosahedron-geometry *args="[1, 32]" />
|
|
49
|
+
<ngts-custom-shader-material [baseMaterial]="PointsMaterial" [options]="options()" />
|
|
50
|
+
</ngt-points>
|
|
51
|
+
</ngt-group>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## NgtsMeshReflectorMaterial
|
|
55
|
+
|
|
56
|
+
A component that creates a reflective material with optional blur for your meshes. It is based on the `MeshReflectorMaterial` class from the `@pmndrs/vanilla` library.
|
|
57
|
+
|
|
58
|
+
### Object Input (`NgtsMeshReflectorMaterialOptions`)
|
|
59
|
+
|
|
60
|
+
| Property | Description | Default Value |
|
|
61
|
+
| -------------------- | ------------------------------------ | ------------- |
|
|
62
|
+
| `color` | The color of the material. | `0xffffff` |
|
|
63
|
+
| `reflectivity` | The reflectivity of the material. | `1` |
|
|
64
|
+
| `roughness` | The roughness of the material. | `0.5` |
|
|
65
|
+
| `metalness` | The metalness of the material. | `0.5` |
|
|
66
|
+
| `aoMapIntensity` | The ambient occlusion map intensity. | `1` |
|
|
67
|
+
| `envMapIntensity` | The environment map intensity. | `1` |
|
|
68
|
+
| `normalMapIntensity` | The normal map intensity. | `1` |
|
|
69
|
+
| `displacementScale` | The displacement scale. | `1` |
|
|
70
|
+
|
|
71
|
+
```html
|
|
72
|
+
<ngt-group>
|
|
73
|
+
<ngt-box-geometry *args="[1, 1, 1]" />
|
|
74
|
+
<ngts-mesh-reflector-material [options]="options()" />
|
|
75
|
+
</ngt-group>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## NgtsMeshTransmissionMaterial
|
|
79
|
+
|
|
80
|
+
A component that creates a transmission material with effects like chromatic aberration and roughness blur. It is based on the `MeshTransmissionMaterial` class from the `@pmndrs/vanilla` library.
|
|
81
|
+
|
|
82
|
+
### Object Input (`NgtsMeshTransmissionMaterialOptions`)
|
|
83
|
+
|
|
84
|
+
| Property | Description | Default Value |
|
|
85
|
+
| ------------------------- | -------------------------------------------------------------- | ------------- |
|
|
86
|
+
| `transmission` | The transmission factor of the material. | `1` |
|
|
87
|
+
| `thickness` | The thickness of the material. | `0` |
|
|
88
|
+
| `roughness` | The roughness of the material. | `0` |
|
|
89
|
+
| `chromaticAberration` | The amount of chromatic aberration. | `0.06` |
|
|
90
|
+
| `anisotropicBlur` | The amount of anisotropic blur. | `0.1` |
|
|
91
|
+
| `distortion` | The amount of distortion. | `0` |
|
|
92
|
+
| `distortionScale` | The scale of the distortion. | `0.3` |
|
|
93
|
+
| `temporalDistortion` | The amount of temporal distortion. | `0.5` |
|
|
94
|
+
| `transmissionSampler` | Whether to use the three.js transmission sampler texture. | `false` |
|
|
95
|
+
| `backside` | Whether to render the backside of the material. | `false` |
|
|
96
|
+
| `backsideThickness` | The thickness of the backside of the material. | `0` |
|
|
97
|
+
| `backsideEnvMapIntensity` | The environment map intensity of the backside of the material. | `1` |
|
|
98
|
+
| `resolution` | The resolution of the local buffer. | `undefined` |
|
|
99
|
+
| `backsideResolution` | The resolution of the local buffer for backfaces. | `undefined` |
|
|
100
|
+
| `samples` | The number of refraction samples. | `10` |
|
|
101
|
+
| `background` | The background of the buffer scene. | `null` |
|
|
102
|
+
|
|
103
|
+
```html
|
|
104
|
+
<ngt-group>
|
|
105
|
+
<ngt-box-geometry *args="[1, 1, 1]" />
|
|
106
|
+
<ngts-mesh-transmission-material [options]="options()" />
|
|
107
|
+
</ngt-group>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## NgtsMeshWobbleMaterial
|
|
111
|
+
|
|
112
|
+
A component that creates a material that makes your geometry wobble and wave around.
|
|
113
|
+
|
|
114
|
+
### Object Input (`NgtsMeshWobbleMaterialOptions`)
|
|
115
|
+
|
|
116
|
+
| Property | Description | Default Value |
|
|
117
|
+
| -------- | ---------------------------------- | ------------- |
|
|
118
|
+
| `speed` | The speed of the wobble effect. | `1` |
|
|
119
|
+
| `factor` | The strength of the wobble effect. | `0.6` |
|
|
120
|
+
|
|
121
|
+
```html
|
|
122
|
+
<ngt-group>
|
|
123
|
+
<ngt-box-geometry *args="[1, 1, 1]" />
|
|
124
|
+
<ngts-mesh-wobble-material [options]="options()" />
|
|
125
|
+
</ngt-group>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## NgtsMeshRefractionMaterial
|
|
129
|
+
|
|
130
|
+
A convincing Glass/Diamond refraction material.
|
|
131
|
+
|
|
132
|
+
### Object Input (`NgtsMeshRefractionMaterialOptions`)
|
|
133
|
+
|
|
134
|
+
| Property | Description | Default Value |
|
|
135
|
+
| -------------------- | ------------------------------------------------------------------------------- | ------------- |
|
|
136
|
+
| `envMap` | (Required) The environment map. | |
|
|
137
|
+
| `bounces` | The number of ray-cast bounces. | `2` |
|
|
138
|
+
| `ior` | The refraction index. | `2.4` |
|
|
139
|
+
| `fresnel` | The Fresnel (strip light). | `0` |
|
|
140
|
+
| `aberrationStrength` | The RGB shift intensity. | `0` |
|
|
141
|
+
| `color` | The color of the material. | `0xffffff` |
|
|
142
|
+
| `fastChroma` | Whether to use fewer ray casts for the RGB shift sacrificing physical accuracy. | `true` |
|
|
143
|
+
|
|
144
|
+
If you want it to reflect other objects in the scene you best pair it with a cube-camera.
|
|
145
|
+
|
|
146
|
+
```html
|
|
147
|
+
<ngts-cube-camera>
|
|
148
|
+
<ngt-mesh *cameraContent="let texture">
|
|
149
|
+
<ngts-mesh-refraction-material [envMap]="texture()" />
|
|
150
|
+
</ngt-mesh>
|
|
151
|
+
</ngts-cube-camera>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Otherwise, just pass it an environment map.
|
|
155
|
+
|
|
156
|
+
```html
|
|
157
|
+
<!-- texture = injectLoader(() => RGBELoader, () => 'path/to/texture.hdr') -->
|
|
158
|
+
<ngt-mesh>
|
|
159
|
+
<ngts-mesh-refraction-material [envMap]="texture()" />
|
|
160
|
+
</ngt-mesh>
|
|
161
|
+
```
|
package/materials/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
1
|
+
export * from './lib/custom-shader-material';
|
|
2
|
+
export * from './lib/mesh-distort-material';
|
|
3
|
+
export * from './lib/mesh-reflector-material';
|
|
4
|
+
export * from './lib/mesh-refraction-material';
|
|
5
|
+
export * from './lib/mesh-transmission-material';
|
|
6
|
+
export * from './lib/mesh-wobble-material';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { Material } from 'three';
|
|
3
|
+
import CustomShaderMaterial from 'three-custom-shader-material/vanilla';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class NgtsCustomShaderMaterial {
|
|
6
|
+
baseMaterial: import("@angular/core").InputSignal<Material | typeof Material | ElementRef<Material>>;
|
|
7
|
+
attach: import("@angular/core").InputSignal<string | string[]>;
|
|
8
|
+
options: import("@angular/core").InputSignal<Omit<import("three-custom-shader-material/vanilla").iCSMParams<import("three-custom-shader-material/vanilla").MaterialConstructor>, "baseMaterial">>;
|
|
9
|
+
parameters: import("@angular/core").Signal<Omit<Omit<import("three-custom-shader-material/vanilla").iCSMParams<import("three-custom-shader-material/vanilla").MaterialConstructor>, "baseMaterial">, "vertexShader" | "fragmentShader" | "cacheKey" | "uniforms">>;
|
|
10
|
+
base: import("@angular/core").Signal<Material | typeof Material>;
|
|
11
|
+
private fragmentShader;
|
|
12
|
+
private vertexShader;
|
|
13
|
+
private uniforms;
|
|
14
|
+
private cacheKey;
|
|
15
|
+
material: import("@angular/core").Signal<CustomShaderMaterial<import("three-custom-shader-material/vanilla").MaterialConstructor>>;
|
|
16
|
+
constructor();
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsCustomShaderMaterial, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsCustomShaderMaterial, "ngts-custom-shader-material", never, { "baseMaterial": { "alias": "baseMaterial"; "required": true; "isSignal": true; }; "attach": { "alias": "attach"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MeshDistortMaterial } from '@pmndrs/vanilla';
|
|
2
|
+
import { NgtMeshPhysicalMaterial } from 'angular-three';
|
|
3
|
+
import { MeshDistortMaterialParameters } from 'angular-three-soba/vanilla-exports';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface NgtsMeshDistortMaterialOptions extends Partial<MeshDistortMaterialParameters>, Partial<NgtMeshPhysicalMaterial> {
|
|
6
|
+
speed: number;
|
|
7
|
+
factor?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare class NgtsMeshDistortMaterial {
|
|
10
|
+
attach: import("@angular/core").InputSignal<string>;
|
|
11
|
+
options: import("@angular/core").InputSignalWithTransform<NgtsMeshDistortMaterialOptions, "" | Partial<NgtsMeshDistortMaterialOptions>>;
|
|
12
|
+
parameters: import("@angular/core").Signal<Omit<NgtsMeshDistortMaterialOptions, "speed">>;
|
|
13
|
+
material: MeshDistortMaterial;
|
|
14
|
+
private speed;
|
|
15
|
+
constructor();
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsMeshDistortMaterial, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsMeshDistortMaterial, "ngts-mesh-distort-material", never, { "attach": { "alias": "attach"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { NgtMeshStandardMaterial } from 'angular-three';
|
|
2
|
+
import { MeshReflectorMaterial } from 'angular-three-soba/vanilla-exports';
|
|
3
|
+
import { Texture } from 'three';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface NgtsMeshReflectorMaterialOptions extends Partial<NgtMeshStandardMaterial> {
|
|
6
|
+
resolution: number;
|
|
7
|
+
mixBlur: number;
|
|
8
|
+
mixStrength: number;
|
|
9
|
+
blur: [number, number] | number;
|
|
10
|
+
mirror: number;
|
|
11
|
+
minDepthThreshold: number;
|
|
12
|
+
maxDepthThreshold: number;
|
|
13
|
+
depthScale: number;
|
|
14
|
+
depthToBlurRatioBias: number;
|
|
15
|
+
distortion: number;
|
|
16
|
+
mixContrast: number;
|
|
17
|
+
reflectorOffset: number;
|
|
18
|
+
distortionMap?: Texture;
|
|
19
|
+
}
|
|
20
|
+
export declare class NgtsMeshReflectorMaterial {
|
|
21
|
+
attach: import("@angular/core").InputSignal<string>;
|
|
22
|
+
options: import("@angular/core").InputSignalWithTransform<NgtsMeshReflectorMaterialOptions, "" | Partial<NgtsMeshReflectorMaterialOptions>>;
|
|
23
|
+
private parameters;
|
|
24
|
+
private store;
|
|
25
|
+
private gl;
|
|
26
|
+
private materialRef;
|
|
27
|
+
private reflectOptions;
|
|
28
|
+
private blur;
|
|
29
|
+
private normalizedBlur;
|
|
30
|
+
private hasBlur;
|
|
31
|
+
private reflectorPlane;
|
|
32
|
+
private normal;
|
|
33
|
+
private reflectorWorldPosition;
|
|
34
|
+
private cameraWorldPosition;
|
|
35
|
+
private rotationMatrix;
|
|
36
|
+
private lookAtPosition;
|
|
37
|
+
private clipPlane;
|
|
38
|
+
private view;
|
|
39
|
+
private target;
|
|
40
|
+
private q;
|
|
41
|
+
private textureMatrix;
|
|
42
|
+
private virtualCamera;
|
|
43
|
+
private reflectState;
|
|
44
|
+
private definesKey;
|
|
45
|
+
material: import("@angular/core").Signal<MeshReflectorMaterial>;
|
|
46
|
+
constructor();
|
|
47
|
+
private beforeRender;
|
|
48
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsMeshReflectorMaterial, never>;
|
|
49
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsMeshReflectorMaterial, "ngts-mesh-reflector-material", never, { "attach": { "alias": "attach"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
50
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { NgtShaderMaterial } from 'angular-three';
|
|
3
|
+
import { ColorRepresentation, CubeTexture, Texture } from 'three';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface NgtsMeshRefractionMaterialOptions extends Partial<NgtShaderMaterial> {
|
|
6
|
+
/** Number of ray-cast bounces, it can be expensive to have too many, 2 */
|
|
7
|
+
bounces: number;
|
|
8
|
+
/** Refraction index, 2.4 */
|
|
9
|
+
ior: number;
|
|
10
|
+
/** Fresnel (strip light), 0 */
|
|
11
|
+
fresnel: number;
|
|
12
|
+
/** RGB shift intensity, can be expensive, 0 */
|
|
13
|
+
aberrationStrength: number;
|
|
14
|
+
/** Color, white */
|
|
15
|
+
color: ColorRepresentation;
|
|
16
|
+
/** If this is on it uses fewer ray casts for the RGB shift sacrificing physical accuracy, true */
|
|
17
|
+
fastChroma: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare class NgtsMeshRefractionMaterial {
|
|
20
|
+
envMap: import("@angular/core").InputSignal<Texture | CubeTexture>;
|
|
21
|
+
attach: import("@angular/core").InputSignal<string>;
|
|
22
|
+
options: import("@angular/core").InputSignalWithTransform<NgtsMeshRefractionMaterialOptions, "" | Partial<NgtsMeshRefractionMaterialOptions>>;
|
|
23
|
+
parameters: import("@angular/core").Signal<Omit<NgtsMeshRefractionMaterialOptions, "aberrationStrength" | "fastChroma">>;
|
|
24
|
+
private fastChroma;
|
|
25
|
+
aberrationStrength: import("@angular/core").Signal<number>;
|
|
26
|
+
materialRef: import("@angular/core").Signal<ElementRef<import("three").ShaderMaterial & {
|
|
27
|
+
[name: string]: number | boolean | any[] | import("three").Color | Texture | import("three").Vector3 | import("three").Matrix4 | import("three").Vector4 | import("three").Quaternion | import("three").Matrix3 | CubeTexture | Int32Array | Float32Array | import("three").Vector2 | null;
|
|
28
|
+
}> | undefined>;
|
|
29
|
+
private store;
|
|
30
|
+
private size;
|
|
31
|
+
resolution: import("@angular/core").Signal<number[]>;
|
|
32
|
+
defines: import("@angular/core").Signal<{
|
|
33
|
+
[key: string]: string;
|
|
34
|
+
}>;
|
|
35
|
+
private defineKeys;
|
|
36
|
+
material: import("@angular/core").Signal<import("three").ShaderMaterial & {
|
|
37
|
+
[name: string]: number | boolean | any[] | import("three").Color | Texture | import("three").Vector3 | import("three").Matrix4 | import("three").Vector4 | import("three").Quaternion | import("three").Matrix3 | CubeTexture | Int32Array | Float32Array | import("three").Vector2 | null;
|
|
38
|
+
}>;
|
|
39
|
+
constructor();
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgtsMeshRefractionMaterial, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgtsMeshRefractionMaterial, "ngts-mesh-refraction-material", never, { "envMap": { "alias": "envMap"; "required": true; "isSignal": true; }; "attach": { "alias": "attach"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
42
|
+
}
|