-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manupulate existing shapes #34
Comments
Instead of constructing directly into iso.add(), you can construct the items and push them into an array: tile = new Path(args); function render(){ Then you can change the properties of tile, and invoke 'render()'. |
is that how the animation is done on the homepage? On Sun, May 4, 2014 at 9:29 PM, JrFolk [email protected] wrote:
Probaste Pensando?? |
Nope. On the homepage, the spinning diamond shape is first created, then a center of rotation point is constructed, then the diamond is rotated around that point by a certain angle (this is what changes each frame) and then passed to iso.add(), all in one statement. This is done every frame. |
Thankyou very much!! :) Do you have the code for the diamond so I can get a better grip? On Sun, May 4, 2014 at 10:11 PM, JrFolk [email protected] wrote:
Probaste Pensando?? |
thankyou so much!! :) On Sun, May 4, 2014 at 10:21 PM, JrFolk [email protected] wrote:
Probaste Pensando?? |
Las question (I might as well...) I'm trying to find out what I'm clicking on On Sun, May 4, 2014 at 10:52 PM, Seba Manda [email protected] wrote:
Probaste Pensando?? |
I haven't dug that deep till now, but I think the 'magic' happens in the file: In the function: As the comments put it: 'the angle' comes from 'this.angle' which is defined as π/6 = 30° in the same file. |
I saw that as well, z translate directly to the canvas's Y (the higher isomer's Z is, the lower the canvas's Y) I'm really close, but any way I use _translatePoint, I still can't get a conversion that's seems good |
Is there a way to delete or modify a shape you just created
I did this:
tile = iso.add(new Path([Point(0,2,0),Point(1,2,0),Point(1,3,0),Point(0,3,0)]), new Color(50,160,60));
in hopes of being able to do stuf like this:
tile.remove();
iso.remove(tile);
iso.shapes.tile.x = 3;
tile.extrude(3, new Color(50,160,60));
The text was updated successfully, but these errors were encountered: