react-unity-webgl
Advanced tools
Comparing version 8.7.4 to 8.7.5
/** | ||
* WebGLContextAttributes object that contains the actual context parameters. | ||
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext#parameters (@WebGL context attributes) | ||
* @see https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getContextAttributes | ||
@@ -7,3 +8,3 @@ */ | ||
/** | ||
* If set to true, the context will have an alpha (transparency) channel. | ||
* If set to true, the context contains an alpha (transparency) buffer. | ||
* @public | ||
@@ -16,4 +17,3 @@ * @readonly | ||
/** | ||
* If set to true, the context will attempt to perform antialiased rendering | ||
* if possible. | ||
* If set to true, the context is requested to have a 16 bit depth buffer. | ||
* @public | ||
@@ -24,14 +24,30 @@ * @readonly | ||
*/ | ||
readonly antialias?: boolean; | ||
readonly depth?: boolean; | ||
/** | ||
* If set to true, the context will have a 16 bit depth buffer. Defaults to | ||
* true. Use gl.enable(DEPTH_TEST) to enable the depth test and | ||
* gl.depthFunc(), gl.depthMask(), and gl.depthRange() to configure the depth | ||
* test. | ||
* If set to true, the context is requested to have a stencil buffer of at | ||
* least 8 bits. | ||
* @public | ||
* @readonly | ||
* @type {boolean} | ||
* @default false | ||
*/ | ||
readonly stencil?: boolean; | ||
/** | ||
* If set to true, this hints the user agent (browser) to reduce the latency | ||
* by desynchronizing the context paint cycle from the event loop. | ||
* @public | ||
* @readonly | ||
* @type {boolean} | ||
* @default false | ||
*/ | ||
readonly desynchronized?: boolean; | ||
/** | ||
* If set to true, the context will attempt to perform antialiased rendering | ||
* if possible. | ||
* @public | ||
* @readonly | ||
* @type {boolean} | ||
* @default true | ||
*/ | ||
readonly depth?: boolean; | ||
readonly antialias?: boolean; | ||
/** | ||
@@ -53,13 +69,18 @@ * If the value is true, context creation will fail if the implementation | ||
/** | ||
* Provides a hint to the user agent indicating what configuration of GPU is | ||
* suitable for this WebGL context. This may influence which GPU is used in a | ||
* system with multiple GPUs. For example, a dual-GPU system might have one | ||
* GPU that consumes less power at the expense of rendering performance. | ||
* Note that this property is only a hint and a WebGL implementation may | ||
* choose to ignore it. WebGL implementations use context lost and restored | ||
* events to regulate power and memory consumption, regardless of the value of | ||
* this attribute. | ||
* Provides a hint to the user agent (browser) indicating what configuration | ||
* of GPU is suitable for this WebGL context. This may influence which GPU is | ||
* used in a system with multiple GPUs. For example, a dual-GPU system might | ||
* have one GPU that consumes less power at the expense of rendering | ||
* performance. Note that this property is only a hint and a WebGL | ||
* implementation may choose to ignore it. WebGL implementations use context | ||
* lost and restoredevents to regulate power and memory consumption, | ||
* regardless of the value of this attribute. | ||
* - default: Let the user agent (browser) decide which GPU configuration is | ||
* most suitable. | ||
* - high-performance: Prioritizes rendering performance over power | ||
* consumption. | ||
* - low-power: Prioritizes power saving over rendering performance. | ||
* @public | ||
* @readonly | ||
* @type {boolean} | ||
* @type {"default" | "high-performance" | "low-power"} | ||
* @default "default" | ||
@@ -69,4 +90,5 @@ */ | ||
/** | ||
* If set to true, the color channels in the framebuffer will be stored | ||
* premultipled by the alpha channel to improve performance. | ||
* If set to true, page compositor will assume the drawing buffer contains colors | ||
* with pre-multiplied alpha. (The color channels in the framebuffer should be | ||
* stored premultipled by the alpha channel to improve performance.) | ||
* @public | ||
@@ -79,7 +101,7 @@ * @readonly | ||
/** | ||
* If set to false, the buffer will be cleared after rendering. If you wish to | ||
* use canvas.toDataURL(), you will either need to draw to the canvas | ||
* immediately before calling toDataURL(), or set preserveDrawingBuffer to | ||
* true to keep the buffer available after the browser has displayed the | ||
* buffer (at the cost of increased memory use). | ||
* If set to true, the buffers will not be cleared and will preserve their values | ||
* until cleared or overwritten by the author. If you wish to use canvas.toDataURL() | ||
* you will either need to draw to the canvas immediately before calling toDataURL() | ||
* or set preserveDrawingBuffer to true to keep the buffer available after the | ||
* browser has displayed the buffer (at the cost of increased memory use). | ||
* @public | ||
@@ -92,3 +114,6 @@ * @readonly | ||
/** | ||
* | ||
* If set to true, this hints to the user agent (browser) to use a compatible graphics | ||
* adapter for an immersive XR device. Setting this synchronous flag at context creation | ||
* is discouraged; rather call the asynchronous WebGLRenderingContext.makeXRCompatible() | ||
* method the moment you intend to start an XR session. | ||
* @public | ||
@@ -99,24 +124,4 @@ * @readonly | ||
*/ | ||
readonly stencil?: boolean; | ||
/** | ||
* If set to true, the context will have an 8 bit stencil buffer. Defaults to | ||
* false. Use gl.enable(STENCIL_TEST) to enable depth test and | ||
* gl.stencilFunc(), gl.stencilFuncSeparate(), gl.stencilMask(), | ||
* gl.stencilMaskSeparate(), gl.stencilOp(), and gl.stencilOpSeparate() | ||
* to configure the stencil test. | ||
* @public | ||
* @readonly | ||
* @type {boolean} | ||
* @default false | ||
*/ | ||
readonly desynchronized?: boolean; | ||
/** | ||
* xrCompatible is a boolean that indicates whether the context is compatible. | ||
* @public | ||
* @readonly | ||
* @type {boolean} | ||
* @default false | ||
*/ | ||
readonly xrCompatible?: boolean; | ||
} | ||
//# sourceMappingURL=webgl-context-attributes.d.ts.map |
{ | ||
"name": "react-unity-webgl", | ||
"version": "8.7.4", | ||
"version": "8.7.5", | ||
"description": "React Unity WebGL provides an easy solution for embedding Unity WebGL builds in your React application, with two-way communication between your React and Unity application with advanced API's.", | ||
@@ -57,3 +57,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@types/react": "17.0.38", | ||
"@types/react": "17.0.39", | ||
"typescript": "4.5.4" | ||
@@ -60,0 +60,0 @@ }, |
@@ -1,2 +0,1 @@ | ||
- Fixed an issue where the canvas event would not pass the correct reference [#314] | ||
- Updated some documentation | ||
- Improved typings for the WebGL Context Attributes [#327] |
Sorry, the diff of this file is not supported yet
124643
1229
47