FatLineSegments

This class is used to draw lines which has same width between each vertexes of Geometry on the surfaces. <br />

Core Class

This class is used to draw lines which has same width between each vertexes of Geometry on the surfaces.

Hierarchy

Constructors

Properties

DefaultUp: Vector3

Every objects in 3D space must have a default up direction.

id: number

Unique number for each object3D instance.

scene: Nullable<Scene3D>

The scene which this object belong to.

updateDirtyId: number

The number is the frame id which this object is changed or participates change of scene graph. If this value equals to frame id - 1,

name: string

The name of this object, it is empty if useless.

isObject3D: boolean

Used to check type of this or extended instance. This value should not be changed by user.

parent: Nullable<Object3D>

Object's parent node in the scene graph. An object can have at most one parent.

children: Object3D[]

Array with object's children.

See Group| Group for information on manually grouping objects.

This is used by the lookAt method, for example, to determine the orientation of the result. Default is DefaultUp .

worldMatrixUpdateTimestamp: number

Record when this object's world matrix last updated.

transformChanged: boolean

Record whether the object's any attribute| attribute is updated.

visibleChanged: boolean
matrixWorld: Matrix4

The global transform of the object. If the Object3D has no parent, then it's identical to the local transform matrix.

matrixWorldNeedsUpdate: boolean

When this is set, it calculates the matrixWorld in that frame and resets this property to false.

netVisibility: boolean

Record if the object is really visible in rendering process. If the Object3D has no parent, it would be set by visible ;

localMatrixNeedUpdate: boolean

When this is set, it calculates the model matrix in that frame and resets this property to false.

renderOrder: number

This value allows the default rendering order of scene graph objects to be overridden although opaque and transparent objects remain sorted independently. When this property is set for an instance of Group| Group, all descendants objects will be sorted and rendered together. Sorting is from lowest to highest renderOrder.

drawMode: DrawMode

This is a decisive attribute for drawing method.

overlayLayers: number
castShadow: boolean

Mark this drawable can cast shadow

castPlanarShadow: boolean

Mark this drawable can cast shadow

isDrawable: boolean

Used to check type of this or extended instance. This value should not be changed by user.

materialChanged: boolean

Mark the material reference changed.

geometryChanged: boolean

Mark the geometry reference changed.

frontFaceCW: boolean

Specify the winding orientation of mesh as counter-clock-wise, only meaningful on mesh.

modelViewMatrix: Matrix4

Store the Model-View matrix for this object. It is not suggested to change the matrix because it will be update automatically when camera move.

normalMatrix: Matrix3

This matrix is used to calculate the normal in eye-space.

worldBoundingDirty: boolean

Mark bounding need to be recalculated.

worldBoundingBox: Box3

Calculate the bounding as box.

worldBoundingSphere: Sphere

Calculate the bounding as sphere.

z: number

The distance from object to camera in the direction of camera. Use this value to simply estimate the depth in 3D scene.

onBeforeRender: Nullable<RenderHook>

This method allow user manually process data before the engine drawing object.

See RenderHook| RenderHook for more details.

viewIndependentScale: number

This is used to scale a drawable object by specified number when enableViewIndependentScale| enableViewIndependentScale is true.

categoryId: string

Reserved attribute

sourceType: string

Record the object rendered as instance or other type.

shouldUseGeometryGroupsWhenOnlyHasOneMaterial: boolean
UseFallBack: boolean

If require engine to draw this as Line instead of Mesh, set this to true.

isFatLineSegments: boolean

Check the type whether it belongs to FatLineSegments. This value should not be changed by user.

__isFatLineSegments: boolean
userData: Record<keyof any, any>
_uuid: any
uuid: string
_listeners: Map<Symbol, Listener<never>[]>

Accessors

  • get layers(): Layers

    Returns Layers

  • set layers(v: Layers): void

    Parameters

    Returns void

  • get interactionLayers(): Layers | undefined

    Returns Layers | undefined

  • set interactionLayers(v: Layers | undefined): void

    Parameters

    Returns void

  • get groupLayer(): Layers | undefined

    Returns Layers | undefined

  • set groupLayer(v: Layers | undefined): void

    Parameters

    Returns void

  • get position(): Vector3

    Returns Vector3

  • set position(_position: Vector3): void

    A vector representing the object's local position.

    Parameters

    Returns void

  • get rotation(): Euler

    Returns Euler

  • set rotation(rotation: Euler): void

    Object's local rotation, in radians.

    Parameters

    Returns void

  • get quaternion(): Quaternion

    Returns Quaternion

  • set quaternion(_quaternion: Quaternion): void

    Object's local rotation as a Quaternion.

    Parameters

    Returns void

    See Quaternion for more details.

  • get scale(): Vector3

    Returns Vector3

  • set scale(_scale: Vector3): void

    The object's local scale.

    Parameters

    Returns void

  • get matrix(): Matrix4

    The local transform matrix.

    Returns Matrix4

  • set matrix(value: Matrix4): void

    Parameters

    Returns void

  • get visible(): boolean

    Object gets rendered if true.

    Returns boolean

  • set visible(value: boolean): void

    Parameters

    • value: boolean

    Returns void

  • get outlineMode(): OutlineMode

    Mark this drawable should be rendered in outline style if you set outlinePipelineMode & outlineShadingMode, get this value maybe error

    Returns OutlineMode

  • set outlineMode(v: OutlineMode): void

    Parameters

    • v: OutlineMode

    Returns void

  • get outlineShadingMode(): OutlineShadingMode

    Returns OutlineShadingMode

  • set outlineShadingMode(value: OutlineShadingMode): void

    Parameters

    • value: OutlineShadingMode

    Returns void

  • get outlineRenderMode(): OutlineRenderMode

    Returns OutlineRenderMode

  • set outlineRenderMode(value: OutlineRenderMode): void

    OutlineRenderMode.Overlay is deprecated. use renderMode replaced

    Parameters

    • value: OutlineRenderMode

    Returns void

  • get isAlwaysDynamic(): boolean

    Returns boolean

  • set isAlwaysDynamic(v: boolean): void

    Parameters

    • v: boolean

    Returns void

  • get enableViewIndependentScale(): boolean

    Let this object can be scale independently.

    Returns boolean

  • set enableViewIndependentScale(v: boolean): void

    Parameters

    • v: boolean

    Returns void

  • get geometry(): G

    This attribute stores Geometry| Geometry or BufferGeometry| BufferGeometry (or derived classes), defining the object's shape.

    Returns G

  • set geometry(newGeo: G): void

    Parameters

    • newGeo: G

    Returns void

  • get renderGeometry(): BufferGeometryBase

    Get the geometry which is really rendered by gpu.

    Returns BufferGeometryBase

  • get renderMaterial(): Material[]

    Get the material which is really rendered by gpu.

    Returns Material[]

  • set __material(v: M[]): void

    Parameters

    • v: M[]

    Returns void

  • get businessTag(): string

    Returns string

  • set businessTag(v: string): void

    Parameters

    • v: string

    Returns void

Methods

  • Returns void

  • Returns void

  • Returns void

  • Scene will check the object's visibility in each render and make change netVisibility based on its and parent's visible .

    Returns boolean

  • If the local matrix is changed, use this method to manually refresh data in scene graph.

    Returns void

    It's better to use notifySceneChange() as an alternative.

  • Use this method to manually refresh data in scene graph and draw again. The engine may not notify every change of the scene. If any effect is not changed with the parameters, use this may solve.

    Returns void

  • If the local matrix or world matrix is changed, use this method to make engine refresh data in scene graph automatically. This method will set matrixWorldNeedsUpdate and localMatrixNeedUpdate to true.

    Returns void

  • If there are zero or two negative numbers in xyz, return false, otherwise return true.

    Returns boolean

  • Converts the vector from local space to world space.

    Parameters

    • vector: Vector3

      A vector represents a position in local (object) coordinate.

    Returns Vector3

  • Updates the vector from world space to local space.

    Parameters

    • vector: Vector3

      A vector in world coordinate.

    Returns Vector3

  • Applies the matrix transform to the object and updates the object's position, rotation and scale.

    Parameters

    • matrix: Matrix4

      A matrix represents the information of transform.

    Returns void

  • Applies the rotation represented by the quaternion to the object.

    Parameters

    • q: Quaternion

      A Quaternion represents the information of rotation.

    Returns this

  • Calls setFromAxisAngle ( axis, angle ) on the Quaternion.

    Parameters

    • axis: Vector3

      A normalized vector in object space.

    • angle: number

      Angle in radians.

    Returns void

  • Calls Quaternion.setRotationFromEuler| setRotationFromEuler(euler, true) on the Quaternion.

    Parameters

    • euler: Euler

      Euler angle specifying rotation amount.

    Returns void

  • Calls setFromRotationMatrix (m) on the Quaternion.

    Parameters

    • m: Matrix4

      Euler angle specifying rotation amount.

    Returns void

  • Copy the given quaternion to object's quaternion .

    Parameters

    • q: Quaternion

      Euler angle specifying rotation amount.

    Returns void

  • Rotate an object along an axis in object space. The axis is assumed to be normalized.

    Parameters

    • axis: Vector3

      A normalized vector in object space.

    • angle: number

      Angle in radians.

    Returns this

  • Rotate an object along an axis in world space. The axis is assumed to be normalized. Method Assumes no rotated parent.

    Parameters

    • axis: Vector3

      A normalized vector in object space.

    • angle: number

      Angle in radians.

    Returns this

  • Rotates the object around x axis in local space.

    Parameters

    • angle: number

      The angle to rotate in radians.

    Returns this

  • Rotates the object around x axis in local space.

    Parameters

    • angle: number

      The angle to rotate in radians.

    Returns this

  • Rotates the object around x axis in local space.

    Parameters

    • angle: number

      The angle to rotate in radians.

    Returns this

  • Translate an object by distance along an axis in object space. The axis is assumed to be normalized.

    Parameters

    • axis: Vector3

      A normalized vector in object space.

    • distance: number

      The distance to translate.

    Returns this

  • Translates object along x axis in object space by distance units.

    Parameters

    • distance: number

      The distance to translate.

    Returns this

  • Translates object along y axis in object space by distance units.

    Parameters

    • distance: number

      The distance to translate.

    Returns this

  • Translates object along z axis in object space by distance units.

    Parameters

    • distance: number

      The distance to translate.

    Returns this

  • Rotates the object to face to a point in world space. This method does not support objects having non-uniformly-scaled parent(s)

    Parameters

    • _x: Vector3

      A vector representing position of target in world space.

    Returns void

  • Rotates the object to face a point in local space.

    Parameters

    • _x: Vector3

      A vector representing position of target in local space.

    Returns void

  • Adds object as child of this object. An arbitrary number of objects may be added. Any current parent on an object passed in here will be removed, since an object can have at most one parent. The scene graph change will be immediately notify by engine after adding nodes.

    Parameters

    • o: Object3D | Object3D[]

      Parameter can be one object or objects array, all of them is added to this object.

    Returns this

  • Remove the specified object form children.

    Parameters

    • object: Object3D

      The object which needs to be removed.

    Returns this

  • Returns void

  • Remove all children of this object.

    Returns Object3D[]

  • Remove all children in specified objects from this objects. Migrate from tools common

    Parameters

    • objects: Object3D[]

      An array of objects which need to be removed.

    Returns this

  • Searches through an object and its children, starting with the object itself, and returns the first with a matching id. Note that ids are assigned in chronological order: 1, 2, 3, ..., incrementing by one for each new object.

    Parameters

    • id: number

      Unique number of the object instance.

    Returns Object3D

  • Searches through an object and its children, starting with the object itself, and returns the first with a matching name. Note that for most objects the name is an empty string by default. You will have to set it manually to make use of this method.

    Parameters

    • name: string

      String to match to the children's Object3D.name property.

    Returns Object3D

  • Searches through an object and its children, starting with the object itself, and returns the first with a property that matches the value given.

    Parameters

    • name: string

      The property name to search for.

    • value: any

      Value of the given property.

    Returns Object3D

  • Return a vector representing the position of the object in world space.

    Parameters

    • target: Vector3

      the result will be copied into this Vector3.

    Returns Vector3

  • Return a quaternion representing the rotation of the object in world space.

    Parameters

    • target: Quaternion

      the result will be copied into this Quaternion.

    Returns Quaternion

  • Return a vector of the scaling factors applied to the object for each axis in world space.

    Parameters

    • target: Vector3

      the result will be copied into this Vector3.

    Returns Vector3

  • Return a vector representing the direction of object's positive z-axis in world space.

    Parameters

    • target: Vector3

      the result will be copied into this Vector3.

    Returns Vector3

  • Execute the callback on this object and all descendants.

    Parameters

    • callback: (object: Object3D) => any

      A function with as first argument an object3D object.

    Returns void

  • Execute the callback when return is false, stop traverse the object's descendants.

    Parameters

    • callback: (object: Object3D) => boolean

      A function with as first argument an object3D object, return boolean.

    Returns void

  • Execute the callback on this object and all descendants which is visible.

    Parameters

    • callback: (object: Object3D) => any

      A function with as first argument an object3D object.

    Returns void

  • Execute the callback on this object and all ancestors.

    Parameters

    • callback: (object: Object3D) => any

      A function with as first argument an object3D object.

    Returns void

  • Update the object's and its descendants' matrix of global transform with. If the parameter or matrixWorldNeedsUpdate is true, matrix will not skip updates.

    Parameters

    • force: boolean

      Whether or not force to updates the matrix.

    Returns void

  • Update the object's and its descendants' matrix of global transform with. will update parent or children according to the parameters

    Parameters

    • updateParents: boolean

      update parents.

    • updateChildren: boolean

      update children.

    • force: boolean

      Whether or not force to updates the matrix.

    Returns void

  • Get the whole bounding box of current object cover all children's.

    Parameters

    • localBox: Box3

      If this is not undefined, result will be stored to it.

    Returns Box3

  • Get UUID of this object instance. This value is automatically assigned, so this shouldn't be edited.

    Returns string

  • Return a cloned instance of this class and optionally all descendants.

    Parameters

    • recursive: boolean

      if true, descendants of the object are also cloned. Default is true.

    Returns Object3D

  • Returns number

  • Add a new material into this object. If use this method, please make sure that the material| material has set to Array.

    Parameters

    • material: FatLineMaterial

      a new material which is set.

    • index: number

      the target position in the Array.

    Returns this

  • Expect this drawable only has one material, and return it.

    Returns FatLineMaterial

  • Parameters

    Returns boolean

  • Do something for every material| material whatever it is an instance or array.

    Parameters

    Returns void

  • update the data of bounding box and bounding sphere, set dirty mark to false.

    Returns void

  • Parameters

    Returns void

  • This method is used to update modelViewMatrix| model-view matrix and normalMatrix| normal matrix before drawing this object. In addition, the estimated z| depth information will be update here.

    Parameters

    Returns void

  • Update the matrix local transform. Override

    Returns void

  • Returns void

  • Set all changing mark, such as geometryChanged| geometryChanged, materialChanged| materialChanged and extended mark .

    Returns void

  • This method need override in derived classes to give a special calculation for picking feature.

    Parameters

    Returns void

    See Raycaster for more detail.

  • Clean render data for optimization.

    Returns void

  • Reset entity reference.

    Returns void

    See Scene3D._refManager| refManager for more details.

  • If user changes geometry for drawable, use this method to refresh corresponding states.

    Returns void

  • Manually refresh and resetRenderEntity| reset data of this drawable.

    Returns void

    This method can be replaced by resetRenderEntity| resetRenderEntity().

  • If user changes material| material for drawable, use this method to refresh corresponding states.

    Returns void

  • Returns this

  • Copy the data to this object from source. This method need override in derived classes to copy extended data.

    Parameters

    Returns this

  • Returns void

  • Returns void

  • The name of instance's class.

    Returns string

  • Update render data for optimization. This method is used to assign data from geometry| geometry and material| material to renderGeometry| renderGeometry and renderMaterial| renderMaterial.

    Returns void

  • Get intersections between a casted Ray| ray and this Mesh. The method intersectObject() will call this method, but the results are not ordered.

    Parameters

    • raycaster: Raycaster

      the instance of Raycaster is used to get the data for calculation.

    • intersects: Intersection[]

      the result will be stored here.

    Returns void

  • Parameters

    • v: string

    Returns this

  • Returns boolean

  • Returns void

  • Adds a listener to an event type.

    Type Parameters

    • T

    Parameters

    • _type: EventType<T>
    • _listener: Listener<T>

    Returns void

  • Only active the listener one times and then off it| it.

    Type Parameters

    • T

    Parameters

    • _type: EventType<T>
    • _listener: Listener<T>

    Returns void

  • Checks if listener is added to an event type.

    Type Parameters

    • T

    Parameters

    • _type: EventType<T>
    • _listener: Listener<T>

    Returns boolean

  • Removes a listener from listening list.

    Type Parameters

    • T

    Parameters

    • _type: EventType<T>
    • _listener: Listener<T>

    Returns void

  • Active the event and call the registered listener.

    Parameters

    • type: EventType<never>

    Returns void

  • Type Parameters

    • T

    Parameters

    • type: EventType<T>
    • payload: T

    Returns void

  • Removes all listeners from listening list.

    Returns void