@openglobus/og 0.11.1 → 0.11.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +18 -20
- package/src/og/Clock.js +11 -11
- package/src/og/Deferred.js +1 -1
- package/src/og/Events.js +9 -7
- package/src/og/Extent.js +117 -72
- package/src/og/Globe.js +35 -22
- package/src/og/ImageCanvas.js +24 -18
- package/src/og/Lock.js +2 -2
- package/src/og/LonLat.js +40 -37
- package/src/og/Popup.js +21 -15
- package/src/og/QueueArray.js +7 -3
- package/src/og/Rectangle.js +11 -6
- package/src/og/Stack.js +8 -5
- package/src/og/ajax.js +21 -33
- package/src/og/astro/astro.js +5 -5
- package/src/og/astro/earth.js +23 -17
- package/src/og/astro/jd.js +44 -39
- package/src/og/astro/orbit.js +20 -18
- package/src/og/astro/rotation.js +17 -8
- package/src/og/bv/Box.js +7 -3
- package/src/og/bv/Sphere.js +17 -9
- package/src/og/camera/Camera.js +137 -86
- package/src/og/camera/Frustum.js +30 -19
- package/src/og/camera/PlanetCamera.js +30 -26
- package/src/og/control/CompassButton.js +8 -2
- package/src/og/control/Control.js +13 -11
- package/src/og/control/DebugInfo.js +4 -1
- package/src/og/control/EarthCoordinates.js +62 -41
- package/src/og/control/EarthNavigation.js +20 -22
- package/src/og/control/GeoImageDragControl.js +1 -1
- package/src/og/control/KeyboardNavigation.js +12 -12
- package/src/og/control/LayerSwitcher.js +24 -23
- package/src/og/control/Lighting.js +1 -1
- package/src/og/control/MouseNavigation.js +1 -1
- package/src/og/control/ScaleControl.js +1 -1
- package/src/og/control/SegmentBoundVisualization.js +8 -9
- package/src/og/control/ShowFps.js +15 -10
- package/src/og/control/SimpleNavigation.js +8 -10
- package/src/og/control/Sun.js +25 -15
- package/src/og/control/ToggleWireframe.js +5 -5
- package/src/og/control/TouchNavigation.js +58 -45
- package/src/og/control/ZoomControl.js +41 -25
- package/src/og/control/index.js +4 -0
- package/src/og/ellipsoid/Ellipsoid.js +181 -85
- package/src/og/ellipsoid/wgs84.js +4 -4
- package/src/og/entity/BaseBillboard.js +97 -44
- package/src/og/entity/Billboard.js +15 -11
- package/src/og/entity/BillboardHandler.js +314 -64
- package/src/og/entity/Entity.js +106 -74
- package/src/og/entity/EntityCollection.js +72 -49
- package/src/og/entity/GeoObject.js +228 -0
- package/src/og/entity/GeoObjectHandler.js +910 -0
- package/src/og/entity/Geometry.js +29 -26
- package/src/og/entity/GeometryHandler.js +598 -126
- package/src/og/entity/Label.js +74 -40
- package/src/og/entity/LabelHandler.js +47 -246
- package/src/og/entity/LabelWorker.js +213 -0
- package/src/og/entity/Object3d.js +504 -0
- package/src/og/entity/PointCloud.js +81 -33
- package/src/og/entity/PointCloudHandler.js +9 -9
- package/src/og/entity/Polyline.js +39 -39
- package/src/og/entity/Ray.js +61 -28
- package/src/og/entity/ShapeHandler.js +1 -1
- package/src/og/entity/Strip.js +77 -48
- package/src/og/entity/StripHandler.js +27 -27
- package/src/og/entity/index.js +8 -16
- package/src/og/input/KeyboardHandler.js +107 -104
- package/src/og/input/MouseHandler.js +81 -78
- package/src/og/input/TouchHandler.js +55 -51
- package/src/og/layer/BaseGeoImage.js +61 -30
- package/src/og/layer/CanvasTiles.js +26 -24
- package/src/og/layer/GeoImage.js +10 -10
- package/src/og/layer/GeoTexture2d.js +1 -1
- package/src/og/layer/GeoVideo.js +3 -3
- package/src/og/layer/KML.js +66 -40
- package/src/og/layer/Layer.js +27 -17
- package/src/og/layer/Material.js +93 -61
- package/src/og/layer/Vector.js +118 -72
- package/src/og/layer/WMS.js +36 -19
- package/src/og/layer/XYZ.js +55 -48
- package/src/og/light/LightSource.js +47 -40
- package/src/og/math/Line2.js +24 -24
- package/src/og/math/Line3.js +103 -102
- package/src/og/math/Mat3.js +134 -121
- package/src/og/math/Mat4.js +603 -459
- package/src/og/math/Plane.js +21 -20
- package/src/og/math/Quat.js +980 -927
- package/src/og/math/Ray.js +195 -187
- package/src/og/math/Vec2.js +127 -117
- package/src/og/math/Vec3.js +206 -176
- package/src/og/math/Vec4.js +49 -53
- package/src/og/math/coder.js +18 -18
- package/src/og/math.js +12 -12
- package/src/og/mercator.js +11 -11
- package/src/og/proj/EPSG3857.js +4 -4
- package/src/og/proj/EPSG4326.js +4 -4
- package/src/og/proj/Proj.js +31 -31
- package/src/og/quadTree/EntityCollectionNode.js +310 -300
- package/src/og/quadTree/Node.js +1008 -993
- package/src/og/renderer/Renderer.js +768 -747
- package/src/og/renderer/RendererEvents.js +9 -6
- package/src/og/scene/Axes.js +1 -1
- package/src/og/scene/BaseNode.js +8 -9
- package/src/og/scene/Planet.js +115 -87
- package/src/og/scene/RenderNode.js +29 -22
- package/src/og/scene/SkyBox.js +1 -1
- package/src/og/segment/Segment.js +1886 -1878
- package/src/og/segment/SegmentLonLat.js +298 -268
- package/src/og/segment/segmentHelper.js +11 -11
- package/src/og/shaders/bloom.js +1 -1
- package/src/og/shaders/blur.js +2 -2
- package/src/og/shaders/depth.js +1 -1
- package/src/og/shaders/geoObject.js +211 -0
- package/src/og/shaders/label.js +1 -1
- package/src/og/shaders/lumFilter.js +1 -1
- package/src/og/shaders/pointCloud.js +42 -42
- package/src/og/shaders/screenFrame.js +1 -1
- package/src/og/shaders/shape.js +15 -21
- package/src/og/shaders/skybox.js +37 -37
- package/src/og/shaders/toneMapping.js +1 -1
- package/src/og/shapes/BaseShape.js +129 -57
- package/src/og/shapes/Icosphere.js +30 -15
- package/src/og/shapes/Sphere.js +13 -16
- package/src/og/terrain/BilTerrain.js +2 -1
- package/src/og/terrain/EmptyTerrain.js +2 -2
- package/src/og/terrain/Geoid.js +2 -2
- package/src/og/terrain/GlobusTerrain.js +10 -10
- package/src/og/terrain/MapboxTerrain.js +1 -1
- package/src/og/utils/GeoImageCreator.js +9 -9
- package/src/og/utils/Loader.js +6 -6
- package/src/og/utils/NormalMapCreator.js +13 -13
- package/src/og/utils/TerrainWorker.js +1 -1
- package/src/og/utils/TextureAtlas.js +20 -22
- package/src/og/utils/VectorTileCreator.js +5 -5
- package/src/og/utils/earcut.js +1 -1
- package/src/og/utils/shared.js +15 -15
- package/src/og/webgl/Framebuffer.js +101 -53
- package/src/og/webgl/Handler.js +125 -85
- package/src/og/webgl/Multisample.js +55 -27
- package/src/og/webgl/Program.js +80 -35
- package/src/og/webgl/ProgramController.js +27 -23
- package/src/og/webgl/callbacks.js +8 -8
- package/types/Clock.d.ts +6 -2
- package/types/Deferred.d.ts +1 -1
- package/types/Events.d.ts +8 -4
- package/types/Extent.d.ts +37 -33
- package/types/Globe.d.ts +15 -13
- package/types/ImageCanvas.d.ts +5 -3
- package/types/LonLat.d.ts +24 -24
- package/types/Popup.d.ts +4 -0
- package/types/QueueArray.d.ts +6 -2
- package/types/Rectangle.d.ts +10 -4
- package/types/Stack.d.ts +4 -0
- package/types/ajax.d.ts +1 -1
- package/types/astro/earth.d.ts +3 -2
- package/types/bv/Box.d.ts +10 -5
- package/types/bv/Sphere.d.ts +13 -7
- package/types/camera/Camera.d.ts +90 -81
- package/types/camera/Frustum.d.ts +26 -22
- package/types/camera/PlanetCamera.d.ts +49 -53
- package/types/control/CompassButton.d.ts +4 -4
- package/types/control/Control.d.ts +7 -4
- package/types/control/DebugInfo.d.ts +3 -4
- package/types/control/EarthCoordinates.d.ts +6 -6
- package/types/control/EarthNavigation.d.ts +42 -0
- package/types/control/KeyboardNavigation.d.ts +3 -4
- package/types/control/LayerSwitcher.d.ts +3 -5
- package/types/control/Lighting.d.ts +3 -3
- package/types/control/MouseNavigation.d.ts +47 -0
- package/types/control/ScaleControl.d.ts +3 -3
- package/types/control/ShowFps.d.ts +3 -4
- package/types/control/SimpleNavigation.d.ts +3 -6
- package/types/control/Sun.d.ts +8 -10
- package/types/control/ToggleWireframe.d.ts +3 -3
- package/types/control/TouchNavigation.d.ts +48 -0
- package/types/control/ZoomControl.d.ts +3 -4
- package/types/control/index.d.ts +3 -1
- package/types/ellipsoid/Ellipsoid.d.ts +47 -43
- package/types/ellipsoid/wgs84.d.ts +3 -2
- package/types/entity/BaseBillboard.d.ts +41 -34
- package/types/entity/Billboard.d.ts +7 -7
- package/types/entity/BillboardHandler.d.ts +4 -0
- package/types/entity/Entity.d.ts +101 -83
- package/types/entity/EntityCollection.d.ts +57 -43
- package/types/entity/GeoObject.d.ts +111 -0
- package/types/entity/GeoObjectHandler.d.ts +77 -0
- package/types/entity/Geometry.d.ts +9 -7
- package/types/entity/GeometryHandler.d.ts +2 -2
- package/types/entity/Label.d.ts +24 -29
- package/types/entity/LabelHandler.d.ts +9 -2
- package/types/entity/LabelWorker.d.ts +9 -0
- package/types/entity/PointCloud.d.ts +8 -8
- package/types/entity/PointCloudHandler.d.ts +3 -3
- package/types/entity/Polyline.d.ts +58 -55
- package/types/entity/Ray.d.ts +19 -18
- package/types/entity/Strip.d.ts +8 -7
- package/types/entity/StripHandler.d.ts +3 -3
- package/types/entity/index.d.ts +7 -7
- package/types/input/KeyboardHandler.d.ts +10 -0
- package/types/input/MouseHandler.d.ts +5 -0
- package/types/input/TouchHandler.d.ts +5 -0
- package/types/layer/BaseGeoImage.d.ts +23 -35
- package/types/layer/CanvasTiles.d.ts +15 -22
- package/types/layer/GeoImage.d.ts +5 -18
- package/types/layer/GeoVideo.d.ts +5 -30
- package/types/layer/KML.d.ts +20 -15
- package/types/layer/Layer.d.ts +326 -0
- package/types/layer/Material.d.ts +45 -0
- package/types/layer/Vector.d.ts +208 -0
- package/types/layer/WMS.d.ts +4 -7
- package/types/layer/XYZ.d.ts +19 -25
- package/types/light/LightSource.d.ts +54 -53
- package/types/math/Line2.d.ts +11 -0
- package/types/math/Line3.d.ts +10 -0
- package/types/math/Mat3.d.ts +30 -18
- package/types/math/Mat4.d.ts +71 -52
- package/types/math/Plane.d.ts +5 -4
- package/types/math/Quat.d.ts +379 -0
- package/types/math/Ray.d.ts +82 -0
- package/types/math/Vec2.d.ts +102 -101
- package/types/math/Vec3.d.ts +143 -142
- package/types/math/Vec4.d.ts +40 -39
- package/types/math/coder.d.ts +12 -11
- package/types/math.d.ts +8 -8
- package/types/mercator.d.ts +3 -3
- package/types/proj/EPSG3857.d.ts +3 -2
- package/types/proj/EPSG4326.d.ts +3 -2
- package/types/proj/Proj.d.ts +42 -0
- package/types/quadTree/EntityCollectionNode.d.ts +34 -0
- package/types/quadTree/Node.d.ts +61 -0
- package/types/renderer/Renderer.d.ts +300 -0
- package/types/renderer/RendererEvents.d.ts +10 -7
- package/types/scene/BaseNode.d.ts +9 -9
- package/types/scene/Planet.d.ts +131 -126
- package/types/scene/RenderNode.d.ts +22 -23
- package/types/segment/Segment.d.ts +279 -0
- package/types/segment/SegmentLonLat.d.ts +16 -0
- package/types/shaders/geoObject.d.ts +3 -0
- package/types/shapes/BaseShape.d.ts +43 -40
- package/types/shapes/Sphere.d.ts +7 -7
- package/types/terrain/BilTerrain.d.ts +0 -1
- package/types/terrain/EmptyTerrain.d.ts +4 -4
- package/types/terrain/GlobusTerrain.d.ts +17 -54
- package/types/terrain/MapboxTerrain.d.ts +0 -1
- package/types/utils/GeoImageCreator.d.ts +3 -2
- package/types/utils/TextureAtlas.d.ts +8 -8
- package/types/utils/shared.d.ts +25 -24
- package/types/webgl/Framebuffer.d.ts +5 -5
- package/types/webgl/Handler.d.ts +68 -43
- package/types/webgl/Multisample.d.ts +5 -5
- package/types/webgl/Program.d.ts +8 -2
- package/types/webgl/ProgramController.d.ts +18 -13
- package/src/og/inherits.js +0 -8
- package/src/og/utils/polylabel.js +0 -176
- package/types/inherits.d.ts +0 -4
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents high level WebGL context interface that starts WebGL handler working in real time.
|
|
3
|
+
* @class
|
|
4
|
+
* @param {Handler} handler - WebGL handler context.
|
|
5
|
+
* @param {Object} [params] - Renderer parameters:
|
|
6
|
+
* @fires og.RendererEvents#draw
|
|
7
|
+
* @fires og.RendererEvents#resize
|
|
8
|
+
* @fires og.RendererEvents#mousemove
|
|
9
|
+
* @fires og.RendererEvents#mousestop
|
|
10
|
+
* @fires og.RendererEvents#lclick
|
|
11
|
+
* @fires og.RendererEvents#rclick
|
|
12
|
+
* @fires og.RendererEvents#mclick
|
|
13
|
+
* @fires og.RendererEvents#ldblclick
|
|
14
|
+
* @fires og.RendererEvents#rdblclick
|
|
15
|
+
* @fires og.RendererEvents#mdblclick
|
|
16
|
+
* @fires og.RendererEvents#lup
|
|
17
|
+
* @fires og.RendererEvents#rup
|
|
18
|
+
* @fires og.RendererEvents#mup
|
|
19
|
+
* @fires og.RendererEvents#ldown
|
|
20
|
+
* @fires og.RendererEvents#rdown
|
|
21
|
+
* @fires og.RendererEvents#mdown
|
|
22
|
+
* @fires og.RendererEvents#lhold
|
|
23
|
+
* @fires og.RendererEvents#rhold
|
|
24
|
+
* @fires og.RendererEvents#mhold
|
|
25
|
+
* @fires og.RendererEvents#mousewheel
|
|
26
|
+
* @fires og.RendererEvents#touchstart
|
|
27
|
+
* @fires og.RendererEvents#touchend
|
|
28
|
+
* @fires og.RendererEvents#touchcancel
|
|
29
|
+
* @fires og.RendererEvents#touchmove
|
|
30
|
+
* @fires og.RendererEvents#doubletouch
|
|
31
|
+
* @fires og.RendererEvents#touchleave
|
|
32
|
+
* @fires og.RendererEvents#touchenter
|
|
33
|
+
*/
|
|
34
|
+
export class Renderer {
|
|
35
|
+
constructor(handler: any, params: any);
|
|
36
|
+
/**
|
|
37
|
+
* Div element with WebGL canvas.
|
|
38
|
+
* @public
|
|
39
|
+
* @type {object}
|
|
40
|
+
*/
|
|
41
|
+
public div: object;
|
|
42
|
+
/**
|
|
43
|
+
* WebGL handler context.
|
|
44
|
+
* @public
|
|
45
|
+
* @type {Handler}
|
|
46
|
+
*/
|
|
47
|
+
public handler: Handler;
|
|
48
|
+
exposure: number;
|
|
49
|
+
gamma: number;
|
|
50
|
+
whitepoint: number;
|
|
51
|
+
brightThreshold: number;
|
|
52
|
+
backgroundColor: any;
|
|
53
|
+
/**
|
|
54
|
+
* Render nodes drawing queue.
|
|
55
|
+
* @private
|
|
56
|
+
* @type {Array.<scene.RenderNode>}
|
|
57
|
+
*/
|
|
58
|
+
private _renderNodesArr;
|
|
59
|
+
/**
|
|
60
|
+
* Render nodes store for the comfortable access by the node name.
|
|
61
|
+
* @public
|
|
62
|
+
* @type {Object.<og.scene.RenderNode>}
|
|
63
|
+
*/
|
|
64
|
+
public renderNodes: any;
|
|
65
|
+
/**
|
|
66
|
+
* Current active camera.
|
|
67
|
+
* @public
|
|
68
|
+
* @type {Camera}
|
|
69
|
+
*/
|
|
70
|
+
public activeCamera: Camera;
|
|
71
|
+
/**
|
|
72
|
+
* Renderer events. Represents interface for setting events like mousemove, draw, keypress etc.
|
|
73
|
+
* @public
|
|
74
|
+
* @type {RendererEvents}
|
|
75
|
+
*/
|
|
76
|
+
public events: RendererEvents;
|
|
77
|
+
/**
|
|
78
|
+
* OpenGlobus controls array.
|
|
79
|
+
* @public
|
|
80
|
+
* @type {Object}
|
|
81
|
+
*/
|
|
82
|
+
public controls: any;
|
|
83
|
+
/**
|
|
84
|
+
* Provides exchange between controls.
|
|
85
|
+
* @public
|
|
86
|
+
* @type {Object}
|
|
87
|
+
*/
|
|
88
|
+
public controlsBag: any;
|
|
89
|
+
/**
|
|
90
|
+
* Hash table for drawing objects.
|
|
91
|
+
* @public
|
|
92
|
+
* @type {Object}
|
|
93
|
+
*/
|
|
94
|
+
public colorObjects: any;
|
|
95
|
+
/**
|
|
96
|
+
* Color picking objects rendering queue.
|
|
97
|
+
* @type {Array.<Renderer~pickingCallback>}
|
|
98
|
+
*/
|
|
99
|
+
_pickingCallbacks: Array<Renderer>;
|
|
100
|
+
/**
|
|
101
|
+
* Picking objects(labels and billboards) framebuffer.
|
|
102
|
+
* @public
|
|
103
|
+
* @type {Framebuffer}
|
|
104
|
+
*/
|
|
105
|
+
public pickingFramebuffer: Framebuffer;
|
|
106
|
+
/**
|
|
107
|
+
* Depth objects rendering queue.
|
|
108
|
+
* @type {Array.<Renderer~depthCallback>}
|
|
109
|
+
*/
|
|
110
|
+
_depthCallbacks: Array<Renderer>;
|
|
111
|
+
depthFramebuffer: Framebuffer;
|
|
112
|
+
_msaa: any;
|
|
113
|
+
_internalFormat: string;
|
|
114
|
+
_format: string;
|
|
115
|
+
_type: string;
|
|
116
|
+
_screenScale: any;
|
|
117
|
+
sceneFramebuffer: Framebuffer | Multisample;
|
|
118
|
+
blitFramebuffer: Framebuffer;
|
|
119
|
+
toneMappingFramebuffer: Framebuffer;
|
|
120
|
+
/**
|
|
121
|
+
* Stores current picking rgb color.
|
|
122
|
+
* @private
|
|
123
|
+
* @type {Array.<number>} - (exactly 3 entries)
|
|
124
|
+
*/
|
|
125
|
+
private _currPickingColor;
|
|
126
|
+
/**
|
|
127
|
+
* Stores previous picked rgb color.
|
|
128
|
+
* @private
|
|
129
|
+
* @type {Array.<number>} - (exactly 3 entries)
|
|
130
|
+
*/
|
|
131
|
+
private _prevPickingColor;
|
|
132
|
+
_tempPickingColor_: Uint8Array;
|
|
133
|
+
_initialized: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Texture atlas for the billboards images. One atlas per node.
|
|
136
|
+
* @protected
|
|
137
|
+
* @type {utils.TextureAtlas}
|
|
138
|
+
*/
|
|
139
|
+
protected billboardsTextureAtlas: utils.TextureAtlas;
|
|
140
|
+
/**
|
|
141
|
+
* Texture font atlas for the font families and styles. One atlas per node.
|
|
142
|
+
* @public
|
|
143
|
+
* @type {utils.FontAtlas}
|
|
144
|
+
*/
|
|
145
|
+
public fontAtlas: utils.FontAtlas;
|
|
146
|
+
_entityCollections: any[];
|
|
147
|
+
_currentOutput: string;
|
|
148
|
+
labelWorker: LabelWorker;
|
|
149
|
+
/**
|
|
150
|
+
* Sets renderer events activity.
|
|
151
|
+
* @param {Boolean} activity - Events activity.
|
|
152
|
+
*/
|
|
153
|
+
setEventsActivity(activity: boolean): void;
|
|
154
|
+
setScreenScale(scale: any): void;
|
|
155
|
+
addDepthCallback(sender: any, callback: any): number;
|
|
156
|
+
removeDepthCallback(id: any): void;
|
|
157
|
+
/**
|
|
158
|
+
* Adds picking rendering callback function.
|
|
159
|
+
* @param {object} sender - Callback context.
|
|
160
|
+
* @param {Renderer~pickingCallback} callback - Rendering callback.
|
|
161
|
+
* @returns {Number} Handler id
|
|
162
|
+
*/
|
|
163
|
+
addPickingCallback(sender: object, callback: any): number;
|
|
164
|
+
/**
|
|
165
|
+
* Removes picking rendering callback function.
|
|
166
|
+
* @param {Number} id - Handler id to remove.
|
|
167
|
+
*/
|
|
168
|
+
removePickingCallback(id: number): void;
|
|
169
|
+
getPickingObjectByColor(r: any, g: any, b: any): any;
|
|
170
|
+
/**
|
|
171
|
+
* Assign picking color to the object.
|
|
172
|
+
* @public
|
|
173
|
+
* @param {Object} obj - Object that pressume to be picked.
|
|
174
|
+
*/
|
|
175
|
+
public assignPickingColor(obj: any): void;
|
|
176
|
+
/**
|
|
177
|
+
* Removes picking color from object.
|
|
178
|
+
* @public
|
|
179
|
+
* @param {Object} obj - Object to remove picking color.
|
|
180
|
+
*/
|
|
181
|
+
public clearPickingColor(obj: any): void;
|
|
182
|
+
/**
|
|
183
|
+
* Get the client width.
|
|
184
|
+
* @public
|
|
185
|
+
* @returns {number} -
|
|
186
|
+
*/
|
|
187
|
+
public getWidth(): number;
|
|
188
|
+
/**
|
|
189
|
+
* Get the client height.
|
|
190
|
+
* @public
|
|
191
|
+
* @returns {number} -
|
|
192
|
+
*/
|
|
193
|
+
public getHeight(): number;
|
|
194
|
+
/**
|
|
195
|
+
* Get center of the screen
|
|
196
|
+
* @public
|
|
197
|
+
* @returns {math.Vec2} -
|
|
198
|
+
*/
|
|
199
|
+
public getCenter(): math.Vec2;
|
|
200
|
+
/**
|
|
201
|
+
* Add the given control to the renderer.
|
|
202
|
+
* @param {control.Control} control - Control.
|
|
203
|
+
*/
|
|
204
|
+
addControl(control: control.Control): void;
|
|
205
|
+
/**
|
|
206
|
+
* Add the given controls array to the planet node.
|
|
207
|
+
* @param {Array.<control.Control>} cArr - Control array.
|
|
208
|
+
*/
|
|
209
|
+
addControls(cArr: Array<control.Control>): void;
|
|
210
|
+
/**
|
|
211
|
+
* Remove control from the renderer.
|
|
212
|
+
* @param {control.Control} control - Control.
|
|
213
|
+
*/
|
|
214
|
+
removeControl(control: control.Control): void;
|
|
215
|
+
/**
|
|
216
|
+
* Renderer initialization.
|
|
217
|
+
* @public
|
|
218
|
+
*/
|
|
219
|
+
public initialize(): void;
|
|
220
|
+
screenDepthFramebuffer: Framebuffer;
|
|
221
|
+
readPixels: () => void;
|
|
222
|
+
_fnScreenFrame: () => void;
|
|
223
|
+
screenTexture: {
|
|
224
|
+
screen: any;
|
|
225
|
+
picking: any;
|
|
226
|
+
depth: any;
|
|
227
|
+
frustum?: undefined;
|
|
228
|
+
} | {
|
|
229
|
+
screen: any;
|
|
230
|
+
picking: any;
|
|
231
|
+
depth: any;
|
|
232
|
+
frustum: any;
|
|
233
|
+
};
|
|
234
|
+
_screenFrameCornersBuffer: any;
|
|
235
|
+
outputTexture: any;
|
|
236
|
+
setCurrentScreen(screenName: any): void;
|
|
237
|
+
_resize(): void;
|
|
238
|
+
removeNode(renderNode: any): void;
|
|
239
|
+
/**
|
|
240
|
+
* Adds render node to the renderer.
|
|
241
|
+
* @public
|
|
242
|
+
* @param {RenderNode} renderNode - Render node.
|
|
243
|
+
*/
|
|
244
|
+
public addNode(renderNode: RenderNode): void;
|
|
245
|
+
/**
|
|
246
|
+
* Adds render node to the renderer before specific node.
|
|
247
|
+
* @public
|
|
248
|
+
* @param {RenderNode} renderNode - Render node.
|
|
249
|
+
*/
|
|
250
|
+
public addNodeBefore(renderNode: RenderNode, renderNodeBefore: any): void;
|
|
251
|
+
/**
|
|
252
|
+
* Adds render nodes array to the renderer.
|
|
253
|
+
* @public
|
|
254
|
+
* @param {Array.<scene.RenderNode>} nodesArr - Render nodes array.
|
|
255
|
+
*/
|
|
256
|
+
public addNodes(nodesArr: Array<scene.RenderNode>): void;
|
|
257
|
+
getMaxMSAA(internalFormat: any): any;
|
|
258
|
+
getMSAA(): any;
|
|
259
|
+
/**
|
|
260
|
+
* TODO: replace with cahce frendly linked list by bilboardHandler, label handler etc.
|
|
261
|
+
*/
|
|
262
|
+
enqueueEntityCollectionsToDraw(ecArr: any): void;
|
|
263
|
+
/**
|
|
264
|
+
* Draws entity collections.
|
|
265
|
+
* @public
|
|
266
|
+
* @param {Array<og.EntityCollection>} ec - Entity collection array.
|
|
267
|
+
*/
|
|
268
|
+
public _drawEntityCollections(): void;
|
|
269
|
+
/**
|
|
270
|
+
* Draw nodes.
|
|
271
|
+
* @public
|
|
272
|
+
*/
|
|
273
|
+
public draw(): void;
|
|
274
|
+
_screenFrameMSAA(): void;
|
|
275
|
+
_screenFrameNoMSAA(): void;
|
|
276
|
+
/**
|
|
277
|
+
* Returns picking object by screen coordinates
|
|
278
|
+
* @param {number} x - X position
|
|
279
|
+
* @param {number} y - Y position
|
|
280
|
+
* @return {Object} -
|
|
281
|
+
*/
|
|
282
|
+
getPickingObject(x: number, y: number): any;
|
|
283
|
+
/**
|
|
284
|
+
* Draw picking objects framebuffer.
|
|
285
|
+
* @private
|
|
286
|
+
*/
|
|
287
|
+
private _drawPickingBuffer;
|
|
288
|
+
_drawDepthBuffer(frustumIndex: any): void;
|
|
289
|
+
_readPickingColor(): void;
|
|
290
|
+
/**
|
|
291
|
+
* Function starts rendering.
|
|
292
|
+
* @public
|
|
293
|
+
*/
|
|
294
|
+
public start(): void;
|
|
295
|
+
}
|
|
296
|
+
import { Camera } from "../camera/Camera.js";
|
|
297
|
+
import { RendererEvents } from "./RendererEvents.js";
|
|
298
|
+
import { Framebuffer } from "../webgl/index.js";
|
|
299
|
+
import { Multisample } from "../webgl/index.js";
|
|
300
|
+
import { LabelWorker } from "../entity/LabelWorker.js";
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Renderer events handler.
|
|
3
3
|
* @class
|
|
4
|
-
* @param {
|
|
4
|
+
* @param {Renderer} renderer - Renderer object, events that works for.
|
|
5
5
|
*/
|
|
6
6
|
export class RendererEvents extends Events {
|
|
7
7
|
constructor(renderer: any);
|
|
8
8
|
/**
|
|
9
9
|
* Assigned renderer.
|
|
10
10
|
* @public
|
|
11
|
-
* @type {
|
|
11
|
+
* @type {Renderer}
|
|
12
12
|
*/
|
|
13
|
-
public renderer:
|
|
13
|
+
public renderer: Renderer;
|
|
14
14
|
/**
|
|
15
15
|
* Low level touch events handler.
|
|
16
16
|
* @private
|
|
17
|
-
* @type {
|
|
17
|
+
* @type {input.TouchHandler}
|
|
18
18
|
*/
|
|
19
19
|
private _touchHandler;
|
|
20
20
|
/**
|
|
21
21
|
* Low level mouse events handler.
|
|
22
22
|
* @private
|
|
23
|
-
* @type {
|
|
23
|
+
* @type {input.MouseHandler}
|
|
24
24
|
*/
|
|
25
25
|
private _mouseHandler;
|
|
26
26
|
/**
|
|
27
27
|
* Low level keyboard events handler.
|
|
28
28
|
* @private
|
|
29
|
-
* @type {
|
|
29
|
+
* @type {input.KeyboardHandler}
|
|
30
30
|
*/
|
|
31
31
|
private _keyboardHandler;
|
|
32
32
|
_active: boolean;
|
|
@@ -141,7 +141,10 @@ export class RendererEvents extends Events {
|
|
|
141
141
|
_dblTchCoords: Vec2;
|
|
142
142
|
_oneTouchStart: boolean;
|
|
143
143
|
_dblTchBegins: number;
|
|
144
|
-
|
|
144
|
+
/**
|
|
145
|
+
* @type {number}
|
|
146
|
+
*/
|
|
147
|
+
_mousestopThread: number;
|
|
145
148
|
_ldblClkBegins: number;
|
|
146
149
|
_rdblClkBegins: number;
|
|
147
150
|
_mdblClkBegins: number;
|
|
@@ -16,27 +16,27 @@ export class BaseNode {
|
|
|
16
16
|
/**
|
|
17
17
|
* Top scene tree node pointer.
|
|
18
18
|
* @public
|
|
19
|
-
* @type {
|
|
19
|
+
* @type {RenderNode}
|
|
20
20
|
*/
|
|
21
|
-
public topNode:
|
|
21
|
+
public topNode: RenderNode;
|
|
22
22
|
_dictionary: BaseNode[];
|
|
23
23
|
/**
|
|
24
24
|
* Children nodes.
|
|
25
25
|
* @public
|
|
26
|
-
* @type {Array.<
|
|
26
|
+
* @type {Array.<RenderNode>}
|
|
27
27
|
*/
|
|
28
|
-
public childNodes: Array<
|
|
28
|
+
public childNodes: Array<RenderNode>;
|
|
29
29
|
/**
|
|
30
30
|
* Parent node pointer.
|
|
31
31
|
* @public
|
|
32
|
-
* @type {
|
|
32
|
+
* @type {RenderNode}
|
|
33
33
|
*/
|
|
34
|
-
public parentNode:
|
|
34
|
+
public parentNode: RenderNode;
|
|
35
35
|
__staticId: number;
|
|
36
36
|
/**
|
|
37
37
|
* Adds node to the current hierarchy.
|
|
38
38
|
* @public
|
|
39
|
-
* @type {
|
|
39
|
+
* @type {BaseNode}
|
|
40
40
|
*/
|
|
41
41
|
public addNode(node: any): void;
|
|
42
42
|
/**
|
|
@@ -48,9 +48,9 @@ export class BaseNode {
|
|
|
48
48
|
* Gets node by name in the current.
|
|
49
49
|
* @public
|
|
50
50
|
* @param {string} name - Node name.
|
|
51
|
-
* @return {
|
|
51
|
+
* @return {RenderNode} Node object in the current node.
|
|
52
52
|
*/
|
|
53
|
-
public getNodeByName(name: string):
|
|
53
|
+
public getNodeByName(name: string): RenderNode;
|
|
54
54
|
/**
|
|
55
55
|
* Clear current node.
|
|
56
56
|
* @protected
|