From 30d5b79bd3cf17a9c73bb62c98124cab195b2e42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barth=C3=A9lemy?= <31370477+BarthPaleologue@users.noreply.github.com> Date: Wed, 8 Nov 2023 16:26:08 +0100 Subject: [PATCH] fixed tree shaking --- src/ts/character.ts | 5 ++++- src/ts/skybox.ts | 2 +- src/ts/thinInstancePatch.ts | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ts/character.ts b/src/ts/character.ts index 2e70ce8..3ecc514 100644 --- a/src/ts/character.ts +++ b/src/ts/character.ts @@ -5,8 +5,11 @@ import {ArcRotateCamera} from "@babylonjs/core/Cameras/arcRotateCamera"; import character from "../assets/character.glb"; import {Vector3} from "@babylonjs/core/Maths/math.vector"; +import "@babylonjs/core/Animations/animatable"; + import "@babylonjs/loaders/glTF/2.0/glTFLoader"; -import {AbstractMesh, TransformNode} from "@babylonjs/core"; +import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh"; +import { TransformNode } from "@babylonjs/core/Meshes/transformNode"; export async function createCharacterController(scene: Scene, camera: ArcRotateCamera, inputMap: Map): Promise { const result = await SceneLoader.ImportMeshAsync("", "", character, scene); diff --git a/src/ts/skybox.ts b/src/ts/skybox.ts index 60971c8..18c4c33 100644 --- a/src/ts/skybox.ts +++ b/src/ts/skybox.ts @@ -1,7 +1,7 @@ import {Scene} from "@babylonjs/core/scene"; import {SkyMaterial} from "@babylonjs/materials"; import {Vector3} from "@babylonjs/core/Maths/math.vector"; -import {MeshBuilder} from "@babylonjs/core"; +import {MeshBuilder} from "@babylonjs/core/Meshes/meshBuilder"; export function createSkybox(scene: Scene, sunPosition: Vector3) { const skyMaterial = new SkyMaterial("skyMaterial", scene); diff --git a/src/ts/thinInstancePatch.ts b/src/ts/thinInstancePatch.ts index 54741d1..8f0a17d 100644 --- a/src/ts/thinInstancePatch.ts +++ b/src/ts/thinInstancePatch.ts @@ -1,6 +1,7 @@ import {Matrix, Quaternion, Vector3} from "@babylonjs/core/Maths/math.vector"; import {Mesh} from "@babylonjs/core/Meshes/mesh"; -import {TransformNode} from "@babylonjs/core"; +import "@babylonjs/core/Meshes/thinInstanceMesh"; +import {TransformNode} from "@babylonjs/core/Meshes/transformNode"; export class ThinInstancePatch { private baseMesh: Mesh | null = null;