Skip to content

Commit fc81006

Browse files
author
Carlos Scheidegger
committed
update
1 parent 951f6d7 commit fc81006

3 files changed

Lines changed: 44 additions & 13 deletions

File tree

lux.js

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8814,9 +8814,12 @@ Shade.fragCoord = function() {
88148814
evaluate: function() {
88158815
throw new Error("evaluate undefined for fragCoord");
88168816
},
8817+
element: function(i) {
8818+
return this.at(i);
8819+
},
88178820
compile: function(ctx) {
88188821
},
8819-
json_key: function() { return "fragCoord"; }
8822+
_json_key: function() { return 'fragCoord'; }
88208823
});
88218824
};
88228825
Shade.pointCoord = function() {
@@ -8830,6 +8833,9 @@ Shade.pointCoord = function() {
88308833
evaluate: function() {
88318834
throw new Error("evaluate undefined for pointCoord");
88328835
},
8836+
element: function(i) {
8837+
return this.at(i);
8838+
},
88338839
_json_key: function() { return 'pointCoord'; }
88348840
});
88358841
};
@@ -10463,6 +10469,9 @@ Shade.Optimizer.transform_expression = function(operations)
1046310469
var test = operations[i][0];
1046410470
var fun = operations[i][1];
1046510471
var old_guid = v.guid;
10472+
if (Shade.debug && Shade.Optimizer._debug_passes) {
10473+
console.log("Pass",operations[i][2],"starting");
10474+
}
1046610475
if (operations[i][3]) {
1046710476
var this_old_guid;
1046810477
do {
@@ -10473,13 +10482,14 @@ Shade.Optimizer.transform_expression = function(operations)
1047310482
v = v.replace_if(test, fun);
1047410483
}
1047510484
var new_guid = v.guid;
10476-
if (Shade.debug && Shade.Optimizer._debug_passes &&
10477-
old_guid != new_guid) {
10485+
if (Shade.debug && Shade.Optimizer._debug_passes) {
1047810486
console.log("Pass",operations[i][2],"succeeded");
10479-
console.log("Before: ");
10480-
old_v.debug_print();
10481-
console.log("After: ");
10482-
v.debug_print();
10487+
if (old_guid != new_guid) {
10488+
console.log("Before: ");
10489+
old_v.debug_print();
10490+
console.log("After: ");
10491+
v.debug_print();
10492+
}
1048310493
}
1048410494
}
1048510495
return v;

0 commit comments

Comments
 (0)