瀏覽代碼

DRACOLoader: Method chaining

Takahiro 7 年之前
父節點
當前提交
ce29ba0816
共有 1 個文件被更改,包括 5 次插入0 次删除
  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) {
         this.path = value;
+        return this;
     },
 
     setCrossOrigin: function(value) {
         this.crossOrigin = value;
+        return this;
     },
 
     setVerbosity: function(level) {
         this.verbosity = level;
+        return this;
     },
 
     /**
@@ -70,6 +73,7 @@ THREE.DRACOLoader.prototype = {
      */
     setDrawMode: function(drawMode) {
         this.drawMode = drawMode;
+        return this;
     },
 
     /**
@@ -84,6 +88,7 @@ THREE.DRACOLoader.prototype = {
           skipDequantization = skip;
         this.getAttributeOptions(attributeName).skipDequantization =
             skipDequantization;
+        return this;
     },
 
     /**