PageSourceSearch

https://www.mhv-gifhorn.de/wp-content/plugins/vrm360/js/inserter.js?ver=5.6

js mhv-gifhorn.de collected 2026-10-02 20:37:36 UTC 23,608 bytes, 647 lines download raw bytes

1// This file is building the container.
2// three.js webgl - loaders - kicad pcb loader
3
4var inserter_version = "1.2.2"
5
6//var rotate = false; 
7var cameraZ; var r;
8var divId; var debug=false; // offs; speed;
9// var cvname;
10
11if ( WEBGL.isWebGLAvailable() === false ) {
12
13    //document.body.appendChild( WEBGL.getWebGLErrorMessage() );
14    divS = document.getElementById(cname);
15    divS.appendChild( WEBGL.getWebGLErrorMessage() );
16
17}
18function showhide(divId) {
19    var x = document.getElementById(divId);
20    if (x.style.display === "none") {
21        x.style.display = "block";
22    } else {
23        x.style.display = "none";
24    }
25}
26function hide(divId) {
27    var x = document.getElementById(divId);
28    x.style.display = "none";
29}
30function toggle_rotation () {
31    rotate = ! rotate;
32}
33
34function zoom_refit (offset) {
35    //console.log(offset);
36    offset =  offset || 1.25;
37    //r=cameraZ*offset;
38    // camera.position.x= 0.45*offset; //-1.2; //0.0; //r*Math.cos(.1);
39    // camera.position.z= 2.25*offset; //-7.9; //-8.0; //r*Math.sin(2);
40    camera.position.x= cameraX*offset; //-1.2; //0.0; //r*Math.cos(.1);
41    camera.position.y= cameraY*offset; //-1.2; //0.0; //r*Math.cos(.1);
42    camera.position.z= cameraZ*offset; //-1.2; //0.0; //r*Math.cos(.1);
43    //camera.position.x= camera.position.x*offset; //-1.2; //0.0; //r*Math.cos(.1);
44    //camera.position.z= camera.position.z*offset; //-7.9; //-8.0; //r*Math.sin(2);
45    camera.lookAt(scene.position);
46    renderer.render( scene, camera );
47}
48
49// http://learningthreejs.com/data/THREEx/docs/THREEx.FullScreen.html
50// function goFS (cvname) {
51//     console.log(cvname);
52//     divCV = document.getElementById(cvname);
53//     console.log(divCV);
54//     THREEx.FullScreen.request(divS);
55// }
56function degToRad(degrees)
57{
58  var pi = Math.PI;
59  return degrees * (pi/180);
60}
61function zoom (offset) {
62    offset =  offset || 1.25;
63    //r=cameraZ*offset;
64    // camera.position.x= 0.45*offset; //-1.2; //0.0; //r*Math.cos(.1);
65    // camera.position.z= 2.25*offset; //-7.9; //-8.0; //r*Math.sin(2);
66    camera.position.x= camera.position.x*offset; //-1.2; //0.0; //r*Math.cos(.1);
67    camera.position.y= camera.position.y*offset; //-1.2; //0.0; //r*Math.cos(.1);
68    camera.position.z= camera.position.z*offset; //-1.2; //0.0; //r*Math.cos(.1);
69    //camera.position.x= camera.position.x*offset; //-1.2; //0.0; //r*Math.cos(.1);
70    //camera.position.z= camera.position.z*offset; //-7.9; //-8.0; //r*Math.sin(2);
71    camera.lookAt(scene.position);
72    renderer.render( scene, camera );
73}
74function fitCameraToObject( camera, object, offset, controls ) {
75
76    offset =  offset || 1.35;
77
78    const boundingBox = new THREE.Box3();
79
80    // get bounding box of object - this will be used to setup controls and camera
81    boundingBox.setFromObject( object );
82        
83            //ERRORS HERE
84    const center = boundingBox.getCenter();
85    const size = boundingBox.getSize();
86
87    // get the max side of the bounding box (fits to width OR height as needed )
88    const maxDim = Math.max( size.x, size.y, size.z );
89    const fov = camera.fov * ( Math.PI / 180 );
90    cameraZ = Math.abs( maxDim / 2 * Math.tan( fov * 2 ) ); //Applied fifonik correction
91    r=camera.position.z*offset;
92    cameraZ *= offset; // zoom out a little so that objects don't fill the screen
93    // console.log(cameraZ+' cameraZ' +' controls '+ controls)
94    if (0) {
95        zoom_refit (offset); //1.15); //(1.15);
96    }
97    else {
98        // <--- NEW CODE
99        //Method 1 to get object's world position
100        scene.updateMatrixWorld(); //Update world positions
101        var objectWorldPosition = new THREE.Vector3();
102        objectWorldPosition.setFromMatrixPosition( object.matrixWorld );
103        
104        //Method 2 to get object's world position
105        //objectWorldPosition = object.getWorldPosition();
106    
107        const directionVector = camera.position.sub(objectWorldPosition);   //Get vector from camera to object
108        const unitDirectionVector = directionVector.normalize(); // Convert to unit vector
109        camera.position = unitDirectionVector.multiplyScalar(cameraZ); //Multiply unit vector times cameraZ distance
110        camera.lookAt(objectWorldPosition); //Look at object
111        // --->
112    
113        const minZ = boundingBox.min.z;
114        const cameraToFarEdge = ( minZ < 0 ) ? -minZ + cameraZ : cameraZ - minZ;
115    
116        camera.far = cameraToFarEdge * 3;
117        camera.updateProjectionMatrix();
118    
119        if ( controls ) {
120    
121            // set camera to rotate around center of loaded object
122            controls.target = center;
123        
124            // prevent camera from zooming out far enough to create far plane cutoff
125            controls.maxDistance = cameraToFarEdge * 2;
126                    // ERROR HERE   
127            controls.saveState();
128    
129        } else {
130            camera.lookAt( center )
131        }
132    }
133    cameraX = camera.position.x
134    cameraY = camera.position.y
135    
136}
137
138
139var container; //var container, stats;
140// var camera, controls, 
141var scene, renderer;
142var views = [];
143
144// init();
145// animate();
146var model, cname, ar;
147
148//FBX loader
149var mixer;
150var clock = new THREE.Clock();
151
152//dae loader
153// var dae_obj;
154
155
156/* function View( canvas, fullWidth, fullHeight, viewX, viewY, viewWidth, viewHeight ) {
157
158                canvas.width = viewWidth * window.devicePixelRatio;
159                canvas.height = viewHeight * window.devicePixelRatio;
160
161                var context = canvas.getContext( '2d' );
162
163                var camera = new THREE.PerspectiveCamera( 20, viewWidth / viewHeight, 1, 10000 );
164                camera.setViewOffset( fullWidth, fullHeight, viewX, viewY, viewWidth, viewHeight );
165                camera.position.z = 1800;
166
167                this.render = function () {
168
169                    camera.position.x += ( mouseX - camera.position.x ) * 0.05;
170                    camera.position.y += ( - mouseY - camera.position.y ) * 0.05;
171                    camera.lookAt( scene.position );
172
173                    renderer.render( scene, camera );
174
175                    context.drawImage( renderer.domElement, 0, 0 );
176
177                };
178
179            }
180*/
181
182function initTest(model) {
183    model_url = model; //pathVar;
184    model_name = model;
185    console.log(model_name);
186    modelExt = model.substring(model.lastIndexOf(".")+1)
187    console.log(modelExt);
188    modelName = model.substring(0,model.lastIndexOf("."))
189    console.log(modelName);
190    objName = modelName+'.obj'
191    mtlName = modelName+'.mtl'
192    console.log(objName);
193    console.log(mtlName);
194    
195    //model_name = model_name.substring(model_url.lastIndexOf("/")+1);
196    //console.log(model_name);
197    //model_url = model_name.substring(0,model_url.lastIndexOf("/"));
198    //console.log(model_url);
199    
200}
201
202function init (model, cname, ar, ioffset, ground) {
203
204    
205    //views.push( new View( canvas1, fullWidth, fullHeight, w * 0, h * 0, w, h ) );
206
207    //camera = new THREE.PerspectiveCamera( 60, window.innerWidth / window.innerHeight, 0.01, 1e10 );
208    divS = document.getElementById(cname);
209    camera = new THREE.PerspectiveCamera( 60, divS.clientWidth / (divS.clientWidth/ar), 0.01, 1e10 ); //   /ar, 0.01, 1e10 );
210    //camera = new THREE.PerspectiveCamera( 40, window.innerWidth / window.innerHeight, 1, 2000 );
211    camera.position.z = 6;
212
213    //controls = new THREE.OrbitControls( camera , container );
214
215    scene = new THREE.Scene();
216    //scene.background = new THREE.Color( 0xF5F5F5 );
217    // scene.background = new THREE.Color( 0xD9D9D9 );
218    scene.background = new THREE.Color( jsbackcolor ); //0xD9D9D9 );
219    // console.log(jsbackcolor);
220    if (0) {
221        scene.fog = new THREE.Fog( 0xD9D9D9, 2, 20 );
222    }
223    scene.add( camera );
224
225    if (0) {  //ground
226        // Ground
227        var plane = new THREE.Mesh(
228            new THREE.PlaneBufferGeometry( 40, 40 ),
229            new THREE.MeshPhongMaterial( { color: 0x999999, specular: 0x101010 } )
230        );
231        plane.rotation.x = - Math.PI / 2;
232        plane.position.y = - 10.0; //0.5;
233        scene.add( plane );
234        plane.receiveShadow = true;
235    }
236    
237    // ground_offset = -10.0;
238    if (ground==true) {  //ground
239        var mesh = new THREE.Mesh( 
240            new THREE.PlaneBufferGeometry( 2000, 2000 ), 
241            new THREE.MeshPhongMaterial( { color: groundcolor, specular: 0x101010, depthWrite: false } )
242        );
243        mesh.rotation.x = - Math.PI / 2;
244        mesh.receiveShadow = true;
245        mesh.position.y = ground_offset; //0.5;
246        scene.add( mesh );
247    }
248    if (grid == true) {  //grid
249        // var grid = new THREE.GridHelper( 2000, 20, 0x000000, 0xFF0000 );
250        // grid.material.opacity = 0.2;
251        // grid.material.transparent = true;
252        var gridXZ = new THREE.GridHelper(2000, 20);
253        gridXZ.setColors( new THREE.Color(0x006600), new THREE.Color(0x006600) );
254        gridXZ.position.set( 0,0,0 );
255        gridXZ.position.y = ground_offset; //0.5;
256        scene.add(gridXZ);
257        // scene.add( grid );
258    }
259    
260    //}
261    
262    
263    // light
264
265    if (1) {
266
267        //var dirLight = new THREE.DirectionalLight( 0xffffff);
268        var dirLight = new THREE.DirectionalLight( light_color, light_intensity );
269        // dirLight.position.set( 200, 200, 1000 ).normalize();
270        dirLight.position.set( lx, ly, lz ).normalize();
271    
272        camera.add( dirLight );
273        camera.add( dirLight.target );
274    }
275    // var light = new THREE.AmbientLight( 0x404040 ); //  0x9D9D9D ); // soft white light
276    var light = new THREE.AmbientLight( amb_light_color, amb_light_intensity ); //  light
277    scene.add( light );
278    
279    if (0) {
280        light = new THREE.HemisphereLight( 0xffffff, 0x444444 );
281        light.position.set( 0, 200, 0 );
282        scene.add( light );
283
284        light = new THREE.DirectionalLight( 0xffffff );
285        light.position.set( 0, 200, 100 );
286        light.castShadow = true;
287        light.shadow.camera.top = 180;
288        light.shadow.camera.bottom = - 100;
289        light.shadow.camera.left = - 120;
290        light.shadow.camera.right = 120;
291        scene.add( light );
292    }
293    
294    if (0) {
295        //spotLight
296        spotLight = new THREE.SpotLight( 0xffffff, 1 );
297        spotLight.position.set( 400, 400, 1000 );
298        spotLight.angle = Math.PI / 4;
299        spotLight.penumbra = 0.05;
300        spotLight.decay = 2;
301        spotLight.distance = 200;
302        spotLight.castShadow = true;
303        spotLight.shadow.mapSize.width = 1024;
304        spotLight.shadow.mapSize.height = 1024;
305        spotLight.shadow.camera.near = 10;
306        spotLight.shadow.camera.far = 200;
307        scene.add( spotLight );
308    }
309                
310    //Load background texture
311    if (back_image_url.length > 0) {
312        new THREE.TextureLoader()
313            .load(back_image_url , function(texture)
314                {
315                scene.background = texture;  
316                });
317    }
318    // model
319    modelName = model.substring(0,model.lastIndexOf("."))
320    modelType = model.substring(model.lastIndexOf("."))
321    // console.log(modelName);
322    // console.log(modelType);
323    if (modelType == '.obj') { 
324        objName = modelName+'.obj'
325        mtlName = modelName+'.mtl'
326        // console.log(objName);
327        // console.log(mtlName);
328    }
329    else if (modelType == '.fbx') {
330        objName = modelName+'.fbx'
331        // console.log(objName);
332    }
333    else if (modelType == '.dae') {
334        objName = modelName+'.dae'
335        // console.log(objName);
336    }
337    else if (modelType == '.stl') {
338        objName = modelName+'.stl'
339        // console.log(objName);
340    }
341    else if (modelType == '.wrl') {
342        objName = modelName+'.wrl'
343        // console.log(objName);
344    }
345    // else if (modelType == '.zip') {
346    // } // end zip
347    
348    
349    var onProgress = function ( xhr ) {
350        if ( xhr.lengthComputable ) {
351            var percentComplete = xhr.loaded / xhr.total * 100;
352            // console.log( Math.round( percentComplete, 2 ) + '% downloaded' );
353        }
354    };
355    
356    var onError = function () { };
357    //if (modelType != '.wrl') {
358        THREE.Loader.Handlers.add( /\.dds$/i, new THREE.DDSLoader() );
359    //}
360
361    if (modelType == '.obj') {
362        // model
363        new THREE.MTLLoader()
364            //.setPath( 'assets/ruuvitag/' )
365            //.load( 'ruuvipurple2.mtl', function ( materials ) {
366            .load( mtlName, function ( materials ) {
367                materials.preload();
368                // background image
369                
370                new THREE.OBJLoader()
371                    .setMaterials( materials )
372                    //.setPath( 'assets/ruuvitag/' )
373                    //.load( 'ruuvipurple2.obj', function ( object ) {
374                    .load( objName, function ( object ) {
375                        // object.position.y = - 05;
376                        object.rotation.set( degToRad(rx), degToRad(ry), degToRad(rz) );
377                        scene.add( object );
378                        //fitCameraToObject ( camera, object, 1.15, controls );
379                        // object.position.set( px, py, pz );
380                        fitCameraToObject ( camera, object, ioffset, controls );
381                        //showhide("spinner");
382                        //hide("spinner");
383                        //hide('$canvas_nameSpin')
384                        
385                        setTimeout(function() { 
386                            //jQuery('.imgpreloader').fadeIn('slow'); // hide();
387                            jQuery('.imgpreloader').fadeOut('slow'); // hide();
388                            if (autostart == true) {
389                                rotate=true;
390                            }
391                        }, 100);  //ms
392                    }, onProgress, onError );
393            } );
394    }
395    else if (modelType== '.fbx') {
396        // model
397        // var mixer;
398        var loader = new THREE.FBXLoader();
399        //loader.load( 'https://threejs.org/examples/models/fbx/Samba Dancing.fbx', function ( object ) {
400        loader.load( objName, function ( object ) {
401            mixer = new THREE.AnimationMixer( object );
402            if (object.animations.length > 0) {
403                var action = mixer.clipAction( object.animations[ 0 ] );
404                action.play();
405            }
406            object.traverse( function ( child ) {
407                if ( child.isMesh ) {
408                    child.castShadow = true;
409                    child.receiveShadow = true;
410                }
411            } );
412            object.rotation.set( degToRad(rx), degToRad(ry), degToRad(rz) );
413            scene.add( object );
414            fitCameraToObject ( camera, object, ioffset, controls );
415            setTimeout(function() { 
416                    //jQuery('.imgpreloader').fadeIn('slow'); // hide();
417                    jQuery('.imgpreloader').fadeOut('slow'); // hide();
418                    if (autostart == true) {
419                        rotate=true;
420                    }
421                }, 100);  //ms
422            }, onProgress, onError );
423    }
424    // else if (modelType == '.dae') {
425    //     
426    //     // var loadingManager = new THREE.LoadingManager( function () {
427    //     //     scene.add( dae_obj );
428    //     // } );
429    // 
430    //     // collada
431    //     // var loader = new THREE.ColladaLoader();
432    //     // loader.load( 'https://github.com/mrdoob/three.js/raw/master/examples/models/collada/elf/elf.dae', function ( object ) {
433    //     //     //dae_obj = object.scene;
434    //     //     scene.add( object );
435    //     // } );
436    //     //scene.add( dae_obj );
437    //     
438    //     // // loading manager
439    //     // var loadingManager = new THREE.LoadingManager( function () {
440    //  //  scene.add( dae_obj );
441    //  // } );
442    //     // // collada
443    //     // var loader = new THREE.ColladaLoader( loadingManager );
444    //     // loader.load( objName, function ( collada ) {
445    //     //     dae_obj = collada.scene;
446    //     // } );
447    //     
448    // }
449    //
450    if (modelType == '.stl') {
451        // console.log('it doesn\'t work with CORS');
452        // ASCII file
453        var loader = new THREE.STLLoader();
454        loader.load( objName, function ( geometry ) {
455            var material = new THREE.MeshPhongMaterial( { color: mesh_color, specular: 0x111111, shininess: 200 } );
456            var mesh = new THREE.Mesh( geometry, material );
457        
458            // mesh.position.set( 0, - 0.25, 0.6 );
459            // mesh.rotation.set( 0, - Math.PI / 2, 0 );
460            // mesh.scale.set( .3,.3,.3); //0.5, 0.5, 0.5 );
461        
462            mesh.castShadow = true;
463            mesh.receiveShadow = true;
464            object = mesh;
465            
466            object.rotation.set( degToRad(rx), degToRad(ry), degToRad(rz) );
467            scene.add( object );
468            fitCameraToObject ( camera, object, ioffset, controls );
469            // object.scale.set( scx,scy,scz); //0.5, 0.5, 0.5 );
470        
471            setTimeout(function() { 
472                    //jQuery('.imgpreloader').fadeIn('slow'); // hide();
473                    jQuery('.imgpreloader').fadeOut('slow'); // hide();
474                    if (autostart == true) {
475                        rotate=true;
476                    }
477                }, 100);  //ms
478            }, onProgress, onError );
479        //} );
480        
481        
482        // // Binary files
483        // 
484        // var material = new THREE.MeshPhongMaterial( { color: 0xAAAAAA, specular: 0x111111, shininess: 200 } );
485        // 
486        // loader.load( './models/stl/binary/pr2_head_pan.stl', function ( geometry ) {
487        // 
488        //     var mesh = new THREE.Mesh( geometry, material );
489        // 
490        //     mesh.position.set( 0, - 0.37, - 0.6 );
491        //     mesh.rotation.set( - Math.PI / 2, 0, 0 );
492        //     mesh.scale.set( 2, 2, 2 );
493        // 
494        //     mesh.castShadow = true;
495        //     mesh.receiveShadow = true;
496        // 
497        //     scene.add( mesh );
498        // 
499        // } );
500        // 
501        // loader.load( './models/stl/binary/pr2_head_tilt.stl', function ( geometry ) {
502        // 
503        //     var mesh = new THREE.Mesh( geometry, material );
504        // 
505        //     mesh.position.set( 0.136, - 0.37, - 0.6 );
506        //     mesh.rotation.set( - Math.PI / 2, 0.3, 0 );
507        //     mesh.scale.set( 2, 2, 2 );
508        // 
509        //     mesh.castShadow = true;
510        //     mesh.receiveShadow = true;
511        // 
512        //     scene.add( mesh );
513        // 
514        // } );
515        // 
516        // // Colored binary STL
517        // loader.load( './models/stl/binary/colored.stl', function ( geometry ) {
518        // 
519        //     var meshMaterial = material;
520        //     if ( geometry.hasColors ) {
521        // 
522        //         meshMaterial = new THREE.MeshPhongMaterial( { opacity: geometry.alpha, vertexColors: THREE.VertexColors } );
523        // 
524        //     }
525        // 
526        //     var mesh = new THREE.Mesh( geometry, meshMaterial );
527        // 
528        //     mesh.position.set( 0.5, 0.2, 0 );
529        //     mesh.rotation.set( - Math.PI / 2, Math.PI / 2, 0 );
530        //     mesh.scale.set( 0.3, 0.3, 0.3 );
531        // 
532        //     mesh.castShadow = true;
533        //     mesh.receiveShadow = true;
534        // 
535        //     scene.add( mesh );
536        // 
537        // } );
538    }
539    else if (modelType == '.wrl') {
540        
541        var loader = new THREE.VRMLLoader();
542        // loader.load( 'assets/house.wrl', function ( object ) {
543        
544        // loader.load( objName, function ( object ) {
545        //         //loader.load( 'assets/oshwi.wrl', function ( object ) {
546        //             scene.add( object );
547        //             //fitCameraToObject ( camera, object, 1.35, controls );
548        //             console.log('Done!');
549        // 
550        //         } );
551        // console.log('wrl loading1',objName);
552        loader.load( objName, function ( object ) {
553        //loader.load( 'assets/oshwi.wrl', function ( object ) {
554            object.rotation.set( degToRad(rx), degToRad(ry), degToRad(rz) );
555            scene.add( object );
556            fitCameraToObject ( camera, object, ioffset, controls );
557            //showhide("spinner");
558            //hide("spinner");
559            //hide('$canvas_nameSpin')
560            setTimeout(function() { 
561                //jQuery('.imgpreloader').fadeIn('slow'); // hide();
562                jQuery('.imgpreloader').fadeOut('slow'); // hide();
563                if (autostart == true) {
564                    rotate=true;
565                }
566            }, 100);  //ms
567        //} );
568        }, onProgress, onError );
569    }
570    // renderer
571
572    renderer = new THREE.WebGLRenderer({ antialias: true });
573    renderer.setPixelRatio( window.devicePixelRatio );
574    // renderer.setSize( window.innerWidth, window.innerHeight );
575    
576    // //container = document.createElement( 'div' );
577    // //document.body.appendChild( container );
578    // //container.appendChild( renderer.domElement );
579    //container = document.createElement('div');
580    // //container.setAttribute("id", $canvas_nameM);
581    //container.appendChild( renderer.domElement );
582    // console.log( cname +' cname' );
583    document.getElementById(cname).appendChild( renderer.domElement );
584    controls = new THREE.OrbitControls( camera , renderer.domElement );
585    divS = document.getElementById(cname);
586    //renderer.setSize( divS.innerWidth, divS.innerHeight );
587    // console.log( divS.clientWidth +' w '+ divS.clientWidth/ar +' h ' + ar + ' ar');
588    //renderer.setPixelRatio( divS.devicePixelRatio );
589    renderer.setSize( divS.clientWidth, divS.clientWidth/ar);
590    //jQuery('$canvas_name').append(container);
591    // stats = new Stats();
592    // container.appendChild( stats.dom );
593
594    //
595
596    window.addEventListener( 'resize', onWindowResize, false );
597    //showhide("spinner");
598}
599
600function onWindowResize() {
601
602    //jQuery(document).ready(function($) {
603        // camera.aspect = window.innerWidth / window.innerHeight;
604        // camera.updateProjectionMatrix();
605        //jQuery('head').append('<meta name=\'viewport\' content=\'width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0\'/>');
606        divS = document.getElementById(cname);
607        //renderer.setSize( divS.innerWidth, divS.innerHeight );
608        // console.log( divS.clientWidth +' w '+ divS.clientWidth/ar +' h ' + ar + ' ar');
609        // camera.aspect = divS.clientWidth / divS.clientHeight;
610        // console.log( divS.clientWidth + ':w '+ ar +':ar');
611        camera.aspect = divS.clientWidth / (divS.clientWidth / ar) ;
612        camera.updateProjectionMatrix();
613        renderer.setSize( divS.clientWidth-0.5, divS.clientWidth/ar);
614    //});
615}
616
617function animate() {
618
619    // for ( var i = 0; i < views.length; ++ i ) {
620    //              views[ i ].render();
621    //          }
622    requestAnimationFrame( animate );
623    //rotate = true;
624    if (rotate) {
625        var timer=Date.now() * 0.0005 * speed;
626        //var timer=Date.now() * 0.00005;
627        r=cameraZ*offs*1.0;
628        //r=camera.position.z // *offs;
629        camera.position.x=r*Math.cos(timer);
630        camera.position.z=r*Math.sin(timer);
631        camera.lookAt(scene.position);
632        if (debug) {
633            console.log( timer + '% t' );
634            console.log( camera.position.x + '% x' );
635            console.log( camera.position.z + '% z' );
636        }
637    }
638    else {
639        r=camera.position.z // *offs;
640        //console.log( r + '% r' );
641    }
642    var delta = clock.getDelta();
643    if ( mixer ) mixer.update( delta );
644    
645    renderer.render( scene, camera );
646    // stats.update();
647}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.