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
warnOnce('Renderer: "clearAsync()" has been deprecated. Use "clear()" and "await renderer.init();" when creating the renderer.');// @deprecated r181
2123
2111
2124
2112
this.clear(color,depth,stencil);
2125
2113
@@ -2129,35 +2117,44 @@ class Renderer {
2129
2117
* Async version of {@link Renderer#clearColor}.
2130
2118
*
2131
2119
* @async
2120
+
* @deprecated
2132
2121
* @return {Promise} A Promise that resolves when the clear operation has been executed.
2133
2122
*/
2134
2123
asyncclearColorAsync(){
2135
2124
2136
-
this.clearAsync(true,false,false);
2125
+
warnOnce('Renderer: "clearColorAsync()" has been deprecated. Use "clearColor()" and "await renderer.init();" when creating the renderer.');// @deprecated r181
2126
+
2127
+
this.clear(true,false,false);
2137
2128
2138
2129
}
2139
2130
2140
2131
/**
2141
2132
* Async version of {@link Renderer#clearDepth}.
2142
2133
*
2143
2134
* @async
2135
+
* @deprecated
2144
2136
* @return {Promise} A Promise that resolves when the clear operation has been executed.
2145
2137
*/
2146
2138
asyncclearDepthAsync(){
2147
2139
2148
-
this.clearAsync(false,true,false);
2140
+
warnOnce('Renderer: "clearDepthAsync()" has been deprecated. Use "clearDepth()" and "await renderer.init();" when creating the renderer.');// @deprecated r181
2141
+
2142
+
this.clear(false,true,false);
2149
2143
2150
2144
}
2151
2145
2152
2146
/**
2153
2147
* Async version of {@link Renderer#clearStencil}.
2154
2148
*
2155
2149
* @async
2150
+
* @deprecated
2156
2151
* @return {Promise} A Promise that resolves when the clear operation has been executed.
2157
2152
*/
2158
2153
asyncclearStencilAsync(){
2159
2154
2160
-
this.clearAsync(false,false,true);
2155
+
warnOnce('Renderer: "clearStencilAsync()" has been deprecated. Use "clearStencil()" and "await renderer.init();" when creating the renderer.');// @deprecated r181
2156
+
2157
+
this.clear(false,false,true);
2161
2158
2162
2159
}
2163
2160
@@ -2606,14 +2603,15 @@ class Renderer {
2606
2603
* (which can cause noticeable lags due to decode and GPU upload overhead).
2607
2604
*
2608
2605
* @async
2606
+
* @deprecated
2609
2607
* @param {Texture} texture - The texture.
2610
2608
* @return {Promise} A Promise that resolves when the texture has been initialized.
2611
2609
*/
2612
2610
asyncinitTextureAsync(texture){
2613
2611
2614
-
if(this._initialized===false)awaitthis.init();
2612
+
warnOnce('Renderer: "initTextureAsync()" has been deprecated. Use "initTexture()" and "await renderer.init();" when creating the renderer.');// @deprecated r181
2615
2613
2616
-
this._textures.updateTexture(texture);
2614
+
this.initTexture(texture);
2617
2615
2618
2616
}
2619
2617
@@ -2629,7 +2627,7 @@ class Renderer {
2629
2627
2630
2628
if(this._initialized===false){
2631
2629
2632
-
warn('Renderer: .initTexture() called before the backend is initialized. Try using .initTextureAsync() instead.');
2630
+
thrownewError('Renderer: .initTexture() called before the backend is initialized. Use "await renderer.init();" before before using this method.');
0 commit comments