Skip to content

MapScene

Caven Chen edited this page Dec 9, 2024 · 3 revisions

constructor(map,[options])

  • params
    • {Map} map : map instance
    • {Object} options : config
// config
{
    scene: null, //THREE.Scene,if not passed in, the default scene will be used
    camera:null, //THREE.Camera, if not passed in, the default camera will be used
    renderer: null, //THREE.WebGLRenderer if not passed in, the default renderer will be used
    preserveDrawingBuffer: false,
    renderLoop: (ins) =>{} //Frame animation rendering function, if not passed in, the default function will be used,the params is an instance for MapScene
}

properties

  • {Map} map readonly
  • {HtmlElement} canvas readonly
  • {THREE.Scene} scene readonly
  • {THREE.Camera} camera readonly
  • {THREE.WebGLRenderer} renderer readonly
  • {THREE.Group} world readonly 3D object container, all created 3D objects except lights need to be added to this container to ensure correct rendering
Clone this wiki locally