|
@@ -9,6 +9,7 @@ import { GlobalState } from "../../../globalState";
|
|
// import { OptionsLineComponent } from '../../lines/optionsLineComponent';
|
|
// import { OptionsLineComponent } from '../../lines/optionsLineComponent';
|
|
import { ButtonLineComponent } from '../../lines/buttonLineComponent';
|
|
import { ButtonLineComponent } from '../../lines/buttonLineComponent';
|
|
import { CheckBoxLineComponent } from '../../lines/checkBoxLineComponent';
|
|
import { CheckBoxLineComponent } from '../../lines/checkBoxLineComponent';
|
|
|
|
+import { KHR_materials_variants } from 'babylonjs-loaders/glTF/2.0/Extensions/KHR_materials_variants';
|
|
|
|
|
|
interface IVariantsPropertyGridComponentProps {
|
|
interface IVariantsPropertyGridComponentProps {
|
|
globalState: GlobalState;
|
|
globalState: GlobalState;
|
|
@@ -26,11 +27,6 @@ export class VariantsPropertyGridComponent extends React.Component<IVariantsProp
|
|
}
|
|
}
|
|
|
|
|
|
render() {
|
|
render() {
|
|
- const KHR_materials_variants = (BABYLON as any)?.GLTF2?.Loader?.Extensions?.KHR_materials_variants;
|
|
|
|
- if (!KHR_materials_variants) {
|
|
|
|
- return null;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
let variants: string[] = KHR_materials_variants.GetAvailableVariants(this.props.host);
|
|
let variants: string[] = KHR_materials_variants.GetAvailableVariants(this.props.host);
|
|
|
|
|
|
if (!variants || variants.length === 0) {
|
|
if (!variants || variants.length === 0) {
|