Fehler requestAnimationFrame im ie9 jede Alternative Lösung

Ich bin erstellen von Canvas (ich bin neu in diesem Canvas-Bereich), Objekt, Zylinder, dieser ist in Ordnung, Chrome & Firefox, aber wenn ich öffnen Sie die gleiche Datei in ie9.

Ich bin immer Fehler wie 'requestAnimationFrame' ist undefiniert

Wenn ich das google die Fehlermeldung es sagt requestAniationFrame funktioniert nicht bei ie9.

Kann jede Stelle mir helfen, mit dieser haben wir keine andere Möglichkeit um dieses Problem zu lösen.

und hier ist mein code

var canvas = document.getElementById("canvas");
        var context = canvas.getContext("2d");

        var degreeAngle = 0;
        requestAnimationFrame(animate);

        function drawRotatedCylinder(x, y, w, h, degreeAngle) {
            context.save();
            context.translate(x + w / 10, y + h / 10);
            context.rotate(degreeAngle * Math.PI / 180);
            drawCylinder(-w / 10, -h / 10, w, h);
            context.restore();
        }   
function animate() {
        //requestAnimationFrame(animate);
        context.clearRect(0, 0, canvas.width, canvas.height);
        drawRotatedCylinder(100, 100, 180, 180, degreeAngle++);
}

Bitte helfen Sie mir für die oben genannte Lösung

Dank Viele Grüße
Maha

InformationsquelleAutor user3820621 | 2014-07-10
Schreibe einen Kommentar