add lightSources jsonMap to Movie
This commit is contained in:
@@ -9,6 +9,7 @@ import haxe.ds.Map;
|
||||
import haxe.Json;
|
||||
import haxe.DynamicAccess;
|
||||
import sys.io.File;
|
||||
import sys.FileSystem;
|
||||
|
||||
typedef Jsonable<T> = {
|
||||
function stringify():String;
|
||||
|
@@ -12,6 +12,9 @@
|
||||
(defNew [&prop :String jsonPath &prop :T defaultVal]
|
||||
[:Map<String,T> m (new Map)]
|
||||
|
||||
(unless (FileSystem.exists jsonPath)
|
||||
(File.saveContent jsonPath "{}"))
|
||||
|
||||
(_parseFrom (File.getContent jsonPath)))
|
||||
|
||||
(method put [:String key :T value]
|
||||
|
Reference in New Issue
Block a user