Forráskód Böngészése

RawTexture: Rename to `ExternalTexture`. (#31543)

Michael Herzog 5 hónapja
szülő
commit
546813819b

+ 2 - 2
src/renderers/webgl/WebGLTextures.js

@@ -515,7 +515,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
 
 
 		if ( texture.isVideoTexture ) updateVideoTexture( texture );
 		if ( texture.isVideoTexture ) updateVideoTexture( texture );
 
 
-		if ( texture.isRenderTargetTexture === false && texture.isRawTexture !== true && texture.version > 0 && textureProperties.__version !== texture.version ) {
+		if ( texture.isRenderTargetTexture === false && texture.isExternalTexture !== true && texture.version > 0 && textureProperties.__version !== texture.version ) {
 
 
 			const image = texture.image;
 			const image = texture.image;
 
 
@@ -534,7 +534,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
 
 
 			}
 			}
 
 
-		} else if ( texture.isRawTexture ) {
+		} else if ( texture.isExternalTexture ) {
 
 
 			textureProperties.__webglTexture = texture.sourceTexture ? texture.sourceTexture : null;
 			textureProperties.__webglTexture = texture.sourceTexture ? texture.sourceTexture : null;
 
 

+ 4 - 4
src/renderers/webxr/WebXRDepthSensing.js

@@ -1,7 +1,7 @@
 import { PlaneGeometry } from '../../geometries/PlaneGeometry.js';
 import { PlaneGeometry } from '../../geometries/PlaneGeometry.js';
 import { ShaderMaterial } from '../../materials/ShaderMaterial.js';
 import { ShaderMaterial } from '../../materials/ShaderMaterial.js';
 import { Mesh } from '../../objects/Mesh.js';
 import { Mesh } from '../../objects/Mesh.js';
-import { RawTexture } from '../../textures/RawTexture.js';
+import { ExternalTexture } from '../../textures/ExternalTexture.js';
 
 
 const _occlusion_vertex = `
 const _occlusion_vertex = `
 void main() {
 void main() {
@@ -44,7 +44,7 @@ class WebXRDepthSensing {
 		/**
 		/**
 		 * An opaque texture representing the depth of the user's environment.
 		 * An opaque texture representing the depth of the user's environment.
 		 *
 		 *
-		 * @type {?RawTexture}
+		 * @type {?ExternalTexture}
 		 */
 		 */
 		this.texture = null;
 		this.texture = null;
 
 
@@ -81,7 +81,7 @@ class WebXRDepthSensing {
 
 
 		if ( this.texture === null ) {
 		if ( this.texture === null ) {
 
 
-			const texture = new RawTexture( depthData.texture );
+			const texture = new ExternalTexture( depthData.texture );
 
 
 			if ( ( depthData.depthNear !== renderState.depthNear ) || ( depthData.depthFar !== renderState.depthFar ) ) {
 			if ( ( depthData.depthNear !== renderState.depthNear ) || ( depthData.depthFar !== renderState.depthFar ) ) {
 
 
@@ -142,7 +142,7 @@ class WebXRDepthSensing {
 	/**
 	/**
 	 * Returns a texture representing the depth of the user's environment.
 	 * Returns a texture representing the depth of the user's environment.
 	 *
 	 *
-	 * @return {?RawTexture} The depth texture.
+	 * @return {?ExternalTexture} The depth texture.
 	 */
 	 */
 	getDepthTexture() {
 	getDepthTexture() {
 
 

+ 2 - 2
src/renderers/webxr/WebXRManager.js

@@ -9,7 +9,7 @@ import { WebGLAnimation } from '../webgl/WebGLAnimation.js';
 import { WebGLRenderTarget } from '../WebGLRenderTarget.js';
 import { WebGLRenderTarget } from '../WebGLRenderTarget.js';
 import { WebXRController } from './WebXRController.js';
 import { WebXRController } from './WebXRController.js';
 import { DepthTexture } from '../../textures/DepthTexture.js';
 import { DepthTexture } from '../../textures/DepthTexture.js';
-import { RawTexture } from '../../textures/RawTexture.js';
+import { ExternalTexture } from '../../textures/ExternalTexture.js';
 import { DepthFormat, DepthStencilFormat, RGBAFormat, UnsignedByteType, UnsignedIntType, UnsignedInt248Type } from '../../constants.js';
 import { DepthFormat, DepthStencilFormat, RGBAFormat, UnsignedByteType, UnsignedIntType, UnsignedInt248Type } from '../../constants.js';
 import { WebXRDepthSensing } from './WebXRDepthSensing.js';
 import { WebXRDepthSensing } from './WebXRDepthSensing.js';
 
 
@@ -1023,7 +1023,7 @@ class WebXRManager extends EventDispatcher {
 
 
 								if ( ! cameraTex ) {
 								if ( ! cameraTex ) {
 
 
-									cameraTex = new RawTexture();
+									cameraTex = new ExternalTexture();
 									cameraAccessTextures[ camera ] = cameraTex;
 									cameraAccessTextures[ camera ] = cameraTex;
 
 
 								}
 								}

+ 3 - 3
src/textures/RawTexture.js → src/textures/ExternalTexture.js

@@ -10,7 +10,7 @@ import { Texture } from './Texture.js';
  *
  *
  * @augments Texture
  * @augments Texture
  */
  */
-class RawTexture extends Texture {
+class ExternalTexture extends Texture {
 
 
 	/**
 	/**
 	 * Creates a new raw texture.
 	 * Creates a new raw texture.
@@ -36,10 +36,10 @@ class RawTexture extends Texture {
 		 * @readonly
 		 * @readonly
 		 * @default true
 		 * @default true
 		 */
 		 */
-		this.isRawTexture = true;
+		this.isExternalTexture = true;
 
 
 	}
 	}
 
 
 }
 }
 
 
-export { RawTexture };
+export { ExternalTexture };

粤ICP备19079148号