diff --git a/src/CreatedInstance.ts b/src/CreatedInstance.ts index b472530e..b343d53a 100644 --- a/src/CreatedInstance.ts +++ b/src/CreatedInstance.ts @@ -18,6 +18,7 @@ export interface InstanceMetadataParameter { isMaterial?: boolean // indicates a custom component created by end-user has been created isGUI3DControl?: boolean // does not work with 2D isGUI2DControl?: boolean // does not work with 3D + isGUI2DGrid?: boolean isTexture?: boolean customType?: boolean // not used by code-gen isCamera?: boolean diff --git a/src/CustomProps.ts b/src/CustomProps.ts index e5a24838..5119c391 100644 --- a/src/CustomProps.ts +++ b/src/CustomProps.ts @@ -46,6 +46,17 @@ export type Control3DCustomProps = { onControlAdded?: (instance: CreatedInstance) => void } & CustomProps; +export type Control2DCustomProps = { + /** + * ??? + */ + gridColumn?: number + /** + * ??? + */ + gridRow?: number +} & CustomProps; + export type MaterialCustomProps = { /** * For attaching the same material to multiple meshes (by mesh name) @@ -144,4 +155,4 @@ export type VirtualKeyboardCustomProps = { /** * A union of all CustomProps as a convenience typing and easier maintenance in other areas of code (ie: CreatedInstance and HostConfig) */ -export type AnyCustomProps = CustomProps & (AbstractMeshCustomProps & ADTCustomProps & CameraCustomProps & Control3DCustomProps & GizmoCustomProps & GlowLayerCustomProps & VirtualKeyboardCustomProps & ShadowGeneratorCustomProps & MaterialCustomProps) \ No newline at end of file +export type AnyCustomProps = CustomProps & (AbstractMeshCustomProps & ADTCustomProps & CameraCustomProps & Control2DCustomProps & Control3DCustomProps & GizmoCustomProps & GlowLayerCustomProps & VirtualKeyboardCustomProps & ShadowGeneratorCustomProps & MaterialCustomProps) \ No newline at end of file diff --git a/src/ReactBabylonJSHostConfig.ts b/src/ReactBabylonJSHostConfig.ts index fa9b41ed..01374c54 100644 --- a/src/ReactBabylonJSHostConfig.ts +++ b/src/ReactBabylonJSHostConfig.ts @@ -15,9 +15,11 @@ import { HasPropsHandlers, PropertyUpdate, UpdatePayload, PropsHandler, CustomPr import { LifecycleListener } from "./LifecycleListener"; import { GeneratedParameter, CreationType } from './codeGenerationDescriptors'; import { applyUpdateToInstance, applyInitialPropsToCreatedInstance } from './UpdateInstance'; -import { HostRegistrationStore } from './HostRegistrationStore'; +import { DynamicHost, HostRegistrationStore } from './HostRegistrationStore'; -import RowDefinitionLifecycleListener, { RowDefinition } from './customHosts/grid' +import { RowDefinition } from './customHosts/grid/rowDefinition'; +import { ColumnDefinition } from './customHosts/grid/columnDefinition'; +import { ValueAndUnit } from '@babylonjs/gui'; // ** TODO: switch to node module 'scheduler', but compiler is not finding 'require()' exports currently... type HostCreatedInstance = CreatedInstance | undefined @@ -313,14 +315,14 @@ const ReactBabylonJSHostConfig: HostConfig< const classDefinition = (GENERATED as any)[`Fiber${underlyingClassName}`] - let dynamicRegisteredHost = undefined; + let dynamicRegisteredHost: DynamicHost | undefined = undefined; if (classDefinition === undefined) { - // ValueAndUnit does not have setters for value/isPixel, so did not generate (see ./customHosts/grid/) - // TODO: make a map of custom "known hosts" - const knownHostElements = ['rowDefinition', 'columnDefinition']; - if (knownHostElements.indexOf(underlyingClassName) !== -1) { - dynamicRegisteredHost = RowDefinition; - console.log('NEW dynamic registered host:', RowDefinition); + const ownDynamicHosts: Record> = { + 'rowDefinition': RowDefinition, + 'columnDefinition': ColumnDefinition + }; + if (underlyingClassName in ownDynamicHosts) { + dynamicRegisteredHost = ownDynamicHosts[underlyingClassName]; } else { dynamicRegisteredHost = HostRegistrationStore.GetRegisteredHost(type); } @@ -355,6 +357,8 @@ const ReactBabylonJSHostConfig: HostConfig< skipAutoAttach: props.skipAutoAttach, attachGizmoToMesh: props.attachGizmoToMesh, attachGizmoToNode: props.attachGizmoToNode, + gridColumn: props.gridColumn, + gridRow: props.gridRow }; if (customProps.assignFrom !== undefined) { @@ -365,7 +369,6 @@ const ReactBabylonJSHostConfig: HostConfig< } else if (dynamicRegisteredHost !== undefined) { metadata = dynamicRegisteredHost.metadata; - console.log('NEW metadata:', metadata); if (metadata.delayCreation !== true) { babylonObject = dynamicRegisteredHost.hostFactory(scene!); } @@ -485,7 +488,6 @@ const ReactBabylonJSHostConfig: HostConfig< lifecycleListener = new (CUSTOM_HOSTS as any)[metadataLifecycleListenerName + 'LifecycleListener'](scene, props); } else if (dynamicRegisteredHost?.lifecycleListenerFactory) { lifecycleListener = dynamicRegisteredHost.lifecycleListenerFactory(scene!, props); - console.log('NEW lifecycle listener:', lifecycleListener); } else { lifecycleListener = new CUSTOM_HOSTS.FallbackLifecycleListener(scene!, props); } diff --git a/src/customComponents/Html.tsx b/src/customComponents/Html.tsx index d51b2954..11a16553 100644 --- a/src/customComponents/Html.tsx +++ b/src/customComponents/Html.tsx @@ -42,7 +42,7 @@ function isObjectVisible(el: AbstractMesh, camera: Camera, occlude: AbstractMesh let hit = camera.getScene().pickWithRay(ray, (m) => (occlude.length > 0 ? (occlude.indexOf(m) !== -1) : m !== el.parent) && m.name !== "skybox"); - console.log(hit); + // console.log(hit); return hit ? (hit.pickedMesh?.name === el.parent?.name || hit.distance * hit.distance >= Vector3.DistanceSquared(objectPos, cameraPos)) : false; } diff --git a/src/customHosts/AdvancedDynamicTextureLifecycleListener.ts b/src/customHosts/AdvancedDynamicTextureLifecycleListener.ts index d49c8f80..af4506dc 100644 --- a/src/customHosts/AdvancedDynamicTextureLifecycleListener.ts +++ b/src/customHosts/AdvancedDynamicTextureLifecycleListener.ts @@ -8,6 +8,8 @@ import BaseLifecycleListener from './BaseLifecycleListener'; import { ADTCustomProps, VirtualKeyboardCustomProps } from '../CustomProps'; import { CreatedInstance } from '../CreatedInstance'; import { FiberAdvancedDynamicTextureProps } from '../generatedProps'; +import { Children } from 'react'; +import { Grid } from '@babylonjs/gui/2D/controls/grid'; export default class AdvancedDynamicTextureLifecycleListener extends BaseLifecycleListener { @@ -49,13 +51,19 @@ export default class AdvancedDynamicTextureLifecycleListener extends BaseLifecyc } } - addControls(instance: CreatedInstance) { + addControls(instance: CreatedInstance) { // When there is a panel, it must be added before the children. Otherwise there is no UtilityLayer to attach to. // This project before 'react-reconciler' was added from parent up the tree. 'react-reconciler' wants to do the opposite. instance.children.forEach(child => { if (child.metadata.isGUI2DControl === true) { - instance.hostInstance!.addControl(child.hostInstance); - child.state = { added: true }; + if(instance.metadata.isGUI2DGrid === true) { + const { gridRow, gridColumn } = child.customProps; + (instance.hostInstance as Grid).addControl(child.hostInstance, gridRow, gridColumn); + } else { + instance.hostInstance!.addControl(child.hostInstance); + } + + child.state = child.state ? {...child.state, added: true} : { added: true }; } }) diff --git a/src/customHosts/GUI2DControlLifecycleListener.ts b/src/customHosts/GUI2DControlLifecycleListener.ts index a5d21def..d64e3fde 100644 --- a/src/customHosts/GUI2DControlLifecycleListener.ts +++ b/src/customHosts/GUI2DControlLifecycleListener.ts @@ -1,4 +1,5 @@ import { Control } from '@babylonjs/gui/2D/controls/control.js'; +import { Grid } from '@babylonjs/gui/2D/controls/grid.js'; import { VirtualKeyboard } from '@babylonjs/gui/2D/controls/virtualKeyboard.js'; import BaseLifecycleListener from './BaseLifecycleListener'; @@ -52,8 +53,13 @@ export default class GUI2DControlLifecycleListener extends BaseLifecycleListener addControls(instance: CreatedInstance) { instance.children.forEach(child => { if (child.metadata.isGUI2DControl === true) { - // console.warn(`calling [${instance.hostInstance.name}].addControl(${child.hostInstance.name})`); - instance.hostInstance.addControl(child.hostInstance); + if(instance.metadata.isGUI2DGrid === true) { + const { gridRow, gridColumn } = child.customProps; + (instance.hostInstance as Grid).addControl(child.hostInstance, gridRow, gridColumn); + } else { + instance.hostInstance!.addControl(child.hostInstance); + } + child.state = { added: true }; } }) diff --git a/src/customHosts/grid/columnDefinition.ts b/src/customHosts/grid/columnDefinition.ts new file mode 100644 index 00000000..191fef80 --- /dev/null +++ b/src/customHosts/grid/columnDefinition.ts @@ -0,0 +1,53 @@ +import { Scene } from "@babylonjs/core/scene.js"; +import { Nullable } from "@babylonjs/core/types.js"; +import { Grid } from "@babylonjs/gui/2D/controls/grid.js"; +import { ValueAndUnit } from "@babylonjs/gui/2D/valueAndUnit.js"; +import { RowOrColumnDefinitionProps, RowOrColumnDefinitionPropsHandler } from "."; +import { CreatedInstance } from "../../CreatedInstance"; +import { DynamicHost } from "../../HostRegistrationStore"; +import DeferredCreationLifecycleListener from "../DeferredCreationLifecycleListener"; + +/** + * We delay instantiation and when parented add a column definition to parent "Grid". + */ + export default class ColumnDefinitionLifecycleListener extends DeferredCreationLifecycleListener { + + private _grid: Grid | undefined; + + createInstance = (instance: CreatedInstance, scene: Scene, props: RowOrColumnDefinitionProps): Nullable => { + if (!this._grid) { + return null; + } + this._grid.addColumnDefinition(props.value, props.unit === ValueAndUnit.UNITMODE_PIXEL); + instance.hostInstance = this._grid.getColumnDefinition(this._grid.columnCount - 1)!; + return instance.hostInstance; + } + + onParented(parent: CreatedInstance, child: CreatedInstance): any { + super.onParented(parent, child); + // TODO: search hierarchy for a grid, but it should always be parent. + this._grid = parent.hostInstance; + } +} + +export const ColumnDefinition: DynamicHost = { + hostElementName: "columnDefinition", + + propHandlerInstance: new RowOrColumnDefinitionPropsHandler(), + + hostFactory: (scene: Scene) => null, + + lifecycleListenerFactory: (scene: Scene, props: any) => new ColumnDefinitionLifecycleListener(scene, props), + + createInfo: { + "creationType": "Constructor", + "libraryLocation": "ValueAndUnit", + "namespace": "@babylonjs/gui", + "parameters": [/* value and unit! */] + }, + // TODO: this should be "M"etadata + metadata: { + "className": "ColumnDefinition", + "delayCreation": true, + } +} diff --git a/src/customHosts/grid/index.ts b/src/customHosts/grid/index.ts index 29f0956a..3d8684aa 100644 --- a/src/customHosts/grid/index.ts +++ b/src/customHosts/grid/index.ts @@ -1,50 +1,32 @@ import { Key, ReactNode, Ref } from "react"; -import { Scene } from "@babylonjs/core/scene.js"; -import { Nullable } from "@babylonjs/core/types.js"; -import { Grid } from "@babylonjs/gui/2D/controls/grid.js"; -import { ValueAndUnit } from "@babylonjs/gui/2D/valueAndUnit.js"; - -import { CreatedInstance } from "../../CreatedInstance"; -import { DynamicHost } from "../../HostRegistrationStore"; import { checkPrimitiveDiff, HasPropsHandlers, PropertyUpdate, PropsHandler } from "../../PropsHandler"; -import DeferredCreationLifecycleListener from "../DeferredCreationLifecycleListener"; + export type GridNode = { key?: Key; ref?: Ref; // will return value and unit? }; -export type RowDefinitionProps = { - /** - * Numerical value to apply to height - */ - height: number - /** - * Indicating if the value is stored as pixel - */ - isPixel?: boolean -} - -export type ColumnDefinitionProps = { - width: number - isPixel?: boolean +export type RowOrColumnDefinitionProps = { + value: number + unit?: number } declare global { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { - rowDefinition: RowDefinitionProps & GridNode; - columnDefinition: ColumnDefinitionProps & GridNode; + rowDefinition: RowOrColumnDefinitionProps & GridNode; + columnDefinition: RowOrColumnDefinitionProps & GridNode; } } } -export class CustomRowDefinitionPropsHandler implements PropsHandler { - getPropertyUpdates(oldProps: RowDefinitionProps, newProps: RowDefinitionProps): PropertyUpdate[] | null { +export class RowOrColumnDefinitionPropsHandlers implements PropsHandler { + getPropertyUpdates(oldProps: RowOrColumnDefinitionProps, newProps: RowOrColumnDefinitionProps): PropertyUpdate[] | null { const changedProps: PropertyUpdate[] = [] - checkPrimitiveDiff(oldProps.height, newProps.height, 'height', changedProps) - checkPrimitiveDiff(oldProps.isPixel, newProps.isPixel, 'isPixel', changedProps) + checkPrimitiveDiff(oldProps.value, newProps.value, 'value', changedProps); + checkPrimitiveDiff(oldProps.unit, newProps.unit, 'unit', changedProps); return changedProps.length === 0 ? null : changedProps; } } @@ -52,69 +34,20 @@ export class CustomRowDefinitionPropsHandler implements PropsHandler { - private propsHandlers: PropsHandler[]; +export class RowOrColumnDefinitionPropsHandler implements HasPropsHandlers { + private propsHandlers: PropsHandler[]; constructor() { this.propsHandlers = [ - // NOTE: Cannot set property isPixel of [object Object] which has only a getter - // new CustomRowDefinitionPropsHandler() + new RowOrColumnDefinitionPropsHandlers() ]; } - getPropsHandlers(): PropsHandler[] { + getPropsHandlers(): PropsHandler[] { return this.propsHandlers; } - addPropsHandler(propHandler: PropsHandler): void { + addPropsHandler(propHandler: PropsHandler): void { this.propsHandlers.push(propHandler); } } - -export const RowDefinition: DynamicHost = { - hostElementName: "rowDefinition", - - propHandlerInstance: new RowDefinitionPropsHandler(), - - hostFactory: (scene: Scene) => null, - - lifecycleListenerFactory: (scene: Scene, props: any) => new RowDefinitionLifecycleListener(scene, props), - - createInfo: { - "creationType": "Constructor", - "libraryLocation": "ValueAndUnit", - "namespace": "@babylonjs/gui", - "parameters": [/* value and unit! */] - }, - // TODO: this should be "M"etadata - metadata: { - "className": "RowDefinition", - "delayCreation": true, - } -} - -/** - * We delay instantiation and when parented add a row definition to parent "Grid". - */ -export default class RowDefinitionLifecycleListener extends DeferredCreationLifecycleListener { - - private _grid: Grid | undefined; - - createInstance = (instance: CreatedInstance, scene: Scene, props: RowDefinitionProps): Nullable => { - if (!this._grid) { - return null; - } - // these should be set from the props handler. TODO: test. - this._grid.addRowDefinition(props.height, props.isPixel); - instance.hostInstance = this._grid.getRowDefinition(this._grid.rowCount - 1)!; - console.log('added row:', instance.hostInstance); - return instance.hostInstance; - } - - onParented(parent: CreatedInstance, child: CreatedInstance): any { - super.onParented(parent, child); - // TODO: search hierarchy for a grid, but it should always be parent. - console.log('adding row definition to:', parent.metadata, parent.hostInstance); - this._grid = parent.hostInstance; - } -} \ No newline at end of file diff --git a/src/customHosts/grid/rowDefinition.ts b/src/customHosts/grid/rowDefinition.ts new file mode 100644 index 00000000..2583640e --- /dev/null +++ b/src/customHosts/grid/rowDefinition.ts @@ -0,0 +1,55 @@ +import { Scene } from "@babylonjs/core/scene.js"; +import { Nullable } from "@babylonjs/core/types.js"; +import { Grid } from "@babylonjs/gui/2D/controls/grid.js"; +import { ValueAndUnit } from "@babylonjs/gui/2D/valueAndUnit.js"; +import { RowOrColumnDefinitionProps, RowOrColumnDefinitionPropsHandler } from "."; +import { CreatedInstance } from "../../CreatedInstance"; +import { DynamicHost } from "../../HostRegistrationStore"; + +import DeferredCreationLifecycleListener from "../DeferredCreationLifecycleListener"; + +/** + * We delay instantiation and when parented add a row definition to parent "Grid". + */ + export default class RowDefinitionLifecycleListener extends DeferredCreationLifecycleListener { + + private _grid: Grid | undefined; + + createInstance = (instance: CreatedInstance, scene: Scene, props: RowOrColumnDefinitionProps): Nullable => { + if (!this._grid) { + return null; + } + + this._grid.addRowDefinition(props.value, props.unit === ValueAndUnit.UNITMODE_PIXEL); + instance.hostInstance = this._grid.getRowDefinition(this._grid.rowCount - 1)!; + return instance.hostInstance; + } + + onParented(parent: CreatedInstance, child: CreatedInstance): any { + super.onParented(parent, child); + // TODO: search hierarchy for a grid, but it should always be parent. + this._grid = parent.hostInstance; + } +} + +export const RowDefinition: DynamicHost = { + hostElementName: "rowDefinition", + + propHandlerInstance: new RowOrColumnDefinitionPropsHandler(), + + hostFactory: (scene: Scene) => null, + + lifecycleListenerFactory: (scene: Scene, props: any) => new RowDefinitionLifecycleListener(scene, props), + + createInfo: { + "creationType": "Constructor", + "libraryLocation": "ValueAndUnit", + "namespace": "@babylonjs/gui", + "parameters": [/* value and unit! */] + }, + // TODO: this should be "M"etadata + metadata: { + "className": "RowDefinition", + "delayCreation": true, + } +} \ No newline at end of file diff --git a/src/generatedCode.ts b/src/generatedCode.ts index 6f6517d6..8a7deef2 100644 --- a/src/generatedCode.ts +++ b/src/generatedCode.ts @@ -7928,6 +7928,7 @@ export class FiberGrid implements HasPropsHandlers { }; public static readonly Metadata: CreatedInstanceMetadata = { "isGUI2DControl": true, + "isGUI2DGrid": true, "className": "FiberGrid" }; } diff --git a/src/generatedProps.ts b/src/generatedProps.ts index c74a0d32..7c8fb668 100644 --- a/src/generatedProps.ts +++ b/src/generatedProps.ts @@ -231,7 +231,7 @@ import { VolumeBasedPanel as BabylonjsGuiVolumeBasedPanel } from "@babylonjs/gui import { GUI3DManager as BabylonjsGuiGUI3DManager } from "@babylonjs/gui/3D/gui3DManager.js"; import { FluentMaterial as BabylonjsGuiFluentMaterial } from "@babylonjs/gui/3D/materials/fluentMaterial.js"; import { Key, ReactNode, Ref } from "react"; -import { AbstractMeshCustomProps, ADTCustomProps, CameraCustomProps, Control3DCustomProps, CustomProps, GizmoCustomProps, GlowLayerCustomProps, MaterialCustomProps, ShadowGeneratorCustomProps, VirtualKeyboardCustomProps, VRExperienceHelperCustomProps } from "./CustomProps"; +import { AbstractMeshCustomProps, ADTCustomProps, CameraCustomProps, Control2DCustomProps, Control3DCustomProps, CustomProps, GizmoCustomProps, GlowLayerCustomProps, MaterialCustomProps, ShadowGeneratorCustomProps, VirtualKeyboardCustomProps, VRExperienceHelperCustomProps } from "./CustomProps"; import { DynamicTerrain as ExtensionsDynamicTerrain } from "./extensions/DynamicTerrain"; export type BabylonNode = { @@ -1914,7 +1914,7 @@ export type FiberControlProps = { width?: string | number; widthInPixels?: number; zIndex?: number; - } & CustomProps; + } & Control2DCustomProps; export type FiberControlPropsCtor = { name?: string; }; diff --git a/storybook/stories/babylonjs/GUI/grid.stories.js b/storybook/stories/babylonjs/GUI/grid.stories.js index 3891f2dd..e60dacd1 100644 --- a/storybook/stories/babylonjs/GUI/grid.stories.js +++ b/storybook/stories/babylonjs/GUI/grid.stories.js @@ -1,22 +1,81 @@ -import React from 'react' -import { Vector3 } from '@babylonjs/core' -import { Engine, Scene } from 'react-babylonjs' +import React, { useEffect, useState } from 'react'; +import { Vector3 } from '@babylonjs/core'; +import { Engine, Scene, useScene } from 'react-babylonjs'; -import '../../style.css' +import '../../style.css'; +import { ValueAndUnit } from '@babylonjs/gui/2D/valueAndUnit'; export default { title: 'GUI' }; -/*export */ const Grid = () => ( +const Inspector = () => { + const scene = useScene(); + scene.debugLayer.show(); + return null; +} + +const FullScreen = () => { + // should run on latest alphas of BabylonJS 5.0 alpha 63+ + // https://github.com/BabylonJS/Babylon.js/pull/11569 + // https://playground.babylonjs.com/#0ZVTMY + // const direction = useRef(1); + // const [low, setLow] = useState(0.5); + + // useEffect(() => { + // const handle = setInterval(() => { + // setLow(cur => { + // const next = cur + (0.1 * direction.current); + // console.log('next:', next); + // if (next < 0.1 || next > 0.9) { + // direction.current *= -1; + // } + // return next; + // }) + // }, 1000); + + // return () => { + // clearInterval(handle); + // } + // }, []) + + const [background, setBackground] = useState('black'); + useEffect(() => { + const handle = setInterval(() => { + setBackground(cur => cur === 'black' ? '#222222' : 'black') + }, 1000); + + return () => { + clearInterval(handle); + } + }, []) + + + return ( + + + + + + + + + + + + + + + + ) +} + +export const Grid = () => (
- - - - - + +
diff --git a/tools/generate-code.ts b/tools/generate-code.ts index bef53bf7..280bef00 100644 --- a/tools/generate-code.ts +++ b/tools/generate-code.ts @@ -76,7 +76,7 @@ console.log('ver:', ts.version); const CONFLICT_INTRINSIC_ELEMENTS = ['Button', 'Ellipse', 'Image', 'Line', 'Polygon']; -const ALL_CUSTOM_PROPS = ['AbstractMeshCustomProps', 'ADTCustomProps', 'CameraCustomProps', 'Control3DCustomProps', 'CustomProps', 'GizmoCustomProps', 'GlowLayerCustomProps', 'MaterialCustomProps', 'ShadowGeneratorCustomProps', 'VirtualKeyboardCustomProps', 'VRExperienceHelperCustomProps']; +const ALL_CUSTOM_PROPS = ['AbstractMeshCustomProps', 'ADTCustomProps', 'CameraCustomProps', 'Control2DCustomProps', 'Control3DCustomProps', 'CustomProps', 'GizmoCustomProps', 'GlowLayerCustomProps', 'MaterialCustomProps', 'ShadowGeneratorCustomProps', 'VirtualKeyboardCustomProps', 'VRExperienceHelperCustomProps']; // would be good to check JSX.IntrinsicElements with 'keyof', but it's erased at runtime (doesn't work on dynamic strings) // fixes TS warning: Property 'polygon' must be of type SVGProps, but here has type..., so we are skipping to generate polygon for now. @@ -1628,7 +1628,17 @@ const generateCode = async () => { } if (classesOfInterest.get("Control")) { - createClassesInheritedFrom(generatedCodeSourceFile, generatedPropsSourceFile, classesOfInterest.get("Control")!, () => ({ isGUI2DControl: true })); + const instanceMetadaFromClassName = (className: string): InstanceMetadataParameter => { + const DEFAULT = { isGUI2DControl: true } + if (className.substr(CLASS_NAME_PREFIX.length) === 'Grid') { + return { + ...DEFAULT, + isGUI2DGrid: true + } + } + return DEFAULT; + } + createClassesInheritedFrom(generatedCodeSourceFile, generatedPropsSourceFile, classesOfInterest.get("Control")!, instanceMetadaFromClassName, undefined, undefined, () => ('Control2DCustomProps')); } if (classesOfInterest.get("Control3D")) {