From cc3f7b8924628750fc78b164215118fdc2a99a17 Mon Sep 17 00:00:00 2001 From: Yaski Date: Wed, 15 Aug 2012 14:34:42 +0600 Subject: [PATCH 01/17] Update changelog --- changelog_en.txt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/changelog_en.txt b/changelog_en.txt index 355dbd6..1292e1c 100644 --- a/changelog_en.txt +++ b/changelog_en.txt @@ -3,24 +3,21 @@ Changelog Alternativa3D NEXT ---- Added: -+ Added: -+ Object3DUtils: setPosition, lookAt to Camera3D and converting between Radians and Degrees + Stage3D constrained profile support + BitmapTextureResource: auto resize for GPU option + MouseEvent3D: right and middle mouse buttons support (FP 11.2 and -swf-version=15 required) + Object3D: excludeLight() + OmniLightShadow: add omni radius in debug scale -+ Camera3D: light sorting ++ Object3DUtils: setPosition, lookAt to Camera3D and converting between Radians and Degrees Fixed: -= Object3D.toString() -= AnimationClip: animated and loop properties in AnimationClip.slice(), AnimationClip.clone() += AnimationClip: animated and loop properties in AnimationClip.slice(), AnimationClip.clone() = Bubbling in MouseEvent3D = ExporterA3D: export meshes without geometry as Object3D = Box: correct tangents and binormals -= WireFrame:fix createBinormals() = Decal: Fixed incorrect drawing with extremaly low nearClipping. -= View: Fixed bug with mouse events and postprosessing += View: Fixed bug with mouse events and postprocessing += Object3D.toString() = Several minor fixes Removed: From 238562f8acd2b44e69b7ce9a7da7ca730b26d9c8 Mon Sep 17 00:00:00 2001 From: Vasiliy Stepanets Date: Wed, 15 Aug 2012 21:42:02 +1100 Subject: [PATCH 02/17] Replace Array with typed Vector --- src/alternativa/engine3d/loaders/Parser3DS.as | 42 ++++++++++++++----- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/src/alternativa/engine3d/loaders/Parser3DS.as b/src/alternativa/engine3d/loaders/Parser3DS.as index 115bbea..c5ed9b4 100644 --- a/src/alternativa/engine3d/loaders/Parser3DS.as +++ b/src/alternativa/engine3d/loaders/Parser3DS.as @@ -51,7 +51,7 @@ package alternativa.engine3d.loaders { private var data:ByteArray; private var objectDatas:Object; - private var animationDatas:Array; + private var animationDatas:Vector.; private var materialDatas:Object; /** @@ -313,7 +313,7 @@ package alternativa.engine3d.loaders { case 0xB006: // spot target case 0xB007: if (animationDatas == null) { - animationDatas = new Array(); + animationDatas = new Vector.(); } var animation:AnimationData = new AnimationData(); animation.chunkId = chunkInfo.id; @@ -803,7 +803,7 @@ package alternativa.engine3d.loaders { } var vertices:Vector. = new Vector.(objectData.vertices.length/3); - var faces:Array = new Array(objectData.faces.length/3); // Vector. can't .sortOn() + var faces:Vector. = new Vector.(objectData.faces.length/3); buildInitialGeometry(vertices, faces, objectData, animationData, scale); @@ -884,7 +884,7 @@ package alternativa.engine3d.loaders { mesh.calculateBoundBox(); } - private function buildInitialGeometry(vertices:Vector., faces:Array, objectData:ObjectData, animationData:AnimationData, scale:Number):void { + private function buildInitialGeometry(vertices:Vector., faces:Vector., objectData:ObjectData, animationData:AnimationData, scale:Number):void { var correct:Boolean = false; if (animationData != null) { var a:Number = objectData.a; @@ -964,7 +964,7 @@ package alternativa.engine3d.loaders { } } - private function cloneVerticesToRespectSmoothGroups(vertices:Vector., faces:Array):void { + private function cloneVerticesToRespectSmoothGroups(vertices:Vector., faces:Vector.):void { // Actions with smoothing groups: // - if vertex is in faces with groups 1+2 and 3, then it is duplicated // - if vertex is in faces with groups 1+2, 3 and 1+3, then it is not duplicated @@ -1040,7 +1040,7 @@ package alternativa.engine3d.loaders { } } - private function cloneAndTransformVerticesToRespectUVTransforms(vertices:Vector., faces:Array):void { + private function cloneAndTransformVerticesToRespectUVTransforms(vertices:Vector., faces:Vector.):void { // Actions with UV transformation // if vertex in faces with different transform materials, then it is duplicated var n:int, m:int, p:int, q:int, len:int, numVertices:int = vertices.length, numFaces:int = faces.length; @@ -1110,7 +1110,7 @@ package alternativa.engine3d.loaders { } } - private function calculateVertexNormals(vertices:Vector., faces:Array):void { + private function calculateVertexNormals(vertices:Vector., faces:Vector.):void { var n:int, m:int, numFaces:int = faces.length; for (n = 0; n < numFaces; n++) { var face:Face = Face(faces [n]); @@ -1157,7 +1157,7 @@ package alternativa.engine3d.loaders { } } - private function calculateVertexTangents(vertices:Vector., faces:Array):void { + private function calculateVertexTangents(vertices:Vector., faces:Vector.):void { var n:int, m:int, numVertices:int = vertices.length, numFaces:int = faces.length; for (n = 0; n < numFaces; n++) { var face:Face = Face(faces [n]); @@ -1319,7 +1319,7 @@ package alternativa.engine3d.loaders { } } - private function assignMaterialsToFaces(faces:Array, objectData:ObjectData):void { + private function assignMaterialsToFaces(faces:Vector., objectData:ObjectData):void { // Assign materials if (objectData.surfaces != null) { for (var key:String in objectData.surfaces) { @@ -1338,9 +1338,29 @@ package alternativa.engine3d.loaders { } } - private function collectFacesIntoSurfaces(faces:Array, defaultMaterialData:MaterialData):Vector. { + private function sortFacesBySurface(a:Vector., left:int, right:int):void { + var i:int = 0, j:int = 0, pivot:uint, tmp:Face; + i = left; + j = right; + pivot = a[Math.floor((left + right) * 0.5)].surface; + while (i <= j) { + while (a[i].surface < pivot) i++; + while (a[j].surface > pivot) j--; + if (i <= j) { + tmp = a[i]; + a[i] = a[j]; + i++; + a[j] = tmp; + j--; + } + } + if (left < j) sortFacesBySurface(a, left, j); + if (i < right) sortFacesBySurface(a, i, right); + } + + private function collectFacesIntoSurfaces(faces:Vector., defaultMaterialData:MaterialData):Vector. { // Sort faces on materials - faces.sortOn("surface"); + sortFacesBySurface(faces, 0, faces.length - 1); // Create indices, calculate indexBegin and numTriangles var numFaces:int = faces.length; From 905012d4130efbe3cf7a3af7529f5c68218e11b3 Mon Sep 17 00:00:00 2001 From: Yaski Date: Thu, 16 Aug 2012 20:18:19 +0600 Subject: [PATCH 03/17] Utils -> Object3DUtils --- changelog_en.txt | 2 +- src/alternativa/utils/{Utils.as => Object3DUtils.as} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/alternativa/utils/{Utils.as => Object3DUtils.as} (99%) diff --git a/changelog_en.txt b/changelog_en.txt index 1292e1c..7efbb9c 100644 --- a/changelog_en.txt +++ b/changelog_en.txt @@ -17,8 +17,8 @@ Fixed: = Box: correct tangents and binormals = Decal: Fixed incorrect drawing with extremaly low nearClipping. = View: Fixed bug with mouse events and postprocessing += Object3DUtils: moved to package alternativa.utils = Object3D.toString() -= Several minor fixes Removed: -Diagram: removed CPU time diff --git a/src/alternativa/utils/Utils.as b/src/alternativa/utils/Object3DUtils.as similarity index 99% rename from src/alternativa/utils/Utils.as rename to src/alternativa/utils/Object3DUtils.as index 8713b85..7bda9d4 100644 --- a/src/alternativa/utils/Utils.as +++ b/src/alternativa/utils/Object3DUtils.as @@ -18,7 +18,7 @@ package alternativa.utils { /** * @private */ - public class Utils { + public class Object3DUtils { private static const toRootTransform:Transform3D = new Transform3D(); private static const fromRootTransform:Transform3D = new Transform3D(); From 0a8b4d6ad587968dbe768e51291a41b4f2315bbc Mon Sep 17 00:00:00 2001 From: Yaski Date: Thu, 16 Aug 2012 20:27:02 +0600 Subject: [PATCH 04/17] Parser3DS: code style checking --- src/alternativa/engine3d/loaders/Parser3DS.as | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/alternativa/engine3d/loaders/Parser3DS.as b/src/alternativa/engine3d/loaders/Parser3DS.as index c5ed9b4..e190312 100644 --- a/src/alternativa/engine3d/loaders/Parser3DS.as +++ b/src/alternativa/engine3d/loaders/Parser3DS.as @@ -1339,10 +1339,10 @@ package alternativa.engine3d.loaders { } private function sortFacesBySurface(a:Vector., left:int, right:int):void { - var i:int = 0, j:int = 0, pivot:uint, tmp:Face; - i = left; - j = right; - pivot = a[Math.floor((left + right) * 0.5)].surface; + var pivot:uint, tmp:Face; + var i:int = left; + var j:int = right; + pivot = a[int((left + right) >> 1)].surface; while (i <= j) { while (a[i].surface < pivot) i++; while (a[j].surface > pivot) j--; @@ -1359,11 +1359,11 @@ package alternativa.engine3d.loaders { } private function collectFacesIntoSurfaces(faces:Vector., defaultMaterialData:MaterialData):Vector. { + var numFaces:int = faces.length; // Sort faces on materials - sortFacesBySurface(faces, 0, faces.length - 1); + if (numFaces) sortFacesBySurface(faces, 0, numFaces - 1); // Create indices, calculate indexBegin and numTriangles - var numFaces:int = faces.length; var indices:Vector. = new Vector.(numFaces*3, true); var lastMaterialData:MaterialData; From f2841beec3f86230b182f2a748cdb2bef0eb092f Mon Sep 17 00:00:00 2001 From: Andrey Kopysov Date: Fri, 17 Aug 2012 14:33:32 +0600 Subject: [PATCH 05/17] Update changelog_en.txt --- changelog_en.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/changelog_en.txt b/changelog_en.txt index 7efbb9c..6b45c6a 100644 --- a/changelog_en.txt +++ b/changelog_en.txt @@ -4,14 +4,15 @@ NEXT ---- Added: + Stage3D constrained profile support -+ BitmapTextureResource: auto resize for GPU option -+ MouseEvent3D: right and middle mouse buttons support (FP 11.2 and -swf-version=15 required) + Object3D: excludeLight() ++ BitmapTextureResource: auto resize for GPU option ++ MouseEvent3D: right and middle mouse buttons support (FP 11.2 and -swf-version=15 required) - ? + OmniLightShadow: add omni radius in debug scale + Object3DUtils: setPosition, lookAt to Camera3D and converting between Radians and Degrees Fixed: = AnimationClip: animated and loop properties in AnimationClip.slice(), AnimationClip.clone() += Parser3DS: optimized parsing time = Bubbling in MouseEvent3D = ExporterA3D: export meshes without geometry as Object3D = Box: correct tangents and binormals @@ -21,7 +22,7 @@ Fixed: = Object3D.toString() Removed: --Diagram: removed CPU time +- Diagram: removed CPU time 8.31.0 --- From 31ad1bc82401c35d9c4f679ce91469c4be837f37 Mon Sep 17 00:00:00 2001 From: Yaski Date: Fri, 17 Aug 2012 19:15:01 +0600 Subject: [PATCH 06/17] Object3DUtils restored in old place --- changelog_en.txt | 1 - src/alternativa/utils/Object3DUtils.as | 113 ------------------------- 2 files changed, 114 deletions(-) delete mode 100644 src/alternativa/utils/Object3DUtils.as diff --git a/changelog_en.txt b/changelog_en.txt index 6b45c6a..85ea161 100644 --- a/changelog_en.txt +++ b/changelog_en.txt @@ -18,7 +18,6 @@ Fixed: = Box: correct tangents and binormals = Decal: Fixed incorrect drawing with extremaly low nearClipping. = View: Fixed bug with mouse events and postprocessing -= Object3DUtils: moved to package alternativa.utils = Object3D.toString() Removed: diff --git a/src/alternativa/utils/Object3DUtils.as b/src/alternativa/utils/Object3DUtils.as deleted file mode 100644 index 7bda9d4..0000000 --- a/src/alternativa/utils/Object3DUtils.as +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - * If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice. - * You may add additional accurate notices of copyright ownership. - * - * It is desirable to notify that Covered Software was "Powered by AlternativaPlatform" with link to http://www.alternativaplatform.com/ - * */ - -package alternativa.utils { - - import alternativa.engine3d.alternativa3d; - import alternativa.engine3d.core.BoundBox; - import alternativa.engine3d.core.Object3D; - import alternativa.engine3d.core.Transform3D; - - use namespace alternativa3d; - - /** - * @private - */ - public class Object3DUtils { - - private static const toRootTransform:Transform3D = new Transform3D(); - private static const fromRootTransform:Transform3D = new Transform3D(); - - private static const RAD2DEG:Number = 180/Math.PI; - private static const DEG2RAD:Number = Math.PI/180; - - - /** - * Convert Degress to Radians and Radians to Degrees - */ - public static function toRadians(degrees:Number):Number{ - return degrees * DEG2RAD; - } - - /** - * Convert Radians to Degrees - */ - public static function toDegrees(radians:Number):Number{ - return radians * RAD2DEG; - } - - /** - * Calculates a BoundBox of hierarchy of objects. - * - * @param object Container which contains the hierarchy. - * @param boundBoxSpace Object3D in coordinates of which the BoundBox will be calculated. - * @param result Instance of BoundBox to which calculated properties will be set. - * - * @return Instance given as result property with properties updated according to calculations. If result property was not set, new instance of BoundBox will be created. - */ - public static function calculateHierarchyBoundBox(object:Object3D, boundBoxSpace:Object3D = null, result:BoundBox = null):BoundBox { - if (result == null) result = new BoundBox(); - - if (boundBoxSpace != null && object != boundBoxSpace) { - // Calculate transfer matrix from object to provided space. - var objectRoot:Object3D; - var toSpaceTransform:Transform3D = null; - - if (object.transformChanged) object.composeTransforms(); - toRootTransform.copy(object.transform); - var root:Object3D = object; - while (root._parent != null) { - root = root._parent; - if (root.transformChanged) root.composeTransforms(); - toRootTransform.append(root.transform); - if (root == boundBoxSpace) { - // Matrix has been composed. - toSpaceTransform = toRootTransform; - } - } - objectRoot = root; - if (toSpaceTransform == null) { - // Transfer matrix from root to needed space. - if (boundBoxSpace.transformChanged) boundBoxSpace.composeTransforms(); - fromRootTransform.copy(boundBoxSpace.inverseTransform); - root = boundBoxSpace; - while (root._parent != null) { - root = root._parent; - if (root.transformChanged) root.composeTransforms(); - fromRootTransform.prepend(root.inverseTransform); - } - if (objectRoot == root) { - toRootTransform.append(fromRootTransform); - toSpaceTransform = toRootTransform; - } else { - throw new ArgumentError("Object and boundBoxSpace must be located in the same hierarchy."); - } - } - updateBoundBoxHierarchically(object, result, toSpaceTransform); - } else { - updateBoundBoxHierarchically(object, result); - } - return result; - } - - /** - * @private - * Calculates hierarchical bound. - */ - alternativa3d static function updateBoundBoxHierarchically(object:Object3D, boundBox:BoundBox, transform:Transform3D = null):void { - object.updateBoundBox(boundBox, transform); - for (var child:Object3D = object.childrenList; child != null; child = child.next) { - if (child.transformChanged) child.composeTransforms(); - child.localToCameraTransform.copy(child.transform); - if (transform != null) child.localToCameraTransform.append(transform); - updateBoundBoxHierarchically(child, boundBox, child.localToCameraTransform); - } - } - - } -} From 19c903c52b48459ae122ae4f9087f9e8ef214613 Mon Sep 17 00:00:00 2001 From: Yaski Date: Fri, 17 Aug 2012 19:15:01 +0600 Subject: [PATCH 07/17] Object3DUtils restored in old place --- changelog_en.txt | 1 - src/alternativa/{ => engine3d}/utils/Object3DUtils.as | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) rename src/alternativa/{ => engine3d}/utils/Object3DUtils.as (99%) diff --git a/changelog_en.txt b/changelog_en.txt index 6b45c6a..85ea161 100644 --- a/changelog_en.txt +++ b/changelog_en.txt @@ -18,7 +18,6 @@ Fixed: = Box: correct tangents and binormals = Decal: Fixed incorrect drawing with extremaly low nearClipping. = View: Fixed bug with mouse events and postprocessing -= Object3DUtils: moved to package alternativa.utils = Object3D.toString() Removed: diff --git a/src/alternativa/utils/Object3DUtils.as b/src/alternativa/engine3d/utils/Object3DUtils.as similarity index 99% rename from src/alternativa/utils/Object3DUtils.as rename to src/alternativa/engine3d/utils/Object3DUtils.as index 7bda9d4..6aaa4f1 100644 --- a/src/alternativa/utils/Object3DUtils.as +++ b/src/alternativa/engine3d/utils/Object3DUtils.as @@ -6,7 +6,7 @@ * It is desirable to notify that Covered Software was "Powered by AlternativaPlatform" with link to http://www.alternativaplatform.com/ * */ -package alternativa.utils { +package alternativa.engine3d.utils { import alternativa.engine3d.alternativa3d; import alternativa.engine3d.core.BoundBox; From 7616a8783a80e6ea93fb163fb67bc198b9d273e9 Mon Sep 17 00:00:00 2001 From: artem pecheny Date: Fri, 17 Aug 2012 20:01:38 +0600 Subject: [PATCH 08/17] Revert "Object3DUtils -> Utils" This reverts commit 7de7fa62a85a017af471d175e87037b083be8ccb. Conflicts: src/alternativa/engine3d/utils/Object3DUtils.as --- .../engine3d/utils/Object3DUtils.as | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 src/alternativa/engine3d/utils/Object3DUtils.as diff --git a/src/alternativa/engine3d/utils/Object3DUtils.as b/src/alternativa/engine3d/utils/Object3DUtils.as new file mode 100644 index 0000000..3808a6a --- /dev/null +++ b/src/alternativa/engine3d/utils/Object3DUtils.as @@ -0,0 +1,108 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + * If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice. + * You may add additional accurate notices of copyright ownership. + * + * It is desirable to notify that Covered Software was "Powered by AlternativaPlatform" with link to http://www.alternativaplatform.com/ + * */ + +package alternativa.engine3d.utils { + + import alternativa.engine3d.alternativa3d; + import alternativa.engine3d.core.BoundBox; + import alternativa.engine3d.core.Object3D; + import alternativa.engine3d.core.Transform3D; + + use namespace alternativa3d; + + /** + * @private + */ + public class Object3DUtils { + + private static const toRootTransform:Transform3D = new Transform3D(); + private static const fromRootTransform:Transform3D = new Transform3D(); + + private static const RAD2DEG:Number = 180/Math.PI; + private static const DEG2RAD:Number = Math.PI/180; + + + /** + * Convert Degress to Radians and Radians to Degrees + */ + public static function toRadians(degrees:Number):Number{ + return degrees * DEG2RAD; + } + + /** + * Convert Radians to Degrees + */ + public static function toDegrees(radians:Number):Number{ + return radians * RAD2DEG; + } + + /** + * @private + * Performs calculation of bound box of objects hierarchy branch. + */ + public static function calculateHierarchyBoundBox(object:Object3D, boundBoxSpace:Object3D = null, result:BoundBox = null):BoundBox { + if (result == null) result = new BoundBox(); + + if (boundBoxSpace != null && object != boundBoxSpace) { + // Calculate transfer matrix from object to provided space. + var objectRoot:Object3D; + var toSpaceTransform:Transform3D = null; + + if (object.transformChanged) object.composeTransforms(); + toRootTransform.copy(object.transform); + var root:Object3D = object; + while (root._parent != null) { + root = root._parent; + if (root.transformChanged) root.composeTransforms(); + toRootTransform.append(root.transform); + if (root == boundBoxSpace) { + // Matrix has been composed. + toSpaceTransform = toRootTransform; + } + } + objectRoot = root; + if (toSpaceTransform == null) { + // Transfer matrix from root to needed space. + if (boundBoxSpace.transformChanged) boundBoxSpace.composeTransforms(); + fromRootTransform.copy(boundBoxSpace.inverseTransform); + root = boundBoxSpace; + while (root._parent != null) { + root = root._parent; + if (root.transformChanged) root.composeTransforms(); + fromRootTransform.prepend(root.inverseTransform); + } + if (objectRoot == root) { + toRootTransform.append(fromRootTransform); + toSpaceTransform = toRootTransform; + } else { + throw new ArgumentError("Object and boundBoxSpace must be located in the same hierarchy."); + } + } + updateBoundBoxHierarchically(object, result, toSpaceTransform); + } else { + updateBoundBoxHierarchically(object, result); + } + return result; + } + + /** + * @private + * Calculates hierarchical bound. + */ + alternativa3d static function updateBoundBoxHierarchically(object:Object3D, boundBox:BoundBox, transform:Transform3D = null):void { + object.updateBoundBox(boundBox, transform); + for (var child:Object3D = object.childrenList; child != null; child = child.next) { + if (child.transformChanged) child.composeTransforms(); + child.localToCameraTransform.copy(child.transform); + if (transform != null) child.localToCameraTransform.append(transform); + updateBoundBoxHierarchically(child, boundBox, child.localToCameraTransform); + } + } + + } +} From fd88dbb6ef2cfea2ba7861ebb28db0827c668bf1 Mon Sep 17 00:00:00 2001 From: Andrey Kopysov Date: Mon, 20 Aug 2012 17:01:30 +0600 Subject: [PATCH 09/17] Complete list of features in changelog --- changelog_en.txt | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/changelog_en.txt b/changelog_en.txt index 85ea161..21c39eb 100644 --- a/changelog_en.txt +++ b/changelog_en.txt @@ -3,22 +3,23 @@ Changelog Alternativa3D NEXT ---- Added: -+ Stage3D constrained profile support -+ Object3D: excludeLight() ++ Basic Stage3D constrained profile support ++ Object3D: excludeLight() and hierarchy option + BitmapTextureResource: auto resize for GPU option -+ MouseEvent3D: right and middle mouse buttons support (FP 11.2 and -swf-version=15 required) - ? -+ OmniLightShadow: add omni radius in debug scale -+ Object3DUtils: setPosition, lookAt to Camera3D and converting between Radians and Degrees ++ MouseEvent3D: right and middle mouse buttons support (FP 11.2 and -swf-version=15 required) rightClick3DEnabled ++ Camera3D: setPosition, lookAt ++ Object3DUtils: converting between Radians and Degrees Fixed: -= AnimationClip: animated and loop properties in AnimationClip.slice(), AnimationClip.clone() += Mouse events used only when listens += StandardMaterial: optimized += Optimized shadows rendering = Parser3DS: optimized parsing time -= Bubbling in MouseEvent3D -= ExporterA3D: export meshes without geometry as Object3D = Box: correct tangents and binormals = Decal: Fixed incorrect drawing with extremaly low nearClipping. -= View: Fixed bug with mouse events and postprocessing -= Object3D.toString() ++ LOD: correct work of lights and occluders in levels += ExporterA3D: export meshes without geometry as Object3D += AnimationClip: animated and loop properties in AnimationClip.slice(), AnimationClip.clone() Removed: - Diagram: removed CPU time @@ -36,8 +37,6 @@ Fixed: = OmniLightShadow: fixed some errors and increased performance = ParserCollada: loading Skin without normals and tangents = ParserA3D: parsing scene with spot lights -= DirectionalLigthShadow, OmniLightShadow:default value of biasMultiplyer property was changed to 0.97 -= StandardMaterial:removed traces 8.29.0 --- From c920ff26926ca4863e54aa96ba6604c7fab3f737 Mon Sep 17 00:00:00 2001 From: Yaski Date: Mon, 20 Aug 2012 18:16:23 +0600 Subject: [PATCH 10/17] Added dots in changelog --- changelog_en.txt | 92 ++++++++++++++++++++++++------------------------ 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/changelog_en.txt b/changelog_en.txt index 21c39eb..eda92e8 100644 --- a/changelog_en.txt +++ b/changelog_en.txt @@ -3,50 +3,50 @@ Changelog Alternativa3D NEXT ---- Added: -+ Basic Stage3D constrained profile support -+ Object3D: excludeLight() and hierarchy option -+ BitmapTextureResource: auto resize for GPU option -+ MouseEvent3D: right and middle mouse buttons support (FP 11.2 and -swf-version=15 required) rightClick3DEnabled -+ Camera3D: setPosition, lookAt -+ Object3DUtils: converting between Radians and Degrees ++ Basic Stage3D constrained profile support. ++ Object3D: excludeLight() and hierarchy option. ++ BitmapTextureResource: auto resize for GPU option. ++ MouseEvent3D: right and middle mouse buttons support (FP 11.2 and -swf-version=15 required) rightClick3DEnabled. ++ Camera3D: setPosition, lookAt. ++ Object3DUtils: converting between Radians and Degrees. Fixed: -= Mouse events used only when listens -= StandardMaterial: optimized -= Optimized shadows rendering -= Parser3DS: optimized parsing time -= Box: correct tangents and binormals += Mouse events used only when listens. += StandardMaterial: optimized. += Optimized shadows rendering. += Parser3DS: optimized parsing time. += Box: correct tangents and binormals. = Decal: Fixed incorrect drawing with extremaly low nearClipping. -+ LOD: correct work of lights and occluders in levels -= ExporterA3D: export meshes without geometry as Object3D -= AnimationClip: animated and loop properties in AnimationClip.slice(), AnimationClip.clone() ++ LOD: correct work of lights and occluders in levels. += ExporterA3D: export meshes without geometry as Object3D. += AnimationClip: animated and loop properties in AnimationClip.slice(), AnimationClip.clone(). Removed: -- Diagram: removed CPU time +- Diagram: removed CPU time. 8.31.0 --- -= Rendering optimizations -= Increased materials performance -= AnimationController:fixed error when using notifiers cause animation goes in infinite loop -= Camera3D: fixed a bug with duplicating diagram += Rendering optimizations. += Increased materials performance. += AnimationController:fixed error when using notifiers cause animation goes in infinite loop. += Camera3D: fixed a bug with duplicating diagram. 8.30.0 --- Fixed: -= OmniLightShadow: fixed some errors and increased performance -= ParserCollada: loading Skin without normals and tangents -= ParserA3D: parsing scene with spot lights += OmniLightShadow: fixed some errors and increased performance. += ParserCollada: loading Skin without normals and tangents. += ParserA3D: parsing scene with spot lights. 8.29.0 --- Added: -+ Possibility to use unlimited light sources and shadows count with StandardMaterial ++ Possibility to use unlimited light sources and shadows count with StandardMaterial. + A flag Object3D.useShadow which controls shadow visibility on object. -+ OmniLightShadow class ++ OmniLightShadow class. Fixed: -= Fixed issue with Skin lighting += Fixed issue with Skin lighting. = StandardMaterial does not throw exception about limitation number of light sources and shadows anymore. 8.27.0 @@ -142,7 +142,7 @@ Removed: - WireFrame class was added. - New class SkyBox was added. - StandardMaterial supports Object-space normal maps now. -- StandardMaterial supports glossiness maps now +- StandardMaterial supports glossiness maps now. - Property alwaysOnTop was added in the Sprite. - clone() method was added to Skin. - concatenatedMatrix property was added in Object3D. @@ -170,23 +170,23 @@ Removed: 8.5.0 ----- -- GPU support -- Directional, omni, spot lights -- Hierarchical exclusion of light sources -- Material with normal, specular, opacity mapping -- Lightmap Material -- Vertex light Material -- Fill Material -- Skin -- Skin subdividing -- Semi-transparent Material -- Mesh with several materials -- Sprite -- Animated Sprite -- GPU-based MouseEvents -- ATF textures loading -- Collada loading -- Binary A3D loading -- Drawing to DisplayObject mode -- Animation engine -- Hierarchical Animated blending tree +- GPU support. +- Directional, omni, spot lights. +- Hierarchical exclusion of light sources. +- Material with normal, specular, opacity mapping. +- Lightmap Material. +- Vertex light Material. +- Fill Material. +- Skin. +- Skin subdividing. +- Semi-transparent Material. +- Mesh with several materials. +- Sprite. +- Animated Sprite. +- GPU-based MouseEvents. +- ATF textures loading. +- Collada loading. +- Binary A3D loading. +- Drawing to DisplayObject mode. +- Animation engine. +- Hierarchical Animated blending tree. From 1d40f648d7e1a667433e02777b9f6f5a41f877ae Mon Sep 17 00:00:00 2001 From: Yaski Date: Mon, 20 Aug 2012 19:16:21 +0600 Subject: [PATCH 11/17] Changelog text style updated --- changelog_en.txt | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/changelog_en.txt b/changelog_en.txt index eda92e8..88a4c67 100644 --- a/changelog_en.txt +++ b/changelog_en.txt @@ -1,53 +1,52 @@ Changelog Alternativa3D -NEXT +8.32.0 ---- Added: + Basic Stage3D constrained profile support. -+ Object3D: excludeLight() and hierarchy option. -+ BitmapTextureResource: auto resize for GPU option. -+ MouseEvent3D: right and middle mouse buttons support (FP 11.2 and -swf-version=15 required) rightClick3DEnabled. -+ Camera3D: setPosition, lookAt. -+ Object3DUtils: converting between Radians and Degrees. ++ Object3D: added excludeLight() method for controlling lights on object influence. ++ BitmapTextureResource: added resizeForGPU option to turn on automatic source bitmap resize. ++ Added support for right and middle mouse buttons in mouse events system (work in FP 11.2 and swf-version >= 15). Fixed: -= Mouse events used only when listens. -= StandardMaterial: optimized. -= Optimized shadows rendering. -= Parser3DS: optimized parsing time. -= Box: correct tangents and binormals. -= Decal: Fixed incorrect drawing with extremaly low nearClipping. -+ LOD: correct work of lights and occluders in levels. -= ExporterA3D: export meshes without geometry as Object3D. -= AnimationClip: animated and loop properties in AnimationClip.slice(), AnimationClip.clone(). += Mouse events system will auto-disable when there are no listeners in scene. += StandardMaterial: optimized drawing with many lights. += Camera3D: optimized rendering with shadows. += Parser3DS: greatly reduced models parsing time. += Box: fixed incorrect vertices tangents and binormals data. += Decal: fixed incorrect appearance on scene with small Camera3D nearClipping setting. += LOD: fixed operation of lights and occluders contained in it. += ExporterA3D: meshes without geometry will export as Object3D now. += AnimationClip: slice() and clone() methods will set animated and loop properties of new instance now. Removed: - Diagram: removed CPU time. 8.31.0 --- -= Rendering optimizations. +Fixed: += Scene rendering optimized. = Increased materials performance. -= AnimationController:fixed error when using notifiers cause animation goes in infinite loop. += AnimationController: fixed error when notifiers usage causes animation goes in infinite loop. = Camera3D: fixed a bug with duplicating diagram. 8.30.0 --- Fixed: = OmniLightShadow: fixed some errors and increased performance. -= ParserCollada: loading Skin without normals and tangents. -= ParserA3D: parsing scene with spot lights. += ParserCollada: Skin without normals and tangents will load fine now. += ParserA3D: fixed a bug with spot lights parsing. 8.29.0 --- Added: -+ Possibility to use unlimited light sources and shadows count with StandardMaterial. -+ A flag Object3D.useShadow which controls shadow visibility on object. -+ OmniLightShadow class. ++ StandardMaterial: added possibility to use unlimited light sources and shadows count. ++ Object3D: added flag useShadow which controls shadows influence on object. ++ Added OmniLightShadow class. Fixed: = Fixed issue with Skin lighting. -= StandardMaterial does not throw exception about limitation number of light sources and shadows anymore. += StandardMaterial will not throw exception about lights and shadows count limitation anymore. 8.27.0 ---- From f226a7c103f459e391f5cd1dbcc6286a6f215005 Mon Sep 17 00:00:00 2001 From: Yaski Date: Mon, 20 Aug 2012 21:01:05 +0600 Subject: [PATCH 12/17] Fixed wrong caching of lights programs for many lights --- .../engine3d/materials/StandardMaterial.as | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/alternativa/engine3d/materials/StandardMaterial.as b/src/alternativa/engine3d/materials/StandardMaterial.as index f451c23..1faad5a 100644 --- a/src/alternativa/engine3d/materials/StandardMaterial.as +++ b/src/alternativa/engine3d/materials/StandardMaterial.as @@ -1076,9 +1076,6 @@ package alternativa.engine3d.materials { // Iterate groups var materialKey:int; var program:StandardMaterialProgram; - var omniLightCount:int = 0; - var directionalLightCount:int = 0; - var spotLightCount:int = 0; if (groupsCount == 0 && shadowGroupLength == 0) { // There is only Ambient light on the scene @@ -1121,9 +1118,14 @@ package alternativa.engine3d.materials { // Form key materialKey = (isFirstGroup) ? ((lightMap != null) ? LIGHT_MAP_BIT : 0) : 0; materialKey |= (_normalMapSpace << NORMAL_MAP_SPACE_OFFSET) | ((glossinessMap != null) ? GLOSSINESS_MAP_BIT : 0) | ((specularMap != null) ? SPECULAR_MAP_BIT : 0); + var omniLightCount:int = 0; + var directionalLightCount:int = 0; + var spotLightCount:int = 0; for (j = 0; j < lightGroupLength; j++) { light = lightGroup[j]; - if (light is OmniLight) omniLightCount++; else if (light is DirectionalLight) directionalLightCount++; else if (light is SpotLight) spotLightCount++; + if (light is OmniLight) omniLightCount++; + else if (light is DirectionalLight) directionalLightCount++; + else if (light is SpotLight) spotLightCount++; } materialKey |= omniLightCount << OMNI_LIGHT_OFFSET; materialKey |= directionalLightCount << DIRECTIONAL_LIGHT_OFFSET; @@ -1170,7 +1172,9 @@ package alternativa.engine3d.materials { materialKey = (isFirstGroup) ? ((lightMap != null) ? LIGHT_MAP_BIT : 0) : 0; materialKey |= (_normalMapSpace << NORMAL_MAP_SPACE_OFFSET) | ((glossinessMap != null) ? GLOSSINESS_MAP_BIT : 0) | ((specularMap != null) ? SPECULAR_MAP_BIT : 0); materialKey |= light.shadow.type << SHADOW_OFFSET; - if (light is OmniLight) materialKey |= 1 << OMNI_LIGHT_OFFSET; else if (light is DirectionalLight) materialKey |= 1 << DIRECTIONAL_LIGHT_OFFSET; else if (light is SpotLight) materialKey |= 1 << SPOT_LIGHT_OFFSET; + if (light is OmniLight) materialKey |= 1 << OMNI_LIGHT_OFFSET; + else if (light is DirectionalLight) materialKey |= 1 << DIRECTIONAL_LIGHT_OFFSET; + else if (light is SpotLight) materialKey |= 1 << SPOT_LIGHT_OFFSET; // Для группы создаем программу и дроуюнит // Opaque pass From 329b596073f3ab1cc79242ea67ba5f8a77174aa6 Mon Sep 17 00:00:00 2001 From: Yaski Date: Mon, 20 Aug 2012 21:49:02 +0600 Subject: [PATCH 13/17] Update version --- src/alternativa/Alternativa3D.as | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/alternativa/Alternativa3D.as b/src/alternativa/Alternativa3D.as index 06ca898..92d3944 100644 --- a/src/alternativa/Alternativa3D.as +++ b/src/alternativa/Alternativa3D.as @@ -17,6 +17,6 @@ package alternativa { /** * Library version in the format: generation.feature-version.fix-version. */ - public static const version:String = "8.31.0"; + public static const version:String = "8.32.0"; } } From 3434d8a501b1c37f11b2bf5da93b84b4212fd2a0 Mon Sep 17 00:00:00 2001 From: Yaski Date: Mon, 20 Aug 2012 21:49:59 +0600 Subject: [PATCH 14/17] [maven-release-plugin] prepare release 8.32.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0e35ff7..c5f8f51 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ platform.clients.fp11.libraries Alternativa3D swc - 8.32.0-SNAPSHOT + 8.32.0 platform.clients.fp11.tools.maven BasePom From 7b6622bd2e7ec238d3228973161afe7da27190d1 Mon Sep 17 00:00:00 2001 From: Yaski Date: Mon, 20 Aug 2012 21:50:13 +0600 Subject: [PATCH 15/17] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c5f8f51..07bc36a 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ platform.clients.fp11.libraries Alternativa3D swc - 8.32.0 + 8.33.0-SNAPSHOT platform.clients.fp11.tools.maven BasePom From 9323543d70120d948d6980cc7c3b8787453834f2 Mon Sep 17 00:00:00 2001 From: Yaski Date: Tue, 21 Aug 2012 15:24:57 +0600 Subject: [PATCH 16/17] Proofreaded changelog --- changelog_en.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/changelog_en.txt b/changelog_en.txt index 88a4c67..60a4c8b 100644 --- a/changelog_en.txt +++ b/changelog_en.txt @@ -4,17 +4,17 @@ Changelog Alternativa3D ---- Added: + Basic Stage3D constrained profile support. -+ Object3D: added excludeLight() method for controlling lights on object influence. -+ BitmapTextureResource: added resizeForGPU option to turn on automatic source bitmap resize. -+ Added support for right and middle mouse buttons in mouse events system (work in FP 11.2 and swf-version >= 15). ++ Object3D: added excludeLight() method for controlling light's influence on object. ++ BitmapTextureResource: added resizeForGPU option to turn on the automatic source bitmap resize. ++ Added support for right and middle mouse buttons in the mouse events system (work in FP 11.2 and swf-version >= 15). Fixed: -= Mouse events system will auto-disable when there are no listeners in scene. += Mouse events system will be automatically disabled when there are no listeners in the scene. = StandardMaterial: optimized drawing with many lights. = Camera3D: optimized rendering with shadows. = Parser3DS: greatly reduced models parsing time. = Box: fixed incorrect vertices tangents and binormals data. -= Decal: fixed incorrect appearance on scene with small Camera3D nearClipping setting. += Decal: fixed incorrect appearance in the scene with small Camera3D nearClipping setting. = LOD: fixed operation of lights and occluders contained in it. = ExporterA3D: meshes without geometry will export as Object3D now. = AnimationClip: slice() and clone() methods will set animated and loop properties of new instance now. @@ -25,7 +25,7 @@ Removed: 8.31.0 --- Fixed: -= Scene rendering optimized. += Optimized scene rendering. = Increased materials performance. = AnimationController: fixed error when notifiers usage causes animation goes in infinite loop. = Camera3D: fixed a bug with duplicating diagram. @@ -40,13 +40,13 @@ Fixed: 8.29.0 --- Added: -+ StandardMaterial: added possibility to use unlimited light sources and shadows count. -+ Object3D: added flag useShadow which controls shadows influence on object. ++ StandardMaterial: added possibility to use unlimited number of light sources and shadows. ++ Object3D: added flag useShadow which controls influence of shadows on object. + Added OmniLightShadow class. Fixed: = Fixed issue with Skin lighting. -= StandardMaterial will not throw exception about lights and shadows count limitation anymore. += StandardMaterial will not throw exception about the limitation on the number of lights and shadows anymore. 8.27.0 ---- From 196967bbe27f742724b2389cdaedbfa3b78a7e78 Mon Sep 17 00:00:00 2001 From: Yaski Date: Tue, 21 Aug 2012 21:01:13 +0600 Subject: [PATCH 17/17] Changelog renamed to changelog.txt --- changelog_en.txt => changelog.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changelog_en.txt => changelog.txt (100%) diff --git a/changelog_en.txt b/changelog.txt similarity index 100% rename from changelog_en.txt rename to changelog.txt