bg2e-js 2.2.10 → 2.2.11

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": "bg2e-js",
3
- "version": "2.2.10",
3
+ "version": "2.2.11",
4
4
  "description": "a graphics engine for productivity applications",
5
5
  "main": "./dist/bg2e-js.js",
6
6
  "types": "./src/index.ts",
package/src/base/Light.ts CHANGED
@@ -71,24 +71,24 @@ export default class Light {
71
71
  }
72
72
 
73
73
  get enabled() { return this._enabled; }
74
- set enabled(v) { this._enabled = v; }
74
+ set enabled(v: boolean) { this._enabled = v; }
75
75
 
76
76
  get type() { return this._type; }
77
- set type(t) { this._type = t; }
77
+ set type(t: LightType) { this._type = t; }
78
78
 
79
79
  get direction() { return this._direction; }
80
- set direction(d) { this._direction = d; }
80
+ set direction(d: Vec) { this._direction = d; }
81
81
 
82
82
  get position() { return this._position; }
83
- set position(p) { this._position = p; }
83
+ set position(p: Vec) { this._position = p; }
84
84
 
85
- get color() { return this._color; }
86
- set color(c) {
85
+ get color() : Color { return this._color; }
86
+ set color(c: Color | number[]) {
87
87
  if (c.length === 3) {
88
- this._color = new Vec([c[0], c[1], c[2], 1]);
88
+ this._color = new Color([c[0], c[1], c[2], 1]);
89
89
  }
90
90
  else if (c.length === 4) {
91
- this._color = new Vec(c);
91
+ this._color = new Color(c);
92
92
  }
93
93
  else {
94
94
  throw new Error(`Invalid light color assignment. Parameter must be a three or four component array.`);