Class: MagicaVoxel::Node

Inherits:
Chunk
  • Object
show all
Defined in:
lib/magica_voxel/node.rb

Overview

The Node type Chunk

Since:

  • 0.1.0

Direct Known Subclasses

Group, Layer, Shape, Transform

Constant Summary

Constants inherited from Chunk

Chunk::TYPES

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Chunk

#each, header, #initialize, read

Constructor Details

This class inherits a constructor from MagicaVoxel::Chunk

Instance Attribute Details

#attributesObject (readonly)

Since:

  • 0.1.0



9
10
11
# File 'lib/magica_voxel/node.rb', line 9

def attributes
  @attributes
end

#idObject (readonly)

Since:

  • 0.1.0



9
10
11
# File 'lib/magica_voxel/node.rb', line 9

def id
  @id
end

Instance Method Details

#hidden?TrueClass|FalseClass

Returns is hidden.

Returns:

  • (TrueClass|FalseClass)

    is hidden

Since:

  • 0.1.0



21
22
23
# File 'lib/magica_voxel/node.rb', line 21

def hidden?
  @attributes['_hidden'] == '1'
end

#nameString

Returns name.

Returns:

  • (String)

    name

Since:

  • 0.1.0



14
15
16
# File 'lib/magica_voxel/node.rb', line 14

def name
  @attributes['_name']
end