Skip to content

Commit 1f0a50f

Browse files
committed
comment proxy for vectors until further work can be done on it
1 parent cdd6a84 commit 1f0a50f

File tree

1 file changed

+27
-26
lines changed

1 file changed

+27
-26
lines changed

src/webgl/ShaderGen.js

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -288,29 +288,29 @@ function shadergen(p5, fn) {
288288

289289
// I am interested in the 'prop' value of get and set then
290290

291-
const VectorNodeHandler = {
292-
swizzles: [
293-
['x', 'y', 'z', 'w'],
294-
['r', 'b', 'g', 'a'],
295-
['s', 't', 'p', 'q'],
296-
],
297-
get(target, prop, receiver) {
298-
if (prop in target) {
299-
return Reflect.get(target, prop, receiver);
300-
} else {
301-
console.log(prop);
302-
}
303-
let modifiedProp;
304-
return Reflect.get(target, modifiedProp, receiver);
305-
},
306-
set(obj, prop, receiver) {
307-
console.log("OBJect:",obj,"PROPERTY", prop, "RECEIVER", receiver);
308-
309-
if (prop in obj) { return Reflect.set(...arguments); }
310-
let modifiedProp;
311-
return Reflect.set(obj, modifiedProp, receiver);
312-
}
313-
}
291+
// const VectorNodeHandler = {
292+
// swizzles: [
293+
// ['x', 'y', 'z', 'w'],
294+
// ['r', 'b', 'g', 'a'],
295+
// ['s', 't', 'p', 'q'],
296+
// ],
297+
// get(target, prop, receiver) {
298+
// if (prop in target) {
299+
// return Reflect.get(target, prop, receiver);
300+
// } else {
301+
// console.log(prop);
302+
// }
303+
// let modifiedProp;
304+
// return Reflect.get(target, modifiedProp, receiver);
305+
// },
306+
// set(obj, prop, receiver) {
307+
// console.log("OBJect:",obj,"PROPERTY", prop, "RECEIVER", receiver);
308+
309+
// if (prop in obj) { return Reflect.set(...arguments); }
310+
// let modifiedProp;
311+
// return Reflect.set(obj, modifiedProp, receiver);
312+
// }
313+
// }
314314

315315
class VectorNode extends BaseNode {
316316
constructor(values, type, isInternal = false) {
@@ -631,16 +631,17 @@ function shadergen(p5, fn) {
631631
}
632632

633633
fn.createVector2 = function(x, y) {
634-
return new Proxy(new VectorNode([x, y], 'vec2'), VectorNodeHandler);
634+
// return new Proxy(new VectorNode([x, y], 'vec2'), VectorNodeHandler);
635+
return new VectorNode([x, y], 'vec2');
635636
}
636637

637638
fn.createVector3 = function(x, y, z) {
638-
return new Proxy(new VectorNode([x, y, z], 'vec3'), VectorNodeHandler);
639+
// return new Proxy(new VectorNode([x, y, z], 'vec3'), VectorNodeHandler);
639640
return new VectorNode([x, y, z], 'vec3');
640641
}
641642

642643
fn.createVector4 = function(x, y, z, w) {
643-
return new Proxy(new VectorNode([x, y, z, w], 'vec4'), VectorNodeHandler);
644+
// return new Proxy(new VectorNode([x, y, z, w], 'vec4'), VectorNodeHandler);
644645
return new VectorNode([x, y, z, w], 'vec4');
645646
}
646647

0 commit comments

Comments
 (0)