@dcl/playground-assets 7.0.6-4195929129.commit-862da77 → 7.0.6-4196319965.commit-5ba2a36
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/alpha.d.ts +1 -1
- package/dist/beta.d.ts +1 -1
- package/dist/index.bundled.d.ts +1 -1
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/playground/sdk/dcl-sdk.package.json +2 -2
- package/dist/playground-assets.d.ts +1 -1
- package/etc/playground-assets.api.json +1 -1
- package/etc/playground-assets.api.md +1 -1
- package/package.json +3 -3
package/dist/alpha.d.ts
CHANGED
|
@@ -1778,7 +1778,7 @@ export declare type IInputSystem = {
|
|
|
1778
1778
|
* @param entity - the entity to query, ignore for global
|
|
1779
1779
|
* @returns the input command info or undefined if there is no command in the last tick-update
|
|
1780
1780
|
*/
|
|
1781
|
-
getInputCommand: (inputAction: InputAction, pointerEventType: PointerEventType, entity
|
|
1781
|
+
getInputCommand: (inputAction: InputAction, pointerEventType: PointerEventType, entity?: Entity) => PBPointerEventsResult | null;
|
|
1782
1782
|
};
|
|
1783
1783
|
|
|
1784
1784
|
/**
|
package/dist/beta.d.ts
CHANGED
|
@@ -1774,7 +1774,7 @@ export declare type IInputSystem = {
|
|
|
1774
1774
|
* @param entity - the entity to query, ignore for global
|
|
1775
1775
|
* @returns the input command info or undefined if there is no command in the last tick-update
|
|
1776
1776
|
*/
|
|
1777
|
-
getInputCommand: (inputAction: InputAction, pointerEventType: PointerEventType, entity
|
|
1777
|
+
getInputCommand: (inputAction: InputAction, pointerEventType: PointerEventType, entity?: Entity) => PBPointerEventsResult | null;
|
|
1778
1778
|
};
|
|
1779
1779
|
|
|
1780
1780
|
/**
|
package/dist/index.bundled.d.ts
CHANGED
|
@@ -1774,7 +1774,7 @@ export declare type IInputSystem = {
|
|
|
1774
1774
|
* @param entity - the entity to query, ignore for global
|
|
1775
1775
|
* @returns the input command info or undefined if there is no command in the last tick-update
|
|
1776
1776
|
*/
|
|
1777
|
-
getInputCommand: (inputAction: InputAction, pointerEventType: PointerEventType, entity
|
|
1777
|
+
getInputCommand: (inputAction: InputAction, pointerEventType: PointerEventType, entity?: Entity) => PBPointerEventsResult | null;
|
|
1778
1778
|
};
|
|
1779
1779
|
|
|
1780
1780
|
/**
|
package/dist/index.js
CHANGED
|
@@ -15539,7 +15539,7 @@
|
|
|
15539
15539
|
}
|
|
15540
15540
|
return null;
|
|
15541
15541
|
}
|
|
15542
|
-
function
|
|
15542
|
+
function getInputCommandFromEntity(inputAction, pointerEventType, entity) {
|
|
15543
15543
|
if (inputAction !== 3 /* InputAction.IA_ANY */) {
|
|
15544
15544
|
return findInputCommand(inputAction, pointerEventType, entity);
|
|
15545
15545
|
}
|
|
@@ -15550,6 +15550,19 @@
|
|
|
15550
15550
|
}
|
|
15551
15551
|
return null;
|
|
15552
15552
|
}
|
|
15553
|
+
function getInputCommand(inputAction, pointerEventType, entity) {
|
|
15554
|
+
if (entity) {
|
|
15555
|
+
return getInputCommandFromEntity(inputAction, pointerEventType, entity);
|
|
15556
|
+
}
|
|
15557
|
+
else {
|
|
15558
|
+
for (const command of globalState.thisFrameCommands) {
|
|
15559
|
+
if (command.button === inputAction && command.state === pointerEventType) {
|
|
15560
|
+
return command;
|
|
15561
|
+
}
|
|
15562
|
+
}
|
|
15563
|
+
return null;
|
|
15564
|
+
}
|
|
15565
|
+
}
|
|
15553
15566
|
function findInputCommand(inputAction, pointerEventType, entity) {
|
|
15554
15567
|
// We search the last pointer Event command sorted by timestamp
|
|
15555
15568
|
const command = findLastAction(pointerEventType, inputAction, entity);
|