Pārlūkot izejas kodu

GLSLDecoder: Replace deprecated `substr()` with `slice()`. (#33260)

Co-authored-by: Mridul <iammridul012@gamil.com>
Mridul 2 nedēļas atpakaļ
vecāks
revīzija
f0a65ef67e
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      examples/jsm/transpiler/GLSLDecoder.js

+ 2 - 2
examples/jsm/transpiler/GLSLDecoder.js

@@ -170,7 +170,7 @@ class Tokenizer {
 
 	skip( ...params ) {
 
-		let remainingCode = this.source.substr( this.position );
+		let remainingCode = this.source.slice( this.position );
 		let i = params.length;
 
 		while ( i -- ) {
@@ -182,7 +182,7 @@ class Tokenizer {
 
 				this.position += skipLength;
 
-				remainingCode = this.source.substr( this.position );
+				remainingCode = this.source.slice( this.position );
 
 				// re-skip, new remainingCode is generated
 				// maybe exist previous regexp non detected

粤ICP备19079148号