@xviewer.js/core 1.0.0-alpha.4 → 1.0.0-alpha.40
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/dist/main.js +3085 -12207
- package/dist/main.js.map +1 -1
- package/dist/module.js +3042 -12205
- package/dist/module.js.map +1 -1
- package/package.json +19 -21
- package/types/PropertyManager.d.ts +14 -4
- package/types/TextureSettings.d.ts +3 -1
- package/types/Viewer.d.ts +18 -12
- package/types/asset/ResourceManager.d.ts +3 -3
- package/types/asset/aLoader.d.ts +5 -3
- package/types/base/getClassInstance.d.ts +1 -0
- package/types/base/index.d.ts +1 -0
- package/types/cinestation/CinestationBlendDefinition.d.ts +4 -4
- package/types/cinestation/CinestationBrain.d.ts +0 -2
- package/types/cinestation/FreelookVirtualCamera.d.ts +38 -22
- package/types/cinestation/VirtualCamera.d.ts +8 -8
- package/types/components/Reflector.d.ts +15 -0
- package/types/components/index.d.ts +1 -0
- package/types/index.d.ts +8 -2
- package/types/loaders/aEXRLoader.d.ts +5 -0
- package/types/{loader → loaders}/aFBXLoader.d.ts +1 -0
- package/types/{loader → loaders}/aGLTFLoader.d.ts +1 -0
- package/types/{loader → loaders}/aHDRLoader.d.ts +1 -0
- package/types/loaders/aJSONLoader.d.ts +5 -0
- package/types/{loader → loaders}/aTextureLoader.d.ts +1 -0
- package/types/{loader → loaders}/index.d.ts +3 -5
- package/types/materials/ReflectorMaterial.d.ts +28 -0
- package/types/{material → materials}/getShaderMaterial.d.ts +2 -2
- package/types/materials/glsl/index.d.ts +3 -0
- package/types/materials/index.d.ts +3 -0
- package/types/math/Constant.d.ts +8 -1
- package/types/math/Interpolation.d.ts +6 -6
- package/types/math/Perlin.d.ts +12 -0
- package/types/math/index.d.ts +5 -0
- package/types/passes/MipBlurPass.d.ts +27 -0
- package/types/passes/cubeuv/MergeBlurPass.d.ts +21 -0
- package/types/passes/cubeuv/MergeInfo.d.ts +9 -0
- package/types/passes/cubeuv/MergeReflectPass.d.ts +18 -0
- package/types/passes/cubeuv/utils.d.ts +15 -0
- package/types/passes/mipGaussianBlendWeight.d.ts +1 -0
- package/types/plugins/BoxProjectionPlugin.d.ts +20 -0
- package/types/plugins/DebugPlugin.d.ts +10 -0
- package/types/plugins/EnvironmentPlugin.d.ts +34 -0
- package/types/plugins/index.d.ts +3 -0
- package/types/tween/Easing.d.ts +25 -0
- package/types/tween/Group.d.ts +16 -0
- package/types/tween/Interpolation.d.ts +19 -0
- package/types/tween/Now.d.ts +2 -0
- package/types/tween/Sequence.d.ts +7 -0
- package/types/tween/Tween.d.ts +96 -0
- package/types/tween/TweenChain.d.ts +15 -5
- package/types/tween/TweenManager.d.ts +0 -2
- package/types/tween/Version.d.ts +1 -0
- package/types/tween/index.d.ts +3 -1
- package/types/tween/mainGroup.d.ts +2 -0
- package/types/types.d.ts +4 -0
- package/types/material/glsl/copy.glsl.d.ts +0 -1
- /package/types/{material → materials}/glsl/boxfilterblur.glsl.d.ts +0 -0
- /package/types/{material → materials}/glsl/fullscreen.glsl.d.ts +0 -0
- /package/types/{material → materials}/glsl/panorama.glsl.d.ts +0 -0
- /package/types/{primitives → primitive}/Box.d.ts +0 -0
- /package/types/{primitives → primitive}/Plane.d.ts +0 -0
- /package/types/{primitives → primitive}/Sphere.d.ts +0 -0
- /package/types/{primitives → primitive}/index.d.ts +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CubeTexture, Texture, WebGLRenderTarget } from "three";
|
|
2
|
+
import { Viewer } from "../../Viewer";
|
|
3
|
+
import { MergeInfo } from "./MergeInfo";
|
|
4
|
+
export declare class MergeRefectPass {
|
|
5
|
+
private _pmremGenerator;
|
|
6
|
+
private _reflectMap;
|
|
7
|
+
private _envMapTarget;
|
|
8
|
+
private _sourceTarget;
|
|
9
|
+
get envMapTarget(): WebGLRenderTarget<Texture>;
|
|
10
|
+
constructor({ envMap, reflectMap, viewer, }: {
|
|
11
|
+
envMap?: Texture;
|
|
12
|
+
reflectMap: CubeTexture;
|
|
13
|
+
viewer: Viewer;
|
|
14
|
+
});
|
|
15
|
+
dispose(): void;
|
|
16
|
+
mergeReflect(info: MergeInfo): void;
|
|
17
|
+
private _getPMREMExtension;
|
|
18
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OrthographicCamera, ShaderMaterial, Vector3, WebGLRenderTarget } from "three";
|
|
2
|
+
export declare const LOD_MIN = 4;
|
|
3
|
+
export declare const _flatCamera: OrthographicCamera;
|
|
4
|
+
export declare const _axisDirections: Vector3[];
|
|
5
|
+
export declare const _Performance: {
|
|
6
|
+
HIGH: number;
|
|
7
|
+
MEDIUM: number;
|
|
8
|
+
LOW: number;
|
|
9
|
+
};
|
|
10
|
+
export declare function _setViewport(target: WebGLRenderTarget, x: number, y: number, width: number, height: number): void;
|
|
11
|
+
export declare function _getCommonVertexShader(): string;
|
|
12
|
+
export declare function _getClearMaterial(): ShaderMaterial;
|
|
13
|
+
export declare function _getCubeMapMaterial(): ShaderMaterial;
|
|
14
|
+
export declare function _getMipCopyMaterial(lodMax: number, width: number, height: number): ShaderMaterial;
|
|
15
|
+
export declare function _getMipBlurMaterial(lodMax: number, width: number, height: number): ShaderMaterial;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mipGaussianBlendWeight(sigma: number, lod: number): number;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Vector3, Vector4, WebGLProgramParametersWithUniforms } from "three";
|
|
2
|
+
import { Plugin } from "../Plugin";
|
|
3
|
+
export declare class BoxProjectionPlugin extends Plugin {
|
|
4
|
+
private _center;
|
|
5
|
+
private _boxMin;
|
|
6
|
+
private _boxMax;
|
|
7
|
+
private _helper;
|
|
8
|
+
private _debug;
|
|
9
|
+
get debug(): boolean;
|
|
10
|
+
set debug(v: boolean);
|
|
11
|
+
get center(): Vector4;
|
|
12
|
+
set center(v: Vector4);
|
|
13
|
+
get boxMin(): Vector3;
|
|
14
|
+
set boxMin(v: Vector3);
|
|
15
|
+
get boxMax(): Vector3;
|
|
16
|
+
set boxMax(v: Vector3);
|
|
17
|
+
constructor();
|
|
18
|
+
onUpdate(dt: number): void;
|
|
19
|
+
useBoxProjection(shader: WebGLProgramParametersWithUniforms): void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Object3D, Scene } from "three";
|
|
2
|
+
import { Plugin } from "../Plugin";
|
|
3
|
+
import { Viewer } from "../Viewer";
|
|
4
|
+
export declare class DebugPlugin extends Plugin {
|
|
5
|
+
static Instance(viewer: Viewer): DebugPlugin;
|
|
6
|
+
scene: Scene;
|
|
7
|
+
add(node: Object3D): Object3D<import("three").Object3DEventMap>;
|
|
8
|
+
remove(node: Object3D): Object3D<import("three").Object3DEventMap>;
|
|
9
|
+
onRender(dt: number): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Object3D, Scene, Texture, TextureDataType, Vector3 } from "three";
|
|
2
|
+
import { Plugin } from "../Plugin";
|
|
3
|
+
export declare class EnvironmentPlugin extends Plugin {
|
|
4
|
+
static Performance: {
|
|
5
|
+
HIGH: number;
|
|
6
|
+
MEDIUM: number;
|
|
7
|
+
LOW: number;
|
|
8
|
+
};
|
|
9
|
+
private _scene;
|
|
10
|
+
private _cubeCamera;
|
|
11
|
+
private _reflectPass;
|
|
12
|
+
private _mipBlurPass;
|
|
13
|
+
private _mergeInfo;
|
|
14
|
+
private _debug;
|
|
15
|
+
private _debugNode;
|
|
16
|
+
get debug(): boolean;
|
|
17
|
+
set debug(v: boolean);
|
|
18
|
+
performance: number;
|
|
19
|
+
envMapIntensity: number;
|
|
20
|
+
reflectExposure: number;
|
|
21
|
+
reflectBlurIntensity: number;
|
|
22
|
+
constructor({ envMap, scene, near, far, layer, resolution, floatType, position, }?: {
|
|
23
|
+
envMap?: Texture;
|
|
24
|
+
scene?: Scene | Object3D;
|
|
25
|
+
performance?: number;
|
|
26
|
+
resolution?: number;
|
|
27
|
+
layer?: number;
|
|
28
|
+
near?: number;
|
|
29
|
+
far?: number;
|
|
30
|
+
floatType?: boolean | TextureDataType;
|
|
31
|
+
position?: Vector3;
|
|
32
|
+
});
|
|
33
|
+
onRender(): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type EasingFunction = (amount: number) => number;
|
|
2
|
+
export type EasingFunctionGroup = {
|
|
3
|
+
In: EasingFunction;
|
|
4
|
+
Out: EasingFunction;
|
|
5
|
+
InOut: EasingFunction;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* The Ease class provides a collection of easing functions for use with tween.js.
|
|
9
|
+
*/
|
|
10
|
+
export declare const Easing: Readonly<{
|
|
11
|
+
Linear: Readonly<EasingFunctionGroup & {
|
|
12
|
+
None: EasingFunction;
|
|
13
|
+
}>;
|
|
14
|
+
Quadratic: Readonly<EasingFunctionGroup>;
|
|
15
|
+
Cubic: Readonly<EasingFunctionGroup>;
|
|
16
|
+
Quartic: Readonly<EasingFunctionGroup>;
|
|
17
|
+
Quintic: Readonly<EasingFunctionGroup>;
|
|
18
|
+
Sinusoidal: Readonly<EasingFunctionGroup>;
|
|
19
|
+
Exponential: Readonly<EasingFunctionGroup>;
|
|
20
|
+
Circular: Readonly<EasingFunctionGroup>;
|
|
21
|
+
Elastic: Readonly<EasingFunctionGroup>;
|
|
22
|
+
Back: Readonly<EasingFunctionGroup>;
|
|
23
|
+
Bounce: Readonly<EasingFunctionGroup>;
|
|
24
|
+
generatePow(power?: number): EasingFunctionGroup;
|
|
25
|
+
}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Tween, UnknownProps } from './Tween';
|
|
2
|
+
/**
|
|
3
|
+
* Controlling groups of tweens
|
|
4
|
+
*
|
|
5
|
+
* Using the TWEEN singleton to manage your tweens can cause issues in large apps with many components.
|
|
6
|
+
* In these cases, you may want to create your own smaller groups of tween
|
|
7
|
+
*/
|
|
8
|
+
export declare class Group {
|
|
9
|
+
private _tweens;
|
|
10
|
+
private _tweensAddedDuringUpdate;
|
|
11
|
+
getAll(): Array<Tween<UnknownProps>>;
|
|
12
|
+
removeAll(): void;
|
|
13
|
+
add(tween: Tween<UnknownProps>): void;
|
|
14
|
+
remove(tween: Tween<UnknownProps>): void;
|
|
15
|
+
update(time?: number, preserve?: boolean): boolean;
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
*/
|
|
4
|
+
export type InterpolationFunction = (v: number[], k: number) => number;
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
declare const Interpolation: {
|
|
9
|
+
Linear: (v: number[], k: number) => number;
|
|
10
|
+
Bezier: (v: number[], k: number) => number;
|
|
11
|
+
CatmullRom: (v: number[], k: number) => number;
|
|
12
|
+
Utils: {
|
|
13
|
+
Linear: (p0: number, p1: number, t: number) => number;
|
|
14
|
+
Bernstein: (n: number, i: number) => number;
|
|
15
|
+
Factorial: (n: number) => number;
|
|
16
|
+
CatmullRom: (p0: number, p1: number, p2: number, p3: number, t: number) => number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export { Interpolation };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tween.js - Licensed under the MIT license
|
|
3
|
+
* https://github.com/tweenjs/tween.js
|
|
4
|
+
* ----------------------------------------------
|
|
5
|
+
*
|
|
6
|
+
* See https://github.com/tweenjs/tween.js/graphs/contributors for the full list of contributors.
|
|
7
|
+
* Thank you all, you're awesome!
|
|
8
|
+
*/
|
|
9
|
+
import type { EasingFunction } from './Easing';
|
|
10
|
+
import type { InterpolationFunction } from './Interpolation';
|
|
11
|
+
import type { Group } from './Group';
|
|
12
|
+
export declare class Tween<T extends UnknownProps> {
|
|
13
|
+
private _object;
|
|
14
|
+
private _group;
|
|
15
|
+
private _isPaused;
|
|
16
|
+
private _pauseStart;
|
|
17
|
+
private _valuesStart;
|
|
18
|
+
private _valuesEnd;
|
|
19
|
+
private _valuesStartRepeat;
|
|
20
|
+
private _duration;
|
|
21
|
+
private _isDynamic;
|
|
22
|
+
private _initialRepeat;
|
|
23
|
+
private _repeat;
|
|
24
|
+
private _repeatDelayTime?;
|
|
25
|
+
private _yoyo;
|
|
26
|
+
private _isPlaying;
|
|
27
|
+
private _reversed;
|
|
28
|
+
private _delayTime;
|
|
29
|
+
private _startTime;
|
|
30
|
+
private _easingFunction;
|
|
31
|
+
private _interpolationFunction;
|
|
32
|
+
private _chainedTweens;
|
|
33
|
+
private _onStartCallback?;
|
|
34
|
+
private _onStartCallbackFired;
|
|
35
|
+
private _onEveryStartCallback?;
|
|
36
|
+
private _onEveryStartCallbackFired;
|
|
37
|
+
private _onUpdateCallback?;
|
|
38
|
+
private _onRepeatCallback?;
|
|
39
|
+
private _onCompleteCallback?;
|
|
40
|
+
private _onStopCallback?;
|
|
41
|
+
private _onFinishCallback?;
|
|
42
|
+
private _id;
|
|
43
|
+
private _isChainStopped;
|
|
44
|
+
private _propertiesAreSetUp;
|
|
45
|
+
private _headTween;
|
|
46
|
+
private _tailTween;
|
|
47
|
+
private _headTweenStartFired;
|
|
48
|
+
constructor(_object: T, _group?: Group | false);
|
|
49
|
+
getId(): number;
|
|
50
|
+
isPlaying(): boolean;
|
|
51
|
+
isPaused(): boolean;
|
|
52
|
+
getDuration(): number;
|
|
53
|
+
from(properties: UnknownProps): this;
|
|
54
|
+
to(target: UnknownProps, duration?: number): this;
|
|
55
|
+
duration(duration?: number): this;
|
|
56
|
+
dynamic(dynamic?: boolean): this;
|
|
57
|
+
start(time?: number, overrideStartingValues?: boolean): this;
|
|
58
|
+
startFromCurrentValues(time?: number): this;
|
|
59
|
+
private _setupProperties;
|
|
60
|
+
stop(): this;
|
|
61
|
+
end(): this;
|
|
62
|
+
pause(time?: number): this;
|
|
63
|
+
resume(time?: number): this;
|
|
64
|
+
stopChainedTweens(): this;
|
|
65
|
+
group(group?: Group): this;
|
|
66
|
+
call(callback: (object: T) => void): this;
|
|
67
|
+
delay(amount?: number): this;
|
|
68
|
+
union(headTween: Tween<T>, tailTween: Tween<T>): this;
|
|
69
|
+
repeat(times?: number): this;
|
|
70
|
+
repeatDelay(amount?: number): this;
|
|
71
|
+
yoyo(yoyo?: boolean): this;
|
|
72
|
+
easing(easingFunction?: EasingFunction): this;
|
|
73
|
+
interpolation(interpolationFunction?: InterpolationFunction): this;
|
|
74
|
+
chain(...tweens: Array<Tween<any>>): this;
|
|
75
|
+
unchain(...tweens: Array<Tween<any>>): this;
|
|
76
|
+
onStart(callback?: (object: T) => void): this;
|
|
77
|
+
onEveryStart(callback?: (object: T) => void): this;
|
|
78
|
+
onUpdate(callback?: (object: T, elapsed: number) => void): this;
|
|
79
|
+
onRepeat(callback?: (object: T) => void): this;
|
|
80
|
+
onComplete(callback?: (object: T) => void): this;
|
|
81
|
+
onStop(callback?: (object: T) => void): this;
|
|
82
|
+
private _goToEnd;
|
|
83
|
+
/**
|
|
84
|
+
* @returns true if the tween is still playing after the update, false
|
|
85
|
+
* otherwise (calling update on a paused tween still returns true because
|
|
86
|
+
* it is still playing, just paused).
|
|
87
|
+
*/
|
|
88
|
+
update(time?: number, autoStart?: boolean): boolean;
|
|
89
|
+
private _calculateElapsedPortion;
|
|
90
|
+
private _calculateCompletionStatus;
|
|
91
|
+
private _processRepetition;
|
|
92
|
+
private _updateProperties;
|
|
93
|
+
private _handleRelativeValue;
|
|
94
|
+
private _swapEndStartRepeatValues;
|
|
95
|
+
}
|
|
96
|
+
export type UnknownProps = Record<string, any>;
|
|
@@ -1,15 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Tween } from "./Tween";
|
|
2
|
+
import { Group } from "./Group";
|
|
2
3
|
export declare class TweenChain {
|
|
3
4
|
private _object;
|
|
5
|
+
private _group;
|
|
4
6
|
private _tween;
|
|
5
7
|
private _chainedTween;
|
|
6
8
|
constructor(object: Object, group?: Group);
|
|
7
9
|
start(): this;
|
|
8
10
|
stop(): this;
|
|
9
|
-
repeat(times:
|
|
11
|
+
repeat(times: number): this;
|
|
10
12
|
union(): this;
|
|
11
|
-
call(callback:
|
|
12
|
-
delay(amount:
|
|
13
|
-
to(properties:
|
|
13
|
+
call(callback: (object: Object) => void): this;
|
|
14
|
+
delay(amount: number): this;
|
|
15
|
+
to(properties: Record<string, any>, duration?: number, props?: {
|
|
16
|
+
from?: Record<string, any>;
|
|
17
|
+
easing?: (amount: number) => number;
|
|
18
|
+
onStart?: (object: Object) => void;
|
|
19
|
+
onStop?: (object: Object) => void;
|
|
20
|
+
onComplete?: (object: Object) => void;
|
|
21
|
+
onUpdate?: (object: Object, elapsed: number) => void;
|
|
22
|
+
onRepeat?: (object: Object) => void;
|
|
23
|
+
}): this;
|
|
14
24
|
_chainTween(): Tween<Object>;
|
|
15
25
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { TweenChain } from "./TweenChain";
|
|
2
|
-
import { Tween } from "./tween";
|
|
3
2
|
export declare class TweenManager {
|
|
4
3
|
private _group;
|
|
5
4
|
destroy(): void;
|
|
6
5
|
update(time: number): void;
|
|
7
|
-
tween(target: Object): Tween<Object>;
|
|
8
6
|
timeline(target: Object): TweenChain;
|
|
9
7
|
killTweensOf(target: Object): void;
|
|
10
8
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VERSION = "23.1.2";
|
package/types/tween/index.d.ts
CHANGED
package/types/types.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const frag_Copy = "\nvarying vec2 vUv;\nuniform sampler2D tMain;\nuniform float uLod;\n\nvoid main() {\n gl_FragColor = texture(tMain, vUv, uLod);\n\t#include <encodings_fragment>\n}\n";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|