void onDocumentMouseDown(Event arg)
        {
            if (!IsActive)
            {
                return;
            }

            MouseEvent e = arg.As <MouseEvent>();

            e.PreventDefault();

            THREE.Vector3 vector = new THREE.Vector3(mouse.x, mouse.y, 0.5).unproject(camera);

            var raycaster = new THREE.Raycaster(camera.position, vector.sub(camera.position).normalize());

            THREE.Intersection[] intersects = raycaster.intersectObjects(allObjects);

            if (intersects.Length > 0)
            {
                THREE.Intersection interSec = intersects[0];
                THREE.Mesh         m        = interSec.Object as THREE.Mesh;

                if (m != null)
                {
                    controls.enabled = false;
                    selected         = m;
                    intersects       = raycaster.intersectObject(plane);
                    offset.copy(interSec.point).sub(plane.position);
                    Container.Style.Cursor = Cursor.Move;
                }
            }
        }
        void onDocumentMouseMove(Event arg)
        {
            if (!IsActive)
            {
                return;
            }

            MouseEvent e = arg.As <MouseEvent>();

            e.PreventDefault();

            SetMousePos(e);
            raycaster.setFromCamera(mouse, camera);


            THREE.Intersection[] intersects;

            if (selected != null)
            {
                intersects = raycaster.intersectObject(plane);
                selected.position.copy(intersects[0].point.sub(offset));
                return;
            }

            intersects = raycaster.intersectObjects(allObjects);

            if (intersects.Length > 0)
            {
                THREE.Intersection i = intersects[0];
                THREE.Mesh         m = i.Object as THREE.Mesh;

                if (m != null && m != intersected)
                {
                    intersected = m;
                    plane.position.copy(intersected.position);
                    plane.lookAt(camera.position);
                }
                Container.Style.Cursor = Cursor.Pointer;
            }
            else
            {
                intersected            = null;
                Container.Style.Cursor = Cursor.Auto;
            }
        }
        void onDocumentMouseDown(Event arg)
        {
            if (!IsActive) return;

            MouseEvent e = arg.As<MouseEvent>();
            e.PreventDefault();

            THREE.Vector3 vector = new THREE.Vector3(mouse.x, mouse.y, 0.5).unproject(camera);

            var raycaster = new THREE.Raycaster(camera.position, vector.sub(camera.position).normalize());

            THREE.Intersection[] intersects = raycaster.intersectObjects(allObjects);

            if (intersects.Length > 0 )
            {
                THREE.Intersection interSec = intersects[0];
                THREE.Mesh m = interSec.Object as THREE.Mesh;

                if (m != null)
                {
                    controls.enabled = false;
                    selected = m;
                    intersects = raycaster.intersectObject(plane);
                    offset.copy(interSec.point).sub(plane.position);
                    Container.Style.Cursor = Cursor.Move;
                }
            }
        }