Skip to content

Fix faceVertexUvs default #261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions js/scripts/prop-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,9 @@ class ColorArray extends BaseType {
}

class ArrayType extends BaseType {
constructor(options) {
constructor(defaultValue, options) {
super(options);
this.defaultValue = [];
this.defaultValue = defaultValue === undefined ? [] : defaultValue;
}
getTraitlet() {
return `List()${this.getTagString()}`;
Expand Down
8 changes: 4 additions & 4 deletions js/scripts/three-class-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,22 +289,22 @@ module.exports = {
nullable: true,
help: 'The index of the face picked (null if no face picked)',
}),
modifiers: new Types.Array({
modifiers: new Types.Array(undefined, {
help: 'The keyboard modifiers held at the pick event in the following order: [SHIFT, CTRL, ALT, META]',
}),
object: new Types.ThreeType('Object3D', {
nullable: true,
help: 'The picked object (null if no object picked)',
}),
picked: new Types.Array({
picked: new Types.Array(undefined, {
help: 'The other fields on the picker will always be for the first object intersection. ' +
'If ``all`` is set true, this field will be an array containing the same information ' +
'for all intersections.',
}),
uv: new Types.Vector2(0, 0, {
help: 'The UV coordinate picked (all zero if invalid pick)',
}),
indices: new Types.Array({
indices: new Types.Array(undefined, {
help: 'The vertex indices of the picked face (empty if no face picked)',
}),
},
Expand Down Expand Up @@ -365,7 +365,7 @@ module.exports = {
vertices: new Types.VectorArray(),
colors: new Types.ColorArray(),
faces: new Types.FaceArray(),
faceVertexUvs: new Types.Array(),
faceVertexUvs: new Types.Array([[]]),
lineDistances: new Types.Array(),
morphTargets: new Types.Array(),
morphNormals: new Types.Array(),
Expand Down