@dcl/schemas 11.0.0 → 11.1.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.
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Emitter } from 'mitt';
|
|
2
|
+
import type { Metrics } from '../../platform/item/metrics';
|
|
3
|
+
import type { PreviewEmoteEventType } from './preview-emote-event-type';
|
|
2
4
|
export interface IPreviewController {
|
|
3
5
|
scene: ISceneController;
|
|
4
6
|
emote: IEmoteController;
|
|
5
7
|
}
|
|
8
|
+
export type EmoteEvents = {
|
|
9
|
+
[PreviewEmoteEventType.ANIMATION_PLAY]: void;
|
|
10
|
+
[PreviewEmoteEventType.ANIMATION_PAUSE]: void;
|
|
11
|
+
[PreviewEmoteEventType.ANIMATION_LOOP]: void;
|
|
12
|
+
[PreviewEmoteEventType.ANIMATION_END]: void;
|
|
13
|
+
[PreviewEmoteEventType.ANIMATION_PLAYING]: {
|
|
14
|
+
length: number;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
6
17
|
export interface ISceneController {
|
|
7
18
|
getScreenshot(width: number, height: number): Promise<string>;
|
|
8
19
|
getMetrics(): Promise<Metrics>;
|
|
@@ -28,6 +39,6 @@ export interface IEmoteController {
|
|
|
28
39
|
enableSound(): Promise<void>;
|
|
29
40
|
disableSound(): Promise<void>;
|
|
30
41
|
hasSound(): Promise<boolean>;
|
|
31
|
-
events:
|
|
42
|
+
events: Emitter<EmoteEvents>;
|
|
32
43
|
}
|
|
33
44
|
//# sourceMappingURL=preview-controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview-controller.d.ts","sourceRoot":"","sources":["../../../src/dapps/preview/preview-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"preview-controller.d.ts","sourceRoot":"","sources":["../../../src/dapps/preview/preview-controller.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O,CAAC,IAAI,CAAC,CAAA;CAClG;AACD,MAAM,WAAW,gBAAgB;IAC/B,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAC5B,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAAA;IAC7B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACpC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACrB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACtB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACrB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5B,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7B,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,CAAA;IAC5B,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;CAC7B"}
|
package/dist/schemas.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Ajv from 'ajv';
|
|
2
|
+
import type { Emitter } from 'mitt';
|
|
2
3
|
import { ErrorObject } from 'ajv';
|
|
3
4
|
import { JSONSchemaType } from 'ajv';
|
|
4
5
|
import { KeywordDefinition } from 'ajv';
|
|
@@ -555,6 +556,16 @@ declare type EmoteEventPayload<T extends PreviewEmoteEventType> = T extends Prev
|
|
|
555
556
|
length: number;
|
|
556
557
|
} : undefined;
|
|
557
558
|
|
|
559
|
+
export declare type EmoteEvents = {
|
|
560
|
+
[PreviewEmoteEventType.ANIMATION_PLAY]: void;
|
|
561
|
+
[PreviewEmoteEventType.ANIMATION_PAUSE]: void;
|
|
562
|
+
[PreviewEmoteEventType.ANIMATION_LOOP]: void;
|
|
563
|
+
[PreviewEmoteEventType.ANIMATION_END]: void;
|
|
564
|
+
[PreviewEmoteEventType.ANIMATION_PLAYING]: {
|
|
565
|
+
length: number;
|
|
566
|
+
};
|
|
567
|
+
};
|
|
568
|
+
|
|
558
569
|
export declare enum EmotePlayMode {
|
|
559
570
|
SIMPLE = "simple",
|
|
560
571
|
LOOP = "loop"
|
|
@@ -732,7 +743,7 @@ export declare interface IEmoteController {
|
|
|
732
743
|
enableSound(): Promise<void>;
|
|
733
744
|
disableSound(): Promise<void>;
|
|
734
745
|
hasSound(): Promise<boolean>;
|
|
735
|
-
events:
|
|
746
|
+
events: Emitter<EmoteEvents>;
|
|
736
747
|
}
|
|
737
748
|
|
|
738
749
|
/**
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "11.
|
|
2
|
+
"version": "11.1.0",
|
|
3
3
|
"name": "@dcl/schemas",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"typings": "./dist/index.d.ts",
|
|
@@ -38,10 +38,11 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"ajv": "^8.11.0",
|
|
40
40
|
"ajv-errors": "^3.0.0",
|
|
41
|
-
"ajv-keywords": "^5.1.0"
|
|
41
|
+
"ajv-keywords": "^5.1.0",
|
|
42
|
+
"mitt": "^3.0.1"
|
|
42
43
|
},
|
|
43
44
|
"files": [
|
|
44
45
|
"dist"
|
|
45
46
|
],
|
|
46
|
-
"commit": "
|
|
47
|
+
"commit": "f7c951d6d2450422d32f645298463c1f511b85a0"
|
|
47
48
|
}
|