Jump to content

MeshBuilder.CreateLineSystem() TS errors


inteja
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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[]; }'

 

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...