update() // for screen timer context.save() // save context in stack context.globalAlpha = alpha context.translate(x, y) context.rotate(rotation * Math.PI / 180) context.scale(scaleX, scaleY) draw() // deep traversal children context.restore() // restore context