Sha256: ee355b5eae4c5e179396ab4f423e8754cae908218e2ad17e97774559ce3072b0
Contents?: true
Size: 620 Bytes
Versions: 10
Compression:
Stored size: 620 Bytes
Contents
require 'securerandom' module Mittsu class MeshFaceMaterial attr_reader :materials 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