@muvtacode/cli 0.1.9 → 0.1.11
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/README.md +175 -147
- package/dist/agent/loop.js +4 -1
- package/dist/agent/loop.js.map +1 -1
- package/dist/agent/prompt.js +101 -0
- package/dist/agent/prompt.js.map +1 -1
- package/dist/cli.js +103 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/index.js +28 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/i18n/en.js +4 -0
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/pt.js +4 -0
- package/dist/i18n/pt.js.map +1 -1
- package/dist/remote/claudeSessions.js +82 -0
- package/dist/remote/claudeSessions.js.map +1 -0
- package/dist/remote/host.js +607 -0
- package/dist/remote/host.js.map +1 -0
- package/dist/remote/passagem.js +558 -0
- package/dist/remote/passagem.js.map +1 -0
- package/dist/remote/pastas.js +156 -0
- package/dist/remote/pastas.js.map +1 -0
- package/dist/state/templates.js +43 -10
- package/dist/state/templates.js.map +1 -1
- package/dist/templates/game/adapt-assets-3d-01/files/public/models/armas/AssaultRifle_1.mtl +42 -0
- package/dist/templates/game/adapt-assets-3d-01/files/public/models/armas/AssaultRifle_1.obj +1472 -0
- package/dist/templates/game/adapt-assets-3d-01/files/public/models/armas/Grip.mtl +12 -0
- package/dist/templates/game/adapt-assets-3d-01/files/public/models/armas/Grip.obj +890 -0
- package/dist/templates/game/adapt-assets-3d-01/files/public/models/armas/LICENCA.txt +25 -0
- package/dist/templates/game/adapt-assets-3d-01/files/public/models/armas/Pistol_1.mtl +52 -0
- package/dist/templates/game/adapt-assets-3d-01/files/public/models/armas/Pistol_1.obj +1444 -0
- package/dist/templates/game/adapt-assets-3d-01/files/public/models/armas/Pistol_4.mtl +32 -0
- package/dist/templates/game/adapt-assets-3d-01/files/public/models/armas/Pistol_4.obj +1789 -0
- package/dist/templates/game/adapt-assets-3d-01/files/public/models/armas/Revolver_1.mtl +32 -0
- package/dist/templates/game/adapt-assets-3d-01/files/public/models/armas/Revolver_1.obj +1273 -0
- package/dist/templates/game/adapt-assets-3d-01/files/public/models/armas/Scope_1.mtl +32 -0
- package/dist/templates/game/adapt-assets-3d-01/files/public/models/armas/Scope_1.obj +485 -0
- package/dist/templates/game/adapt-assets-3d-01/files/public/models/armas/Shotgun_1.mtl +42 -0
- package/dist/templates/game/adapt-assets-3d-01/files/public/models/armas/Shotgun_1.obj +1589 -0
- package/dist/templates/game/adapt-assets-3d-01/files/public/models/armas/Silencer_1.mtl +12 -0
- package/dist/templates/game/adapt-assets-3d-01/files/public/models/armas/Silencer_1.obj +309 -0
- package/dist/templates/game/adapt-assets-3d-01/files/public/models/armas/SniperRifle_1.mtl +52 -0
- package/dist/templates/game/adapt-assets-3d-01/files/public/models/armas/SniperRifle_1.obj +1681 -0
- package/dist/templates/game/adapt-assets-3d-01/files/public/models/armas/SubmachineGun_1.mtl +42 -0
- package/dist/templates/game/adapt-assets-3d-01/files/public/models/armas/SubmachineGun_1.obj +1275 -0
- package/dist/templates/game/adapt-assets-3d-01/files/src/assets/modelos.ts +270 -0
- package/dist/templates/game/adapt-assets-3d-01/meta.json +30 -0
- package/dist/templates/game/adapt-audio-01/files/src/audio/audio.ts +123 -6
- package/dist/templates/game/adapt-audio-01/meta.json +47 -34
- package/dist/templates/game/adapt-camera-rig-01/files/src/camera/rig.ts +226 -55
- package/dist/templates/game/adapt-camera-rig-01/meta.json +53 -38
- package/dist/templates/game/adapt-controle-teclado-01/files/src/controles/teclado.ts +175 -171
- package/dist/templates/game/adapt-controle-teclado-01/meta.json +36 -34
- package/dist/templates/game/adapt-controle-toque-01/files/src/controles/toque.ts +152 -36
- package/dist/templates/game/adapt-controle-toque-01/meta.json +43 -36
- package/dist/templates/game/adapt-dia-noite-01/files/src/world/dianoite.ts +274 -53
- package/dist/templates/game/adapt-dia-noite-01/meta.json +21 -9
- package/dist/templates/game/adapt-hud-01/files/src/hud/hud.ts +859 -263
- package/dist/templates/game/adapt-hud-01/meta.json +69 -36
- package/dist/templates/game/adapt-menu-01/files/src/ui/menu.ts +427 -273
- package/dist/templates/game/adapt-menu-01/meta.json +41 -36
- package/dist/templates/game/adapt-particulas-01/files/src/vfx/particulas.ts +107 -39
- package/dist/templates/game/adapt-particulas-01/meta.json +50 -38
- package/dist/templates/game/adapt-perf-mobile-01/files/src/engine/performance.ts +108 -33
- package/dist/templates/game/adapt-perf-mobile-01/meta.json +20 -6
- package/dist/templates/game/adapt-primeira-pessoa-01/files/src/camera/primeirapessoa.ts +595 -0
- package/dist/templates/game/adapt-primeira-pessoa-01/meta.json +63 -0
- package/dist/templates/game/estruturas-3d-01/files/src/world/estruturas.ts +490 -0
- package/dist/templates/game/estruturas-3d-01/meta.json +13 -0
- package/dist/templates/game/fps-3d-01/files/src/fps/arena.ts +324 -0
- package/dist/templates/game/fps-3d-01/files/src/fps/armas.ts +398 -0
- package/dist/templates/game/fps-3d-01/files/src/fps/cena.ts +801 -0
- package/dist/templates/game/fps-3d-01/files/src/fps/coletaveis.ts +129 -0
- package/dist/templates/game/fps-3d-01/files/src/fps/fisica.ts +257 -0
- package/dist/templates/game/fps-3d-01/files/src/fps/inimigos.ts +608 -0
- package/dist/templates/game/fps-3d-01/files/src/fps/jogador.ts +224 -0
- package/dist/templates/game/fps-3d-01/files/src/main.ts +21 -0
- package/dist/templates/game/fps-3d-01/meta.json +48 -0
- package/dist/templates/game/game-engine-base-01/files/index.html +37 -0
- package/dist/templates/game/game-engine-base-01/files/package.json +19 -0
- package/dist/templates/game/game-engine-base-01/files/src/engine/engine.ts +22 -2
- package/dist/templates/game/game-engine-base-01/files/src/engine/index.ts +22 -2
- package/dist/templates/game/game-engine-base-01/files/src/engine/input.ts +430 -58
- package/dist/templates/game/game-engine-base-01/files/src/engine/layout.ts +192 -0
- package/dist/templates/game/game-engine-base-01/files/tsconfig.json +14 -0
- package/dist/templates/game/game-engine-base-01/files/vite.config.ts +10 -0
- package/dist/templates/game/game-engine-base-01/meta.json +70 -13
- package/dist/templates/game/mundo-3d-01/files/src/world/mundo3d.ts +2953 -73
- package/dist/templates/game/mundo-3d-01/meta.json +125 -6
- package/dist/templates/game/npc-3d-01/files/src/ai/npc3d.ts +658 -0
- package/dist/templates/game/npc-3d-01/meta.json +13 -0
- package/dist/templates/game/personagem-3d-01/files/src/models/personagem3d.ts +428 -107
- package/dist/templates/game/personagem-3d-01/meta.json +60 -6
- package/package.json +2 -1
|
@@ -1,171 +1,175 @@
|
|
|
1
|
-
// ---------------------------------------------------------------------------
|
|
2
|
-
// Controle desktop: remapeamento de teclas + gamepad + dica de teclas.
|
|
3
|
-
//
|
|
4
|
-
// O engine já lê teclado e gamepad. O que falta num jogo de verdade é:
|
|
5
|
-
// - deixar o jogador remapear (e o mapa sobreviver ao refresh);
|
|
6
|
-
// - perceber gamepad conectando NO MEIO da partida;
|
|
7
|
-
// - mostrar a dica certa — botão do controle quando há controle, tecla quando
|
|
8
|
-
// não há. Mostrar "Aperte A" para quem está no teclado é erro clássico.
|
|
9
|
-
// ---------------------------------------------------------------------------
|
|
10
|
-
|
|
11
|
-
import { MAPA_TECLADO, type Acao, type Input } from '../engine';
|
|
12
|
-
import { getPalette, alpha, type as tipo } from '../design/tokens';
|
|
13
|
-
|
|
14
|
-
const CHAVE_SALVA = 'jogo:teclas';
|
|
15
|
-
|
|
16
|
-
/** Nome legível de cada KeyboardEvent.code. O code é layout-independente. */
|
|
17
|
-
const NOME_TECLA: Record<string, string> = {
|
|
18
|
-
Space: 'Espaço', ArrowUp: '↑', ArrowDown: '↓', ArrowLeft: '←', ArrowRight: '→',
|
|
19
|
-
ShiftLeft: 'Shift', ShiftRight: 'Shift', ControlLeft: 'Ctrl', ControlRight: 'Ctrl',
|
|
20
|
-
Enter: 'Enter', Escape: 'Esc', Tab: 'Tab', Backspace: '⌫'
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
itens.
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
ctx.
|
|
144
|
-
ctx.
|
|
145
|
-
ctx.
|
|
146
|
-
|
|
147
|
-
ctx.
|
|
148
|
-
ctx.
|
|
149
|
-
ctx.
|
|
150
|
-
|
|
151
|
-
ctx.fillStyle =
|
|
152
|
-
ctx.textAlign = '
|
|
153
|
-
ctx.fillText(item.
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// Controle desktop: remapeamento de teclas + gamepad + dica de teclas.
|
|
3
|
+
//
|
|
4
|
+
// O engine já lê teclado e gamepad. O que falta num jogo de verdade é:
|
|
5
|
+
// - deixar o jogador remapear (e o mapa sobreviver ao refresh);
|
|
6
|
+
// - perceber gamepad conectando NO MEIO da partida;
|
|
7
|
+
// - mostrar a dica certa — botão do controle quando há controle, tecla quando
|
|
8
|
+
// não há. Mostrar "Aperte A" para quem está no teclado é erro clássico.
|
|
9
|
+
// ---------------------------------------------------------------------------
|
|
10
|
+
|
|
11
|
+
import { MAPA_TECLADO, type Acao, type Input } from '../engine';
|
|
12
|
+
import { getPalette, alpha, type as tipo } from '../design/tokens';
|
|
13
|
+
|
|
14
|
+
const CHAVE_SALVA = 'jogo:teclas';
|
|
15
|
+
|
|
16
|
+
/** Nome legível de cada KeyboardEvent.code. O code é layout-independente. */
|
|
17
|
+
const NOME_TECLA: Record<string, string> = {
|
|
18
|
+
Space: 'Espaço', ArrowUp: '↑', ArrowDown: '↓', ArrowLeft: '←', ArrowRight: '→',
|
|
19
|
+
ShiftLeft: 'Shift', ShiftRight: 'Shift', ControlLeft: 'Ctrl', ControlRight: 'Ctrl',
|
|
20
|
+
Enter: 'Enter', Escape: 'Esc', Tab: 'Tab', Backspace: '⌫',
|
|
21
|
+
// Botões do mouse entram no mesmo mapa das teclas (ver MAPA_TECLADO do engine).
|
|
22
|
+
Mouse0: 'Clique', Mouse1: 'Roda', Mouse2: 'Clique dir.'
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const nomeDaTecla = (code: string): string =>
|
|
26
|
+
NOME_TECLA[code] ?? code.replace(/^(Key|Digit)/, '');
|
|
27
|
+
|
|
28
|
+
/** Rótulo do botão de gamepad no layout padrão (Xbox). */
|
|
29
|
+
const NOME_BOTAO: Record<number, string> = {
|
|
30
|
+
0: 'A', 1: 'B', 2: 'X', 3: 'Y', 4: 'LB', 5: 'RB', 6: 'LT', 7: 'RT', 9: 'Start', 10: 'L3', 11: 'R3'
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/** Botão principal de cada ação — o mesmo que o engine lê (MAPA_GAMEPAD). */
|
|
34
|
+
const BOTAO_DA_ACAO: Partial<Record<Acao, number>> = {
|
|
35
|
+
pular: 0, atacar: 7, usar: 3, correr: 6, pausar: 9,
|
|
36
|
+
mirar: 4, recarregar: 1, agachar: 11, trocarArma: 5
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export interface ControleTeclado {
|
|
40
|
+
/** true quando há gamepad plugado agora. */
|
|
41
|
+
temGamepad(): boolean;
|
|
42
|
+
/** Rótulo a mostrar para a ação, já ciente do gamepad. */
|
|
43
|
+
rotulo(acao: Acao): string;
|
|
44
|
+
/** Inicia a captura da próxima tecla para remapear. Devolve o code capturado. */
|
|
45
|
+
capturarTecla(acao: Acao): Promise<string>;
|
|
46
|
+
restaurarPadrao(): void;
|
|
47
|
+
/** Desenha a barra de dicas. Chame no desenhar() da cena. */
|
|
48
|
+
desenharDicas(ctx: CanvasRenderingContext2D, acoes: Acao[], y?: number): void;
|
|
49
|
+
dispose(): void;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function criarControleTeclado(_input: Input): ControleTeclado {
|
|
53
|
+
let gamepadPresente = false;
|
|
54
|
+
|
|
55
|
+
// O navegador só expõe o gamepad depois de um input nele — por isso os
|
|
56
|
+
// eventos de conexão importam, não dá para só checar getGamepads() no boot.
|
|
57
|
+
const conectou = () => { gamepadPresente = true; console.info('[input] gamepad conectado'); };
|
|
58
|
+
const desconectou = () => {
|
|
59
|
+
gamepadPresente = !!navigator.getGamepads?.().some((g) => g);
|
|
60
|
+
};
|
|
61
|
+
addEventListener('gamepadconnected', conectou);
|
|
62
|
+
addEventListener('gamepaddisconnected', desconectou);
|
|
63
|
+
gamepadPresente = !!(typeof navigator !== 'undefined' && navigator.getGamepads?.().some((g) => g));
|
|
64
|
+
|
|
65
|
+
// ---------------------------------------------------------- persistência
|
|
66
|
+
const carregar = () => {
|
|
67
|
+
try {
|
|
68
|
+
const cru = localStorage.getItem(CHAVE_SALVA);
|
|
69
|
+
if (!cru) return;
|
|
70
|
+
const salvo = JSON.parse(cru) as Partial<Record<Acao, string[]>>;
|
|
71
|
+
for (const [acao, teclas] of Object.entries(salvo) as [Acao, string[]][]) {
|
|
72
|
+
if (Array.isArray(teclas) && teclas.length) MAPA_TECLADO[acao] = teclas;
|
|
73
|
+
}
|
|
74
|
+
} catch {
|
|
75
|
+
// Save corrompido não pode impedir o jogo de abrir: cai no padrão.
|
|
76
|
+
localStorage.removeItem(CHAVE_SALVA);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const salvar = () => {
|
|
81
|
+
try { localStorage.setItem(CHAVE_SALVA, JSON.stringify(MAPA_TECLADO)); } catch { /* cota cheia */ }
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const padraoOriginal: Record<string, string[]> = JSON.parse(JSON.stringify(MAPA_TECLADO));
|
|
85
|
+
carregar();
|
|
86
|
+
|
|
87
|
+
// -------------------------------------------------------------- captura
|
|
88
|
+
const capturarTecla = (acao: Acao): Promise<string> =>
|
|
89
|
+
new Promise((resolve) => {
|
|
90
|
+
const ouvir = (e: KeyboardEvent) => {
|
|
91
|
+
e.preventDefault();
|
|
92
|
+
e.stopPropagation();
|
|
93
|
+
removeEventListener('keydown', ouvir, true);
|
|
94
|
+
if (e.code === 'Escape') { resolve(''); return; }
|
|
95
|
+
|
|
96
|
+
// Tira a tecla de qualquer outra ação: dois comandos na mesma tecla é
|
|
97
|
+
// bug garantido, e o jogador não entende por que "não funciona".
|
|
98
|
+
for (const [outra, teclas] of Object.entries(MAPA_TECLADO) as [Acao, string[]][]) {
|
|
99
|
+
if (outra !== acao) MAPA_TECLADO[outra] = teclas.filter((t) => t !== e.code);
|
|
100
|
+
}
|
|
101
|
+
MAPA_TECLADO[acao] = [e.code];
|
|
102
|
+
salvar();
|
|
103
|
+
resolve(e.code);
|
|
104
|
+
};
|
|
105
|
+
addEventListener('keydown', ouvir, true);
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
const restaurarPadrao = () => {
|
|
109
|
+
for (const [acao, teclas] of Object.entries(padraoOriginal) as [Acao, string[]][]) {
|
|
110
|
+
MAPA_TECLADO[acao] = [...teclas];
|
|
111
|
+
}
|
|
112
|
+
salvar();
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
const rotulo = (acao: Acao): string => {
|
|
116
|
+
if (gamepadPresente) {
|
|
117
|
+
const b = BOTAO_DA_ACAO[acao];
|
|
118
|
+
if (b !== undefined) return NOME_BOTAO[b] ?? `B${b}`;
|
|
119
|
+
}
|
|
120
|
+
return nomeDaTecla(MAPA_TECLADO[acao]?.[0] ?? '?');
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
// ---------------------------------------------------------------- dicas
|
|
124
|
+
const desenharDicas = (
|
|
125
|
+
ctx: CanvasRenderingContext2D,
|
|
126
|
+
acoes: Acao[],
|
|
127
|
+
y = innerHeight - 28
|
|
128
|
+
): void => {
|
|
129
|
+
const p = getPalette();
|
|
130
|
+
ctx.save();
|
|
131
|
+
ctx.font = `${tipo.pequeno}px ${tipo.familia}`;
|
|
132
|
+
ctx.textBaseline = 'middle';
|
|
133
|
+
|
|
134
|
+
const itens = acoes.map((a) => ({ acao: a, texto: rotulo(a) }));
|
|
135
|
+
const larguras = itens.map((i) => ctx.measureText(`${i.texto} ${i.acao}`).width + 34);
|
|
136
|
+
const total = larguras.reduce((a, b) => a + b, 0);
|
|
137
|
+
let x = (innerWidth - total) / 2;
|
|
138
|
+
|
|
139
|
+
itens.forEach((item, idx) => {
|
|
140
|
+
const larguraChave = ctx.measureText(item.texto).width + 14;
|
|
141
|
+
|
|
142
|
+
// "Tecla" desenhada como capsula, igual às dicas dos jogos bons.
|
|
143
|
+
ctx.fillStyle = alpha(p.superficie, 0.85);
|
|
144
|
+
ctx.strokeStyle = alpha(p.contorno, 0.9);
|
|
145
|
+
ctx.lineWidth = 1.5;
|
|
146
|
+
ctx.beginPath();
|
|
147
|
+
ctx.roundRect(x, y - 11, larguraChave, 22, 5);
|
|
148
|
+
ctx.fill();
|
|
149
|
+
ctx.stroke();
|
|
150
|
+
|
|
151
|
+
ctx.fillStyle = p.texto;
|
|
152
|
+
ctx.textAlign = 'center';
|
|
153
|
+
ctx.fillText(item.texto, x + larguraChave / 2, y);
|
|
154
|
+
|
|
155
|
+
ctx.fillStyle = alpha(p.textoFraco, 0.9);
|
|
156
|
+
ctx.textAlign = 'left';
|
|
157
|
+
ctx.fillText(item.acao, x + larguraChave + 8, y);
|
|
158
|
+
|
|
159
|
+
x += larguras[idx]!;
|
|
160
|
+
});
|
|
161
|
+
ctx.restore();
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
return {
|
|
165
|
+
temGamepad: () => gamepadPresente,
|
|
166
|
+
rotulo,
|
|
167
|
+
capturarTecla,
|
|
168
|
+
restaurarPadrao,
|
|
169
|
+
desenharDicas,
|
|
170
|
+
dispose() {
|
|
171
|
+
removeEventListener('gamepadconnected', conectou);
|
|
172
|
+
removeEventListener('gamepaddisconnected', desconectou);
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
}
|
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
{
|
|
2
|
-
"categoria": "game",
|
|
3
|
-
"framework": "three",
|
|
4
|
-
"linguagem": "typescript",
|
|
5
|
-
"compatibilidade": {
|
|
6
|
-
"banco": [],
|
|
7
|
-
"auth": []
|
|
8
|
-
},
|
|
9
|
-
"versao": "1.
|
|
10
|
-
"id": "adapt-controle-teclado-01",
|
|
11
|
-
"nome": "Adaptação: Controle Teclado + Gamepad (desktop)",
|
|
12
|
-
"dependencias": [],
|
|
13
|
-
"tags": [
|
|
14
|
-
"game",
|
|
15
|
-
"jogo",
|
|
16
|
-
"controle",
|
|
17
|
-
"teclado",
|
|
18
|
-
"keyboard",
|
|
19
|
-
"gamepad",
|
|
20
|
-
"desktop",
|
|
21
|
-
"wasd",
|
|
22
|
-
"remapear",
|
|
23
|
-
"teclas",
|
|
24
|
-
"adaptacao"
|
|
25
|
-
],
|
|
26
|
-
"recursos_suportados": [
|
|
27
|
-
"remapeamento",
|
|
28
|
-
"gamepad-hotplug",
|
|
29
|
-
"dica-de-teclas",
|
|
30
|
-
"persistencia",
|
|
31
|
-
"deteccao-de-layout"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
{
|
|
2
|
+
"categoria": "game",
|
|
3
|
+
"framework": "three",
|
|
4
|
+
"linguagem": "typescript",
|
|
5
|
+
"compatibilidade": {
|
|
6
|
+
"banco": [],
|
|
7
|
+
"auth": []
|
|
8
|
+
},
|
|
9
|
+
"versao": "1.1.0",
|
|
10
|
+
"id": "adapt-controle-teclado-01",
|
|
11
|
+
"nome": "Adaptação: Controle Teclado + Gamepad (desktop)",
|
|
12
|
+
"dependencias": [],
|
|
13
|
+
"tags": [
|
|
14
|
+
"game",
|
|
15
|
+
"jogo",
|
|
16
|
+
"controle",
|
|
17
|
+
"teclado",
|
|
18
|
+
"keyboard",
|
|
19
|
+
"gamepad",
|
|
20
|
+
"desktop",
|
|
21
|
+
"wasd",
|
|
22
|
+
"remapear",
|
|
23
|
+
"teclas",
|
|
24
|
+
"adaptacao"
|
|
25
|
+
],
|
|
26
|
+
"recursos_suportados": [
|
|
27
|
+
"remapeamento",
|
|
28
|
+
"gamepad-hotplug",
|
|
29
|
+
"dica-de-teclas",
|
|
30
|
+
"persistencia",
|
|
31
|
+
"deteccao-de-layout",
|
|
32
|
+
"rotulos-de-mouse",
|
|
33
|
+
"rotulos-das-acoes-de-tiro"
|
|
34
|
+
],
|
|
35
|
+
"descricao": "OBRIGATÓRIA em jogo desktop. Camada de remapeamento de teclas com persistência, detecção de gamepad conectando/desconectando em runtime, e um painel de dicas de tecla que se adapta ao que está plugado (mostra os botões do controle quando há gamepad, teclas quando não há)."
|
|
36
|
+
}
|