From 491274605c1e79d33253c4d591fce755d6da89c0 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 13 Oct 2018 20:51:23 -0700 Subject: [PATCH] Load other settings into Parameters from user defaults --- Metaballs-macOS/ViewController.swift | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Metaballs-macOS/ViewController.swift b/Metaballs-macOS/ViewController.swift index 31c5987..c01a6b3 100644 --- a/Metaballs-macOS/ViewController.swift +++ b/Metaballs-macOS/ViewController.swift @@ -19,6 +19,16 @@ class ViewController: NSViewController, RendererDelegate { p.color0 = color0 let color1 = defaults.color1 ?? Float4(0.88, 0.50, 1, 1) p.color1 = color1 + let color2 = defaults.color2 ?? Float4(0.24, 0.66, 1, 1) + p.color2 = color2 + let color3 = defaults.color3 ?? Float4(0.61, 0.61, 1, 1) + p.color3 = color3 + let rotation = defaults.colorRotation + p.colorTransform = Matrix3x3.rotation(angle: rotation) + let feather = defaults.feather + p.feather = feather + let target = defaults.target + p.target = target return p }