Skip to content
This repository has been archived by the owner on Jan 14, 2022. It is now read-only.

MFVec3f: [1,2,3,4,5,6] vs [[1,2,3],[4,5,6]] #6

Closed
cecilemuller opened this issue Feb 22, 2015 · 1 comment
Closed

MFVec3f: [1,2,3,4,5,6] vs [[1,2,3],[4,5,6]] #6

cecilemuller opened this issue Feb 22, 2015 · 1 comment
Labels

Comments

@cecilemuller
Copy link
Member

Single numeric value are expressed with a simple Number, but how should MFVec3f (and other MFVec types) be represented: a single long Array, or an Array of tiny Arrays ?

@cecilemuller
Copy link
Member Author

While the second is more explicit, the first one (a single long Array) has the benefits:

  • same as VRML and X3D
  • less nested
  • creating a single array has less overhead than creating many tiny ones, especially with large MFVec2f

Also WebGL uses Typed Arrays which is created using a single Array (although that's an implementation detail).

@cecilemuller cecilemuller changed the title MFVec3f: [1,2,3,4,5,6] or [[1,2,3],[4,5,6]] ? MFVec3f: [1,2,3,4,5,6] vs [[1,2,3],[4,5,6]] Feb 22, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant