Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Make an Export to X option

Đang mở
#560 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
web-dev

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
2.2k
Fork
357
Merge trung bình
18 giờ 40 phút
Pull request đã merge (30 ngày)
1

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của webgpu/webgpu-samples

Tất cả issue của webgpu/webgpu-samples

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.