Normand Briere
2019-08-14 0c1f740dd6ddd6432dc29266e42ef851e26027bb
Random node + optimizations.
13 files modified
298 ■■■■■ changed files
CameraPane.java 13 ●●●●● patch | view | raw | blame | history
Globals.java 2 ●●● patch | view | raw | blame | history
GroupEditor.java 5 ●●●●● patch | view | raw | blame | history
GroupLeaf.java 2 ●●● patch | view | raw | blame | history
ObjEditor.java 77 ●●●●● patch | view | raw | blame | history
Object3D.java 88 ●●●●● patch | view | raw | blame | history
ParticleNode.java 2 ●●● patch | view | raw | blame | history
RandomEditor.java 36 ●●●●● patch | view | raw | blame | history
RandomNode.java 54 ●●●● patch | view | raw | blame | history
SwitchEditor.java 3 ●●●● patch | view | raw | blame | history
SwitchNode.java 11 ●●●● patch | view | raw | blame | history
cMaterial.java 2 ●●● patch | view | raw | blame | history
cTexture.java 3 ●●●●● patch | view | raw | blame | history
CameraPane.java
....@@ -113,6 +113,8 @@
113113 /*static*/ com.sun.opengl.util.texture.Texture cubemap; // Either custom or rgb
114114 /*static*/ com.sun.opengl.util.texture.Texture cubemapcustom;
115115 /*static*/ com.sun.opengl.util.texture.Texture cubemaprgb;
116
+ boolean transformMode;
117
+
116118 boolean reverseUP = false;
117119 static boolean frozen = false;
118120 boolean enablebackspace = false; // patch for back buffer refresh
....@@ -2515,7 +2517,7 @@
25152517 com.sun.opengl.util.texture.TextureIO.newTextureData(
25162518 getClass().getClassLoader().getResourceAsStream(name),
25172519 true,
2518
- com.sun.opengl.util.texture.TextureIO.PNG);
2520
+ GetFormat(name)); // com.sun.opengl.util.texture.TextureIO.PNG);
25192521 } catch (java.io.IOException e)
25202522 {
25212523 throw new javax.media.opengl.GLException(e);
....@@ -11082,11 +11084,11 @@
1108211084 //
1108311085 // newenvy = -1;
1108411086
11085
- if (object.skyboxname != null && object.skyboxname.equals("cubemaps/default-skyboxes/rgb"))
11087
+ if (transformMode) // object.skyboxname != null && object.skyboxname.equals("cubemaps/default-skyboxes/rgb"))
1108611088 {
1108711089 if (cubemaprgb == null)
1108811090 {
11089
- cubemaprgb = LoadSkybox(object.skyboxname + "/", object.skyboxext, false);
11091
+ cubemaprgb = LoadSkybox("cubemaps/default-skyboxes/rgb" + "/", "jpg", false);
1109011092 }
1109111093
1109211094 cubemap = cubemaprgb;
....@@ -11097,6 +11099,8 @@
1109711099 {
1109811100 if (!object.skyboxname.equals(this.loadedskyboxname))
1109911101 {
11102
+ if (cubemap != null && cubemap != cubemaprgb)
11103
+ cubemap.dispose();
1110011104 cubemapcustom = LoadSkybox(object.skyboxname + "/", object.skyboxext, false);
1110111105 loadedskyboxname = object.skyboxname;
1110211106 }
....@@ -16788,7 +16792,8 @@
1678816792 gl.glDisable(GL.GL_TEXTURE_GEN_R);
1678916793
1679016794 cubemap.disable();
16791
- ////cubemap.unbind();
16795
+ //cubemap.dispose();
16796
+
1679216797 if (CULLFACE)
1679316798 {
1679416799 gl.glEnable(gl.GL_CULL_FACE);
Globals.java
....@@ -1,7 +1,7 @@
11
22 public class Globals
33 {
4
- public static boolean TOOLTIPS = false;
4
+ public static boolean TOOLTIPS = true; // false;
55 public static boolean ADVANCED = false;
66 public static boolean DEBUG = false;
77
GroupEditor.java
....@@ -1043,8 +1043,8 @@
10431043 // maxButton.addActionListener(this);
10441044 }
10451045
1046
-// cButton gcButton;
1047
-//
1046
+ cButton gcButton;
1047
+
10481048 // oe.toolbarPanel.add(gcButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
10491049 // gcButton.setToolTipText("Garbage collect");
10501050 // gcButton.addActionListener(new ActionListener()
....@@ -5325,6 +5325,7 @@
53255325
53265326 boolean allComposites = true;
53275327
5328
+ if (group.selection != null)
53285329 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
53295330 {
53305331 if (!(e.nextElement() instanceof Composite))
GroupLeaf.java
....@@ -21,7 +21,7 @@
2121 {
2222 super(name);
2323
24
- addChild(new cGroup("Leaf"));
24
+ addChild(new cGroup(name + "Leaf"));
2525 }
2626
2727 Object3D deepCopy()
ObjEditor.java
....@@ -75,8 +75,16 @@
7575 return new cCheckBox(icon, border);
7676 }
7777
78
+ static java.util.Hashtable<String, javax.swing.ImageIcon> icons = new java.util.Hashtable<String, javax.swing.ImageIcon>();
79
+
7880 ImageIcon GetIcon(String name)
7981 {
82
+ javax.swing.ImageIcon iconCache = icons.get(name);
83
+ if (iconCache != null)
84
+ {
85
+ return iconCache;
86
+ }
87
+
8088 try
8189 {
8290 BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name));
....@@ -94,10 +102,14 @@
94102 // }
95103
96104 javax.swing.ImageIcon icon = new javax.swing.ImageIcon(image);
105
+
106
+ icons.put(name, icon);
107
+
97108 return icon;
98109 }
99110 catch (Exception e)
100111 {
112
+ //icons.put(name, null);
101113 return null;
102114 }
103115 }
....@@ -433,7 +445,7 @@
433445
434446 ChangeListener changeListener = new ChangeListener()
435447 {
436
- String name;
448
+ //String name;
437449
438450 public void stateChanged(ChangeEvent changeEvent)
439451 {
....@@ -453,33 +465,34 @@
453465 // EditSelection(false);
454466 // }
455467
456
- if (objectPanel.getSelectedIndex() == 4)
457
- {
458
- name = copy.skyboxname;
459
-
460
- if (name == null)
461
- {
462
- name = "";
463
- }
464
-
465
- copy.skyboxname = "cubemaps/default-skyboxes/rgb";
466
- copy.skyboxext = "jpg";
467
- }
468
- else
469
- {
470
- if (name != null)
471
- {
472
- if (name.equals(""))
473
- {
474
- copy.skyboxname = null;
475
- copy.skyboxext = null;
476
- }
477
- else
478
- {
479
- copy.skyboxname = name;
480
- }
481
- }
482
- }
468
+// if (objectPanel.getSelectedIndex() == 4)
469
+// {
470
+// name = copy.skyboxname;
471
+//
472
+// if (name == null)
473
+// {
474
+// name = "";
475
+// }
476
+//
477
+// copy.skyboxname = "cubemaps/default-skyboxes/rgb";
478
+// copy.skyboxext = "jpg";
479
+// }
480
+// else
481
+// {
482
+// if (name != null)
483
+// {
484
+// if (name.equals(""))
485
+// {
486
+// copy.skyboxname = null;
487
+// copy.skyboxext = null;
488
+// }
489
+// else
490
+// {
491
+// copy.skyboxname = name;
492
+// }
493
+// }
494
+// }
495
+ cameraView.transformMode = objectPanel.getSelectedIndex() == 4;
483496
484497 // refreshContents(false); // To refresh Info tab
485498 cameraView.repaint();
....@@ -1676,9 +1689,9 @@
16761689 scenePanel.add(tabbedPane);
16771690
16781691 //if (Globals.ADVANCED)
1679
- tabbedPane.add(infoPanel);
1680
- tabbedPane.setIconAt(3, GetIcon("icons/info.png"));
1681
- tabbedPane.setToolTipTextAt(3, "Information");
1692
+// tabbedPane.add(infoPanel);
1693
+// tabbedPane.setIconAt(3, GetIcon("icons/info.png"));
1694
+// tabbedPane.setToolTipTextAt(3, "Information");
16821695
16831696 /*
16841697 cTree jTree = new cTree(null);
....@@ -4781,6 +4794,8 @@
47814794 if (muteSlider)
47824795 return;
47834796
4797
+ Replace();
4798
+
47844799 int version = versionSlider.getInteger();
47854800
47864801 if (version != -1 && copy.versionlist[version] != null)
Object3D.java
....@@ -5574,6 +5574,11 @@
55745574 if (fullname == null)
55755575 return "";
55765576
5577
+ if (fullname.pigment != null)
5578
+ {
5579
+ return fullname.pigment;
5580
+ }
5581
+
55775582 // System.out.println("Fullname = " + fullname);
55785583
55795584 // Does not work on Windows due to C:
....@@ -5586,7 +5591,7 @@
55865591
55875592 if (split.length == 0)
55885593 {
5589
- return "";
5594
+ return fullname.pigment = "";
55905595 }
55915596
55925597 if (split.length <= 2)
....@@ -5594,22 +5599,27 @@
55945599 if (fullname.name.endsWith(":"))
55955600 {
55965601 // Windows
5597
- return fullname.name.substring(0, fullname.name.length()-1);
5602
+ return fullname.pigment = fullname.name.substring(0, fullname.name.length()-1);
55985603 }
55995604
5600
- return split[0];
5605
+ return fullname.pigment = split[0];
56015606 }
56025607
56035608 // Windows
56045609 assert(split.length == 4);
56055610
5606
- return split[0] + ":" + split[1];
5611
+ return fullname.pigment = split[0] + ":" + split[1];
56075612 }
56085613
56095614 static String GetBump(cTexture fullname)
56105615 {
56115616 if (fullname == null)
56125617 return "";
5618
+
5619
+ if (fullname.bump != null)
5620
+ {
5621
+ return fullname.bump;
5622
+ }
56135623
56145624 // System.out.println("Fullname = " + fullname);
56155625 // Does not work on Windows due to C:
....@@ -5621,12 +5631,12 @@
56215631
56225632 if (split.length == 0)
56235633 {
5624
- return "";
5634
+ return fullname.bump = "";
56255635 }
56265636
56275637 if (split.length == 1)
56285638 {
5629
- return "";
5639
+ return fullname.bump = "";
56305640 }
56315641
56325642 if (split.length == 2)
....@@ -5634,16 +5644,16 @@
56345644 if (fullname.name.endsWith(":"))
56355645 {
56365646 // Windows
5637
- return "";
5647
+ return fullname.bump = "";
56385648 }
56395649
5640
- return split[1];
5650
+ return fullname.bump = split[1];
56415651 }
56425652
56435653 // Windows
56445654 assert(split.length == 4);
56455655
5646
- return split[2] + ":" + split[3];
5656
+ return fullname.bump = split[2] + ":" + split[3];
56475657 }
56485658
56495659 String GetPigmentTexture()
....@@ -5726,6 +5736,9 @@
57265736 texname = "";
57275737
57285738 GetTextures().name = texname + ":" + GetBump(GetTextures());
5739
+
5740
+ GetTextures().pigment = null;
5741
+
57295742 Touch();
57305743 }
57315744
....@@ -5798,6 +5811,8 @@
57985811 texname = "";
57995812
58005813 GetTextures().name = Object3D.GetPigment(GetTextures()) + ":" + texname;
5814
+
5815
+ GetTextures().bump = null;
58015816
58025817 Touch();
58035818 }
....@@ -7422,7 +7437,29 @@
74227437 // {
74237438 // CameraPane.Ymax = spoth;
74247439 // }
7425
- spot.translate(32, 32);
7440
+// if (CameraPane.Xmin > spot.x)
7441
+// {
7442
+// CameraPane.Xmin = spot.x;
7443
+// }
7444
+// if (CameraPane.Xmax < spotw)
7445
+// {
7446
+// CameraPane.Xmax = spotw;
7447
+// }
7448
+// if (CameraPane.Ymin > spot.y)
7449
+// {
7450
+// CameraPane.Ymin = spot.y;
7451
+// }
7452
+// if (CameraPane.Ymax < spoth)
7453
+// {
7454
+// CameraPane.Ymax = spoth;
7455
+// }
7456
+ // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - boundary.height/2); // 15
7457
+ //info.g.drawLine(spotw, spoth, spotw - boundary.width/2, spoth); // 15
7458
+ spot.translate(32, 0);
7459
+ clickInfo.g.setColor(Color.yellow);
7460
+ clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7461
+
7462
+ spot.translate(32, 64);
74267463 spotw = spot.x + spot.width;
74277464 spoth = spot.y + spot.height;
74287465 clickInfo.g.setColor(Color.cyan);
....@@ -7443,28 +7480,7 @@
74437480 // {
74447481 // CameraPane.Ymax = spoth;
74457482 // }
7446
- // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - boundary.height/2); // 15
7447
- //info.g.drawLine(spotw, spoth, spotw - boundary.width/2, spoth); // 15
7448
- spot.translate(0, -32);
7449
- clickInfo.g.setColor(Color.yellow);
7450
- clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height);
74517483 clickInfo.g.setColor(Color.green);
7452
-// if (CameraPane.Xmin > spot.x)
7453
-// {
7454
-// CameraPane.Xmin = spot.x;
7455
-// }
7456
-// if (CameraPane.Xmax < spotw)
7457
-// {
7458
-// CameraPane.Xmax = spotw;
7459
-// }
7460
-// if (CameraPane.Ymin > spot.y)
7461
-// {
7462
-// CameraPane.Ymin = spot.y;
7463
-// }
7464
-// if (CameraPane.Ymax < spoth)
7465
-// {
7466
-// CameraPane.Ymax = spoth;
7467
-// }
74687484 clickInfo.g.drawArc(boundary.x + clickInfo.DX, boundary.y + clickInfo.DY,
74697485 (int)(boundary.width * clickInfo.W), (int)(boundary.height * clickInfo.W), 0, 360);
74707486 //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360);
....@@ -7523,12 +7539,14 @@
75237539 retval = true;
75247540 }
75257541 spot.translate(0, 32);
7542
+ spot.translate(32, 0);
7543
+ spot.translate(0, 32);
75267544 if (spot.contains(clickInfo.x, clickInfo.y))
75277545 {
75287546 hitSomething = hitScale;
75297547
75307548 double scale = 0.005f * clickInfo.camera.Distance();
7531
- double hScale = (double) (clickInfo.x - centerPt.x) / 32;
7549
+ double hScale = (double) (clickInfo.x - centerPt.x) / 64;
75327550 double sign = 1;
75337551 if (hScale < 0)
75347552 {
....@@ -7540,7 +7558,7 @@
75407558 //hScale = 0.01;
75417559 }
75427560
7543
- double vScale = (double) (clickInfo.y - centerPt.y) / 32;
7561
+ double vScale = (double) (clickInfo.y - centerPt.y) / 64;
75447562 sign = 1;
75457563 if (vScale < 0)
75467564 {
....@@ -7755,7 +7773,7 @@
77557773 break;
77567774
77577775 case hitScale: // scale
7758
- double hScale = (double) (clickInfo.x - centerPt.x) / 32;
7776
+ double hScale = (double) (clickInfo.x - centerPt.x) / 64;
77597777 double sign = 1;
77607778 if (hScale < 0)
77617779 {
....@@ -7767,7 +7785,7 @@
77677785 //hScale = 0.01;
77687786 }
77697787
7770
- double vScale = (double) (clickInfo.y - centerPt.y) / 32;
7788
+ double vScale = (double) (clickInfo.y - centerPt.y) / 64;
77717789 sign = 1;
77727790 if (vScale < 0)
77737791 {
ParticleNode.java
....@@ -356,7 +356,7 @@
356356 if (support != null && link2master)
357357 geo = support;
358358
359
- if (live && Globals.isLIVE() && display.DrawMode() == display.SHADOW) // june 2013
359
+ if (live && Globals.isLIVE() && (display.DrawMode() == display.SHADOW || !Globals.RENDERSHADOW)) // june 2013
360360 {
361361 Step();
362362 }
RandomEditor.java
....@@ -9,14 +9,15 @@
99 class RandomEditor extends ObjEditor implements //ItemListener,
1010 ChangeListener, ObjectUI, ActionListener
1111 {
12
- cGridBag childPanel;
12
+ cGridBag itemPanel;
13
+ private cGridBag dampPanel;
1314 RandomEditor(RandomNode inBP, GroupEditor callee)
1415 {
1516 super(inBP,callee);
1617
1718 objEditor = callee.GetEditor(); // new ObjEditor(inBP, this, callee);
1819
19
- switchnode = (RandomNode) inBP;
20
+ randomnode = (RandomNode) inBP;
2021 // parent = p;
2122
2223 //SetupUI2(callee.objEditor);
....@@ -35,7 +36,7 @@
3536
3637 objEditor = callee.GetEditor(); // new ObjEditor(inBP, this, callee);
3738
38
- switchnode = (RandomNode) inBP;
39
+ randomnode = (RandomNode) inBP;
3940 parent = p;
4041
4142 SetupUI2(callee.objEditor);
....@@ -49,7 +50,7 @@
4950
5051 //objEditor = new ObjEditor(inBP, copy, this, callee);
5152 // ?? super.parent = p;
52
- switchnode = (RandomNode) copy;
53
+ randomnode = (RandomNode) copy;
5354 parent = p;
5455
5556 //objEditor.SetupUI(false); // ?
....@@ -60,24 +61,30 @@
6061 void SetupUI2(ObjEditor oe)
6162 {
6263 super.SetupUI2(oe);
63
- childPanel = AddSlider(oe.ctrlPanel, "Item: ", 0, switchnode.Size()-1, switchnode.rnd);
64
+ itemPanel = AddSlider(oe.ctrlPanel, "Item: ", 0, randomnode.Size()-1, randomnode.rndIndex);
6465
65
- childField = (cNumberSlider)childPanel.getComponent(1);
66
+ itemField = (cNumberSlider)itemPanel.getComponent(1);
6667 oe.ctrlPanel.Return();
68
+
69
+ oe.ctrlPanel.Return();
70
+ dampPanel = AddSlider(oe.ctrlPanel, "Damp: ", 0, 300, randomnode.damp);
71
+
72
+ dampField = (cNumberSlider)dampPanel.getComponent(1);
73
+ oe.ctrlPanel.Return();
6774 }
6875
6976 void Clear()
7077 {
7178 objEditor.Clear();
7279
73
- switchnode = null;
80
+ randomnode = null;
7481 }
7582
7683
7784 public void stateChanged(ChangeEvent e)
7885 {
7986 //System.out.println("Biparam :: stateChanged");
80
- if (e.getSource() == childField)
87
+ if (e.getSource() == itemField || e.getSource() == dampField)
8188 {
8289 //System.out.println("#U = " + biparam.uDivs);
8390 //System.out.println("#V = " + biparam.vDivs);
....@@ -94,7 +101,7 @@
94101
95102 void Refresh()
96103 {
97
- switchnode.rnd = childField.getInteger();
104
+ randomnode.rndIndex = itemField.getInteger();
98105
99106 refreshContents();
100107 }
....@@ -102,7 +109,8 @@
102109 /**/
103110 public void applySelf()
104111 {
105
- switchnode.rnd = childField.getInteger();
112
+ randomnode.rndIndex = itemField.getInteger();
113
+ randomnode.damp = dampField.getInteger(); // biparam.minUDivs, 99);
106114 }
107115 /**/
108116
....@@ -111,7 +119,8 @@
111119 ObjEditor oe = objEditor;
112120
113121 //Remove(childField);
114
- oe.ctrlPanel.remove(this.childPanel);
122
+ oe.ctrlPanel.remove(this.itemPanel);
123
+ oe.ctrlPanel.remove(this.dampPanel);
115124
116125 super.closeUI();
117126 }
....@@ -126,8 +135,9 @@
126135 objEditor.refreshContents();
127136 }
128137
129
- RandomNode switchnode;
130
- cNumberSlider childField;
138
+ RandomNode randomnode;
139
+ cNumberSlider itemField;
140
+ cNumberSlider dampField;
131141
132142 ObjectUI parent;
133143
RandomNode.java
....@@ -38,7 +38,7 @@
3838 return super.size();
3939 }
4040
41
- int rnd = -1;
41
+ int rndIndex = -1;
4242
4343 static int globalseed = 0;
4444 static int globalseed2 = 0; // mocap frames???
....@@ -54,6 +54,35 @@
5454 super.ResetRandom();
5555 }
5656
57
+ int damp;
58
+ transient int countdamp;
59
+ transient int globaloffset;
60
+
61
+ void DrawNode(iCameraPane display, Object3D /*Composite*/ root, boolean selected)
62
+ {
63
+ if (live && Globals.isLIVE() && (display.DrawMode() == display.SHADOW || !Globals.RENDERSHADOW) &&
64
+ currentframe != Globals.framecount)
65
+ {
66
+ currentframe = Globals.framecount;
67
+
68
+ if (countdamp <= 0)
69
+ {
70
+ countdamp = damp;
71
+
72
+ globaloffset += 1;
73
+ }
74
+ else
75
+ {
76
+ if (CameraPane.FAST)
77
+ countdamp -= CameraPane.STEP;
78
+ else
79
+ countdamp--;
80
+ }
81
+ }
82
+
83
+ super.DrawNode(display, root, selected);
84
+ }
85
+
5786 int firstchoice = 0;
5887 // int currentpass = 0;
5988
....@@ -66,8 +95,8 @@
6695 // if (!link2master && rnd != -1)
6796 // new Exception().printStackTrace();
6897
69
- if (!random && rnd != -1) // freeze current value
70
- return super.reserve(rnd);
98
+ if (!random && rndIndex != -1) // freeze current value
99
+ return super.reserve(rndIndex);
71100
72101 if (firstchoice == 0)
73102 firstchoice = (int)(Math.random()*super.Size()) + 1;
....@@ -91,11 +120,11 @@
91120 }
92121 //int tabarnak = super.Size();
93122
94
- rnd = gcount%super.Size(); //
123
+ rndIndex = gcount%super.Size(); //
95124
96125 //(int)(Math.random()*super.size());
97126 //globalcount++;
98
- gcount += Grafreed.mix3(rnd+12345,firstchoice*12345,gcount);
127
+ gcount += Grafreed.mix3(rndIndex+12345,firstchoice*12345,gcount);
99128
100129 gcount &= 0x7fffffff;
101130
....@@ -105,12 +134,17 @@
105134 globalseed = gcount;
106135
107136 if (!random) // aout 2013 link2master)
108
- rnd = whatevercount++;
137
+ rndIndex = whatevercount++;
109138
110
- rnd %= super.Size();
139
+ if (live) // aout 2019
140
+ {
141
+ rndIndex += globaloffset;
142
+ }
143
+
144
+ rndIndex %= super.Size();
111145
112146 //GraphreeD.tracein("RESERVE " + this + " = ", i);
113
- Object3D child = super.get(rnd);
147
+ Object3D child = super.get(rndIndex);
114148 //Applet3D.tracein("RESERVE ", child);
115149
116150 child.count--;
....@@ -139,11 +173,11 @@
139173
140174 // globalcount--;
141175
142
- super.get(rnd).count++;
176
+ super.get(rndIndex).count++;
143177 //assert (child.count >= 0);
144178
145179 if (random) // volatile value
146
- rnd = -1;
180
+ rndIndex = -1;
147181 }
148182
149183 void createEditWindow(GroupEditor callee, boolean newWindow)
SwitchEditor.java
....@@ -11,6 +11,7 @@
1111 {
1212 private cGridBag dampPanel;
1313 private cGridBag framePanel;
14
+
1415 SwitchEditor(SwitchNode inBP, GroupEditor callee)
1516 {
1617 super(inBP,callee);
....@@ -86,7 +87,7 @@
8687
8788 frameField = (cNumberSlider)framePanel.getComponent(1);
8889 oe.ctrlPanel.Return();
89
- dampPanel = AddSlider(oe.ctrlPanel, "Damp: ", 0, 500, switchnode.speed);
90
+ dampPanel = AddSlider(oe.ctrlPanel, "Damp: ", 0, 300, switchnode.speed);
9091
9192 speedField = (cNumberSlider)dampPanel.getComponent(1);
9293 oe.ctrlPanel.Return();
SwitchNode.java
....@@ -41,7 +41,7 @@
4141 switchobject.count = 1; // hide
4242 }
4343
44
- transient boolean restarted;
44
+ //transient boolean restarted;
4545 transient int countspeed;
4646
4747 transient boolean toggleneutral;
....@@ -59,7 +59,7 @@
5959 }
6060 if (live && Globals.isLIVE() && display.DrawMode() == display.SHADOW)
6161 {
62
- if (countspeed == 0)
62
+ if (countspeed <= 0)
6363 {
6464 countspeed = speed;
6565
....@@ -92,7 +92,12 @@
9292
9393 }
9494 else
95
- countspeed--;
95
+ {
96
+ if (CameraPane.FAST)
97
+ countspeed -= CameraPane.STEP;
98
+ else
99
+ countspeed--;
100
+ }
96101 }
97102
98103 if (bRep == null)
cMaterial.java
....@@ -362,7 +362,7 @@
362362 float diffuse = 0.75f, specular = 0.25f, shininess = 0.75f, shift = 1;
363363 float ambient = 0.001f, lightarea = 0.025f, factor = 0.001f, velvet = 0.001f;
364364 float sheen = 1f, subsurface = 0.001f, bump = 0.75f, aniso = 0.001f, anisoV = 0.001f;
365
- float cameralight = 0.2f, diffuseness = 0.001f, shadow = 5f, texture = 1f, opacity = 1;
365
+ float cameralight = 0.3f, diffuseness = 0.001f, shadow = 5f, texture = 1f, opacity = 1;
366366 float fakedepth = 0.5f, shadowbias = 0.01f; // 0.001f;
367367
368368 boolean multiply;
cTexture.java
....@@ -32,6 +32,9 @@
3232
3333 String name;
3434
35
+ transient String pigment;
36
+ transient String bump;
37
+
3538 int pw, ph;
3639 byte[] pigmentdata;
3740