react-native-model-viewer-webview 0.2.0 → 0.2.1
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/CHANGELOG.md +23 -0
- package/README.md +34 -0
- package/docs/COMPATIBILITY.md +19 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,29 @@ All notable changes to this package should be documented here.
|
|
|
5
5
|
This project uses semantic versioning. Versions below `1.0.0` may still change
|
|
6
6
|
minor APIs when the release notes call it out clearly.
|
|
7
7
|
|
|
8
|
+
## 0.2.1 - 2026-06-30
|
|
9
|
+
|
|
10
|
+
This is a docs and confidence release. There are no runtime API changes.
|
|
11
|
+
|
|
12
|
+
### Documentation
|
|
13
|
+
|
|
14
|
+
- Add Android Expo Go smoke-test notes for remote GLB loading and local GLB
|
|
15
|
+
loading.
|
|
16
|
+
- Document the local Expo asset path that worked in testing: resolve the
|
|
17
|
+
bundled `.glb`, read it as base64, and pass a
|
|
18
|
+
`data:model/gltf-binary;base64,...` URI to `ModelViewerWebView`.
|
|
19
|
+
- Call out that direct Android WebView loading from a local `file:` GLB URI was
|
|
20
|
+
not reliable in this smoke test.
|
|
21
|
+
- Add a verified smoke-test table to the README and compatibility docs, with
|
|
22
|
+
iOS WKWebView still marked as not yet tested.
|
|
23
|
+
- Add the Android local-GLB screenshot and compatibility section to the public
|
|
24
|
+
docs site.
|
|
25
|
+
|
|
26
|
+
### Maintenance
|
|
27
|
+
|
|
28
|
+
- Update docs-site tests so the new local-GLB guidance and smoke-test evidence
|
|
29
|
+
stay present.
|
|
30
|
+
|
|
8
31
|
## 0.2.0 - 2026-06-02
|
|
9
32
|
|
|
10
33
|
### Added
|
package/README.md
CHANGED
|
@@ -122,6 +122,31 @@ await carModel.downloadAsync();
|
|
|
122
122
|
`localUri` is preferred over `uri` when both exist. `modelUri` is still accepted
|
|
123
123
|
as a string-only compatibility prop.
|
|
124
124
|
|
|
125
|
+
For Android Expo Go, direct `file:` loading from WebView can be unreliable. The
|
|
126
|
+
verified local-asset path is to read the Expo asset as base64 and pass a GLB
|
|
127
|
+
data URI:
|
|
128
|
+
|
|
129
|
+
```tsx
|
|
130
|
+
import { Asset } from "expo-asset";
|
|
131
|
+
import * as FileSystem from "expo-file-system/legacy";
|
|
132
|
+
import { ModelViewerWebView } from "react-native-model-viewer-webview";
|
|
133
|
+
|
|
134
|
+
const model = Asset.fromModule(require("./assets/model.glb"));
|
|
135
|
+
await model.downloadAsync();
|
|
136
|
+
|
|
137
|
+
const localUri = model.localUri ?? model.uri;
|
|
138
|
+
const base64 = await FileSystem.readAsStringAsync(localUri, {
|
|
139
|
+
encoding: FileSystem.EncodingType.Base64,
|
|
140
|
+
});
|
|
141
|
+
const modelSource = `data:model/gltf-binary;base64,${base64}`;
|
|
142
|
+
|
|
143
|
+
<ModelViewerWebView modelSource={modelSource} style={{ height: 320 }} />;
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
This data-URI path was smoke-tested on Android Expo Go with a local Khronos
|
|
147
|
+
`Box.glb` asset. Use `file:` URIs only after testing them on your target
|
|
148
|
+
WebView/device matrix.
|
|
149
|
+
|
|
125
150
|
## Metro Setup For Local GLB Files
|
|
126
151
|
|
|
127
152
|
If your app imports `.glb` files, add `glb` to Metro's asset extensions.
|
|
@@ -196,6 +221,15 @@ Or pass an inline module script if your build already bundles the source:
|
|
|
196
221
|
/>
|
|
197
222
|
```
|
|
198
223
|
|
|
224
|
+
## Verified Smoke Tests
|
|
225
|
+
|
|
226
|
+
| Platform | App runtime | Model source | Result |
|
|
227
|
+
| --- | --- | --- | --- |
|
|
228
|
+
| Android 16 physical device | Expo Go, Expo SDK 56 tester app | Remote GLB URL | Verified |
|
|
229
|
+
| Android 16 physical device | Expo Go, Expo SDK 56 tester app | Local Khronos `Box.glb` as `data:model/gltf-binary;base64,...` | Verified |
|
|
230
|
+
| Android 16 physical device | Expo Go, Expo SDK 56 tester app | Local Khronos `Box.glb` as direct `file:` URI | Not reliable in this smoke test |
|
|
231
|
+
| iOS WKWebView | Not yet tested | Any model source | Not yet verified |
|
|
232
|
+
|
|
199
233
|
## Props
|
|
200
234
|
|
|
201
235
|
`ModelViewerWebView` accepts all `react-native-webview` props except `source` and
|
package/docs/COMPATIBILITY.md
CHANGED
|
@@ -40,6 +40,22 @@ Automated checks validate:
|
|
|
40
40
|
- package tarball contents with `npm pack --dry-run`
|
|
41
41
|
- integration with this repository's Expo app through TypeScript and Expo lint
|
|
42
42
|
|
|
43
|
+
## Device Smoke Tests
|
|
44
|
+
|
|
45
|
+
These results are manual smoke tests, not a blanket support matrix.
|
|
46
|
+
|
|
47
|
+
| Date | Platform | App runtime | Model source | Result |
|
|
48
|
+
| --- | --- | --- | --- | --- |
|
|
49
|
+
| 2026-06-30 | Android 16 physical device | Expo Go, Expo SDK 56 tester app | Remote GLB URL | Verified |
|
|
50
|
+
| 2026-06-30 | Android 16 physical device | Expo Go, Expo SDK 56 tester app | Local Khronos `Box.glb` as `data:model/gltf-binary;base64,...` | Verified |
|
|
51
|
+
| 2026-06-30 | Android 16 physical device | Expo Go, Expo SDK 56 tester app | Local Khronos `Box.glb` as direct `file:` URI | Not reliable in this smoke test |
|
|
52
|
+
| Not yet tested | iOS WKWebView | Not yet tested | Any model source | Not yet verified |
|
|
53
|
+
|
|
54
|
+
The local Android test used `expo-asset` to resolve a bundled `.glb`, then
|
|
55
|
+
`expo-file-system` to read the local file as base64 before passing a
|
|
56
|
+
`data:model/gltf-binary;base64,...` URI to `ModelViewerWebView`. This avoids the
|
|
57
|
+
Android WebView file-access path that failed in the direct `file:` smoke test.
|
|
58
|
+
|
|
43
59
|
## Not Guaranteed
|
|
44
60
|
|
|
45
61
|
The package does not claim blanket support for all React Native versions.
|
|
@@ -50,6 +66,9 @@ Explicit limitations:
|
|
|
50
66
|
- WebView bugs in specific Android System WebView or iOS versions may affect
|
|
51
67
|
rendering.
|
|
52
68
|
- Local `.glb` bundling depends on the consuming app's Metro config.
|
|
69
|
+
- On Android Expo Go, direct WebView loading from a local `file:` GLB URI was
|
|
70
|
+
not reliable in the 2026-06-30 smoke test. Prefer a GLB data URI for local
|
|
71
|
+
Expo assets unless your target app/device matrix proves direct file loading.
|
|
53
72
|
- Device rendering is not fully proven by unit tests.
|
|
54
73
|
- AR behavior is not a supported package guarantee.
|
|
55
74
|
- Long lists of many WebViews may have memory/performance problems.
|