Capítulo 608 de 859

Chapter 608: TileCreasedNormalsPlugin

Core Idea

A plugin for 3d-tiles-renderer that computes creased vertex normals for the geometry of each loaded tile: smooth normals everywhere except where faces meet at an angle greater than the crease angle. Useful for photogrammetry tile sets like Google Photorealistic 3D Tiles which come without vertex normals.

The normals are computed in a Web Worker so tile processing doesn't block the main thread. Tiles are displayed once their normals are ready.

Key Concepts

  • creaseAngle : number: The crease angle in radians.

Code Examples

tiles.registerPlugin( new TileCreasedNormalsPlugin( { creaseAngle: Math.PI / 6 } ) );
  • What it demonstrates: Typical usage of TileCreasedNormalsPlugin.

Reference Tables

Constructor

Signature
new TileCreasedNormalsPlugin( options : Object )

Properties

PropertyDescription
.creaseAngle : numberThe crease angle in radians.

Methods

MethodDescription
.dispose()Called by the tiles renderer when the plugin is unregistered or the tiles renderer is disposed.
.processTileModel( scene : Object3D ) : PromiseCalled by the tiles renderer for each loaded tile model. The tile is displayed once the returned promise resolves.

Key Takeaways

  1. Most relevant properties: creaseAngle.
  2. Key methods: dispose, processTileModel.

Connects To