Class: Camera


the eyes used to see in your scenes :)
you have to append it to a Render and have to give it a scene to look in
you can move your camera inside a render as you want
also you can make more than one camera in a Render or looking in a scene

example: if you want to make a mini-map, you can make a camera with big sizes (FHD), but little scale(0.2) and maybe override the render method to call custom rendering for mini-map
then you got two camera, these two are looking at the same scene, and are in the same Render your "mini-map" camera is over the first carmera

example2: on a split-screen multiplayer game, you can make one camera by player, with input for each cameras

new Camera(width, height, x, y, params)

Name Type Argument Description
width Int

initial width inside the render

height Int

initial height inside the render

x Int

position in the Render

y Int

position in the Render

params Object <optional>

optional parameters

Name Type Argument Default Description
name String <optional>

name your camera

tag String <optional>

assign tags if it's can be useful for you

scene Scene <optional>

you can give a scene on creation, or later

Example = new DE.Camera( 1920, 1080, 0, 0, { "name": "mainGame", "backgroundColor": "green" } );
Dreamirl Copyright © 2014 And the contributors
Documentation generated by JSDoc 3.2.2 on Thu Apr 24 2014 11:56:40 GMT+0200 (CEST) using the DocStrap template.