Module: Engine::StandardObjects::Sphere
- Defined in:
- lib/engine/standard_objects/sphere.rb
Class Method Summary collapse
Class Method Details
.create(pos: Vector[0, 0, 0], rotation: 0, scale: Vector[1, 1, 1], components: [], material: nil) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/engine/standard_objects/sphere.rb', line 6 def self.create(pos: Vector[0, 0, 0], rotation: 0, scale: Vector[1, 1, 1], components: [], material: nil) Engine::GameObject.create( name: "Sphere", pos: pos, rotation: rotation, scale: scale, components: [ Engine::Components::MeshRenderer.create( mesh: Engine::Mesh.for("sphere", source: :engine), material: material || StandardObjects.default_material ), *components ] ) end |