UNPKG

@pmndrs/handle

Version:

framework agnostic expandable handle implementation for threejs

17 lines (16 loc) 468 B
import { Group } from 'three'; import { HandleStore } from '../store.js'; export class RegisteredHandle extends Group { context; axis; store; options; tag; constructor(context, axis, tagPrefix, getOptions) { super(); this.context = context; this.axis = axis; this.tag = (tagPrefix ?? '') + axis; this.store = new HandleStore(context.target, () => context.getHandleOptions(this.tag, getOptions)); } }