ソースを参照

doc:docs> 注释注释,删除多余注释

shaun-sheep 4 年 前
コミット
c32a97c9be

+ 3 - 3
docs/.vuepress/components/engine/arrow.vue

@@ -41,18 +41,18 @@ class Polyline extends SGraphItem {
     set begin(v: SArrowStyleType) {
         this._begin = v;
         this.update();
-    } // Set begin
+    }
 
     /** 结束点样式 */
     _end = SArrowStyleType.Basic;
     get end(): SArrowStyleType {
         return this._end;
-    } // Get end
+    }
 
     set end(v: SArrowStyleType) {
         this._end = v;
         this.update();
-    } // Set end
+    }
     /** 绘制多边形数组 */
     pointList: SPoint[] = [
         new SPoint(0, 0),

+ 2 - 2
docs/.vuepress/components/engine/clip.vue

@@ -36,10 +36,10 @@ class ClipView extends SCanvasView {
         this._url = v;
         // @ts-ignore
         this.img.src = v;
-    } // Set url
+    }
     get url(): string {
         return this._url;
-    } // Get url
+    }
 
     /** 绘制完成指令 */
     isLoadOver: boolean = false;

+ 2 - 2
docs/.vuepress/components/engine/composite.vue

@@ -31,12 +31,12 @@ class Circle extends SGraphItem {
     _composite = SCompositeType.SourceOver;
     get composite(): SCompositeType {
         return this._composite;
-    } // Get composite
+    }
 
     set composite(v: SCompositeType) {
         this._composite = v;
         this.update();
-    } // Set composite
+    }
 
     /**
      * 构造函数

+ 9 - 9
docs/.vuepress/components/engine/demo/elsfk.vue

@@ -282,7 +282,7 @@ class TetrisView extends SCanvasView {
 
         // 更新视图
         this.update();
-    } // Function onKeyDown()
+    }
 
     /**
      * 绘制游戏画面
@@ -340,7 +340,7 @@ class TetrisView extends SCanvasView {
                 this.drawGird(canvas, this.gridMap[r][c], r, c);
             }
         }
-    } // Function drawGridMap()
+    }
 
     /**
      * 绘制下落的 Box
@@ -356,7 +356,7 @@ class TetrisView extends SCanvasView {
                 this.drawGird(canvas, this.box[this.boxType * 4 + this.dir][r][c], this.currRow + r, this.currCol + c);
             }
         }
-    } // Function drawFallBox()
+    }
 
     /**
      * 执行 box 下落流程
@@ -389,7 +389,7 @@ class TetrisView extends SCanvasView {
         }
         // 生成新的下落 box
         this.newFallBox();
-    } // Function fallBox()
+    }
 
     /**
      * 画一个小格
@@ -407,7 +407,7 @@ class TetrisView extends SCanvasView {
             canvas.brush.color = SColor.Red;
             canvas.drawRect(col * 30 + 11, row * 30 + 11, 28, 28);
         }
-    } // Function drawGird()
+    }
 
     /**
      * 判断当前下落的方块是否会发生碰撞
@@ -441,7 +441,7 @@ class TetrisView extends SCanvasView {
 
         // 返回不发生碰撞
         return false;
-    } // Function checkCollide()
+    }
 
     /**
      * 当前下落 box 填充到网格
@@ -465,7 +465,7 @@ class TetrisView extends SCanvasView {
                 }
             }
         }
-    } // Function boxIntoMap()
+    }
 
     /**
      * 生成新的下落方块
@@ -478,7 +478,7 @@ class TetrisView extends SCanvasView {
         // box 的类型与方向
         this.boxType = Number(Math.floor(Math.random() * 7));
         this.dir = Number(Math.floor(Math.random() * 4));
-    } // Function newFallBox()
+    }
 
     /**
      * 消除满行(即不存在空格的行)
@@ -514,7 +514,7 @@ class TetrisView extends SCanvasView {
 
         // 返回消除的行数
         return count
-    } // Function removeFullRow()
+    }
 }
 
 /**

+ 11 - 11
docs/.vuepress/components/engine/demo/elsfkDifficult.vue

@@ -257,7 +257,7 @@ class TestView extends SCanvasView {
         }
         // 更新视图
         this.update();
-    } // Function onKeyDown()
+    }
 
     /**
      * Item 绘制操作
@@ -316,7 +316,7 @@ class TestView extends SCanvasView {
             }
             this.map.push(m1);
         }
-    } // Function initMap()
+    }
 
     /**
      * 初始化方块形状
@@ -329,7 +329,7 @@ class TestView extends SCanvasView {
         this.boxType = Number(Math.floor(Math.random() * 7));
         this.dir = Number(Math.floor(Math.random() * 4));
         this.initColor();
-    } // Function initBox()
+    }
 
     /**
      * 初始化方块颜色
@@ -339,7 +339,7 @@ class TestView extends SCanvasView {
         const b = Number(Math.floor(Math.random() * 128));
         const c = Number(Math.floor(Math.random() * 128));
         this.boxColor = new SColor(a, b, c);
-    } // Function initColor()
+    }
 
     /**
      * 绘制背景
@@ -354,7 +354,7 @@ class TestView extends SCanvasView {
                 this.drawShape(painter, row, col, this.map[row][col]);
             }
         }
-    } // Function drawMap()
+    }
 
     /**
      * 绘制实体图形
@@ -380,7 +380,7 @@ class TestView extends SCanvasView {
                 painter.drawRoundRect(x, y, 28, 28, 6);
                 break;
         }
-    } // Function drawShape()
+    }
 
     /**
      * 绘制方块
@@ -393,7 +393,7 @@ class TestView extends SCanvasView {
                 this.drawShape(painter, row + this.y, col + this.x, this.box[this.boxType * 4 + this.dir][row][col]);
             }
         }
-    } // Function drawBox()
+    }
 
     /**
      * 是否碰撞
@@ -414,7 +414,7 @@ class TestView extends SCanvasView {
         }
         // 返回不发生碰撞
         return false;
-    } // Function checkKnocked()
+    }
 
     /**
      * 将方块合到背景中
@@ -436,7 +436,7 @@ class TestView extends SCanvasView {
         }
 
         this.remove();
-    } // Function fillMap()
+    }
 
     /**
      * 消除满行
@@ -472,7 +472,7 @@ class TestView extends SCanvasView {
             // 底部随机产生一行
             this.map.splice(19, 0, this.randomRow());
         }
-    } // Function remove()
+    }
 
     /**
      * 随机数组生成
@@ -487,7 +487,7 @@ class TestView extends SCanvasView {
         }
 
         return array;
-    } // Function randomRow()
+    }
 }
 
 @Component

+ 3 - 1
docs/.vuepress/components/scene/Undo1.vue

@@ -61,6 +61,8 @@ class RectItem extends SGraphItem {
     }
 }
 
+
+
 class CircleItem extends SGraphItem {
     /** 半径 */
     r = 50;
@@ -191,7 +193,7 @@ class TestView extends SGraphView {
          */
         mounted(): void {
             let view = new TestView('undoFrame');
-            view.scene = this.scene;//new SScene(); //this.data.scene;
+            view.scene = this.scene;
         },
         methods: {
             /**

+ 10 - 10
docs/.vuepress/components/scene/items/ClockItem.vue

@@ -20,23 +20,23 @@ class SGraphClockItem extends SGraphItem {
     /** 宽度 */
     get width() {
         return this.size.width;
-    } // Get width
+    }
     set width(v: number) {
         this.size.width = v;
-    } // Set width
+    }
 
     /** 高度 */
     get height() {
         return this.size.height;
-    } // Get width
+    }
     set height(v: number) {
         this.size.height = v;
-    } // Set width
+    }
 
     /** 半径 */
     get radius() {
         return Math.min(this.width, this.height) / 2.0;
-    } // Get radius
+    }
 
     /**
      * 构造函数
@@ -82,7 +82,7 @@ class SGraphClockItem extends SGraphItem {
          */
         boundingRect(): SRect {
             return new SRect(0, 0, this.width, this.height);
-        } // Function SRect()
+        }
 
         /**
          * Item 绘制操作
@@ -140,7 +140,7 @@ class SGraphClockItem extends SGraphItem {
             }
 
             painter.restore();
-        } // Function drawScale()
+        }
 
         /**
          * 绘制时针
@@ -164,7 +164,7 @@ class SGraphClockItem extends SGraphItem {
             );
             painter.drawLine(0, this.radius / 10.0, 0, -this.radius / 2.0);
             painter.restore();
-        } // Function drawHour()
+        }
 
         /**
          * 绘制秒针
@@ -184,7 +184,7 @@ class SGraphClockItem extends SGraphItem {
             painter.rotate(minute * 6 + (second * 6) / 60.0);
             painter.drawLine(0, this.radius / 10.0, 0, (-this.radius * 2.0) / 3.0);
             painter.restore();
-        } // Function drawMinute()
+        }
 
         /**
          * 绘制秒针
@@ -205,7 +205,7 @@ class SGraphClockItem extends SGraphItem {
                 -this.radius + this.radius / 10.0
             );
             painter.restore();
-        } // Function drawSecond()
+        }
     } // Class SGraphClockItem
 
 class TestView extends SGraphView {

+ 1 - 2
docs/.vuepress/components/scene/items/SEditPolygon.vue

@@ -553,9 +553,8 @@ export default {
         /**
          * Item绘制操作
          *
-         * @param   painter       painter对象
+         * @param   painter     绘制对象
          */
-
         onDraw(painter: SPainter): void {
             this.scenceLen = painter.toPx(this.len);
             // 当状态为展示状态