OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1424 } | 1424 } |
1425 } | 1425 } |
1426 | 1426 |
1427 g_proxyPack = g_client.createPack(); | 1427 g_proxyPack = g_client.createPack(); |
1428 g_proxyRoot = g_proxyPack.createObject('Transform'); | 1428 g_proxyRoot = g_proxyPack.createObject('Transform'); |
1429 g_proxyRoot.parent = g_baseRoot; | 1429 g_proxyRoot.parent = g_baseRoot; |
1430 | 1430 |
1431 try { | 1431 try { |
1432 var url = o3djs.util.getAbsoluteURI('assets/beach-low-poly.o3dtgz'); | 1432 var url = o3djs.util.getAbsoluteURI('assets/beach-low-poly.o3dtgz'); |
1433 g_loadInfo = o3djs.scene.loadScene(g_client, g_proxyPack, g_proxyRoot, | 1433 g_loadInfo = o3djs.scene.loadScene(g_client, g_proxyPack, g_proxyRoot, |
1434 url, callback, {opt_async: true}); | 1434 url, callback, {opt_async: false}); |
1435 } catch (e) { | 1435 } catch (e) { |
1436 showError(e); | 1436 showError(e); |
1437 } | 1437 } |
1438 } | 1438 } |
1439 | 1439 |
1440 /** | 1440 /** |
1441 * Loads the main scene. | 1441 * Loads the main scene. |
1442 */ | 1442 */ |
1443 function loadMainScene() { | 1443 function loadMainScene() { |
1444 function callback(pack, parent, exception) { | 1444 function callback(pack, parent, exception) { |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1563 }); | 1563 }); |
1564 g_particleLoader.loadTexture( | 1564 g_particleLoader.loadTexture( |
1565 g_mainPack, | 1565 g_mainPack, |
1566 o3djs.util.getAbsoluteURI('assets/pe_mist.png'), | 1566 o3djs.util.getAbsoluteURI('assets/pe_mist.png'), |
1567 function(texture, success) { | 1567 function(texture, success) { |
1568 g_mistTexture = texture; | 1568 g_mistTexture = texture; |
1569 }); | 1569 }); |
1570 | 1570 |
1571 var url = o3djs.util.getAbsoluteURI('assets/beachdemo.o3dtgz'); | 1571 var url = o3djs.util.getAbsoluteURI('assets/beachdemo.o3dtgz'); |
1572 g_particleLoader.loadScene( | 1572 g_particleLoader.loadScene( |
1573 g_client, g_scenePack, g_sceneRoot, url, callback, {opt_async: true}); | 1573 g_client, g_scenePack, g_sceneRoot, url, callback, {opt_async: false}); |
1574 g_particleLoader.finish() | 1574 g_particleLoader.finish() |
1575 g_loader.finish(); | 1575 g_loader.finish(); |
1576 } catch (e) { | 1576 } catch (e) { |
1577 showError(e); | 1577 showError(e); |
1578 } | 1578 } |
1579 } | 1579 } |
1580 | 1580 |
1581 /** | 1581 /** |
1582 * Records the client's size if it's changed. | 1582 * Records the client's size if it's changed. |
1583 */ | 1583 */ |
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2726 | 2726 |
2727 /** | 2727 /** |
2728 * Removes any callbacks so they don't get called after the page has unloaded. | 2728 * Removes any callbacks so they don't get called after the page has unloaded. |
2729 */ | 2729 */ |
2730 function uninit() { | 2730 function uninit() { |
2731 if (g_client) { | 2731 if (g_client) { |
2732 g_client.cleanup(); | 2732 g_client.cleanup(); |
2733 } | 2733 } |
2734 } | 2734 } |
2735 | 2735 |
OLD | NEW |