Skip to content

Commit

Permalink
chore: fix lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Aarebecca committed Dec 4, 2023
1 parent 186ca6b commit 2d01d99
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions packages/g6/src/util/shape3d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ export const createShape3D = (
}

// materialType: 'lambert' | 'phong' | 'basic', TODO: type
const { materialType = 'lambert', materialProps = {}, ...otherStyles } = style as any;
const {
materialType = 'lambert',
materialProps = {},
...otherStyles
} = style as any;
if (!device.GeometryCache) {
device.GeometryCache = {};
}
Expand All @@ -59,23 +63,23 @@ export const createShape3D = (
case 'basic':
device.MaterialCache[materialType as string] = new MeshBasicMaterial(
device,
materialProps
materialProps,
);
break;
case 'phong': {
device.MaterialCache[materialType as string] = new MeshPhongMaterial(
device,
{
shininess: 30,
...materialProps
}
{
shininess: 30,
...materialProps,
},
);
}
case 'lambert':
default: {
device.MaterialCache[materialType as string] = new MeshLambertMaterial(
device,
materialProps
materialProps,
);
break;
}
Expand Down

0 comments on commit 2d01d99

Please sign in to comment.