bitbybit.dev v1.0.0-rc.1
    Preparing search index...
    Index

    Constructors

    • Parameters

      • OptionalcanvasId: string
      • OptionalsceneSize: number
      • OptionalbackgroundColor: string
      • OptionalenableShadows: boolean
      • OptionalenableGround: boolean
      • OptionalgroundCenter: Point3
      • OptionalgroundScaleFactor: number
      • OptionalgroundColor: string
      • OptionalgroundOpacity: number
      • OptionalhemisphereLightSkyColor: string
      • OptionalhemisphereLightGroundColor: string
      • OptionalhemisphereLightIntensity: number
      • OptionaldirectionalLightColor: string
      • OptionaldirectionalLightIntensity: number
      • OptionalshadowMapSize: number

      Returns InitBabylonJSDto

    Properties

    canvasId?: string

    The ID of the canvas element to render to. If not provided, a new canvas will be created and appended to document.body.

    undefined
    
    sceneSize: number

    The size of the scene in world units. This determines ground size, light positions, and shadow bounds.

    20
    

    1

    Infinity

    10

    backgroundColor: string

    Background color of the scene in hex format.

    "#1a1c1f"
    
    enableShadows: boolean

    Enable shadow mapping for realistic shadows.

    true
    
    enableGround: boolean

    Enable the ground plane.

    true
    
    groundCenter: Point3

    Center position of the ground plane [x, y, z].

    [0, 0, 0]
    
    groundScaleFactor: number

    Scale factor for the ground size relative to scene size. Values greater than 1 make the ground larger than the scene size.

    2
    

    0.5

    10

    0.5

    groundColor: string

    Color of the ground plane in hex format.

    "#333333"
    
    groundOpacity: number

    Opacity of the ground plane (0 = fully transparent, 1 = fully opaque).

    1
    

    0

    1

    0.1

    hemisphereLightSkyColor: string

    Sky color for the hemisphere light (illumination from above).

    "#ffffff"
    
    hemisphereLightGroundColor: string

    Ground color for the hemisphere light (illumination from below).

    "#444444"
    
    hemisphereLightIntensity: number

    Intensity of the hemisphere light.

    1
    

    0

    10

    0.1

    directionalLightColor: string

    Color of the directional light (sun light).

    "#ffffff"
    
    directionalLightIntensity: number

    Intensity of the directional light.

    1.5
    

    0

    10

    0.1

    shadowMapSize: number

    Size of the shadow map in pixels (higher = sharper shadows but more GPU intensive).

    2048
    

    256

    8192

    256

    enableArcRotateCamera: boolean

    Enable automatic creation of an arc rotate camera.

    true
    
    arcRotateCameraOptions?: ArcRotateCameraDto

    Options for the arc rotate camera. Only used if enableArcRotateCamera is true. If not provided, scene-aware defaults will be computed based on sceneSize. Uses the same DTO as the standalone arc rotate camera creation.

    true