1glayfan Posted March 2, 2018 Share Posted March 2, 2018 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. Quote Link to comment Share on other sites More sharing options...
brianzinn Posted March 2, 2018 Share Posted March 2, 2018 You are using the babylonjs source? I haven't had any issues with NPM and webpack - here are the docs: https://doc.babylonjs.com/features/npm_support If that doesn't work can you provide more information - is your project TypeScript or JavaScript, which version of BabylonJS. Quote Link to comment Share on other sites More sharing options...
1glayfan Posted March 2, 2018 Author Share Posted March 2, 2018 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. Quote Link to comment Share on other sites More sharing options...
brianzinn Posted March 2, 2018 Share Posted March 2, 2018 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. 1glayfan 1 Quote Link to comment Share on other sites More sharing options...
1glayfan Posted March 2, 2018 Author Share Posted March 2, 2018 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.