@takram/three-clouds 0.1.1 → 0.1.3
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/CHANGELOG.md +10 -0
- package/package.json +3 -3
- package/types/CascadedShadowMaps.d.ts +1 -2
- package/types/CloudLayer.d.ts +0 -1
- package/types/CloudLayers.d.ts +2 -3
- package/types/CloudShape.d.ts +0 -1
- package/types/CloudShapeDetail.d.ts +0 -1
- package/types/CloudsEffect.d.ts +12 -13
- package/types/CloudsMaterial.d.ts +2 -3
- package/types/CloudsPass.d.ts +6 -7
- package/types/CloudsResolveMaterial.d.ts +0 -1
- package/types/LocalWeather.d.ts +0 -1
- package/types/PassBase.d.ts +2 -3
- package/types/Procedural3DTexture.d.ts +1 -2
- package/types/ProceduralTexture.d.ts +0 -1
- package/types/ShaderArrayPass.d.ts +1 -2
- package/types/ShadowMaterial.d.ts +1 -2
- package/types/ShadowPass.d.ts +5 -6
- package/types/ShadowResolveMaterial.d.ts +0 -1
- package/types/Turbulence.d.ts +0 -1
- package/types/bayer.d.ts +0 -1
- package/types/helpers/FrustumCorners.d.ts +0 -1
- package/types/helpers/setArrayRenderTargetLayers.d.ts +0 -1
- package/types/qualityPresets.d.ts +2 -3
- package/types/r3f/CloudLayer.d.ts +1 -2
- package/types/r3f/CloudLayers.d.ts +1 -2
- package/types/r3f/Clouds.d.ts +4 -5
- package/types/uniforms.d.ts +3 -4
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takram/three-clouds",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "A Three.js and R3F implementation of geospatial volumetric clouds",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"three",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"README.md"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@takram/three-atmosphere": "0.10.
|
|
49
|
-
"@takram/three-geospatial": "0.
|
|
48
|
+
"@takram/three-atmosphere": "0.10.2",
|
|
49
|
+
"@takram/three-geospatial": "0.1.0",
|
|
50
50
|
"tiny-invariant": "^1.3.3",
|
|
51
51
|
"type-fest": "^4.34.1"
|
|
52
52
|
},
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { FrustumSplitMode } from './helpers/splitFrustum';
|
|
2
1
|
import { Matrix4, Vector2, Vector3, PerspectiveCamera } from 'three';
|
|
3
|
-
|
|
2
|
+
import { FrustumSplitMode } from './helpers/splitFrustum';
|
|
4
3
|
export interface Cascade {
|
|
5
4
|
readonly interval: Vector2;
|
|
6
5
|
readonly matrix: Matrix4;
|
package/types/CloudLayer.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DensityProfile, DensityProfileLike } from './DensityProfile';
|
|
2
|
-
|
|
3
2
|
declare const paramKeys: readonly ["channel", "altitude", "height", "densityScale", "shapeAmount", "shapeDetailAmount", "weatherExponent", "shapeAlteringBias", "coverageFilterWidth", "shadow", "densityProfile"];
|
|
4
3
|
export interface CloudLayerLike extends Partial<Pick<CloudLayer, Exclude<(typeof paramKeys)[number], 'densityProfile'>>> {
|
|
5
4
|
densityProfile?: DensityProfileLike;
|
package/types/CloudLayers.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { DensityProfileLike } from './DensityProfile';
|
|
2
|
-
import { CloudLayer, CloudLayerLike } from './CloudLayer';
|
|
3
1
|
import { Vector3, Vector4 } from 'three';
|
|
4
|
-
|
|
2
|
+
import { CloudLayer, CloudLayerLike } from './CloudLayer';
|
|
3
|
+
import { DensityProfileLike } from './DensityProfile';
|
|
5
4
|
type NumericKey = keyof {
|
|
6
5
|
[P in keyof CloudLayer as number extends CloudLayer[P] ? P : never]: any;
|
|
7
6
|
};
|
package/types/CloudShape.d.ts
CHANGED
package/types/CloudsEffect.d.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { ShadowPass } from './ShadowPass';
|
|
2
|
-
import { ShadowMaterial } from './ShadowMaterial';
|
|
3
|
-
import { QualityPreset } from './qualityPresets';
|
|
4
|
-
import { ProceduralTexture } from './ProceduralTexture';
|
|
5
|
-
import { Procedural3DTexture } from './Procedural3DTexture';
|
|
6
|
-
import { CloudsPass } from './CloudsPass';
|
|
7
|
-
import { CloudsMaterial } from './CloudsMaterial';
|
|
8
|
-
import { CloudLayers } from './CloudLayers';
|
|
9
|
-
import { CascadedShadowMaps } from './CascadedShadowMaps';
|
|
10
|
-
import { UniformMap, Ellipsoid, PropertyShorthand, UniformShorthand } from '@takram/three-geospatial';
|
|
11
|
-
import { AtmosphereParameters, AtmosphereOverlay, AtmosphereShadow, AtmosphereShadowLength } from '@takram/three-atmosphere';
|
|
12
|
-
import { Camera, Data3DTexture, EventDispatcher, Matrix4, Texture, Uniform, Vector2, Vector3, DataTexture, DepthPackingStrategies, TextureDataType, WebGLRenderer, WebGLRenderTarget } from 'three';
|
|
13
1
|
import { Effect, Resolution } from 'postprocessing';
|
|
14
|
-
|
|
2
|
+
import { Camera, Data3DTexture, EventDispatcher, Matrix4, Texture, Uniform, Vector2, Vector3, DataTexture, DepthPackingStrategies, TextureDataType, WebGLRenderer, WebGLRenderTarget } from 'three';
|
|
3
|
+
import { AtmosphereParameters, AtmosphereOverlay, AtmosphereShadow, AtmosphereShadowLength } from '@takram/three-atmosphere';
|
|
4
|
+
import { UniformMap, Ellipsoid, PropertyShorthand, UniformShorthand } from '@takram/three-geospatial';
|
|
5
|
+
import { CascadedShadowMaps } from './CascadedShadowMaps';
|
|
6
|
+
import { CloudLayers } from './CloudLayers';
|
|
7
|
+
import { CloudsMaterial } from './CloudsMaterial';
|
|
8
|
+
import { CloudsPass } from './CloudsPass';
|
|
9
|
+
import { Procedural3DTexture } from './Procedural3DTexture';
|
|
10
|
+
import { ProceduralTexture } from './ProceduralTexture';
|
|
11
|
+
import { QualityPreset } from './qualityPresets';
|
|
12
|
+
import { ShadowMaterial } from './ShadowMaterial';
|
|
13
|
+
import { ShadowPass } from './ShadowPass';
|
|
15
14
|
declare const cloudsUniformKeys: ["maxIterationCount", "minStepSize", "maxStepSize", "maxRayDistance", "perspectiveStepScale", "minDensity", "minExtinction", "minTransmittance", "maxIterationCountToSun", "maxIterationCountToGround", "minSecondaryStepSize", "secondaryStepScale", "maxShadowFilterRadius", "maxShadowLengthIterationCount", "minShadowLengthStepSize", "maxShadowLengthRayDistance", "hazeDensityScale", "hazeExponent"];
|
|
16
15
|
declare const cloudsMaterialParameterKeys: ["multiScatteringOctaves", "accurateSunSkyIrradiance", "accuratePhaseFunction"];
|
|
17
16
|
declare const shadowUniformKeys: ["maxIterationCount", "minStepSize", "maxStepSize", "minDensity", "minExtinction", "minTransmittance", "opticalDepthTailScale"];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { AtmosphereUniforms, CloudLayerUniforms, CloudParameterUniforms } from './uniforms';
|
|
2
|
-
import { AtmosphereMaterialBase, AtmosphereParameters, AtmosphereMaterialBaseUniforms } from '@takram/three-atmosphere';
|
|
3
1
|
import { Matrix4, Uniform, Vector2, Vector3, BufferGeometry, Camera, Data3DTexture, DataArrayTexture, Group, Object3D, Scene, Texture, WebGLRenderer } from 'three';
|
|
4
|
-
|
|
2
|
+
import { AtmosphereMaterialBase, AtmosphereParameters, AtmosphereMaterialBaseUniforms } from '@takram/three-atmosphere';
|
|
3
|
+
import { AtmosphereUniforms, CloudLayerUniforms, CloudParameterUniforms } from './uniforms';
|
|
5
4
|
declare module 'three' {
|
|
6
5
|
interface Camera {
|
|
7
6
|
isPerspectiveCamera?: boolean;
|
package/types/CloudsPass.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { AtmosphereUniforms, CloudLayerUniforms, CloudParameterUniforms } from './uniforms';
|
|
2
|
-
import { PassBase, PassBaseOptions } from './PassBase';
|
|
3
|
-
import { CloudsResolveMaterial } from './CloudsResolveMaterial';
|
|
4
|
-
import { CloudsMaterial } from './CloudsMaterial';
|
|
5
|
-
import { AtmosphereParameters } from '@takram/three-atmosphere';
|
|
6
|
-
import { Camera, DataArrayTexture, DepthPackingStrategies, Texture, TextureDataType, WebGLRenderer } from 'three';
|
|
7
1
|
import { ShaderPass } from 'postprocessing';
|
|
8
|
-
|
|
2
|
+
import { Camera, DataArrayTexture, DepthPackingStrategies, Texture, TextureDataType, WebGLRenderer } from 'three';
|
|
3
|
+
import { AtmosphereParameters } from '@takram/three-atmosphere';
|
|
4
|
+
import { CloudsMaterial } from './CloudsMaterial';
|
|
5
|
+
import { CloudsResolveMaterial } from './CloudsResolveMaterial';
|
|
6
|
+
import { PassBase, PassBaseOptions } from './PassBase';
|
|
7
|
+
import { AtmosphereUniforms, CloudLayerUniforms, CloudParameterUniforms } from './uniforms';
|
|
9
8
|
export interface CloudsPassOptions extends PassBaseOptions {
|
|
10
9
|
parameterUniforms: CloudParameterUniforms;
|
|
11
10
|
layerUniforms: CloudLayerUniforms;
|
package/types/LocalWeather.d.ts
CHANGED
package/types/PassBase.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { CascadedShadowMaps } from './CascadedShadowMaps';
|
|
2
|
-
import { Camera } from 'three';
|
|
3
1
|
import { Pass } from 'postprocessing';
|
|
4
|
-
|
|
2
|
+
import { Camera } from 'three';
|
|
3
|
+
import { CascadedShadowMaps } from './CascadedShadowMaps';
|
|
5
4
|
export interface PassBaseOptions {
|
|
6
5
|
shadow: CascadedShadowMaps;
|
|
7
6
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ProceduralTexture } from './ProceduralTexture';
|
|
2
1
|
import { Data3DTexture, WebGLRenderer } from 'three';
|
|
3
|
-
|
|
2
|
+
import { ProceduralTexture } from './ProceduralTexture';
|
|
4
3
|
export type Procedural3DTexture = ProceduralTexture<Data3DTexture>;
|
|
5
4
|
export interface Procedural3DTextureBaseParameters {
|
|
6
5
|
size: number;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { WebGLArrayRenderTarget, WebGLRenderer, WebGLRenderTarget } from 'three';
|
|
2
1
|
import { ShaderPass } from 'postprocessing';
|
|
3
|
-
|
|
2
|
+
import { WebGLArrayRenderTarget, WebGLRenderer, WebGLRenderTarget } from 'three';
|
|
4
3
|
export declare class ShaderArrayPass extends ShaderPass {
|
|
5
4
|
input: string;
|
|
6
5
|
render(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget | null, outputBuffer: WebGLArrayRenderTarget, deltaTime?: number, stencilTest?: boolean): void;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { AtmosphereUniforms, CloudLayerUniforms, CloudParameterUniforms } from './uniforms';
|
|
2
1
|
import { Matrix4, RawShaderMaterial, Uniform, Vector2, Data3DTexture } from 'three';
|
|
3
|
-
|
|
2
|
+
import { AtmosphereUniforms, CloudLayerUniforms, CloudParameterUniforms } from './uniforms';
|
|
4
3
|
export interface ShadowMaterialParameters {
|
|
5
4
|
parameterUniforms: CloudParameterUniforms;
|
|
6
5
|
layerUniforms: CloudLayerUniforms;
|
package/types/ShadowPass.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { AtmosphereUniforms, CloudLayerUniforms, CloudParameterUniforms } from './uniforms';
|
|
2
|
-
import { ShadowResolveMaterial } from './ShadowResolveMaterial';
|
|
3
|
-
import { ShadowMaterial } from './ShadowMaterial';
|
|
4
|
-
import { ShaderArrayPass } from './ShaderArrayPass';
|
|
5
|
-
import { PassBase, PassBaseOptions } from './PassBase';
|
|
6
1
|
import { DataArrayTexture, TextureDataType, WebGLRenderer } from 'three';
|
|
7
|
-
|
|
2
|
+
import { PassBase, PassBaseOptions } from './PassBase';
|
|
3
|
+
import { ShaderArrayPass } from './ShaderArrayPass';
|
|
4
|
+
import { ShadowMaterial } from './ShadowMaterial';
|
|
5
|
+
import { ShadowResolveMaterial } from './ShadowResolveMaterial';
|
|
6
|
+
import { AtmosphereUniforms, CloudLayerUniforms, CloudParameterUniforms } from './uniforms';
|
|
8
7
|
export interface ShadowPassOptions extends PassBaseOptions {
|
|
9
8
|
parameterUniforms: CloudParameterUniforms;
|
|
10
9
|
layerUniforms: CloudLayerUniforms;
|
package/types/Turbulence.d.ts
CHANGED
package/types/bayer.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { CloudsEffect } from './CloudsEffect';
|
|
2
|
-
import { SharedUnionFieldsDeep } from 'type-fest';
|
|
3
1
|
import { Vector2 } from 'three';
|
|
4
|
-
|
|
2
|
+
import { SharedUnionFieldsDeep } from 'type-fest';
|
|
3
|
+
import { CloudsEffect } from './CloudsEffect';
|
|
5
4
|
export type QualityPreset = 'low' | 'medium' | 'high' | 'ultra';
|
|
6
5
|
declare const values: {
|
|
7
6
|
resolutionScale: number;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { CloudLayer as CloudLayerImpl, CloudLayerLike } from '../CloudLayer';
|
|
2
1
|
import { ExpandNestedProps } from '@takram/three-geospatial/r3f';
|
|
3
|
-
|
|
2
|
+
import { CloudLayer as CloudLayerImpl, CloudLayerLike } from '../CloudLayer';
|
|
4
3
|
export interface CloudLayerProps extends CloudLayerLike, ExpandNestedProps<CloudLayerLike, 'densityProfile'> {
|
|
5
4
|
index?: number;
|
|
6
5
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { CloudLayers as CloudLayersImpl } from '../CloudLayers';
|
|
2
1
|
import { FC, ReactNode } from 'react';
|
|
3
|
-
|
|
2
|
+
import { CloudLayers as CloudLayersImpl } from '../CloudLayers';
|
|
4
3
|
export interface CloudLayersContextValue {
|
|
5
4
|
layers: CloudLayersImpl;
|
|
6
5
|
indexPool: number[];
|
package/types/r3f/Clouds.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ProceduralTexture } from '../ProceduralTexture';
|
|
2
|
-
import { Procedural3DTexture } from '../Procedural3DTexture';
|
|
3
|
-
import { CloudsEffect } from '../CloudsEffect';
|
|
4
|
-
import { ExpandNestedProps, PassThoughInstanceProps } from '@takram/three-geospatial/r3f';
|
|
5
1
|
import { Data3DTexture, Texture } from 'three';
|
|
6
|
-
|
|
2
|
+
import { ExpandNestedProps, PassThoughInstanceProps } from '@takram/three-geospatial/r3f';
|
|
3
|
+
import { CloudsEffect } from '../CloudsEffect';
|
|
4
|
+
import { Procedural3DTexture } from '../Procedural3DTexture';
|
|
5
|
+
import { ProceduralTexture } from '../ProceduralTexture';
|
|
7
6
|
export interface CloudsProps extends Omit<PassThoughInstanceProps<CloudsEffect, [
|
|
8
7
|
], Partial<CloudsEffect & ExpandNestedProps<CloudsEffect, 'clouds'> & ExpandNestedProps<CloudsEffect, 'shadow'>>>, 'localWeatherTexture' | 'shapeTexture' | 'shapeDetailTexture' | 'turbulenceTexture' | 'stbnTexture'> {
|
|
9
8
|
disableDefaultLayers?: boolean;
|
package/types/uniforms.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { CloudLayers } from './CloudLayers';
|
|
2
|
-
import { AtmosphereParameters } from '@takram/three-atmosphere';
|
|
3
|
-
import { Primitive } from 'type-fest';
|
|
4
1
|
import { Uniform, Vector3, Vector4, Data3DTexture, Matrix4, Texture, Vector2 } from 'three';
|
|
5
|
-
|
|
2
|
+
import { Primitive } from 'type-fest';
|
|
3
|
+
import { AtmosphereParameters } from '@takram/three-atmosphere';
|
|
4
|
+
import { CloudLayers } from './CloudLayers';
|
|
6
5
|
export interface CloudParameterUniforms {
|
|
7
6
|
scatteringCoefficient: Uniform<number>;
|
|
8
7
|
absorptionCoefficient: Uniform<number>;
|