Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add web platform passthrough support #165

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Setup Node.js and install dependencies

inputs:
github_token:
description: 'GitHub Token'
description: "GitHub Token"
required: true

runs:
Expand Down Expand Up @@ -45,3 +45,8 @@ runs:
working-directory: packages/webgpu
shell: bash
run: yarn copy-artifacts

- name: Generate example app native directories
working-directory: apps/example
shell: bash
run: yarn prebuild
33 changes: 33 additions & 0 deletions .yarn/patches/react-native-web-npm-0.19.13-fe8941425a.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
diff --git a/dist/exports/Image/index.js b/dist/exports/Image/index.js
index 348831dc4cc4182a35a5259b612e46e88594ba3a..b917361e73658ea16fa9f80ced985df28abdcf1e 100644
--- a/dist/exports/Image/index.js
+++ b/dist/exports/Image/index.js
@@ -5,7 +5,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
- *
+ *
*/

'use client';
@@ -294,6 +294,19 @@ ImageWithStatics.prefetch = function (uri) {
ImageWithStatics.queryCache = function (uris) {
return ImageLoader.queryCache(uris);
};
+ImageWithStatics.resolveAssetSource = function (source) {
+ var asset = getAssetByID(source);
+ var displayImageUri = resolveAssetUri(source);
+ var imageSizeStyle = resolveAssetDimensions(source);
+
+ return {
+ height: imageSizeStyle.height,
+ width: imageSizeStyle.width,
+ uri: displayImageUri,
+ scale: asset.scales[0],
+ };
+};
+
var styles = StyleSheet.create({
root: {
flexBasis: 'auto',
43 changes: 43 additions & 0 deletions .yarn/patches/three-npm-0.168.0-240bac8179.patch

Large diffs are not rendered by default.

14 changes: 0 additions & 14 deletions apps/example/.eslintrc

This file was deleted.

55 changes: 40 additions & 15 deletions apps/example/.gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,41 @@
*.binlog
*.hprof
*.xcworkspace/
*.zip
.DS_Store
.gradle/
.idea/
.vs/
.xcode.env
**/Pods/**
build/
dist/*
!dist/.gitignore
local.properties
msbuild.binlog
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files

# dependencies
node_modules/

# Expo
.expo/
dist/
web-build/

# Native
*.orig.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision

# Metro
.metro-health-check*

# debug
npm-debug.*
yarn-debug.*
yarn-error.*

# macOS
.DS_Store
*.pem

# local env files
.env*.local

# typescript
*.tsbuildinfo

.yarn/cache
.yarn/install-state.gz

ios
android
1 change: 0 additions & 1 deletion apps/example/.watchmanconfig

This file was deleted.

43 changes: 0 additions & 43 deletions apps/example/android/build.gradle

This file was deleted.

55 changes: 0 additions & 55 deletions apps/example/android/gradle.properties

This file was deleted.

Binary file not shown.
7 changes: 0 additions & 7 deletions apps/example/android/gradle/wrapper/gradle-wrapper.properties

This file was deleted.

Loading