You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

39 lines
758 B

import { UIPanel } from './libs/ui.js';
import { ViewHelper as ViewHelperBase } from '../../examples/jsm/helpers/ViewHelper.js';
class ViewHelper extends ViewHelperBase {
constructor( editorCamera, container ) {
super( editorCamera, container.dom );
const panel = new UIPanel();
panel.setId( 'viewHelper' );
panel.setPosition( 'absolute' );
panel.setRight( '0px' );
panel.setBottom( '0px' );
panel.setHeight( '128px' );
panel.setWidth( '128px' );
panel.dom.addEventListener( 'pointerup', ( event ) => {
event.stopPropagation();
this.handleClick( event );
} );
panel.dom.addEventListener( 'pointerdown', function ( event ) {
event.stopPropagation();
} );
container.add( panel );
}
}
export { ViewHelper };