@dcl/sdk 7.0.0-3445274368.commit-063bc43 → 7.0.0-3445306719.commit-c9822af
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/ecs7/index.d.ts +47 -7
- package/dist/ecs7/index.js +76 -1
- package/dist/ecs7/index.min.js +1 -1
- package/dist/ecs7/index.min.js.map +1 -1
- package/package.json +5 -5
- package/types/ecs7/index.d.ts +47 -7
package/dist/ecs7/index.d.ts
CHANGED
@@ -1,7 +1,50 @@
|
|
1
1
|
/// <reference types="@dcl/posix" />
|
2
2
|
|
3
3
|
/** @public */
|
4
|
-
export declare const Animator:
|
4
|
+
export declare const Animator: AnimatorComponentDefinition;
|
5
|
+
|
6
|
+
/**
|
7
|
+
* @public
|
8
|
+
*/
|
9
|
+
export declare interface AnimatorComponentDefinition extends ComponentDefinition {
|
10
|
+
/**
|
11
|
+
* @public
|
12
|
+
*
|
13
|
+
* Get a `mutable` version of animator clip
|
14
|
+
* @param entity - entity with Animator component
|
15
|
+
* @param name - the field `name` of the component
|
16
|
+
* @returns the clip or fails if it isn't found
|
17
|
+
*/
|
18
|
+
getClip(entity: Entity, name: string): PBAnimationState;
|
19
|
+
/**
|
20
|
+
* @public
|
21
|
+
*
|
22
|
+
* Get a `mutable` version of animator clip
|
23
|
+
* @param entity - entity with Animator component
|
24
|
+
* @param name - the field `name` of the component
|
25
|
+
* @returns the clip or null if it isn't found
|
26
|
+
*/
|
27
|
+
getClipOrNull(entity: Entity, name: string): PBAnimationState | null;
|
28
|
+
/**
|
29
|
+
* @public
|
30
|
+
*
|
31
|
+
* Set playing=true the animation `$name`
|
32
|
+
* @param entity - entity with Animator component
|
33
|
+
* @param name - animation name
|
34
|
+
* @param resetCursor - the animation starts at 0 or continues from the current cursor position
|
35
|
+
* @returns true in successful playing, false if it doesn't find the Animator or clip
|
36
|
+
*/
|
37
|
+
playSingleAnimation(entity: Entity, name: string, resetCursor?: boolean): boolean;
|
38
|
+
/**
|
39
|
+
* @public
|
40
|
+
*
|
41
|
+
* Set playing=false all animations
|
42
|
+
* @param entity - entity with Animator component
|
43
|
+
* @param resetCursor - the animation stops at 0 or at the current cursor position
|
44
|
+
* @returns true in successful playing, false if it doesn't find the Animator
|
45
|
+
*/
|
46
|
+
stopAllAnimations(entity: Entity, resetCursor?: boolean): boolean;
|
47
|
+
}
|
5
48
|
|
6
49
|
/** @public */
|
7
50
|
export declare const AudioSource: ComponentDefinition<ISchema<PBAudioSource>, PBAudioSource>;
|
@@ -917,7 +960,7 @@ export declare namespace Components {
|
|
917
960
|
/** @public */
|
918
961
|
const Transform: ComponentDefinition<ISchema<TransformType>, Partial<TransformType>>;
|
919
962
|
/** @public */
|
920
|
-
const Animator:
|
963
|
+
const Animator: AnimatorComponentDefinition;
|
921
964
|
/** @public */
|
922
965
|
const AudioSource: ComponentDefinition<ISchema<PBAudioSource>, PBAudioSource>;
|
923
966
|
/** @public */
|
@@ -1156,8 +1199,8 @@ export declare type DeepReadonlyObject<T> = {
|
|
1156
1199
|
export declare type DeepReadonlySet<T> = ReadonlySet<DeepReadonly<T>>;
|
1157
1200
|
|
1158
1201
|
declare function defineSdkComponents(engine: PreEngine): {
|
1202
|
+
Animator: AnimatorComponentDefinition;
|
1159
1203
|
Transform: ComponentDefinition<ISchema<TransformType>, Partial<TransformType>>;
|
1160
|
-
Animator: ComponentDefinition<ISchema<PBAnimator>, PBAnimator>;
|
1161
1204
|
AudioSource: ComponentDefinition<ISchema<PBAudioSource>, PBAudioSource>;
|
1162
1205
|
AudioStream: ComponentDefinition<ISchema<PBAudioStream>, PBAudioStream>;
|
1163
1206
|
AvatarAttach: ComponentDefinition<ISchema<PBAvatarAttach>, PBAvatarAttach>;
|
@@ -2616,10 +2659,6 @@ declare interface PBAnimationState {
|
|
2616
2659
|
shouldReset?: boolean | undefined;
|
2617
2660
|
}
|
2618
2661
|
|
2619
|
-
declare interface PBAnimator {
|
2620
|
-
states: PBAnimationState[];
|
2621
|
-
}
|
2622
|
-
|
2623
2662
|
declare interface PBAudioSource {
|
2624
2663
|
playing?: boolean | undefined;
|
2625
2664
|
/** default=1.0f */
|
@@ -3665,6 +3704,7 @@ export declare namespace Schemas {
|
|
3665
3704
|
const Quaternion: ISchema<QuaternionType>;
|
3666
3705
|
const Color3: ISchema<Color3Type>;
|
3667
3706
|
const Color4: ISchema<Color4Type>;
|
3707
|
+
const Entity: ISchema<Entity>;
|
3668
3708
|
const Enum: typeof IEnum;
|
3669
3709
|
const Array: typeof IArray;
|
3670
3710
|
const Map: typeof IMap;
|