Wearable electronic device displaying virtual object and method for controlling the same
A wearable electronic device includes: a display, a camera, and at least one processor operatively connected with the display and the camera. The at least one processor is configured to, control to display an image obtained by the camera on the display, control to display a first virtual object in a partial area of the displayed image, control to replace the displayed first virtual object with an enlarged second virtual object based on receiving a user input to enlarge the first virtual object through the camera, map a first portion of the second virtual object to an area corresponding to the displayed image, map a remaining portion of the second virtual object that does not include the first portion to a surrounding area of the area corresponding to the displayed image, and control to display the first portion of the second virtual object on the displayed image.
1 . A wearable electronic device comprising:
at least one display;
at least one camera;
at least one processor; and
memory storing one or more computer programs, wherein the one or more computer programs include computer-executable instructions that, when executed by the at least one processor individually or collectively, cause the wearable electronic device to:
provide, using the at least one display, a first image obtained by the at least one camera,
provide, using the at least one display, a first virtual object in a partial area of the first image,
based on receiving a user input to enlarge the first virtual object, increase a size of the first virtual object, wherein the first virtual object includes a plurality of virtual elements,
based on the increased size of the first virtual object being less than a set value as a result of increasing the size of the first virtual object, maintain a shape of the first virtual object while the size of the first virtual object is being increased,
based on the increased size of the first virtual object reaching the set value as the result of increasing the size of the first virtual object, change the first virtual object into a second virtual object by rearranging a display location of the plurality of virtual elements to be spaced apart from each other in 3D space, and
provide, using the at least one display, at least one of the plurality of virtual elements in a first area that corresponds to the first image being displayed and the other virtual elements of the plurality of virtual elements, excluding the at least one of the plurality of virtual elements, in a surrounding area except the first area,
wherein the surrounding area is a 360-degree virtual space surrounding a position of a user wearing the wearable electronic device.
2 . The wearable electronic device of claim 1 , wherein the instructions, when executed by the at least one processor individually or collectively, cause the wearable electronic device to:
display, on the first image, the second virtual object such that the at least one of the plurality of virtual elements included in the first virtual object is rearranged in the second virtual object, and
wherein at least one of the plurality of virtual elements included in the second virtual object is obtained by changing a size and/or information of the at least one of the plurality of virtual elements included in the first virtual object.
3 . The wearable electronic device of claim 2 , wherein the instructions, when executed by the at least one processor individually or collectively, cause the wearable electronic device to:
rearrange the at least one of the plurality of virtual elements included in the first virtual object, based on at least one of a position or size of at least one object in a real space displayed on the first image.
4 . The wearable electronic device of claim 2 , wherein the first virtual object and the second virtual object include at least one user interface for controlling an application corresponding to the first virtual object and the second virtual object, and
wherein the instructions, when executed by the at least one processor individually or collectively, cause the wearable electronic device to change the first virtual object into the second virtual object while maintaining a size and/or position of the at least one user interface between the first virtual object and the second virtual object.
5 . The wearable electronic device of claim 1 , wherein the instructions, when executed by the at least one processor individually or collectively, cause the wearable electronic device to display at least one of the other virtual elements on a second image obtained by the at least one camera, the second image being different from the first image based on a movement of the wearable electronic device.
6 . The wearable electronic device of claim 1 , wherein the second virtual object is fixed in a virtual space, and
wherein the instructions, when executed by the at least one processor individually or collectively, cause the wearable electronic device to display a whole of the second virtual object on the at least one of the plurality of virtual elements in the first area with a third image obtained by the at least one camera, the third image being different from the first image based on a relocation of the wearable electronic device.
7 . The wearable electronic device of claim 1 , wherein the second virtual object is fixed to a user wearing the wearable electronic device, and
wherein the instructions, when executed by the at least one processor individually or collectively, cause the wearable electronic device to continue to display at least one of the plurality of virtual elements in a second area that corresponds to a fourth image obtained by the at least one camera and at least one of the other virtual elements in the surrounding area except the second area, the fourth image being different from the first image based on a relocation of the wearable electronic device.
8 . The wearable electronic device of claim 1 , wherein the first virtual object is a 3D virtual object obtained based on a user input to enlarge a 2D third virtual object.
9 . The wearable electronic device of claim 1 , wherein the second virtual object further includes a board-shaped virtual element configured to attach/detach another virtual object.
10 . A method for controlling a wearable electronic device that includes at least one camera and at least one display, the method comprising:
providing, using the at least one display, a first image obtained by the at least one camera;
providing, using the at least one display, a first virtual object in a partial area of the first image;
based on receiving a user input to enlarge the first virtual object, increasing a size of the first virtual object, wherein the first virtual object includes a plurality of virtual elements;
based on the increased size of the first virtual object being less than a set value as a result of increasing the size of the first virtual object, maintaining a shape of the first virtual object while the size of the first virtual object is being increased;
based on the increased size of the first virtual object reaching the set value as the result of increasing the size of the first virtual object, changing the first virtual object into a second virtual object by rearranging a display location of the plurality of virtual elements to be spaced apart from each other in 3D space; and
providing, using the at least one display, at least one of the plurality of virtual elements in a first area that corresponds to the first image being displayed and the other virtual elements of the plurality of virtual elements, excluding the at least one of the plurality of virtual elements, in a surrounding area except the first area,
wherein the surrounding area is a 360-degree virtual space surrounding a position of a user wearing the wearable electronic device.
11 . The method of claim 10 , wherein the providing of the part of the second virtual object includes displaying, on the first image, the second virtual object such that the at least one of the plurality of virtual elements included in the first virtual object is rearranged in the second virtual object, and
wherein at least one of the plurality of virtual elements included in the second virtual object is obtained by changing a size and/or information of the at least one of the plurality of virtual elements included in the first virtual object.
12 . The method of claim 11 , wherein the changing of the first virtual object into the second virtual object comprises rearranging the at least one of the plurality of virtual elements included in the first virtual object, based on at least one of a position or size of at least one object in a real space displayed on the first image.
13 . The method of claim 11 , wherein the first virtual object and the second virtual object include at least one user interface for controlling an application corresponding to the first virtual object and the second virtual object, and
wherein the enlarging of the first virtual object comprises enlarging the first virtual object while maintaining a size and/or position of the at least one user interface between the first virtual object and the second virtual object.
14 . The method of claim 10 , further comprising displaying at least one of the other virtual elements on a second image obtained by the at least one camera, the second image being different from the first image based on a movement of the wearable electronic device.
15 . The method of claim 10 , wherein the second virtual object is fixed in a virtual space, and
wherein the method further comprises displaying the at least one of the plurality of virtual elements in the first area with a third the image obtained by the at least one camera, the third image being different from the first image based on a relocation of the wearable electronic device.
16 . The method of claim 10 , wherein the second virtual object is fixed to a user wearing the wearable electronic device, and
wherein the method further comprises continuing to display at least one of the plurality of virtual elements in a second area that corresponds to a fourth image obtained by the at least one camera and at least one of the other virtual elements in the surrounding area except the second area, the fourth image being different from the first image based on a relocation of the wearable electronic device.
17 . The method of claim 10 , wherein the first virtual object is a 3D virtual object obtained based on a user input to enlarge a 2D third virtual object.
18 . One or more non-transitory computer-readable storage media storing one or more computer programs including computer-executable instructions that, when executed by one or more processors of a wearable device individually or collectively, cause the wearable device to perform operations, the operations comprising:
providing, using at least one display, an image obtained by at least one camera;
providing, using the at least one display, a first virtual object in a partial area of the image;
based on receiving a user input to enlarge the first virtual object, increasing a size of the first virtual object, wherein the first virtual object includes a plurality of virtual elements;
based on the increased size of the first virtual object being less than a set value as a result of increasing the size of the first virtual object, maintaining a shape of the first virtual object while the size of the first virtual object is being increased;
based on the increased size of the first virtual object reaching the set value as the result of increasing the size of the first virtual object, changing the first virtual object into a second virtual object by rearranging a display location of the plurality of virtual elements to be spaced apart from each other in 3D space; and
providing, using the at least one display, at least one of the plurality of virtual elements in a first area that corresponds to the image being displayed and the other virtual elements of the plurality of virtual elements, excluding the at least one of the plurality of virtual elements, in a surrounding area except the first area,
wherein the surrounding area is a 360-degree virtual space surrounding a position of a user wearing the wearable electronic device.