| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/de/docs/Web/API/WebGLContextEvent | [Back] [Original] |
Get to know MDN better
Dieser Inhalt wurde automatisch aus dem Englischen bersetzt, und kann Fehler enthalten. Erfahre mehr ber dieses Experiment.
Diese Funktion ist gut etabliert und funktioniert auf vielen Gerten und in vielen Browserversionen. Sie ist seit September 2016 browserbergreifend verfgbar.
* Einige Teile dieser Funktion werden mglicherweise unterschiedlich gut untersttzt.
Hinweis: Diese Funktion ist in Web Workers verfgbar.
Die WebGLContextEvent-Schnittstelle ist Teil der WebGL API und stellt eine Schnittstelle fr ein Ereignis dar, das als Reaktion auf eine Statusnderung des WebGL-Rendering-Kontextes erzeugt wird.
Event WebGLContextEventWebGLContextEvent()Erstellt ein neues WebGLContextEvent-Objekt.
Diese Schnittstelle erbt Eigenschaften von ihrer Elternschnittstelle, Event.
WebGLContextEvent.statusMessageEine schreibgeschtzte Eigenschaft, die zustzliche Informationen ber das Ereignis enthlt.
Diese Schnittstelle definiert keine eigenen Methoden, erbt jedoch Methoden von ihrer Elternschnittstelle, Event.
Mit Hilfe der WEBGL_lose_context-Erweiterung knnen Sie die Ereignisse webglcontextlost und webglcontextrestored simulieren:
const canvas = document.getElementById("canvas");
const gl = canvas.getContext("webgl");
canvas.addEventListener("webglcontextlost", (e) => {
console.log(e);
});
gl.getExtension("WEBGL_lose_context").loseContext();
// WebGLContextEvent event with type "webglcontextlost" is logged.
| Spezifikation |
|---|
| WebGL Specification # 5.15 |
WebGLRenderingContext.isContextLost()WEBGL_lose_context, WEBGL_lose_context.loseContext(), WEBGL_lose_context.restoreContext()WebGLContextEventANGLE_instanced_arraysEXT_blend_minmaxEXT_color_buffer_half_floatEXT_disjoint_timer_queryEXT_frag_depthEXT_sRGBEXT_shader_texture_lodEXT_texture_filter_anisotropicOES_draw_buffers_indexedOES_element_index_uintOES_standard_derivativesOES_texture_floatOES_texture_float_linearOES_texture_half_floatOES_texture_half_float_linearOES_vertex_array_objectWEBGL_color_buffer_floatWEBGL_compressed_texture_etc1WEBGL_compressed_texture_pvrtcWEBGL_compressed_texture_s3tcWEBGL_compressed_texture_s3tc_srgbWEBGL_debug_renderer_infoWEBGL_debug_shadersWEBGL_depth_textureWEBGL_draw_buffersWEBGL_lose_contextWebGL2RenderingContextWebGLActiveInfoWebGLBufferWebGLFramebufferWebGLObjectWebGLProgramWebGLQueryWebGLRenderbufferWebGLRenderingContextWebGLSamplerWebGLShaderWebGLShaderPrecisionFormatWebGLSyncWebGLTextureWebGLTransformFeedbackWebGLUniformLocationWebGLVertexArrayObjectDer Bauplan fr ein besseres Internet.
Teile dieses Inhalts sind 19982026 von einzelnen mozilla.org-Mitwirkenden. Inhalte sind verfgbar unter einer Creative-Commons-Lizenz.
| Web Proxy Viewer | New URL | Original Page |