fazer-lang 3.1.0 → 3.2.0
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/CHANGELOG.md +18 -0
- package/README.md +4 -0
- package/docs/3D_ENGINE.md +99 -0
- package/docs/GUIDE.md +51 -6
- package/fazer.js +853 -9
- package/lib/engine3d.fz +217 -0
- package/package.json +4 -3
- package/tools/builder.js +194 -208
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [3.2.0] - 2026-01-24
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **3D Game Engine (WebGL 2.0)**: Fully hardware-accelerated 3D rendering engine.
|
|
9
|
+
- `gfx.init3d(title, w, h)`: Initialize 3D context.
|
|
10
|
+
- `gfx.mesh_create(id, verts, cols, norms)`: Upload mesh data to GPU (VBO/VAO).
|
|
11
|
+
- `gfx.draw(id, x,y,z, rx,ry,rz, sx,sy,sz)`: Draw 3D mesh entity with transformation.
|
|
12
|
+
- `gfx.camera(x,y,z, tx,ty,tz)`: Set camera position and look-at target.
|
|
13
|
+
- `gfx.light(x,y,z)`: Set point light position.
|
|
14
|
+
- **engine3d Library**: High-level 3D abstraction library (included in `lib/`).
|
|
15
|
+
- `import("engine3d.fz")`: Import the standard 3D library.
|
|
16
|
+
- `engine3d.Vec3`, `vec_add`, `vec_sub`, `vec_cross`: Vector math utilities.
|
|
17
|
+
- `engine3d.create_cube_mesh`, `create_plane_mesh`: Built-in mesh generators.
|
|
18
|
+
- `engine3d.Camera`: FPS Camera implementation.
|
|
19
|
+
- `engine3d.Entity`: Base 3D entity class.
|
|
20
|
+
- `engine3d.aabb_intersect`: 3D collision detection.
|
|
21
|
+
- **Overlay UI**: 2D text rendering on top of 3D scene (`gfx.text` works in 3D mode).
|
|
22
|
+
|
|
5
23
|
## [3.1.0] - 2026-01-24
|
|
6
24
|
|
|
7
25
|
### Added
|
package/README.md
CHANGED
|
@@ -65,6 +65,10 @@ Documentation détaillée par section :
|
|
|
65
65
|
* **Injection de Code** : Injection de Shellcode via `CreateRemoteThread` (Memory Injection).
|
|
66
66
|
* **Crypto** : AES-256, Hachage (SHA256/512), HMAC, Encodages.
|
|
67
67
|
* **Forensics** : Dump mémoire (MiniDump), Liste processus.
|
|
68
|
+
* **Moteur 3D (v3.2)** : Moteur de jeu WebGL 2.0 complet intégré.
|
|
69
|
+
* **Rendu** : Meshes 3D, Eclairage, Caméra FPS.
|
|
70
|
+
* **Bibliothèque** : `engine3d` inclus pour la physique (AABB) et les mathématiques vectorielles.
|
|
71
|
+
* **Mixte** : Overlay 2D sur scène 3D pour les interfaces utilisateur.
|
|
68
72
|
* **Stdlib Étendue** : Mathématiques, FS récursif, HTTP avancé (Headers, Proxies).
|
|
69
73
|
* **Pipe Operator (`->>`)** : Enchaînez les opérations proprement.
|
|
70
74
|
* **Pattern Matching (`case`)** : Contrôle de flux expressif.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Guide du Moteur 3D Fazer (v3.2)
|
|
2
|
+
|
|
3
|
+
Fazer v3.2 introduit un moteur de rendu 3D complet, accéléré matériellement via WebGL 2.0. Ce guide explique comment créer des scènes 3D, gérer la caméra, et utiliser la bibliothèque standard `engine3d`.
|
|
4
|
+
|
|
5
|
+
## Initialisation
|
|
6
|
+
|
|
7
|
+
Pour démarrer le mode 3D, utilisez `gfx.init3d` au lieu de `gfx.init`.
|
|
8
|
+
|
|
9
|
+
```fazer
|
|
10
|
+
gfx.init3d("Mon Jeu 3D", 800, 600)
|
|
11
|
+
|
|
12
|
+
fn loop() ->
|
|
13
|
+
gfx.clear({r:0.1, g:0.1, b:0.1})
|
|
14
|
+
# ... rendu ...
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
gfx.loop(loop)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Bibliothèque `engine3d`
|
|
21
|
+
|
|
22
|
+
La bibliothèque `engine3d` fournit des abstractions de haut niveau pour faciliter le développement. Elle est incluse dans la distribution standard.
|
|
23
|
+
|
|
24
|
+
```fazer
|
|
25
|
+
engine3d := import("engine3d.fz")
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Vecteurs
|
|
29
|
+
|
|
30
|
+
```fazer
|
|
31
|
+
v1 := engine3d.Vec3(1, 0, 0)
|
|
32
|
+
v2 := engine3d.Vec3(0, 1, 0)
|
|
33
|
+
v3 := engine3d.vec_add(v1, v2) # {x:1, y:1, z:0}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Création de Meshes
|
|
37
|
+
|
|
38
|
+
Vous pouvez générer des formes primitives facilement :
|
|
39
|
+
|
|
40
|
+
```fazer
|
|
41
|
+
# Créer un cube rouge avec l'ID "cube1"
|
|
42
|
+
engine3d.create_cube_mesh("cube1", {r:1, g:0, b:0})
|
|
43
|
+
|
|
44
|
+
# Créer un sol gris
|
|
45
|
+
engine3d.create_plane_mesh("floor", {r:0.5, g:0.5, b:0.5}, 20, 20)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Entités et Caméra
|
|
49
|
+
|
|
50
|
+
La bibliothèque propose une structure `Entity` et une `Camera` FPS prête à l'emploi.
|
|
51
|
+
|
|
52
|
+
```fazer
|
|
53
|
+
# Caméra
|
|
54
|
+
mut cam := engine3d.Camera(0, 2, 5)
|
|
55
|
+
|
|
56
|
+
# Entité
|
|
57
|
+
mut box := engine3d.Entity("cube1", 0, 0, 0)
|
|
58
|
+
|
|
59
|
+
fn loop() ->
|
|
60
|
+
gfx.clear({r:0.1, g:0.1, b:0.1})
|
|
61
|
+
|
|
62
|
+
# Mise à jour Caméra (ZQSD + Souris)
|
|
63
|
+
cam.update(cam)
|
|
64
|
+
|
|
65
|
+
# Dessiner l'entité
|
|
66
|
+
box.draw(box)
|
|
67
|
+
end
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## API Bas Niveau (`gfx`)
|
|
71
|
+
|
|
72
|
+
Si vous souhaitez contrôler directement le pipeline de rendu :
|
|
73
|
+
|
|
74
|
+
* `gfx.mesh_create(id, verts, cols, norms)`: Envoie les données géométriques au GPU.
|
|
75
|
+
* `verts`: Liste plate [x,y,z, x,y,z, ...]
|
|
76
|
+
* `cols`: Liste plate [r,g,b, r,g,b, ...]
|
|
77
|
+
* `norms`: Liste plate [nx,ny,nz, ...]
|
|
78
|
+
* `gfx.draw(id, x, y, z, rx, ry, rz, sx, sy, sz)`: Dessine un mesh avec transformation (Position, Rotation, Scale).
|
|
79
|
+
* `gfx.camera(x, y, z, tx, ty, tz)`: Positionne la caméra et le point qu'elle regarde (LookAt).
|
|
80
|
+
* `gfx.light(x, y, z)`: Positionne la source de lumière ponctuelle.
|
|
81
|
+
|
|
82
|
+
## Interface Utilisateur (Overlay)
|
|
83
|
+
|
|
84
|
+
Vous pouvez dessiner du texte 2D par-dessus la scène 3D pour afficher des scores, de la vie, etc.
|
|
85
|
+
|
|
86
|
+
```fazer
|
|
87
|
+
gfx.text(10, 10, "Score: 100", "#FFFFFF", 20)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Collisions
|
|
91
|
+
|
|
92
|
+
La bibliothèque inclut une fonction simple d'intersection AABB (Axis-Aligned Bounding Box).
|
|
93
|
+
|
|
94
|
+
```fazer
|
|
95
|
+
hit := engine3d.aabb_intersect(
|
|
96
|
+
pos1, size1, # {x,y,z}
|
|
97
|
+
pos2, size2 # {x,y,z}
|
|
98
|
+
)
|
|
99
|
+
```
|
package/docs/GUIDE.md
CHANGED
|
@@ -15,8 +15,9 @@ Que vous soyez un débutant complet ou un développeur expérimenté, ce manuel
|
|
|
15
15
|
5. [Module 5 : Manipulation de Fichiers & Système](#module-5--manipulation-de-fichiers--système)
|
|
16
16
|
6. [Module 6 : Interfaces Graphiques (GUI)](#module-6--interfaces-graphiques-gui)
|
|
17
17
|
7. [Module 7 : Réseau & Web](#module-7--réseau--web)
|
|
18
|
-
8. [Module 8 : Cybersécurité & Red Team](#module-8--cybersécurité--red-team)
|
|
19
|
-
9. [
|
|
18
|
+
8. 8. [Module 8 : Cybersécurité & Red Team](#module-8--cybersécurité--red-team)
|
|
19
|
+
9. [Module 9 : Moteur 3D & Jeux](#module-9--moteur-3d--jeux)
|
|
20
|
+
10. [Annexe : Compiler en .EXE](#annexe--compiler-en-exe)
|
|
20
21
|
|
|
21
22
|
---
|
|
22
23
|
|
|
@@ -229,15 +230,59 @@ print(page.status)
|
|
|
229
230
|
> ⚠️ **AVERTISSEMENT** : Usage éducatif et autorisé uniquement.
|
|
230
231
|
|
|
231
232
|
### Fonctionnalités Clés
|
|
232
|
-
* **Chiffrement** : `
|
|
233
|
-
* **
|
|
234
|
-
* **
|
|
235
|
-
* **
|
|
233
|
+
* **Chiffrement** : `crypto.aes_encrypt`, `crypto.hash`, `crypto.hmac`.
|
|
234
|
+
* **Implant** : `implant.beacon(url, ms)`, `implant.persist("startup")`.
|
|
235
|
+
* **WiFi** : `wifi.scan()`, `wifi.dump("SSID")`.
|
|
236
|
+
* **Espionnage (Spy)** :
|
|
237
|
+
* `spy.keys_start("log.txt")` : Keylogger (processus détaché).
|
|
238
|
+
* `spy.screenshot("ecran.png")` : Capture d'écran.
|
|
239
|
+
* `spy.clip_mon(callback)` : Surveille le presse-papier.
|
|
240
|
+
* **Stéganographie** : `steg.hide_bmp`, `steg.reveal_bmp` (LSB).
|
|
241
|
+
* **Injection** : `proc.inject(pid, shellcode)` (PowerShell/C# Bridge).
|
|
242
|
+
* **Forensics** : `sys.mem_dump(pid, file)`.
|
|
243
|
+
* **Anti-Forensics** : `self.destruct()` (Auto-destruction).
|
|
236
244
|
|
|
237
245
|
*Pour un guide détaillé sur ces fonctions, consultez le fichier `PENTESTING.md`.*
|
|
238
246
|
|
|
239
247
|
---
|
|
240
248
|
|
|
249
|
+
## Module 9 : Moteur 3D & Jeux
|
|
250
|
+
|
|
251
|
+
Fazer 3.2 intègre un moteur 3D complet (WebGL 2.0).
|
|
252
|
+
|
|
253
|
+
### Démarrage Rapide
|
|
254
|
+
|
|
255
|
+
```fazer
|
|
256
|
+
# Importer la bibliothèque standard 3D
|
|
257
|
+
engine3d := import("engine3d.fz")
|
|
258
|
+
|
|
259
|
+
# Initialiser la fenêtre 3D
|
|
260
|
+
gfx.init3d("Mon Jeu", 1280, 720)
|
|
261
|
+
|
|
262
|
+
# Créer une caméra
|
|
263
|
+
mut cam := engine3d.Camera(0, 2, 5)
|
|
264
|
+
|
|
265
|
+
# Créer un cube
|
|
266
|
+
engine3d.create_cube_mesh("box", {r:1, g:0, b:0})
|
|
267
|
+
mut ent := engine3d.Entity("box", 0, 0, 0)
|
|
268
|
+
|
|
269
|
+
fn loop() ->
|
|
270
|
+
gfx.clear({r:0.2, g:0.2, b:0.2})
|
|
271
|
+
|
|
272
|
+
# Mettre à jour la caméra
|
|
273
|
+
cam.update(cam)
|
|
274
|
+
|
|
275
|
+
# Dessiner l'entité
|
|
276
|
+
ent.draw(ent)
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
gfx.loop(loop)
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Pour plus de détails, voir le [Guide Moteur 3D](3D_ENGINE.md).
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
241
286
|
## Annexe : Compiler en .EXE
|
|
242
287
|
|
|
243
288
|
Transformez n'importe quel script `.fz` en un exécutable Windows autonome `.exe` que vous pouvez partager.
|