You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.warn('KTX2Loader: "detectSupportAsync()" has been deprecated. Use "detectSupport()" and "await renderer.init();" when creating the renderer.');// @deprecated r181
warnOnce('Renderer: "clearAsync()" has been deprecated. Use "clear()" and "await renderer.init();" when creating the renderer.');// @deprecated r181
2123
2105
2124
2106
this.clear(color,depth,stencil);
2125
2107
@@ -2129,35 +2111,44 @@ class Renderer {
2129
2111
* Async version of {@link Renderer#clearColor}.
2130
2112
*
2131
2113
* @async
2114
+
* @deprecated
2132
2115
* @return {Promise} A Promise that resolves when the clear operation has been executed.
2133
2116
*/
2134
2117
asyncclearColorAsync(){
2135
2118
2136
-
this.clearAsync(true,false,false);
2119
+
warnOnce('Renderer: "clearColorAsync()" has been deprecated. Use "clearColor()" and "await renderer.init();" when creating the renderer.');// @deprecated r181
2120
+
2121
+
this.clear(true,false,false);
2137
2122
2138
2123
}
2139
2124
2140
2125
/**
2141
2126
* Async version of {@link Renderer#clearDepth}.
2142
2127
*
2143
2128
* @async
2129
+
* @deprecated
2144
2130
* @return {Promise} A Promise that resolves when the clear operation has been executed.
2145
2131
*/
2146
2132
asyncclearDepthAsync(){
2147
2133
2148
-
this.clearAsync(false,true,false);
2134
+
warnOnce('Renderer: "clearDepthAsync()" has been deprecated. Use "clearDepth()" and "await renderer.init();" when creating the renderer.');// @deprecated r181
2135
+
2136
+
this.clear(false,true,false);
2149
2137
2150
2138
}
2151
2139
2152
2140
/**
2153
2141
* Async version of {@link Renderer#clearStencil}.
2154
2142
*
2155
2143
* @async
2144
+
* @deprecated
2156
2145
* @return {Promise} A Promise that resolves when the clear operation has been executed.
2157
2146
*/
2158
2147
asyncclearStencilAsync(){
2159
2148
2160
-
this.clearAsync(false,false,true);
2149
+
warnOnce('Renderer: "clearStencilAsync()" has been deprecated. Use "clearStencil()" and "await renderer.init();" when creating the renderer.');// @deprecated r181
2150
+
2151
+
this.clear(false,false,true);
2161
2152
2162
2153
}
2163
2154
@@ -2550,14 +2541,15 @@ class Renderer {
2550
2541
* Checks if the given feature is supported by the selected backend.
2551
2542
*
2552
2543
* @async
2544
+
* @deprecated
2553
2545
* @param {string} name - The feature's name.
2554
2546
* @return {Promise<boolean>} A Promise that resolves with a bool that indicates whether the feature is supported or not.
2555
2547
*/
2556
2548
asynchasFeatureAsync(name){
2557
2549
2558
-
if(this._initialized===false)awaitthis.init();
2550
+
warnOnce('Renderer: "hasFeatureAsync()" has been deprecated. Use "hasFeature()" and "await renderer.init();" when creating the renderer.');// @deprecated r181
2559
2551
2560
-
returnthis.backend.hasFeature(name);
2552
+
returnthis.hasFeature(name);
2561
2553
2562
2554
}
2563
2555
@@ -2580,9 +2572,7 @@ class Renderer {
2580
2572
2581
2573
if(this._initialized===false){
2582
2574
2583
-
warn('Renderer: .hasFeature() called before the backend is initialized. Try using .hasFeatureAsync() instead.');
2584
-
2585
-
returnfalse;
2575
+
thrownewError('Renderer: .hasFeature() called before the backend is initialized. Use "await renderer.init();" before before using this method.');
2586
2576
2587
2577
}
2588
2578
@@ -2606,14 +2596,15 @@ class Renderer {
2606
2596
* (which can cause noticeable lags due to decode and GPU upload overhead).
2607
2597
*
2608
2598
* @async
2599
+
* @deprecated
2609
2600
* @param {Texture} texture - The texture.
2610
2601
* @return {Promise} A Promise that resolves when the texture has been initialized.
2611
2602
*/
2612
2603
asyncinitTextureAsync(texture){
2613
2604
2614
-
if(this._initialized===false)awaitthis.init();
2605
+
warnOnce('Renderer: "initTextureAsync()" has been deprecated. Use "initTexture()" and "await renderer.init();" when creating the renderer.');// @deprecated r181
2615
2606
2616
-
this._textures.updateTexture(texture);
2607
+
this.initTexture(texture);
2617
2608
2618
2609
}
2619
2610
@@ -2629,7 +2620,7 @@ class Renderer {
2629
2620
2630
2621
if(this._initialized===false){
2631
2622
2632
-
warn('Renderer: .initTexture() called before the backend is initialized. Try using .initTextureAsync() instead.');
2623
+
thrownewError('Renderer: .initTexture() called before the backend is initialized. Use "await renderer.init();" before before using this method.');
0 commit comments