-
Notifications
You must be signed in to change notification settings - Fork 56
/
convert2xkt.conf.js
142 lines (117 loc) · 5.91 KB
/
convert2xkt.conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
81
82
83
84
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
136
137
138
139
140
141
142
module.exports = {
"sourceConfigs": { // Conversion options for supported input file types
//----------------------------------------------------------------------------
// Configs for converting LAS and LAZ files
//
// Some of these configs are only used when the glTF files are accompanied
// by xeokit's JSON metadata files.
//
// These apply for glTF files that are given as a single input file,
// and also for each glTF files provided with a manifest, eg.
//
// node convert2xkt.js -s model.glb -o model.xkt
// node convert2xkt -a model.glb.manifest.json -o model.xkt.manifest.json
//
// We specify the settings separately for '.glb' and '.gltf' files,
// just for simplicity.
//----------------------------------------------------------------------------
"las": { // Conversion options for LAS input files
"center": false, // Center the point positions?
"transform": [ // Transform point positions by this matrix; this happens after optionally centering them
1.0, 0.0, 0.0, 0.0, // Rotate -90 about X axis
0.0, 0.0, -1.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 0.0, 1.0
],
"colorDepth": "auto", // 8, 16 or "auto"
"fp64": true, // Expect 64-bit color values
"skip": 1, // Convert every nth point (default = 1)
"minTileSize": 1000 // Minimum RTC tile (default = 1000)
},
"laz": {
"center": false,
"transform": [
1.0, 0.0, 0.0, 0.0,
0.0, 0.0, -1.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 0.0, 1.0
],
"colorDepth": "auto",
"fp64": true,
"skip": 1,
"minTileSize": 1000
},
//----------------------------------------------------------------------------
// Configs for converting glTF and GLB files, supplied singularly
// or as sets of files with a manifest.
//
// includeTypes and excludeTypes are only used when the glTF files are accompanied
// by xeokit's JSON metadata files.
//
// These apply for glTF files that are given as a single input file,
// and also for each glTF files provided with a manifest, eg.
//
// node convert2xkt.js -s model.glb -o model.xkt
// node convert2xkt -a model.glb.manifest.json -o model.xkt.manifest.json
//
// We specify the settings separately for '.glb' and '.gltf' files,
// just for simplicity.
//----------------------------------------------------------------------------
"gltf": {
// Reuse geometries? Setting this false will likely make the XKT bigger.
"reuseGeometries": true,
// Include textures in XKT?
"includeTextures": true,
// Convert normal vectors?
"includeNormals": false,
// Only convert these IFC types (when metadata JSON files also provided);
// comment this out when you want to convert all types (but perhaps want to
// exclude some types with excludeTypes).
// "includeTypes":[],
// Exclude these IFC types from being converted (when metadata JSON files
// also provided)
"excludeTypes": [],
// convert2xkt will divide huge double-precision vertex coordinates into
// a tiled relative-to-center (RTC) coordinate system, so that the xeokit
// viewer can render it without rounding errors on GPUs (which are normally
// single-precision). Setting this to a smaller value may improve precision,
// but will cause the viewer to do more work while rendering it
// (i.e. more draw calls). We recommend using the default value unless you get
// precision problems when rendering (i.e. jittering, or misalignment of objects).
"minTileSize": 1000,
// When converting .gltf source files that are accompanied by metadata JSON
// files, this will cause the metadata JSON files to not be embedded within the XKT output
// files, and instead be output separately. When converting split glTF / GLB models
// and outputting a manifest of split XKT files, the JSON files will be listed in the
// manifest alongside the XKT files.
"externalMetadata": true
},
"glb": {
"reuseGeometries": true,
"includeTextures": true,
"includeNormals": false,
// "includeTypes":[],
"excludeTypes": [],
"minTileSize": 200,
// When converting GLB source files that are accompanied by metadata JSON
// files, this will cause the metadata JSON files to not be embedded within the XKT output
// files, and instead be output separately. When converting split glTF / GLB models
// and outputting a manifest of split XKT files, the JSON files will be listed in the
// manifest alongside the XKT files.
"externalMetadata": true
},
//----------------------------------------------------------------------------
// Configs for converting CityJSON files
//----------------------------------------------------------------------------
"json": {
"center": false, // Center the point positions?
"transform": [ // Transform point positions by this matrix; this happens after optionally centering them
1.0, 0.0, 0.0, 0.0,
0.0, 0.0, -1.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 0.0, 1.0
],
"minTileSize": 1000
}
}
}