react-native-cesium 1.2.18 → 1.2.20
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/README.md +11 -8
- package/android/CMakeLists.txt +1 -0
- package/android/build.gradle +1 -1
- package/android/gradle.properties +4 -4
- package/android/src/main/cpp/CesiumBridgeAndroid.cpp +44 -18
- package/android/src/main/cpp/CesiumBridgeAndroid.h +9 -0
- package/android/src/main/java/com/margelo/nitro/reactnativecesium/CesiumBridgeJNI.kt +3 -0
- package/android/src/main/java/com/margelo/nitro/reactnativecesium/HybridCesiumView.kt +9 -0
- package/cpp/engine/CameraIntegrator.cpp +82 -47
- package/cpp/engine/CameraIntegrator.hpp +27 -8
- package/cpp/engine/CesiumEngine.cpp +183 -312
- package/cpp/engine/CesiumEngine.hpp +41 -28
- package/cpp/engine/EngineTunables.hpp +6 -5
- package/cpp/engine/GeoidConverter.cpp +32 -11
- package/cpp/engine/GeoidConverter.hpp +41 -0
- package/cpp/engine/GltfToMesh.cpp +14 -5
- package/cpp/engine/ResourcePreparer.cpp +3 -3
- package/cpp/engine/ResourcePreparer.hpp +1 -1
- package/cpp/engine/TerrainFloor.hpp +70 -0
- package/cpp/engine/TerrainHeight.hpp +113 -0
- package/cpp/engine/test/CameraIntegratorTest.cpp +264 -0
- package/cpp/engine/test/GeoidConverterTest.cpp +77 -0
- package/cpp/engine/test/build_and_run.sh +20 -6
- package/ios/CesiumBridge.h +5 -0
- package/ios/CesiumBridge.mm +61 -32
- package/ios/HybridCesiumView.swift +11 -0
- package/lib/typescript/src/specs/cesium-view.nitro.d.ts +34 -9
- package/lib/typescript/src/specs/cesium-view.nitro.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JCameraState.hpp +1 -1
- package/nitrogen/generated/android/c++/JCesiumMetrics.hpp +1 -1
- package/nitrogen/generated/android/c++/JHybridCesiumViewSpec.cpp +9 -0
- package/nitrogen/generated/android/c++/JHybridCesiumViewSpec.hpp +2 -0
- package/nitrogen/generated/android/c++/JQuaternion.hpp +1 -1
- package/nitrogen/generated/android/c++/views/JHybridCesiumViewStateUpdater.cpp +182 -131
- package/nitrogen/generated/android/c++/views/JHybridCesiumViewStateUpdater.hpp +6 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativecesium/CameraState.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativecesium/CesiumMetrics.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativecesium/Func_void_CameraState.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativecesium/Func_void_CesiumMetrics.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativecesium/HybridCesiumViewSpec.kt +8 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativecesium/Quaternion.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativecesium/views/HybridCesiumViewManager.kt +26 -10
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativecesium/views/HybridCesiumViewStateUpdater.kt +2 -2
- package/nitrogen/generated/ios/ReactNativeCesium-Swift-Cxx-Bridge.hpp +15 -0
- package/nitrogen/generated/ios/c++/HybridCesiumViewSpecSwift.hpp +7 -0
- package/nitrogen/generated/ios/c++/views/HybridCesiumViewComponent.mm +217 -161
- package/nitrogen/generated/ios/swift/HybridCesiumViewSpec.swift +1 -0
- package/nitrogen/generated/ios/swift/HybridCesiumViewSpec_cxx.swift +24 -0
- package/nitrogen/generated/shared/c++/HybridCesiumViewSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridCesiumViewSpec.hpp +2 -0
- package/nitrogen/generated/shared/c++/views/HybridCesiumViewComponent.cpp +36 -335
- package/nitrogen/generated/shared/c++/views/HybridCesiumViewComponent.hpp +110 -77
- package/nitrogen/generated/shared/json/CesiumViewConfig.json +1 -0
- package/package.json +12 -12
- package/scripts/cesium/config.mjs +1 -1
- package/scripts/cesium/vcpkg-triplets/arm64-ios-simulator.cmake +3 -0
- package/scripts/cesium/vcpkg-triplets/arm64-ios.cmake +4 -0
- package/src/specs/cesium-view.nitro.ts +34 -9
|
@@ -6,6 +6,11 @@ import type { HybridView, HybridViewProps, HybridViewMethods } from 'react-nativ
|
|
|
6
6
|
export interface CameraState {
|
|
7
7
|
latitude: number;
|
|
8
8
|
longitude: number;
|
|
9
|
+
/**
|
|
10
|
+
* Metres. Mean sea level unless `altitudeDatum` is `"ellipsoid"`, in which
|
|
11
|
+
* case this is WGS84 ellipsoidal height. `getActualCamera`,
|
|
12
|
+
* `getDemandCamera`, and `onActualCamera` report altitude in that same unit.
|
|
13
|
+
*/
|
|
9
14
|
altitude: number;
|
|
10
15
|
heading: number;
|
|
11
16
|
pitch: number;
|
|
@@ -51,6 +56,16 @@ export interface CesiumViewProps extends HybridViewProps {
|
|
|
51
56
|
/** 1 = off; 2 or 4 = MSAA when supported. */
|
|
52
57
|
msaaSampleCount: number;
|
|
53
58
|
ionImageryAssetId: number;
|
|
59
|
+
/**
|
|
60
|
+
* Vertical datum of public altitude numbers, in both directions.
|
|
61
|
+
* `"msl"` (default) is metres above mean sea level.
|
|
62
|
+
* `"ellipsoid"` is WGS84 ellipsoidal height (Android `Location.getAltitude`).
|
|
63
|
+
* Ellipsoidal heights are converted to mean sea level with EGM96 before the
|
|
64
|
+
* camera integrator, and converted back on read. Switching this prop does
|
|
65
|
+
* not move the camera: later reads use the new unit, and the next
|
|
66
|
+
* `setAltitude`, `setPosition`, or `teleport` is interpreted in that unit.
|
|
67
|
+
*/
|
|
68
|
+
altitudeDatum?: string;
|
|
54
69
|
/** RAM budget for live tileset, in mebibytes. Default 256. */
|
|
55
70
|
maximumCachedMiB?: number;
|
|
56
71
|
/** Pre-load ancestor tiles around the visible set (smoother panning, more loads). Default true. */
|
|
@@ -84,12 +99,13 @@ export interface CesiumViewProps extends HybridViewProps {
|
|
|
84
99
|
*/
|
|
85
100
|
taskProcessorThreads?: number;
|
|
86
101
|
/**
|
|
87
|
-
*
|
|
88
|
-
* terrain
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
* (actual) camera
|
|
102
|
+
* Clearance above the rendered terrain surface, in metres, added on top of the
|
|
103
|
+
* terrain height at the camera position. The floor is always on. 0 means the
|
|
104
|
+
* camera may sit on the surface and may not go below it.
|
|
105
|
+
* Until a terrain tile has been sampled, the camera is held at or above the
|
|
106
|
+
* WGS84 ellipsoid. The demand altitude is not modified — only the rendered
|
|
107
|
+
* (actual) camera is held to this minimum, and it follows the surface down
|
|
108
|
+
* when the demand is at or below the floor.
|
|
93
109
|
*/
|
|
94
110
|
minAltitudeAboveTerrain?: number;
|
|
95
111
|
/** Maximum yaw rate (degrees per second). 0 = uncapped. */
|
|
@@ -131,9 +147,17 @@ export interface CesiumViewMethods extends HybridViewMethods {
|
|
|
131
147
|
* for GPS or scripted position updates. Latitude is clamped to ±90 by the
|
|
132
148
|
* integrator; longitude is continuous (no wrap normalisation) so the
|
|
133
149
|
* shortest-arc residual maths stays correct across the antimeridian.
|
|
150
|
+
* When `altitudeDatum` is `"ellipsoid"`, a horizontal move keeps the
|
|
151
|
+
* demanded ellipsoidal height and recomputes mean sea level at the new
|
|
152
|
+
* point. Mean-sea-level mode leaves altitude unchanged.
|
|
134
153
|
*/
|
|
135
154
|
setPosition(latitude: number, longitude: number): void;
|
|
136
|
-
/**
|
|
155
|
+
/**
|
|
156
|
+
* New altitude demand, in metres. Interpreted as mean sea level unless
|
|
157
|
+
* `altitudeDatum` is `"ellipsoid"`, in which case it is WGS84 height and
|
|
158
|
+
* converted to MSL before the integrator. A later read reports the same
|
|
159
|
+
* sample back in this unit.
|
|
160
|
+
*/
|
|
137
161
|
setAltitude(altitudeMeters: number): void;
|
|
138
162
|
/** New heading demand (degrees, 0 = north, increasing clockwise). */
|
|
139
163
|
setHeading(headingDeg: number): void;
|
|
@@ -162,13 +186,14 @@ export interface CesiumViewMethods extends HybridViewMethods {
|
|
|
162
186
|
* Most recent camera that was rendered (post-integration). This is what
|
|
163
187
|
* the user is currently looking at and is what a HUD overlay should
|
|
164
188
|
* mirror. Differs from `getDemandCamera()` while a glide is in progress
|
|
165
|
-
* or when the terrain-floor clamp has raised the altitude.
|
|
189
|
+
* or when the terrain-floor clamp has raised the altitude. Altitude is in
|
|
190
|
+
* the unit selected by `altitudeDatum`.
|
|
166
191
|
*/
|
|
167
192
|
getActualCamera(): Promise<CameraState>;
|
|
168
193
|
/**
|
|
169
194
|
* What the consumer last asked for (per-DoF demand). Useful for
|
|
170
195
|
* diagnostics or for showing the requested camera alongside the rendered
|
|
171
|
-
* one.
|
|
196
|
+
* one. Altitude is in the unit selected by `altitudeDatum`.
|
|
172
197
|
*/
|
|
173
198
|
getDemandCamera(): Promise<CameraState>;
|
|
174
199
|
/** Current view-correction quaternion (smoothed toward the latest demand). */
|
|
@@ -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,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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"}
|
|
@@ -17,7 +17,7 @@ namespace margelo::nitro::reactnativecesium {
|
|
|
17
17
|
using namespace facebook;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The C++ JNI bridge between the C++ struct "CameraState" and the
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "CameraState" and the Kotlin data class "CameraState".
|
|
21
21
|
*/
|
|
22
22
|
struct JCameraState final: public jni::JavaClass<JCameraState> {
|
|
23
23
|
public:
|
|
@@ -17,7 +17,7 @@ namespace margelo::nitro::reactnativecesium {
|
|
|
17
17
|
using namespace facebook;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The C++ JNI bridge between the C++ struct "CesiumMetrics" and the
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "CesiumMetrics" and the Kotlin data class "CesiumMetrics".
|
|
21
21
|
*/
|
|
22
22
|
struct JCesiumMetrics final: public jni::JavaClass<JCesiumMetrics> {
|
|
23
23
|
public:
|
|
@@ -140,6 +140,15 @@ namespace margelo::nitro::reactnativecesium {
|
|
|
140
140
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /* ionImageryAssetId */)>("setIonImageryAssetId");
|
|
141
141
|
method(_javaPart, ionImageryAssetId);
|
|
142
142
|
}
|
|
143
|
+
std::optional<std::string> JHybridCesiumViewSpec::getAltitudeDatum() {
|
|
144
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getAltitudeDatum");
|
|
145
|
+
auto __result = method(_javaPart);
|
|
146
|
+
return __result != nullptr ? std::make_optional(__result->toStdString()) : std::nullopt;
|
|
147
|
+
}
|
|
148
|
+
void JHybridCesiumViewSpec::setAltitudeDatum(const std::optional<std::string>& altitudeDatum) {
|
|
149
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* altitudeDatum */)>("setAltitudeDatum");
|
|
150
|
+
method(_javaPart, altitudeDatum.has_value() ? jni::make_jstring(altitudeDatum.value()) : nullptr);
|
|
151
|
+
}
|
|
143
152
|
std::optional<double> JHybridCesiumViewSpec::getMaximumCachedMiB() {
|
|
144
153
|
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JDouble>()>("getMaximumCachedMiB");
|
|
145
154
|
auto __result = method(_javaPart);
|
|
@@ -68,6 +68,8 @@ namespace margelo::nitro::reactnativecesium {
|
|
|
68
68
|
void setMsaaSampleCount(double msaaSampleCount) override;
|
|
69
69
|
double getIonImageryAssetId() override;
|
|
70
70
|
void setIonImageryAssetId(double ionImageryAssetId) override;
|
|
71
|
+
std::optional<std::string> getAltitudeDatum() override;
|
|
72
|
+
void setAltitudeDatum(const std::optional<std::string>& altitudeDatum) override;
|
|
71
73
|
std::optional<double> getMaximumCachedMiB() override;
|
|
72
74
|
void setMaximumCachedMiB(std::optional<double> maximumCachedMiB) override;
|
|
73
75
|
std::optional<bool> getPreloadAncestors() override;
|
|
@@ -17,7 +17,7 @@ namespace margelo::nitro::reactnativecesium {
|
|
|
17
17
|
using namespace facebook;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The C++ JNI bridge between the C++ struct "Quaternion" and the
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "Quaternion" and the Kotlin data class "Quaternion".
|
|
21
21
|
*/
|
|
22
22
|
struct JQuaternion final: public jni::JavaClass<JQuaternion> {
|
|
23
23
|
public:
|
|
@@ -15,153 +15,204 @@ namespace margelo::nitro::reactnativecesium::views {
|
|
|
15
15
|
using namespace facebook;
|
|
16
16
|
using ConcreteStateData = react::ConcreteState<HybridCesiumViewState>;
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
std::shared_ptr<const HybridCesiumViewProps> JHybridCesiumViewStateUpdater::getPropsFromStateWrapper(
|
|
19
|
+
jni::alias_ref<JStateWrapper::javaobject> stateWrapper) {
|
|
20
|
+
if (stateWrapper.get() == nullptr) {
|
|
21
|
+
return nullptr;
|
|
22
|
+
}
|
|
23
23
|
// Get concrete StateWrapperImpl from passed StateWrapper interface object
|
|
24
|
-
jobject rawStateWrapper =
|
|
25
|
-
if (!
|
|
26
|
-
|
|
24
|
+
jobject rawStateWrapper = stateWrapper.get();
|
|
25
|
+
if (!stateWrapper->isInstanceOf(react::StateWrapperImpl::javaClassStatic())) [[unlikely]] {
|
|
26
|
+
throw std::runtime_error("StateWrapper is not a StateWrapperImpl");
|
|
27
|
+
}
|
|
28
|
+
auto stateWrapperImpl = jni::alias_ref<react::StateWrapperImpl::javaobject>{
|
|
29
|
+
static_cast<react::StateWrapperImpl::javaobject>(rawStateWrapper)
|
|
30
|
+
};
|
|
31
|
+
std::shared_ptr<const react::State> state = stateWrapperImpl->cthis()->getState();
|
|
32
|
+
if (state == nullptr) {
|
|
33
|
+
return nullptr;
|
|
27
34
|
}
|
|
28
|
-
auto stateWrapper = jni::alias_ref<react::StateWrapperImpl::javaobject>{
|
|
29
|
-
static_cast<react::StateWrapperImpl::javaobject>(rawStateWrapper)};
|
|
30
|
-
std::shared_ptr<const react::State> state = stateWrapper->cthis()->getState();
|
|
31
35
|
auto concreteState = std::static_pointer_cast<const ConcreteStateData>(state);
|
|
32
36
|
const HybridCesiumViewState& data = concreteState->getData();
|
|
33
|
-
const std::shared_ptr<HybridCesiumViewProps>& props = data.getProps();
|
|
37
|
+
const std::shared_ptr<const HybridCesiumViewProps>& props = data.getProps();
|
|
34
38
|
if (props == nullptr) [[unlikely]] {
|
|
35
|
-
// Props aren't set yet!
|
|
36
39
|
throw std::runtime_error("HybridCesiumViewState's data doesn't contain any props!");
|
|
37
40
|
}
|
|
41
|
+
return props;
|
|
42
|
+
}
|
|
38
43
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
if (props->initialCamera.isDirty) {
|
|
49
|
-
hybridView->setInitialCamera(props->initialCamera.value);
|
|
50
|
-
props->initialCamera.isDirty = false;
|
|
51
|
-
}
|
|
52
|
-
if (props->pauseRendering.isDirty) {
|
|
53
|
-
hybridView->setPauseRendering(props->pauseRendering.value);
|
|
54
|
-
props->pauseRendering.isDirty = false;
|
|
55
|
-
}
|
|
56
|
-
if (props->maximumScreenSpaceError.isDirty) {
|
|
57
|
-
hybridView->setMaximumScreenSpaceError(props->maximumScreenSpaceError.value);
|
|
58
|
-
props->maximumScreenSpaceError.isDirty = false;
|
|
59
|
-
}
|
|
60
|
-
if (props->maximumSimultaneousTileLoads.isDirty) {
|
|
61
|
-
hybridView->setMaximumSimultaneousTileLoads(props->maximumSimultaneousTileLoads.value);
|
|
62
|
-
props->maximumSimultaneousTileLoads.isDirty = false;
|
|
63
|
-
}
|
|
64
|
-
if (props->loadingDescendantLimit.isDirty) {
|
|
65
|
-
hybridView->setLoadingDescendantLimit(props->loadingDescendantLimit.value);
|
|
66
|
-
props->loadingDescendantLimit.isDirty = false;
|
|
67
|
-
}
|
|
68
|
-
if (props->msaaSampleCount.isDirty) {
|
|
69
|
-
hybridView->setMsaaSampleCount(props->msaaSampleCount.value);
|
|
70
|
-
props->msaaSampleCount.isDirty = false;
|
|
71
|
-
}
|
|
72
|
-
if (props->ionImageryAssetId.isDirty) {
|
|
73
|
-
hybridView->setIonImageryAssetId(props->ionImageryAssetId.value);
|
|
74
|
-
props->ionImageryAssetId.isDirty = false;
|
|
75
|
-
}
|
|
76
|
-
if (props->maximumCachedMiB.isDirty) {
|
|
77
|
-
hybridView->setMaximumCachedMiB(props->maximumCachedMiB.value);
|
|
78
|
-
props->maximumCachedMiB.isDirty = false;
|
|
79
|
-
}
|
|
80
|
-
if (props->preloadAncestors.isDirty) {
|
|
81
|
-
hybridView->setPreloadAncestors(props->preloadAncestors.value);
|
|
82
|
-
props->preloadAncestors.isDirty = false;
|
|
83
|
-
}
|
|
84
|
-
if (props->preloadSiblings.isDirty) {
|
|
85
|
-
hybridView->setPreloadSiblings(props->preloadSiblings.value);
|
|
86
|
-
props->preloadSiblings.isDirty = false;
|
|
87
|
-
}
|
|
88
|
-
if (props->forbidHoles.isDirty) {
|
|
89
|
-
hybridView->setForbidHoles(props->forbidHoles.value);
|
|
90
|
-
props->forbidHoles.isDirty = false;
|
|
91
|
-
}
|
|
92
|
-
if (props->enableWaterMask.isDirty) {
|
|
93
|
-
hybridView->setEnableWaterMask(props->enableWaterMask.value);
|
|
94
|
-
props->enableWaterMask.isDirty = false;
|
|
95
|
-
}
|
|
96
|
-
if (props->enableFogCulling.isDirty) {
|
|
97
|
-
hybridView->setEnableFogCulling(props->enableFogCulling.value);
|
|
98
|
-
props->enableFogCulling.isDirty = false;
|
|
99
|
-
}
|
|
100
|
-
if (props->enforceCulledScreenSpaceError.isDirty) {
|
|
101
|
-
hybridView->setEnforceCulledScreenSpaceError(props->enforceCulledScreenSpaceError.value);
|
|
102
|
-
props->enforceCulledScreenSpaceError.isDirty = false;
|
|
103
|
-
}
|
|
104
|
-
if (props->culledScreenSpaceError.isDirty) {
|
|
105
|
-
hybridView->setCulledScreenSpaceError(props->culledScreenSpaceError.value);
|
|
106
|
-
props->culledScreenSpaceError.isDirty = false;
|
|
107
|
-
}
|
|
108
|
-
if (props->enableLodTransitionPeriod.isDirty) {
|
|
109
|
-
hybridView->setEnableLodTransitionPeriod(props->enableLodTransitionPeriod.value);
|
|
110
|
-
props->enableLodTransitionPeriod.isDirty = false;
|
|
111
|
-
}
|
|
112
|
-
if (props->lodTransitionLength.isDirty) {
|
|
113
|
-
hybridView->setLodTransitionLength(props->lodTransitionLength.value);
|
|
114
|
-
props->lodTransitionLength.isDirty = false;
|
|
115
|
-
}
|
|
116
|
-
if (props->sqliteCacheMaxRows.isDirty) {
|
|
117
|
-
hybridView->setSqliteCacheMaxRows(props->sqliteCacheMaxRows.value);
|
|
118
|
-
props->sqliteCacheMaxRows.isDirty = false;
|
|
119
|
-
}
|
|
120
|
-
if (props->taskProcessorThreads.isDirty) {
|
|
121
|
-
hybridView->setTaskProcessorThreads(props->taskProcessorThreads.value);
|
|
122
|
-
props->taskProcessorThreads.isDirty = false;
|
|
123
|
-
}
|
|
124
|
-
if (props->minAltitudeAboveTerrain.isDirty) {
|
|
125
|
-
hybridView->setMinAltitudeAboveTerrain(props->minAltitudeAboveTerrain.value);
|
|
126
|
-
props->minAltitudeAboveTerrain.isDirty = false;
|
|
127
|
-
}
|
|
128
|
-
if (props->maxYawRateDegSec.isDirty) {
|
|
129
|
-
hybridView->setMaxYawRateDegSec(props->maxYawRateDegSec.value);
|
|
130
|
-
props->maxYawRateDegSec.isDirty = false;
|
|
131
|
-
}
|
|
132
|
-
if (props->maxPitchRateDegSec.isDirty) {
|
|
133
|
-
hybridView->setMaxPitchRateDegSec(props->maxPitchRateDegSec.value);
|
|
134
|
-
props->maxPitchRateDegSec.isDirty = false;
|
|
135
|
-
}
|
|
136
|
-
if (props->maxRollRateDegSec.isDirty) {
|
|
137
|
-
hybridView->setMaxRollRateDegSec(props->maxRollRateDegSec.value);
|
|
138
|
-
props->maxRollRateDegSec.isDirty = false;
|
|
139
|
-
}
|
|
140
|
-
if (props->maxClimbRateMps.isDirty) {
|
|
141
|
-
hybridView->setMaxClimbRateMps(props->maxClimbRateMps.value);
|
|
142
|
-
props->maxClimbRateMps.isDirty = false;
|
|
143
|
-
}
|
|
144
|
-
if (props->maxGroundSpeedMps.isDirty) {
|
|
145
|
-
hybridView->setMaxGroundSpeedMps(props->maxGroundSpeedMps.value);
|
|
146
|
-
props->maxGroundSpeedMps.isDirty = false;
|
|
147
|
-
}
|
|
148
|
-
if (props->onMetrics.isDirty) {
|
|
149
|
-
hybridView->setOnMetrics(props->onMetrics.value);
|
|
150
|
-
props->onMetrics.isDirty = false;
|
|
44
|
+
void JHybridCesiumViewStateUpdater::updateViewProps(jni::alias_ref<jni::JClass> /* class */,
|
|
45
|
+
jni::alias_ref<JHybridCesiumViewSpec::JavaPart> javaView,
|
|
46
|
+
jni::alias_ref<JStateWrapper::javaobject> newState,
|
|
47
|
+
jni::alias_ref<JStateWrapper::javaobject> oldState) {
|
|
48
|
+
std::shared_ptr<JHybridCesiumViewSpec> hybridView = javaView->getJHybridCesiumViewSpec();
|
|
49
|
+
std::shared_ptr<const HybridCesiumViewProps> newProps = getPropsFromStateWrapper(newState);
|
|
50
|
+
std::shared_ptr<const HybridCesiumViewProps> oldProps = getPropsFromStateWrapper(oldState);
|
|
51
|
+
if (newProps == nullptr) [[unlikely]] {
|
|
52
|
+
throw std::runtime_error("Current StateWrapper doesn't contain any props!");
|
|
151
53
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
54
|
+
|
|
55
|
+
// Update only props that differ from the previous State snapshot.
|
|
56
|
+
if (oldProps == nullptr
|
|
57
|
+
? newProps->ionAccessToken.isProvided()
|
|
58
|
+
: !newProps->ionAccessToken.hasSameValue(oldProps->ionAccessToken)) {
|
|
59
|
+
hybridView->setIonAccessToken(newProps->ionAccessToken.get());
|
|
60
|
+
}
|
|
61
|
+
if (oldProps == nullptr
|
|
62
|
+
? newProps->ionAssetId.isProvided()
|
|
63
|
+
: !newProps->ionAssetId.hasSameValue(oldProps->ionAssetId)) {
|
|
64
|
+
hybridView->setIonAssetId(newProps->ionAssetId.get());
|
|
65
|
+
}
|
|
66
|
+
if (oldProps == nullptr
|
|
67
|
+
? newProps->initialCamera.isProvided()
|
|
68
|
+
: !newProps->initialCamera.hasSameValue(oldProps->initialCamera)) {
|
|
69
|
+
hybridView->setInitialCamera(newProps->initialCamera.get());
|
|
70
|
+
}
|
|
71
|
+
if (oldProps == nullptr
|
|
72
|
+
? newProps->pauseRendering.isProvided()
|
|
73
|
+
: !newProps->pauseRendering.hasSameValue(oldProps->pauseRendering)) {
|
|
74
|
+
hybridView->setPauseRendering(newProps->pauseRendering.get());
|
|
75
|
+
}
|
|
76
|
+
if (oldProps == nullptr
|
|
77
|
+
? newProps->maximumScreenSpaceError.isProvided()
|
|
78
|
+
: !newProps->maximumScreenSpaceError.hasSameValue(oldProps->maximumScreenSpaceError)) {
|
|
79
|
+
hybridView->setMaximumScreenSpaceError(newProps->maximumScreenSpaceError.get());
|
|
80
|
+
}
|
|
81
|
+
if (oldProps == nullptr
|
|
82
|
+
? newProps->maximumSimultaneousTileLoads.isProvided()
|
|
83
|
+
: !newProps->maximumSimultaneousTileLoads.hasSameValue(oldProps->maximumSimultaneousTileLoads)) {
|
|
84
|
+
hybridView->setMaximumSimultaneousTileLoads(newProps->maximumSimultaneousTileLoads.get());
|
|
85
|
+
}
|
|
86
|
+
if (oldProps == nullptr
|
|
87
|
+
? newProps->loadingDescendantLimit.isProvided()
|
|
88
|
+
: !newProps->loadingDescendantLimit.hasSameValue(oldProps->loadingDescendantLimit)) {
|
|
89
|
+
hybridView->setLoadingDescendantLimit(newProps->loadingDescendantLimit.get());
|
|
90
|
+
}
|
|
91
|
+
if (oldProps == nullptr
|
|
92
|
+
? newProps->msaaSampleCount.isProvided()
|
|
93
|
+
: !newProps->msaaSampleCount.hasSameValue(oldProps->msaaSampleCount)) {
|
|
94
|
+
hybridView->setMsaaSampleCount(newProps->msaaSampleCount.get());
|
|
95
|
+
}
|
|
96
|
+
if (oldProps == nullptr
|
|
97
|
+
? newProps->ionImageryAssetId.isProvided()
|
|
98
|
+
: !newProps->ionImageryAssetId.hasSameValue(oldProps->ionImageryAssetId)) {
|
|
99
|
+
hybridView->setIonImageryAssetId(newProps->ionImageryAssetId.get());
|
|
100
|
+
}
|
|
101
|
+
if (oldProps == nullptr
|
|
102
|
+
? newProps->altitudeDatum.isProvided()
|
|
103
|
+
: !newProps->altitudeDatum.hasSameValue(oldProps->altitudeDatum)) {
|
|
104
|
+
hybridView->setAltitudeDatum(newProps->altitudeDatum.get());
|
|
105
|
+
}
|
|
106
|
+
if (oldProps == nullptr
|
|
107
|
+
? newProps->maximumCachedMiB.isProvided()
|
|
108
|
+
: !newProps->maximumCachedMiB.hasSameValue(oldProps->maximumCachedMiB)) {
|
|
109
|
+
hybridView->setMaximumCachedMiB(newProps->maximumCachedMiB.get());
|
|
110
|
+
}
|
|
111
|
+
if (oldProps == nullptr
|
|
112
|
+
? newProps->preloadAncestors.isProvided()
|
|
113
|
+
: !newProps->preloadAncestors.hasSameValue(oldProps->preloadAncestors)) {
|
|
114
|
+
hybridView->setPreloadAncestors(newProps->preloadAncestors.get());
|
|
115
|
+
}
|
|
116
|
+
if (oldProps == nullptr
|
|
117
|
+
? newProps->preloadSiblings.isProvided()
|
|
118
|
+
: !newProps->preloadSiblings.hasSameValue(oldProps->preloadSiblings)) {
|
|
119
|
+
hybridView->setPreloadSiblings(newProps->preloadSiblings.get());
|
|
120
|
+
}
|
|
121
|
+
if (oldProps == nullptr
|
|
122
|
+
? newProps->forbidHoles.isProvided()
|
|
123
|
+
: !newProps->forbidHoles.hasSameValue(oldProps->forbidHoles)) {
|
|
124
|
+
hybridView->setForbidHoles(newProps->forbidHoles.get());
|
|
125
|
+
}
|
|
126
|
+
if (oldProps == nullptr
|
|
127
|
+
? newProps->enableWaterMask.isProvided()
|
|
128
|
+
: !newProps->enableWaterMask.hasSameValue(oldProps->enableWaterMask)) {
|
|
129
|
+
hybridView->setEnableWaterMask(newProps->enableWaterMask.get());
|
|
130
|
+
}
|
|
131
|
+
if (oldProps == nullptr
|
|
132
|
+
? newProps->enableFogCulling.isProvided()
|
|
133
|
+
: !newProps->enableFogCulling.hasSameValue(oldProps->enableFogCulling)) {
|
|
134
|
+
hybridView->setEnableFogCulling(newProps->enableFogCulling.get());
|
|
135
|
+
}
|
|
136
|
+
if (oldProps == nullptr
|
|
137
|
+
? newProps->enforceCulledScreenSpaceError.isProvided()
|
|
138
|
+
: !newProps->enforceCulledScreenSpaceError.hasSameValue(oldProps->enforceCulledScreenSpaceError)) {
|
|
139
|
+
hybridView->setEnforceCulledScreenSpaceError(newProps->enforceCulledScreenSpaceError.get());
|
|
140
|
+
}
|
|
141
|
+
if (oldProps == nullptr
|
|
142
|
+
? newProps->culledScreenSpaceError.isProvided()
|
|
143
|
+
: !newProps->culledScreenSpaceError.hasSameValue(oldProps->culledScreenSpaceError)) {
|
|
144
|
+
hybridView->setCulledScreenSpaceError(newProps->culledScreenSpaceError.get());
|
|
145
|
+
}
|
|
146
|
+
if (oldProps == nullptr
|
|
147
|
+
? newProps->enableLodTransitionPeriod.isProvided()
|
|
148
|
+
: !newProps->enableLodTransitionPeriod.hasSameValue(oldProps->enableLodTransitionPeriod)) {
|
|
149
|
+
hybridView->setEnableLodTransitionPeriod(newProps->enableLodTransitionPeriod.get());
|
|
150
|
+
}
|
|
151
|
+
if (oldProps == nullptr
|
|
152
|
+
? newProps->lodTransitionLength.isProvided()
|
|
153
|
+
: !newProps->lodTransitionLength.hasSameValue(oldProps->lodTransitionLength)) {
|
|
154
|
+
hybridView->setLodTransitionLength(newProps->lodTransitionLength.get());
|
|
155
|
+
}
|
|
156
|
+
if (oldProps == nullptr
|
|
157
|
+
? newProps->sqliteCacheMaxRows.isProvided()
|
|
158
|
+
: !newProps->sqliteCacheMaxRows.hasSameValue(oldProps->sqliteCacheMaxRows)) {
|
|
159
|
+
hybridView->setSqliteCacheMaxRows(newProps->sqliteCacheMaxRows.get());
|
|
160
|
+
}
|
|
161
|
+
if (oldProps == nullptr
|
|
162
|
+
? newProps->taskProcessorThreads.isProvided()
|
|
163
|
+
: !newProps->taskProcessorThreads.hasSameValue(oldProps->taskProcessorThreads)) {
|
|
164
|
+
hybridView->setTaskProcessorThreads(newProps->taskProcessorThreads.get());
|
|
165
|
+
}
|
|
166
|
+
if (oldProps == nullptr
|
|
167
|
+
? newProps->minAltitudeAboveTerrain.isProvided()
|
|
168
|
+
: !newProps->minAltitudeAboveTerrain.hasSameValue(oldProps->minAltitudeAboveTerrain)) {
|
|
169
|
+
hybridView->setMinAltitudeAboveTerrain(newProps->minAltitudeAboveTerrain.get());
|
|
170
|
+
}
|
|
171
|
+
if (oldProps == nullptr
|
|
172
|
+
? newProps->maxYawRateDegSec.isProvided()
|
|
173
|
+
: !newProps->maxYawRateDegSec.hasSameValue(oldProps->maxYawRateDegSec)) {
|
|
174
|
+
hybridView->setMaxYawRateDegSec(newProps->maxYawRateDegSec.get());
|
|
175
|
+
}
|
|
176
|
+
if (oldProps == nullptr
|
|
177
|
+
? newProps->maxPitchRateDegSec.isProvided()
|
|
178
|
+
: !newProps->maxPitchRateDegSec.hasSameValue(oldProps->maxPitchRateDegSec)) {
|
|
179
|
+
hybridView->setMaxPitchRateDegSec(newProps->maxPitchRateDegSec.get());
|
|
180
|
+
}
|
|
181
|
+
if (oldProps == nullptr
|
|
182
|
+
? newProps->maxRollRateDegSec.isProvided()
|
|
183
|
+
: !newProps->maxRollRateDegSec.hasSameValue(oldProps->maxRollRateDegSec)) {
|
|
184
|
+
hybridView->setMaxRollRateDegSec(newProps->maxRollRateDegSec.get());
|
|
185
|
+
}
|
|
186
|
+
if (oldProps == nullptr
|
|
187
|
+
? newProps->maxClimbRateMps.isProvided()
|
|
188
|
+
: !newProps->maxClimbRateMps.hasSameValue(oldProps->maxClimbRateMps)) {
|
|
189
|
+
hybridView->setMaxClimbRateMps(newProps->maxClimbRateMps.get());
|
|
190
|
+
}
|
|
191
|
+
if (oldProps == nullptr
|
|
192
|
+
? newProps->maxGroundSpeedMps.isProvided()
|
|
193
|
+
: !newProps->maxGroundSpeedMps.hasSameValue(oldProps->maxGroundSpeedMps)) {
|
|
194
|
+
hybridView->setMaxGroundSpeedMps(newProps->maxGroundSpeedMps.get());
|
|
195
|
+
}
|
|
196
|
+
if (oldProps == nullptr
|
|
197
|
+
? newProps->onMetrics.isProvided()
|
|
198
|
+
: !newProps->onMetrics.hasSameValue(oldProps->onMetrics)) {
|
|
199
|
+
hybridView->setOnMetrics(newProps->onMetrics.get());
|
|
200
|
+
}
|
|
201
|
+
if (oldProps == nullptr
|
|
202
|
+
? newProps->onActualCamera.isProvided()
|
|
203
|
+
: !newProps->onActualCamera.hasSameValue(oldProps->onActualCamera)) {
|
|
204
|
+
hybridView->setOnActualCamera(newProps->onActualCamera.get());
|
|
155
205
|
}
|
|
156
206
|
|
|
157
207
|
// Update hybridRef if it changed
|
|
158
|
-
if (
|
|
208
|
+
if (oldProps == nullptr
|
|
209
|
+
? newProps->hybridRef.isProvided()
|
|
210
|
+
: !newProps->hybridRef.hasSameValue(oldProps->hybridRef)) {
|
|
159
211
|
// hybridRef changed - call it with new this
|
|
160
|
-
const auto& maybeFunc =
|
|
212
|
+
const auto& maybeFunc = newProps->hybridRef.get();
|
|
161
213
|
if (maybeFunc.has_value()) {
|
|
162
214
|
maybeFunc.value()(hybridView);
|
|
163
215
|
}
|
|
164
|
-
props->hybridRef.isDirty = false;
|
|
165
216
|
}
|
|
166
217
|
}
|
|
167
218
|
|
|
@@ -31,7 +31,12 @@ public:
|
|
|
31
31
|
public:
|
|
32
32
|
static void updateViewProps(jni::alias_ref<jni::JClass> /* class */,
|
|
33
33
|
jni::alias_ref<JHybridCesiumViewSpec::JavaPart> view,
|
|
34
|
-
jni::alias_ref<JStateWrapper::javaobject>
|
|
34
|
+
jni::alias_ref<JStateWrapper::javaobject> newState,
|
|
35
|
+
jni::alias_ref<JStateWrapper::javaobject> oldState);
|
|
36
|
+
|
|
37
|
+
private:
|
|
38
|
+
static std::shared_ptr<const HybridCesiumViewProps> getPropsFromStateWrapper(
|
|
39
|
+
jni::alias_ref<JStateWrapper::javaobject> stateWrapper);
|
|
35
40
|
|
|
36
41
|
public:
|
|
37
42
|
static void registerNatives() {
|
|
@@ -10,7 +10,6 @@ package com.margelo.nitro.reactnativecesium
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.jni.HybridData
|
|
12
12
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
-
import dalvik.annotation.optimization.FastNative
|
|
14
13
|
|
|
15
14
|
|
|
16
15
|
/**
|
|
@@ -59,7 +58,6 @@ class Func_void_CameraState_cxx: Func_void_CameraState {
|
|
|
59
58
|
override fun invoke(camera: CameraState): Unit
|
|
60
59
|
= invoke_cxx(camera)
|
|
61
60
|
|
|
62
|
-
@FastNative
|
|
63
61
|
private external fun invoke_cxx(camera: CameraState): Unit
|
|
64
62
|
}
|
|
65
63
|
|
|
@@ -10,7 +10,6 @@ package com.margelo.nitro.reactnativecesium
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.jni.HybridData
|
|
12
12
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
-
import dalvik.annotation.optimization.FastNative
|
|
14
13
|
|
|
15
14
|
|
|
16
15
|
/**
|
|
@@ -59,7 +58,6 @@ class Func_void_CesiumMetrics_cxx: Func_void_CesiumMetrics {
|
|
|
59
58
|
override fun invoke(metrics: CesiumMetrics): Unit
|
|
60
59
|
= invoke_cxx(metrics)
|
|
61
60
|
|
|
62
|
-
@FastNative
|
|
63
61
|
private external fun invoke_cxx(metrics: CesiumMetrics): Unit
|
|
64
62
|
}
|
|
65
63
|
|
|
@@ -10,6 +10,7 @@ package com.margelo.nitro.reactnativecesium
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.jni.HybridData
|
|
12
12
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
+
import dalvik.annotation.optimization.FastNative
|
|
13
14
|
import com.margelo.nitro.core.Promise
|
|
14
15
|
import com.margelo.nitro.core.HybridObject
|
|
15
16
|
import com.margelo.nitro.views.HybridView
|
|
@@ -81,6 +82,12 @@ abstract class HybridCesiumViewSpec: HybridView() {
|
|
|
81
82
|
@set:Keep
|
|
82
83
|
abstract var ionImageryAssetId: Double
|
|
83
84
|
|
|
85
|
+
@get:DoNotStrip
|
|
86
|
+
@get:Keep
|
|
87
|
+
@set:DoNotStrip
|
|
88
|
+
@set:Keep
|
|
89
|
+
abstract var altitudeDatum: String?
|
|
90
|
+
|
|
84
91
|
@get:DoNotStrip
|
|
85
92
|
@get:Keep
|
|
86
93
|
@set:DoNotStrip
|
|
@@ -268,6 +275,7 @@ abstract class HybridCesiumViewSpec: HybridView() {
|
|
|
268
275
|
@Keep
|
|
269
276
|
protected open class CxxPart(javaPart: HybridCesiumViewSpec): HybridObject.CxxPart(javaPart) {
|
|
270
277
|
// C++ JHybridCesiumViewSpec::CxxPart::initHybrid(...)
|
|
278
|
+
@FastNative
|
|
271
279
|
external override fun initHybrid(): HybridData
|
|
272
280
|
}
|
|
273
281
|
override fun createCxxPart(): CxxPart {
|