Update packages
This commit is contained in:
@@ -4,6 +4,10 @@ import haxe.io.Bytes;
|
||||
import haxe.io.BytesOutput;
|
||||
import kha.Image;
|
||||
import iron.data.SceneFormat;
|
||||
import iron.format.ExrWriter;
|
||||
import iron.format.JpgWriter;
|
||||
import iron.format.PngWriter;
|
||||
import iron.format.PngTools;
|
||||
import arm.ui.UITrait;
|
||||
import arm.ui.UIBox;
|
||||
import arm.App;
|
||||
@@ -18,20 +22,20 @@ class Exporter {
|
||||
var bitsHandle = UITrait.inst.bitsHandle.position;
|
||||
var bits = bitsHandle == 0 ? 8 : bitsHandle == 1 ? 16 : 32;
|
||||
if (bits > 8) { // 16/32bit
|
||||
var writer = new iron.format.exr.Writer(out, res, res, pixels, bits, type, off);
|
||||
var writer = new ExrWriter(out, res, res, pixels, bits, type, off);
|
||||
}
|
||||
else if (UITrait.inst.formatType == 0) {
|
||||
var writer = new iron.format.png.Writer(out);
|
||||
var writer = new PngWriter(out);
|
||||
var data =
|
||||
type == 1 ?
|
||||
iron.format.png.Tools.build32RGB1(res, res, pixels) :
|
||||
PngTools.build32RGB1(res, res, pixels) :
|
||||
type == 2 ?
|
||||
iron.format.png.Tools.build32RRR1(res, res, pixels, off) :
|
||||
iron.format.png.Tools.build32RGBA(res, res, pixels);
|
||||
PngTools.build32RRR1(res, res, pixels, off) :
|
||||
PngTools.build32RGBA(res, res, pixels);
|
||||
writer.write(data);
|
||||
}
|
||||
else {
|
||||
var writer = new iron.format.jpg.Writer(out);
|
||||
var writer = new JpgWriter(out);
|
||||
writer.write({
|
||||
width: res,
|
||||
height: res,
|
||||
|
||||
@@ -6,6 +6,7 @@ import kha.arrays.Float32Array;
|
||||
import kha.arrays.Int16Array;
|
||||
import iron.data.Data;
|
||||
import iron.math.Vec4;
|
||||
import iron.format.BlendParser;
|
||||
import zui.Nodes;
|
||||
import arm.App;
|
||||
import arm.ui.UITrait;
|
||||
@@ -20,7 +21,7 @@ class ImportBlend {
|
||||
|
||||
public static function run(path:String) {
|
||||
Data.getBlob(path, function(b:Blob) {
|
||||
var bl = new iron.format.blend.Blend(b);
|
||||
var bl = new BlendParser(b);
|
||||
if (bl.dna == null) {
|
||||
UITrait.inst.showError("Error: Compressed blend");
|
||||
return;
|
||||
@@ -176,7 +177,7 @@ class ImportBlend {
|
||||
|
||||
public static function runMaterial(path:String) {
|
||||
Data.getBlob(path, function(b:Blob) {
|
||||
var bl = new iron.format.blend.Blend(b);
|
||||
var bl = new BlendParser(b);
|
||||
if (bl.dna == null) {
|
||||
UITrait.inst.showError("Error: Compressed blend");
|
||||
return;
|
||||
|
||||
@@ -2,7 +2,7 @@ package arm.io;
|
||||
|
||||
import kha.Blob;
|
||||
import iron.data.Data;
|
||||
import iron.format.fbx.FbxParser;
|
||||
import iron.format.FbxParser;
|
||||
import arm.ui.UITrait;
|
||||
|
||||
class ImportFbx {
|
||||
|
||||
@@ -2,7 +2,7 @@ package arm.io;
|
||||
|
||||
import kha.Blob;
|
||||
import iron.data.Data;
|
||||
import iron.format.gltf.GltfParser;
|
||||
import iron.format.GltfParser;
|
||||
|
||||
class ImportGltf {
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package arm.io;
|
||||
|
||||
import kha.Blob;
|
||||
import iron.data.Data;
|
||||
import iron.format.obj.ObjParser;
|
||||
import iron.format.ObjParser;
|
||||
import arm.ui.UITrait;
|
||||
|
||||
class ImportObj {
|
||||
|
||||
@@ -2569,7 +2569,7 @@ class UITrait {
|
||||
}
|
||||
|
||||
static function roundfp(f:Float, precision = 2):Float {
|
||||
f *= std.Math.pow(10, precision);
|
||||
return std.Math.round(f) / std.Math.pow(10, precision);
|
||||
f *= Math.pow(10, precision);
|
||||
return Math.round(f) / Math.pow(10, precision);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user