Skip to content

Commit

Permalink
v1.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
deltakosh committed Jul 23, 2013
1 parent 0305091 commit c244f75
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 10 deletions.
20 changes: 18 additions & 2 deletions Babylon/Cameras/babylon.camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,21 @@
}
};

// Statics
BABYLON.Camera.PERSPECTIVE_CAMERA = 0;
BABYLON.Camera.ORTHOGRAPHIC_CAMERA = 1;

// Members
BABYLON.Camera.prototype.fov = 0.8;
BABYLON.Camera.prototype.orthoLeft = null;
BABYLON.Camera.prototype.orthoRight = null;
BABYLON.Camera.prototype.orthoBottom = null;
BABYLON.Camera.prototype.orthoTop = null;
BABYLON.Camera.prototype.fov = 0.8;
BABYLON.Camera.prototype.minZ = 0.1;
BABYLON.Camera.prototype.maxZ = 1000.0;
BABYLON.Camera.prototype.inertia = 0.9;
BABYLON.Camera.prototype.mode = BABYLON.Camera.PERSPECTIVE_CAMERA;

// Methods
BABYLON.Camera.prototype.attachControl = function (canvas) {
Expand All @@ -36,7 +46,13 @@
};

BABYLON.Camera.prototype.getProjectionMatrix = function () {
return new BABYLON.Matrix.PerspectiveFovLH(this.fov, this._scene.getEngine().getAspectRatio(), this.minZ, this.maxZ);
};
var engine = this._scene.getEngine();
if (this.mode === BABYLON.Camera.PERSPECTIVE_CAMERA) {
return new BABYLON.Matrix.PerspectiveFovLH(this.fov, engine.getAspectRatio(), this.minZ, this.maxZ);
}

var halfWidth = engine.getRenderWidth() / 2.0;
var halfHeight = engine.getRenderHeight() / 2.0;
return new BABYLON.Matrix.OrthoOffCenterLH(this.orthoLeft || -halfWidth, this.orthoRight || halfWidth, this.orthoBottom || -halfHeight, this.orthoTop || halfHeight, this.minZ, this.maxZ)
};
})();
2 changes: 1 addition & 1 deletion babylon.1.0.8.js → babylon.1.0.9.js

Large diffs are not rendered by default.

21 changes: 14 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ Official web site: [www.babylonjs.com](http://www.babylonjs.com/)
- Animations engine
- Particles Systems
- Sprites and 2D layers
- Optimizations engines: - Frustum clipping
- Optimizations engines:
- Frustum clipping
- Sub-meshes clipping
- Hardware scaling
- Standard material is a per pixel material that supports: - Diffuse lightning and texture
- Standard material is a per pixel material that supports:
- Diffuse lightning and texture
- Ambient lightning and texture
- Specular lightning
- Opacity texture
Expand All @@ -25,21 +27,26 @@ Official web site: [www.babylonjs.com](http://www.babylonjs.com/)
- Up to 4 lights (points, directionals, spots, hemispherics)
- Custom materials
- Skybox
- Special FX - Fog
- Special FX
- Fog
- Alpha blending
- Alpha testing
- Billboarding
- Fullscreen mode
- Textures: - Render target textures
- Textures:
- Render target textures
- Dynamic textures (canvas)
- Video textures
- Cameras: - Arc rotate camera
- Cameras (Perspective and orthographic):
- Arc rotate camera
- Free camera
- Touch camera
- Meshes: - Mesh cloning
- Meshes:
- Mesh cloning
- Dynamic meshes
- Height maps
- Import: - Babylon scene file can be converted from .OBJ, .FBX, .MXB
- Import:
- Babylon scene file can be converted from .OBJ, .FBX, .MXB
- Exporter for Blender


Expand Down
2 changes: 2 additions & 0 deletions what's new.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
1.0.9:
- Orthographic camera
1.0.8:
- Adding keyboard support to ArcRotateCamera
- Starting to use git tag
Expand Down

0 comments on commit c244f75

Please sign in to comment.