First Suggestion To Improve Scaling.

Discussion in 'Buildbox 3.0' started by DanFarfan, Oct 21, 2018.

  1. DanFarfan

    DanFarfan Avid Boxer

    Joined:
    Sep 22, 2018
    Messages:
    101
    Likes Received:
    40
    Suggestion 1:
    We need the length, width and height of an entity.
    IMO this could be done in either or both of these 2 ways.
    let length = this.entity().length()
    this.entity().setLength(length + delta_len);

    ... for width and height too, of course.

    or
    // geo as in, geometry
    let geo_vec = this.entity().geometry();
    this.entity().setGeometry(geo_vec.length + delta_len, geo_vec.width, geo_vec.height);


    One last piece of that puzzle ( for either solution ), In the BB3 editor, you'd have to designate (for each of the 3 dimensions) which face is the "base" so the program and grow and expand with regard to something stationary. (easy)

    I understand why this wasn't important in BB2, but we're coding now and that means we need more control.

    Thanks
    @DanFarfan
     
  2. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    334
    Likes Received:
    231
    setScale and getScale are already there for three dimension solution. If we add attribute length() then we may not know the length in which direction.
     
  3. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    334
    Likes Received:
    231
    Sorry. Did you mean something like setSize and getSize property?
     
  4. DanFarfan

    DanFarfan Avid Boxer

    Joined:
    Sep 22, 2018
    Messages:
    101
    Likes Received:
    40
    The dimension for each of length, height and width could/would be established by convention (i.e. a design decision made by Nik & team).
    e.g. y direction = height, x direction = width, z direction = length.
     
  5. DanFarfan

    DanFarfan Avid Boxer

    Joined:
    Sep 22, 2018
    Messages:
    101
    Likes Received:
    40
    Sure, size is a fine name instead of geometry. It would be .size() and .setSize(width, height, length) but, yes.
    (I keep habitually typing "get" also. ;-) )
     
  6. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    334
    Likes Received:
    231

Share This Page