@@ -21,6 +21,7 @@ const cli = meow(
21
21
--name, -n Name of the component
22
22
--keepnames, -k Keep original names
23
23
--keepgroups, -K Keep (empty) groups, disable pruning
24
+ --bones, -b Layout bones declaratively (default: false)
24
25
--meta, -m Include metadata (as userData)
25
26
--shadows, -s Let meshes cast and receive shadows
26
27
--printwidth, -w Prettier printWidth (default: 120)
@@ -29,11 +30,14 @@ const cli = meow(
29
30
--preload -P Add preload method to module script
30
31
--root, -r Sets directory from which .gltf file is served
31
32
--transform, -T Transform the asset for the web (draco, prune, resize)
32
- --resolution, -R Transform resolution for texture resizing (default: 1024)
33
- --simplify, -S Transform simplification (default: false) (experimental!)
34
- --weld Weld tolerance (default: 0.0001)
35
- --ratio Simplifier ratio (default: 0.75)
36
- --error Simplifier error threshold (default: 0.001)
33
+ --resolution, -R Resolution for texture resizing (default: 1024)
34
+ --keepmeshes, -j Do not join compatible meshes
35
+ --keepmaterials, -M Do not palette join materials
36
+ --format, -f Texture format (default: "webp")
37
+ --simplify, -S Mesh simplification (default: false)
38
+ --ratio Simplifier ratio (default: 0)
39
+ --error Simplifier error threshold (default: 0.0001)
40
+ --console, -c Log component to console, won't produce a file
37
41
--debug, -D Debug output
38
42
` ,
39
43
{
@@ -42,24 +46,31 @@ const cli = meow(
42
46
output : { type : "string" , shortFlag : "o" } ,
43
47
selector : { type : "string" } ,
44
48
name : { type : "string" } ,
45
- types : { type : "boolean" , shortFlag : "t" } ,
46
49
keepnames : { type : "boolean" , shortFlag : "k" } ,
47
50
keepgroups : { type : "boolean" , shortFlag : "K" } ,
51
+ bones : { type : "boolean" , shortFlag : "b" , default : false } ,
48
52
shadows : { type : "boolean" , shortFlag : "s" } ,
49
53
printwidth : { type : "number" , shortFlag : "p" , default : 120 } ,
50
54
meta : { type : "boolean" , shortFlag : "m" } ,
51
- precision : { type : "number" , shortFlag : "p" , default : 2 } ,
52
- isolated : { type : "boolean" , shortFlag : "i" , default : false } ,
55
+ precision : { type : "number" , shortFlag : "p" , default : 3 } ,
53
56
preload : { type : "boolean" , shortFlag : "P" , default : false } ,
54
57
draco : { type : "string" , shortFlag : "d" } ,
55
58
root : { type : "string" , shortFlag : "r" } ,
56
59
transform : { type : "boolean" , shortFlag : "T" } ,
57
60
resolution : { type : "number" , shortFlag : "R" , default : 1024 } ,
61
+ degrade : { type : "string" , shortFlag : "q" , default : "" } ,
62
+ degraderesolution : { type : "number" , shortFlag : "Q" , default : 512 } ,
58
63
simplify : { type : "boolean" , shortFlag : "S" , default : false } ,
59
- weld : { type : "number" , default : 0.0001 } ,
64
+ keepmeshes : { type : "boolean" , shortFlag : "j" , default : false } ,
65
+ keepmaterials : { type : "boolean" , shortFlag : "M" , default : false } ,
60
66
ratio : { type : "number" , default : 0.75 } ,
61
67
error : { type : "number" , default : 0.001 } ,
62
68
debug : { type : "boolean" , shortFlag : "D" } ,
69
+ format : { type : "string" , shortFlag : "f" , default : "webp" } ,
70
+ console : { type : "boolean" , shortFlag : "c" } ,
71
+
72
+ // instance: { type: "boolean", shortFlag: "i" },
73
+ // instanceall: { type: "boolean", shortFlag: "I" },
63
74
} ,
64
75
} ,
65
76
) ;
@@ -70,7 +81,8 @@ if (cli.input.length === 0) {
70
81
console . log ( cli . help ) ;
71
82
} else {
72
83
const file = cli . input [ 0 ] ;
73
- let nameExt = file . match ( / [ - _ \w ] + [ . ] \w + $ / i) [ 0 ] ;
84
+
85
+ let nameExt = file . match ( / [ - _ \w \d \s ] + [ . ] [ \w ] + $ / i) [ 0 ] ;
74
86
let name = nameExt . split ( "." ) . slice ( 0 , - 1 ) . join ( "." ) ;
75
87
let output = name + ".ts" ;
76
88
0 commit comments