@xviewer.js/postprocessing 1.0.0-beta.2 → 1.0.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.
package/package.json CHANGED
@@ -1,10 +1,6 @@
1
1
  {
2
2
  "name": "@xviewer.js/postprocessing",
3
- "version": "1.0.0-beta.2",
4
- "publishConfig": {
5
- "access": "public",
6
- "registry": "https://registry.npmjs.org"
7
- },
3
+ "version": "1.0.0",
8
4
  "license": "MIT",
9
5
  "type": "module",
10
6
  "sideEffects": false,
@@ -17,7 +13,7 @@
17
13
  "types/**/*"
18
14
  ],
19
15
  "dependencies": {
20
- "@xviewer.js/core": "1.0.0-beta.2"
16
+ "@xviewer.js/core": "1.0.0"
21
17
  },
22
18
  "peerDependencies": {
23
19
  "postprocessing": ">= 6.35.4"
@@ -0,0 +1,14 @@
1
+ import { BloomEffect } from "postprocessing";
2
+ import { PostProcessing } from "./PostProcessing";
3
+ export declare class Bloom extends PostProcessing {
4
+ effect: BloomEffect;
5
+ constructor(props?: ConstructorParameters<typeof BloomEffect>[0]);
6
+ get intensity(): number;
7
+ set intensity(v: number);
8
+ get luminanceThreshold(): number;
9
+ set luminanceThreshold(v: number);
10
+ get luminanceSmoothing(): number;
11
+ set luminanceSmoothing(v: number);
12
+ get blurRadius(): number;
13
+ set blurRadius(v: number);
14
+ }
@@ -1,12 +1,15 @@
1
1
  import { BloomEffect, EffectPass } from "postprocessing";
2
2
  import { PassPlugin } from "./PassPlugin";
3
3
  export declare class BloomPlugin extends PassPlugin<EffectPass> {
4
+ type: string;
4
5
  get intensity(): number;
5
6
  set intensity(v: number);
6
7
  get luminanceThreshold(): number;
7
8
  set luminanceThreshold(v: number);
8
9
  get luminanceSmoothing(): number;
9
10
  set luminanceSmoothing(v: number);
11
+ get blurRadius(): number;
12
+ set blurRadius(v: number);
10
13
  effect: BloomEffect;
11
14
  constructor(props?: ConstructorParameters<typeof BloomEffect>[0]);
12
15
  }
@@ -0,0 +1,15 @@
1
+ import { DepthOfFieldEffect } from "postprocessing";
2
+ import { Vector3 } from "three";
3
+ import { PostProcessing } from "./PostProcessing";
4
+ export declare class DepthOfField extends PostProcessing {
5
+ effect: DepthOfFieldEffect;
6
+ constructor(props?: ConstructorParameters<typeof DepthOfFieldEffect>[1] & {
7
+ target?: Vector3;
8
+ });
9
+ get focusDistance(): number;
10
+ set focusDistance(v: number);
11
+ get focalLength(): number;
12
+ set focalLength(v: number);
13
+ get bokehScale(): number;
14
+ set bokehScale(v: number);
15
+ }
@@ -0,0 +1,16 @@
1
+ import { DepthOfFieldEffect, EffectPass } from "postprocessing";
2
+ import { PassPlugin } from "./PassPlugin";
3
+ import { Vector3 } from "three";
4
+ export declare class DepthOfFieldPlugin extends PassPlugin<EffectPass> {
5
+ type: string;
6
+ effect: DepthOfFieldEffect;
7
+ constructor(props?: ConstructorParameters<typeof DepthOfFieldEffect>[1] & {
8
+ target?: Vector3;
9
+ });
10
+ get focusDistance(): number;
11
+ set focusDistance(v: number);
12
+ get focalLength(): number;
13
+ set focalLength(v: number);
14
+ get bokehScale(): number;
15
+ set bokehScale(v: number);
16
+ }
@@ -1,6 +1,7 @@
1
1
  import { Plugin, Viewer } from "@xviewer.js/core";
2
2
  import { EffectComposer, Pass } from "postprocessing";
3
3
  export declare class EffectComposerPlugin extends Plugin {
4
+ type: string;
4
5
  static Instance(viewer: Viewer): EffectComposerPlugin;
5
6
  get multisampling(): number;
6
7
  set multisampling(v: number);
@@ -1,5 +1,6 @@
1
1
  import { Effect, EffectPass } from "postprocessing";
2
2
  import { PassPlugin } from "./PassPlugin";
3
3
  export declare class EffectPassPlugin extends PassPlugin<EffectPass> {
4
+ type: string;
4
5
  constructor(...effects: Effect[]);
5
6
  }
@@ -0,0 +1,6 @@
1
+ import { FXAAEffect } from "postprocessing";
2
+ import { PostProcessing } from "./PostProcessing";
3
+ export declare class FXAA extends PostProcessing {
4
+ effect: FXAAEffect;
5
+ constructor();
6
+ }
@@ -1,5 +1,7 @@
1
1
  import { EffectPass } from "postprocessing";
2
2
  import { PassPlugin } from "./PassPlugin";
3
3
  export declare class FXAAPlugin extends PassPlugin<EffectPass> {
4
+ type: string;
5
+ test: number;
4
6
  constructor();
5
7
  }
@@ -0,0 +1,4 @@
1
+ import { PostProcessing } from "./PostProcessing";
2
+ export declare class MSAA extends PostProcessing {
3
+ constructor();
4
+ }
@@ -1,6 +1,7 @@
1
1
  import { Plugin } from "@xviewer.js/core";
2
2
  import { EffectComposerPlugin } from "./EffectComposerPlugin";
3
3
  export declare class MSAAPlugin extends Plugin {
4
+ type: string;
4
5
  get enable(): boolean;
5
6
  set enable(v: boolean);
6
7
  get composer(): EffectComposerPlugin;
@@ -0,0 +1,5 @@
1
+ import { Mount } from "@xviewer.js/core";
2
+ import { PostProcessingManager } from "./PostProcessingManager";
3
+ export declare class PostProcessing extends Mount {
4
+ get postprocessing(): PostProcessingManager;
5
+ }
@@ -0,0 +1,22 @@
1
+ import { Mount } from "@xviewer.js/core";
2
+ import { Effect, EffectComposer, Pass } from "postprocessing";
3
+ export declare class PostProcessingManager extends Mount {
4
+ private _renderPass;
5
+ private _outputPass;
6
+ private _composer;
7
+ private _effects;
8
+ private _effectPass;
9
+ private _effectDirty;
10
+ get multisampling(): number;
11
+ set multisampling(v: number);
12
+ constructor(props: ConstructorParameters<typeof EffectComposer>[1]);
13
+ update(dt: number): void;
14
+ getPass<T extends Pass>(constructor: (new (...args: any[]) => T) | Function): T;
15
+ addPass<T extends Pass>(pass: T): T;
16
+ removePass(pass: Pass): void;
17
+ activePass(pass: Pass, v: boolean): Pass;
18
+ addEffect(effect: Effect): Effect;
19
+ removeEffect(effect: Effect): void;
20
+ private _checkOutputPass;
21
+ private _setRenderToScreen;
22
+ }
@@ -0,0 +1,13 @@
1
+ import { EdgeDetectionMode, PredicationMode, SMAAEffect, SMAAPreset } from "postprocessing";
2
+ import { PostProcessing } from "./PostProcessing";
3
+ export declare class SMAA extends PostProcessing {
4
+ effect: SMAAEffect;
5
+ constructor(props?: ConstructorParameters<typeof SMAAEffect>[0]);
6
+ private _preset;
7
+ get preset(): SMAAPreset;
8
+ set preset(v: SMAAPreset);
9
+ get edgeDetectionMode(): EdgeDetectionMode;
10
+ set edgeDetectionMode(v: EdgeDetectionMode);
11
+ get predicationMode(): PredicationMode;
12
+ set predicationMode(v: PredicationMode);
13
+ }
@@ -1,6 +1,7 @@
1
1
  import { EdgeDetectionMode, EffectPass, PredicationMode, SMAAEffect, SMAAPreset } from "postprocessing";
2
2
  import { PassPlugin } from "./PassPlugin";
3
3
  export declare class SMAAPlugin extends PassPlugin<EffectPass> {
4
+ type: string;
4
5
  private _preset;
5
6
  get preset(): SMAAPreset;
6
7
  set preset(v: SMAAPreset);
@@ -1,6 +1,7 @@
1
1
  import { EffectPass } from "postprocessing";
2
2
  import { PassPlugin } from "./PassPlugin";
3
3
  export declare class TRAAPlugin extends PassPlugin<EffectPass> {
4
+ type: string;
4
5
  private _effect;
5
6
  constructor(props?: {
6
7
  dilation?: boolean;
@@ -0,0 +1,8 @@
1
+ import { ToneMappingEffect, ToneMappingMode } from "postprocessing";
2
+ import { PostProcessing } from "./PostProcessing";
3
+ export declare class ToneMapping extends PostProcessing {
4
+ effect: ToneMappingEffect;
5
+ constructor(props: ConstructorParameters<typeof ToneMappingEffect>[0]);
6
+ get mode(): ToneMappingMode;
7
+ set mode(v: ToneMappingMode);
8
+ }
@@ -1,6 +1,7 @@
1
1
  import { EffectPass, ToneMappingEffect, ToneMappingMode } from "postprocessing";
2
2
  import { PassPlugin } from "./PassPlugin";
3
3
  export declare class ToneMappingPlugin extends PassPlugin<EffectPass> {
4
+ type: string;
4
5
  get mode(): ToneMappingMode;
5
6
  set mode(v: ToneMappingMode);
6
7
  effect: ToneMappingEffect;
package/types/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export { EffectComposerPlugin } from "./EffectComposerPlugin";
2
- export { ToneMappingPlugin } from "./ToneMappingPlugin";
3
- export { BloomPlugin } from "./BloomPlugin";
4
- export { FXAAPlugin } from "./FXAAPlugin";
5
- export { SMAAPlugin } from "./SMAAPlugin";
6
- export { MSAAPlugin } from "./MSAAPlugin";
7
- export { TRAAPlugin } from "./TRAAPlugin";
8
- export { MotionBlurPlugin } from "./MotionBlurPlugin";
1
+ export { PostProcessingManager } from "./PostProcessingManager";
2
+ export { PostProcessing } from "./PostProcessing";
3
+ export { ToneMapping } from "./ToneMapping";
4
+ export { DepthOfField } from "./DepthOfField";
5
+ export { Bloom } from "./Bloom";
6
+ export { FXAA } from "./FXAA";
7
+ export { SMAA } from "./SMAA";
8
+ export { MSAA } from "./MSAA";
@@ -1,5 +0,0 @@
1
- import { EffectPass } from "postprocessing";
2
- import { PassPlugin } from "./PassPlugin";
3
- export declare class MotionBlurPlugin extends PassPlugin<EffectPass> {
4
- constructor();
5
- }