@leafer/debug 1.0.0-alpha.21 → 1.0.0-alpha.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer/debug",
3
- "version": "1.0.0-alpha.21",
3
+ "version": "1.0.0-alpha.23",
4
4
  "description": "@leafer/debug",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -19,9 +19,9 @@
19
19
  "leaferjs"
20
20
  ],
21
21
  "dependencies": {
22
- "@leafer/math": "1.0.0-alpha.21"
22
+ "@leafer/math": "1.0.0-alpha.23"
23
23
  },
24
24
  "devDependencies": {
25
- "@leafer/interface": "1.0.0-alpha.21"
25
+ "@leafer/interface": "1.0.0-alpha.23"
26
26
  }
27
27
  }
package/src/Debug.ts CHANGED
@@ -11,9 +11,9 @@ export class Debug {
11
11
  // other
12
12
  static __: IObject = {}
13
13
 
14
- @debugAttr()
15
14
  static showRepaint: boolean
16
15
 
16
+ static showHitView: boolean
17
17
 
18
18
  public name: string
19
19
 
@@ -56,11 +56,14 @@ export class Debug {
56
56
 
57
57
  const D = Debug
58
58
 
59
- function debugAttr(defaultValue?: unknown) {
60
- return (target: IObject, key: string) => {
61
- Object.defineProperty(target, key, {
62
- get() { return target.enable ? target.__[key] : defaultValue },
63
- set(value: unknown) { this.__[key] = value }
64
- })
65
- }
66
- }
59
+ // function debugAttr(defaultValue?: unknown) {
60
+ // return (target: IObject, key: string) => {
61
+ // Object.defineProperty(target, key, {
62
+ // get() { return target.enable ? target.__[key] : defaultValue },
63
+ // set(value: unknown) {
64
+ // if (value) target.enable = true
65
+ // this.__[key] = value
66
+ // }
67
+ // })
68
+ // }
69
+ // }
package/src/Run.ts CHANGED
@@ -33,9 +33,7 @@ export class Run {
33
33
  static end(id: number, microsecond?: boolean): void {
34
34
  const time = R.idMap[id]
35
35
  const name = R.nameMap[id]
36
- R.idMap[id] = undefined
37
- R.nameMap[id] = undefined
38
- R.nameToIdMap[name] = undefined
36
+ R.idMap[id] = R.nameMap[id] = R.nameToIdMap[name] = undefined
39
37
 
40
38
  if (microsecond) {
41
39
  debug.log(name, performance.now() - time, 'µs')