From fad7492958fd45ab9deba326c9701491a5155a3c Mon Sep 17 00:00:00 2001 From: Brian Zinn Date: Tue, 29 Sep 2020 22:50:27 -0700 Subject: [PATCH] add 'enable*' methods - needed for VR 'enableTeleportation'. --- src/generatedCode.ts | 5 ++++- src/generatedProps.ts | 5 ++++- tools/generate-code.ts | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/generatedCode.ts b/src/generatedCode.ts index 7a0f727c..410ec359 100644 --- a/src/generatedCode.ts +++ b/src/generatedCode.ts @@ -39,7 +39,7 @@ import { FadeInOutBehavior as BabylonjsCoreFadeInOutBehavior } from "@babylonjs/ import { MultiPointerScaleBehavior as BabylonjsCoreMultiPointerScaleBehavior } from "@babylonjs/core/Behaviors/Meshes/multiPointerScaleBehavior"; import { PointerDragBehavior as BabylonjsCorePointerDragBehavior } from "@babylonjs/core/Behaviors/Meshes/pointerDragBehavior"; import { SixDofDragBehavior as BabylonjsCoreSixDofDragBehavior } from "@babylonjs/core/Behaviors/Meshes/sixDofDragBehavior"; -import { VRExperienceHelper as BabylonjsCoreVRExperienceHelper, OnAfterEnteringVRObservableEvent as BabylonjsCoreOnAfterEnteringVRObservableEvent, VRExperienceHelperOptions as BabylonjsCoreVRExperienceHelperOptions } from "@babylonjs/core/Cameras/VR/vrExperienceHelper"; +import { VRExperienceHelper as BabylonjsCoreVRExperienceHelper, OnAfterEnteringVRObservableEvent as BabylonjsCoreOnAfterEnteringVRObservableEvent, VRExperienceHelperOptions as BabylonjsCoreVRExperienceHelperOptions, VRTeleportationOptions as BabylonjsCoreVRTeleportationOptions } from "@babylonjs/core/Cameras/VR/vrExperienceHelper"; import { PoseEnabledControllerType as BabylonjsCorePoseEnabledControllerType } from "@babylonjs/core/Gamepads/Controllers/poseEnabledController"; import { CascadedShadowGenerator as BabylonjsCoreCascadedShadowGenerator } from "@babylonjs/core/Lights/Shadows/cascadedShadowGenerator"; import { ShadowGenerator as BabylonjsCoreShadowGenerator, ICustomShaderOptions as BabylonjsCoreICustomShaderOptions } from "@babylonjs/core/Lights/Shadows/shadowGenerator"; @@ -433,6 +433,7 @@ export class FiberAbstractMeshPropsHandler implements PropsHandler boolean; diff --git a/tools/generate-code.ts b/tools/generate-code.ts index 72816ddd..14c7fee4 100644 --- a/tools/generate-code.ts +++ b/tools/generate-code.ts @@ -630,7 +630,7 @@ const getInstanceSetMethods = (classDeclaration: ClassDeclaration): MethodDeclar classDeclaration.getInstanceMethods().forEach((methodDeclaration: MethodDeclaration) => { const methodName = methodDeclaration.getName(); // TODO: add ? - if (methodName.startsWith('set') || methodName.startsWith('add') || methodName === 'translate') { + if (methodName.startsWith('set') || methodName.startsWith('add') || methodName.startsWith('enable') || methodName === 'translate') { instanceSetMethods.push(methodDeclaration) } })