Replace __js__ with Syntax.code

This commit is contained in:
luboslenco
2020-07-02 09:25:57 +02:00
parent 78ad319e6f
commit 831cb6ed5e
4 changed files with 10 additions and 10 deletions
@@ -42,7 +42,7 @@ class Material {
static var sample_bump_res: String;
static var tex_coord = "texCoord";
public static var customNodes = untyped __js__("new Map()");
public static var customNodes = js.Syntax.code("new Map()");
public static var parse_surface = true;
public static var parse_opacity = true;
public static var parse_height = false;
+1 -1
View File
@@ -26,7 +26,7 @@ class Plugin {
iron.data.Data.getBlob("plugins/" + plugin, function(blob: kha.Blob) {
pluginName = plugin;
#if js
untyped __js__("(1, eval)({0})", blob.toString());
js.Syntax.code("(1, eval)({0})", blob.toString());
#end
iron.data.Data.deleteBlob("plugins/" + plugin);
});
+7 -7
View File
@@ -53,15 +53,15 @@ class ImportObj {
var texa = (texa0 != null && texa1 != null) ? new kha.arrays.Int16Array(texa0.length + texa1.length) : null;
var inda = new kha.arrays.Uint32Array(inda0.length + inda1.length);
var voff = Std.int(posa0.length / 4);
untyped __js__("posa.set(posa0)");
untyped __js__("posa.set(posa1, posa0.length)");
untyped __js__("nora.set(nora0)");
untyped __js__("nora.set(nora1, nora0.length)");
js.Syntax.code("posa.set(posa0)");
js.Syntax.code("posa.set(posa1, posa0.length)");
js.Syntax.code("nora.set(nora0)");
js.Syntax.code("nora.set(nora1, nora0.length)");
if (texa != null) {
untyped __js__("texa.set(texa0)");
untyped __js__("texa.set(texa1, texa0.length)");
js.Syntax.code("texa.set(texa0)");
js.Syntax.code("texa.set(texa1, texa0.length)");
}
untyped __js__("inda.set(inda0)");
js.Syntax.code("inda.set(inda0)");
for (k in 0...inda1.length) inda[k + inda0.length] = inda1[k] + voff;
parts[i].posa = posa;
parts[i].nora = nora;
+1 -1
View File
@@ -4,7 +4,7 @@ import zui.Nodes;
class Brush {
public static var customNodes = untyped __js__("new Map()");
public static var customNodes = js.Syntax.code("new Map()");
static var nodes: Array<TNode>;
static var links: Array<TNodeLink>;