Skip to content

Commit

Permalink
Use undefined instead of null for the default Object3DComponent value
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlong authored and fernandojsg committed Aug 6, 2020
1 parent 2a42dcb commit c87ee09
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/core/Object3DComponent.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { Component, RefPropType } from "ecsy";
import { Object3D } from "three";

export class Object3DComponent extends Component<Object3DComponent> {
value: Object3D | null;
value?: Object3D;

static schema: {
value: { default: null, type: RefPropType<Object3D> }
value: { type: RefPropType<Object3D> }
};
}
2 changes: 1 addition & 1 deletion src/core/Object3DComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import { Component, Types } from "ecsy";
export class Object3DComponent extends Component {}

Object3DComponent.schema = {
value: { default: null, type: Types.Ref }
value: { type: Types.Ref }
};
2 changes: 1 addition & 1 deletion src/core/entity.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ export class ECSYThreeEntity extends _Entity {
addObject3DComponent(obj: Object3D, parentEntity?: Entity): this
removeObject3DComponent(unparent?: boolean): void
remove(forceImmediate?: boolean): void
getObject3D<T extends Object3D>(): (T & ECSYThreeObject3D) | null
getObject3D?<T extends Object3D>(): T & ECSYThreeObject3D
}

0 comments on commit c87ee09

Please sign in to comment.