@jtff/miztemplate-lib 3.9.1 → 3.10.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.
@@ -0,0 +1,145 @@
1
+ -- View scripts
2
+ -- Copyright (C) 2004, Eagle Dynamics.
3
+
4
+ CockpitMouse = true --false
5
+ CockpitMouseSpeedSlow = 1.0
6
+ CockpitMouseSpeedNormal = 10.0
7
+ CockpitMouseSpeedFast = 20.0
8
+ CockpitKeyboardAccelerationSlow = 5.0
9
+ CockpitKeyboardAccelerationNormal = 30.0
10
+ CockpitKeyboardAccelerationFast = 80.0
11
+ CockpitKeyboardZoomAcceleration = 300.0
12
+ DisableSnapViewsSaving = false
13
+ UseDefaultSnapViews = true
14
+ CockpitPanStepHor = 45.0
15
+ CockpitPanStepVert = 30.0
16
+ CockpitNyMove = true
17
+
18
+ CockpitHAngleAccelerateTimeMax = 0.15
19
+ CockpitVAngleAccelerateTimeMax = 0.15
20
+ CockpitZoomAccelerateTimeMax = 0.2
21
+
22
+ function NaturalHeadMoving(tang, roll, omz)
23
+ local r = roll
24
+ if r > 90.0 then
25
+ r = 180.0 - r
26
+ elseif roll < -90.0 then
27
+ r = -180.0 - r
28
+ end
29
+ local hAngle = -0.25 * r
30
+ local vAngle = math.min(math.max(0.0, 0.4 * tang + 45.0 * omz), 90.0)
31
+ return hAngle, vAngle
32
+ end
33
+
34
+ ExternalMouse = true
35
+ ExternalMouseSpeedSlow = 1.0
36
+ ExternalMouseSpeedNormal = 5.0
37
+ ExternalMouseSpeedFast = 20.0
38
+ ExternalViewAngleMin = 3.0
39
+ ExternalViewAngleMax = 140.0
40
+ ExternalViewAngleDefault = 60.0
41
+ ExternalKeyboardZoomAcceleration = 30.0
42
+ ExternalKeyboardZoomAccelerateTimeMax = 1.0
43
+ ExplosionExpoTime = 4.0
44
+ ExternalKeyboardAccelerationSlow = 1.0
45
+ ExternalKeyboardAccelerationNormal = 10.0
46
+ ExternalKeyboardAccelerationFast = 30.0
47
+ ExternalHAngleAccelerateTimeMax = 3.0
48
+ ExternalVAngleAccelerateTimeMax = 3.0
49
+ ExternalDistAccelerateTimeMax = 3.0
50
+ ExternalHAngleLocalAccelerateTimeMax = 3.0
51
+ ExternalVAngleLocalAccelerateTimeMax = 3.0
52
+ ExternalAngleNormalDiscreteStep = 15.0/ExternalKeyboardAccelerationNormal -- When 'S' is pressed only
53
+ ChaseCameraNyMove = true
54
+
55
+ FreeCameraAngleIncrement = 3.0
56
+ FreeCameraDistanceIncrement = 100.0
57
+ FreeCameraLeftRightIncrement = 2.0
58
+ FreeCameraAltitudeIncrement = 2.0
59
+ FreeCameraScalarSpeedAcceleration = 0.1
60
+
61
+ FreeCamera_speedWSNormal = 1000000.0 / 3600.0
62
+ FreeCamera_speedWSFast = 8000.0
63
+ FreeCamera_speedWSSlow = 32.0
64
+ FreeCamera_AD_WS_coeff = 0.25
65
+ FreeCamera_speedADNormal = FreeCamera_speedWSNormal * FreeCamera_AD_WS_coeff
66
+ FreeCamera_speedADFast = FreeCamera_speedWSFast * FreeCamera_AD_WS_coeff
67
+ FreeCamera_speedADSlow = FreeCamera_speedWSSlow * FreeCamera_AD_WS_coeff
68
+
69
+ keyboardSpeedLSO = 0.005
70
+ keyboardSpeedBOSS = 0.02
71
+ keyboardSpeedHANGAR = 0.05
72
+ mouseSpeedLSO = 980.0
73
+ mouseSpeedBOSS = 980.0
74
+ mouseSpeedHANGAR = 980.0
75
+
76
+ xMinMap = -300000
77
+ xMaxMap = 500000
78
+ yMinMap = -400000
79
+ yMaxMap = 200000
80
+ dxMap = 150000
81
+ dyMap = 100000
82
+
83
+ head_roll_shaking = true
84
+ head_roll_shaking_max = 30.0
85
+ head_roll_shaking_compensation_gain = 0.3
86
+
87
+ -- CameraJiggle() and CameraFloat() functions make camera position
88
+ -- dependent on FPS so be careful in using the Shift-J command with tracks, please.
89
+ -- uncomment to use custom jiggle functions
90
+ --[[
91
+ function CameraJiggle(t,rnd1,rnd2,rnd3)
92
+ local rotX, rotY, rotZ
93
+ rotX = 0.05 * rnd1 * math.sin(37.0 * (t - 0.0))
94
+ rotY = 0.05 * rnd2 * math.sin(41.0 * (t - 1.0))
95
+ rotZ = 0.05 * rnd3 * math.sin(53.0 * (t - 2.0))
96
+ return rotX, rotY, rotZ
97
+ end
98
+
99
+ function CameraFloat(t)
100
+ local dX, dY, dZ
101
+ dX = 0.61 * math.sin(0.7 * t) + 0.047 * math.sin(1.6 * t);
102
+ dY = 0.43 * math.sin(0.6 * t) + 0.067 * math.sin(1.7 * t);
103
+ dZ = 0.53 * math.sin(1.0 * t) + 0.083 * math.sin(1.9 * t);
104
+ return dX, dY, dZ
105
+ end
106
+ --]]
107
+ --Debug keys
108
+
109
+ DEBUG_TEXT = 1
110
+ DEBUG_GEOMETRY = 2
111
+
112
+ debug_keys = {
113
+ [DEBUG_TEXT] = 1,
114
+ [DEBUG_GEOMETRY] = 1
115
+ }
116
+
117
+ function onDebugCommand(command)
118
+ if command == 10000 then
119
+ if debug_keys[DEBUG_TEXT] ~= 0 or debug_keys[DEBUG_GEOMETRY] ~= 0 then
120
+ debug_keys[DEBUG_GEOMETRY] = 0
121
+ debug_keys[DEBUG_TEXT] = 0
122
+ else
123
+ debug_keys[DEBUG_GEOMETRY] = 1
124
+ debug_keys[DEBUG_TEXT] = 1
125
+ end
126
+ elseif command == 10001 then
127
+ if debug_keys[DEBUG_TEXT] ~= 0 then
128
+ debug_keys[DEBUG_TEXT] = 0
129
+ else
130
+ debug_keys[DEBUG_TEXT] = 1
131
+ end
132
+ elseif command == 10002 then
133
+ if debug_keys[DEBUG_GEOMETRY] ~= 0 then
134
+ debug_keys[DEBUG_GEOMETRY] = 0
135
+ else
136
+ debug_keys[DEBUG_GEOMETRY] = 1
137
+ end
138
+ end
139
+ end
140
+
141
+ -- gain values for TrackIR , to unify responce on diffrent types of aircraft
142
+ TrackIR_gain_x = -0.6
143
+ TrackIR_gain_y = 0.3
144
+ TrackIR_gain_z = -0.25
145
+ TrackIR_gain_roll = -90
@@ -61,6 +61,12 @@ function createSkel(jtffci, env_mission) {
61
61
  ].join(""),
62
62
  { recursive: true }
63
63
  );
64
+ fs.mkdirSync([
65
+ workspacePath,
66
+ "/resources/config"
67
+ ].join(""),
68
+ { recursive: true }
69
+ );
64
70
  fs.mkdirSync([
65
71
  workspacePath,
66
72
  "/resources/kneeboards/common"
@@ -210,6 +216,9 @@ async function doInject(ciObject, sourceMizFileName, workspacePath,destinationMi
210
216
  // injection des fichiers son Misc si repertoire resources/sounds/Misc present
211
217
  await ciObject.mizlib.updateWorkspaceWithSingleSoundFolder(workspacePath, 'Misc');
212
218
  await ciObject.mizlib.injectSingleSoundFolderIntoZipObject(mizObject,workspacePath, 'Misc', true);
219
+ // injection des fichiers Config View si repertoire resources/config/View present
220
+ await ciObject.mizlib.updateWorkspaceWithSingleConfigFolder(workspacePath, 'View');
221
+ await ciObject.mizlib.injectSingleConfigFolderIntoZipObject(mizObject,workspacePath, 'View', true);
213
222
  // insertion des Librairies JTFF dans la file d'attente
214
223
  settingsArray.push(
215
224
  {