diff --git a/extern/lang/en.js b/extern/lang/en.js
index 687c1d1708..aff64eddd6 100644
--- a/extern/lang/en.js
+++ b/extern/lang/en.js
@@ -602,13 +602,15 @@ Lang.Blocks = {
JUDGEMENT_boolean_or: 'OR',
JUDGEMENT_true: 'True',
JUDGEMENT_false: 'False',
- wall: 'Wall',
+ wall: 'wall',
START_press_some_key_up: 'Up',
START_press_some_key_down: 'Down',
START_press_some_key_right: 'Right',
START_press_some_key_left: 'Left',
START_press_some_key_space: 'Space',
START_press_some_key_enter: 'Enter',
+ START_press_some_key_back_space: 'Backspace',
+ START_press_some_key_back_slash: 'Backslash',
SCENE_when_scene_start: 'When scene started',
SCENE_start_scene_1: 'Start',
SCENE_start_scene_2: 'scene',
@@ -638,17 +640,17 @@ Lang.Blocks = {
LOOKS_change_object_index_sub_3: 'backward',
LOOKS_change_object_index_sub_4: 'back',
entry: 'Entry',
- JUDGEMENT_is_clicked: 'Mouse down?',
- JUDGEMENT_is_object_clicked: 'Object clicked?',
+ JUDGEMENT_is_clicked: 'mouse clicked?',
+ JUDGEMENT_is_object_clicked: 'object clicked?',
JUDGEMENT_is_type_1: 'is',
JUDGEMENT_is_type_2: '?',
is_type_number: 'number',
- JUDGEMENT_is_press_some_key_2: ' pressed?',
+ JUDGEMENT_is_press_some_key_2: 'key pressed?',
JUDGEMENT_reach_something_1: 'touching',
JUDGEMENT_reach_something_2: '?',
- JUDGEMENT_boolean_not_1: 'Is Not',
+ JUDGEMENT_boolean_not_1: 'is not',
JUDGEMENT_boolean_not_2: '',
- JUDGEMENT_is_boost_mode: 'Is the boost mode on?',
+ JUDGEMENT_is_boost_mode: 'is the boost mode on?',
CALC_calc_rand_1: 'random number between',
CALC_calc_rand_2: 'and',
CALC_calc_rand_3: '',
@@ -1074,7 +1076,7 @@ Lang.Blocks = {
ALTINO_BAT: 'battery check',
ALTINO_Steering_Angle_Center: 'center',
ALTINO_Steering_Angle_Left5: 'left5',
- mouse_pointer: 'Mouse Pointer',
+ mouse_pointer: 'mouse cursor',
self: 'self',
wall_up: 'upper wall',
wall_down: 'down wall',
@@ -1699,6 +1701,9 @@ Lang.Blocks = {
location_jeollanam_gurye: 'Gurye-gun',
width: 'width',
height: 'height',
+ desktop: 'desktop',
+ tablet: 'tablet',
+ smartphone: 'smartphone',
};
Lang.video_body_coord_params = {
left_eye: 'left eye',
@@ -5684,8 +5689,9 @@ Lang.Helper = {
stop_bgm: 'Stops background music',
is_clicked: 'Checks whether mouse is clicked.',
is_object_clicked: 'Checks whether object is clicked.',
- is_press_some_key: 'Checks whether an selected key is pressed.',
- reach_something: 'Checks whether the object reaches the selected point.',
+ is_press_some_key: 'Checks whether the selected key is pressed.',
+ reach_something:
+ "Checks whether the object touches the selected item. If the object touches the selected item, it is judged as 'True'.",
is_type:
'Checks whether the input text consists of the selected characters. If the input text consists of the selected characters, it is judged as `True`.',
is_included_in_list: 'Checks whether selected list contains the input value.',
@@ -5704,7 +5710,11 @@ Lang.Helper = {
boolean_not:
"Changes the input conditions to its opposite.\n(If the input condition is true, it returns 'False'. And if the input condition is false, it returns 'True'.)",
is_boost_mode:
- 'Checks whether the boost mode is turned on or not.\nIf the boost mode is on, it is judged as "true".',
+ "Checks whether the boost mode is turned on or not.\nIf the boost mode is on, it is judged as 'True'.",
+ is_current_device_type:
+ "If the device that runs the project is the selected device, it is judged as 'true'.",
+ is_touch_supported:
+ "If the device that runs the project is a touch screen, it is judged as 'true'.",
calc_basic:
'Reports the value of the two input numbers of quadratic operations.\n+ : Adds two input numbers.\n- : Subtracts two input numbers.\n* : Multiplies two input numbers.\n/ : Divides two input numbers.',
calc_rand:
@@ -6075,7 +6085,7 @@ Lang.Helper = {
chocopi_touch_value:
"The value will be smaller if the capacitance of the obeject is larger.
If many people hold each other's hand and touch, the value will be smaller
'Capacitance' means how many electric particles the object can hold.
Port number(P1~P8) is automatically selected internally
It is needed only when multiple modules with the same kind are used",
boolean_and_or:
- 'AND : Checks whether both conditions are true.\nOR : Checks whether at least one of the two conditions is true.',
+ 'AND: Checks whether both conditions are true.\nOR: Checks whether at least one of the two conditions is true.',
check_weather:
'\nChecks whether the weather information of the selected date and region matches the actual weather conditions.',
check_finedust:
@@ -7013,6 +7023,8 @@ Lang.template = {
boolean_or: '%1 %2 %3',
boolean_not: '%1 %2 %3',
is_boost_mode: '%1',
+ is_current_device_type: 'is the project running on %1 ?',
+ is_touch_supported: 'touch screen?',
true_or_false: '%1',
True: '%1 ',
False: '%1 ',
diff --git a/extern/lang/ko.js b/extern/lang/ko.js
index e2d9f9028d..0a649ac182 100644
--- a/extern/lang/ko.js
+++ b/extern/lang/ko.js
@@ -714,6 +714,8 @@ Lang.Blocks = {
START_press_some_key_right: '오른쪽 화살표',
START_press_some_key_space: '스페이스',
START_press_some_key_up: '위쪽 화살표',
+ START_press_some_key_back_space: '백스페이스',
+ START_press_some_key_back_slash: '백슬래시',
START_when_message_cast: '신호를 받았을 때',
START_when_message_cast_1: '',
START_when_message_cast_2: '신호를 받았을 때',
@@ -1993,6 +1995,9 @@ Lang.Blocks = {
location_jeollanam_gurye: '구례군',
width: '가로',
height: '세로',
+ desktop: '데스크톱',
+ tablet: '태블릿',
+ smartphone: '스마트폰',
};
Lang.video_body_coord_params = {
left_eye: '왼쪽 눈',
@@ -6126,8 +6131,10 @@ Lang.Helper = {
function_general: '현재 만들고 있는 함수 블록 또는 지금까지 만들어 둔 함수 블록입니다.',
boolean_and: '두 판단이 모두 참인 경우 ‘참’으로 판단합니다.',
boolean_or: '두 판단 중 하나라도 참이 있는 경우 ‘참’으로 판단합니다.',
- boolean_not: '해당 판단이 참이면 거짓, 거짓이면 참으로 만듭니다.',
+ boolean_not: "해당 판단이 참이면 '거짓', 거짓이면 '참'으로 판단합니다.",
is_boost_mode: '부스트모드가 켜져 있으면 ‘참’으로 판단합니다.',
+ is_current_device_type: "작품을 실행하는 기기가 선택한 기기라면 '참'으로 판단합니다.",
+ is_touch_supported: "작품을 실행하는 기기에서 화면을 터치할 수 있다면 '참'으로 판단합니다.",
calc_basic:
'입력한 두 수의 사칙연산 값입니다.\n+ : 입력한 두 수를 더한 값입니다.\n- : 입력한 두 수를 뺀 값입니다.\n* : 입력한 두 수를 곱한 값입니다.\n/ : 입력한 두 수를 나눈 값입니다.',
calc_rand:
@@ -6490,7 +6497,7 @@ Lang.Helper = {
chocopi_touch_value:
'터치패드에 연결된 물체의 전기용량이 커지면 값이 작아집니다.
여러 명이 손잡고 만지면 더 작은 값이 됩니다.
전기용량이란 물체에 전기를 띈 입자를 얼마나 가지고 있을 수 있는 지를 말합니다.
포트번호는 맞추지 않아도 됩니다.
단, 같은 종류의 모듈을 여러 개 연결하는 경우에만 포트를 지정하면 됩니다.',
boolean_and_or:
- '그리고 : 두 판단이 모두 참인 경우 ‘참’으로 판단합니다.\n또는 : 두 판단 중 하나라도 참이 있는 경우 ‘참’으로 판단합니다.',
+ '그리고: 두 판단이 모두 참인 경우 ‘참’으로 판단합니다.\n또는: 두 판단 중 하나라도 참이 있는 경우 ‘참’으로 판단합니다.',
check_weather:
'\n선택한 날짜와 지역의 날씨 정보를 실제 날씨 상태와 비교하여 일치하는 경우 ‘참’으로 판단합니다.\n * 옵션\n 날짜: 어제, 오늘, 내일, 모레, 3일 후, 4일 후, 5일 후, 6일 후\n 지역: 서울, 강원, 경기, 경남, 경북, 광주, 대구, 대전, 부산, 세종, 울산, 인천, 전남, 전북, 제주, 충남, 충북\n 날씨: 맑음, 구름조금, 구름많음, 흐림, 비, 진눈깨비, 눈',
check_finedust:
@@ -7617,6 +7624,8 @@ Lang.template = {
boolean_or: '%1 %2 %3',
boolean_not: '%1 %2 %3',
is_boost_mode: '%1',
+ is_current_device_type: '%1 에서 실행하는가?',
+ is_touch_supported: '화면을 터치할 수 있는가?',
true_or_false: '%1',
True: '%1 ',
False: '%1 ',
diff --git a/extern/util/static.js b/extern/util/static.js
index 48a68ac2d4..6f42e699b3 100644
--- a/extern/util/static.js
+++ b/extern/util/static.js
@@ -190,6 +190,8 @@ EntryStatic.getAllBlocks = function () {
'boolean_and_or',
'boolean_not',
'is_boost_mode',
+ 'is_current_device_type',
+ 'is_touch_supported',
],
},
{
diff --git a/package.json b/package.json
index c5720a8b16..dd6399776c 100644
--- a/package.json
+++ b/package.json
@@ -63,7 +63,7 @@
"simplebar": "^3.1.1",
"skmeans": "^0.11.3",
"socket.io-client": "^2.3.0",
- "ua-parser-js": "^1.0.35",
+ "ua-parser-js": "^1.0.38",
"uid": "^0.0.2",
"webpack": "^5.85.0",
"worker-loader": "^3.0.8",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 9106863f79..9c0f16a84a 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -19,7 +19,7 @@ importers:
version: 0.10.8
'@tensorflow/tfjs':
specifier: ^4.17.0
- version: 4.17.0(seedrandom@3.0.5)
+ version: 4.17.0(encoding@0.1.13)(seedrandom@3.0.5)
'@types/crypto-js':
specifier: ^4.0.1
version: 4.0.1
@@ -37,7 +37,7 @@ importers:
version: 6.0.3
copy-webpack-plugin:
specifier: ^12.0.2
- version: 12.0.2(webpack@5.85.0)
+ version: 12.0.2(webpack@5.85.0(webpack-cli@5.1.1))
core-js:
specifier: ^3.6.4
version: 3.6.4
@@ -61,10 +61,10 @@ importers:
version: 2.0.8
html-webpack-plugin:
specifier: ^5.5.3
- version: 5.5.3(webpack@5.85.0)
+ version: 5.5.3(webpack@5.85.0(webpack-cli@5.1.1))
html-webpack-template:
specifier: ^6.2.0
- version: 6.2.0(html-webpack-plugin@5.5.3)
+ version: 6.2.0(html-webpack-plugin@5.5.3(webpack@5.85.0(webpack-cli@5.1.1)))
isomorphic-fetch:
specifier: ^2.2.1
version: 2.2.1
@@ -102,8 +102,8 @@ importers:
specifier: ^2.3.0
version: 2.3.0
ua-parser-js:
- specifier: ^1.0.35
- version: 1.0.37
+ specifier: ^1.0.38
+ version: 1.0.38
uid:
specifier: ^0.0.2
version: 0.0.2
@@ -112,7 +112,7 @@ importers:
version: 5.85.0(webpack-cli@5.1.1)
worker-loader:
specifier: ^3.0.8
- version: 3.0.8(webpack@5.85.0)
+ version: 3.0.8(webpack@5.85.0(webpack-cli@5.1.1))
xss-filters:
specifier: ^1.2.7
version: 1.2.7
@@ -125,7 +125,7 @@ importers:
version: 7.11.0(@babel/core@7.22.1)(eslint@7.32.0)
'@babel/eslint-plugin':
specifier: ^7.11.0
- version: 7.11.0(@babel/eslint-parser@7.11.0)(eslint@7.32.0)
+ version: 7.11.0(@babel/eslint-parser@7.11.0(@babel/core@7.22.1)(eslint@7.32.0))(eslint@7.32.0)
'@babel/plugin-proposal-class-properties':
specifier: ^7.8.3
version: 7.8.3(@babel/core@7.22.1)
@@ -191,7 +191,7 @@ importers:
version: 1.0.0
babel-loader:
specifier: ^8.0.6
- version: 8.0.6(@babel/core@7.22.1)(webpack@5.85.0)
+ version: 8.0.6(@babel/core@7.22.1)(webpack@5.85.0(webpack-cli@5.1.1))
babel-plugin-dynamic-import-node:
specifier: ^2.3.0
version: 2.3.0
@@ -206,7 +206,7 @@ importers:
version: 5.1.4
css-loader:
specifier: ^3.2.0
- version: 3.2.0(webpack@5.85.0)
+ version: 3.2.0(webpack@5.85.0(webpack-cli@5.1.1))
cssnano:
specifier: ^4.1.10
version: 4.1.10
@@ -218,16 +218,16 @@ importers:
version: 9.1.0(eslint@7.32.0)
eslint-loader:
specifier: ^4.0.2
- version: 4.0.2(eslint@7.32.0)(webpack@5.85.0)
+ version: 4.0.2(eslint@7.32.0)(webpack@5.85.0(webpack-cli@5.1.1))
eslint-plugin-prettier:
specifier: ^5.1.3
- version: 5.1.3(eslint-config-prettier@9.1.0)(eslint@7.32.0)(prettier@3.2.5)
+ version: 5.1.3(@types/eslint@8.40.0)(eslint-config-prettier@9.1.0(eslint@7.32.0))(eslint@7.32.0)(prettier@3.2.5)
extract-text-webpack-plugin:
specifier: ^4.0.0-beta.0
- version: 4.0.0-beta.0(webpack@5.85.0)
+ version: 4.0.0-beta.0(webpack@5.85.0(webpack-cli@5.1.1))
file-loader:
specifier: ^4.2.0
- version: 4.2.0(webpack@5.85.0)
+ version: 4.2.0(webpack@5.85.0(webpack-cli@5.1.1))
karma:
specifier: ^4.2.0
version: 4.2.0
@@ -245,10 +245,10 @@ importers:
version: 3.10.1
less-loader:
specifier: ^5.0.0
- version: 5.0.0(less@3.10.1)(webpack@5.85.0)
+ version: 5.0.0(less@3.10.1)(webpack@5.85.0(webpack-cli@5.1.1))
mini-css-extract-plugin:
specifier: ^2.7.6
- version: 2.7.6(webpack@5.85.0)
+ version: 2.7.6(webpack@5.85.0(webpack-cli@5.1.1))
mocha:
specifier: ^6.2.0
version: 6.2.0
@@ -266,16 +266,16 @@ importers:
version: 0.20.2
terser-webpack-plugin:
specifier: ^5.3.9
- version: 5.3.9(webpack@5.85.0)
+ version: 5.3.9(webpack@5.85.0(webpack-cli@5.1.1))
ts-loader:
specifier: ^9.4.3
- version: 9.4.3(typescript@4.7.4)(webpack@5.85.0)
+ version: 9.4.3(typescript@4.7.4)(webpack@5.85.0(webpack-cli@5.1.1))
typescript:
specifier: ^4.7.4
version: 4.7.4
url-loader:
specifier: ^1.0.1
- version: 1.0.1(webpack@5.85.0)
+ version: 1.0.1(webpack@5.85.0(webpack-cli@5.1.1))
webpack-cli:
specifier: ^5.1.1
version: 5.1.1(webpack-dev-server@4.15.0)(webpack@5.85.0)
@@ -284,13 +284,13 @@ importers:
version: 4.15.0(webpack-cli@5.1.1)(webpack@5.85.0)
webpack-manifest-plugin:
specifier: ^5.0.0
- version: 5.0.0(webpack@5.85.0)
+ version: 5.0.0(webpack@5.85.0(webpack-cli@5.1.1))
webpack-merge:
specifier: ^5.9.0
version: 5.9.0
webpack-strip-block:
specifier: ^0.3.0
- version: 0.3.0(webpack@5.85.0)
+ version: 0.3.0(webpack@5.85.0(webpack-cli@5.1.1))
packages:
@@ -5356,8 +5356,8 @@ packages:
engines: {node: '>=14.17'}
hasBin: true
- ua-parser-js@1.0.37:
- resolution: {integrity: sha512-bhTyI94tZofjo+Dn8SN6Zv8nBDvyXTymAdM3LDI/0IboIUwTu1rEhW7v2TfiVsoYWgkQ4kOVqnI8APUFbIQIFQ==}
+ ua-parser-js@1.0.38:
+ resolution: {integrity: sha512-Aq5ppTOfvrCMgAPneW1HfWj66Xi7XL+/mIy996R1/CLS/rcyJQm6QZdsKrUeivDFQ+Oc9Wyuwor8Ze8peEoUoQ==}
uid@0.0.2:
resolution: {integrity: sha512-KerEqWSoUfzAYsB4RznGPygtEk1p04caicg8FxqzZ1VYI3GsYHPzouUO5jJvwwy4sg6B1jnSkSjYgGvE4CK6Gg==}
@@ -5830,7 +5830,7 @@ snapshots:
eslint-visitor-keys: 1.3.0
semver: 6.3.0
- '@babel/eslint-plugin@7.11.0(@babel/eslint-parser@7.11.0)(eslint@7.32.0)':
+ '@babel/eslint-plugin@7.11.0(@babel/eslint-parser@7.11.0(@babel/core@7.22.1)(eslint@7.32.0))(eslint@7.32.0)':
dependencies:
'@babel/eslint-parser': 7.11.0(@babel/core@7.22.1)(eslint@7.32.0)
eslint: 7.32.0
@@ -6942,58 +6942,58 @@ snapshots:
'@sindresorhus/merge-streams@2.3.0': {}
- '@tensorflow/tfjs-backend-cpu@4.17.0(@tensorflow/tfjs-core@4.17.0)':
+ '@tensorflow/tfjs-backend-cpu@4.17.0(@tensorflow/tfjs-core@4.17.0(encoding@0.1.13))':
dependencies:
- '@tensorflow/tfjs-core': 4.17.0
+ '@tensorflow/tfjs-core': 4.17.0(encoding@0.1.13)
'@types/seedrandom': 2.4.34
seedrandom: 3.0.5
- '@tensorflow/tfjs-backend-webgl@4.17.0(@tensorflow/tfjs-core@4.17.0)':
+ '@tensorflow/tfjs-backend-webgl@4.17.0(@tensorflow/tfjs-core@4.17.0(encoding@0.1.13))':
dependencies:
- '@tensorflow/tfjs-backend-cpu': 4.17.0(@tensorflow/tfjs-core@4.17.0)
- '@tensorflow/tfjs-core': 4.17.0
+ '@tensorflow/tfjs-backend-cpu': 4.17.0(@tensorflow/tfjs-core@4.17.0(encoding@0.1.13))
+ '@tensorflow/tfjs-core': 4.17.0(encoding@0.1.13)
'@types/offscreencanvas': 2019.3.0
'@types/seedrandom': 2.4.34
seedrandom: 3.0.5
- '@tensorflow/tfjs-converter@4.17.0(@tensorflow/tfjs-core@4.17.0)':
+ '@tensorflow/tfjs-converter@4.17.0(@tensorflow/tfjs-core@4.17.0(encoding@0.1.13))':
dependencies:
- '@tensorflow/tfjs-core': 4.17.0
+ '@tensorflow/tfjs-core': 4.17.0(encoding@0.1.13)
- '@tensorflow/tfjs-core@4.17.0':
+ '@tensorflow/tfjs-core@4.17.0(encoding@0.1.13)':
dependencies:
'@types/long': 4.0.2
'@types/offscreencanvas': 2019.7.3
'@types/seedrandom': 2.4.34
'@webgpu/types': 0.1.38
long: 4.0.0
- node-fetch: 2.6.13
+ node-fetch: 2.6.13(encoding@0.1.13)
seedrandom: 3.0.5
transitivePeerDependencies:
- encoding
- '@tensorflow/tfjs-data@4.17.0(@tensorflow/tfjs-core@4.17.0)(seedrandom@3.0.5)':
+ '@tensorflow/tfjs-data@4.17.0(@tensorflow/tfjs-core@4.17.0(encoding@0.1.13))(encoding@0.1.13)(seedrandom@3.0.5)':
dependencies:
- '@tensorflow/tfjs-core': 4.17.0
+ '@tensorflow/tfjs-core': 4.17.0(encoding@0.1.13)
'@types/node-fetch': 2.6.4
- node-fetch: 2.6.13
+ node-fetch: 2.6.13(encoding@0.1.13)
seedrandom: 3.0.5
string_decoder: 1.3.0
transitivePeerDependencies:
- encoding
- '@tensorflow/tfjs-layers@4.17.0(@tensorflow/tfjs-core@4.17.0)':
+ '@tensorflow/tfjs-layers@4.17.0(@tensorflow/tfjs-core@4.17.0(encoding@0.1.13))':
dependencies:
- '@tensorflow/tfjs-core': 4.17.0
+ '@tensorflow/tfjs-core': 4.17.0(encoding@0.1.13)
- '@tensorflow/tfjs@4.17.0(seedrandom@3.0.5)':
+ '@tensorflow/tfjs@4.17.0(encoding@0.1.13)(seedrandom@3.0.5)':
dependencies:
- '@tensorflow/tfjs-backend-cpu': 4.17.0(@tensorflow/tfjs-core@4.17.0)
- '@tensorflow/tfjs-backend-webgl': 4.17.0(@tensorflow/tfjs-core@4.17.0)
- '@tensorflow/tfjs-converter': 4.17.0(@tensorflow/tfjs-core@4.17.0)
- '@tensorflow/tfjs-core': 4.17.0
- '@tensorflow/tfjs-data': 4.17.0(@tensorflow/tfjs-core@4.17.0)(seedrandom@3.0.5)
- '@tensorflow/tfjs-layers': 4.17.0(@tensorflow/tfjs-core@4.17.0)
+ '@tensorflow/tfjs-backend-cpu': 4.17.0(@tensorflow/tfjs-core@4.17.0(encoding@0.1.13))
+ '@tensorflow/tfjs-backend-webgl': 4.17.0(@tensorflow/tfjs-core@4.17.0(encoding@0.1.13))
+ '@tensorflow/tfjs-converter': 4.17.0(@tensorflow/tfjs-core@4.17.0(encoding@0.1.13))
+ '@tensorflow/tfjs-core': 4.17.0(encoding@0.1.13)
+ '@tensorflow/tfjs-data': 4.17.0(@tensorflow/tfjs-core@4.17.0(encoding@0.1.13))(encoding@0.1.13)(seedrandom@3.0.5)
+ '@tensorflow/tfjs-layers': 4.17.0(@tensorflow/tfjs-core@4.17.0(encoding@0.1.13))
argparse: 1.0.10
chalk: 4.1.2
core-js: 3.29.1
@@ -7218,6 +7218,7 @@ snapshots:
'@typescript-eslint/typescript-estree': 3.1.0(typescript@4.7.4)
eslint: 7.32.0
eslint-visitor-keys: 1.3.0
+ optionalDependencies:
typescript: 4.7.4
transitivePeerDependencies:
- supports-color
@@ -7230,6 +7231,7 @@ snapshots:
'@typescript-eslint/visitor-keys': 6.21.0
debug: 4.3.4
eslint: 8.57.0
+ optionalDependencies:
typescript: 5.4.5
transitivePeerDependencies:
- supports-color
@@ -7250,6 +7252,7 @@ snapshots:
lodash: 4.17.21
semver: 7.5.1
tsutils: 3.21.0(typescript@4.7.4)
+ optionalDependencies:
typescript: 4.7.4
transitivePeerDependencies:
- supports-color
@@ -7264,6 +7267,7 @@ snapshots:
minimatch: 9.0.3
semver: 7.6.2
ts-api-utils: 1.3.0(typescript@5.4.5)
+ optionalDependencies:
typescript: 5.4.5
transitivePeerDependencies:
- supports-color
@@ -7353,20 +7357,21 @@ snapshots:
'@webgpu/types@0.1.38': {}
- '@webpack-cli/configtest@2.1.0(webpack-cli@5.1.1)(webpack@5.85.0)':
+ '@webpack-cli/configtest@2.1.0(webpack-cli@5.1.1(webpack-dev-server@4.15.0)(webpack@5.85.0))(webpack@5.85.0(webpack-cli@5.1.1))':
dependencies:
webpack: 5.85.0(webpack-cli@5.1.1)
webpack-cli: 5.1.1(webpack-dev-server@4.15.0)(webpack@5.85.0)
- '@webpack-cli/info@2.0.1(webpack-cli@5.1.1)(webpack@5.85.0)':
+ '@webpack-cli/info@2.0.1(webpack-cli@5.1.1(webpack-dev-server@4.15.0)(webpack@5.85.0))(webpack@5.85.0(webpack-cli@5.1.1))':
dependencies:
webpack: 5.85.0(webpack-cli@5.1.1)
webpack-cli: 5.1.1(webpack-dev-server@4.15.0)(webpack@5.85.0)
- '@webpack-cli/serve@2.0.4(webpack-cli@5.1.1)(webpack-dev-server@4.15.0)(webpack@5.85.0)':
+ '@webpack-cli/serve@2.0.4(webpack-cli@5.1.1(webpack-dev-server@4.15.0)(webpack@5.85.0))(webpack-dev-server@4.15.0(webpack-cli@5.1.1)(webpack@5.85.0))(webpack@5.85.0(webpack-cli@5.1.1))':
dependencies:
webpack: 5.85.0(webpack-cli@5.1.1)
webpack-cli: 5.1.1(webpack-dev-server@4.15.0)(webpack@5.85.0)
+ optionalDependencies:
webpack-dev-server: 4.15.0(webpack-cli@5.1.1)(webpack@5.85.0)
'@xtuc/ieee754@1.2.0': {}
@@ -7416,7 +7421,7 @@ snapshots:
ajv: 6.12.6
ajv-formats@2.1.1(ajv@8.12.0):
- dependencies:
+ optionalDependencies:
ajv: 8.12.0
ajv-keywords@3.5.2(ajv@6.12.6):
@@ -7578,7 +7583,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
- babel-loader@8.0.6(@babel/core@7.22.1)(webpack@5.85.0):
+ babel-loader@8.0.6(@babel/core@7.22.1)(webpack@5.85.0(webpack-cli@5.1.1)):
dependencies:
'@babel/core': 7.22.1
find-cache-dir: 2.1.0
@@ -7995,7 +8000,7 @@ snapshots:
copy-descriptor@0.1.1: {}
- copy-webpack-plugin@12.0.2(webpack@5.85.0):
+ copy-webpack-plugin@12.0.2(webpack@5.85.0(webpack-cli@5.1.1)):
dependencies:
fast-glob: 3.3.2
glob-parent: 6.0.2
@@ -8058,7 +8063,7 @@ snapshots:
postcss: 7.0.39
timsort: 0.3.0
- css-loader@3.2.0(webpack@5.85.0):
+ css-loader@3.2.0(webpack@5.85.0(webpack-cli@5.1.1)):
dependencies:
camelcase: 5.3.1
cssesc: 3.0.0
@@ -8194,6 +8199,7 @@ snapshots:
debug@3.2.6(supports-color@6.0.0):
dependencies:
ms: 2.1.3
+ optionalDependencies:
supports-color: 6.0.0
debug@3.2.7:
@@ -8528,7 +8534,7 @@ snapshots:
dependencies:
eslint: 7.32.0
- eslint-loader@4.0.2(eslint@7.32.0)(webpack@5.85.0):
+ eslint-loader@4.0.2(eslint@7.32.0)(webpack@5.85.0(webpack-cli@5.1.1)):
dependencies:
eslint: 7.32.0
find-cache-dir: 3.3.2
@@ -8538,13 +8544,15 @@ snapshots:
schema-utils: 2.7.1
webpack: 5.85.0(webpack-cli@5.1.1)
- eslint-plugin-prettier@5.1.3(eslint-config-prettier@9.1.0)(eslint@7.32.0)(prettier@3.2.5):
+ eslint-plugin-prettier@5.1.3(@types/eslint@8.40.0)(eslint-config-prettier@9.1.0(eslint@7.32.0))(eslint@7.32.0)(prettier@3.2.5):
dependencies:
eslint: 7.32.0
- eslint-config-prettier: 9.1.0(eslint@7.32.0)
prettier: 3.2.5
prettier-linter-helpers: 1.0.0
synckit: 0.8.8
+ optionalDependencies:
+ '@types/eslint': 8.40.0
+ eslint-config-prettier: 9.1.0(eslint@7.32.0)
eslint-rule-composer@0.3.0: {}
@@ -8808,7 +8816,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
- extract-text-webpack-plugin@4.0.0-beta.0(webpack@5.85.0):
+ extract-text-webpack-plugin@4.0.0-beta.0(webpack@5.85.0(webpack-cli@5.1.1)):
dependencies:
async: 2.6.4
loader-utils: 1.4.2
@@ -8852,7 +8860,7 @@ snapshots:
dependencies:
flat-cache: 3.0.4
- file-loader@4.2.0(webpack@5.85.0):
+ file-loader@4.2.0(webpack@5.85.0(webpack-cli@5.1.1)):
dependencies:
loader-utils: 1.4.2
schema-utils: 2.7.1
@@ -9204,7 +9212,7 @@ snapshots:
relateurl: 0.2.7
terser: 5.17.6
- html-webpack-plugin@5.5.3(webpack@5.85.0):
+ html-webpack-plugin@5.5.3(webpack@5.85.0(webpack-cli@5.1.1)):
dependencies:
'@types/html-minifier-terser': 6.1.0
html-minifier-terser: 6.1.0
@@ -9213,9 +9221,9 @@ snapshots:
tapable: 2.2.1
webpack: 5.85.0(webpack-cli@5.1.1)
- html-webpack-template@6.2.0(html-webpack-plugin@5.5.3):
+ html-webpack-template@6.2.0(html-webpack-plugin@5.5.3(webpack@5.85.0(webpack-cli@5.1.1))):
dependencies:
- html-webpack-plugin: 5.5.3(webpack@5.85.0)
+ html-webpack-plugin: 5.5.3(webpack@5.85.0(webpack-cli@5.1.1))
htmlparser2@6.1.0:
dependencies:
@@ -9245,12 +9253,13 @@ snapshots:
http-proxy-middleware@2.0.6(@types/express@4.17.17):
dependencies:
- '@types/express': 4.17.17
'@types/http-proxy': 1.17.11
http-proxy: 1.18.1
is-glob: 4.0.3
is-plain-obj: 3.0.0
micromatch: 4.0.5
+ optionalDependencies:
+ '@types/express': 4.17.17
transitivePeerDependencies:
- debug
@@ -9725,7 +9734,9 @@ snapshots:
pretty-format: 24.9.0
throat: 4.1.0
transitivePeerDependencies:
+ - bufferutil
- supports-color
+ - utf-8-validate
jest-leak-detector@24.9.0:
dependencies:
@@ -9757,7 +9768,7 @@ snapshots:
'@jest/types': 24.9.0
jest-pnp-resolver@1.2.3(jest-resolve@24.9.0):
- dependencies:
+ optionalDependencies:
jest-resolve: 24.9.0
jest-regex-util@24.9.0: {}
@@ -10072,7 +10083,7 @@ snapshots:
left-pad@1.3.0: {}
- less-loader@5.0.0(less@3.10.1)(webpack@5.85.0):
+ less-loader@5.0.0(less@3.10.1)(webpack@5.85.0(webpack-cli@5.1.1)):
dependencies:
clone: 2.1.2
less: 3.10.1
@@ -10300,7 +10311,7 @@ snapshots:
mimic-fn@2.1.0: {}
- mini-css-extract-plugin@2.7.6(webpack@5.85.0):
+ mini-css-extract-plugin@2.7.6(webpack@5.85.0(webpack-cli@5.1.1)):
dependencies:
schema-utils: 4.0.1
webpack: 5.85.0(webpack-cli@5.1.1)
@@ -10455,9 +10466,11 @@ snapshots:
encoding: 0.1.13
is-stream: 1.1.0
- node-fetch@2.6.13:
+ node-fetch@2.6.13(encoding@0.1.13):
dependencies:
whatwg-url: 5.0.0
+ optionalDependencies:
+ encoding: 0.1.13
node-forge@1.3.1: {}
@@ -11893,7 +11906,7 @@ snapshots:
tapable@2.2.1: {}
- terser-webpack-plugin@5.3.9(webpack@5.85.0):
+ terser-webpack-plugin@5.3.9(webpack@5.85.0(webpack-cli@5.1.1)):
dependencies:
'@jridgewell/trace-mapping': 0.3.18
jest-worker: 27.5.1
@@ -11973,7 +11986,7 @@ snapshots:
dependencies:
typescript: 5.4.5
- ts-loader@9.4.3(typescript@4.7.4)(webpack@5.85.0):
+ ts-loader@9.4.3(typescript@4.7.4)(webpack@5.85.0(webpack-cli@5.1.1)):
dependencies:
chalk: 4.1.2
enhanced-resolve: 5.14.1
@@ -12028,7 +12041,7 @@ snapshots:
typescript@5.4.5: {}
- ua-parser-js@1.0.37: {}
+ ua-parser-js@1.0.38: {}
uid@0.0.2: {}
@@ -12088,7 +12101,7 @@ snapshots:
urix@0.1.0: {}
- url-loader@1.0.1(webpack@5.85.0):
+ url-loader@1.0.1(webpack@5.85.0(webpack-cli@5.1.1)):
dependencies:
loader-utils: 1.4.2
mime: 2.6.0
@@ -12193,9 +12206,9 @@ snapshots:
webpack-cli@5.1.1(webpack-dev-server@4.15.0)(webpack@5.85.0):
dependencies:
'@discoveryjs/json-ext': 0.5.7
- '@webpack-cli/configtest': 2.1.0(webpack-cli@5.1.1)(webpack@5.85.0)
- '@webpack-cli/info': 2.0.1(webpack-cli@5.1.1)(webpack@5.85.0)
- '@webpack-cli/serve': 2.0.4(webpack-cli@5.1.1)(webpack-dev-server@4.15.0)(webpack@5.85.0)
+ '@webpack-cli/configtest': 2.1.0(webpack-cli@5.1.1(webpack-dev-server@4.15.0)(webpack@5.85.0))(webpack@5.85.0(webpack-cli@5.1.1))
+ '@webpack-cli/info': 2.0.1(webpack-cli@5.1.1(webpack-dev-server@4.15.0)(webpack@5.85.0))(webpack@5.85.0(webpack-cli@5.1.1))
+ '@webpack-cli/serve': 2.0.4(webpack-cli@5.1.1(webpack-dev-server@4.15.0)(webpack@5.85.0))(webpack-dev-server@4.15.0(webpack-cli@5.1.1)(webpack@5.85.0))(webpack@5.85.0(webpack-cli@5.1.1))
colorette: 2.0.20
commander: 10.0.1
cross-spawn: 7.0.3
@@ -12205,10 +12218,11 @@ snapshots:
interpret: 3.1.1
rechoir: 0.8.0
webpack: 5.85.0(webpack-cli@5.1.1)
- webpack-dev-server: 4.15.0(webpack-cli@5.1.1)(webpack@5.85.0)
webpack-merge: 5.9.0
+ optionalDependencies:
+ webpack-dev-server: 4.15.0(webpack-cli@5.1.1)(webpack@5.85.0)
- webpack-dev-middleware@5.3.3(webpack@5.85.0):
+ webpack-dev-middleware@5.3.3(webpack@5.85.0(webpack-cli@5.1.1)):
dependencies:
colorette: 2.0.20
memfs: 3.5.1
@@ -12247,17 +12261,18 @@ snapshots:
serve-index: 1.9.1
sockjs: 0.3.24
spdy: 4.0.2
+ webpack-dev-middleware: 5.3.3(webpack@5.85.0(webpack-cli@5.1.1))
+ ws: 8.13.0
+ optionalDependencies:
webpack: 5.85.0(webpack-cli@5.1.1)
webpack-cli: 5.1.1(webpack-dev-server@4.15.0)(webpack@5.85.0)
- webpack-dev-middleware: 5.3.3(webpack@5.85.0)
- ws: 8.13.0
transitivePeerDependencies:
- bufferutil
- debug
- supports-color
- utf-8-validate
- webpack-manifest-plugin@5.0.0(webpack@5.85.0):
+ webpack-manifest-plugin@5.0.0(webpack@5.85.0(webpack-cli@5.1.1)):
dependencies:
tapable: 2.2.1
webpack: 5.85.0(webpack-cli@5.1.1)
@@ -12280,7 +12295,7 @@ snapshots:
webpack-sources@3.2.3: {}
- webpack-strip-block@0.3.0(webpack@5.85.0):
+ webpack-strip-block@0.3.0(webpack@5.85.0(webpack-cli@5.1.1)):
dependencies:
loader-utils: 1.4.2
webpack: 5.85.0(webpack-cli@5.1.1)
@@ -12308,10 +12323,11 @@ snapshots:
neo-async: 2.6.2
schema-utils: 3.1.2
tapable: 2.2.1
- terser-webpack-plugin: 5.3.9(webpack@5.85.0)
+ terser-webpack-plugin: 5.3.9(webpack@5.85.0(webpack-cli@5.1.1))
watchpack: 2.4.0
- webpack-cli: 5.1.1(webpack-dev-server@4.15.0)(webpack@5.85.0)
webpack-sources: 3.2.3
+ optionalDependencies:
+ webpack-cli: 5.1.1(webpack-dev-server@4.15.0)(webpack@5.85.0)
transitivePeerDependencies:
- '@swc/core'
- esbuild
@@ -12389,7 +12405,7 @@ snapshots:
wordwrap@0.0.3: {}
- worker-loader@3.0.8(webpack@5.85.0):
+ worker-loader@3.0.8(webpack@5.85.0(webpack-cli@5.1.1)):
dependencies:
loader-utils: 2.0.4
schema-utils: 3.1.2
diff --git a/src/extensions/dmet.js b/src/extensions/dmet.js
index cd6e09b92f..5078e1f50b 100644
--- a/src/extensions/dmet.js
+++ b/src/extensions/dmet.js
@@ -407,8 +407,8 @@ class dmetList {
if (data.array && Array.isArray(array)) {
this.#array = array;
this.#array.map((value) => {
- const { key } = value;
- this.#object[key] = value;
+ const { key, _key } = value;
+ this.#object[key || _key] = value;
});
} else if (Array.isArray(list) && isPlainObject(value)) {
this.#array = list.map((key) => {
@@ -434,8 +434,8 @@ class dmetList {
this.#id = id;
this.#info = info;
this.#array.map((value) => {
- const { key } = value;
- this.#object[key] = value;
+ const { key, _key } = value;
+ this.#object[key || _key] = value;
});
} else {
throw 'data is wrong.';
diff --git a/src/playground/blocks/block_judgement.js b/src/playground/blocks/block_judgement.js
index e960f4794a..853683dea2 100644
--- a/src/playground/blocks/block_judgement.js
+++ b/src/playground/blocks/block_judgement.js
@@ -113,7 +113,6 @@ module.exports = {
type: 'Dropdown',
value: 'next',
options: keyInputList,
- arrowColor: EntryStatic.colorSet.arrow.default.JUDGE,
converter: Entry.block.converters.keyboardCode,
},
],
@@ -248,7 +247,6 @@ module.exports = {
value: null,
menuName: 'collision',
fontSize: 11,
- arrowColor: EntryStatic.colorSet.arrow.default.JUDGE,
converter: Entry.block.converters.returnObjectOrStringValue,
codeMap: 'Entry.CodeMap.Entry.reach_something[1]',
},
@@ -738,6 +736,102 @@ module.exports = {
],
},
},
+ is_current_device_type: {
+ color: EntryStatic.colorSet.block.default.JUDGE,
+ outerLine: EntryStatic.colorSet.block.darken.JUDGE,
+ skeleton: 'basic_boolean_field',
+ statements: [],
+ params: [
+ {
+ type: 'Dropdown',
+ options: [
+ [Lang.Blocks.desktop, 'desktop'],
+ [Lang.Blocks.tablet, 'tablet'],
+ [Lang.Blocks.smartphone, 'mobile'],
+ ],
+ value: 'desktop',
+ fontSize: 10,
+ bgColor: EntryStatic.colorSet.block.darken.JUDGE,
+ arrowColor: EntryStatic.colorSet.arrow.default.DEFAULT,
+ },
+ ],
+ events: {},
+ def: {
+ params: [null],
+ type: 'is_current_device_type',
+ },
+ pyHelpDef: {
+ params: ['A&value'],
+ type: 'is_current_device_type',
+ },
+ class: 'boolean_device',
+ isNotFor: [],
+ paramsKeyMap: {
+ DEVICE: 0,
+ },
+ func(sprite, script) {
+ const device = script.getField('DEVICE', script);
+ const deviceType = Entry.Utils.getDeviceType();
+ if (device !== 'desktop') {
+ return deviceType === device;
+ } else if (deviceType !== 'mobile' && deviceType !== 'tablet') {
+ return true;
+ }
+ return false;
+ },
+ syntax: {
+ js: [],
+ py: [
+ {
+ syntax: 'Entry.is_current_device_type(%1)',
+ blockType: 'param',
+ textParams: [
+ {
+ type: 'Dropdown',
+ options: [
+ [Lang.Blocks.desktop, 'desktop'],
+ [Lang.Blocks.tablet, 'tablet'],
+ [Lang.Blocks.smartphone, 'mobile'],
+ ],
+ value: 'desktop',
+ fontSize: 11,
+ converter: Entry.block.converters.returnStringValue,
+ },
+ ],
+ },
+ ],
+ },
+ },
+ is_touch_supported: {
+ color: EntryStatic.colorSet.block.default.JUDGE,
+ outerLine: EntryStatic.colorSet.block.darken.JUDGE,
+ skeleton: 'basic_boolean_field',
+ statements: [],
+ params: [],
+ events: {},
+ def: {
+ params: [null],
+ type: 'is_touch_supported',
+ },
+ class: 'boolean_device',
+ isNotFor: [],
+ func() {
+ return (
+ 'ontouchstart' in window ||
+ navigator.maxTouchPoints > 0 ||
+ navigator.msMaxTouchPoints > 0
+ );
+ },
+ syntax: {
+ js: [],
+ py: [
+ {
+ syntax: 'Entry.is_touch_supported()',
+ blockType: 'param',
+ },
+ ],
+ },
+ },
};
},
};
diff --git a/src/playground/blocks/inputs/keyboard.js b/src/playground/blocks/inputs/keyboard.js
index 7809649a5b..f87afa5a18 100644
--- a/src/playground/blocks/inputs/keyboard.js
+++ b/src/playground/blocks/inputs/keyboard.js
@@ -1,11 +1,11 @@
export const keyInputList = [
- ['back-space', '8'],
- ['tab', '9'],
+ [Lang.Blocks.START_press_some_key_back_space, '8'],
+ ['Tab', '9'],
[Lang.Blocks.START_press_some_key_enter, '13'],
- ['shift', '16'],
- ['ctrl', '17'],
- ['alt', '18'],
- ['esc', '27'],
+ ['Shift', '16'],
+ ['Ctrl', '17'],
+ ['Alt', '18'],
+ ['Esc', '27'],
[Lang.Blocks.START_press_some_key_space, '32'],
[Lang.Blocks.START_press_some_key_left, '37'],
[Lang.Blocks.START_press_some_key_up, '38'],
@@ -55,7 +55,7 @@ export const keyInputList = [
['/', '191'],
['~', '192'],
['[', '219'],
- ['backslash', '220'],
+ [Lang.Blocks.START_press_some_key_back_slash, '220'],
[']', '221'],
["'", '222'],
];
diff --git a/src/textcoding/static/codeMap.js b/src/textcoding/static/codeMap.js
index 05da48fcd8..a39b8ac57e 100644
--- a/src/textcoding/static/codeMap.js
+++ b/src/textcoding/static/codeMap.js
@@ -2,7 +2,7 @@
Entry.CodeMap = {};
-(function(cc) {
+(function (cc) {
cc.Entry = {
start_neighbor_scene: [
{
@@ -72,6 +72,20 @@ Entry.CodeMap = {};
brown: '#990000',
},
],
+ set_text_color: [
+ {
+ red: '#FF0000',
+ orange: '#FF9966',
+ yellow: '#FFFF66',
+ green: '#009900',
+ blue: '#3333FF',
+ navy: '#000099',
+ purple: '#993399',
+ black: '#000000',
+ white: '#FFFFFF',
+ brown: '#990000',
+ },
+ ],
reach_something: [
null,
{
diff --git a/src/util/utils.js b/src/util/utils.js
index b885b039b0..0998735a44 100644
--- a/src/util/utils.js
+++ b/src/util/utils.js
@@ -11,6 +11,7 @@ import DataTable from '../class/DataTable';
import entryModuleLoader from '../class/entryModuleLoader';
import { bignumber, chain } from 'mathjs';
import { Scheduler } from './scheduler';
+import { UAParser } from 'ua-parser-js';
Entry.Utils = {};
@@ -3099,3 +3100,9 @@ Entry.Utils.getEntryjsPath = () =>
window.navigator.userAgent.indexOf('Electron') > -1
? `file://${window.getEntryjsPath()}`
: `${window.location.origin}/lib/entry-js`;
+
+Entry.Utils.getDeviceType = (target) => {
+ const parser = new UAParser();
+ const result = parser.getResult();
+ return result.device.type;
+};