pub enum SceneEvent {
Added,
Removed,
ChildAdded(ObjectRef),
ChildRemoved(ObjectRef),
}Expand description
An event an Object3D dispatches to its listeners, the event argument
of three.js’ dispatchEvent( event ).
The set is closed: these are the four events three’s Object3D dispatches
from add(), remove() and attach(). three’s event.target is the
second argument every listener receives, not a field here.
Variants§
Added
{ type: 'added' } — dispatched on an object once it has a new parent.
Removed
{ type: 'removed' } — dispatched on an object once it has lost its
parent.
ChildAdded(ObjectRef)
{ type: 'childadded', child } — dispatched on the parent after
Added has been dispatched on the child.
ChildRemoved(ObjectRef)
{ type: 'childremoved', child } — dispatched on the old parent after
Removed has been dispatched on the child.
Implementations§
Source§impl SceneEvent
impl SceneEvent
Sourcepub fn event_type(&self) -> SceneEventType
pub fn event_type(&self) -> SceneEventType
event.type.
Sourcepub fn child(&self) -> Option<&ObjectRef>
pub fn child(&self) -> Option<&ObjectRef>
event.child — the child of a ChildAdded or
ChildRemoved event; None for the others.
Trait Implementations§
Source§impl Clone for SceneEvent
impl Clone for SceneEvent
Auto Trait Implementations§
impl !RefUnwindSafe for SceneEvent
impl !Send for SceneEvent
impl !Sync for SceneEvent
impl !UnwindSafe for SceneEvent
impl Freeze for SceneEvent
impl Unpin for SceneEvent
impl UnsafeUnpin for SceneEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more