Closed sprhawk closed 3 years ago
Hey @sprhawk thanks a lot for the help. Indeed, the @babylonjs/* modules are now a problem for the editor right now and I’m focusing on. You proposition looks really good. What I purpose is, to help me: can you share a repository with what you are intended to have in the generated template? With a minimalist web pack config? I mean a working repository I can « copy » to fit the feature. That would help me a lot !
Thanks again and will fix that ASAP :)
Yeah! The one I’m working on :) Can you create at least a new git branch and create all the files you mentioned as an example to make we pack building well and help me to see the architecture you also mentioned?
@julien-moreau Sorry,I didn't understand well. Could you explain in detail?
No need, i finally understood well your request :)
You can find the preview version here: http://editor.babylonjs.com/electron/preview/BabylonJS%20Editor%20Setup%203.2.1-beta.4.exe
When you export, don't forget to import "./scripts" in your game.ts file :)
Done in the V4! Now using @babylonjs/* modules
I'm woking on a project built with Webpack + typescript, and I want to setup most of scene based on export of Babylon.js Editor.
However I see there is no scripts is exported by the Editor, the scripts are saved inside
project.editorproject
file. And It also depends on global babylonjs which is not flexible to support es6 style code structure.I propose a way to export scripts to solve above problem.
foo.ts
andfoo.deps.ts
,foo.ts
contains all logic code with first line asimport * from "./foo.deps.ts";
, and infoo.deps.ts
contains all required import lines with export symbols, such asexport { Mesh } from "babylonjs"
.export { Mesh } from '@babylonjs/core'
;