Skip to content

Commit 53aac82

Browse files
committed
Fix faceVertexArray
1 parent 645ea6b commit 53aac82

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

js/scripts/prop-types.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,9 @@ class ColorArray extends BaseType {
374374
}
375375

376376
class ArrayType extends BaseType {
377-
constructor(options) {
377+
constructor(defaultValue, options) {
378378
super(options);
379-
this.defaultValue = [];
379+
this.defaultValue = defaultValue === undefined ? [] : defaultValue;
380380
}
381381
getTraitlet() {
382382
return `List()${this.getTagString()}`;

js/scripts/three-class-config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -289,22 +289,22 @@ module.exports = {
289289
nullable: true,
290290
help: 'The index of the face picked (null if no face picked)',
291291
}),
292-
modifiers: new Types.Array({
292+
modifiers: new Types.Array(undefined, {
293293
help: 'The keyboard modifiers held at the pick event in the following order: [SHIFT, CTRL, ALT, META]',
294294
}),
295295
object: new Types.ThreeType('Object3D', {
296296
nullable: true,
297297
help: 'The picked object (null if no object picked)',
298298
}),
299-
picked: new Types.Array({
299+
picked: new Types.Array(undefined, {
300300
help: 'The other fields on the picker will always be for the first object intersection. ' +
301301
'If ``all`` is set true, this field will be an array containing the same information ' +
302302
'for all intersections.',
303303
}),
304304
uv: new Types.Vector2(0, 0, {
305305
help: 'The UV coordinate picked (all zero if invalid pick)',
306306
}),
307-
indices: new Types.Array({
307+
indices: new Types.Array(undefined, {
308308
help: 'The vertex indices of the picked face (empty if no face picked)',
309309
}),
310310
},
@@ -365,7 +365,7 @@ module.exports = {
365365
vertices: new Types.VectorArray(),
366366
colors: new Types.ColorArray(),
367367
faces: new Types.FaceArray(),
368-
faceVertexUvs: new Types.Array(),
368+
faceVertexUvs: new Types.Array([[]]),
369369
lineDistances: new Types.Array(),
370370
morphTargets: new Types.Array(),
371371
morphNormals: new Types.Array(),

0 commit comments

Comments
 (0)