Class Html

It can help you merge HTML elements into the WebGL world by converting 3D positions to 2D positions. If element is visible, it will have a visible CSS class (can be customized), and for 2D position it will have 3 CSS variables --x, --y and --z-index (can be customized too)

Demo: https://codesandbox.io/s/kokomi-js-html-w0qfmr?file=/src/components/sphereWordCloud.ts

Hierarchy (view full)

Constructors

Properties

base: Base
container: Scene
distanceFactor: number
el: HTMLElement
emitter: Emitter<any>
group: Object3D<Object3DEventMap>
occlude: Object3D<Object3DEventMap>[]
parentGroup: null | Object3D<Object3DEventMap>
perspectiveName: string
position: Vector3
raycaster: Raycaster
scalePropertyName: string
transform: boolean
transformInnerName: string
transformOuterName: string
viewportHeightName: string
viewportWidthName: string
visibleClassName: string
visibleToggle: boolean
xPropertyName: string
yPropertyName: string
zIndexPropertyName: string

Accessors

  • get viewportSize(): {
        height: number;
        width: number;
    }
  • Returns {
        height: number;
        width: number;
    }

    • height: number
    • width: number

Methods

  • Parameters

    • __namedParameters: {
          x: undefined | number;
          y: undefined | number;
      }
      • x: undefined | number
      • y: undefined | number

    Returns void