Make an Export to X option
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- typescript
- Ambito
- web-dev
Direzione di ricerca
Start by inspecting how the TypeScript samples, imports, and asset paths are assembled and served; the issue specifically shows imports and relative cubemap image URLs as examples. Define the supported multi-file export targets and determine how each export rewrites module and asset URLs. Done means a sample can be exported to at least one supported service with its files and references working.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
It's nice to be able to edit the sample easily so consider making an [Export to X] where X is any service that supports multiple files.
- Examples: playcode, stackblitz, codesandbox.
- Non-Examples: jsfiddle, jsbin, these do not support multiple files.
The biggest issue is that the files need to URLs changed when uploaded.
Example:
import { mat4 } from 'wgpu-matrix';
import sampleCubemapWGSL from './sampleCubemap.wgsl';
import { quitIfWebGPUNotAvailableOrMissingFeatures } from '../util';
...
let cubemapTexture: GPUTexture;
{
// The order of the array layers is [+X, -X, +Y, -Y, +Z, -Z]
const imgSrcs = [
'../../assets/img/cubemap/posx.jpg',
'../../assets/img/cubemap/negx.jpg',
'../../assets/img/cubemap/posy.jpg',
'../../assets/img/cubemap/negy.jpg',
'../../assets/img/cubemap/posz.jpg',
'../../assets/img/cubemap/negz.jpg',
];
const promises = imgSrcs.map(async (src) => {
Need to change to
import { mat4 } from 'https://unpkg.com/wgpu-matrix@latest/dist/3.x/wgpu-matrix.module.js'; // <- CHANGED
import sampleCubemapWGSL from './sampleCubemap.wgsl';
import { quitIfWebGPUNotAvailableOrMissingFeatures } from '../util'; // <- CHANGE?
...
let cubemapTexture: GPUTexture;
{
// The order of the array layers is [+X, -X, +Y, -Y, +Z, -Z]
const imgSrcs = [
'https://webgpu.github.io/webgpu-samples/assets/img/cubemap/posx.jpg', // <- CHANGED
'https://webgpu.github.io/webgpu-samples/assets/img/cubemap/negx.jpg', // <- CHANGED
'https://webgpu.github.io/webgpu-samples/assets/img/cubemap/posy.jpg', // <- CHANGED
'https://webgpu.github.io/webgpu-samples/assets/img/cubemap/negy.jpg', // <- CHANGED
'https://webgpu.github.io/webgpu-samples/assets/img/cubemap/posz.jpg', // <- CHANGED
'https://webgpu.github.io/webgpu-samples/assets/img/cubemap/negz.jpg', // <- CHANGED
];
const promises = imgSrcs.map(async (src) => {
Of course you could just import the entire repo
- Lingua principale
- TypeScript
- Stelle
- 2.2k
- Fork
- 357
- Merge medio
- 18h 40m
- PR unite (30g)
- 1
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di webgpu/webgpu-samples
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
webgpu/webgpu-samples#571 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
webgpu/webgpu-samples#564 · 2 commenti ·
-
Consider removing codemirror Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
webgpu/webgpu-samples#559 · 3 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
webgpu/webgpu-samples#542 · 9 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
webgpu/webgpu-samples#541 · 5 commenti ·
Tutte le issue di webgpu/webgpu-samples
Issue simili
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
Mend: dependency security vulnerability untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100