pixijs / pixi-projection

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

clone missing ?!

jonlepage opened this issue · comments

I know your plugin dont have ObservablePoint3d
but is it ok to add clone like this ?
image
I have some issue on my side, and after investigate it seem clone not working on 3d elements!
image
If your ok , i can make a pr if you want, or you have another idea ?

maybe clone() doesnt exist in observables, we have to add it there. just add it

PIXI.ObservablePoint3d.prototype.clone = PIXI.Point3d.prototype.clone;

I'm not sure about namespace and class names.

I'm taking a rest from pixi for a month and I wont answer questions

ok i wish you a good holiday you deserve it. :)

PIXI.ObservablePoint3d.prototype.clone = PIXI.Point3d.prototype.clone;

well not working , the clone give only {x,y}
So i will keep this for now.
we can look that when you get back to make a pr and check that all is well if you want.

    PIXI.ObservablePoint.prototype.clone = function clone() {
        var cb = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
        var scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

        var _cb = cb || this.cb;
        var _scope = scope || this.scope;
        var o = new PIXI.ObservablePoint(_cb, _scope, this._x, this._y);
        o.z = this._z;
        return o;
    }