Sha256: 9ed7b0f55c6fe2d94974d84f7fec66eaea2acba827f998ccc379d0559982fdca
Contents?: true
Size: 592 Bytes
Versions: 10
Compression:
Stored size: 592 Bytes
Contents
require 'securerandom' module Mittsu class MeshFaceMaterial def initialize(materials = []) @uuid = SecureRandom.uuid @type = 'MeshFaceMaterial' @materials = materials end def to_json { metadata: { version: 4.2, type: 'material', generator: 'MaterialExporter' }, uuid: @uuid, type: @type, materials: @materials.map(&:to_json) } end def clone MeshFaceMaterial.new.tap do |mateiral| material.materials = @materials.map(&:clone) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems