From 5ef9d35869a91b248b2fbb3a848abf0d65289baa Mon Sep 17 00:00:00 2001 From: Doug Wright Date: Mon, 28 Aug 2023 11:34:19 +0100 Subject: [PATCH] Import for side effects only, remove workaround --- visualiser/visualiser.ts | 6 +++--- visualiser/workaroundbabylonimportbug.ts | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) delete mode 100644 visualiser/workaroundbabylonimportbug.ts diff --git a/visualiser/visualiser.ts b/visualiser/visualiser.ts index e43318e8..512eab72 100644 --- a/visualiser/visualiser.ts +++ b/visualiser/visualiser.ts @@ -7,6 +7,7 @@ import {ActionManager} from "@babylonjs/core/Actions/actionManager" import {AdvancedDynamicTexture} from "@babylonjs/gui/2D/advancedDynamicTexture"; +import "@babylonjs/core/Animations/animatable"; import {Animation} from "@babylonjs/core/Animations/animation"; import {ArcRotateCamera} from "@babylonjs/core/Cameras/arcRotateCamera"; import "@babylonjs/core/Rendering/boundingBoxRenderer"; @@ -15,8 +16,10 @@ import {Control} from "@babylonjs/gui/2D/controls/control"; import {CreateBox} from "@babylonjs/core/Meshes/Builders/boxBuilder"; import {CreateLines} from "@babylonjs/core/Meshes/Builders/linesBuilder"; import {CreatePlane} from "@babylonjs/core/Meshes/Builders/planeBuilder"; +import "@babylonjs/core/Behaviors/Meshes/pointerDragBehavior"; import {DynamicTexture} from "@babylonjs/core/Materials/Textures/dynamicTexture"; import {Engine} from "@babylonjs/core/Engines/engine"; +import {ExecuteCodeAction} from "@babylonjs/core/Actions/directActions"; import {HemisphericLight} from "@babylonjs/core/Lights/hemisphericLight"; import {HighlightLayer} from "@babylonjs/core/Layers/highlightLayer"; import {Rectangle} from "@babylonjs/gui/2D/controls/rectangle"; @@ -25,9 +28,6 @@ import {StandardMaterial} from "@babylonjs/core/Materials/standardMaterial"; import {TextBlock} from "@babylonjs/gui/2D/controls/textBlock"; import {Vector3} from "@babylonjs/core/Maths/math.vector"; -// https://forum.babylonjs.com/t/executecodeaction-is-not-working-on-meshes-when-imported-es6-style/7002 -import {ExecuteCodeAction} from "./workaroundbabylonimportbug"; - document.addEventListener("DOMContentLoaded", function () { const DEMO_PACKING = { diff --git a/visualiser/workaroundbabylonimportbug.ts b/visualiser/workaroundbabylonimportbug.ts deleted file mode 100644 index ed75f9df..00000000 --- a/visualiser/workaroundbabylonimportbug.ts +++ /dev/null @@ -1,3 +0,0 @@ -export {ExecuteCodeAction} from "@babylonjs/core/Actions/directActions"; -export {Animatable} from "@babylonjs/core/Animations/animatable"; -export {PointerDragBehavior} from "@babylonjs/core/Behaviors/Meshes/pointerDragBehavior";