Skip to content

Commit

Permalink
Revert "Fixed: rapyuta-robotics/zethus#88"
Browse files Browse the repository at this point in the history
This reverts commit 270e5c6.
  • Loading branch information
hbcarlos committed Jun 16, 2020
1 parent 2007609 commit cee09c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
9 changes: 0 additions & 9 deletions src/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
Material,
Mesh,
MeshBasicMaterial,
MeshStandardMaterial,
Object3D,
Quaternion,
TorusGeometry,
Expand Down Expand Up @@ -134,14 +133,6 @@ export function assertIsMeshBasicMaterial(
}
}

export function assertIsMaterialWithColor(
val: any,
): asserts val is MeshBasicMaterial {
if (!('color' in val)) {
throw new TypeError(`Expected 'val' to be MeshBasicMaterial with color`);
}
}

export function assertBehavesLikeArray<T>(val: any): asserts val is Array<T> {
if (val.length === undefined) {
throw new TypeError(`Expected 'val' to be an array`);
Expand Down
7 changes: 2 additions & 5 deletions src/utils/transform.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Color, Mesh, Object3D, Quaternion } from 'three';
import { assertIsMaterialWithColor } from './helpers';
import { assertIsMaterial } from './helpers';
import Line from '../primitives/Line';
import LineSegments from '../primitives/LineSegment';

Expand Down Expand Up @@ -28,10 +28,7 @@ export const setColor = (
object: Mesh | Line | LineSegments,
color: string | number | RosMessage.Color,
) => {
console.log("¡¡¡¡ assertIsMeshBasicMaterial !!!!")
console.log(object)
assertIsMaterialWithColor(object.material);

assertIsMaterial(object.material);
if (typeof color === 'string' || typeof color === 'number') {
object.material.color = new Color(color);
} else {
Expand Down

0 comments on commit cee09c0

Please sign in to comment.