inteja Posted March 30, 2018 Share Posted March 30, 2018 Following docs here https://doc.babylonjs.com/how_to/parametric_shapes#line-system And links PG here http://www.babylonjs-playground.com/#165IV6#66 If I attempt this (verbatim cut'n'paste) in my own TS project, it results in compile error: error TS2345: Argument of type '{ lines: Vector3[][]; }' is not assignable to parameter of type '{ lines: Vector3[][]; updatable: boolean; instance: LinesMesh; colors?: Color4[][]; useVertexAlph...'. Property 'updatable' is missing in type '{ lines: Vector3[][]; }' http://doc.babylonjs.com/api/classes/babylon.meshbuilder#createlinesystem instance and updatable seem to be required in the API docs, but the main doc and PG example imply they're optional. I'm using same version of BJS as PG so not sure why my TS version of the code is failing. Quote Link to comment Share on other sites More sharing options...
jerome Posted March 30, 2018 Share Posted March 30, 2018 https://www.babylonjs-playground.com/#165IV6#244 I removed updatable and it works Quote Link to comment Share on other sites More sharing options...
inteja Posted March 30, 2018 Author Share Posted March 30, 2018 Hi @jerome I probably wasn't clear. The original PG worked fine. It's only when I try to do the same in my TypeScript code that I get that error. Plus the API docs seem to indicate that instance and updatable are required. Quote Link to comment Share on other sites More sharing options...
inteja Posted March 31, 2018 Author Share Posted March 31, 2018 Same issue with BABYLON.MeshBuilder.CreateLines("lines", {points: myPoints}, scene); Using BJS v3.2.0-beta.4 with corresponding babylon.d.ts but VS Code tsc is showing error: error TS2345: Argument of type '{ points: any[]; }' is not assignable to parameter of type '{ points: Vector3[]; updatable: boolean; instance: LinesMesh; colors?: Color4[]; useVertexAlpha?:...'. Property 'updatable' is missing in type '{ points: any[]; }' Quote Link to comment Share on other sites More sharing options...
Gijs Posted March 31, 2018 Share Posted March 31, 2018 On 3/30/2018 at 8:39 AM, inteja said: I'm using same version of BJS as PG so not sure why my TS version of the code is failing. It's not failing to compile, it's only saying there's an error. It'll run just fine. Quote Link to comment Share on other sites More sharing options...
inteja Posted March 31, 2018 Author Share Posted March 31, 2018 @Gijs thanks, I'll try it again, but it's still an issue if it's displaying like that in the IDE and the documentation is ambiguous, right? In the interim I ended up using a series of: BABYLON.Mesh.CreateLines("lines", points, scene); And this worked fine. Gijs 1 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.