Browse Source

DRACOLoader: Method chaining

Takahiro 7 years ago
parent
commit
ce29ba0816
1 changed files with 5 additions and 0 deletions
  1. 5 0
      examples/js/loaders/DRACOLoader.js

+ 5 - 0
examples/js/loaders/DRACOLoader.js

@@ -52,14 +52,17 @@ THREE.DRACOLoader.prototype = {
 
 
     setPath: function(value) {
     setPath: function(value) {
         this.path = value;
         this.path = value;
+        return this;
     },
     },
 
 
     setCrossOrigin: function(value) {
     setCrossOrigin: function(value) {
         this.crossOrigin = value;
         this.crossOrigin = value;
+        return this;
     },
     },
 
 
     setVerbosity: function(level) {
     setVerbosity: function(level) {
         this.verbosity = level;
         this.verbosity = level;
+        return this;
     },
     },
 
 
     /**
     /**
@@ -70,6 +73,7 @@ THREE.DRACOLoader.prototype = {
      */
      */
     setDrawMode: function(drawMode) {
     setDrawMode: function(drawMode) {
         this.drawMode = drawMode;
         this.drawMode = drawMode;
+        return this;
     },
     },
 
 
     /**
     /**
@@ -84,6 +88,7 @@ THREE.DRACOLoader.prototype = {
           skipDequantization = skip;
           skipDequantization = skip;
         this.getAttributeOptions(attributeName).skipDequantization =
         this.getAttributeOptions(attributeName).skipDequantization =
             skipDequantization;
             skipDequantization;
+        return this;
     },
     },
 
 
     /**
     /**