You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Initialization:// Create a rendering context from a canvasvarcanvas=document.getElementById("html5-canvas");varrenderCanvas=newRenderCanvas(canvas);// Custom Camera (Align it to the canvas size)varcamera=newView(0,0,canvas.width,canvas.height);renderCanvas.setView(camera);// set the viewer to be the camera// Load our image as a sprite (Creates a new Texture and Basic shaders in the background)varsprite=newSprite("assets/opengl_logo.png",150,150);// Make it 150x150px largesprite.setPosition(10,0);// You can set a positionsprite.setScale(2,0.5);// You can scale itsprite.setOrigin(-75,-50);// Set origin (Rotates around this point)sprite.rotate(45.0);// You can rotate it// ...// Render looprenderCanvas.clear(Color.Black);renderCanvas.draw(sprite);window.requestAnimationFrame();