Search the Community
Showing results for tags 'webos'.
-
Im doing pixi tests for WEBOS2. It's applications are besed on webkit, so basically it runs anything chrome can run. I experience some strange issues with my app and PIXI: 1) When I force WebGLRenderer my fps goes to 52, but the rotating box Jitters/overdraws at corners and overall looks bad. Smoothie does not help 2) When I fore CanvasRenderer, the corners do not jitter and animate smooth, and the FPS is 43 (but looks better overall). How that can be? Code : <html> <head> <meta name="viewport" content="user-scalable=no, initial-scale=1, minimal-ui, maximum-scale=1, minimum-scale=1"> <title></title> <script type="text/javascript" src="js/pixi.min.js"></script> <script type="text/javascript" src="js/smoothie.js"></script> <script type="text/javascript" src="js/stats.min.js"></script> <style type="text/css"> body, html { margin: 0; padding: 0; } </style> </head> <body> <script> var stats = new Stats(); stats.showPanel( 0 ); // 0: fps, 1: ms, 2: mb, 3+: custom document.body.appendChild( stats.dom ); //var interactive = true; var stage = new PIXI.Stage(); var w = window.innerWidth; var h = window.innerHeight; var renderer = new PIXI.CanvasRenderer(w, h, {antialias:false}); renderer.backgroundColor = 0x1099bb; document.body.appendChild(renderer.view); /*var smoothie = new Smoothie({ engine: PIXI, renderer: renderer, root: stage, update: update, fps: 1, interpolate: true });*/ var textureButton = PIXI.Texture.fromImage("http://pixijs.github.io/examples/_assets/BGrotate.jpg"); var plane = new PIXI.Sprite(textureButton); plane.anchor.x = 0.5; plane.anchor.y = 0.5; plane.width = h - 100; plane.height = plane.width; plane.x = w / 2; plane.y = h / 2; stage.addChild(plane); var alphaDir = -1; //var start = 0; //update(); //smoothie.start(); requestAnimationFrame( update ); // var button1 = function update() { //var progress = timestamp - start; //start = timestamp; //var deltaTime = progress/1000; stats.begin(); plane.rotation += 0.03; plane.alpha = plane.alpha + 0.01 * alphaDir; if(plane.alpha < 0.01 || plane.alpha > 0.99) alphaDir *= -1; renderer.render(stage); requestAnimationFrame( update ); stats.end(); } </script> </body> </html>