Skip to content

Commit 99eaaf7

Browse files
committed
Bug fixes: scene.center and label, ACE highlighting, etc.
1 parent a04ace2 commit 99eaaf7

File tree

8 files changed

+16
-11
lines changed

8 files changed

+16
-11
lines changed

docs/VPythonDocs/canvas.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ <h1 class="Heading-1"> <font color="#0000A0">Controlling One or More VPython
135135

136136
moves to continue to look in the same direction toward
137137

138-
the new center, unless you also change <span class="attribute">forward</span> (see next attribute). Default vector(0,0,0).</p>
138+
the new center, unless you also change <span class="attribute">forward</span> (see next attribute). Default vector(0,0,0).</p>
139139
<p class="attributes"> <span class="attribute">forward</span> Vector pointing
140140

141141
in the same direction as the camera looks (that is, from the current camera

ide/ide.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,8 +1334,10 @@ $(function () {
13341334

13351335
define('ace/mode/visualjs_highlight_rules', function (ace_require, exports, module) {
13361336
var oop = ace_require("ace/lib/oop")
1337-
if (lang == 'coffeescript' || lang == 'rapydscript' || lang == 'vpython') var Rules = ace_require("ace/mode/coffee_highlight_rules").CoffeeHighlightRules
1338-
else var Rules = ace_require("ace/mode/javascript_highlight_rules").JavaScriptHighlightRules
1337+
var Rules
1338+
if (lang == 'rapydscript' || lang == 'vpython') Rules = ace_require("ace/mode/python_highlight_rules").PythonHighlightRules
1339+
else if (lang == 'coffeescript') Rules = ace_require("ace/mode/coffee_highlight_rules").CoffeeHighlightRules
1340+
else Rules = ace_require("ace/mode/javascript_highlight_rules").JavaScriptHighlightRules
13391341

13401342
var VisualHighlightRules = function () {
13411343
this.$rules = (new Rules()).getRules()

lib/compiling/GScompiler.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -974,8 +974,10 @@ where compile() was called, in untrusted/run.js.
974974
continue
975975
}
976976

977-
// Might start with 'RS_' or be string.format(...) or be color.gray(.7)
978-
if ( name.slice(0,3) == 'RS_' || (name == 'format' && period) || (name == 'gray' && period) ) {
977+
// Might start with 'RS_' or be string.option(...) or be color.gray(.7)
978+
if ( name.slice(0,3) == 'RS_' ||
979+
(period && (prog[start+m.index-1] == '"')) ||
980+
(name == 'gray' && period) ) {
979981
start += m.index+name.length+1
980982
continue
981983
}
@@ -1084,4 +1086,4 @@ where compile() was called, in untrusted/run.js.
10841086
} // end of compile function
10851087
window.glowscript_compile = compile
10861088

1087-
})(); // This semicolon is not optional, for some reason associated with the minification of the library.
1089+
})(); // This semicolon is not optional, for some reason associated with the minification of the library.

lib/glow/WebGLRenderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@
677677
var ctx = cvs.overlay_context
678678
ctx.clearRect(0, 0, cvs.__width, cvs.__height)
679679
for (var i=0; i<cvs.__overlay_objects.objects.length; i++) {
680-
var obj = cvs.__overlay_objects.objects[i]
680+
var obj = cvs.__overlay_objects.objects[i]
681681
if (!obj.visible) continue
682682
obj.__update(ctx, camera)
683683
}

lib/glow/canvas.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,8 @@
560560
ambient: new vec(0.2,0.2,0.2),
561561

562562
__change: function() { // Called when attributeVectors are changed, axis/center/up
563-
if (this.__lastevent !== null && this.hasmouse) this.mouse.__update(this.__lastevent)
563+
if (this.__lastevent !== null && this.hasmouse) this.mouse.__update(this.__lastevent)
564+
this.__overlay_objects.__changed = true
564565
},
565566

566567
// Changes to center/axis/up call this.__change():

package/RScompiler.2.9.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package/compiler.2.9.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package/glow.2.9.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)