@threenative/runtime-native 0.2.0 → 0.3.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/NOTICE +2 -0
- package/README.md +63 -0
- package/android/README.md +2 -2
- package/android/app/build.gradle.kts +177 -30
- package/android/app/src/main/AndroidManifest.xml +8 -1
- package/android/app/src/main/java/com/mystral/engine/MystralActivity.java +190 -2
- package/android/app/src/main/java/com/mystral/engine/TnUiOverlay.java +261 -0
- package/android/app/src/main/res/values/branding.xml +12 -0
- package/android/app/src/main/res/values/themes.xml +2 -0
- package/android/gradle.properties +1 -1
- package/package.json +44 -8
- package/scripts/asset-preflight.mjs +442 -0
- package/scripts/bundle.mjs +178 -48
- package/scripts/check-source-list.mjs +90 -0
- package/scripts/device-preflight.mjs +456 -0
- package/scripts/install-prebuilt.mjs +326 -30
- package/scripts/package-android.mjs +414 -23
- package/scripts/package-desktop.mjs +132 -12
- package/scripts/package-ios.mjs +249 -25
- package/scripts/physical-device-evidence.mjs +644 -0
- package/scripts/production-evidence.mjs +101 -2
- package/scripts/profile-production.mjs +544 -115
- package/scripts/qualify-physical-mobile.mjs +1327 -0
- package/scripts/verify-starter-desktop.mjs +140 -16
- package/scripts/xvfb.sh +68 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
package com.threenative.runtime;
|
|
2
|
+
|
|
3
|
+
import android.app.Activity;
|
|
4
|
+
import android.graphics.Color;
|
|
5
|
+
import android.view.MotionEvent;
|
|
6
|
+
import android.view.View;
|
|
7
|
+
import android.view.ViewGroup;
|
|
8
|
+
import android.webkit.WebResourceRequest;
|
|
9
|
+
import android.webkit.WebResourceResponse;
|
|
10
|
+
import android.webkit.WebView;
|
|
11
|
+
import android.webkit.WebViewClient;
|
|
12
|
+
import androidx.webkit.JavaScriptReplyProxy;
|
|
13
|
+
import androidx.webkit.WebMessageCompat;
|
|
14
|
+
import androidx.webkit.WebViewAssetLoader;
|
|
15
|
+
import androidx.webkit.WebViewCompat;
|
|
16
|
+
import androidx.webkit.WebViewFeature;
|
|
17
|
+
import java.util.Collections;
|
|
18
|
+
import java.util.Set;
|
|
19
|
+
import org.json.JSONArray;
|
|
20
|
+
import org.json.JSONException;
|
|
21
|
+
import org.json.JSONObject;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The UI layer — a transparent WebView composited over the game surface, rendering only the UI.
|
|
25
|
+
*
|
|
26
|
+
* The game keeps its native GPU surface and its native loop. Nothing of the scene, the
|
|
27
|
+
* simulation or the render path lives here; this view draws `src/ui/` and nothing else, which
|
|
28
|
+
* is why the system composites it as a hardware overlay and it costs no measurable frame time.
|
|
29
|
+
*
|
|
30
|
+
* <h3>Why the hit test is here and not in CSS</h3>
|
|
31
|
+
*
|
|
32
|
+
* A WebView is a native view with a <em>rectangular</em> hit-test region owned by the platform.
|
|
33
|
+
* CSS hit-testing runs inside that surface, after the native view has already claimed the
|
|
34
|
+
* gesture, so {@code pointer-events: none} never hands a touch back to the game beneath it. It
|
|
35
|
+
* is a useful property inside the page; it is not the pass-through mechanism, and a run that
|
|
36
|
+
* "proves" pass-through by toggling it proves nothing.
|
|
37
|
+
*
|
|
38
|
+
* The mechanism is the interactive-rect registry in {@code @threenative/core/ui-layer}: the page
|
|
39
|
+
* publishes where its interactive islands are, normalized to the viewport, and this view decides
|
|
40
|
+
* ownership on the way in.
|
|
41
|
+
*
|
|
42
|
+
* <h3>The three rules</h3>
|
|
43
|
+
*
|
|
44
|
+
* <ul>
|
|
45
|
+
* <li>Ownership is decided on <b>pointer-down only</b> and held until pointer-up, so a drag
|
|
46
|
+
* that starts on the game is not stolen by a button it passes over.</li>
|
|
47
|
+
* <li>The registry is <b>published</b>, never queried per event — an async round trip inside
|
|
48
|
+
* the input path buys latency and races the frame that moved the button.</li>
|
|
49
|
+
* <li>A <b>moving</b> island republishes per frame while its transition is live, so a button
|
|
50
|
+
* is hit where it is drawn rather than where it was.</li>
|
|
51
|
+
* </ul>
|
|
52
|
+
*
|
|
53
|
+
* <h3>Known limitation, stated rather than discovered</h3>
|
|
54
|
+
*
|
|
55
|
+
* Android hands a whole gesture to whichever view claimed its first pointer-down. So while a
|
|
56
|
+
* finger is held on a HUD control, a second finger anywhere on screen also goes to this view;
|
|
57
|
+
* and while a finger is held on the game, a second finger on a HUD control goes to the game.
|
|
58
|
+
* The first finger decides the window. Splitting a gesture per pointer needs the host to
|
|
59
|
+
* synthesize two event streams, which is a larger change than the four rules this ships.
|
|
60
|
+
*/
|
|
61
|
+
public final class TnUiOverlay extends WebView {
|
|
62
|
+
|
|
63
|
+
/** The origin {@link WebViewAssetLoader} serves the UI bundle from. Never {@code file://}. */
|
|
64
|
+
private static final String ASSET_ORIGIN = "https://appassets.androidplatform.net";
|
|
65
|
+
/** The path inside the APK's assets that holds the built UI. */
|
|
66
|
+
private static final String ASSET_PATH = "/ui/";
|
|
67
|
+
/** The name the page sees. Must match {@code UI_BRIDGE_GLOBALS.uiHost}. */
|
|
68
|
+
private static final String HOST_OBJECT = "tnHost";
|
|
69
|
+
/** Must match {@code HIT_REGIONS_MESSAGE} in @threenative/core/ui-layer. */
|
|
70
|
+
private static final String HIT_REGIONS_MESSAGE = "tn:hit-regions";
|
|
71
|
+
|
|
72
|
+
private static native void nativeUiMessage(String frame);
|
|
73
|
+
|
|
74
|
+
private static native void nativeUiOverlayAttached(boolean attached);
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The published islands, flat as x, y, width, height per region, normalized to the viewport.
|
|
78
|
+
* Written by the message listener and read by touch dispatch, both on the UI thread; the
|
|
79
|
+
* reference is swapped whole so a half-written set can never be hit-tested.
|
|
80
|
+
*/
|
|
81
|
+
private volatile float[] regions = new float[0];
|
|
82
|
+
|
|
83
|
+
private final Object bridgeLock = new Object();
|
|
84
|
+
private JavaScriptReplyProxy replyProxy;
|
|
85
|
+
private String pendingFrame;
|
|
86
|
+
private boolean ownsGesture;
|
|
87
|
+
|
|
88
|
+
private TnUiOverlay(Activity activity) {
|
|
89
|
+
super(activity);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Build the overlay and attach it over the activity's content.
|
|
94
|
+
*
|
|
95
|
+
* Fails closed and by name. A game that asked for the web UI renderer and cannot have it
|
|
96
|
+
* must hear so at launch: degrading to no UI at all looks, from a screenshot, exactly like a
|
|
97
|
+
* game whose HUD code is broken.
|
|
98
|
+
*/
|
|
99
|
+
public static TnUiOverlay attach(Activity activity) {
|
|
100
|
+
if (!WebViewFeature.isFeatureSupported(WebViewFeature.WEB_MESSAGE_LISTENER)) {
|
|
101
|
+
nativeUiOverlayAttached(false);
|
|
102
|
+
throw new IllegalStateException(
|
|
103
|
+
"TN_UI_OVERLAY_UNSUPPORTED: this device's WebView has no WEB_MESSAGE_LISTENER, so the"
|
|
104
|
+
+ " UI layer has no bridge. Update Android System WebView, or build with"
|
|
105
|
+
+ " ui.renderer = \"native\".");
|
|
106
|
+
}
|
|
107
|
+
TnUiOverlay overlay = new TnUiOverlay(activity);
|
|
108
|
+
nativeUiOverlayAttached(false);
|
|
109
|
+
overlay.configure(activity);
|
|
110
|
+
activity.addContentView(
|
|
111
|
+
overlay,
|
|
112
|
+
new ViewGroup.LayoutParams(
|
|
113
|
+
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
|
|
114
|
+
return overlay;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
private void configure(Activity activity) {
|
|
118
|
+
setBackgroundColor(Color.TRANSPARENT);
|
|
119
|
+
// A hardware layer is what lets SurfaceFlinger promote this view to an overlay plane
|
|
120
|
+
// instead of compositing it on the GPU the game is already saturating.
|
|
121
|
+
setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
|
122
|
+
getSettings().setJavaScriptEnabled(true);
|
|
123
|
+
getSettings().setDomStorageEnabled(true);
|
|
124
|
+
// The UI is a local bundle; nothing in it should be able to reach the network.
|
|
125
|
+
getSettings().setAllowFileAccess(false);
|
|
126
|
+
getSettings().setAllowContentAccess(false);
|
|
127
|
+
setHorizontalScrollBarEnabled(false);
|
|
128
|
+
setVerticalScrollBarEnabled(false);
|
|
129
|
+
|
|
130
|
+
// `WebViewAssetLoader` serves the APK's assets from an HTTPS-like origin rather than
|
|
131
|
+
// `file://`, so `fetch`, module imports and same-origin rules behave exactly as they do
|
|
132
|
+
// on the web build. That equivalence is the point of the whole PRD.
|
|
133
|
+
// `AssetsPathHandler` strips the prefix it was registered under, so registering "/ui/"
|
|
134
|
+
// alone would serve `assets/index.html` rather than `assets/ui/index.html`. Putting the
|
|
135
|
+
// prefix back keeps everything outside `assets/ui/` — the game bundle, the V8 snapshot,
|
|
136
|
+
// the game's own assets — unreachable from the page.
|
|
137
|
+
final WebViewAssetLoader.AssetsPathHandler assets =
|
|
138
|
+
new WebViewAssetLoader.AssetsPathHandler(activity);
|
|
139
|
+
final WebViewAssetLoader loader =
|
|
140
|
+
new WebViewAssetLoader.Builder()
|
|
141
|
+
.addPathHandler(ASSET_PATH, path -> assets.handle("ui/" + path))
|
|
142
|
+
.build();
|
|
143
|
+
setWebViewClient(
|
|
144
|
+
new WebViewClient() {
|
|
145
|
+
@Override
|
|
146
|
+
public WebResourceResponse shouldInterceptRequest(
|
|
147
|
+
WebView view, WebResourceRequest request) {
|
|
148
|
+
return loader.shouldInterceptRequest(request.getUrl());
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
Set<String> origins = Collections.singleton(ASSET_ORIGIN);
|
|
153
|
+
WebViewCompat.addWebMessageListener(
|
|
154
|
+
this,
|
|
155
|
+
HOST_OBJECT,
|
|
156
|
+
origins,
|
|
157
|
+
(view, message, sourceOrigin, isMainFrame, proxy) -> {
|
|
158
|
+
String pending;
|
|
159
|
+
synchronized (bridgeLock) {
|
|
160
|
+
replyProxy = proxy;
|
|
161
|
+
pending = pendingFrame;
|
|
162
|
+
pendingFrame = null;
|
|
163
|
+
}
|
|
164
|
+
nativeUiOverlayAttached(true);
|
|
165
|
+
onPageMessage(message);
|
|
166
|
+
if (pending != null) proxy.postMessage(pending);
|
|
167
|
+
});
|
|
168
|
+
loadUrl(ASSET_ORIGIN + ASSET_PATH + "index.html");
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Route one frame from the page.
|
|
173
|
+
*
|
|
174
|
+
* Hit regions stop here: the host owns the hit test, and sending them on to the game would
|
|
175
|
+
* add a process hop to the input path for no reader. Everything else is the game's.
|
|
176
|
+
*/
|
|
177
|
+
private void onPageMessage(WebMessageCompat message) {
|
|
178
|
+
if (message.getType() != WebMessageCompat.TYPE_STRING) return;
|
|
179
|
+
String frame = message.getData();
|
|
180
|
+
if (frame == null) return;
|
|
181
|
+
if (applyHitRegions(frame)) return;
|
|
182
|
+
nativeUiMessage(frame);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/** @return true when the frame was a hit-region publication and has been applied. */
|
|
186
|
+
private boolean applyHitRegions(String frame) {
|
|
187
|
+
try {
|
|
188
|
+
JSONObject parsed = new JSONObject(frame);
|
|
189
|
+
if (!HIT_REGIONS_MESSAGE.equals(parsed.optString("type"))) return false;
|
|
190
|
+
JSONArray published = parsed.getJSONArray("regions");
|
|
191
|
+
float[] next = new float[published.length() * 4];
|
|
192
|
+
for (int index = 0; index < published.length(); index += 1) {
|
|
193
|
+
JSONObject region = published.getJSONObject(index);
|
|
194
|
+
next[index * 4] = (float) region.getDouble("x");
|
|
195
|
+
next[index * 4 + 1] = (float) region.getDouble("y");
|
|
196
|
+
next[index * 4 + 2] = (float) region.getDouble("width");
|
|
197
|
+
next[index * 4 + 3] = (float) region.getDouble("height");
|
|
198
|
+
}
|
|
199
|
+
regions = next;
|
|
200
|
+
return true;
|
|
201
|
+
} catch (JSONException error) {
|
|
202
|
+
// Fail closed and loudly. A malformed publication that was quietly ignored would
|
|
203
|
+
// leave the previous snapshot in place, and every later touch would be decided
|
|
204
|
+
// against rectangles that no longer exist.
|
|
205
|
+
throw new IllegalStateException(
|
|
206
|
+
"TN_UI_HIT_REGIONS_MALFORMED: the UI layer published a frame this host cannot read: "
|
|
207
|
+
+ frame,
|
|
208
|
+
error);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/** Deliver one frame to the page. Called from the runtime through the activity. */
|
|
213
|
+
public void postToPage(String frame) {
|
|
214
|
+
JavaScriptReplyProxy proxy;
|
|
215
|
+
synchronized (bridgeLock) {
|
|
216
|
+
proxy = replyProxy;
|
|
217
|
+
if (proxy == null) {
|
|
218
|
+
// Keep only the newest state while the page is loading. The UI readiness frame
|
|
219
|
+
// causes the game to replay it after the proxy is live.
|
|
220
|
+
pendingFrame = frame;
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
proxy.postMessage(frame);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* The hit test, and the only place ownership is decided.
|
|
229
|
+
*
|
|
230
|
+
* Returning false for a pointer-down outside every published rect makes the parent
|
|
231
|
+
* {@link ViewGroup} offer the gesture to the next view down — SDL's surface — and Android
|
|
232
|
+
* then delivers the rest of that gesture there without consulting this view again.
|
|
233
|
+
*/
|
|
234
|
+
@Override
|
|
235
|
+
public boolean dispatchTouchEvent(MotionEvent event) {
|
|
236
|
+
if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
|
|
237
|
+
ownsGesture = hits(event.getX(), event.getY());
|
|
238
|
+
android.util.Log.i("Mystral", "TN_UI_HITTEST:{\"x\":" + event.getX() + ",\"y\":" + event.getY()
|
|
239
|
+
+ ",\"w\":" + getWidth() + ",\"h\":" + getHeight() + ",\"regions\":" + (regions.length / 4)
|
|
240
|
+
+ ",\"owns\":" + ownsGesture + "}");
|
|
241
|
+
if (!ownsGesture) return false;
|
|
242
|
+
}
|
|
243
|
+
return ownsGesture && super.dispatchTouchEvent(event);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
private boolean hits(float x, float y) {
|
|
247
|
+
int width = getWidth();
|
|
248
|
+
int height = getHeight();
|
|
249
|
+
if (width <= 0 || height <= 0) return false;
|
|
250
|
+
float normalizedX = x / width;
|
|
251
|
+
float normalizedY = y / height;
|
|
252
|
+
float[] snapshot = regions;
|
|
253
|
+
for (int index = 0; index + 3 < snapshot.length; index += 4) {
|
|
254
|
+
if (normalizedX < snapshot[index] || normalizedY < snapshot[index + 1]) continue;
|
|
255
|
+
if (normalizedX > snapshot[index] + snapshot[index + 2]) continue;
|
|
256
|
+
if (normalizedY > snapshot[index + 1] + snapshot[index + 3]) continue;
|
|
257
|
+
return true;
|
|
258
|
+
}
|
|
259
|
+
return false;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!--
|
|
3
|
+
The unbranded host defaults. `scripts/package-android.mjs` overwrites this file with the
|
|
4
|
+
game's own colours while it packages, then restores it. The host tree has to define them
|
|
5
|
+
anyway: `themes.xml` references `@color/tn_boot_splash_background`, so without this file
|
|
6
|
+
`:app:assembleDebug` fails resource linking and the Android device gate cannot build at all.
|
|
7
|
+
The values match `bootSplashBackground()`/`iconBackground()` for a config that declares nothing.
|
|
8
|
+
-->
|
|
9
|
+
<resources>
|
|
10
|
+
<color name="tn_icon_background">#000000</color>
|
|
11
|
+
<color name="tn_boot_splash_background">#000000</color>
|
|
12
|
+
</resources>
|
|
@@ -4,5 +4,7 @@
|
|
|
4
4
|
<style name="Theme.ThreeNative" parent="android:Theme.NoTitleBar.Fullscreen">
|
|
5
5
|
<item name="android:windowFullscreen">true</item>
|
|
6
6
|
<item name="android:windowContentOverlay">@null</item>
|
|
7
|
+
<!-- package-android.mjs replaces these generated brand resources per project. -->
|
|
8
|
+
<item name="android:windowSplashScreenBackground">@color/tn_boot_splash_background</item>
|
|
7
9
|
</style>
|
|
8
10
|
</resources>
|
package/package.json
CHANGED
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@threenative/runtime-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "ThreeNative-owned native host for desktop, Android, and iOS",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"threenative",
|
|
7
|
+
"native",
|
|
8
|
+
"desktop",
|
|
9
|
+
"android",
|
|
10
|
+
"ios",
|
|
11
|
+
"webgpu",
|
|
12
|
+
"three",
|
|
13
|
+
"threejs"
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://github.com/ThreeNativeHQ/threenative#readme",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/ThreeNativeHQ/threenative/issues"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/ThreeNativeHQ/threenative.git",
|
|
22
|
+
"directory": "packages/runtime-native"
|
|
23
|
+
},
|
|
5
24
|
"license": "MIT",
|
|
6
25
|
"publishConfig": {
|
|
7
26
|
"access": "public"
|
|
8
27
|
},
|
|
9
28
|
"type": "module",
|
|
10
29
|
"files": [
|
|
30
|
+
"LICENSE",
|
|
31
|
+
"NOTICE",
|
|
32
|
+
"README.md",
|
|
33
|
+
"android/README.md",
|
|
11
34
|
"android/app/build.gradle.kts",
|
|
12
35
|
"android/app/proguard-rules.pro",
|
|
13
36
|
"android/app/src/main/AndroidManifest.xml",
|
|
@@ -18,39 +41,52 @@
|
|
|
18
41
|
"android/gradle/wrapper/gradle-wrapper.jar",
|
|
19
42
|
"android/gradle/wrapper/gradle-wrapper.properties",
|
|
20
43
|
"android/gradlew",
|
|
21
|
-
"android/README.md",
|
|
22
44
|
"android/settings.gradle.kts",
|
|
45
|
+
"scripts/asset-preflight.mjs",
|
|
23
46
|
"scripts/bundle.mjs",
|
|
47
|
+
"scripts/check-source-list.mjs",
|
|
48
|
+
"scripts/device-preflight.mjs",
|
|
24
49
|
"scripts/install-prebuilt.mjs",
|
|
25
50
|
"scripts/package-android.mjs",
|
|
26
51
|
"scripts/package-desktop.mjs",
|
|
27
52
|
"scripts/package-ios.mjs",
|
|
53
|
+
"scripts/physical-device-evidence.mjs",
|
|
28
54
|
"scripts/production-evidence.mjs",
|
|
29
55
|
"scripts/profile-production.mjs",
|
|
56
|
+
"scripts/qualify-physical-mobile.mjs",
|
|
30
57
|
"scripts/verify-starter-desktop.mjs",
|
|
31
|
-
"
|
|
32
|
-
"NOTICE"
|
|
58
|
+
"scripts/xvfb.sh"
|
|
33
59
|
],
|
|
34
60
|
"devDependencies": {
|
|
35
61
|
"esbuild": "0.27.0",
|
|
62
|
+
"publint": "0.3.22",
|
|
36
63
|
"three": "0.185.1",
|
|
37
|
-
"vitest": "4.1.10"
|
|
64
|
+
"vitest": "4.1.10",
|
|
65
|
+
"@threenative/playtest": "0.3.1"
|
|
38
66
|
},
|
|
39
67
|
"dependencies": {
|
|
40
68
|
"pngjs": "7.0.0"
|
|
41
69
|
},
|
|
42
70
|
"scripts": {
|
|
43
71
|
"deps:download": "node scripts/download-deps.mjs",
|
|
72
|
+
"deps:verify": "node scripts/download-deps.mjs --check-lock",
|
|
73
|
+
"deps:sbom": "node scripts/generate-native-sbom.mjs --out .runtime/sbom",
|
|
74
|
+
"deps:sbom:check": "node scripts/generate-native-sbom.mjs --check --sbom .runtime/sbom/native-dependencies.cdx.json --inventory .runtime/sbom/native-license-inventory.json",
|
|
44
75
|
"native:build": "node scripts/download-deps.mjs && node scripts/native-build.mjs",
|
|
76
|
+
"native:coverage": "sh ../../scripts/xvfb.sh node scripts/measure-native-coverage.mjs",
|
|
77
|
+
"native:test:cpp": "node scripts/measure-native-coverage.mjs --ctest",
|
|
78
|
+
"native:test:asan": "node scripts/measure-native-coverage.mjs --sanitizers",
|
|
45
79
|
"native:physics:cross": "node scripts/build-native-physics.mjs",
|
|
46
80
|
"native:physics:measure": "node scripts/measure-physics-divergence.mjs",
|
|
47
|
-
"native:physics:parity": "pnpm --dir ../.. exec vitest run packages/physics/__tests__/parity.spec.ts && cargo test --manifest-path native/physics/Cargo.toml --test parity -- --nocapture",
|
|
81
|
+
"native:physics:parity": "pnpm --dir ../.. exec vitest run packages/physics/__tests__/parity.spec.ts && cargo test --manifest-path native/physics/Cargo.toml --lib --test parity -- --nocapture",
|
|
48
82
|
"native:physics:parity:device": "node scripts/verify-android-physics-parity.mjs",
|
|
49
|
-
"native:
|
|
83
|
+
"native:qualify:physical": "node scripts/qualify-physical-mobile.mjs",
|
|
84
|
+
"native:verify:desktop": "node scripts/verify-desktop-audio.mjs && node scripts/verify-desktop-stability.mjs && node scripts/verify-desktop-core.mjs && node scripts/verify-desktop-physics.mjs && sh ../../scripts/xvfb.sh node scripts/verify-native-contracts.mjs && pnpm --dir ../playtest build && sh ../../scripts/xvfb.sh node scripts/verify-desktop-loading.mjs",
|
|
85
|
+
"native:verify:loading": "pnpm --dir ../playtest build && sh ../../scripts/xvfb.sh node scripts/verify-desktop-loading.mjs",
|
|
50
86
|
"native:verify:android:multitouch": "pnpm --dir ../playtest build && node scripts/verify-android-multitouch.mjs",
|
|
51
87
|
"profile:production": "node scripts/profile-production.mjs",
|
|
52
88
|
"parity": "node conformance/run-conformance.mjs",
|
|
53
89
|
"install": "node scripts/install-prebuilt.mjs",
|
|
54
|
-
"test": "vitest run --config vitest.config.ts && pnpm native:physics:parity"
|
|
90
|
+
"test": "vitest run --config vitest.config.ts && pnpm native:physics:parity && publint --strict"
|
|
55
91
|
}
|
|
56
92
|
}
|