Summary of the invention
In view of current WEB3D technical field above shortcomings, the invention provides a kind of WEB3D display packing based on Asynchronous loading and system, WEB3D display can be carried out without plug-in unit, and improve speed and user's viewing experience of handoff scenario.
For achieving the above object, embodiments of the invention adopt following technical scheme:
Based on a WEB3D display packing for Asynchronous loading, the described WEB3D display packing based on Asynchronous loading comprises the following steps:
3D display and the interaction data of initial scene is obtained from 3D scene server, 3D object server and 3D decoration service device;
The 3D got display and interaction data are combined into WEB3D display data carry out showing on WEB and this WEB3D display data are carried out buffer memory;
Predict all around of current displayed scene and the next displayed scene of upper and lower all directions, be then combined into WEB3D display data according to this prediction scene from 3D scene server, 3D object server and 3D decoration service device acquisition 3D display and interaction data and carry out buffer memory;
The WEB3D loading buffer memory shows data and shows on WEB.
According to one aspect of the present invention, describedly the 3D got to be shown and interaction data is combined into WEB3D display data and on WEB, carries out display comprise the following steps:
The 3D got display and interaction data are combined into WEB3D and show data to form 3D model of place;
Draw the 2D image of initial angle according to 3D model of place and show on WEB;
Predict all around of current angles of display and the next angles of display of upper and lower all directions, be then depicted as 2D image according to the 3D model of place under this pre-measuring angle and go forward side by side row cache;
Show on WEB according to the 2D image that the angle browsed loads on the corresponding angle of buffer memory.
According to one aspect of the present invention, describedly draw the 2D image of initial angle according to 3D model of place and on WEB, carry out display comprise the following steps:
Select the initial angles of display of 3D model of place;
Be depicted as the 2D plane picture of this initial angle by the HTML5 of WEB terminal according to the 3D model of place of this initial angles of display;
Drawn 2D plane picture is carried out buffer memory in WEB terminal.
According to one aspect of the present invention, the described 3D model of place according to this initial angles of display is depicted as the 2D plane picture of this initial angle embodiment by the HTML5 of WEB terminal can be: according to the 3D model of place of this initial angles of display, and the HTML5 of WEB terminal draws the 2D plane picture of this initial angle by Canvas.
According to one aspect of the present invention, the 2D plane picture that the HTML5 of described WEB terminal draws this initial angle by Canvas comprises the following steps: the graphic plotting undertaken by OpenGL interface and playing up.
According to one aspect of the present invention, described embodiment of carrying out showing on WEB can be: carry out interactive operation display in WEB terminal by HTML5, CSS3 and JAVASCRIPT.
Based on a WEB3D display system for Asynchronous loading, the described WEB3D display system based on Asynchronous loading comprises:
Data acquisition module, for obtaining 3D display and the interaction data of initial scene from 3D scene server, 3D object server and 3D decoration service device;
Data assemblies and processing module, show on WEB for the 3D got display and interaction data are combined into WEB3D display data;
Scene prediction module, for the next displayed scene of all around and upper and lower all directions of predicting current displayed scene;
Cache module, the WEB3D good for caching process shows data;
Display module, the WEB3D for loading buffer memory shows data and shows on WEB.
According to one aspect of the present invention, described data assemblies and processing module also comprise:
3D model module, shows data to form 3D model of place for the 3D got display and interaction data are combined into WEB3D;
Angle prediction module, for predicting, WEB needs all around of 3D model of place of display and the next angles of display of upper and lower all directions for predicting the next angle of 3D model of place WEB needing show;
Image Rendering module, draws the 2D plane picture that 3D model of place carries out this angle for the result according to prediction.
According to one aspect of the present invention, the described 3D model of place according to this initial angles of display is depicted as the 2D plane picture of this initial angle embodiment by the HTML5 of WEB terminal can be: according to the 3D model of place of this initial angles of display, and the HTML5 of WEB terminal draws the 2D plane picture of this initial angle by Canvas.
According to one aspect of the present invention, described embodiment of carrying out showing on WEB can be: carry out interactive operation display in WEB terminal by HTML5, CSS3 and JAVASCRIPT.
Advantage of the invention process: the WEB3D display packing based on Asynchronous loading of the present invention and system are passed through from 3D scene server, 3D object server and 3D decoration service device obtain 3D display and the interaction data of initial scene, then the 3D got display and interaction data are combined into WEB3D display data carry out showing on WEB and this WEB3D display data are carried out buffer memory, predict the front and back of current displayed scene again, the next displayed scene of left and right and upper and lower all directions, then according to this prediction scene from 3D scene server, 3D object server and 3D decoration service device obtain 3D display and interaction data and are combined into WEB3D display data and carry out buffer memory, the WEB3D finally loading buffer memory shows data and shows on WEB, achieve the display carrying out 3D scene on WEB, and without the need to installing any plug-in unit, because when showing on WEB be the WEB3D display data of the buffer memory scene loaded, thus loading velocity quickly, also achieve the effect of carrying out scene switching fast, what improve user browses experience.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
As shown in Figure 1, a kind of WEB3D display packing based on Asynchronous loading, the described WEB3D display packing based on Asynchronous loading comprises the following steps:
Step S1: the 3D display and the interaction data that obtain initial scene from 3D scene server, 3D object server and 3D decoration service device;
Described step S1 can be from the embodiment of 3D display and interaction data that 3D scene server, 3D object server and 3D decoration service device obtain initial scene: when receiving browse request, and central server can to the 3D display of 3D scene server, 3D object server and the initial scene of 3D decoration service device acquisition request and interaction data.
Step S2: the 3D got display and interaction data are combined into WEB3D display data and carry out showing on WEB and this WEB3D display data are carried out buffer memory;
The 3D got shows by described step S2 and interaction data is combined into WEB3D and shows data and carry out showing on WEB and the embodiment that this WEB3D display data carry out buffer memory be can be: after step S1 executes, central server obtains 3D display and the interaction data of initial scene, then the 3D got display and interaction data can be combined into WEB3D display data and carry out buffer memory, then show on WEB, it specifically comprises the following steps again:
The 3D got display and interaction data are combined into WEB3D and show data to form 3D model of place;
Draw the 2D image of initial angle according to 3D model of place and show on WEB;
Predict all around of current angles of display and the next angles of display of upper and lower all directions, be then depicted as 2D image according to the 3D model of place under this pre-measuring angle and go forward side by side row cache;
Repeat above-mentioned steps and obtain the good 2D image of the buffer memory of more 3D model of place angles of display to carry out buffer memory;
Show on WEB according to the 2D image that the angle browsed loads on the corresponding angle of buffer memory.
Wherein, the described 3D model of place according to this initial angles of display is depicted as the 2D plane picture of this initial angle embodiment by the HTML5 of WEB terminal can be: according to the 3D model of place of this initial angles of display, the HTML5 of WEB terminal draws the 2D plane picture of this initial angle by Canvas, can immediately drawing image; Further, in order to improve drafting speed, the HTML5 of described WEB terminal draws the 2D plane picture of this initial angle in the following ways by Canvas: the graphic plotting undertaken by OpenGL interface and playing up, the flicker of drawing process can also be eliminated like this, finally realize visual 3D and show.
Step S3: predict all around of current displayed scene and the next displayed scene of upper and lower all directions, is then combined into WEB3D display data according to this prediction scene from 3D scene server, 3D object server and 3D decoration service device acquisition 3D display and interaction data and carries out buffer memory;
Described step S3 predicts the front and back of current displayed scene, the next displayed scene of left and right and upper and lower all directions, then according to this prediction scene from 3D scene server, 3D object server and 3D decoration service device obtain 3D display and interaction data and are combined into the embodiment that WEB3D display data carry out buffer memory and can be: viewer is when carrying out environment viewing, according to actual conditions, not outer in the front and back toward current angles of display, left and right and up and down these directions, concrete rotation how many angles are formed is browsed scene and can set in advance, to reach different scenario display effect, thus predict multiple scene, then predict that scenes are from 3D scene server according to these, 3D object server and 3D decoration service device obtain 3D display and interaction data and are combined into WEB3D display data and carry out buffer memory, specific as follows:
The 3D got display and interaction data are combined into WEB3D and show data to form 3D model of place;
Draw the 2D image of initial angle according to 3D model of place and show on WEB;
Predict all around of current angles of display and the next angles of display of upper and lower all directions, be then depicted as 2D image according to the 3D model of place under this pre-measuring angle and go forward side by side row cache;
Above-mentioned steps can be repeated in actual applications to the good 2D image of the buffer memory obtaining more 3D model of place angles of display to carry out buffer memory;
Show on WEB according to the 2D image that the angle browsed loads on the corresponding angle of buffer memory.
Wherein, the described 3D model of place according to this initial angles of display is depicted as the 2D plane picture of this initial angle embodiment by the HTML5 of WEB terminal can be: according to the 3D model of place of this initial angles of display, the HTML5 of WEB terminal draws the 2D plane picture of this initial angle by Canvas, can immediately drawing image; Further, in order to improve drafting speed, the HTML5 of described WEB terminal draws the 2D plane picture of this initial angle in the following ways by Canvas: the graphic plotting undertaken by OpenGL interface and playing up, the flicker of drawing process can also be eliminated like this, finally realize visual 3D and show.
In actual applications, can comprise the following steps, repeat above-mentioned steps S3 and obtain the WEB3D display data of more displayed scenes to carry out buffer memory, its embodiment can be: after step S3 executes, the WEB3D that can obtain multiple displayed scene shows data, and then with these displayed scenes be current displayed scene continue prediction this displayed scene front and back, the next displayed scene of left and right and upper and lower all directions, then according to this prediction scene from 3D scene server, 3D object server and 3D decoration service device obtain 3D display and interaction data and are combined into WEB3D display data and carry out buffer memory, repeat, data are shown with the WEB3D obtaining more displayed scenes, thus convenient loading quickly when showing shows.
Step S4: the WEB3D loading buffer memory shows data and shows on WEB;
The embodiment that the WEB3D display data that described step S4 loads buffer memory carry out showing on WEB can be: the WEB3D loading the corresponding scene of buffer memory according to the scene browsed shows data, then carries out interactive operation display in WEB terminal by HTML5, CSS3 and JAVASCRIPT.
Based on a WEB3D display system for Asynchronous loading, the described WEB3D display system based on Asynchronous loading comprises:
Data acquisition module 1, for obtaining 3D display and the interaction data of initial scene from 3D scene server, 3D object server and 3D decoration service device;
Data assemblies and processing module 2, show on WEB for the 3D got display and interaction data are combined into WEB3D display data;
Scene prediction module 3, for the next displayed scene of all around and upper and lower all directions of predicting current displayed scene;
Cache module 4, the WEB3D good for caching process shows data;
Display module 5, the WEB3D for loading buffer memory shows data and shows on WEB.
Wherein, described data assemblies and processing module also comprise:
3D model module 21, shows data to form 3D model of place for the 3D got display and interaction data are combined into WEB3D;
Angle prediction module 22, for predicting, WEB needs all around of 3D model of place of display and the next angles of display of upper and lower all directions for predicting the next angle of 3D model of place WEB needing show;
Image Rendering module 23, draws the 2D plane picture that 3D model of place carries out this angle for the result according to prediction.
The described 3D model of place according to this initial angles of display is depicted as the 2D plane picture of this initial angle embodiment by the HTML5 of WEB terminal can be: according to the 3D model of place of this initial angles of display, and the HTML5 of WEB terminal draws the 2D plane picture of this initial angle by Canvas.
Described embodiment of carrying out showing on WEB can be: carry out interactive operation display in WEB terminal by HTML5, CSS3 and JAVASCRIPT.
Advantage of the invention process: the WEB3D display packing based on Asynchronous loading of the present invention and system are passed through from 3D scene server, 3D object server and 3D decoration service device obtain 3D display and the interaction data of initial scene, then the 3D got display and interaction data are combined into WEB3D display data carry out showing on WEB and this WEB3D display data are carried out buffer memory, predict the front and back of current displayed scene again, the next displayed scene of left and right and upper and lower all directions, then according to this prediction scene from 3D scene server, 3D object server and 3D decoration service device obtain 3D display and interaction data and are combined into WEB3D display data and carry out buffer memory, the WEB3D finally loading buffer memory shows data and shows on WEB, achieve the display carrying out 3D scene on WEB, and without the need to installing any plug-in unit, because when showing on WEB be the WEB3D display data of the buffer memory scene loaded, thus loading velocity quickly, also achieve the effect of carrying out scene switching fast, what improve user browses experience.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, the technician of any skilled is in technical scope disclosed by the invention; the change that can expect easily or replacement, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of described claim.