Provide an interface for bulk-updating a Drawable
The renderer can now update any combination of a Drawable's position, direction, scale, and effect values through a single function call. The effect values will be adjusted according to per-effect conversion functions to prepare the values for use inside the shader.
This commit is contained in:
@@ -23,9 +23,13 @@
|
||||
var scale = 100;
|
||||
function thinkStep() {
|
||||
direction += 0.1;
|
||||
renderer.setDrawablePosition(drawableID, posX, posY);
|
||||
renderer.setDrawableDirection(drawableID, direction);
|
||||
renderer.setDrawableScale(drawableID, scale);
|
||||
|
||||
var props = {};
|
||||
//props.position = [posX, posY];
|
||||
props.direction = direction;
|
||||
//props.scale = 100;
|
||||
|
||||
renderer.updateDrawableProperties(drawableID, props);
|
||||
}
|
||||
drawStep();
|
||||
setInterval(thinkStep, 1/60);
|
||||
|
||||
Reference in New Issue
Block a user