Update Files

This commit is contained in:
2025-01-22 16:18:30 +01:00
parent ed4603cf95
commit a36294b518
16718 changed files with 2960346 additions and 0 deletions

View File

@ -0,0 +1,36 @@
package iron.data;
import iron.data.SceneFormat;
class LightData {
public var name: String;
public var raw: TLightData;
public function new(raw: TLightData, done: LightData->Void) {
this.raw = raw;
this.name = raw.name;
done(this);
}
public static inline function typeToInt(s: String): Int {
switch (s) {
case "sun": return 0;
case "point": return 1;
case "spot": return 2;
case "area": return 3;
default: return 0;
}
}
public static function parse(name: String, id: String, done: LightData->Void) {
Data.getSceneRaw(name, function(format: TSceneFormat) {
var raw: TLightData = Data.getLightRawByName(format.light_datas, id);
if (raw == null) {
trace('Light data "$id" not found!');
done(null);
}
new LightData(raw, done);
});
}
}