898 });
899 }
900
901 let renderer; 902 if (this.renderVersion === RenderMode.Line || this.renderVersion === RenderMode.Point) {
903 renderer = new LineRenderer(scene, this.specularColor, this.loadingProgressCallback, this.renderFuncs, this.tools, this.meshIndex);
904 } else if (this.renderVersion === RenderMode.Block) {
718 if (commentIndex > -1) {
719 tokenString = tokenString.substring(0, commentIndex - 1).trim();
720 }
721 let tokens; 722
723 tokenString = tokenString.toUpperCase();
724 let commands = tokenString.match(/[GM]+[0-9.]+/g); //|S+
277 }
278
279 for (let renderModeIdx = renderStartIndex; renderModeIdx < 4; renderModeIdx++) {
280 let vertextMultiplier; 281 switch (renderModeIdx) {
282 case 1:
283 vertextMultiplier = 24;
89 box.material= edgeMaterial;
90}
91
92var ViewBoxCallback; 93
94export function registerViewBoxCallback(func) {
95 ViewBoxCallback = func;
46 }
47
48 static fromJson(jsonString) {
49 let json; 50 if (typeof jsonString === 'object') {
51 json = jsonString;
52 } else {
In JavaScript, variables can be assigned during declaration, or at any point afterwards using an assignment statement. For example, in the following code, foo
is initialized during declaration, while bar
is initialized later.
var foo = 1;
var bar;
if (foo) {
bar = 1;
} else {
bar = 2;
}
function foo() {
var bar;
let baz;
}
function foo() {
var bar = 1;
let baz = 2;
const qux = 3;
}