@takram/three-clouds 0.2.1 → 0.3.0

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.
@@ -11,7 +11,6 @@ uniform vec3 sunDirection;
11
11
  // Participating medium
12
12
  uniform float scatteringCoefficient;
13
13
  uniform float absorptionCoefficient;
14
- uniform vec3 albedo;
15
14
 
16
15
  // Primary raymarch
17
16
  uniform float minDensity;
@@ -43,6 +42,8 @@ uniform float turbulenceDisplacement;
43
42
  #ifdef HAZE
44
43
  uniform float hazeDensityScale;
45
44
  uniform float hazeExponent;
45
+ uniform float hazeScatteringCoefficient;
46
+ uniform float hazeAbsorptionCoefficient;
46
47
  #endif // HAZE
47
48
 
48
49
  // Cloud layers
@@ -11,7 +11,7 @@ import { ProceduralTexture } from './ProceduralTexture';
11
11
  import { QualityPreset } from './qualityPresets';
12
12
  import { ShadowMaterial } from './ShadowMaterial';
13
13
  import { ShadowPass } from './ShadowPass';
14
- declare const cloudsUniformKeys: ["maxIterationCount", "minStepSize", "maxStepSize", "maxRayDistance", "perspectiveStepScale", "minDensity", "minExtinction", "minTransmittance", "maxIterationCountToSun", "maxIterationCountToGround", "minSecondaryStepSize", "secondaryStepScale", "maxShadowFilterRadius", "maxShadowLengthIterationCount", "minShadowLengthStepSize", "maxShadowLengthRayDistance", "hazeDensityScale", "hazeExponent"];
14
+ declare const cloudsUniformKeys: ["maxIterationCount", "minStepSize", "maxStepSize", "maxRayDistance", "perspectiveStepScale", "minDensity", "minExtinction", "minTransmittance", "maxIterationCountToSun", "maxIterationCountToGround", "minSecondaryStepSize", "secondaryStepScale", "maxShadowFilterRadius", "maxShadowLengthIterationCount", "minShadowLengthStepSize", "maxShadowLengthRayDistance", "hazeDensityScale", "hazeExponent", "hazeScatteringCoefficient", "hazeAbsorptionCoefficient"];
15
15
  declare const cloudsMaterialParameterKeys: ["multiScatteringOctaves", "accurateSunSkyIrradiance", "accuratePhaseFunction"];
16
16
  declare const shadowUniformKeys: ["maxIterationCount", "minStepSize", "maxStepSize", "minDensity", "minExtinction", "minTransmittance", "opticalDepthTailScale"];
17
17
  declare const shadowMaterialParameterKeys: ["temporalJitter"];
@@ -1,4 +1,4 @@
1
- import { Matrix4, Uniform, Vector2, Vector3, BufferGeometry, Camera, Data3DTexture, DataArrayTexture, Group, Object3D, Scene, Texture, WebGLRenderer } from 'three';
1
+ import { Matrix4, Uniform, Vector2, BufferGeometry, Camera, Data3DTexture, DataArrayTexture, Group, Object3D, Scene, Texture, WebGLRenderer } from 'three';
2
2
  import { AtmosphereMaterialBase, AtmosphereParameters, AtmosphereMaterialBaseUniforms } from '@takram/three-atmosphere';
3
3
  import { AtmosphereUniforms, CloudLayerUniforms, CloudParameterUniforms } from './uniforms';
4
4
  declare module 'three' {
@@ -26,7 +26,6 @@ export interface CloudsMaterialUniforms extends CloudParameterUniforms, CloudLay
26
26
  targetUvScale: Uniform<Vector2>;
27
27
  mipLevelScale: Uniform<number>;
28
28
  stbnTexture: Uniform<Data3DTexture | null>;
29
- albedo: Uniform<Vector3>;
30
29
  skyIrradianceScale: Uniform<number>;
31
30
  groundIrradianceScale: Uniform<number>;
32
31
  powderScale: Uniform<number>;
@@ -54,6 +53,8 @@ export interface CloudsMaterialUniforms extends CloudParameterUniforms, CloudLay
54
53
  maxShadowLengthRayDistance: Uniform<number>;
55
54
  hazeDensityScale: Uniform<number>;
56
55
  hazeExponent: Uniform<number>;
56
+ hazeScatteringCoefficient: Uniform<number>;
57
+ hazeAbsorptionCoefficient: Uniform<number>;
57
58
  }
58
59
  export declare class CloudsMaterial extends AtmosphereMaterialBase {
59
60
  uniforms: AtmosphereMaterialBaseUniforms & CloudsMaterialUniforms;
@@ -1,6 +1,8 @@
1
+ import { FC, Ref } from 'react';
1
2
  import { ExpandNestedProps } from '@takram/three-geospatial/r3f';
2
3
  import { CloudLayer as CloudLayerImpl, CloudLayerLike } from '../CloudLayer';
3
4
  export interface CloudLayerProps extends CloudLayerLike, ExpandNestedProps<CloudLayerLike, 'densityProfile'> {
5
+ ref?: Ref<CloudLayerImpl>;
4
6
  index?: number;
5
7
  }
6
- export declare const CloudLayer: import('react').ForwardRefExoticComponent<CloudLayerProps & import('react').RefAttributes<CloudLayerImpl>>;
8
+ export declare const CloudLayer: FC<CloudLayerProps>;
@@ -1,4 +1,5 @@
1
1
  import { ElementProps } from '@react-three/fiber';
2
+ import { FC } from 'react';
2
3
  import { Data3DTexture, Texture } from 'three';
3
4
  import { ExpandNestedProps } from '@takram/three-geospatial/r3f';
4
5
  import { CloudsEffect } from '../CloudsEffect';
@@ -12,4 +13,4 @@ export interface CloudsProps extends Omit<ElementProps<typeof CloudsEffect, Clou
12
13
  turbulenceTexture?: Texture | ProceduralTexture | string;
13
14
  stbnTexture?: Data3DTexture | string;
14
15
  }
15
- export declare const Clouds: import('react').ForwardRefExoticComponent<Omit<CloudsProps, "ref"> & import('react').RefAttributes<CloudsEffect>>;
16
+ export declare const Clouds: FC<CloudsProps>;