@xviewer.js/debug 1.0.0-alpha.7 → 1.0.0-alpha.9
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 +23 -21
- package/types/InspectorPlugin.d.ts +22 -0
- package/types/StatsPlugin.d.ts +10 -0
- package/types/gui/GUI.d.ts +257 -0
- package/types/gui/common/UIElement.d.ts +18 -0
- package/types/gui/common/UIInteger.d.ts +14 -0
- package/types/gui/common/UINumber.d.ts +19 -0
- package/types/gui/controllers/BooleanController.d.ts +7 -0
- package/types/gui/controllers/ColorController.d.ts +18 -0
- package/types/gui/controllers/Controller.d.ts +207 -0
- package/types/gui/controllers/CurveController.d.ts +8 -0
- package/types/gui/controllers/FunctionController.d.ts +6 -0
- package/types/gui/controllers/ImageController.d.ts +12 -0
- package/types/gui/controllers/NumberController.d.ts +32 -0
- package/types/gui/controllers/OptionController.d.ts +11 -0
- package/types/gui/controllers/StringController.d.ts +7 -0
- package/types/gui/controllers/TextureController.d.ts +9 -0
- package/types/gui/controllers/VectorController.d.ts +19 -0
- package/types/gui/curve/CurveEditor.d.ts +26 -0
- package/types/gui/curve/CurveViewer.d.ts +53 -0
- package/types/gui/curve/IAnimationCurve.d.ts +8 -0
- package/types/gui/curve/ICurvePoint.d.ts +6 -0
- package/types/gui/utils/getColorFormat.d.ts +21 -0
- package/types/gui/utils/index.d.ts +6 -0
- package/types/gui/utils/normalizeColorString.d.ts +1 -0
- package/types/index.d.ts +3 -12
- package/types/Component.d.ts +0 -34
- package/types/ComponentManager.d.ts +0 -48
- package/types/ComponentScheduler.d.ts +0 -19
- package/types/DebugManager.d.ts +0 -2
- package/types/DetectUA.d.ts +0 -79
- package/types/DeviceInput.d.ts +0 -60
- package/types/ObjectInstance.d.ts +0 -7
- package/types/Plugin.d.ts +0 -10
- package/types/PluginManager.d.ts +0 -17
- package/types/Pressability.d.ts +0 -17
- package/types/PropertyManager.d.ts +0 -19
- package/types/Scheduler.d.ts +0 -13
- package/types/SystemInfo.d.ts +0 -24
- package/types/Task.d.ts +0 -5
- package/types/TaskManager.d.ts +0 -15
- package/types/TextureSettings.d.ts +0 -13
- package/types/Utils.d.ts +0 -6
- package/types/Viewer.d.ts +0 -143
- package/types/WebGL.d.ts +0 -14
- package/types/asset/ResourceManager.d.ts +0 -42
- package/types/asset/aLoader.d.ts +0 -17
- package/types/base/EventEmitter.d.ts +0 -29
- package/types/base/Logger.d.ts +0 -11
- package/types/base/index.d.ts +0 -3
- package/types/base/mixin.d.ts +0 -1
- package/types/cinestation/CinestationBlendDefinition.d.ts +0 -11
- package/types/cinestation/CinestationBrain.d.ts +0 -21
- package/types/cinestation/FreelookVirtualCamera.d.ts +0 -63
- package/types/cinestation/VirtualCamera.d.ts +0 -25
- package/types/cinestation/index.d.ts +0 -4
- package/types/enums/Orientation.d.ts +0 -5
- package/types/loader/aEXRLoader.d.ts +0 -5
- package/types/loader/aFBXLoader.d.ts +0 -5
- package/types/loader/aGLTFLoader.d.ts +0 -5
- package/types/loader/aHDRLoader.d.ts +0 -5
- package/types/loader/aJSONLoader.d.ts +0 -5
- package/types/loader/aTextureLoader.d.ts +0 -5
- package/types/loader/index.d.ts +0 -6
- package/types/material/getShaderMaterial.d.ts +0 -4
- package/types/material/glsl/boxfilterblur.glsl.d.ts +0 -1
- package/types/material/glsl/copy.glsl.d.ts +0 -1
- package/types/material/glsl/fullscreen.glsl.d.ts +0 -1
- package/types/material/glsl/panorama.glsl.d.ts +0 -2
- package/types/math/AnimationCurve.d.ts +0 -23
- package/types/math/Constant.d.ts +0 -2
- package/types/math/Damp.d.ts +0 -10
- package/types/math/Interpolation.d.ts +0 -9
- package/types/primitives/Box.d.ts +0 -4
- package/types/primitives/Plane.d.ts +0 -4
- package/types/primitives/Sphere.d.ts +0 -4
- package/types/primitives/index.d.ts +0 -3
- package/types/tween/TweenChain.d.ts +0 -15
- package/types/tween/TweenManager.d.ts +0 -10
- package/types/tween/index.d.ts +0 -3
- package/types/types.d.ts +0 -54
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { GUI } from "../GUI";
|
|
2
|
+
import { Controller } from "./Controller";
|
|
3
|
+
export declare class NumberController extends Controller {
|
|
4
|
+
private _min;
|
|
5
|
+
private _max;
|
|
6
|
+
private _step;
|
|
7
|
+
private _stepExplicit;
|
|
8
|
+
private _hasSlider;
|
|
9
|
+
private _inputFocused;
|
|
10
|
+
$fill: HTMLElement;
|
|
11
|
+
$input: HTMLInputElement;
|
|
12
|
+
$slider: HTMLElement;
|
|
13
|
+
constructor(parent: GUI, object: Object, property: string, min: number, max: number, step: number);
|
|
14
|
+
min(min: number): this;
|
|
15
|
+
max(max: any): this;
|
|
16
|
+
step(step: number, explicit?: boolean): this;
|
|
17
|
+
needsUpdateDisplay(): boolean;
|
|
18
|
+
updateDisplay(): this;
|
|
19
|
+
private _initInput;
|
|
20
|
+
private _initSlider;
|
|
21
|
+
private _setDraggingStyle;
|
|
22
|
+
private _getImplicitStep;
|
|
23
|
+
private _onUpdateMinMax;
|
|
24
|
+
private _normalizeMouseWheel;
|
|
25
|
+
private _arrowKeyMultiplier;
|
|
26
|
+
private _snap;
|
|
27
|
+
private _clamp;
|
|
28
|
+
private _snapClampSetValue;
|
|
29
|
+
private get _hasScrollBar();
|
|
30
|
+
private get _hasMin();
|
|
31
|
+
private get _hasMax();
|
|
32
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GUI } from "../GUI";
|
|
2
|
+
import { Controller } from "./Controller";
|
|
3
|
+
export declare class OptionController extends Controller {
|
|
4
|
+
$select: HTMLSelectElement;
|
|
5
|
+
$display: HTMLElement;
|
|
6
|
+
private _values;
|
|
7
|
+
private _names;
|
|
8
|
+
constructor(parent: GUI, object: Object, property: string, options: Array<any> | Object);
|
|
9
|
+
updateDisplay(): this;
|
|
10
|
+
options(options: Array<any> | Object): this;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { GUI } from "../GUI";
|
|
2
|
+
import { Controller } from "./Controller";
|
|
3
|
+
export declare class TextureController extends Controller {
|
|
4
|
+
$canvas: HTMLCanvasElement;
|
|
5
|
+
private _version;
|
|
6
|
+
constructor(parent: GUI, object: Object, property: string);
|
|
7
|
+
needsUpdateDisplay(): boolean;
|
|
8
|
+
updateDisplay(): this;
|
|
9
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { GUI } from "../GUI";
|
|
2
|
+
import { UINumber } from "../common/UINumber";
|
|
3
|
+
import { Controller } from "./Controller";
|
|
4
|
+
export declare class VectorController extends Controller {
|
|
5
|
+
xElement: UINumber;
|
|
6
|
+
yElement: UINumber;
|
|
7
|
+
zElement: UINumber;
|
|
8
|
+
wElement: UINumber;
|
|
9
|
+
constructor(parent: GUI, object: Object, property: string, min: number, max: number, step: number);
|
|
10
|
+
createElement(fill: boolean, value: number, min: number, max: number, step: number, onChange: Function): UINumber;
|
|
11
|
+
setValue(value: {
|
|
12
|
+
x?: number;
|
|
13
|
+
y?: number;
|
|
14
|
+
z?: number;
|
|
15
|
+
w?: number;
|
|
16
|
+
}): this;
|
|
17
|
+
needsUpdateDisplay(): boolean;
|
|
18
|
+
updateDisplay(): this;
|
|
19
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IAnimationCurve } from "./IAnimationCurve";
|
|
2
|
+
export declare class CurveEditor {
|
|
3
|
+
private _dom;
|
|
4
|
+
private _tabs;
|
|
5
|
+
private _sharpTab;
|
|
6
|
+
private _smoothTab;
|
|
7
|
+
private _xPosInput;
|
|
8
|
+
private _yPosInput;
|
|
9
|
+
private _curvePanel;
|
|
10
|
+
private _curvePointPanel;
|
|
11
|
+
private _layoutPoint;
|
|
12
|
+
private _curves;
|
|
13
|
+
private _target;
|
|
14
|
+
private _onChange;
|
|
15
|
+
get dom(): HTMLElement;
|
|
16
|
+
constructor(target: IAnimationCurve | IAnimationCurve[]);
|
|
17
|
+
onChange(callback: Function): this;
|
|
18
|
+
private _onToggleTab;
|
|
19
|
+
private _onTogglePointTab;
|
|
20
|
+
private _onCurveChanged;
|
|
21
|
+
private _onPosChanged;
|
|
22
|
+
private _onPointAdded;
|
|
23
|
+
private _onPointRemoved;
|
|
24
|
+
private _onPointChanged;
|
|
25
|
+
render(): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export declare const kTheme: {
|
|
2
|
+
Background: string;
|
|
3
|
+
BackgroundOut: string;
|
|
4
|
+
Error: string;
|
|
5
|
+
Text: string;
|
|
6
|
+
Grid: string;
|
|
7
|
+
GridThin: string;
|
|
8
|
+
Graphs: string[];
|
|
9
|
+
}[];
|
|
10
|
+
export declare abstract class CurveEvaluator {
|
|
11
|
+
visible: boolean;
|
|
12
|
+
abstract getValue(x: number, t: number): number;
|
|
13
|
+
}
|
|
14
|
+
export declare class CurveViewer {
|
|
15
|
+
private _canvas;
|
|
16
|
+
private _context;
|
|
17
|
+
private _xRes;
|
|
18
|
+
private _yRes;
|
|
19
|
+
private _cx;
|
|
20
|
+
private _cy;
|
|
21
|
+
private _ra;
|
|
22
|
+
private _cxRef;
|
|
23
|
+
private _cyRef;
|
|
24
|
+
private _raRef;
|
|
25
|
+
private _offsetXRef;
|
|
26
|
+
private _offsetYRef;
|
|
27
|
+
private _mode;
|
|
28
|
+
private _evaluators;
|
|
29
|
+
showAxes: number;
|
|
30
|
+
rangeType: number;
|
|
31
|
+
themeID: number;
|
|
32
|
+
constructor({ canvas, autoResize, }?: {
|
|
33
|
+
canvas?: HTMLCanvasElement;
|
|
34
|
+
autoResize?: boolean;
|
|
35
|
+
});
|
|
36
|
+
resize(width: number, height: number): this;
|
|
37
|
+
private _onResize;
|
|
38
|
+
regist(evaluator: CurveEvaluator): this;
|
|
39
|
+
render(): void;
|
|
40
|
+
private _onTouchStart;
|
|
41
|
+
private _onTouchEnd;
|
|
42
|
+
private _onTouchMove;
|
|
43
|
+
private _onWheel;
|
|
44
|
+
private _onMouseDown;
|
|
45
|
+
private _onMouseUp;
|
|
46
|
+
private _onMouseMove;
|
|
47
|
+
private _drawGraph;
|
|
48
|
+
private _drawCurve;
|
|
49
|
+
private _drawAxes;
|
|
50
|
+
private _drawGrid;
|
|
51
|
+
private _drawText;
|
|
52
|
+
private _drawAxis;
|
|
53
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ICurvePoint } from "./ICurvePoint";
|
|
2
|
+
export interface IAnimationCurve {
|
|
3
|
+
name: string;
|
|
4
|
+
needsUpdate: boolean;
|
|
5
|
+
points: ICurvePoint[];
|
|
6
|
+
getPoint(t: number, out: ICurvePoint): ICurvePoint;
|
|
7
|
+
createCurvePoint(x?: number, y?: number, mode?: number): ICurvePoint;
|
|
8
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { normalizeColorString } from './normalizeColorString';
|
|
2
|
+
export declare function getColorFormat(value: any): {
|
|
3
|
+
isPrimitive: boolean;
|
|
4
|
+
match: (v: any) => boolean;
|
|
5
|
+
fromHexString: typeof normalizeColorString;
|
|
6
|
+
toHexString: typeof normalizeColorString;
|
|
7
|
+
} | {
|
|
8
|
+
isPrimitive: boolean;
|
|
9
|
+
match: (v: any) => boolean;
|
|
10
|
+
fromHexString(string: any, target: any, rgbScale?: number): void;
|
|
11
|
+
toHexString([r, g, b]: [any, any, any], rgbScale?: number): string;
|
|
12
|
+
} | {
|
|
13
|
+
isPrimitive: boolean;
|
|
14
|
+
match: (v: any) => boolean;
|
|
15
|
+
fromHexString(string: any, target: any, rgbScale?: number): void;
|
|
16
|
+
toHexString({ r, g, b }: {
|
|
17
|
+
r: any;
|
|
18
|
+
g: any;
|
|
19
|
+
b: any;
|
|
20
|
+
}, rgbScale?: number): string;
|
|
21
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from "./getColorFormat";
|
|
2
|
+
export * from "./normalizeColorString";
|
|
3
|
+
export declare function toFixedFloat(v: number, fractionDigits: number): number;
|
|
4
|
+
export declare function toFixed(v: number, fractionDigits: number): string;
|
|
5
|
+
export declare function getPrecision(value: number): number;
|
|
6
|
+
export declare function hasDecimal(value: number): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function normalizeColorString(string: String): string | false;
|
package/types/index.d.ts
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export * from "./loader";
|
|
5
|
-
export * from "./cinestation";
|
|
6
|
-
export * from "./primitives";
|
|
7
|
-
export { Viewer } from "./Viewer";
|
|
8
|
-
export { Component } from "./Component";
|
|
9
|
-
export { SystemInfo } from "./SystemInfo";
|
|
10
|
-
export { Plugin } from "./Plugin";
|
|
11
|
-
export { ObjectInstance } from "./ObjectInstance";
|
|
12
|
-
export { property, PropertyManager } from "./PropertyManager";
|
|
1
|
+
export { GUI } from "./gui/GUI";
|
|
2
|
+
export { InspectorPlugin } from "./InspectorPlugin";
|
|
3
|
+
export { StatsPlugin } from "./StatsPlugin";
|
package/types/Component.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Object3D } from "three";
|
|
2
|
-
import { Viewer } from "./Viewer";
|
|
3
|
-
import { ComponentManager } from "./ComponentManager";
|
|
4
|
-
import { ObjectInstance } from "./ObjectInstance";
|
|
5
|
-
export declare class Component<T extends Object3D = Object3D> extends ObjectInstance {
|
|
6
|
-
get enabled(): boolean;
|
|
7
|
-
set enabled(v: boolean);
|
|
8
|
-
private _enabled;
|
|
9
|
-
node: T;
|
|
10
|
-
viewer: Viewer;
|
|
11
|
-
manager: ComponentManager;
|
|
12
|
-
type: string;
|
|
13
|
-
onLoad?(): void;
|
|
14
|
-
onEnable?(): void;
|
|
15
|
-
onDisable?(): void;
|
|
16
|
-
onDestroy?(): void;
|
|
17
|
-
start?(): void;
|
|
18
|
-
update?(dt: number): void;
|
|
19
|
-
lastUpdate?(dt: number): void;
|
|
20
|
-
flags: {
|
|
21
|
-
Destroyed?: boolean;
|
|
22
|
-
OnLoadCalled?: boolean;
|
|
23
|
-
OnEnableCalled?: boolean;
|
|
24
|
-
StartCalled?: boolean;
|
|
25
|
-
Deactivating?: boolean;
|
|
26
|
-
IsStartCalled?: boolean;
|
|
27
|
-
};
|
|
28
|
-
protected _onPreDestroy(): void;
|
|
29
|
-
schedule(callback: Function, interval: number, repeat?: number): void;
|
|
30
|
-
unshedule(callback: Function): void;
|
|
31
|
-
unscheduleAll(): void;
|
|
32
|
-
destroy(): boolean;
|
|
33
|
-
destroyImmediate(): void;
|
|
34
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Object3D } from "three";
|
|
2
|
-
import { Scheduler } from "./Scheduler";
|
|
3
|
-
import { Component } from "./Component";
|
|
4
|
-
import { ComponentScheduler } from "./ComponentScheduler";
|
|
5
|
-
import { Viewer } from "./Viewer";
|
|
6
|
-
type ComponentConstructor = new () => Component;
|
|
7
|
-
interface DependentInfo {
|
|
8
|
-
mode: DependentMode;
|
|
9
|
-
components: ComponentConstructor[];
|
|
10
|
-
}
|
|
11
|
-
export declare enum DependentMode {
|
|
12
|
-
/** Check only, throw error if dependent components do not exist. */
|
|
13
|
-
CheckOnly = 0,
|
|
14
|
-
/** Auto add if dependent components do not exist. */
|
|
15
|
-
AutoAdd = 1
|
|
16
|
-
}
|
|
17
|
-
export declare function dependencies(componentOrComponents: ComponentConstructor | ComponentConstructor[], mode?: DependentMode): <T extends ComponentConstructor>(target: T) => void;
|
|
18
|
-
export declare class ComponentManager {
|
|
19
|
-
static _dependenciesMap: Map<ComponentConstructor, DependentInfo>;
|
|
20
|
-
private _viewer;
|
|
21
|
-
private _scheduler;
|
|
22
|
-
private _componentScheduler;
|
|
23
|
-
private _componentsMap;
|
|
24
|
-
get viewer(): Viewer;
|
|
25
|
-
get scheduler(): Scheduler;
|
|
26
|
-
get componentScheduler(): ComponentScheduler;
|
|
27
|
-
constructor(viewer: Viewer);
|
|
28
|
-
destroy(): void;
|
|
29
|
-
update(dt: number): void;
|
|
30
|
-
destroyComponents(node: Object3D): void;
|
|
31
|
-
activeComponents(node: Object3D): void;
|
|
32
|
-
addComponent<T extends Component>(node: Object3D | Component, instance: T): T;
|
|
33
|
-
addComponent<T extends Component>(node: Object3D | Component, constructor: {
|
|
34
|
-
new (): T;
|
|
35
|
-
}): T;
|
|
36
|
-
removeComponent(node: Object3D, component: Component): this;
|
|
37
|
-
getComponent<T extends Component>(node: Object3D, constructor: {
|
|
38
|
-
new (): T;
|
|
39
|
-
}, autoAdd?: boolean): T;
|
|
40
|
-
getComponentsInChidren<T extends Component>(node: Object3D, constructor: {
|
|
41
|
-
new (): T;
|
|
42
|
-
}, out?: T[]): T[];
|
|
43
|
-
traverseComponents(callback: (comp: Component) => void): void;
|
|
44
|
-
private _addDendencies;
|
|
45
|
-
private _findComponent;
|
|
46
|
-
protected _activeComponent(comp: Component, active: boolean): void;
|
|
47
|
-
}
|
|
48
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Component } from "./Component";
|
|
2
|
-
declare class Invoker<T> {
|
|
3
|
-
protected _targets: T[];
|
|
4
|
-
protected _callback: (target: T, dt: number) => any;
|
|
5
|
-
constructor(callback: (target: T, dt: number) => any);
|
|
6
|
-
add(target: any): void;
|
|
7
|
-
remove(target: any): void;
|
|
8
|
-
invoke(dt: number): void;
|
|
9
|
-
}
|
|
10
|
-
export declare class ComponentScheduler {
|
|
11
|
-
startInvoker: Invoker<Component>;
|
|
12
|
-
updateInvoker: Invoker<Component>;
|
|
13
|
-
lastUpdateInvoker: Invoker<Component>;
|
|
14
|
-
start(): void;
|
|
15
|
-
update(dt: number): void;
|
|
16
|
-
lastUpdate(dt: number): void;
|
|
17
|
-
enableComponent(comp: Component, enable: boolean): void;
|
|
18
|
-
}
|
|
19
|
-
export {};
|
package/types/DebugManager.d.ts
DELETED
package/types/DetectUA.d.ts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
export interface IDeviceResult {
|
|
2
|
-
version: string;
|
|
3
|
-
}
|
|
4
|
-
export interface IBrowserResult {
|
|
5
|
-
name: string;
|
|
6
|
-
version: string;
|
|
7
|
-
}
|
|
8
|
-
export declare class DetectUA {
|
|
9
|
-
userAgent: string;
|
|
10
|
-
private isAndroidDevice;
|
|
11
|
-
private iOSDevice;
|
|
12
|
-
/**
|
|
13
|
-
* Detect a users browser, browser version and whether it is a mobile-, tablet- or desktop device
|
|
14
|
-
*
|
|
15
|
-
* @param forceUserAgent Force a user agent string (useful for testing)
|
|
16
|
-
*/
|
|
17
|
-
constructor(forceUserAgent?: string);
|
|
18
|
-
/**
|
|
19
|
-
* Match entry based on position found in the user-agent string
|
|
20
|
-
*
|
|
21
|
-
* @param pattern regular expression pattern
|
|
22
|
-
*/
|
|
23
|
-
private match;
|
|
24
|
-
/**
|
|
25
|
-
* Returns if the device is a mobile device
|
|
26
|
-
*/
|
|
27
|
-
get isMobile(): boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Returns if the device is a tablet device
|
|
30
|
-
*/
|
|
31
|
-
get isTablet(): boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Returns if the device is a desktop device
|
|
34
|
-
*/
|
|
35
|
-
get isDesktop(): boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Returns if the device is running MacOS (and if so which version)
|
|
38
|
-
*
|
|
39
|
-
* '5' => Leopard'
|
|
40
|
-
* '6' => Snow Leopard'
|
|
41
|
-
* '7' => Lion'
|
|
42
|
-
* '8' => Mountain Lion'
|
|
43
|
-
* '9' => Mavericks'
|
|
44
|
-
* '10' => Yosemite'
|
|
45
|
-
* '11' => El Capitan'
|
|
46
|
-
* '12' => Sierra'
|
|
47
|
-
* '13' => High Sierra'
|
|
48
|
-
* '14' => Mojave'
|
|
49
|
-
* '15' => Catalina'
|
|
50
|
-
*/
|
|
51
|
-
get isMacOS(): IDeviceResult | boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Returns if the device is running Windows (and if so which version)
|
|
54
|
-
*
|
|
55
|
-
* 'NT' => 'NT'
|
|
56
|
-
* 'XP' => 'XP'
|
|
57
|
-
* 'NT 5.0' => '2000'
|
|
58
|
-
* 'NT 5.1' => 'XP'
|
|
59
|
-
* 'NT 5.2' => '2003'
|
|
60
|
-
* 'NT 6.0' => 'Vista'
|
|
61
|
-
* 'NT 6.1' => '7'
|
|
62
|
-
* 'NT 6.2' => '8'
|
|
63
|
-
* 'NT 6.3' => '8.1'
|
|
64
|
-
* 'NT 10.0' => '10'
|
|
65
|
-
*/
|
|
66
|
-
get isWindows(): IDeviceResult | boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Returns if the device is an iOS device (and if so which version)
|
|
69
|
-
*/
|
|
70
|
-
get isiOS(): IDeviceResult | boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Returns if the device is an Android device (and if so which version)
|
|
73
|
-
*/
|
|
74
|
-
get isAndroid(): IDeviceResult | boolean;
|
|
75
|
-
/**
|
|
76
|
-
* Returns the browser name and version
|
|
77
|
-
*/
|
|
78
|
-
get browser(): IBrowserResult | boolean;
|
|
79
|
-
}
|
package/types/DeviceInput.d.ts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Vector2 } from "three";
|
|
2
|
-
import { ConnTarget } from "./Pressability";
|
|
3
|
-
import { Viewer } from "./Viewer";
|
|
4
|
-
export declare class DeviceInput {
|
|
5
|
-
viewer: Viewer;
|
|
6
|
-
static readonly CLICK = "click";
|
|
7
|
-
static readonly MOUSE_WHEEL = "mousewheel";
|
|
8
|
-
static readonly TOUCH_START = "touchstart";
|
|
9
|
-
static readonly TOUCH_END = "touchend";
|
|
10
|
-
static readonly TOUCH_MOVE = "touchmove";
|
|
11
|
-
static readonly POINTER_DOWN = "pointerdown";
|
|
12
|
-
static readonly POINTER_UP = "pointerup";
|
|
13
|
-
static readonly POINTER_MOVE = "pointermove";
|
|
14
|
-
static readonly POINTER_OVER = "pointerover";
|
|
15
|
-
static readonly POINTER_OUT = "pointerout";
|
|
16
|
-
static readonly KEYDOWN = "keydown";
|
|
17
|
-
static readonly KEYPRESS = "keypress";
|
|
18
|
-
static readonly KEYUP = "keyup";
|
|
19
|
-
static readonly RESIZE = "resize";
|
|
20
|
-
private _listeners;
|
|
21
|
-
private _mouseWheel;
|
|
22
|
-
private _touches;
|
|
23
|
-
private _touchCount;
|
|
24
|
-
private _pointerButton;
|
|
25
|
-
private _pointerPosition;
|
|
26
|
-
private _pointer;
|
|
27
|
-
private _keys;
|
|
28
|
-
private _pressability;
|
|
29
|
-
get pointerButton(): number;
|
|
30
|
-
get pointer(): Vector2;
|
|
31
|
-
get pointerPosition(): Vector2;
|
|
32
|
-
get mouseWheel(): number;
|
|
33
|
-
get touchCount(): number;
|
|
34
|
-
get touches(): {
|
|
35
|
-
id: number;
|
|
36
|
-
position: Vector2;
|
|
37
|
-
}[];
|
|
38
|
-
get keys(): {
|
|
39
|
-
[k: string]: boolean;
|
|
40
|
-
};
|
|
41
|
-
constructor(viewer: Viewer);
|
|
42
|
-
addEventListeners(): void;
|
|
43
|
-
removeAllListeners(): void;
|
|
44
|
-
connect(target: ConnTarget, event: string): void;
|
|
45
|
-
disconnect(target: ConnTarget): void;
|
|
46
|
-
private _addEventListener;
|
|
47
|
-
private _remapPointer;
|
|
48
|
-
private _remapTouch;
|
|
49
|
-
private _computePointer;
|
|
50
|
-
private _onPointerDown;
|
|
51
|
-
private _onPointerUp;
|
|
52
|
-
private _onPointerMove;
|
|
53
|
-
private _onMouseWheel;
|
|
54
|
-
private _onTouchStart;
|
|
55
|
-
private _onTouchEnd;
|
|
56
|
-
private _onTouchMove;
|
|
57
|
-
private _onKeyDown;
|
|
58
|
-
private _onKeyPress;
|
|
59
|
-
private _onKeyUp;
|
|
60
|
-
}
|
package/types/Plugin.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ObjectInstance } from "./ObjectInstance";
|
|
2
|
-
import { Viewer } from "./Viewer";
|
|
3
|
-
export declare class Plugin extends ObjectInstance {
|
|
4
|
-
viewer: Viewer;
|
|
5
|
-
type: string;
|
|
6
|
-
install?(): void;
|
|
7
|
-
uninstall?(): void;
|
|
8
|
-
onUpdate?(dt: number): void;
|
|
9
|
-
onRender?(dt: number): void;
|
|
10
|
-
}
|
package/types/PluginManager.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Plugin } from "./Plugin";
|
|
2
|
-
import { Viewer } from "./Viewer";
|
|
3
|
-
import { __C } from "./types";
|
|
4
|
-
export declare class PluginManager {
|
|
5
|
-
private _viewer;
|
|
6
|
-
private _plugins;
|
|
7
|
-
private _pluginsMap;
|
|
8
|
-
get viewer(): Viewer;
|
|
9
|
-
constructor(viewer: Viewer);
|
|
10
|
-
destroy(): void;
|
|
11
|
-
update(dt: number): void;
|
|
12
|
-
render(dt: number): void;
|
|
13
|
-
traversePlugins(callback: (plugin: Plugin) => void): void;
|
|
14
|
-
getPlugin<T extends Plugin>(plugin: new (...args: any[]) => T, autoAdd?: boolean): T;
|
|
15
|
-
addPlugin<T extends Plugin, K extends __C<T>>(plugin: T | K & __C<T>): T;
|
|
16
|
-
removePlugin<T extends Plugin, K extends __C<T>>(plugin: T | K & __C<T>): void;
|
|
17
|
-
}
|
package/types/Pressability.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Camera, Intersection, Object3D, Vector2 } from "three";
|
|
2
|
-
export interface ConnTarget {
|
|
3
|
-
node: Object3D;
|
|
4
|
-
emit(name: string, e: {
|
|
5
|
-
intersects: Intersection[];
|
|
6
|
-
}): void;
|
|
7
|
-
has(name: string): boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare class Pressability {
|
|
10
|
-
private _raycaster;
|
|
11
|
-
private _connectors;
|
|
12
|
-
connect(target: ConnTarget): void;
|
|
13
|
-
disconnect(target: ConnTarget): void;
|
|
14
|
-
pointerDown(pointer: Vector2, camera: Camera): void;
|
|
15
|
-
pointerUp(pointer: Vector2, camera: Camera): void;
|
|
16
|
-
pointerMove(pointer: Vector2, camera: Camera): void;
|
|
17
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare class PropertyManager {
|
|
2
|
-
static _propertiesMap: Map<Object, Object>;
|
|
3
|
-
static _getProperties(target: object): Object;
|
|
4
|
-
static _hasProperties(target: object): boolean;
|
|
5
|
-
static _getMergedProperties(target: Object): any;
|
|
6
|
-
}
|
|
7
|
-
export interface IPropertyOptions {
|
|
8
|
-
dir?: string;
|
|
9
|
-
parent?: string;
|
|
10
|
-
max?: number;
|
|
11
|
-
min?: number;
|
|
12
|
-
step?: number;
|
|
13
|
-
value?: any;
|
|
14
|
-
name?: string;
|
|
15
|
-
}
|
|
16
|
-
type PropertyDecorator = (target: Object, propertyKey: string) => void;
|
|
17
|
-
export declare function property(options?: IPropertyOptions): PropertyDecorator;
|
|
18
|
-
export declare function property(...args: Parameters<PropertyDecorator>): void;
|
|
19
|
-
export {};
|
package/types/Scheduler.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface ICallTarget {
|
|
2
|
-
uuid: string;
|
|
3
|
-
}
|
|
4
|
-
export declare class Scheduler {
|
|
5
|
-
private _callers;
|
|
6
|
-
private _callersArray;
|
|
7
|
-
pause(target: ICallTarget): void;
|
|
8
|
-
resume(target: ICallTarget): void;
|
|
9
|
-
schedule(target: ICallTarget, callback: Function, interval: number, repeat: number): void;
|
|
10
|
-
unshedule(target: ICallTarget, callback: Function): void;
|
|
11
|
-
unscheduleAll(target: ICallTarget): void;
|
|
12
|
-
update(dt: number): void;
|
|
13
|
-
}
|
package/types/SystemInfo.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export declare class SystemInfo {
|
|
2
|
-
static isMobile: boolean;
|
|
3
|
-
static isDesktop: boolean;
|
|
4
|
-
static device: string;
|
|
5
|
-
static isAndroid: boolean;
|
|
6
|
-
static isIOS: boolean;
|
|
7
|
-
static isMacOS: boolean;
|
|
8
|
-
static isWindows: boolean;
|
|
9
|
-
static isLinux: boolean;
|
|
10
|
-
static ua: string;
|
|
11
|
-
static isEdge: boolean;
|
|
12
|
-
static isIE: boolean;
|
|
13
|
-
static isFirefox: boolean;
|
|
14
|
-
static isChrome: boolean;
|
|
15
|
-
static isOpera: boolean;
|
|
16
|
-
static isSafari: boolean;
|
|
17
|
-
static isSupportMSAA: boolean;
|
|
18
|
-
static isSupportOgg: boolean;
|
|
19
|
-
static isRetina: boolean;
|
|
20
|
-
static devicePixelRatio: number;
|
|
21
|
-
static cpuCoreCount: number;
|
|
22
|
-
static baseUrl: string;
|
|
23
|
-
static isIFrame: boolean;
|
|
24
|
-
}
|
package/types/Task.d.ts
DELETED
package/types/TaskManager.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Task } from "./Task";
|
|
2
|
-
import { EventEmitter } from "./base";
|
|
3
|
-
export declare class TaskManager extends EventEmitter {
|
|
4
|
-
onComplete?: () => void;
|
|
5
|
-
onProgress?: (task: Task, loaded: number, total: number) => void;
|
|
6
|
-
onError?: (task: Task) => void;
|
|
7
|
-
private _tasks;
|
|
8
|
-
private _taskIndex;
|
|
9
|
-
private _percent;
|
|
10
|
-
get percent(): number;
|
|
11
|
-
constructor(onComplete?: () => void, onProgress?: (task: Task, loaded: number, total: number) => void, onError?: (task: Task) => void);
|
|
12
|
-
destroy(): void;
|
|
13
|
-
add(task: Task): void;
|
|
14
|
-
update(): void;
|
|
15
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Mapping, PixelFormat, TextureDataType, TextureFilter, Vector2, Wrapping } from "three";
|
|
2
|
-
export interface TextureSettings {
|
|
3
|
-
flipY?: boolean;
|
|
4
|
-
mapping?: Mapping;
|
|
5
|
-
wrapS?: Wrapping;
|
|
6
|
-
wrapT?: Wrapping;
|
|
7
|
-
magFilter?: TextureFilter;
|
|
8
|
-
minFilter?: TextureFilter;
|
|
9
|
-
format?: PixelFormat;
|
|
10
|
-
dataType?: TextureDataType;
|
|
11
|
-
anisotropy?: number;
|
|
12
|
-
repeat?: Vector2;
|
|
13
|
-
}
|