Jump to content

Is it possible to build babylonjs src using webpack/angular ?


1glayfan
 Share

Recommended Posts

Hello babylonjs experts,

I wonder if it is possible to build the babylonjs src using webpack/angular.
I tried to this this but hit into the following error messages:
 

ERROR in src/Audio/babylon.analyser.ts(65,13): error TS2322: Type 'Float32Array' is not assignable to type 'Uint8Array'.
  Types of property '[Symbol.toStringTag]' are incompatible.
    Type '"Float32Array"' is not assignable to type '"UInt8Array"'.
src/Mesh/babylon.geometry.ts(1120,76): error TS2345: Argument of type 'Int32Array' is not assignable to parameter of type 'number[] | Float32Array'.
  Type 'Int32Array' is not assignable to type 'Float32Array'.
    Types of property 'copyWithin' are incompatible.
      Type '(target: number, start: number, end?: number) => Int32Array' is not assignable to type '(target: number, start: number, end?: number) => Float32Array'.
        Type 'Int32Array' is not assignable to type 'Float32Array'.
src/Mesh/babylon.mesh.vertexData.ts(1743,66): error TS2345: Argument of type 'IndicesArray' is not assignable to parameter of type 'number[] | Float32Array'.
  Type 'Int32Array' is not assignable to type 'number[] | Float32Array'.
    Type 'Int32Array' is not assignable to type 'Float32Array'.
src/Tools/babylon.dds.ts(289,13): error TS2322: Type 'Uint8Array' is not assignable to type 'Float32Array'.
  Types of property '[Symbol.toStringTag]' are incompatible.
    Type '"UInt8Array"' is not assignable to type '"Float32Array"'.
src/Tools/babylon.dds.ts(311,13): error TS2322: Type 'Uint8Array' is not assignable to type 'Float32Array'.
src/Tools/babylon.tools.ts(1214,13): error TS2322: Type 'ArrayBuffer | SharedArrayBuffer' is not assignable to type 'ArrayBuffer'.

If you have done this successfully with webpack or angular, please let me know.

Link to comment
Share on other sites

Thanks. 

I do use bjs npm package for normal development. My codes are all in ts. I try to avoid js as much as possible. 

But here I am trying to build my project with bjs ts  source codes directly (so no bjs npm here), with goals being:

1) I can single step debug into bjs codes for hard bugs

2) I can single step for better understanding of the bjs framework 

The docs you mentioned AFAIK is only for using the npm package? I am currently outside now but will look into again soon. 

Link to comment
Share on other sites

You did say you were using source, but I was just confirming.  You are correct - docs are only for NPM package.

Stepping through bjs TS code with these instructions, but only for ie: Playground, Sandbox:
VS Code - https://doc.babylonjs.com/how_to/how_to_start#debug
Visual Studio - https://doc.babylonjs.com/how_to/setup_visualstudio

I've actually never tried to step through a dependent project in TypeScript - another option is to use babylon.max and step into JS.  Hopefully somebody can help you out.

Link to comment
Share on other sites

I did look into the VS config to build bjs, I think I got it working for VS, but what I am trying to do here is on webpack/angular though which is different.

The webpack/angular env is quite a beast to master unfortunately.

Yes you are right that Babylon.max will let you single step but my head will spin forever every time I see js codes :)

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...