Skip to content

Commit

Permalink
Adding more number types
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengyangliu committed Jun 22, 2024
1 parent 11c5231 commit 5893039
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 12 deletions.
36 changes: 30 additions & 6 deletions src/engine/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,6 @@ const ArgumentTypeMap = (() => {
fieldName: 'NUM'
}
};
map[ArgumentType.OTO100_NUMBER] = {
shadow: {
type: 'math_0to100_number',
fieldName: 'NUM'
}
};
map[ArgumentType.INT8_NUMBER] = {
shadow: {
type: 'math_int8_number',
Expand Down Expand Up @@ -162,6 +156,36 @@ const ArgumentTypeMap = (() => {
fieldName: 'NUM'
}
};
map[ArgumentType.UINT16_NUMBER] = {
shadow: {
type: 'math_uint16_number',
fieldName: 'NUM'
}
};
map[ArgumentType.INTOTO100_NUMBER] = {
shadow: {
type: 'math_int0to100_number',
fieldName: 'NUM'
}
};
map[ArgumentType.OTO100_NUMBER] = {
shadow: {
type: 'math_0to100_number',
fieldName: 'NUM'
}
};
map[ArgumentType.INTN100TO100_NUMBER] = {
shadow: {
type: 'math_intn100to100_number',
fieldName: 'NUM'
}
};
map[ArgumentType.N100TO100_NUMBER] = {
shadow: {
type: 'math_n100to100_number',
fieldName: 'NUM'
}
};
return map;
})();

Expand Down
32 changes: 26 additions & 6 deletions src/extension-support/argument-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ const ArgumentType = {
*/
WHOLE_NUMBER: 'whole_number',

/**
* Numeric value with slider field. from 0 to 100 value
*/
OTO100_NUMBER: '0to100_number',

/**
* Numeric value with slider field. from -127 to 127 integer value
*/
Expand All @@ -91,7 +86,32 @@ const ArgumentType = {
/**
* Numeric value with slider field. from -1023 to 1023 integer value
*/
INT11_NUMBER: 'int11_number'
INT11_NUMBER: 'int11_number',

/**
* Numeric value with slider field. from 0 to 65535 integer value
*/
UINT16_NUMBER: 'uint16_number',

/**
* Numeric value with slider field. from 0 to 100 value integer value
*/
INTOTO100_NUMBER: 'int0to100_number',

/**
* Numeric value with slider field. from 0 to 100 value
*/
OTO100_NUMBER: '0to100_number',

/**
* Numeric value with slider field. from -100 to 100 value integer value
*/
INTN100TO100_NUMBER: 'intn100to100_number',

/**
* Numeric value with slider field. from -100 to 100 value
*/
N100TO100_NUMBER: 'n100to100_number'
};

module.exports = ArgumentType;

0 comments on commit 5893039

Please sign in to comment.