Permalink
Browse files

Merge branch 'master' of aerys.in:minko

  • Loading branch information...
2 parents 06b52b9 + 9cd6b0b commit 307eb1d4f04795541951f675cc0cb3b76c03ebb1 @promethe42 promethe42 committed Oct 6, 2011
View
20 .gitignore
@@ -1,8 +1,12 @@
-
-/.project
-/.settings
-/bin
-/.actionScriptProperties
-/.flexLibProperties
-/lib/minko.swf
-/lib/minko_logo.swf
+lib/minko.swf
+lib/minko_logo.swf.actionScriptProperties
+.actionScriptProperties
+.flexProperties
+.flexLibProperties
+.project
+.settings
+bin/
+bin-debug/
+bin-release/
+build/
+html-template/
View
4 README.md
@@ -7,7 +7,7 @@ Description
**3D for the Adobe Flash Platform.**
-Minko is a tool that enables the creation of rich and interactive 3D web applications. Relying on the Adobe FlashTM Platform, Minko delivers high quality and interactive 3D graphics in any website.
+Minko is a tool that enables the creation of rich and interactive 3D web applications. Relying on the Adobe Flash Platform, Minko delivers high quality and interactive 3D graphics in any website.
With Minko, you can build all kinds of applications such as:
@@ -33,7 +33,7 @@ The detailed list is available on [our website](http://aerys.in/minko/features).
Contribute
----------
-`minko` is GPL-licensed. Make sure you tell us everything that's wrong!
+`minko` is LGPL-licensed. Make sure you tell us everything that's wrong!
* [Source code](https://github.com/aerys/minko)
* [Issue tracker](https://github.com/aerys/minko/issues)
View
37 src/aerys/minko/render/Viewport.as
@@ -17,7 +17,7 @@ package aerys.minko.render
import aerys.minko.scene.visitor.RenderingVisitor;
import aerys.minko.scene.visitor.WorldDataVisitor;
import aerys.minko.type.Factory;
-
+
import flash.display.DisplayObject;
import flash.display.Graphics;
import flash.display.Shape;
@@ -56,6 +56,7 @@ package aerys.minko.render
private var _autoResize : Boolean = false;
private var _antiAliasing : int = 0;
private var _invalidRectangle : Boolean = true;
+ private var _upperLeft : Point = null;
private var _visitors : Vector.<ISceneVisitor> = null;
@@ -319,6 +320,8 @@ package aerys.minko.render
_stage3d.addEventListener(Event.CONTEXT3D_CREATE, resetStage3D);
_stage3d.requestContext3D(Context3DRenderMode.AUTO);
}
+
+ _stage3d.visible = true;
if (!_logoIsHidden)
showLogo();
@@ -354,6 +357,8 @@ package aerys.minko.render
{
if (event.target != this)
return ;
+
+ _stage3d.visible = false;
// _stage3d.removeEventListener(Event.CONTEXT3D_CREATE, resetStage3D);
// _stage3d.context3D.dispose();
@@ -391,7 +396,7 @@ package aerys.minko.render
{
if (_stage3d && _stage3d.context3D && _width && _height)
{
- updateRectangle();
+ update();
_renderer = new _rendererClass(this, _stage3d.context3D);
@@ -404,17 +409,25 @@ package aerys.minko.render
}
}
- private function updateRectangle() : void
+ private function update() : void
{
if (_stage3d)
{
- var origin : Point = localToGlobal(ZERO2);
+ _upperLeft = localToGlobal(ZERO2);
+
+ if (_width > 2048)
+ _stageX = (_width - 2048) / 2.;
+ else
+ _stageX = _upperLeft.x;
+
+ if (_height > 2048)
+ _stageY = (_height - 2048) / 2.;
+ else
+ _stageY = _upperLeft.y;
+
var width : Number = Math.min(2048, _width);
var height : Number = Math.min(2048, _height);
- _stageX = origin.x;
- _stageY = origin.y;
-
_stage3d.x = _stageX;
_stage3d.y = _stageY;
@@ -478,7 +491,7 @@ package aerys.minko.render
private function stageResizeHandler(event : Event) : void
{
- updateRectangle();
+ update();
}
private function stageEventHandler(event : Object) : void
@@ -548,10 +561,12 @@ package aerys.minko.render
{
var positionOnStage : Point = localToGlobal(ZERO2);
- if (_invalidRectangle || _stageX != positionOnStage.x
- || _stageY != positionOnStage.y)
+ if (_invalidRectangle
+ || _upperLeft.x != positionOnStage.x
+ || _upperLeft.y != positionOnStage.y)
{
- updateRectangle();
+ update();
+ _invalidRectangle = false;
}
}
View
11 src/aerys/minko/render/shader/ActionScriptShaderPart.as
@@ -102,17 +102,6 @@ package aerys.minko.render.shader
return new SValue(new Attribute(VertexComponent.TANGENT));
}
-
- /**
- * The weight of the current vertex for the wireframe effect.
- * @return
- *
- */
- protected function get vertexWeight() : SValue
- {
- return new SValue(new Attribute(VertexComponent.WIRE));
- }
-
/**
* The direction of the camera in local space.
* @return
View
10 src/aerys/minko/type/parser/ParserOptions.as
@@ -6,7 +6,7 @@ package aerys.minko.type.parser
private var _textureFilenameFunction : Function = null;
private var _textureFunction : Function = null;
-// private var _sceneFunction : Function = null;
+ private var _meshFunction : Function = null;
private var _loadMeshes : Boolean = true;
private var _mergeMeshes : Boolean = false;
@@ -16,9 +16,9 @@ package aerys.minko.type.parser
public function get loadTextures() : Boolean { return _loadTextures; }
public function get textureFilenameFunction() : Function { return _textureFilenameFunction; }
public function get textureFunction() : Function { return _textureFunction; }
-// public function get sceneFunction() : Function { return _sceneFunction; }
public function get loadMeshes() : Boolean { return _loadMeshes; }
+ public function get meshFunction() : Function { return _meshFunction; }
public function get mergeMeshes() : Boolean { return _mergeMeshes; }
public function get loadSkins() : Boolean { return _loadSkins; }
@@ -38,10 +38,10 @@ package aerys.minko.type.parser
_textureFunction = value;
}
- /*public function set sceneFunction(value : Function) : void
+ public function set meshFunction(value : Function) : void
{
- _sceneFunction = value;
- }*/
+ _meshFunction = value;
+ }
public function set loadMeshes(value : Boolean) : void
{
View
1 src/aerys/minko/type/stream/format/VertexComponent.as
@@ -10,7 +10,6 @@ package aerys.minko.type.stream.format
public static const RGBA : VertexComponent = create(["r", "g", "b", "a"], VertexComponentType.FLOAT_4);
public static const NORMAL : VertexComponent = create(["nx", "ny", "nz"], VertexComponentType.FLOAT_3);
public static const ST : VertexComponent = create(["s", "t"], VertexComponentType.FLOAT_2);
- public static const WIRE : VertexComponent = create(["w1", "w2", "w3"], VertexComponentType.FLOAT_3);
public static const TANGENT : VertexComponent = create(["tx", "ty", "tz"], VertexComponentType.FLOAT_3);

0 comments on commit 307eb1d

Please sign in to comment.