Skip to content

Commit

Permalink
- FIXED: max context3D screen height
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars Gerckens committed Nov 21, 2011
1 parent 0a3c613 commit 82bc296
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 14 deletions.
5 changes: 2 additions & 3 deletions TODO.txt
@@ -1,17 +1,16 @@
- ATF support
- ParticleSystem2D: add support for bursts!
- Multitouch events
- premultiplied / non premultiplied alpha check for textures!
- updateFromPreset method for particlesystem to update the buffer on the fly?!
- blurmaterial
- solid / gradient quad as new object
- Zoë: A SWF animation exporter for the EaselJS library. ? more TextureAtlas tools?
- premultiplied / non premultiplied alpha - bug in particlesystem? dynamic per texturetype
- multiple worlds test
- camera zoom example for independent resolutions
- Sprite2DCloud - addChildAt - invalidation not THAT agressive if possible?
- premultiplied alpha bug for sprite2dcloud
- Dynamic TextureAtlas. Packing algorithm: http://www.codeproject.com/KB/web-image/rectanglepacker.aspx. font from bmp / font from textfield? new Font2D class! with textureatlas http://ge.runcode.us/q/get-bounds-of-filters-applied-to-flash-sprite-within-sprite http://www.blackpawn.com/texts/lightmaps/
- Sprite2DBatch with multiple textures 4?

What I don't like about the spritesheets is:
- it's a pain to declare animations from a (cocos2D) spritesheet - it needs a simpler way like just sheet.playAnimation("foo*") and it would automatically build the animation with all assets named "foo001.png", "foo002.png", etc.
Expand All @@ -20,4 +19,4 @@ About Sprite2DBatch: only addChildAt/removeChildAt are implemented and I'm not s
getChildByTag()

- GUI layer - no camera movement?
- http://nulldesign.de/nd2d/forum/topic.php?id=86 TextField2D
- stage public, via getter / setter
4 changes: 2 additions & 2 deletions examples/Main.as
Expand Up @@ -124,7 +124,7 @@ package {
var tf:TextFormat = new TextFormat("Arial", 11, 0xFFFFFF, true);

sceneText = new TextField();
sceneText.width = 300;
sceneText.width = 500;
sceneText.defaultTextFormat = tf;

addChild(sceneText);
Expand Down Expand Up @@ -168,7 +168,7 @@ package {

camera.reset();

sceneText.text = "(" + (activeSceneIdx + 1) + "/" + scenes.length + ") " + getQualifiedClassName(scenes[activeSceneIdx]) + " // hit space for next test.";
sceneText.text = "(" + (activeSceneIdx + 1) + "/" + scenes.length + ") " + getQualifiedClassName(scenes[activeSceneIdx]) + " // hit space for next test. f for fullscreen";

setActiveScene(scenes[activeSceneIdx++]);

Expand Down
5 changes: 2 additions & 3 deletions src/de/nulldesign/nd2d/display/Camera2D.as
Expand Up @@ -60,9 +60,9 @@ package de.nulldesign.nd2d.display {

orthoProjectionMatrix = makeOrtographicMatrix(0, w, 0, h);

var fovDegree:Number = 45.0;
var fovDegree:Number = 60.0;
var magicNumber:Number = Math.tan(VectorUtil.deg2rad(fovDegree * 0.5));
var projMat:Matrix3D = makeProjectionMatrix(0.1, 1500.0, fovDegree, w / h);
var projMat:Matrix3D = makeProjectionMatrix(0.1, 2000.0, fovDegree, w / h);
var lookAtPosition:Vector3D = new Vector3D(0.0, 0.0, 0.0);

// zEye distance from origin: sceneHeight * 0.5 / tan(a)
Expand Down Expand Up @@ -150,7 +150,6 @@ package de.nulldesign.nd2d.display {
}

public function getViewProjectionMatrix(useOrthoMatrix:Boolean = true):Matrix3D {

if(invalidated) {
invalidated = false;

Expand Down
33 changes: 29 additions & 4 deletions src/de/nulldesign/nd2d/display/Quad2D.as
@@ -1,8 +1,33 @@
/**
* de.nulldesign.nd2d.display
* @Author: Lars Gerckens (lars@nulldesign.de)
* Date: 15.11.11 19:49
/*
* ND2D - A Flash Molehill GPU accelerated 2D engine
*
* Author: Lars Gerckens
* Copyright (c) nulldesign 2011
* Repository URL: http://github.com/nulldesign/nd2d
* Getting started: https://github.com/nulldesign/nd2d/wiki
*
*
* Licence Agreement
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

package de.nulldesign.nd2d.display {

import de.nulldesign.nd2d.geom.Face;
Expand Down
1 change: 0 additions & 1 deletion src/de/nulldesign/nd2d/display/World2D.as
Expand Up @@ -102,7 +102,6 @@ package de.nulldesign.nd2d.display {
* @param stageID
*/
public function World2D(renderMode:String, frameRate:uint = 60, bounds:Rectangle = null, stageID:uint = 0) {

this.renderMode = renderMode;
this.frameRate = frameRate;
this.bounds = bounds;
Expand Down
3 changes: 2 additions & 1 deletion src/de/nulldesign/nd2d/materials/texture/TextureAtlas.as
Expand Up @@ -165,7 +165,7 @@ package de.nulldesign.nd2d.materials.texture {
break;
}
}

/*
// calculate real offset
var idx:uint = sourceColorRects.length - 1;
var offset:Point = offsets[idx];
Expand All @@ -176,6 +176,7 @@ package de.nulldesign.nd2d.materials.texture {
offset.x = -newOffset.x;
offset.y = -newOffset.y;
*/
}
}
break;
Expand Down

0 comments on commit 82bc296

Please sign in to comment.