Fixed lighting artifacts caused by untransformed normals, added 'Scene' for holding objects for rendering, added turn table models to menus using a scene, misc other changes.

This commit is contained in:
2020-03-23 11:48:32 -05:00
parent 18a62b81cc
commit 87fcc3a05c
14 changed files with 139 additions and 48 deletions

View File

@@ -9,7 +9,7 @@ class IMICFPS
attr_accessor :position, :orientation, :scale, :velocity
attr_reader :name, :debug_color, :bounding_box, :drag, :camera, :manifest
def initialize(manifest:, map_entity: nil, spawnpoint: nil, backface_culling: true, auto_manage: true)
def initialize(manifest:, map_entity: nil, spawnpoint: nil, backface_culling: true, run_scripts: true)
@manifest = manifest
if map_entity
@@ -41,7 +41,7 @@ class IMICFPS
@last_position = Vector.new(@position.x, @position.y, @position.z)
@sandboxes = []
load_scripts
load_scripts if run_scripts
setup

View File

@@ -9,7 +9,7 @@ class IMICFPS
id:,
type: Light::POINT,
ambient: Vector.new(0.5, 0.5, 0.5, 1),
diffuse: Vector.new(1, 0.5, 0, 1),
diffuse: Vector.new(1, 1, 1, 1),
specular: Vector.new(0.2, 0.2, 0.2, 1),
position: Vector.new(0, 0, 0, 0),
intensity: 1