Method: MagicaVoxel::Frame#translate

Defined in:
lib/magica_voxel/frame.rb

#translateVector3

Translate

Returns:

Since:

  • 0.1.0



31
32
33
34
35
36
37
# File 'lib/magica_voxel/frame.rb', line 31

def translate
  return Vector3.new(0, 0, 0) if @attributes['_t'].nil?

  x, y, z = @attributes['_t'].split
  @translate ||=
    Vector3.new(x.to_i, y.to_i, z.to_i)
end