Transform is uniform if not present
This commit is contained in:
parent
0a318c56e5
commit
39442c10af
|
@ -357,24 +357,18 @@ render.point = function(pos,size,color = Color.blue) {
|
|||
render.circle(pos,size,size,color);
|
||||
};
|
||||
|
||||
var tmpline = render.line;
|
||||
render.line = function(points, color = Color.white, thickness = 1) {
|
||||
// tmpline(points,color,thickness);
|
||||
};
|
||||
|
||||
render.cross = function(pos, size, color = Color.red) {
|
||||
var a = [
|
||||
pos.add([0,size]),
|
||||
pos.add([0,-size])
|
||||
];
|
||||
var b = [
|
||||
pos.add([size,0]),
|
||||
pos.add([-size,0])
|
||||
];
|
||||
|
||||
render.line(a,color);
|
||||
render.line(b,color);
|
||||
};
|
||||
var a = [
|
||||
pos.add([0,size]),
|
||||
pos.add([0,-size])
|
||||
];
|
||||
var b = [
|
||||
pos.add([size,0]),
|
||||
pos.add([-size,0])
|
||||
];
|
||||
render.line(a,color);
|
||||
render.line(b,color);
|
||||
};
|
||||
|
||||
render.arrow = function(start, end, color = Color.red, wingspan = 4, wingangle = 10) {
|
||||
var dir = end.sub(start).normalized();
|
||||
|
@ -400,15 +394,6 @@ render.boundingbox = function(bb, color = Color.white) {
|
|||
render.poly(bbox.topoints(bb), color);
|
||||
}
|
||||
|
||||
render.poly = function(points, color)
|
||||
{
|
||||
return;
|
||||
render.setpipeline(render.polyshader.pipe);
|
||||
var poly = render.poly_prim(points);
|
||||
render.shader_apply_material(render.polyshader, {shade:color});
|
||||
render.spdraw(render.sg_bind(render.polyshader, poly));
|
||||
}
|
||||
|
||||
render.rectangle = function(lowerleft, upperright, color) {
|
||||
var points = [lowerleft, lowerleft.add([upperright.x-lowerleft.x,0]), upperright, lowerleft.add([0,upperright.y-lowerleft.y])];
|
||||
render.poly(points, color);
|
||||
|
|
|
@ -923,7 +923,7 @@ JSC_CCALL(render_setunim4,
|
|||
m = HMM_MulM4(p,m);
|
||||
}
|
||||
}
|
||||
} else
|
||||
} else if (!JS_IsUndefined(argv[2]))
|
||||
m = transform2mat(*js2transform(argv[2]));
|
||||
|
||||
sg_apply_uniforms(js2number(argv[0]), js2number(argv[1]), SG_RANGE_REF(m.e));
|
||||
|
|
Loading…
Reference in a new issue