OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010, Google Inc. | 2 * Copyright 2010, 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 * itself will be released from the client. See documentation on | 66 * itself will be released from the client. See documentation on |
67 * pack.removeObject for why this is important. | 67 * pack.removeObject for why this is important. |
68 * | 68 * |
69 * It's important to note that many objects are only referenced by the pack. | 69 * It's important to note that many objects are only referenced by the pack. |
70 * Textures, Effects, Materials, for example. That means the moment you call | 70 * Textures, Effects, Materials, for example. That means the moment you call |
71 * pack.destroy() those objects will be freed. If the client then tries to | 71 * pack.destroy() those objects will be freed. If the client then tries to |
72 * render and some objects are missing you'll immediately get an error. | 72 * render and some objects are missing you'll immediately get an error. |
73 */ | 73 */ |
74 o3d.Pack.prototype.destroy = function() { | 74 o3d.Pack.prototype.destroy = function() { |
75 this.objects_ = []; | 75 this.objects_ = []; |
76 this.client.removePack(this); | 76 this.client.destroyPack(this); |
77 }; | 77 }; |
78 | 78 |
79 | 79 |
80 | 80 |
81 /** | 81 /** |
82 * Removes a pack's reference to an object. Any object created from | 82 * Removes a pack's reference to an object. Any object created from |
83 * pack.create___ function can be removed. This releases the pack's reference | 83 * pack.create___ function can be removed. This releases the pack's reference |
84 * to that object so if nothing else is referencing that object it will be | 84 * to that object so if nothing else is referencing that object it will be |
85 * deleted. | 85 * deleted. |
86 * | 86 * |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 /** | 394 /** |
395 * Create RawData given a data URL. | 395 * Create RawData given a data URL. |
396 * @param {string} data_url The data URL from which to create the RawData. | 396 * @param {string} data_url The data URL from which to create the RawData. |
397 * @return {!o3d.RawData} The RawData. | 397 * @return {!o3d.RawData} The RawData. |
398 */ | 398 */ |
399 o3d.Pack.prototype.createRawDataFromDataURL = | 399 o3d.Pack.prototype.createRawDataFromDataURL = |
400 function(data_url) { | 400 function(data_url) { |
401 o3d.notImplemented(); | 401 o3d.notImplemented(); |
402 }; | 402 }; |
403 | 403 |
OLD | NEW |