Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Make an Export to X option

Aperta
#560 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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.

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di webgpu/webgpu-samples

Tutte le issue di webgpu/webgpu-samples

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.