From f69d84dcfcd86154af2c94a70216431a6b92fd4c Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 18 Sep 2018 22:03:14 -0700 Subject: [PATCH] Reenable the sphere scaling --- Waveform/Base.lproj/Main.storyboard | 18 +++++++++++------- Waveform/GameViewController.swift | 8 ++++---- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/Waveform/Base.lproj/Main.storyboard b/Waveform/Base.lproj/Main.storyboard index 6d3fffb..1240866 100644 --- a/Waveform/Base.lproj/Main.storyboard +++ b/Waveform/Base.lproj/Main.storyboard @@ -689,7 +689,7 @@ - + @@ -722,7 +722,7 @@ - + @@ -821,7 +821,7 @@ - + @@ -829,7 +829,7 @@ - + @@ -915,8 +915,12 @@ + + + + @@ -933,14 +937,14 @@ - + - + @@ -949,7 +953,7 @@ - + diff --git a/Waveform/GameViewController.swift b/Waveform/GameViewController.swift index 3f37374..dd0d6c1 100644 --- a/Waveform/GameViewController.swift +++ b/Waveform/GameViewController.swift @@ -141,10 +141,10 @@ class GameViewController: NSViewController, SCNSceneRendererDelegate, SlidersDel node.worldPosition.y = CGFloat(y) -// maxY = max(y, maxY) -// minY = min(y, minY) -// let scale = CGFloat(map(y, inMin: minY, inMax: maxY, outMin: 0.0, outMax: 1.0)) -// node.scale = SCNVector3(x: scale, y: scale, z: scale) + maxY = max(y, maxY) + minY = min(y, minY) + let scale = CGFloat(map(y, inMin: minY, inMax: maxY, outMin: 0.0, outMax: 1.0)) + node.scale = SCNVector3(x: scale, y: scale, z: scale) } } }