bug(@typegpu/react): useConfigureContext ignores option changes after mount
Los mantenedores suelen responder en 2 días
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- frontend
Línea de trabajo
Find useConfigureContext in the React package and trace when it calls the WebGPU context's configure method. Check how the hook observes option changes and compares values, especially for viewFormats. Add or update tests for changing options after mount, then confirm reconfiguration occurs when values change and not just when array references change.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
useConfigureContext only configures the context when the canvas attaches (or when the root changes), so changing any of its canvas options after the first mount (alphaMode, colorSpace, format, toneMapping, usage, viewFormats) is silently ignored.
function Canvas({ transparent }: { transparent: boolean }) {
const { ref } = useConfigureContext({
alphaMode: transparent ? 'premultiplied' : 'opaque',
});
return <canvas ref={ref} />;
}
// Mounting with `transparent={false}` configures the context with `alphaMode: 'opaque'`.
// Re-rendering with `transparent={true}` never calls `configure` again, so the canvas stays opaque.
The context should be reconfigured whenever the options change, comparing them by value (e.g. viewFormats is an array, which would otherwise be a new reference on every render).
- Lenguaje dominante
- TypeScript
- Estrellas
- 3.3k
- Forks
- 141
- Merge medio
- 3 d 8 h
- PR fusionados (30 d)
- 72
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de software-mansion/TypeGPU
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
software-mansion/TypeGPU#3276 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
software-mansion/TypeGPU#3219 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
texture.write(VideoFrame) uses the padded coded size instead of the visible sizePosiblemente ocupada @RaphaelFakhri la tomó hace 9 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
software-mansion/TypeGPU#3213 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
impr: Error message in examplesAbiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
software-mansion/TypeGPU#3008 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
software-mansion/TypeGPU#2948 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
Todos los issues de software-mansion/TypeGPU
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
better-auth/better-auth#12132 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
o8 next debug build aborts on Glass to Dark appearance switch (nil identifier messaged before check)Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
hurttlocker/o8#5112 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
webrecorder/wabac.js#386 ·
-
needs-triage
Dificultad 1/5 1-3 horas Aptitud para principiantes 92/100
agent-of-empires/agent-of-empires#5098 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día