Git Product home page Git Product logo

hype_as3's People

Contributors

brandenhall avatar hype avatar nodename avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hype_as3's Issues

ShapeLayout's getNextPoint can cause infinite loops in certain circumstances

            var pt : Point;

    do {
        pt = new Point();
        pt.x = (Math.random() * _rect.width) + _rect.x;
        pt.y = (Math.random() * _rect.height) + _rect.y;

        if (!_target.hitTestPoint(pt.x, pt.y, true)) {
            pt = null;
        }
    } while (pt == null);


    return pt;
}```

If the ShapeLayout's layout object has been added to another container that hasn't been added to the stage the above do-while loop can never escape.

ColorPool.colorChildren checks for InteractiveObject

I may be overlooking something, but it would be better for colorChildren to check if the child was a DisplayObject? This would enable us to color Shapes, TextFields, etc using the ColorTransform, not just subclasses of InteractiveObject.

Mark

File paths shouldn't contain spaces

I'm looking into the latest Pure AS3 examples before tomorrow's workshop, but I'm having trouble running them (creating a Debug Configuration) from within FDT.

This is due to the fact that the path to the Main (runnable) class contains spaces:
examples/Pure AS3/src/

I would suggest to rename it to:
examples/pure_as3/src/

Spaces in file names and Capitalized words always give trouble on some systems.

(I'm on Mac OSX 10.6 Snow Leopard running Eclipse 3.5 with FDT Enterprise 3.5)

ILayout should contain applyLayout function

Sorry to add this after you've got through all of the issues on here!

The ILayout interface would be better defined as the below. This would enable us to change layouts at runtime by coding to the interface rather than the implementation.

package hype.framework.layout
{
import flash.display.DisplayObject;
import flash.geom.Point;

/**
 * Interface all Layouts must implement
 */
public interface ILayout
{
    /**
     * Apply the layout to a DisplayObject
     *
     * @param object The DisplayObject to position
     */
    function applyLayout( object:DisplayObject ):void;
    /**
     * Get the next point from the layout
     *
     * @return Next point from the layout
     */
    function getNextPoint():Point;
}

}

I will be forking HYPE soon, but for now I thought I'd add anything I find to here.

Keep up the good work!

Problems with hype movies unloading

If you try to unload a movie containing any Hype class, flash palyer hangs. This is because RhythmManager is a global object and all rhythms are still alive when movie unload, but targets are dead and hundreds of errors are thrown blocking execution.
A solution may be (I did it) adding this simple public method to RhythmManager Class:

    //added by Bruno Migliaretti
    public function removeAllRhythms () {
        for (var r in _rhythmTable) {
            removeRhythm(r);
        }
    }

and add a call to this method to Event.UNLOAD event.

ObjectPool.release assumes object has triggers and behaviours

The ObjectPool assumes that the object has triggers and behaviours when you try to release it and throws a runtime error. This is because the static property 'manager' hasn't been instantiated yet. Here's some code to reproduce:

protected var _pool:ObjectPool;

public function HYPETest():void
{
_pool = new ObjectPool( Circle, 1 );
_pool.onCreateObject = createCircleObject;
_pool.requestAll();
}

protected function createCircleObject( circle:Circle ):void
{
circle.addEventListener( MouseEvent.CLICK, circleClickListener );
addChild( circle );
}

protected function circleClickListener( e:MouseEvent ):void
{
var circle:Circle = Circle( e.currentTarget );
circle.removeEventListener( MouseEvent.CLICK, circleClickListener );
removeChild( circle );
_pool.release( circle );
}

Could this be rectified by using lazy instantiation of the manager using a public static getter for the manager, rather than instantiating it in the AbstractTrigger/AbstractRhythm?

Btw, this is an awesome framework/toolkit!

Mark

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.