Code Monkey home page Code Monkey logo

away3d-core-fp11's Issues

AwayStats doesnt show software mode.

Line 618 should be
_swhw_tf.text = Stage3DManager.getInstance(stage).getStage3DProxy(0).context3D.driverInfo == “Software (Embedded)” ? “SW” : “HW”;

Bug found in Entity.as

1.- Entity.as, line 177:
You should check that mvpIndex is greater than 0 before decrementing it.

I don’t know why, but in certain cases _mvpIndex decreases below 0 and the programs crashes at some point.

public function popModelViewProjection() : void
{
if(_mvpIndex > 0)—_mvpIndex;
}

Merge adds unwanted spacing

This should be 4 cubes next to each other

var cube:Cube = new Cube(new ColorMaterial(0x00ff00), 20, 20, 20);
var cubeClone:Mesh
var cubeARR:Vector. = new Vector.;
var emptyMesh:Mesh = new Mesh(new ColorMaterial(0xff0000), null);
for (var i:int = 0; i < 4; i++)
{
cubeClone = cube.clone() as Mesh;
cubeClone.x = i * cube.width;
//scene.addChild(cubeClone);
cubeARR.push(cubeClone);
}
var merge:Merge = new Merge(false, true);// makes no difference to bug
scene.addChild(merge.applyToMeshes(emptyMesh, cubeARR));

If I comment out line 304
ds.transform.appendTranslation(ds.mesh.x, ds.mesh.y, ds.mesh.z);

you dont get the spacing, no idea what that breaks

One mesh for many ObjectContainer3D

Hello,

I wanted to know if there is any way to add the same mesh to different ObjectContainer3D. Now I clone every mesh when I call addChild, but this seems an unnecessary waste of memory.

SpecularMap runtime error

I'm getting this error when I parse my loaded OBJ and attempt to apply a specular map:

Error: Error #3697: A texture is bound on sampler 2 but not used by the fragment program.

I was asked to post the code that's generating the error. So I posted my source and debug release here: http://rfcaflash.com/rfca_dev/matt/SpecularMapErrorCode.zip

I wasn't sure how to post only a snippet and still give your devs the scope of the problem.

And here is the deployment if you'd like to see the error without compiling: http://rfcaflash.com/rfca_dev/matt/molehill/UltrabookBeautyTest/index.html

Thanks!

Object3D.pitch(..) makes object jitter, tracked bug to the quaternion update

81718d2

I am almost 100% sure that the quaternion "swapped" change update broke this. I've made various branches up to that point and the pitch method worked fine.

Try the demo below on the master head. The cube just jitters back and forth. I'll try and see if I can find the problem, but quite frankly I have always been confused by the swap comment in the quaternion code since Away3D 3.x. Object3D.rotationX and yaw work fine.

package{
    import away3d.containers.View3D;
    import away3d.primitives.WireframeCube;
    import flash.display.Sprite;
    import flash.events.Event;
    public class PitchTest extends Sprite{
        private var _view:View3D = new View3D();
        private var _cube:WireframeCube;
        public function PitchTest(){
            _cube = new WireframeCube(100, 100, 100);
            _view.scene.addChild(_cube);
            this.addChild(_view);
            this.addEventListener(Event.ENTER_FRAME, run, false, 0, true);
        }
        public function run(e:Event):void{      
            _cube.pitch(1);//the cube jitters instead of rotating??
            _view.render();
        }
    }
}

Event.SOUND_COMPLETE for Sound3D

As discussed on the forum, it is currently not possible to access the SoundChannel objects for SOUND_COMPLETE events from Sound3D.

Richard Olsson suggests: "Sound3D class should bubble the event."

Thank you.

Visible property in ObjectContainer3D

The Visible property in ObjectContainer3D doesn't seem to work properly:

  • If I add a container to the scene which is initially visible, then I can't hide it.
  • If I add a container to the scene which is initially hidden, I can show it by changing its Visible property, but then I can't hide it again.

To reproduce this issue:

  1. Create an ObjectContainer3D with some meshes as children.
  2. Set its visible property to false and add it to the scene
  3. At this moment the container and its contents are hidden (are not being rendered).
  4. Then change it's visible property to true and its contents (Meshes) are visible.
  5. Then change it's visible property to false and its contents remain visible. It can't be hidden anymore.

UPDATE:

In my tests the Meshes are not contained directly into the container as I've said before. Instead, my container contains Loader3D instances which in turn contain the meshes. May be here is the problem...

UPDATE 2:

The _implicitVisibility arcane variable is not updated recursively across its children.

I have solve it by making the following changes to the visible property setter of ObjectContainer3D:

// --- BEGIN CODE ---

public function set visible(value : Boolean) : void
{
var len : uint = _children.length;

_explicitVisibility = value;

for (var i : uint = 0; i < len; ++i) {
    setImplicitVisibilityRecursive(_children[i], _explicitVisibility && _implicitVisibility);
}

}

private function setImplicitVisibilityRecursive(obj : ObjectContainer3D, visible : Boolean) : void
{
obj._implicitVisibility = visible;

var len : uint = obj._children.length;
for (var i : uint = 0; i < len; ++i) {
    setImplicitVisibilityRecursive(obj._children[i], visible);
}

}

// --- END CODE ---

Material & Bitmap management bugs

Hi,

I think I found some strange behaviors since the latest update following the FP11 beta player.

For the moment, if I change mipmap property of a material to false and I switch it back to true, the Flash player goes down with this error :

Error: Error #3600: No valid program set.
at flash.display3D::Context3D/drawTriangles()
at away3d.materials.passes::MaterialPassBase/render()[D:\Projects\CornFlex\WorldBuilder\build\libs\src\away3d\materials\passes\MaterialPassBase.as:206]
at away3d.materials.passes::DefaultScreenPass/render()[D:\Projects\CornFlex\WorldBuilder\build\libs\src\away3d\materials\passes\DefaultScreenPass.as:436]
at away3d.materials::MaterialBase/renderPass()[D:\Projects\CornFlex\WorldBuilder\build\libs\src\away3d\materials\MaterialBase.as:348]
at away3d.core.render::DefaultRenderer/drawRenderables()[D:\Projects\CornFlex\WorldBuilder\build\libs\src\away3d\core\render\DefaultRenderer.as:108]
at away3d.core.render::DefaultRenderer/draw()[D:\Projects\CornFlex\WorldBuilder\build\libs\src\away3d\core\render\DefaultRenderer.as:48]
at away3d.core.render::RendererBase/executeRender()[D:\Projects\CornFlex\WorldBuilder\build\libs\src\away3d\core\render\RendererBase.as:335]
at away3d.core.render::RendererBase/render()[D:\Projects\CornFlex\WorldBuilder\build\libs\src\away3d\core\render\RendererBase.as:310]
at away3d.containers::View3D/render()[D:\Projects\CornFlex\WorldBuilder\build\libs\src\away3d\containers\View3D.as:357]

I have the same problem with the "repeat" property or when I try to dispose some material (even with dispose(false))

It seems there are some problems with the Bitmap management.
I didn't get that bugs before using the new repo and FP11Beta and I'm running the same project.

Is there anybody already tried this version of BroomStick with the new FP11Beta ?

Thx

Problem with getting resource in AssetLibrary

this is related a litte bit with issue #37.

I want to load external resource by using AssetLibrary.load before application initializing.
So, I made some kind of preload class.
Here is a problem.
After loading multiple 3d resources, I tried to find assets by AssetLibrary.getAsset().

AssetLibrary.load() doesn't have any 'name' parameter.
So, what i do is make instance of Loader3D and assign 'name',
and put it into AssetLibrary by addAsset().
Atfer that, in some other class, I try to found resource by getAsset('name').

Is there any good example for indexing resources that are already loaded in AssetLibrary?

Thanks in advance.

Possible bug in HitTestRenderer.as

In HitTestRenderer.as, line 111:

          if (!_context && !_potentialFound) return;

It should be:

          _hitRenderable = null;
          _hitUV = null;
           if (!_context || !_potentialFound) return;

View3D position

The x and y properties of View3D in my current project did not work.
I found that there are 4 stage3D and I managed to change the View3D position by changing all the 4 stage3D x or y values (stage.stage3Ds[0].x, stage.stage3Ds[1].x etc)

some MouseEvent3D error

I find the MouseEvent3D.ROLL_OVER,MouseEvent3D.ROLL_OUT,MouseEvent3D.MOUSE_OVER,MouseEvent3D.MOUSE_OUT
Events can not trigger in the latest version,but in earlier version they could.

BitmapMaterial and alphaBlend

This bug has been highlighted several times on the forum.
I have offered sample code and results here:
http://away3d.com/forum/viewthread/414/

Without lights, there is no bug, so it's probably there that it occurs.
There is another bug that means the reverse side of a plane with material.bothsides = true isn't lit and appears black.
I'm wondering if these two are related.

MouseEvent3D.MOUSE_UP does not fire if alphaBlending is set to true

Hi,

I have a plane with a MouseEvent3D.MOUSE_UP added:

plane.mouseEnabled = true;
plane.addEventListener( MouseEvent3D.MOUSE_UP, onMouseUp );

If I use a ColorMaterial and set its alpha to anything but 1 the MouseEvent3D does not fire. It works fine if the alpha is 1.
Same goes for the BitmapMaterial. Everything works until I set alphaBlending to true. After that the MouseEvent3D no longer fires.

Cheers,

Jerome.

View3D.backgroundMaterial

Instead of the View3D.backgroundImage property, could we have a backgroundMaterial which would allow for use of any material, e.g. flat colors, bitmaps, videos et c?

Bugs found related to Mouse3DManager and View3D

1.- Mouse3DManager.as, line 148:

Instead of:
_hitTestRenderer.update((_view.mouseX-_view.x)/_view.width, (_view.mouseY-_view.y)/_view.height, collector);

It should be:
_hitTestRenderer.update(_view.mouseX /_view.width, _view.mouseY /_view.height, collector);

Because _view.mouseX and _view.mouseY are already in local _view coordinates.

2.- View3D.as:
Whenever you do viewPortX = _x or viewPortY = _y on _hitTestRenderer or _renderer objects you should first convert _x and _y to Global coordinates.

This is because _x and _y are in View3D parent’s coordinates and viewPortX and viewPortY are in stage (global) coordinates.

You should do this:
var pt : Point = this.parent.localToGlobal(new Point(_x, _y));

If you try to insert the View3D in the Stage with an offset you will find that things doen’t work as expected.

Subgeometry clone error

eg
var subGeometry:SubGeometry = SubGeometry(Mesh(plane).geometry.subGeometries[0]).clone();

fails on line 281
clone.updateSecondaryUVData(_secondaryUvs.concat());

needs check?
if (_secondaryUvs)clone.updateSecondaryUVData(_secondaryUvs.concat());

Object3D.translate(..) after Object3D.pitch(..) , undoes the rotations, jitters

Might be related to issue #23. The object rotates back and forth as it did in issue 23, this time while translating.

package{
    import away3d.containers.View3D;
    import away3d.primitives.WireframeCube;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.geom.Vector3D;
    public class PitchTest extends Sprite{
        private var _view:View3D = new View3D();
        private var _cube:WireframeCube;
        public function PitchTest(){
            _cube = new WireframeCube(100, 100, 100, 0xFFFFFF, 5);
            _view.scene.addChild(_cube);
            this.addChild(_view);
            this.addEventListener(Event.ENTER_FRAME, run, false, 0, true);
        }
        public function run(e:Event):void{      
            _cube.pitch(3);
            _cube.translate(new Vector3D(0, 0, 1), 1);//adding this line causes it to jitter again
            //rotating negatively and positively over and over
            _view.render();
        }
    }
}

Scene disposal problems

What steps will reproduce the problem?

  1. create a View3D and render a scene
  2. dispose and remove the View3D
  3. repeat from point (1) until you get a runtime error

What is the expected output? What do you see instead?
I should be able to create and dispose as many scene as desired without errors and keeping a decent memory usage.
Instead after the 4th execution i get a runtime error because I used to many Stage3D instances.

Please provide any additional information below.
Stage3DProxy.dispose is never called, and after some small changes to call it led other errors, mostly because instances stored into arrays are null-idifed but not removed (_stageProxies[index] = null instead of _delete stageProxies[index])

Merge class extra subGeometries bug

When merging meshes, if keepMaterial = true, extra subGeometries (possibly exponentially many) are added to the receiver mesh.

A quick fix is to change

if(_keepMaterial)
   geometry.addSubGeometry(subGeom);

to

if(_keepMaterial && i > destMesh.geometry.subGeometries.length - 1)
   geometry.addSubGeometry(subGeom);

on lines 383-384. I'm not sure if this will cause problems elsewhere (it hasn't in my test cases), but either way it looks like the problem is deeper and it would be better to go after the root of the problem rather than using this fix.

Loader3D.load & AssetLibrary.getInstance bug

I tried to use Loader3D and AssetLibrary to caching 3d models.
so, I write codes like this.

  • in preloader class
    var ldr:Loader3D = new Loader3D();
    ldr.load(new URLRequest('resources/3d/panja/projectD_panja.3ds'));
  • in some other class
    var asset:IAsset = AssetLibrary.getAsset('someID');

then asset got null.
so i looked in source code a little bit.

in Loader3D.load function,

lib = AssetLibrary.getInstance(_assetLibId); // this _assetLibId variable passes 'null'

and in AssetLibrary.getInstance function,
parameter 'key' got 'null' value, and makes new instance like below,

_instances[null] = new AssetLibrary(new SingletonEnforcer());

so finally, though i didn't use any key value,
two library keys are made.
if 'key' got null, should 'key' be assigned 'default' ?

sorry for poor english.

fp11 and broomstick

Hi everybody,

is the away3d-core-fp11 project going to be merged back into the away3d-core-broomstick project?
Or is the fp11 proejct the one we should use from now on and all future commits will go to?

Thx,
Michael

MD2Parser bug

the proceedParsing function:
If the parse time is too short, it will directly return true,but not call finalizeAsset(_mesh).

MaterialBase bug

line 245
it seems should be
public function get uniqueId() : int

but now it is
public function get uniqueId() : uint

AIR 3 on Android

Hey guys, I'm getting this error when I add my view to the stage:

Error: Too many Stage3D instances used!

FYI: I'm targeting AIR 3.0.0.3690 on Android 2.2 and I'm using the away3d-core-fp11 nightly.

AwayStats context3D not yet accesible

first tick generate error

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at away3d.debug::AwayStats/_redrawStats()[D:\dev\flash\e-dom-flash\broomstick\src\away3d\debug\AwayStats.as:648]
at away3d.debug::AwayStats/_onTimer()[D:\dev\flash\e-dom-flash\broomstick\src\away3d\debug\AwayStats.as:827]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()

https://github.com/away3d/away3d-core-fp11/blob/master/src/away3d/debug/AwayStats.as#L648

after first tick all ok :)

SegmentSet && LineSegment -> SegmentPass error with multiple views

Hi people!

When I use the SegmentSet for one LineSegmet and more then one View I got the SegmentPass error.

Error: Error #3601: No valid index buffer set.
at flash.display3D::Context3D/drawTriangles()
at away3d.materials.passes::SegmentPass/render()[X:\away3D-git\src\away3d\materials\passes\SegmentPass.as:140]
at away3d.materials::MaterialBase/renderPass()[X:\away3D-git\src\away3d\materials\MaterialBase.as:348]
at away3d.core.render::DefaultRenderer/drawRenderables()[X:\away3D-git\src\away3d\core\render\DefaultRenderer.as:104]
at away3d.core.render::DefaultRenderer/draw()[X:\away3D-git\src\away3d\core\render\DefaultRenderer.as:48]
at away3d.core.render::RendererBase/executeRender()[X:\away3D-git\src\away3d\core\render\RendererBase.as:246]
at away3d.core.render::RendererBase/render()[X:\away3D-git\src\away3d\core\render\RendererBase.as:218]
at away3d.containers::View3D/render()[X:\away3D-git\src\away3d\containers\View3D.as:370]

I have fresh git repository from https://github.com/away3d/away3d-core-fp11

Thanks.

Object3D set eulers seems error

in set eulers
It's seems should be like

_rotationX = value.x / MathConsts.RADIANS_TO_DEGREES;
_rotationY = value.y / MathConsts.RADIANS_TO_DEGREES;
_rotationZ = value.z / MathConsts.RADIANS_TO_DEGREES;

Trident causes error in multiple views

Error: Error #3601: No valid index buffer set.
at flash.display3D::Context3D/drawTriangles()

package
{
import away3d.containers.Scene3D;
import away3d.containers.View3D;
import away3d.debug.Trident;
import away3d.materials.ColorMaterial;
import away3d.primitives.Cube;
import flash.display.Sprite;
import flash.events.Event;
import flash.display.StageAlign;
import flash.display.StageScaleMode;

public class MainAw4Test extends Sprite 
{
    private var view:View3D;
    private var scene:Scene3D;
    private var view2:View3D;

    public function MainAw4Test()
    {
        stage.align = StageAlign.TOP_LEFT;
        stage.scaleMode = StageScaleMode.NO_SCALE

        init3D();
        initObjects();
        initListeners();
    }

    private function init3D():void 
    {
        view = new View3D();
        addChild(view);
        scene = view.scene ;

        view2 = new View3D(view.scene, view.camera);
        view2.width = view2.height = 200;
        addChild(view2)
    }

    private function initObjects():void 
    {
        var tri:Trident = new Trident(750, true);
        scene.addChild(tri);

    //  var c:Cube = new Cube(new ColorMaterial(0xcfcfcf));
    //  scene.addChild(c);
    }

    private function initListeners():void 
    {
        addEventListener(Event.ENTER_FRAME, handleEnterFrame);
        stage.addEventListener(Event.RESIZE, onStageResize);
    }

    private function handleEnterFrame(e:Event):void 
    {
        view.render();
        view2.render();
    }

    private function onStageResize(event : Event) : void
    {
        view.width = stage.stageWidth;
        view.height = stage.stageHeight;
    }
}

}

Ray class methods should not always return same vector instance

Those of the Ray class methods that returns a Vector3D always return the same instance (_intersect) which can cause confusion and bugs for users. Implement an approach similar to the Quaternion, Matrix3DUtils classes et c which lets the user specify which object the values should be inserted into, and if no object is given returns a new instance.

DirectionLight with FilteredShadowMapMethod error

When use DirectionLight with FilteredShadowMapMethod ,an exception will occur in line 83 of ShadowMapperBase.
The information is:

TypeError: Error #1009: 无法访问空对象引用的属性或方法。
at away3d.lights.shadowmaps::ShadowMapperBase/createDepthTexture()[X:\Program Files (x86)\flexsdk4.5\frameworks\libs\away3d-away3d-core-fp11\src\away3d\lights\shadowmaps\ShadowMapperBase.as:83]
at away3d.lights.shadowmaps::ShadowMapperBase/renderDepthMap()[X:\Program Files (x86)\flexsdk4.5\frameworks\libs\away3d-away3d-core-fp11\src\away3d\lights\shadowmaps\ShadowMapperBase.as:101]
at away3d.containers::View3D/updateLights()[X:\Program Files (x86)\flexsdk4.5\frameworks\libs\away3d-away3d-core-fp11\src\away3d\containers\View3D.as:434]
at away3d.containers::View3D/render()[X:\Program Files (x86)\flexsdk4.5\frameworks\libs\away3d-away3d-core-fp11\src\away3d\containers\View3D.as:364]
at Main/handleEnterFrame()[C:\Users\Administrator\Desktop\SceneTest\src\Main.as:106]

the stage3DProxy._context3D is null

Sprite3D's disappear if center point outside camera frustum

Hello,

I noticed that sprites will not be rendered if the center point is outside the viewing window, causing the entity to not be rendered even if parts of it should still be visible.

Setting Sprite3D.bounds to AxisAlignedBoundingBox fixes this issue, but I don't think that sprites disappearing is ideal default behaviour.

Second Stage3D does not work in mobile

AIR 3.0 for Mobile only supports a single Stage3D instance. This causes the View3D initialization to fail since it requires a second Stage3D for the mouse-picking. For Away3D to work on mobile, we will have to implement a different mouse-picking solution, or alternatively add a flag to disable mouse-picking altogether (and let users implement their own logic if necessary.)

Thoughts?

VideoMaterial frame redraw

I've got a VideoMaterial (FLV) that uses an alpha channel. It seems like all the frames are being drawn at once and not being cleared. I'm using another VideoMaterial in the same project that doesn't have an alpha channel. That VideoMaterial seems to be working properly. So it seems to be isolated to videos with an alpha channel.

Bug related to ObjParser

In ObjParser:

  • Current implementation of transparency (tr / d) is wrong: Transparency in OBJ material should be mapped to alpha property in Away3D material.
  • Repeat mode not treated correctly: Repeat mode should be activated by default in material.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.