Visit the Documentation of the upcoming Threlte 6.
  1. @threlte/core
  2. Object3DInstance

@threlte/core

Object3DInstance

This module is deprecated. You can still use it but it will be removed in the future. Please consider using <T>/<Three> instead. Please read the update notice.

This component lets you use any manually instantiated object that extends THREE.Object3D in threlte.

Import

Source

Github View Source Code

Package

NPM View Package

Related Docs


Example

<script>
  import { Object3D } from 'three'
  import { Object3DInstance } from '@threlte/core'

  const object = new Object3D()
</script>

<Object3DInstance {object} position={{ y: 1 }} />

Properties

// required
object: THREE.Object3D

// optional
viewportAware: boolean = false
position: Position | undefined = undefined
scale: Scale | undefined = undefined
rotation: Rotation | undefined = undefined
lookAt: LookAt | undefined = undefined
castShadow: boolean | undefined = undefined
receiveShadow: boolean | undefined = undefined
frustumCulled: boolean | undefined = undefined
renderOrder: number | undefined = undefined
visible: boolean | undefined = undefined
dispose: boolean | undefined = undefined
userData: Record<string, any> | undefined = undefined

Bindings

inViewport: boolean

Events

viewportenter: undefined
viewportleave: undefined