@woosh/meep-engine 2.131.31 → 2.131.32
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 +1 -1
- package/src/engine/graphics/geometry/buffered/query/bvh32_geometry_nearest.d.ts +18 -0
- package/src/engine/graphics/geometry/buffered/query/bvh32_geometry_nearest.d.ts.map +1 -0
- package/src/engine/graphics/geometry/buffered/query/bvh32_geometry_nearest.js +252 -0
- package/src/engine/input/devices/PointerDevice.d.ts.map +1 -1
- package/src/engine/input/devices/PointerDevice.js +18 -0
- package/src/view/elements/progress/segmented/SegmentedResourceBarView.d.ts +1 -1
- package/src/view/elements/progress/segmented/SegmentedResourceBarView.d.ts.map +1 -1
- package/src/view/elements/progress/segmented/SegmentedResourceBarView.js +10 -6
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"description": "Pure JavaScript game engine. Fully featured and production ready.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"author": "Alexander Goldring",
|
|
8
|
-
"version": "2.131.
|
|
8
|
+
"version": "2.131.32",
|
|
9
9
|
"main": "build/meep.module.js",
|
|
10
10
|
"module": "build/meep.module.js",
|
|
11
11
|
"exports": {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the nearest point on the geometry, relative to query point
|
|
3
|
+
*
|
|
4
|
+
* @param {SurfacePoint3} result
|
|
5
|
+
* @param {BinaryUint32BVH} bvh
|
|
6
|
+
* @param {number[]|ArrayLike<number>} vertices
|
|
7
|
+
* @param {number} vertex_offset Unless you're using an interleaved buffer of some kind, this will be 0
|
|
8
|
+
* @param {number} vertex_stride Unless you're using an interleaved buffer, this should be 3
|
|
9
|
+
* @param {boolean} vertex_data_normalized do we need to denormalize vertex data?
|
|
10
|
+
* @param {number[]|ArrayLike<number>|undefined} indices if this is set to undefined - implicit indexing will be used
|
|
11
|
+
* @param {number} x Query point X
|
|
12
|
+
* @param {number} y Query point Y
|
|
13
|
+
* @param {number} z Query point Z
|
|
14
|
+
* @param {number} [max_distance] limit search distance, useful for optimization
|
|
15
|
+
* @returns {boolean} true iff a point was found, false otherwise
|
|
16
|
+
*/
|
|
17
|
+
export function bvh32_geometry_nearest(result: SurfacePoint3, bvh: BinaryUint32BVH, vertices: number[] | ArrayLike<number>, vertex_offset: number, vertex_stride: number, vertex_data_normalized: boolean, indices: number[] | ArrayLike<number> | undefined, x: number, y: number, z: number, max_distance?: number): boolean;
|
|
18
|
+
//# sourceMappingURL=bvh32_geometry_nearest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bvh32_geometry_nearest.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/geometry/buffered/query/bvh32_geometry_nearest.js"],"names":[],"mappings":"AAsBA;;;;;;;;;;;;;;;GAeG;AACH,8FAXW,MAAM,EAAE,GAAC,UAAU,MAAM,CAAC,iBAC1B,MAAM,iBACN,MAAM,0BACN,OAAO,WACP,MAAM,EAAE,GAAC,UAAU,MAAM,CAAC,GAAC,SAAS,KACpC,MAAM,KACN,MAAM,KACN,MAAM,iBACN,MAAM,GACJ,OAAO,CAuNnB"}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { assert } from "../../../../../core/assert.js";
|
|
2
|
+
import {
|
|
3
|
+
typed_array_value_denormalize
|
|
4
|
+
} from "../../../../../core/collection/array/typed/typed_array_value_denormalize.js";
|
|
5
|
+
import { SCRATCH_UINT32_TRAVERSAL_STACK } from "../../../../../core/collection/SCRATCH_UINT32_TRAVERSAL_STACK.js";
|
|
6
|
+
import {
|
|
7
|
+
aabb3_unsigned_distance_sqr_to_point
|
|
8
|
+
} from "../../../../../core/geom/3d/aabb/aabb3_unsigned_distance_sqr_to_point.js";
|
|
9
|
+
import {
|
|
10
|
+
computeTriangleClosestPointToPointBarycentric
|
|
11
|
+
} from "../../../../../core/geom/3d/triangle/computeTriangleClosestPointToPointBarycentric.js";
|
|
12
|
+
import { v3_compute_triangle_normal } from "../../../../../core/geom/3d/triangle/v3_compute_triangle_normal.js";
|
|
13
|
+
import { v3_distance_sqr } from "../../../../../core/geom/vec3/v3_distance_sqr.js";
|
|
14
|
+
|
|
15
|
+
const stack = SCRATCH_UINT32_TRAVERSAL_STACK;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @type {number[]}
|
|
20
|
+
*/
|
|
21
|
+
const v3_scratch_0 = [];
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Get the nearest point on the geometry, relative to query point
|
|
25
|
+
*
|
|
26
|
+
* @param {SurfacePoint3} result
|
|
27
|
+
* @param {BinaryUint32BVH} bvh
|
|
28
|
+
* @param {number[]|ArrayLike<number>} vertices
|
|
29
|
+
* @param {number} vertex_offset Unless you're using an interleaved buffer of some kind, this will be 0
|
|
30
|
+
* @param {number} vertex_stride Unless you're using an interleaved buffer, this should be 3
|
|
31
|
+
* @param {boolean} vertex_data_normalized do we need to denormalize vertex data?
|
|
32
|
+
* @param {number[]|ArrayLike<number>|undefined} indices if this is set to undefined - implicit indexing will be used
|
|
33
|
+
* @param {number} x Query point X
|
|
34
|
+
* @param {number} y Query point Y
|
|
35
|
+
* @param {number} z Query point Z
|
|
36
|
+
* @param {number} [max_distance] limit search distance, useful for optimization
|
|
37
|
+
* @returns {boolean} true iff a point was found, false otherwise
|
|
38
|
+
*/
|
|
39
|
+
export function bvh32_geometry_nearest(
|
|
40
|
+
result,
|
|
41
|
+
bvh,
|
|
42
|
+
vertices, vertex_offset, vertex_stride,
|
|
43
|
+
vertex_data_normalized,
|
|
44
|
+
indices,
|
|
45
|
+
x, y, z,
|
|
46
|
+
max_distance = Infinity,
|
|
47
|
+
) {
|
|
48
|
+
|
|
49
|
+
let nearest_distance_sqr = max_distance * max_distance;
|
|
50
|
+
|
|
51
|
+
let got_a_hit = false;
|
|
52
|
+
|
|
53
|
+
const binary_node_count = bvh.binary_node_count;
|
|
54
|
+
|
|
55
|
+
if (binary_node_count <= 0) {
|
|
56
|
+
// this should not happen
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {number}
|
|
63
|
+
*/
|
|
64
|
+
const stack_top = stack.pointer++;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* After performing empirical tests, stack-based depth-first traversal turns out faster than using a queue
|
|
68
|
+
* @type {number}
|
|
69
|
+
*/
|
|
70
|
+
stack[stack_top] = 0;
|
|
71
|
+
|
|
72
|
+
const last_valid_index = binary_node_count + bvh.leaf_node_count;
|
|
73
|
+
|
|
74
|
+
const float32 = bvh.float32;
|
|
75
|
+
const uint32 = bvh.uint32;
|
|
76
|
+
|
|
77
|
+
do {
|
|
78
|
+
stack.pointer--;
|
|
79
|
+
|
|
80
|
+
// query_bvh_frustum_from_objects.iteration_count++;
|
|
81
|
+
const node_index = stack[stack.pointer];
|
|
82
|
+
|
|
83
|
+
const node_address = bvh.getNodeAddress(node_index);
|
|
84
|
+
|
|
85
|
+
const is_intermediate_node = node_index < binary_node_count;
|
|
86
|
+
|
|
87
|
+
if (is_intermediate_node) {
|
|
88
|
+
// is intermediate node
|
|
89
|
+
|
|
90
|
+
const left_index = (node_index << 1) + 1;
|
|
91
|
+
const right_index = left_index + 1;
|
|
92
|
+
|
|
93
|
+
if (right_index < last_valid_index) {
|
|
94
|
+
|
|
95
|
+
const child_1_address = bvh.getNodeAddress(left_index);
|
|
96
|
+
|
|
97
|
+
const distance_sqr_to_child1 = aabb3_unsigned_distance_sqr_to_point(
|
|
98
|
+
float32[child_1_address], float32[child_1_address + 1], float32[child_1_address + 2],
|
|
99
|
+
float32[child_1_address + 3], float32[child_1_address + 4], float32[child_1_address + 5],
|
|
100
|
+
x, y, z
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
const child_2_address = bvh.getNodeAddress(right_index);
|
|
104
|
+
|
|
105
|
+
const distance_sqr_to_child2 = aabb3_unsigned_distance_sqr_to_point(
|
|
106
|
+
float32[child_2_address], float32[child_2_address + 1], float32[child_2_address + 2],
|
|
107
|
+
float32[child_2_address + 3], float32[child_2_address + 4], float32[child_2_address + 5],
|
|
108
|
+
x, y, z
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
if (distance_sqr_to_child1 < distance_sqr_to_child2) {
|
|
112
|
+
|
|
113
|
+
if (distance_sqr_to_child2 < nearest_distance_sqr) {
|
|
114
|
+
stack[stack.pointer++] = right_index;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (distance_sqr_to_child1 < nearest_distance_sqr) {
|
|
118
|
+
stack[stack.pointer++] = left_index;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
} else {
|
|
122
|
+
|
|
123
|
+
if (distance_sqr_to_child1 < nearest_distance_sqr) {
|
|
124
|
+
stack[stack.pointer++] = left_index;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (distance_sqr_to_child2 < nearest_distance_sqr) {
|
|
128
|
+
stack[stack.pointer++] = right_index;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
}
|
|
132
|
+
} else if (left_index < last_valid_index) {
|
|
133
|
+
stack[stack.pointer++] = left_index;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
} else {
|
|
138
|
+
|
|
139
|
+
// leaf node
|
|
140
|
+
// read triangle data
|
|
141
|
+
const triangle_index = uint32[node_address + 6];
|
|
142
|
+
const index3 = triangle_index * 3;
|
|
143
|
+
|
|
144
|
+
let a, b, c;
|
|
145
|
+
if (indices !== undefined) {
|
|
146
|
+
assert.lessThan(index3 + 2, indices.length, 'triangle index overflow, possibly geometry changed but tree was not rebuilt?');
|
|
147
|
+
|
|
148
|
+
a = indices[index3];
|
|
149
|
+
b = indices[index3 + 1];
|
|
150
|
+
c = indices[index3 + 2];
|
|
151
|
+
} else {
|
|
152
|
+
// implicit indices
|
|
153
|
+
a = index3;
|
|
154
|
+
b = index3 + 1;
|
|
155
|
+
c = index3 + 2;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
const a_address = a * vertex_stride + vertex_offset;
|
|
159
|
+
const b_address = b * vertex_stride + vertex_offset;
|
|
160
|
+
const c_address = c * vertex_stride + vertex_offset;
|
|
161
|
+
|
|
162
|
+
assert.lessThan(a_address + 2, vertices.length, 'a-vertex overflow');
|
|
163
|
+
assert.lessThan(b_address + 2, vertices.length, 'b-vertex overflow');
|
|
164
|
+
assert.lessThan(c_address + 2, vertices.length, 'c-vertex overflow');
|
|
165
|
+
|
|
166
|
+
let ax = vertices[a_address];
|
|
167
|
+
let ay = vertices[a_address + 1];
|
|
168
|
+
let az = vertices[a_address + 2];
|
|
169
|
+
|
|
170
|
+
let bx = vertices[b_address];
|
|
171
|
+
let by = vertices[b_address + 1];
|
|
172
|
+
let bz = vertices[b_address + 2];
|
|
173
|
+
|
|
174
|
+
let cx = vertices[c_address];
|
|
175
|
+
let cy = vertices[c_address + 1];
|
|
176
|
+
let cz = vertices[c_address + 2];
|
|
177
|
+
|
|
178
|
+
// denormalize if necessary
|
|
179
|
+
if (vertex_data_normalized) {
|
|
180
|
+
ax = typed_array_value_denormalize(ax, vertices);
|
|
181
|
+
ay = typed_array_value_denormalize(ay, vertices);
|
|
182
|
+
az = typed_array_value_denormalize(az, vertices);
|
|
183
|
+
|
|
184
|
+
bx = typed_array_value_denormalize(bx, vertices);
|
|
185
|
+
by = typed_array_value_denormalize(by, vertices);
|
|
186
|
+
bz = typed_array_value_denormalize(bz, vertices);
|
|
187
|
+
|
|
188
|
+
cx = typed_array_value_denormalize(cx, vertices);
|
|
189
|
+
cy = typed_array_value_denormalize(cy, vertices);
|
|
190
|
+
cz = typed_array_value_denormalize(cz, vertices);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// denormalize if necessary
|
|
194
|
+
if (vertex_data_normalized) {
|
|
195
|
+
ax = typed_array_value_denormalize(ax, vertices);
|
|
196
|
+
ay = typed_array_value_denormalize(ay, vertices);
|
|
197
|
+
az = typed_array_value_denormalize(az, vertices);
|
|
198
|
+
|
|
199
|
+
bx = typed_array_value_denormalize(bx, vertices);
|
|
200
|
+
by = typed_array_value_denormalize(by, vertices);
|
|
201
|
+
bz = typed_array_value_denormalize(bz, vertices);
|
|
202
|
+
|
|
203
|
+
cx = typed_array_value_denormalize(cx, vertices);
|
|
204
|
+
cy = typed_array_value_denormalize(cy, vertices);
|
|
205
|
+
cz = typed_array_value_denormalize(cz, vertices);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
computeTriangleClosestPointToPointBarycentric(
|
|
209
|
+
v3_scratch_0, 0,
|
|
210
|
+
x, x, x,
|
|
211
|
+
ax, ay, az,
|
|
212
|
+
bx, by, bz,
|
|
213
|
+
cx, cy, cz
|
|
214
|
+
);
|
|
215
|
+
|
|
216
|
+
const u = v3_scratch_0[0];
|
|
217
|
+
const v = v3_scratch_0[1];
|
|
218
|
+
const w = 1 - u - v;
|
|
219
|
+
|
|
220
|
+
// construct edge
|
|
221
|
+
|
|
222
|
+
const contact_x = ax * u + bx * v + cx * w;
|
|
223
|
+
const contact_y = ay * u + by * v + cy * w;
|
|
224
|
+
const contact_z = az * u + bz * v + cz * w;
|
|
225
|
+
|
|
226
|
+
const distance_to_triangle_sqr = v3_distance_sqr(
|
|
227
|
+
contact_x, contact_y, contact_z,
|
|
228
|
+
x, y, z
|
|
229
|
+
);
|
|
230
|
+
|
|
231
|
+
if (distance_to_triangle_sqr >= nearest_distance_sqr) {
|
|
232
|
+
continue;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
nearest_distance_sqr = distance_to_triangle_sqr;
|
|
236
|
+
|
|
237
|
+
result.position.set(contact_x, contact_y, contact_z);
|
|
238
|
+
|
|
239
|
+
v3_compute_triangle_normal(result.normal, 0,
|
|
240
|
+
ax, ay, az,
|
|
241
|
+
bx, by, bz,
|
|
242
|
+
cx, cy, cz
|
|
243
|
+
);
|
|
244
|
+
|
|
245
|
+
result.index = triangle_index;
|
|
246
|
+
|
|
247
|
+
got_a_hit = true;
|
|
248
|
+
}
|
|
249
|
+
} while (stack.pointer > stack_top);
|
|
250
|
+
|
|
251
|
+
return got_a_hit;
|
|
252
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PointerDevice.d.ts","sourceRoot":"","sources":["../../../../../src/engine/input/devices/PointerDevice.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PointerDevice.d.ts","sourceRoot":"","sources":["../../../../../src/engine/input/devices/PointerDevice.js"],"names":[],"mappings":"AA6MA;;;;;GAKG;AACH,mDAJW,OAAO,SACP,UAAU,GAAC,KAAK,WAChB,OAAO,QAejB;AAED;;;;;GAKG;AACH;IAiFI;;;;OAIG;IACH,wBAHW,WAAW,EAsBrB;IAvGD;;;;OAIG;IACH,mBAFU,OAAO,CAEQ;IAIzB;;OAEG;IACH;;;;QAII;;WAEG;aADO,OAAO,OAAO,EAAE,CAAC,UAAU,GAAC,UAAU,CAAC,CAAC;;;;;;;;MAUpD;IAeF;;;OAGG;IACH,kBAAkB;IAElB;;;;OAIG;IACH,kBAFU,iBAAiB,EAAE,CAEL;IAExB;;;OAGG;IACH,yCAEC;IAED;;;OAGG;IACH,0CAEC;IAED;;;OAGG;IACH,2CAEC;IA2GD;;;OAGG;IACH,oBAFY,OAAO,CAIlB;IAED;;;OAGG;IACH,6BAsBC;IAED,0BAEC;IAED;;;;OAIG;IACH,qCAHW,OAAO,SACP,UAAU,GAAC,KAAK,QAI1B;IAED,cA6BC;IAED,aAsBC;;CACJ;oBAvgBmB,+BAA+B;mBADhC,uCAAuC;kCAOxB,wBAAwB"}
|
|
@@ -148,6 +148,10 @@ function observeDrag(up, down, move, dragStart, dragEnd, drag) {
|
|
|
148
148
|
move.remove(handleDragStart);
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
+
/**
|
|
152
|
+
*
|
|
153
|
+
* @param {Vector2} position
|
|
154
|
+
*/
|
|
151
155
|
function handleDragEnd(position) {
|
|
152
156
|
up.remove(handleDragEnd);
|
|
153
157
|
move.remove(handleDrag);
|
|
@@ -155,6 +159,11 @@ function observeDrag(up, down, move, dragStart, dragEnd, drag) {
|
|
|
155
159
|
dragEnd.send1(position);
|
|
156
160
|
}
|
|
157
161
|
|
|
162
|
+
/**
|
|
163
|
+
*
|
|
164
|
+
* @param {Vector2} position
|
|
165
|
+
* @param {PointerEvent} event
|
|
166
|
+
*/
|
|
158
167
|
function handleDragStart(position, event) {
|
|
159
168
|
|
|
160
169
|
move.remove(handleDragStart);
|
|
@@ -170,11 +179,20 @@ function observeDrag(up, down, move, dragStart, dragEnd, drag) {
|
|
|
170
179
|
|
|
171
180
|
const lastDragPosition = new Vector2();
|
|
172
181
|
|
|
182
|
+
/**
|
|
183
|
+
*
|
|
184
|
+
* @param {Vector2} position
|
|
185
|
+
* @param {PointerEvent} event
|
|
186
|
+
*/
|
|
173
187
|
function handleDrag(position, event) {
|
|
174
188
|
drag.send4(position, origin, lastDragPosition, event);
|
|
175
189
|
lastDragPosition.copy(position);
|
|
176
190
|
}
|
|
177
191
|
|
|
192
|
+
/**
|
|
193
|
+
*
|
|
194
|
+
* @param {Vector2} position
|
|
195
|
+
*/
|
|
178
196
|
function handleDown(position) {
|
|
179
197
|
origin.copy(position);
|
|
180
198
|
up.add(noDrag);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export class SegmentedResourceBarView extends View<HTMLElement> {
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
|
-
* @param {(Vector1|ObservedInteger)[]}
|
|
4
|
+
* @param {(Vector1|ObservedInteger)[]} values
|
|
5
5
|
* @param {Vector1|ObservedInteger|ReactiveExpression} [max=1]
|
|
6
6
|
* @param {string[]} [classList]
|
|
7
7
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedResourceBarView.d.ts","sourceRoot":"","sources":["../../../../../../src/view/elements/progress/segmented/SegmentedResourceBarView.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SegmentedResourceBarView.d.ts","sourceRoot":"","sources":["../../../../../../src/view/elements/progress/segmented/SegmentedResourceBarView.js"],"names":[],"mappings":"AAWA;IACI;;;;;OAKG;IACH,wCAJW,CAAC,OAAO,kBAAgB,CAAC,EAAE,EA+HrC;IAjHG;;;;OAIG;IACH,yBAA8B;IAE9B;;;;OAIG;IACH,oBAAsB;IAGtB;;;OAGG;IACH,YAFU,qBAAqB,CAEH;IAG5B,mBAAuC;IAQvC,qBAAiE;IAGjE,2BAAuB;IASvB,sBAAyD;IAIzD,yBAAoC;IAMpC;;;OAGG;IACH,gBAFU,QAAQ,CAsChB;IAWF;;;;OAIG;IACH,uBAA2C;IAqB/C,eAGC;IAED,qBAQC;IAED,wBAGC;IAED,uBAkGC;IAED,mBAyBC;CACJ;iBAzSgB,kBAAkB;iBALlB,0CAA0C;sBAOrC,oBAAoB;2BADf,qBAAqB;qBAH3B,6BAA6B;oBAF9B,kCAAkC"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { assert } from "../../../../core/assert.js";
|
|
2
|
+
import List from "../../../../core/collection/list/List.js";
|
|
2
3
|
import Vector1 from "../../../../core/geom/Vector1.js";
|
|
4
|
+
import { clamp01 } from "../../../../core/math/clamp01.js";
|
|
5
|
+
import ListView from "../../../common/ListView.js";
|
|
6
|
+
import { DomSizeObserver } from "../../../util/DomSizeObserver.js";
|
|
7
|
+
import View from "../../../View.js";
|
|
3
8
|
import { CanvasView } from "../../CanvasView.js";
|
|
4
9
|
import EmptyView from "../../EmptyView.js";
|
|
5
|
-
import { DomSizeObserver } from "../../../util/DomSizeObserver.js";
|
|
6
10
|
import { RESOURCE_BAR_SEGMENTS } from "./RESOURCE_BAR_SEGMENTS.js";
|
|
7
|
-
import List from "../../../../core/collection/list/List.js";
|
|
8
|
-
import ListView from "../../../common/ListView.js";
|
|
9
|
-
import { clamp01 } from "../../../../core/math/clamp01.js";
|
|
10
11
|
|
|
11
12
|
export class SegmentedResourceBarView extends View {
|
|
12
13
|
/**
|
|
13
14
|
*
|
|
14
|
-
* @param {(Vector1|ObservedInteger)[]}
|
|
15
|
+
* @param {(Vector1|ObservedInteger)[]} values
|
|
15
16
|
* @param {Vector1|ObservedInteger|ReactiveExpression} [max=1]
|
|
16
17
|
* @param {string[]} [classList]
|
|
17
18
|
*/
|
|
@@ -22,6 +23,9 @@ export class SegmentedResourceBarView extends View {
|
|
|
22
23
|
}) {
|
|
23
24
|
super();
|
|
24
25
|
|
|
26
|
+
assert.isArray(values, 'values');
|
|
27
|
+
assert.defined(max, 'max');
|
|
28
|
+
|
|
25
29
|
/**
|
|
26
30
|
*
|
|
27
31
|
* @type {(Vector1|ObservedInteger)[]}
|