@xviewer.js/core 1.0.0-alpha.57 → 1.0.0-alpha.59
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 +79 -7
- package/dist/main.js.map +1 -1
- package/dist/module.js +80 -9
- package/dist/module.js.map +1 -1
- package/package.json +1 -1
- package/types/base/EventEmitter.d.ts +10 -10
- package/types/components/Animation.d.ts +26 -0
- package/types/components/index.d.ts +1 -0
- package/types/plugins/DropFilePlugin.d.ts +3 -1
package/package.json
CHANGED
|
@@ -4,26 +4,26 @@ interface EventHandler {
|
|
|
4
4
|
target?: Object;
|
|
5
5
|
once?: boolean;
|
|
6
6
|
}
|
|
7
|
-
interface Listener {
|
|
8
|
-
name:
|
|
7
|
+
interface Listener<T> {
|
|
8
|
+
name: T;
|
|
9
9
|
callback: (...args: any[]) => any;
|
|
10
10
|
}
|
|
11
|
-
export declare class EventEmitter {
|
|
11
|
+
export declare class EventEmitter<T extends string = string> {
|
|
12
12
|
protected _events: {
|
|
13
13
|
[k: string]: EventHandler[];
|
|
14
14
|
};
|
|
15
15
|
protected _removeEvent(list: EventHandler[], index: number, name: string): this;
|
|
16
16
|
clear(): this;
|
|
17
|
-
has(name:
|
|
18
|
-
on(name:
|
|
19
|
-
off(name:
|
|
20
|
-
onof(name:
|
|
21
|
-
_listeners?: Listener[];
|
|
17
|
+
has(name: T): boolean;
|
|
18
|
+
on(name: T, callback: (...args: any[]) => any, target?: Object, once?: boolean): this;
|
|
19
|
+
off(name: T, callback: (...args: any[]) => any, target?: Object): this;
|
|
20
|
+
onof(name: T, callback: (...args: any[]) => any, container: Object & {
|
|
21
|
+
_listeners?: Listener<T>[];
|
|
22
22
|
}): this;
|
|
23
23
|
offof(container: Object & {
|
|
24
|
-
_listeners?: Listener[];
|
|
24
|
+
_listeners?: Listener<T>[];
|
|
25
25
|
}): this;
|
|
26
26
|
targetOff(target: Object): this;
|
|
27
|
-
emit(name:
|
|
27
|
+
emit(name: T, ...args: any[]): this;
|
|
28
28
|
}
|
|
29
29
|
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AnimationAction, AnimationActionLoopStyles, AnimationMixer } from "three";
|
|
2
|
+
import { Component } from "../Component";
|
|
3
|
+
export declare class Animation extends Component {
|
|
4
|
+
private _mixer;
|
|
5
|
+
private _action;
|
|
6
|
+
private _actions;
|
|
7
|
+
private _progress;
|
|
8
|
+
playing: boolean;
|
|
9
|
+
get mixer(): AnimationMixer;
|
|
10
|
+
get action(): AnimationAction;
|
|
11
|
+
get actions(): AnimationAction[];
|
|
12
|
+
get progress(): number;
|
|
13
|
+
set progress(v: number);
|
|
14
|
+
onLoad(): void;
|
|
15
|
+
onDestroy(): void;
|
|
16
|
+
update(dt: number): void;
|
|
17
|
+
play(animName?: string, state?: {
|
|
18
|
+
mode?: AnimationActionLoopStyles;
|
|
19
|
+
repetitions?: number;
|
|
20
|
+
duration?: number;
|
|
21
|
+
clampWhenFinished?: boolean;
|
|
22
|
+
zeroSlopeAtStart?: boolean;
|
|
23
|
+
zeroSlopeAtEnd?: boolean;
|
|
24
|
+
}): this;
|
|
25
|
+
stop(): this;
|
|
26
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Plugin } from "../Plugin";
|
|
2
2
|
export declare class DropFilePlugin extends Plugin {
|
|
3
3
|
private _onLoad;
|
|
4
|
+
private _onError;
|
|
4
5
|
private _extensions;
|
|
5
|
-
constructor({ onLoad, extension, }?: {
|
|
6
|
+
constructor({ onLoad, onError, extension, }?: {
|
|
6
7
|
onLoad?: Function;
|
|
8
|
+
onError?: Function;
|
|
7
9
|
extension?: string | string[];
|
|
8
10
|
});
|
|
9
11
|
install(): void;
|