Nice work. The only issue I had is that you initially need to click each button twice to get it to work. You can fix this by setting onClick = _c2 for all buttons. Another approach is to use one _isVisible boolean variable (and different code) to do the job.
Thanks, I appreciate the offer. I decided not to use it since it will overshadow the card effect and not match the video as well.
I have (2) issues with your scene:
1. The unilateral phase detractors should have balanced forces.
2. The malleable logarithmic casing has a large crack.
Best guess is that the scene.phn file inside the .phz is too big. Is the new rail map file really about 10X as large as the Washing D.C. map? I can't open the file on my PC. I get "Not Responding" from Algodoo. Have you tried downloading your own file from google drive? I don't see how it could possibly work on your PC and question why you would post a scene that can't be run.
I looked at your code in Notepad++ and see 439275 lines of code that all look legitimate. So now my story is that you have a better PC than I do.
Analyzing your scene I see 4470 boxes, 721 circles, 689 polygons, 161 "Scene.my" lines of code, 92688 custom not "Scene.my" lines of code, 160 "Scene.my" variables, and 32664 member (_someVariable) variables. This scene is massive.
You could break the scene up into 2 scenes with half of the rail paths in one scene and half in the other.
Another option would be to reduce the size of the scene through optimization.
Thanks. Hopefully oof_32 can get his Tokyo scene up and running. I'm sure that part of the problem with getting his scene to work on my PC is that my PC is 10 years old.
Here's how you can get your Tokyo rail map to show up in Algobox and on older PCs by using a transparent background .png for each rail line:
1. Open your scene and display 1 rail line at a time.
2. For each line take a screenshot by pressing F12 in Algodoo.
3. Use image editing software to create a .png with transparent background for each image.
4. Drag the image files with transparent background into Algodoo. Undo geometry generation if necessary.
5. Show or hide the boxes containing the textures based on button clicks the same way as in the original program or put the rail lines on separate layers and turn the layers on and off.
Another approach is to create the 4,470 boxes in your Tokyo rail map after the scene is loaded in a manner similar to how I create 3312 boxes in Mona Lisa II. The raw code size (before compression) is 652 KB before running and 9,208 KB after running. This is doable, but would require some off-scene coding to extract the pertinent box properties and create a script.
Thanks. I changed the code per your recommendation and see the improvement, but now I'm wondering why the code has the +/- math.pi limitation. _a = _a - 0.05 seems to work OK. _a = _a % (2.0* math.pi) - 0.05 also seems to work OK.
I understand that Thyme angle functions work in radians, but I don't believe that the added (pi limiting) code does anything useful. I was hesitant to remove the code since Chesterton's fence quote states "Don't ever take a fence down until you know the reason it was put up.". Since you don't know why pi limiting is in there, then I will probably take it out. The only issue I see with removing the limitation is that if you did enough rotations, the angle could be so large that the angular resolution suffers. That won't happen with this scene. At first I thought the limitation might have something to do with gimbal lock, but I don't believe that to be the case.
Scale and translation should not be too hard to add. I will probably add it within the next week but OK if you beat me to it. Use any of my code that you want since I copied most of yours. While you are at it you could add a texture to one face of the cube.
I don't know if texture matrix supports projective transformations. I know tm supports scale, offset, and rotation. I haven't seen tm do any keystoning of images.
If we don't use perspective projection on the cube then there should be a way to make the image fit. The information is in Transform Polygon and/or Rotate Polygon.
You can change the thumbnail and upload the scene by doing the following:
1. Open your original scene.
2. Press F12 to get a screenshot in Algodoo.
3. Close your original scene.
4. Download this scene.
5. Open, but don't run, this scene.
6. Delete the rail map image.
7. Drag the screenshot of the original scene into this scene.
8. Glue box with image to background.
9. Set box with image collision layers to none.
10. Set box with image timeToLive to 1.0.
11. Save scene.
12. Upload scene to Algobox.
I would do it here, but on my PC Algodoo can't handle your original scene.
Follow the instructions in the status bar at the bottom of the widget.
Use slow mouse clicks.
The widget determines the angle between two lines as shown in the points selection frame.
If you still have difficulty, then please be more specific.
When clicking, press down for about 1 second.
Clicking the Enable button should make the button appear sunken and the button caption should change to "Disable". The status bar should display "Click first point.". The above should work with the simulation paused or running.
You are doing the right thing, but the right thing is not happening. Algodoo is not working the way we expect. I would try resetting Algodoo at this point. You can do that by selecting the gear icon in the top menu, then click the reset tab, then pressing the "Reset Configuration ..." button.
Nice wave effect. Spoiler alert: Don't read further if you don't want to know the message. I see the secret message is 123RF. You could add a special message as a _var to the bottle.