@3dverse/livelink.core 0.7.5 → 0.7.7

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,6 +1,6 @@
1
1
  import { RTID, UUID } from "../sources/types";
2
2
  import { EntityInterface } from "../sources/interfaces/EntityInterface";
3
- import { ConnectConfirmation, EditorEntity, EntityCreationOptions, EntityUpdatedEvent, UpdateComponentsCommand } from "./messages/editor";
3
+ import { ConnectConfirmation, EditorEntity, EntityCreationOptions, EntityUpdatedEvent, EntityVisibilityChangedEvent, UpdateComponentsCommand } from "./messages/editor";
4
4
  import { ComponentType } from "./types/components";
5
5
  /**
6
6
  * This follows the Livelink protocol specifications for the broker messages.
@@ -39,7 +39,7 @@ export declare class EditorMessageHandler extends EventTarget {
39
39
  entities: Array<EntityInterface>;
40
40
  options?: EntityCreationOptions;
41
41
  }): Promise<EditorEntity[]>;
42
- on_entities_created(data: Array<EditorEntity>): void;
42
+ onEntitiesCreated(data: Array<EditorEntity>): void;
43
43
  /**
44
44
  *
45
45
  */
@@ -97,6 +97,13 @@ export declare class EditorMessageHandler extends EventTarget {
97
97
  findEntitiesByNames({ entity_names }: {
98
98
  entity_names: Array<String>;
99
99
  }): Promise<Array<EditorEntity>>;
100
+ /**
101
+ *
102
+ */
103
+ setEntityVisibility({ entity_rtid, is_visible }: {
104
+ entity_rtid: RTID;
105
+ is_visible: boolean;
106
+ }): void;
100
107
  onFindEntitiesByNames(data: Record<string, EditorEntity>): void;
101
108
  /**
102
109
  *
@@ -107,32 +114,32 @@ export declare class EditorMessageHandler extends EventTarget {
107
114
  onClientColor(data: any): void;
108
115
  onSceneStatsUpdate(data: any): void;
109
116
  onServerError(data: any): void;
110
- on_create_entity(data: any): void;
111
- on_create_entities(data: any): void;
112
- on_restore_entities(data: any): void;
113
- on_spawn_entity(data: any): void;
114
- on_entity_reparented(data: any): void;
117
+ onCreateEntity(data: any): void;
118
+ onCreateEntities(data: any): void;
119
+ onRestoreEntities(data: any): void;
120
+ onSpawnEntity(data: any): void;
121
+ onEntityReparented(data: any): void;
115
122
  deleteEntities({ entity_uuids }: {
116
123
  entity_uuids: Array<UUID>;
117
124
  }): Promise<Array<UUID>>;
118
- on_entities_deleted(data: Array<UUID>): void;
119
- on_animation_sequence_instance_added(data: any): void;
120
- on_animation_sequence_instance_updated(data: any): void;
121
- on_animation_sequence_instance_removed(data: any): void;
122
- on_node_visibility_changed(data: any): void;
123
- on_action_error(data: any): void;
124
- on_attach_components(data: any): void;
125
- on_update_components(emitter_id: UUID | null, entitiesUpdatedEvent: Record<UUID, EntityUpdatedEvent>): void;
126
- on_detach_components(data: any): void;
127
- on_delete_entities(data: any): void;
128
- on_delete_entities_with_rtid(data: any): void;
129
- on_reparent_entity(data: any): void;
130
- on_entities_overridden(data: any): void;
131
- on_update_settings(data: any): void;
132
- on_select_entities(data: any): void;
133
- on_add_animation_sequence_instance(data: any): void;
134
- on_update_animation_sequence_instance(data: any): void;
135
- on_remove_animation_sequence_instance(data: any): void;
136
- on_set_node_visibility(data: any): void;
125
+ onEntitiesDeleted(data: Array<UUID>): void;
126
+ onAnimationSequenceInstanceAdded(data: any): void;
127
+ onAnimationSequenceInstanceUpdated(data: any): void;
128
+ onAnimationSequenceInstanceRemoved(data: any): void;
129
+ onEntityVisibilityChanged(data: EntityVisibilityChangedEvent): void;
130
+ onActionError(data: any): void;
131
+ onAttachComponents(data: any): void;
132
+ onUpdateComponents(emitter_id: UUID | null, entitiesUpdatedEvent: Record<UUID, EntityUpdatedEvent>): void;
133
+ onDetachComponents(data: any): void;
134
+ onDeleteEntities(data: any): void;
135
+ onDeleteEntitiesWithRtid(data: any): void;
136
+ onReparentEntity(data: any): void;
137
+ onEntitiesOverridden(data: any): void;
138
+ onUpdateSettings(data: any): void;
139
+ onSelectEntities(data: any): void;
140
+ onAddAnimationSequenceInstance(data: any): void;
141
+ onUpdateAnimationSequenceInstance(data: any): void;
142
+ onRemoveAnimationSequenceInstance(data: any): void;
143
+ onSetEntityVisibility(data: any): void;
137
144
  onUnhandledMessage(type: string, data: any): void;
138
145
  }
@@ -0,0 +1,5 @@
1
+ import { RTID } from "../../../sources/types";
2
+ export type EntityVisibilityChangedEvent = {
3
+ entityRTID: RTID;
4
+ isVisible: boolean;
5
+ };
@@ -3,3 +3,4 @@ export * from "./EditorEntity";
3
3
  export * from "./EntityCreationOptions";
4
4
  export * from "./EntityUpdatedEvent";
5
5
  export * from "./UpdateComponentsCommand";
6
+ export * from "./EntityVisibilityChangedEvent";
@@ -1,10 +1,18 @@
1
- import { RTID, Quat } from "../../../sources/types";
1
+ import { RTID, Quat, Vec3 } from "../../../sources/types";
2
+ /**
3
+ *
4
+ */
5
+ export type SkeletonPartialPose = {
6
+ positions?: Map<number, Vec3>;
7
+ orientations?: Map<number, Quat>;
8
+ scales?: Map<number, Vec3>;
9
+ };
2
10
  /**
3
11
  *
4
12
  */
5
13
  export type SkeletonPoseMessage = {
6
14
  controller_rtid: RTID;
7
- pose: Map<number, Quat>;
15
+ partial_pose: SkeletonPartialPose;
8
16
  };
9
17
  /**
10
18
  *
@@ -196,6 +196,13 @@ export declare class LivelinkCore {
196
196
  findEntitiesByNames({ entity_names }: {
197
197
  entity_names: Array<string>;
198
198
  }): Promise<Array<EditorEntity>>;
199
+ /**
200
+ * @deprecated
201
+ */
202
+ setEntityVisibility({ entity_rtid, is_visible }: {
203
+ entity_rtid: RTID;
204
+ is_visible: boolean;
205
+ }): Promise<void>;
199
206
  /**
200
207
  *
201
208
  */
@@ -2,6 +2,7 @@
2
2
  *
3
3
  */
4
4
  export type Vec2 = [number, number];
5
+ export declare const VEC2_BYTE_SIZE: 8;
5
6
  /**
6
7
  *
7
8
  */
@@ -14,6 +15,7 @@ export declare function serialize_Vec2({ data_view, offset, value, }: {
14
15
  *
15
16
  */
16
17
  export type Vec3 = [number, number, number];
18
+ export declare const VEC3_BYTE_SIZE: 12;
17
19
  /**
18
20
  *
19
21
  */
@@ -33,6 +35,7 @@ export declare function deserialize_Vec3({ data_view, offset }: {
33
35
  *
34
36
  */
35
37
  export type Vec4 = [number, number, number, number];
38
+ export declare const VEC4_BYTE_SIZE: 16;
36
39
  /**
37
40
  *
38
41
  */
@@ -45,6 +48,7 @@ export declare function serialize_Vec4({ data_view, offset, value, }: {
45
48
  *
46
49
  */
47
50
  export type Vec2i = Vec2;
51
+ export declare const VEC2I_BYTE_SIZE: 8;
48
52
  /**
49
53
  *
50
54
  */
@@ -56,6 +60,7 @@ export declare function deserialize_Vec2i({ data_view, offset }: {
56
60
  *
57
61
  */
58
62
  export type Vec2ui16 = Vec2;
63
+ export declare const VEC2UI16_BYTE_SIZE: 4;
59
64
  /**
60
65
  *
61
66
  */
@@ -8,6 +8,17 @@ export type Int32 = number;
8
8
  export type Int64 = bigint;
9
9
  export type Float = number;
10
10
  export type Double = number;
11
+ export declare const BOOL_BYTE_SIZE: 1;
12
+ export declare const UINT8_BYTE_SIZE: 1;
13
+ export declare const UINT16_BYTE_SIZE: 2;
14
+ export declare const UINT32_BYTE_SIZE: 4;
15
+ export declare const UINT64_BYTE_SIZE: 8;
16
+ export declare const INT8_BYTE_SIZE: 1;
17
+ export declare const INT16_BYTE_SIZE: 2;
18
+ export declare const INT32_BYTE_SIZE: 4;
19
+ export declare const INT64_BYTE_SIZE: 8;
20
+ export declare const FLOAT_BYTE_SIZE: 4;
21
+ export declare const DOUBLE_BYTE_SIZE: 8;
11
22
  /**
12
23
  *
13
24
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3dverse/livelink.core",
3
- "version": "0.7.5",
3
+ "version": "0.7.7",
4
4
  "description": "3dverse Livelink Core types.",
5
5
  "main": "./dist/library.cjs",
6
6
  "module": "./dist/library.mjs",