@openglobus/og 0.28.7 → 1.0.0-rc2

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.
Files changed (220) hide show
  1. package/LICENSE.md +218 -4
  2. package/README.md +31 -18
  3. package/lib/Deferred.d.ts +2 -2
  4. package/lib/Events.d.ts +1 -1
  5. package/lib/Globe.d.ts +8 -5
  6. package/lib/Object3d.d.ts +17 -14
  7. package/lib/Popup.d.ts +2 -2
  8. package/lib/assets/LabelWorker.worker-DYd7xn3M.js.map +1 -0
  9. package/lib/assets/PlainSegmentWorker.worker-JsKldq-e.js.map +1 -0
  10. package/lib/assets/TerrainWorker.worker-CqUJvMOv.js.map +1 -0
  11. package/lib/bv/index.d.ts +2 -2
  12. package/lib/camera/Camera.d.ts +280 -27
  13. package/lib/camera/Frustum.d.ts +100 -15
  14. package/lib/camera/PlanetCamera.d.ts +93 -8
  15. package/lib/camera/index.d.ts +2 -2
  16. package/lib/control/CameraFrameComposer.d.ts +2 -2
  17. package/lib/control/CameraFrameHandler.d.ts +1 -1
  18. package/lib/control/CompassButton.d.ts +2 -2
  19. package/lib/control/EarthCoordinates.d.ts +5 -2
  20. package/lib/control/FramebufferPreview.d.ts +3 -3
  21. package/lib/control/GeoImageDragControl.d.ts +1 -1
  22. package/lib/control/LayerAnimation.d.ts +2 -2
  23. package/lib/control/LayerSwitcher.d.ts +3 -0
  24. package/lib/control/Lighting.d.ts +4 -2
  25. package/lib/control/Navigation.d.ts +15 -11
  26. package/lib/control/OrthoSwitcher.d.ts +18 -0
  27. package/lib/control/SimpleTouchNavigation.d.ts +44 -0
  28. package/lib/control/Sun.d.ts +4 -2
  29. package/lib/control/TouchNavigation.d.ts +4 -8
  30. package/lib/control/atmosphere/Atmosphere.d.ts +2 -0
  31. package/lib/control/atmosphere/AtmosphereConfig.d.ts +2 -6
  32. package/lib/control/cameraDepthHandler/CameraDepthHandler.d.ts +17 -3
  33. package/lib/control/cameraDepthHandler/camera_depth.d.ts +2 -2
  34. package/lib/control/drawing/LineStringDrawingScene.d.ts +1 -0
  35. package/lib/control/drawing/PolygonDrawingScene.d.ts +14 -14
  36. package/lib/control/elevationProfile/ElevationProfile.d.ts +1 -1
  37. package/lib/control/elevationProfile/ElevationProfileLegend.d.ts +1 -1
  38. package/lib/control/elevationProfile/ElevationProfileScene.d.ts +9 -12
  39. package/lib/control/elevationProfile/ElevationProfileView.d.ts +16 -5
  40. package/lib/control/entityEditor/EntityEditor.d.ts +19 -0
  41. package/lib/control/{geoObjectEditor/GeoObjectEditorDialog.d.ts → entityEditor/EntityEditorDialog.d.ts} +9 -8
  42. package/lib/control/{geoObjectEditor/GeoObjectEditorScene.d.ts → entityEditor/EntityEditorScene.d.ts} +12 -12
  43. package/lib/control/{geoObjectEditor → entityEditor}/colors.d.ts +2 -2
  44. package/lib/control/entityTree/EntityTree.d.ts +46 -0
  45. package/lib/control/entityTree/EntityTreeView.d.ts +24 -0
  46. package/lib/control/heightRuler/HeightRulerScene.d.ts +3 -2
  47. package/lib/control/index.d.ts +5 -3
  48. package/lib/control/ruler/RulerScene.d.ts +8 -8
  49. package/lib/control/selection/SelectionScene.d.ts +6 -6
  50. package/lib/control/timeline/TimelineControl.d.ts +2 -2
  51. package/lib/control/timeline/TimelineModel.d.ts +1 -1
  52. package/lib/control/timeline/TimelineView.d.ts +52 -13
  53. package/lib/control/visibleExtent/segment.d.ts +7 -0
  54. package/lib/ellipsoid/index.d.ts +4 -4
  55. package/lib/entity/Entity.d.ts +114 -100
  56. package/lib/entity/EntityCollection.d.ts +95 -70
  57. package/lib/entity/{BaseBillboard.d.ts → billboard/BaseBillboard.d.ts} +16 -17
  58. package/lib/entity/{BaseBillboardHandler.d.ts → billboard/BaseBillboardHandler.d.ts} +24 -9
  59. package/lib/entity/{Billboard.d.ts → billboard/Billboard.d.ts} +11 -7
  60. package/lib/entity/{BillboardHandler.d.ts → billboard/BillboardHandler.d.ts} +1 -1
  61. package/lib/entity/{GeoObject.d.ts → geoObject/GeoObject.d.ts} +7 -6
  62. package/lib/entity/{GeoObjectHandler.d.ts → geoObject/GeoObjectHandler.d.ts} +29 -11
  63. package/lib/entity/{InstanceData.d.ts → geoObject/InstanceData.d.ts} +18 -13
  64. package/lib/entity/{Geometry.d.ts → geometry/Geometry.d.ts} +10 -10
  65. package/lib/entity/{GeometryHandler.d.ts → geometry/GeometryHandler.d.ts} +7 -7
  66. package/lib/entity/index.d.ts +8 -8
  67. package/lib/entity/{Label.d.ts → label/Label.d.ts} +12 -13
  68. package/lib/entity/{LabelHandler.d.ts → label/LabelHandler.d.ts} +31 -7
  69. package/lib/entity/{LabelWorker.d.ts → label/LabelWorker.d.ts} +3 -3
  70. package/lib/entity/{PointCloud.d.ts → pointCloud/PointCloud.d.ts} +18 -12
  71. package/lib/entity/{PointCloudHandler.d.ts → pointCloud/PointCloudHandler.d.ts} +4 -4
  72. package/lib/entity/polyline/Polyline.d.ts +242 -0
  73. package/lib/entity/polyline/PolylineBatchRenderer.d.ts +443 -0
  74. package/lib/entity/{PolylineHandler.d.ts → polyline/PolylineHandler.d.ts} +19 -7
  75. package/lib/entity/{Ray.d.ts → ray/Ray.d.ts} +27 -9
  76. package/lib/entity/{RayHandler.d.ts → ray/RayHandler.d.ts} +18 -8
  77. package/lib/entity/{Strip.d.ts → strip/Strip.d.ts} +21 -17
  78. package/lib/entity/{StripHandler.d.ts → strip/StripHandler.d.ts} +11 -6
  79. package/lib/index.d.ts +47 -42
  80. package/lib/layer/BaseGeoImage.d.ts +20 -17
  81. package/lib/layer/CanvasTiles.d.ts +14 -12
  82. package/lib/layer/GeoImage.d.ts +1 -1
  83. package/lib/layer/GeoTexture2d.d.ts +2 -2
  84. package/lib/layer/KML.d.ts +19 -18
  85. package/lib/layer/Layer.d.ts +72 -53
  86. package/lib/layer/Vector.d.ts +47 -30
  87. package/lib/layer/WMS.d.ts +1 -1
  88. package/lib/layer/XYZ.d.ts +11 -12
  89. package/lib/layer/index.d.ts +12 -12
  90. package/lib/math/Line2.d.ts +1 -1
  91. package/lib/math/Line3.d.ts +1 -1
  92. package/lib/math/Mat3.d.ts +3 -13
  93. package/lib/math/Mat4.d.ts +16 -10
  94. package/lib/math/Plane.d.ts +1 -1
  95. package/lib/math/Quat.d.ts +14 -12
  96. package/lib/math/Ray.d.ts +4 -3
  97. package/lib/math/Vec2.d.ts +25 -17
  98. package/lib/math/Vec3.d.ts +33 -31
  99. package/lib/math/Vec4.d.ts +1 -1
  100. package/lib/math/coder.d.ts +1 -1
  101. package/lib/math/index.d.ts +13 -14
  102. package/lib/mercator.d.ts +4 -4
  103. package/lib/og.css +1 -1
  104. package/lib/og.es.js +1 -1
  105. package/lib/og.es.js.map +1 -1
  106. package/lib/quadTree/EntityCollectionNode.d.ts +10 -10
  107. package/lib/quadTree/EntityCollectionsTreeStrategy.d.ts +5 -5
  108. package/lib/quadTree/QuadTreeStrategy.d.ts +3 -4
  109. package/lib/quadTree/earth/EarthEntityCollectionNodeLonLat.d.ts +4 -4
  110. package/lib/quadTree/earth/EarthEntityCollectionsTreeStrategy.d.ts +4 -4
  111. package/lib/renderer/AtmosphereDeferredShading.d.ts +12 -0
  112. package/lib/renderer/IDeferredShadingPass.d.ts +8 -0
  113. package/lib/renderer/ITransparencyPass.d.ts +8 -0
  114. package/lib/renderer/PhongDeferredShading.d.ts +16 -0
  115. package/lib/renderer/Renderer.d.ts +166 -99
  116. package/lib/renderer/RendererEvents.d.ts +15 -5
  117. package/lib/renderer/WOITPass.d.ts +14 -0
  118. package/lib/res/fonts/Ephesis-Regular.json +1 -0
  119. package/lib/res/fonts/Ephesis-Regular.png +0 -0
  120. package/lib/res/fonts/Karla-Bold.json +1 -0
  121. package/lib/res/fonts/Karla-Bold.png +0 -0
  122. package/lib/res/fonts/Karla-Italic.json +1 -0
  123. package/lib/res/fonts/Karla-Italic.png +0 -0
  124. package/lib/res/fonts/Karla-Light.json +1 -0
  125. package/lib/res/fonts/Karla-Light.png +0 -0
  126. package/lib/res/fonts/Karla-Medium.json +1 -0
  127. package/lib/res/fonts/Karla-Medium.png +0 -0
  128. package/lib/res/fonts/Roboto-Regular.json +1 -37147
  129. package/lib/res/fonts/Roboto-Regular.png +0 -0
  130. package/lib/res/fonts/arial.json +1 -4321
  131. package/lib/res/fonts/arial.png +0 -0
  132. package/lib/res/night-4326.png +0 -0
  133. package/lib/res/night.png +0 -0
  134. package/lib/scene/AltitudeNearPlaneStrategy.d.ts +17 -0
  135. package/lib/scene/Axes.d.ts +4 -3
  136. package/lib/scene/Planet.d.ts +244 -69
  137. package/lib/scene/{RenderNode.d.ts → Scene.d.ts} +49 -46
  138. package/lib/scene/SkyBox.d.ts +5 -3
  139. package/lib/scene/index.d.ts +2 -2
  140. package/lib/segment/Segment.d.ts +29 -15
  141. package/lib/segment/SegmentLonLat.d.ts +0 -1
  142. package/lib/shadeModeConstants.d.ts +7 -0
  143. package/lib/shaders/applyDeferredDepth.d.ts +2 -0
  144. package/lib/shaders/atmos/atmos.d.ts +3 -3
  145. package/lib/shaders/billboard/billboard.d.ts +4 -3
  146. package/lib/shaders/deferredShading/deferredShading.d.ts +2 -0
  147. package/lib/shaders/deferredShading/deferredShadingAtmos.d.ts +3 -0
  148. package/lib/shaders/depth.d.ts +2 -2
  149. package/lib/shaders/geo_object/geo_object.d.ts +8 -4
  150. package/lib/shaders/label/label.d.ts +4 -4
  151. package/lib/shaders/pointCloud.d.ts +2 -2
  152. package/lib/shaders/polyline/polyline.d.ts +7 -3
  153. package/lib/shaders/ray/ray.d.ts +3 -2
  154. package/lib/shaders/screenFrame.d.ts +2 -2
  155. package/lib/shaders/segment/segment.d.ts +7 -0
  156. package/lib/shaders/skybox.d.ts +2 -2
  157. package/lib/shaders/strip/strip.d.ts +3 -0
  158. package/lib/shaders/tone_mapping/toneMapping.d.ts +2 -2
  159. package/lib/shaders/weightedOITResolve.d.ts +2 -0
  160. package/lib/terrain/BilTerrain.d.ts +1 -1
  161. package/lib/terrain/EmptyTerrain.d.ts +5 -6
  162. package/lib/terrain/GlobusTerrain.d.ts +18 -23
  163. package/lib/terrain/RgbTerrain.d.ts +8 -8
  164. package/lib/terrain/index.d.ts +5 -5
  165. package/lib/tsconfig.tsbuildinfo +1 -1
  166. package/lib/ui/Button.d.ts +7 -5
  167. package/lib/ui/ButtonGroup.d.ts +1 -1
  168. package/lib/ui/Checkbox.d.ts +2 -2
  169. package/lib/ui/Color.d.ts +2 -2
  170. package/lib/ui/Dialog.d.ts +30 -3
  171. package/lib/ui/Input.d.ts +7 -2
  172. package/lib/ui/Slider.d.ts +5 -2
  173. package/lib/ui/ToggleButton.d.ts +2 -2
  174. package/lib/ui/View.d.ts +1 -1
  175. package/lib/ui/icons.d.ts +1 -1
  176. package/lib/ui/index.d.ts +9 -9
  177. package/lib/utils/FontAtlas.d.ts +57 -8
  178. package/lib/utils/GeoImageCreator.d.ts +2 -2
  179. package/lib/utils/ImagesCacheManager.d.ts +3 -3
  180. package/lib/utils/Loader.d.ts +2 -2
  181. package/lib/utils/PlainSegmentWorker.d.ts +2 -2
  182. package/lib/utils/TerrainWorker.d.ts +2 -2
  183. package/lib/utils/TextureAtlas.d.ts +7 -2
  184. package/lib/utils/TextureResourceManager.d.ts +162 -0
  185. package/lib/utils/VectorTileCreator.d.ts +1 -1
  186. package/lib/utils/colorSpace.d.ts +9 -0
  187. package/lib/utils/gltf/gltfParser.d.ts +9 -2
  188. package/lib/utils/gltf/types.d.ts +20 -2
  189. package/lib/utils/shared.d.ts +11 -5
  190. package/lib/utils/textureResourceMeta.d.ts +9 -0
  191. package/lib/webgl/BaseFramebuffer.d.ts +7 -0
  192. package/lib/webgl/Framebuffer.d.ts +9 -6
  193. package/lib/webgl/Handler.d.ts +81 -99
  194. package/lib/webgl/ShaderProgram.d.ts +190 -0
  195. package/lib/webgl/index.d.ts +2 -2
  196. package/lib/webgl/variableHandlers.d.ts +2 -1
  197. package/package.json +77 -76
  198. package/lib/assets/LabelWorker.worker-BT1uJgYn.js.map +0 -1
  199. package/lib/assets/PlainSegmentWorker.worker-CT1cj8jj.js.map +0 -1
  200. package/lib/assets/TerrainWorker.worker-DmikdfB2.js.map +0 -1
  201. package/lib/control/OldMouseNavigation.d.ts +0 -65
  202. package/lib/control/ZoomControl.d.ts +0 -28
  203. package/lib/control/geoObjectEditor/GeoObjectEditor.d.ts +0 -13
  204. package/lib/control/visibleExtent/drawnode.d.ts +0 -7
  205. package/lib/entity/Polyline.d.ts +0 -417
  206. package/lib/light/LightSource.d.ts +0 -36
  207. package/lib/res/fonts/Roboto-Regular.ttf.cfg +0 -1340
  208. package/lib/res/fonts/Roboto-Regular.ttf.png +0 -0
  209. package/lib/res/fonts/arial.ttf.cfg +0 -1570
  210. package/lib/res/fonts/arial.ttf.png +0 -0
  211. package/lib/scene/BaseNode.d.ts +0 -61
  212. package/lib/shaders/drawnode/drawnode.d.ts +0 -8
  213. package/lib/webgl/Program.d.ts +0 -161
  214. package/lib/webgl/ProgramController.d.ts +0 -87
  215. /package/lib/control/{geoObjectEditor → entityEditor}/ArrowEntity.d.ts +0 -0
  216. /package/lib/control/{geoObjectEditor → entityEditor}/AxisTrackEntity.d.ts +0 -0
  217. /package/lib/control/{geoObjectEditor → entityEditor}/MoveAxisEntity.d.ts +0 -0
  218. /package/lib/control/{geoObjectEditor → entityEditor}/MovePlaneEntity.d.ts +0 -0
  219. /package/lib/control/{geoObjectEditor → entityEditor}/RotateEntity.d.ts +0 -0
  220. /package/lib/entity/{LabelWorker.worker.d.ts → label/LabelWorker.worker.d.ts} +0 -0
@@ -1,78 +1,88 @@
1
- import { BillboardHandler } from "./BillboardHandler";
1
+ import { BillboardHandler } from "./billboard/BillboardHandler";
2
2
  import type { EventsHandler } from "../Events";
3
- import { Entity } from "./Entity";
3
+ import type { Entity } from "./Entity";
4
4
  import { Ellipsoid } from "../ellipsoid/Ellipsoid";
5
- import { EntityCollectionNode } from "../quadTree/EntityCollectionNode";
6
- import { GeoObjectHandler } from "./GeoObjectHandler";
7
- import { LabelHandler } from "./LabelHandler";
5
+ import { Extent } from "../Extent";
6
+ import type { EntityCollectionNode } from "../quadTree/EntityCollectionNode";
7
+ import { GeoObjectHandler } from "./geoObject/GeoObjectHandler";
8
+ import { LabelHandler } from "./label/LabelHandler";
8
9
  import { Vec3 } from "../math/Vec3";
9
10
  import type { NumberArray3 } from "../math/Vec3";
10
- import { PointCloudHandler } from "./PointCloudHandler";
11
- import { PolylineHandler } from "./PolylineHandler";
12
- import { RayHandler } from "./RayHandler";
13
- import { RenderNode } from "../scene/RenderNode";
14
- import { StripHandler } from "./StripHandler";
15
- import { Vector } from "../layer/Vector";
11
+ import { PointCloudHandler } from "./pointCloud/PointCloudHandler";
12
+ import { PolylineHandler } from "./polyline/PolylineHandler";
13
+ import { RayHandler } from "./ray/RayHandler";
14
+ import { Scene } from "../scene/Scene";
15
+ import type { Node } from "../quadTree/Node";
16
+ import { StripHandler } from "./strip/StripHandler";
17
+ import type { Vector } from "../layer/Vector";
18
+ import { type ShadeMode, type ShadeModeInput } from "../shadeModeConstants";
16
19
  export type EntityCollectionEvents = EventsHandler<EntityCollectionEventList>;
17
20
  interface IEntityCollectionParams {
18
- polygonOffsetUnits?: number;
21
+ depthOffset?: number;
19
22
  visibility?: boolean;
20
23
  labelMaxLetters?: number;
21
24
  pickingEnabled?: boolean;
22
25
  scaleByDistance?: NumberArray3;
23
26
  pickingScale?: number | NumberArray3;
24
27
  opacity?: number;
25
- useLighting?: boolean;
28
+ shadeMode?: ShadeModeInput;
26
29
  entities?: Entity[];
27
30
  depthOrder?: number;
31
+ disableCullFace?: boolean;
28
32
  }
29
33
  /**
30
34
  * An observable collection of og.Entity instances where each entity has a unique id.
31
- * Entity collection provide handlers for each type of entity like billboard, label or 3ds object.
35
+ * Entity collection provides handlers for each type of entity like billboard, label or 3ds object.
32
36
  * @constructor
33
37
  * @param {Object} [options] - Entity options:
34
38
  * @param {Array.<Entity>} [options.entities] - Entities array.
35
39
  * @param {boolean} [options.visibility=true] - Entity visibility.
40
+ * @param {number} [options.labelMaxLetters] - Maximum label letters per line used by the label handler.
41
+ * @param {boolean} [options.pickingEnabled] - Enables/disables picking for all entity handlers.
36
42
  * @param {Array.<number>} [options.scaleByDistance] - Entity scale by distance parameters. (exactly 3 entries)
37
43
  * First index - near distance to the entity, after entity becomes full scale.
38
44
  * Second index - far distance to the entity, when entity becomes zero scale.
39
45
  * Third index - far distance to the entity, when entity becomes invisible.
46
+ * @param {number|Array.<number>} [options.pickingScale] - Picking scale value or xyz scale array.
40
47
  * @param {number} [options.opacity] - Entity global opacity.
41
- * @param {boolean} [options.pickingEnabled=true] - Entity picking enable.
42
- * @param {Number} [options.polygonOffsetUnits=0.0] - The multiplier by which an implementation-specific value is multiplied with to create a constant depth offset. The default value is 0.
43
- * //@fires EntityCollection#entitymove
44
- * @fires EntityCollection#draw
45
- * @fires EntityCollection#drawend
46
- * @fires EntityCollection#add
47
- * @fires EntityCollection#remove
48
- * @fires EntityCollection#entityadd
49
- * @fires EntityCollection#entityremove
50
- * @fires EntityCollection#visibilitychange
51
- * @fires EntityCollection#mousemove
52
- * @fires EntityCollection#mouseenter
53
- * @fires EntityCollection#mouseleave
54
- * @fires EntityCollection#lclick
55
- * @fires EntityCollection#rclick
56
- * @fires EntityCollection#mclick
57
- * @fires EntityCollection#ldblclick
58
- * @fires EntityCollection#rdblclick
59
- * @fires EntityCollection#mdblclick
60
- * @fires EntityCollection#lup
61
- * @fires EntityCollection#rup
62
- * @fires EntityCollection#mup
63
- * @fires EntityCollection#ldown
64
- * @fires EntityCollection#rdown
65
- * @fires EntityCollection#mdown
66
- * @fires EntityCollection#lhold
67
- * @fires EntityCollection#rhold
68
- * @fires EntityCollection#mhold
69
- * @fires EntityCollection#mousewheel
70
- * @fires EntityCollection#touchmove
71
- * @fires EntityCollection#touchstart
72
- * @fires EntityCollection#touchend
73
- * @fires EntityCollection#doubletouch
74
- * @fires EntityCollection#touchleave
75
- * @fires EntityCollection#touchenter
48
+ * @param {number|string} [options.shadeMode=1] - Geo object shading mode: `0|none|unlit`, `0.5|phong`, `1|pbr`.
49
+ * @param {number} [options.depthOrder=0] - Rendering order for grouped vector layer collections.
50
+ * @param {Number} [options.depthOffset=0.0] - Signed world-space depth offset along the camera ray.
51
+ * Negative values move geometry closer to the camera, positive values move it farther.
52
+ * @param {boolean} [options.disableCullFace=false] - Disables back-face culling for geo object rendering.
53
+ * //@fires entitymove
54
+ * @fires draw
55
+ * @fires drawend
56
+ * @fires add
57
+ * @fires remove
58
+ * @fires entityadd
59
+ * @fires entityremove
60
+ * @fires visibilitychange
61
+ * @fires mousemove
62
+ * @fires mouseenter
63
+ * @fires mouseleave
64
+ * @fires lclick
65
+ * @fires rclick
66
+ * @fires mclick
67
+ * @fires ldblclick
68
+ * @fires rdblclick
69
+ * @fires mdblclick
70
+ * @fires lup
71
+ * @fires rup
72
+ * @fires mup
73
+ * @fires ldown
74
+ * @fires rdown
75
+ * @fires mdown
76
+ * @fires lhold
77
+ * @fires rhold
78
+ * @fires mhold
79
+ * @fires mousewheel
80
+ * @fires touchmove
81
+ * @fires touchstart
82
+ * @fires touchend
83
+ * @fires doubletouch
84
+ * @fires touchleave
85
+ * @fires touchenter
76
86
  */
77
87
  declare class EntityCollection {
78
88
  static __counter__: number;
@@ -85,9 +95,9 @@ declare class EntityCollection {
85
95
  /**
86
96
  * Render node context.
87
97
  * @public
88
- * @type {RenderNode}
98
+ * @type {Scene}
89
99
  */
90
- renderNode: RenderNode | null;
100
+ scene: Scene | null;
91
101
  /**
92
102
  * Visibility option.
93
103
  * @public
@@ -95,11 +105,13 @@ declare class EntityCollection {
95
105
  */
96
106
  _visibility: boolean;
97
107
  /**
98
- * Specifies the scale Units for gl.polygonOffset function to calculate depth values, 0.0 is default.
108
+ * Signed world-space depth offset along the camera ray.
109
+ * Negative values move geometry closer to the camera, positive values move it farther.
110
+ * 0.0 means no offset.
99
111
  * @public
100
112
  * @type {Number}
101
113
  */
102
- polygonOffsetUnits: number;
114
+ depthOffset: number;
103
115
  /**
104
116
  * Billboards handler
105
117
  * @public
@@ -181,15 +193,22 @@ declare class EntityCollection {
181
193
  */
182
194
  _layer?: Vector;
183
195
  _quadNode?: EntityCollectionNode;
184
- _useLighting: number;
196
+ _shadeMode: ShadeMode;
197
+ /**
198
+ * Disables `gl.CULL_FACE` for geo objects rendering passes (opaque/transparent).
199
+ * Useful for rendering models with inverted/inconsistent triangle winding.
200
+ * @public
201
+ * @type {boolean}
202
+ */
203
+ disableCullFace: boolean;
185
204
  protected _depthOrder: number;
186
205
  constructor(options?: IEntityCollectionParams);
187
206
  get depthOrder(): number;
188
207
  set depthOrder(depghOrder: number);
189
208
  isEmpty(): boolean;
190
209
  get id(): number;
191
- get useLighting(): boolean;
192
- set useLighting(f: boolean);
210
+ get shadeMode(): ShadeMode;
211
+ set shadeMode(m: ShadeModeInput);
193
212
  isEqual(ec: EntityCollection | null): boolean;
194
213
  /**
195
214
  * Sets collection visibility.
@@ -200,7 +219,7 @@ declare class EntityCollection {
200
219
  /**
201
220
  * Returns collection visibility.
202
221
  * @public
203
- * @returns {boolean} -
222
+ * @returns {boolean} Collection visibility flag.
204
223
  */
205
224
  getVisibility(): boolean;
206
225
  /**
@@ -218,7 +237,7 @@ declare class EntityCollection {
218
237
  /**
219
238
  * Gets collection opacity.
220
239
  * @public
221
- * @returns {number} -
240
+ * @returns {number} Collection opacity.
222
241
  */
223
242
  getOpacity(): number;
224
243
  /**
@@ -229,27 +248,33 @@ declare class EntityCollection {
229
248
  * @param {number} [farInvisible] - Entity visibility distance.
230
249
  */
231
250
  setScaleByDistance(near: number, far: number, farInvisible?: number): void;
251
+ setVisibleSphere(p: Vec3, r: number): void;
252
+ /**
253
+ * Aligns collection entities to terrain.
254
+ * Currently applies to polyline entities.
255
+ */
256
+ applyTerrainCollision(nodes: Node[], visibleExtent: Extent): void;
232
257
  appendChildEntity(entity: Entity): void;
233
258
  protected _addRecursively(entity: Entity): void;
234
259
  /**
235
260
  * Adds entity to the collection and returns collection.
236
261
  * @public
237
262
  * @param {Entity} entity - Entity.
238
- * @returns {EntityCollection} -
263
+ * @returns {EntityCollection} Current collection instance.
239
264
  */
240
265
  add(entity: Entity): EntityCollection;
241
266
  /**
242
267
  * Adds entities array to the collection and returns collection.
243
268
  * @public
244
269
  * @param {Array.<Entity>} entities - Entities array.
245
- * @returns {EntityCollection} -
270
+ * @returns {EntityCollection} Current collection instance.
246
271
  */
247
272
  addEntities(entities: Entity[]): EntityCollection;
248
273
  /**
249
- * Returns true if the entity belongs this collection, otherwise returns false.
274
+ * Returns true if the entity belongs to this collection, otherwise returns false.
250
275
  * @public
251
276
  * @param {Entity} entity - Entity.
252
- * @returns {boolean} -
277
+ * @returns {boolean} `true` if the entity belongs to this collection.
253
278
  */
254
279
  belongs(entity: Entity): boolean;
255
280
  protected _removeRecursively(entity: Entity): void;
@@ -276,17 +301,17 @@ declare class EntityCollection {
276
301
  /**
277
302
  * Adds this collection to render node.
278
303
  * @public
279
- * @param {RenderNode} renderNode - Render node.
280
- * @param {boolean} [isHidden] - Uses in vector layers that render in planet render specific function.
281
- * @returns {EntityCollection} -
304
+ * @param {Scene} scene - Render node.
305
+ * @param {boolean} [isHidden] - Used in vector layers with planet-specific rendering.
306
+ * @returns {EntityCollection} Current collection instance.
282
307
  */
283
- addTo(renderNode: RenderNode, isHidden?: boolean): this;
308
+ addTo(scene: Scene, isHidden?: boolean): this;
284
309
  /**
285
- * This function is called in the RenderNode assign function.
310
+ * This function is called in the Scene assign function.
286
311
  * @public
287
- * @param {RenderNode} renderNode
312
+ * @param {Scene} scene
288
313
  */
289
- bindRenderNode(renderNode: RenderNode): void;
314
+ bindScene(scene: Scene): void;
290
315
  protected _onChangeRelativeCenter: (c: Vec3) => void;
291
316
  /**
292
317
  * Updates coordinates all lonLat entities in collection after collection attached to the planet node.
@@ -317,7 +342,7 @@ declare class EntityCollection {
317
342
  /**
318
343
  * Gets entity array.
319
344
  * @public
320
- * @returns {Array.<Entity>} -
345
+ * @returns {Array.<Entity>} Entity array copy.
321
346
  */
322
347
  getEntities(): Entity[];
323
348
  /**
@@ -1,17 +1,17 @@
1
- import { Entity } from "./Entity";
2
- import { Vec2 } from "../math/Vec2";
3
- import { Vec3 } from "../math/Vec3";
4
- import { Vec4 } from "../math/Vec4";
5
- import type { NumberArray2 } from "../math/Vec2";
6
- import type { NumberArray3 } from "../math/Vec3";
7
- import type { NumberArray4 } from "../math/Vec4";
1
+ import { Entity } from "../Entity";
2
+ import { Vec2 } from "../../math/Vec2";
3
+ import { Vec3 } from "../../math/Vec3";
4
+ import { Vec4 } from "../../math/Vec4";
5
+ import type { NumberArray2 } from "../../math/Vec2";
6
+ import type { NumberArray3 } from "../../math/Vec3";
7
+ import type { NumberArray4 } from "../../math/Vec4";
8
8
  import { BaseBillboardHandler } from "./BaseBillboardHandler";
9
9
  export interface IBaseBillboardParams {
10
10
  position?: NumberArray3 | Vec3;
11
11
  rotation?: number;
12
12
  color?: string | NumberArray4 | Vec4;
13
13
  alignedAxis?: NumberArray3 | Vec3;
14
- offset?: NumberArray2 | NumberArray3 | Vec2 | Vec3;
14
+ offset?: NumberArray2 | Vec2;
15
15
  visibility?: boolean;
16
16
  }
17
17
  /**
@@ -22,7 +22,7 @@ export interface IBaseBillboardParams {
22
22
  * @param {number} [options.rotation] - Screen angle rotation.
23
23
  * @param {Vec4|string|Array.<number>} [options.color] - Billboard color.
24
24
  * @param {Vec3|Array.<number>} [options.alignedAxis] - Billboard aligned vector.
25
- * @param {Vec3|Array.<number>} [options.offset] - Billboard center screen offset.
25
+ * @param {Vec2|Array.<number>} [options.offset] - Billboard center screen offset.
26
26
  * @param {boolean} [options.visibility] - Visibility.
27
27
  */
28
28
  declare class BaseBillboard {
@@ -55,11 +55,11 @@ declare class BaseBillboard {
55
55
  */
56
56
  protected _alignedAxis: Vec3;
57
57
  /**
58
- * Billboard center screen space offset. Where x,y - screen space offset and z - depth offset.
58
+ * Billboard center screen space offset.
59
59
  * @public
60
- * @type {Vec3}
60
+ * @type {Vec2}
61
61
  */
62
- _offset: Vec3;
62
+ _offset: Vec2;
63
63
  /**
64
64
  * Billboard visibility.
65
65
  * @protected
@@ -117,21 +117,20 @@ declare class BaseBillboard {
117
117
  * @public
118
118
  * @param {number} x - X offset.
119
119
  * @param {number} y - Y offset.
120
- * @param {number} [z] - Z offset.
121
120
  */
122
- setOffset(x: number, y: number, z?: number): void;
121
+ setOffset(x: number, y: number): void;
123
122
  /**
124
123
  * Sets screen space offset.
125
124
  * @public
126
125
  * @param {Vec2} offset - Offset size.
127
126
  */
128
- setOffset3v(offset: Vec3): void;
127
+ setOffset2v(offset: Vec2): void;
129
128
  /**
130
129
  * Returns billboard screen space offset size.
131
130
  * @public
132
- * @returns {Vec3}
131
+ * @returns {Vec2}
133
132
  */
134
- getOffset(): Vec3;
133
+ getOffset(): Vec2;
135
134
  /**
136
135
  * Sets billboard screen space rotation in radians.
137
136
  * @public
@@ -1,9 +1,11 @@
1
- import type { TypedArray } from "../utils/shared";
2
- import { EntityCollection } from "./EntityCollection";
3
- import { Renderer } from "../renderer/Renderer";
4
- import { Vec3 } from "../math/Vec3";
5
- import { Vec4 } from "../math/Vec4";
6
- import type { WebGLBufferExt } from "../webgl/Handler";
1
+ import type { TypedArray } from "../../utils/shared";
2
+ import { EntityCollection } from "../EntityCollection";
3
+ import { Renderer } from "../../renderer/Renderer";
4
+ import { Vec2 } from "../../math/Vec2";
5
+ import { Vec3 } from "../../math/Vec3";
6
+ import { Vec4 } from "../../math/Vec4";
7
+ import type { WebGLBufferExt } from "../../webgl/Handler";
8
+ import type { ShaderProgram } from "../../webgl/ShaderProgram";
7
9
  import { BaseBillboard } from "./BaseBillboard";
8
10
  /**
9
11
  * @class BaseBillboardHandler
@@ -20,6 +22,7 @@ declare class BaseBillboardHandler {
20
22
  _entityCollection: EntityCollection;
21
23
  protected _renderer: Renderer | null;
22
24
  protected _billboards: BaseBillboard[];
25
+ protected _opaqueCounterIndex: number;
23
26
  protected _positionHighBuffer: WebGLBufferExt | null;
24
27
  protected _positionLowBuffer: WebGLBufferExt | null;
25
28
  protected _sizeBuffer: WebGLBufferExt | null;
@@ -40,9 +43,16 @@ declare class BaseBillboardHandler {
40
43
  protected _pickingColorArr: Float32Array;
41
44
  protected _buffersUpdateCallbacks: Function[];
42
45
  protected _changedBuffers: boolean[];
46
+ protected _configureDepthPass(depthWrite: boolean): void;
47
+ protected _restoreDepthPass(depthWrite: boolean): void;
43
48
  constructor(entityCollection: EntityCollection);
44
49
  isEqual(handler: BaseBillboardHandler): boolean;
45
50
  static concArr(dest: number[], curr: number[]): void;
51
+ protected _isBillboardOpaque(billboard: BaseBillboard): boolean;
52
+ protected _swapArrayItems(arr: Float32Array, itemSize: number, firstIndex: number, secondIndex: number): void;
53
+ protected _swapBillboardData(firstIndex: number, secondIndex: number): void;
54
+ protected _insertBillboardByOpacity(billboardIndex: number, isOpaque: boolean): void;
55
+ protected _updateBillboardOpacityState(billboardIndex: number, isOpaque: boolean): boolean;
46
56
  initProgram(): void;
47
57
  setRenderer(renderer: Renderer): void;
48
58
  refresh(): void;
@@ -51,9 +61,14 @@ declare class BaseBillboardHandler {
51
61
  protected _deleteBuffers(): void;
52
62
  update(): void;
53
63
  add(billboard: BaseBillboard): void;
54
- protected _displayPASS(): void;
64
+ protected _displayPASS(startBillboardIndex: number, endBillboardIndex: number, billboardProgram: ShaderProgram, depthWrite?: boolean): void;
55
65
  protected _pickingPASS(): void;
56
- draw(): void;
66
+ drawForward(): void;
67
+ protected _getOpaqueProgram(): ShaderProgram;
68
+ protected _getTransparentProgram(): ShaderProgram;
69
+ drawOpaque(): void;
70
+ drawTransparent(): void;
71
+ drawTransparentForward(): void;
57
72
  drawPicking(): void;
58
73
  reindexBillboardsArray(startIndex: number): void;
59
74
  protected _removeBillboard(billboard: BaseBillboard): void;
@@ -62,7 +77,7 @@ declare class BaseBillboardHandler {
62
77
  setPositionArr(index: number, positionHigh: Vec3, positionLow: Vec3): void;
63
78
  setPickingColorArr(index: number, color: Vec3): void;
64
79
  setSizeArr(index: number, width: number, height: number): void;
65
- setOffsetArr(index: number, offset: Vec3): void;
80
+ setOffsetArr(index: number, offset: Vec2): void;
66
81
  setRgbaArr(index: number, rgba: Vec4): void;
67
82
  setRotationArr(index: number, rotation: number): void;
68
83
  setTexCoordArr(index: number, tcoordArr: number[] | TypedArray): void;
@@ -1,13 +1,14 @@
1
1
  import { BaseBillboard } from "./BaseBillboard";
2
2
  import type { IBaseBillboardParams } from "./BaseBillboard";
3
3
  import { BillboardHandler } from "./BillboardHandler";
4
- import type { HTMLImageElementExt } from "../utils/ImagesCacheManager";
4
+ import type { HTMLImageElementExt } from "../../utils/ImagesCacheManager";
5
5
  export interface IBillboardParams extends IBaseBillboardParams {
6
6
  src?: string;
7
7
  image?: HTMLImageElement;
8
- size?: [number, number];
9
- width?: number;
10
- height?: number;
8
+ size?: [number, number] | null;
9
+ width?: number | null;
10
+ height?: number | null;
11
+ scale?: number | null;
11
12
  }
12
13
  /**
13
14
  * Represents basic quad billboard image.
@@ -18,7 +19,7 @@ export interface IBillboardParams extends IBaseBillboardParams {
18
19
  * @param {number} [options.rotation] - Screen angle rotation.
19
20
  * @param {Vec4|string|Array.<number>} [options.color] - Billboard color.
20
21
  * @param {Vec3|Array.<number>} [options.alignedAxis] - Billboard aligned vector.
21
- * @param {Vec3|Array.<number>} [options.offset] - Billboard center screen offset.
22
+ * @param {Vec2|Array.<number>} [options.offset] - Billboard center screen offset.
22
23
  * @param {boolean} [options.visibility] - Visibility.
23
24
  * @param {string} [options.src] - Billboard image url source.
24
25
  * @param {Image} [options.image] - Billboard image object.
@@ -39,9 +40,9 @@ declare class Billboard extends BaseBillboard {
39
40
  * @protected
40
41
  * @type {Object}
41
42
  */
42
- protected _image: HTMLImageElement & {
43
+ protected _image: (HTMLImageElement & {
43
44
  __nodeIndex?: number;
44
- } | null;
45
+ }) | null;
45
46
  protected _scale: number;
46
47
  /**
47
48
  * Billboard screen width.
@@ -56,6 +57,7 @@ declare class Billboard extends BaseBillboard {
56
57
  */
57
58
  _height: number;
58
59
  constructor(options?: IBillboardParams);
60
+ protected _applyImageSize(image: HTMLImageElementExt | HTMLImageElement | null): void;
59
61
  /**
60
62
  * Sets billboard image url source.
61
63
  * @public
@@ -77,6 +79,8 @@ declare class Billboard extends BaseBillboard {
77
79
  * @param {number} height - Billboard height.
78
80
  */
79
81
  setSize(width: number, height: number): void;
82
+ getScale(): number;
83
+ setOffset(x: number, y: number): void;
80
84
  /**
81
85
  * Returns billboard screen size.
82
86
  * @public
@@ -1,6 +1,6 @@
1
1
  import { BaseBillboardHandler } from "./BaseBillboardHandler";
2
2
  import { Billboard } from "./Billboard";
3
- import { EntityCollection } from "./EntityCollection";
3
+ import { EntityCollection } from "../EntityCollection";
4
4
  /**
5
5
  * @class BillboardHandler
6
6
  */
@@ -1,14 +1,14 @@
1
- import { Entity } from "./Entity";
2
- import { Quat, Vec3, Vec4 } from "../math/index";
1
+ import { Entity } from "../Entity";
2
+ import { Quat } from "../../math/Quat";
3
+ import { Vec3, type NumberArray3 } from "../../math/Vec3";
4
+ import { Vec4, type NumberArray4 } from "../../math/Vec4";
3
5
  import { GeoObjectHandler } from "./GeoObjectHandler";
4
6
  import { InstanceData } from "./InstanceData";
5
- import type { NumberArray3 } from "../math/Vec3";
6
- import type { NumberArray4 } from "../math/Vec4";
7
- import { Object3d } from "../Object3d";
7
+ import { Object3d } from "../../Object3d";
8
8
  export declare const LOCAL_FORWARD: Vec3;
9
9
  /**
10
10
  * Interface for GeoObject parameters.
11
- * @typedef {Object} IGeoObjectParams
11
+ * @interface IGeoObjectParams
12
12
  * @property {Object3d} [object3d] - 3D object associated with the geo object.
13
13
  * @property {string} [objSrc] - Source url of the 3D object.
14
14
  * @property {string} [tag] - Unique instancing drawing identifier tag.
@@ -153,6 +153,7 @@ declare class GeoObject {
153
153
  * @param {boolean} visibility - Visibility flag.
154
154
  */
155
155
  setVisibility(visibility: boolean): void;
156
+ get instanceData(): InstanceData | null;
156
157
  /**
157
158
  * Returns geo object visibility.
158
159
  * @public
@@ -1,12 +1,14 @@
1
- import { EntityCollection } from "./EntityCollection";
1
+ import type { TypedArray } from "../../utils/shared";
2
+ import type { EntityCollection } from "../EntityCollection";
2
3
  import { GeoObject } from "./GeoObject";
3
- import { Vec3 } from "../math/Vec3";
4
- import { Vec4 } from "../math/Vec4";
5
- import { Quat } from "../math/Quat";
6
- import { Object3d } from "../Object3d";
4
+ import { Vec3 } from "../../math/Vec3";
5
+ import { Vec4 } from "../../math/Vec4";
6
+ import { Quat } from "../../math/Quat";
7
+ import { Object3d } from "../../Object3d";
7
8
  import { InstanceData } from "./InstanceData";
8
- import { Renderer } from "../renderer/Renderer";
9
- import { RenderNode } from "../scene/RenderNode";
9
+ import type { Renderer } from "../../renderer/Renderer";
10
+ import type { Scene } from "../../scene/Scene";
11
+ import type { ShaderProgram } from "../../webgl/ShaderProgram";
10
12
  export declare const VERTEX_BUFFER = 0;
11
13
  export declare const RTC_POSITION_BUFFER = 1;
12
14
  export declare const RGBA_BUFFER = 2;
@@ -29,7 +31,7 @@ export declare class GeoObjectHandler {
29
31
  */
30
32
  pickingEnabled: boolean;
31
33
  protected _entityCollection: EntityCollection;
32
- _renderNode: RenderNode | null;
34
+ _scene: Scene | null;
33
35
  _renderer: Renderer | null;
34
36
  protected _geoObjects: GeoObject[];
35
37
  protected _instanceDataMap: Map<string, InstanceData>;
@@ -38,18 +40,32 @@ export declare class GeoObjectHandler {
38
40
  protected _relativeCenter: Vec3;
39
41
  protected _rtcEyePositionHigh: Float32Array;
40
42
  protected _rtcEyePositionLow: Float32Array;
43
+ /**
44
+ * @param {EntityCollection} entityCollection - Parent entity collection.
45
+ */
41
46
  constructor(entityCollection: EntityCollection);
47
+ protected _isOpaqueAlpha(alpha: number): boolean;
48
+ protected _markPerInstanceBuffersChanged(tagData: InstanceData): void;
49
+ protected _swapArrayItems(arr: number[] | TypedArray, itemSize: number, firstIndex: number, secondIndex: number): void;
50
+ protected _swapInstanceData(tagData: InstanceData, firstIndex: number, secondIndex: number): void;
51
+ protected _insertInstanceByOpacity(tagData: InstanceData, instanceIndex: number, isOpaque: boolean): void;
52
+ protected _updateInstanceOpacityState(tagData: InstanceData, instanceIndex: number, isOpaque: boolean): boolean;
42
53
  initProgram(): void;
43
- setRenderNode(renderNode: RenderNode): void;
54
+ bindScene(scene: Scene): void;
44
55
  setColorTextureTag(src: string | HTMLImageElement, tag: string): void;
45
56
  setNormalTextureTag(src: string | HTMLImageElement, tag: string): void;
46
57
  setMetallicRoughnessTextureTag(src: string | HTMLImageElement, tag: string): void;
58
+ setAmbientOcclusionTextureTag(src: string | HTMLImageElement, tag: string): void;
47
59
  setObjectSrc(src: string, tag: string): void;
48
60
  _updateInstanceData(object: Object3d, tag: string): void;
49
61
  protected _addGeoObjectToArray(geoObject: GeoObject): void;
50
- protected _bindCommon(): void;
62
+ protected _bindCommon(p: ShaderProgram): void;
63
+ protected _bindForwardParams(p: ShaderProgram): void;
64
+ protected _bindAtmosphereParams(p: ShaderProgram): void;
51
65
  _displayOpaquePASS(): void;
52
66
  _displayTransparentPASS(): void;
67
+ _displayTransparentForwardPASS(): void;
68
+ _displayForwardPASS(): void;
53
69
  protected _depthPASS(): void;
54
70
  drawDepth(): void;
55
71
  drawPicking(): void;
@@ -69,8 +85,10 @@ export declare class GeoObjectHandler {
69
85
  getRTCPosition(pos: Vec3, rtcPositionHigh: Vec3, rtcPositionLow: Vec3): void;
70
86
  setRelativeCenter(c: Vec3): void;
71
87
  protected _updateRTCEyePosition(): void;
72
- draw(): void;
88
+ drawForward(): void;
89
+ drawOpaque(): void;
73
90
  drawTransparent(): void;
91
+ drawTransparentForward(): void;
74
92
  add(geoObject: GeoObject): void;
75
93
  remove(geoObject: GeoObject): void;
76
94
  _clearDataTagQueue(): void;
@@ -1,21 +1,25 @@
1
1
  import { GeoObject } from "./GeoObject";
2
- import type { WebGLBufferExt, WebGLTextureExt } from "../webgl/Handler";
3
- import type { TypedArray } from "../utils/shared";
4
- import { Program } from "../webgl/Program";
2
+ import type { WebGLBufferExt, WebGLTextureExt } from "../../webgl/Handler";
3
+ import type { TypedArray } from "../../utils/shared";
4
+ import { ShaderProgram } from "../../webgl/ShaderProgram";
5
5
  import { GeoObjectHandler } from "./GeoObjectHandler";
6
6
  export declare class InstanceData {
7
7
  isFree: boolean;
8
8
  _geoObjectHandler: GeoObjectHandler;
9
9
  geoObjects: GeoObject[];
10
10
  numInstances: number;
11
+ _opaqueInstanceCount: number;
11
12
  _colorTexture: WebGLTextureExt | null;
12
13
  _normalTexture: WebGLTextureExt | null;
14
+ _ambientOcclusionTexture: WebGLTextureExt | null;
13
15
  _metallicRoughnessTexture: WebGLTextureExt | null;
14
16
  _colorTextureSrc: string | null;
15
17
  _normalTextureSrc: string | null;
18
+ _ambientOcclusionTextureSrc: string | null;
16
19
  _metallicRoughnessTextureSrc: string | null;
17
20
  _colorTextureImage: HTMLImageElement | null;
18
21
  _normalTextureImage: HTMLImageElement | null;
22
+ _ambientOcclusionTextureImage: HTMLImageElement | null;
19
23
  _metallicRoughnessTextureImage: HTMLImageElement | null;
20
24
  _objectSrc?: string;
21
25
  _sizeArr: number[] | TypedArray;
@@ -46,20 +50,20 @@ export declare class InstanceData {
46
50
  _localPositionBuffer: WebGLBufferExt | null;
47
51
  _buffersUpdateCallbacks: Function[];
48
52
  _changedBuffers: boolean[];
49
- _materialParams: Float32Array;
50
- _materialShininess: number;
53
+ _materialProperties: Float32Array;
51
54
  constructor(geoObjectHandler: GeoObjectHandler);
52
- setMaterialAmbient(r: number, g: number, b: number): void;
53
- setMaterialDiffuse(r: number, g: number, b: number): void;
54
- setMaterialSpecular(r: number, g: number, b: number): void;
55
- setMaterialShininess(shininess: number): void;
56
- setMaterialParams(ambient: Float32Array, diffuse: Float32Array, specular: Float32Array, shininess: number): void;
57
- drawOpaque(p: Program): void;
58
- drawTransparent(p: Program): void;
59
- protected _drawElementsInstanced(p: Program): void;
55
+ setMetallic(metallic: number): void;
56
+ setRoughness(roughness: number): void;
57
+ setAmbientOcclusion(ambientOcclusion: number): void;
58
+ setMaterialProperties(ambientOcclusion: number, roughness: number, metallic: number): void;
59
+ drawOpaque(p: ShaderProgram): void;
60
+ drawForwardAll(p: ShaderProgram): void;
61
+ drawTransparent(p: ShaderProgram): void;
62
+ protected _drawElementsInstanced(p: ShaderProgram, startInstance: number, instanceCount: number): void;
60
63
  loadColorTexture(): Promise<void>;
61
64
  loadNormalTexture(): Promise<void>;
62
65
  loadMetallicRoughnessTexture(): Promise<void>;
66
+ loadAmbientOcclusionTexture(): Promise<void>;
63
67
  clear(): void;
64
68
  _deleteBuffers(): void;
65
69
  createVertexBuffer(): void;
@@ -79,4 +83,5 @@ export declare class InstanceData {
79
83
  private _createColorTexture;
80
84
  private _createNormalTexture;
81
85
  private _createMetallicRoughnessTexture;
86
+ private _createAmbientOcclusionTexture;
82
87
  }