Class/Object

cesium

Model

Related Docs: object Model | package cesium

Permalink

class Model extends Object

A 3D model based on glTF, the runtime asset format for WebGL, OpenGL ES, and OpenGL.

Cesium includes support for geometry and materials, glTF animations, and glTF skinning. In addition, individual glTF nodes are pickable with Scene#pick and animatable with Model#getNode glTF cameras and lights are not currently supported.

An external glTF asset is created with Model glTF JSON can also be created at runtime and passed to this constructor function. In either case, the Model#readyPromise is resolved when the model is ready to render, i.e., when the external binary, image, and shader files are downloaded and the WebGL resources are created.

For high-precision rendering, Cesium supports the CESIUM_RTC extension, which introduces the CESIUM_RTC_MODELVIEW parameter semantic that says the node is in WGS84 coordinates translated relative to a local origin.

alias Model

- The options object takes the following properties - {Object|ArrayBuffer|Uint8Array} [options.gltf] The object for the glTF JSON or an arraybuffer of Binary glTF defined by the KHR_binary_glTF extension. - {String} [options.basePath= ] The base path that paths in the glTF JSON are relative to. - {Boolean} [options.show=true] Determines if the model primitive will be shown. - {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The 4x4 transformation matrix that transforms the model from model to world coordinates. - {Number} [options.scale=1.0] A uniform scale applied to this model. - {Number} [options.minimumPixelSize=0.0] The approximate minimum pixel size of the model regardless of zoom. - {Number} [options.maximumScale] The maximum scale size of a model. An upper limit for minimumPixelSize. - {Object} [options.id] A user-defined object to return when the model is picked with Scene#pick - {Boolean} [options.allowPicking=true] When true, each glTF mesh and primitive is pickable with Scene#pick - {Boolean} [options.incrementallyLoadTextures=true] Determine if textures may continue to stream in after the model is loaded. - {Boolean} [options.asynchronous=true] Determines if model WebGL resource creation will be spread out over several frames or block until completion once all glTF files are loaded. - {Boolean} [options.debugShowBoundingVolume=false] For debugging only. Draws the bounding sphere for each draw command in the model. - {Boolean} [options.debugWireframe=false] For debugging only. Draws the model in wireframe.

exception {DeveloperError} bgltf is not a valid Binary glTF file. exception {DeveloperError} Only glTF Binary version 1 is supported.

Annotations
@RawJSType() @native() @JSName( "Cesium.Model" )
See also

Model.fromGltf demo Sandcastle Models Demo

Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Model
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Model(options: ModelOptions)

    Permalink
  2. new Model()

    Permalink
    Attributes
    protected

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. var activeAnimations: ModelAnimationCollection

    Permalink
  5. var allowPicking: Boolean

    Permalink
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. var asynchronous: Boolean

    Permalink
  8. var basePath: String

    Permalink
  9. var boundingSphere: BoundingSphere

    Permalink
  10. var castShadows: Boolean

    Permalink
  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. var color: Color

    Permalink
  13. var colorBlendAmount: Double

    Permalink
  14. var colorBlendMode: ColorBlendMode

    Permalink
  15. var debugShowBoundingVolume: Boolean

    Permalink
  16. var debugWireframe: Boolean

    Permalink
  17. def destroy(): Unit

    Permalink
  18. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  20. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  22. def getMaterial(name: String): ModelMaterial

    Permalink
  23. def getMesh(name: String): ModelMesh

    Permalink
  24. def getNode(name: String): ModelNode

    Permalink
  25. var gltf: Any

    Permalink
  26. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  27. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  28. var heightReference: HeightReference

    Permalink
  29. var id: Any

    Permalink
  30. var incrementallyLoadTextures: Boolean

    Permalink
  31. def isDestroyed(): Boolean

    Permalink
  32. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  33. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  34. var maximumScale: Double

    Permalink
  35. var minimumPixelSize: Double

    Permalink
  36. var modelMatrix: Matrix4

    Permalink
  37. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  38. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  39. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  40. var pendingTextureLoads: Double

    Permalink
  41. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  42. var ready: Boolean

    Permalink
  43. var readyPromise: Promise[Model]

    Permalink
  44. var scale: Double

    Permalink
  45. var show: Boolean

    Permalink
  46. var silhouetteColor: Color

    Permalink
  47. var silhouetteSize: Double

    Permalink
  48. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  49. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  50. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  51. def update(): Dynamic

    Permalink
  52. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  53. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  55. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped