From bdd300279a62a3bda093eb5b09c94e5bced9d382 Mon Sep 17 00:00:00 2001 From: Kevin Levron Date: Thu, 6 May 2021 20:53:51 +0200 Subject: [PATCH] fix missing default --- src/materials/Material.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/materials/Material.ts b/src/materials/Material.ts index 580404b..ae2c355 100644 --- a/src/materials/Material.ts +++ b/src/materials/Material.ts @@ -91,10 +91,11 @@ export function materialComponent

>( }) } +// TODO : proper export const BasicMaterial = materialComponent('BasicMaterial', { props: { type: Object as PropType, default: () => ({}) } }, (opts) => new MeshBasicMaterial(opts)) export const LambertMaterial = materialComponent('LambertMaterial', { props: { type: Object as PropType, default: () => ({}) } }, (opts) => new MeshLambertMaterial(opts)) -export const PhongMaterial = materialComponent('PhongMaterial', { props: Object as PropType }, (opts) => new MeshPhongMaterial(opts)) -export const PhysicalMaterial = materialComponent('PhysicalMaterial', { props: Object as PropType }, (opts) => new MeshPhysicalMaterial(opts)) -export const PointsMaterial = materialComponent('PointsMaterial', { props: Object as PropType }, (opts) => new TPointsMaterial(opts)) -export const StandardMaterial = materialComponent('StandardMaterial', { props: Object as PropType }, (opts) => new MeshStandardMaterial(opts)) -export const ToonMaterial = materialComponent('ToonMaterial', { props: Object as PropType }, (opts) => new MeshToonMaterial(opts)) +export const PhongMaterial = materialComponent('PhongMaterial', { props: { type: Object as PropType, default: () => ({}) } }, (opts) => new MeshPhongMaterial(opts)) +export const PhysicalMaterial = materialComponent('PhysicalMaterial', { props: { type: Object as PropType, default: () => ({}) } }, (opts) => new MeshPhysicalMaterial(opts)) +export const PointsMaterial = materialComponent('PointsMaterial', { props: { type: Object as PropType, default: () => ({}) } }, (opts) => new TPointsMaterial(opts)) +export const StandardMaterial = materialComponent('StandardMaterial', { props: { type: Object as PropType, default: () => ({}) } }, (opts) => new MeshStandardMaterial(opts)) +export const ToonMaterial = materialComponent('ToonMaterial', { props: { type: Object as PropType, default: () => ({}) } }, (opts) => new MeshToonMaterial(opts))