Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NgxHelperComponent

The Helper component.

See the ngx3js docs page for details.

Three Type Type Key Acceptable Input
Gyroscope GyroscopeHelper, Gyroscope
CSMHelper CSMHelper, CSM control
ArrowHelper ArrowHelper, Arrow arrowTo, arrowFrom, dirX, dirY, dirZ , originX, originY, originZ, length, color, headLength, headWidth
BoxHelper BoxHelper, Box target, color
Box3Helper Box3Helper, Box3
GridHelper GridHelper, Grid size, divisions, color1, color2
PolarGridHelper PolarGridHelper, PolarGrid radius, radials, circles, divisions, color1, color2
PositionalAudioHelper PositionalAudioHelper, PositionalAudio range, divisionsInnerAngle, divisionsOuterAngle
CameraHelper CameraHelper, Camera
DirectionalLightHelper DirectionalLightHelper, DirectionalLight size, color
HemisphereLightHelper HemisphereLightHelper, HemisphereLight size, color
PointLightHelper PointLightHelper, PointLight size, color
HemisphereLightHelper HemisphereLightHelper, HemisphereLight size, color
SpotLightHelper SpotLightHelper, SpotLight color
RectAreaLightHelper RectAreaLightHelper, RectAreaLight color
LightProbeHelper LightProbeHelper, LightProbe size
PlaneHelper PlaneHelper, Plane size, color
VertexTangentsHelper VertexTangentsHelper, VertexTangents size, color
VertexNormalsHelper VertexNormalsHelper, VertexNormals size, color
SkeletonHelper SkeletonHelper, Skeleton
AxesHelper AxesHelper, Axes size
<ngx3js-helper
[type]="'GridHelper'" [size]="500" [divisions]="100 "
[color1]="'0x000000'" [opacity]="0.2"
></ngx3js-helper>
<ngx3js-helper
[type]="'Camera'" [target]="sunLight "
[visible]="true"
></ngx3js-helper>
<ngx3js-helper
[visible]="false" [type]="'csmhelper'" [control]="csm"
(onLoad)="setHelper($event)"
></ngx3js-helper>
<ngx3js-helper
[type]="'arrowhelper'"
[arrowFrom]="sunLight" [arrowTo]="scene"
[length]="0.9" [color]="'0xffff00'" [headLength]="0.25"
[headWidth]="0.08"
></ngx3js-helper>

Hierarchy

Implements

  • OnInit

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

Protected OBJECT3D_ATTR

OBJECT3D_ATTR: string[] = ...

Object3 d attr of abstract object3d component

Protected OBJECT_ATTR

OBJECT_ATTR: string[] = ...

Object attr of abstract subscribe component

Protected _changeList

_changeList: string[] = null

Change list of abstract subscribe component

Protected _needUpdate

_needUpdate: boolean = true

Need update of abstract subscribe component

arrowFrom

arrowFrom: any = null

Point at which the arrow starts.

arrowTo

arrowTo: any = null

Point at which the arrow end.

Protected cachedGeometryList

cachedGeometryList: NgxAbstractGeometryComponent[] = []

Protected cachedLookatList

cachedLookatList: NgxLookatComponent[] = []

Protected cachedMaterialList

cachedMaterialList: NgxAbstractMaterialComponent[] = []

Protected cachedPositionList

cachedPositionList: NgxPositionComponent[] = []

Protected cachedRotationList

cachedRotationList: NgxRotationComponent[] = []

Protected cachedScaleList

cachedScaleList: NgxScaleComponent[] = []

castShadow

castShadow: boolean = null

Whether the object gets rendered into shadow map. Default is false.

children

children: any[] = null

this children of Gyroscope

circles

circles: number = null

The number of circles. This can be any positive integer. Default is 8.

color

color: string | number = null

color -- The desired color.

color1

color1: INgxColor = null

The first color used for grid elements. This can be a Color, a hexadecimal value and an CSS-Color name. Default is 0x444444

color2

color2: INgxColor = null

The second color used for grid elements. This can be a Color, a hexadecimal value and an CSS-Color name. Default is 0x888888

control

control: any = null

The cms control of CSMHelper

Protected controllerList

controllerList: QueryList<NgxAbstractControllerComponent>

Content children of abstract object3d component

debug

debug: boolean = false

Debug this Object

depthWrite

depthWrite: boolean = null

Whether rendering this material has any effect on the depth buffer. Default is true.

dirX

dirX: number = null

X Direction from origin. Must be a unit vector.

dirY

dirY: number = null

Y Direction from origin. Must be a unit vector.

dirZ

dirZ: number = null

Z Direction from origin. Must be a unit vector.

divisions

divisions: number = null

The number of line segments used for each circle. This can be any positive integer that is 3 or greater. Default is 64.

divisionsInnerAngle

divisionsInnerAngle: number = null

the divisionsInnerAngle of PositionalAudioHelper

divisionsOuterAngle

divisionsOuterAngle: number = null

the divisionsOuterAngle of PositionalAudioHelper

enabled

enabled: boolean = true

Enabled or Not

frustumCulled

frustumCulled: boolean = null

When this is set, it checks every frame if the object is in the frustum of the camera before rendering the object. If set to false the object gets rendered every frame even if it is not in the frustum of the camera. Default is true.

geometry

geometry: any = null

The geometry of mesh

Protected geometryList

geometryList: QueryList<NgxAbstractGeometryComponent>

Content children of mesh component

headLength

headLength: number = null

The length of the head of the arrow. Default is 0.2 * length.

headWidth

headWidth: number = null

The width of the head of the arrow. Default is 0.2 * headLength.

Protected id

id: string = ''

The Id of abstract subscribe component

length

length: number = null

length of the arrow. Default is 1.

material

The material of mesh

materialBlending

materialBlending: string = null

The Input of helper component Which blending to use when displaying objects with this material. Default is NormalBlending.

Three Type Value String(case insensitive)
THREE.NoBlending NoBlending, No
THREE.NormalBlending NormalBlending, Normal
THREE.AdditiveBlending AdditiveBlending, Additive
THREE.SubtractiveBlending SubtractiveBlending, Subtractive
THREE.MultiplyBlending MultiplyBlending, Multiply
THREE.CustomBlending CustomBlending, Custom
default

THREE.NormalBlending

materialColor

materialColor: INgxColor = null

The color of material

materialIsArray

materialIsArray: boolean = null

The material of mesh is array

materialLinewidth

materialLinewidth: number = null

The linewidth of material

Protected materialList

materialList: QueryList<NgxAbstractMaterialComponent>

Content children of abstract object3d component

materialTransparent

materialTransparent: boolean = null

Defines whether this material is transparent. This has an effect on rendering as transparent objects need special treatment and are rendered after non-transparent objects. When set to true, the extent to which the material is transparent is controlled by setting it's .opacity property. Default is false.

default

false

matrix

matrix: I3JS.Matrix4 = null

Update matrix for this helper

matrixAutoUpdate

matrixAutoUpdate: boolean = null

When this is set, it calculates the matrix of position, (rotation or quaternion) and scale every frame and also recalculates the matrixWorld property. Default is Object3D.DefaultMatrixAutoUpdate (true).

name

name: string = ''

The name of the object (doesn't need to be unique). Default is an empty string.

Protected object3d

object3d: I3JS.Object3D<Event> = null

The Object3d of abstract object3d component

Protected object3dList

object3dList: QueryList<NgxAbstractObject3dComponent>

Content children of abstract object3d component

onDestory

onDestory: EventEmitter<NgxHelperComponent> = ...

Will be called when before destory. The argument will be the loaded self

onLoad

onLoad: EventEmitter<NgxHelperComponent> = ...

Will be called when load completes. The argument will be the loaded self

opacity

opacity: number = null

Float in the range of 0.0 - 1.0 indicating how transparent the material is.

originX

originX: number = null

X Point at which the arrow starts.

originY

originY: number = null

Y Point at which the arrow starts.

originZ

originZ: number = null

Z Point at which the arrow starts.

overrideParams

overrideParams: {} = null

The override params

Type declaration

  • [key: string]: any

Protected parent

parent: any = null

The Parent of abstract subscribe component

parentAdd

parentAdd: boolean = true

Input of ngx helper component

Protected parentObject3d

parentObject3d: I3JS.Object3D<Event> = null

Parent object3d of abstract object3d component

plane

plane: I3JS.Plane | NgxPlaneComponent = null

Input of ngx helper component

radials

radials: number = null

The number of radial lines. This can be any positive integer. Default is 16.

radius

radius: number = null

The radius of the polar grid. This can be any positive number. Default is 10.

range

range: number = null

the range of PositionalAudioHelper

receiveShadow

receiveShadow: boolean = null

Whether the material receives shadows. Default is false.

Protected selfAny

selfAny: any = ...

size

size: number = null

size of the lines representing the axes. Default is 1.

Protected subscribeType

subscribeType: string = null

Subscribe type of abstract subscribe component

target

target: any = null

The target object of helper

tween

tween: {} = null

Tween animation params

Type declaration

  • [key: string]: any

type

type: string = 'axes'

the type of helper

Three Type Value String(case insensitive)
Gyroscope Gyroscope
CSM CSM
THREE.ArrowHelper ArrowHelper, Arrow
THREE.BoxHelper BoxHelper, Box
THREE.Box3Helper Box3Helper, Box3
THREE.GridHelper GridHelper, Grid
THREE.PolarGridHelper PolarGridHelper, PolarGrid
PositionalAudioHelper PositionalAudioHelper, PositionalAudio
THREE.CameraHelper CameraHelper, Camera
THREE.DirectionalLightHelper DirectionalLightHelper, DirectionalLight, Directional, Light
THREE.HemisphereLightHelper HemisphereLightHelper, HemisphereLight, Hemisphere, Light
THREE.PointLightHelper PointLightHelper, PointLightHelper, PointLight, Light
THREE.SpotLightHelper SpotLightHelper, SpotLight, Light
RectAreaLightHelper RectAreaLightHelper, RectAreaLight, Light
LightProbeHelper LightProbeHelper, LightProbe, Light
THREE.PlaneHelper PlaneHelper, Plane
VertexTangentsHelper VertexTangentsHelper, VertexTangents
VertexNormalsHelper VertexNormalsHelper, VertexNormals
THREE.SkeletonHelper SkeletonHelper, Skeleton
THREE.AxesHelper AxesHelper, Axes

userData

userData: any = null

An object that can be used to store custom data about the Object3D. It should not hold references to functions as these will not be cloned.

visible

visible: boolean = true

Object gets rendered if true. Default is true.

windowExport

windowExport: string = null

Export this Object to window global variables

Accessors

needUpdate

  • set needUpdate(value: boolean): void
  • Sets need update

    Parameters

    • value: boolean

    Returns void

Methods

addChanges

  • addChanges(key: string | string[] | SimpleChanges): void

addChildObject3d

addDebugLine

  • addDebugLine(objs: I3JS.Object3D<Event>[], lines: string[], prefix: string): string[]

addParentObject3d

addPosition

addRotation

Protected applyChanges

  • applyChanges(changes: string[]): void

applyChanges3d

  • applyChanges3d(changes: string[]): void

Protected callOnLoad

  • callOnLoad(): void

Protected checkChanges

  • checkChanges(changes: SimpleChanges): SimpleChanges

Protected clearChanges

  • clearChanges(): void

Protected consoleLog

  • consoleLog(key: string, object: any, level?: string): void

Protected consoleLogTime

  • consoleLogTime(key: string, object: any, repeat?: number): void

Protected destroyLocalComponent

  • destroyLocalComponent(key: string): void

dispose

  • dispose(): void

Protected getChanges

  • getChanges(): string[]

getGeometry

getHelper

  • getHelper<T>(): T

getId

  • getId(): string

Protected getMaterialOne

Protected getMaterials

Protected getMaterialsMulti

Protected getName

  • getName(def?: string): string

getObject

  • getObject<T>(): T

getObject3d

  • getObject3d<T>(): T

getObjectById

getObjectByName

getObjectByProperty

getObjectTop

getPosition

getRotation

getScale

getSubscribe

  • getSubscribe(): Observable<string[]>

getTagAttributeObject3d

Protected getTimeout

  • getTimeout(timeDelay?: number): Promise<void>

getUserData

  • getUserData(): {}

Protected getVisible

  • getVisible(def?: boolean): boolean

Protected initLocalComponent

  • initLocalComponent<T>(key: string, component: T): T

Protected isIdEuals

  • isIdEuals(id: string): boolean

ngAfterContentInit

  • ngAfterContentInit(): void

ngOnChanges

  • ngOnChanges(changes: SimpleChanges): void
  • A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated. default change detector has checked data-bound properties if at least one has changed, and before the view and content children are checked.

    Parameters

    • changes: SimpleChanges

      The changed properties.

    Returns void

ngOnDestroy

  • ngOnDestroy(): void

ngOnInit

  • ngOnInit(): void
  • A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.

    Returns void

removeObject3d

resetTween

  • resetTween(): void

runSubscribeNext

  • runSubscribeNext(key: string | string[]): void

setLookat

Protected setObject

  • setObject(obj: any): void

Protected setObject3d

setParent

setParentObject3d

setPosition

setRotation

setScale

setScaleScalar

setSubscribeNext

  • setSubscribeNext(key: string | string[]): void

setSubscribeType

  • setSubscribeType(subscribeType: string): void

setTween

  • setTween(tweenData: {}): void

setTweenTarget

  • setTweenTarget(tweenTarget: any): void

setUpdate

  • setUpdate(delay?: number): void

setUserData

  • setUserData(key: string, value: any): void

setVisible

  • setVisible(visible: boolean, _?: boolean): void

showDebug

Protected subscribeListQuery

  • subscribeListQuery(queryList: QueryList<any>, subscribeKey: string, changeKey: string): void

Protected subscribeListQueryChange

  • subscribeListQueryChange(queryList: QueryList<any>, subscribeKey: string, changeKey: string): void

Protected subscribeRefer

  • subscribeRefer(key: string, subscription: Subscription): void

Protected subscribeReferList

  • subscribeReferList(key: string, subscription: Subscription): void

Protected unSubscribeRefer

  • unSubscribeRefer(key: string): void

Protected unSubscribeReferList

  • unSubscribeReferList(key: string): void

Protected unSubscription

  • unSubscription(subscriptions: Subscription[]): Subscription[]

updateInputParams

  • updateInputParams(params: {}, firstChange?: boolean, changes?: SimpleChanges, type?: string): void

Generated using TypeDoc