@dcl/ecs 7.3.30-7034348340.commit-a8a623c → 7.3.30-7039895622.commit-39f9862
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/components/generated/global.gen.d.ts +0 -8
- package/dist/components/generated/global.gen.js +0 -4
- package/dist/components/generated/index.gen.d.ts +0 -16
- package/dist/components/generated/index.gen.js +0 -20
- package/dist/systems/raycast.js +18 -8
- package/dist-cjs/components/generated/global.gen.d.ts +0 -8
- package/dist-cjs/components/generated/global.gen.js +1 -5
- package/dist-cjs/components/generated/index.gen.d.ts +0 -16
- package/dist-cjs/components/generated/index.gen.js +1 -25
- package/dist-cjs/systems/raycast.js +18 -8
- package/package.json +2 -2
|
@@ -3,9 +3,6 @@ export * from './index.gen';
|
|
|
3
3
|
import { PBAudioSource } from './pb/decentraland/sdk/components/audio_source.gen';
|
|
4
4
|
import { PBAudioStream } from './pb/decentraland/sdk/components/audio_stream.gen';
|
|
5
5
|
import { PBAvatarAttach } from './pb/decentraland/sdk/components/avatar_attach.gen';
|
|
6
|
-
import { PBAvatarBase } from './pb/decentraland/sdk/components/avatar_base.gen';
|
|
7
|
-
import { PBAvatarEmoteCommand } from './pb/decentraland/sdk/components/avatar_emote_command.gen';
|
|
8
|
-
import { PBAvatarEquippedData } from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
|
|
9
6
|
import { PBAvatarModifierArea } from './pb/decentraland/sdk/components/avatar_modifier_area.gen';
|
|
10
7
|
import { PBAvatarShape } from './pb/decentraland/sdk/components/avatar_shape.gen';
|
|
11
8
|
import { PBBillboard } from './pb/decentraland/sdk/components/billboard.gen';
|
|
@@ -15,7 +12,6 @@ import { PBEngineInfo } from './pb/decentraland/sdk/components/engine_info.gen';
|
|
|
15
12
|
import { PBGltfContainer } from './pb/decentraland/sdk/components/gltf_container.gen';
|
|
16
13
|
import { PBGltfContainerLoadingState } from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';
|
|
17
14
|
import { PBNftShape } from './pb/decentraland/sdk/components/nft_shape.gen';
|
|
18
|
-
import { PBPlayerIdentityData } from './pb/decentraland/sdk/components/player_identity_data.gen';
|
|
19
15
|
import { PBPointerEvents } from './pb/decentraland/sdk/components/pointer_events.gen';
|
|
20
16
|
import { PBPointerEventsResult } from './pb/decentraland/sdk/components/pointer_events_result.gen';
|
|
21
17
|
import { PBPointerLock } from './pb/decentraland/sdk/components/pointer_lock.gen';
|
|
@@ -38,9 +34,6 @@ import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibili
|
|
|
38
34
|
/** @public */ export declare const AudioSource: LastWriteWinElementSetComponentDefinition<PBAudioSource>;
|
|
39
35
|
/** @public */ export declare const AudioStream: LastWriteWinElementSetComponentDefinition<PBAudioStream>;
|
|
40
36
|
/** @public */ export declare const AvatarAttach: LastWriteWinElementSetComponentDefinition<PBAvatarAttach>;
|
|
41
|
-
/** @public */ export declare const AvatarBase: LastWriteWinElementSetComponentDefinition<PBAvatarBase>;
|
|
42
|
-
/** @public */ export declare const AvatarEmoteCommand: LastWriteWinElementSetComponentDefinition<PBAvatarEmoteCommand>;
|
|
43
|
-
/** @public */ export declare const AvatarEquippedData: LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>;
|
|
44
37
|
/** @public */ export declare const AvatarModifierArea: LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>;
|
|
45
38
|
/** @public */ export declare const AvatarShape: LastWriteWinElementSetComponentDefinition<PBAvatarShape>;
|
|
46
39
|
/** @public */ export declare const Billboard: LastWriteWinElementSetComponentDefinition<PBBillboard>;
|
|
@@ -50,7 +43,6 @@ import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibili
|
|
|
50
43
|
/** @public */ export declare const GltfContainer: LastWriteWinElementSetComponentDefinition<PBGltfContainer>;
|
|
51
44
|
/** @public */ export declare const GltfContainerLoadingState: LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>;
|
|
52
45
|
/** @public */ export declare const NftShape: LastWriteWinElementSetComponentDefinition<PBNftShape>;
|
|
53
|
-
/** @public */ export declare const PlayerIdentityData: LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>;
|
|
54
46
|
/** @public */ export declare const PointerEvents: LastWriteWinElementSetComponentDefinition<PBPointerEvents>;
|
|
55
47
|
/** @public */ export declare const PointerEventsResult: GrowOnlyValueSetComponentDefinition<PBPointerEventsResult>;
|
|
56
48
|
/** @public */ export declare const PointerLock: LastWriteWinElementSetComponentDefinition<PBPointerLock>;
|
|
@@ -4,9 +4,6 @@ export * from './index.gen';
|
|
|
4
4
|
/** @public */ export const AudioSource = /* @__PURE__ */ components.AudioSource(engine);
|
|
5
5
|
/** @public */ export const AudioStream = /* @__PURE__ */ components.AudioStream(engine);
|
|
6
6
|
/** @public */ export const AvatarAttach = /* @__PURE__ */ components.AvatarAttach(engine);
|
|
7
|
-
/** @public */ export const AvatarBase = /* @__PURE__ */ components.AvatarBase(engine);
|
|
8
|
-
/** @public */ export const AvatarEmoteCommand = /* @__PURE__ */ components.AvatarEmoteCommand(engine);
|
|
9
|
-
/** @public */ export const AvatarEquippedData = /* @__PURE__ */ components.AvatarEquippedData(engine);
|
|
10
7
|
/** @public */ export const AvatarModifierArea = /* @__PURE__ */ components.AvatarModifierArea(engine);
|
|
11
8
|
/** @public */ export const AvatarShape = /* @__PURE__ */ components.AvatarShape(engine);
|
|
12
9
|
/** @public */ export const Billboard = /* @__PURE__ */ components.Billboard(engine);
|
|
@@ -16,7 +13,6 @@ export * from './index.gen';
|
|
|
16
13
|
/** @public */ export const GltfContainer = /* @__PURE__ */ components.GltfContainer(engine);
|
|
17
14
|
/** @public */ export const GltfContainerLoadingState = /* @__PURE__ */ components.GltfContainerLoadingState(engine);
|
|
18
15
|
/** @public */ export const NftShape = /* @__PURE__ */ components.NftShape(engine);
|
|
19
|
-
/** @public */ export const PlayerIdentityData = /* @__PURE__ */ components.PlayerIdentityData(engine);
|
|
20
16
|
/** @public */ export const PointerEvents = /* @__PURE__ */ components.PointerEvents(engine);
|
|
21
17
|
/** @public */ export const PointerEventsResult = /* @__PURE__ */ components.PointerEventsResult(engine);
|
|
22
18
|
/** @public */ export const PointerLock = /* @__PURE__ */ components.PointerLock(engine);
|
|
@@ -4,9 +4,6 @@ import { PBAnimator } from './pb/decentraland/sdk/components/animator.gen';
|
|
|
4
4
|
import { PBAudioSource } from './pb/decentraland/sdk/components/audio_source.gen';
|
|
5
5
|
import { PBAudioStream } from './pb/decentraland/sdk/components/audio_stream.gen';
|
|
6
6
|
import { PBAvatarAttach } from './pb/decentraland/sdk/components/avatar_attach.gen';
|
|
7
|
-
import { PBAvatarBase } from './pb/decentraland/sdk/components/avatar_base.gen';
|
|
8
|
-
import { PBAvatarEmoteCommand } from './pb/decentraland/sdk/components/avatar_emote_command.gen';
|
|
9
|
-
import { PBAvatarEquippedData } from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
|
|
10
7
|
import { PBAvatarModifierArea } from './pb/decentraland/sdk/components/avatar_modifier_area.gen';
|
|
11
8
|
import { PBAvatarShape } from './pb/decentraland/sdk/components/avatar_shape.gen';
|
|
12
9
|
import { PBBillboard } from './pb/decentraland/sdk/components/billboard.gen';
|
|
@@ -19,7 +16,6 @@ import { PBMaterial } from './pb/decentraland/sdk/components/material.gen';
|
|
|
19
16
|
import { PBMeshCollider } from './pb/decentraland/sdk/components/mesh_collider.gen';
|
|
20
17
|
import { PBMeshRenderer } from './pb/decentraland/sdk/components/mesh_renderer.gen';
|
|
21
18
|
import { PBNftShape } from './pb/decentraland/sdk/components/nft_shape.gen';
|
|
22
|
-
import { PBPlayerIdentityData } from './pb/decentraland/sdk/components/player_identity_data.gen';
|
|
23
19
|
import { PBPointerEvents } from './pb/decentraland/sdk/components/pointer_events.gen';
|
|
24
20
|
import { PBPointerEventsResult } from './pb/decentraland/sdk/components/pointer_events_result.gen';
|
|
25
21
|
import { PBPointerLock } from './pb/decentraland/sdk/components/pointer_lock.gen';
|
|
@@ -44,9 +40,6 @@ export * from './pb/decentraland/sdk/components/animator.gen';
|
|
|
44
40
|
export * from './pb/decentraland/sdk/components/audio_source.gen';
|
|
45
41
|
export * from './pb/decentraland/sdk/components/audio_stream.gen';
|
|
46
42
|
export * from './pb/decentraland/sdk/components/avatar_attach.gen';
|
|
47
|
-
export * from './pb/decentraland/sdk/components/avatar_base.gen';
|
|
48
|
-
export * from './pb/decentraland/sdk/components/avatar_emote_command.gen';
|
|
49
|
-
export * from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
|
|
50
43
|
export * from './pb/decentraland/sdk/components/avatar_modifier_area.gen';
|
|
51
44
|
export * from './pb/decentraland/sdk/components/avatar_shape.gen';
|
|
52
45
|
export * from './pb/decentraland/sdk/components/billboard.gen';
|
|
@@ -59,7 +52,6 @@ export * from './pb/decentraland/sdk/components/material.gen';
|
|
|
59
52
|
export * from './pb/decentraland/sdk/components/mesh_collider.gen';
|
|
60
53
|
export * from './pb/decentraland/sdk/components/mesh_renderer.gen';
|
|
61
54
|
export * from './pb/decentraland/sdk/components/nft_shape.gen';
|
|
62
|
-
export * from './pb/decentraland/sdk/components/player_identity_data.gen';
|
|
63
55
|
export * from './pb/decentraland/sdk/components/pointer_events.gen';
|
|
64
56
|
export * from './pb/decentraland/sdk/components/pointer_events_result.gen';
|
|
65
57
|
export * from './pb/decentraland/sdk/components/pointer_lock.gen';
|
|
@@ -86,9 +78,6 @@ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<an
|
|
|
86
78
|
/** @public */ export declare const AudioSource: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioSource>>;
|
|
87
79
|
/** @public */ export declare const AudioStream: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioStream>>;
|
|
88
80
|
/** @public */ export declare const AvatarAttach: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarAttach>>;
|
|
89
|
-
/** @public */ export declare const AvatarBase: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarBase>>;
|
|
90
|
-
/** @public */ export declare const AvatarEmoteCommand: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEmoteCommand>>;
|
|
91
|
-
/** @public */ export declare const AvatarEquippedData: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>>;
|
|
92
81
|
/** @public */ export declare const AvatarModifierArea: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
|
|
93
82
|
/** @public */ export declare const AvatarShape: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
|
|
94
83
|
/** @public */ export declare const Billboard: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
|
|
@@ -101,7 +90,6 @@ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<an
|
|
|
101
90
|
/** @public */ export declare const MeshCollider: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
|
102
91
|
/** @public */ export declare const MeshRenderer: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
|
|
103
92
|
/** @public */ export declare const NftShape: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBNftShape>>;
|
|
104
|
-
/** @public */ export declare const PlayerIdentityData: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>>;
|
|
105
93
|
/** @public */ export declare const PointerEvents: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerEvents>>;
|
|
106
94
|
/** @public */ export declare const PointerEventsResult: GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBPointerEventsResult>>;
|
|
107
95
|
/** @public */ export declare const PointerLock: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerLock>>;
|
|
@@ -128,9 +116,6 @@ export declare const componentDefinitionByName: {
|
|
|
128
116
|
"core::AudioSource": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioSource>>;
|
|
129
117
|
"core::AudioStream": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioStream>>;
|
|
130
118
|
"core::AvatarAttach": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarAttach>>;
|
|
131
|
-
"core::AvatarBase": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarBase>>;
|
|
132
|
-
"core::AvatarEmoteCommand": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEmoteCommand>>;
|
|
133
|
-
"core::AvatarEquippedData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>>;
|
|
134
119
|
"core::AvatarModifierArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
|
|
135
120
|
"core::AvatarShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
|
|
136
121
|
"core::Billboard": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
|
|
@@ -143,7 +128,6 @@ export declare const componentDefinitionByName: {
|
|
|
143
128
|
"core::MeshCollider": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
|
144
129
|
"core::MeshRenderer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
|
|
145
130
|
"core::NftShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBNftShape>>;
|
|
146
|
-
"core::PlayerIdentityData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>>;
|
|
147
131
|
"core::PointerEvents": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerEvents>>;
|
|
148
132
|
"core::PointerEventsResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBPointerEventsResult>>;
|
|
149
133
|
"core::PointerLock": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerLock>>;
|
|
@@ -2,9 +2,6 @@ import { AnimatorSchema } from './Animator.gen';
|
|
|
2
2
|
import { AudioSourceSchema } from './AudioSource.gen';
|
|
3
3
|
import { AudioStreamSchema } from './AudioStream.gen';
|
|
4
4
|
import { AvatarAttachSchema } from './AvatarAttach.gen';
|
|
5
|
-
import { AvatarBaseSchema } from './AvatarBase.gen';
|
|
6
|
-
import { AvatarEmoteCommandSchema } from './AvatarEmoteCommand.gen';
|
|
7
|
-
import { AvatarEquippedDataSchema } from './AvatarEquippedData.gen';
|
|
8
5
|
import { AvatarModifierAreaSchema } from './AvatarModifierArea.gen';
|
|
9
6
|
import { AvatarShapeSchema } from './AvatarShape.gen';
|
|
10
7
|
import { BillboardSchema } from './Billboard.gen';
|
|
@@ -17,7 +14,6 @@ import { MaterialSchema } from './Material.gen';
|
|
|
17
14
|
import { MeshColliderSchema } from './MeshCollider.gen';
|
|
18
15
|
import { MeshRendererSchema } from './MeshRenderer.gen';
|
|
19
16
|
import { NftShapeSchema } from './NftShape.gen';
|
|
20
|
-
import { PlayerIdentityDataSchema } from './PlayerIdentityData.gen';
|
|
21
17
|
import { PointerEventsSchema } from './PointerEvents.gen';
|
|
22
18
|
import { PointerEventsResultSchema } from './PointerEventsResult.gen';
|
|
23
19
|
import { PointerLockSchema } from './PointerLock.gen';
|
|
@@ -42,9 +38,6 @@ export * from './pb/decentraland/sdk/components/animator.gen';
|
|
|
42
38
|
export * from './pb/decentraland/sdk/components/audio_source.gen';
|
|
43
39
|
export * from './pb/decentraland/sdk/components/audio_stream.gen';
|
|
44
40
|
export * from './pb/decentraland/sdk/components/avatar_attach.gen';
|
|
45
|
-
export * from './pb/decentraland/sdk/components/avatar_base.gen';
|
|
46
|
-
export * from './pb/decentraland/sdk/components/avatar_emote_command.gen';
|
|
47
|
-
export * from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
|
|
48
41
|
export * from './pb/decentraland/sdk/components/avatar_modifier_area.gen';
|
|
49
42
|
export * from './pb/decentraland/sdk/components/avatar_shape.gen';
|
|
50
43
|
export * from './pb/decentraland/sdk/components/billboard.gen';
|
|
@@ -57,7 +50,6 @@ export * from './pb/decentraland/sdk/components/material.gen';
|
|
|
57
50
|
export * from './pb/decentraland/sdk/components/mesh_collider.gen';
|
|
58
51
|
export * from './pb/decentraland/sdk/components/mesh_renderer.gen';
|
|
59
52
|
export * from './pb/decentraland/sdk/components/nft_shape.gen';
|
|
60
|
-
export * from './pb/decentraland/sdk/components/player_identity_data.gen';
|
|
61
53
|
export * from './pb/decentraland/sdk/components/pointer_events.gen';
|
|
62
54
|
export * from './pb/decentraland/sdk/components/pointer_events_result.gen';
|
|
63
55
|
export * from './pb/decentraland/sdk/components/pointer_lock.gen';
|
|
@@ -86,12 +78,6 @@ export * from './pb/decentraland/sdk/components/visibility_component.gen';
|
|
|
86
78
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::AudioStream", AudioStreamSchema);
|
|
87
79
|
/** @public */ export const AvatarAttach = engine =>
|
|
88
80
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarAttach", AvatarAttachSchema);
|
|
89
|
-
/** @public */ export const AvatarBase = engine =>
|
|
90
|
-
/* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarBase", AvatarBaseSchema);
|
|
91
|
-
/** @public */ export const AvatarEmoteCommand = engine =>
|
|
92
|
-
/* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarEmoteCommand", AvatarEmoteCommandSchema);
|
|
93
|
-
/** @public */ export const AvatarEquippedData = engine =>
|
|
94
|
-
/* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarEquippedData", AvatarEquippedDataSchema);
|
|
95
81
|
/** @public */ export const AvatarModifierArea = engine =>
|
|
96
82
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarModifierArea", AvatarModifierAreaSchema);
|
|
97
83
|
/** @public */ export const AvatarShape = engine =>
|
|
@@ -116,8 +102,6 @@ export * from './pb/decentraland/sdk/components/visibility_component.gen';
|
|
|
116
102
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::MeshRenderer", MeshRendererSchema);
|
|
117
103
|
/** @public */ export const NftShape = engine =>
|
|
118
104
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::NftShape", NftShapeSchema);
|
|
119
|
-
/** @public */ export const PlayerIdentityData = engine =>
|
|
120
|
-
/* @__PURE__ */ engine.defineComponentFromSchema("core::PlayerIdentityData", PlayerIdentityDataSchema);
|
|
121
105
|
/** @public */ export const PointerEvents = engine =>
|
|
122
106
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::PointerEvents", PointerEventsSchema);
|
|
123
107
|
/** @public */ export const PointerEventsResult = (engine) => /* @__PURE__ */ engine.defineValueSetComponentFromSchema("core::PointerEventsResult", PointerEventsResultSchema, {
|
|
@@ -168,9 +152,6 @@ export const componentDefinitionByName = /* @__PURE__ */ {
|
|
|
168
152
|
"core::AudioSource": AudioSource,
|
|
169
153
|
"core::AudioStream": AudioStream,
|
|
170
154
|
"core::AvatarAttach": AvatarAttach,
|
|
171
|
-
"core::AvatarBase": AvatarBase,
|
|
172
|
-
"core::AvatarEmoteCommand": AvatarEmoteCommand,
|
|
173
|
-
"core::AvatarEquippedData": AvatarEquippedData,
|
|
174
155
|
"core::AvatarModifierArea": AvatarModifierArea,
|
|
175
156
|
"core::AvatarShape": AvatarShape,
|
|
176
157
|
"core::Billboard": Billboard,
|
|
@@ -183,7 +164,6 @@ export const componentDefinitionByName = /* @__PURE__ */ {
|
|
|
183
164
|
"core::MeshCollider": MeshCollider,
|
|
184
165
|
"core::MeshRenderer": MeshRenderer,
|
|
185
166
|
"core::NftShape": NftShape,
|
|
186
|
-
"core::PlayerIdentityData": PlayerIdentityData,
|
|
187
167
|
"core::PointerEvents": PointerEvents,
|
|
188
168
|
"core::PointerEventsResult": PointerEventsResult,
|
|
189
169
|
"core::PointerLock": PointerLock,
|
package/dist/systems/raycast.js
CHANGED
|
@@ -46,15 +46,21 @@ export function createRaycastSystem(engine) {
|
|
|
46
46
|
targetEntity: options.targetEntity || 0
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
|
+
const nextTickRaycasts = [];
|
|
49
50
|
function registerRaycastWithCallback(entity, raycastValue, callback) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
// Raycasts registration is delayed 1 frame to avoid same-frame raycast
|
|
52
|
+
// removal/adding (the client never receives the removal on those situations)
|
|
53
|
+
const onNextTick = () => {
|
|
54
|
+
const raycast = Raycast.createOrReplace(entity);
|
|
55
|
+
raycast.maxDistance = raycastValue.maxDistance;
|
|
56
|
+
raycast.originOffset = raycastValue.originOffset;
|
|
57
|
+
raycast.collisionMask = raycastValue.collisionMask;
|
|
58
|
+
raycast.direction = raycastValue.directionRawValue;
|
|
59
|
+
raycast.continuous = raycastValue.continuous;
|
|
60
|
+
raycast.queryType = raycastValue.queryType;
|
|
61
|
+
entitiesCallbackResultMap.set(entity, { callback: callback });
|
|
62
|
+
};
|
|
63
|
+
nextTickRaycasts.push(onNextTick);
|
|
58
64
|
}
|
|
59
65
|
function removeRaycast(entity) {
|
|
60
66
|
Raycast.deleteFrom(entity);
|
|
@@ -63,6 +69,10 @@ export function createRaycastSystem(engine) {
|
|
|
63
69
|
}
|
|
64
70
|
// @internal
|
|
65
71
|
engine.addSystem(function EventSystem() {
|
|
72
|
+
for (const addMissingRaycast of nextTickRaycasts) {
|
|
73
|
+
addMissingRaycast();
|
|
74
|
+
}
|
|
75
|
+
nextTickRaycasts.length = 0;
|
|
66
76
|
for (const [entity, data] of entitiesCallbackResultMap) {
|
|
67
77
|
const raycast = Raycast.getOrNull(entity);
|
|
68
78
|
if (engine.getEntityState(entity) === EntityState.Removed || !raycast) {
|
|
@@ -3,9 +3,6 @@ export * from './index.gen';
|
|
|
3
3
|
import { PBAudioSource } from './pb/decentraland/sdk/components/audio_source.gen';
|
|
4
4
|
import { PBAudioStream } from './pb/decentraland/sdk/components/audio_stream.gen';
|
|
5
5
|
import { PBAvatarAttach } from './pb/decentraland/sdk/components/avatar_attach.gen';
|
|
6
|
-
import { PBAvatarBase } from './pb/decentraland/sdk/components/avatar_base.gen';
|
|
7
|
-
import { PBAvatarEmoteCommand } from './pb/decentraland/sdk/components/avatar_emote_command.gen';
|
|
8
|
-
import { PBAvatarEquippedData } from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
|
|
9
6
|
import { PBAvatarModifierArea } from './pb/decentraland/sdk/components/avatar_modifier_area.gen';
|
|
10
7
|
import { PBAvatarShape } from './pb/decentraland/sdk/components/avatar_shape.gen';
|
|
11
8
|
import { PBBillboard } from './pb/decentraland/sdk/components/billboard.gen';
|
|
@@ -15,7 +12,6 @@ import { PBEngineInfo } from './pb/decentraland/sdk/components/engine_info.gen';
|
|
|
15
12
|
import { PBGltfContainer } from './pb/decentraland/sdk/components/gltf_container.gen';
|
|
16
13
|
import { PBGltfContainerLoadingState } from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';
|
|
17
14
|
import { PBNftShape } from './pb/decentraland/sdk/components/nft_shape.gen';
|
|
18
|
-
import { PBPlayerIdentityData } from './pb/decentraland/sdk/components/player_identity_data.gen';
|
|
19
15
|
import { PBPointerEvents } from './pb/decentraland/sdk/components/pointer_events.gen';
|
|
20
16
|
import { PBPointerEventsResult } from './pb/decentraland/sdk/components/pointer_events_result.gen';
|
|
21
17
|
import { PBPointerLock } from './pb/decentraland/sdk/components/pointer_lock.gen';
|
|
@@ -38,9 +34,6 @@ import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibili
|
|
|
38
34
|
/** @public */ export declare const AudioSource: LastWriteWinElementSetComponentDefinition<PBAudioSource>;
|
|
39
35
|
/** @public */ export declare const AudioStream: LastWriteWinElementSetComponentDefinition<PBAudioStream>;
|
|
40
36
|
/** @public */ export declare const AvatarAttach: LastWriteWinElementSetComponentDefinition<PBAvatarAttach>;
|
|
41
|
-
/** @public */ export declare const AvatarBase: LastWriteWinElementSetComponentDefinition<PBAvatarBase>;
|
|
42
|
-
/** @public */ export declare const AvatarEmoteCommand: LastWriteWinElementSetComponentDefinition<PBAvatarEmoteCommand>;
|
|
43
|
-
/** @public */ export declare const AvatarEquippedData: LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>;
|
|
44
37
|
/** @public */ export declare const AvatarModifierArea: LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>;
|
|
45
38
|
/** @public */ export declare const AvatarShape: LastWriteWinElementSetComponentDefinition<PBAvatarShape>;
|
|
46
39
|
/** @public */ export declare const Billboard: LastWriteWinElementSetComponentDefinition<PBBillboard>;
|
|
@@ -50,7 +43,6 @@ import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibili
|
|
|
50
43
|
/** @public */ export declare const GltfContainer: LastWriteWinElementSetComponentDefinition<PBGltfContainer>;
|
|
51
44
|
/** @public */ export declare const GltfContainerLoadingState: LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>;
|
|
52
45
|
/** @public */ export declare const NftShape: LastWriteWinElementSetComponentDefinition<PBNftShape>;
|
|
53
|
-
/** @public */ export declare const PlayerIdentityData: LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>;
|
|
54
46
|
/** @public */ export declare const PointerEvents: LastWriteWinElementSetComponentDefinition<PBPointerEvents>;
|
|
55
47
|
/** @public */ export declare const PointerEventsResult: GrowOnlyValueSetComponentDefinition<PBPointerEventsResult>;
|
|
56
48
|
/** @public */ export declare const PointerLock: LastWriteWinElementSetComponentDefinition<PBPointerLock>;
|
|
@@ -26,16 +26,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.VisibilityComponent = exports.VideoPlayer = exports.VideoEvent = exports.UiTransform = exports.UiText = exports.UiInputResult = exports.UiInput = exports.UiDropdownResult = exports.UiDropdown = exports.UiCanvasInformation = exports.UiBackground = exports.TweenState = exports.TweenSequence = exports.TextShape = exports.RaycastResult = exports.Raycast = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.
|
|
29
|
+
exports.VisibilityComponent = exports.VideoPlayer = exports.VideoEvent = exports.UiTransform = exports.UiText = exports.UiInputResult = exports.UiInput = exports.UiDropdownResult = exports.UiDropdown = exports.UiCanvasInformation = exports.UiBackground = exports.TweenState = exports.TweenSequence = exports.TextShape = exports.RaycastResult = exports.Raycast = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.NftShape = exports.GltfContainerLoadingState = exports.GltfContainer = exports.EngineInfo = exports.CameraModeArea = exports.CameraMode = exports.Billboard = exports.AvatarShape = exports.AvatarModifierArea = exports.AvatarAttach = exports.AudioStream = exports.AudioSource = void 0;
|
|
30
30
|
const initialization_1 = require("../../runtime/initialization");
|
|
31
31
|
const components = __importStar(require("./index.gen"));
|
|
32
32
|
__exportStar(require("./index.gen"), exports);
|
|
33
33
|
/** @public */ exports.AudioSource = components.AudioSource(initialization_1.engine);
|
|
34
34
|
/** @public */ exports.AudioStream = components.AudioStream(initialization_1.engine);
|
|
35
35
|
/** @public */ exports.AvatarAttach = components.AvatarAttach(initialization_1.engine);
|
|
36
|
-
/** @public */ exports.AvatarBase = components.AvatarBase(initialization_1.engine);
|
|
37
|
-
/** @public */ exports.AvatarEmoteCommand = components.AvatarEmoteCommand(initialization_1.engine);
|
|
38
|
-
/** @public */ exports.AvatarEquippedData = components.AvatarEquippedData(initialization_1.engine);
|
|
39
36
|
/** @public */ exports.AvatarModifierArea = components.AvatarModifierArea(initialization_1.engine);
|
|
40
37
|
/** @public */ exports.AvatarShape = components.AvatarShape(initialization_1.engine);
|
|
41
38
|
/** @public */ exports.Billboard = components.Billboard(initialization_1.engine);
|
|
@@ -45,7 +42,6 @@ __exportStar(require("./index.gen"), exports);
|
|
|
45
42
|
/** @public */ exports.GltfContainer = components.GltfContainer(initialization_1.engine);
|
|
46
43
|
/** @public */ exports.GltfContainerLoadingState = components.GltfContainerLoadingState(initialization_1.engine);
|
|
47
44
|
/** @public */ exports.NftShape = components.NftShape(initialization_1.engine);
|
|
48
|
-
/** @public */ exports.PlayerIdentityData = components.PlayerIdentityData(initialization_1.engine);
|
|
49
45
|
/** @public */ exports.PointerEvents = components.PointerEvents(initialization_1.engine);
|
|
50
46
|
/** @public */ exports.PointerEventsResult = components.PointerEventsResult(initialization_1.engine);
|
|
51
47
|
/** @public */ exports.PointerLock = components.PointerLock(initialization_1.engine);
|
|
@@ -4,9 +4,6 @@ import { PBAnimator } from './pb/decentraland/sdk/components/animator.gen';
|
|
|
4
4
|
import { PBAudioSource } from './pb/decentraland/sdk/components/audio_source.gen';
|
|
5
5
|
import { PBAudioStream } from './pb/decentraland/sdk/components/audio_stream.gen';
|
|
6
6
|
import { PBAvatarAttach } from './pb/decentraland/sdk/components/avatar_attach.gen';
|
|
7
|
-
import { PBAvatarBase } from './pb/decentraland/sdk/components/avatar_base.gen';
|
|
8
|
-
import { PBAvatarEmoteCommand } from './pb/decentraland/sdk/components/avatar_emote_command.gen';
|
|
9
|
-
import { PBAvatarEquippedData } from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
|
|
10
7
|
import { PBAvatarModifierArea } from './pb/decentraland/sdk/components/avatar_modifier_area.gen';
|
|
11
8
|
import { PBAvatarShape } from './pb/decentraland/sdk/components/avatar_shape.gen';
|
|
12
9
|
import { PBBillboard } from './pb/decentraland/sdk/components/billboard.gen';
|
|
@@ -19,7 +16,6 @@ import { PBMaterial } from './pb/decentraland/sdk/components/material.gen';
|
|
|
19
16
|
import { PBMeshCollider } from './pb/decentraland/sdk/components/mesh_collider.gen';
|
|
20
17
|
import { PBMeshRenderer } from './pb/decentraland/sdk/components/mesh_renderer.gen';
|
|
21
18
|
import { PBNftShape } from './pb/decentraland/sdk/components/nft_shape.gen';
|
|
22
|
-
import { PBPlayerIdentityData } from './pb/decentraland/sdk/components/player_identity_data.gen';
|
|
23
19
|
import { PBPointerEvents } from './pb/decentraland/sdk/components/pointer_events.gen';
|
|
24
20
|
import { PBPointerEventsResult } from './pb/decentraland/sdk/components/pointer_events_result.gen';
|
|
25
21
|
import { PBPointerLock } from './pb/decentraland/sdk/components/pointer_lock.gen';
|
|
@@ -44,9 +40,6 @@ export * from './pb/decentraland/sdk/components/animator.gen';
|
|
|
44
40
|
export * from './pb/decentraland/sdk/components/audio_source.gen';
|
|
45
41
|
export * from './pb/decentraland/sdk/components/audio_stream.gen';
|
|
46
42
|
export * from './pb/decentraland/sdk/components/avatar_attach.gen';
|
|
47
|
-
export * from './pb/decentraland/sdk/components/avatar_base.gen';
|
|
48
|
-
export * from './pb/decentraland/sdk/components/avatar_emote_command.gen';
|
|
49
|
-
export * from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
|
|
50
43
|
export * from './pb/decentraland/sdk/components/avatar_modifier_area.gen';
|
|
51
44
|
export * from './pb/decentraland/sdk/components/avatar_shape.gen';
|
|
52
45
|
export * from './pb/decentraland/sdk/components/billboard.gen';
|
|
@@ -59,7 +52,6 @@ export * from './pb/decentraland/sdk/components/material.gen';
|
|
|
59
52
|
export * from './pb/decentraland/sdk/components/mesh_collider.gen';
|
|
60
53
|
export * from './pb/decentraland/sdk/components/mesh_renderer.gen';
|
|
61
54
|
export * from './pb/decentraland/sdk/components/nft_shape.gen';
|
|
62
|
-
export * from './pb/decentraland/sdk/components/player_identity_data.gen';
|
|
63
55
|
export * from './pb/decentraland/sdk/components/pointer_events.gen';
|
|
64
56
|
export * from './pb/decentraland/sdk/components/pointer_events_result.gen';
|
|
65
57
|
export * from './pb/decentraland/sdk/components/pointer_lock.gen';
|
|
@@ -86,9 +78,6 @@ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<an
|
|
|
86
78
|
/** @public */ export declare const AudioSource: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioSource>>;
|
|
87
79
|
/** @public */ export declare const AudioStream: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioStream>>;
|
|
88
80
|
/** @public */ export declare const AvatarAttach: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarAttach>>;
|
|
89
|
-
/** @public */ export declare const AvatarBase: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarBase>>;
|
|
90
|
-
/** @public */ export declare const AvatarEmoteCommand: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEmoteCommand>>;
|
|
91
|
-
/** @public */ export declare const AvatarEquippedData: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>>;
|
|
92
81
|
/** @public */ export declare const AvatarModifierArea: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
|
|
93
82
|
/** @public */ export declare const AvatarShape: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
|
|
94
83
|
/** @public */ export declare const Billboard: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
|
|
@@ -101,7 +90,6 @@ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<an
|
|
|
101
90
|
/** @public */ export declare const MeshCollider: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
|
102
91
|
/** @public */ export declare const MeshRenderer: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
|
|
103
92
|
/** @public */ export declare const NftShape: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBNftShape>>;
|
|
104
|
-
/** @public */ export declare const PlayerIdentityData: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>>;
|
|
105
93
|
/** @public */ export declare const PointerEvents: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerEvents>>;
|
|
106
94
|
/** @public */ export declare const PointerEventsResult: GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBPointerEventsResult>>;
|
|
107
95
|
/** @public */ export declare const PointerLock: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerLock>>;
|
|
@@ -128,9 +116,6 @@ export declare const componentDefinitionByName: {
|
|
|
128
116
|
"core::AudioSource": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioSource>>;
|
|
129
117
|
"core::AudioStream": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioStream>>;
|
|
130
118
|
"core::AvatarAttach": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarAttach>>;
|
|
131
|
-
"core::AvatarBase": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarBase>>;
|
|
132
|
-
"core::AvatarEmoteCommand": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEmoteCommand>>;
|
|
133
|
-
"core::AvatarEquippedData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>>;
|
|
134
119
|
"core::AvatarModifierArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
|
|
135
120
|
"core::AvatarShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
|
|
136
121
|
"core::Billboard": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
|
|
@@ -143,7 +128,6 @@ export declare const componentDefinitionByName: {
|
|
|
143
128
|
"core::MeshCollider": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
|
|
144
129
|
"core::MeshRenderer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
|
|
145
130
|
"core::NftShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBNftShape>>;
|
|
146
|
-
"core::PlayerIdentityData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>>;
|
|
147
131
|
"core::PointerEvents": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerEvents>>;
|
|
148
132
|
"core::PointerEventsResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBPointerEventsResult>>;
|
|
149
133
|
"core::PointerLock": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerLock>>;
|
|
@@ -14,14 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.componentDefinitionByName = exports.VisibilityComponent = exports.VideoPlayer = exports.VideoEvent = exports.UiTransform = exports.UiText = exports.UiInputResult = exports.UiInput = exports.UiDropdownResult = exports.UiDropdown = exports.UiCanvasInformation = exports.UiBackground = exports.TweenState = exports.TweenSequence = exports.Tween = exports.TextShape = exports.RaycastResult = exports.Raycast = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.
|
|
17
|
+
exports.componentDefinitionByName = exports.VisibilityComponent = exports.VideoPlayer = exports.VideoEvent = exports.UiTransform = exports.UiText = exports.UiInputResult = exports.UiInput = exports.UiDropdownResult = exports.UiDropdown = exports.UiCanvasInformation = exports.UiBackground = exports.TweenState = exports.TweenSequence = exports.Tween = exports.TextShape = exports.RaycastResult = exports.Raycast = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.NftShape = exports.MeshRenderer = exports.MeshCollider = exports.Material = exports.GltfContainerLoadingState = exports.GltfContainer = exports.EngineInfo = exports.CameraModeArea = exports.CameraMode = exports.Billboard = exports.AvatarShape = exports.AvatarModifierArea = exports.AvatarAttach = exports.AudioStream = exports.AudioSource = exports.Animator = void 0;
|
|
18
18
|
const Animator_gen_1 = require("./Animator.gen");
|
|
19
19
|
const AudioSource_gen_1 = require("./AudioSource.gen");
|
|
20
20
|
const AudioStream_gen_1 = require("./AudioStream.gen");
|
|
21
21
|
const AvatarAttach_gen_1 = require("./AvatarAttach.gen");
|
|
22
|
-
const AvatarBase_gen_1 = require("./AvatarBase.gen");
|
|
23
|
-
const AvatarEmoteCommand_gen_1 = require("./AvatarEmoteCommand.gen");
|
|
24
|
-
const AvatarEquippedData_gen_1 = require("./AvatarEquippedData.gen");
|
|
25
22
|
const AvatarModifierArea_gen_1 = require("./AvatarModifierArea.gen");
|
|
26
23
|
const AvatarShape_gen_1 = require("./AvatarShape.gen");
|
|
27
24
|
const Billboard_gen_1 = require("./Billboard.gen");
|
|
@@ -34,7 +31,6 @@ const Material_gen_1 = require("./Material.gen");
|
|
|
34
31
|
const MeshCollider_gen_1 = require("./MeshCollider.gen");
|
|
35
32
|
const MeshRenderer_gen_1 = require("./MeshRenderer.gen");
|
|
36
33
|
const NftShape_gen_1 = require("./NftShape.gen");
|
|
37
|
-
const PlayerIdentityData_gen_1 = require("./PlayerIdentityData.gen");
|
|
38
34
|
const PointerEvents_gen_1 = require("./PointerEvents.gen");
|
|
39
35
|
const PointerEventsResult_gen_1 = require("./PointerEventsResult.gen");
|
|
40
36
|
const PointerLock_gen_1 = require("./PointerLock.gen");
|
|
@@ -59,9 +55,6 @@ __exportStar(require("./pb/decentraland/sdk/components/animator.gen"), exports);
|
|
|
59
55
|
__exportStar(require("./pb/decentraland/sdk/components/audio_source.gen"), exports);
|
|
60
56
|
__exportStar(require("./pb/decentraland/sdk/components/audio_stream.gen"), exports);
|
|
61
57
|
__exportStar(require("./pb/decentraland/sdk/components/avatar_attach.gen"), exports);
|
|
62
|
-
__exportStar(require("./pb/decentraland/sdk/components/avatar_base.gen"), exports);
|
|
63
|
-
__exportStar(require("./pb/decentraland/sdk/components/avatar_emote_command.gen"), exports);
|
|
64
|
-
__exportStar(require("./pb/decentraland/sdk/components/avatar_equipped_data.gen"), exports);
|
|
65
58
|
__exportStar(require("./pb/decentraland/sdk/components/avatar_modifier_area.gen"), exports);
|
|
66
59
|
__exportStar(require("./pb/decentraland/sdk/components/avatar_shape.gen"), exports);
|
|
67
60
|
__exportStar(require("./pb/decentraland/sdk/components/billboard.gen"), exports);
|
|
@@ -74,7 +67,6 @@ __exportStar(require("./pb/decentraland/sdk/components/material.gen"), exports);
|
|
|
74
67
|
__exportStar(require("./pb/decentraland/sdk/components/mesh_collider.gen"), exports);
|
|
75
68
|
__exportStar(require("./pb/decentraland/sdk/components/mesh_renderer.gen"), exports);
|
|
76
69
|
__exportStar(require("./pb/decentraland/sdk/components/nft_shape.gen"), exports);
|
|
77
|
-
__exportStar(require("./pb/decentraland/sdk/components/player_identity_data.gen"), exports);
|
|
78
70
|
__exportStar(require("./pb/decentraland/sdk/components/pointer_events.gen"), exports);
|
|
79
71
|
__exportStar(require("./pb/decentraland/sdk/components/pointer_events_result.gen"), exports);
|
|
80
72
|
__exportStar(require("./pb/decentraland/sdk/components/pointer_lock.gen"), exports);
|
|
@@ -107,15 +99,6 @@ exports.AudioStream = AudioStream;
|
|
|
107
99
|
/** @public */ const AvatarAttach = engine =>
|
|
108
100
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarAttach", AvatarAttach_gen_1.AvatarAttachSchema);
|
|
109
101
|
exports.AvatarAttach = AvatarAttach;
|
|
110
|
-
/** @public */ const AvatarBase = engine =>
|
|
111
|
-
/* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarBase", AvatarBase_gen_1.AvatarBaseSchema);
|
|
112
|
-
exports.AvatarBase = AvatarBase;
|
|
113
|
-
/** @public */ const AvatarEmoteCommand = engine =>
|
|
114
|
-
/* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarEmoteCommand", AvatarEmoteCommand_gen_1.AvatarEmoteCommandSchema);
|
|
115
|
-
exports.AvatarEmoteCommand = AvatarEmoteCommand;
|
|
116
|
-
/** @public */ const AvatarEquippedData = engine =>
|
|
117
|
-
/* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarEquippedData", AvatarEquippedData_gen_1.AvatarEquippedDataSchema);
|
|
118
|
-
exports.AvatarEquippedData = AvatarEquippedData;
|
|
119
102
|
/** @public */ const AvatarModifierArea = engine =>
|
|
120
103
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::AvatarModifierArea", AvatarModifierArea_gen_1.AvatarModifierAreaSchema);
|
|
121
104
|
exports.AvatarModifierArea = AvatarModifierArea;
|
|
@@ -152,9 +135,6 @@ exports.MeshRenderer = MeshRenderer;
|
|
|
152
135
|
/** @public */ const NftShape = engine =>
|
|
153
136
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::NftShape", NftShape_gen_1.NftShapeSchema);
|
|
154
137
|
exports.NftShape = NftShape;
|
|
155
|
-
/** @public */ const PlayerIdentityData = engine =>
|
|
156
|
-
/* @__PURE__ */ engine.defineComponentFromSchema("core::PlayerIdentityData", PlayerIdentityData_gen_1.PlayerIdentityDataSchema);
|
|
157
|
-
exports.PlayerIdentityData = PlayerIdentityData;
|
|
158
138
|
/** @public */ const PointerEvents = engine =>
|
|
159
139
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::PointerEvents", PointerEvents_gen_1.PointerEventsSchema);
|
|
160
140
|
exports.PointerEvents = PointerEvents;
|
|
@@ -225,9 +205,6 @@ exports.componentDefinitionByName = {
|
|
|
225
205
|
"core::AudioSource": exports.AudioSource,
|
|
226
206
|
"core::AudioStream": exports.AudioStream,
|
|
227
207
|
"core::AvatarAttach": exports.AvatarAttach,
|
|
228
|
-
"core::AvatarBase": exports.AvatarBase,
|
|
229
|
-
"core::AvatarEmoteCommand": exports.AvatarEmoteCommand,
|
|
230
|
-
"core::AvatarEquippedData": exports.AvatarEquippedData,
|
|
231
208
|
"core::AvatarModifierArea": exports.AvatarModifierArea,
|
|
232
209
|
"core::AvatarShape": exports.AvatarShape,
|
|
233
210
|
"core::Billboard": exports.Billboard,
|
|
@@ -240,7 +217,6 @@ exports.componentDefinitionByName = {
|
|
|
240
217
|
"core::MeshCollider": exports.MeshCollider,
|
|
241
218
|
"core::MeshRenderer": exports.MeshRenderer,
|
|
242
219
|
"core::NftShape": exports.NftShape,
|
|
243
|
-
"core::PlayerIdentityData": exports.PlayerIdentityData,
|
|
244
220
|
"core::PointerEvents": exports.PointerEvents,
|
|
245
221
|
"core::PointerEventsResult": exports.PointerEventsResult,
|
|
246
222
|
"core::PointerLock": exports.PointerLock,
|
|
@@ -72,15 +72,21 @@ function createRaycastSystem(engine) {
|
|
|
72
72
|
targetEntity: options.targetEntity || 0
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
|
+
const nextTickRaycasts = [];
|
|
75
76
|
function registerRaycastWithCallback(entity, raycastValue, callback) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
77
|
+
// Raycasts registration is delayed 1 frame to avoid same-frame raycast
|
|
78
|
+
// removal/adding (the client never receives the removal on those situations)
|
|
79
|
+
const onNextTick = () => {
|
|
80
|
+
const raycast = Raycast.createOrReplace(entity);
|
|
81
|
+
raycast.maxDistance = raycastValue.maxDistance;
|
|
82
|
+
raycast.originOffset = raycastValue.originOffset;
|
|
83
|
+
raycast.collisionMask = raycastValue.collisionMask;
|
|
84
|
+
raycast.direction = raycastValue.directionRawValue;
|
|
85
|
+
raycast.continuous = raycastValue.continuous;
|
|
86
|
+
raycast.queryType = raycastValue.queryType;
|
|
87
|
+
entitiesCallbackResultMap.set(entity, { callback: callback });
|
|
88
|
+
};
|
|
89
|
+
nextTickRaycasts.push(onNextTick);
|
|
84
90
|
}
|
|
85
91
|
function removeRaycast(entity) {
|
|
86
92
|
Raycast.deleteFrom(entity);
|
|
@@ -89,6 +95,10 @@ function createRaycastSystem(engine) {
|
|
|
89
95
|
}
|
|
90
96
|
// @internal
|
|
91
97
|
engine.addSystem(function EventSystem() {
|
|
98
|
+
for (const addMissingRaycast of nextTickRaycasts) {
|
|
99
|
+
addMissingRaycast();
|
|
100
|
+
}
|
|
101
|
+
nextTickRaycasts.length = 0;
|
|
92
102
|
for (const [entity, data] of entitiesCallbackResultMap) {
|
|
93
103
|
const raycast = Raycast.getOrNull(entity);
|
|
94
104
|
if (engine.getEntityState(entity) === entity_1.EntityState.Removed || !raycast) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/ecs",
|
|
3
3
|
"description": "Decentraland ECS",
|
|
4
|
-
"version": "7.3.30-
|
|
4
|
+
"version": "7.3.30-7039895622.commit-39f9862",
|
|
5
5
|
"author": "DCL",
|
|
6
6
|
"bugs": "https://github.com/decentraland/ecs/issues",
|
|
7
7
|
"files": [
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
},
|
|
34
34
|
"types": "./dist/index.d.ts",
|
|
35
35
|
"typings": "./dist/index.d.ts",
|
|
36
|
-
"commit": "
|
|
36
|
+
"commit": "39f98623c92060bfdd133d993bd03bda5f537bcf"
|
|
37
37
|
}
|