Add language for DirectX 3D model files (#4682)
* add language for DirectX 3D model files * DirectX 3D model file: allow 0302 version in heuristic
This commit is contained in:
Родитель
b4a068abf3
Коммит
1de0c3e109
|
@ -465,6 +465,8 @@ disambiguations:
|
|||
pattern: '^@(<|\w+\.)'
|
||||
- extensions: ['.x']
|
||||
rules:
|
||||
- language: DirectX 3D File
|
||||
pattern: '^xof 030(2|3)(?:txt|bin|tzip|bzip)\b'
|
||||
- language: RPC
|
||||
pattern: '\b(program|version)\s+\w+\s*{|\bunion\s+\w+\s+switch\s*\('
|
||||
- language: Logos
|
||||
|
|
|
@ -1132,6 +1132,13 @@ Diff:
|
|||
codemirror_mode: diff
|
||||
codemirror_mime_type: text/x-diff
|
||||
language_id: 88
|
||||
DirectX 3D File:
|
||||
type: data
|
||||
extensions:
|
||||
- ".x"
|
||||
ace_mode: text
|
||||
tm_scope: none
|
||||
language_id: 201049282
|
||||
Dockerfile:
|
||||
type: programming
|
||||
color: "#384d54"
|
||||
|
|
|
@ -0,0 +1,95 @@
|
|||
xof 0303txt 0032
|
||||
|
||||
Frame Root {
|
||||
FrameTransformMatrix {
|
||||
1.000000, 0.000000, 0.000000, 0.000000,
|
||||
0.000000,-0.000000, 1.000000, 0.000000,
|
||||
0.000000, 1.000000, 0.000000, 0.000000,
|
||||
0.000000, 0.000000, 0.000000, 1.000000;;
|
||||
}
|
||||
Frame Cube {
|
||||
FrameTransformMatrix {
|
||||
1.000000, 0.000000, 0.000000, 0.000000,
|
||||
0.000000, 1.000000, 0.000000, 0.000000,
|
||||
0.000000, 0.000000, 1.000000, 0.000000,
|
||||
0.000000, 0.000000, 0.000000, 1.000000;;
|
||||
}
|
||||
Mesh { // Cube mesh
|
||||
24;
|
||||
-1.000000;-1.000000;-1.000000;,
|
||||
-1.000000;-1.000000; 1.000000;,
|
||||
-1.000000; 1.000000; 1.000000;,
|
||||
-1.000000; 1.000000;-1.000000;,
|
||||
-1.000000; 1.000000;-1.000000;,
|
||||
-1.000000; 1.000000; 1.000000;,
|
||||
1.000000; 1.000000; 1.000000;,
|
||||
1.000000; 1.000000;-1.000000;,
|
||||
1.000000; 1.000000;-1.000000;,
|
||||
1.000000; 1.000000; 1.000000;,
|
||||
1.000000;-1.000000; 1.000000;,
|
||||
1.000000;-1.000000;-1.000000;,
|
||||
1.000000;-1.000000;-1.000000;,
|
||||
1.000000;-1.000000; 1.000000;,
|
||||
-1.000000;-1.000000; 1.000000;,
|
||||
-1.000000;-1.000000;-1.000000;,
|
||||
-1.000000; 1.000000;-1.000000;,
|
||||
1.000000; 1.000000;-1.000000;,
|
||||
1.000000;-1.000000;-1.000000;,
|
||||
-1.000000;-1.000000;-1.000000;,
|
||||
1.000000; 1.000000; 1.000000;,
|
||||
-1.000000; 1.000000; 1.000000;,
|
||||
-1.000000;-1.000000; 1.000000;,
|
||||
1.000000;-1.000000; 1.000000;;
|
||||
6;
|
||||
4;3,2,1,0;,
|
||||
4;7,6,5,4;,
|
||||
4;11,10,9,8;,
|
||||
4;15,14,13,12;,
|
||||
4;19,18,17,16;,
|
||||
4;23,22,21,20;;
|
||||
MeshNormals { // Cube normals
|
||||
6;
|
||||
-1.000000;-0.000000; 0.000000;,
|
||||
0.000000; 1.000000; 0.000000;,
|
||||
1.000000;-0.000000; 0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.000000; 0.000000;-1.000000;,
|
||||
0.000000;-0.000000; 1.000000;;
|
||||
6;
|
||||
4;0,0,0,0;,
|
||||
4;1,1,1,1;,
|
||||
4;2,2,2,2;,
|
||||
4;3,3,3,3;,
|
||||
4;4,4,4,4;,
|
||||
4;5,5,5,5;;
|
||||
} // End of Cube normals
|
||||
MeshTextureCoords { // Cube UV coordinates
|
||||
24;
|
||||
0.666667; 0.666667;,
|
||||
0.333333; 0.666667;,
|
||||
0.333333; 1.000000;,
|
||||
0.666667; 1.000000;,
|
||||
0.333333; 0.333333;,
|
||||
0.000000; 0.333333;,
|
||||
0.000000; 0.666667;,
|
||||
0.333333; 0.666667;,
|
||||
0.333333; 0.666667;,
|
||||
0.000000; 0.666667;,
|
||||
0.000000; 1.000000;,
|
||||
0.333333; 1.000000;,
|
||||
0.333333; 0.333333;,
|
||||
0.333333; 0.666667;,
|
||||
0.666667; 0.666667;,
|
||||
0.666667; 0.333333;,
|
||||
1.000000; 0.666667;,
|
||||
0.666667; 0.666667;,
|
||||
0.666667; 1.000000;,
|
||||
1.000000; 1.000000;,
|
||||
0.333333; 0.333333;,
|
||||
0.333333; 0.000000;,
|
||||
0.000000; 0.000000;,
|
||||
0.000000; 0.333333;;
|
||||
} // End of Cube UV coordinates
|
||||
} // End of Cube mesh
|
||||
} // End of Cube
|
||||
} // End of Root
|
|
@ -518,6 +518,7 @@ class TestHeuristics < Minitest::Test
|
|||
def test_x_by_heuristics
|
||||
# Logos not fully covered
|
||||
assert_heuristics({
|
||||
"DirectX 3D File" => all_fixtures("DirectX 3D File", "*.x"),
|
||||
"Linker Script" => all_fixtures("Linker Script", "*.x"),
|
||||
"RPC" => all_fixtures("RPC", "*.x")
|
||||
})
|
||||
|
|
Загрузка…
Ссылка в новой задаче