react-native-wgpu 0.3.2 → 0.4.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/README.md +7 -5
- package/lib/commonjs/Canvas.js +14 -6
- package/lib/commonjs/Canvas.js.map +1 -1
- package/lib/commonjs/WebGPUViewNativeComponent.web.js +99 -0
- package/lib/commonjs/WebGPUViewNativeComponent.web.js.map +1 -0
- package/lib/commonjs/WebPolyfillGPUModule.js +40 -0
- package/lib/commonjs/WebPolyfillGPUModule.js.map +1 -0
- package/lib/commonjs/hooks.js +3 -2
- package/lib/commonjs/hooks.js.map +1 -1
- package/lib/commonjs/index.js +4 -208
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/main/index.js +227 -0
- package/lib/commonjs/main/index.js.map +1 -0
- package/lib/commonjs/main/index.web.js +51 -0
- package/lib/commonjs/main/index.web.js.map +1 -0
- package/lib/commonjs/types.js +2 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/commonjs/utils.js +11 -0
- package/lib/commonjs/utils.js.map +1 -0
- package/lib/module/Canvas.js +12 -5
- package/lib/module/Canvas.js.map +1 -1
- package/lib/module/WebGPUViewNativeComponent.web.js +93 -0
- package/lib/module/WebGPUViewNativeComponent.web.js.map +1 -0
- package/lib/module/WebPolyfillGPUModule.js +38 -0
- package/lib/module/WebPolyfillGPUModule.js.map +1 -0
- package/lib/module/hooks.js +1 -1
- package/lib/module/hooks.js.map +1 -1
- package/lib/module/index.js +3 -160
- package/lib/module/index.js.map +1 -1
- package/lib/module/main/index.js +168 -0
- package/lib/module/main/index.js.map +1 -0
- package/lib/module/main/index.web.js +8 -0
- package/lib/module/main/index.web.js.map +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/utils.js +5 -0
- package/lib/module/utils.js.map +1 -0
- package/lib/typescript/lib/commonjs/Canvas.d.ts +1 -2
- package/lib/typescript/lib/commonjs/WebGPUViewNativeComponent.web.d.ts +5 -0
- package/lib/typescript/lib/commonjs/WebGPUViewNativeComponent.web.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/WebPolyfillGPUModule.d.ts +2 -0
- package/lib/typescript/lib/commonjs/WebPolyfillGPUModule.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/hooks.d.ts +5 -6
- package/lib/typescript/lib/commonjs/hooks.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/index.d.ts +0 -1
- package/lib/typescript/lib/commonjs/main/index.d.ts +3 -0
- package/lib/typescript/lib/commonjs/main/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/main/index.web.d.ts +2 -0
- package/lib/typescript/lib/commonjs/main/index.web.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/types.d.ts +1 -0
- package/lib/typescript/lib/commonjs/types.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/utils.d.ts +3 -0
- package/lib/typescript/lib/commonjs/utils.d.ts.map +1 -0
- package/lib/typescript/lib/module/Canvas.d.ts +2 -1
- package/lib/typescript/lib/module/Canvas.d.ts.map +1 -1
- package/lib/typescript/lib/module/WebGPUViewNativeComponent.web.d.ts +2 -0
- package/lib/typescript/lib/module/WebGPUViewNativeComponent.web.d.ts.map +1 -0
- package/lib/typescript/lib/module/WebPolyfillGPUModule.d.ts +2 -0
- package/lib/typescript/lib/module/WebPolyfillGPUModule.d.ts.map +1 -0
- package/lib/typescript/lib/module/hooks.d.ts +4 -3
- package/lib/typescript/lib/module/hooks.d.ts.map +1 -1
- package/lib/typescript/lib/module/index.d.ts +1 -5
- package/lib/typescript/lib/module/main/index.d.ts +6 -0
- package/lib/typescript/lib/module/main/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/main/index.web.d.ts +5 -0
- package/lib/typescript/lib/module/main/index.web.d.ts.map +1 -0
- package/lib/typescript/lib/module/types.d.ts +1 -0
- package/lib/typescript/lib/module/types.d.ts.map +1 -0
- package/lib/typescript/lib/module/utils.d.ts +2 -0
- package/lib/typescript/lib/module/utils.d.ts.map +1 -0
- package/lib/typescript/src/Canvas.d.ts +3 -2
- package/lib/typescript/src/Canvas.d.ts.map +1 -1
- package/lib/typescript/src/WebGPUViewNativeComponent.d.ts +1 -1
- package/lib/typescript/src/WebGPUViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/WebGPUViewNativeComponent.web.d.ts +118 -0
- package/lib/typescript/src/WebGPUViewNativeComponent.web.d.ts.map +1 -0
- package/lib/typescript/src/WebPolyfillGPUModule.d.ts +2 -0
- package/lib/typescript/src/WebPolyfillGPUModule.d.ts.map +1 -0
- package/lib/typescript/src/hooks.d.ts +5 -4
- package/lib/typescript/src/hooks.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +16 -5
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/main/index.d.ts +6 -0
- package/lib/typescript/src/main/index.d.ts.map +1 -0
- package/lib/typescript/src/main/index.web.d.ts +6 -0
- package/lib/typescript/src/main/index.web.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +19 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/lib/typescript/src/utils.d.ts +2 -0
- package/lib/typescript/src/utils.d.ts.map +1 -0
- package/package.json +2 -1
- package/src/Canvas.tsx +18 -5
- package/src/WebGPUViewNativeComponent.ts +1 -1
- package/src/WebGPUViewNativeComponent.web.ts +108 -0
- package/src/WebPolyfillGPUModule.ts +53 -0
- package/src/hooks.tsx +2 -2
- package/src/index.tsx +25 -196
- package/src/main/index.tsx +204 -0
- package/src/main/index.web.tsx +8 -0
- package/src/types.ts +20 -0
- package/src/utils.ts +4 -0
- package/lib/commonjs/WebGPUView.js +0 -2
- package/lib/commonjs/WebGPUView.js.map +0 -1
- package/lib/module/WebGPUView.js +0 -2
- package/lib/module/WebGPUView.js.map +0 -1
- package/lib/typescript/lib/commonjs/WebGPUView.d.ts +0 -1
- package/lib/typescript/lib/commonjs/WebGPUView.d.ts.map +0 -1
- package/lib/typescript/lib/module/WebGPUView.d.ts +0 -1
- package/lib/typescript/lib/module/WebGPUView.d.ts.map +0 -1
- package/lib/typescript/src/WebGPUView.d.ts +0 -1
- package/lib/typescript/src/WebGPUView.d.ts.map +0 -1
- package/src/WebGPUView.tsx +0 -0
package/lib/module/index.js
CHANGED
|
@@ -1,162 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import WebGPUNativeModule from "./NativeWebGPUModule";
|
|
3
|
-
export * from "./Canvas";
|
|
4
|
-
export * from "./Offscreen";
|
|
5
|
-
export * from "./WebGPUViewNativeComponent";
|
|
6
|
-
export * from "./hooks";
|
|
7
|
-
export { default as WebGPUModule } from "./NativeWebGPUModule";
|
|
8
|
-
const GPU = {};
|
|
9
|
-
GPU[Symbol.hasInstance] = function (instance) {
|
|
10
|
-
return "__brand" in instance && instance.__brand === "GPU";
|
|
11
|
-
};
|
|
12
|
-
const GPUAdapter = {};
|
|
13
|
-
GPUAdapter[Symbol.hasInstance] = function (instance) {
|
|
14
|
-
return "__brand" in instance && instance.__brand === "GPUAdapter";
|
|
15
|
-
};
|
|
16
|
-
const GPUAdapterInfo = {};
|
|
17
|
-
GPUAdapterInfo[Symbol.hasInstance] = function (instance) {
|
|
18
|
-
return "__brand" in instance && instance.__brand === "GPUAdapterInfo";
|
|
19
|
-
};
|
|
20
|
-
const GPUBindGroup = {};
|
|
21
|
-
GPUBindGroup[Symbol.hasInstance] = function (instance) {
|
|
22
|
-
return "__brand" in instance && instance.__brand === "GPUBindGroup";
|
|
23
|
-
};
|
|
24
|
-
const GPUBindGroupLayout = {};
|
|
25
|
-
GPUBindGroupLayout[Symbol.hasInstance] = function (instance) {
|
|
26
|
-
return "__brand" in instance && instance.__brand === "GPUBindGroupLayout";
|
|
27
|
-
};
|
|
28
|
-
const GPUBuffer = {};
|
|
29
|
-
GPUBuffer[Symbol.hasInstance] = function (instance) {
|
|
30
|
-
return "__brand" in instance && instance.__brand === "GPUBuffer";
|
|
31
|
-
};
|
|
32
|
-
const GPUCanvasContext = {};
|
|
33
|
-
GPUCanvasContext[Symbol.hasInstance] = function (instance) {
|
|
34
|
-
return "__brand" in instance && instance.__brand === "GPUCanvasContext";
|
|
35
|
-
};
|
|
36
|
-
const GPUCommandBuffer = {};
|
|
37
|
-
GPUCommandBuffer[Symbol.hasInstance] = function (instance) {
|
|
38
|
-
return "__brand" in instance && instance.__brand === "GPUCommandBuffer";
|
|
39
|
-
};
|
|
40
|
-
const GPUCommandEncoder = {};
|
|
41
|
-
GPUCommandEncoder[Symbol.hasInstance] = function (instance) {
|
|
42
|
-
return "__brand" in instance && instance.__brand === "GPUCommandEncoder";
|
|
43
|
-
};
|
|
44
|
-
const GPUCompilationInfo = {};
|
|
45
|
-
GPUCompilationInfo[Symbol.hasInstance] = function (instance) {
|
|
46
|
-
return "__brand" in instance && instance.__brand === "GPUCompilationInfo";
|
|
47
|
-
};
|
|
48
|
-
const GPUCompilationMessage = {};
|
|
49
|
-
GPUCompilationMessage[Symbol.hasInstance] = function (instance) {
|
|
50
|
-
return "__brand" in instance && instance.__brand === "GPUCompilationMessage";
|
|
51
|
-
};
|
|
52
|
-
const GPUComputePassEncoder = {};
|
|
53
|
-
GPUComputePassEncoder[Symbol.hasInstance] = function (instance) {
|
|
54
|
-
return "__brand" in instance && instance.__brand === "GPUComputePassEncoder";
|
|
55
|
-
};
|
|
56
|
-
const GPUComputePipeline = {};
|
|
57
|
-
GPUComputePipeline[Symbol.hasInstance] = function (instance) {
|
|
58
|
-
return "__brand" in instance && instance.__brand === "GPUComputePipeline";
|
|
59
|
-
};
|
|
60
|
-
const GPUDevice = {};
|
|
61
|
-
GPUDevice[Symbol.hasInstance] = function (instance) {
|
|
62
|
-
return "__brand" in instance && instance.__brand === "GPUDevice";
|
|
63
|
-
};
|
|
64
|
-
const GPUDeviceLostInfo = {};
|
|
65
|
-
GPUDeviceLostInfo[Symbol.hasInstance] = function (instance) {
|
|
66
|
-
return "__brand" in instance && instance.__brand === "GPUDeviceLostInfo";
|
|
67
|
-
};
|
|
68
|
-
const GPUError = {};
|
|
69
|
-
GPUError[Symbol.hasInstance] = function (instance) {
|
|
70
|
-
return "__brand" in instance && instance.__brand === "GPUError";
|
|
71
|
-
};
|
|
72
|
-
const GPUExternalTexture = {};
|
|
73
|
-
GPUExternalTexture[Symbol.hasInstance] = function (instance) {
|
|
74
|
-
return "__brand" in instance && instance.__brand === "GPUExternalTexture";
|
|
75
|
-
};
|
|
76
|
-
const GPUPipelineLayout = {};
|
|
77
|
-
GPUPipelineLayout[Symbol.hasInstance] = function (instance) {
|
|
78
|
-
return "__brand" in instance && instance.__brand === "GPUPipelineLayout";
|
|
79
|
-
};
|
|
80
|
-
const GPUQuerySet = {};
|
|
81
|
-
GPUQuerySet[Symbol.hasInstance] = function (instance) {
|
|
82
|
-
return "__brand" in instance && instance.__brand === "GPUQuerySet";
|
|
83
|
-
};
|
|
84
|
-
const GPUQueue = {};
|
|
85
|
-
GPUQueue[Symbol.hasInstance] = function (instance) {
|
|
86
|
-
return "__brand" in instance && instance.__brand === "GPUQueue";
|
|
87
|
-
};
|
|
88
|
-
const GPURenderBundle = {};
|
|
89
|
-
GPURenderBundle[Symbol.hasInstance] = function (instance) {
|
|
90
|
-
return "__brand" in instance && instance.__brand === "GPURenderBundle";
|
|
91
|
-
};
|
|
92
|
-
const GPURenderBundleEncoder = {};
|
|
93
|
-
GPURenderBundleEncoder[Symbol.hasInstance] = function (instance) {
|
|
94
|
-
return "__brand" in instance && instance.__brand === "GPURenderBundleEncoder";
|
|
95
|
-
};
|
|
96
|
-
const GPURenderPassEncoder = {};
|
|
97
|
-
GPURenderPassEncoder[Symbol.hasInstance] = function (instance) {
|
|
98
|
-
return "__brand" in instance && instance.__brand === "GPURenderPassEncoder";
|
|
99
|
-
};
|
|
100
|
-
const GPURenderPipeline = {};
|
|
101
|
-
GPURenderPipeline[Symbol.hasInstance] = function (instance) {
|
|
102
|
-
return "__brand" in instance && instance.__brand === "GPURenderPipeline";
|
|
103
|
-
};
|
|
104
|
-
const GPUSampler = {};
|
|
105
|
-
GPUSampler[Symbol.hasInstance] = function (instance) {
|
|
106
|
-
return "__brand" in instance && instance.__brand === "GPUSampler";
|
|
107
|
-
};
|
|
108
|
-
const GPUShaderModule = {};
|
|
109
|
-
GPUShaderModule[Symbol.hasInstance] = function (instance) {
|
|
110
|
-
return "__brand" in instance && instance.__brand === "GPUShaderModule";
|
|
111
|
-
};
|
|
112
|
-
const GPUTexture = {};
|
|
113
|
-
GPUTexture[Symbol.hasInstance] = function (instance) {
|
|
114
|
-
return "__brand" in instance && instance.__brand === "GPUTexture";
|
|
115
|
-
};
|
|
116
|
-
const GPUTextureView = {};
|
|
117
|
-
GPUTextureView[Symbol.hasInstance] = function (instance) {
|
|
118
|
-
return "__brand" in instance && instance.__brand === "GPUTextureView";
|
|
119
|
-
};
|
|
120
|
-
global.GPU = GPU;
|
|
121
|
-
global.GPUAdapter = GPUAdapter;
|
|
122
|
-
global.GPUAdapterInfo = GPUAdapterInfo;
|
|
123
|
-
global.GPUBindGroup = GPUBindGroup;
|
|
124
|
-
global.GPUBindGroupLayout = GPUBindGroupLayout;
|
|
125
|
-
global.GPUBuffer = GPUBuffer;
|
|
126
|
-
global.GPUCanvasContext = GPUCanvasContext;
|
|
127
|
-
global.GPUCommandBuffer = GPUCommandBuffer;
|
|
128
|
-
global.GPUCommandEncoder = GPUCommandEncoder;
|
|
129
|
-
global.GPUCompilationInfo = GPUCompilationInfo;
|
|
130
|
-
global.GPUCompilationMessage = GPUCompilationMessage;
|
|
131
|
-
global.GPUComputePassEncoder = GPUComputePassEncoder;
|
|
132
|
-
global.GPUComputePipeline = GPUComputePipeline;
|
|
133
|
-
global.GPUDevice = GPUDevice;
|
|
134
|
-
global.GPUDeviceLostInfo = GPUDeviceLostInfo;
|
|
135
|
-
global.GPUError = GPUError;
|
|
136
|
-
global.GPUExternalTexture = GPUExternalTexture;
|
|
137
|
-
global.GPUPipelineLayout = GPUPipelineLayout;
|
|
138
|
-
global.GPUQuerySet = GPUQuerySet;
|
|
139
|
-
global.GPUQueue = GPUQueue;
|
|
140
|
-
global.GPURenderBundle = GPURenderBundle;
|
|
141
|
-
global.GPURenderBundleEncoder = GPURenderBundleEncoder;
|
|
142
|
-
global.GPURenderPassEncoder = GPURenderPassEncoder;
|
|
143
|
-
global.GPURenderPipeline = GPURenderPipeline;
|
|
144
|
-
global.GPUSampler = GPUSampler;
|
|
145
|
-
global.GPUShaderModule = GPUShaderModule;
|
|
146
|
-
global.GPUTexture = GPUTexture;
|
|
147
|
-
global.GPUTextureView = GPUTextureView;
|
|
148
|
-
WebGPUNativeModule.install();
|
|
149
|
-
if (!navigator) {
|
|
150
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
151
|
-
// @ts-expect-error
|
|
152
|
-
navigator = {};
|
|
153
|
-
}
|
|
154
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
155
|
-
// @ts-expect-error
|
|
156
|
-
navigator.gpu = RNWebGPU.gpu;
|
|
1
|
+
/// <reference types="@webgpu/types" />
|
|
157
2
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
navigator.userAgent = "react-native";
|
|
161
|
-
global.createImageBitmap = global.createImageBitmap ?? ((...params) => new Promise(resolve => resolve(RNWebGPU.createImageBitmap(...params))));
|
|
3
|
+
export * from "./main";
|
|
4
|
+
export {};
|
|
162
5
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA;;AAIA,cAAc,QAAQ;AAAC","ignoreList":[]}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import WebGPUModule from "../NativeWebGPUModule";
|
|
3
|
+
export * from "../Canvas";
|
|
4
|
+
export * from "../Offscreen";
|
|
5
|
+
export * from "../WebGPUViewNativeComponent";
|
|
6
|
+
export * from "../hooks";
|
|
7
|
+
export { default as WebGPUModule } from "../NativeWebGPUModule";
|
|
8
|
+
const GPU = {};
|
|
9
|
+
GPU[Symbol.hasInstance] = function (instance) {
|
|
10
|
+
return "__brand" in instance && instance.__brand === "GPU";
|
|
11
|
+
};
|
|
12
|
+
const GPUAdapter = {};
|
|
13
|
+
GPUAdapter[Symbol.hasInstance] = function (instance) {
|
|
14
|
+
return "__brand" in instance && instance.__brand === "GPUAdapter";
|
|
15
|
+
};
|
|
16
|
+
const GPUAdapterInfo = {};
|
|
17
|
+
GPUAdapterInfo[Symbol.hasInstance] = function (instance) {
|
|
18
|
+
return "__brand" in instance && instance.__brand === "GPUAdapterInfo";
|
|
19
|
+
};
|
|
20
|
+
const GPUBindGroup = {};
|
|
21
|
+
GPUBindGroup[Symbol.hasInstance] = function (instance) {
|
|
22
|
+
return "__brand" in instance && instance.__brand === "GPUBindGroup";
|
|
23
|
+
};
|
|
24
|
+
const GPUBindGroupLayout = {};
|
|
25
|
+
GPUBindGroupLayout[Symbol.hasInstance] = function (instance) {
|
|
26
|
+
return "__brand" in instance && instance.__brand === "GPUBindGroupLayout";
|
|
27
|
+
};
|
|
28
|
+
const GPUBuffer = {};
|
|
29
|
+
GPUBuffer[Symbol.hasInstance] = function (instance) {
|
|
30
|
+
return "__brand" in instance && instance.__brand === "GPUBuffer";
|
|
31
|
+
};
|
|
32
|
+
const GPUCanvasContext = {};
|
|
33
|
+
GPUCanvasContext[Symbol.hasInstance] = function (instance) {
|
|
34
|
+
return "__brand" in instance && instance.__brand === "GPUCanvasContext";
|
|
35
|
+
};
|
|
36
|
+
const GPUCommandBuffer = {};
|
|
37
|
+
GPUCommandBuffer[Symbol.hasInstance] = function (instance) {
|
|
38
|
+
return "__brand" in instance && instance.__brand === "GPUCommandBuffer";
|
|
39
|
+
};
|
|
40
|
+
const GPUCommandEncoder = {};
|
|
41
|
+
GPUCommandEncoder[Symbol.hasInstance] = function (instance) {
|
|
42
|
+
return "__brand" in instance && instance.__brand === "GPUCommandEncoder";
|
|
43
|
+
};
|
|
44
|
+
const GPUCompilationInfo = {};
|
|
45
|
+
GPUCompilationInfo[Symbol.hasInstance] = function (instance) {
|
|
46
|
+
return "__brand" in instance && instance.__brand === "GPUCompilationInfo";
|
|
47
|
+
};
|
|
48
|
+
const GPUCompilationMessage = {};
|
|
49
|
+
GPUCompilationMessage[Symbol.hasInstance] = function (instance) {
|
|
50
|
+
return "__brand" in instance && instance.__brand === "GPUCompilationMessage";
|
|
51
|
+
};
|
|
52
|
+
const GPUComputePassEncoder = {};
|
|
53
|
+
GPUComputePassEncoder[Symbol.hasInstance] = function (instance) {
|
|
54
|
+
return "__brand" in instance && instance.__brand === "GPUComputePassEncoder";
|
|
55
|
+
};
|
|
56
|
+
const GPUComputePipeline = {};
|
|
57
|
+
GPUComputePipeline[Symbol.hasInstance] = function (instance) {
|
|
58
|
+
return "__brand" in instance && instance.__brand === "GPUComputePipeline";
|
|
59
|
+
};
|
|
60
|
+
const GPUDevice = {};
|
|
61
|
+
GPUDevice[Symbol.hasInstance] = function (instance) {
|
|
62
|
+
return "__brand" in instance && instance.__brand === "GPUDevice";
|
|
63
|
+
};
|
|
64
|
+
const GPUDeviceLostInfo = {};
|
|
65
|
+
GPUDeviceLostInfo[Symbol.hasInstance] = function (instance) {
|
|
66
|
+
return "__brand" in instance && instance.__brand === "GPUDeviceLostInfo";
|
|
67
|
+
};
|
|
68
|
+
const GPUError = {};
|
|
69
|
+
GPUError[Symbol.hasInstance] = function (instance) {
|
|
70
|
+
return "__brand" in instance && instance.__brand === "GPUError";
|
|
71
|
+
};
|
|
72
|
+
const GPUExternalTexture = {};
|
|
73
|
+
GPUExternalTexture[Symbol.hasInstance] = function (instance) {
|
|
74
|
+
return "__brand" in instance && instance.__brand === "GPUExternalTexture";
|
|
75
|
+
};
|
|
76
|
+
const GPUPipelineLayout = {};
|
|
77
|
+
GPUPipelineLayout[Symbol.hasInstance] = function (instance) {
|
|
78
|
+
return "__brand" in instance && instance.__brand === "GPUPipelineLayout";
|
|
79
|
+
};
|
|
80
|
+
const GPUQuerySet = {};
|
|
81
|
+
GPUQuerySet[Symbol.hasInstance] = function (instance) {
|
|
82
|
+
return "__brand" in instance && instance.__brand === "GPUQuerySet";
|
|
83
|
+
};
|
|
84
|
+
const GPUQueue = {};
|
|
85
|
+
GPUQueue[Symbol.hasInstance] = function (instance) {
|
|
86
|
+
return "__brand" in instance && instance.__brand === "GPUQueue";
|
|
87
|
+
};
|
|
88
|
+
const GPURenderBundle = {};
|
|
89
|
+
GPURenderBundle[Symbol.hasInstance] = function (instance) {
|
|
90
|
+
return "__brand" in instance && instance.__brand === "GPURenderBundle";
|
|
91
|
+
};
|
|
92
|
+
const GPURenderBundleEncoder = {};
|
|
93
|
+
GPURenderBundleEncoder[Symbol.hasInstance] = function (instance) {
|
|
94
|
+
return "__brand" in instance && instance.__brand === "GPURenderBundleEncoder";
|
|
95
|
+
};
|
|
96
|
+
const GPURenderPassEncoder = {};
|
|
97
|
+
GPURenderPassEncoder[Symbol.hasInstance] = function (instance) {
|
|
98
|
+
return "__brand" in instance && instance.__brand === "GPURenderPassEncoder";
|
|
99
|
+
};
|
|
100
|
+
const GPURenderPipeline = {};
|
|
101
|
+
GPURenderPipeline[Symbol.hasInstance] = function (instance) {
|
|
102
|
+
return "__brand" in instance && instance.__brand === "GPURenderPipeline";
|
|
103
|
+
};
|
|
104
|
+
const GPUSampler = {};
|
|
105
|
+
GPUSampler[Symbol.hasInstance] = function (instance) {
|
|
106
|
+
return "__brand" in instance && instance.__brand === "GPUSampler";
|
|
107
|
+
};
|
|
108
|
+
const GPUShaderModule = {};
|
|
109
|
+
GPUShaderModule[Symbol.hasInstance] = function (instance) {
|
|
110
|
+
return "__brand" in instance && instance.__brand === "GPUShaderModule";
|
|
111
|
+
};
|
|
112
|
+
const GPUTexture = {};
|
|
113
|
+
GPUTexture[Symbol.hasInstance] = function (instance) {
|
|
114
|
+
return "__brand" in instance && instance.__brand === "GPUTexture";
|
|
115
|
+
};
|
|
116
|
+
const GPUTextureView = {};
|
|
117
|
+
GPUTextureView[Symbol.hasInstance] = function (instance) {
|
|
118
|
+
return "__brand" in instance && instance.__brand === "GPUTextureView";
|
|
119
|
+
};
|
|
120
|
+
global.GPU = GPU;
|
|
121
|
+
global.GPUAdapter = GPUAdapter;
|
|
122
|
+
global.GPUAdapterInfo = GPUAdapterInfo;
|
|
123
|
+
global.GPUBindGroup = GPUBindGroup;
|
|
124
|
+
global.GPUBindGroupLayout = GPUBindGroupLayout;
|
|
125
|
+
global.GPUBuffer = GPUBuffer;
|
|
126
|
+
global.GPUCanvasContext = GPUCanvasContext;
|
|
127
|
+
global.GPUCommandBuffer = GPUCommandBuffer;
|
|
128
|
+
global.GPUCommandEncoder = GPUCommandEncoder;
|
|
129
|
+
global.GPUCompilationInfo = GPUCompilationInfo;
|
|
130
|
+
global.GPUCompilationMessage = GPUCompilationMessage;
|
|
131
|
+
global.GPUComputePassEncoder = GPUComputePassEncoder;
|
|
132
|
+
global.GPUComputePipeline = GPUComputePipeline;
|
|
133
|
+
global.GPUDevice = GPUDevice;
|
|
134
|
+
global.GPUDeviceLostInfo = GPUDeviceLostInfo;
|
|
135
|
+
global.GPUError = GPUError;
|
|
136
|
+
global.GPUExternalTexture = GPUExternalTexture;
|
|
137
|
+
global.GPUPipelineLayout = GPUPipelineLayout;
|
|
138
|
+
global.GPUQuerySet = GPUQuerySet;
|
|
139
|
+
global.GPUQueue = GPUQueue;
|
|
140
|
+
global.GPURenderBundle = GPURenderBundle;
|
|
141
|
+
global.GPURenderBundleEncoder = GPURenderBundleEncoder;
|
|
142
|
+
global.GPURenderPassEncoder = GPURenderPassEncoder;
|
|
143
|
+
global.GPURenderPipeline = GPURenderPipeline;
|
|
144
|
+
global.GPUSampler = GPUSampler;
|
|
145
|
+
global.GPUShaderModule = GPUShaderModule;
|
|
146
|
+
global.GPUTexture = GPUTexture;
|
|
147
|
+
global.GPUTextureView = GPUTextureView;
|
|
148
|
+
WebGPUModule.install();
|
|
149
|
+
if (!navigator) {
|
|
150
|
+
// @ts-expect-error Navigation object is more complex than this, setting it to an empty object to add gpu property
|
|
151
|
+
navigator = {
|
|
152
|
+
gpu: RNWebGPU.gpu,
|
|
153
|
+
userAgent: "react-native"
|
|
154
|
+
};
|
|
155
|
+
} else {
|
|
156
|
+
navigator.gpu = RNWebGPU.gpu;
|
|
157
|
+
if (typeof navigator.userAgent !== "string") {
|
|
158
|
+
try {
|
|
159
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
160
|
+
// @ts-ignore - Hermes navigator may not include a userAgent, align with the polyfill if needed
|
|
161
|
+
navigator.userAgent = "react-native";
|
|
162
|
+
} catch {
|
|
163
|
+
// navigator.userAgent can be read-only; ignore if assignment fails
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
global.createImageBitmap = global.createImageBitmap ?? ((...params) => new Promise(resolve => resolve(RNWebGPU.createImageBitmap(...params))));
|
|
168
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["WebGPUModule","default","GPU","Symbol","hasInstance","instance","__brand","GPUAdapter","GPUAdapterInfo","GPUBindGroup","GPUBindGroupLayout","GPUBuffer","GPUCanvasContext","GPUCommandBuffer","GPUCommandEncoder","GPUCompilationInfo","GPUCompilationMessage","GPUComputePassEncoder","GPUComputePipeline","GPUDevice","GPUDeviceLostInfo","GPUError","GPUExternalTexture","GPUPipelineLayout","GPUQuerySet","GPUQueue","GPURenderBundle","GPURenderBundleEncoder","GPURenderPassEncoder","GPURenderPipeline","GPUSampler","GPUShaderModule","GPUTexture","GPUTextureView","global","install","navigator","gpu","RNWebGPU","userAgent","createImageBitmap","params","Promise","resolve"],"sourceRoot":"../../../src","sources":["main/index.tsx"],"mappings":"AAAA;AACA,OAAOA,YAAY,MAAM,uBAAuB;AAEhD,cAAc,WAAW;AACzB,cAAc,cAAc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}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "../WebPolyfillGPUModule";
|
|
2
|
+
export * from "../Canvas";
|
|
3
|
+
export * from "../Offscreen";
|
|
4
|
+
export * from "../WebGPUViewNativeComponent";
|
|
5
|
+
export * from "../hooks";
|
|
6
|
+
|
|
7
|
+
// We don't need to set all global properties on web, webgpu is already available globally
|
|
8
|
+
//# sourceMappingURL=index.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["main/index.web.tsx"],"mappings":"AAAA,OAAO,yBAAyB;AAEhC,cAAc,WAAW;AACzB,cAAc,cAAc;AAC5B,cAAc,8BAA8B;AAC5C,cAAc,UAAU;;AAExB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["contextIdToId","contextId"],"sourceRoot":"../../src","sources":["utils.ts"],"mappings":"AAAA;AACA,OAAO,SAASA,aAAaA,CAACC,SAAiB,EAAE;EAC/C,OAAO,gBAAgB,GAAGA,SAAS;AACrC","ignoreList":[]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export const __esModule: boolean;
|
|
2
|
+
export default WebGPUViewNativeComponent;
|
|
3
|
+
declare function WebGPUViewNativeComponent(props: any): _react.DetailedReactHTMLElement<any, HTMLElement>;
|
|
4
|
+
import _react = require("react");
|
|
5
|
+
//# sourceMappingURL=WebGPUViewNativeComponent.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebGPUViewNativeComponent.web.d.ts","sourceRoot":"","sources":["../../../commonjs/WebGPUViewNativeComponent.web.js"],"names":[],"mappings":";;AA4CA,0GA8BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebPolyfillGPUModule.d.ts","sourceRoot":"","sources":["../../../commonjs/WebPolyfillGPUModule.js"],"names":[],"mappings":""}
|
|
@@ -4,16 +4,15 @@ export function GPUDeviceProvider({ children, adapterOptions, deviceDescriptor }
|
|
|
4
4
|
children: any;
|
|
5
5
|
adapterOptions: any;
|
|
6
6
|
deviceDescriptor: any;
|
|
7
|
-
}):
|
|
7
|
+
}): any;
|
|
8
8
|
export function useSurface(): {
|
|
9
|
-
ref:
|
|
10
|
-
surface:
|
|
9
|
+
ref: any;
|
|
10
|
+
surface: any;
|
|
11
11
|
};
|
|
12
|
-
export function useMainDevice():
|
|
13
|
-
export function useCanvasRef():
|
|
12
|
+
export function useMainDevice(): any;
|
|
13
|
+
export function useCanvasRef(): any;
|
|
14
14
|
export function useDevice(adapterOptions: any, deviceDescriptor: any): {
|
|
15
15
|
adapter: any;
|
|
16
16
|
device: any;
|
|
17
17
|
};
|
|
18
|
-
import _react = require("react");
|
|
19
18
|
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../commonjs/hooks.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../commonjs/hooks.js"],"names":[],"mappings":";AAQA,iEAMC;AAGD;;;;QAYC;AAED;;;EAWC;AAED,qCAMC;AAED,oCAAmD;AAEnD;;;EA0BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commonjs/main/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../commonjs/main/index.web.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../commonjs/types.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../commonjs/utils.js"],"names":[],"mappings":";AAOA,sDAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Canvas.d.ts","sourceRoot":"","sources":["../../../module/Canvas.js"],"names":[],"mappings":"AAQA,
|
|
1
|
+
{"version":3,"file":"Canvas.d.ts","sourceRoot":"","sources":["../../../module/Canvas.js"],"names":[],"mappings":"AAQA,+EA0CG;kBAjDsE,OAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebGPUViewNativeComponent.web.d.ts","sourceRoot":"","sources":["../../../module/WebGPUViewNativeComponent.web.js"],"names":[],"mappings":"AAsCA,0HA8BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebPolyfillGPUModule.d.ts","sourceRoot":"","sources":["../../../module/WebPolyfillGPUModule.js"],"names":[],"mappings":""}
|
|
@@ -3,15 +3,16 @@ export function GPUDeviceProvider({ children, adapterOptions, deviceDescriptor }
|
|
|
3
3
|
children: any;
|
|
4
4
|
adapterOptions: any;
|
|
5
5
|
deviceDescriptor: any;
|
|
6
|
-
}):
|
|
6
|
+
}): React.DetailedReactHTMLElement<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> | null;
|
|
7
7
|
export function useSurface(): {
|
|
8
|
-
ref:
|
|
8
|
+
ref: React.MutableRefObject<null>;
|
|
9
9
|
surface: null;
|
|
10
10
|
};
|
|
11
11
|
export function useMainDevice(): never;
|
|
12
|
-
export function useCanvasRef():
|
|
12
|
+
export function useCanvasRef(): React.MutableRefObject<null>;
|
|
13
13
|
export function useDevice(adapterOptions: any, deviceDescriptor: any): {
|
|
14
14
|
adapter: any;
|
|
15
15
|
device: any;
|
|
16
16
|
};
|
|
17
|
+
import React from "react";
|
|
17
18
|
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../module/hooks.js"],"names":[],"mappings":"AACO,iEAMN;AAEM;;;;
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../module/hooks.js"],"names":[],"mappings":"AACO,iEAMN;AAEM;;;;yGAYN;AACM;;;EAWN;AACM,uCAMN;AACM,6DAAuC;AACvC;;;EA0BN;kBApE8F,OAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../module/main/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../module/main/index.web.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../module/types.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../module/utils.js"],"names":[],"mappings":"AACA,sDAEC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { ViewProps } from "react-native";
|
|
2
3
|
declare global {
|
|
3
4
|
var RNWebGPU: {
|
|
@@ -25,8 +26,8 @@ export interface CanvasRef {
|
|
|
25
26
|
getContext(contextName: "webgpu"): RNCanvasContext | null;
|
|
26
27
|
getNativeSurface: () => NativeCanvas;
|
|
27
28
|
}
|
|
28
|
-
export declare const Canvas:
|
|
29
|
+
export declare const Canvas: React.ForwardRefExoticComponent<ViewProps & {
|
|
29
30
|
transparent?: boolean;
|
|
30
|
-
} &
|
|
31
|
+
} & React.RefAttributes<CanvasRef>>;
|
|
31
32
|
export {};
|
|
32
33
|
//# sourceMappingURL=Canvas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Canvas.d.ts","sourceRoot":"","sources":["../../../src/Canvas.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Canvas.d.ts","sourceRoot":"","sources":["../../../src/Canvas.tsx"],"names":[],"mappings":"AAAA,OAAO,KAKN,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAU9C,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,QAAQ,EAAE;QACZ,GAAG,EAAE,GAAG,CAAC;QACT,MAAM,EAAE,OAAO,CAAC;QAChB,gBAAgB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,YAAY,CAAC;QACtD,uBAAuB,EAAE,CACvB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,KACX,eAAe,CAAC;QACrB,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,eAAe,GAAG,WAAW,KAAK,MAAM,CAAC;QACvE,iBAAiB,EAAE,OAAO,iBAAiB,CAAC;KAC7C,CAAC;CACH;AAED,KAAK,cAAc,GAAG,MAAM,CAAC;AAE7B,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAAG;IAC/C,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,MAAM,WAAW,SAAS;IACxB,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,UAAU,CAAC,WAAW,EAAE,QAAQ,GAAG,eAAe,GAAG,IAAI,CAAC;IAC1D,gBAAgB,EAAE,MAAM,YAAY,CAAC;CACtC;AAED,eAAO,MAAM,MAAM;kBAEW,OAAO;mCA2CnC,CAAC"}
|