How can I import BABYLON.Space in ES6 module?

I’m trying to import and use BABYLON.Space in ES6 module.
But I can’t find Space in @babylonjs/core or other modules.
I’m bundling babylonjs with my code.

import { Space } from “@babylonjs/core/Maths/math.axis”;

You should have a look at ES6 - Babylon.js Documentation .

I agree that finding the modules is sometimes really annoying.

1 Like

Here is what I used based on the solution.

import { Space, Axis } from ‘@babylonjs/core/Maths/math’;

1 Like

I’ve been having this issue of finding the right modules to import a lot as well. In case it helps, best workflow I’ve found is a codebase search using Github.

For example you’d get here: Search · space · GitHub and from there it’s relatively easy to find the right import.

Bonus for VS code users: npm Intellisense will help you autocomplete npm modules in import statements (including in directories).

Bonus for Alfred / Raycast users (MacOS): I have a “babygit” keyword to search for this using the following search URL: https://github.com/BabylonJS/Babylon.js/search?q={query}&unscoped_q={query}

:v:

4 Likes

Thank you for nice tip!

1 Like