mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-06-28 07:10:27 -04:00
Remove “moved” gesture
This commit is contained in:
parent
a86dc5bb58
commit
ec2ca32ffa
1 changed files with 1 additions and 18 deletions
|
@ -61,12 +61,6 @@ const GDXFOR_UPDATE_RATE = 100;
|
|||
*/
|
||||
const FORCE_THRESHOLD = 5;
|
||||
|
||||
/**
|
||||
* Threshold for acceleration magnitude, for the "moved" gesture.
|
||||
* @type {number}
|
||||
*/
|
||||
const MOVED_THRESHOLD = 3;
|
||||
|
||||
/**
|
||||
* Threshold for acceleration magnitude, for the "shaken" gesture.
|
||||
* @type {number}
|
||||
|
@ -409,7 +403,6 @@ const PushPullValues = {
|
|||
* @enum {string}
|
||||
*/
|
||||
const GestureValues = {
|
||||
MOVED: 'moved',
|
||||
SHAKEN: 'shaken',
|
||||
STARTED_FALLING: 'started falling'
|
||||
};
|
||||
|
@ -564,14 +557,6 @@ class Scratch3GdxForBlocks {
|
|||
|
||||
get GESTURE_MENU () {
|
||||
return [
|
||||
{
|
||||
text: formatMessage({
|
||||
id: 'gdxfor.moved',
|
||||
default: 'moved',
|
||||
description: 'the sensor was moved'
|
||||
}),
|
||||
value: GestureValues.MOVED
|
||||
},
|
||||
{
|
||||
text: formatMessage({
|
||||
id: 'gdxfor.shaken',
|
||||
|
@ -654,7 +639,7 @@ class Scratch3GdxForBlocks {
|
|||
GESTURE: {
|
||||
type: ArgumentType.STRING,
|
||||
menu: 'gestureOptions',
|
||||
defaultValue: GestureValues.MOVED
|
||||
defaultValue: GestureValues.SHAKEN
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -762,8 +747,6 @@ class Scratch3GdxForBlocks {
|
|||
|
||||
whenGesture (args) {
|
||||
switch (args.GESTURE) {
|
||||
case GestureValues.MOVED:
|
||||
return this.gestureMagnitude() > MOVED_THRESHOLD;
|
||||
case GestureValues.SHAKEN:
|
||||
return this.gestureMagnitude() > SHAKEN_THRESHOLD;
|
||||
case GestureValues.STARTED_FALLING:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue