react-native-cesium 1.2.8 → 1.2.9
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/android/src/main/cpp/CesiumBridgeAndroid.cpp +16 -3
- package/android/src/main/cpp/CesiumBridgeAndroid.h +2 -1
- package/android/src/main/java/com/margelo/nitro/reactnativecesium/CesiumBridgeJNI.kt +4 -3
- package/android/src/main/java/com/margelo/nitro/reactnativecesium/HybridCesiumView.kt +12 -6
- package/cpp/engine/GlobeCamera.cpp +0 -1
- package/ios/CesiumBridge.h +6 -1
- package/ios/CesiumBridge.mm +13 -1
- package/ios/HybridCesiumView.swift +6 -6
- package/lib/typescript/src/specs/cesium-view.nitro.d.ts +11 -3
- package/lib/typescript/src/specs/cesium-view.nitro.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/specs/cesium-view.nitro.ts +17 -3
|
@@ -25,12 +25,22 @@ CesiumBridgeAndroid::~CesiumBridgeAndroid() {
|
|
|
25
25
|
|
|
26
26
|
void CesiumBridgeAndroid::init(JNIEnv* env, jobject surface, int width, int height,
|
|
27
27
|
const std::string& cacheDir,
|
|
28
|
-
const std::string& cacertPath
|
|
28
|
+
const std::string& cacertPath,
|
|
29
|
+
const std::string& ionAccessToken,
|
|
30
|
+
int64_t ionAssetId) {
|
|
29
31
|
config_.cacheDatabasePath = cacheDir.empty() ? "" : cacheDir + "/cesium_cache.db";
|
|
30
32
|
config_.tlsCaBundlePath = cacertPath;
|
|
31
33
|
viewportWidth_ = width;
|
|
32
34
|
viewportHeight_ = height;
|
|
33
35
|
|
|
36
|
+
// Seed the ion credentials before buildEngine so createTileset() can
|
|
37
|
+
// immediately start the async tileset.json HTTP round-trip, letting it
|
|
38
|
+
// overlap with Vulkan PSO compilation rather than run serially after it.
|
|
39
|
+
if (!ionAccessToken.empty()) {
|
|
40
|
+
config_.ionAccessToken = ionAccessToken;
|
|
41
|
+
config_.ionAssetId = ionAssetId;
|
|
42
|
+
}
|
|
43
|
+
|
|
34
44
|
// ANativeWindow_fromSurface() acquires one strong reference on the
|
|
35
45
|
// returned window; we own it now and must call ANativeWindow_release() in
|
|
36
46
|
// shutdown() (or before re-acquiring) to avoid leaking it on every view
|
|
@@ -408,12 +418,15 @@ Java_com_margelo_nitro_reactnativecesium_CesiumBridgeJNI_nativeCreate(JNIEnv*, j
|
|
|
408
418
|
JNIEXPORT void JNICALL
|
|
409
419
|
Java_com_margelo_nitro_reactnativecesium_CesiumBridgeJNI_nativeInit(
|
|
410
420
|
JNIEnv* env, jobject, jlong ptr, jobject surface, jint w, jint h,
|
|
411
|
-
jstring cacheDir, jstring cacertPath) {
|
|
421
|
+
jstring cacheDir, jstring cacertPath, jstring ionAccessToken, jlong ionAssetId) {
|
|
412
422
|
const char* cacheDirC = env->GetStringUTFChars(cacheDir, nullptr);
|
|
413
423
|
const char* cacertC = env->GetStringUTFChars(cacertPath, nullptr);
|
|
414
|
-
|
|
424
|
+
const char* tokenC = env->GetStringUTFChars(ionAccessToken, nullptr);
|
|
425
|
+
getBridge(ptr)->init(env, surface, w, h, cacheDirC, cacertC,
|
|
426
|
+
tokenC ? tokenC : "", static_cast<int64_t>(ionAssetId));
|
|
415
427
|
env->ReleaseStringUTFChars(cacheDir, cacheDirC);
|
|
416
428
|
env->ReleaseStringUTFChars(cacertPath, cacertC);
|
|
429
|
+
env->ReleaseStringUTFChars(ionAccessToken, tokenC);
|
|
417
430
|
}
|
|
418
431
|
|
|
419
432
|
JNIEXPORT void JNICALL
|
|
@@ -36,7 +36,8 @@ struct CesiumBridgeAndroid {
|
|
|
36
36
|
CesiumBridgeAndroid& operator=(CesiumBridgeAndroid&&) = delete;
|
|
37
37
|
|
|
38
38
|
void init(JNIEnv* env, jobject surface, int width, int height,
|
|
39
|
-
const std::string& cacheDir, const std::string& cacertPath
|
|
39
|
+
const std::string& cacheDir, const std::string& cacertPath,
|
|
40
|
+
const std::string& ionAccessToken, int64_t ionAssetId);
|
|
40
41
|
void shutdown();
|
|
41
42
|
|
|
42
43
|
void resize(int width, int height);
|
|
@@ -9,8 +9,9 @@ import android.view.Surface
|
|
|
9
9
|
class CesiumBridgeJNI {
|
|
10
10
|
private var nativePtr: Long = nativeCreate()
|
|
11
11
|
|
|
12
|
-
fun init(surface: Surface, width: Int, height: Int, cacheDir: String, cacertPath: String
|
|
13
|
-
|
|
12
|
+
fun init(surface: Surface, width: Int, height: Int, cacheDir: String, cacertPath: String,
|
|
13
|
+
ionAccessToken: String = "", ionAssetId: Long = 1L) {
|
|
14
|
+
nativeInit(nativePtr, surface, width, height, cacheDir, cacertPath, ionAccessToken, ionAssetId)
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
fun shutdown() = nativeShutdown(nativePtr)
|
|
@@ -98,7 +99,7 @@ class CesiumBridgeJNI {
|
|
|
98
99
|
fun setMinAltitudeAboveTerrain(v: Float) = nativeSetMinAltitudeAboveTerrain(nativePtr, v)
|
|
99
100
|
|
|
100
101
|
private external fun nativeCreate(): Long
|
|
101
|
-
private external fun nativeInit(ptr: Long, surface: Surface, w: Int, h: Int, cacheDir: String, cacertPath: String)
|
|
102
|
+
private external fun nativeInit(ptr: Long, surface: Surface, w: Int, h: Int, cacheDir: String, cacertPath: String, ionAccessToken: String, ionAssetId: Long)
|
|
102
103
|
private external fun nativeShutdown(ptr: Long)
|
|
103
104
|
private external fun nativeDestroy(ptr: Long)
|
|
104
105
|
private external fun nativeResize(ptr: Long, w: Int, h: Int)
|
|
@@ -286,7 +286,12 @@ class HybridCesiumView(private val appContext: Context) : HybridCesiumViewSpec()
|
|
|
286
286
|
val cacertPath = extractCacert()
|
|
287
287
|
rh.post {
|
|
288
288
|
val b = CesiumBridgeJNI()
|
|
289
|
-
|
|
289
|
+
// sqliteCacheMaxRows and taskProcessorThreads are consumed once inside
|
|
290
|
+
// CesiumEngine::initialize() (SqliteCache + TaskProcessor sizing).
|
|
291
|
+
// They must be seeded into config_ before init() calls buildEngine().
|
|
292
|
+
sqliteCacheMaxRows?.let { b.setSqliteCacheMaxRows(it.toInt()) }
|
|
293
|
+
taskProcessorThreads?.let { b.setTaskProcessorThreads(it.toInt()) }
|
|
294
|
+
b.init(surface, w, h, cacheDir, cacertPath, ionAccessToken, ionAssetId.toLong())
|
|
290
295
|
bridge = b
|
|
291
296
|
syncBridgePropsOnRenderThread(b)
|
|
292
297
|
|
|
@@ -313,12 +318,13 @@ class HybridCesiumView(private val appContext: Context) : HybridCesiumViewSpec()
|
|
|
313
318
|
b.setViewCorrection(q.w, q.x, q.y, q.z); pendingViewCorrection = null
|
|
314
319
|
}
|
|
315
320
|
|
|
321
|
+
// Ion credentials were seeded at init() time for parallel tileset
|
|
322
|
+
// fetch; call updateIonAccessToken here only as a hot-reload safety
|
|
323
|
+
// net in case the token changed between bridge teardown and rebuild.
|
|
316
324
|
if (ionAccessToken.isNotEmpty()) {
|
|
317
325
|
b.updateIonAccessToken(ionAccessToken, ionAssetId.toLong())
|
|
318
326
|
}
|
|
319
|
-
|
|
320
|
-
b.updateImageryAssetId(ionImageryAssetId.toLong())
|
|
321
|
-
}
|
|
327
|
+
b.updateImageryAssetId(ionImageryAssetId.toLong())
|
|
322
328
|
b.setMsaa(msaaSampleCount.toInt())
|
|
323
329
|
|
|
324
330
|
pushRateCaps()
|
|
@@ -510,8 +516,8 @@ class HybridCesiumView(private val appContext: Context) : HybridCesiumViewSpec()
|
|
|
510
516
|
culledScreenSpaceError?.let { b.setCulledScreenSpaceError(it) }
|
|
511
517
|
enableLodTransitionPeriod?.let { b.setEnableLodTransitionPeriod(it) }
|
|
512
518
|
lodTransitionLength?.let { b.setLodTransitionLength(it) }
|
|
513
|
-
sqliteCacheMaxRows
|
|
514
|
-
|
|
519
|
+
// sqliteCacheMaxRows and taskProcessorThreads are applied before init() in
|
|
520
|
+
// surfaceCreated; calling them here (after buildEngine) has no effect.
|
|
515
521
|
minAltitudeAboveTerrain?.let { b.setMinAltitudeAboveTerrain(it.toFloat()) }
|
|
516
522
|
}
|
|
517
523
|
|
package/ios/CesiumBridge.h
CHANGED
|
@@ -12,12 +12,17 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
12
12
|
/// Pass `ionAccessToken` and `ionAssetId` here so the engine can start the
|
|
13
13
|
/// async tileset.json network round-trip immediately, before Metal pipeline
|
|
14
14
|
/// compilation begins — letting the two operations overlap in time.
|
|
15
|
+
/// `sqliteCacheMaxRows` and `taskProcessorThreads` must also be provided here
|
|
16
|
+
/// because they are consumed once when the SqliteCache / TaskProcessor are
|
|
17
|
+
/// constructed inside `buildEngine`; setting them after init has no effect.
|
|
15
18
|
- (instancetype)initWithMetalLayer:(CAMetalLayer *)layer
|
|
16
19
|
width:(int)width
|
|
17
20
|
height:(int)height
|
|
18
21
|
cacheDir:(NSString *)cacheDir
|
|
19
22
|
ionAccessToken:(NSString *)token
|
|
20
|
-
ionAssetId:(int64_t)assetId
|
|
23
|
+
ionAssetId:(int64_t)assetId
|
|
24
|
+
sqliteCacheMaxRows:(int32_t)sqliteRows
|
|
25
|
+
taskProcessorThreads:(int32_t)threads;
|
|
21
26
|
|
|
22
27
|
- (void)updateIonAccessToken:(NSString *)token assetId:(int64_t)assetId;
|
|
23
28
|
- (void)updateImageryAssetId:(int64_t)assetId;
|
package/ios/CesiumBridge.mm
CHANGED
|
@@ -56,7 +56,9 @@
|
|
|
56
56
|
height:(int)height
|
|
57
57
|
cacheDir:(NSString *)cacheDir
|
|
58
58
|
ionAccessToken:(NSString *)token
|
|
59
|
-
ionAssetId:(int64_t)assetId
|
|
59
|
+
ionAssetId:(int64_t)assetId
|
|
60
|
+
sqliteCacheMaxRows:(int32_t)sqliteRows
|
|
61
|
+
taskProcessorThreads:(int32_t)threads {
|
|
60
62
|
self = [super init];
|
|
61
63
|
if (self) {
|
|
62
64
|
_viewportWidth = width;
|
|
@@ -90,6 +92,16 @@
|
|
|
90
92
|
_config.ionAssetId = assetId;
|
|
91
93
|
}
|
|
92
94
|
|
|
95
|
+
// These two params are consumed once inside CesiumEngine::initialize()
|
|
96
|
+
// (SqliteCache constructor and TaskProcessor thread-pool sizing). Setting
|
|
97
|
+
// them after buildEngine() has no effect, so they must be seeded here.
|
|
98
|
+
if (sqliteRows > 0) {
|
|
99
|
+
_config.sqliteCacheMaxRows = std::max<int32_t>(64, sqliteRows);
|
|
100
|
+
}
|
|
101
|
+
if (threads >= 0) {
|
|
102
|
+
_config.taskProcessorThreads = threads;
|
|
103
|
+
}
|
|
104
|
+
|
|
93
105
|
_metalBackend = std::make_unique<reactnativecesium::MetalBackend>();
|
|
94
106
|
|
|
95
107
|
// Start the async tileset.json fetch before Metal PSO compilation so both
|
|
@@ -381,7 +381,9 @@ class HybridCesiumView: HybridCesiumViewSpec {
|
|
|
381
381
|
height: Int32(h),
|
|
382
382
|
cacheDir: cacheDir,
|
|
383
383
|
ionAccessToken: ionAccessToken,
|
|
384
|
-
ionAssetId: Int64(ionAssetId)
|
|
384
|
+
ionAssetId: Int64(ionAssetId),
|
|
385
|
+
sqliteCacheMaxRows: Int32(sqliteCacheMaxRows ?? 0),
|
|
386
|
+
taskProcessorThreads: Int32(taskProcessorThreads ?? 0)
|
|
385
387
|
)
|
|
386
388
|
|
|
387
389
|
syncBridgeOptionsFromProps()
|
|
@@ -416,9 +418,7 @@ class HybridCesiumView: HybridCesiumViewSpec {
|
|
|
416
418
|
if let f = pendingVfov { bridge?.setVerticalFovDeg(f); pendingVfov = nil }
|
|
417
419
|
if let q = pendingViewCorrection { bridge?.setViewCorrectionW(q.w, x: q.x, y: q.y, z: q.z); pendingViewCorrection = nil }
|
|
418
420
|
|
|
419
|
-
|
|
420
|
-
bridge?.updateImageryAssetId(Int64(ionImageryAssetId))
|
|
421
|
-
}
|
|
421
|
+
bridge?.updateImageryAssetId(Int64(ionImageryAssetId))
|
|
422
422
|
|
|
423
423
|
let sc = Int32(msaaSampleCount)
|
|
424
424
|
bridge?.setMsaaSampleCount(sc)
|
|
@@ -457,8 +457,8 @@ class HybridCesiumView: HybridCesiumViewSpec {
|
|
|
457
457
|
if let v = culledScreenSpaceError { bridge?.setCulledScreenSpaceError(v) }
|
|
458
458
|
if let v = enableLodTransitionPeriod { bridge?.setEnableLodTransitionPeriod(v) }
|
|
459
459
|
if let v = lodTransitionLength { bridge?.setLodTransitionLength(v) }
|
|
460
|
-
|
|
461
|
-
|
|
460
|
+
// sqliteCacheMaxRows and taskProcessorThreads are applied at construction
|
|
461
|
+
// time via the CesiumBridge initializer; calling them here has no effect.
|
|
462
462
|
if let v = minAltitudeAboveTerrain { bridge?.setMinAltitudeAboveTerrain(Float(v)) }
|
|
463
463
|
}
|
|
464
464
|
|
|
@@ -57,7 +57,7 @@ export interface CesiumViewProps extends HybridViewProps {
|
|
|
57
57
|
preloadAncestors?: boolean;
|
|
58
58
|
/** Pre-load sibling tiles around the visible set. Default true. */
|
|
59
59
|
preloadSiblings?: boolean;
|
|
60
|
-
/** Refuse to render holes in the terrain. Default
|
|
60
|
+
/** Refuse to render holes in the terrain. Default false (matching Cesium Native). Relax for fast pans. */
|
|
61
61
|
forbidHoles?: boolean;
|
|
62
62
|
/** Decode water-mask textures (coastline shading). Default true. */
|
|
63
63
|
enableWaterMask?: boolean;
|
|
@@ -71,9 +71,17 @@ export interface CesiumViewProps extends HybridViewProps {
|
|
|
71
71
|
enableLodTransitionPeriod?: boolean;
|
|
72
72
|
/** Length (s) of the LOD cross-fade. Default 1. */
|
|
73
73
|
lodTransitionLength?: number;
|
|
74
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* Sqlite asset cache row budget. Default 4096.
|
|
76
|
+
* Must be set on initial mount — changes after the first render are ignored
|
|
77
|
+
* because the cache is opened once at engine construction time.
|
|
78
|
+
*/
|
|
75
79
|
sqliteCacheMaxRows?: number;
|
|
76
|
-
/**
|
|
80
|
+
/**
|
|
81
|
+
* Worker thread count. 0 = auto (hardware_concurrency-1, clamped 2..16).
|
|
82
|
+
* Must be set on initial mount — the thread pool is sized once at engine
|
|
83
|
+
* construction time and cannot be resized at runtime.
|
|
84
|
+
*/
|
|
77
85
|
taskProcessorThreads?: number;
|
|
78
86
|
/**
|
|
79
87
|
* Minimum altitude above the loaded terrain surface, in metres MSL.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cesium-view.nitro.d.ts","sourceRoot":"","sources":["../../../../src/specs/cesium-view.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,eAAe,EACf,iBAAiB,EAClB,MAAM,4BAA4B,CAAA;AAEnC;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,EAAE,MAAM,CAAA;CACvB;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV;AAED,iEAAiE;AACjE,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,aAAa,EAAE,MAAM,CAAA;IACrB,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,kBAAkB,EAAE,OAAO,CAAA;IAC3B,+DAA+D;IAC/D,aAAa,EAAE,OAAO,CAAA;IACtB,YAAY,EAAE,OAAO,CAAA;IACrB,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,cAAc,EAAE,MAAM,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,aAAa,EAAE,WAAW,CAAA;IAC1B,cAAc,EAAE,OAAO,CAAA;IACvB,uBAAuB,EAAE,MAAM,CAAA;IAC/B,4BAA4B,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AAM,EAAE,WAAW,KAAK,IAAI,CAAA;CAC/C;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D;;;;;OAKG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IAEtD,yDAAyD;IACzD,WAAW,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAEzC,qEAAqE;IACrE,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IAEpC;;;;OAIG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IAEpD;;;;OAIG;IACH,iBAAiB,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,CAAA;IAEtC,uEAAuE;IACvE,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAEjC;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAAA;IAEnC;;;;;OAKG;IACH,eAAe,IAAI,OAAO,CAAC,WAAW,CAAC,CAAA;IAEvC;;;;OAIG;IACH,eAAe,IAAI,OAAO,CAAC,WAAW,CAAC,CAAA;IAEvC,8EAA8E;IAC9E,iBAAiB,IAAI,OAAO,CAAC,UAAU,CAAC,CAAA;CACzC;AAED,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -61,13 +61,17 @@ export interface CesiumViewProps extends HybridViewProps {
|
|
|
61
61
|
ionImageryAssetId: number
|
|
62
62
|
|
|
63
63
|
// ── Optional perf / quality knobs ────────────────────────────────────────
|
|
64
|
+
// Note: all optional props below use "set once" semantics. Once a value has
|
|
65
|
+
// been applied to the native engine, removing the prop (returning it to
|
|
66
|
+
// `undefined`) does NOT revert the engine to its built-in default — the last
|
|
67
|
+
// explicitly set value is retained. To reset, pass the desired default value.
|
|
64
68
|
/** RAM budget for live tileset, in mebibytes. Default 256. */
|
|
65
69
|
maximumCachedMiB?: number
|
|
66
70
|
/** Pre-load ancestor tiles around the visible set (smoother panning, more loads). Default true. */
|
|
67
71
|
preloadAncestors?: boolean
|
|
68
72
|
/** Pre-load sibling tiles around the visible set. Default true. */
|
|
69
73
|
preloadSiblings?: boolean
|
|
70
|
-
/** Refuse to render holes in the terrain. Default
|
|
74
|
+
/** Refuse to render holes in the terrain. Default false (matching Cesium Native). Relax for fast pans. */
|
|
71
75
|
forbidHoles?: boolean
|
|
72
76
|
/** Decode water-mask textures (coastline shading). Default true. */
|
|
73
77
|
enableWaterMask?: boolean
|
|
@@ -81,9 +85,17 @@ export interface CesiumViewProps extends HybridViewProps {
|
|
|
81
85
|
enableLodTransitionPeriod?: boolean
|
|
82
86
|
/** Length (s) of the LOD cross-fade. Default 1. */
|
|
83
87
|
lodTransitionLength?: number
|
|
84
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* Sqlite asset cache row budget. Default 4096.
|
|
90
|
+
* Must be set on initial mount — changes after the first render are ignored
|
|
91
|
+
* because the cache is opened once at engine construction time.
|
|
92
|
+
*/
|
|
85
93
|
sqliteCacheMaxRows?: number
|
|
86
|
-
/**
|
|
94
|
+
/**
|
|
95
|
+
* Worker thread count. 0 = auto (hardware_concurrency-1, clamped 2..16).
|
|
96
|
+
* Must be set on initial mount — the thread pool is sized once at engine
|
|
97
|
+
* construction time and cannot be resized at runtime.
|
|
98
|
+
*/
|
|
87
99
|
taskProcessorThreads?: number
|
|
88
100
|
/**
|
|
89
101
|
* Minimum altitude above the loaded terrain surface, in metres MSL.
|
|
@@ -98,6 +110,8 @@ export interface CesiumViewProps extends HybridViewProps {
|
|
|
98
110
|
// angular / linear speed on the integrator's per-DoF velocity. Useful when
|
|
99
111
|
// your sensor feed is noisy and you would rather drop the change than
|
|
100
112
|
// visually whip the camera.
|
|
113
|
+
// Note: same "set once" semantics as the knobs above — removing the prop
|
|
114
|
+
// keeps the last value rather than reverting to 0 (uncapped).
|
|
101
115
|
/** Maximum yaw rate (degrees per second). 0 = uncapped. */
|
|
102
116
|
maxYawRateDegSec?: number
|
|
103
117
|
/** Maximum pitch rate (degrees per second). 0 = uncapped. */
|