@sceneview-sdk/react-native 4.18.0 → 4.19.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.
@@ -110,20 +110,25 @@ class SceneViewManager : SimpleViewManager<FrameLayout>() {
110
110
  position = Position(y = 0f, z = 3.0f)
111
111
  }
112
112
 
113
- val environment = state.environmentPath.value?.let { path ->
114
- // Rebuild the Environment when `path` switches between two non-null HDRs, else the
115
- // skybox/IBL freezes on the first one (#2361, same class as #2353): the factory
116
- // lambda alone is a stable remember key. Uses Compose key {} rather than
117
- // rememberEnvironment's own key= param because this bridge compiles against the
118
- // published Maven artifact (sceneview:4.7.0) that predates key=. key {} replaces
119
- // the group on a new path, disposing the old Environment via its DisposableEffect.
120
- // TODO(#2361): migrate to rememberEnvironment(..., key = path) once this bridge
121
- // consumes a SceneView release that includes the public key= param.
122
- key(path) {
123
- rememberEnvironment(environmentLoader) {
113
+ // Single, stable environment call site (issue #2365): compute exactly one
114
+ // non-null Environment rather than branching between a keyed HDR call and a
115
+ // separate `environment ?: rememberEnvironment(...)` fallback at the SceneView
116
+ // argument. The `path` is the remember key, so:
117
+ // - null path → the default neutral environment;
118
+ // - path A → path B → the Environment is rebuilt (skybox/IBL actually
119
+ // swaps; the stale-factory bug of #2361).
120
+ // Uses Compose key {} rather than rememberEnvironment's own key= param because
121
+ // this bridge compiles against the published Maven artifact (sceneview:4.7.0)
122
+ // that predates key=. key {} replaces the group on a new path, disposing the old
123
+ // Environment via its DisposableEffect.
124
+ // TODO(#2361): migrate to rememberEnvironment(..., key = path) once this bridge
125
+ // consumes a SceneView release that includes the public key= param.
126
+ val environmentPath = state.environmentPath.value
127
+ val environment = key(environmentPath) {
128
+ rememberEnvironment(environmentLoader) {
129
+ environmentPath?.let { path ->
124
130
  environmentLoader.createHDREnvironment(path)
125
- ?: io.github.sceneview.createEnvironment(environmentLoader)
126
- }
131
+ } ?: io.github.sceneview.createEnvironment(environmentLoader)
127
132
  }
128
133
  }
129
134
 
@@ -134,7 +139,7 @@ class SceneViewManager : SimpleViewManager<FrameLayout>() {
134
139
  modelLoader = modelLoader,
135
140
  materialLoader = materialLoader,
136
141
  cameraNode = cameraNode,
137
- environment = environment ?: rememberEnvironment(environmentLoader),
142
+ environment = environment,
138
143
  onGestureListener = gestureListener,
139
144
  ) {
140
145
  state.modelPaths.forEach { model ->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sceneview-sdk/react-native",
3
- "version": "4.18.0",
3
+ "version": "4.19.0",
4
4
  "description": "React Native bindings for SceneView — 3D and AR scenes powered by Filament (Android) and RealityKit (iOS)",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -70,7 +70,10 @@
70
70
  ]
71
71
  },
72
72
  "overrides": {
73
- "fast-xml-parser": "^5.7.0"
73
+ "fast-xml-parser": "^5.7.0",
74
+ "@babel/core": "^7.29.6",
75
+ "shell-quote": "^1.8.4",
76
+ "js-yaml": "^3.15.0"
74
77
  },
75
78
  "react-native-builder-bob": {
76
79
  "source": "src",