Skip to content

Commit

Permalink
fixup docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemckinstry committed Jan 21, 2025
1 parent 2b38dbb commit f589fb0
Showing 1 changed file with 9 additions and 27 deletions.
36 changes: 9 additions & 27 deletions packages/engine/Source/Scene/VoxelPrimitive.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ function VoxelPrimitive(options) {
* @default new Event()
*
* @example
* voxelPrimitive.tileLoad.addEventListener(function(tile) {
* voxelPrimitive.tileLoad.addEventListener(function() {
* console.log('A tile was loaded.');
* });
*/
Expand All @@ -487,7 +487,7 @@ function VoxelPrimitive(options) {
* @default new Event()
*
* @example
* tileset.tileVisible.addEventListener(function() {
* voxelPrimitive.tileVisible.addEventListener(function() {
* console.log('A tile is visible.');
* });
*
Expand All @@ -499,51 +499,33 @@ function VoxelPrimitive(options) {
* <p>
* If there are no event listeners, error messages will be logged to the console.
* </p>
* <p>
* The error object passed to the listener contains two properties:
* <ul>
* <li><code>url</code>: the url of the failed tile.</li>
* <li><code>message</code>: the error message.</li>
* </ul>
* <p>
* If multiple contents are present, this event is raised once per inner content with errors.
* </p>
*
* @type {Event}
* @default new Event()
*
* @example
* tileset.tileFailed.addEventListener(function(error) {
* console.log(`An error occurred loading tile: ${error.url}`);
* console.log(`Error: ${error.message}`);
* voxelPrimitive.tileFailed.addEventListener(function() {
* console.log('An error occurred loading tile.');
* });
*/
this.tileFailed = new Event();

/**
* The event fired to indicate that a tile's content was unloaded.
* <p>
* The unloaded {@link Cesium3DTile} is passed to the event listener.
* </p>
* <p>
* This event is fired immediately before the tile's content is unloaded while the frame is being
* rendered so that the event listener has access to the tile's content. Do not create
* or modify Cesium entities or primitives during the event listener.
* </p>
*
* @type {Event}
* @default new Event()
*
* @example
* primitive.tileUnload.addEventListener(function(tile) {
* voxelPrimitive.tileUnload.addEventListener(function() {
* console.log('A tile was unloaded from the cache.');
* });
*
*/
this.tileUnload = new Event();

/**
* The event fired to indicate progress of loading new tiles. This event is fired when a new tile
* The event fired to indicate progress of loading new tiles. This event is fired when a new tile
* is requested, when a requested tile is finished downloading, and when a downloaded tile has been
* processed and is ready to render.
* <p>
Expand All @@ -558,7 +540,7 @@ function VoxelPrimitive(options) {
* @default new Event()
*
* @example
* tileset.loadProgress.addEventListener(function(numberOfPendingRequests, numberOfTilesProcessing) {
* voxelPrimitive.loadProgress.addEventListener(function(numberOfPendingRequests, numberOfTilesProcessing) {
* if ((numberOfPendingRequests === 0) && (numberOfTilesProcessing === 0)) {
* console.log('Stopped loading');
* return;
Expand All @@ -580,7 +562,7 @@ function VoxelPrimitive(options) {
* @default new Event()
*
* @example
* tileset.allTilesLoaded.addEventListener(function() {
* voxelPrimitive.allTilesLoaded.addEventListener(function() {
* console.log('All tiles are loaded');
* });
*/
Expand All @@ -597,7 +579,7 @@ function VoxelPrimitive(options) {
* @default new Event()
*
* @example
* tileset.initialTilesLoaded.addEventListener(function() {
* voxelPrimitive.initialTilesLoaded.addEventListener(function() {
* console.log('Initial tiles are loaded');
* });
*
Expand Down

0 comments on commit f589fb0

Please sign in to comment.